@alfalab/core-components-intl-phone-input 9.5.11 → 9.5.13

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 (170) hide show
  1. package/Component-0f4b9bed.d.ts +5 -0
  2. package/Component-10db897e.d.ts +6 -0
  3. package/Component-4cd3936b.d.ts +2 -2
  4. package/Component-72dda473.d.ts +53 -0
  5. package/Component-8b2c2707.d.ts +3 -3
  6. package/Component.desktop-0aa4e915.d.ts +5 -0
  7. package/{cssm/Component.desktop-d078a845.d.ts → Component.desktop-4cd3936b.d.ts} +4 -4
  8. package/Component.desktop-63dec22f.d.ts +4 -16
  9. package/Component.mobile-16b1285a.d.ts +5 -0
  10. package/Component.responsive-3109f463.d.ts +3 -24
  11. package/Component.responsive-785df74d.d.ts +26 -0
  12. package/{component-72308007.d.ts → component-10db897e.d.ts} +1 -1
  13. package/component.d.ts +1 -1
  14. package/component.js +1 -1
  15. package/components/flag-icon/component.js +1 -1
  16. package/components/flag-icon/index.css +3 -3
  17. package/components/select/component.d.ts +9 -1
  18. package/components/select/component.js +1 -1
  19. package/components/select/index.css +6 -6
  20. package/components/select-field/component.js +1 -1
  21. package/components/select-field/index.css +9 -9
  22. package/{esm/Component-dd8ca091.d.ts → cssm/Component-0f4b9bed.d.ts} +1 -1
  23. package/{modern/Component-72308007.d.ts → cssm/Component-10db897e.d.ts} +1 -1
  24. package/cssm/Component-4cd3936b.d.ts +1 -1
  25. package/cssm/Component-8b2c2707.d.ts +2 -2
  26. package/cssm/Component-c44170fe.d.ts +11 -5
  27. package/cssm/Component.desktop-0aa4e915.d.ts +5 -0
  28. package/cssm/Component.desktop-63dec22f.d.ts +1 -1
  29. package/cssm/Component.desktop-785df74d.d.ts +1 -1
  30. package/{modern/Component.desktop-d078a845.d.ts → cssm/Component.desktop-9cded6b9.d.ts} +4 -4
  31. package/cssm/Component.mobile-16b1285a.d.ts +5 -0
  32. package/cssm/Component.mobile-d7e9f69d.d.ts +1 -1
  33. package/cssm/Component.responsive-3109f463.d.ts +1 -1
  34. package/{esm/component-72308007.d.ts → cssm/component-10db897e.d.ts} +1 -1
  35. package/cssm/component.d.ts +1 -1
  36. package/cssm/desktop-89f0cb07.d.ts +2 -0
  37. package/cssm/hook-8abfea97.d.ts +8 -8
  38. package/cssm/hook-c44170fe.d.ts +1 -1
  39. package/cssm/{index-72308007.d.ts → index-10db897e.d.ts} +1 -5
  40. package/cssm/index-8b2c2707.d.ts +1 -1
  41. package/cssm/index-c44170fe.d.ts +2 -160
  42. package/cssm/index-c76d6398.d.ts +2 -2
  43. package/cssm/index-f12ee135.d.ts +2 -2
  44. package/cssm/mobile-89f0cb07.d.ts +2 -0
  45. package/cssm/shared-4cd3936b.d.ts +5 -5
  46. package/cssm/{types-83e2bd9e.d.ts → types-1c79e231.d.ts} +1 -1
  47. package/{esm/types-e40becc7.d.ts → cssm/types-67a2d8af.d.ts} +1 -1
  48. package/{modern/typings-dd8ca091.d.ts → cssm/typings-0f4b9bed.d.ts} +4 -0
  49. package/{modern/typings-9211a437.d.ts → cssm/typings-89f0cb07.d.ts} +5 -7
  50. package/cssm/{utils-dd8ca091.d.ts → utils-0f4b9bed.d.ts} +1 -1
  51. package/desktop-69921c40.d.ts +2 -0
  52. package/{Component-72308007.d.ts → esm/Component-0f4b9bed.d.ts} +1 -1
  53. package/esm/Component-10db897e.d.ts +6 -0
  54. package/esm/Component-4cd3936b.d.ts +1 -1
  55. package/esm/Component-8b2c2707.d.ts +2 -2
  56. package/esm/Component.desktop-0aa4e915.d.ts +5 -0
  57. package/esm/{Component.desktop-63dec22f.d.ts → Component.desktop-0f4b9bed.d.ts} +2 -2
  58. package/esm/{Component.desktop-d078a845.d.ts → Component.desktop-4cd3936b.d.ts} +4 -4
  59. package/esm/Component.desktop-785df74d.d.ts +1 -1
  60. package/esm/Component.mobile-16b1285a.d.ts +5 -0
  61. package/esm/Component.mobile-d7e9f69d.d.ts +1 -1
  62. package/esm/Component.responsive-3109f463.d.ts +1 -1
  63. package/{cssm/component-72308007.d.ts → esm/component-10db897e.d.ts} +1 -1
  64. package/esm/component.d.ts +1 -1
  65. package/esm/component.js +1 -1
  66. package/esm/components/flag-icon/component.js +1 -1
  67. package/esm/components/flag-icon/index.css +3 -3
  68. package/esm/components/select/component.d.ts +1 -1
  69. package/esm/components/select/component.js +1 -1
  70. package/esm/components/select/index.css +6 -6
  71. package/esm/components/select-field/component.js +1 -1
  72. package/esm/components/select-field/index.css +9 -9
  73. package/esm/desktop-69921c40.d.ts +2 -0
  74. package/esm/hook-8abfea97.d.ts +8 -8
  75. package/esm/{index-72308007.d.ts → index-10db897e.d.ts} +1 -5
  76. package/esm/index-8b2c2707.d.ts +1 -1
  77. package/esm/index-c44170fe.d.ts +2 -160
  78. package/esm/index-c76d6398.d.ts +2 -2
  79. package/esm/index-f12ee135.d.ts +2 -2
  80. package/esm/index.css +5 -5
  81. package/esm/mobile-89f0cb07.d.ts +2 -0
  82. package/esm/shared-4cd3936b.d.ts +60 -17
  83. package/esm/{types-83e2bd9e.d.ts → types-1c79e231.d.ts} +1 -1
  84. package/{modern/types-e40becc7.d.ts → esm/types-67a2d8af.d.ts} +1 -1
  85. package/{cssm/typings-dd8ca091.d.ts → esm/typings-0f4b9bed.d.ts} +4 -0
  86. package/esm/{typings-9211a437.d.ts → typings-89f0cb07.d.ts} +5 -7
  87. package/esm/{utils-dd8ca091.d.ts → utils-0f4b9bed.d.ts} +1 -1
  88. package/{hook-8abfea97.d.ts → hook-0f4b9bed.d.ts} +8 -8
  89. package/{hook-c44170fe.d.ts → hook-ebda875c.d.ts} +1 -1
  90. package/{modern/index-72308007.d.ts → index-10db897e.d.ts} +2 -6
  91. package/index-8b2c2707.d.ts +1 -1
  92. package/index-c44170fe.d.ts +2 -160
  93. package/index-c76d6398.d.ts +2 -2
  94. package/index-f12ee135.d.ts +2 -2
  95. package/index.css +5 -5
  96. package/mobile-89f0cb07.d.ts +2 -0
  97. package/{cssm/Component-dd8ca091.d.ts → modern/Component-0f4b9bed.d.ts} +1 -1
  98. package/{cssm/Component-72308007.d.ts → modern/Component-10db897e.d.ts} +1 -1
  99. package/modern/Component-4cd3936b.d.ts +1 -1
  100. package/modern/Component-8b2c2707.d.ts +2 -2
  101. package/modern/Component-c44170fe.d.ts +11 -5
  102. package/modern/Component.desktop-0aa4e915.d.ts +5 -0
  103. package/modern/Component.desktop-63dec22f.d.ts +1 -1
  104. package/modern/Component.desktop-785df74d.d.ts +1 -1
  105. package/{Component.desktop-d078a845.d.ts → modern/Component.desktop-9cded6b9.d.ts} +4 -4
  106. package/modern/Component.mobile-16b1285a.d.ts +5 -0
  107. package/modern/Component.mobile-d7e9f69d.d.ts +1 -1
  108. package/modern/Component.responsive-3109f463.d.ts +1 -1
  109. package/modern/{component-72308007.d.ts → component-10db897e.d.ts} +1 -1
  110. package/modern/component.d.ts +1 -1
  111. package/modern/component.js +1 -1
  112. package/modern/components/flag-icon/component.js +1 -1
  113. package/modern/components/flag-icon/index.css +3 -3
  114. package/modern/components/select/component.js +1 -1
  115. package/modern/components/select/index.css +6 -6
  116. package/modern/components/select-field/component.js +1 -1
  117. package/modern/components/select-field/index.css +9 -9
  118. package/modern/desktop-89f0cb07.d.ts +2 -0
  119. package/modern/hook-8abfea97.d.ts +8 -8
  120. package/modern/hook-c44170fe.d.ts +1 -1
  121. package/{index-72308007.d.ts → modern/index-10db897e.d.ts} +1 -5
  122. package/modern/index-8b2c2707.d.ts +1 -1
  123. package/modern/index-c44170fe.d.ts +2 -160
  124. package/modern/index-c76d6398.d.ts +2 -2
  125. package/modern/index-f12ee135.d.ts +2 -2
  126. package/modern/index.css +5 -5
  127. package/modern/mobile-89f0cb07.d.ts +2 -0
  128. package/modern/shared-4cd3936b.d.ts +5 -5
  129. package/modern/{types-83e2bd9e.d.ts → types-1c79e231.d.ts} +1 -1
  130. package/{cssm/types-e40becc7.d.ts → modern/types-67a2d8af.d.ts} +1 -1
  131. package/{typings-dd8ca091.d.ts → modern/typings-0f4b9bed.d.ts} +4 -0
  132. package/{typings-9211a437.d.ts → modern/typings-89f0cb07.d.ts} +5 -7
  133. package/modern/{utils-dd8ca091.d.ts → utils-0f4b9bed.d.ts} +1 -1
  134. package/package.json +3 -3
  135. package/shared-4cd3936b.d.ts +9 -19
  136. package/{types-83e2bd9e.d.ts → types-1c79e231.d.ts} +1 -1
  137. package/{types-e40becc7.d.ts → types-67a2d8af.d.ts} +1 -1
  138. package/{esm/typings-dd8ca091.d.ts → typings-0f4b9bed.d.ts} +4 -0
  139. package/{cssm/typings-9211a437.d.ts → typings-89f0cb07.d.ts} +5 -7
  140. package/{utils-dd8ca091.d.ts → utils-0f4b9bed.d.ts} +1 -1
  141. package/Component-c44170fe.d.ts +0 -7
  142. package/Component-dd8ca091.d.ts +0 -22
  143. package/Component.desktop-2e2b2125.d.ts +0 -6
  144. package/Component.desktop-d873d97d.d.ts +0 -6
  145. package/Component.mobile-755fbaa3.d.ts +0 -6
  146. package/cssm/Component.desktop-2e2b2125.d.ts +0 -6
  147. package/cssm/Component.mobile-755fbaa3.d.ts +0 -6
  148. package/cssm/desktop-2e2b2125.d.ts +0 -2
  149. package/cssm/mobile-755fbaa3.d.ts +0 -2
  150. package/desktop-2e2b2125.d.ts +0 -2
  151. package/esm/Component-72308007.d.ts +0 -100
  152. package/esm/Component-c44170fe.d.ts +0 -7
  153. package/esm/Component.desktop-2e2b2125.d.ts +0 -6
  154. package/esm/Component.mobile-755fbaa3.d.ts +0 -6
  155. package/esm/desktop-2e2b2125.d.ts +0 -2
  156. package/esm/hook-c44170fe.d.ts +0 -48
  157. package/esm/mobile-755fbaa3.d.ts +0 -2
  158. package/mobile-755fbaa3.d.ts +0 -2
  159. package/modern/Component-dd8ca091.d.ts +0 -22
  160. package/modern/Component.desktop-2e2b2125.d.ts +0 -6
  161. package/modern/Component.mobile-755fbaa3.d.ts +0 -6
  162. package/modern/desktop-2e2b2125.d.ts +0 -2
  163. package/modern/mobile-755fbaa3.d.ts +0 -2
  164. /package/{Component-63dec22f.d.ts → Component-69921c40.d.ts} +0 -0
  165. /package/cssm/{Component-63dec22f.d.ts → Component-69921c40.d.ts} +0 -0
  166. /package/esm/{Component-63dec22f.d.ts → Component-69921c40.d.ts} +0 -0
  167. /package/esm/{desktop-63dec22f.d.ts → desktop-785df74d.d.ts} +0 -0
  168. /package/esm/{mobile-96988a65.d.ts → mobile-d7e9f69d.d.ts} +0 -0
  169. /package/{mobile-96988a65.d.ts → mobile-d7e9f69d.d.ts} +0 -0
  170. /package/modern/{Component-63dec22f.d.ts → Component-69921c40.d.ts} +0 -0
@@ -1,161 +1,3 @@
1
1
  /// <reference types="react" />
2
- import React from "react";
3
- import { ChangeEvent, ElementType, InputHTMLAttributes, MouseEvent, ReactNode } from "react";
4
- type StyleColors = {
5
- default: {
6
- [key: string]: string;
7
- };
8
- inverted: {
9
- [key: string]: string;
10
- };
11
- };
12
- type BaseInputProps = Omit<InputHTMLAttributes<HTMLInputElement>, "size" | "type" | "value" | "defaultValue" | "onChange" | "onClick" | "onMouseDown" | "enterKeyHint"> & {
13
- /**
14
- * Значение поля ввода
15
- */
16
- value?: string;
17
- /**
18
- * Начальное значение поля
19
- */
20
- defaultValue?: string;
21
- /**
22
- * Растягивает компонент на ширину контейнера
23
- */
24
- block?: boolean;
25
- /**
26
- * Крестик для очистки поля
27
- */
28
- clear?: boolean;
29
- /**
30
- * Размер компонента
31
- */
32
- size?: "s" | "m" | "l" | "xl";
33
- /**
34
- * Набор цветов для компонента
35
- */
36
- colors?: "default" | "inverted";
37
- /**
38
- * Отображение ошибки
39
- */
40
- error?: ReactNode | boolean;
41
- /**
42
- * Отображение иконки успеха
43
- */
44
- success?: boolean;
45
- /**
46
- * Текст подсказки
47
- */
48
- hint?: ReactNode;
49
- /**
50
- * Лейбл компонента
51
- */
52
- label?: React.ReactNode;
53
- /**
54
- * Вид лейбла внутри / снаружи
55
- */
56
- labelView?: "inner" | "outer";
57
- /**
58
- * Атрибут type
59
- */
60
- type?: "number" | "card" | "email" | "money" | "password" | "tel" | "text";
61
- /**
62
- * Ref для обертки input
63
- */
64
- wrapperRef?: React.Ref<HTMLDivElement> | null;
65
- /**
66
- * Слот слева
67
- */
68
- leftAddons?: React.ReactNode;
69
- /**
70
- * Слот справа
71
- */
72
- rightAddons?: React.ReactNode;
73
- /**
74
- * Слот под инпутом
75
- */
76
- bottomAddons?: React.ReactNode;
77
- /**
78
- * Дополнительный класс
79
- */
80
- className?: string;
81
- /**
82
- * Дополнительный класс для поля
83
- */
84
- fieldClassName?: string;
85
- /**
86
- * Дополнительный класс инпута
87
- */
88
- inputClassName?: string;
89
- /**
90
- * Дополнительный класс для лейбла
91
- */
92
- labelClassName?: string;
93
- /**
94
- * Дополнительный класс для аддонов
95
- */
96
- addonsClassName?: string;
97
- /**
98
- * Класс, который будет установлен при фокусе
99
- */
100
- focusedClassName?: string;
101
- /**
102
- * Класс, который будет установлен, если в поле есть значение
103
- */
104
- filledClassName?: string;
105
- /**
106
- * Обработчик поля ввода
107
- */
108
- onChange?: (event: ChangeEvent<HTMLInputElement>, payload: {
109
- value: string;
110
- }) => void;
111
- /**
112
- * Обработчик нажатия на кнопку очистки
113
- */
114
- onClear?: (event: MouseEvent<HTMLButtonElement>) => void;
115
- /**
116
- * Обработчик клика по полю
117
- */
118
- onClick?: (event: MouseEvent<HTMLDivElement>) => void;
119
- /**
120
- * Обработчик MouseDown по полю
121
- */
122
- onMouseDown?: (event: MouseEvent<HTMLDivElement>) => void;
123
- /**
124
- * Обработчик MouseUp по полю
125
- */
126
- onMouseUp?: (event: MouseEvent<HTMLDivElement>) => void;
127
- /**
128
- * Идентификатор для систем автоматизированного тестирования
129
- */
130
- FormControlComponent?: ElementType;
131
- /**
132
- * Идентификатор для систем автоматизированного тестирования
133
- */
134
- dataTestId?: string;
135
- /**
136
- * Стили компонента для default и inverted режима.
137
- */
138
- colorStyles?: StyleColors;
139
- /**
140
- * Запрещает ввод с клавиатуры
141
- */
142
- disableUserInput?: boolean;
143
- };
144
- type InputProps = Omit<BaseInputProps, "FormControlComponent" | "colorStyles"> & {
145
- /**
146
- * Контрольная точка, с нее начинается desktop версия
147
- * @default 1024
148
- */
149
- breakpoint?: number;
150
- /**
151
- * Значение по-умолчанию для хука useMatchMedia
152
- */
153
- defaultMatchMediaValue?: boolean | (() => boolean);
154
- };
155
- declare const Input: React.ForwardRefExoticComponent<Omit<BaseInputProps, "FormControlComponent" | "colorStyles"> & {
156
- breakpoint?: number | undefined;
157
- defaultMatchMediaValue?: boolean | (() => boolean) | undefined;
158
- } & React.RefAttributes<HTMLInputElement>>;
159
- type InputMobileProps = Omit<BaseInputProps, "FormControlComponent" | "colorStyles">;
160
- declare const InputMobile: React.ForwardRefExoticComponent<InputMobileProps & React.RefAttributes<HTMLInputElement>>;
161
- export { InputProps, Input, InputMobileProps, InputMobile };
2
+ export * from "./Component.responsive-3109f463";
3
+ export {};
@@ -1,2 +1,2 @@
1
- export * from "./Component-72308007";
2
- export type { NavigationBarProps } from "./types-83e2bd9e";
1
+ export * from "./Component-10db897e";
2
+ export type { NavigationBarProps } from "./types-1c79e231";
@@ -1,3 +1,3 @@
1
- export * from "./component-72308007";
2
- export type { BottomSheetProps, BottomSheetTitleAlign } from "./types-e40becc7";
1
+ export * from "./component-10db897e";
2
+ export type { BottomSheetProps, BottomSheetTitleAlign } from "./types-67a2d8af";
3
3
  export { CLOSE_OFFSET, HEADER_OFFSET } from "./utils-49cc3c24";
package/modern/index.css CHANGED
@@ -1,4 +1,4 @@
1
- /* hash: 1k0y9 */
1
+ /* hash: 19xuo */
2
2
  :root {
3
3
  } /* deprecated */ :root {
4
4
  --color-light-graphic-secondary: #86868a; /* 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 */
@@ -16,17 +16,17 @@
16
16
  --gap-s: 12px;
17
17
  } :root {
18
18
  } :root {
19
- } .intl-phone-input__addons_kaeni {
19
+ } .intl-phone-input__addons_1y6jx {
20
20
  padding-left: 0;
21
- } .intl-phone-input__l_kaeni .intl-phone-input__addons_kaeni, .intl-phone-input__xl_kaeni .intl-phone-input__addons_kaeni {
21
+ } .intl-phone-input__l_1y6jx .intl-phone-input__addons_1y6jx, .intl-phone-input__xl_1y6jx .intl-phone-input__addons_1y6jx {
22
22
  padding-left: 0;
23
- } .intl-phone-input__flagIconWrapper_kaeni {
23
+ } .intl-phone-input__flagIconWrapper_1y6jx {
24
24
  display: flex;
25
25
  justify-content: center;
26
26
  align-items: center;
27
27
  width: 24px;
28
28
  height: 24px;
29
29
  margin-left: var(--gap-s);
30
- } .intl-phone-input__emptyCountryIcon_kaeni {
30
+ } .intl-phone-input__emptyCountryIcon_1y6jx {
31
31
  color: var(--color-light-graphic-secondary);
32
32
  }
@@ -0,0 +1,2 @@
1
+ export { ButtonMobile } from "./Component.mobile-16b1285a";
2
+ export type { CommonButtonProps as ButtonMobileProps } from "./typings-89f0cb07";
@@ -3,7 +3,7 @@ import React from "react";
3
3
  import { ReactNode } from "react";
4
4
  import { BottomSheetProps } from "./index-f12ee135";
5
5
  import { UseSelectWithApplyProps } from "./hook-8abfea97";
6
- import { BaseSelectProps, OptionProps, OptionShape } from "./typings-dd8ca091";
6
+ import { BaseSelectProps, OptionProps, OptionShape } from "./typings-0f4b9bed";
7
7
  type AdditionalMobileProps = {
8
8
  /**
9
9
  * Футер
@@ -56,9 +56,9 @@ type FooterProps = {
56
56
  declare const Footer: ({ handleApply, handleClear, showClear }: FooterProps) => React.JSX.Element;
57
57
  export { AdditionalMobileProps, SelectMobileProps, SelectMobile, useSelectWithLoading, FooterProps, Footer };
58
58
  export * from "./index-ebda875c";
59
- export * from "./Component-dd8ca091";
59
+ export * from "./Component-0f4b9bed";
60
60
  export * from "./hook-c44170fe";
61
61
  export * from "./hook-8abfea97";
62
- export * from "./Component-72308007";
63
- export * from "./typings-dd8ca091";
64
- export * from "./utils-dd8ca091";
62
+ export * from "./Component-10db897e";
63
+ export * from "./typings-0f4b9bed";
64
+ export * from "./utils-0f4b9bed";
@@ -14,7 +14,7 @@ type NavigationBarProps = {
14
14
  /**
15
15
  * Подзаголовок (доступен только в мобильной версии)
16
16
  */
17
- subtitle?: string;
17
+ subtitle?: ReactNode;
18
18
  /**
19
19
  * Размер заголовка (compact доступен только в мобильной версии)
20
20
  */
@@ -259,7 +259,7 @@ type BottomSheetProps = {
259
259
  /**
260
260
  * Вызывается после окончания анимации притягивания
261
261
  */
262
- onMagnetizeEnd?: () => void;
262
+ onMagnetizeEnd?: (index: number) => void;
263
263
  /**
264
264
  * Вызывается при изменении положения шторки
265
265
  */
@@ -459,6 +459,10 @@ type OptionsListProps = {
459
459
  * Обработчик отмены изменений
460
460
  */
461
461
  onClear?: () => void;
462
+ /**
463
+ * Указать индекс пункта для hover состояния
464
+ */
465
+ setHighlightedIndex?: (index: number) => void;
462
466
  };
463
467
  type OptgroupProps = {
464
468
  /**
@@ -69,6 +69,8 @@ type ComponentProps = {
69
69
  * Дочерние элементы.
70
70
  */
71
71
  children?: ReactNode;
72
+ };
73
+ type PrivateButtonProps = {
72
74
  /**
73
75
  * Основные стили компонента.
74
76
  */
@@ -80,16 +82,12 @@ type ComponentProps = {
80
82
  */
81
83
  colorStylesMap: StyleColors;
82
84
  };
83
- type AnchorBaseButtonProps = ComponentProps & AnchorHTMLAttributes<HTMLAnchorElement>;
84
- type NativeBaseButtonProps = ComponentProps & ButtonHTMLAttributes<HTMLButtonElement>;
85
- type BaseButtonProps = Partial<AnchorBaseButtonProps | NativeBaseButtonProps>;
86
- type AnchorButtonProps = Omit<BaseButtonProps, 'styles' | 'colorStylesMap'> & AnchorHTMLAttributes<HTMLAnchorElement>;
87
- type NativeButtonProps = Omit<BaseButtonProps, 'styles' | 'colorStylesMap'> & ButtonHTMLAttributes<HTMLButtonElement>;
88
- type ButtonProps = Partial<AnchorButtonProps | NativeButtonProps> & {
85
+ type CommonButtonProps = ComponentProps & Partial<AnchorHTMLAttributes<HTMLAnchorElement> | ButtonHTMLAttributes<HTMLButtonElement>>;
86
+ type ButtonProps = CommonButtonProps & {
89
87
  /**
90
88
  * Контрольная точка, с нее начинается desktop версия
91
89
  * @default 1024
92
90
  */
93
91
  breakpoint?: number;
94
92
  };
95
- export { StyleColors, ComponentProps, AnchorBaseButtonProps, NativeBaseButtonProps, BaseButtonProps, AnchorButtonProps, NativeButtonProps, ButtonProps };
93
+ export { StyleColors, ComponentProps, PrivateButtonProps, CommonButtonProps, ButtonProps };
@@ -1,5 +1,5 @@
1
1
  import { ReactNode, RefObject } from 'react';
2
- import { BaseSelectProps, GroupShape, OptionShape } from "./typings-dd8ca091";
2
+ import { BaseSelectProps, GroupShape, OptionShape } from "./typings-0f4b9bed";
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, }: {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@alfalab/core-components-intl-phone-input",
3
- "version": "9.5.11",
3
+ "version": "9.5.13",
4
4
  "description": "Phone input for international phones",
5
5
  "keywords": [],
6
6
  "license": "MIT",
@@ -14,8 +14,8 @@
14
14
  "react": "^16.9.0 || ^17.0.1 || ^18.0.0"
15
15
  },
16
16
  "dependencies": {
17
- "@alfalab/core-components-input-autocomplete": "10.1.6",
18
- "@alfalab/core-components-select": "^15.1.6",
17
+ "@alfalab/core-components-input-autocomplete": "10.2.1",
18
+ "@alfalab/core-components-select": "^15.2.1",
19
19
  "@alfalab/hooks": "^1.13.0",
20
20
  "@alfalab/icons-glyph": "^2.108.0",
21
21
  "@alfalab/utils": "^1.14.4",
@@ -2,8 +2,8 @@
2
2
  import React from "react";
3
3
  import { ReactNode } from "react";
4
4
  import { BottomSheetProps } from "./index-f12ee135";
5
- import { UseSelectWithApplyProps } from "./hook-8abfea97";
6
- import { BaseSelectProps, OptionProps, OptionShape } from "./typings-dd8ca091";
5
+ import { UseSelectWithApplyProps } from "./hook-0f4b9bed";
6
+ import { BaseSelectProps } from "./typings-0f4b9bed";
7
7
  type AdditionalMobileProps = {
8
8
  /**
9
9
  * Футер
@@ -38,27 +38,17 @@ type AdditionalMobileProps = {
38
38
  };
39
39
  type SelectMobileProps = Omit<BaseSelectProps, "Checkmark" | "onScroll"> & AdditionalMobileProps;
40
40
  declare const SelectMobile: React.ForwardRefExoticComponent<Omit<BaseSelectProps, "onScroll" | "Checkmark"> & AdditionalMobileProps & React.RefAttributes<unknown>>;
41
- // eslint-disable-next-line @typescript-eslint/naming-convention
42
- type useSelectWithLoadingProps = {
43
- loading?: boolean;
44
- visibleOptions?: BaseSelectProps["visibleOptions"];
45
- Option?: React.FC<OptionProps>;
46
- };
47
- declare function useSelectWithLoading({ loading, visibleOptions, Option }: useSelectWithLoadingProps): {
48
- Option: (props: OptionProps) => React.JSX.Element;
49
- options: OptionShape[];
50
- } | null;
51
41
  type FooterProps = {
52
42
  handleClear?: () => void;
53
43
  handleApply?: () => void;
54
44
  showClear?: boolean;
55
45
  };
56
46
  declare const Footer: ({ handleApply, handleClear, showClear }: FooterProps) => React.JSX.Element;
57
- export { AdditionalMobileProps, SelectMobileProps, SelectMobile, useSelectWithLoading, FooterProps, Footer };
58
47
  export * from "./index-ebda875c";
59
- export * from "./Component-dd8ca091";
60
- export * from "./hook-c44170fe";
61
- export * from "./hook-8abfea97";
62
- export * from "./Component-72308007";
63
- export * from "./typings-dd8ca091";
64
- export * from "./utils-dd8ca091";
48
+ export * from "./Component-ebda875c";
49
+ export * from "./Component-0f4b9bed";
50
+ export { AdditionalMobileProps, SelectMobileProps, SelectMobile, FooterProps, Footer };
51
+ export * from "./hook-ebda875c";
52
+ export * from "./hook-0f4b9bed";
53
+ export * from "./typings-0f4b9bed";
54
+ export * from "./utils-0f4b9bed";
@@ -14,7 +14,7 @@ type NavigationBarProps = {
14
14
  /**
15
15
  * Подзаголовок (доступен только в мобильной версии)
16
16
  */
17
- subtitle?: string;
17
+ subtitle?: ReactNode;
18
18
  /**
19
19
  * Размер заголовка (compact доступен только в мобильной версии)
20
20
  */
@@ -259,7 +259,7 @@ type BottomSheetProps = {
259
259
  /**
260
260
  * Вызывается после окончания анимации притягивания
261
261
  */
262
- onMagnetizeEnd?: () => void;
262
+ onMagnetizeEnd?: (index: number) => void;
263
263
  /**
264
264
  * Вызывается при изменении положения шторки
265
265
  */
@@ -459,6 +459,10 @@ type OptionsListProps = {
459
459
  * Обработчик отмены изменений
460
460
  */
461
461
  onClear?: () => void;
462
+ /**
463
+ * Указать индекс пункта для hover состояния
464
+ */
465
+ setHighlightedIndex?: (index: number) => void;
462
466
  };
463
467
  type OptgroupProps = {
464
468
  /**
@@ -69,6 +69,8 @@ type ComponentProps = {
69
69
  * Дочерние элементы.
70
70
  */
71
71
  children?: ReactNode;
72
+ };
73
+ type PrivateButtonProps = {
72
74
  /**
73
75
  * Основные стили компонента.
74
76
  */
@@ -80,16 +82,12 @@ type ComponentProps = {
80
82
  */
81
83
  colorStylesMap: StyleColors;
82
84
  };
83
- type AnchorBaseButtonProps = ComponentProps & AnchorHTMLAttributes<HTMLAnchorElement>;
84
- type NativeBaseButtonProps = ComponentProps & ButtonHTMLAttributes<HTMLButtonElement>;
85
- type BaseButtonProps = Partial<AnchorBaseButtonProps | NativeBaseButtonProps>;
86
- type AnchorButtonProps = Omit<BaseButtonProps, 'styles' | 'colorStylesMap'> & AnchorHTMLAttributes<HTMLAnchorElement>;
87
- type NativeButtonProps = Omit<BaseButtonProps, 'styles' | 'colorStylesMap'> & ButtonHTMLAttributes<HTMLButtonElement>;
88
- type ButtonProps = Partial<AnchorButtonProps | NativeButtonProps> & {
85
+ type CommonButtonProps = ComponentProps & Partial<AnchorHTMLAttributes<HTMLAnchorElement> | ButtonHTMLAttributes<HTMLButtonElement>>;
86
+ type ButtonProps = CommonButtonProps & {
89
87
  /**
90
88
  * Контрольная точка, с нее начинается desktop версия
91
89
  * @default 1024
92
90
  */
93
91
  breakpoint?: number;
94
92
  };
95
- export { StyleColors, ComponentProps, AnchorBaseButtonProps, NativeBaseButtonProps, BaseButtonProps, AnchorButtonProps, NativeButtonProps, ButtonProps };
93
+ export { StyleColors, ComponentProps, PrivateButtonProps, CommonButtonProps, ButtonProps };
@@ -1,5 +1,5 @@
1
1
  import { ReactNode, RefObject } from 'react';
2
- import { BaseSelectProps, GroupShape, OptionShape } from "./typings-dd8ca091";
2
+ import { BaseSelectProps, GroupShape, OptionShape } from "./typings-0f4b9bed";
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, }: {
@@ -1,7 +0,0 @@
1
- /// <reference types="react" />
2
- import React from 'react';
3
- declare const Search: React.ForwardRefExoticComponent<Omit<import("./index-c44170fe").BaseInputProps, "FormControlComponent" | "colorStyles"> & {
4
- breakpoint?: number | undefined;
5
- defaultMatchMediaValue?: boolean | (() => boolean) | undefined;
6
- } & React.RefAttributes<HTMLInputElement>>;
7
- export { Search };
@@ -1,22 +0,0 @@
1
- /// <reference types="react" />
2
- import React from "react";
3
- import { OptionShape, OptionsListProps } from "./typings-dd8ca091";
4
- import { HeaderProps } from "./Component-ebda875c";
5
- type FooterProps = {
6
- handleClear?: () => void;
7
- handleApply?: () => void;
8
- showClear?: boolean;
9
- selectedDraft?: OptionShape[];
10
- };
11
- declare const Footer: ({ handleApply, handleClear, showClear, selectedDraft }: FooterProps) => React.JSX.Element;
12
- declare const OptionsListWithApply: React.ForwardRefExoticComponent<OptionsListProps & {
13
- showClear?: boolean | undefined;
14
- onClose?: (() => void) | undefined;
15
- selectedDraft?: OptionShape[] | undefined;
16
- OptionsList?: React.FC<OptionsListProps & React.RefAttributes<HTMLDivElement>> | undefined;
17
- Footer?: React.FC<FooterProps> | undefined;
18
- Header?: React.FC<HeaderProps> | undefined;
19
- headerProps?: HeaderProps | undefined;
20
- showHeaderWithSelectAll?: boolean | undefined;
21
- } & React.RefAttributes<HTMLDivElement>>;
22
- export { FooterProps, Footer, OptionsListWithApply };
@@ -1,6 +0,0 @@
1
- /// <reference types="react" />
2
- import React from 'react';
3
- import { AnchorButtonProps, NativeButtonProps } from "./typings-9211a437";
4
- type ButtonDesktopProps = Partial<AnchorButtonProps | NativeButtonProps>;
5
- declare const ButtonDesktop: React.ForwardRefExoticComponent<ButtonDesktopProps & React.RefAttributes<HTMLAnchorElement | HTMLButtonElement>>;
6
- export { ButtonDesktopProps, ButtonDesktop };
@@ -1,6 +0,0 @@
1
- /// <reference types="react" />
2
- import React from 'react';
3
- import { BaseInputProps } from "./index-c44170fe";
4
- type InputDesktopProps = Omit<BaseInputProps, 'FormControlComponent' | 'colorStyles'>;
5
- declare const InputDesktop: React.ForwardRefExoticComponent<InputDesktopProps & React.RefAttributes<HTMLInputElement>>;
6
- export { InputDesktopProps, InputDesktop };
@@ -1,6 +0,0 @@
1
- /// <reference types="react" />
2
- import React from 'react';
3
- import { AnchorButtonProps, NativeButtonProps } from "./typings-9211a437";
4
- type ButtonMobileProps = Partial<AnchorButtonProps | NativeButtonProps>;
5
- declare const ButtonMobile: React.ForwardRefExoticComponent<ButtonMobileProps & React.RefAttributes<HTMLAnchorElement | HTMLButtonElement>>;
6
- export { ButtonMobileProps, ButtonMobile };
@@ -1,6 +0,0 @@
1
- /// <reference types="react" />
2
- import React from 'react';
3
- import { AnchorButtonProps, NativeButtonProps } from "./typings-9211a437";
4
- type ButtonDesktopProps = Partial<AnchorButtonProps | NativeButtonProps>;
5
- declare const ButtonDesktop: React.ForwardRefExoticComponent<ButtonDesktopProps & React.RefAttributes<HTMLAnchorElement | HTMLButtonElement>>;
6
- export { ButtonDesktopProps, ButtonDesktop };
@@ -1,6 +0,0 @@
1
- /// <reference types="react" />
2
- import React from 'react';
3
- import { AnchorButtonProps, NativeButtonProps } from "./typings-9211a437";
4
- type ButtonMobileProps = Partial<AnchorButtonProps | NativeButtonProps>;
5
- declare const ButtonMobile: React.ForwardRefExoticComponent<ButtonMobileProps & React.RefAttributes<HTMLAnchorElement | HTMLButtonElement>>;
6
- export { ButtonMobileProps, ButtonMobile };
@@ -1,2 +0,0 @@
1
- export * from "./Component.desktop-2e2b2125";
2
- export {};
@@ -1,2 +0,0 @@
1
- export * from "./Component.mobile-755fbaa3";
2
- export {};
@@ -1,2 +0,0 @@
1
- export * from "./Component.desktop-2e2b2125";
2
- export {};
@@ -1,100 +0,0 @@
1
- /// <reference types="react" />
2
- import React from "react";
3
- import { FC, ReactNode } from "react";
4
- import { ModalMobileProps, ContentProps } from "./typings-bdb4c6b9";
5
- import { BottomSheetProps } from "./index-f12ee135";
6
- import { BaseSelectProps } from "./typings-dd8ca091";
7
- type FooterProps = {
8
- /**
9
- * Контент футера
10
- */
11
- children?: ReactNode;
12
- /**
13
- * Дополнительный класс
14
- */
15
- className?: string;
16
- /**
17
- * Фиксирует футер
18
- */
19
- sticky?: boolean;
20
- /**
21
- * Выравнивание элементов футера
22
- */
23
- layout?: "start" | "center" | "space-between" | "column";
24
- /**
25
- * Отступы между элементами футера
26
- */
27
- gap?: 16 | 24 | 32;
28
- };
29
- declare const ModalMobile: React.ForwardRefExoticComponent<ModalMobileProps & React.RefAttributes<HTMLDivElement>> & {
30
- Content: React.FC<import("./typings-bdb4c6b9").ContentProps>;
31
- Header: React.FC<import("./Component-c76d6398").HeaderProps>;
32
- Footer: React.FC<FooterProps>;
33
- };
34
- declare const Content: FC<ContentProps>;
35
- type SelectMobileProps = Omit<BaseSelectProps, 'Checkmark' | 'onScroll'> & {
36
- /**
37
- * Футер
38
- * @deprecated Используйте bottomSheetProps.actionButton
39
- */
40
- footer?: ReactNode;
41
- /**
42
- * Будет ли свайпаться шторка
43
- * @deprecated Используйте bottomSheetProps.swipeable
44
- */
45
- swipeable?: boolean;
46
- /**
47
- * Отображать в BottomSheet
48
- */
49
- isBottomSheet?: boolean;
50
- /**
51
- * Дополнительные пропсы шторки
52
- */
53
- bottomSheetProps?: Partial<BottomSheetProps>;
54
- /**
55
- * Дополнительные пропсы модалки
56
- */
57
- modalProps?: Partial<React.ComponentProps<typeof ModalMobile>>;
58
- /**
59
- * Дополнительные пропсы шапки модалки
60
- */
61
- modalHeaderProps?: Partial<React.ComponentProps<typeof ModalMobile.Header>>;
62
- /**
63
- * Дополнительные пропсы футера модалки
64
- */
65
- modalFooterProps?: Partial<React.ComponentProps<typeof ModalMobile.Footer>>;
66
- };
67
- declare const BaseSelectMobile: React.ForwardRefExoticComponent<Omit<BaseSelectProps, "onScroll" | "Checkmark"> & {
68
- /**
69
- * Футер
70
- * @deprecated Используйте bottomSheetProps.actionButton
71
- */
72
- footer?: ReactNode;
73
- /**
74
- * Будет ли свайпаться шторка
75
- * @deprecated Используйте bottomSheetProps.swipeable
76
- */
77
- swipeable?: boolean | undefined;
78
- /**
79
- * Отображать в BottomSheet
80
- */
81
- isBottomSheet?: boolean | undefined;
82
- /**
83
- * Дополнительные пропсы шторки
84
- */
85
- bottomSheetProps?: Partial<BottomSheetProps> | undefined;
86
- /**
87
- * Дополнительные пропсы модалки
88
- */
89
- modalProps?: Partial<ModalMobileProps & React.RefAttributes<HTMLDivElement>> | undefined;
90
- /**
91
- * Дополнительные пропсы шапки модалки
92
- */
93
- modalHeaderProps?: Partial<import("./Component-c76d6398").HeaderProps> | undefined;
94
- /**
95
- * Дополнительные пропсы футера модалки
96
- */
97
- modalFooterProps?: Partial<FooterProps> | undefined;
98
- } & React.RefAttributes<unknown>>;
99
- export { ModalMobile, Content, SelectMobileProps, BaseSelectMobile };
100
- export { ModalMobileProps } from "./typings-bdb4c6b9";
@@ -1,7 +0,0 @@
1
- /// <reference types="react" />
2
- import React from 'react';
3
- declare const Search: React.ForwardRefExoticComponent<Omit<import("./index-c44170fe").BaseInputProps, "FormControlComponent" | "colorStyles"> & {
4
- breakpoint?: number | undefined;
5
- defaultMatchMediaValue?: boolean | (() => boolean) | undefined;
6
- } & React.RefAttributes<HTMLInputElement>>;
7
- export { Search };
@@ -1,6 +0,0 @@
1
- /// <reference types="react" />
2
- import React from 'react';
3
- import { AnchorButtonProps, NativeButtonProps } from "./typings-9211a437";
4
- type ButtonDesktopProps = Partial<AnchorButtonProps | NativeButtonProps>;
5
- declare const ButtonDesktop: React.ForwardRefExoticComponent<ButtonDesktopProps & React.RefAttributes<HTMLAnchorElement | HTMLButtonElement>>;
6
- export { ButtonDesktopProps, ButtonDesktop };
@@ -1,6 +0,0 @@
1
- /// <reference types="react" />
2
- import React from 'react';
3
- import { AnchorButtonProps, NativeButtonProps } from "./typings-9211a437";
4
- type ButtonMobileProps = Partial<AnchorButtonProps | NativeButtonProps>;
5
- declare const ButtonMobile: React.ForwardRefExoticComponent<ButtonMobileProps & React.RefAttributes<HTMLAnchorElement | HTMLButtonElement>>;
6
- export { ButtonMobileProps, ButtonMobile };