@alfalab/core-components-picker-button 11.3.2 → 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 (150) hide show
  1. package/Component-081223cb.d.ts +6 -2
  2. package/Component-bdb4c6b9.d.ts +12 -0
  3. package/{Component-0816e61d.d.ts → Component-c29389e5.d.ts} +1 -1
  4. package/Component-c44170fe.d.ts +14 -6
  5. package/Component.desktop-63dec22f.d.ts +6 -0
  6. package/{cssm/Component.desktop-785df74d.d.ts → Component.desktop-ebda875c.d.ts} +1 -1
  7. package/Component.mobile-96988a65.d.ts +6 -0
  8. package/{esm/Component.mobile-d7e9f69d.d.ts → Component.mobile-ebda875c.d.ts} +1 -1
  9. package/Component.responsive.d.ts +1 -1
  10. package/Component.responsive.js +3 -3
  11. package/ResponsiveContext-08e5596c.d.ts +5 -0
  12. package/cssm/Component-081223cb.d.ts +6 -2
  13. package/cssm/Component-bdb4c6b9.d.ts +12 -0
  14. package/{esm/Component-0816e61d.d.ts → cssm/Component-c29389e5.d.ts} +1 -1
  15. package/cssm/Component-c44170fe.d.ts +14 -6
  16. package/cssm/Component.desktop-63dec22f.d.ts +6 -0
  17. package/{Component.desktop-785df74d.d.ts → cssm/Component.desktop-ebda875c.d.ts} +1 -1
  18. package/cssm/Component.mobile-96988a65.d.ts +6 -0
  19. package/cssm/{Component.mobile-d7e9f69d.d.ts → Component.mobile-ebda875c.d.ts} +1 -1
  20. package/cssm/Component.responsive.d.ts +1 -1
  21. package/cssm/Component.responsive.js +3 -3
  22. package/cssm/ResponsiveContext-08e5596c.d.ts +5 -0
  23. package/cssm/{Component.desktop.d.ts → desktop/Component.desktop.d.ts} +2 -2
  24. package/cssm/{Component.desktop.js → desktop/Component.desktop.js} +6 -6
  25. package/cssm/desktop/index.d.ts +1 -1
  26. package/cssm/desktop/index.js +2 -2
  27. package/cssm/field/Component.d.ts +1 -1
  28. package/cssm/field/index.module.css +2 -2
  29. package/cssm/index-63dec22f.d.ts +2 -0
  30. package/cssm/index-96988a65.d.ts +2 -0
  31. package/cssm/index-bdb4c6b9.d.ts +223 -0
  32. package/cssm/index-c44170fe.d.ts +1 -0
  33. package/cssm/index-ebda875c.d.ts +2 -79
  34. package/cssm/index.js +2 -2
  35. package/{Component.mobile.d.ts → cssm/mobile/Component.mobile.d.ts} +1 -1
  36. package/cssm/{Component.mobile.js → mobile/Component.mobile.js} +5 -5
  37. package/cssm/mobile/index.d.ts +1 -1
  38. package/cssm/mobile/index.js +2 -2
  39. package/{esm/types-1c79e231.d.ts → cssm/types-667e33fd.d.ts} +5 -1
  40. package/cssm/typings-08e5596c.d.ts +56 -0
  41. package/cssm/{typings-0816e61d.d.ts → typings-c29389e5.d.ts} +51 -311
  42. package/cssm/utils-d2597f31.d.ts +1 -1
  43. package/{esm → desktop}/Component.desktop.d.ts +2 -2
  44. package/{Component.desktop.js → desktop/Component.desktop.js} +5 -5
  45. package/desktop/index.d.ts +1 -1
  46. package/desktop/index.js +2 -2
  47. package/esm/Component-081223cb.d.ts +6 -2
  48. package/esm/Component-bdb4c6b9.d.ts +12 -0
  49. package/{modern/Component-0816e61d.d.ts → esm/Component-c29389e5.d.ts} +1 -1
  50. package/esm/Component-c44170fe.d.ts +14 -6
  51. package/esm/Component.desktop-63dec22f.d.ts +6 -0
  52. package/esm/{Component.desktop-785df74d.d.ts → Component.desktop-ebda875c.d.ts} +1 -1
  53. package/esm/Component.mobile-96988a65.d.ts +6 -0
  54. package/{Component.mobile-d7e9f69d.d.ts → esm/Component.mobile-ebda875c.d.ts} +1 -1
  55. package/esm/Component.responsive.d.ts +1 -1
  56. package/esm/Component.responsive.js +2 -2
  57. package/esm/ResponsiveContext-08e5596c.d.ts +5 -0
  58. package/{Component.desktop.d.ts → esm/desktop/Component.desktop.d.ts} +2 -2
  59. package/esm/{Component.desktop.js → desktop/Component.desktop.js} +5 -5
  60. package/esm/desktop/index.d.ts +1 -1
  61. package/esm/desktop/index.js +1 -1
  62. package/esm/field/Component.d.ts +1 -1
  63. package/esm/field/Component.js +1 -1
  64. package/esm/field/index.css +8 -8
  65. package/esm/index-63dec22f.d.ts +2 -0
  66. package/esm/index-96988a65.d.ts +2 -0
  67. package/esm/index-bdb4c6b9.d.ts +223 -0
  68. package/esm/index-c44170fe.d.ts +1 -0
  69. package/esm/index-ebda875c.d.ts +2 -79
  70. package/esm/index.css +5 -5
  71. package/esm/index.js +2 -2
  72. package/{cssm → esm/mobile}/Component.mobile.d.ts +1 -1
  73. package/esm/{Component.mobile.js → mobile/Component.mobile.js} +3 -3
  74. package/esm/mobile/index.d.ts +1 -1
  75. package/esm/mobile/index.js +1 -1
  76. package/esm/option/Component.js +1 -1
  77. package/esm/option/index.css +4 -4
  78. package/{cssm/types-1c79e231.d.ts → esm/types-667e33fd.d.ts} +5 -1
  79. package/esm/typings-08e5596c.d.ts +56 -0
  80. package/esm/{typings-0816e61d.d.ts → typings-c29389e5.d.ts} +51 -311
  81. package/esm/utils-d2597f31.d.ts +1 -1
  82. package/field/Component.d.ts +1 -1
  83. package/field/Component.js +1 -1
  84. package/field/index.css +8 -8
  85. package/index-63dec22f.d.ts +2 -0
  86. package/index-96988a65.d.ts +2 -0
  87. package/index-bdb4c6b9.d.ts +223 -0
  88. package/index-c44170fe.d.ts +1 -0
  89. package/index-ebda875c.d.ts +2 -79
  90. package/index.css +5 -5
  91. package/index.js +2 -2
  92. package/{esm → mobile}/Component.mobile.d.ts +1 -1
  93. package/{Component.mobile.js → mobile/Component.mobile.js} +3 -3
  94. package/mobile/index.d.ts +1 -1
  95. package/mobile/index.js +2 -2
  96. package/modern/Component-081223cb.d.ts +6 -2
  97. package/modern/Component-bdb4c6b9.d.ts +12 -0
  98. package/{cssm/Component-0816e61d.d.ts → modern/Component-c29389e5.d.ts} +1 -1
  99. package/modern/Component-c44170fe.d.ts +14 -6
  100. package/modern/Component.desktop-63dec22f.d.ts +6 -0
  101. package/modern/{Component.desktop-785df74d.d.ts → Component.desktop-ebda875c.d.ts} +1 -1
  102. package/modern/Component.mobile-96988a65.d.ts +6 -0
  103. package/modern/{Component.mobile-d7e9f69d.d.ts → Component.mobile-ebda875c.d.ts} +1 -1
  104. package/modern/Component.responsive.d.ts +1 -1
  105. package/modern/Component.responsive.js +2 -2
  106. package/modern/ResponsiveContext-08e5596c.d.ts +5 -0
  107. package/modern/{Component.desktop.d.ts → desktop/Component.desktop.d.ts} +2 -2
  108. package/modern/{Component.desktop.js → desktop/Component.desktop.js} +5 -5
  109. package/modern/desktop/index.d.ts +1 -1
  110. package/modern/desktop/index.js +1 -1
  111. package/modern/field/Component.d.ts +1 -1
  112. package/modern/field/Component.js +1 -1
  113. package/modern/field/index.css +8 -8
  114. package/modern/index-63dec22f.d.ts +2 -0
  115. package/modern/index-96988a65.d.ts +2 -0
  116. package/modern/index-bdb4c6b9.d.ts +223 -0
  117. package/modern/index-c44170fe.d.ts +1 -0
  118. package/modern/index-ebda875c.d.ts +2 -79
  119. package/modern/index.css +5 -5
  120. package/modern/index.js +2 -2
  121. package/modern/{Component.mobile.d.ts → mobile/Component.mobile.d.ts} +1 -1
  122. package/modern/{Component.mobile.js → mobile/Component.mobile.js} +3 -3
  123. package/modern/mobile/index.d.ts +1 -1
  124. package/modern/mobile/index.js +1 -1
  125. package/modern/option/Component.js +1 -1
  126. package/modern/option/index.css +4 -4
  127. package/modern/{types-1c79e231.d.ts → types-667e33fd.d.ts} +5 -1
  128. package/modern/typings-08e5596c.d.ts +56 -0
  129. package/modern/{typings-0816e61d.d.ts → typings-c29389e5.d.ts} +51 -311
  130. package/modern/utils-d2597f31.d.ts +1 -1
  131. package/option/Component.js +1 -1
  132. package/option/index.css +4 -4
  133. package/package.json +4 -4
  134. package/src/{Component.desktop.tsx → desktop/Component.desktop.tsx} +4 -4
  135. package/src/desktop/index.ts +1 -1
  136. package/src/field/index.module.css +1 -1
  137. package/src/{Component.mobile.tsx → mobile/Component.mobile.tsx} +3 -3
  138. package/src/mobile/index.ts +1 -1
  139. package/{types-1c79e231.d.ts → types-667e33fd.d.ts} +5 -1
  140. package/typings-08e5596c.d.ts +56 -0
  141. package/{typings-0816e61d.d.ts → typings-c29389e5.d.ts} +51 -311
  142. package/utils-d2597f31.d.ts +1 -1
  143. package/cssm/index-785df74d.d.ts +0 -2
  144. package/cssm/index-d7e9f69d.d.ts +0 -2
  145. package/esm/index-785df74d.d.ts +0 -2
  146. package/esm/index-d7e9f69d.d.ts +0 -2
  147. package/index-785df74d.d.ts +0 -2
  148. package/index-d7e9f69d.d.ts +0 -2
  149. package/modern/index-785df74d.d.ts +0 -2
  150. package/modern/index-d7e9f69d.d.ts +0 -2
@@ -1,207 +1,19 @@
1
1
  /// <reference types="react-transition-group" />
2
2
  /// <reference types="react" />
3
3
  import React from "react";
4
- import { HTMLAttributes, ReactElement, ReactNode, RefObject, FC, KeyboardEvent, MouseEvent, MutableRefObject, Ref, AriaAttributes, FocusEvent, RefAttributes, SVGProps } from "react";
4
+ import { HTMLAttributes, ReactElement, ReactNode, RefObject, FC, AriaAttributes, FocusEvent, MouseEvent, RefAttributes, SVGProps } from "react";
5
5
  import { HandledEvents } from "react-swipeable/es/types";
6
6
  import { TransitionProps } from "react-transition-group/Transition";
7
- import { CSSTransitionClassNames } from "react-transition-group/CSSTransition";
8
- import { NavigationBarProps } from "./types-1c79e231";
7
+ import { BaseModalProps, BaseModalContext } from "./index-bdb4c6b9";
8
+ import { NavigationBarProps } from "./types-667e33fd";
9
9
  import { BackgroundColorType } from "./index-72dda473";
10
+ import { BaseInputProps, BackdropProps } from "./index-ebda875c";
10
11
  import { SwipeableHandlers } from "react-swipeable";
12
+ import { ContentProps } from "./typings-08e5596c";
13
+ import { ModalResponsiveProps as ModalProps } from "./typings-08e5596c";
11
14
  import { FormControlProps } from "./index-c44170fe";
12
15
  import { PopoverProps } from "@alfalab/core-components-popover";
13
16
  import { UseSelectWithApplyProps } from "./field/Component";
14
- type BackdropProps = Partial<TransitionProps> & {
15
- /**
16
- * Прозрачный бэкдроп
17
- */
18
- invisible?: boolean;
19
- /**
20
- * Управляет видимостью компонента
21
- */
22
- open: boolean;
23
- /**
24
- * Обработчик клика по бэкдропу
25
- */
26
- onClose?: (event: MouseEvent<HTMLElement>) => void;
27
- /**
28
- * Дополнительный класс
29
- */
30
- className?: string;
31
- /**
32
- * Классы анимации
33
- *
34
- * http://reactcommunity.org/react-transition-group/css-transition#CSSTransition-prop-classNames
35
- */
36
- transitionClassNames?: string | CSSTransitionClassNames;
37
- /**
38
- * Идентификатор для систем автоматизированного тестирования
39
- */
40
- dataTestId?: string;
41
- /**
42
- * Дочерние элементы.
43
- */
44
- children?: ReactNode;
45
- };
46
- type PortalProps = {
47
- /** Контент */
48
- children?: ReactNode;
49
- /**
50
- * Функция, возвращающая контейнер, в который будут рендериться дочерние элементы
51
- */
52
- getPortalContainer?: () => Element;
53
- /**
54
- * Немедленно отрендерить дочерние элементы (false - контент будет отрендерен на след. рендер).
55
- */
56
- immediateMount?: boolean;
57
- };
58
- type BaseModalProps = {
59
- /**
60
- * Контент
61
- */
62
- children?: ReactNode;
63
- /**
64
- * Компонент бэкдропа
65
- */
66
- Backdrop?: FC<BackdropProps>;
67
- /**
68
- * Свойства для Бэкдропа
69
- */
70
- backdropProps?: Partial<BackdropProps> & Record<string, unknown>;
71
- /**
72
- * Нода, компонент или функция возвращающая их
73
- *
74
- * Контейнер к которому будут добавляться порталы
75
- */
76
- container?: PortalProps["getPortalContainer"];
77
- /**
78
- * Отключает автоматический перевод фокуса на модалку при открытии
79
- * @default false
80
- */
81
- disableAutoFocus?: boolean;
82
- /**
83
- * Отключает ловушку фокуса
84
- * @default false
85
- */
86
- disableFocusLock?: boolean;
87
- /**
88
- * Отключает восстановление фокуса на предыдущем элементе после закрытия модалки
89
- * @default false
90
- */
91
- disableRestoreFocus?: boolean;
92
- /**
93
- * Отключает вызов `callback` при нажатии Escape
94
- * @default false
95
- */
96
- disableEscapeKeyDown?: boolean;
97
- /**
98
- * Отключает вызов `callback` при клике на бэкдроп
99
- * @default false
100
- */
101
- disableBackdropClick?: boolean;
102
- /**
103
- * Отключает блокировку скролла при открытии модального окна
104
- * @default false
105
- */
106
- disableBlockingScroll?: boolean;
107
- /**
108
- * Содержимое модалки всегда в DOM
109
- * @default false
110
- */
111
- keepMounted?: boolean;
112
- /**
113
- * Управление видимостью модалки
114
- */
115
- open: boolean;
116
- /**
117
- * Дополнительный класс
118
- */
119
- className?: string;
120
- /**
121
- * Дополнительный класс
122
- */
123
- contentClassName?: string;
124
- /**
125
- * Дополнительные пропсы на dialog wrapper
126
- */
127
- wrapperProps?: React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>;
128
- /**
129
- * Дополнительные пропсы на обертку контента
130
- */
131
- contentProps?: React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>;
132
- /**
133
- * Дополнительные пропсы на компонентную обертку контента
134
- */
135
- componentDivProps?: React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>;
136
- /**
137
- * Дополнительный класс для обертки (Modal)
138
- */
139
- wrapperClassName?: string;
140
- /**
141
- * Обработчик скролла контента
142
- */
143
- scrollHandler?: "wrapper" | "content" | MutableRefObject<HTMLDivElement | null>;
144
- /**
145
- * Пропсы для анимации (CSSTransition)
146
- */
147
- transitionProps?: Partial<TransitionProps>;
148
- /**
149
- * Рендерить ли в контейнер через портал.
150
- * @default true
151
- */
152
- usePortal?: boolean;
153
- /**
154
- * Обработчик события нажатия на бэкдроп
155
- */
156
- onBackdropClick?: (event: MouseEvent) => void;
157
- /**
158
- * Обработчик события нажатия на Escape
159
- *
160
- * Если `disableEscapeKeyDown` - false и модальное окно в фокусе
161
- */
162
- onEscapeKeyDown?: (event: KeyboardEvent) => void;
163
- /**
164
- * Обработчик закрытия
165
- */
166
- onClose?: (event: MouseEvent<HTMLElement> | KeyboardEvent<HTMLElement>, reason?: "backdropClick" | "escapeKeyDown" | "closerClick") => void;
167
- /**
168
- * Обработчик события onEntered компонента Transition
169
- */
170
- onMount?: () => void;
171
- /**
172
- * Обработчик события onExited компонента Transition
173
- */
174
- onUnmount?: () => void;
175
- /**
176
- * Идентификатор для систем автоматизированного тестирования
177
- */
178
- dataTestId?: string;
179
- /**
180
- * z-index компонента
181
- */
182
- zIndex?: number;
183
- /**
184
- * Реф, который должен быть установлен компонентной области
185
- */
186
- componentRef?: MutableRefObject<HTMLDivElement | null>;
187
- };
188
- type BaseModalContext = {
189
- parentRef: React.RefObject<HTMLDivElement>;
190
- componentRef: React.RefObject<HTMLDivElement>;
191
- hasFooter?: boolean;
192
- hasHeader?: boolean;
193
- hasScroll?: boolean;
194
- headerHighlighted?: boolean;
195
- footerHighlighted?: boolean;
196
- headerOffset?: number;
197
- setHeaderOffset: (offset: number) => void;
198
- contentRef: Ref<HTMLElement>;
199
- setHasHeader: (exists: boolean) => void;
200
- setHasFooter: (exists: boolean) => void;
201
- onClose: Required<BaseModalProps>["onClose"];
202
- };
203
- // eslint-disable-next-line @typescript-eslint/no-redeclare
204
- declare const BaseModalContext: React.Context<BaseModalContext>;
205
17
  type BottomSheetTitleAlign = "center" | "left";
206
18
  type BottomSheetProps = {
207
19
  /**
@@ -299,7 +111,8 @@ type BottomSheetProps = {
299
111
  */
300
112
  transitionProps?: Partial<TransitionProps>;
301
113
  /**
302
- * Идентификатор для систем автоматизированного тестирования
114
+ * Идентификатор для систем автоматизированного тестирования.
115
+ * Для заголовка используется модификатор -header
303
116
  */
304
117
  dataTestId?: string;
305
118
  /**
@@ -339,6 +152,10 @@ type BottomSheetProps = {
339
152
  * Наличие компонента стрелки назад
340
153
  */
341
154
  hasBacker?: boolean;
155
+ /**
156
+ * Дополнительные пропсы для кнопки "Назад"
157
+ */
158
+ backButtonProps?: NavigationBarProps["backButtonProps"];
342
159
  /**
343
160
  * Выравнивание заголовка
344
161
  */
@@ -489,43 +306,9 @@ declare const Input: React.ForwardRefExoticComponent<Omit<BaseInputProps, "FormC
489
306
  defaultMatchMediaValue?: boolean | (() => boolean) | undefined;
490
307
  } & React.RefAttributes<HTMLInputElement>>;
491
308
  type HeaderProps = Omit<NavigationBarProps, "size" | "view" | "parentRef">;
492
- type ModalDesktopProps = BaseModalProps & {
493
- /**
494
- * Ширина модального окна
495
- * @default "m"
496
- */
497
- size?: "s" | "m" | "l" | "xl" | "fullscreen";
498
- /**
499
- * Растягивает модальное окно на весь экран
500
- * @deprecated Используйте размер fullscreen
501
- */
502
- fullscreen?: boolean;
503
- /**
504
- * Фиксирует позицию модального окна после открытия,
505
- * предотвращая скачки, если контент внутри будет меняться
506
- */
507
- fixedPosition?: boolean;
508
- /**
509
- * Управление наличием закрывающего крестика
510
- * @default false
511
- */
512
- hasCloser?: boolean;
513
- };
514
- type ModalResponsiveProps = ModalDesktopProps & {
515
- /**
516
- * Контрольная точка, с нее начинается desktop версия
517
- * @default 1024
518
- */
519
- breakpoint?: number;
520
- };
521
- type View = "desktop" | "mobile";
522
- type TResponsiveModalContext = {
523
- view: View;
524
- size: NonNullable<ModalDesktopProps["size"]>;
525
- };
526
- type ContentProps = {
309
+ type FooterProps = {
527
310
  /**
528
- * Контент
311
+ * Контент футера
529
312
  */
530
313
  children?: ReactNode;
531
314
  /**
@@ -533,43 +316,55 @@ type ContentProps = {
533
316
  */
534
317
  className?: string;
535
318
  /**
536
- * Растягивает контент на всю высоту
319
+ * Фиксирует футер
537
320
  */
538
- flex?: boolean;
539
- };
540
- type FooterProps = {
321
+ sticky?: boolean;
541
322
  /**
542
- * Контент футера
323
+ * Выравнивание элементов футера
543
324
  */
544
- children?: ReactNode;
325
+ layout?: "start" | "center" | "space-between" | "column";
545
326
  /**
546
- * Дополнительный класс
327
+ * Отступы между элементами футера
547
328
  */
548
- className?: string;
329
+ gap?: 16 | 24 | 32;
330
+ };
331
+ interface ControlsProps {
549
332
  /**
550
- * Фиксирует футер
333
+ * Основной слот
551
334
  */
552
- sticky?: boolean;
335
+ primary?: ReactNode;
336
+ /**
337
+ * Дополнительный слот
338
+ */
339
+ secondary?: ReactNode;
553
340
  /**
554
341
  * Выравнивание элементов футера
342
+ * @default start
555
343
  */
556
344
  layout?: "start" | "center" | "space-between" | "column";
345
+ /**
346
+ * Выравнивание элементов футера (мобильный view)
347
+ * @default start
348
+ */
349
+ mobileLayout?: "start" | "center" | "space-between" | "column";
557
350
  /**
558
351
  * Отступы между элементами футера
559
352
  */
560
353
  gap?: 16 | 24 | 32;
561
- };
562
- declare const ModalResponsive: React.ForwardRefExoticComponent<BaseModalProps & {
354
+ }
355
+ declare const ModalResponsive: React.ForwardRefExoticComponent<import("./index-bdb4c6b9").BaseModalProps & {
563
356
  size?: "s" | "m" | "l" | "xl" | "fullscreen" | undefined;
564
357
  fullscreen?: boolean | undefined;
565
358
  fixedPosition?: boolean | undefined;
566
359
  hasCloser?: boolean | undefined;
567
360
  } & {
568
361
  breakpoint?: number | undefined;
362
+ defaultMatchMediaValue?: boolean | (() => boolean) | undefined;
569
363
  } & React.RefAttributes<HTMLDivElement>> & {
570
364
  Header: React.FC<HeaderProps>;
571
- Content: React.FC<ContentProps>;
365
+ Content: React.FC<import("./typings-08e5596c").ContentProps>;
572
366
  Footer: React.FC<FooterProps>;
367
+ Controls: React.FC<ControlsProps>;
573
368
  };
574
369
  declare const ModalContext: import("react").Context<BaseModalContext>;
575
370
  type FooterProps$0 = {
@@ -592,14 +387,6 @@ type HeaderProps$0 = Omit<NavigationBarProps, "view" | "size"> & {
592
387
  headerOffset: number;
593
388
  };
594
389
  declare const Header$0: FC<HeaderProps$0>;
595
- declare const Modal: React.ForwardRefExoticComponent<BaseModalProps & {
596
- size?: "s" | "m" | "l" | "xl" | "fullscreen" | undefined;
597
- fullscreen?: boolean | undefined;
598
- fixedPosition?: boolean | undefined;
599
- hasCloser?: boolean | undefined;
600
- } & {
601
- view: View;
602
- } & React.RefAttributes<HTMLDivElement>>;
603
390
  type SwipeableBackdropProps = BackdropProps & {
604
391
  /**
605
392
  * Прозрачность бэкдропа
@@ -615,61 +402,7 @@ type SwipeableBackdropProps = BackdropProps & {
615
402
  opacityTimeout?: number;
616
403
  };
617
404
  declare const SwipeableBackdrop: FC<SwipeableBackdropProps>;
618
- /**
619
- * Набор констант для z-index соответствующих классов компонентов.
620
- * Значения выбраны по приоритету.
621
- */
622
- declare const stackingOrder: {
623
- FOCUSED: number;
624
- DEFAULT: number;
625
- POPOVER: number;
626
- MODAL: number;
627
- TOAST: number;
628
- };
629
- declare const StackingContext: import("react").Context<number>;
630
- type StackProps = {
631
- /**
632
- * Render prop, в который передается функция.
633
- * Функция принимает аргумент со значением z-index из текущего контекста.
634
- */
635
- children: (value: number) => ReactNode;
636
- /**
637
- * Исходное значение для z-index.
638
- * @default 5
639
- */
640
- value?: number;
641
- };
642
- declare const Stack: FC<StackProps>;
643
- declare const PORTAL_CONTAINER_ATTRIBUTE = "alfa-portal-container";
644
- declare const getDefaultPortalContainer: () => Element;
645
- declare function setRef<T>(ref: RefObject<T> | ((instance: T | null) => void) | null | undefined, value: T | null): void;
646
- type SavedStyle = {
647
- value: string;
648
- key: string;
649
- el: HTMLElement;
650
- };
651
- type RestoreStyle = {
652
- container: HTMLElement;
653
- modals: number;
654
- styles: SavedStyle[];
655
- };
656
- declare class ModalStore {
657
- private readonly restoreStyles;
658
- constructor();
659
- getRestoreStyles: () => RestoreStyle[];
660
- }
661
- declare const getModalStore: () => ModalStore;
662
- declare class GlobalStore {
663
- private readonly modalStore;
664
- constructor();
665
- getModalStore: () => ModalStore;
666
- }
667
- type InputDesktopProps = Omit<BaseInputProps, "FormControlComponent">;
668
- declare const InputDesktop: React.ForwardRefExoticComponent<InputDesktopProps & React.RefAttributes<HTMLInputElement>>;
669
- type InputMobileProps = Omit<BaseInputProps, "FormControlComponent">;
670
- declare const InputMobile: React.ForwardRefExoticComponent<InputMobileProps & React.RefAttributes<HTMLInputElement>>;
671
405
  declare const Content: FC<ContentProps>;
672
- declare const ResponsiveContext: React.Context<TResponsiveModalContext>;
673
406
  type AnyObject = Record<string, any>;
674
407
  type OptionShape = {
675
408
  /**
@@ -711,7 +444,10 @@ type BaseSelectChangePayload = {
711
444
  };
712
445
  type BaseSelectProps = {
713
446
  /**
714
- * Идентификатор для систем автоматизированного тестирования
447
+ * Идентификатор для систем автоматизированного тестирования.
448
+ * Для пункта меню используется модификатор -option, компонента поиска -search,
449
+ * компонента выпадающего меню -options-list, компонента BottomSheet -bottom-sheet,
450
+ * компонента поля -field, компонета FormControl -field-form-control
715
451
  */
716
452
  dataTestId?: string;
717
453
  /**
@@ -909,11 +645,11 @@ type BaseSelectProps = {
909
645
  name?: string;
910
646
  }) => void;
911
647
  /**
912
- * Обработчик фокуса поля
648
+ * Обработчик блюра поля
913
649
  */
914
650
  onBlur?: (event: FocusEvent<HTMLDivElement | HTMLInputElement>) => void;
915
651
  /**
916
- * Обработчик блюра поля
652
+ * Обработчик фокуса поля
917
653
  */
918
654
  onFocus?: (event: FocusEvent<HTMLDivElement | HTMLInputElement>) => void;
919
655
  /**
@@ -1316,5 +1052,9 @@ type SelectProps = BaseSelectProps & AdditionalMobileProps & ConditionalMobilePr
1316
1052
  */
1317
1053
  defaultMatchMediaValue?: boolean | (() => boolean);
1318
1054
  };
1319
- export { BottomSheet, CLOSE_OFFSET, HEADER_OFFSET, InputProps, Input, ModalResponsive as Modal, ModalResponsiveProps as ModalProps, ModalContext, FooterProps$0 as FooterProps, Footer$0 as Footer, HeaderProps$0 as HeaderProps, Header$0 as Header, SwipeableBackdropProps, SwipeableBackdrop, stackingOrder, StackingContext, StackProps, Stack, PORTAL_CONTAINER_ATTRIBUTE, getDefaultPortalContainer, setRef, getModalStore, GlobalStore, InputDesktopProps, InputDesktop, InputMobileProps, InputMobile, Content, ResponsiveContext, AnyObject, OptionShape, GroupShape, BaseSelectChangePayload, BaseSelectProps, FieldProps, ArrowProps, OptionsListProps, OptgroupProps, OptionProps, CheckmarkProps, SearchProps, SelectFieldProps, AdditionalMobileProps, BottomSheetSelectMobileProps, ModalSelectMobileProps, SelectModalMobileProps, SelectMobileProps, SelectDesktopProps, SelectProps };
1320
- export type { BottomSheetProps, BottomSheetTitleAlign, HeaderProps as ModalHeaderProps, FooterProps as ModalFooterProps, ContentProps as ModalContentProps, SavedStyle };
1055
+ export { BottomSheet, CLOSE_OFFSET, HEADER_OFFSET, InputProps, Input, ModalResponsive as Modal, ModalContext, FooterProps$0 as FooterProps, Footer$0 as Footer, HeaderProps$0 as HeaderProps, Header$0 as Header, SwipeableBackdropProps, SwipeableBackdrop, Content, AnyObject, OptionShape, GroupShape, BaseSelectChangePayload, BaseSelectProps, FieldProps, ArrowProps, OptionsListProps, OptgroupProps, OptionProps, CheckmarkProps, SearchProps, SelectFieldProps, AdditionalMobileProps, BottomSheetSelectMobileProps, ModalSelectMobileProps, SelectModalMobileProps, SelectMobileProps, SelectDesktopProps, SelectProps };
1056
+ export type { BottomSheetProps, BottomSheetTitleAlign, HeaderProps as ModalHeaderProps, FooterProps as ModalFooterProps };
1057
+ export { ModalResponsiveProps as ModalProps } from "./typings-08e5596c";
1058
+ export type { ContentProps as ModalContentProps } from "./typings-08e5596c";
1059
+ export * from "./Component.desktop-63dec22f";
1060
+ export * from "./Component.mobile-96988a65";
@@ -1,5 +1,5 @@
1
1
  import { ReactNode, RefObject } from 'react';
2
- import { BaseSelectProps, GroupShape, OptionShape } from "./typings-0816e61d";
2
+ import { BaseSelectProps, GroupShape, OptionShape } from "./typings-c29389e5";
3
3
  declare const isGroup: (item: OptionShape | GroupShape) => item is GroupShape;
4
4
  declare const isOptionShape: (item: OptionShape | string | null) => item is OptionShape;
5
5
  declare const joinOptions: ({ selected, selectedMultiple, }: {
@@ -3,7 +3,7 @@ import React from 'react';
3
3
  import { FC, SVGProps } from "react";
4
4
  import { ButtonProps } from "@alfalab/core-components-button";
5
5
  import { BaseSelectProps } from "@alfalab/core-components-select/shared";
6
- import { PickerButtonSize, PickerButtonVariant } from "./types";
6
+ import { PickerButtonSize, PickerButtonVariant } from "../types";
7
7
  type PickerButtonDesktopProps = Omit<BaseSelectProps, 'placeholder' | 'Arrow' | 'autocomplete' | 'size' | 'onFocus' | 'selected' | 'closeOnSelect' | 'multiple' | 'hint' | 'allowUnselect' | 'options' | 'searchProps' | 'showSearch' | 'Search'> & Pick<ButtonProps, 'view' | 'loading' | 'leftAddons' | 'rightAddons'> & {
8
8
  options: Array<BaseSelectProps['options'][0] & {
9
9
  /**
@@ -25,7 +25,7 @@ type PickerButtonDesktopProps = Omit<BaseSelectProps, 'placeholder' | 'Arrow' |
25
25
  */
26
26
  showArrow?: boolean;
27
27
  };
28
- declare const PickerButtonDesktop: React.ForwardRefExoticComponent<Omit<BaseSelectProps, "size" | "placeholder" | "onFocus" | "selected" | "multiple" | "options" | "hint" | "showSearch" | "searchProps" | "autocomplete" | "allowUnselect" | "closeOnSelect" | "Arrow" | "Search"> & Pick<ButtonProps, "view" | "leftAddons" | "rightAddons" | "loading"> & {
28
+ declare const PickerButtonDesktop: React.ForwardRefExoticComponent<Omit<BaseSelectProps, "size" | "placeholder" | "onFocus" | "selected" | "multiple" | "hint" | "options" | "showSearch" | "searchProps" | "autocomplete" | "allowUnselect" | "closeOnSelect" | "Arrow" | "Search"> & Pick<ButtonProps, "view" | "leftAddons" | "rightAddons" | "loading"> & {
29
29
  options: Array<BaseSelectProps['options'][0] & {
30
30
  /**
31
31
  * Иконка, отображающаяся слева от текстового представления пункта
@@ -7,10 +7,10 @@ var React = require('react');
7
7
  var cn = require('classnames');
8
8
  var coreComponentsPopover = require('@alfalab/core-components-popover');
9
9
  var shared = require('@alfalab/core-components-select/shared');
10
- var field_Component = require('./field/Component.js');
11
- var option_Component = require('./option/Component.js');
10
+ var field_Component = require('../field/Component.js');
11
+ var option_Component = require('../option/Component.js');
12
12
  require('@alfalab/core-components-button');
13
- require('./utils/index.js');
13
+ require('../utils/index.js');
14
14
  require('@alfalab/icons-glyph/ChevronDownCompactSIcon');
15
15
  require('@alfalab/icons-glyph/ChevronDownMIcon');
16
16
  require('@alfalab/icons-glyph/MoreMIcon');
@@ -21,8 +21,8 @@ function _interopDefaultCompat (e) { return e && typeof e === 'object' && 'defau
21
21
  var React__default = /*#__PURE__*/_interopDefaultCompat(React);
22
22
  var cn__default = /*#__PURE__*/_interopDefaultCompat(cn);
23
23
 
24
- var styles = {"container":"picker-button__container_jck4a","optionsPopover":"picker-button__optionsPopover_jck4a","sideGap":"picker-button__sideGap_jck4a","option":"picker-button__option_jck4a"};
25
- require('./index.css')
24
+ var styles = {"container":"picker-button__container_q0aq2","optionsPopover":"picker-button__optionsPopover_q0aq2","sideGap":"picker-button__sideGap_q0aq2","option":"picker-button__option_q0aq2"};
25
+ require('./../index.css')
26
26
 
27
27
  var SIDE_POSITIONS = ['right', 'right-start', 'right-end', 'left', 'left-start', 'left-end'];
28
28
  var PickerButtonDesktop = React.forwardRef(function (_a, ref) {
@@ -1,2 +1,2 @@
1
- export { PickerButtonDesktop, PickerButtonDesktopProps } from "../Component.desktop";
1
+ export { PickerButtonDesktop, PickerButtonDesktopProps } from "./Component.desktop";
2
2
  export {};
package/desktop/index.js CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- var Component_desktop = require('../Component.desktop.js');
5
+ var desktop_Component_desktop = require('./Component.desktop.js');
6
6
  require('tslib');
7
7
  require('react');
8
8
  require('classnames');
@@ -19,4 +19,4 @@ require('../option/Component.js');
19
19
 
20
20
 
21
21
 
22
- exports.PickerButtonDesktop = Component_desktop.PickerButtonDesktop;
22
+ exports.PickerButtonDesktop = desktop_Component_desktop.PickerButtonDesktop;
@@ -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-0816e61d";
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
  /**
@@ -138,7 +145,7 @@ type BaseInputProps = Omit<InputHTMLAttributes<HTMLInputElement>, 'size' | 'type
138
145
  */
139
146
  disableUserInput?: boolean;
140
147
  };
141
- declare const BaseInput: React.ForwardRefExoticComponent<Omit<React.InputHTMLAttributes<HTMLInputElement>, "value" | "size" | "type" | "defaultValue" | "onChange" | "onClick" | "onMouseDown" | "enterKeyHint"> & {
148
+ declare const BaseInput: React.ForwardRefExoticComponent<Omit<React.InputHTMLAttributes<HTMLInputElement>, "type" | "onClick" | "value" | "onMouseDown" | "size" | "defaultValue" | "onChange" | "enterKeyHint"> & {
142
149
  /**
143
150
  * Значение поля ввода
144
151
  */
@@ -264,12 +271,13 @@ declare const BaseInput: React.ForwardRefExoticComponent<Omit<React.InputHTMLAtt
264
271
  /**
265
272
  * Компонент FormControl
266
273
  */
267
- FormControlComponent?: React.ElementType<Omit<import("./index-c44170fe").BaseFormControlProps, "styles" | "colorStyles"> & {
274
+ FormControlComponent?: React.ElementType<Omit<import("./index-ebda875c").BaseFormControlProps, "styles" | "colorStyles"> & {
268
275
  breakpoint?: number | undefined;
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,6 @@
1
+ /// <reference types="react" />
2
+ import React from 'react';
3
+ import { BaseInputProps } from "./index-ebda875c";
4
+ type InputDesktopProps = Omit<BaseInputProps, 'FormControlComponent'>;
5
+ declare const InputDesktop: React.ForwardRefExoticComponent<InputDesktopProps & React.RefAttributes<HTMLInputElement>>;
6
+ export { InputDesktopProps, InputDesktop };
@@ -1,6 +1,6 @@
1
1
  /// <reference types="react" />
2
2
  import React from 'react';
3
- import { BaseFormControlProps } from "./index-c44170fe";
3
+ import { BaseFormControlProps } from "./index-ebda875c";
4
4
  type FormControlDesktopProps = Omit<BaseFormControlProps, 'styles' | 'colorStyles'>;
5
5
  declare const FormControlDesktop: React.ForwardRefExoticComponent<FormControlDesktopProps & React.RefAttributes<HTMLDivElement>>;
6
6
  export { FormControlDesktopProps, FormControlDesktop };
@@ -0,0 +1,6 @@
1
+ /// <reference types="react" />
2
+ import React from 'react';
3
+ import { BaseInputProps } from "./index-ebda875c";
4
+ type InputMobileProps = Omit<BaseInputProps, 'FormControlComponent'>;
5
+ declare const InputMobile: React.ForwardRefExoticComponent<InputMobileProps & React.RefAttributes<HTMLInputElement>>;
6
+ export { InputMobileProps, InputMobile };