@salutejs/plasma-new-hope 0.166.1-dev.0 → 0.167.0-canary.1459.11348453591.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (380) hide show
  1. package/cjs/components/Autocomplete/Autocomplete.css +34 -19
  2. package/cjs/components/Autocomplete/Autocomplete.js +6 -2
  3. package/cjs/components/Autocomplete/Autocomplete.js.map +1 -1
  4. package/cjs/components/Combobox/ComboboxNew/Combobox.css +38 -18
  5. package/cjs/components/Combobox/ComboboxNew/ui/Inner/Inner.css +38 -18
  6. package/cjs/components/Combobox/ComboboxNew/ui/Inner/ui/Item/Item.css +38 -18
  7. package/cjs/components/DatePicker/RangeDate/RangeDate.css +33 -18
  8. package/cjs/components/DatePicker/RangeDate/RangeDatePopover/RangeDatePopover.css +33 -18
  9. package/cjs/components/DatePicker/SingleDate/SingleDate.css +35 -20
  10. package/cjs/components/Range/Range.css +39 -19
  11. package/cjs/components/Slider/Slider.css +39 -19
  12. package/cjs/components/Slider/Slider.js +2 -0
  13. package/cjs/components/Slider/Slider.js.map +1 -1
  14. package/cjs/components/Slider/components/Double/Double.css +39 -19
  15. package/cjs/components/TextArea/TextArea.js +110 -30
  16. package/cjs/components/TextArea/TextArea.js.map +1 -1
  17. package/cjs/components/TextArea/TextArea.styles.js +160 -63
  18. package/cjs/components/TextArea/TextArea.styles.js.map +1 -1
  19. package/cjs/components/TextArea/TextArea.styles_mcxlmk.css +17 -0
  20. package/cjs/components/TextArea/TextArea.tokens.js +43 -4
  21. package/cjs/components/TextArea/TextArea.tokens.js.map +1 -1
  22. package/cjs/components/TextArea/hooks/useAutoResize.js +2 -4
  23. package/cjs/components/TextArea/hooks/useAutoResize.js.map +1 -1
  24. package/cjs/components/TextArea/variations/_clear/base.js +1 -1
  25. package/cjs/components/TextArea/variations/_clear/base.js.map +1 -1
  26. package/cjs/components/TextArea/variations/_clear/base_1ezvvtt.css +1 -0
  27. package/cjs/components/TextArea/variations/_hint-size/base.js +9 -0
  28. package/cjs/components/TextArea/variations/_hint-size/base.js.map +1 -0
  29. package/cjs/components/TextArea/variations/_hint-size/base_1ipgv90.css +1 -0
  30. package/cjs/components/TextArea/variations/_hint-view/base.js +9 -0
  31. package/cjs/components/TextArea/variations/_hint-view/base.js.map +1 -0
  32. package/cjs/components/TextArea/variations/_hint-view/base_111a0qe.css +1 -0
  33. package/cjs/components/TextArea/variations/_view/base.js +1 -1
  34. package/cjs/components/TextArea/variations/_view/base.js.map +1 -1
  35. package/cjs/components/TextArea/variations/_view/base_1xgrm3x.css +1 -0
  36. package/cjs/components/TextField/TextField.js +98 -9
  37. package/cjs/components/TextField/TextField.js.map +1 -1
  38. package/cjs/components/TextField/TextField.styles.js +76 -23
  39. package/cjs/components/TextField/TextField.styles.js.map +1 -1
  40. package/cjs/components/TextField/TextField.styles_17xt45g.css +21 -0
  41. package/cjs/components/TextField/TextField.tokens.js +40 -1
  42. package/cjs/components/TextField/TextField.tokens.js.map +1 -1
  43. package/cjs/components/TextField/variations/_clear/base.js +1 -1
  44. package/cjs/components/TextField/variations/_clear/base.js.map +1 -1
  45. package/cjs/components/TextField/variations/_clear/base_1pkwm4m.css +1 -0
  46. package/cjs/components/TextField/variations/_disabled/base.js +1 -1
  47. package/cjs/components/TextField/variations/_disabled/{base_2tv0nz.css → base_4d3opa.css} +1 -1
  48. package/cjs/components/TextField/variations/_hint-size/base.js +9 -0
  49. package/cjs/components/TextField/variations/_hint-size/base.js.map +1 -0
  50. package/cjs/components/TextField/variations/_hint-size/base_1x99605.css +1 -0
  51. package/cjs/components/TextField/variations/_hint-view/base.js +9 -0
  52. package/cjs/components/TextField/variations/_hint-view/base.js.map +1 -0
  53. package/cjs/components/TextField/variations/_hint-view/base_l8etux.css +1 -0
  54. package/cjs/components/TextField/variations/_label-placement/base.js +1 -1
  55. package/cjs/components/TextField/variations/_label-placement/base.js.map +1 -1
  56. package/cjs/components/TextField/variations/_label-placement/base_3domm.css +1 -0
  57. package/cjs/components/TextField/variations/_read-only/base.js +1 -1
  58. package/cjs/components/TextField/variations/_read-only/base.js.map +1 -1
  59. package/cjs/components/TextField/variations/_read-only/base_17ypmu7.css +1 -0
  60. package/cjs/components/TextField/variations/_size/base.js +1 -1
  61. package/cjs/components/TextField/variations/_size/base.js.map +1 -1
  62. package/cjs/components/TextField/variations/_size/base_1xdmaqh.css +1 -0
  63. package/cjs/components/TextField/variations/_view/base.js +1 -1
  64. package/cjs/components/TextField/variations/_view/base.js.map +1 -1
  65. package/cjs/components/TextField/variations/_view/base_qhyte8.css +1 -0
  66. package/cjs/components/TextFieldGroup/TextFieldGroup.css +1 -1
  67. package/cjs/components/TextFieldGroup/variations/_shape/base.js +1 -1
  68. package/cjs/components/TextFieldGroup/variations/_shape/base_52bndd.css +1 -0
  69. package/cjs/components/_Icon/Icon.assets/InfoCircleOutline.js +23 -0
  70. package/cjs/components/_Icon/Icon.assets/InfoCircleOutline.js.map +1 -0
  71. package/cjs/components/_Icon/Icons/IconInfoCircleOutline.js +23 -0
  72. package/cjs/components/_Icon/Icons/IconInfoCircleOutline.js.map +1 -0
  73. package/cjs/index.css +54 -34
  74. package/emotion/cjs/components/Autocomplete/Autocomplete.js +6 -2
  75. package/emotion/cjs/components/TextArea/TextArea.js +113 -35
  76. package/emotion/cjs/components/TextArea/TextArea.styles.js +99 -41
  77. package/emotion/cjs/components/TextArea/TextArea.template-doc.mdx +6 -1
  78. package/emotion/cjs/components/TextArea/TextArea.tokens.js +43 -4
  79. package/emotion/cjs/components/TextArea/hooks/useAutoResize.js +2 -4
  80. package/emotion/cjs/components/TextArea/variations/_clear/base.js +1 -1
  81. package/emotion/cjs/components/TextArea/variations/_hint-size/base.js +11 -0
  82. package/emotion/cjs/components/TextArea/variations/_hint-size/tokens.json +21 -0
  83. package/emotion/cjs/components/TextArea/variations/_hint-view/base.js +11 -0
  84. package/emotion/cjs/components/TextArea/variations/_hint-view/tokens.json +5 -0
  85. package/emotion/cjs/components/TextArea/variations/_view/base.js +2 -1
  86. package/emotion/cjs/components/TextField/TextField.js +100 -12
  87. package/emotion/cjs/components/TextField/TextField.styles.js +84 -37
  88. package/emotion/cjs/components/TextField/TextField.template-doc.mdx +7 -1
  89. package/emotion/cjs/components/TextField/TextField.tokens.js +40 -1
  90. package/emotion/cjs/components/TextField/variations/_clear/base.js +1 -1
  91. package/emotion/cjs/components/TextField/variations/_hint-size/base.js +11 -0
  92. package/emotion/cjs/components/TextField/variations/_hint-size/tokens.json +21 -0
  93. package/emotion/cjs/components/TextField/variations/_hint-view/base.js +11 -0
  94. package/emotion/cjs/components/TextField/variations/_hint-view/tokens.json +5 -0
  95. package/emotion/cjs/components/TextField/variations/_label-placement/base.js +1 -1
  96. package/emotion/cjs/components/TextField/variations/_read-only/base.js +1 -1
  97. package/emotion/cjs/components/TextField/variations/_size/base.js +1 -1
  98. package/emotion/cjs/components/TextField/variations/_view/base.js +1 -1
  99. package/emotion/cjs/components/_Icon/Icon.assets/InfoCircleOutline.js +22 -0
  100. package/emotion/cjs/components/_Icon/Icons/IconInfoCircleOutline.js +22 -0
  101. package/emotion/cjs/components/_Icon/index.js +8 -1
  102. package/emotion/cjs/examples/plasma_b2c/components/TextArea/TextArea.config.js +19 -10
  103. package/emotion/cjs/examples/plasma_b2c/components/TextArea/TextArea.stories.tsx +70 -0
  104. package/emotion/cjs/examples/plasma_b2c/components/TextField/TextField.config.js +22 -13
  105. package/emotion/cjs/examples/plasma_b2c/components/TextField/TextField.stories.tsx +71 -1
  106. package/emotion/cjs/examples/plasma_web/components/TextArea/TextArea.config.js +19 -10
  107. package/emotion/cjs/examples/plasma_web/components/TextArea/TextArea.stories.tsx +70 -0
  108. package/emotion/cjs/examples/plasma_web/components/TextField/TextField.config.js +22 -13
  109. package/emotion/cjs/examples/plasma_web/components/TextField/TextField.stories.tsx +80 -10
  110. package/emotion/es/components/Autocomplete/Autocomplete.js +6 -2
  111. package/emotion/es/components/TextArea/TextArea.js +114 -36
  112. package/emotion/es/components/TextArea/TextArea.styles.js +98 -40
  113. package/emotion/es/components/TextArea/TextArea.template-doc.mdx +6 -1
  114. package/emotion/es/components/TextArea/TextArea.tokens.js +43 -4
  115. package/emotion/es/components/TextArea/hooks/useAutoResize.js +2 -4
  116. package/emotion/es/components/TextArea/variations/_clear/base.js +2 -2
  117. package/emotion/es/components/TextArea/variations/_hint-size/base.js +5 -0
  118. package/emotion/es/components/TextArea/variations/_hint-size/tokens.json +21 -0
  119. package/emotion/es/components/TextArea/variations/_hint-view/base.js +5 -0
  120. package/emotion/es/components/TextArea/variations/_hint-view/tokens.json +5 -0
  121. package/emotion/es/components/TextArea/variations/_view/base.js +2 -1
  122. package/emotion/es/components/TextField/TextField.js +100 -12
  123. package/emotion/es/components/TextField/TextField.styles.js +83 -36
  124. package/emotion/es/components/TextField/TextField.template-doc.mdx +7 -1
  125. package/emotion/es/components/TextField/TextField.tokens.js +40 -1
  126. package/emotion/es/components/TextField/variations/_clear/base.js +2 -2
  127. package/emotion/es/components/TextField/variations/_hint-size/base.js +5 -0
  128. package/emotion/es/components/TextField/variations/_hint-size/tokens.json +21 -0
  129. package/emotion/es/components/TextField/variations/_hint-view/base.js +5 -0
  130. package/emotion/es/components/TextField/variations/_hint-view/tokens.json +5 -0
  131. package/emotion/es/components/TextField/variations/_label-placement/base.js +1 -1
  132. package/emotion/es/components/TextField/variations/_read-only/base.js +2 -2
  133. package/emotion/es/components/TextField/variations/_size/base.js +2 -2
  134. package/emotion/es/components/TextField/variations/_view/base.js +2 -2
  135. package/emotion/es/components/_Icon/Icon.assets/InfoCircleOutline.js +15 -0
  136. package/emotion/es/components/_Icon/Icons/IconInfoCircleOutline.js +15 -0
  137. package/emotion/es/components/_Icon/index.js +2 -1
  138. package/emotion/es/examples/plasma_b2c/components/TextArea/TextArea.config.js +19 -10
  139. package/emotion/es/examples/plasma_b2c/components/TextArea/TextArea.stories.tsx +70 -0
  140. package/emotion/es/examples/plasma_b2c/components/TextField/TextField.config.js +22 -13
  141. package/emotion/es/examples/plasma_b2c/components/TextField/TextField.stories.tsx +71 -1
  142. package/emotion/es/examples/plasma_web/components/TextArea/TextArea.config.js +19 -10
  143. package/emotion/es/examples/plasma_web/components/TextArea/TextArea.stories.tsx +70 -0
  144. package/emotion/es/examples/plasma_web/components/TextField/TextField.config.js +22 -13
  145. package/emotion/es/examples/plasma_web/components/TextField/TextField.stories.tsx +80 -10
  146. package/es/components/Autocomplete/Autocomplete.css +34 -19
  147. package/es/components/Autocomplete/Autocomplete.js +6 -2
  148. package/es/components/Autocomplete/Autocomplete.js.map +1 -1
  149. package/es/components/Combobox/ComboboxNew/Combobox.css +38 -18
  150. package/es/components/Combobox/ComboboxNew/ui/Inner/Inner.css +38 -18
  151. package/es/components/Combobox/ComboboxNew/ui/Inner/ui/Item/Item.css +38 -18
  152. package/es/components/DatePicker/RangeDate/RangeDate.css +33 -18
  153. package/es/components/DatePicker/RangeDate/RangeDatePopover/RangeDatePopover.css +33 -18
  154. package/es/components/DatePicker/SingleDate/SingleDate.css +35 -20
  155. package/es/components/Range/Range.css +39 -19
  156. package/es/components/Slider/Slider.css +39 -19
  157. package/es/components/Slider/Slider.js +2 -0
  158. package/es/components/Slider/Slider.js.map +1 -1
  159. package/es/components/Slider/components/Double/Double.css +39 -19
  160. package/es/components/TextArea/TextArea.js +114 -34
  161. package/es/components/TextArea/TextArea.js.map +1 -1
  162. package/es/components/TextArea/TextArea.styles.js +155 -64
  163. package/es/components/TextArea/TextArea.styles.js.map +1 -1
  164. package/es/components/TextArea/TextArea.styles_mcxlmk.css +17 -0
  165. package/es/components/TextArea/TextArea.tokens.js +43 -4
  166. package/es/components/TextArea/TextArea.tokens.js.map +1 -1
  167. package/es/components/TextArea/hooks/useAutoResize.js +2 -4
  168. package/es/components/TextArea/hooks/useAutoResize.js.map +1 -1
  169. package/es/components/TextArea/variations/_clear/base.js +1 -1
  170. package/es/components/TextArea/variations/_clear/base.js.map +1 -1
  171. package/es/components/TextArea/variations/_clear/base_1ezvvtt.css +1 -0
  172. package/es/components/TextArea/variations/_hint-size/base.js +5 -0
  173. package/es/components/TextArea/variations/_hint-size/base.js.map +1 -0
  174. package/es/components/TextArea/variations/_hint-size/base_1ipgv90.css +1 -0
  175. package/es/components/TextArea/variations/_hint-view/base.js +5 -0
  176. package/es/components/TextArea/variations/_hint-view/base.js.map +1 -0
  177. package/es/components/TextArea/variations/_hint-view/base_111a0qe.css +1 -0
  178. package/es/components/TextArea/variations/_view/base.js +1 -1
  179. package/es/components/TextArea/variations/_view/base.js.map +1 -1
  180. package/es/components/TextArea/variations/_view/base_1xgrm3x.css +1 -0
  181. package/es/components/TextField/TextField.js +100 -11
  182. package/es/components/TextField/TextField.js.map +1 -1
  183. package/es/components/TextField/TextField.styles.js +71 -24
  184. package/es/components/TextField/TextField.styles.js.map +1 -1
  185. package/es/components/TextField/TextField.styles_17xt45g.css +21 -0
  186. package/es/components/TextField/TextField.tokens.js +40 -1
  187. package/es/components/TextField/TextField.tokens.js.map +1 -1
  188. package/es/components/TextField/variations/_clear/base.js +1 -1
  189. package/es/components/TextField/variations/_clear/base.js.map +1 -1
  190. package/es/components/TextField/variations/_clear/base_1pkwm4m.css +1 -0
  191. package/es/components/TextField/variations/_disabled/base.js +1 -1
  192. package/es/components/TextField/variations/_disabled/{base_2tv0nz.css → base_4d3opa.css} +1 -1
  193. package/es/components/TextField/variations/_hint-size/base.js +5 -0
  194. package/es/components/TextField/variations/_hint-size/base.js.map +1 -0
  195. package/es/components/TextField/variations/_hint-size/base_1x99605.css +1 -0
  196. package/es/components/TextField/variations/_hint-view/base.js +5 -0
  197. package/es/components/TextField/variations/_hint-view/base.js.map +1 -0
  198. package/es/components/TextField/variations/_hint-view/base_l8etux.css +1 -0
  199. package/es/components/TextField/variations/_label-placement/base.js +1 -1
  200. package/es/components/TextField/variations/_label-placement/base.js.map +1 -1
  201. package/es/components/TextField/variations/_label-placement/base_3domm.css +1 -0
  202. package/es/components/TextField/variations/_read-only/base.js +1 -1
  203. package/es/components/TextField/variations/_read-only/base.js.map +1 -1
  204. package/es/components/TextField/variations/_read-only/base_17ypmu7.css +1 -0
  205. package/es/components/TextField/variations/_size/base.js +1 -1
  206. package/es/components/TextField/variations/_size/base.js.map +1 -1
  207. package/es/components/TextField/variations/_size/base_1xdmaqh.css +1 -0
  208. package/es/components/TextField/variations/_view/base.js +1 -1
  209. package/es/components/TextField/variations/_view/base.js.map +1 -1
  210. package/es/components/TextField/variations/_view/base_qhyte8.css +1 -0
  211. package/es/components/TextFieldGroup/TextFieldGroup.css +1 -1
  212. package/es/components/TextFieldGroup/variations/_shape/base.js +1 -1
  213. package/es/components/TextFieldGroup/variations/_shape/base_52bndd.css +1 -0
  214. package/es/components/_Icon/Icon.assets/InfoCircleOutline.js +19 -0
  215. package/es/components/_Icon/Icon.assets/InfoCircleOutline.js.map +1 -0
  216. package/es/components/_Icon/Icons/IconInfoCircleOutline.js +19 -0
  217. package/es/components/_Icon/Icons/IconInfoCircleOutline.js.map +1 -0
  218. package/es/index.css +54 -34
  219. package/package.json +2 -2
  220. package/styled-components/cjs/components/Autocomplete/Autocomplete.js +6 -2
  221. package/styled-components/cjs/components/TextArea/TextArea.js +112 -34
  222. package/styled-components/cjs/components/TextArea/TextArea.styles.js +85 -42
  223. package/styled-components/cjs/components/TextArea/TextArea.template-doc.mdx +6 -1
  224. package/styled-components/cjs/components/TextArea/TextArea.tokens.js +43 -4
  225. package/styled-components/cjs/components/TextArea/hooks/useAutoResize.js +2 -4
  226. package/styled-components/cjs/components/TextArea/variations/_clear/base.js +1 -1
  227. package/styled-components/cjs/components/TextArea/variations/_hint-size/base.js +11 -0
  228. package/styled-components/cjs/components/TextArea/variations/_hint-size/tokens.json +21 -0
  229. package/styled-components/cjs/components/TextArea/variations/_hint-view/base.js +11 -0
  230. package/styled-components/cjs/components/TextArea/variations/_hint-view/tokens.json +5 -0
  231. package/styled-components/cjs/components/TextArea/variations/_view/base.js +2 -1
  232. package/styled-components/cjs/components/TextField/TextField.js +99 -11
  233. package/styled-components/cjs/components/TextField/TextField.styles.js +46 -21
  234. package/styled-components/cjs/components/TextField/TextField.template-doc.mdx +7 -1
  235. package/styled-components/cjs/components/TextField/TextField.tokens.js +40 -1
  236. package/styled-components/cjs/components/TextField/variations/_clear/base.js +1 -1
  237. package/styled-components/cjs/components/TextField/variations/_hint-size/base.js +11 -0
  238. package/styled-components/cjs/components/TextField/variations/_hint-size/tokens.json +21 -0
  239. package/styled-components/cjs/components/TextField/variations/_hint-view/base.js +11 -0
  240. package/styled-components/cjs/components/TextField/variations/_hint-view/tokens.json +5 -0
  241. package/styled-components/cjs/components/TextField/variations/_label-placement/base.js +1 -1
  242. package/styled-components/cjs/components/TextField/variations/_read-only/base.js +1 -1
  243. package/styled-components/cjs/components/TextField/variations/_size/base.js +1 -1
  244. package/styled-components/cjs/components/TextField/variations/_view/base.js +1 -1
  245. package/styled-components/cjs/components/_Icon/Icon.assets/InfoCircleOutline.js +22 -0
  246. package/styled-components/cjs/components/_Icon/Icons/IconInfoCircleOutline.js +22 -0
  247. package/styled-components/cjs/components/_Icon/index.js +8 -1
  248. package/styled-components/cjs/examples/plasma_b2c/components/TextArea/TextArea.config.js +18 -9
  249. package/styled-components/cjs/examples/plasma_b2c/components/TextArea/TextArea.stories.tsx +70 -0
  250. package/styled-components/cjs/examples/plasma_b2c/components/TextField/TextField.config.js +18 -9
  251. package/styled-components/cjs/examples/plasma_b2c/components/TextField/TextField.stories.tsx +71 -1
  252. package/styled-components/cjs/examples/plasma_web/components/TextArea/TextArea.config.js +18 -9
  253. package/styled-components/cjs/examples/plasma_web/components/TextArea/TextArea.stories.tsx +70 -0
  254. package/styled-components/cjs/examples/plasma_web/components/TextField/TextField.config.js +18 -9
  255. package/styled-components/cjs/examples/plasma_web/components/TextField/TextField.stories.tsx +80 -10
  256. package/styled-components/es/components/Autocomplete/Autocomplete.js +6 -2
  257. package/styled-components/es/components/TextArea/TextArea.js +113 -35
  258. package/styled-components/es/components/TextArea/TextArea.styles.js +84 -41
  259. package/styled-components/es/components/TextArea/TextArea.template-doc.mdx +6 -1
  260. package/styled-components/es/components/TextArea/TextArea.tokens.js +43 -4
  261. package/styled-components/es/components/TextArea/hooks/useAutoResize.js +2 -4
  262. package/styled-components/es/components/TextArea/variations/_clear/base.js +2 -2
  263. package/styled-components/es/components/TextArea/variations/_hint-size/base.js +5 -0
  264. package/styled-components/es/components/TextArea/variations/_hint-size/tokens.json +21 -0
  265. package/styled-components/es/components/TextArea/variations/_hint-view/base.js +5 -0
  266. package/styled-components/es/components/TextArea/variations/_hint-view/tokens.json +5 -0
  267. package/styled-components/es/components/TextArea/variations/_view/base.js +2 -1
  268. package/styled-components/es/components/TextField/TextField.js +99 -11
  269. package/styled-components/es/components/TextField/TextField.styles.js +45 -20
  270. package/styled-components/es/components/TextField/TextField.template-doc.mdx +7 -1
  271. package/styled-components/es/components/TextField/TextField.tokens.js +40 -1
  272. package/styled-components/es/components/TextField/variations/_clear/base.js +2 -2
  273. package/styled-components/es/components/TextField/variations/_hint-size/base.js +5 -0
  274. package/styled-components/es/components/TextField/variations/_hint-size/tokens.json +21 -0
  275. package/styled-components/es/components/TextField/variations/_hint-view/base.js +5 -0
  276. package/styled-components/es/components/TextField/variations/_hint-view/tokens.json +5 -0
  277. package/styled-components/es/components/TextField/variations/_label-placement/base.js +1 -1
  278. package/styled-components/es/components/TextField/variations/_read-only/base.js +2 -2
  279. package/styled-components/es/components/TextField/variations/_size/base.js +2 -2
  280. package/styled-components/es/components/TextField/variations/_view/base.js +2 -2
  281. package/styled-components/es/components/_Icon/Icon.assets/InfoCircleOutline.js +15 -0
  282. package/styled-components/es/components/_Icon/Icons/IconInfoCircleOutline.js +15 -0
  283. package/styled-components/es/components/_Icon/index.js +2 -1
  284. package/styled-components/es/examples/plasma_b2c/components/TextArea/TextArea.config.js +18 -9
  285. package/styled-components/es/examples/plasma_b2c/components/TextArea/TextArea.stories.tsx +70 -0
  286. package/styled-components/es/examples/plasma_b2c/components/TextField/TextField.config.js +18 -9
  287. package/styled-components/es/examples/plasma_b2c/components/TextField/TextField.stories.tsx +71 -1
  288. package/styled-components/es/examples/plasma_web/components/TextArea/TextArea.config.js +18 -9
  289. package/styled-components/es/examples/plasma_web/components/TextArea/TextArea.stories.tsx +70 -0
  290. package/styled-components/es/examples/plasma_web/components/TextField/TextField.config.js +18 -9
  291. package/styled-components/es/examples/plasma_web/components/TextField/TextField.stories.tsx +80 -10
  292. package/types/components/Autocomplete/Autocomplete.d.ts.map +1 -1
  293. package/types/components/Autocomplete/ui/TextField/TextField.styles.d.ts +424 -0
  294. package/types/components/Autocomplete/ui/TextField/TextField.styles.d.ts.map +1 -1
  295. package/types/components/Combobox/ComboboxNew/ui/Target/Target.styles.d.ts +424 -0
  296. package/types/components/Combobox/ComboboxNew/ui/Target/Target.styles.d.ts.map +1 -1
  297. package/types/components/DatePicker/SingleDate/SingleDate.styles.d.ts +424 -0
  298. package/types/components/DatePicker/SingleDate/SingleDate.styles.d.ts.map +1 -1
  299. package/types/components/Range/Range.styles.d.ts +424 -0
  300. package/types/components/Range/Range.styles.d.ts.map +1 -1
  301. package/types/components/Slider/components/Double/Double.styles.d.ts +424 -0
  302. package/types/components/Slider/components/Double/Double.styles.d.ts.map +1 -1
  303. package/types/components/TextArea/TextArea.d.ts +9 -3
  304. package/types/components/TextArea/TextArea.d.ts.map +1 -1
  305. package/types/components/TextArea/TextArea.styles.d.ts +11 -1
  306. package/types/components/TextArea/TextArea.styles.d.ts.map +1 -1
  307. package/types/components/TextArea/TextArea.tokens.d.ts +39 -0
  308. package/types/components/TextArea/TextArea.tokens.d.ts.map +1 -1
  309. package/types/components/TextArea/TextArea.types.d.ts +83 -3
  310. package/types/components/TextArea/TextArea.types.d.ts.map +1 -1
  311. package/types/components/TextArea/hooks/useAutoResize.d.ts.map +1 -1
  312. package/types/components/TextArea/variations/_clear/base.d.ts.map +1 -1
  313. package/types/components/TextArea/variations/_hint-size/base.d.ts +2 -0
  314. package/types/components/TextArea/variations/_hint-size/base.d.ts.map +1 -0
  315. package/types/components/TextArea/variations/_hint-view/base.d.ts +2 -0
  316. package/types/components/TextArea/variations/_hint-view/base.d.ts.map +1 -0
  317. package/types/components/TextArea/variations/_view/base.d.ts.map +1 -1
  318. package/types/components/TextField/TextField.d.ts +9 -3
  319. package/types/components/TextField/TextField.d.ts.map +1 -1
  320. package/types/components/TextField/TextField.styles.d.ts +8 -0
  321. package/types/components/TextField/TextField.styles.d.ts.map +1 -1
  322. package/types/components/TextField/TextField.tokens.d.ts +39 -0
  323. package/types/components/TextField/TextField.tokens.d.ts.map +1 -1
  324. package/types/components/TextField/TextField.types.d.ts +78 -2
  325. package/types/components/TextField/TextField.types.d.ts.map +1 -1
  326. package/types/components/TextField/variations/_clear/base.d.ts.map +1 -1
  327. package/types/components/TextField/variations/_hint-size/base.d.ts +2 -0
  328. package/types/components/TextField/variations/_hint-size/base.d.ts.map +1 -0
  329. package/types/components/TextField/variations/_hint-view/base.d.ts +2 -0
  330. package/types/components/TextField/variations/_hint-view/base.d.ts.map +1 -0
  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/Icon.assets/InfoCircleOutline.d.ts +4 -0
  336. package/types/components/_Icon/Icon.assets/InfoCircleOutline.d.ts.map +1 -0
  337. package/types/components/_Icon/Icons/IconInfoCircleOutline.d.ts +4 -0
  338. package/types/components/_Icon/Icons/IconInfoCircleOutline.d.ts.map +1 -0
  339. package/types/components/_Icon/index.d.ts +1 -0
  340. package/types/components/_Icon/index.d.ts.map +1 -1
  341. package/types/examples/plasma_b2c/components/Mask/Mask.d.ts +788 -12
  342. package/types/examples/plasma_b2c/components/Mask/Mask.d.ts.map +1 -1
  343. package/types/examples/plasma_b2c/components/TextArea/TextArea.config.d.ts +9 -0
  344. package/types/examples/plasma_b2c/components/TextArea/TextArea.config.d.ts.map +1 -1
  345. package/types/examples/plasma_b2c/components/TextArea/TextArea.d.ts +473 -0
  346. package/types/examples/plasma_b2c/components/TextArea/TextArea.d.ts.map +1 -1
  347. package/types/examples/plasma_b2c/components/TextField/TextField.config.d.ts +9 -0
  348. package/types/examples/plasma_b2c/components/TextField/TextField.config.d.ts.map +1 -1
  349. package/types/examples/plasma_b2c/components/TextField/TextField.d.ts +433 -0
  350. package/types/examples/plasma_b2c/components/TextField/TextField.d.ts.map +1 -1
  351. package/types/examples/plasma_web/components/Mask/Mask.d.ts +788 -12
  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 +9 -0
  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 +473 -0
  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 +9 -0
  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 +433 -0
  360. package/types/examples/plasma_web/components/TextField/TextField.d.ts.map +1 -1
  361. package/cjs/components/TextArea/TextArea.styles_es0miz.css +0 -11
  362. package/cjs/components/TextArea/variations/_clear/base_vidplj.css +0 -1
  363. package/cjs/components/TextArea/variations/_view/base_td55th.css +0 -1
  364. package/cjs/components/TextField/TextField.styles_1d2ryq.css +0 -15
  365. package/cjs/components/TextField/variations/_clear/base_rit6gc.css +0 -1
  366. package/cjs/components/TextField/variations/_label-placement/base_1ghihns.css +0 -1
  367. package/cjs/components/TextField/variations/_read-only/base_1n7tghz.css +0 -1
  368. package/cjs/components/TextField/variations/_size/base_1h8l0kj.css +0 -1
  369. package/cjs/components/TextField/variations/_view/base_1noe46b.css +0 -1
  370. package/cjs/components/TextFieldGroup/variations/_shape/base_1e0je21.css +0 -1
  371. package/es/components/TextArea/TextArea.styles_es0miz.css +0 -11
  372. package/es/components/TextArea/variations/_clear/base_vidplj.css +0 -1
  373. package/es/components/TextArea/variations/_view/base_td55th.css +0 -1
  374. package/es/components/TextField/TextField.styles_1d2ryq.css +0 -15
  375. package/es/components/TextField/variations/_clear/base_rit6gc.css +0 -1
  376. package/es/components/TextField/variations/_label-placement/base_1ghihns.css +0 -1
  377. package/es/components/TextField/variations/_read-only/base_1n7tghz.css +0 -1
  378. package/es/components/TextField/variations/_size/base_1h8l0kj.css +0 -1
  379. package/es/components/TextField/variations/_view/base_1noe46b.css +0 -1
  380. package/es/components/TextFieldGroup/variations/_shape/base_1e0je21.css +0 -1
@@ -19,6 +19,7 @@ export var classes = {
19
19
  outerLabelPlacement: 'label-placement-outer',
20
20
  /** Класс для view `clear` */
21
21
  clear: 'textarea-clear',
22
+ hasHint: 'textarea-has-hint',
22
23
  hasRightContent: 'textarea-has-right-content',
23
24
  hasDivider: 'textarea-has-divider'
24
25
  };
@@ -185,6 +186,7 @@ export var tokens = {
185
186
  indicatorLabelPlacementOuterRight: '--plasma-textarea-indicator-placement-outer-right',
186
187
  clearIndicatorLabelPlacementInner: '--plasma-textarea__clear-indicator-placement-inner',
187
188
  clearIndicatorLabelPlacementInnerRight: '--plasma-textarea__clear-indicator-placement-inner-right',
189
+ clearIndicatorHintInnerRight: '--plasma-textarea__clear-indicator-hint-placement-inner-right',
188
190
  scrollbarWidth: '--plasma-textarea-scrollbar-width',
189
191
  scrollbarBorderWidth: '--plasma-textarea-scrollbar-border-width',
190
192
  scrollbarThumbBackgroundColor: '--plasma-textarea-scrollbar-thumb-background-color',
@@ -193,8 +195,45 @@ export var tokens = {
193
195
  scrollbarTrackBackgroundColor: '--plasma-textarea-scrollbar-track-background-color',
194
196
  scrollbarTrackBackgroundColorHover: '--plasma-textarea-scrollbar-track-background-color-hover',
195
197
  scrollbarTrackBackgroundColorActive: '--plasma-textarea-scrollbar-track-background-color-active',
196
- dividerColor: '--plasma-textfield-divider-color',
197
- dividerColorHover: '--plasma-textfield-divider-color-hover',
198
- dividerColorFocus: '--plasma-textfield-divider-color-focus',
199
- dividerColorReadOnly: '--plasma-textfield-divider-color-readonly'
198
+ dividerColor: '--plasma-textarea-divider-color',
199
+ dividerColorHover: '--plasma-textarea-divider-color-hover',
200
+ dividerColorFocus: '--plasma-textarea-divider-color-focus',
201
+ dividerColorReadOnly: '--plasma-textarea-divider-color-readonly',
202
+ titleCaptionColor: '--plasma-textarea__title-caption-color',
203
+ titleCaptionColorReadOnly: '--plasma-textarea__title-caption-color-readonly',
204
+ titleCaptionInnerLabelOffset: '--plasma-textarea__title-caption-label-inner-offset',
205
+ titleCaptionFontFamily: '--plasma-textarea__title-caption-font-family',
206
+ titleCaptionFontStyle: '--plasma-textarea__title-caption-font-style',
207
+ titleCaptionFontSize: '--plasma-textarea__title-caption-font-size',
208
+ titleCaptionFontWeight: '--plasma-textarea__title-caption-font-weight',
209
+ titleCaptionLetterSpacing: '--plasma-textarea__title-caption-letter-spacing',
210
+ titleCaptionLineHeight: '--plasma-textarea__title-caption-line-height',
211
+ /** Токены для tooltip */
212
+ hintMargin: '--plasma-textarea__hint-margin',
213
+ hintTargetSize: '--plasma-textarea__hint-target-size',
214
+ hintIconColor: '--plasma-textarea__hint-icon-color',
215
+ hintInnerLabelPlacementOffset: '--plasma-textarea__hint-inner-label-placement-offset',
216
+ clearHintInnerLabelPlacementOffset: '--plasma-textarea__clear-hint-inner-label-placement-offset',
217
+ tooltipBackgroundColor: '--plasma-textarea__tooltip-background-color',
218
+ tooltipBoxShadow: '--plasma-textarea__tooltip-box-shadow',
219
+ tooltipColor: '--plasma-textarea__tooltip-color',
220
+ tooltipPaddingTop: '--plasma-textarea__tooltip-padding-top',
221
+ tooltipPaddingRight: '--plasma-textarea__tooltip-padding-right',
222
+ tooltipPaddingBottom: '--plasma-textarea__tooltip-padding-bottom',
223
+ tooltipPaddingLeft: '--plasma-textarea__tooltip-padding-left',
224
+ tooltipMinHeight: '--plasma-textarea__tooltip-min-height',
225
+ tooltipBorderRadius: '--plasma-textarea__tooltip-border-radius',
226
+ tooltipTextFontFamily: '--plasma-textarea__tooltip-text-font-family',
227
+ tooltipTextFontSize: '--plasma-textarea__tooltip-text-font-size',
228
+ tooltipTextFontStyle: '--plasma-textarea__tooltip-text-font-style',
229
+ tooltipTextFontWeight: '--plasma-textarea__tooltip-text-font-weight',
230
+ tooltipTextFontLetterSpacing: '--plasma-textarea__tooltip-text-font-letter-spacing',
231
+ tooltipTextFontLineHeight: '--plasma-textarea__tooltip-text-font-line-height',
232
+ tooltipContentLeftMargin: '--plasma-textarea__tooltip-content-left-margin',
233
+ tooltipArrowMaskWidth: '--plasma-textarea__tooltip-arrow-mask-width',
234
+ tooltipArrowMaskHeight: '--plasma-textarea__tooltip-arrow-mask-height',
235
+ tooltipArrowMaskImage: '--plasma-textarea__tooltip-arrow-mask-image',
236
+ tooltipArrowHeight: '--plasma-textarea__tooltip-arrow-height',
237
+ tooltipArrowEdgeMargin: '--plasma-textarea__tooltip-arrow-edge-margin',
238
+ tooltipArrowBackground: '--plasma-textarea__tooltip-arrow-background'
200
239
  };
@@ -1,14 +1,12 @@
1
1
  import { useEffect, useRef } from 'react';
2
2
  export var ROOT_FONT_SIZE = 16;
3
3
  export var useAutoResize = function useAutoResize(active, ref, value, minAuto, maxAuto) {
4
- var isManualResize = useRef(false);
5
4
  var previousHeight = useRef();
6
5
  useEffect(function () {
7
- if (active && ref && ref.current && !isManualResize.current) {
6
+ if (active && ref && ref.current) {
8
7
  // проверка на пользовательский resize (вручную)
9
8
  var height = ref.current.clientHeight / ROOT_FONT_SIZE;
10
9
  if (previousHeight.current !== undefined && previousHeight.current !== height) {
11
- isManualResize.current = true;
12
10
  return;
13
11
  }
14
12
  var style = getComputedStyle(ref.current);
@@ -23,5 +21,5 @@ export var useAutoResize = function useAutoResize(active, ref, value, minAuto, m
23
21
  ref.current.style.height = "".concat(newHeight, "rem");
24
22
  previousHeight.current = newHeight;
25
23
  }
26
- }, [ref, active, value]);
24
+ }, [ref, active, value, minAuto, maxAuto]);
27
25
  };
@@ -1,4 +1,4 @@
1
1
  import { css } from 'styled-components';
2
2
  import { classes, tokens } from '../../TextArea.tokens';
3
- import { StyledContainer, StyledContent, StyledHelpers, StyledIndicator, StyledLabel, StyledPlaceholder, StyledTextArea, StyledTextAreaWrapper } from '../../TextArea.styles';
4
- export var base = /*#__PURE__*/css(["&.", "{border:unset;", "{box-shadow:unset;background-color:unset;border-radius:0;padding-bottom:var(", ");}", "{margin-bottom:var(", ");}", "{right:0;bottom:unset;}", ",", "{padding-left:0;}", "{background-color:unset;border-radius:0;padding-top:var(", ");padding-right:0;}", "{color:var(", ");padding-right:0;&.", "{padding-right:var(", ");}}", "{&:not(.", "){", "{color:var(", ");}&.", " ", "{color:var(", ");}}&.", "{color:var(", ");}}", "{padding-left:0;}", "{&.", "{inset:var(", ");&.align-right{inset:var(", ");}}}.", "{border:unset;border-radius:0;}&:focus-within:not([readonly]) .", "{background-color:unset;box-shadow:unset;}&:focus-within:not([readonly]) .", "{border:unset;}&:focus-within:not([readonly]) .", "{background-color:unset;}&.", "{", "{position:relative;--plasma_private-textarea-divider-color:var(", ");&:before{content:'';position:absolute;height:0.063rem;width:100%;bottom:0;left:0;background-color:var(--plasma_private-textarea-divider-color);transition:background-color 0.1s ease-in;}}&:not([readonly]) ", ":hover{--plasma_private-textarea-divider-color:var( ", ",var(", ") );}&:not([readonly]) ", ":focus-within{--plasma_private-textarea-divider-color:var( ", ",var(", ") );}}}"], classes.clear, StyledTextAreaWrapper, tokens.inputPaddingTop, StyledLabel, tokens.clearLabelMarginBottom, StyledContent, StyledTextArea, StyledHelpers, StyledHelpers, tokens.clearHelpersPaddingTop, StyledTextArea, tokens.clearInputColor, classes.hasRightContent, tokens.clearInputPaddingRightWithRightContent, StyledContainer, classes.innerPlaceholderUp, StyledPlaceholder, tokens.clearPlaceholderColor, classes.focusedOuterPlaceholderColor, StyledPlaceholder, tokens.clearPlaceholderColorFocus, classes.innerPlaceholderUp, tokens.placeholderColor, StyledPlaceholder, StyledIndicator, classes.innerLabelPlacement, tokens.clearIndicatorLabelPlacementInner, tokens.clearIndicatorLabelPlacementInnerRight, classes.styledContainer, classes.styledTextAreaWrapper, classes.styledContainer, classes.styledHelpers, classes.hasDivider, StyledTextAreaWrapper, /*#__PURE__*/String(tokens.dividerColor), StyledTextAreaWrapper, tokens.dividerColorHover, /*#__PURE__*/String(tokens.dividerColor), StyledTextAreaWrapper, tokens.dividerColorFocus, /*#__PURE__*/String(tokens.dividerColor));
3
+ import { OuterLabelWrapper, StyledContainer, StyledContent, StyledHelpers, StyledHintWrapper, StyledIndicator, StyledPlaceholder, StyledTextArea, StyledTextAreaWrapper } from '../../TextArea.styles';
4
+ export var base = /*#__PURE__*/css(["&.", "{border:unset;", "{box-shadow:unset;background-color:unset;border-radius:0;padding-bottom:var(", ");}", "{margin-bottom:var(", ");}", "{right:0;bottom:unset;}", ",", "{padding-left:0;}", "{background-color:unset;border-radius:0;padding-top:var(", ");padding-right:0;}", "{color:var(", ");padding-right:0;&.", "{padding-right:var(", ");}}", "{&:not(.", "){", "{color:var(", ");}&.", " ", "{color:var(", ");}}&.", "{color:var(", ");}}", "{padding-left:0;}", "{&.", "{inset:var(", ");&.align-right{inset:var(", ");}}}&.", "{", "{&.", "{inset:var(", ");}}", "{&.", ".align-right{inset:var(", ");}}}.", "{border:unset;border-radius:0;}&:focus-within:not([readonly]) .", "{background-color:unset;box-shadow:unset;}&:focus-within:not([readonly]) .", "{border:unset;}&:focus-within:not([readonly]) .", "{background-color:unset;}&.", "{", "{position:relative;--plasma_private-textarea-divider-color:var(", ");&:before{content:'';position:absolute;height:0.063rem;width:100%;bottom:0;left:0;background-color:var(--plasma_private-textarea-divider-color);transition:background-color 0.1s ease-in;}}&:not([readonly]) ", ":hover{--plasma_private-textarea-divider-color:var( ", ",var(", ") );}&:not([readonly]) ", ":focus-within{--plasma_private-textarea-divider-color:var( ", ",var(", ") );}}}"], classes.clear, StyledTextAreaWrapper, tokens.inputPaddingTop, OuterLabelWrapper, tokens.clearLabelMarginBottom, StyledContent, StyledTextArea, StyledHelpers, StyledHelpers, tokens.clearHelpersPaddingTop, StyledTextArea, tokens.clearInputColor, classes.hasRightContent, tokens.clearInputPaddingRightWithRightContent, StyledContainer, classes.innerPlaceholderUp, StyledPlaceholder, tokens.clearPlaceholderColor, classes.focusedOuterPlaceholderColor, StyledPlaceholder, tokens.clearPlaceholderColorFocus, classes.innerPlaceholderUp, tokens.placeholderColor, StyledPlaceholder, StyledIndicator, classes.innerLabelPlacement, tokens.clearIndicatorLabelPlacementInner, tokens.clearIndicatorLabelPlacementInnerRight, classes.hasHint, StyledHintWrapper, classes.innerLabelPlacement, tokens.clearHintInnerLabelPlacementOffset, StyledIndicator, classes.innerLabelPlacement, tokens.clearIndicatorHintInnerRight, classes.styledContainer, classes.styledTextAreaWrapper, classes.styledContainer, classes.styledHelpers, classes.hasDivider, StyledTextAreaWrapper, /*#__PURE__*/String(tokens.dividerColor), StyledTextAreaWrapper, tokens.dividerColorHover, /*#__PURE__*/String(tokens.dividerColor), StyledTextAreaWrapper, tokens.dividerColorFocus, /*#__PURE__*/String(tokens.dividerColor));
@@ -0,0 +1,5 @@
1
+ import { css } from 'styled-components';
2
+ import { tooltipTokens } from '../../../Tooltip';
3
+ import { tokens } from '../../TextArea.tokens';
4
+ import { Hint } from '../../TextArea.styles';
5
+ export var base = /*#__PURE__*/css(["", "{", ":var(", ");", ":var(", ");", ":var(", ");", ":var(", ");", ":var(", ");", ":var(", ");", ":var(", ");", ":var(", ");", ":var(", ");", ":var(", ");", ":var(", ");", ":var(", ");", ":var(", ");", ":var(", ");", ":var(", ");", ":var(", ");", ":var(", ");", ":var(", ");", ":var(", ");}"], Hint, tooltipTokens.paddingTop, tokens.tooltipPaddingTop, tooltipTokens.paddingRight, tokens.tooltipPaddingRight, tooltipTokens.paddingBottom, tokens.tooltipPaddingBottom, tooltipTokens.paddingLeft, tokens.tooltipPaddingLeft, tooltipTokens.minHeight, tokens.tooltipMinHeight, tooltipTokens.borderRadius, tokens.tooltipBorderRadius, tooltipTokens.textFontFamily, tokens.tooltipTextFontFamily, tooltipTokens.textFontSize, tokens.tooltipTextFontSize, tooltipTokens.textFontStyle, tokens.tooltipTextFontStyle, tooltipTokens.textFontWeight, tokens.tooltipTextFontWeight, tooltipTokens.textFontLetterSpacing, tokens.tooltipTextFontLetterSpacing, tooltipTokens.textFontLineHeight, tokens.tooltipTextFontLineHeight, tooltipTokens.contentLeftMargin, tokens.tooltipContentLeftMargin, tooltipTokens.arrowMaskWidth, tokens.tooltipArrowMaskWidth, tooltipTokens.arrowMaskHeight, tokens.tooltipArrowMaskHeight, tooltipTokens.arrowMaskImage, tokens.tooltipArrowMaskImage, tooltipTokens.arrowHeight, tokens.tooltipArrowHeight, tooltipTokens.arrowEdgeMargin, tokens.tooltipArrowEdgeMargin, tooltipTokens.arrowBackground, tokens.tooltipArrowBackground);
@@ -0,0 +1,21 @@
1
+ [
2
+ "--plasma-textarea__tooltip-padding-top",
3
+ "--plasma-textarea__tooltip-padding-right",
4
+ "--plasma-textarea__tooltip-padding-bottom",
5
+ "--plasma-textarea__tooltip-padding-left",
6
+ "--plasma-textarea__tooltip-min-height",
7
+ "--plasma-textarea__tooltip-border-radius",
8
+ "--plasma-textarea__tooltip-text-font-family",
9
+ "--plasma-textarea__tooltip-text-font-size",
10
+ "--plasma-textarea__tooltip-text-font-style",
11
+ "--plasma-textarea__tooltip-text-font-weight",
12
+ "--plasma-textarea__tooltip-text-font-letter-spacing",
13
+ "--plasma-textarea__tooltip-text-font-line-height",
14
+ "--plasma-textarea__tooltip-content-left-margin",
15
+ "--plasma-textarea__tooltip-arrow-mask-width",
16
+ "--plasma-textarea__tooltip-arrow-mask-height",
17
+ "--plasma-textarea__tooltip-arrow-mask-image",
18
+ "--plasma-textarea__tooltip-arrow-height",
19
+ "--plasma-textarea__tooltip-arrow-edge-margin",
20
+ "--plasma-textarea__tooltip-arrow-background"
21
+ ]
@@ -0,0 +1,5 @@
1
+ import { css } from 'styled-components';
2
+ import { tooltipTokens } from '../../../Tooltip';
3
+ import { Hint } from '../../TextArea.styles';
4
+ import { tokens } from '../../TextArea.tokens';
5
+ export var base = /*#__PURE__*/css(["", "{", ":var(", ");", ":var(", ");", ":var(", ");}"], Hint, tooltipTokens.backgroundColor, tokens.tooltipBackgroundColor, tooltipTokens.boxShadow, tokens.tooltipBoxShadow, tooltipTokens.color, tokens.tooltipColor);
@@ -0,0 +1,5 @@
1
+ [
2
+ "--plasma-textarea__tooltip-background-color",
3
+ "--plasma-textarea__tooltip-box-shadow",
4
+ "--plasma-textarea__tooltip-color "
5
+ ]
@@ -1,7 +1,8 @@
1
1
  import { css } from 'styled-components';
2
2
  import { tokens, classes } from '../../TextArea.tokens';
3
+ import { TitleCaption } from '../../TextArea.styles';
3
4
  var styledContainer = classes.styledContainer,
4
5
  styledTextAreaWrapper = classes.styledTextAreaWrapper,
5
6
  styledHelpers = classes.styledHelpers;
6
7
  var exclusionSelectors = /*#__PURE__*/"not(.".concat(classes.clear, "):not([disabled]):not([readonly]):not(:focus-within)");
7
- export var base = /*#__PURE__*/css([".", "{transition:box-shadow 0.1s ease-in-out;border-radius:var(", ");border:var(", ") solid var(", ");}.", "{transition:background-color 0.1s ease-in-out,box-shadow 0.1s ease-in-out;box-shadow:inset 0 0 0 var(", ",1px) var(", ");padding-right:var(", ",1px);}&:focus-within:not([readonly]) .", "{background-color:var(", ");box-shadow:inset 0 0 0 var(", ",1px) var(", ");}&:focus-within:not([readonly]) .", "{border:var(", ") solid var(", ");}&:focus-within:not([readonly]) .", "{background-color:var(", ");}&:hover:", " .", "{border:var(", ") solid var(", ");}&:hover:", " .", "{box-shadow:inset 0 0 0 var(", ",1px) var(", ");background-color:var(", ");}&:hover:", " .", " + .", "{background-color:var(", ");}&:active:", " .", "{box-shadow:inset 0 0 0 var(", ",1px) var(", ");background-color:var(", ");}&:active:", " .", " + .", "{background-color:var(", ");}"], /*#__PURE__*/String(styledContainer), tokens.borderRadius, tokens.borderSize, tokens.borderColor, /*#__PURE__*/String(styledTextAreaWrapper), tokens.borderSize, tokens.inputBorderColor, tokens.borderSize, /*#__PURE__*/String(styledTextAreaWrapper), tokens.inputBackgroundColorFocus, tokens.borderSize, tokens.inputBorderColorFocus, /*#__PURE__*/String(styledContainer), tokens.borderSize, tokens.borderColorFocus, /*#__PURE__*/String(styledHelpers), tokens.helpersBackgroundColorFocus, exclusionSelectors, /*#__PURE__*/String(styledContainer), tokens.borderSize, tokens.borderColorHover, exclusionSelectors, /*#__PURE__*/String(styledTextAreaWrapper), tokens.borderSize, tokens.inputBorderColorHover, tokens.inputBackgroundColorHover, exclusionSelectors, /*#__PURE__*/String(styledTextAreaWrapper), /*#__PURE__*/String(styledHelpers), tokens.helpersBackgroundColorHover, exclusionSelectors, /*#__PURE__*/String(styledTextAreaWrapper), tokens.borderSize, tokens.inputBorderColorActive, tokens.inputBackgroundColorActive, exclusionSelectors, /*#__PURE__*/String(styledTextAreaWrapper), /*#__PURE__*/String(styledHelpers), tokens.helpersBackgroundColorActive);
8
+ export var base = /*#__PURE__*/css(["", "{color:var(", ");}.", "{transition:box-shadow 0.1s ease-in-out;border-radius:var(", ");border:var(", ") solid var(", ");}.", "{transition:background-color 0.1s ease-in-out,box-shadow 0.1s ease-in-out;box-shadow:inset 0 0 0 var(", ",1px) var(", ");padding-right:var(", ",1px);}&:focus-within:not([readonly]) .", "{background-color:var(", ");box-shadow:inset 0 0 0 var(", ",1px) var(", ");}&:focus-within:not([readonly]) .", "{border:var(", ") solid var(", ");}&:focus-within:not([readonly]) .", "{background-color:var(", ");}&:hover:", " .", "{border:var(", ") solid var(", ");}&:hover:", " .", "{box-shadow:inset 0 0 0 var(", ",1px) var(", ");background-color:var(", ");}&:hover:", " .", " + .", "{background-color:var(", ");}&:active:", " .", "{box-shadow:inset 0 0 0 var(", ",1px) var(", ");background-color:var(", ");}&:active:", " .", " + .", "{background-color:var(", ");}"], TitleCaption, tokens.titleCaptionColor, styledContainer, tokens.borderRadius, tokens.borderSize, tokens.borderColor, styledTextAreaWrapper, tokens.borderSize, tokens.inputBorderColor, tokens.borderSize, styledTextAreaWrapper, tokens.inputBackgroundColorFocus, tokens.borderSize, tokens.inputBorderColorFocus, styledContainer, tokens.borderSize, tokens.borderColorFocus, styledHelpers, tokens.helpersBackgroundColorFocus, exclusionSelectors, styledContainer, tokens.borderSize, tokens.borderColorHover, exclusionSelectors, styledTextAreaWrapper, tokens.borderSize, tokens.inputBorderColorHover, tokens.inputBackgroundColorHover, exclusionSelectors, styledTextAreaWrapper, styledHelpers, tokens.helpersBackgroundColorHover, exclusionSelectors, styledTextAreaWrapper, tokens.borderSize, tokens.inputBorderColorActive, tokens.inputBackgroundColorActive, exclusionSelectors, styledTextAreaWrapper, styledHelpers, tokens.helpersBackgroundColorActive);
@@ -1,4 +1,5 @@
1
- var _excluded = ["id", "className", "style", "contentLeft", "contentRight", "label", "labelPlacement", "textBefore", "textAfter", "placeholder", "leftHelper", "enumerationType", "requiredPlacement", "view", "size", "readOnly", "disabled", "required", "clear", "optional", "hasDivider", "value", "chips", "onChange", "onChangeChips", "onSearch", "onKeyDown"];
1
+ var _IconInfoCircleOutlin;
2
+ var _excluded = ["id", "className", "style", "contentLeft", "contentRight", "label", "labelPlacement", "textBefore", "textAfter", "placeholder", "leftHelper", "enumerationType", "requiredPlacement", "titleCaption", "hasHint", "hintTrigger", "hintText", "hintView", "hintSize", "hintTargetIcon", "hintPlacement", "hintHasArrow", "hintOffset", "hintWidth", "hintContentLeft", "view", "size", "readOnly", "disabled", "required", "clear", "optional", "hasDivider", "value", "chips", "onChange", "onChangeChips", "onSearch", "onKeyDown"];
2
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); }
3
4
  function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
4
5
  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."); }
@@ -8,17 +9,21 @@ function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" !=
8
9
  function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
9
10
  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; }
10
11
  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; }
11
- import React, { forwardRef, useEffect, useRef, useState } from 'react';
12
+ import React, { forwardRef, useEffect, useMemo, useRef, useState } from 'react';
12
13
  import { safeUseId, useForkRef } from '@salutejs/plasma-core';
13
14
  import { css } from 'styled-components';
14
15
  import { cx } from '../../utils';
16
+ import { IconInfoCircleOutline } from '../_Icon';
17
+ import { useOutsideClick } from '../../hooks';
15
18
  import { base as sizeCSS } from './variations/_size/base';
16
19
  import { base as viewCSS } from './variations/_view/base';
17
20
  import { base as clearCSS } from './variations/_clear/base';
18
21
  import { base as disabledCSS } from './variations/_disabled/base';
19
22
  import { base as readOnlyCSS } from './variations/_read-only/base';
20
23
  import { base as labelPlacementCSS } from './variations/_label-placement/base';
21
- import { Input, InputContainer, LeftHelper, Label, InputWrapper, InputLabelWrapper, StyledContentLeft, StyledContentRight, StyledChips, StyledTextBefore, StyledTextAfter, StyledIndicator, StyledOptionalText, InputPlaceholder } from './TextField.styles';
24
+ import { base as hintViewCSS } from './variations/_hint-view/base';
25
+ import { base as hintSizeCSS } from './variations/_hint-size/base';
26
+ import { Input, InputContainer, LeftHelper, Label, InputWrapper, InputLabelWrapper, StyledContentLeft, StyledContentRight, StyledChips, StyledTextBefore, StyledTextAfter, StyledIndicator, StyledOptionalText, InputPlaceholder, OuterLabelWrapper, TitleCaption, StyledHintWrapper, HintTargetWrapper, StyledIndicatorWrapper, Hint } from './TextField.styles';
22
27
  import { classes } from './TextField.tokens';
23
28
  import { TextFieldChip } from './ui';
24
29
  import { useKeyNavigation } from './hooks';
@@ -42,6 +47,23 @@ export var textFieldRoot = function textFieldRoot(Root) {
42
47
  enumerationType = _ref$enumerationType === void 0 ? 'plain' : _ref$enumerationType,
43
48
  _ref$requiredPlacemen = _ref.requiredPlacement,
44
49
  requiredPlacement = _ref$requiredPlacemen === void 0 ? 'right' : _ref$requiredPlacemen,
50
+ titleCaption = _ref.titleCaption,
51
+ hasHint = _ref.hasHint,
52
+ _ref$hintTrigger = _ref.hintTrigger,
53
+ hintTrigger = _ref$hintTrigger === void 0 ? 'hover' : _ref$hintTrigger,
54
+ hintText = _ref.hintText,
55
+ _ref$hintView = _ref.hintView,
56
+ hintView = _ref$hintView === void 0 ? 'default' : _ref$hintView,
57
+ _ref$hintSize = _ref.hintSize,
58
+ hintSize = _ref$hintSize === void 0 ? 'm' : _ref$hintSize,
59
+ hintTargetIcon = _ref.hintTargetIcon,
60
+ _ref$hintPlacement = _ref.hintPlacement,
61
+ hintPlacement = _ref$hintPlacement === void 0 ? 'auto' : _ref$hintPlacement,
62
+ hintHasArrow = _ref.hintHasArrow,
63
+ _ref$hintOffset = _ref.hintOffset,
64
+ hintOffset = _ref$hintOffset === void 0 ? [0, 0] : _ref$hintOffset,
65
+ hintWidth = _ref.hintWidth,
66
+ hintContentLeft = _ref.hintContentLeft,
45
67
  view = _ref.view,
46
68
  size = _ref.size,
47
69
  _ref$readOnly = _ref.readOnly,
@@ -78,10 +100,15 @@ export var textFieldRoot = function textFieldRoot(Root) {
78
100
  _useState4 = _slicedToArray(_useState3, 2),
79
101
  chips = _useState4[0],
80
102
  setChips = _useState4[1];
103
+ var _useState5 = useState(false),
104
+ _useState6 = _slicedToArray(_useState5, 2),
105
+ isHintVisible = _useState6[0],
106
+ setIsHintVisible = _useState6[1];
81
107
  var uniqId = safeUseId();
82
108
  var innerId = id || uniqId;
83
109
  var labelId = safeUseId();
84
110
  var helperTextId = safeUseId();
111
+ var hintId = safeUseId();
85
112
  var isDefaultView = view === 'default' || readOnly || disabled;
86
113
  var isChipEnumeration = enumerationType === 'chip';
87
114
  var isChipsVisible = isChipEnumeration && Boolean(chips === null || chips === void 0 ? void 0 : chips.length);
@@ -96,14 +123,37 @@ export var textFieldRoot = function textFieldRoot(Root) {
96
123
  var placeholderShown = Boolean(innerPlaceholderValue) && !hasValue;
97
124
  var clearClass = clear ? classes.clear : undefined;
98
125
  var hasDividerClass = hasDivider ? classes.hasDivider : undefined;
126
+ var hasHintClass = hasHint ? classes.hasHint : undefined;
99
127
  var requiredPlacementClass = requiredPlacement === 'right' ? 'align-right ' : undefined;
100
128
  var labelPlacementClass = innerLabelPlacementValue ? classes["".concat(innerLabelPlacementValue, "LabelPlacement")] : undefined;
101
129
  var hasValueClass = hasValue ? classes.hasValue : undefined;
102
130
  var wrapperWithoutLeftContent = !contentLeft && isChipsVisible ? classes.hasEmptyContentLeft : undefined;
103
131
  var wrapperWithoutRightContent = !contentRight && isChipsVisible ? classes.hasEmptyContentRight : undefined;
132
+ var hintRef = useOutsideClick(function () {
133
+ setIsHintVisible(false);
134
+ });
135
+ var hintInnerRef = useRef(null);
136
+ var hintForkRef = useForkRef(hintRef, hintInnerRef);
104
137
  var handleInput = function handleInput(event) {
105
138
  setHasValue(Boolean(event.target.value));
106
139
  };
140
+ var handleHintShow = function handleHintShow() {
141
+ return setIsHintVisible(true);
142
+ };
143
+ var handleHintHide = function handleHintHide() {
144
+ return setIsHintVisible(false);
145
+ };
146
+ var handleHintClick = function handleHintClick(event) {
147
+ if (hasHint && hintTrigger === 'click') {
148
+ var _hintInnerRef$current;
149
+ event.stopPropagation();
150
+ var targetIsPopover = event.target === hintInnerRef.current;
151
+ var rootHasTarget = (_hintInnerRef$current = hintInnerRef.current) === null || _hintInnerRef$current === void 0 ? void 0 : _hintInnerRef$current.contains(event.target);
152
+ if (!targetIsPopover && !rootHasTarget) {
153
+ setIsHintVisible(true);
154
+ }
155
+ }
156
+ };
107
157
  var handleChange = function handleChange(event) {
108
158
  if (disabled || readOnly) {
109
159
  return;
@@ -160,6 +210,31 @@ export var textFieldRoot = function textFieldRoot(Root) {
160
210
  onKeyDown(event);
161
211
  }
162
212
  };
213
+ var HintComponent = useMemo(function () {
214
+ return /*#__PURE__*/React.createElement(Hint, {
215
+ ref: hintForkRef,
216
+ text: String(hintText),
217
+ opened: isHintVisible,
218
+ target: /*#__PURE__*/React.createElement(HintTargetWrapper, _extends({
219
+ id: hintId
220
+ }, hintTrigger === 'hover' ? {
221
+ onMouseEnter: handleHintShow,
222
+ onMouseLeave: handleHintHide
223
+ } : {
224
+ onClick: handleHintClick
225
+ }), hintTargetIcon || _IconInfoCircleOutlin || (_IconInfoCircleOutlin = /*#__PURE__*/React.createElement(IconInfoCircleOutline, {
226
+ size: "xs",
227
+ color: "inherit"
228
+ }))),
229
+ placement: hintPlacement,
230
+ hasArrow: hintHasArrow,
231
+ offset: hintOffset,
232
+ minWidth: hintWidth,
233
+ maxWidth: hintWidth,
234
+ contentLeft: hintContentLeft,
235
+ frame: hintId
236
+ });
237
+ }, [hintText, isHintVisible, hintId, hintTrigger, handleHintShow, handleHintHide, handleHintClick, hintTargetIcon, hintPlacement, hintHasArrow, hintOffset, hintWidth, hintContentLeft]);
163
238
  useEffect(function () {
164
239
  if (!isChipEnumeration && !(values !== null && values !== void 0 && values.length)) {
165
240
  return;
@@ -182,7 +257,7 @@ export var textFieldRoot = function textFieldRoot(Root) {
182
257
  var innerOptional = Boolean(required ? false : optional);
183
258
  var hasPlaceholderOptional = innerOptional && !innerLabelValue && !hasOuterLabel;
184
259
  var optionalTextNode = innerOptional ? /*#__PURE__*/React.createElement(StyledOptionalText, null, Boolean(hasPlaceholderOptional ? innerPlaceholderValue : innerLabelValue) && '\xa0', optionalText) : null;
185
- return /*#__PURE__*/React.createElement(Root, {
260
+ return /*#__PURE__*/React.createElement(Root, _extends({
186
261
  view: view,
187
262
  size: size,
188
263
  disabled: disabled,
@@ -190,21 +265,28 @@ export var textFieldRoot = function textFieldRoot(Root) {
190
265
  clear: clear,
191
266
  labelPlacement: innerLabelPlacementValue,
192
267
  onClick: handleInputFocus,
193
- className: cx(labelPlacementClass, clearClass, hasDividerClass, classes.textFieldGroupItem, className),
268
+ className: cx(labelPlacementClass, clearClass, hasDividerClass, hasHintClass, classes.textFieldGroupItem, className),
194
269
  style: style
195
- }, hasOuterLabel && /*#__PURE__*/React.createElement(Label, {
270
+ }, hasHint && {
271
+ hintView: hintView,
272
+ hintSize: hintSize
273
+ }), (hasOuterLabel || titleCaption) && /*#__PURE__*/React.createElement(OuterLabelWrapper, {
274
+ isInnnerLabel: labelPlacement === 'inner'
275
+ }, hasOuterLabel && /*#__PURE__*/React.createElement(StyledIndicatorWrapper, null, /*#__PURE__*/React.createElement(Label, {
196
276
  id: labelId,
197
277
  htmlFor: id
198
- }, required && /*#__PURE__*/React.createElement(StyledIndicator, {
199
- className: cx(classes.outerLabelPlacement, requiredPlacementClass)
200
- }), innerLabelValue, optionalTextNode), /*#__PURE__*/React.createElement(InputWrapper
278
+ }, innerLabelValue), hasHint && /*#__PURE__*/React.createElement(StyledHintWrapper, null, HintComponent), required && /*#__PURE__*/React.createElement(StyledIndicator, {
279
+ className: cx(classes.outerLabelPlacement, requiredPlacementClass, hasHintClass)
280
+ }), optionalTextNode), titleCaption && /*#__PURE__*/React.createElement(TitleCaption, null, titleCaption)), /*#__PURE__*/React.createElement(InputWrapper
201
281
  // Ref для внутреннего использования. Не отдается наружу.
202
282
  , {
203
283
  ref: rest.inputWrapperRef,
204
284
  className: cx(withHasChips, wrapperWithoutLeftContent, wrapperWithoutRightContent)
205
- }, !hasOuterLabel && required && /*#__PURE__*/React.createElement(StyledIndicator, {
285
+ }, !hasOuterLabel && /*#__PURE__*/React.createElement(React.Fragment, null, required && /*#__PURE__*/React.createElement(StyledIndicator, {
206
286
  className: cx(classes.innerLabelPlacement, requiredPlacementClass)
207
- }), contentLeft && /*#__PURE__*/React.createElement(StyledContentLeft, {
287
+ }), hasHint && /*#__PURE__*/React.createElement(StyledHintWrapper, {
288
+ className: classes.innerLabelPlacement
289
+ }, HintComponent)), contentLeft && /*#__PURE__*/React.createElement(StyledContentLeft, {
208
290
  isClear: clear,
209
291
  isDefaultView: isDefaultView
210
292
  }, contentLeft), /*#__PURE__*/React.createElement(InputLabelWrapper, {
@@ -280,6 +362,12 @@ export var textFieldConfig = {
280
362
  },
281
363
  labelPlacement: {
282
364
  css: labelPlacementCSS
365
+ },
366
+ hintView: {
367
+ css: hintViewCSS
368
+ },
369
+ hintSize: {
370
+ css: hintSizeCSS
283
371
  }
284
372
  },
285
373
  defaults: {
@@ -1,51 +1,76 @@
1
1
  import styled from 'styled-components';
2
+ import { component, mergeConfig } from '../../engines';
3
+ import { tooltipConfig } from '../Tooltip';
2
4
  import { classes, tokens } from './TextField.tokens';
3
- export var InputWrapper = /*#__PURE__*/styled.div.withConfig({
5
+ var mergedConfig = /*#__PURE__*/mergeConfig(tooltipConfig);
6
+ var Tooltip = /*#__PURE__*/component(mergedConfig);
7
+ export var Hint = /*#__PURE__*/styled(Tooltip).withConfig({
4
8
  componentId: "plasma-new-hope__sc-g4vxbb-0"
9
+ })([""]);
10
+ export var InputWrapper = /*#__PURE__*/styled.div.withConfig({
11
+ componentId: "plasma-new-hope__sc-g4vxbb-1"
5
12
  })(["position:relative;display:flex;align-items:center;box-sizing:border-box;"]);
6
13
  export var InputLabelWrapper = /*#__PURE__*/styled.div.withConfig({
7
- componentId: "plasma-new-hope__sc-g4vxbb-1"
14
+ componentId: "plasma-new-hope__sc-g4vxbb-2"
8
15
  })(["flex:1;overflow:scroll;position:relative;width:100%;display:inline-flex;align-items:center;::-webkit-scrollbar{display:none;}scrollbar-width:none;overscroll-behavior:contain;&.", "{height:var(", ");border-radius:var(", ");}"], /*#__PURE__*/String(classes.hasChips), tokens.chipHeight, tokens.chipBorderRadius);
9
16
  export var StyledChips = /*#__PURE__*/styled.div.withConfig({
10
- componentId: "plasma-new-hope__sc-g4vxbb-2"
17
+ componentId: "plasma-new-hope__sc-g4vxbb-3"
11
18
  })(["display:flex;gap:var(", ");margin-right:var(", ");user-select:none;"], tokens.chipGap, tokens.chipGap);
12
19
  export var Input = /*#__PURE__*/styled.input.withConfig({
13
- componentId: "plasma-new-hope__sc-g4vxbb-3"
20
+ componentId: "plasma-new-hope__sc-g4vxbb-4"
14
21
  })(["box-sizing:border-box;appearance:none;border:0;padding:0;background-color:transparent;outline:none;width:100%;z-index:1;&::placeholder{opacity:0;}"]);
15
22
  export var InputContainer = /*#__PURE__*/styled.div.withConfig({
16
- componentId: "plasma-new-hope__sc-g4vxbb-4"
23
+ componentId: "plasma-new-hope__sc-g4vxbb-5"
17
24
  })(["position:relative;flex:1;min-width:60%;"]);
18
25
  export var InputPlaceholder = /*#__PURE__*/styled.div.withConfig({
19
- componentId: "plasma-new-hope__sc-g4vxbb-5"
26
+ componentId: "plasma-new-hope__sc-g4vxbb-6"
20
27
  })(["position:absolute;top:0;left:0;right:0;bottom:0;z-index:0;white-space:nowrap;pointer-events:none;user-select:none;font:inherit;letter-spacing:inherit;line-height:inherit;color:var(", ");"], tokens.placeholderColor);
28
+ export var OuterLabelWrapper = /*#__PURE__*/styled.div.withConfig({
29
+ componentId: "plasma-new-hope__sc-g4vxbb-7"
30
+ })(["display:flex;align-items:center;margin-bottom:", ";"], function (_ref) {
31
+ var isInnnerLabel = _ref.isInnnerLabel;
32
+ return isInnnerLabel ? "var(".concat(tokens.titleCaptionInnerLabelOffset, ")") : "var(".concat(tokens.labelOffset, ")");
33
+ });
34
+ export var TitleCaption = /*#__PURE__*/styled.div.withConfig({
35
+ componentId: "plasma-new-hope__sc-g4vxbb-8"
36
+ })(["display:inline-block;margin-left:auto;"]);
37
+ export var StyledIndicatorWrapper = /*#__PURE__*/styled.div.withConfig({
38
+ componentId: "plasma-new-hope__sc-g4vxbb-9"
39
+ })(["position:relative;display:inline-flex;align-items:center;"]);
21
40
  export var Label = /*#__PURE__*/styled.label.withConfig({
22
- componentId: "plasma-new-hope__sc-g4vxbb-6"
23
- })(["position:relative;display:inline-flex;"]);
41
+ componentId: "plasma-new-hope__sc-g4vxbb-10"
42
+ })(["display:inline-flex;"]);
24
43
  var StyledContentSlot = /*#__PURE__*/styled.div.withConfig({
25
- componentId: "plasma-new-hope__sc-g4vxbb-7"
26
- })(["color:", ";line-height:0;"], function (_ref) {
27
- var isDefaultView = _ref.isDefaultView,
28
- isClear = _ref.isClear;
44
+ componentId: "plasma-new-hope__sc-g4vxbb-11"
45
+ })(["color:", ";line-height:0;"], function (_ref2) {
46
+ var isDefaultView = _ref2.isDefaultView,
47
+ isClear = _ref2.isClear;
29
48
  return !isDefaultView && isClear ? "var(".concat(tokens.clearColor, ")") : "var(".concat(tokens.contentSlotColor, ")");
30
49
  });
31
50
  export var StyledContentLeft = /*#__PURE__*/styled(StyledContentSlot).withConfig({
32
- componentId: "plasma-new-hope__sc-g4vxbb-8"
51
+ componentId: "plasma-new-hope__sc-g4vxbb-12"
33
52
  })(["margin:var(", ");"], tokens.leftContentMargin);
34
53
  export var StyledContentRight = /*#__PURE__*/styled.div.withConfig({
35
- componentId: "plasma-new-hope__sc-g4vxbb-9"
54
+ componentId: "plasma-new-hope__sc-g4vxbb-13"
36
55
  })(["line-height:0;margin:var(", ");color:var(", ",var(", "));&:hover{color:var(", ");color:var(", ",var(", "));cursor:pointer;}&:active{color:var(", ",var(", "));}"], tokens.rightContentMargin, tokens.contentSlotRightColor, tokens.contentSlotColor, tokens.contentSlotColorHover, tokens.contentSlotRightColorHover, tokens.contentSlotColorHover, tokens.contentSlotRightColorActive, tokens.contentSlotColorActive);
37
56
  export var LeftHelper = /*#__PURE__*/styled.div.withConfig({
38
- componentId: "plasma-new-hope__sc-g4vxbb-10"
57
+ componentId: "plasma-new-hope__sc-g4vxbb-14"
39
58
  })([""]);
40
59
  export var StyledTextBefore = /*#__PURE__*/styled.div.withConfig({
41
- componentId: "plasma-new-hope__sc-g4vxbb-11"
60
+ componentId: "plasma-new-hope__sc-g4vxbb-15"
42
61
  })([""]);
43
62
  export var StyledTextAfter = /*#__PURE__*/styled.div.withConfig({
44
- componentId: "plasma-new-hope__sc-g4vxbb-12"
63
+ componentId: "plasma-new-hope__sc-g4vxbb-16"
45
64
  })([""]);
46
65
  export var StyledOptionalText = /*#__PURE__*/styled.span.withConfig({
47
- componentId: "plasma-new-hope__sc-g4vxbb-13"
66
+ componentId: "plasma-new-hope__sc-g4vxbb-17"
48
67
  })(["color:var(", ");"], tokens.optionalColor);
68
+ export var StyledHintWrapper = /*#__PURE__*/styled.div.withConfig({
69
+ componentId: "plasma-new-hope__sc-g4vxbb-18"
70
+ })(["display:inline-block;line-height:0;&.", "{position:absolute;margin:0;inset:var(", ");}"], classes.innerLabelPlacement, tokens.hintInnerLabelPlacementOffset);
71
+ export var HintTargetWrapper = /*#__PURE__*/styled.div.withConfig({
72
+ componentId: "plasma-new-hope__sc-g4vxbb-19"
73
+ })(["color:var(", ");display:flex;justify-content:center;align-items:center;"], tokens.hintIconColor);
49
74
  export var StyledIndicator = /*#__PURE__*/styled.div.withConfig({
50
- componentId: "plasma-new-hope__sc-g4vxbb-14"
51
- })(["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);
75
+ componentId: "plasma-new-hope__sc-g4vxbb-20"
76
+ })(["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);
@@ -125,7 +125,8 @@ export function App() {
125
125
  ```
126
126
 
127
127
  ### Подсказка
128
- Для вывода подсказки снизу от поля используйте свойство `helperText`:
128
+ Для вывода подсказки снизу от поля используйте свойство `helperText`,
129
+ для подсказки в виде Tooltip - `hasHint`, для подсказки сверху справа - `titleCaption`:
129
130
 
130
131
  ```tsx live
131
132
  import React from 'react';
@@ -138,6 +139,11 @@ export function App() {
138
139
  placeholder="Введите значение"
139
140
  defaultValue="Значение"
140
141
  helperText="Подсказка снизу"
142
+ titleCaption="Подсказка сверху"
143
+ hasHint
144
+ hintText="Подсказка в виде Tooltip"
145
+ hintView="default"
146
+ hintSize="m"
141
147
  />
142
148
  </div>
143
149
  );
@@ -8,6 +8,7 @@ export var classes = {
8
8
  hideLabel: 'hide-label',
9
9
  clear: 'textfield-clear',
10
10
  hasDivider: 'textfield-has-divider',
11
+ hasHint: 'textfield-has-hint',
11
12
  textFieldGroupItem: 'text-field-group-item'
12
13
  };
13
14
  export var tokens = {
@@ -77,6 +78,15 @@ export var tokens = {
77
78
  labelInnerLineHeight: '--plasma-textfield-placement_inner__label-line-height',
78
79
  labelInnerPadding: '--plasma-textfield-placement_inner__label-padding',
79
80
  contentLabelInnerPadding: '--plasma-textfield-placement_inner__content-padding',
81
+ titleCaptionColor: '--plasma-textfield__title-caption-color',
82
+ titleCaptionColorReadOnly: '--plasma-textfield__title-caption-color-readonly',
83
+ titleCaptionInnerLabelOffset: '--plasma-textfield__title-caption-label-inner-offset',
84
+ titleCaptionFontFamily: '--plasma-textfield__title-caption-font-family',
85
+ titleCaptionFontStyle: '--plasma-textfield__title-caption-font-style',
86
+ titleCaptionFontSize: '--plasma-textfield__title-caption-font-size',
87
+ titleCaptionFontWeight: '--plasma-textfield__title-caption-font-weight',
88
+ titleCaptionLetterSpacing: '--plasma-textfield__title-caption-letter-spacing',
89
+ titleCaptionLineHeight: '--plasma-textfield__title-caption-line-height',
80
90
  leftHelperColor: '--plasma-textfield__left-helper-color',
81
91
  leftHelperColorReadOnly: '--plasma-textfield__left-helper-color-readonly',
82
92
  leftHelperOffset: '--plasma-textfield__left-helper-offset',
@@ -93,6 +103,34 @@ export var tokens = {
93
103
  textAfterMargin: '--plasma-textfield__after-text-margin',
94
104
  /** Прозрачность для всего компонента в состоянии disabled */
95
105
  disabledOpacity: '--plasma-textfield-disabled-opacity',
106
+ /** Токены для tooltip */
107
+ hintMargin: '--plasma-textfield__hint-margin',
108
+ hintTargetSize: '--plasma-textfield__hint-target-size',
109
+ hintIconColor: '--plasma-textfield__hint-icon-color',
110
+ hintInnerLabelPlacementOffset: '--plasma-textfield__hint-inner-label-placement-offset',
111
+ clearHintInnerLabelPlacementOffset: '--plasma-textfield__clear-hint-inner-label-placement-offset',
112
+ tooltipBackgroundColor: '--plasma-textfield__tooltip-background-color',
113
+ tooltipBoxShadow: '--plasma-textfield__tooltip-box-shadow',
114
+ tooltipColor: '--plasma-textfield__tooltip-color',
115
+ tooltipPaddingTop: '--plasma-textfield__tooltip-padding-top',
116
+ tooltipPaddingRight: '--plasma-textfield__tooltip-padding-right',
117
+ tooltipPaddingBottom: '--plasma-textfield__tooltip-padding-bottom',
118
+ tooltipPaddingLeft: '--plasma-textfield__tooltip-padding-left',
119
+ tooltipMinHeight: '--plasma-textfield__tooltip-min-height',
120
+ tooltipBorderRadius: '--plasma-textfield__tooltip-border-radius',
121
+ tooltipTextFontFamily: '--plasma-textfield__tooltip-text-font-family',
122
+ tooltipTextFontSize: '--plasma-textfield__tooltip-text-font-size',
123
+ tooltipTextFontStyle: '--plasma-textfield__tooltip-text-font-style',
124
+ tooltipTextFontWeight: '--plasma-textfield__tooltip-text-font-weight',
125
+ tooltipTextFontLetterSpacing: '--plasma-textfield__tooltip-text-font-letter-spacing',
126
+ tooltipTextFontLineHeight: '--plasma-textfield__tooltip-text-font-line-height',
127
+ tooltipContentLeftMargin: '--plasma-textfield__tooltip-content-left-margin',
128
+ tooltipArrowMaskWidth: '--plasma-textfield__tooltip-arrow-mask-width',
129
+ tooltipArrowMaskHeight: '--plasma-textfield__tooltip-arrow-mask-height',
130
+ tooltipArrowMaskImage: '--plasma-textfield__tooltip-arrow-mask-image',
131
+ tooltipArrowHeight: '--plasma-textfield__tooltip-arrow-height',
132
+ tooltipArrowEdgeMargin: '--plasma-textfield__tooltip-arrow-edge-margin',
133
+ tooltipArrowBackground: '--plasma-textfield__tooltip-arrow-background',
96
134
  /** Токены чипа */
97
135
  chipHeight: '--plasma-textfield__chip-height',
98
136
  chipBorderRadius: '--plasma-textfield__chip-border-radius',
@@ -136,5 +174,6 @@ export var tokens = {
136
174
  indicatorLabelPlacementInnerRight: '--plasma-textfield__indicator-placement-inner-right',
137
175
  indicatorLabelPlacementOuterRight: '--plasma-textfield__indicator-placement-outer-right',
138
176
  clearIndicatorLabelPlacementInner: '--plasma-textfield__clear-indicator-placement-inner',
139
- clearIndicatorLabelPlacementInnerRight: '--plasma-textfield__clear-indicator-placement-inner-right'
177
+ clearIndicatorLabelPlacementInnerRight: '--plasma-textfield__clear-indicator-placement-inner-right',
178
+ clearIndicatorHintInnerRight: '--plasma-textfield__clear-indicator-hint-placement-inner-right'
140
179
  };
@@ -1,4 +1,4 @@
1
1
  import { css } from 'styled-components';
2
2
  import { classes, tokens } from '../../TextField.tokens';
3
- import { Input, InputPlaceholder, InputWrapper, Label, StyledContentLeft, StyledContentRight, StyledIndicator } from '../../TextField.styles';
4
- export var base = /*#__PURE__*/css(["&.", "{&[readonly] ", ",", "{background-color:unset;box-shadow:none;border-radius:0;padding-left:0;padding-right:0;&:hover{background-color:unset;}}", "{margin-left:0;}", "{margin-right:0;}&.", "{", "{margin-bottom:var(", ");}}", "{color:var(", ");}", "{color:var(", ");}", "{&.", "{inset:var(", ");&.align-right{inset:var(", ");}}}&.", "{", "{--plasma_private-textfield-divider-color:var(", ");&:before{content:'';position:absolute;height:0.063rem;width:100%;bottom:0;left:0;background-color:var(--plasma_private-textfield-divider-color);transition:background-color 0.1s ease-in;}}&:not([readonly]) ", ":hover{--plasma_private-textfield-divider-color:var( ", ",var(", ") );}&:not([readonly]) ", ":focus-within{--plasma_private-textfield-divider-color:var( ", ",var(", ") );", "{color:var(", ");}}}}"], classes.clear, InputWrapper, InputWrapper, StyledContentLeft, StyledContentRight, classes.outerLabelPlacement, Label, tokens.clearLabelOffset, Input, tokens.clearColor, InputPlaceholder, tokens.clearPlaceholderColor, StyledIndicator, classes.innerLabelPlacement, tokens.clearIndicatorLabelPlacementInner, tokens.clearIndicatorLabelPlacementInnerRight, classes.hasDivider, InputWrapper, /*#__PURE__*/String(tokens.dividerColor), InputWrapper, tokens.dividerColorHover, /*#__PURE__*/String(tokens.dividerColor), InputWrapper, tokens.dividerColorFocus, /*#__PURE__*/String(tokens.dividerColor), InputPlaceholder, tokens.clearPlaceholderColorFocus);
3
+ import { Input, InputPlaceholder, InputWrapper, OuterLabelWrapper, StyledContentLeft, StyledContentRight, StyledHintWrapper, StyledIndicator } from '../../TextField.styles';
4
+ export var base = /*#__PURE__*/css(["&.", "{&[readonly] ", ",", "{background-color:unset;box-shadow:none;border-radius:0;padding-left:0;padding-right:0;&:hover{background-color:unset;}}", "{margin-left:0;}", "{margin-right:0;}&.", "{", "{margin-bottom:var(", ");}}", "{color:var(", ");}", "{color:var(", ");}", "{&.", "{inset:var(", ");&.align-right{inset:var(", ");}}}&.", "{", "{&.", "{inset:var(", ");}}", "{&.", ".align-right{inset:var(", ");}}}&.", "{", "{--plasma_private-textfield-divider-color:var(", ");&:before{content:'';position:absolute;height:0.063rem;width:100%;bottom:0;left:0;background-color:var(--plasma_private-textfield-divider-color);transition:background-color 0.1s ease-in;}}&:not([readonly]) ", ":hover{--plasma_private-textfield-divider-color:var( ", ",var(", ") );}&:not([readonly]) ", ":focus-within{--plasma_private-textfield-divider-color:var( ", ",var(", ") );", "{color:var(", ");}}}}"], classes.clear, InputWrapper, InputWrapper, StyledContentLeft, StyledContentRight, classes.outerLabelPlacement, OuterLabelWrapper, tokens.clearLabelOffset, Input, tokens.clearColor, InputPlaceholder, tokens.clearPlaceholderColor, StyledIndicator, classes.innerLabelPlacement, tokens.clearIndicatorLabelPlacementInner, tokens.clearIndicatorLabelPlacementInnerRight, classes.hasHint, StyledHintWrapper, classes.innerLabelPlacement, tokens.clearHintInnerLabelPlacementOffset, StyledIndicator, classes.innerLabelPlacement, tokens.clearIndicatorHintInnerRight, classes.hasDivider, InputWrapper, /*#__PURE__*/String(tokens.dividerColor), InputWrapper, tokens.dividerColorHover, /*#__PURE__*/String(tokens.dividerColor), InputWrapper, tokens.dividerColorFocus, /*#__PURE__*/String(tokens.dividerColor), InputPlaceholder, tokens.clearPlaceholderColorFocus);
@@ -0,0 +1,5 @@
1
+ import { css } from 'styled-components';
2
+ import { tokens } from '../../TextField.tokens';
3
+ import { tooltipTokens } from '../../../Tooltip';
4
+ import { Hint } from '../../TextField.styles';
5
+ export var base = /*#__PURE__*/css(["", "{", ":var(", ");", ":var(", ");", ":var(", ");", ":var(", ");", ":var(", ");", ":var(", ");", ":var(", ");", ":var(", ");", ":var(", ");", ":var(", ");", ":var(", ");", ":var(", ");", ":var(", ");", ":var(", ");", ":var(", ");", ":var(", ");", ":var(", ");", ":var(", ");", ":var(", ");}"], Hint, tooltipTokens.paddingTop, tokens.tooltipPaddingTop, tooltipTokens.paddingRight, tokens.tooltipPaddingRight, tooltipTokens.paddingBottom, tokens.tooltipPaddingBottom, tooltipTokens.paddingLeft, tokens.tooltipPaddingLeft, tooltipTokens.minHeight, tokens.tooltipMinHeight, tooltipTokens.borderRadius, tokens.tooltipBorderRadius, tooltipTokens.textFontFamily, tokens.tooltipTextFontFamily, tooltipTokens.textFontSize, tokens.tooltipTextFontSize, tooltipTokens.textFontStyle, tokens.tooltipTextFontStyle, tooltipTokens.textFontWeight, tokens.tooltipTextFontWeight, tooltipTokens.textFontLetterSpacing, tokens.tooltipTextFontLetterSpacing, tooltipTokens.textFontLineHeight, tokens.tooltipTextFontLineHeight, tooltipTokens.contentLeftMargin, tokens.tooltipContentLeftMargin, tooltipTokens.arrowMaskWidth, tokens.tooltipArrowMaskWidth, tooltipTokens.arrowMaskHeight, tokens.tooltipArrowMaskHeight, tooltipTokens.arrowMaskImage, tokens.tooltipArrowMaskImage, tooltipTokens.arrowHeight, tokens.tooltipArrowHeight, tooltipTokens.arrowEdgeMargin, tokens.tooltipArrowEdgeMargin, tooltipTokens.arrowBackground, tokens.tooltipArrowBackground);
@@ -0,0 +1,21 @@
1
+ [
2
+ "--plasma-textfield__tooltip-padding-top",
3
+ "--plasma-textfield__tooltip-padding-right",
4
+ "--plasma-textfield__tooltip-padding-bottom",
5
+ "--plasma-textfield__tooltip-padding-left",
6
+ "--plasma-textfield__tooltip-min-height",
7
+ "--plasma-textfield__tooltip-border-radius",
8
+ "--plasma-textfield__tooltip-text-font-family",
9
+ "--plasma-textfield__tooltip-text-font-size",
10
+ "--plasma-textfield__tooltip-text-font-style",
11
+ "--plasma-textfield__tooltip-text-font-weight",
12
+ "--plasma-textfield__tooltip-text-font-letter-spacing",
13
+ "--plasma-textfield__tooltip-text-font-line-height",
14
+ "--plasma-textfield__tooltip-content-left-margin",
15
+ "--plasma-textfield__tooltip-arrow-mask-width",
16
+ "--plasma-textfield__tooltip-arrow-mask-height",
17
+ "--plasma-textfield__tooltip-arrow-mask-image",
18
+ "--plasma-textfield__tooltip-arrow-height",
19
+ "--plasma-textfield__tooltip-arrow-edge-margin",
20
+ "--plasma-textfield__tooltip-arrow-background"
21
+ ]