@salutejs/plasma-new-hope 0.167.0-canary.1459.11348453591.0 → 0.167.0-canary.1475.11350736392.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (466) hide show
  1. package/cjs/components/Autocomplete/Autocomplete.css +19 -34
  2. package/cjs/components/Autocomplete/Autocomplete.js +2 -6
  3. package/cjs/components/Autocomplete/Autocomplete.js.map +1 -1
  4. package/cjs/components/Combobox/ComboboxNew/Combobox.css +18 -38
  5. package/cjs/components/Combobox/ComboboxNew/ui/Inner/Inner.css +18 -38
  6. package/cjs/components/Combobox/ComboboxNew/ui/Inner/ui/Item/Item.css +18 -38
  7. package/cjs/components/DatePicker/RangeDate/RangeDate.css +19 -34
  8. package/cjs/components/DatePicker/RangeDate/RangeDate.js +77 -15
  9. package/cjs/components/DatePicker/RangeDate/RangeDate.js.map +1 -1
  10. package/cjs/components/DatePicker/RangeDate/RangeDatePopover/RangeDatePopover.css +18 -33
  11. package/cjs/components/DatePicker/RangeDate/RangeDatePopover/RangeDatePopover.js +14 -7
  12. package/cjs/components/DatePicker/RangeDate/RangeDatePopover/RangeDatePopover.js.map +1 -1
  13. package/cjs/components/DatePicker/RangeDate/variations/_size/base.js +1 -1
  14. package/cjs/components/DatePicker/RangeDate/variations/_size/base.js.map +1 -1
  15. package/cjs/components/DatePicker/RangeDate/variations/_size/base_1d0sbzw.css +1 -0
  16. package/cjs/components/DatePicker/SingleDate/SingleDate.css +20 -35
  17. package/cjs/components/DatePicker/SingleDate/SingleDate.js +33 -8
  18. package/cjs/components/DatePicker/SingleDate/SingleDate.js.map +1 -1
  19. package/cjs/components/DatePicker/hooks/useDatePicker.js +20 -48
  20. package/cjs/components/DatePicker/hooks/useDatePicker.js.map +1 -1
  21. package/cjs/components/DatePicker/hooks/useKeyboardNavigation.js +11 -1
  22. package/cjs/components/DatePicker/hooks/useKeyboardNavigation.js.map +1 -1
  23. package/cjs/components/DatePicker/utils/dateHelper.js +31 -0
  24. package/cjs/components/DatePicker/utils/dateHelper.js.map +1 -1
  25. package/cjs/components/Range/Range.css +19 -39
  26. package/cjs/components/Slider/Slider.css +19 -39
  27. package/cjs/components/Slider/Slider.js +0 -2
  28. package/cjs/components/Slider/Slider.js.map +1 -1
  29. package/cjs/components/Slider/components/Double/Double.css +19 -39
  30. package/cjs/components/TextArea/TextArea.js +30 -110
  31. package/cjs/components/TextArea/TextArea.js.map +1 -1
  32. package/cjs/components/TextArea/TextArea.styles.js +63 -160
  33. package/cjs/components/TextArea/TextArea.styles.js.map +1 -1
  34. package/cjs/components/TextArea/TextArea.styles_es0miz.css +11 -0
  35. package/cjs/components/TextArea/TextArea.tokens.js +4 -43
  36. package/cjs/components/TextArea/TextArea.tokens.js.map +1 -1
  37. package/cjs/components/TextArea/hooks/useAutoResize.js +4 -2
  38. package/cjs/components/TextArea/hooks/useAutoResize.js.map +1 -1
  39. package/cjs/components/TextArea/variations/_clear/base.js +1 -1
  40. package/cjs/components/TextArea/variations/_clear/base.js.map +1 -1
  41. package/cjs/components/TextArea/variations/_clear/base_vidplj.css +1 -0
  42. package/cjs/components/TextArea/variations/_view/base.js +1 -1
  43. package/cjs/components/TextArea/variations/_view/base.js.map +1 -1
  44. package/cjs/components/TextArea/variations/_view/base_td55th.css +1 -0
  45. package/cjs/components/TextField/TextField.js +9 -98
  46. package/cjs/components/TextField/TextField.js.map +1 -1
  47. package/cjs/components/TextField/TextField.styles.js +23 -76
  48. package/cjs/components/TextField/TextField.styles.js.map +1 -1
  49. package/cjs/components/TextField/TextField.styles_1d2ryq.css +15 -0
  50. package/cjs/components/TextField/TextField.tokens.js +1 -40
  51. package/cjs/components/TextField/TextField.tokens.js.map +1 -1
  52. package/cjs/components/TextField/variations/_clear/base.js +1 -1
  53. package/cjs/components/TextField/variations/_clear/base.js.map +1 -1
  54. package/cjs/components/TextField/variations/_clear/base_rit6gc.css +1 -0
  55. package/cjs/components/TextField/variations/_disabled/base.js +1 -1
  56. package/cjs/components/TextField/variations/_disabled/{base_4d3opa.css → base_2tv0nz.css} +1 -1
  57. package/cjs/components/TextField/variations/_label-placement/base.js +1 -1
  58. package/cjs/components/TextField/variations/_label-placement/base.js.map +1 -1
  59. package/cjs/components/TextField/variations/_label-placement/base_1ghihns.css +1 -0
  60. package/cjs/components/TextField/variations/_read-only/base.js +1 -1
  61. package/cjs/components/TextField/variations/_read-only/base.js.map +1 -1
  62. package/cjs/components/TextField/variations/_read-only/base_1n7tghz.css +1 -0
  63. package/cjs/components/TextField/variations/_size/base.js +1 -1
  64. package/cjs/components/TextField/variations/_size/base.js.map +1 -1
  65. package/cjs/components/TextField/variations/_size/base_1h8l0kj.css +1 -0
  66. package/cjs/components/TextField/variations/_view/base.js +1 -1
  67. package/cjs/components/TextField/variations/_view/base.js.map +1 -1
  68. package/cjs/components/TextField/variations/_view/base_1noe46b.css +1 -0
  69. package/cjs/components/TextFieldGroup/TextFieldGroup.css +1 -1
  70. package/cjs/components/TextFieldGroup/variations/_shape/base.js +1 -1
  71. package/cjs/components/TextFieldGroup/variations/_shape/base_1e0je21.css +1 -0
  72. package/cjs/index.css +35 -55
  73. package/emotion/cjs/components/Autocomplete/Autocomplete.js +2 -6
  74. package/emotion/cjs/components/DatePicker/RangeDate/RangeDate.js +77 -15
  75. package/emotion/cjs/components/DatePicker/RangeDate/RangeDatePopover/RangeDatePopover.js +14 -7
  76. package/emotion/cjs/components/DatePicker/RangeDate/variations/_size/base.js +1 -1
  77. package/emotion/cjs/components/DatePicker/SingleDate/SingleDate.js +33 -8
  78. package/emotion/cjs/components/DatePicker/hooks/useDatePicker.js +20 -48
  79. package/emotion/cjs/components/DatePicker/hooks/useKeyboardNavigation.js +11 -1
  80. package/emotion/cjs/components/DatePicker/utils/dateHelper.js +31 -1
  81. package/emotion/cjs/components/TextArea/TextArea.js +35 -113
  82. package/emotion/cjs/components/TextArea/TextArea.styles.js +41 -99
  83. package/emotion/cjs/components/TextArea/TextArea.template-doc.mdx +1 -6
  84. package/emotion/cjs/components/TextArea/TextArea.tokens.js +4 -43
  85. package/emotion/cjs/components/TextArea/hooks/useAutoResize.js +4 -2
  86. package/emotion/cjs/components/TextArea/variations/_clear/base.js +1 -1
  87. package/emotion/cjs/components/TextArea/variations/_view/base.js +1 -2
  88. package/emotion/cjs/components/TextField/TextField.js +12 -100
  89. package/emotion/cjs/components/TextField/TextField.styles.js +37 -84
  90. package/emotion/cjs/components/TextField/TextField.template-doc.mdx +1 -7
  91. package/emotion/cjs/components/TextField/TextField.tokens.js +1 -40
  92. package/emotion/cjs/components/TextField/variations/_clear/base.js +1 -1
  93. package/emotion/cjs/components/TextField/variations/_label-placement/base.js +1 -1
  94. package/emotion/cjs/components/TextField/variations/_read-only/base.js +1 -1
  95. package/emotion/cjs/components/TextField/variations/_size/base.js +1 -1
  96. package/emotion/cjs/components/TextField/variations/_view/base.js +1 -1
  97. package/emotion/cjs/components/_Icon/index.js +1 -8
  98. package/emotion/cjs/examples/plasma_b2c/components/TextArea/TextArea.config.js +10 -19
  99. package/emotion/cjs/examples/plasma_b2c/components/TextArea/TextArea.stories.tsx +0 -70
  100. package/emotion/cjs/examples/plasma_b2c/components/TextField/TextField.config.js +13 -22
  101. package/emotion/cjs/examples/plasma_b2c/components/TextField/TextField.stories.tsx +1 -71
  102. package/emotion/cjs/examples/plasma_web/components/TextArea/TextArea.config.js +10 -19
  103. package/emotion/cjs/examples/plasma_web/components/TextArea/TextArea.stories.tsx +0 -70
  104. package/emotion/cjs/examples/plasma_web/components/TextField/TextField.config.js +13 -22
  105. package/emotion/cjs/examples/plasma_web/components/TextField/TextField.stories.tsx +10 -80
  106. package/emotion/es/components/Autocomplete/Autocomplete.js +2 -6
  107. package/emotion/es/components/DatePicker/RangeDate/RangeDate.js +79 -17
  108. package/emotion/es/components/DatePicker/RangeDate/RangeDatePopover/RangeDatePopover.js +14 -7
  109. package/emotion/es/components/DatePicker/RangeDate/variations/_size/base.js +1 -1
  110. package/emotion/es/components/DatePicker/SingleDate/SingleDate.js +34 -9
  111. package/emotion/es/components/DatePicker/hooks/useDatePicker.js +21 -49
  112. package/emotion/es/components/DatePicker/hooks/useKeyboardNavigation.js +11 -1
  113. package/emotion/es/components/DatePicker/utils/dateHelper.js +30 -0
  114. package/emotion/es/components/TextArea/TextArea.js +36 -114
  115. package/emotion/es/components/TextArea/TextArea.styles.js +40 -98
  116. package/emotion/es/components/TextArea/TextArea.template-doc.mdx +1 -6
  117. package/emotion/es/components/TextArea/TextArea.tokens.js +4 -43
  118. package/emotion/es/components/TextArea/hooks/useAutoResize.js +4 -2
  119. package/emotion/es/components/TextArea/variations/_clear/base.js +2 -2
  120. package/emotion/es/components/TextArea/variations/_view/base.js +1 -2
  121. package/emotion/es/components/TextField/TextField.js +12 -100
  122. package/emotion/es/components/TextField/TextField.styles.js +36 -83
  123. package/emotion/es/components/TextField/TextField.template-doc.mdx +1 -7
  124. package/emotion/es/components/TextField/TextField.tokens.js +1 -40
  125. package/emotion/es/components/TextField/variations/_clear/base.js +2 -2
  126. package/emotion/es/components/TextField/variations/_label-placement/base.js +1 -1
  127. package/emotion/es/components/TextField/variations/_read-only/base.js +2 -2
  128. package/emotion/es/components/TextField/variations/_size/base.js +2 -2
  129. package/emotion/es/components/TextField/variations/_view/base.js +2 -2
  130. package/emotion/es/components/_Icon/index.js +1 -2
  131. package/emotion/es/examples/plasma_b2c/components/TextArea/TextArea.config.js +10 -19
  132. package/emotion/es/examples/plasma_b2c/components/TextArea/TextArea.stories.tsx +0 -70
  133. package/emotion/es/examples/plasma_b2c/components/TextField/TextField.config.js +13 -22
  134. package/emotion/es/examples/plasma_b2c/components/TextField/TextField.stories.tsx +1 -71
  135. package/emotion/es/examples/plasma_web/components/TextArea/TextArea.config.js +10 -19
  136. package/emotion/es/examples/plasma_web/components/TextArea/TextArea.stories.tsx +0 -70
  137. package/emotion/es/examples/plasma_web/components/TextField/TextField.config.js +13 -22
  138. package/emotion/es/examples/plasma_web/components/TextField/TextField.stories.tsx +10 -80
  139. package/es/components/Autocomplete/Autocomplete.css +19 -34
  140. package/es/components/Autocomplete/Autocomplete.js +2 -6
  141. package/es/components/Autocomplete/Autocomplete.js.map +1 -1
  142. package/es/components/Combobox/ComboboxNew/Combobox.css +18 -38
  143. package/es/components/Combobox/ComboboxNew/ui/Inner/Inner.css +18 -38
  144. package/es/components/Combobox/ComboboxNew/ui/Inner/ui/Item/Item.css +18 -38
  145. package/es/components/DatePicker/RangeDate/RangeDate.css +19 -34
  146. package/es/components/DatePicker/RangeDate/RangeDate.js +79 -17
  147. package/es/components/DatePicker/RangeDate/RangeDate.js.map +1 -1
  148. package/es/components/DatePicker/RangeDate/RangeDatePopover/RangeDatePopover.css +18 -33
  149. package/es/components/DatePicker/RangeDate/RangeDatePopover/RangeDatePopover.js +14 -7
  150. package/es/components/DatePicker/RangeDate/RangeDatePopover/RangeDatePopover.js.map +1 -1
  151. package/es/components/DatePicker/RangeDate/variations/_size/base.js +1 -1
  152. package/es/components/DatePicker/RangeDate/variations/_size/base.js.map +1 -1
  153. package/es/components/DatePicker/RangeDate/variations/_size/base_1d0sbzw.css +1 -0
  154. package/es/components/DatePicker/SingleDate/SingleDate.css +20 -35
  155. package/es/components/DatePicker/SingleDate/SingleDate.js +34 -9
  156. package/es/components/DatePicker/SingleDate/SingleDate.js.map +1 -1
  157. package/es/components/DatePicker/hooks/useDatePicker.js +21 -49
  158. package/es/components/DatePicker/hooks/useDatePicker.js.map +1 -1
  159. package/es/components/DatePicker/hooks/useKeyboardNavigation.js +11 -1
  160. package/es/components/DatePicker/hooks/useKeyboardNavigation.js.map +1 -1
  161. package/es/components/DatePicker/utils/dateHelper.js +31 -1
  162. package/es/components/DatePicker/utils/dateHelper.js.map +1 -1
  163. package/es/components/Range/Range.css +19 -39
  164. package/es/components/Slider/Slider.css +19 -39
  165. package/es/components/Slider/Slider.js +0 -2
  166. package/es/components/Slider/Slider.js.map +1 -1
  167. package/es/components/Slider/components/Double/Double.css +19 -39
  168. package/es/components/TextArea/TextArea.js +34 -114
  169. package/es/components/TextArea/TextArea.js.map +1 -1
  170. package/es/components/TextArea/TextArea.styles.js +64 -155
  171. package/es/components/TextArea/TextArea.styles.js.map +1 -1
  172. package/es/components/TextArea/TextArea.styles_es0miz.css +11 -0
  173. package/es/components/TextArea/TextArea.tokens.js +4 -43
  174. package/es/components/TextArea/TextArea.tokens.js.map +1 -1
  175. package/es/components/TextArea/hooks/useAutoResize.js +4 -2
  176. package/es/components/TextArea/hooks/useAutoResize.js.map +1 -1
  177. package/es/components/TextArea/variations/_clear/base.js +1 -1
  178. package/es/components/TextArea/variations/_clear/base.js.map +1 -1
  179. package/es/components/TextArea/variations/_clear/base_vidplj.css +1 -0
  180. package/es/components/TextArea/variations/_view/base.js +1 -1
  181. package/es/components/TextArea/variations/_view/base.js.map +1 -1
  182. package/es/components/TextArea/variations/_view/base_td55th.css +1 -0
  183. package/es/components/TextField/TextField.js +11 -100
  184. package/es/components/TextField/TextField.js.map +1 -1
  185. package/es/components/TextField/TextField.styles.js +24 -71
  186. package/es/components/TextField/TextField.styles.js.map +1 -1
  187. package/es/components/TextField/TextField.styles_1d2ryq.css +15 -0
  188. package/es/components/TextField/TextField.tokens.js +1 -40
  189. package/es/components/TextField/TextField.tokens.js.map +1 -1
  190. package/es/components/TextField/variations/_clear/base.js +1 -1
  191. package/es/components/TextField/variations/_clear/base.js.map +1 -1
  192. package/es/components/TextField/variations/_clear/base_rit6gc.css +1 -0
  193. package/es/components/TextField/variations/_disabled/base.js +1 -1
  194. package/es/components/TextField/variations/_disabled/{base_4d3opa.css → base_2tv0nz.css} +1 -1
  195. package/es/components/TextField/variations/_label-placement/base.js +1 -1
  196. package/es/components/TextField/variations/_label-placement/base.js.map +1 -1
  197. package/es/components/TextField/variations/_label-placement/base_1ghihns.css +1 -0
  198. package/es/components/TextField/variations/_read-only/base.js +1 -1
  199. package/es/components/TextField/variations/_read-only/base.js.map +1 -1
  200. package/es/components/TextField/variations/_read-only/base_1n7tghz.css +1 -0
  201. package/es/components/TextField/variations/_size/base.js +1 -1
  202. package/es/components/TextField/variations/_size/base.js.map +1 -1
  203. package/es/components/TextField/variations/_size/base_1h8l0kj.css +1 -0
  204. package/es/components/TextField/variations/_view/base.js +1 -1
  205. package/es/components/TextField/variations/_view/base.js.map +1 -1
  206. package/es/components/TextField/variations/_view/base_1noe46b.css +1 -0
  207. package/es/components/TextFieldGroup/TextFieldGroup.css +1 -1
  208. package/es/components/TextFieldGroup/variations/_shape/base.js +1 -1
  209. package/es/components/TextFieldGroup/variations/_shape/base_1e0je21.css +1 -0
  210. package/es/index.css +35 -55
  211. package/package.json +2 -2
  212. package/styled-components/cjs/components/Autocomplete/Autocomplete.js +2 -6
  213. package/styled-components/cjs/components/DatePicker/RangeDate/RangeDate.js +77 -15
  214. package/styled-components/cjs/components/DatePicker/RangeDate/RangeDatePopover/RangeDatePopover.js +14 -7
  215. package/styled-components/cjs/components/DatePicker/RangeDate/variations/_size/base.js +1 -1
  216. package/styled-components/cjs/components/DatePicker/SingleDate/SingleDate.js +33 -8
  217. package/styled-components/cjs/components/DatePicker/hooks/useDatePicker.js +20 -48
  218. package/styled-components/cjs/components/DatePicker/hooks/useKeyboardNavigation.js +11 -1
  219. package/styled-components/cjs/components/DatePicker/utils/dateHelper.js +31 -1
  220. package/styled-components/cjs/components/TextArea/TextArea.js +34 -112
  221. package/styled-components/cjs/components/TextArea/TextArea.styles.js +42 -85
  222. package/styled-components/cjs/components/TextArea/TextArea.template-doc.mdx +1 -6
  223. package/styled-components/cjs/components/TextArea/TextArea.tokens.js +4 -43
  224. package/styled-components/cjs/components/TextArea/hooks/useAutoResize.js +4 -2
  225. package/styled-components/cjs/components/TextArea/variations/_clear/base.js +1 -1
  226. package/styled-components/cjs/components/TextArea/variations/_view/base.js +1 -2
  227. package/styled-components/cjs/components/TextField/TextField.js +11 -99
  228. package/styled-components/cjs/components/TextField/TextField.styles.js +21 -46
  229. package/styled-components/cjs/components/TextField/TextField.template-doc.mdx +1 -7
  230. package/styled-components/cjs/components/TextField/TextField.tokens.js +1 -40
  231. package/styled-components/cjs/components/TextField/variations/_clear/base.js +1 -1
  232. package/styled-components/cjs/components/TextField/variations/_label-placement/base.js +1 -1
  233. package/styled-components/cjs/components/TextField/variations/_read-only/base.js +1 -1
  234. package/styled-components/cjs/components/TextField/variations/_size/base.js +1 -1
  235. package/styled-components/cjs/components/TextField/variations/_view/base.js +1 -1
  236. package/styled-components/cjs/components/_Icon/index.js +1 -8
  237. package/styled-components/cjs/examples/plasma_b2c/components/TextArea/TextArea.config.js +9 -18
  238. package/styled-components/cjs/examples/plasma_b2c/components/TextArea/TextArea.stories.tsx +0 -70
  239. package/styled-components/cjs/examples/plasma_b2c/components/TextField/TextField.config.js +9 -18
  240. package/styled-components/cjs/examples/plasma_b2c/components/TextField/TextField.stories.tsx +1 -71
  241. package/styled-components/cjs/examples/plasma_web/components/TextArea/TextArea.config.js +9 -18
  242. package/styled-components/cjs/examples/plasma_web/components/TextArea/TextArea.stories.tsx +0 -70
  243. package/styled-components/cjs/examples/plasma_web/components/TextField/TextField.config.js +9 -18
  244. package/styled-components/cjs/examples/plasma_web/components/TextField/TextField.stories.tsx +10 -80
  245. package/styled-components/es/components/Autocomplete/Autocomplete.js +2 -6
  246. package/styled-components/es/components/DatePicker/RangeDate/RangeDate.js +79 -17
  247. package/styled-components/es/components/DatePicker/RangeDate/RangeDatePopover/RangeDatePopover.js +14 -7
  248. package/styled-components/es/components/DatePicker/RangeDate/variations/_size/base.js +1 -1
  249. package/styled-components/es/components/DatePicker/SingleDate/SingleDate.js +34 -9
  250. package/styled-components/es/components/DatePicker/hooks/useDatePicker.js +21 -49
  251. package/styled-components/es/components/DatePicker/hooks/useKeyboardNavigation.js +11 -1
  252. package/styled-components/es/components/DatePicker/utils/dateHelper.js +30 -0
  253. package/styled-components/es/components/TextArea/TextArea.js +35 -113
  254. package/styled-components/es/components/TextArea/TextArea.styles.js +41 -84
  255. package/styled-components/es/components/TextArea/TextArea.template-doc.mdx +1 -6
  256. package/styled-components/es/components/TextArea/TextArea.tokens.js +4 -43
  257. package/styled-components/es/components/TextArea/hooks/useAutoResize.js +4 -2
  258. package/styled-components/es/components/TextArea/variations/_clear/base.js +2 -2
  259. package/styled-components/es/components/TextArea/variations/_view/base.js +1 -2
  260. package/styled-components/es/components/TextField/TextField.js +11 -99
  261. package/styled-components/es/components/TextField/TextField.styles.js +20 -45
  262. package/styled-components/es/components/TextField/TextField.template-doc.mdx +1 -7
  263. package/styled-components/es/components/TextField/TextField.tokens.js +1 -40
  264. package/styled-components/es/components/TextField/variations/_clear/base.js +2 -2
  265. package/styled-components/es/components/TextField/variations/_label-placement/base.js +1 -1
  266. package/styled-components/es/components/TextField/variations/_read-only/base.js +2 -2
  267. package/styled-components/es/components/TextField/variations/_size/base.js +2 -2
  268. package/styled-components/es/components/TextField/variations/_view/base.js +2 -2
  269. package/styled-components/es/components/_Icon/index.js +1 -2
  270. package/styled-components/es/examples/plasma_b2c/components/TextArea/TextArea.config.js +9 -18
  271. package/styled-components/es/examples/plasma_b2c/components/TextArea/TextArea.stories.tsx +0 -70
  272. package/styled-components/es/examples/plasma_b2c/components/TextField/TextField.config.js +9 -18
  273. package/styled-components/es/examples/plasma_b2c/components/TextField/TextField.stories.tsx +1 -71
  274. package/styled-components/es/examples/plasma_web/components/TextArea/TextArea.config.js +9 -18
  275. package/styled-components/es/examples/plasma_web/components/TextArea/TextArea.stories.tsx +0 -70
  276. package/styled-components/es/examples/plasma_web/components/TextField/TextField.config.js +9 -18
  277. package/styled-components/es/examples/plasma_web/components/TextField/TextField.stories.tsx +10 -80
  278. package/types/components/Autocomplete/Autocomplete.d.ts.map +1 -1
  279. package/types/components/Autocomplete/ui/TextField/TextField.styles.d.ts +0 -424
  280. package/types/components/Autocomplete/ui/TextField/TextField.styles.d.ts.map +1 -1
  281. package/types/components/Combobox/ComboboxNew/ui/Target/Target.styles.d.ts +0 -424
  282. package/types/components/Combobox/ComboboxNew/ui/Target/Target.styles.d.ts.map +1 -1
  283. package/types/components/DatePicker/DatePickerBase.types.d.ts +8 -6
  284. package/types/components/DatePicker/DatePickerBase.types.d.ts.map +1 -1
  285. package/types/components/DatePicker/RangeDate/RangeDate.d.ts +10 -10
  286. package/types/components/DatePicker/RangeDate/RangeDate.d.ts.map +1 -1
  287. package/types/components/DatePicker/RangeDate/RangeDate.types.d.ts +16 -6
  288. package/types/components/DatePicker/RangeDate/RangeDate.types.d.ts.map +1 -1
  289. package/types/components/DatePicker/RangeDate/RangeDatePopover/RangeDatePopover.d.ts +1 -1
  290. package/types/components/DatePicker/RangeDate/RangeDatePopover/RangeDatePopover.d.ts.map +1 -1
  291. package/types/components/DatePicker/RangeDate/RangeDatePopover/RangeDatePopover.types.d.ts +2 -1
  292. package/types/components/DatePicker/RangeDate/RangeDatePopover/RangeDatePopover.types.d.ts.map +1 -1
  293. package/types/components/DatePicker/RangeDate/variations/_size/base.d.ts.map +1 -1
  294. package/types/components/DatePicker/SingleDate/SingleDate.d.ts +2 -2
  295. package/types/components/DatePicker/SingleDate/SingleDate.d.ts.map +1 -1
  296. package/types/components/DatePicker/SingleDate/SingleDate.styles.d.ts +0 -424
  297. package/types/components/DatePicker/SingleDate/SingleDate.styles.d.ts.map +1 -1
  298. package/types/components/DatePicker/SingleDate/SingleDate.types.d.ts +14 -4
  299. package/types/components/DatePicker/SingleDate/SingleDate.types.d.ts.map +1 -1
  300. package/types/components/DatePicker/hooks/useDatePicker.d.ts +2 -3
  301. package/types/components/DatePicker/hooks/useDatePicker.d.ts.map +1 -1
  302. package/types/components/DatePicker/hooks/useKeyboardNavigation.d.ts +3 -1
  303. package/types/components/DatePicker/hooks/useKeyboardNavigation.d.ts.map +1 -1
  304. package/types/components/DatePicker/utils/dateHelper.d.ts +10 -0
  305. package/types/components/DatePicker/utils/dateHelper.d.ts.map +1 -1
  306. package/types/components/Popover/Popover.types.d.ts +1 -1
  307. package/types/components/Range/Range.styles.d.ts +0 -424
  308. package/types/components/Range/Range.styles.d.ts.map +1 -1
  309. package/types/components/Slider/components/Double/Double.styles.d.ts +0 -424
  310. package/types/components/Slider/components/Double/Double.styles.d.ts.map +1 -1
  311. package/types/components/TextArea/TextArea.d.ts +3 -9
  312. package/types/components/TextArea/TextArea.d.ts.map +1 -1
  313. package/types/components/TextArea/TextArea.styles.d.ts +1 -11
  314. package/types/components/TextArea/TextArea.styles.d.ts.map +1 -1
  315. package/types/components/TextArea/TextArea.tokens.d.ts +0 -39
  316. package/types/components/TextArea/TextArea.tokens.d.ts.map +1 -1
  317. package/types/components/TextArea/TextArea.types.d.ts +3 -83
  318. package/types/components/TextArea/TextArea.types.d.ts.map +1 -1
  319. package/types/components/TextArea/hooks/useAutoResize.d.ts.map +1 -1
  320. package/types/components/TextArea/variations/_clear/base.d.ts.map +1 -1
  321. package/types/components/TextArea/variations/_view/base.d.ts.map +1 -1
  322. package/types/components/TextField/TextField.d.ts +3 -9
  323. package/types/components/TextField/TextField.d.ts.map +1 -1
  324. package/types/components/TextField/TextField.styles.d.ts +0 -8
  325. package/types/components/TextField/TextField.styles.d.ts.map +1 -1
  326. package/types/components/TextField/TextField.tokens.d.ts +0 -39
  327. package/types/components/TextField/TextField.tokens.d.ts.map +1 -1
  328. package/types/components/TextField/TextField.types.d.ts +2 -78
  329. package/types/components/TextField/TextField.types.d.ts.map +1 -1
  330. package/types/components/TextField/variations/_clear/base.d.ts.map +1 -1
  331. package/types/components/TextField/variations/_label-placement/base.d.ts.map +1 -1
  332. package/types/components/TextField/variations/_read-only/base.d.ts.map +1 -1
  333. package/types/components/TextField/variations/_size/base.d.ts.map +1 -1
  334. package/types/components/TextField/variations/_view/base.d.ts.map +1 -1
  335. package/types/components/_Icon/index.d.ts +0 -1
  336. package/types/components/_Icon/index.d.ts.map +1 -1
  337. package/types/examples/plasma_b2c/components/DatePicker/DatePicker.d.ts +6 -6
  338. package/types/examples/plasma_b2c/components/DatePicker/DatePicker.d.ts.map +1 -1
  339. package/types/examples/plasma_b2c/components/Mask/Mask.d.ts +12 -788
  340. package/types/examples/plasma_b2c/components/Mask/Mask.d.ts.map +1 -1
  341. package/types/examples/plasma_b2c/components/TextArea/TextArea.config.d.ts +0 -9
  342. package/types/examples/plasma_b2c/components/TextArea/TextArea.config.d.ts.map +1 -1
  343. package/types/examples/plasma_b2c/components/TextArea/TextArea.d.ts +0 -473
  344. package/types/examples/plasma_b2c/components/TextArea/TextArea.d.ts.map +1 -1
  345. package/types/examples/plasma_b2c/components/TextField/TextField.config.d.ts +0 -9
  346. package/types/examples/plasma_b2c/components/TextField/TextField.config.d.ts.map +1 -1
  347. package/types/examples/plasma_b2c/components/TextField/TextField.d.ts +0 -433
  348. package/types/examples/plasma_b2c/components/TextField/TextField.d.ts.map +1 -1
  349. package/types/examples/plasma_web/components/DatePicker/DatePicker.d.ts +6 -6
  350. package/types/examples/plasma_web/components/DatePicker/DatePicker.d.ts.map +1 -1
  351. package/types/examples/plasma_web/components/Mask/Mask.d.ts +12 -788
  352. package/types/examples/plasma_web/components/Mask/Mask.d.ts.map +1 -1
  353. package/types/examples/plasma_web/components/TextArea/TextArea.config.d.ts +0 -9
  354. package/types/examples/plasma_web/components/TextArea/TextArea.config.d.ts.map +1 -1
  355. package/types/examples/plasma_web/components/TextArea/TextArea.d.ts +0 -473
  356. package/types/examples/plasma_web/components/TextArea/TextArea.d.ts.map +1 -1
  357. package/types/examples/plasma_web/components/TextField/TextField.config.d.ts +0 -9
  358. package/types/examples/plasma_web/components/TextField/TextField.config.d.ts.map +1 -1
  359. package/types/examples/plasma_web/components/TextField/TextField.d.ts +0 -433
  360. package/types/examples/plasma_web/components/TextField/TextField.d.ts.map +1 -1
  361. package/cjs/components/DatePicker/RangeDate/variations/_size/base_1911nyw.css +0 -1
  362. package/cjs/components/TextArea/TextArea.styles_mcxlmk.css +0 -17
  363. package/cjs/components/TextArea/variations/_clear/base_1ezvvtt.css +0 -1
  364. package/cjs/components/TextArea/variations/_hint-size/base.js +0 -9
  365. package/cjs/components/TextArea/variations/_hint-size/base.js.map +0 -1
  366. package/cjs/components/TextArea/variations/_hint-size/base_1ipgv90.css +0 -1
  367. package/cjs/components/TextArea/variations/_hint-view/base.js +0 -9
  368. package/cjs/components/TextArea/variations/_hint-view/base.js.map +0 -1
  369. package/cjs/components/TextArea/variations/_hint-view/base_111a0qe.css +0 -1
  370. package/cjs/components/TextArea/variations/_view/base_1xgrm3x.css +0 -1
  371. package/cjs/components/TextField/TextField.styles_17xt45g.css +0 -21
  372. package/cjs/components/TextField/variations/_clear/base_1pkwm4m.css +0 -1
  373. package/cjs/components/TextField/variations/_hint-size/base.js +0 -9
  374. package/cjs/components/TextField/variations/_hint-size/base.js.map +0 -1
  375. package/cjs/components/TextField/variations/_hint-size/base_1x99605.css +0 -1
  376. package/cjs/components/TextField/variations/_hint-view/base.js +0 -9
  377. package/cjs/components/TextField/variations/_hint-view/base.js.map +0 -1
  378. package/cjs/components/TextField/variations/_hint-view/base_l8etux.css +0 -1
  379. package/cjs/components/TextField/variations/_label-placement/base_3domm.css +0 -1
  380. package/cjs/components/TextField/variations/_read-only/base_17ypmu7.css +0 -1
  381. package/cjs/components/TextField/variations/_size/base_1xdmaqh.css +0 -1
  382. package/cjs/components/TextField/variations/_view/base_qhyte8.css +0 -1
  383. package/cjs/components/TextFieldGroup/variations/_shape/base_52bndd.css +0 -1
  384. package/cjs/components/_Icon/Icon.assets/InfoCircleOutline.js +0 -23
  385. package/cjs/components/_Icon/Icon.assets/InfoCircleOutline.js.map +0 -1
  386. package/cjs/components/_Icon/Icons/IconInfoCircleOutline.js +0 -23
  387. package/cjs/components/_Icon/Icons/IconInfoCircleOutline.js.map +0 -1
  388. package/emotion/cjs/components/TextArea/variations/_hint-size/base.js +0 -11
  389. package/emotion/cjs/components/TextArea/variations/_hint-size/tokens.json +0 -21
  390. package/emotion/cjs/components/TextArea/variations/_hint-view/base.js +0 -11
  391. package/emotion/cjs/components/TextArea/variations/_hint-view/tokens.json +0 -5
  392. package/emotion/cjs/components/TextField/variations/_hint-size/base.js +0 -11
  393. package/emotion/cjs/components/TextField/variations/_hint-size/tokens.json +0 -21
  394. package/emotion/cjs/components/TextField/variations/_hint-view/base.js +0 -11
  395. package/emotion/cjs/components/TextField/variations/_hint-view/tokens.json +0 -5
  396. package/emotion/cjs/components/_Icon/Icon.assets/InfoCircleOutline.js +0 -22
  397. package/emotion/cjs/components/_Icon/Icons/IconInfoCircleOutline.js +0 -22
  398. package/emotion/es/components/TextArea/variations/_hint-size/base.js +0 -5
  399. package/emotion/es/components/TextArea/variations/_hint-size/tokens.json +0 -21
  400. package/emotion/es/components/TextArea/variations/_hint-view/base.js +0 -5
  401. package/emotion/es/components/TextArea/variations/_hint-view/tokens.json +0 -5
  402. package/emotion/es/components/TextField/variations/_hint-size/base.js +0 -5
  403. package/emotion/es/components/TextField/variations/_hint-size/tokens.json +0 -21
  404. package/emotion/es/components/TextField/variations/_hint-view/base.js +0 -5
  405. package/emotion/es/components/TextField/variations/_hint-view/tokens.json +0 -5
  406. package/emotion/es/components/_Icon/Icon.assets/InfoCircleOutline.js +0 -15
  407. package/emotion/es/components/_Icon/Icons/IconInfoCircleOutline.js +0 -15
  408. package/es/components/DatePicker/RangeDate/variations/_size/base_1911nyw.css +0 -1
  409. package/es/components/TextArea/TextArea.styles_mcxlmk.css +0 -17
  410. package/es/components/TextArea/variations/_clear/base_1ezvvtt.css +0 -1
  411. package/es/components/TextArea/variations/_hint-size/base.js +0 -5
  412. package/es/components/TextArea/variations/_hint-size/base.js.map +0 -1
  413. package/es/components/TextArea/variations/_hint-size/base_1ipgv90.css +0 -1
  414. package/es/components/TextArea/variations/_hint-view/base.js +0 -5
  415. package/es/components/TextArea/variations/_hint-view/base.js.map +0 -1
  416. package/es/components/TextArea/variations/_hint-view/base_111a0qe.css +0 -1
  417. package/es/components/TextArea/variations/_view/base_1xgrm3x.css +0 -1
  418. package/es/components/TextField/TextField.styles_17xt45g.css +0 -21
  419. package/es/components/TextField/variations/_clear/base_1pkwm4m.css +0 -1
  420. package/es/components/TextField/variations/_hint-size/base.js +0 -5
  421. package/es/components/TextField/variations/_hint-size/base.js.map +0 -1
  422. package/es/components/TextField/variations/_hint-size/base_1x99605.css +0 -1
  423. package/es/components/TextField/variations/_hint-view/base.js +0 -5
  424. package/es/components/TextField/variations/_hint-view/base.js.map +0 -1
  425. package/es/components/TextField/variations/_hint-view/base_l8etux.css +0 -1
  426. package/es/components/TextField/variations/_label-placement/base_3domm.css +0 -1
  427. package/es/components/TextField/variations/_read-only/base_17ypmu7.css +0 -1
  428. package/es/components/TextField/variations/_size/base_1xdmaqh.css +0 -1
  429. package/es/components/TextField/variations/_view/base_qhyte8.css +0 -1
  430. package/es/components/TextFieldGroup/variations/_shape/base_52bndd.css +0 -1
  431. package/es/components/_Icon/Icon.assets/InfoCircleOutline.js +0 -19
  432. package/es/components/_Icon/Icon.assets/InfoCircleOutline.js.map +0 -1
  433. package/es/components/_Icon/Icons/IconInfoCircleOutline.js +0 -19
  434. package/es/components/_Icon/Icons/IconInfoCircleOutline.js.map +0 -1
  435. package/styled-components/cjs/components/TextArea/variations/_hint-size/base.js +0 -11
  436. package/styled-components/cjs/components/TextArea/variations/_hint-size/tokens.json +0 -21
  437. package/styled-components/cjs/components/TextArea/variations/_hint-view/base.js +0 -11
  438. package/styled-components/cjs/components/TextArea/variations/_hint-view/tokens.json +0 -5
  439. package/styled-components/cjs/components/TextField/variations/_hint-size/base.js +0 -11
  440. package/styled-components/cjs/components/TextField/variations/_hint-size/tokens.json +0 -21
  441. package/styled-components/cjs/components/TextField/variations/_hint-view/base.js +0 -11
  442. package/styled-components/cjs/components/TextField/variations/_hint-view/tokens.json +0 -5
  443. package/styled-components/cjs/components/_Icon/Icon.assets/InfoCircleOutline.js +0 -22
  444. package/styled-components/cjs/components/_Icon/Icons/IconInfoCircleOutline.js +0 -22
  445. package/styled-components/es/components/TextArea/variations/_hint-size/base.js +0 -5
  446. package/styled-components/es/components/TextArea/variations/_hint-size/tokens.json +0 -21
  447. package/styled-components/es/components/TextArea/variations/_hint-view/base.js +0 -5
  448. package/styled-components/es/components/TextArea/variations/_hint-view/tokens.json +0 -5
  449. package/styled-components/es/components/TextField/variations/_hint-size/base.js +0 -5
  450. package/styled-components/es/components/TextField/variations/_hint-size/tokens.json +0 -21
  451. package/styled-components/es/components/TextField/variations/_hint-view/base.js +0 -5
  452. package/styled-components/es/components/TextField/variations/_hint-view/tokens.json +0 -5
  453. package/styled-components/es/components/_Icon/Icon.assets/InfoCircleOutline.js +0 -15
  454. package/styled-components/es/components/_Icon/Icons/IconInfoCircleOutline.js +0 -15
  455. package/types/components/TextArea/variations/_hint-size/base.d.ts +0 -2
  456. package/types/components/TextArea/variations/_hint-size/base.d.ts.map +0 -1
  457. package/types/components/TextArea/variations/_hint-view/base.d.ts +0 -2
  458. package/types/components/TextArea/variations/_hint-view/base.d.ts.map +0 -1
  459. package/types/components/TextField/variations/_hint-size/base.d.ts +0 -2
  460. package/types/components/TextField/variations/_hint-size/base.d.ts.map +0 -1
  461. package/types/components/TextField/variations/_hint-view/base.d.ts +0 -2
  462. package/types/components/TextField/variations/_hint-view/base.d.ts.map +0 -1
  463. package/types/components/_Icon/Icon.assets/InfoCircleOutline.d.ts +0 -4
  464. package/types/components/_Icon/Icon.assets/InfoCircleOutline.d.ts.map +0 -1
  465. package/types/components/_Icon/Icons/IconInfoCircleOutline.d.ts +0 -4
  466. package/types/components/_Icon/Icons/IconInfoCircleOutline.d.ts.map +0 -1
@@ -1,11 +1,9 @@
1
1
  import { classes } from '../DatePicker.tokens';
2
- import { formatCalendarValue, formatInputValue, getDateFromFormat, getMaskedDateOnInput } from '../utils/dateHelper';
3
- import { customDayjs } from '../../../utils/datejs';
2
+ import { formatCalendarValue, formatInputValue, getDateFromFormat, getMaskedDateOnInput, validateDateWithFullMonth } from '../utils/dateHelper';
4
3
  export var useDatePicker = function useDatePicker(_ref) {
5
4
  var currentValue = _ref.currentValue,
6
5
  setInputValue = _ref.setInputValue,
7
6
  setCalendarValue = _ref.setCalendarValue,
8
- setIsInnerOpen = _ref.setIsInnerOpen,
9
7
  dateFormatDelimiter = _ref.dateFormatDelimiter,
10
8
  format = _ref.format,
11
9
  _ref$lang = _ref.lang,
@@ -15,24 +13,12 @@ export var useDatePicker = function useDatePicker(_ref) {
15
13
  maskWithFormat = _ref.maskWithFormat,
16
14
  valueError = _ref.valueError,
17
15
  valueSuccess = _ref.valueSuccess,
18
- inputRef = _ref.inputRef,
19
16
  name = _ref.name,
20
- onToggle = _ref.onToggle,
21
17
  onChangeValue = _ref.onChangeValue,
22
18
  onCommitDate = _ref.onCommitDate,
23
19
  onChange = _ref.onChange;
24
20
  var datePickerErrorClass = valueError ? classes.datePickerError : undefined;
25
21
  var datePickerSuccessClass = valueSuccess ? classes.datePickerSuccess : undefined;
26
- var handleToggle = function handleToggle(opened, event) {
27
- if (disabled || readOnly) {
28
- return;
29
- }
30
- var isCalendarOpen = event.target === (inputRef === null || inputRef === void 0 ? void 0 : inputRef.current) ? true : opened;
31
- if (onToggle) {
32
- return onToggle(isCalendarOpen, event);
33
- }
34
- setIsInnerOpen(isCalendarOpen);
35
- };
36
22
  var handleChangeValue = function handleChangeValue(event) {
37
23
  if (disabled || readOnly) {
38
24
  return;
@@ -55,24 +41,14 @@ export var useDatePicker = function useDatePicker(_ref) {
55
41
  });
56
42
  return;
57
43
  }
58
-
59
- /**
60
- * NOTE: если в формате даты есть месяц в полном названии или сокращенном,
61
- * нужно дополнительно проводить валидацию на полноту введенной даты.
62
- * Иначе dayjs циклически будет пытаться отформатировать некорректную дату.
63
- */
64
- var hasMonthFullName = /M{3,4}/g.test(format);
65
- var isValidMonth;
66
- var isLengthEqual;
67
- if (hasMonthFullName) {
68
- customDayjs.locale(lang);
69
- var firstIndexOfMonth = format.indexOf('M');
70
- var lastIndexOfMonth = newValue.indexOf(dateFormatDelimiter(), firstIndexOfMonth);
71
- var fullMonthName = !lastIndexOfMonth ? newValue.slice(firstIndexOfMonth) : newValue.slice(firstIndexOfMonth, lastIndexOfMonth);
72
- var monthFormatting = format.replace(/[^M]/g, '');
73
- isValidMonth = customDayjs("01 ".concat(fullMonthName, " 1970"), "DD ".concat(monthFormatting, " YYYY"), true).isValid();
74
- isLengthEqual = format.length - monthFormatting.length === newValue.length - fullMonthName.length;
75
- }
44
+ var _validateDateWithFull = validateDateWithFullMonth({
45
+ currentValue: newValue,
46
+ format: format,
47
+ lang: lang
48
+ }),
49
+ hasMonthFullName = _validateDateWithFull.hasMonthFullName,
50
+ isValidMonth = _validateDateWithFull.isValidMonth,
51
+ isLengthEqual = _validateDateWithFull.isLengthEqual;
76
52
  if (!hasMonthFullName && (newValue === null || newValue === void 0 ? void 0 : newValue.length) === (format === null || format === void 0 ? void 0 : format.length) || isValidMonth && isLengthEqual) {
77
53
  setCalendarValue(formatCalendarValue(newValue, format, lang));
78
54
  }
@@ -102,20 +78,18 @@ export var useDatePicker = function useDatePicker(_ref) {
102
78
  return onCommitDate === null || onCommitDate === void 0 ? void 0 : onCommitDate('', false, true);
103
79
  }
104
80
  if (isCalendarValue) {
105
- setCalendarValue(formatCalendarValue(date, format, lang));
106
- setInputValue(formatInputValue({
81
+ var _formattedInputValue = formatInputValue({
107
82
  value: date,
108
83
  format: format,
109
84
  lang: lang
110
- }));
85
+ });
86
+ setCalendarValue(formatCalendarValue(date, format, lang));
87
+ setInputValue(_formattedInputValue);
111
88
  onCommitDate === null || onCommitDate === void 0 || onCommitDate(date, false, true, dateInfo);
89
+ onChangeValue === null || onChangeValue === void 0 || onChangeValue(null, _formattedInputValue);
112
90
  onChange === null || onChange === void 0 || onChange({
113
91
  target: {
114
- value: formatInputValue({
115
- value: date,
116
- format: format,
117
- lang: lang
118
- }),
92
+ value: _formattedInputValue,
119
93
  name: name
120
94
  }
121
95
  });
@@ -126,19 +100,18 @@ export var useDatePicker = function useDatePicker(_ref) {
126
100
  newDate = _getDateFromFormat.value,
127
101
  isError = _getDateFromFormat.isError,
128
102
  isSuccess = _getDateFromFormat.isSuccess;
129
- setCalendarValue(formatCalendarValue(newDate, format, lang));
130
- setInputValue(formatInputValue({
103
+ var formattedInputValue = formatInputValue({
131
104
  value: newDate,
132
105
  format: format,
133
106
  lang: lang
134
- }));
107
+ });
108
+ setCalendarValue(formatCalendarValue(newDate, format, lang));
109
+ setInputValue(formattedInputValue);
135
110
  onCommitDate === null || onCommitDate === void 0 || onCommitDate(newDate, isError, isSuccess);
111
+ onChangeValue === null || onChangeValue === void 0 || onChangeValue(null, formattedInputValue);
136
112
  onChange === null || onChange === void 0 || onChange({
137
113
  target: {
138
- value: formatInputValue({
139
- value: date,
140
- format: format
141
- }),
114
+ value: formattedInputValue,
142
115
  name: name
143
116
  }
144
117
  });
@@ -146,7 +119,6 @@ export var useDatePicker = function useDatePicker(_ref) {
146
119
  return {
147
120
  datePickerErrorClass: datePickerErrorClass,
148
121
  datePickerSuccessClass: datePickerSuccessClass,
149
- handleToggle: handleToggle,
150
122
  handleChangeValue: handleChangeValue,
151
123
  handleCommitDate: handleCommitDate
152
124
  };
@@ -1,8 +1,10 @@
1
1
  export var keys = {
2
- Space: 'Space'
2
+ Space: 'Space',
3
+ Escape: 'Escape'
3
4
  };
4
5
  export var useKeyNavigation = function useKeyNavigation(_ref) {
5
6
  var isCalendarOpen = _ref.isCalendarOpen,
7
+ closeOnEsc = _ref.closeOnEsc,
6
8
  onToggle = _ref.onToggle;
7
9
  var onKeyDown = function onKeyDown(event) {
8
10
  switch (event.code) {
@@ -14,6 +16,14 @@ export var useKeyNavigation = function useKeyNavigation(_ref) {
14
16
  }
15
17
  break;
16
18
  }
19
+ case keys.Escape:
20
+ {
21
+ if (isCalendarOpen && closeOnEsc) {
22
+ event.preventDefault();
23
+ onToggle(false, event);
24
+ }
25
+ break;
26
+ }
17
27
  default:
18
28
  {
19
29
  break;
@@ -78,4 +78,34 @@ export var getMaskedDateOnInput = function getMaskedDateOnInput(value, format, d
78
78
  return value + delimiter;
79
79
  }
80
80
  return value;
81
+ };
82
+ export var validateDateWithFullMonth = function validateDateWithFullMonth(_ref2) {
83
+ var currentValue = _ref2.currentValue,
84
+ format = _ref2.format,
85
+ lang = _ref2.lang;
86
+ /**
87
+ * NOTE: если в формате даты есть месяц в полном названии или сокращенном,
88
+ * нужно дополнительно проводить валидацию на полноту введенной даты.
89
+ * Иначе dayjs циклически будет пытаться отформатировать некорректную дату.
90
+ */
91
+ var hasMonthFullName = /M{3,4}/g.test(format);
92
+ if (!hasMonthFullName) {
93
+ return {
94
+ hasMonthFullName: hasMonthFullName,
95
+ isValidMonth: false,
96
+ isLengthEqual: false
97
+ };
98
+ }
99
+ customDayjs.locale(lang);
100
+ var firstIndexOfMonth = format.indexOf('M');
101
+ var lastIndexOfMonth = currentValue.indexOf(getDateFormatDelimiter(format), firstIndexOfMonth);
102
+ var fullMonthName = !lastIndexOfMonth ? currentValue.slice(firstIndexOfMonth) : currentValue.slice(firstIndexOfMonth, lastIndexOfMonth);
103
+ var monthFormatting = format.replace(/[^M]/g, '');
104
+ var isValidMonth = customDayjs("01 ".concat(fullMonthName, " 1970"), "DD ".concat(monthFormatting, " YYYY"), true).isValid();
105
+ var isLengthEqual = format.length - monthFormatting.length === currentValue.length - fullMonthName.length;
106
+ return {
107
+ hasMonthFullName: hasMonthFullName,
108
+ isValidMonth: isValidMonth,
109
+ isLengthEqual: isLengthEqual
110
+ };
81
111
  };
@@ -1,6 +1,6 @@
1
1
  function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
2
- var _IconInfoCircleOutlin;
3
- var _excluded = ["helperText", "status", "resize", "rightHelper", "leftHelper", "contentRight", "autoResize", "minAuto", "maxAuto", "label", "labelPlacement", "titleCaption", "placeholder", "defaultValue", "height", "width", "value", "disabled", "required", "requiredPlacement", "optional", "clear", "hasDivider", "size", "view", "id", "style", "className", "readOnly", "rows", "cols", "hasHint", "hintTrigger", "hintText", "hintView", "hintSize", "hintTargetIcon", "hintPlacement", "hintHasArrow", "hintOffset", "hintWidth", "hintContentLeft", "onChange"];
2
+ var _excluded = ["helperText", "status", "resize", "rightHelper", "leftHelper", "contentRight", "autoResize", "minAuto", "maxAuto", "label", "labelPlacement", "placeholder", "defaultValue", "height", "width", "value", "disabled", "required", "requiredPlacement", "optional", "clear", "hasDivider", "size", "view", "id", "style", "className", "readOnly", "rows", "cols", "onChange"];
3
+ function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
4
4
  function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }
5
5
  function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
6
6
  function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
@@ -10,7 +10,6 @@ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t =
10
10
  function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
11
11
  function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
12
12
  function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
13
- function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
14
13
  function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
15
14
  function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
16
15
  function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
@@ -19,22 +18,18 @@ function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" !=
19
18
  function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
20
19
  function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
21
20
  function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
22
- import React, { forwardRef, useState, createRef, useCallback, useRef, useMemo } from 'react';
21
+ import React, { forwardRef, useState, createRef, useCallback } from 'react';
23
22
  import { css } from 'styled-components';
24
- import { useForkRef, useResizeObserver } from '@salutejs/plasma-core';
25
- import { cx, mergeRefs, safeUseId } from '../../utils';
26
- import { IconInfoCircleOutline } from '../_Icon';
27
- import { useOutsideClick } from '../../hooks';
23
+ import { useResizeObserver } from '@salutejs/plasma-core';
24
+ import { cx, mergeRefs } from '../../utils';
28
25
  import { applyDynamicLabel } from './mixins';
29
26
  import { useAutoResize, ROOT_FONT_SIZE } from './hooks';
30
- import { StyledContent, StyledHelpers, StyledLeftHelper, StyledRightHelper, StyledLabel, StyledPlaceholder, StyledTextArea, StyledTextAreaWrapper, StyledContainer, StyledIndicator, StyledOptionalText, OuterLabelWrapper, StyledIndicatorWrapper, StyledHintWrapper, HintTargetWrapper, TitleCaption, Hint } from './TextArea.styles';
27
+ import { StyledContent, StyledHelpers, StyledLeftHelper, StyledRightHelper, StyledLabel, StyledPlaceholder, StyledTextArea, StyledTextAreaWrapper, StyledContainer, StyledIndicator, StyledOptionalText } from './TextArea.styles';
31
28
  import { classes } from './TextArea.tokens';
32
29
  import { base as viewCSS } from './variations/_view/base';
33
30
  import { base as sizeCSS } from './variations/_size/base';
34
31
  import { base as clearCSS } from './variations/_clear/base';
35
32
  import { base as disabledCSS } from './variations/_disabled/base';
36
- import { base as hintViewCSS } from './variations/_hint-view/base';
37
- import { base as hintSizeCSS } from './variations/_hint-size/base';
38
33
  var innerPlaceholderUp = classes.innerPlaceholderUp,
39
34
  focusedOuterPlaceholderColor = classes.focusedOuterPlaceholderColor,
40
35
  hidePlaceHolder = classes.hidePlaceHolder,
@@ -89,7 +84,6 @@ export var textAreaRoot = function textAreaRoot(Root) {
89
84
  label = props.label,
90
85
  _props$labelPlacement = props.labelPlacement,
91
86
  labelPlacement = _props$labelPlacement === void 0 ? 'inner' : _props$labelPlacement,
92
- titleCaption = props.titleCaption,
93
87
  placeholder = props.placeholder,
94
88
  defaultValue = props.defaultValue,
95
89
  height = props.height,
@@ -112,47 +106,21 @@ export var textAreaRoot = function textAreaRoot(Root) {
112
106
  readOnly = props.readOnly,
113
107
  rows = props.rows,
114
108
  cols = props.cols,
115
- hasHint = props.hasHint,
116
- _props$hintTrigger = props.hintTrigger,
117
- hintTrigger = _props$hintTrigger === void 0 ? 'hover' : _props$hintTrigger,
118
- hintText = props.hintText,
119
- _props$hintView = props.hintView,
120
- hintView = _props$hintView === void 0 ? 'default' : _props$hintView,
121
- _props$hintSize = props.hintSize,
122
- hintSize = _props$hintSize === void 0 ? 'm' : _props$hintSize,
123
- hintTargetIcon = props.hintTargetIcon,
124
- _props$hintPlacement = props.hintPlacement,
125
- hintPlacement = _props$hintPlacement === void 0 ? 'auto' : _props$hintPlacement,
126
- hintHasArrow = props.hintHasArrow,
127
- _props$hintOffset = props.hintOffset,
128
- hintOffset = _props$hintOffset === void 0 ? [0, 0] : _props$hintOffset,
129
- hintWidth = props.hintWidth,
130
- hintContentLeft = props.hintContentLeft,
131
109
  onChange = props.onChange,
132
110
  rest = _objectWithoutProperties(props, _excluded);
133
- var _useState = useState(false),
111
+ var _useState = useState(width ? "".concat(width, "rem") : '100%'),
134
112
  _useState2 = _slicedToArray(_useState, 2),
135
- isHintVisible = _useState2[0],
136
- setIsHintVisible = _useState2[1];
137
- var _useState3 = useState(width ? "".concat(width, "rem") : '100%'),
113
+ helperWidth = _useState2[0],
114
+ setHelperWidth = _useState2[1];
115
+ var _useState3 = useState(false),
138
116
  _useState4 = _slicedToArray(_useState3, 2),
139
- helperWidth = _useState4[0],
140
- setHelperWidth = _useState4[1];
141
- var _useState5 = useState(false),
117
+ focused = _useState4[0],
118
+ setFocused = _useState4[1];
119
+ var _useState5 = useState(),
142
120
  _useState6 = _slicedToArray(_useState5, 2),
143
- focused = _useState6[0],
144
- setFocused = _useState6[1];
145
- var _useState7 = useState(),
146
- _useState8 = _slicedToArray(_useState7, 2),
147
- uncontrolledValue = _useState8[0],
148
- setUncontrolledValue = _useState8[1];
121
+ uncontrolledValue = _useState6[0],
122
+ setUncontrolledValue = _useState6[1];
149
123
  var outerRef = /*#__PURE__*/createRef();
150
- var hintId = safeUseId();
151
- var hintRef = useOutsideClick(function () {
152
- setIsHintVisible(false);
153
- });
154
- var hintInnerRef = useRef(null);
155
- var hintForkRef = useForkRef(hintRef, hintInnerRef);
156
124
  var innerOptional = required ? false : optional;
157
125
  var hasHelper = Boolean(leftHelper || rightHelper || helperText);
158
126
  var hasOuterLabel = Boolean(label && labelPlacement === 'outer');
@@ -163,27 +131,9 @@ export var textAreaRoot = function textAreaRoot(Root) {
163
131
  var applyCustomWidth = resize !== 'horizontal' && resize !== 'both' && !cols;
164
132
  var placeholderLabel = hasInnerLabel ? label : placeholder;
165
133
  var clearClass = clear ? classes.clear : undefined;
166
- var hasHintClass = hasHint ? classes.hasHint : undefined;
167
134
  var hasRightContentClass = contentRight ? classes.hasRightContent : undefined;
168
135
  var hasDividerClass = hasDivider ? classes.hasDivider : undefined;
169
136
  var requiredPlacementClass = requiredPlacement === 'right' ? 'align-right ' : undefined;
170
- var handleHintShow = function handleHintShow() {
171
- return setIsHintVisible(true);
172
- };
173
- var handleHintHide = function handleHintHide() {
174
- return setIsHintVisible(false);
175
- };
176
- var handleHintClick = function handleHintClick(event) {
177
- if (hasHint && hintTrigger === 'click') {
178
- var _hintInnerRef$current;
179
- event.stopPropagation();
180
- var targetIsPopover = event.target === hintInnerRef.current;
181
- var rootHasTarget = (_hintInnerRef$current = hintInnerRef.current) === null || _hintInnerRef$current === void 0 ? void 0 : _hintInnerRef$current.contains(event.target);
182
- if (!targetIsPopover && !rootHasTarget) {
183
- setIsHintVisible(true);
184
- }
185
- }
186
- };
187
137
  useResizeObserver(outerRef, function (currentElement) {
188
138
  var inlineWidth = currentElement.style.width;
189
139
  if (inlineWidth || cols) {
@@ -206,6 +156,17 @@ export var textAreaRoot = function textAreaRoot(Root) {
206
156
  }
207
157
  onChange === null || onChange === void 0 || onChange(event);
208
158
  }, [value, onChange]);
159
+ var handleTextAreaFocus = function handleTextAreaFocus() {
160
+ if (readOnly || disabled || !(outerRef !== null && outerRef !== void 0 && outerRef.current)) {
161
+ return;
162
+ }
163
+ outerRef.current.scrollTo({
164
+ top: 0,
165
+ left: outerRef.current.offsetLeft,
166
+ behavior: 'smooth'
167
+ });
168
+ outerRef.current.focus();
169
+ };
209
170
  var dynamicLabelClasses = getDynamicLabelClasses({
210
171
  size: size,
211
172
  readOnly: readOnly,
@@ -214,35 +175,8 @@ export var textAreaRoot = function textAreaRoot(Root) {
214
175
  value: value || uncontrolledValue || defaultValue,
215
176
  rows: rows
216
177
  }, focused);
217
- var optionalTextNode = innerOptional ? /*#__PURE__*/React.createElement(StyledOptionalText, {
218
- inheritFont: !hasOuterLabel
219
- }, Boolean(hasPlaceholderOptional ? placeholderLabel : label) && '\xa0', optionalText) : null;
220
- var HintComponent = useMemo(function () {
221
- return /*#__PURE__*/React.createElement(Hint, {
222
- ref: hintForkRef,
223
- text: String(hintText),
224
- opened: isHintVisible,
225
- target: /*#__PURE__*/React.createElement(HintTargetWrapper, _extends({
226
- id: hintId
227
- }, hintTrigger === 'hover' ? {
228
- onMouseEnter: handleHintShow,
229
- onMouseLeave: handleHintHide
230
- } : {
231
- onClick: handleHintClick
232
- }), hintTargetIcon || _IconInfoCircleOutlin || (_IconInfoCircleOutlin = /*#__PURE__*/React.createElement(IconInfoCircleOutline, {
233
- size: "xs",
234
- color: "inherit"
235
- }))),
236
- placement: hintPlacement,
237
- hasArrow: hintHasArrow,
238
- offset: hintOffset,
239
- minWidth: hintWidth,
240
- maxWidth: hintWidth,
241
- contentLeft: hintContentLeft,
242
- frame: hintId
243
- });
244
- }, [hintText, isHintVisible, hintId, hintTrigger, handleHintShow, handleHintHide, handleHintClick, hintTargetIcon, hintPlacement, hintHasArrow, hintOffset, hintWidth, hintContentLeft]);
245
- return /*#__PURE__*/React.createElement(Root, _extends({
178
+ var optionalTextNode = innerOptional ? /*#__PURE__*/React.createElement(StyledOptionalText, null, Boolean(hasPlaceholderOptional ? placeholderLabel : label) && '\xa0', optionalText) : null;
179
+ return /*#__PURE__*/React.createElement(Root, {
246
180
  view: overriddenView,
247
181
  size: size,
248
182
  disabled: disabled,
@@ -251,24 +185,18 @@ export var textAreaRoot = function textAreaRoot(Root) {
251
185
  style: _objectSpread({
252
186
  width: helperWidth
253
187
  }, style),
254
- className: cx(clearClass, hasDividerClass, hasHintClass, className)
255
- }, hasHint && {
256
- hintView: hintView || 'default',
257
- hintSize: hintSize || 'm'
258
- }), (hasOuterLabel || titleCaption) && /*#__PURE__*/React.createElement(OuterLabelWrapper, {
259
- isInnnerLabel: labelPlacement === 'inner'
260
- }, hasOuterLabel && /*#__PURE__*/React.createElement(StyledIndicatorWrapper, null, /*#__PURE__*/React.createElement(StyledLabel, null, label), hasHint && /*#__PURE__*/React.createElement(StyledHintWrapper, null, HintComponent), required && /*#__PURE__*/React.createElement(StyledIndicator, {
261
- className: cx(classes.outerLabelPlacement, requiredPlacementClass, hasHintClass)
262
- }), optionalTextNode), titleCaption && /*#__PURE__*/React.createElement(TitleCaption, null, titleCaption)), /*#__PURE__*/React.createElement(StyledContainer, {
188
+ className: cx(clearClass, hasDividerClass, className),
189
+ onClick: handleTextAreaFocus
190
+ }, hasOuterLabel && /*#__PURE__*/React.createElement(StyledLabel, null, required && /*#__PURE__*/React.createElement(StyledIndicator, {
191
+ className: cx(classes.outerLabelPlacement, requiredPlacementClass)
192
+ }), label, optionalTextNode), /*#__PURE__*/React.createElement(StyledContainer, {
263
193
  className: cx.apply(void 0, [styledContainer].concat(_toConsumableArray(dynamicLabelClasses))),
264
194
  width: helperWidth,
265
195
  onFocus: onFocusHandler,
266
196
  onBlur: onBlurHandler
267
- }, !hasOuterLabel && /*#__PURE__*/React.createElement(React.Fragment, null, required && /*#__PURE__*/React.createElement(StyledIndicator, {
197
+ }, required && !hasOuterLabel && /*#__PURE__*/React.createElement(StyledIndicator, {
268
198
  className: cx(classes.innerLabelPlacement, requiredPlacementClass)
269
- }), hasHint && /*#__PURE__*/React.createElement(StyledHintWrapper, {
270
- className: classes.innerLabelPlacement
271
- }, HintComponent)), contentRight && /*#__PURE__*/React.createElement(StyledContent, null, contentRight), /*#__PURE__*/React.createElement(StyledTextAreaWrapper, {
199
+ }), contentRight && /*#__PURE__*/React.createElement(StyledContent, null, contentRight), /*#__PURE__*/React.createElement(StyledTextAreaWrapper, {
272
200
  className: styledTextAreaWrapper,
273
201
  hasHelper: hasHelper
274
202
  }, /*#__PURE__*/React.createElement(StyledTextArea, _extends({
@@ -322,12 +250,6 @@ export var textAreaConfig = {
322
250
  },
323
251
  readOnly: {
324
252
  attrs: true
325
- },
326
- hintView: {
327
- css: hintViewCSS
328
- },
329
- hintSize: {
330
- css: hintSizeCSS
331
253
  }
332
254
  },
333
255
  defaults: {
@@ -1,119 +1,76 @@
1
1
  import styled from 'styled-components';
2
2
  import { applyEllipsis } from '../../mixins';
3
- import { tooltipConfig } from '../Tooltip';
4
- import { component, mergeConfig } from '../../engines';
5
3
  import { classes, tokens } from './TextArea.tokens';
6
- var mergedConfig = /*#__PURE__*/mergeConfig(tooltipConfig);
7
- var Tooltip = /*#__PURE__*/component(mergedConfig);
8
- export var Hint = /*#__PURE__*/styled(Tooltip).withConfig({
9
- componentId: "plasma-new-hope__sc-pxxv3p-0"
10
- })([""]);
11
- export var OuterLabelWrapper = /*#__PURE__*/styled.div.withConfig({
12
- componentId: "plasma-new-hope__sc-pxxv3p-1"
13
- })(["display:flex;align-items:center;margin-bottom:", ";"], function (_ref) {
14
- var isInnnerLabel = _ref.isInnnerLabel;
15
- return isInnnerLabel ? "var(".concat(tokens.titleCaptionInnerLabelOffset, ")") : "var(".concat(tokens.labelMarginBottom, ")");
16
- });
17
4
  export var StyledLabel = /*#__PURE__*/styled.div.withConfig({
18
- componentId: "plasma-new-hope__sc-pxxv3p-2"
19
- })(["position:relative;display:inline-flex;color:var(", ",var(", "));font-family:var(", ",var(", "));font-size:var(", ",var(", "));font-style:var(", ",var(", "));font-weight:var(", ",var(", "));letter-spacing:var(", ",var(", "));line-height:var(", ",var(", "));"], tokens.labelOuterColor, tokens.inputColor, tokens.labelOuterFontFamily, tokens.inputFontFamily, tokens.labelOuterFontSize, tokens.inputFontSize, tokens.labelOuterFontStyle, tokens.inputFontStyle, tokens.labelOuterFontWeight, tokens.inputFontWeight, tokens.labelOuterLetterSpacing, tokens.inputLetterSpacing, tokens.labelOuterLineHeight, tokens.inputLineHeight);
20
- export var TitleCaption = /*#__PURE__*/styled.div.withConfig({
21
- componentId: "plasma-new-hope__sc-pxxv3p-3"
22
- })(["display:inline-block;margin-left:auto;font-family:var(", ");font-size:var(", ");font-style:var(", ");font-weight:var(", ");letter-spacing:var(", ");line-height:var(", ");"], tokens.titleCaptionFontFamily, tokens.titleCaptionFontSize, tokens.titleCaptionFontStyle, tokens.titleCaptionFontWeight, tokens.titleCaptionLetterSpacing, tokens.titleCaptionLineHeight);
23
- export var StyledIndicatorWrapper = /*#__PURE__*/styled.div.withConfig({
24
- componentId: "plasma-new-hope__sc-pxxv3p-4"
25
- })(["position:relative;display:inline-flex;align-items:center;"]);
5
+ componentId: "plasma-new-hope__sc-pxxv3p-0"
6
+ })(["position:relative;display:inline-flex;margin-bottom:var(", ");color:var(", ",var(", "));font-family:var(", ",var(", "));font-size:var(", ",var(", "));font-style:var(", ",var(", "));font-weight:var(", ",var(", "));letter-spacing:var(", ",var(", "));line-height:var(", ",var(", "));"], tokens.labelMarginBottom, tokens.labelOuterColor, tokens.inputColor, tokens.labelOuterFontFamily, tokens.inputFontFamily, tokens.labelOuterFontSize, tokens.inputFontSize, tokens.labelOuterFontStyle, tokens.inputFontStyle, tokens.labelOuterFontWeight, tokens.inputFontWeight, tokens.labelOuterLetterSpacing, tokens.inputLetterSpacing, tokens.labelOuterLineHeight, tokens.inputLineHeight);
26
7
  export var StyledOptionalText = /*#__PURE__*/styled.span.withConfig({
27
- componentId: "plasma-new-hope__sc-pxxv3p-5"
28
- })(["color:var(", ");font-family:", ";font-size:", ";font-style:", ";font-weight:", ";letter-spacing:", ";line-height:", ";"], tokens.optionalColor, function (_ref2) {
29
- var inheritFont = _ref2.inheritFont;
30
- return inheritFont ? 'inherit' : "var(".concat(tokens.labelOuterFontFamily, ", var(").concat(tokens.inputFontFamily, "))");
31
- }, function (_ref3) {
32
- var inheritFont = _ref3.inheritFont;
33
- return inheritFont ? 'inherit' : "var(".concat(tokens.labelOuterFontSize, ", var(").concat(tokens.inputFontSize, "))");
34
- }, function (_ref4) {
35
- var inheritFont = _ref4.inheritFont;
36
- return inheritFont ? 'inherit' : "var(".concat(tokens.labelOuterFontStyle, ", var(").concat(tokens.inputFontStyle, "))");
37
- }, function (_ref5) {
38
- var inheritFont = _ref5.inheritFont;
39
- return inheritFont ? 'inherit' : "var(".concat(tokens.labelOuterFontWeight, ", var(").concat(tokens.inputFontWeight, "))");
40
- }, function (_ref6) {
41
- var inheritFont = _ref6.inheritFont;
42
- return inheritFont ? 'inherit' : "var(".concat(tokens.labelOuterLetterSpacing, ", var(").concat(tokens.inputLetterSpacing, "))");
43
- }, function (_ref7) {
44
- var inheritFont = _ref7.inheritFont;
45
- return inheritFont ? 'inherit' : "var(".concat(tokens.labelOuterLineHeight, ", var(").concat(tokens.inputLineHeight, "))");
46
- });
47
- export var StyledHintWrapper = /*#__PURE__*/styled.div.withConfig({
48
- componentId: "plasma-new-hope__sc-pxxv3p-6"
49
- })(["display:inline-block;line-height:0;margin:var(", ");&.", "{position:absolute;margin:0;inset:var(", ");}"], tokens.hintMargin, classes.innerLabelPlacement, tokens.hintInnerLabelPlacementOffset);
50
- export var HintTargetWrapper = /*#__PURE__*/styled.div.withConfig({
51
- componentId: "plasma-new-hope__sc-pxxv3p-7"
52
- })(["color:var(", ");width:var(", ");height:var(", ");display:flex;justify-content:center;align-items:center;"], tokens.hintIconColor, tokens.hintTargetSize, tokens.hintTargetSize);
8
+ componentId: "plasma-new-hope__sc-pxxv3p-1"
9
+ })(["color:var(", ");"], tokens.optionalColor);
53
10
  export var StyledTextAreaWrapper = /*#__PURE__*/styled.div.withConfig({
54
- componentId: "plasma-new-hope__sc-pxxv3p-8"
55
- })(["background-color:var(", ");padding-top:var(", ");padding-bottom:", ";border-radius:", ";"], tokens.inputBackgroundColor, tokens.inputPaddingTop, function (_ref8) {
56
- var hasHelper = _ref8.hasHelper;
11
+ componentId: "plasma-new-hope__sc-pxxv3p-2"
12
+ })(["background-color:var(", ");padding-top:var(", ");padding-bottom:", ";border-radius:", ";"], tokens.inputBackgroundColor, tokens.inputPaddingTop, function (_ref) {
13
+ var hasHelper = _ref.hasHelper;
57
14
  return hasHelper ? "var(".concat(tokens.inputPaddingBottomWithHelpers, ")") : "var(".concat(tokens.inputPaddingBottom, ")");
58
- }, function (_ref9) {
59
- var hasHelper = _ref9.hasHelper;
15
+ }, function (_ref2) {
16
+ var hasHelper = _ref2.hasHelper;
60
17
  return hasHelper ? "var(".concat(tokens.borderRadiusWithHelpers, ")") : "var(".concat(tokens.borderRadius, ")");
61
18
  });
62
19
  export var StyledContent = /*#__PURE__*/styled.div.withConfig({
63
- componentId: "plasma-new-hope__sc-pxxv3p-9"
20
+ componentId: "plasma-new-hope__sc-pxxv3p-3"
64
21
  })(["position:absolute;display:flex;align-items:center;bottom:0;z-index:1;color:var(", ",var(", "));top:var(", ");right:var(", ");height:var(", ");"], tokens.rightContentColor, tokens.inputColor, tokens.rightContentTop, tokens.rightContentRight, tokens.rightContentHeight);
65
22
  export var StyledContainer = /*#__PURE__*/styled.div.withConfig({
66
- componentId: "plasma-new-hope__sc-pxxv3p-10"
67
- })(["display:inline-flex;flex-direction:column;width:", ";position:relative;"], function (_ref10) {
68
- var width = _ref10.width;
23
+ componentId: "plasma-new-hope__sc-pxxv3p-4"
24
+ })(["display:inline-flex;flex-direction:column;width:", ";position:relative;"], function (_ref3) {
25
+ var width = _ref3.width;
69
26
  return width;
70
27
  });
71
28
  export var StyledTextArea = /*#__PURE__*/styled.textarea.withConfig({
72
- componentId: "plasma-new-hope__sc-pxxv3p-11"
73
- })(["display:block;box-sizing:border-box;outline:none;border:none;-webkit-appearance:none;background-color:transparent;color:var(", ");caret-color:var(", ");resize:", ";--plasma_private-textarea-height:", ";--plasma_private-textarea-width:", ";--plasma_private-textarea-computed-height:", ";--plasma_private-textarea-computed-width:", ";height:var(--plasma_private-textarea-computed-height);width:var(--plasma_private-textarea-computed-width);min-width:", ";max-width:", ";min-height:var(", ");padding-right:", ";padding-left:var(", ");padding-top:0;padding-bottom:0;--plasma_private-textarea-helpers-computed-height:calc( var(", ") + var(", ") + var(", ") );--plasma_private-textarea-input-with-helpers-height:calc( var(--plasma_private-textarea-height) - var(--plasma_private-textarea-helpers-computed-height) + var(", ") );--plasma_private-textarea-input-without-helpers-height:calc( var(--plasma_private-textarea-computed-height) - var(", ") );--plasma_private-textarea-input-actual-height:", ";height:var(--plasma_private-textarea-input-actual-height);font-family:var(", ");font-size:var(", ");font-style:var(", ");font-weight:var(", ");letter-spacing:var(", ");line-height:var(", ");&::placeholder{opacity:0;}&:read-only{cursor:default;}&:focus:not(:disabled){color:var(", ");}&::-webkit-scrollbar{width:var(", ");}&::-webkit-scrollbar-thumb{background-color:var(", ");background-clip:content-box;border:var(", ") solid transparent;border-radius:1rem;}&::-webkit-scrollbar-track{background-color:var(", ");background-clip:content-box;border:var(", ") solid transparent;border-radius:1rem;}"], tokens.inputColor, tokens.inputCaretColor, function (_ref11) {
74
- var resize = _ref11.resize;
29
+ componentId: "plasma-new-hope__sc-pxxv3p-5"
30
+ })(["display:block;box-sizing:border-box;outline:none;border:none;-webkit-appearance:none;background-color:transparent;color:var(", ");caret-color:var(", ");resize:", ";--plasma_private-textarea-height:", ";--plasma_private-textarea-width:", ";--plasma_private-textarea-computed-height:", ";--plasma_private-textarea-computed-width:", ";height:var(--plasma_private-textarea-computed-height);width:var(--plasma_private-textarea-computed-width);min-width:", ";max-width:", ";min-height:var(", ");padding-right:", ";padding-left:var(", ");padding-top:0;padding-bottom:0;--plasma_private-textarea-helpers-computed-height:calc( var(", ") + var(", ") + var(", ") );--plasma_private-textarea-input-with-helpers-height:calc( var(--plasma_private-textarea-height) - var(--plasma_private-textarea-helpers-computed-height) + var(", ") );--plasma_private-textarea-input-without-helpers-height:calc( var(--plasma_private-textarea-computed-height) - var(", ") );--plasma_private-textarea-input-actual-height:", ";height:var(--plasma_private-textarea-input-actual-height);font-family:var(", ");font-size:var(", ");font-style:var(", ");font-weight:var(", ");letter-spacing:var(", ");line-height:var(", ");&::placeholder{opacity:0;}&:read-only{cursor:default;}&:focus:not(:disabled){color:var(", ");}&::-webkit-scrollbar{width:var(", ");}&::-webkit-scrollbar-thumb{background-color:var(", ");background-clip:content-box;border:var(", ") solid transparent;border-radius:1rem;}&::-webkit-scrollbar-track{background-color:var(", ");background-clip:content-box;border:var(", ") solid transparent;border-radius:1rem;}"], tokens.inputColor, tokens.inputCaretColor, function (_ref4) {
31
+ var resize = _ref4.resize;
75
32
  return resize || 'none';
76
- }, function (_ref12) {
77
- var height = _ref12.height;
33
+ }, function (_ref5) {
34
+ var height = _ref5.height;
78
35
  return !Number.isNaN(Number(height)) ? "calc(".concat(height, "rem - 0.875rem)") : height || "var(".concat(tokens.inputHeight, ")");
79
- }, function (_ref13) {
80
- var width = _ref13.width;
36
+ }, function (_ref6) {
37
+ var width = _ref6.width;
81
38
  return !Number.isNaN(Number(width)) ? "".concat(width, "rem") : width || "var(".concat(tokens.inputWidth, ")");
82
- }, function (_ref14) {
83
- var rows = _ref14.rows;
39
+ }, function (_ref7) {
40
+ var rows = _ref7.rows;
84
41
  return rows ? 'unset' : 'var(--plasma_private-textarea-height)';
85
- }, function (_ref15) {
86
- var cols = _ref15.cols;
42
+ }, function (_ref8) {
43
+ var cols = _ref8.cols;
87
44
  return cols ? 'unset' : 'var(--plasma_private-textarea-width)';
88
- }, function (_ref16) {
89
- var applyCustomWidth = _ref16.applyCustomWidth;
45
+ }, function (_ref9) {
46
+ var applyCustomWidth = _ref9.applyCustomWidth;
90
47
  return applyCustomWidth ? 'var(--plasma_private-textarea-width)' : 'auto';
91
- }, function (_ref17) {
92
- var applyCustomWidth = _ref17.applyCustomWidth;
48
+ }, function (_ref10) {
49
+ var applyCustomWidth = _ref10.applyCustomWidth;
93
50
  return applyCustomWidth ? 'var(--plasma_private-textarea-width)' : 'auto';
94
- }, tokens.inputMinHeight, function (_ref18) {
95
- var hasContentRight = _ref18.hasContentRight;
51
+ }, tokens.inputMinHeight, function (_ref11) {
52
+ var hasContentRight = _ref11.hasContentRight;
96
53
  return hasContentRight ? "var(".concat(tokens.inputPaddingRightWithRightContent, ")") : "var(".concat(tokens.inputPaddingRight, ")");
97
- }, tokens.inputPaddingLeft, tokens.helpersPaddingTop, tokens.helpersPaddingBottom, tokens.helpersLineHeight, tokens.helpersOffset, tokens.inputPaddingBottom, function (_ref19) {
98
- var hasHelper = _ref19.hasHelper,
99
- rows = _ref19.rows;
54
+ }, tokens.inputPaddingLeft, tokens.helpersPaddingTop, tokens.helpersPaddingBottom, tokens.helpersLineHeight, tokens.helpersOffset, tokens.inputPaddingBottom, function (_ref12) {
55
+ var hasHelper = _ref12.hasHelper,
56
+ rows = _ref12.rows;
100
57
  return hasHelper && !rows ? 'var(--plasma_private-textarea-input-with-helpers-height)' : 'var(--plasma_private-textarea-input-without-helpers-height)';
101
58
  }, tokens.inputFontFamily, tokens.inputFontSize, tokens.inputFontStyle, tokens.inputFontWeight, tokens.inputLetterSpacing, tokens.inputLineHeight, tokens.inputColorFocus, tokens.scrollbarWidth, tokens.scrollbarThumbBackgroundColor, tokens.scrollbarBorderWidth, tokens.scrollbarTrackBackgroundColor, tokens.scrollbarBorderWidth);
102
59
  export var StyledHelpers = /*#__PURE__*/styled.div.withConfig({
103
- componentId: "plasma-new-hope__sc-pxxv3p-12"
60
+ componentId: "plasma-new-hope__sc-pxxv3p-6"
104
61
  })(["box-sizing:border-box;display:flex;justify-content:space-between;transition:background-color 0.1s ease-in-out;background-color:var(", ");padding-top:var(", ");padding-right:var(", ");padding-bottom:var(", ");padding-left:var(", ");border-bottom-left-radius:var(", ");border-bottom-right-radius:var(", ");"], tokens.helpersBackgroundColor, tokens.helpersPaddingTop, tokens.helpersPaddingRight, tokens.helpersPaddingBottom, tokens.helpersPaddingLeft, tokens.borderRadius, tokens.borderRadius);
105
62
  export var StyledLeftHelper = /*#__PURE__*/styled.span.withConfig({
106
- componentId: "plasma-new-hope__sc-pxxv3p-13"
63
+ componentId: "plasma-new-hope__sc-pxxv3p-7"
107
64
  })(["", ";display:block;font-family:var(", ");font-size:var(", ");font-style:var(", ");font-weight:var(", ");letter-spacing:var(", ");line-height:var(", ");color:var(", ");"], /*#__PURE__*/applyEllipsis(), tokens.helpersFontFamily, tokens.helpersFontSize, tokens.helpersFontStyle, tokens.helpersFontWeight, tokens.helpersLetterSpacing, tokens.helpersLineHeight, tokens.leftHelperColor);
108
65
  export var StyledRightHelper = /*#__PURE__*/styled(StyledLeftHelper).withConfig({
109
- componentId: "plasma-new-hope__sc-pxxv3p-14"
66
+ componentId: "plasma-new-hope__sc-pxxv3p-8"
110
67
  })(["color:var(", ");margin-left:auto;"], tokens.rightHelperColor);
111
68
  export var StyledPlaceholder = /*#__PURE__*/styled.label.withConfig({
112
- componentId: "plasma-new-hope__sc-pxxv3p-15"
113
- })(["box-sizing:border-box;position:absolute;pointer-events:none;display:inline-flex;align-items:center;transition:all 0.1s ease-in-out;transform-origin:top left;color:var(", ");width:100%;height:auto;top:var(", ");padding-left:var(", ");padding-right:", ";font-family:var(", ");font-size:var(", ");font-style:var(", ");font-weight:var(", ");letter-spacing:var(", ");line-height:var(", ");"], tokens.placeholderColor, tokens.inputPaddingTop, tokens.inputPaddingLeft, function (_ref20) {
114
- var hasContentRight = _ref20.hasContentRight;
69
+ componentId: "plasma-new-hope__sc-pxxv3p-9"
70
+ })(["box-sizing:border-box;position:absolute;pointer-events:none;display:inline-flex;align-items:center;transition:all 0.1s ease-in-out;transform-origin:top left;color:var(", ");width:100%;height:auto;top:var(", ");padding-left:var(", ");padding-right:", ";font-family:var(", ");font-size:var(", ");font-style:var(", ");font-weight:var(", ");letter-spacing:var(", ");line-height:var(", ");"], tokens.placeholderColor, tokens.inputPaddingTop, tokens.inputPaddingLeft, function (_ref13) {
71
+ var hasContentRight = _ref13.hasContentRight;
115
72
  return hasContentRight ? "var(".concat(tokens.inputPaddingRightWithRightContent, ")") : "var(".concat(tokens.inputPaddingRight, ")");
116
73
  }, tokens.inputFontFamily, tokens.inputFontSize, tokens.inputFontStyle, tokens.inputFontWeight, tokens.inputLetterSpacing, tokens.inputLineHeight);
117
74
  export var StyledIndicator = /*#__PURE__*/styled.div.withConfig({
118
- componentId: "plasma-new-hope__sc-pxxv3p-16"
119
- })(["position:absolute;border-radius:50%;background-color:var(", ");&.", "{width:var(", ");height:var(", ");inset:var(", ");&.align-right{inset:var(", ");&.", "{right:calc(-1 * var(", "));}}}&.", "{width:var(", ");height:var(", ");inset:var(", ");&.align-right{inset:var(", ");}}"], tokens.indicatorColor, classes.outerLabelPlacement, tokens.indicatorSizeOuter, tokens.indicatorSizeOuter, tokens.indicatorLabelPlacementOuter, tokens.indicatorLabelPlacementOuterRight, classes.hasHint, tokens.indicatorSizeOuter, classes.innerLabelPlacement, tokens.indicatorSizeInner, tokens.indicatorSizeInner, tokens.indicatorLabelPlacementInner, tokens.indicatorLabelPlacementInnerRight);
75
+ componentId: "plasma-new-hope__sc-pxxv3p-10"
76
+ })(["position:absolute;border-radius:50%;background-color:var(", ");&.", "{width:var(", ");height:var(", ");inset:var(", ");&.align-right{inset:var(", ");}}&.", "{width:var(", ");height:var(", ");inset:var(", ");&.align-right{inset:var(", ");}}"], tokens.indicatorColor, classes.outerLabelPlacement, tokens.indicatorSizeOuter, tokens.indicatorSizeOuter, tokens.indicatorLabelPlacementOuter, tokens.indicatorLabelPlacementOuterRight, classes.innerLabelPlacement, tokens.indicatorSizeInner, tokens.indicatorSizeInner, tokens.indicatorLabelPlacementInner, tokens.indicatorLabelPlacementInnerRight);
@@ -134,8 +134,7 @@ export function App() {
134
134
  ```
135
135
 
136
136
  ### Подсказка
137
- Для вывода подсказки снизу от поля используйте свойство `leftHelper` и/или `rightHelper`,
138
- для подсказки в виде Tooltip - `hasHint`, для подсказки сверху справа - `titleCaption`:
137
+ Для вывода подсказки снизу от поля используйте свойство `leftHelper` и/или `rightHelper`.
139
138
 
140
139
  ```tsx live
141
140
  import React from 'react';
@@ -149,10 +148,6 @@ export function App() {
149
148
  defaultValue="Значение"
150
149
  leftHelper="Подсказка снизу слева"
151
150
  rightHelper="Подсказка снизу справа"
152
- hasHint
153
- hintText="Подсказка в виде Tooltip"
154
- hintView="default"
155
- hintSize="m"
156
151
  />
157
152
  </div>
158
153
  );