@skbkontur/react-ui 4.23.0 → 4.25.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 (264) hide show
  1. package/CHANGELOG.md +25 -0
  2. package/cjs/components/Calendar/Calendar.d.ts +40 -5
  3. package/cjs/components/Calendar/Calendar.js +92 -36
  4. package/cjs/components/Calendar/Calendar.js.map +1 -1
  5. package/cjs/components/Calendar/Calendar.md +42 -1
  6. package/cjs/components/Calendar/Calendar.styles.js +1 -1
  7. package/cjs/components/Calendar/Calendar.styles.js.map +1 -1
  8. package/cjs/components/Calendar/CalendarContext.d.ts +12 -0
  9. package/cjs/components/Calendar/CalendarContext.js +16 -0
  10. package/cjs/components/Calendar/CalendarContext.js.map +1 -0
  11. package/cjs/components/Calendar/CalendarDateShape.d.ts +4 -2
  12. package/cjs/components/Calendar/CalendarDateShape.js +13 -3
  13. package/cjs/components/Calendar/CalendarDateShape.js.map +1 -1
  14. package/cjs/components/Calendar/CalendarDay.d.ts +12 -0
  15. package/cjs/components/Calendar/CalendarDay.js +77 -0
  16. package/cjs/components/Calendar/CalendarDay.js.map +1 -0
  17. package/cjs/components/Calendar/CalendarDay.md +70 -0
  18. package/cjs/components/Calendar/CalendarUtils.d.ts +2 -1
  19. package/cjs/components/Calendar/CalendarUtils.js +4 -6
  20. package/cjs/components/Calendar/CalendarUtils.js.map +1 -1
  21. package/cjs/components/Calendar/DayCellView.d.ts +4 -12
  22. package/cjs/components/Calendar/DayCellView.js +20 -43
  23. package/cjs/components/Calendar/DayCellView.js.map +1 -1
  24. package/cjs/components/Calendar/DayCellView.styles.d.ts +2 -5
  25. package/cjs/components/Calendar/DayCellView.styles.js +17 -24
  26. package/cjs/components/Calendar/DayCellView.styles.js.map +1 -1
  27. package/cjs/components/Calendar/Month.d.ts +0 -10
  28. package/cjs/components/Calendar/Month.js +33 -86
  29. package/cjs/components/Calendar/Month.js.map +1 -1
  30. package/cjs/components/Calendar/MonthView.d.ts +3 -2
  31. package/cjs/components/Calendar/MonthView.js +47 -37
  32. package/cjs/components/Calendar/MonthView.js.map +1 -1
  33. package/cjs/components/Calendar/MonthView.styles.d.ts +3 -0
  34. package/cjs/components/Calendar/MonthView.styles.js +45 -7
  35. package/cjs/components/Calendar/MonthView.styles.js.map +1 -1
  36. package/cjs/components/Calendar/MonthViewModel.js +24 -6
  37. package/cjs/components/Calendar/MonthViewModel.js.map +1 -1
  38. package/cjs/components/Calendar/config.js +12 -6
  39. package/cjs/components/Calendar/config.js.map +1 -1
  40. package/cjs/components/Calendar/index.d.ts +1 -0
  41. package/cjs/components/Calendar/index.js +2 -1
  42. package/cjs/components/Calendar/index.js.map +1 -1
  43. package/cjs/components/DatePicker/DatePicker.d.ts +4 -1
  44. package/cjs/components/DatePicker/DatePicker.js +71 -44
  45. package/cjs/components/DatePicker/DatePicker.js.map +1 -1
  46. package/cjs/components/DatePicker/DatePicker.md +36 -1
  47. package/cjs/components/DatePicker/DatePickerHelpers.js +2 -1
  48. package/cjs/components/DatePicker/DatePickerHelpers.js.map +1 -1
  49. package/cjs/components/DatePicker/MobilePicker.d.ts +10 -0
  50. package/cjs/components/DatePicker/MobilePicker.js +118 -0
  51. package/cjs/components/DatePicker/MobilePicker.js.map +1 -0
  52. package/cjs/components/DatePicker/MobilePicker.styles.d.ts +3 -0
  53. package/cjs/components/DatePicker/MobilePicker.styles.js +8 -0
  54. package/cjs/components/DatePicker/MobilePicker.styles.js.map +1 -0
  55. package/cjs/components/DatePicker/getMobilePickerTheme.d.ts +2 -0
  56. package/cjs/components/DatePicker/getMobilePickerTheme.js +19 -0
  57. package/cjs/components/DatePicker/getMobilePickerTheme.js.map +1 -0
  58. package/cjs/components/Input/Input.js +1 -1
  59. package/cjs/components/Input/Input.js.map +1 -1
  60. package/cjs/components/Input/Input.styles.d.ts +1 -1
  61. package/cjs/components/Input/Input.styles.js +3 -2
  62. package/cjs/components/Input/Input.styles.js.map +1 -1
  63. package/cjs/components/Input/InputLayout/InputLayout.styles.d.ts +1 -1
  64. package/cjs/components/Input/InputLayout/InputLayout.styles.js +3 -2
  65. package/cjs/components/Input/InputLayout/InputLayout.styles.js.map +1 -1
  66. package/cjs/components/Input/InputLayout/InputLayoutAsideIcon.js +1 -1
  67. package/cjs/components/Input/InputLayout/InputLayoutAsideIcon.js.map +1 -1
  68. package/cjs/internal/DateSelect/DateSelect.d.ts +2 -0
  69. package/cjs/internal/DateSelect/DateSelect.js +50 -4
  70. package/cjs/internal/DateSelect/DateSelect.js.map +1 -1
  71. package/cjs/internal/DateSelect/DateSelect.styles.d.ts +1 -0
  72. package/cjs/internal/DateSelect/DateSelect.styles.js +15 -1
  73. package/cjs/internal/DateSelect/DateSelect.styles.js.map +1 -1
  74. package/cjs/internal/DateSelect/locale/locales/en.js +2 -1
  75. package/cjs/internal/DateSelect/locale/locales/en.js.map +1 -1
  76. package/cjs/internal/DateSelect/locale/locales/ru.js +2 -1
  77. package/cjs/internal/DateSelect/locale/locales/ru.js.map +1 -1
  78. package/cjs/internal/DateSelect/locale/types.d.ts +1 -0
  79. package/cjs/internal/InputLikeText/InputLikeText.js +1 -1
  80. package/cjs/internal/InputLikeText/InputLikeText.js.map +1 -1
  81. package/cjs/internal/MobilePopup/MobilePopup.d.ts +4 -0
  82. package/cjs/internal/MobilePopup/MobilePopup.js +8 -2
  83. package/cjs/internal/MobilePopup/MobilePopup.js.map +1 -1
  84. package/cjs/internal/MobilePopup/MobilePopupFooter/MobilePopupFooter.d.ts +7 -0
  85. package/cjs/internal/MobilePopup/MobilePopupFooter/MobilePopupFooter.js +32 -0
  86. package/cjs/internal/MobilePopup/MobilePopupFooter/MobilePopupFooter.js.map +1 -0
  87. package/cjs/internal/MobilePopup/MobilePopupFooter/MobilePopupFooter.styles.d.ts +4 -0
  88. package/cjs/internal/MobilePopup/MobilePopupFooter/MobilePopupFooter.styles.js +15 -0
  89. package/cjs/internal/MobilePopup/MobilePopupFooter/MobilePopupFooter.styles.js.map +1 -0
  90. package/cjs/internal/MobilePopup/MobilePopupFooter/index.d.ts +1 -0
  91. package/cjs/internal/MobilePopup/MobilePopupFooter/index.js +1 -0
  92. package/cjs/internal/MobilePopup/MobilePopupFooter/index.js.map +1 -0
  93. package/cjs/internal/NativeDateInput/utils.js +3 -2
  94. package/cjs/internal/NativeDateInput/utils.js.map +1 -1
  95. package/cjs/internal/ThemePlayground/ThemeContextPlayground.js +9 -6
  96. package/cjs/internal/ThemePlayground/ThemeContextPlayground.js.map +1 -1
  97. package/cjs/internal/ThemePlayground/constants.js +2 -1
  98. package/cjs/internal/ThemePlayground/constants.js.map +1 -1
  99. package/cjs/internal/ThemeShowcase/VariablesCollector.d.ts +1 -1
  100. package/cjs/internal/themes/DarkTheme.d.ts +2 -0
  101. package/cjs/internal/themes/DarkTheme.js +6 -1
  102. package/cjs/internal/themes/DarkTheme.js.map +1 -1
  103. package/cjs/internal/themes/DefaultTheme.d.ts +18 -0
  104. package/cjs/internal/themes/DefaultTheme.js +32 -4
  105. package/cjs/internal/themes/DefaultTheme.js.map +1 -1
  106. package/cjs/lib/date/InternalDate.d.ts +2 -0
  107. package/cjs/lib/date/InternalDate.js +8 -1
  108. package/cjs/lib/date/InternalDate.js.map +1 -1
  109. package/cjs/lib/date/InternalDateTransformer.d.ts +3 -0
  110. package/cjs/lib/date/InternalDateTransformer.js +23 -0
  111. package/cjs/lib/date/InternalDateTransformer.js.map +1 -1
  112. package/cjs/lib/date/InternalDateValidator.js +2 -1
  113. package/cjs/lib/date/InternalDateValidator.js.map +1 -1
  114. package/cjs/lib/date/comparison.d.ts +6 -0
  115. package/cjs/lib/date/comparison.js +44 -0
  116. package/cjs/lib/date/comparison.js.map +1 -0
  117. package/cjs/lib/locale/constants.d.ts +3 -0
  118. package/cjs/lib/locale/constants.js +6 -2
  119. package/cjs/lib/locale/constants.js.map +1 -1
  120. package/cjs/lib/theming/ThemeContext.md +3 -1
  121. package/cjs/lib/theming/themes/Theme2022DarkUpdate2024.d.ts +30 -0
  122. package/cjs/lib/theming/themes/Theme2022DarkUpdate2024.js +50 -0
  123. package/cjs/lib/theming/themes/Theme2022DarkUpdate2024.js.map +1 -0
  124. package/cjs/lib/theming/themes/Theme2022Update2024.d.ts +46 -0
  125. package/cjs/lib/theming/themes/Theme2022Update2024.js +75 -0
  126. package/cjs/lib/theming/themes/Theme2022Update2024.js.map +1 -0
  127. package/components/Calendar/Calendar/Calendar.js +81 -64
  128. package/components/Calendar/Calendar/Calendar.js.map +1 -1
  129. package/components/Calendar/Calendar.d.ts +40 -5
  130. package/components/Calendar/Calendar.md +42 -1
  131. package/components/Calendar/Calendar.styles/Calendar.styles.js +1 -1
  132. package/components/Calendar/Calendar.styles/Calendar.styles.js.map +1 -1
  133. package/components/Calendar/CalendarContext/CalendarContext.js +2 -0
  134. package/components/Calendar/CalendarContext/CalendarContext.js.map +1 -0
  135. package/components/Calendar/CalendarContext/package.json +6 -0
  136. package/components/Calendar/CalendarContext.d.ts +12 -0
  137. package/components/Calendar/CalendarDateShape/CalendarDateShape.js +23 -1
  138. package/components/Calendar/CalendarDateShape/CalendarDateShape.js.map +1 -1
  139. package/components/Calendar/CalendarDateShape.d.ts +4 -2
  140. package/components/Calendar/CalendarDay/CalendarDay.js +62 -0
  141. package/components/Calendar/CalendarDay/CalendarDay.js.map +1 -0
  142. package/components/Calendar/CalendarDay/package.json +6 -0
  143. package/components/Calendar/CalendarDay.d.ts +12 -0
  144. package/components/Calendar/CalendarDay.md +70 -0
  145. package/components/Calendar/CalendarUtils/CalendarUtils.js +5 -4
  146. package/components/Calendar/CalendarUtils/CalendarUtils.js.map +1 -1
  147. package/components/Calendar/CalendarUtils.d.ts +2 -1
  148. package/components/Calendar/DayCellView/DayCellView.js +32 -46
  149. package/components/Calendar/DayCellView/DayCellView.js.map +1 -1
  150. package/components/Calendar/DayCellView.d.ts +4 -12
  151. package/components/Calendar/DayCellView.styles/DayCellView.styles.js +10 -13
  152. package/components/Calendar/DayCellView.styles/DayCellView.styles.js.map +1 -1
  153. package/components/Calendar/DayCellView.styles.d.ts +2 -5
  154. package/components/Calendar/Month/Month.js +45 -80
  155. package/components/Calendar/Month/Month.js.map +1 -1
  156. package/components/Calendar/Month.d.ts +0 -10
  157. package/components/Calendar/MonthView/MonthView.js +49 -44
  158. package/components/Calendar/MonthView/MonthView.js.map +1 -1
  159. package/components/Calendar/MonthView.d.ts +3 -2
  160. package/components/Calendar/MonthView.styles/MonthView.styles.js +20 -6
  161. package/components/Calendar/MonthView.styles/MonthView.styles.js.map +1 -1
  162. package/components/Calendar/MonthView.styles.d.ts +3 -0
  163. package/components/Calendar/MonthViewModel/MonthViewModel.js +9 -6
  164. package/components/Calendar/MonthViewModel/MonthViewModel.js.map +1 -1
  165. package/components/Calendar/config/config.js +6 -4
  166. package/components/Calendar/config/config.js.map +1 -1
  167. package/components/Calendar/index/index.js +2 -1
  168. package/components/Calendar/index/index.js.map +1 -1
  169. package/components/Calendar/index.d.ts +1 -0
  170. package/components/DatePicker/DatePicker/DatePicker.js +60 -38
  171. package/components/DatePicker/DatePicker/DatePicker.js.map +1 -1
  172. package/components/DatePicker/DatePicker.d.ts +4 -1
  173. package/components/DatePicker/DatePicker.md +36 -1
  174. package/components/DatePicker/DatePickerHelpers/DatePickerHelpers.js +2 -1
  175. package/components/DatePicker/DatePickerHelpers/DatePickerHelpers.js.map +1 -1
  176. package/components/DatePicker/MobilePicker/MobilePicker.js +91 -0
  177. package/components/DatePicker/MobilePicker/MobilePicker.js.map +1 -0
  178. package/components/DatePicker/MobilePicker/package.json +6 -0
  179. package/components/DatePicker/MobilePicker.d.ts +10 -0
  180. package/components/DatePicker/MobilePicker.styles/MobilePicker.styles.js +10 -0
  181. package/components/DatePicker/MobilePicker.styles/MobilePicker.styles.js.map +1 -0
  182. package/components/DatePicker/MobilePicker.styles/package.json +6 -0
  183. package/components/DatePicker/MobilePicker.styles.d.ts +3 -0
  184. package/components/DatePicker/getMobilePickerTheme/getMobilePickerTheme.js +14 -0
  185. package/components/DatePicker/getMobilePickerTheme/getMobilePickerTheme.js.map +1 -0
  186. package/components/DatePicker/getMobilePickerTheme/package.json +6 -0
  187. package/components/DatePicker/getMobilePickerTheme.d.ts +2 -0
  188. package/components/Input/Input/Input.js +1 -1
  189. package/components/Input/Input/Input.js.map +1 -1
  190. package/components/Input/Input.styles/Input.styles.js +2 -2
  191. package/components/Input/Input.styles/Input.styles.js.map +1 -1
  192. package/components/Input/Input.styles.d.ts +1 -1
  193. package/components/Input/InputLayout/InputLayout.styles/InputLayout.styles.js +2 -2
  194. package/components/Input/InputLayout/InputLayout.styles/InputLayout.styles.js.map +1 -1
  195. package/components/Input/InputLayout/InputLayout.styles.d.ts +1 -1
  196. package/components/Input/InputLayout/InputLayoutAsideIcon/InputLayoutAsideIcon.js +1 -1
  197. package/components/Input/InputLayout/InputLayoutAsideIcon/InputLayoutAsideIcon.js.map +1 -1
  198. package/internal/DateSelect/DateSelect/DateSelect.js +56 -4
  199. package/internal/DateSelect/DateSelect/DateSelect.js.map +1 -1
  200. package/internal/DateSelect/DateSelect.d.ts +2 -0
  201. package/internal/DateSelect/DateSelect.styles/DateSelect.styles.js +4 -1
  202. package/internal/DateSelect/DateSelect.styles/DateSelect.styles.js.map +1 -1
  203. package/internal/DateSelect/DateSelect.styles.d.ts +1 -0
  204. package/internal/DateSelect/locale/locales/en/en.js +2 -1
  205. package/internal/DateSelect/locale/locales/en/en.js.map +1 -1
  206. package/internal/DateSelect/locale/locales/ru/ru.js +2 -1
  207. package/internal/DateSelect/locale/locales/ru/ru.js.map +1 -1
  208. package/internal/DateSelect/locale/types.d.ts +1 -0
  209. package/internal/InputLikeText/InputLikeText/InputLikeText.js +1 -1
  210. package/internal/InputLikeText/InputLikeText/InputLikeText.js.map +1 -1
  211. package/internal/MobilePopup/MobilePopup/MobilePopup.js +2 -1
  212. package/internal/MobilePopup/MobilePopup/MobilePopup.js.map +1 -1
  213. package/internal/MobilePopup/MobilePopup.d.ts +4 -0
  214. package/internal/MobilePopup/MobilePopupFooter/MobilePopupFooter/MobilePopupFooter.js +37 -0
  215. package/internal/MobilePopup/MobilePopupFooter/MobilePopupFooter/MobilePopupFooter.js.map +1 -0
  216. package/internal/MobilePopup/MobilePopupFooter/MobilePopupFooter/package.json +6 -0
  217. package/internal/MobilePopup/MobilePopupFooter/MobilePopupFooter.d.ts +7 -0
  218. package/internal/MobilePopup/MobilePopupFooter/MobilePopupFooter.styles/MobilePopupFooter.styles.js +11 -0
  219. package/internal/MobilePopup/MobilePopupFooter/MobilePopupFooter.styles/MobilePopupFooter.styles.js.map +1 -0
  220. package/internal/MobilePopup/MobilePopupFooter/MobilePopupFooter.styles/package.json +6 -0
  221. package/internal/MobilePopup/MobilePopupFooter/MobilePopupFooter.styles.d.ts +4 -0
  222. package/internal/MobilePopup/MobilePopupFooter/index/index.js +1 -0
  223. package/internal/MobilePopup/MobilePopupFooter/index/index.js.map +1 -0
  224. package/internal/MobilePopup/MobilePopupFooter/index/package.json +6 -0
  225. package/internal/MobilePopup/MobilePopupFooter/index.d.ts +1 -0
  226. package/internal/MobilePopup/MobilePopupFooter/package.json +6 -0
  227. package/internal/NativeDateInput/utils/utils.js +2 -1
  228. package/internal/NativeDateInput/utils/utils.js.map +1 -1
  229. package/internal/ThemePlayground/ThemeContextPlayground/ThemeContextPlayground.js +8 -5
  230. package/internal/ThemePlayground/ThemeContextPlayground/ThemeContextPlayground.js.map +1 -1
  231. package/internal/ThemePlayground/constants/constants.js +3 -0
  232. package/internal/ThemePlayground/constants/constants.js.map +1 -1
  233. package/internal/ThemeShowcase/VariablesCollector.d.ts +1 -1
  234. package/internal/themes/DarkTheme/DarkTheme.js +2 -0
  235. package/internal/themes/DarkTheme/DarkTheme.js.map +1 -1
  236. package/internal/themes/DarkTheme.d.ts +2 -0
  237. package/internal/themes/DefaultTheme/DefaultTheme.js +32 -1
  238. package/internal/themes/DefaultTheme/DefaultTheme.js.map +1 -1
  239. package/internal/themes/DefaultTheme.d.ts +18 -0
  240. package/lib/date/InternalDate/InternalDate.js +7 -1
  241. package/lib/date/InternalDate/InternalDate.js.map +1 -1
  242. package/lib/date/InternalDate.d.ts +2 -0
  243. package/lib/date/InternalDateTransformer/InternalDateTransformer.js +30 -0
  244. package/lib/date/InternalDateTransformer/InternalDateTransformer.js.map +1 -1
  245. package/lib/date/InternalDateTransformer.d.ts +3 -0
  246. package/lib/date/InternalDateValidator/InternalDateValidator.js +6 -1
  247. package/lib/date/InternalDateValidator/InternalDateValidator.js.map +1 -1
  248. package/lib/date/comparison/comparison.js +45 -0
  249. package/lib/date/comparison/comparison.js.map +1 -0
  250. package/lib/date/comparison/package.json +6 -0
  251. package/lib/date/comparison.d.ts +6 -0
  252. package/lib/locale/constants/constants.js +4 -1
  253. package/lib/locale/constants/constants.js.map +1 -1
  254. package/lib/locale/constants.d.ts +3 -0
  255. package/lib/theming/ThemeContext.md +3 -1
  256. package/lib/theming/themes/Theme2022DarkUpdate2024/Theme2022DarkUpdate2024.js +33 -0
  257. package/lib/theming/themes/Theme2022DarkUpdate2024/Theme2022DarkUpdate2024.js.map +1 -0
  258. package/lib/theming/themes/Theme2022DarkUpdate2024/package.json +6 -0
  259. package/lib/theming/themes/Theme2022DarkUpdate2024.d.ts +30 -0
  260. package/lib/theming/themes/Theme2022Update2024/Theme2022Update2024.js +50 -0
  261. package/lib/theming/themes/Theme2022Update2024/Theme2022Update2024.js.map +1 -0
  262. package/lib/theming/themes/Theme2022Update2024/package.json +6 -0
  263. package/lib/theming/themes/Theme2022Update2024.d.ts +46 -0
  264. package/package.json +2 -2
@@ -0,0 +1,118 @@
1
+ "use strict";var _interopRequireWildcard = require("@babel/runtime/helpers/interopRequireWildcard").default;exports.__esModule = true;exports.MobilePickerDataTids = exports.MobilePicker = void 0;var _react = _interopRequireWildcard(require("react"));
2
+
3
+ var _Calendar = require("../Calendar");
4
+ var CalendarUtils = _interopRequireWildcard(require("../Calendar/CalendarUtils"));
5
+ var _ThemeContext = require("../../lib/theming/ThemeContext");
6
+ var _MobilePopup = require("../../internal/MobilePopup");
7
+ var _DateInput = require("../DateInput");
8
+ var _Button = require("../Button");
9
+ var _useLocaleForControl = require("../../lib/locale/useLocaleForControl");
10
+ var _useEffectWithoutInitCall = require("../../hooks/useEffectWithoutInitCall");
11
+
12
+
13
+ var _locale = require("./locale");
14
+ var _MobilePicker = require("./MobilePicker.styles");
15
+ var _getMobilePickerTheme = require("./getMobilePickerTheme");
16
+
17
+ var MobilePickerDataTids = {
18
+ input: 'MobilePicker__input',
19
+ today: 'MobilePicker__today' };exports.MobilePickerDataTids = MobilePickerDataTids;
20
+
21
+
22
+
23
+
24
+
25
+
26
+
27
+
28
+
29
+
30
+
31
+
32
+
33
+
34
+
35
+
36
+
37
+
38
+
39
+ var MobilePicker = function MobilePicker(props) {
40
+ var locale = (0, _useLocaleForControl.useLocaleForControl)('DatePicker', _locale.DatePickerLocaleHelper);
41
+
42
+ var theme = (0, _getMobilePickerTheme.getMobilePickerTheme)((0, _react.useContext)(_ThemeContext.ThemeContext));
43
+
44
+ var onValueChange = function onValueChange(date) {
45
+ if (props.onValueChange) {
46
+ props.onValueChange(date);
47
+ }
48
+ if (props.onCloseRequest) {
49
+ props.onCloseRequest();
50
+ }
51
+ };
52
+
53
+ var inputRef = (0, _react.useRef)(null);
54
+ (0, _react.useLayoutEffect)(function () {
55
+ if (inputRef.current) {
56
+ inputRef.current.focus();
57
+ }
58
+ }, []);
59
+
60
+ var calendarRef = (0, _react.useRef)(null);
61
+ var _useState = (0, _react.useState)(function () {return CalendarUtils.getTodayDate();}),today = _useState[0];
62
+ var onTodayClick = function onTodayClick() {
63
+ if (calendarRef.current) {
64
+ calendarRef.current.scrollToMonth(today.month, today.year);
65
+ }
66
+ };
67
+
68
+ (0, _useEffectWithoutInitCall.useEffectWithoutInitCall)(function () {
69
+ if (props.value && calendarRef.current) {
70
+ var month = +props.value.substring(3, 5);
71
+ var year = +props.value.substring(6);
72
+ calendarRef.current.scrollToMonth(month, year);
73
+ }
74
+ }, [props.value]);
75
+
76
+ return /*#__PURE__*/(
77
+ _react.default.createElement(_ThemeContext.ThemeContext.Provider, { value: theme }, /*#__PURE__*/
78
+ _react.default.createElement(_MobilePopup.MobilePopup, {
79
+ opened: true,
80
+ headerChildComponent: /*#__PURE__*/
81
+ _react.default.createElement(_DateInput.DateInput, {
82
+ value: props.value || '',
83
+ width: "100%",
84
+ withIcon: true,
85
+ ref: inputRef,
86
+ minDate: props.minDate,
87
+ maxDate: props.maxDate,
88
+ onValueChange: props.onValueChange,
89
+ size: "medium",
90
+ warning: props.warning,
91
+ error: props.error,
92
+ "data-tid": MobilePickerDataTids.input }),
93
+
94
+
95
+ footerChildComponent:
96
+ props.enableTodayLink && /*#__PURE__*/
97
+ _react.default.createElement(_Button.Button, { size: "medium", onClick: onTodayClick, "data-tid": MobilePickerDataTids.today },
98
+ locale.today),
99
+
100
+
101
+
102
+ onCloseRequest: props.onCloseRequest }, /*#__PURE__*/
103
+
104
+ _react.default.createElement(_Calendar.Calendar, {
105
+ ref: calendarRef,
106
+ value: props.value,
107
+ className: _MobilePicker.styles.calendarRoot(),
108
+ minDate: props.minDate,
109
+ maxDate: props.maxDate,
110
+ onValueChange: onValueChange,
111
+ isHoliday: props.isHoliday,
112
+ renderDay: props.renderDay,
113
+ onMonthChange: props.onMonthChange }))));
114
+
115
+
116
+
117
+
118
+ };exports.MobilePicker = MobilePicker;
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["MobilePicker.tsx"],"names":["MobilePickerDataTids","input","today","MobilePicker","props","locale","DatePickerLocaleHelper","theme","ThemeContext","onValueChange","date","onCloseRequest","inputRef","current","focus","calendarRef","CalendarUtils","getTodayDate","onTodayClick","scrollToMonth","month","year","value","substring","minDate","maxDate","warning","error","enableTodayLink","styles","calendarRoot","isHoliday","renderDay","onMonthChange"],"mappings":"mMAAA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;;AAEO,IAAMA,oBAAoB,GAAG;AAClCC,EAAAA,KAA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KE,MAAA,OAAO,EAAEpB,KAAK,CAACqB,OALjB;AAME,MAAA,aAAa,EAAEhB,aANjB;AAOE,MAAA,SAAS,EAAEL,KAAK,CAAC2B,SAPnB;AAQE,MAAA,SAAS,EAAE3B,KAAK,CAAC4B,SARnB;AASE,MAAA,aAAa,EAAE5B,KAAK,CAAC6B,aATvB,GA1BF,CADF,CADF;;;;;AA0CD,CA/EM,C","sourcesContent":["import React, { useContext, useLayoutEffect, useRef, useState } from 'react';\n\nimport { Calendar } from '../Calendar';\nimport * as CalendarUtils from '../Calendar/CalendarUtils';\nimport { ThemeContext } from '../../lib/theming/ThemeContext';\nimport { MobilePopup } from '../../internal/MobilePopup';\nimport { DateInput } from '../DateInput';\nimport { Button } from '../Button';\nimport { useLocaleForControl } from '../../lib/locale/useLocaleForControl';\nimport { useEffectWithoutInitCall } from '../../hooks/useEffectWithoutInitCall';\n\nimport { DatePickerProps } from './DatePicker';\nimport { DatePickerLocaleHelper } from './locale';\nimport { styles } from './MobilePicker.styles';\nimport { getMobilePickerTheme } from './getMobilePickerTheme';\n\nexport const MobilePickerDataTids = {\n input: 'MobilePicker__input',\n today: 'MobilePicker__today',\n} as const;\n\nexport interface MobilePickerProps\n extends Pick<\n DatePickerProps,\n | 'error'\n | 'warning'\n | 'value'\n | 'minDate'\n | 'maxDate'\n | 'onValueChange'\n | 'isHoliday'\n | 'enableTodayLink'\n | 'renderDay'\n | 'onMonthChange'\n > {\n onCloseRequest?: () => void;\n}\n\nexport const MobilePicker: React.FC<MobilePickerProps> = (props) => {\n const locale = useLocaleForControl('DatePicker', DatePickerLocaleHelper);\n\n const theme = getMobilePickerTheme(useContext(ThemeContext));\n\n const onValueChange = (date: string) => {\n if (props.onValueChange) {\n props.onValueChange(date);\n }\n if (props.onCloseRequest) {\n props.onCloseRequest();\n }\n };\n\n const inputRef = useRef<DateInput>(null);\n useLayoutEffect(() => {\n if (inputRef.current) {\n inputRef.current.focus();\n }\n }, []);\n\n const calendarRef = useRef<Calendar>(null);\n const [today] = useState(() => CalendarUtils.getTodayDate());\n const onTodayClick = () => {\n if (calendarRef.current) {\n calendarRef.current.scrollToMonth(today.month, today.year);\n }\n };\n\n useEffectWithoutInitCall(() => {\n if (props.value && calendarRef.current) {\n const month = +props.value.substring(3, 5);\n const year = +props.value.substring(6);\n calendarRef.current.scrollToMonth(month, year);\n }\n }, [props.value]);\n\n return (\n <ThemeContext.Provider value={theme}>\n <MobilePopup\n opened\n headerChildComponent={\n <DateInput\n value={props.value || ''}\n width=\"100%\"\n withIcon\n ref={inputRef}\n minDate={props.minDate}\n maxDate={props.maxDate}\n onValueChange={props.onValueChange}\n size=\"medium\"\n warning={props.warning}\n error={props.error}\n data-tid={MobilePickerDataTids.input}\n />\n }\n footerChildComponent={\n props.enableTodayLink && (\n <Button size=\"medium\" onClick={onTodayClick} data-tid={MobilePickerDataTids.today}>\n {locale.today}\n </Button>\n )\n }\n onCloseRequest={props.onCloseRequest}\n >\n <Calendar\n ref={calendarRef}\n value={props.value}\n className={styles.calendarRoot()}\n minDate={props.minDate}\n maxDate={props.maxDate}\n onValueChange={onValueChange}\n isHoliday={props.isHoliday}\n renderDay={props.renderDay}\n onMonthChange={props.onMonthChange}\n />\n </MobilePopup>\n </ThemeContext.Provider>\n );\n};\n"]}
@@ -0,0 +1,3 @@
1
+ export declare const styles: {
2
+ calendarRoot(): string;
3
+ };
@@ -0,0 +1,8 @@
1
+ "use strict";var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;exports.__esModule = true;exports.styles = void 0;var _taggedTemplateLiteralLoose2 = _interopRequireDefault(require("@babel/runtime/helpers/taggedTemplateLiteralLoose"));var _Emotion = require("../../lib/theming/Emotion");var _templateObject;
2
+
3
+ var styles = (0, _Emotion.memoizeStyle)({
4
+ calendarRoot: function calendarRoot() {
5
+ return (0, _Emotion.css)(_templateObject || (_templateObject = (0, _taggedTemplateLiteralLoose2.default)(["\n width: auto;\n "])));
6
+
7
+
8
+ } });exports.styles = styles;
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["MobilePicker.styles.ts"],"names":["styles","calendarRoot","css"],"mappings":"oRAAA,oD;;AAEO,IAAMA,MAAM,GAAG,2BAAa;AACjCC,EAAAA,YADiC,0BAClB;AACb,eAAOC,YAAP;;;AAGD,GALgC,EAAb,CAAf,C","sourcesContent":["import { css, memoizeStyle } from '../../lib/theming/Emotion';\n\nexport const styles = memoizeStyle({\n calendarRoot() {\n return css`\n width: auto;\n `;\n },\n});\n"]}
@@ -0,0 +1,2 @@
1
+ import { Theme } from '../../lib/theming/Theme';
2
+ export declare const getMobilePickerTheme: (theme: Theme) => Theme;
@@ -0,0 +1,19 @@
1
+ "use strict";exports.__esModule = true;exports.getMobilePickerTheme = void 0;var _ThemeFactory = require("../../lib/theming/ThemeFactory");
2
+
3
+
4
+ var getMobilePickerTheme = function getMobilePickerTheme(theme) {
5
+ return _ThemeFactory.ThemeFactory.create(
6
+ {
7
+ calendarPaddingX: theme.mobileCalendarPaddingX,
8
+ calendarCellWidth: theme.mobileCalendarCellWidth,
9
+ calendarCellHeight: theme.mobileCalendarCellHeight,
10
+ calendarCellBorderRadius: theme.mobileCalendarCellBorderRadius,
11
+ calendarCellFontSize: theme.mobileCalendarCellFontSize,
12
+ calendarGridRowSpacing: theme.mobileCalendarGridRowSpacing,
13
+ dateSelectFontSize: theme.mobileDateSelectFontSize,
14
+ dateSelectLineHeight: theme.mobileDateSelectLineHeight,
15
+ calendarWrapperHeight: theme.mobileCalendarWrapperHeight },
16
+
17
+ theme);
18
+
19
+ };exports.getMobilePickerTheme = getMobilePickerTheme;
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["getMobilePickerTheme.ts"],"names":["getMobilePickerTheme","theme","ThemeFactory","create","calendarPaddingX","mobileCalendarPaddingX","calendarCellWidth","mobileCalendarCellWidth","calendarCellHeight","mobileCalendarCellHeight","calendarCellBorderRadius","mobileCalendarCellBorderRadius","calendarCellFontSize","mobileCalendarCellFontSize","calendarGridRowSpacing","mobileCalendarGridRowSpacing","dateSelectFontSize","mobileDateSelectFontSize","dateSelectLineHeight","mobileDateSelectLineHeight","calendarWrapperHeight","mobileCalendarWrapperHeight"],"mappings":"6EAAA;;;AAGO,IAAMA,oBAAoB,GAAG,SAAvBA,oBAAuB,CAACC,KAAD,EAAyB;AAC3D,SAAOC,2BAAaC,MAAb;AACL;AACEC,IAAAA,gBAAgB,EAAEH,KAAK,CAACI,sBAD1B;AAEEC,IAAAA,iBAAiB,EAAEL,KAAK,CAACM,uBAF3B;AAGEC,IAAAA,kBAAkB,EAAEP,KAAK,CAACQ,wBAH5B;AAIEC,IAAAA,wBAAwB,EAAET,KAAK,CAACU,8BAJlC;AAKEC,IAAAA,oBAAoB,EAAEX,KAAK,CAACY,0BAL9B;AAMEC,IAAAA,sBAAsB,EAAEb,KAAK,CAACc,4BANhC;AAOEC,IAAAA,kBAAkB,EAAEf,KAAK,CAACgB,wBAP5B;AAQEC,IAAAA,oBAAoB,EAAEjB,KAAK,CAACkB,0BAR9B;AASEC,IAAAA,qBAAqB,EAAEnB,KAAK,CAACoB,2BAT/B,EADK;;AAYLpB,EAAAA,KAZK,CAAP;;AAcD,CAfM,C","sourcesContent":["import { ThemeFactory } from '../../lib/theming/ThemeFactory';\nimport { Theme } from '../../lib/theming/Theme';\n\nexport const getMobilePickerTheme = (theme: Theme): Theme => {\n return ThemeFactory.create(\n {\n calendarPaddingX: theme.mobileCalendarPaddingX,\n calendarCellWidth: theme.mobileCalendarCellWidth,\n calendarCellHeight: theme.mobileCalendarCellHeight,\n calendarCellBorderRadius: theme.mobileCalendarCellBorderRadius,\n calendarCellFontSize: theme.mobileCalendarCellFontSize,\n calendarGridRowSpacing: theme.mobileCalendarGridRowSpacing,\n dateSelectFontSize: theme.mobileDateSelectFontSize,\n dateSelectLineHeight: theme.mobileDateSelectLineHeight,\n calendarWrapperHeight: theme.mobileCalendarWrapperHeight,\n },\n theme,\n );\n};\n"]}
@@ -713,7 +713,7 @@ Input = (0, _rootNode.rootNode)(_class = (_temp = _class2 = /*#__PURE__*/functio
713
713
  * @param {number} end
714
714
  */;_proto.setSelectionRange = function setSelectionRange(start, end) {var _globalObject$documen,_this$props$value,_this3 = this; // https://github.com/facebook/react/issues/7769
715
715
  // https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/setSelectionRange
716
- if (!selectionAllowedTypes.includes(this.getProps().type)) {(0, _warning.default)(false, selectionErrorMessage(this.getProps().type));return;}if (!this.input) {throw new Error('Cannot call "setSelectionRange" on unmounted Input');}if (((_globalObject$documen = _globalObject.globalObject.document) == null ? void 0 : _globalObject$documen.activeElement) !== this.input) {this.focus();}if (this.props.mask && this.props.value && ((_this$props$value = this.props.value) == null ? void 0 : _this$props$value.length) < this.props.mask.length) {_globalObject.globalObject.setTimeout(function () {var _this3$input;(_this3$input = _this3.input) == null ? void 0 : _this3$input.setSelectionRange(start, end);}, 150);} else {var _this$input;(_this$input = this.input) == null ? void 0 : _this$input.setSelectionRange(start, end);}};_proto.render = function render() {var _this4 = this;return /*#__PURE__*/_react.default.createElement(_ThemeContext.ThemeContext.Consumer, null, function (theme) {_this4.theme = theme;return /*#__PURE__*/_react.default.createElement(_CommonWrapper.CommonWrapper, (0, _extends2.default)({ rootNodeRef: _this4.setRootNode }, _this4.props), _this4.renderMain);});};_proto.renderMaskedInput = function renderMaskedInput(inputProps, mask) {return /*#__PURE__*/_react.default.createElement(_InternalMaskedInput.InternalMaskedInput, (0, _extends2.default)({}, inputProps, { mask: mask, maskChar: this.props.maskChar, alwaysShowMask: this.props.alwaysShowMask, formatChars: this.props.formatChars, onChange: this.props.onChange, onValueChange: this.handleMaskedValueChange, onUnexpectedInput: this.handleUnexpectedInput }));};_proto.getIconSizeClassname = function getIconSizeClassname(right) {if (right === void 0) {right = false;}switch (this.getProps().size) {case 'large':return right ? _Input.styles.rightIconLarge(this.theme) : _Input.styles.leftIconLarge(this.theme);case 'medium':return right ? _Input.styles.rightIconMedium(this.theme) : _Input.styles.leftIconMedium(this.theme);case 'small':default:return right ? _Input.styles.rightIconSmall(this.theme) : _Input.styles.leftIconSmall(this.theme);}};_proto.renderLeftIcon = function renderLeftIcon() {return this.renderIcon(this.props.leftIcon, this.getIconSizeClassname());};_proto.renderRightIcon = function renderRightIcon() {return this.renderIcon(this.props.rightIcon, this.getIconSizeClassname(true));};_proto.renderIcon = function renderIcon(icon, sizeClassName) {var _cx5;if (!icon) {return null;}var disabled = this.props.disabled;var iconNode = (0, _utils.isFunction)(icon) ? icon() : icon;return /*#__PURE__*/_react.default.createElement("span", { className: (0, _Emotion.cx)(_Input.styles.icon(), sizeClassName, _Input.styles.useDefaultColor(this.theme), (_cx5 = {}, _cx5[_Input.styles.iconFocus(this.theme)] = this.state.focused, _cx5[_Input.styles.iconDisabled()] = disabled, _cx5)) }, iconNode);};_proto.renderPlaceholder = function renderPlaceholder() {var disabled = this.props.disabled;var focused = this.state.focused;var placeholder = null;if (this.state.needsPolyfillPlaceholder && this.props.placeholder && !this.isMaskVisible && !this.props.value && !this.props.defaultValue) {var _cx6;placeholder = /*#__PURE__*/_react.default.createElement("div", { className: (0, _Emotion.cx)(_Input.styles.placeholder(this.theme), (_cx6 = {}, _cx6[_Input.styles.placeholderDisabled(this.theme)] = disabled, _cx6[_Input.styles.placeholderFocus(this.theme)] = focused, _cx6)), style: { textAlign: this.props.align || 'inherit' } }, this.props.placeholder);}return placeholder;};_proto.getSizeClassName = function getSizeClassName() {var _cx7, _cx8, _cx9;switch (this.getProps().size) {case 'large':return (0, _Emotion.cx)((_cx7 = {}, _cx7[_Input.styles.sizeLarge(this.theme)] = true, _cx7[_Input.styles.sizeLargeFallback(this.theme)] = _client.isIE11 || _client.isEdge, _cx7));case 'medium':return (0, _Emotion.cx)((_cx8 = {}, _cx8[_Input.styles.sizeMedium(this.theme)] = true, _cx8[_Input.styles.sizeMediumFallback(this.theme)] = _client.isIE11 || _client.isEdge, _cx8));case 'small':default:return (0, _Emotion.cx)((_cx9 = {}, _cx9[_Input.styles.sizeSmall(this.theme)] = true, _cx9[_Input.styles.sizeSmallFallback(this.theme)] = _client.isIE11 || _client.isEdge, _cx9));}};(0, _createClass2.default)(Input, [{ key: "isMaskVisible", get: function get() {var _this$props3 = this.props,mask = _this$props3.mask,alwaysShowMask = _this$props3.alwaysShowMask;var focused = this.state.focused;return Boolean(mask && (focused || alwaysShowMask));} }, { key: "canBeUsedWithMask", get: function get() {return maskForbiddenTypes.includes(this.getProps().type);} /**
716
+ if (!selectionAllowedTypes.includes(this.getProps().type)) {(0, _warning.default)(false, selectionErrorMessage(this.getProps().type));return;}if (!this.input) {throw new Error('Cannot call "setSelectionRange" on unmounted Input');}if (((_globalObject$documen = _globalObject.globalObject.document) == null ? void 0 : _globalObject$documen.activeElement) !== this.input) {this.focus();}if (this.props.mask && this.props.value && ((_this$props$value = this.props.value) == null ? void 0 : _this$props$value.length) < this.props.mask.length) {_globalObject.globalObject.setTimeout(function () {var _this3$input;(_this3$input = _this3.input) == null ? void 0 : _this3$input.setSelectionRange(start, end);}, 150);} else {var _this$input;(_this$input = this.input) == null ? void 0 : _this$input.setSelectionRange(start, end);}};_proto.render = function render() {var _this4 = this;return /*#__PURE__*/_react.default.createElement(_ThemeContext.ThemeContext.Consumer, null, function (theme) {_this4.theme = theme;return /*#__PURE__*/_react.default.createElement(_CommonWrapper.CommonWrapper, (0, _extends2.default)({ rootNodeRef: _this4.setRootNode }, _this4.props), _this4.renderMain);});};_proto.renderMaskedInput = function renderMaskedInput(inputProps, mask) {return /*#__PURE__*/_react.default.createElement(_InternalMaskedInput.InternalMaskedInput, (0, _extends2.default)({}, inputProps, { mask: mask, maskChar: this.props.maskChar, alwaysShowMask: this.props.alwaysShowMask, formatChars: this.props.formatChars, onChange: this.props.onChange, onValueChange: this.handleMaskedValueChange, onUnexpectedInput: this.handleUnexpectedInput }));};_proto.getIconSizeClassname = function getIconSizeClassname(right) {if (right === void 0) {right = false;}switch (this.getProps().size) {case 'large':return right ? _Input.styles.rightIconLarge(this.theme) : _Input.styles.leftIconLarge(this.theme);case 'medium':return right ? _Input.styles.rightIconMedium(this.theme) : _Input.styles.leftIconMedium(this.theme);case 'small':default:return right ? _Input.styles.rightIconSmall(this.theme) : _Input.styles.leftIconSmall(this.theme);}};_proto.renderLeftIcon = function renderLeftIcon() {return this.renderIcon(this.props.leftIcon, this.getIconSizeClassname());};_proto.renderRightIcon = function renderRightIcon() {return this.renderIcon(this.props.rightIcon, this.getIconSizeClassname(true));};_proto.renderIcon = function renderIcon(icon, sizeClassName) {var _cx5;if (!icon) {return null;}var disabled = this.props.disabled;var iconNode = (0, _utils.isFunction)(icon) ? icon() : icon;return /*#__PURE__*/_react.default.createElement("span", { className: (0, _Emotion.cx)(_Input.styles.icon(), sizeClassName, _Input.styles.useDefaultColor(this.theme), (_cx5 = {}, _cx5[_Input.styles.iconFocus(this.theme)] = this.state.focused, _cx5[_Input.styles.iconDisabled(this.theme)] = disabled, _cx5)) }, iconNode);};_proto.renderPlaceholder = function renderPlaceholder() {var disabled = this.props.disabled;var focused = this.state.focused;var placeholder = null;if (this.state.needsPolyfillPlaceholder && this.props.placeholder && !this.isMaskVisible && !this.props.value && !this.props.defaultValue) {var _cx6;placeholder = /*#__PURE__*/_react.default.createElement("div", { className: (0, _Emotion.cx)(_Input.styles.placeholder(this.theme), (_cx6 = {}, _cx6[_Input.styles.placeholderDisabled(this.theme)] = disabled, _cx6[_Input.styles.placeholderFocus(this.theme)] = focused, _cx6)), style: { textAlign: this.props.align || 'inherit' } }, this.props.placeholder);}return placeholder;};_proto.getSizeClassName = function getSizeClassName() {var _cx7, _cx8, _cx9;switch (this.getProps().size) {case 'large':return (0, _Emotion.cx)((_cx7 = {}, _cx7[_Input.styles.sizeLarge(this.theme)] = true, _cx7[_Input.styles.sizeLargeFallback(this.theme)] = _client.isIE11 || _client.isEdge, _cx7));case 'medium':return (0, _Emotion.cx)((_cx8 = {}, _cx8[_Input.styles.sizeMedium(this.theme)] = true, _cx8[_Input.styles.sizeMediumFallback(this.theme)] = _client.isIE11 || _client.isEdge, _cx8));case 'small':default:return (0, _Emotion.cx)((_cx9 = {}, _cx9[_Input.styles.sizeSmall(this.theme)] = true, _cx9[_Input.styles.sizeSmallFallback(this.theme)] = _client.isIE11 || _client.isEdge, _cx9));}};(0, _createClass2.default)(Input, [{ key: "isMaskVisible", get: function get() {var _this$props3 = this.props,mask = _this$props3.mask,alwaysShowMask = _this$props3.alwaysShowMask;var focused = this.state.focused;return Boolean(mask && (focused || alwaysShowMask));} }, { key: "canBeUsedWithMask", get: function get() {return maskForbiddenTypes.includes(this.getProps().type);} /**
717
717
  * Работает с типами `text`, `password`, `tel`, `search`, `url`
718
718
  * [Документация](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/setSelectionRange)
719
719
  * @public
@@ -1 +1 @@
1
- {"version":3,"sources":["Input.tsx"],"names":["inputTypes","selectionAllowedTypes","selectionErrorMessage","type","allowedTypes","map","i","join","maskForbiddenTypes","maskAllowedTypes","filter","includes","maskErrorMessage","InputDataTids","root","Input","rootNode","getProps","defaultProps","state","needsPolyfillPlaceholder","blinking","focused","selectAllId","input","selectAll","setSelectionRange","value","length","delaySelectAll","globalObject","requestAnimationFrame","cancelDelayedSelectAll","cancelAnimationFrame","cancelBlink","callback","blinkTimeout","clearTimeout","setState","getInput","inputProps","props","element","React","cloneElement","mask","canBeUsedWithMask","renderMaskedInput","createElement","renderMain","onMouseEnter","onMouseLeave","onMouseOver","onKeyDown","onKeyPress","onValueChange","width","error","role","warning","leftIcon","rightIcon","borderless","align","maskChar","alwaysShowMask","size","placeholder","selectAllOnFocus","disabled","onUnexpectedInput","prefix","suffix","formatChars","corners","ariaDescribedby","ariaControls","ariaLabel","rest","labelProps","className","styles","theme","getSizeClassName","focus","hovering","blink","focusFallback","isIE11","isEdge","warningFallback","errorFallback","style","inputFocus","inputDisabled","onChange","handleChange","onFocus","handleFocus","handleKeyDown","handleKeyPress","onBlur","handleBlur","textAlign","ref","refInput","isMaskVisible","undefined","resetFocus","Boolean","defaultValue","sideContainer","renderLeftIcon","renderPrefix","wrapper","renderPlaceholder","rightContainer","renderSuffix","renderRightIcon","InternalMaskedInput","event","fieldIsEmpty","target","e","isDeleteKey","isKeyBackspace","isKeyDelete","currentTarget","repeat","handleUnexpectedInput","maxLength","handleMaskedValueChange","prefixDisabled","suffixDisabled","outputMaskError","componentDidMount","componentDidUpdate","prevProps","componentWillUnmount","blur","getNode","offsetWidth","setTimeout","start","end","Error","document","activeElement","render","setRootNode","getIconSizeClassname","right","rightIconLarge","leftIconLarge","rightIconMedium","leftIconMedium","rightIconSmall","leftIconSmall","renderIcon","icon","sizeClassName","iconNode","useDefaultColor","iconFocus","iconDisabled","placeholderDisabled","placeholderFocus","sizeLarge","sizeLargeFallback","sizeMedium","sizeMediumFallback","sizeSmall","sizeSmallFallback","Component","__KONTUR_REACT_UI__","displayName"],"mappings":";;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;AAGA;AACA;AACA,wE;;AAEO,IAAMA,UAAU,GAAG,CAAC,UAAD,EAAa,MAAb,EAAqB,QAArB,EAA+B,KAA/B,EAAsC,QAAtC,EAAgD,MAAhD,EAAwD,MAAxD,EAAgE,KAAhE,EAAuE,OAAvE,CAAnB;;AAEP;AACA;AACA,G;;;;;;AAMO,IAAMC,qBAAkC,GAAG,CAAC,MAAD,EAAS,UAAT,EAAqB,KAArB,EAA4B,QAA5B,EAAsC,KAAtC,CAA3C,C;AACA,IAAMC,qBAAqB,GAAG,SAAxBA,qBAAwB,CAACC,IAAD,EAAkBC,YAAlB,EAAwE,KAAtDA,YAAsD,cAAtDA,YAAsD,GAA1BH,qBAA0B;AAC3G,kEAA6DE,IAA7D,0CAAqGC,YAAY;AAC9GC,EAAAA,GADkG,CAC9F,UAACC,CAAD,iBAAWA,CAAX,SAD8F;AAElGC,EAAAA,IAFkG,CAE7F,IAF6F,CAArG;AAGD,CAJM,C;;AAMA,I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EmCM,kBAAUC,cAF7C,QAAP,CAIF,KAAK,QAAL,CACE,OAAO,kCACJR,cAAOwF,UAAP,CAAkB,KAAKvF,KAAvB,CADI,IAC4B,IAD5B,OAEJD,cAAOyF,kBAAP,CAA0B,KAAKxF,KAA/B,CAFI,IAEoCM,kBAAUC,cAF9C,QAAP,CAIF,KAAK,OAAL,CACA,QACE,OAAO,kCACJR,cAAO0F,SAAP,CAAiB,KAAKzF,KAAtB,CADI,IAC2B,IAD3B,OAEJD,cAAO2F,iBAAP,CAAyB,KAAK1F,KAA9B,CAFI,IAEmCM,kBAAUC,cAF7C,QAAP,CAbJ,CAkBD,C,iEA3SD,eAAoC,CAClC,mBAAiC,KAAKhD,KAAtC,CAAQI,IAAR,gBAAQA,IAAR,CAAcoB,cAAd,gBAAcA,cAAd,CACA,IAAQ3C,OAAR,GAAoB,KAAKH,KAAzB,CAAQG,OAAR,CACA,OAAOuF,OAAO,CAAChE,IAAI,KAAKvB,OAAO,IAAI2C,cAAhB,CAAL,CAAd,CACD,C,qCAiBD,eAAgC,CAC9B,OAAOzD,kBAAkB,CAACG,QAAnB,CAA4B,KAAKM,QAAL,GAAgBd,IAA5C,CAAP,CACD,C,CAED;AACF;AACA;AACA;AACA,O,oBAhJ2BwC,eAAMkI,S,WACjBC,mB,GAAsB,O,UACtBC,W,GAAc,O,UAEd7J,Y,GAA6B,EACzCgD,IAAI,EAAE,OADmC,EAEzC/D,IAAI,EAAE,MAFmC,E","sourcesContent":["// TODO: Enable this rule in functional components.\n/* eslint-disable @typescript-eslint/no-unused-vars */\nimport invariant from 'invariant';\nimport React, { AriaAttributes, ClassAttributes, HTMLAttributes, ReactElement } from 'react';\nimport warning from 'warning';\nimport { globalObject, SafeTimer } from '@skbkontur/global-object';\n\nimport { isEdge, isIE11 } from '../../lib/client';\nimport { isKeyBackspace, isKeyDelete, someKeys } from '../../lib/events/keyboard/identifiers';\nimport { needsPolyfillPlaceholder } from '../../lib/needsPolyfillPlaceholder';\nimport { Nullable, Override } from '../../typings/utility-types';\nimport { InternalMaskedInput } from '../../internal/InternalMaskedInput';\nimport { ThemeContext } from '../../lib/theming/ThemeContext';\nimport { Theme } from '../../lib/theming/Theme';\nimport { CommonProps, CommonWrapper, CommonWrapperRestProps } from '../../internal/CommonWrapper';\nimport { cx } from '../../lib/theming/Emotion';\nimport { rootNode, TSetRootNode } from '../../lib/rootNode';\nimport { createPropsGetter } from '../../lib/createPropsGetter';\nimport { isTheme2022 } from '../../lib/theming/ThemeHelpers';\nimport { isFunction } from '../../lib/utils';\nimport { SizeProp } from '../../lib/types/props';\nimport { FocusControlWrapper } from '../../internal/FocusControlWrapper';\n\nimport { InputElement, InputElementProps } from './Input.typings';\nimport { styles } from './Input.styles';\nimport { InputLayout } from './InputLayout/InputLayout';\nimport { PolyfillPlaceholder } from './InputLayout/PolyfillPlaceholder';\n\nexport const inputTypes = ['password', 'text', 'number', 'tel', 'search', 'time', 'date', 'url', 'email'] as const;\n\n/**\n * @deprecated use SizeProp\n */\nexport type InputSize = SizeProp;\nexport type InputAlign = 'left' | 'center' | 'right';\nexport type InputType = typeof inputTypes[number];\nexport type InputIconType = React.ReactNode | (() => React.ReactNode);\n\nexport const selectionAllowedTypes: InputType[] = ['text', 'password', 'tel', 'search', 'url'];\nexport const selectionErrorMessage = (type: InputType, allowedTypes: InputType[] = selectionAllowedTypes) => {\n return `<Input />. Selection is not supported by the type \"${type}\". Types that support selection: ${allowedTypes\n .map((i) => `\"${i}\"`)\n .join(', ')}. Reason: https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/setSelectionRange.`;\n};\n\nexport const maskForbiddenTypes: InputType[] = ['number', 'date', 'time'];\nexport const maskAllowedTypes: InputType[] = inputTypes.filter((type) => {\n return !maskForbiddenTypes.includes(type);\n});\nexport const maskErrorMessage = (type: InputType, allowedTypes: InputType[] = maskAllowedTypes) => {\n return `<Input />. Prop \"mask\" does not support type \"${type}\". Supported types: ${allowedTypes\n .map((i) => `\"${i}\"`)\n .join(', ')}.`;\n};\n\nexport interface InputProps\n extends CommonProps,\n Pick<HTMLAttributes<unknown>, 'role'>,\n Pick<AriaAttributes, 'aria-describedby' | 'aria-controls' | 'aria-label'>,\n Override<\n React.InputHTMLAttributes<HTMLInputElement>,\n {\n /**\n * Иконка слева\n * Если `ReactNode` применяются дефолтные стили для иконки\n * Если `() => ReactNode` применяются только стили для позиционирование\n */\n leftIcon?: InputIconType;\n /**\n * Иконка справа\n * Если `ReactNode` применяются дефолтные стили для иконки\n * Если `() => ReactNode` применяются только стили для позиционирование\n */\n rightIcon?: InputIconType;\n /**\n * Состояние валидации при ошибке.\n */\n error?: boolean;\n /**\n * Состояние валидации при предупреждении.\n */\n warning?: boolean;\n /** Режим прозрачной рамки */\n borderless?: boolean;\n /** Выравнивание текста */\n align?: InputAlign;\n /**\n * Паттерн маски. Доступен для типов `text`, `password`, `email`, `tel`, `search`, `url`\n * @deprecated Со следующей мажорной версии Input перестанет поддерживать маску. Используйте MaskedInput\n */\n mask?: Nullable<string>;\n /**\n * Символ маски\n * @deprecated Со следующей мажорной версии Input перестанет поддерживать маску. Используйте MaskedInput\n */\n maskChar?: Nullable<string>;\n /**\n * Словарь символов-регулярок для задания маски\n * @deprecated Со следующей мажорной версии Input перестанет поддерживать маску. Используйте MaskedInput\n * @default { '9': '[0-9]', 'a': '[A-Za-z]', '*': '[A-Za-z0-9]' }\n */\n formatChars?: Record<string, string>;\n /**\n * Показывать символы маски\n * @deprecated Со следующей мажорной версии Input перестанет поддерживать маску. Используйте MaskedInput\n */\n alwaysShowMask?: boolean;\n /** Размер */\n size?: SizeProp;\n /** onValueChange */\n onValueChange?: (value: string) => void;\n /** Вызывается на label */\n onMouseEnter?: React.MouseEventHandler<HTMLLabelElement>;\n /** Вызывается на label */\n onMouseLeave?: React.MouseEventHandler<HTMLLabelElement>;\n /** Вызывается на label */\n onMouseOver?: React.MouseEventHandler<HTMLLabelElement>;\n /**\n * Тип. Возможные значения: 'password' | 'text' | 'number' | 'tel' | 'search' | 'time' | 'date' | 'url' | 'email'\n * */\n type?: InputType;\n /** Значение */\n value?: string;\n capture?: boolean;\n\n /**\n * Префикс\n * `ReactNode` перед значением, но после иконки\n */\n prefix?: React.ReactNode;\n /**\n * Суффикс\n * `ReactNode` после значения, но перед правой иконкой\n */\n suffix?: React.ReactNode;\n /** Выделять введенное значение при фокусе. Работает с типами `text`, `password`, `tel`, `search`, `url`. [Документация](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/setSelectionRange) */\n selectAllOnFocus?: boolean;\n /**\n * Обработчик неправильного ввода.\n * По-умолчанию, инпут вспыхивает акцентным цветом.\n * Если передан - вызывается переданный обработчик,\n * в таком случае вспыхивание можно вызвать\n * публичным методом инстанса `blink()`.\n *\n * @param value значение инпута.\n */\n onUnexpectedInput?: (value: string) => void;\n /** @ignore */\n corners?: Partial<\n Pick<\n React.CSSProperties,\n 'borderTopRightRadius' | 'borderBottomRightRadius' | 'borderBottomLeftRadius' | 'borderTopLeftRadius'\n >\n >;\n /**\n * Элемент заменяет нативный input.\n * Должен иметь пропы `InputElementProps` и тип `InputElement`\n * */\n element?: ReactElement<InputElementProps>;\n }\n > {}\n\nexport interface InputState {\n blinking: boolean;\n focused: boolean;\n needsPolyfillPlaceholder: boolean;\n}\n\nexport const InputDataTids = {\n root: 'Input__root',\n} as const;\n\ntype DefaultProps = Required<Pick<InputProps, 'size' | 'type'>>;\n\n/**\n * Интерфейс пропсов наследуется от `React.InputHTMLAttributes<HTMLInputElement>`.\n * Все пропсы кроме перечисленных, `className` и `style` передаются в `<input>`\n */\n@rootNode\nexport class Input extends React.Component<InputProps, InputState> {\n public static __KONTUR_REACT_UI__ = 'Input';\n public static displayName = 'Input';\n\n public static defaultProps: DefaultProps = {\n size: 'small',\n type: 'text',\n };\n\n private getProps = createPropsGetter(Input.defaultProps);\n\n public state: InputState = {\n needsPolyfillPlaceholder,\n blinking: false,\n focused: false,\n };\n\n private selectAllId: number | null = null;\n private theme!: Theme;\n private blinkTimeout: SafeTimer;\n private input: HTMLInputElement | null = null;\n private setRootNode!: TSetRootNode;\n\n private outputMaskError() {\n warning(!(this.props.mask && this.canBeUsedWithMask), maskErrorMessage(this.getProps().type));\n }\n\n public componentDidMount() {\n this.outputMaskError();\n }\n\n public componentDidUpdate(prevProps: Readonly<InputProps>) {\n if (this.props.type !== prevProps.type || this.props.mask !== prevProps.mask) {\n this.outputMaskError();\n }\n }\n\n public componentWillUnmount() {\n if (this.blinkTimeout) {\n globalObject.clearTimeout(this.blinkTimeout);\n }\n this.cancelDelayedSelectAll();\n }\n\n /**\n * @public\n */\n public focus() {\n invariant(this.input, 'Cannot call \"focus\" because Input is not mounted');\n this.input.focus();\n }\n\n /**\n * @public\n */\n public blur() {\n invariant(this.input, 'Cannot call \"blur\" because Input is not mounted');\n this.input.blur();\n }\n\n /**\n * @public\n */\n public getNode() {\n return this.input;\n }\n\n /**\n * @public\n */\n public blink() {\n if (this.blinkTimeout) {\n this.cancelBlink(() => {\n // trigger reflow to restart animation\n // @see https://css-tricks.com/restart-css-animation/#article-header-id-0\n void (this.input && this.input.offsetWidth);\n this.blink();\n });\n return;\n }\n this.setState({ blinking: true }, () => {\n this.blinkTimeout = globalObject.setTimeout(this.cancelBlink, 150);\n });\n }\n\n /**\n * @public\n * @param {number} start\n * @param {number} end\n */\n public setSelectionRange(start: number, end: number) {\n // https://github.com/facebook/react/issues/7769\n // https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/setSelectionRange\n if (!selectionAllowedTypes.includes(this.getProps().type)) {\n warning(false, selectionErrorMessage(this.getProps().type));\n\n return;\n }\n\n if (!this.input) {\n throw new Error('Cannot call \"setSelectionRange\" on unmounted Input');\n }\n\n if (globalObject.document?.activeElement !== this.input) {\n this.focus();\n }\n if (this.props.mask && this.props.value && this.props.value?.length < this.props.mask.length) {\n globalObject.setTimeout(() => {\n this.input?.setSelectionRange(start, end);\n }, 150);\n } else {\n this.input?.setSelectionRange(start, end);\n }\n }\n\n public get isMaskVisible(): boolean {\n const { mask, alwaysShowMask } = this.props;\n const { focused } = this.state;\n return Boolean(mask && (focused || alwaysShowMask));\n }\n\n public render(): JSX.Element {\n return (\n <ThemeContext.Consumer>\n {(theme) => {\n this.theme = theme;\n return (\n <CommonWrapper rootNodeRef={this.setRootNode} {...this.props}>\n {this.renderMain}\n </CommonWrapper>\n );\n }}\n </ThemeContext.Consumer>\n );\n }\n\n private get canBeUsedWithMask() {\n return maskForbiddenTypes.includes(this.getProps().type);\n }\n\n /**\n * Работает с типами `text`, `password`, `tel`, `search`, `url`\n * [Документация](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/setSelectionRange)\n * @public\n */\n public selectAll = (): void => {\n if (this.input) {\n this.setSelectionRange(0, this.input.value.length);\n }\n };\n\n private delaySelectAll = (): number | null =>\n (this.selectAllId = globalObject.requestAnimationFrame?.(this.selectAll) ?? null);\n\n private cancelDelayedSelectAll = (): void => {\n if (this.selectAllId) {\n globalObject.cancelAnimationFrame?.(this.selectAllId);\n this.selectAllId = null;\n }\n };\n\n private cancelBlink = (callback?: () => void): void => {\n if (this.blinkTimeout) {\n globalObject.clearTimeout(this.blinkTimeout);\n this.blinkTimeout = 0;\n if (this.state.blinking) {\n this.setState({ blinking: false }, callback);\n return;\n }\n }\n if (callback) {\n callback();\n }\n };\n\n private getInput = (inputProps: InputElementProps & ClassAttributes<HTMLInputElement>) => {\n if (this.props.element) {\n return React.cloneElement(this.props.element, inputProps);\n }\n\n return this.props.mask && !this.canBeUsedWithMask\n ? this.renderMaskedInput(inputProps, this.props.mask)\n : React.createElement('input', inputProps);\n };\n\n private renderMain = (props: CommonWrapperRestProps<InputProps>) => {\n const {\n onMouseEnter,\n onMouseLeave,\n onMouseOver,\n onKeyDown,\n onKeyPress,\n onValueChange,\n width,\n error,\n role,\n warning,\n leftIcon,\n rightIcon,\n borderless,\n value,\n align,\n type,\n mask,\n maskChar,\n alwaysShowMask,\n size,\n placeholder,\n selectAllOnFocus,\n disabled,\n onUnexpectedInput,\n prefix,\n suffix,\n formatChars,\n corners,\n 'aria-describedby': ariaDescribedby,\n 'aria-controls': ariaControls,\n 'aria-label': ariaLabel,\n element,\n ...rest\n } = props;\n\n const { blinking, focused } = this.state;\n\n const labelProps = {\n className: cx(styles.root(this.theme), this.getSizeClassName(), {\n [styles.focus(this.theme)]: focused && !warning && !error,\n [styles.hovering(this.theme)]: !focused && !disabled && !warning && !error && !borderless,\n [styles.blink(this.theme)]: blinking,\n [styles.borderless()]: borderless && !focused,\n [styles.disabled(this.theme)]: disabled,\n [styles.warning(this.theme)]: warning,\n [styles.error(this.theme)]: error,\n [styles.focusFallback(this.theme)]: focused && (isIE11 || isEdge),\n [styles.warningFallback(this.theme)]: warning && (isIE11 || isEdge),\n [styles.errorFallback(this.theme)]: error && (isIE11 || isEdge),\n }),\n 'aria-controls': ariaControls,\n style: { width, ...corners },\n onMouseEnter,\n onMouseLeave,\n onMouseOver,\n };\n\n const inputProps: InputElementProps & ClassAttributes<HTMLInputElement> = {\n ...rest,\n className: cx(styles.input(this.theme), {\n [styles.inputFocus(this.theme)]: focused,\n [styles.inputDisabled(this.theme)]: disabled,\n }),\n value,\n role,\n onChange: this.handleChange,\n onFocus: this.handleFocus,\n onKeyDown: this.handleKeyDown,\n onKeyPress: this.handleKeyPress,\n onBlur: this.handleBlur,\n style: { textAlign: align },\n ref: this.refInput,\n type,\n placeholder: !this.isMaskVisible && !needsPolyfillPlaceholder ? placeholder : undefined,\n disabled,\n 'aria-describedby': ariaDescribedby,\n 'aria-label': ariaLabel,\n };\n\n const input = (\n <FocusControlWrapper onBlurWhenDisabled={this.resetFocus}>{this.getInput(inputProps)}</FocusControlWrapper>\n );\n\n if (isTheme2022(this.theme)) {\n return (\n <InputLayout\n leftIcon={leftIcon}\n rightIcon={rightIcon}\n prefix={prefix}\n suffix={suffix}\n labelProps={labelProps}\n context={{ disabled: Boolean(disabled), focused, size }}\n >\n {input}\n {this.state.needsPolyfillPlaceholder && (\n <PolyfillPlaceholder\n isMaskVisible={this.isMaskVisible}\n value={value}\n defaultValue={this.props.defaultValue}\n align={align}\n >\n {placeholder}\n </PolyfillPlaceholder>\n )}\n </InputLayout>\n );\n }\n\n return (\n <label data-tid={InputDataTids.root} {...labelProps}>\n <span className={styles.sideContainer()}>\n {this.renderLeftIcon()}\n {this.renderPrefix()}\n </span>\n <span className={styles.wrapper()}>\n {input}\n {this.renderPlaceholder()}\n </span>\n <span className={cx(styles.sideContainer(), styles.rightContainer())}>\n {this.renderSuffix()}\n {this.renderRightIcon()}\n </span>\n </label>\n );\n };\n\n private renderMaskedInput(inputProps: React.InputHTMLAttributes<HTMLInputElement>, mask: string) {\n return (\n <InternalMaskedInput\n {...inputProps}\n mask={mask}\n maskChar={this.props.maskChar}\n alwaysShowMask={this.props.alwaysShowMask}\n formatChars={this.props.formatChars}\n onChange={this.props.onChange}\n onValueChange={this.handleMaskedValueChange}\n onUnexpectedInput={this.handleUnexpectedInput}\n />\n );\n }\n\n private getIconSizeClassname(right = false) {\n switch (this.getProps().size) {\n case 'large':\n return right ? styles.rightIconLarge(this.theme) : styles.leftIconLarge(this.theme);\n case 'medium':\n return right ? styles.rightIconMedium(this.theme) : styles.leftIconMedium(this.theme);\n case 'small':\n default:\n return right ? styles.rightIconSmall(this.theme) : styles.leftIconSmall(this.theme);\n }\n }\n\n private renderLeftIcon() {\n return this.renderIcon(this.props.leftIcon, this.getIconSizeClassname());\n }\n\n private renderRightIcon() {\n return this.renderIcon(this.props.rightIcon, this.getIconSizeClassname(true));\n }\n\n private renderIcon(icon: InputIconType, sizeClassName: string) {\n if (!icon) {\n return null;\n }\n const { disabled } = this.props;\n const iconNode = isFunction(icon) ? icon() : icon;\n\n return (\n <span\n className={cx(styles.icon(), sizeClassName, styles.useDefaultColor(this.theme), {\n [styles.iconFocus(this.theme)]: this.state.focused,\n [styles.iconDisabled()]: disabled,\n })}\n >\n {iconNode}\n </span>\n );\n }\n\n private renderPlaceholder() {\n const { disabled } = this.props;\n const { focused } = this.state;\n let placeholder = null;\n\n if (\n this.state.needsPolyfillPlaceholder &&\n this.props.placeholder &&\n !this.isMaskVisible &&\n !this.props.value &&\n !this.props.defaultValue\n ) {\n placeholder = (\n <div\n className={cx(styles.placeholder(this.theme), {\n [styles.placeholderDisabled(this.theme)]: disabled,\n [styles.placeholderFocus(this.theme)]: focused,\n })}\n style={{ textAlign: this.props.align || 'inherit' }}\n >\n {this.props.placeholder}\n </div>\n );\n }\n\n return placeholder;\n }\n\n private getSizeClassName() {\n switch (this.getProps().size) {\n case 'large':\n return cx({\n [styles.sizeLarge(this.theme)]: true,\n [styles.sizeLargeFallback(this.theme)]: isIE11 || isEdge,\n });\n case 'medium':\n return cx({\n [styles.sizeMedium(this.theme)]: true,\n [styles.sizeMediumFallback(this.theme)]: isIE11 || isEdge,\n });\n case 'small':\n default:\n return cx({\n [styles.sizeSmall(this.theme)]: true,\n [styles.sizeSmallFallback(this.theme)]: isIE11 || isEdge,\n });\n }\n }\n\n private refInput = (element: HTMLInputElement | InternalMaskedInput | InputElement | null) => {\n if (element instanceof InternalMaskedInput || (element && 'input' in element)) {\n this.input = element.input;\n } else {\n this.input = element;\n }\n };\n\n private handleChange = (event: React.ChangeEvent<HTMLInputElement>) => {\n if (needsPolyfillPlaceholder) {\n const fieldIsEmpty = event.target.value === '';\n if (this.state.needsPolyfillPlaceholder !== fieldIsEmpty) {\n this.setState({ needsPolyfillPlaceholder: fieldIsEmpty });\n }\n }\n\n if (this.props.onValueChange) {\n this.props.onValueChange(event.target.value);\n }\n\n if (this.props.onChange) {\n this.props.onChange(event);\n }\n };\n\n private handleFocus = (event: React.FocusEvent<HTMLInputElement>) => {\n this.setState({\n focused: true,\n });\n\n if (this.props.selectAllOnFocus) {\n this.input && !isIE11 ? this.selectAll() : this.delaySelectAll();\n }\n\n if (this.props.onFocus) {\n this.props.onFocus(event);\n }\n };\n\n private handleKeyDown = (e: React.KeyboardEvent<HTMLInputElement>) => {\n if (this.props.onKeyDown) {\n this.props.onKeyDown(e);\n }\n\n const isDeleteKey = someKeys(isKeyBackspace, isKeyDelete)(e);\n\n if (!e.currentTarget.value && isDeleteKey && !e.repeat) {\n this.handleUnexpectedInput();\n }\n };\n\n private handleKeyPress = (event: React.KeyboardEvent<HTMLInputElement>) => {\n if (this.props.onKeyPress) {\n this.props.onKeyPress(event);\n }\n\n if (this.props.maxLength === event.currentTarget.value.length) {\n this.handleUnexpectedInput(event.currentTarget.value);\n }\n };\n\n private handleMaskedValueChange = (value: string) => {\n if (this.props.onValueChange) {\n this.props.onValueChange(value);\n }\n };\n\n private handleUnexpectedInput = (value: string = this.props.value || '') => {\n if (this.props.onUnexpectedInput) {\n this.props.onUnexpectedInput(value);\n } else {\n this.blink();\n }\n };\n\n private resetFocus = () => this.setState({ focused: false });\n\n private handleBlur = (event: React.FocusEvent<HTMLInputElement>) => {\n this.resetFocus();\n this.props.onBlur?.(event);\n };\n\n private renderPrefix = () => {\n const { prefix, disabled } = this.props;\n\n if (!prefix) {\n return null;\n }\n\n return (\n <span className={cx(styles.prefix(this.theme), { [styles.prefixDisabled(this.theme)]: disabled })}>{prefix}</span>\n );\n };\n\n private renderSuffix = () => {\n const { suffix, disabled } = this.props;\n\n if (!suffix) {\n return null;\n }\n\n return (\n <span className={cx(styles.suffix(this.theme), { [styles.suffixDisabled(this.theme)]: disabled })}>{suffix}</span>\n );\n };\n}\n"]}
1
+ {"version":3,"sources":["Input.tsx"],"names":["inputTypes","selectionAllowedTypes","selectionErrorMessage","type","allowedTypes","map","i","join","maskForbiddenTypes","maskAllowedTypes","filter","includes","maskErrorMessage","InputDataTids","root","Input","rootNode","getProps","defaultProps","state","needsPolyfillPlaceholder","blinking","focused","selectAllId","input","selectAll","setSelectionRange","value","length","delaySelectAll","globalObject","requestAnimationFrame","cancelDelayedSelectAll","cancelAnimationFrame","cancelBlink","callback","blinkTimeout","clearTimeout","setState","getInput","inputProps","props","element","React","cloneElement","mask","canBeUsedWithMask","renderMaskedInput","createElement","renderMain","onMouseEnter","onMouseLeave","onMouseOver","onKeyDown","onKeyPress","onValueChange","width","error","role","warning","leftIcon","rightIcon","borderless","align","maskChar","alwaysShowMask","size","placeholder","selectAllOnFocus","disabled","onUnexpectedInput","prefix","suffix","formatChars","corners","ariaDescribedby","ariaControls","ariaLabel","rest","labelProps","className","styles","theme","getSizeClassName","focus","hovering","blink","focusFallback","isIE11","isEdge","warningFallback","errorFallback","style","inputFocus","inputDisabled","onChange","handleChange","onFocus","handleFocus","handleKeyDown","handleKeyPress","onBlur","handleBlur","textAlign","ref","refInput","isMaskVisible","undefined","resetFocus","Boolean","defaultValue","sideContainer","renderLeftIcon","renderPrefix","wrapper","renderPlaceholder","rightContainer","renderSuffix","renderRightIcon","InternalMaskedInput","event","fieldIsEmpty","target","e","isDeleteKey","isKeyBackspace","isKeyDelete","currentTarget","repeat","handleUnexpectedInput","maxLength","handleMaskedValueChange","prefixDisabled","suffixDisabled","outputMaskError","componentDidMount","componentDidUpdate","prevProps","componentWillUnmount","blur","getNode","offsetWidth","setTimeout","start","end","Error","document","activeElement","render","setRootNode","getIconSizeClassname","right","rightIconLarge","leftIconLarge","rightIconMedium","leftIconMedium","rightIconSmall","leftIconSmall","renderIcon","icon","sizeClassName","iconNode","useDefaultColor","iconFocus","iconDisabled","placeholderDisabled","placeholderFocus","sizeLarge","sizeLargeFallback","sizeMedium","sizeMediumFallback","sizeSmall","sizeSmallFallback","Component","__KONTUR_REACT_UI__","displayName"],"mappings":";;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;AAGA;AACA;AACA,wE;;AAEO,IAAMA,UAAU,GAAG,CAAC,UAAD,EAAa,MAAb,EAAqB,QAArB,EAA+B,KAA/B,EAAsC,QAAtC,EAAgD,MAAhD,EAAwD,MAAxD,EAAgE,KAAhE,EAAuE,OAAvE,CAAnB;;AAEP;AACA;AACA,G;;;;;;AAMO,IAAMC,qBAAkC,GAAG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y,GAA6B,EACzCgD,IAAI,EAAE,OADmC,EAEzC/D,IAAI,EAAE,MAFmC,E","sourcesContent":["// TODO: Enable this rule in functional components.\n/* eslint-disable @typescript-eslint/no-unused-vars */\nimport invariant from 'invariant';\nimport React, { AriaAttributes, ClassAttributes, HTMLAttributes, ReactElement } from 'react';\nimport warning from 'warning';\nimport { globalObject, SafeTimer } from '@skbkontur/global-object';\n\nimport { isEdge, isIE11 } from '../../lib/client';\nimport { isKeyBackspace, isKeyDelete, someKeys } from '../../lib/events/keyboard/identifiers';\nimport { needsPolyfillPlaceholder } from '../../lib/needsPolyfillPlaceholder';\nimport { Nullable, Override } from '../../typings/utility-types';\nimport { InternalMaskedInput } from '../../internal/InternalMaskedInput';\nimport { ThemeContext } from '../../lib/theming/ThemeContext';\nimport { Theme } from '../../lib/theming/Theme';\nimport { CommonProps, CommonWrapper, CommonWrapperRestProps } from '../../internal/CommonWrapper';\nimport { cx } from '../../lib/theming/Emotion';\nimport { rootNode, TSetRootNode } from '../../lib/rootNode';\nimport { createPropsGetter } from '../../lib/createPropsGetter';\nimport { isTheme2022 } from '../../lib/theming/ThemeHelpers';\nimport { isFunction } from '../../lib/utils';\nimport { SizeProp } from '../../lib/types/props';\nimport { FocusControlWrapper } from '../../internal/FocusControlWrapper';\n\nimport { InputElement, InputElementProps } from './Input.typings';\nimport { styles } from './Input.styles';\nimport { InputLayout } from './InputLayout/InputLayout';\nimport { PolyfillPlaceholder } from './InputLayout/PolyfillPlaceholder';\n\nexport const inputTypes = ['password', 'text', 'number', 'tel', 'search', 'time', 'date', 'url', 'email'] as const;\n\n/**\n * @deprecated use SizeProp\n */\nexport type InputSize = SizeProp;\nexport type InputAlign = 'left' | 'center' | 'right';\nexport type InputType = typeof inputTypes[number];\nexport type InputIconType = React.ReactNode | (() => React.ReactNode);\n\nexport const selectionAllowedTypes: InputType[] = ['text', 'password', 'tel', 'search', 'url'];\nexport const selectionErrorMessage = (type: InputType, allowedTypes: InputType[] = selectionAllowedTypes) => {\n return `<Input />. Selection is not supported by the type \"${type}\". Types that support selection: ${allowedTypes\n .map((i) => `\"${i}\"`)\n .join(', ')}. Reason: https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/setSelectionRange.`;\n};\n\nexport const maskForbiddenTypes: InputType[] = ['number', 'date', 'time'];\nexport const maskAllowedTypes: InputType[] = inputTypes.filter((type) => {\n return !maskForbiddenTypes.includes(type);\n});\nexport const maskErrorMessage = (type: InputType, allowedTypes: InputType[] = maskAllowedTypes) => {\n return `<Input />. Prop \"mask\" does not support type \"${type}\". Supported types: ${allowedTypes\n .map((i) => `\"${i}\"`)\n .join(', ')}.`;\n};\n\nexport interface InputProps\n extends CommonProps,\n Pick<HTMLAttributes<unknown>, 'role'>,\n Pick<AriaAttributes, 'aria-describedby' | 'aria-controls' | 'aria-label'>,\n Override<\n React.InputHTMLAttributes<HTMLInputElement>,\n {\n /**\n * Иконка слева\n * Если `ReactNode` применяются дефолтные стили для иконки\n * Если `() => ReactNode` применяются только стили для позиционирование\n */\n leftIcon?: InputIconType;\n /**\n * Иконка справа\n * Если `ReactNode` применяются дефолтные стили для иконки\n * Если `() => ReactNode` применяются только стили для позиционирование\n */\n rightIcon?: InputIconType;\n /**\n * Состояние валидации при ошибке.\n */\n error?: boolean;\n /**\n * Состояние валидации при предупреждении.\n */\n warning?: boolean;\n /** Режим прозрачной рамки */\n borderless?: boolean;\n /** Выравнивание текста */\n align?: InputAlign;\n /**\n * Паттерн маски. Доступен для типов `text`, `password`, `email`, `tel`, `search`, `url`\n * @deprecated Со следующей мажорной версии Input перестанет поддерживать маску. Используйте MaskedInput\n */\n mask?: Nullable<string>;\n /**\n * Символ маски\n * @deprecated Со следующей мажорной версии Input перестанет поддерживать маску. Используйте MaskedInput\n */\n maskChar?: Nullable<string>;\n /**\n * Словарь символов-регулярок для задания маски\n * @deprecated Со следующей мажорной версии Input перестанет поддерживать маску. Используйте MaskedInput\n * @default { '9': '[0-9]', 'a': '[A-Za-z]', '*': '[A-Za-z0-9]' }\n */\n formatChars?: Record<string, string>;\n /**\n * Показывать символы маски\n * @deprecated Со следующей мажорной версии Input перестанет поддерживать маску. Используйте MaskedInput\n */\n alwaysShowMask?: boolean;\n /** Размер */\n size?: SizeProp;\n /** onValueChange */\n onValueChange?: (value: string) => void;\n /** Вызывается на label */\n onMouseEnter?: React.MouseEventHandler<HTMLLabelElement>;\n /** Вызывается на label */\n onMouseLeave?: React.MouseEventHandler<HTMLLabelElement>;\n /** Вызывается на label */\n onMouseOver?: React.MouseEventHandler<HTMLLabelElement>;\n /**\n * Тип. Возможные значения: 'password' | 'text' | 'number' | 'tel' | 'search' | 'time' | 'date' | 'url' | 'email'\n * */\n type?: InputType;\n /** Значение */\n value?: string;\n capture?: boolean;\n\n /**\n * Префикс\n * `ReactNode` перед значением, но после иконки\n */\n prefix?: React.ReactNode;\n /**\n * Суффикс\n * `ReactNode` после значения, но перед правой иконкой\n */\n suffix?: React.ReactNode;\n /** Выделять введенное значение при фокусе. Работает с типами `text`, `password`, `tel`, `search`, `url`. [Документация](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/setSelectionRange) */\n selectAllOnFocus?: boolean;\n /**\n * Обработчик неправильного ввода.\n * По-умолчанию, инпут вспыхивает акцентным цветом.\n * Если передан - вызывается переданный обработчик,\n * в таком случае вспыхивание можно вызвать\n * публичным методом инстанса `blink()`.\n *\n * @param value значение инпута.\n */\n onUnexpectedInput?: (value: string) => void;\n /** @ignore */\n corners?: Partial<\n Pick<\n React.CSSProperties,\n 'borderTopRightRadius' | 'borderBottomRightRadius' | 'borderBottomLeftRadius' | 'borderTopLeftRadius'\n >\n >;\n /**\n * Элемент заменяет нативный input.\n * Должен иметь пропы `InputElementProps` и тип `InputElement`\n * */\n element?: ReactElement<InputElementProps>;\n }\n > {}\n\nexport interface InputState {\n blinking: boolean;\n focused: boolean;\n needsPolyfillPlaceholder: boolean;\n}\n\nexport const InputDataTids = {\n root: 'Input__root',\n} as const;\n\ntype DefaultProps = Required<Pick<InputProps, 'size' | 'type'>>;\n\n/**\n * Интерфейс пропсов наследуется от `React.InputHTMLAttributes<HTMLInputElement>`.\n * Все пропсы кроме перечисленных, `className` и `style` передаются в `<input>`\n */\n@rootNode\nexport class Input extends React.Component<InputProps, InputState> {\n public static __KONTUR_REACT_UI__ = 'Input';\n public static displayName = 'Input';\n\n public static defaultProps: DefaultProps = {\n size: 'small',\n type: 'text',\n };\n\n private getProps = createPropsGetter(Input.defaultProps);\n\n public state: InputState = {\n needsPolyfillPlaceholder,\n blinking: false,\n focused: false,\n };\n\n private selectAllId: number | null = null;\n private theme!: Theme;\n private blinkTimeout: SafeTimer;\n private input: HTMLInputElement | null = null;\n private setRootNode!: TSetRootNode;\n\n private outputMaskError() {\n warning(!(this.props.mask && this.canBeUsedWithMask), maskErrorMessage(this.getProps().type));\n }\n\n public componentDidMount() {\n this.outputMaskError();\n }\n\n public componentDidUpdate(prevProps: Readonly<InputProps>) {\n if (this.props.type !== prevProps.type || this.props.mask !== prevProps.mask) {\n this.outputMaskError();\n }\n }\n\n public componentWillUnmount() {\n if (this.blinkTimeout) {\n globalObject.clearTimeout(this.blinkTimeout);\n }\n this.cancelDelayedSelectAll();\n }\n\n /**\n * @public\n */\n public focus() {\n invariant(this.input, 'Cannot call \"focus\" because Input is not mounted');\n this.input.focus();\n }\n\n /**\n * @public\n */\n public blur() {\n invariant(this.input, 'Cannot call \"blur\" because Input is not mounted');\n this.input.blur();\n }\n\n /**\n * @public\n */\n public getNode() {\n return this.input;\n }\n\n /**\n * @public\n */\n public blink() {\n if (this.blinkTimeout) {\n this.cancelBlink(() => {\n // trigger reflow to restart animation\n // @see https://css-tricks.com/restart-css-animation/#article-header-id-0\n void (this.input && this.input.offsetWidth);\n this.blink();\n });\n return;\n }\n this.setState({ blinking: true }, () => {\n this.blinkTimeout = globalObject.setTimeout(this.cancelBlink, 150);\n });\n }\n\n /**\n * @public\n * @param {number} start\n * @param {number} end\n */\n public setSelectionRange(start: number, end: number) {\n // https://github.com/facebook/react/issues/7769\n // https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/setSelectionRange\n if (!selectionAllowedTypes.includes(this.getProps().type)) {\n warning(false, selectionErrorMessage(this.getProps().type));\n\n return;\n }\n\n if (!this.input) {\n throw new Error('Cannot call \"setSelectionRange\" on unmounted Input');\n }\n\n if (globalObject.document?.activeElement !== this.input) {\n this.focus();\n }\n if (this.props.mask && this.props.value && this.props.value?.length < this.props.mask.length) {\n globalObject.setTimeout(() => {\n this.input?.setSelectionRange(start, end);\n }, 150);\n } else {\n this.input?.setSelectionRange(start, end);\n }\n }\n\n public get isMaskVisible(): boolean {\n const { mask, alwaysShowMask } = this.props;\n const { focused } = this.state;\n return Boolean(mask && (focused || alwaysShowMask));\n }\n\n public render(): JSX.Element {\n return (\n <ThemeContext.Consumer>\n {(theme) => {\n this.theme = theme;\n return (\n <CommonWrapper rootNodeRef={this.setRootNode} {...this.props}>\n {this.renderMain}\n </CommonWrapper>\n );\n }}\n </ThemeContext.Consumer>\n );\n }\n\n private get canBeUsedWithMask() {\n return maskForbiddenTypes.includes(this.getProps().type);\n }\n\n /**\n * Работает с типами `text`, `password`, `tel`, `search`, `url`\n * [Документация](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/setSelectionRange)\n * @public\n */\n public selectAll = (): void => {\n if (this.input) {\n this.setSelectionRange(0, this.input.value.length);\n }\n };\n\n private delaySelectAll = (): number | null =>\n (this.selectAllId = globalObject.requestAnimationFrame?.(this.selectAll) ?? null);\n\n private cancelDelayedSelectAll = (): void => {\n if (this.selectAllId) {\n globalObject.cancelAnimationFrame?.(this.selectAllId);\n this.selectAllId = null;\n }\n };\n\n private cancelBlink = (callback?: () => void): void => {\n if (this.blinkTimeout) {\n globalObject.clearTimeout(this.blinkTimeout);\n this.blinkTimeout = 0;\n if (this.state.blinking) {\n this.setState({ blinking: false }, callback);\n return;\n }\n }\n if (callback) {\n callback();\n }\n };\n\n private getInput = (inputProps: InputElementProps & ClassAttributes<HTMLInputElement>) => {\n if (this.props.element) {\n return React.cloneElement(this.props.element, inputProps);\n }\n\n return this.props.mask && !this.canBeUsedWithMask\n ? this.renderMaskedInput(inputProps, this.props.mask)\n : React.createElement('input', inputProps);\n };\n\n private renderMain = (props: CommonWrapperRestProps<InputProps>) => {\n const {\n onMouseEnter,\n onMouseLeave,\n onMouseOver,\n onKeyDown,\n onKeyPress,\n onValueChange,\n width,\n error,\n role,\n warning,\n leftIcon,\n rightIcon,\n borderless,\n value,\n align,\n type,\n mask,\n maskChar,\n alwaysShowMask,\n size,\n placeholder,\n selectAllOnFocus,\n disabled,\n onUnexpectedInput,\n prefix,\n suffix,\n formatChars,\n corners,\n 'aria-describedby': ariaDescribedby,\n 'aria-controls': ariaControls,\n 'aria-label': ariaLabel,\n element,\n ...rest\n } = props;\n\n const { blinking, focused } = this.state;\n\n const labelProps = {\n className: cx(styles.root(this.theme), this.getSizeClassName(), {\n [styles.focus(this.theme)]: focused && !warning && !error,\n [styles.hovering(this.theme)]: !focused && !disabled && !warning && !error && !borderless,\n [styles.blink(this.theme)]: blinking,\n [styles.borderless()]: borderless && !focused,\n [styles.disabled(this.theme)]: disabled,\n [styles.warning(this.theme)]: warning,\n [styles.error(this.theme)]: error,\n [styles.focusFallback(this.theme)]: focused && (isIE11 || isEdge),\n [styles.warningFallback(this.theme)]: warning && (isIE11 || isEdge),\n [styles.errorFallback(this.theme)]: error && (isIE11 || isEdge),\n }),\n 'aria-controls': ariaControls,\n style: { width, ...corners },\n onMouseEnter,\n onMouseLeave,\n onMouseOver,\n };\n\n const inputProps: InputElementProps & ClassAttributes<HTMLInputElement> = {\n ...rest,\n className: cx(styles.input(this.theme), {\n [styles.inputFocus(this.theme)]: focused,\n [styles.inputDisabled(this.theme)]: disabled,\n }),\n value,\n role,\n onChange: this.handleChange,\n onFocus: this.handleFocus,\n onKeyDown: this.handleKeyDown,\n onKeyPress: this.handleKeyPress,\n onBlur: this.handleBlur,\n style: { textAlign: align },\n ref: this.refInput,\n type,\n placeholder: !this.isMaskVisible && !needsPolyfillPlaceholder ? placeholder : undefined,\n disabled,\n 'aria-describedby': ariaDescribedby,\n 'aria-label': ariaLabel,\n };\n\n const input = (\n <FocusControlWrapper onBlurWhenDisabled={this.resetFocus}>{this.getInput(inputProps)}</FocusControlWrapper>\n );\n\n if (isTheme2022(this.theme)) {\n return (\n <InputLayout\n leftIcon={leftIcon}\n rightIcon={rightIcon}\n prefix={prefix}\n suffix={suffix}\n labelProps={labelProps}\n context={{ disabled: Boolean(disabled), focused, size }}\n >\n {input}\n {this.state.needsPolyfillPlaceholder && (\n <PolyfillPlaceholder\n isMaskVisible={this.isMaskVisible}\n value={value}\n defaultValue={this.props.defaultValue}\n align={align}\n >\n {placeholder}\n </PolyfillPlaceholder>\n )}\n </InputLayout>\n );\n }\n\n return (\n <label data-tid={InputDataTids.root} {...labelProps}>\n <span className={styles.sideContainer()}>\n {this.renderLeftIcon()}\n {this.renderPrefix()}\n </span>\n <span className={styles.wrapper()}>\n {input}\n {this.renderPlaceholder()}\n </span>\n <span className={cx(styles.sideContainer(), styles.rightContainer())}>\n {this.renderSuffix()}\n {this.renderRightIcon()}\n </span>\n </label>\n );\n };\n\n private renderMaskedInput(inputProps: React.InputHTMLAttributes<HTMLInputElement>, mask: string) {\n return (\n <InternalMaskedInput\n {...inputProps}\n mask={mask}\n maskChar={this.props.maskChar}\n alwaysShowMask={this.props.alwaysShowMask}\n formatChars={this.props.formatChars}\n onChange={this.props.onChange}\n onValueChange={this.handleMaskedValueChange}\n onUnexpectedInput={this.handleUnexpectedInput}\n />\n );\n }\n\n private getIconSizeClassname(right = false) {\n switch (this.getProps().size) {\n case 'large':\n return right ? styles.rightIconLarge(this.theme) : styles.leftIconLarge(this.theme);\n case 'medium':\n return right ? styles.rightIconMedium(this.theme) : styles.leftIconMedium(this.theme);\n case 'small':\n default:\n return right ? styles.rightIconSmall(this.theme) : styles.leftIconSmall(this.theme);\n }\n }\n\n private renderLeftIcon() {\n return this.renderIcon(this.props.leftIcon, this.getIconSizeClassname());\n }\n\n private renderRightIcon() {\n return this.renderIcon(this.props.rightIcon, this.getIconSizeClassname(true));\n }\n\n private renderIcon(icon: InputIconType, sizeClassName: string) {\n if (!icon) {\n return null;\n }\n const { disabled } = this.props;\n const iconNode = isFunction(icon) ? icon() : icon;\n\n return (\n <span\n className={cx(styles.icon(), sizeClassName, styles.useDefaultColor(this.theme), {\n [styles.iconFocus(this.theme)]: this.state.focused,\n [styles.iconDisabled(this.theme)]: disabled,\n })}\n >\n {iconNode}\n </span>\n );\n }\n\n private renderPlaceholder() {\n const { disabled } = this.props;\n const { focused } = this.state;\n let placeholder = null;\n\n if (\n this.state.needsPolyfillPlaceholder &&\n this.props.placeholder &&\n !this.isMaskVisible &&\n !this.props.value &&\n !this.props.defaultValue\n ) {\n placeholder = (\n <div\n className={cx(styles.placeholder(this.theme), {\n [styles.placeholderDisabled(this.theme)]: disabled,\n [styles.placeholderFocus(this.theme)]: focused,\n })}\n style={{ textAlign: this.props.align || 'inherit' }}\n >\n {this.props.placeholder}\n </div>\n );\n }\n\n return placeholder;\n }\n\n private getSizeClassName() {\n switch (this.getProps().size) {\n case 'large':\n return cx({\n [styles.sizeLarge(this.theme)]: true,\n [styles.sizeLargeFallback(this.theme)]: isIE11 || isEdge,\n });\n case 'medium':\n return cx({\n [styles.sizeMedium(this.theme)]: true,\n [styles.sizeMediumFallback(this.theme)]: isIE11 || isEdge,\n });\n case 'small':\n default:\n return cx({\n [styles.sizeSmall(this.theme)]: true,\n [styles.sizeSmallFallback(this.theme)]: isIE11 || isEdge,\n });\n }\n }\n\n private refInput = (element: HTMLInputElement | InternalMaskedInput | InputElement | null) => {\n if (element instanceof InternalMaskedInput || (element && 'input' in element)) {\n this.input = element.input;\n } else {\n this.input = element;\n }\n };\n\n private handleChange = (event: React.ChangeEvent<HTMLInputElement>) => {\n if (needsPolyfillPlaceholder) {\n const fieldIsEmpty = event.target.value === '';\n if (this.state.needsPolyfillPlaceholder !== fieldIsEmpty) {\n this.setState({ needsPolyfillPlaceholder: fieldIsEmpty });\n }\n }\n\n if (this.props.onValueChange) {\n this.props.onValueChange(event.target.value);\n }\n\n if (this.props.onChange) {\n this.props.onChange(event);\n }\n };\n\n private handleFocus = (event: React.FocusEvent<HTMLInputElement>) => {\n this.setState({\n focused: true,\n });\n\n if (this.props.selectAllOnFocus) {\n this.input && !isIE11 ? this.selectAll() : this.delaySelectAll();\n }\n\n if (this.props.onFocus) {\n this.props.onFocus(event);\n }\n };\n\n private handleKeyDown = (e: React.KeyboardEvent<HTMLInputElement>) => {\n if (this.props.onKeyDown) {\n this.props.onKeyDown(e);\n }\n\n const isDeleteKey = someKeys(isKeyBackspace, isKeyDelete)(e);\n\n if (!e.currentTarget.value && isDeleteKey && !e.repeat) {\n this.handleUnexpectedInput();\n }\n };\n\n private handleKeyPress = (event: React.KeyboardEvent<HTMLInputElement>) => {\n if (this.props.onKeyPress) {\n this.props.onKeyPress(event);\n }\n\n if (this.props.maxLength === event.currentTarget.value.length) {\n this.handleUnexpectedInput(event.currentTarget.value);\n }\n };\n\n private handleMaskedValueChange = (value: string) => {\n if (this.props.onValueChange) {\n this.props.onValueChange(value);\n }\n };\n\n private handleUnexpectedInput = (value: string = this.props.value || '') => {\n if (this.props.onUnexpectedInput) {\n this.props.onUnexpectedInput(value);\n } else {\n this.blink();\n }\n };\n\n private resetFocus = () => this.setState({ focused: false });\n\n private handleBlur = (event: React.FocusEvent<HTMLInputElement>) => {\n this.resetFocus();\n this.props.onBlur?.(event);\n };\n\n private renderPrefix = () => {\n const { prefix, disabled } = this.props;\n\n if (!prefix) {\n return null;\n }\n\n return (\n <span className={cx(styles.prefix(this.theme), { [styles.prefixDisabled(this.theme)]: disabled })}>{prefix}</span>\n );\n };\n\n private renderSuffix = () => {\n const { suffix, disabled } = this.props;\n\n if (!suffix) {\n return null;\n }\n\n return (\n <span className={cx(styles.suffix(this.theme), { [styles.suffixDisabled(this.theme)]: disabled })}>{suffix}</span>\n );\n };\n}\n"]}
@@ -33,7 +33,7 @@ export declare const styles: {
33
33
  rightContainer(): string;
34
34
  icon(): string;
35
35
  iconFocus(t: Theme): string;
36
- iconDisabled(): string;
36
+ iconDisabled(t: Theme): string;
37
37
  leftIconSmall(t: Theme): string;
38
38
  rightIconSmall(t: Theme): string;
39
39
  leftIconMedium(t: Theme): string;
@@ -395,9 +395,10 @@ var styles = (0, _Emotion.memoizeStyle)({
395
395
 
396
396
  },
397
397
 
398
- iconDisabled: function iconDisabled() {
399
- return (0, _Emotion.css)(_templateObject35 || (_templateObject35 = (0, _taggedTemplateLiteralLoose2.default)(["\n cursor: default;\n "])));
398
+ iconDisabled: function iconDisabled(t) {
399
+ return (0, _Emotion.css)(_templateObject35 || (_templateObject35 = (0, _taggedTemplateLiteralLoose2.default)(["\n cursor: default;\n color: ", ";\n "])),
400
400
 
401
+ t.inputIconColorDisabled);
401
402
 
402
403
  },
403
404
 
@@ -1 +1 @@
1
- {"version":3,"sources":["Input.styles.ts"],"names":["shouldCompensateFontFamily","fontFamilyCompensation","Boolean","parseInt","styles","wrapper","css","root","t","inputBackgroundClip","inputBg","inputBorderWidth","inputBorderColor","inputBorderTopColor","transitionDuration","transitionTimingFunction","inputShadow","inputColor","inputWidth","hovering","inputBorderColorHover","borderless","useDefaultColor","inputIconColor","focus","inputFocusedBg","inputBorderColorFocus","inputFocusShadow","focusFallback","inputOutlineWidth","inputFocusOutline","placeholder","inputPlaceholderColor","placeholderFocus","inputPlaceholderColorLight","placeholderDisabled","inputPlaceholderColorDisabled","input","inputTextColor","inputColorScheme","inputFocus","inputDisabled","inputTextColorDisabled","warning","inputBorderColorWarning","warningFallback","error","inputBorderColorError","errorFallback","disabled","inputDisabledBg","inputDisabledBorderColor","blink","blinkAnimation","keyframes","inputBlinkColor","sizeSmall","inputFontSizeSmall","inputLineHeightSmall","inputPaddingYSmall","inputPaddingXSmall","inputHeightSmall","inputBorderRadiusSmall","sizeSmallFallback","fontFamilyCompensationBaseline","sizeMedium","inputFontSizeMedium","inputLineHeightMedium","inputPaddingYMedium","inputPaddingXMedium","inputHeightMedium","inputBorderRadiusMedium","sizeMediumFallback","sizeLarge","inputFontSizeLarge","inputLineHeightLarge","inputHeightLarge","inputPaddingYLarge","inputPaddingXLarge","inputBorderRadiusLarge","sizeLargeFallback","prefix","prefixDisabled","suffix","suffixDisabled","sideContainer","rightContainer","icon","iconFocus","inputFocusedIconColor","iconDisabled","leftIconSmall","inputIconSizeSmall","inputIconGapSmall","rightIconSmall","leftIconMedium","inputIconSizeMedium","inputIconGapMedium","rightIconMedium","leftIconLarge","inputIconSizeLarge","inputIconGapLarge","rightIconLarge","hideBlinkingCursor"],"mappings":"oRAAA;;AAEA;AACA,iD;;AAEA,IAAMA,0BAA0B,GAAG,SAA7BA,0BAA6B,CAACC,sBAAD;AACjCC,IAAAA,OAAO,CAACC,QAAQ,CAACF,sBAAD,CAAT,CAD0B,GAAnC;;AAGO,IAAMG,MAAM,GAAG,2BAAa;AACjCC,EAAAA,OADiC,qBACvB;AACR,eAAOC,YAAP;;;;;;;;;;;;;;;;;AAiBD,GAnBgC;;AAqBjCC,EAAAA,IArBiC,gBAqB5BC,CArB4B,EAqBlB;AACb,eAAOF,YAAP;AACI,4BADJ;;;AAIqBE,IAAAA,CAAC,CAACC,mBAJvB;AAKsBD,IAAAA,CAAC,CAACE,OALxB;AAMYF,IAAAA,CAAC,CAACG,gBANd,EAMwCH,CAAC,CAACI,gBAN1C;AAOsBJ,IAAAA,CAAC,CAACK,mBAPxB;AAQ6BL,IAAAA,CAAC,CAACM,kBAR/B,EAQqDN,CAAC,CAACO,wBARvD;AASgBP,IAAAA,CAAC,CAACQ,WATlB;;AAWWR,IAAAA,CAAC,CAACS,UAXb;;;;;AAgBWT,IAAAA,CAAC,CAACU,UAhBb;;;;;;AAsBD,GA5CgC;;AA8CjCC,EAAAA,QA9CiC,oBA8CxBX,CA9CwB,EA8Cd;AACjB,eAAOF,YAAP;;AAEoB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;AAqbjCE,EAAAA,kBArbiC,gCAqbZ;AACnB,eAAOjG,YAAP;;;AAGD,GAzbgC,EAAb,CAAf,C","sourcesContent":["import { css, keyframes, memoizeStyle } from '../../lib/theming/Emotion';\nimport { Theme } from '../../lib/theming/Theme';\nimport { shift } from '../../lib/styles/DimensionFunctions';\nimport { resetText } from '../../lib/styles/Mixins';\n\nconst shouldCompensateFontFamily = (fontFamilyCompensation: string): boolean =>\n Boolean(parseInt(fontFamilyCompensation));\n\nexport const styles = memoizeStyle({\n wrapper() {\n return css`\n align-items: center;\n display: flex;\n margin: 0;\n min-width: 0;\n overflow: hidden;\n position: relative;\n text-overflow: clip;\n white-space: nowrap;\n width: 100%;\n\n &::before {\n content: '\\\\A0';\n display: inline-block;\n width: 0;\n }\n `;\n },\n\n root(t: Theme) {\n return css`\n ${resetText()};\n\n align-items: center;\n background-clip: ${t.inputBackgroundClip};\n background-color: ${t.inputBg};\n border: ${t.inputBorderWidth} solid ${t.inputBorderColor};\n border-top-color: ${t.inputBorderTopColor};\n transition: border-color ${t.transitionDuration} ${t.transitionTimingFunction};\n box-shadow: ${t.inputShadow};\n box-sizing: border-box;\n color: ${t.inputColor};\n cursor: text;\n display: inline-flex;\n outline: none;\n position: relative;\n width: ${t.inputWidth};\n\n & * {\n box-sizing: border-box;\n }\n `;\n },\n\n hovering(t: Theme) {\n return css`\n &:hover {\n border-color: ${t.inputBorderColorHover};\n }\n `;\n },\n\n borderless() {\n return css`\n box-shadow: none;\n border-color: transparent;\n background-clip: padding-box;\n `;\n },\n\n useDefaultColor(t: Theme) {\n return css`\n color: ${t.inputIconColor};\n `;\n },\n\n focus(t: Theme) {\n return css`\n background-color: ${t.inputFocusedBg};\n border-color: ${t.inputBorderColorFocus};\n box-shadow: ${t.inputFocusShadow};\n outline: none;\n z-index: 2;\n `;\n },\n\n focusFallback(t: Theme) {\n return css`\n box-shadow: none;\n outline: ${t.inputOutlineWidth} solid ${t.inputFocusOutline};\n `;\n },\n\n placeholder(t: Theme) {\n return css`\n -ms-user-select: none;\n color: ${t.inputPlaceholderColor};\n cursor: text;\n font-size: inherit;\n height: 100%;\n left: 0;\n overflow: hidden;\n pointer-events: none;\n position: absolute;\n top: 0;\n user-select: none;\n white-space: nowrap;\n width: 100%;\n `;\n },\n\n placeholderFocus(t: Theme) {\n return css`\n color: ${t.inputPlaceholderColorLight};\n `;\n },\n\n placeholderDisabled(t: Theme) {\n return css`\n color: ${t.inputPlaceholderColorDisabled};\n `;\n },\n\n input(t: Theme) {\n return css`\n -webkit-appearance: none;\n background: transparent;\n border: 0 none;\n color: ${t.inputTextColor};\n font: inherit;\n line-height: inherit;\n margin: 0;\n outline: none;\n padding: 0;\n text-overflow: clip;\n white-space: nowrap;\n width: 100%;\n color-scheme: ${t.inputColorScheme};\n\n &:-moz-placeholder {\n opacity: 1;\n }\n &::-moz-placeholder {\n opacity: 1;\n }\n &::-ms-clear {\n display: none;\n }\n &:-moz-placeholder {\n color: ${t.inputPlaceholderColor};\n }\n &::-moz-placeholder {\n color: ${t.inputPlaceholderColor};\n }\n &::placeholder {\n color: ${t.inputPlaceholderColor};\n }\n `;\n },\n\n inputFocus(t: Theme) {\n return css`\n &:-moz-placeholder {\n color: ${t.inputPlaceholderColorLight};\n }\n &::-moz-placeholder {\n color: ${t.inputPlaceholderColorLight};\n }\n &::placeholder {\n color: ${t.inputPlaceholderColorLight};\n }\n `;\n },\n\n inputDisabled(t: Theme) {\n return css`\n color: ${t.inputTextColorDisabled};\n /* fix text color in safari https://bugs.webkit.org/show_bug.cgi?id=115510 */\n -webkit-text-fill-color: ${t.inputTextColorDisabled};\n\n &:-moz-placeholder {\n -webkit-text-fill-color: ${t.inputPlaceholderColorDisabled};\n }\n &::-moz-placeholder {\n -webkit-text-fill-color: ${t.inputPlaceholderColorDisabled};\n }\n &::placeholder {\n -webkit-text-fill-color: ${t.inputPlaceholderColorDisabled};\n }\n `;\n },\n\n warning(t: Theme) {\n return css`\n border-color: ${t.inputBorderColorWarning};\n box-shadow: 0 0 0 ${t.inputOutlineWidth} ${t.inputBorderColorWarning};\n z-index: 2;\n `;\n },\n\n warningFallback(t: Theme) {\n return css`\n box-shadow: none;\n outline: ${t.inputBorderWidth} solid ${t.inputBorderColorWarning};\n `;\n },\n\n error(t: Theme) {\n return css`\n border-color: ${t.inputBorderColorError};\n box-shadow: 0 0 0 ${t.inputOutlineWidth} ${t.inputBorderColorError};\n z-index: 2;\n `;\n },\n\n errorFallback(t: Theme) {\n return css`\n box-shadow: none;\n outline: ${t.inputBorderWidth} solid ${t.inputBorderColorError};\n `;\n },\n\n disabled(t: Theme) {\n return css`\n background-color: ${t.inputDisabledBg};\n border-color: ${t.inputDisabledBorderColor};\n box-shadow: none;\n `;\n },\n\n blink(t: Theme) {\n const blinkAnimation = keyframes`\n 0% {\n background-color: ${t.inputBlinkColor};\n }\n `;\n return css`\n animation: ${blinkAnimation} 0.15s ease-in;\n `;\n },\n\n sizeSmall(t: Theme) {\n return css`\n font-size: ${t.inputFontSizeSmall};\n line-height: ${t.inputLineHeightSmall};\n padding-top: ${t.inputPaddingYSmall};\n padding-bottom: ${t.inputPaddingYSmall};\n padding-left: ${t.inputPaddingXSmall};\n padding-right: ${t.inputPaddingXSmall};\n height: ${t.inputHeightSmall};\n border-radius: ${t.inputBorderRadiusSmall};\n `;\n },\n\n sizeSmallFallback(t: Theme) {\n return css`\n padding-top: ${shift(\n t.inputPaddingYSmall,\n shouldCompensateFontFamily(t.fontFamilyCompensationBaseline) ? '-1' : '0',\n )};\n padding-bottom: ${shift(\n t.inputPaddingYSmall,\n shouldCompensateFontFamily(t.fontFamilyCompensationBaseline) ? '1' : '0',\n )};\n padding-left: ${t.inputPaddingXSmall};\n padding-right: ${t.inputPaddingXSmall};\n line-height: normal;\n `;\n },\n\n sizeMedium(t: Theme) {\n return css`\n font-size: ${t.inputFontSizeMedium};\n line-height: ${t.inputLineHeightMedium};\n padding-top: ${t.inputPaddingYMedium};\n padding-bottom: ${t.inputPaddingYMedium};\n padding-left: ${t.inputPaddingXMedium};\n padding-right: ${t.inputPaddingXMedium};\n height: ${t.inputHeightMedium};\n border-radius: ${t.inputBorderRadiusMedium};\n `;\n },\n\n sizeMediumFallback(t: Theme) {\n return css`\n padding-top: ${shift(\n t.inputPaddingYMedium,\n shouldCompensateFontFamily(t.fontFamilyCompensationBaseline) ? '-1' : '0',\n )};\n padding-bottom: ${shift(\n t.inputPaddingYMedium,\n shouldCompensateFontFamily(t.fontFamilyCompensationBaseline) ? '1' : '0',\n )};\n padding-left: ${t.inputPaddingXMedium};\n padding-right: ${t.inputPaddingXMedium};\n line-height: normal;\n `;\n },\n\n sizeLarge(t: Theme) {\n return css`\n font-size: ${t.inputFontSizeLarge};\n line-height: ${t.inputLineHeightLarge};\n height: ${t.inputHeightLarge};\n padding-top: ${shift(\n t.inputPaddingYLarge,\n shouldCompensateFontFamily(t.fontFamilyCompensationBaseline) ? '-1' : '0',\n )};\n padding-bottom: ${shift(\n t.inputPaddingYLarge,\n shouldCompensateFontFamily(t.fontFamilyCompensationBaseline) ? '1' : '0',\n )};\n padding-left: ${t.inputPaddingXLarge};\n padding-right: ${t.inputPaddingXLarge};\n border-radius: ${t.inputBorderRadiusLarge};\n `;\n },\n\n sizeLargeFallback(t: Theme) {\n return css`\n padding-top: ${shift(\n t.inputPaddingYLarge,\n shouldCompensateFontFamily(t.fontFamilyCompensationBaseline) ? '-2' : '0',\n )};\n padding-bottom: ${shift(\n t.inputPaddingYLarge,\n shouldCompensateFontFamily(t.fontFamilyCompensationBaseline) ? '2' : '0',\n )};\n padding-left: ${t.inputPaddingXLarge};\n padding-right: ${t.inputPaddingXLarge};\n line-height: normal;\n `;\n },\n\n prefix(t: Theme) {\n return css`\n color: ${t.inputPlaceholderColor};\n `;\n },\n\n prefixDisabled(t: Theme) {\n return css`\n color: ${t.inputPlaceholderColorDisabled};\n `;\n },\n\n suffix(t: Theme) {\n return css`\n color: ${t.inputPlaceholderColor};\n `;\n },\n\n suffixDisabled(t: Theme) {\n return css`\n color: ${t.inputPlaceholderColorDisabled};\n `;\n },\n\n sideContainer() {\n return css`\n align-items: center;\n display: flex;\n flex-shrink: 0;\n height: 100%;\n\n &::before {\n content: '\\\\a0';\n display: inline-block;\n width: 0;\n }\n `;\n },\n\n rightContainer() {\n return css`\n justify-self: flex-end;\n margin: 0 0 0 auto;\n padding-left: 0;\n `;\n },\n\n icon() {\n return css`\n flex-shrink: 0;\n cursor: text;\n z-index: 2;\n text-align: center;\n box-sizing: content-box !important; // fix possible \"reset.css\" problem\n `;\n },\n\n iconFocus(t: Theme) {\n return css`\n color: ${t.inputFocusedIconColor};\n `;\n },\n\n iconDisabled() {\n return css`\n cursor: default;\n `;\n },\n\n leftIconSmall(t: Theme) {\n return css`\n min-width: ${t.inputIconSizeSmall};\n padding-right: ${t.inputIconGapSmall};\n `;\n },\n\n rightIconSmall(t: Theme) {\n return css`\n min-width: ${t.inputIconSizeSmall};\n padding-left: ${t.inputIconGapSmall};\n `;\n },\n\n leftIconMedium(t: Theme) {\n return css`\n min-width: ${t.inputIconSizeMedium};\n padding-right: ${t.inputIconGapMedium};\n `;\n },\n\n rightIconMedium(t: Theme) {\n return css`\n min-width: ${t.inputIconSizeMedium};\n padding-left: ${t.inputIconGapMedium};\n `;\n },\n\n leftIconLarge(t: Theme) {\n return css`\n min-width: ${t.inputIconSizeLarge};\n padding-right: ${t.inputIconGapLarge};\n `;\n },\n\n rightIconLarge(t: Theme) {\n return css`\n min-width: ${t.inputIconSizeLarge};\n padding-left: ${t.inputIconGapLarge};\n `;\n },\n\n hideBlinkingCursor() {\n return css`\n caret-color: transparent;\n `;\n },\n});\n"]}
1
+ {"version":3,"sources":["Input.styles.ts"],"names":["shouldCompensateFontFamily","fontFamilyCompensation","Boolean","parseInt","styles","wrapper","css","root","t","inputBackgroundClip","inputBg","inputBorderWidth","inputBorderColor","inputBorderTopColor","transitionDuration","transitionTimingFunction","inputShadow","inputColor","inputWidth","hovering","inputBorderColorHover","borderless","useDefaultColor","inputIconColor","focus","inputFocusedBg","inputBorderColorFocus","inputFocusShadow","focusFallback","inputOutlineWidth","inputFocusOutline","placeholder","inputPlaceholderColor","placeholderFocus","inputPlaceholderColorLight","placeholderDisabled","inputPlaceholderColorDisabled","input","inputTextColor","inputColorScheme","inputFocus","inputDisabled","inputTextColorDisabled","warning","inputBorderColorWarning","warningFallback","error","inputBorderColorError","errorFallback","disabled","inputDisabledBg","inputDisabledBorderColor","blink","blinkAnimation","keyframes","inputBlinkColor","sizeSmall","inputFontSizeSmall","inputLineHeightSmall","inputPaddingYSmall","inputPaddingXSmall","inputHeightSmall","inputBorderRadiusSmall","sizeSmallFallback","fontFamilyCompensationBaseline","sizeMedium","inputFontSizeMedium","inputLineHeightMedium","inputPaddingYMedium","inputPaddingXMedium","inputHeightMedium","inputBorderRadiusMedium","sizeMediumFallback","sizeLarge","inputFontSizeLarge","inputLineHeightLarge","inputHeightLarge","inputPaddingYLarge","inputPaddingXLarge","inputBorderRadiusLarge","sizeLargeFallback","prefix","prefixDisabled","suffix","suffixDisabled","sideContainer","rightContainer","icon","iconFocus","inputFocusedIconColor","iconDisabled","inputIconColorDisabled","leftIconSmall","inputIconSizeSmall","inputIconGapSmall","rightIconSmall","leftIconMedium","inputIconSizeMedium","inputIconGapMedium","rightIconMedium","leftIconLarge","inputIconSizeLarge","inputIconGapLarge","rightIconLarge","hideBlinkingCursor"],"mappings":"oRAAA;;AAEA;AACA,iD;;AAEA,IAAMA,0BAA0B,GAAG,SAA7BA,0BAA6B,CAACC,sBAAD;AACjCC,IAAAA,OAAO,CAACC,QAAQ,CAACF,sBAAD,CAAT,CAD0B,GAAnC;;AAGO,IAAMG,MAAM,GAAG,2BAAa;AACjCC,EAAAA,OADiC,qBACvB;AACR,eAAOC,YAAP;;;;;;;;;;;;;;;;;AAiBD,GAnBgC;;AAqBjCC,EAAAA,IArBiC,gBAqB5BC,CArB4B,EAqBlB;AACb,eAAOF,YAAP;AACI,4BADJ;;;AAIqBE,IAAAA,CA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A/ZgC;;AAiajCC,EAAAA,eAjaiC,2BAiajB3F,CAjaiB,EAiaP;AACxB,eAAOF,YAAP;AACeE,IAAAA,CAAC,CAACyF,mBADjB;AAEkBzF,IAAAA,CAAC,CAAC0F,kBAFpB;;AAID,GAtagC;;AAwajCE,EAAAA,aAxaiC,yBAwanB5F,CAxamB,EAwaT;AACtB,eAAOF,YAAP;AACeE,IAAAA,CAAC,CAAC6F,kBADjB;AAEmB7F,IAAAA,CAAC,CAAC8F,iBAFrB;;AAID,GA7agC;;AA+ajCC,EAAAA,cA/aiC,0BA+alB/F,CA/akB,EA+aR;AACvB,eAAOF,YAAP;AACeE,IAAAA,CAAC,CAAC6F,kBADjB;AAEkB7F,IAAAA,CAAC,CAAC8F,iBAFpB;;AAID,GApbgC;;AAsbjCE,EAAAA,kBAtbiC,gCAsbZ;AACnB,eAAOlG,YAAP;;;AAGD,GA1bgC,EAAb,CAAf,C","sourcesContent":["import { css, keyframes, memoizeStyle } from '../../lib/theming/Emotion';\nimport { Theme } from '../../lib/theming/Theme';\nimport { shift } from '../../lib/styles/DimensionFunctions';\nimport { resetText } from '../../lib/styles/Mixins';\n\nconst shouldCompensateFontFamily = (fontFamilyCompensation: string): boolean =>\n Boolean(parseInt(fontFamilyCompensation));\n\nexport const styles = memoizeStyle({\n wrapper() {\n return css`\n align-items: center;\n display: flex;\n margin: 0;\n min-width: 0;\n overflow: hidden;\n position: relative;\n text-overflow: clip;\n white-space: nowrap;\n width: 100%;\n\n &::before {\n content: '\\\\A0';\n display: inline-block;\n width: 0;\n }\n `;\n },\n\n root(t: Theme) {\n return css`\n ${resetText()};\n\n align-items: center;\n background-clip: ${t.inputBackgroundClip};\n background-color: ${t.inputBg};\n border: ${t.inputBorderWidth} solid ${t.inputBorderColor};\n border-top-color: ${t.inputBorderTopColor};\n transition: border-color ${t.transitionDuration} ${t.transitionTimingFunction};\n box-shadow: ${t.inputShadow};\n box-sizing: border-box;\n color: ${t.inputColor};\n cursor: text;\n display: inline-flex;\n outline: none;\n position: relative;\n width: ${t.inputWidth};\n\n & * {\n box-sizing: border-box;\n }\n `;\n },\n\n hovering(t: Theme) {\n return css`\n &:hover {\n border-color: ${t.inputBorderColorHover};\n }\n `;\n },\n\n borderless() {\n return css`\n box-shadow: none;\n border-color: transparent;\n background-clip: padding-box;\n `;\n },\n\n useDefaultColor(t: Theme) {\n return css`\n color: ${t.inputIconColor};\n `;\n },\n\n focus(t: Theme) {\n return css`\n background-color: ${t.inputFocusedBg};\n border-color: ${t.inputBorderColorFocus};\n box-shadow: ${t.inputFocusShadow};\n outline: none;\n z-index: 2;\n `;\n },\n\n focusFallback(t: Theme) {\n return css`\n box-shadow: none;\n outline: ${t.inputOutlineWidth} solid ${t.inputFocusOutline};\n `;\n },\n\n placeholder(t: Theme) {\n return css`\n -ms-user-select: none;\n color: ${t.inputPlaceholderColor};\n cursor: text;\n font-size: inherit;\n height: 100%;\n left: 0;\n overflow: hidden;\n pointer-events: none;\n position: absolute;\n top: 0;\n user-select: none;\n white-space: nowrap;\n width: 100%;\n `;\n },\n\n placeholderFocus(t: Theme) {\n return css`\n color: ${t.inputPlaceholderColorLight};\n `;\n },\n\n placeholderDisabled(t: Theme) {\n return css`\n color: ${t.inputPlaceholderColorDisabled};\n `;\n },\n\n input(t: Theme) {\n return css`\n -webkit-appearance: none;\n background: transparent;\n border: 0 none;\n color: ${t.inputTextColor};\n font: inherit;\n line-height: inherit;\n margin: 0;\n outline: none;\n padding: 0;\n text-overflow: clip;\n white-space: nowrap;\n width: 100%;\n color-scheme: ${t.inputColorScheme};\n\n &:-moz-placeholder {\n opacity: 1;\n }\n &::-moz-placeholder {\n opacity: 1;\n }\n &::-ms-clear {\n display: none;\n }\n &:-moz-placeholder {\n color: ${t.inputPlaceholderColor};\n }\n &::-moz-placeholder {\n color: ${t.inputPlaceholderColor};\n }\n &::placeholder {\n color: ${t.inputPlaceholderColor};\n }\n `;\n },\n\n inputFocus(t: Theme) {\n return css`\n &:-moz-placeholder {\n color: ${t.inputPlaceholderColorLight};\n }\n &::-moz-placeholder {\n color: ${t.inputPlaceholderColorLight};\n }\n &::placeholder {\n color: ${t.inputPlaceholderColorLight};\n }\n `;\n },\n\n inputDisabled(t: Theme) {\n return css`\n color: ${t.inputTextColorDisabled};\n /* fix text color in safari https://bugs.webkit.org/show_bug.cgi?id=115510 */\n -webkit-text-fill-color: ${t.inputTextColorDisabled};\n\n &:-moz-placeholder {\n -webkit-text-fill-color: ${t.inputPlaceholderColorDisabled};\n }\n &::-moz-placeholder {\n -webkit-text-fill-color: ${t.inputPlaceholderColorDisabled};\n }\n &::placeholder {\n -webkit-text-fill-color: ${t.inputPlaceholderColorDisabled};\n }\n `;\n },\n\n warning(t: Theme) {\n return css`\n border-color: ${t.inputBorderColorWarning};\n box-shadow: 0 0 0 ${t.inputOutlineWidth} ${t.inputBorderColorWarning};\n z-index: 2;\n `;\n },\n\n warningFallback(t: Theme) {\n return css`\n box-shadow: none;\n outline: ${t.inputBorderWidth} solid ${t.inputBorderColorWarning};\n `;\n },\n\n error(t: Theme) {\n return css`\n border-color: ${t.inputBorderColorError};\n box-shadow: 0 0 0 ${t.inputOutlineWidth} ${t.inputBorderColorError};\n z-index: 2;\n `;\n },\n\n errorFallback(t: Theme) {\n return css`\n box-shadow: none;\n outline: ${t.inputBorderWidth} solid ${t.inputBorderColorError};\n `;\n },\n\n disabled(t: Theme) {\n return css`\n background-color: ${t.inputDisabledBg};\n border-color: ${t.inputDisabledBorderColor};\n box-shadow: none;\n `;\n },\n\n blink(t: Theme) {\n const blinkAnimation = keyframes`\n 0% {\n background-color: ${t.inputBlinkColor};\n }\n `;\n return css`\n animation: ${blinkAnimation} 0.15s ease-in;\n `;\n },\n\n sizeSmall(t: Theme) {\n return css`\n font-size: ${t.inputFontSizeSmall};\n line-height: ${t.inputLineHeightSmall};\n padding-top: ${t.inputPaddingYSmall};\n padding-bottom: ${t.inputPaddingYSmall};\n padding-left: ${t.inputPaddingXSmall};\n padding-right: ${t.inputPaddingXSmall};\n height: ${t.inputHeightSmall};\n border-radius: ${t.inputBorderRadiusSmall};\n `;\n },\n\n sizeSmallFallback(t: Theme) {\n return css`\n padding-top: ${shift(\n t.inputPaddingYSmall,\n shouldCompensateFontFamily(t.fontFamilyCompensationBaseline) ? '-1' : '0',\n )};\n padding-bottom: ${shift(\n t.inputPaddingYSmall,\n shouldCompensateFontFamily(t.fontFamilyCompensationBaseline) ? '1' : '0',\n )};\n padding-left: ${t.inputPaddingXSmall};\n padding-right: ${t.inputPaddingXSmall};\n line-height: normal;\n `;\n },\n\n sizeMedium(t: Theme) {\n return css`\n font-size: ${t.inputFontSizeMedium};\n line-height: ${t.inputLineHeightMedium};\n padding-top: ${t.inputPaddingYMedium};\n padding-bottom: ${t.inputPaddingYMedium};\n padding-left: ${t.inputPaddingXMedium};\n padding-right: ${t.inputPaddingXMedium};\n height: ${t.inputHeightMedium};\n border-radius: ${t.inputBorderRadiusMedium};\n `;\n },\n\n sizeMediumFallback(t: Theme) {\n return css`\n padding-top: ${shift(\n t.inputPaddingYMedium,\n shouldCompensateFontFamily(t.fontFamilyCompensationBaseline) ? '-1' : '0',\n )};\n padding-bottom: ${shift(\n t.inputPaddingYMedium,\n shouldCompensateFontFamily(t.fontFamilyCompensationBaseline) ? '1' : '0',\n )};\n padding-left: ${t.inputPaddingXMedium};\n padding-right: ${t.inputPaddingXMedium};\n line-height: normal;\n `;\n },\n\n sizeLarge(t: Theme) {\n return css`\n font-size: ${t.inputFontSizeLarge};\n line-height: ${t.inputLineHeightLarge};\n height: ${t.inputHeightLarge};\n padding-top: ${shift(\n t.inputPaddingYLarge,\n shouldCompensateFontFamily(t.fontFamilyCompensationBaseline) ? '-1' : '0',\n )};\n padding-bottom: ${shift(\n t.inputPaddingYLarge,\n shouldCompensateFontFamily(t.fontFamilyCompensationBaseline) ? '1' : '0',\n )};\n padding-left: ${t.inputPaddingXLarge};\n padding-right: ${t.inputPaddingXLarge};\n border-radius: ${t.inputBorderRadiusLarge};\n `;\n },\n\n sizeLargeFallback(t: Theme) {\n return css`\n padding-top: ${shift(\n t.inputPaddingYLarge,\n shouldCompensateFontFamily(t.fontFamilyCompensationBaseline) ? '-2' : '0',\n )};\n padding-bottom: ${shift(\n t.inputPaddingYLarge,\n shouldCompensateFontFamily(t.fontFamilyCompensationBaseline) ? '2' : '0',\n )};\n padding-left: ${t.inputPaddingXLarge};\n padding-right: ${t.inputPaddingXLarge};\n line-height: normal;\n `;\n },\n\n prefix(t: Theme) {\n return css`\n color: ${t.inputPlaceholderColor};\n `;\n },\n\n prefixDisabled(t: Theme) {\n return css`\n color: ${t.inputPlaceholderColorDisabled};\n `;\n },\n\n suffix(t: Theme) {\n return css`\n color: ${t.inputPlaceholderColor};\n `;\n },\n\n suffixDisabled(t: Theme) {\n return css`\n color: ${t.inputPlaceholderColorDisabled};\n `;\n },\n\n sideContainer() {\n return css`\n align-items: center;\n display: flex;\n flex-shrink: 0;\n height: 100%;\n\n &::before {\n content: '\\\\a0';\n display: inline-block;\n width: 0;\n }\n `;\n },\n\n rightContainer() {\n return css`\n justify-self: flex-end;\n margin: 0 0 0 auto;\n padding-left: 0;\n `;\n },\n\n icon() {\n return css`\n flex-shrink: 0;\n cursor: text;\n z-index: 2;\n text-align: center;\n box-sizing: content-box !important; // fix possible \"reset.css\" problem\n `;\n },\n\n iconFocus(t: Theme) {\n return css`\n color: ${t.inputFocusedIconColor};\n `;\n },\n\n iconDisabled(t: Theme) {\n return css`\n cursor: default;\n color: ${t.inputIconColorDisabled};\n `;\n },\n\n leftIconSmall(t: Theme) {\n return css`\n min-width: ${t.inputIconSizeSmall};\n padding-right: ${t.inputIconGapSmall};\n `;\n },\n\n rightIconSmall(t: Theme) {\n return css`\n min-width: ${t.inputIconSizeSmall};\n padding-left: ${t.inputIconGapSmall};\n `;\n },\n\n leftIconMedium(t: Theme) {\n return css`\n min-width: ${t.inputIconSizeMedium};\n padding-right: ${t.inputIconGapMedium};\n `;\n },\n\n rightIconMedium(t: Theme) {\n return css`\n min-width: ${t.inputIconSizeMedium};\n padding-left: ${t.inputIconGapMedium};\n `;\n },\n\n leftIconLarge(t: Theme) {\n return css`\n min-width: ${t.inputIconSizeLarge};\n padding-right: ${t.inputIconGapLarge};\n `;\n },\n\n rightIconLarge(t: Theme) {\n return css`\n min-width: ${t.inputIconSizeLarge};\n padding-left: ${t.inputIconGapLarge};\n `;\n },\n\n hideBlinkingCursor() {\n return css`\n caret-color: transparent;\n `;\n },\n});\n"]}
@@ -5,7 +5,7 @@ export declare const stylesLayout: {
5
5
  aside(): string;
6
6
  icon(t: Theme): string;
7
7
  iconFocus(t: Theme): string;
8
- iconDisabled(): string;
8
+ iconDisabled(t: Theme): string;
9
9
  text(t: Theme): string;
10
10
  textDisabled(t: Theme): string;
11
11
  };
@@ -37,9 +37,10 @@ var stylesLayout = (0, _Emotion.memoizeStyle)({
37
37
  t.inputFocusedIconColor);
38
38
 
39
39
  },
40
- iconDisabled: function iconDisabled() {
41
- return (0, _Emotion.css)(_templateObject5 || (_templateObject5 = (0, _taggedTemplateLiteralLoose2.default)(["\n cursor: default;\n "])));
40
+ iconDisabled: function iconDisabled(t) {
41
+ return (0, _Emotion.css)(_templateObject5 || (_templateObject5 = (0, _taggedTemplateLiteralLoose2.default)(["\n cursor: default;\n color: ", ";\n "])),
42
42
 
43
+ t.inputIconColorDisabled);
43
44
 
44
45
  },
45
46
  text: function text(t) {
@@ -1 +1 @@
1
- {"version":3,"sources":["InputLayout.styles.ts"],"names":["stylesLayout","root","t","styles","input","css","aside","ZERO_WIDTH_SPACE_CSS","icon","inputIconColor","iconFocus","inputFocusedIconColor","iconDisabled","text","inputPlaceholderColor","textDisabled","inputPlaceholderColorDisabled"],"mappings":"0RAAA;AACA;;AAEA,wC;;AAEO,IAAMA,YAAY,GAAG,2BAAa;AACvCC,EAAAA,IADuC,gBAClCC,CADkC,EACxB;AACb,WAAOC,cAAOF,IAAP,CAAYC,CAAZ,CAAP;AACD,GAHsC;AAIvCE,EAAAA,KAJuC,mBAI/B;AACN,eAAOC,YAAP;;;;;;;AAOD,GAZsC;AAavCC,EAAAA,KAbuC,mBAa/B;AACN,eAAOD,YAAP;;;;;;AAMgBE,+BANhB;;;AASD,GAvBsC;AAwBvCC,EAAAA,IAxBuC,gBAwBlCN,CAxBkC,EAwBxB;AACb,eAAOG,YAAP;AACWH,IAAAA,CAAC,CAACO,cADb;;AAGD,GA5BsC;AA6BvCC,EAAAA,SA7BuC,qBA6B7BR,CA7B6B,EA6BnB;AAClB,eAAOG,YAAP;AACWH,IAAAA,CAAC,CAACS,qBADb;;AAGD,GAjCsC;AAkCvCC,EAAAA,YAlCuC,0BAkCxB;AACb,eAAOP,YAAP;;;AAGD,GAtCsC;AAuCvCQ,EAAAA,IAvCuC,gBAuClCX,CAvCkC,EAuCxB;AACb,eAAOG,YAAP;AACWH,IAAAA,CAAC,CAACY,qBADb;;AAGD,GA3CsC;AA4CvCC,EAAAA,YA5CuC,wBA4C1Bb,CA5C0B,EA4ChB;AACrB,eAAOG,YAAP;AACWH,IAAAA,CAAC,CAACc,6BADb;;AAGD,GAhDsC,EAAb,CAArB,C","sourcesContent":["import { ZERO_WIDTH_SPACE_CSS } from '../../../lib/chars';\nimport { css, memoizeStyle } from '../../../lib/theming/Emotion';\nimport { Theme } from '../../../lib/theming/Theme';\nimport { styles } from '../Input.styles';\n\nexport const stylesLayout = memoizeStyle({\n root(t: Theme) {\n return styles.root(t);\n },\n input() {\n return css`\n min-width: 0;\n overflow: hidden;\n position: relative;\n width: 100%;\n display: flex;\n `;\n },\n aside() {\n return css`\n display: inline-flex;\n align-items: center;\n flex-shrink: 0;\n\n &::before {\n content: '${ZERO_WIDTH_SPACE_CSS}';\n }\n `;\n },\n icon(t: Theme) {\n return css`\n color: ${t.inputIconColor};\n `;\n },\n iconFocus(t: Theme) {\n return css`\n color: ${t.inputFocusedIconColor};\n `;\n },\n iconDisabled() {\n return css`\n cursor: default;\n `;\n },\n text(t: Theme) {\n return css`\n color: ${t.inputPlaceholderColor};\n `;\n },\n textDisabled(t: Theme) {\n return css`\n color: ${t.inputPlaceholderColorDisabled};\n `;\n },\n});\n"]}
1
+ {"version":3,"sources":["InputLayout.styles.ts"],"names":["stylesLayout","root","t","styles","input","css","aside","ZERO_WIDTH_SPACE_CSS","icon","inputIconColor","iconFocus","inputFocusedIconColor","iconDisabled","inputIconColorDisabled","text","inputPlaceholderColor","textDisabled","inputPlaceholderColorDisabled"],"mappings":"0RAAA;AACA;;AAEA,wC;;AAEO,IAAMA,YAAY,GAAG,2BAAa;AACvCC,EAAAA,IADuC,gBAClCC,CADkC,EACxB;AACb,WAAOC,cAAOF,IAAP,CAAYC,CAAZ,CAAP;AACD,GAHsC;AAIvCE,EAAAA,KAJuC,mBAI/B;AACN,eAAOC,YAAP;;;;;;;AAOD,GAZsC;AAavCC,EAAAA,KAbuC,mBAa/B;AACN,eAAOD,YAAP;;;;;;AAMgBE,+BANhB;;;AASD,GAvBsC;AAwBvCC,EAAAA,IAxBuC,gBAwBlCN,CAxBkC,EAwBxB;AACb,eAAOG,YAAP;AACWH,IAAAA,CAAC,CAACO,cADb;;AAGD,GA5BsC;AA6BvCC,EAAAA,SA7BuC,qBA6B7BR,CA7B6B,EA6BnB;AAClB,eAAOG,YAAP;AACWH,IAAAA,CAAC,CAACS,qBADb;;AAGD,GAjCsC;AAkCvCC,EAAAA,YAlCuC,wBAkC1BV,CAlC0B,EAkChB;AACrB,eAAOG,YAAP;;AAEWH,IAAAA,CAAC,CAACW,sBAFb;;AAID,GAvCsC;AAwCvCC,EAAAA,IAxCuC,gBAwClCZ,CAxCkC,EAwCxB;AACb,eAAOG,YAAP;AACWH,IAAAA,CAAC,CAACa,qBADb;;AAGD,GA5CsC;AA6CvCC,EAAAA,YA7CuC,wBA6C1Bd,CA7C0B,EA6ChB;AACrB,eAAOG,YAAP;AACWH,IAAAA,CAAC,CAACe,6BADb;;AAGD,GAjDsC,EAAb,CAArB,C","sourcesContent":["import { ZERO_WIDTH_SPACE_CSS } from '../../../lib/chars';\nimport { css, memoizeStyle } from '../../../lib/theming/Emotion';\nimport { Theme } from '../../../lib/theming/Theme';\nimport { styles } from '../Input.styles';\n\nexport const stylesLayout = memoizeStyle({\n root(t: Theme) {\n return styles.root(t);\n },\n input() {\n return css`\n min-width: 0;\n overflow: hidden;\n position: relative;\n width: 100%;\n display: flex;\n `;\n },\n aside() {\n return css`\n display: inline-flex;\n align-items: center;\n flex-shrink: 0;\n\n &::before {\n content: '${ZERO_WIDTH_SPACE_CSS}';\n }\n `;\n },\n icon(t: Theme) {\n return css`\n color: ${t.inputIconColor};\n `;\n },\n iconFocus(t: Theme) {\n return css`\n color: ${t.inputFocusedIconColor};\n `;\n },\n iconDisabled(t: Theme) {\n return css`\n cursor: default;\n color: ${t.inputIconColorDisabled};\n `;\n },\n text(t: Theme) {\n return css`\n color: ${t.inputPlaceholderColor};\n `;\n },\n textDisabled(t: Theme) {\n return css`\n color: ${t.inputPlaceholderColorDisabled};\n `;\n },\n});\n"]}
@@ -51,7 +51,7 @@ var InputLayoutAsideIcon = function InputLayoutAsideIcon(_ref) {var _ref$icon =
51
51
  _InputLayout.stylesLayout.aside(),
52
52
  _InputLayout.stylesLayout.icon(theme),
53
53
  focused && _InputLayout.stylesLayout.iconFocus(theme),
54
- disabled && _InputLayout.stylesLayout.iconDisabled()) },
54
+ disabled && _InputLayout.stylesLayout.iconDisabled(theme)) },
55
55
 
56
56
 
57
57
  _icon));