@alfalab/core-components-input-autocomplete 7.2.7 → 7.3.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 (96) hide show
  1. package/CHANGELOG.md +11 -0
  2. package/dist/Component-7ca84eff.d.ts +227 -0
  3. package/dist/Component.d.ts +3 -3
  4. package/dist/Component.js +6 -5
  5. package/dist/Component.mobile.d.ts +96 -0
  6. package/dist/Component.mobile.js +82 -0
  7. package/dist/autocomplete-field/Component.d.ts +6 -0
  8. package/dist/autocomplete-field/Component.js +39 -6
  9. package/dist/autocomplete-field/index.css +2 -2
  10. package/dist/autocomplete-field/index.d.ts +1 -1
  11. package/dist/autocomplete-field/index.js +4 -3
  12. package/dist/autocomplete-mobile-field/Component.d.ts +7 -0
  13. package/dist/autocomplete-mobile-field/Component.js +37 -0
  14. package/dist/autocomplete-mobile-field/index.css +49 -0
  15. package/dist/autocomplete-mobile-field/index.d.ts +1 -0
  16. package/dist/autocomplete-mobile-field/index.js +14 -0
  17. package/dist/cssm/Component-7ca84eff.d.ts +227 -0
  18. package/dist/cssm/Component.d.ts +3 -3
  19. package/dist/cssm/Component.js +6 -5
  20. package/dist/cssm/Component.mobile.d.ts +96 -0
  21. package/dist/cssm/Component.mobile.js +82 -0
  22. package/dist/cssm/autocomplete-field/Component.d.ts +6 -0
  23. package/dist/cssm/autocomplete-field/Component.js +38 -7
  24. package/dist/cssm/autocomplete-field/index.d.ts +1 -1
  25. package/dist/cssm/autocomplete-field/index.js +4 -3
  26. package/dist/cssm/autocomplete-mobile-field/Component.d.ts +7 -0
  27. package/dist/cssm/autocomplete-mobile-field/Component.js +36 -0
  28. package/dist/cssm/autocomplete-mobile-field/index.d.ts +1 -0
  29. package/dist/cssm/autocomplete-mobile-field/index.js +15 -0
  30. package/dist/cssm/autocomplete-mobile-field/index.module.css +48 -0
  31. package/dist/cssm/index-7ca84eff.d.ts +178 -0
  32. package/dist/cssm/index-bdb4c6b9.d.ts +193 -0
  33. package/dist/cssm/index-ebda875c.d.ts +36 -0
  34. package/dist/cssm/index.js +4 -3
  35. package/dist/cssm/mobile.d.ts +1 -0
  36. package/dist/cssm/mobile.js +22 -0
  37. package/dist/cssm/mobile.module.css +18 -0
  38. package/dist/{Component-7d703cac.d.ts → cssm/tslib.es6-ce870b46.d.ts} +1 -6
  39. package/dist/cssm/tslib.es6-ce870b46.js +42 -0
  40. package/dist/esm/Component-7ca84eff.d.ts +227 -0
  41. package/dist/esm/Component.d.ts +3 -3
  42. package/dist/esm/Component.js +4 -3
  43. package/dist/esm/Component.mobile.d.ts +96 -0
  44. package/dist/esm/Component.mobile.js +71 -0
  45. package/dist/esm/autocomplete-field/Component.d.ts +6 -0
  46. package/dist/esm/autocomplete-field/Component.js +36 -5
  47. package/dist/esm/autocomplete-field/index.css +2 -2
  48. package/dist/esm/autocomplete-field/index.d.ts +1 -1
  49. package/dist/esm/autocomplete-field/index.js +4 -3
  50. package/dist/esm/autocomplete-mobile-field/Component.d.ts +7 -0
  51. package/dist/esm/autocomplete-mobile-field/Component.js +28 -0
  52. package/dist/esm/autocomplete-mobile-field/index.css +49 -0
  53. package/dist/esm/autocomplete-mobile-field/index.d.ts +1 -0
  54. package/dist/esm/autocomplete-mobile-field/index.js +6 -0
  55. package/dist/esm/index-7ca84eff.d.ts +178 -0
  56. package/dist/esm/index-bdb4c6b9.d.ts +193 -0
  57. package/dist/esm/index-ebda875c.d.ts +36 -0
  58. package/dist/esm/index.js +4 -3
  59. package/dist/esm/mobile.css +19 -0
  60. package/dist/esm/mobile.d.ts +1 -0
  61. package/dist/esm/mobile.js +12 -0
  62. package/dist/esm/{Component-077ac41e.d.ts → tslib.es6-675ade68.d.ts} +1 -6
  63. package/dist/esm/tslib.es6-675ade68.js +40 -0
  64. package/dist/index-7ca84eff.d.ts +178 -0
  65. package/dist/index-bdb4c6b9.d.ts +193 -0
  66. package/dist/index-ebda875c.d.ts +36 -0
  67. package/dist/index.js +4 -3
  68. package/dist/mobile.css +19 -0
  69. package/dist/mobile.d.ts +1 -0
  70. package/dist/mobile.js +20 -0
  71. package/dist/modern/Component-7ca84eff.d.ts +227 -0
  72. package/dist/modern/Component.d.ts +3 -3
  73. package/dist/modern/Component.js +2 -2
  74. package/dist/modern/Component.mobile.d.ts +96 -0
  75. package/dist/modern/Component.mobile.js +80 -0
  76. package/dist/modern/autocomplete-field/Component.js +3 -3
  77. package/dist/modern/autocomplete-field/index.css +2 -2
  78. package/dist/modern/autocomplete-field/index.js +2 -2
  79. package/dist/modern/autocomplete-mobile-field/Component.d.ts +7 -0
  80. package/dist/modern/autocomplete-mobile-field/Component.js +25 -0
  81. package/dist/modern/autocomplete-mobile-field/index.css +49 -0
  82. package/dist/modern/autocomplete-mobile-field/index.d.ts +1 -0
  83. package/dist/modern/autocomplete-mobile-field/index.js +5 -0
  84. package/dist/modern/index-7ca84eff.d.ts +178 -0
  85. package/dist/modern/index-bdb4c6b9.d.ts +193 -0
  86. package/dist/modern/index-ebda875c.d.ts +36 -0
  87. package/dist/modern/index.js +2 -2
  88. package/dist/modern/mobile.css +19 -0
  89. package/dist/modern/mobile.d.ts +1 -0
  90. package/dist/modern/mobile.js +11 -0
  91. package/dist/{cssm/Component-a04a9434.d.ts → tslib.es6-2cf95ef9.d.ts} +1 -6
  92. package/dist/tslib.es6-2cf95ef9.js +42 -0
  93. package/package.json +12 -4
  94. package/dist/Component-7d703cac.js +0 -83
  95. package/dist/cssm/Component-a04a9434.js +0 -82
  96. package/dist/esm/Component-077ac41e.js +0 -74
@@ -0,0 +1,178 @@
1
+ /// <reference types="react-transition-group" />
2
+ /// <reference types="react" />
3
+ import React from "react";
4
+ import { HTMLAttributes, ReactNode, FC } from "react";
5
+ import { TransitionProps } from "react-transition-group/Transition";
6
+ import { BackdropProps } from "./index-ebda875c";
7
+ import { SwipeableHandlers } from "react-swipeable/types";
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
+ actionButton?: ReactNode;
26
+ /**
27
+ * Дополнительный класс
28
+ */
29
+ className?: string;
30
+ /**
31
+ * Дополнительный класс
32
+ */
33
+ contentClassName?: string;
34
+ /**
35
+ * Дополнительные пропсы на контейнер.
36
+ */
37
+ containerProps?: HTMLAttributes<HTMLDivElement>;
38
+ /**
39
+ * Дополнительный класс
40
+ */
41
+ containerClassName?: string;
42
+ /**
43
+ * Дополнительный класс шапки
44
+ */
45
+ headerClassName?: string;
46
+ /**
47
+ * Дополнительный класс футера
48
+ */
49
+ footerClassName?: string;
50
+ /**
51
+ * Дополнительный класс для аддонов
52
+ */
53
+ addonClassName?: string;
54
+ /**
55
+ * Дополнительный класс для компонента крестика
56
+ */
57
+ closerClassName?: string;
58
+ /**
59
+ * Дополнительный класс для компонента стрелки назад
60
+ */
61
+ backerClassName?: string;
62
+ /**
63
+ * TransitionProps, прокидываются в компонент CSSTransitionProps.
64
+ */
65
+ transitionProps?: Partial<TransitionProps>;
66
+ /**
67
+ * Идентификатор для систем автоматизированного тестирования
68
+ */
69
+ dataTestId?: string;
70
+ /**
71
+ * z-index компонента
72
+ */
73
+ zIndex?: number;
74
+ /**
75
+ * Будет ли свайпаться шторка
76
+ * @default true
77
+ */
78
+ swipeable?: boolean;
79
+ /**
80
+ * Слот слева
81
+ */
82
+ leftAddons?: ReactNode;
83
+ /**
84
+ * Слот справа
85
+ */
86
+ rightAddons?: ReactNode;
87
+ /**
88
+ * Слот снизу
89
+ */
90
+ bottomAddons?: ReactNode;
91
+ /**
92
+ * Наличие компонента крестика
93
+ */
94
+ hasCloser?: boolean;
95
+ /**
96
+ * Наличие компонента стрелки назад
97
+ */
98
+ hasBacker?: boolean;
99
+ /**
100
+ * Выравнивание заголовка
101
+ */
102
+ titleAlign?: BottomSheetTitleAlign;
103
+ /**
104
+ * Фиксирует шапку
105
+ */
106
+ stickyHeader?: boolean;
107
+ /**
108
+ * Фиксирует футер
109
+ */
110
+ stickyFooter?: boolean;
111
+ /**
112
+ * Высота шторки
113
+ */
114
+ initialHeight?: "default" | "full";
115
+ /**
116
+ * Будет ли виден оверлэй
117
+ */
118
+ hideOverlay?: boolean;
119
+ /**
120
+ * Будет ли видна шапка
121
+ */
122
+ hideHeader?: boolean;
123
+ /**
124
+ * Будет ли обрезан заголовок
125
+ */
126
+ trimTitle?: boolean;
127
+ /**
128
+ * Запретить закрытие шторки кликом на оверлэй
129
+ */
130
+ disableOverlayClick?: boolean;
131
+ /**
132
+ * Не анимировать шторку при изменении размера вьюпорта
133
+ */
134
+ ignoreScreenChange?: boolean;
135
+ /**
136
+ * Обработчик закрытия
137
+ */
138
+ onClose: () => void;
139
+ /**
140
+ * Обработчик нажатия на стрелку назад
141
+ */
142
+ onBack?: () => void;
143
+ };
144
+ /* Верхний отступ шторки, если она открыта на максимальную высоту */
145
+ declare const HEADER_OFFSET = 24;
146
+ declare const CLOSE_OFFSET = 0.2;
147
+ declare const BottomSheet: React.ForwardRefExoticComponent<BottomSheetProps & React.RefAttributes<HTMLDivElement>>;
148
+ type FooterProps = {
149
+ /**
150
+ * Контент футера
151
+ */
152
+ children?: ReactNode;
153
+ /**
154
+ * Фиксирует футер
155
+ */
156
+ sticky?: boolean;
157
+ /**
158
+ * Дополнительный класс
159
+ */
160
+ className?: string;
161
+ };
162
+ declare const Footer: FC<FooterProps>;
163
+ type SwipeableBackdropProps = BackdropProps & {
164
+ /**
165
+ * Прозрачность бэкдропа
166
+ */
167
+ opacity?: number;
168
+ /**
169
+ * Обработчики свайпа
170
+ */
171
+ handlers?: SwipeableHandlers;
172
+ /**
173
+ * Время анимации opacity
174
+ */
175
+ opacityTimeout?: number;
176
+ };
177
+ declare const SwipeableBackdrop: FC<SwipeableBackdropProps>;
178
+ export { BottomSheetTitleAlign, BottomSheetProps, HEADER_OFFSET, CLOSE_OFFSET, BottomSheet, FooterProps, Footer, SwipeableBackdropProps, SwipeableBackdrop };
@@ -0,0 +1,193 @@
1
+ /// <reference types="react-transition-group" />
2
+ /// <reference types="react" />
3
+ /* eslint-disable jsx-a11y/no-noninteractive-element-interactions */
4
+ import React from "react";
5
+ import { MouseEvent, KeyboardEvent, ReactNode, Ref, FC, MutableRefObject, 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
+ type BaseModalProps = {
17
+ /**
18
+ * Контент
19
+ */
20
+ children?: ReactNode;
21
+ /**
22
+ * Компонент бэкдропа
23
+ */
24
+ Backdrop?: FC<BackdropProps>;
25
+ /**
26
+ * Свойства для Бэкдропа
27
+ */
28
+ backdropProps?: Partial<BackdropProps> & Record<string, unknown>;
29
+ /**
30
+ * Нода, компонент или функция возвращающая их
31
+ *
32
+ * Контейнер к которому будут добавляться порталы
33
+ */
34
+ container?: PortalProps["getPortalContainer"];
35
+ /**
36
+ * Отключает автоматический перевод фокуса на модалку при открытии
37
+ * @default false
38
+ */
39
+ disableAutoFocus?: boolean;
40
+ /**
41
+ * Отключает ловушку фокуса
42
+ * @default false
43
+ */
44
+ disableFocusLock?: boolean;
45
+ /**
46
+ * Отключает восстановление фокуса на предыдущем элементе после закрытия модалки
47
+ * @default false
48
+ */
49
+ disableRestoreFocus?: boolean;
50
+ /**
51
+ * Отключает вызов `callback` при нажатии Escape
52
+ * @default false
53
+ */
54
+ disableEscapeKeyDown?: boolean;
55
+ /**
56
+ * Отключает вызов `callback` при клике на бэкдроп
57
+ * @default false
58
+ */
59
+ disableBackdropClick?: boolean;
60
+ /**
61
+ * Содержимое модалки всегда в DOM
62
+ * @default false
63
+ */
64
+ keepMounted?: boolean;
65
+ /**
66
+ * Управление видимостью модалки
67
+ */
68
+ open: boolean;
69
+ /**
70
+ * Дополнительный класс
71
+ */
72
+ className?: string;
73
+ /**
74
+ * Дополнительный класс
75
+ */
76
+ contentClassName?: string;
77
+ /**
78
+ * Дополнительный класс для обертки (Modal)
79
+ */
80
+ wrapperClassName?: string;
81
+ /**
82
+ * Обработчик скролла контента
83
+ */
84
+ scrollHandler?: "wrapper" | "content" | MutableRefObject<HTMLDivElement | null>;
85
+ /**
86
+ * Пропсы для анимации (CSSTransition)
87
+ */
88
+ transitionProps?: Partial<TransitionProps>;
89
+ /**
90
+ * Обработчик события нажатия на бэкдроп
91
+ */
92
+ onBackdropClick?: (event: MouseEvent) => void;
93
+ /**
94
+ * Обработчик события нажатия на Escape
95
+ *
96
+ * Если `disableEscapeKeyDown` - false и модальное окно в фокусе
97
+ */
98
+ onEscapeKeyDown?: (event: KeyboardEvent) => void;
99
+ /**
100
+ * Обработчик закрытия
101
+ */
102
+ onClose?: (event: MouseEvent<HTMLElement> | KeyboardEvent<HTMLElement>, reason?: "backdropClick" | "escapeKeyDown" | "closerClick") => void;
103
+ /**
104
+ * Обработчик события onEntered компонента Transition
105
+ */
106
+ onMount?: () => void;
107
+ /**
108
+ * Обработчик события onExited компонента Transition
109
+ */
110
+ onUnmount?: () => void;
111
+ /**
112
+ * Идентификатор для систем автоматизированного тестирования
113
+ */
114
+ dataTestId?: string;
115
+ /**
116
+ * z-index компонента
117
+ */
118
+ zIndex?: number;
119
+ /**
120
+ * Реф, который должен быть установлен компонентной области
121
+ */
122
+ componentRef?: MutableRefObject<HTMLDivElement | null>;
123
+ };
124
+ type BaseModalContext = {
125
+ hasFooter?: boolean;
126
+ hasHeader?: boolean;
127
+ hasScroll?: boolean;
128
+ headerHighlighted?: boolean;
129
+ footerHighlighted?: boolean;
130
+ headerOffset?: number;
131
+ setHeaderOffset: (offset: number) => void;
132
+ contentRef: Ref<HTMLElement>;
133
+ setHasHeader: (exists: boolean) => void;
134
+ setHasFooter: (exists: boolean) => void;
135
+ onClose: Required<BaseModalProps>["onClose"];
136
+ };
137
+ declare const BaseModalContext: React.Context<BaseModalContext>;
138
+ declare const BaseModal: React.ForwardRefExoticComponent<BaseModalProps & React.RefAttributes<HTMLDivElement>>;
139
+ declare function isScrolledToTop(target: HTMLElement): boolean;
140
+ declare function isScrolledToBottom(target: HTMLElement): boolean;
141
+ declare function hasScrollbar(target: HTMLElement): boolean;
142
+ declare const restoreContainerStyles: (container: HTMLElement) => void;
143
+ declare const handleContainer: (container?: HTMLElement | undefined) => void;
144
+ /**
145
+ * Набор констант для z-index соответствующих классов компонентов.
146
+ * Значения выбраны по приоритету.
147
+ */
148
+ declare const stackingOrder: {
149
+ FOCUSED: number;
150
+ DEFAULT: number;
151
+ POPOVER: number;
152
+ MODAL: number;
153
+ TOAST: number;
154
+ };
155
+ declare const StackingContext: import("react").Context<number>;
156
+ type StackProps = {
157
+ /**
158
+ * Render prop, в который передается функция.
159
+ * Функция принимает аргумент со значением z-index из текущего контекста.
160
+ */
161
+ children: (value: number) => ReactNode;
162
+ /**
163
+ * Исходное значение для z-index.
164
+ * @default 5
165
+ */
166
+ value?: number;
167
+ };
168
+ declare const Stack: FC<StackProps>;
169
+ declare const PORTAL_CONTAINER_ATTRIBUTE = "alfa-portal-container";
170
+ declare const getDefaultPortalContainer: () => Element;
171
+ declare function setRef<T>(ref: RefObject<T> | ((instance: T | null) => void) | null | undefined, value: T | null): void;
172
+ type SavedStyle = {
173
+ value: string;
174
+ key: string;
175
+ el: HTMLElement;
176
+ };
177
+ type RestoreStyle = {
178
+ container: HTMLElement;
179
+ modals: number;
180
+ styles: SavedStyle[];
181
+ };
182
+ declare class ModalStore {
183
+ private readonly restoreStyles;
184
+ constructor();
185
+ getRestoreStyles: () => RestoreStyle[];
186
+ }
187
+ declare const getModalStore: () => ModalStore;
188
+ declare class GlobalStore {
189
+ private readonly modalStore;
190
+ constructor();
191
+ getModalStore: () => ModalStore;
192
+ }
193
+ export { BaseModalProps, BaseModalContext, BaseModal, isScrolledToTop, isScrolledToBottom, hasScrollbar, restoreContainerStyles, handleContainer, stackingOrder, StackingContext, StackProps, Stack, PORTAL_CONTAINER_ATTRIBUTE, getDefaultPortalContainer, setRef, SavedStyle, getModalStore, GlobalStore };
@@ -0,0 +1,36 @@
1
+ /// <reference types="react-transition-group" />
2
+ /// <reference types="react" />
3
+ import React from "react";
4
+ import { MouseEvent } from "react";
5
+ import { TransitionProps } from "react-transition-group/Transition";
6
+ import { CSSTransitionClassNames } from "react-transition-group/CSSTransition";
7
+ type BackdropProps = Partial<TransitionProps> & {
8
+ /**
9
+ * Прозрачный бэкдроп
10
+ */
11
+ invisible?: boolean;
12
+ /**
13
+ * Управляет видимостью компонента
14
+ */
15
+ open: boolean;
16
+ /**
17
+ * Обработчик клика по бэкдропу
18
+ */
19
+ onClose?: (event: MouseEvent<HTMLElement>) => void;
20
+ /**
21
+ * Дополнительный класс
22
+ */
23
+ className?: string;
24
+ /**
25
+ * Классы анимации
26
+ *
27
+ * http://reactcommunity.org/react-transition-group/css-transition#CSSTransition-prop-classNames
28
+ */
29
+ transitionClassNames?: string | CSSTransitionClassNames;
30
+ /**
31
+ * Идентификатор для систем автоматизированного тестирования
32
+ */
33
+ dataTestId?: string;
34
+ };
35
+ declare const Backdrop: React.FC<BackdropProps>;
36
+ export { BackdropProps, Backdrop };
package/dist/index.js CHANGED
@@ -2,12 +2,13 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- require('./Component-7d703cac.js');
5
+ require('./tslib.es6-2cf95ef9.js');
6
+ require('classnames');
6
7
  require('react');
8
+ require('react-merge-refs');
7
9
  require('@alfalab/core-components-select');
8
- require('classnames');
9
10
  require('@alfalab/core-components-input');
10
- require('react-merge-refs');
11
+ require('./autocomplete-field/Component.js');
11
12
  var Component = require('./Component.js');
12
13
 
13
14
 
@@ -0,0 +1,19 @@
1
+ /* hash: sxoev */
2
+ :root {
3
+
4
+ /* Hard */
5
+
6
+ /* Up */
7
+
8
+ /* Hard up */
9
+ }
10
+ :root {
11
+ --gap-xs: 8px;
12
+ }
13
+ .input-autocomplete__bottomSheetInput_16le9 {
14
+ padding: 0 var(--gap-xs) var(--gap-xs);
15
+ box-sizing: border-box;
16
+ }
17
+ .input-autocomplete__footer_16le9 {
18
+ display: flex
19
+ }
@@ -0,0 +1 @@
1
+ export * from "./Component.mobile";
package/dist/mobile.js ADDED
@@ -0,0 +1,20 @@
1
+ 'use strict';
2
+
3
+ Object.defineProperty(exports, '__esModule', { value: true });
4
+
5
+ require('./tslib.es6-2cf95ef9.js');
6
+ require('classnames');
7
+ require('react');
8
+ require('react-merge-refs');
9
+ require('lodash.throttle');
10
+ require('@alfalab/core-components-select');
11
+ require('@alfalab/core-components-button');
12
+ require('@alfalab/core-components-input');
13
+ require('@alfalab/hooks');
14
+ require('@alfalab/core-components-form-control');
15
+ require('./autocomplete-mobile-field/Component.js');
16
+ var Component_mobile = require('./Component.mobile.js');
17
+
18
+
19
+
20
+ exports.InputAutocompleteMobile = Component_mobile.InputAutocompleteMobile;
@@ -0,0 +1,227 @@
1
+ import React from "react";
2
+ import { ButtonHTMLAttributes, ElementType, AnchorHTMLAttributes, FC, HTMLAttributes, ReactNode } from "react";
3
+ import { ButtonProps } from "@alfalab/core-components-button";
4
+ import { BottomSheetTitleAlign } from "./index-7ca84eff";
5
+ type IconButtonProps = {
6
+ /**
7
+ * Компонент иконки
8
+ */
9
+ icon: ElementType<{
10
+ className?: string;
11
+ }>;
12
+ /**
13
+ * Тип кнопки
14
+ */
15
+ view?: "primary" | "secondary" | "transparent" | "tertiary" | "negative";
16
+ /**
17
+ * Размер компонента
18
+ */
19
+ size?: "xxs" | "xs" | "s";
20
+ /**
21
+ * Дополнительный класс
22
+ */
23
+ className?: string;
24
+ /**
25
+ * Идентификатор для систем автоматизированного тестирования
26
+ */
27
+ dataTestId?: string;
28
+ /**
29
+ * Набор цветов для компонента
30
+ */
31
+ colors?: "default" | "inverted";
32
+ } & Omit<ButtonHTMLAttributes<HTMLButtonElement>, "size"> & Pick<ButtonProps, "href" | "loading"> & Pick<AnchorHTMLAttributes<HTMLAnchorElement>, "target" | "download">;
33
+ type CloserProps = ButtonHTMLAttributes<HTMLButtonElement> & {
34
+ /**
35
+ * Дополнительный класс
36
+ */
37
+ className?: string;
38
+ /**
39
+ * Размер кнопки
40
+ */
41
+ size?: IconButtonProps["size"];
42
+ /**
43
+ * Иконка
44
+ */
45
+ icon?: ElementType;
46
+ };
47
+ declare const Closer: React.FC<CloserProps>;
48
+ declare const colors: readonly ["tertiary", "disabled", "accent", "primary", "attention", "positive", "secondary", "tertiary-inverted", "primary-inverted", "secondary-inverted", "link", "negative"];
49
+ type Color = typeof colors[number];
50
+ type NativeProps = HTMLAttributes<HTMLHeadingElement>;
51
+ type TitleProps = Omit<NativeProps, "color"> & {
52
+ /**
53
+ * HTML тег
54
+ */
55
+ tag: "h1" | "h2" | "h3" | "h4" | "h5" | "h6" | "div";
56
+ /**
57
+ * [Вариант начертания](https://alfa-laboratory.github.io/core-components/master/?path=/docs/гайдлайны-типографика--page)
58
+ */
59
+ view?: "xlarge" | "large" | "medium" | "small" | "xsmall";
60
+ /**
61
+ * Цвет текста
62
+ */
63
+ color?: Color;
64
+ /**
65
+ * Толщина шрифта
66
+ */
67
+ weight?: "regular" | "medium" | "bold";
68
+ /**
69
+ * Шрифт текста
70
+ */
71
+ font?: "styrene" | "system";
72
+ /**
73
+ * Добавляет отступы
74
+ */
75
+ defaultMargins?: boolean;
76
+ /**
77
+ * Css-класс для стилизации (native prop)
78
+ */
79
+ className?: string;
80
+ /**
81
+ * Id компонента для тестов
82
+ */
83
+ dataTestId?: string;
84
+ /**
85
+ * Контент (native prop)
86
+ */
87
+ children?: React.ReactNode;
88
+ };
89
+ type NativeProps$0 = HTMLAttributes<HTMLSpanElement>;
90
+ type TextProps = Omit<NativeProps$0, "color"> & {
91
+ /**
92
+ * [Вариант начертания](https://alfa-laboratory.github.io/core-components/master/?path=/docs/гайдлайны-типографика--page)
93
+ */
94
+ view?: "primary-large" | "primary-medium" | "primary-small" | "secondary-large" | "secondary-medium" | "secondary-small" | "component" | "caps";
95
+ /**
96
+ * Цвет текста
97
+ */
98
+ color?: Color;
99
+ /**
100
+ * Толщина шрифта
101
+ */
102
+ weight?: "regular" | "medium" | "bold";
103
+ /**
104
+ * Делает цифры моноширинными
105
+ */
106
+ monospaceNumbers?: boolean;
107
+ /**
108
+ * HTML тег
109
+ */
110
+ tag?: "p" | "span" | "div";
111
+ /**
112
+ * Css-класс для стилизации (native prop)
113
+ */
114
+ className?: string;
115
+ /**
116
+ * Id компонента для тестов
117
+ */
118
+ dataTestId?: string;
119
+ /**
120
+ * Контент (native prop)
121
+ */
122
+ children?: React.ReactNode;
123
+ };
124
+ type TitleMobileProps = Omit<TitleProps, "defaultMargins">;
125
+ declare const Typography: {
126
+ Title: FC<TitleProps>;
127
+ Text: FC<TextProps>;
128
+ TitleResponsive: FC<TitleProps>;
129
+ TitleMobile: FC<TitleMobileProps>;
130
+ };
131
+ declare const typographyPresets: {
132
+ mobile: {
133
+ list: {
134
+ text: {
135
+ primary: {
136
+ tag: string;
137
+ view: string;
138
+ };
139
+ secondary: {
140
+ tag: string;
141
+ color: string;
142
+ view: string;
143
+ };
144
+ };
145
+ };
146
+ };
147
+ };
148
+ type BackerProps = ButtonHTMLAttributes<HTMLButtonElement> & {
149
+ /**
150
+ * Дополнительный класс
151
+ */
152
+ className?: string;
153
+ /**
154
+ * Размер кнопки
155
+ */
156
+ size?: IconButtonProps["size"];
157
+ /**
158
+ * Иконка
159
+ */
160
+ icon?: ElementType;
161
+ /**
162
+ * Обработчик нажатия
163
+ */
164
+ onClick?: () => void;
165
+ };
166
+ declare const Backer: React.FC<BackerProps>;
167
+ declare const TitleResponsive: FC<TitleProps>;
168
+ type HeaderProps = {
169
+ /**
170
+ * Заголовок
171
+ */
172
+ title?: ReactNode;
173
+ /**
174
+ * Дополнительный класс
175
+ */
176
+ headerClassName?: string;
177
+ /**
178
+ * Дополнительный класс для аддонов
179
+ */
180
+ addonClassName?: string;
181
+ /**
182
+ * Дополнительный класс для компонента крестика
183
+ */
184
+ closerClassName?: string;
185
+ /**
186
+ * Дополнительный класс для компонента стрелки назад
187
+ */
188
+ backerClassName?: string;
189
+ /**
190
+ * Слот слева
191
+ */
192
+ leftAddons?: ReactNode;
193
+ /**
194
+ * Слот справа
195
+ */
196
+ rightAddons?: ReactNode;
197
+ /**
198
+ * Слот снизу
199
+ */
200
+ bottomAddons?: ReactNode;
201
+ /**
202
+ * Наличие компонента крестика
203
+ */
204
+ hasCloser?: boolean;
205
+ /**
206
+ * Наличие компонента стрелки назад
207
+ */
208
+ hasBacker?: boolean;
209
+ /**
210
+ * Выравнивание заголовка
211
+ */
212
+ titleAlign?: BottomSheetTitleAlign;
213
+ /**
214
+ * Будет ли обрезан заголовок
215
+ */
216
+ trimTitle?: boolean;
217
+ /**
218
+ * Фиксирует шапку
219
+ */
220
+ sticky?: boolean;
221
+ /**
222
+ * Обработчик нажатия на стрелку назад
223
+ */
224
+ onBack?: () => void;
225
+ };
226
+ declare const Header: FC<HeaderProps>;
227
+ export { CloserProps, Closer, Typography, typographyPresets, TitleProps, TextProps, BackerProps, Backer, TitleResponsive, HeaderProps, Header };