@salutejs/plasma-new-hope 0.71.3-canary.1161.8619854344.0 → 0.72.0-canary.1160.8612911363.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (442) hide show
  1. package/cjs/components/Cell/Cell.js +0 -2
  2. package/cjs/components/Cell/Cell.js.map +1 -1
  3. package/cjs/components/Combobox/Combobox.css +10 -10
  4. package/cjs/components/Combobox/Combobox.styles.js +5 -5
  5. package/cjs/components/Combobox/Combobox.styles.js.map +1 -1
  6. package/cjs/components/Combobox/{Combobox.styles_dw6hnk.css → Combobox.styles_17ei5vn.css} +1 -1
  7. package/cjs/components/Combobox/ui/ComboboxDivider/ComboboxDivider.css +4 -4
  8. package/cjs/components/Combobox/ui/ComboboxFooter/ComboboxFooter.css +4 -4
  9. package/cjs/components/Combobox/ui/ComboboxGroup/ComboboxGroup.css +4 -4
  10. package/cjs/components/Combobox/ui/ComboboxHeader/ComboboxHeader.css +4 -4
  11. package/cjs/components/Combobox/ui/ComboboxItem/ComboboxItem.css +4 -4
  12. package/cjs/components/Dropdown/Dropdown.css +4 -4
  13. package/cjs/components/Dropdown/Dropdown.js +1 -0
  14. package/cjs/components/Dropdown/Dropdown.js.map +1 -1
  15. package/cjs/components/Pagination/Pagination.css +9 -9
  16. package/cjs/components/Pagination/ui/PaginationSelectPerPage/PaginationSelectPerPage.css +9 -9
  17. package/cjs/components/Popover/Popover.css +4 -4
  18. package/cjs/components/Popover/Popover.js +43 -33
  19. package/cjs/components/Popover/Popover.js.map +1 -1
  20. package/cjs/components/Popover/Popover.styles.js +1 -1
  21. package/cjs/components/Popover/Popover.styles.js.map +1 -1
  22. package/cjs/components/Popover/{Popover.styles_1ggb66y.css → Popover.styles_1rk9t6z.css} +1 -1
  23. package/cjs/components/Select/Select.css +9 -9
  24. package/cjs/components/Select/Select.styles.js +7 -7
  25. package/cjs/components/Select/Select.styles.js.map +1 -1
  26. package/{es/components/Select/Select.styles_1q3i6gw.css → cjs/components/Select/Select.styles_ls547o.css} +1 -1
  27. package/cjs/components/Select/ui/SelectItem/SelectItem.css +4 -4
  28. package/cjs/components/Select/ui/SelectTarget/SelectTarget.js +1 -2
  29. package/cjs/components/Select/ui/SelectTarget/SelectTarget.js.map +1 -1
  30. package/cjs/components/TextField/TextField.js +166 -40
  31. package/cjs/components/TextField/TextField.js.map +1 -1
  32. package/cjs/components/TextField/TextField.styles.js +27 -11
  33. package/cjs/components/TextField/TextField.styles.js.map +1 -1
  34. package/cjs/components/TextField/TextField.styles_1b1mddp.css +8 -0
  35. package/cjs/components/TextField/TextField.tokens.js +68 -20
  36. package/cjs/components/TextField/TextField.tokens.js.map +1 -1
  37. package/cjs/components/TextField/TextField_wctd2m.css +1 -0
  38. package/cjs/components/TextField/hooks/useKeyNavigation.js +131 -0
  39. package/cjs/components/TextField/hooks/useKeyNavigation.js.map +1 -0
  40. package/cjs/components/TextField/ui/TextFieldChip/TextFieldChip.css +19 -0
  41. package/cjs/components/TextField/ui/TextFieldChip/TextFieldChip.js +38 -0
  42. package/cjs/components/TextField/ui/TextFieldChip/TextFieldChip.js.map +1 -0
  43. package/cjs/components/TextField/ui/TextFieldChip/TextFieldChip.styles.js +26 -0
  44. package/cjs/components/TextField/ui/TextFieldChip/TextFieldChip.styles.js.map +1 -0
  45. package/cjs/components/TextField/ui/TextFieldChip/TextFieldChip.styles_1y8n7la.css +1 -0
  46. package/cjs/components/{Select/ui/SelectDivider/variations/_view → TextField/variations/_disabled}/base.js +2 -2
  47. package/cjs/components/TextField/variations/_disabled/base.js.map +1 -0
  48. package/cjs/components/TextField/variations/_disabled/base_1tnjoy9.css +1 -0
  49. package/cjs/components/TextField/{_label-placement → variations/_label-placement}/base.js +1 -1
  50. package/cjs/components/TextField/variations/_label-placement/base.js.map +1 -0
  51. package/cjs/components/TextField/{_label-placement → variations/_label-placement}/inner.js +2 -2
  52. package/cjs/components/TextField/variations/_label-placement/inner.js.map +1 -0
  53. package/cjs/components/TextField/variations/_label-placement/inner_gqlcj2.css +1 -0
  54. package/cjs/components/TextField/{_label-placement → variations/_label-placement}/outer.js +2 -2
  55. package/cjs/components/TextField/variations/_label-placement/outer.js.map +1 -0
  56. package/cjs/components/TextField/variations/_label-placement/outer_is41nj.css +1 -0
  57. package/cjs/components/{Select/ui/SelectFooter/variations/_size → TextField/variations/_read-only}/base.js +2 -2
  58. package/cjs/components/TextField/variations/_read-only/base.js.map +1 -0
  59. package/cjs/components/TextField/variations/_read-only/base_134hshp.css +1 -0
  60. package/cjs/components/{Select/ui/SelectFooter/variations/_view → TextField/variations/_size}/base.js +2 -2
  61. package/cjs/components/TextField/variations/_size/base.js.map +1 -0
  62. package/cjs/components/TextField/variations/_size/base_1khzr9t.css +1 -0
  63. package/cjs/components/{Select/ui/SelectDivider/variations/_size → TextField/variations/_view}/base.js +2 -2
  64. package/cjs/components/TextField/variations/_view/base.js.map +1 -0
  65. package/cjs/components/TextField/variations/_view/base_1qd77x6.css +1 -0
  66. package/cjs/index.css +49 -42
  67. package/cjs/index.js +6 -41
  68. package/cjs/index.js.map +1 -1
  69. package/cjs/utils/index.js +1 -13
  70. package/cjs/utils/index.js.map +1 -1
  71. package/cjs/utils/react.js +2 -12
  72. package/cjs/utils/react.js.map +1 -1
  73. package/es/components/Cell/Cell.js +0 -2
  74. package/es/components/Cell/Cell.js.map +1 -1
  75. package/es/components/Combobox/Combobox.css +10 -10
  76. package/es/components/Combobox/Combobox.styles.js +5 -5
  77. package/es/components/Combobox/Combobox.styles.js.map +1 -1
  78. package/es/components/Combobox/{Combobox.styles_dw6hnk.css → Combobox.styles_17ei5vn.css} +1 -1
  79. package/es/components/Combobox/ui/ComboboxDivider/ComboboxDivider.css +4 -4
  80. package/es/components/Combobox/ui/ComboboxFooter/ComboboxFooter.css +4 -4
  81. package/es/components/Combobox/ui/ComboboxGroup/ComboboxGroup.css +4 -4
  82. package/es/components/Combobox/ui/ComboboxHeader/ComboboxHeader.css +4 -4
  83. package/es/components/Combobox/ui/ComboboxItem/ComboboxItem.css +4 -4
  84. package/es/components/Dropdown/Dropdown.css +4 -4
  85. package/es/components/Dropdown/Dropdown.js +1 -0
  86. package/es/components/Dropdown/Dropdown.js.map +1 -1
  87. package/es/components/Pagination/Pagination.css +9 -9
  88. package/es/components/Pagination/ui/PaginationSelectPerPage/PaginationSelectPerPage.css +9 -9
  89. package/es/components/Popover/Popover.css +4 -4
  90. package/es/components/Popover/Popover.js +43 -33
  91. package/es/components/Popover/Popover.js.map +1 -1
  92. package/es/components/Popover/Popover.styles.js +1 -1
  93. package/es/components/Popover/Popover.styles.js.map +1 -1
  94. package/es/components/Popover/{Popover.styles_1ggb66y.css → Popover.styles_1rk9t6z.css} +1 -1
  95. package/es/components/Select/Select.css +9 -9
  96. package/es/components/Select/Select.styles.js +7 -7
  97. package/es/components/Select/Select.styles.js.map +1 -1
  98. package/{cjs/components/Select/Select.styles_1q3i6gw.css → es/components/Select/Select.styles_ls547o.css} +1 -1
  99. package/es/components/Select/ui/SelectItem/SelectItem.css +4 -4
  100. package/es/components/Select/ui/SelectTarget/SelectTarget.js +1 -2
  101. package/es/components/Select/ui/SelectTarget/SelectTarget.js.map +1 -1
  102. package/es/components/TextField/TextField.js +169 -44
  103. package/es/components/TextField/TextField.js.map +1 -1
  104. package/es/components/TextField/TextField.styles.js +25 -12
  105. package/es/components/TextField/TextField.styles.js.map +1 -1
  106. package/es/components/TextField/TextField.styles_1b1mddp.css +8 -0
  107. package/es/components/TextField/TextField.tokens.js +68 -21
  108. package/es/components/TextField/TextField.tokens.js.map +1 -1
  109. package/es/components/TextField/TextField_wctd2m.css +1 -0
  110. package/es/components/TextField/hooks/useKeyNavigation.js +126 -0
  111. package/es/components/TextField/hooks/useKeyNavigation.js.map +1 -0
  112. package/es/components/TextField/ui/TextFieldChip/TextFieldChip.css +19 -0
  113. package/es/components/TextField/ui/TextFieldChip/TextFieldChip.js +34 -0
  114. package/es/components/TextField/ui/TextFieldChip/TextFieldChip.js.map +1 -0
  115. package/es/components/TextField/ui/TextFieldChip/TextFieldChip.styles.js +22 -0
  116. package/es/components/TextField/ui/TextFieldChip/TextFieldChip.styles.js.map +1 -0
  117. package/es/components/TextField/ui/TextFieldChip/TextFieldChip.styles_1y8n7la.css +1 -0
  118. package/es/components/TextField/variations/_disabled/base.js +5 -0
  119. package/es/components/TextField/variations/_disabled/base.js.map +1 -0
  120. package/es/components/TextField/variations/_disabled/base_1tnjoy9.css +1 -0
  121. package/es/components/TextField/{_label-placement → variations/_label-placement}/base.js +1 -1
  122. package/es/components/TextField/variations/_label-placement/base.js.map +1 -0
  123. package/es/components/TextField/variations/_label-placement/inner.js +5 -0
  124. package/es/components/TextField/variations/_label-placement/inner.js.map +1 -0
  125. package/es/components/TextField/variations/_label-placement/inner_gqlcj2.css +1 -0
  126. package/es/components/TextField/variations/_label-placement/outer.js +5 -0
  127. package/es/components/TextField/variations/_label-placement/outer.js.map +1 -0
  128. package/es/components/TextField/variations/_label-placement/outer_is41nj.css +1 -0
  129. package/es/components/TextField/variations/_read-only/base.js +5 -0
  130. package/es/components/TextField/variations/_read-only/base.js.map +1 -0
  131. package/es/components/TextField/variations/_read-only/base_134hshp.css +1 -0
  132. package/es/components/TextField/variations/_size/base.js +5 -0
  133. package/es/components/TextField/variations/_size/base.js.map +1 -0
  134. package/es/components/TextField/variations/_size/base_1khzr9t.css +1 -0
  135. package/es/components/{Select/ui/SelectDivider/variations/_size → TextField/variations/_view}/base.js +2 -2
  136. package/es/components/TextField/variations/_view/base.js.map +1 -0
  137. package/es/components/TextField/variations/_view/base_1qd77x6.css +1 -0
  138. package/es/index.css +49 -42
  139. package/es/index.js +2 -15
  140. package/es/index.js.map +1 -1
  141. package/es/utils/index.js +2 -11
  142. package/es/utils/index.js.map +1 -1
  143. package/es/utils/react.js +2 -9
  144. package/es/utils/react.js.map +1 -1
  145. package/package.json +2 -2
  146. package/styled-components/cjs/components/Cell/Cell.js +0 -2
  147. package/styled-components/cjs/components/Combobox/Combobox.styles.js +1 -1
  148. package/styled-components/cjs/components/Dropdown/Dropdown.js +1 -0
  149. package/styled-components/cjs/components/Popover/Popover.js +43 -33
  150. package/styled-components/cjs/components/Popover/Popover.styles.js +1 -1
  151. package/styled-components/cjs/components/Select/Select.styles.js +1 -1
  152. package/styled-components/cjs/components/Select/ui/SelectTarget/SelectTarget.js +1 -2
  153. package/styled-components/cjs/components/TextField/TextField.js +173 -43
  154. package/styled-components/cjs/components/TextField/TextField.styles.js +18 -10
  155. package/styled-components/cjs/components/TextField/TextField.template-doc.mdx +24 -0
  156. package/styled-components/cjs/components/TextField/TextField.tokens.js +68 -21
  157. package/styled-components/cjs/components/TextField/hooks/index.js +12 -0
  158. package/styled-components/cjs/components/TextField/hooks/useKeyNavigation.js +137 -0
  159. package/styled-components/cjs/components/TextField/index.js +2 -2
  160. package/styled-components/cjs/components/TextField/ui/TextFieldChip/TextFieldChip.js +39 -0
  161. package/styled-components/cjs/components/TextField/ui/TextFieldChip/TextFieldChip.styles.js +25 -0
  162. package/styled-components/cjs/components/TextField/ui/TextFieldChip/TextFieldChip.types.js +5 -0
  163. package/styled-components/cjs/components/TextField/ui/index.js +12 -0
  164. package/styled-components/cjs/components/TextField/variations/_disabled/base.js +10 -0
  165. package/styled-components/cjs/components/TextField/variations/_label-placement/inner.js +10 -0
  166. package/styled-components/cjs/components/TextField/{_label-placement → variations/_label-placement}/outer.js +3 -3
  167. package/styled-components/cjs/components/TextField/variations/_read-only/base.js +10 -0
  168. package/styled-components/cjs/components/TextField/variations/_read-only/tokens.json +1 -0
  169. package/styled-components/cjs/components/TextField/variations/_size/base.js +10 -0
  170. package/styled-components/cjs/components/TextField/variations/_view/base.js +10 -0
  171. package/styled-components/cjs/examples/plasma_b2c/components/Popover/Popover.stories.tsx +7 -0
  172. package/styled-components/cjs/examples/plasma_b2c/components/TextField/TextField.config.js +43 -0
  173. package/styled-components/cjs/examples/plasma_b2c/components/TextField/TextField.js +11 -0
  174. package/styled-components/cjs/examples/plasma_b2c/components/TextField/TextField.stories.tsx +133 -0
  175. package/styled-components/cjs/examples/plasma_web/components/TextField/TextField.config.js +40 -0
  176. package/styled-components/cjs/examples/plasma_web/components/TextField/TextField.js +11 -0
  177. package/styled-components/cjs/examples/plasma_web/components/TextField/TextField.stories.tsx +133 -0
  178. package/styled-components/cjs/examples/sds_engineer/components/TextField/TextField.config.js +43 -0
  179. package/styled-components/cjs/examples/sds_engineer/components/TextField/TextField.js +11 -0
  180. package/styled-components/cjs/examples/sds_engineer/components/TextField/TextField.stories.tsx +133 -0
  181. package/styled-components/cjs/index.js +0 -22
  182. package/styled-components/es/components/Cell/Cell.js +0 -2
  183. package/styled-components/es/components/Combobox/Combobox.styles.js +1 -1
  184. package/styled-components/es/components/Dropdown/Dropdown.js +1 -0
  185. package/styled-components/es/components/Popover/Popover.js +43 -33
  186. package/styled-components/es/components/Popover/Popover.styles.js +1 -1
  187. package/styled-components/es/components/Select/Select.styles.js +1 -1
  188. package/styled-components/es/components/Select/ui/SelectTarget/SelectTarget.js +1 -2
  189. package/styled-components/es/components/TextField/TextField.js +177 -47
  190. package/styled-components/es/components/TextField/TextField.styles.js +17 -9
  191. package/styled-components/es/components/TextField/TextField.template-doc.mdx +24 -0
  192. package/styled-components/es/components/TextField/TextField.tokens.js +67 -20
  193. package/styled-components/es/components/TextField/hooks/index.js +1 -0
  194. package/styled-components/es/components/TextField/hooks/useKeyNavigation.js +131 -0
  195. package/styled-components/es/components/TextField/index.js +2 -2
  196. package/styled-components/es/components/TextField/ui/TextFieldChip/TextFieldChip.js +30 -0
  197. package/styled-components/es/components/TextField/ui/TextFieldChip/TextFieldChip.styles.js +19 -0
  198. package/styled-components/es/components/TextField/ui/TextFieldChip/TextFieldChip.types.js +1 -0
  199. package/styled-components/es/components/TextField/ui/index.js +1 -0
  200. package/styled-components/es/components/TextField/variations/_disabled/base.js +4 -0
  201. package/styled-components/es/components/TextField/variations/_label-placement/inner.js +4 -0
  202. package/styled-components/es/components/TextField/variations/_label-placement/outer.js +4 -0
  203. package/styled-components/es/components/TextField/variations/_read-only/base.js +4 -0
  204. package/styled-components/es/components/TextField/variations/_read-only/tokens.json +1 -0
  205. package/styled-components/es/components/TextField/variations/_size/base.js +4 -0
  206. package/styled-components/es/components/TextField/variations/_view/base.js +4 -0
  207. package/styled-components/es/examples/plasma_b2c/components/Popover/Popover.stories.tsx +7 -0
  208. package/styled-components/es/examples/plasma_b2c/components/TextField/TextField.config.js +37 -0
  209. package/styled-components/es/examples/plasma_b2c/components/TextField/TextField.js +5 -0
  210. package/styled-components/es/examples/plasma_b2c/components/TextField/TextField.stories.tsx +133 -0
  211. package/styled-components/es/examples/plasma_web/components/TextField/TextField.config.js +34 -0
  212. package/styled-components/es/examples/plasma_web/components/TextField/TextField.js +5 -0
  213. package/styled-components/es/examples/plasma_web/components/TextField/TextField.stories.tsx +133 -0
  214. package/styled-components/es/examples/sds_engineer/components/TextField/TextField.config.js +37 -0
  215. package/styled-components/es/examples/sds_engineer/components/TextField/TextField.js +5 -0
  216. package/styled-components/es/examples/sds_engineer/components/TextField/TextField.stories.tsx +133 -0
  217. package/styled-components/es/index.js +0 -2
  218. package/types/components/Cell/Cell.d.ts.map +1 -1
  219. package/types/components/Combobox/Combobox.styles.d.ts +8 -2
  220. package/types/components/Combobox/Combobox.styles.d.ts.map +1 -1
  221. package/types/components/Dropdown/Dropdown.d.ts.map +1 -1
  222. package/types/components/Dropdown/Dropdown.styles.d.ts +7 -1
  223. package/types/components/Dropdown/Dropdown.styles.d.ts.map +1 -1
  224. package/types/components/Popover/Popover.d.ts +2 -2
  225. package/types/components/Popover/Popover.d.ts.map +1 -1
  226. package/types/components/Popover/Popover.styles.d.ts.map +1 -1
  227. package/types/components/Popover/Popover.types.d.ts +19 -12
  228. package/types/components/Popover/Popover.types.d.ts.map +1 -1
  229. package/types/components/Select/Select.styles.d.ts +8 -2
  230. package/types/components/Select/Select.styles.d.ts.map +1 -1
  231. package/types/components/Select/ui/SelectTarget/SelectTarget.d.ts.map +1 -1
  232. package/types/components/TextField/TextField.d.ts +8 -3
  233. package/types/components/TextField/TextField.d.ts.map +1 -1
  234. package/types/components/TextField/TextField.styles.d.ts +6 -3
  235. package/types/components/TextField/TextField.styles.d.ts.map +1 -1
  236. package/types/components/TextField/TextField.tokens.d.ts +57 -8
  237. package/types/components/TextField/TextField.tokens.d.ts.map +1 -1
  238. package/types/components/TextField/TextField.types.d.ts +45 -3
  239. package/types/components/TextField/TextField.types.d.ts.map +1 -1
  240. package/types/components/TextField/hooks/index.d.ts +2 -0
  241. package/types/components/TextField/hooks/index.d.ts.map +1 -0
  242. package/types/components/TextField/hooks/useKeyNavigation.d.ts +17 -0
  243. package/types/components/TextField/hooks/useKeyNavigation.d.ts.map +1 -0
  244. package/types/components/TextField/index.d.ts +3 -2
  245. package/types/components/TextField/index.d.ts.map +1 -1
  246. package/types/components/TextField/ui/TextFieldChip/TextFieldChip.d.ts +7 -0
  247. package/types/components/TextField/ui/TextFieldChip/TextFieldChip.d.ts.map +1 -0
  248. package/types/components/TextField/ui/TextFieldChip/TextFieldChip.styles.d.ts +3 -0
  249. package/types/components/TextField/ui/TextFieldChip/TextFieldChip.styles.d.ts.map +1 -0
  250. package/types/components/TextField/ui/TextFieldChip/TextFieldChip.types.d.ts +37 -0
  251. package/types/components/TextField/ui/TextFieldChip/TextFieldChip.types.d.ts.map +1 -0
  252. package/types/components/TextField/ui/index.d.ts +2 -0
  253. package/types/components/TextField/ui/index.d.ts.map +1 -0
  254. package/types/components/TextField/variations/_disabled/base.d.ts.map +1 -0
  255. package/types/components/TextField/variations/_label-placement/base.d.ts.map +1 -0
  256. package/types/components/TextField/variations/_label-placement/index.d.ts.map +1 -0
  257. package/types/components/TextField/variations/_label-placement/inner.d.ts.map +1 -0
  258. package/types/components/TextField/variations/_label-placement/outer.d.ts.map +1 -0
  259. package/types/components/TextField/variations/_read-only/base.d.ts.map +1 -0
  260. package/types/components/TextField/variations/_size/base.d.ts.map +1 -0
  261. package/types/components/TextField/variations/_view/base.d.ts +2 -0
  262. package/types/components/TextField/variations/_view/base.d.ts.map +1 -0
  263. package/types/examples/plasma_b2c/components/Popover/Popover.d.ts +7 -1
  264. package/types/examples/plasma_b2c/components/Popover/Popover.d.ts.map +1 -1
  265. package/types/examples/plasma_b2c/components/TextField/TextField.config.d.ts +32 -0
  266. package/types/examples/plasma_b2c/components/TextField/TextField.config.d.ts.map +1 -0
  267. package/types/examples/plasma_b2c/components/TextField/TextField.d.ts +26 -0
  268. package/types/examples/plasma_b2c/components/TextField/TextField.d.ts.map +1 -0
  269. package/types/examples/plasma_web/components/Popover/Popover.d.ts +7 -1
  270. package/types/examples/plasma_web/components/Popover/Popover.d.ts.map +1 -1
  271. package/types/examples/plasma_web/components/TextField/TextField.config.d.ts +32 -0
  272. package/types/examples/plasma_web/components/TextField/TextField.config.d.ts.map +1 -0
  273. package/types/examples/plasma_web/components/TextField/TextField.d.ts +26 -0
  274. package/types/examples/plasma_web/components/TextField/TextField.d.ts.map +1 -0
  275. package/types/examples/sds_engineer/components/Popover/Popover.d.ts +7 -1
  276. package/types/examples/sds_engineer/components/Popover/Popover.d.ts.map +1 -1
  277. package/types/examples/sds_engineer/components/TextField/TextField.config.d.ts +32 -0
  278. package/types/examples/sds_engineer/components/TextField/TextField.config.d.ts.map +1 -0
  279. package/types/examples/sds_engineer/components/TextField/TextField.d.ts +26 -0
  280. package/types/examples/sds_engineer/components/TextField/TextField.d.ts.map +1 -0
  281. package/types/index.d.ts +0 -2
  282. package/types/index.d.ts.map +1 -1
  283. package/cjs/components/Select/ui/SelectDivider/SelectDivider.css +0 -23
  284. package/cjs/components/Select/ui/SelectDivider/SelectDivider.js +0 -40
  285. package/cjs/components/Select/ui/SelectDivider/SelectDivider.js.map +0 -1
  286. package/cjs/components/Select/ui/SelectDivider/SelectDivider.styles.js +0 -12
  287. package/cjs/components/Select/ui/SelectDivider/SelectDivider.styles.js.map +0 -1
  288. package/cjs/components/Select/ui/SelectDivider/SelectDivider.styles_673hj6.css +0 -1
  289. package/cjs/components/Select/ui/SelectDivider/variations/_size/base.js.map +0 -1
  290. package/cjs/components/Select/ui/SelectDivider/variations/_view/base.js.map +0 -1
  291. package/cjs/components/Select/ui/SelectFooter/SelectFooter.css +0 -23
  292. package/cjs/components/Select/ui/SelectFooter/SelectFooter.js +0 -40
  293. package/cjs/components/Select/ui/SelectFooter/SelectFooter.js.map +0 -1
  294. package/cjs/components/Select/ui/SelectFooter/SelectFooter.styles.js +0 -12
  295. package/cjs/components/Select/ui/SelectFooter/SelectFooter.styles.js.map +0 -1
  296. package/cjs/components/Select/ui/SelectFooter/SelectFooter.styles_11hk6tt.css +0 -1
  297. package/cjs/components/Select/ui/SelectFooter/variations/_size/base.js.map +0 -1
  298. package/cjs/components/Select/ui/SelectFooter/variations/_size/base_x642ct.css +0 -1
  299. package/cjs/components/Select/ui/SelectFooter/variations/_view/base.js.map +0 -1
  300. package/cjs/components/Select/ui/SelectFooter/variations/_view/base_x642ct.css +0 -1
  301. package/cjs/components/Select/ui/SelectGroup/SelectGroup.css +0 -23
  302. package/cjs/components/Select/ui/SelectGroup/SelectGroup.js +0 -40
  303. package/cjs/components/Select/ui/SelectGroup/SelectGroup.js.map +0 -1
  304. package/cjs/components/Select/ui/SelectGroup/SelectGroup.styles.js +0 -12
  305. package/cjs/components/Select/ui/SelectGroup/SelectGroup.styles.js.map +0 -1
  306. package/cjs/components/Select/ui/SelectGroup/SelectGroup.styles_mktu7e.css +0 -1
  307. package/cjs/components/Select/ui/SelectGroup/variations/_size/base.js +0 -9
  308. package/cjs/components/Select/ui/SelectGroup/variations/_size/base.js.map +0 -1
  309. package/cjs/components/Select/ui/SelectGroup/variations/_size/base_x642ct.css +0 -1
  310. package/cjs/components/Select/ui/SelectGroup/variations/_view/base.js +0 -9
  311. package/cjs/components/Select/ui/SelectGroup/variations/_view/base.js.map +0 -1
  312. package/cjs/components/Select/ui/SelectGroup/variations/_view/base_x642ct.css +0 -1
  313. package/cjs/components/Select/ui/SelectHeader/SelectHeader.css +0 -23
  314. package/cjs/components/Select/ui/SelectHeader/SelectHeader.js +0 -40
  315. package/cjs/components/Select/ui/SelectHeader/SelectHeader.js.map +0 -1
  316. package/cjs/components/Select/ui/SelectHeader/SelectHeader.styles.js +0 -12
  317. package/cjs/components/Select/ui/SelectHeader/SelectHeader.styles.js.map +0 -1
  318. package/cjs/components/Select/ui/SelectHeader/SelectHeader.styles_24gqog.css +0 -1
  319. package/cjs/components/Select/ui/SelectHeader/variations/_size/base.js +0 -9
  320. package/cjs/components/Select/ui/SelectHeader/variations/_size/base.js.map +0 -1
  321. package/cjs/components/Select/ui/SelectHeader/variations/_size/base_x642ct.css +0 -1
  322. package/cjs/components/Select/ui/SelectHeader/variations/_view/base.js +0 -9
  323. package/cjs/components/Select/ui/SelectHeader/variations/_view/base.js.map +0 -1
  324. package/cjs/components/Select/ui/SelectHeader/variations/_view/base_x642ct.css +0 -1
  325. package/cjs/components/TextField/TextField.styles_2qw1n8.css +0 -5
  326. package/cjs/components/TextField/TextField_1lzb2r1.css +0 -1
  327. package/cjs/components/TextField/_disabled/base.js +0 -9
  328. package/cjs/components/TextField/_disabled/base.js.map +0 -1
  329. package/cjs/components/TextField/_disabled/base_so3w81.css +0 -1
  330. package/cjs/components/TextField/_label-placement/base.js.map +0 -1
  331. package/cjs/components/TextField/_label-placement/base_x642ct.css +0 -1
  332. package/cjs/components/TextField/_label-placement/inner.js.map +0 -1
  333. package/cjs/components/TextField/_label-placement/inner_1tyuicp.css +0 -1
  334. package/cjs/components/TextField/_label-placement/outer.js.map +0 -1
  335. package/cjs/components/TextField/_label-placement/outer_19ekaek.css +0 -1
  336. package/cjs/components/TextField/_size/base.js +0 -9
  337. package/cjs/components/TextField/_size/base.js.map +0 -1
  338. package/cjs/components/TextField/_size/base_b5smyu.css +0 -1
  339. package/cjs/components/TextField/_view/base.js +0 -9
  340. package/cjs/components/TextField/_view/base.js.map +0 -1
  341. package/cjs/components/TextField/_view/base_5bqzed.css +0 -1
  342. package/es/components/Select/ui/SelectDivider/SelectDivider.css +0 -23
  343. package/es/components/Select/ui/SelectDivider/SelectDivider.js +0 -35
  344. package/es/components/Select/ui/SelectDivider/SelectDivider.js.map +0 -1
  345. package/es/components/Select/ui/SelectDivider/SelectDivider.styles.js +0 -7
  346. package/es/components/Select/ui/SelectDivider/SelectDivider.styles.js.map +0 -1
  347. package/es/components/Select/ui/SelectDivider/SelectDivider.styles_673hj6.css +0 -1
  348. package/es/components/Select/ui/SelectDivider/variations/_size/base.js.map +0 -1
  349. package/es/components/Select/ui/SelectDivider/variations/_size/base_x642ct.css +0 -1
  350. package/es/components/Select/ui/SelectDivider/variations/_view/base.js +0 -5
  351. package/es/components/Select/ui/SelectDivider/variations/_view/base.js.map +0 -1
  352. package/es/components/Select/ui/SelectDivider/variations/_view/base_x642ct.css +0 -1
  353. package/es/components/Select/ui/SelectFooter/SelectFooter.css +0 -23
  354. package/es/components/Select/ui/SelectFooter/SelectFooter.js +0 -35
  355. package/es/components/Select/ui/SelectFooter/SelectFooter.js.map +0 -1
  356. package/es/components/Select/ui/SelectFooter/SelectFooter.styles.js +0 -7
  357. package/es/components/Select/ui/SelectFooter/SelectFooter.styles.js.map +0 -1
  358. package/es/components/Select/ui/SelectFooter/SelectFooter.styles_11hk6tt.css +0 -1
  359. package/es/components/Select/ui/SelectFooter/variations/_size/base.js +0 -5
  360. package/es/components/Select/ui/SelectFooter/variations/_size/base.js.map +0 -1
  361. package/es/components/Select/ui/SelectFooter/variations/_size/base_x642ct.css +0 -1
  362. package/es/components/Select/ui/SelectFooter/variations/_view/base.js +0 -5
  363. package/es/components/Select/ui/SelectFooter/variations/_view/base.js.map +0 -1
  364. package/es/components/Select/ui/SelectFooter/variations/_view/base_x642ct.css +0 -1
  365. package/es/components/Select/ui/SelectGroup/SelectGroup.css +0 -23
  366. package/es/components/Select/ui/SelectGroup/SelectGroup.js +0 -35
  367. package/es/components/Select/ui/SelectGroup/SelectGroup.js.map +0 -1
  368. package/es/components/Select/ui/SelectGroup/SelectGroup.styles.js +0 -7
  369. package/es/components/Select/ui/SelectGroup/SelectGroup.styles.js.map +0 -1
  370. package/es/components/Select/ui/SelectGroup/SelectGroup.styles_mktu7e.css +0 -1
  371. package/es/components/Select/ui/SelectGroup/variations/_size/base.js +0 -5
  372. package/es/components/Select/ui/SelectGroup/variations/_size/base.js.map +0 -1
  373. package/es/components/Select/ui/SelectGroup/variations/_size/base_x642ct.css +0 -1
  374. package/es/components/Select/ui/SelectGroup/variations/_view/base.js +0 -5
  375. package/es/components/Select/ui/SelectGroup/variations/_view/base.js.map +0 -1
  376. package/es/components/Select/ui/SelectGroup/variations/_view/base_x642ct.css +0 -1
  377. package/es/components/Select/ui/SelectHeader/SelectHeader.css +0 -23
  378. package/es/components/Select/ui/SelectHeader/SelectHeader.js +0 -35
  379. package/es/components/Select/ui/SelectHeader/SelectHeader.js.map +0 -1
  380. package/es/components/Select/ui/SelectHeader/SelectHeader.styles.js +0 -7
  381. package/es/components/Select/ui/SelectHeader/SelectHeader.styles.js.map +0 -1
  382. package/es/components/Select/ui/SelectHeader/SelectHeader.styles_24gqog.css +0 -1
  383. package/es/components/Select/ui/SelectHeader/variations/_size/base.js +0 -5
  384. package/es/components/Select/ui/SelectHeader/variations/_size/base.js.map +0 -1
  385. package/es/components/Select/ui/SelectHeader/variations/_size/base_x642ct.css +0 -1
  386. package/es/components/Select/ui/SelectHeader/variations/_view/base.js +0 -5
  387. package/es/components/Select/ui/SelectHeader/variations/_view/base.js.map +0 -1
  388. package/es/components/Select/ui/SelectHeader/variations/_view/base_x642ct.css +0 -1
  389. package/es/components/TextField/TextField.styles_2qw1n8.css +0 -5
  390. package/es/components/TextField/TextField_1lzb2r1.css +0 -1
  391. package/es/components/TextField/_disabled/base.js +0 -5
  392. package/es/components/TextField/_disabled/base.js.map +0 -1
  393. package/es/components/TextField/_disabled/base_so3w81.css +0 -1
  394. package/es/components/TextField/_label-placement/base.js.map +0 -1
  395. package/es/components/TextField/_label-placement/base_x642ct.css +0 -1
  396. package/es/components/TextField/_label-placement/inner.js +0 -5
  397. package/es/components/TextField/_label-placement/inner.js.map +0 -1
  398. package/es/components/TextField/_label-placement/inner_1tyuicp.css +0 -1
  399. package/es/components/TextField/_label-placement/outer.js +0 -5
  400. package/es/components/TextField/_label-placement/outer.js.map +0 -1
  401. package/es/components/TextField/_label-placement/outer_19ekaek.css +0 -1
  402. package/es/components/TextField/_size/base.js +0 -5
  403. package/es/components/TextField/_size/base.js.map +0 -1
  404. package/es/components/TextField/_size/base_b5smyu.css +0 -1
  405. package/es/components/TextField/_view/base.js +0 -5
  406. package/es/components/TextField/_view/base.js.map +0 -1
  407. package/es/components/TextField/_view/base_5bqzed.css +0 -1
  408. package/styled-components/cjs/components/TextField/_disabled/base.js +0 -9
  409. package/styled-components/cjs/components/TextField/_label-placement/inner.js +0 -10
  410. package/styled-components/cjs/components/TextField/_size/base.js +0 -10
  411. package/styled-components/cjs/components/TextField/_view/base.js +0 -10
  412. package/styled-components/es/components/TextField/_disabled/base.js +0 -3
  413. package/styled-components/es/components/TextField/_label-placement/inner.js +0 -4
  414. package/styled-components/es/components/TextField/_label-placement/outer.js +0 -4
  415. package/styled-components/es/components/TextField/_size/base.js +0 -4
  416. package/styled-components/es/components/TextField/_view/base.js +0 -4
  417. package/types/components/TextField/_disabled/base.d.ts.map +0 -1
  418. package/types/components/TextField/_label-placement/base.d.ts.map +0 -1
  419. package/types/components/TextField/_label-placement/index.d.ts.map +0 -1
  420. package/types/components/TextField/_label-placement/inner.d.ts.map +0 -1
  421. package/types/components/TextField/_label-placement/outer.d.ts.map +0 -1
  422. package/types/components/TextField/_size/base.d.ts.map +0 -1
  423. package/types/components/TextField/_view/base.d.ts.map +0 -1
  424. /package/cjs/components/{Select/ui/SelectDivider/variations/_size → TextField/variations/_label-placement}/base_x642ct.css +0 -0
  425. /package/{cjs/components/Select/ui/SelectDivider/variations/_view → es/components/TextField/variations/_label-placement}/base_x642ct.css +0 -0
  426. /package/styled-components/cjs/components/TextField/{_disabled → variations/_disabled}/tokens.json +0 -0
  427. /package/styled-components/cjs/components/TextField/{_label-placement → variations/_label-placement}/base.js +0 -0
  428. /package/styled-components/cjs/components/TextField/{_label-placement → variations/_label-placement}/index.js +0 -0
  429. /package/styled-components/cjs/components/TextField/{_size → variations/_size}/tokens.json +0 -0
  430. /package/styled-components/cjs/components/TextField/{_view → variations/_view}/tokens.json +0 -0
  431. /package/styled-components/es/components/TextField/{_disabled → variations/_disabled}/tokens.json +0 -0
  432. /package/styled-components/es/components/TextField/{_label-placement → variations/_label-placement}/base.js +0 -0
  433. /package/styled-components/es/components/TextField/{_label-placement → variations/_label-placement}/index.js +0 -0
  434. /package/styled-components/es/components/TextField/{_size → variations/_size}/tokens.json +0 -0
  435. /package/styled-components/es/components/TextField/{_view → variations/_view}/tokens.json +0 -0
  436. /package/types/components/TextField/{_disabled → variations/_disabled}/base.d.ts +0 -0
  437. /package/types/components/TextField/{_label-placement → variations/_label-placement}/base.d.ts +0 -0
  438. /package/types/components/TextField/{_label-placement → variations/_label-placement}/index.d.ts +0 -0
  439. /package/types/components/TextField/{_label-placement → variations/_label-placement}/inner.d.ts +0 -0
  440. /package/types/components/TextField/{_label-placement → variations/_label-placement}/outer.d.ts +0 -0
  441. /package/types/components/TextField/{_size → variations/_read-only}/base.d.ts +0 -0
  442. /package/types/components/TextField/{_view → variations/_size}/base.d.ts +0 -0
@@ -0,0 +1,19 @@
1
+ import styled from 'styled-components';
2
+ import { chipConfig, chipTokens } from '../../../Chip';
3
+ import { component, mergeConfig } from '../../../../engines';
4
+ import { tokens } from '../../TextField.tokens';
5
+ import { addFocus } from '../../../../mixins';
6
+
7
+ // issue #823
8
+ var mergedConfig = /*#__PURE__*/mergeConfig(chipConfig);
9
+ var Chip = /*#__PURE__*/component(mergedConfig);
10
+
11
+ // NOTE: Необходимое переопределение токенов из компонента Chip т.к. используются его части
12
+ export var StyledChip = /*#__PURE__*/styled(Chip).withConfig({
13
+ componentId: "plasma-new-hope__sc-1mypbcr-0"
14
+ })(["", ":var(", ");", ":var(", ");", ":var(", ");", ":var(", ");", ":var(", ");", ":var(", ");", ":var(", ");", ":var(", ");", ":var(", ");", ":var(", ");", ":var(", ");", ":var(", ");", ":var(", ");", ":var(", ");", ":var(", ");", ":var(", ");", ":var(", ");", ":var(", ");", ":var(", ");", ":var(", ");", ":var(", ");", ":var(", ");", ":var(", ");", ":var(", ");", ":var(", ");", ":var(", ");", ":var(", ");", ":var(", ");scroll-snap-align:center;scroll-snap-stop:normal;", " &[readonly]{opacity:var(", ");}"], chipTokens.color, tokens.chipColor, chipTokens.background, tokens.chipBackground, chipTokens.colorHover, tokens.chipColorHover, chipTokens.backgroundHover, tokens.chipBackgroundHover, chipTokens.colorActive, tokens.chipColorActive, chipTokens.backgroundActive, tokens.chipBackgroundActive, chipTokens.backgroundReadOnly, tokens.chipBackgroundReadOnly, chipTokens.colorReadOnly, tokens.chipColorReadOnly, chipTokens.backgroundReadOnlyHover, tokens.chipBackgroundReadOnlyHover, chipTokens.colorReadOnlyHover, tokens.chipColorReadOnlyHover, chipTokens.borderRadius, tokens.chipBorderRadius, chipTokens.width, tokens.chipWidth, chipTokens.height, tokens.chipHeight, chipTokens.paddingRight, tokens.chipPaddingRight, chipTokens.paddingLeft, tokens.chipPaddingLeft, chipTokens.fontFamily, tokens.chipFontFamily, chipTokens.fontSize, tokens.chipFontSize, chipTokens.fontStyle, tokens.chipFontStyle, chipTokens.fontWeight, tokens.chipFontWeight, chipTokens.letterSpacing, tokens.chipLetterSpacing, chipTokens.lineHeight, tokens.chipLineHeight, chipTokens.clearContentMarginLeft, tokens.chipClearContentMarginLeft, chipTokens.clearContentMarginRight, tokens.chipClearContentMarginRight, chipTokens.scaleHover, tokens.chipScaleHover, chipTokens.scaleActive, tokens.chipScaleActive, chipTokens.closeIconSize, tokens.chipCloseIconSize, chipTokens.closeIconColor, tokens.chipCloseIconColor, chipTokens.focusColor, tokens.focusColor, /*#__PURE__*/addFocus({
15
+ outlineOffset: '0.0625rem',
16
+ outlineSize: '0.0625rem',
17
+ outlineRadius: /*#__PURE__*/"calc(var(".concat(tokens.chipBorderRadius, ") - 0.1rem)"),
18
+ outlineColor: /*#__PURE__*/"var(".concat(tokens.focusColor, ")")
19
+ }), tokens.chipOpacityReadonly);
@@ -0,0 +1 @@
1
+ export { TextFieldChip } from './TextFieldChip/TextFieldChip';
@@ -0,0 +1,4 @@
1
+ import { css } from 'styled-components';
2
+ import { tokens } from '../../TextField.tokens';
3
+ import { Input } from '../../TextField.styles';
4
+ export var base = /*#__PURE__*/css(["&[disabled]{opacity:var(", ");cursor:not-allowed;", "{cursor:not-allowed;min-width:unset;}}"], tokens.disabledOpacity, Input);
@@ -0,0 +1,4 @@
1
+ import { css } from 'styled-components';
2
+ import { Input, Label } from '../../TextField.styles';
3
+ import { tokens } from '../../TextField.tokens';
4
+ export var labelPlacement_inner = /*#__PURE__*/css(["", "{padding:var(", ");}", ":focus ~ ", ",", ":not(:placeholder-shown) ~ ", "{height:auto;padding:var(", ");font-family:var(", ");font-size:var(", ");font-style:var(", ");font-weight:var(", ");letter-spacing:var(", ");line-height:var(", ");}", ":not(:focus)::placeholder{color:transparent;}", ":focus::placeholder{color:transparent;}", "{color:var(", ");pointer-events:none;position:absolute;top:0;display:flex;align-items:center;box-sizing:border-box;transition:padding 0.1s ease-in-out,height 0s;height:var(", ");padding-top:calc(var(", ") / 4);padding-bottom:calc(var(", ") / 4);}"], Input, tokens.contentLabelInnerPadding, Input, Label, Input, Label, tokens.labelInnerPadding, tokens.labelInnerFontFamily, tokens.labelInnerFontSize, tokens.labelInnerFontStyle, tokens.labelInnerFontWeight, tokens.labelInnerLetterSpacing, tokens.labelInnerLineHeight, Input, Input, Label, tokens.placeholderColor, tokens.height, tokens.height, tokens.height);
@@ -0,0 +1,4 @@
1
+ import { css } from 'styled-components';
2
+ import { Label } from '../../TextField.styles';
3
+ import { tokens } from '../../TextField.tokens';
4
+ export var labelPlacement_outer = /*#__PURE__*/css(["", "{display:block;margin-bottom:var(", ");color:var(", ");}"], Label, tokens.labelOffset, tokens.labelColor);
@@ -0,0 +1,4 @@
1
+ import { css } from 'styled-components';
2
+ import { tokens } from '../../TextField.tokens';
3
+ import { Input, InputWrapper, Label, LeftHelper } from '../../TextField.styles';
4
+ export var base = /*#__PURE__*/css(["&[readonly]{", "{color:var(", ");background-color:var(", ");box-shadow:inset 0 0 0 var(", ") var(", ");}", ":hover{background-color:var(", ");}", "::placeholder{color:var(", ");}", "{color:var(", ");cursor:default;min-width:unset;}", "{color:var(", ");}", "{color:var(", ");}}"], InputWrapper, tokens.colorReadOnly, /*#__PURE__*/String(tokens.backgroundColorReadOnly), /*#__PURE__*/String(tokens.borderWidth), /*#__PURE__*/String(tokens.borderColorReadOnly), InputWrapper, tokens.backgroundColorReadOnly, Input, tokens.placeholderColorReadOnly, Input, tokens.colorReadOnly, LeftHelper, tokens.leftHelperColorReadOnly, Label, tokens.labelColorReadOnly);
@@ -0,0 +1,4 @@
1
+ import { css } from 'styled-components';
2
+ import { classes, tokens } from '../../TextField.tokens';
3
+ import { Input, InputWrapper, Label, LeftHelper } from '../../TextField.styles';
4
+ export var base = /*#__PURE__*/css(["", "{font-family:var(", ");font-size:var(", ");font-style:var(", ");font-weight:var(", ");letter-spacing:var(", ");line-height:var(", ");}", "{height:var(", ");border-radius:var(", ");padding:var(", ");&.", "{padding-top:var(", ");padding-bottom:var(", ");}&.", "{padding-left:var(", ");}&.", "{padding-right:var(", ");}}", "{font-family:var(", ");font-size:var(", ");font-style:var(", ");font-weight:var(", ");letter-spacing:var(", ");line-height:var(", ");}", "{margin-top:var(", ");font-family:var(", ");font-size:var(", ");font-style:var(", ");font-weight:var(", ");letter-spacing:var(", ");line-height:var(", ");}"], Input, tokens.fontFamily, tokens.fontSize, tokens.fontStyle, tokens.fontWeight, tokens.letterSpacing, tokens.lineHeight, InputWrapper, tokens.height, tokens.borderRadius, tokens.padding, classes.hasChips, tokens.paddingWithChips, tokens.paddingWithChips, classes.hasEmptyContentLeft, tokens.paddingWithChips, classes.hasEmptyContentRight, tokens.paddingWithChips, Label, tokens.labelFontFamily, tokens.labelFontSize, tokens.labelFontStyle, tokens.labelFontWeight, tokens.labelLetterSpacing, tokens.labelLineHeight, LeftHelper, tokens.leftHelperOffset, tokens.leftHelperFontFamily, tokens.leftHelperFontSize, tokens.leftHelperFontStyle, tokens.leftHelperFontWeight, tokens.leftHelperLetterSpacing, tokens.leftHelperLineHeight);
@@ -0,0 +1,4 @@
1
+ import { css } from 'styled-components';
2
+ import { tokens } from '../../TextField.tokens';
3
+ import { Input, InputWrapper, LeftHelper } from '../../TextField.styles';
4
+ export var base = /*#__PURE__*/css(["", "{--plasma_private-textfield-border-color:var(", ");--plasma_private-textfield-bg-color:var(", ");color:var(", ");background-color:var(--plasma_private-textfield-bg-color);box-shadow:inset 0 0 0 var(", ") var(--plasma_private-textfield-border-color);caret-color:var(", ");transition:background-color 0.1s ease-in,color 0.1s ease-in,box-shadow 0.1s ease-in;}", ":hover{--plasma_private-textfield-border-color:var(", ",var(", "));--plasma_private-textfield-bg-color:var( ", ",var(", ") );}", ":focus-within{--plasma_private-textfield-border-color:var(", ",var(", "));--plasma_private-textfield-bg-color:var( ", ",var(", ") );}", "::placeholder{color:var(", ");}", "{color:var(", ");}", "{color:var(", ");}"], InputWrapper, /*#__PURE__*/String(tokens.borderColor), /*#__PURE__*/String(tokens.backgroundColor), tokens.color, tokens.borderWidth, tokens.caretColor, InputWrapper, tokens.borderColorHover, /*#__PURE__*/String(tokens.borderColor), tokens.backgroundColorHover, /*#__PURE__*/String(tokens.backgroundColor), InputWrapper, tokens.borderColorFocus, /*#__PURE__*/String(tokens.borderColor), tokens.backgroundColorFocus, /*#__PURE__*/String(tokens.backgroundColor), Input, tokens.placeholderColor, Input, tokens.color, LeftHelper, tokens.leftHelperColor);
@@ -33,6 +33,12 @@ const meta: Meta<typeof Popover> = {
33
33
  },
34
34
  table: { defaultValue: { summary: true } },
35
35
  },
36
+ closeOnBeyondTargetHover: {
37
+ control: {
38
+ type: 'boolean',
39
+ },
40
+ table: { defaultValue: { summary: true } },
41
+ },
36
42
  closeOnEsc: {
37
43
  control: {
38
44
  type: 'boolean',
@@ -62,6 +68,7 @@ const meta: Meta<typeof Popover> = {
62
68
  placement: 'bottom',
63
69
  trigger: 'click',
64
70
  closeOnOverlayClick: true,
71
+ closeOnBeyondTargetHover: true,
65
72
  closeOnEsc: true,
66
73
  isFocusTrapped: true,
67
74
  skidding: 0,
@@ -0,0 +1,37 @@
1
+ import { css } from 'styled-components';
2
+ import { textFieldTokens as tokens, textField_labelPlacement_inner as labelPlacement_inner, textField_labelPlacement_outer as labelPlacement_outer } from '../../../../components/TextField';
3
+ export var config = {
4
+ defaults: {
5
+ view: 'default',
6
+ size: 'l',
7
+ labelPlacement: 'outer'
8
+ },
9
+ variations: {
10
+ view: {
11
+ "default": /*#__PURE__*/css(["", ":var(--text-primary);", ":var(--surface-transparent-primary);", ":var(--surface-transparent-secondary);", ":var(--text-accent);", ":var(--text-secondary);", ":var(--text-primary);", ":var(--text-secondary);", ":var(--text-secondary);", ":var(--text-primary);", ":var(--surface-transparent-secondary);", ":var(--text-primary);", ":var(--surface-transparent-secondary-hover);", ":var(--text-primary);", ":var(--surface-transparent-secondary-active);", ":var(--surface-transparent-secondary);", ":var(--text-primary);", ":var(--surface-transparent-secondary);", ":var(--text-primary);", ":0.72;", ":var(--text-accent);"], tokens.color, tokens.backgroundColor, tokens.backgroundColorFocus, tokens.caretColor, tokens.placeholderColor, tokens.labelColor, tokens.leftHelperColor, tokens.chipCloseIconColor, tokens.chipColor, tokens.chipBackground, tokens.chipColorHover, tokens.chipBackgroundHover, tokens.chipColorActive, tokens.chipBackgroundActive, tokens.chipBackgroundReadOnly, tokens.chipColorReadOnly, tokens.chipBackgroundReadOnlyHover, tokens.chipColorReadOnlyHover, tokens.chipOpacityReadonly, tokens.focusColor),
12
+ // TODO заменить --surface-transparent-positive на корректный токен
13
+ positive: /*#__PURE__*/css(["", ":var(--plasma-colors-primary);", ":var(--surface-transparent-positive);", ":var(--surface-transparent-positive-active);", ":var(--text-accent);", ":var(--text-secondary);", ":var(--text-primary);", ":var(--text-positive);", ":var(--text-secondary);", ":var(--text-primary);", ":var(--surface-transparent-secondary);", ":var(--text-primary);", ":var(--surface-transparent-secondary-hover);", ":var(--text-primary);", ":var(--surface-transparent-secondary-active);", ":var(--surface-transparent-secondary);", ":var(--text-primary);", ":var(--surface-transparent-secondary);", ":var(--text-primary);", ":0.72;", ":var(--text-accent);"], tokens.color, tokens.backgroundColor, tokens.backgroundColorFocus, tokens.caretColor, tokens.placeholderColor, tokens.labelColor, tokens.leftHelperColor, tokens.chipCloseIconColor, tokens.chipColor, tokens.chipBackground, tokens.chipColorHover, tokens.chipBackgroundHover, tokens.chipColorActive, tokens.chipBackgroundActive, tokens.chipBackgroundReadOnly, tokens.chipColorReadOnly, tokens.chipBackgroundReadOnlyHover, tokens.chipColorReadOnlyHover, tokens.chipOpacityReadonly, tokens.focusColor),
14
+ // // TODO заменить --surface-transparent-warning на корректный токен
15
+ warning: /*#__PURE__*/css(["", ":var(--plasma-colors-primary);", ":var(--surface-transparent-warning);", ":var(--surface-transparent-warning-active);", ":var(--text-accent);", ":var(--text-secondary);", ":var(--text-primary);", ":var(--text-warning);", ":var(--text-secondary);", ":var(--text-primary);", ":var(--surface-transparent-secondary);", ":var(--text-primary);", ":var(--surface-transparent-secondary-hover);", ":var(--text-primary);", ":var(--surface-transparent-secondary-active);", ":var(--surface-transparent-secondary);", ":var(--text-primary);", ":var(--surface-transparent-secondary);", ":var(--text-primary);", ":0.72;", ":var(--text-accent);"], tokens.color, tokens.backgroundColor, tokens.backgroundColorFocus, tokens.caretColor, tokens.placeholderColor, tokens.labelColor, tokens.leftHelperColor, tokens.chipCloseIconColor, tokens.chipColor, tokens.chipBackground, tokens.chipColorHover, tokens.chipBackgroundHover, tokens.chipColorActive, tokens.chipBackgroundActive, tokens.chipBackgroundReadOnly, tokens.chipColorReadOnly, tokens.chipBackgroundReadOnlyHover, tokens.chipColorReadOnlyHover, tokens.chipOpacityReadonly, tokens.focusColor),
16
+ // // TODO заменить --surface-transparent-negative на корректный токен
17
+ negative: /*#__PURE__*/css(["", ":var(--plasma-colors-primary);", ":var(--surface-transparent-negative);", ":var(--surface-transparent-negative-active);", ":var(--text-accent);", ":var(--text-secondary);", ":var(--text-primary);", ":var(--text-negative);", ":var(--text-secondary);", ":var(--text-primary);", ":var(--surface-transparent-secondary);", ":var(--text-primary);", ":var(--surface-transparent-secondary-hover);", ":var(--text-primary);", ":var(--surface-transparent-secondary-active);", ":var(--surface-transparent-secondary);", ":var(--text-primary);", ":var(--surface-transparent-secondary);", ":var(--text-primary);", ":0.72;", ":var(--text-accent);"], tokens.color, tokens.backgroundColor, tokens.backgroundColorFocus, tokens.caretColor, tokens.placeholderColor, tokens.labelColor, tokens.leftHelperColor, tokens.chipCloseIconColor, tokens.chipColor, tokens.chipBackground, tokens.chipColorHover, tokens.chipBackgroundHover, tokens.chipColorActive, tokens.chipBackgroundActive, tokens.chipBackgroundReadOnly, tokens.chipColorReadOnly, tokens.chipBackgroundReadOnlyHover, tokens.chipColorReadOnlyHover, tokens.chipOpacityReadonly, tokens.focusColor)
18
+ },
19
+ size: {
20
+ l: /*#__PURE__*/css(["", ":3.5rem;", ":1.0625rem 1.125rem 1.0625rem 1.125rem;", ":0.375rem;", ":0.875rem;", ":-0.0625rem 0.5rem -0.0625rem -0.125rem;", ":-0.0625rem -0.125rem -0.0625rem 0.75rem;", ":var(--plasma-typo-body-l-font-family);", ":var(--plasma-typo-body-l-font-size);", ":var(--plasma-typo-body-l-font-style);", ":var(--plasma-typo-body-l-font-weight);", ":var(--plasma-typo-body-l-letter-spacing);", ":var(--plasma-typo-body-l-line-height);", ":0.75rem;", ":var(--plasma-typo-body-l-font-family);", ":var(--plasma-typo-body-l-font-size);", ":var(--plasma-typo-body-l-font-style);", ":var(--plasma-typo-body-l-font-weight);", ":var(--plasma-typo-body-l-letter-spacing);", ":var(--plasma-typo-body-l-line-height);", ":0.25rem;", ":var(--plasma-typo-body-xs-font-family);", ":var(--plasma-typo-body-xs-font-size);", ":var(--plasma-typo-body-xs-font-style);", ":var(--plasma-typo-body-xs-font-weight);", ":var(--plasma-typo-body-xs-letter-spacing);", ":var(--plasma-typo-body-xs-line-height);", ":0.5625rem 0 0.125rem 0;", ":1.5625rem 0 0.5625rem 0;", ":0.25rem;", ":0.5rem;", ":auto;", ":2.75rem;", ":0.75rem;", ":1rem;", ":0.625rem;", ":0rem;", ":1.5rem;", ":var(--plasma-typo-body-l-font-family);", ":var(--plasma-typo-body-l-font-size);", ":var(--plasma-typo-body-l-font-style);", ":var(--plasma-typo-body-l-font-weight);", ":var(--plasma-typo-body-l-letter-spacing);", ":var(--plasma-typo-body-l-line-height);"], tokens.height, tokens.padding, tokens.paddingWithChips, tokens.borderRadius, tokens.leftContentMargin, tokens.rightContentMargin, tokens.fontFamily, tokens.fontSize, tokens.fontStyle, tokens.fontWeight, tokens.letterSpacing, tokens.lineHeight, tokens.labelOffset, tokens.labelFontFamily, tokens.labelFontSize, tokens.labelFontStyle, tokens.labelFontWeight, tokens.labelLetterSpacing, tokens.labelLineHeight, tokens.leftHelperOffset, tokens.leftHelperFontFamily, tokens.leftHelperFontSize, tokens.leftHelperFontStyle, tokens.leftHelperFontWeight, tokens.leftHelperLetterSpacing, tokens.leftHelperLineHeight, tokens.labelInnerPadding, tokens.contentLabelInnerPadding, tokens.chipGap, tokens.chipBorderRadius, tokens.chipWidth, tokens.chipHeight, tokens.chipPaddingRight, tokens.chipPaddingLeft, tokens.chipClearContentMarginLeft, tokens.chipClearContentMarginRight, tokens.chipCloseIconSize, tokens.chipFontFamily, tokens.chipFontSize, tokens.chipFontStyle, tokens.chipFontWeight, tokens.chipLetterSpacing, tokens.chipLineHeight),
21
+ m: /*#__PURE__*/css(["", ":3rem;", ":0.875rem 1rem 0.875rem 1rem;", ":0.375rem;", ":0.75rem;", ":-0.125rem 0.375rem -0.125rem -0.125rem;", ":-0.125rem -0.125rem -0.125rem 0.75rem;", ":var(--plasma-typo-body-m-font-family);", ":var(--plasma-typo-body-m-font-size);", ":var(--plasma-typo-body-m-font-style);", ":var(--plasma-typo-body-m-font-weight);", ":var(--plasma-typo-body-m-letter-spacing);", ":var(--plasma-typo-body-m-line-height);", ":0.625rem;", ":var(--plasma-typo-body-m-font-family);", ":var(--plasma-typo-body-m-font-size);", ":var(--plasma-typo-body-m-font-style);", ":var(--plasma-typo-body-m-font-weight);", ":var(--plasma-typo-body-m-letter-spacing);", ":var(--plasma-typo-body-m-line-height);", ":0.25rem;", ":var(--plasma-typo-body-xs-font-family);", ":var(--plasma-typo-body-xs-font-size);", ":var(--plasma-typo-body-xs-font-style);", ":var(--plasma-typo-body-xs-font-weight);", ":var(--plasma-typo-body-xs-letter-spacing);", ":var(--plasma-typo-body-xs-line-height);", ":0.375rem 0 0.125rem 0;", ":1.375rem 0 0.375rem 0;", ":0.25rem;", ":0.375rem;", ":auto;", ":2.25rem;", ":0.625rem;", ":0.875rem;", ":0.5rem;", ":0rem;", ":1.25rem;", ":var(--plasma-typo-body-m-font-family);", ":var(--plasma-typo-body-m-font-size);", ":var(--plasma-typo-body-m-font-style);", ":var(--plasma-typo-body-m-font-weight);", ":var(--plasma-typo-body-m-letter-spacing);", ":var(--plasma-typo-body-m-line-height);"], tokens.height, tokens.padding, tokens.paddingWithChips, tokens.borderRadius, tokens.leftContentMargin, tokens.rightContentMargin, tokens.fontFamily, tokens.fontSize, tokens.fontStyle, tokens.fontWeight, tokens.letterSpacing, tokens.lineHeight, tokens.labelOffset, tokens.labelFontFamily, tokens.labelFontSize, tokens.labelFontStyle, tokens.labelFontWeight, tokens.labelLetterSpacing, tokens.labelLineHeight, tokens.leftHelperOffset, tokens.leftHelperFontFamily, tokens.leftHelperFontSize, tokens.leftHelperFontStyle, tokens.leftHelperFontWeight, tokens.leftHelperLetterSpacing, tokens.leftHelperLineHeight, tokens.labelInnerPadding, tokens.contentLabelInnerPadding, tokens.chipGap, tokens.chipBorderRadius, tokens.chipWidth, tokens.chipHeight, tokens.chipPaddingRight, tokens.chipPaddingLeft, tokens.chipClearContentMarginLeft, tokens.chipClearContentMarginRight, tokens.chipCloseIconSize, tokens.chipFontFamily, tokens.chipFontSize, tokens.chipFontStyle, tokens.chipFontWeight, tokens.chipLetterSpacing, tokens.chipLineHeight),
22
+ s: /*#__PURE__*/css(["", ":2.5rem;", ":0.6875rem 0.875rem 0.6875rem 0.875rem;", ":0.375rem;", ":0.625rem;", ":-0.1875rem 0.25rem -0.1875rem -0.125rem;", ":-0.1875rem -0.125rem -0.1875rem 0.75rem;", ":var(--plasma-typo-body-s-font-family);", ":var(--plasma-typo-body-s-font-size);", ":var(--plasma-typo-body-s-font-style);", ":var(--plasma-typo-body-s-font-weight);", ":var(--plasma-typo-body-s-letter-spacing);", ":var(--plasma-typo-body-s-line-height);", ":0.5rem;", ":var(--plasma-typo-body-s-font-family);", ":var(--plasma-typo-body-s-font-size);", ":var(--plasma-typo-body-s-font-style);", ":var(--plasma-typo-body-s-font-weight);", ":var(--plasma-typo-body-s-letter-spacing);", ":var(--plasma-typo-body-s-line-height);", ":0.25rem;", ":var(--plasma-typo-body-xs-font-family);", ":var(--plasma-typo-body-xs-font-size);", ":var(--plasma-typo-body-xs-font-style);", ":var(--plasma-typo-body-xs-font-weight);", ":var(--plasma-typo-body-xs-letter-spacing);", ":var(--plasma-typo-body-xs-line-height);", ":0.3125rem 0 0 0;", ":1.0625rem 0 0.3125rem 0;", ":0.25rem;", ":0.25rem;", ":auto;", ":1.75rem;", ":0.5rem;", ":0.75rem;", ":0.375rem;", ":0rem;", ":1rem;", ":var(--plasma-typo-body-s-font-family);", ":var(--plasma-typo-body-s-font-size);", ":var(--plasma-typo-body-s-font-style);", ":var(--plasma-typo-body-s-font-weight);", ":var(--plasma-typo-body-s-letter-spacing);", ":var(--plasma-typo-body-s-line-height);"], tokens.height, tokens.padding, tokens.paddingWithChips, tokens.borderRadius, tokens.leftContentMargin, tokens.rightContentMargin, tokens.fontFamily, tokens.fontSize, tokens.fontStyle, tokens.fontWeight, tokens.letterSpacing, tokens.lineHeight, tokens.labelOffset, tokens.labelFontFamily, tokens.labelFontSize, tokens.labelFontStyle, tokens.labelFontWeight, tokens.labelLetterSpacing, tokens.labelLineHeight, tokens.leftHelperOffset, tokens.leftHelperFontFamily, tokens.leftHelperFontSize, tokens.leftHelperFontStyle, tokens.leftHelperFontWeight, tokens.leftHelperLetterSpacing, tokens.leftHelperLineHeight, tokens.labelInnerPadding, tokens.contentLabelInnerPadding, tokens.chipGap, tokens.chipBorderRadius, tokens.chipWidth, tokens.chipHeight, tokens.chipPaddingRight, tokens.chipPaddingLeft, tokens.chipClearContentMarginLeft, tokens.chipClearContentMarginRight, tokens.chipCloseIconSize, tokens.chipFontFamily, tokens.chipFontSize, tokens.chipFontStyle, tokens.chipFontWeight, tokens.chipLetterSpacing, tokens.chipLineHeight),
23
+ xs: /*#__PURE__*/css(["", ":2rem;", ":0.5625rem 0.625rem 0.5625rem 0.625rem;", ":0.375rem;", ":0.5rem;", ":-0.0625rem 0.25rem -0.0625rem -0.125rem;", ":-0.0625rem -0.125rem -0.0625rem 0.75rem;", ":var(--plasma-typo-body-xs-font-family);", ":var(--plasma-typo-body-xs-font-size);", ":var(--plasma-typo-body-xs-font-style);", ":var(--plasma-typo-body-xs-font-weight);", ":var(--plasma-typo-body-xs-letter-spacing);", ":var(--plasma-typo-body-xs-line-height);", ":0.375rem;", ":var(--plasma-typo-body-xs-font-family);", ":var(--plasma-typo-body-xs-font-size);", ":var(--plasma-typo-body-xs-font-style);", ":var(--plasma-typo-body-xs-font-weight);", ":var(--plasma-typo-body-xs-letter-spacing);", ":var(--plasma-typo-body-xs-line-height);", ":0.25rem;", ":var(--plasma-typo-body-xs-font-family);", ":var(--plasma-typo-body-xs-font-size);", ":var(--plasma-typo-body-xs-font-style);", ":var(--plasma-typo-body-xs-font-weight);", ":var(--plasma-typo-body-xs-letter-spacing);", ":var(--plasma-typo-body-xs-line-height);", ":0.3125rem 0 0 0;", ":1.0625rem 0 0.3125rem 0;", ":0.25rem;", ":0.125rem;", ":auto;", ":1.25rem;", ":0.375rem;", ":0.625rem;", ":0.25rem;", ":0rem;", ":0.75rem;", ":var(--plasma-typo-body-xs-font-family);", ":var(--plasma-typo-body-xs-font-size);", ":var(--plasma-typo-body-xs-font-style);", ":var(--plasma-typo-body-xs-font-weight);", ":var(--plasma-typo-body-xs-letter-spacing);", ":var(--plasma-typo-body-xs-line-height);"], tokens.height, tokens.padding, tokens.paddingWithChips, tokens.borderRadius, tokens.leftContentMargin, tokens.rightContentMargin, tokens.fontFamily, tokens.fontSize, tokens.fontStyle, tokens.fontWeight, tokens.letterSpacing, tokens.lineHeight, tokens.labelOffset, tokens.labelFontFamily, tokens.labelFontSize, tokens.labelFontStyle, tokens.labelFontWeight, tokens.labelLetterSpacing, tokens.labelLineHeight, tokens.leftHelperOffset, tokens.leftHelperFontFamily, tokens.leftHelperFontSize, tokens.leftHelperFontStyle, tokens.leftHelperFontWeight, tokens.leftHelperLetterSpacing, tokens.leftHelperLineHeight, tokens.labelInnerPadding, tokens.contentLabelInnerPadding, tokens.chipGap, tokens.chipBorderRadius, tokens.chipWidth, tokens.chipHeight, tokens.chipPaddingRight, tokens.chipPaddingLeft, tokens.chipClearContentMarginLeft, tokens.chipClearContentMarginRight, tokens.chipCloseIconSize, tokens.chipFontFamily, tokens.chipFontSize, tokens.chipFontStyle, tokens.chipFontWeight, tokens.chipLetterSpacing, tokens.chipLineHeight)
24
+ },
25
+ labelPlacement: {
26
+ inner: [labelPlacement_inner, /*#__PURE__*/css(["&.", "{", ":var(--plasma-input-label-color,var(--plasma-input-placeholder-color,var(--plasma-colors-secondary)));", ":var(--plasma-typo-body-xs-font-family);", ":var(--plasma-typo-body-xs-font-size);", ":var(--plasma-typo-body-xs-font-style);", ":var(--plasma-typo-body-xs-font-weight);", ":var(--plasma-typo-body-xs-letter-spacing);", ":var(--plasma-typo-body-xs-line-height);}"], labelPlacement_inner, tokens.placeholderColor, tokens.labelInnerFontFamily, tokens.labelInnerFontSize, tokens.labelInnerFontStyle, tokens.labelInnerFontWeight, tokens.labelInnerLetterSpacing, tokens.labelInnerLineHeight)],
27
+ outer: [labelPlacement_outer, /*#__PURE__*/css(["&.", "{}"], labelPlacement_outer)]
28
+ },
29
+ disabled: {
30
+ "true": /*#__PURE__*/css(["", ":0.4;"], tokens.disabledOpacity)
31
+ },
32
+ // TODO заменить --surface-transparent-primary на корректный токен
33
+ readOnly: {
34
+ "true": /*#__PURE__*/css(["", ":var(--text-secondary);", ":var(--surface-transparent-primary);", ":var(--text-secondary);", ":var(--text-secondary);", ":var(--text-secondary);"], tokens.colorReadOnly, tokens.backgroundColorReadOnly, tokens.placeholderColorReadOnly, tokens.leftHelperColorReadOnly, tokens.labelColorReadOnly)
35
+ }
36
+ }
37
+ };
@@ -0,0 +1,5 @@
1
+ import { component, mergeConfig } from '../../../../engines';
2
+ import { textFieldConfig } from '../../../../components/TextField';
3
+ import { config } from './TextField.config';
4
+ var mergedConfig = /*#__PURE__*/mergeConfig(textFieldConfig, config);
5
+ export var TextField = /*#__PURE__*/component(mergedConfig);
@@ -0,0 +1,133 @@
1
+ import React, { ComponentProps, useState } from 'react';
2
+ import type { StoryObj, Meta } from '@storybook/react';
3
+ import { action } from '@storybook/addon-actions';
4
+ import { IconPlaceholder } from '@salutejs/plasma-sb-utils';
5
+
6
+ import { WithTheme } from '../../../_helpers';
7
+
8
+ import { TextField } from './TextField';
9
+
10
+ const onChange = action('onChange');
11
+ const onFocus = action('onFocus');
12
+ const onBlur = action('onBlur');
13
+ const onSearch = action('onSearch');
14
+
15
+ const sizes = ['l', 'm', 's', 'xs'];
16
+ const views = ['default', 'positive', 'warning', 'negative'];
17
+ const enumerationTypes = ['plain', 'chip'];
18
+ const labelPlacements = ['outer', 'inner'];
19
+
20
+ const meta: Meta<typeof TextField> = {
21
+ title: 'plasma_b2c/TextField',
22
+ component: TextField,
23
+ decorators: [WithTheme],
24
+ argTypes: {
25
+ view: {
26
+ options: views,
27
+ control: {
28
+ type: 'select',
29
+ },
30
+ },
31
+ maxLength: {
32
+ control: {
33
+ type: 'number',
34
+ },
35
+ },
36
+ labelPlacement: {
37
+ options: labelPlacements,
38
+ control: {
39
+ type: 'inline-radio',
40
+ },
41
+ },
42
+ enumerationType: {
43
+ options: enumerationTypes,
44
+ control: {
45
+ type: 'select',
46
+ },
47
+ },
48
+ size: {
49
+ options: sizes,
50
+ control: {
51
+ type: 'inline-radio',
52
+ },
53
+ },
54
+ },
55
+ };
56
+
57
+ export default meta;
58
+
59
+ type StoryPropsDefault = Omit<
60
+ ComponentProps<typeof TextField>,
61
+ | 'helperBlock'
62
+ | 'contentLeft'
63
+ | 'htmlSize'
64
+ | 'contentRight'
65
+ | 'type'
66
+ | 'name'
67
+ | 'onFocus'
68
+ | 'onBlur'
69
+ | 'onChange'
70
+ | 'value'
71
+ | 'checked'
72
+ | 'maxLength'
73
+ | 'minLength'
74
+ | 'required'
75
+ > & {
76
+ 'storybook:contentLeft': boolean;
77
+ 'storybook:contentRight': boolean;
78
+ };
79
+
80
+ const StoryDemo = ({
81
+ 'storybook:contentLeft': enableContentLeft,
82
+ 'storybook:contentRight': enableContentRight,
83
+ view,
84
+ ...rest
85
+ }: StoryPropsDefault) => {
86
+ const [text, setText] = useState('Значение поля');
87
+
88
+ const iconSize = rest.size === 'xs' ? 'xs' : 's';
89
+
90
+ return (
91
+ <TextField
92
+ {...rest}
93
+ value={text}
94
+ contentLeft={enableContentLeft ? <IconPlaceholder size={iconSize} /> : undefined}
95
+ contentRight={enableContentRight ? <IconPlaceholder size={iconSize} /> : undefined}
96
+ view={view}
97
+ onChange={(e) => {
98
+ setText(e.target.value);
99
+ onChange(e.target.value);
100
+ }}
101
+ onFocus={onFocus}
102
+ onBlur={onBlur}
103
+ onSearch={onSearch}
104
+ />
105
+ );
106
+ };
107
+
108
+ export const Default: StoryObj<StoryPropsDefault> = {
109
+ args: {
110
+ id: 'example-text-field',
111
+ size: 'l',
112
+ view: 'default',
113
+ label: 'Лейбл',
114
+ labelPlacement: 'outer',
115
+ placeholder: 'Заполните поле',
116
+ leftHelper: 'Подсказка к полю',
117
+ enumerationType: 'plain',
118
+ disabled: false,
119
+ readOnly: false,
120
+ 'storybook:contentLeft': true,
121
+ 'storybook:contentRight': true,
122
+ },
123
+ render: (args) => <StoryDemo {...args} />,
124
+ };
125
+
126
+ export const Chips: StoryObj<StoryPropsDefault> = {
127
+ args: {
128
+ ...Default.args,
129
+ enumerationType: 'chip',
130
+ values: ['1 value', '2 value', '3 value', '4 value'],
131
+ },
132
+ render: (args) => <StoryDemo {...args} />,
133
+ };
@@ -0,0 +1,34 @@
1
+ import { css } from 'styled-components';
2
+ import { textFieldTokens as tokens, textField_labelPlacement_inner as labelPlacement_inner, textField_labelPlacement_outer as labelPlacement_outer } from '../../../../components/TextField';
3
+ export var config = {
4
+ defaults: {
5
+ view: 'default',
6
+ size: 'l',
7
+ labelPlacement: 'outer'
8
+ },
9
+ variations: {
10
+ view: {
11
+ "default": /*#__PURE__*/css(["", ":var(--text-primary);", ":var(--surface-clear);", ":var(--text-accent);", ":var(--text-secondary);", ":var(--text-primary);", ":var(--text-secondary);", ":var(--surface-transparent-tertiary);", ":var(--plasma-colors-secondary);", ":var(--surface-accent);", ":var(--text-secondary);", ":var(--text-primary);", ":var(--surface-transparent-secondary);", ":var(--text-primary);", ":var(--surface-transparent-secondary-hover);", ":var(--text-primary);", ":var(--surface-transparent-secondary-active);", ":var(--surface-transparent-secondary);", ":var(--text-primary);", ":var(--surface-transparent-secondary);", ":var(--text-primary);", ":0.72;", ":var(--text-accent);"], tokens.color, tokens.backgroundColor, tokens.caretColor, tokens.placeholderColor, tokens.labelColor, tokens.leftHelperColor, tokens.borderColor, tokens.borderColorHover, tokens.borderColorFocus, tokens.chipCloseIconColor, tokens.chipColor, tokens.chipBackground, tokens.chipColorHover, tokens.chipBackgroundHover, tokens.chipColorActive, tokens.chipBackgroundActive, tokens.chipBackgroundReadOnly, tokens.chipColorReadOnly, tokens.chipBackgroundReadOnlyHover, tokens.chipColorReadOnlyHover, tokens.chipOpacityReadonly, tokens.focusColor),
12
+ positive: /*#__PURE__*/css(["", ":var(--text-primary);", ":var(--surface-clear);", ":var(--text-accent);", ":var(--text-secondary);", ":var(--text-primary);", ":var(--text-positive);", ":var(--surface-positive);", ":var(--surface-positive);", ":var(--surface-accent);", ":var(--text-secondary);", ":var(--text-primary);", ":var(--surface-transparent-secondary);", ":var(--text-primary);", ":var(--surface-transparent-secondary-hover);", ":var(--text-primary);", ":var(--surface-transparent-secondary-active);", ":var(--surface-transparent-secondary);", ":var(--text-primary);", ":var(--surface-transparent-secondary);", ":var(--text-primary);", ":0.72;", ":var(--text-accent);"], tokens.color, tokens.backgroundColor, tokens.caretColor, tokens.placeholderColor, tokens.labelColor, tokens.leftHelperColor, tokens.borderColor, tokens.borderColorHover, tokens.borderColorFocus, tokens.chipCloseIconColor, tokens.chipColor, tokens.chipBackground, tokens.chipColorHover, tokens.chipBackgroundHover, tokens.chipColorActive, tokens.chipBackgroundActive, tokens.chipBackgroundReadOnly, tokens.chipColorReadOnly, tokens.chipBackgroundReadOnlyHover, tokens.chipColorReadOnlyHover, tokens.chipOpacityReadonly, tokens.focusColor),
13
+ warning: /*#__PURE__*/css(["", ":var(--text-primary);", ":var(--surface-clear);", ":var(--text-accent);", ":var(--text-secondary);", ":var(--text-primary);", ":var(--text-warning);", ":var(--surface-warning);", ":var(--surface-warning);", ":var(--surface-accent);", ":var(--text-secondary);", ":var(--text-primary);", ":var(--surface-transparent-secondary);", ":var(--text-primary);", ":var(--surface-transparent-secondary-hover);", ":var(--text-primary);", ":var(--surface-transparent-secondary-active);", ":var(--surface-transparent-secondary);", ":var(--text-primary);", ":var(--surface-transparent-secondary);", ":var(--text-primary);", ":0.72;", ":var(--text-accent);"], tokens.color, tokens.backgroundColor, tokens.caretColor, tokens.placeholderColor, tokens.labelColor, tokens.leftHelperColor, tokens.borderColor, tokens.borderColorHover, tokens.borderColorFocus, tokens.chipCloseIconColor, tokens.chipColor, tokens.chipBackground, tokens.chipColorHover, tokens.chipBackgroundHover, tokens.chipColorActive, tokens.chipBackgroundActive, tokens.chipBackgroundReadOnly, tokens.chipColorReadOnly, tokens.chipBackgroundReadOnlyHover, tokens.chipColorReadOnlyHover, tokens.chipOpacityReadonly, tokens.focusColor),
14
+ negative: /*#__PURE__*/css(["", ":var(--text-primary);", ":var(--surface-clear);", ":var(--text-accent);", ":var(--text-secondary);", ":var(--text-primary);", ":var(--text-negative);", ":var(--surface-negative);", ":var(--surface-negative);", ":var(--surface-accent);", ":var(--text-secondary);", ":var(--text-primary);", ":var(--surface-transparent-secondary);", ":var(--text-primary);", ":var(--surface-transparent-secondary-hover);", ":var(--text-primary);", ":var(--surface-transparent-secondary-active);", ":var(--surface-transparent-secondary);", ":var(--text-primary);", ":var(--surface-transparent-secondary);", ":var(--text-primary);", ":0.72;", ":var(--text-accent);"], tokens.color, tokens.backgroundColor, tokens.caretColor, tokens.placeholderColor, tokens.labelColor, tokens.leftHelperColor, tokens.borderColor, tokens.borderColorHover, tokens.borderColorFocus, tokens.chipCloseIconColor, tokens.chipColor, tokens.chipBackground, tokens.chipColorHover, tokens.chipBackgroundHover, tokens.chipColorActive, tokens.chipBackgroundActive, tokens.chipBackgroundReadOnly, tokens.chipColorReadOnly, tokens.chipBackgroundReadOnlyHover, tokens.chipColorReadOnlyHover, tokens.chipOpacityReadonly, tokens.focusColor)
15
+ },
16
+ size: {
17
+ l: /*#__PURE__*/css(["", ":3.5rem;", ":1.0625rem 1.125rem 1.0625rem 1.125rem;", ":0.375rem;", ":0.875rem;", ":0.0625rem;", ":-0.0625rem 0.5rem -0.0625rem -0.125rem;", ":-0.0625rem -0.125rem -0.0625rem 0.75rem;", ":var(--plasma-typo-body-l-font-family);", ":var(--plasma-typo-body-l-font-size);", ":var(--plasma-typo-body-l-font-style);", ":var(--plasma-typo-body-l-font-weight);", ":var(--plasma-typo-body-l-letter-spacing);", ":var(--plasma-typo-body-l-line-height);", ":0.75rem;", ":var(--plasma-typo-body-l-font-family);", ":var(--plasma-typo-body-l-font-size);", ":var(--plasma-typo-body-l-font-style);", ":var(--plasma-typo-body-l-font-weight);", ":var(--plasma-typo-body-l-letter-spacing);", ":var(--plasma-typo-body-l-line-height);", ":0.25rem;", ":var(--plasma-typo-body-xs-font-family);", ":var(--plasma-typo-body-xs-font-size);", ":var(--plasma-typo-body-xs-font-style);", ":var(--plasma-typo-body-xs-font-weight);", ":var(--plasma-typo-body-xs-letter-spacing);", ":var(--plasma-typo-body-xs-line-height);", ":0.5625rem 0 0.125rem 0;", ":1.5625rem 0 0.5625rem 0;", ":0.25rem;", ":0.5rem;", ":auto;", ":2.75rem;", ":0.75rem;", ":1rem;", ":0.625rem;", ":0rem;", ":1.5rem;", ":var(--plasma-typo-body-l-font-family);", ":var(--plasma-typo-body-l-font-size);", ":var(--plasma-typo-body-l-font-style);", ":var(--plasma-typo-body-l-font-weight);", ":var(--plasma-typo-body-l-letter-spacing);", ":var(--plasma-typo-body-l-line-height);"], tokens.height, tokens.padding, tokens.paddingWithChips, tokens.borderRadius, tokens.borderWidth, tokens.leftContentMargin, tokens.rightContentMargin, tokens.fontFamily, tokens.fontSize, tokens.fontStyle, tokens.fontWeight, tokens.letterSpacing, tokens.lineHeight, tokens.labelOffset, tokens.labelFontFamily, tokens.labelFontSize, tokens.labelFontStyle, tokens.labelFontWeight, tokens.labelLetterSpacing, tokens.labelLineHeight, tokens.leftHelperOffset, tokens.leftHelperFontFamily, tokens.leftHelperFontSize, tokens.leftHelperFontStyle, tokens.leftHelperFontWeight, tokens.leftHelperLetterSpacing, tokens.leftHelperLineHeight, tokens.labelInnerPadding, tokens.contentLabelInnerPadding, tokens.chipGap, tokens.chipBorderRadius, tokens.chipWidth, tokens.chipHeight, tokens.chipPaddingRight, tokens.chipPaddingLeft, tokens.chipClearContentMarginLeft, tokens.chipClearContentMarginRight, tokens.chipCloseIconSize, tokens.chipFontFamily, tokens.chipFontSize, tokens.chipFontStyle, tokens.chipFontWeight, tokens.chipLetterSpacing, tokens.chipLineHeight),
18
+ m: /*#__PURE__*/css(["", ":3rem;", ":0.875rem 1rem 0.875rem 1rem;", ":0.375rem;", ":0.75rem;", ":0.0625rem;", ":-0.125rem 0.375rem -0.125rem -0.125rem;", ":-0.125rem -0.125rem -0.125rem 0.75rem;", ":var(--plasma-typo-body-m-font-family);", ":var(--plasma-typo-body-m-font-size);", ":var(--plasma-typo-body-m-font-style);", ":var(--plasma-typo-body-m-font-weight);", ":var(--plasma-typo-body-m-letter-spacing);", ":var(--plasma-typo-body-m-line-height);", ":0.625rem;", ":var(--plasma-typo-body-m-font-family);", ":var(--plasma-typo-body-m-font-size);", ":var(--plasma-typo-body-m-font-style);", ":var(--plasma-typo-body-m-font-weight);", ":var(--plasma-typo-body-m-letter-spacing);", ":var(--plasma-typo-body-m-line-height);", ":0.25rem;", ":var(--plasma-typo-body-xs-font-family);", ":var(--plasma-typo-body-xs-font-size);", ":var(--plasma-typo-body-xs-font-style);", ":var(--plasma-typo-body-xs-font-weight);", ":var(--plasma-typo-body-xs-letter-spacing);", ":var(--plasma-typo-body-xs-line-height);", ":0.375rem 0 0.125rem 0;", ":1.375rem 0 0.375rem 0;", ":0.25rem;", ":0.375rem;", ":auto;", ":2.25rem;", ":0.625rem;", ":0.875rem;", ":0.5rem;", ":0rem;", ":1.25rem;", ":var(--plasma-typo-body-m-font-family);", ":var(--plasma-typo-body-m-font-size);", ":var(--plasma-typo-body-m-font-style);", ":var(--plasma-typo-body-m-font-weight);", ":var(--plasma-typo-body-m-letter-spacing);", ":var(--plasma-typo-body-m-line-height);"], tokens.height, tokens.padding, tokens.paddingWithChips, tokens.borderRadius, tokens.borderWidth, tokens.leftContentMargin, tokens.rightContentMargin, tokens.fontFamily, tokens.fontSize, tokens.fontStyle, tokens.fontWeight, tokens.letterSpacing, tokens.lineHeight, tokens.labelOffset, tokens.labelFontFamily, tokens.labelFontSize, tokens.labelFontStyle, tokens.labelFontWeight, tokens.labelLetterSpacing, tokens.labelLineHeight, tokens.leftHelperOffset, tokens.leftHelperFontFamily, tokens.leftHelperFontSize, tokens.leftHelperFontStyle, tokens.leftHelperFontWeight, tokens.leftHelperLetterSpacing, tokens.leftHelperLineHeight, tokens.labelInnerPadding, tokens.contentLabelInnerPadding, tokens.chipGap, tokens.chipBorderRadius, tokens.chipWidth, tokens.chipHeight, tokens.chipPaddingRight, tokens.chipPaddingLeft, tokens.chipClearContentMarginLeft, tokens.chipClearContentMarginRight, tokens.chipCloseIconSize, tokens.chipFontFamily, tokens.chipFontSize, tokens.chipFontStyle, tokens.chipFontWeight, tokens.chipLetterSpacing, tokens.chipLineHeight),
19
+ s: /*#__PURE__*/css(["", ":2.5rem;", ":0.6875rem 0.875rem 0.6875rem 0.875rem;", ":0.375rem;", ":0.625rem;", ":0.0625rem;", ":-0.1875rem 0.25rem -0.1875rem -0.125rem;", ":-0.1875rem -0.125rem -0.1875rem 0.75rem;", ":var(--plasma-typo-body-s-font-family);", ":var(--plasma-typo-body-s-font-size);", ":var(--plasma-typo-body-s-font-style);", ":var(--plasma-typo-body-s-font-weight);", ":var(--plasma-typo-body-s-letter-spacing);", ":var(--plasma-typo-body-s-line-height);", ":0.5rem;", ":var(--plasma-typo-body-s-font-family);", ":var(--plasma-typo-body-s-font-size);", ":var(--plasma-typo-body-s-font-style);", ":var(--plasma-typo-body-s-font-weight);", ":var(--plasma-typo-body-s-letter-spacing);", ":var(--plasma-typo-body-s-line-height);", ":0.25rem;", ":var(--plasma-typo-body-xs-font-family);", ":var(--plasma-typo-body-xs-font-size);", ":var(--plasma-typo-body-xs-font-style);", ":var(--plasma-typo-body-xs-font-weight);", ":var(--plasma-typo-body-xs-letter-spacing);", ":var(--plasma-typo-body-xs-line-height);", ":0.3125rem 0 0 0;", ":1.0625rem 0 0.3125rem 0;", ":0.25rem;", ":0.25rem;", ":auto;", ":1.75rem;", ":0.5rem;", ":0.75rem;", ":0.375rem;", ":0rem;", ":1rem;", ":var(--plasma-typo-body-s-font-family);", ":var(--plasma-typo-body-s-font-size);", ":var(--plasma-typo-body-s-font-style);", ":var(--plasma-typo-body-s-font-weight);", ":var(--plasma-typo-body-s-letter-spacing);", ":var(--plasma-typo-body-s-line-height);"], tokens.height, tokens.padding, tokens.paddingWithChips, tokens.borderRadius, tokens.borderWidth, tokens.leftContentMargin, tokens.rightContentMargin, tokens.fontFamily, tokens.fontSize, tokens.fontStyle, tokens.fontWeight, tokens.letterSpacing, tokens.lineHeight, tokens.labelOffset, tokens.labelFontFamily, tokens.labelFontSize, tokens.labelFontStyle, tokens.labelFontWeight, tokens.labelLetterSpacing, tokens.labelLineHeight, tokens.leftHelperOffset, tokens.leftHelperFontFamily, tokens.leftHelperFontSize, tokens.leftHelperFontStyle, tokens.leftHelperFontWeight, tokens.leftHelperLetterSpacing, tokens.leftHelperLineHeight, tokens.labelInnerPadding, tokens.contentLabelInnerPadding, tokens.chipGap, tokens.chipBorderRadius, tokens.chipWidth, tokens.chipHeight, tokens.chipPaddingRight, tokens.chipPaddingLeft, tokens.chipClearContentMarginLeft, tokens.chipClearContentMarginRight, tokens.chipCloseIconSize, tokens.chipFontFamily, tokens.chipFontSize, tokens.chipFontStyle, tokens.chipFontWeight, tokens.chipLetterSpacing, tokens.chipLineHeight),
20
+ xs: /*#__PURE__*/css(["", ":2rem;", ":0.5625rem 0.625rem 0.5625rem 0.625rem;", ":0.375rem;", ":0.5rem;", ":0.0625rem;", ":-0.0625rem 0.25rem -0.0625rem -0.125rem;", ":-0.0625rem -0.125rem -0.0625rem 0.75rem;", ":var(--plasma-typo-body-xs-font-family);", ":var(--plasma-typo-body-xs-font-size);", ":var(--plasma-typo-body-xs-font-style);", ":var(--plasma-typo-body-xs-font-weight);", ":var(--plasma-typo-body-xs-letter-spacing);", ":var(--plasma-typo-body-xs-line-height);", ":0.375rem;", ":var(--plasma-typo-body-xs-font-family);", ":var(--plasma-typo-body-xs-font-size);", ":var(--plasma-typo-body-xs-font-style);", ":var(--plasma-typo-body-xs-font-weight);", ":var(--plasma-typo-body-xs-letter-spacing);", ":var(--plasma-typo-body-xs-line-height);", ":0.25rem;", ":var(--plasma-typo-body-xs-font-family);", ":var(--plasma-typo-body-xs-font-size);", ":var(--plasma-typo-body-xs-font-style);", ":var(--plasma-typo-body-xs-font-weight);", ":var(--plasma-typo-body-xs-letter-spacing);", ":var(--plasma-typo-body-xs-line-height);", ":0.3125rem 0 0 0;", ":1.0625rem 0 0.3125rem 0;", ":0.25rem;", ":0.125rem;", ":auto;", ":1.25rem;", ":0.375rem;", ":0.625rem;", ":0.25rem;", ":0rem;", ":0.75rem;", ":var(--plasma-typo-body-xs-font-family);", ":var(--plasma-typo-body-xs-font-size);", ":var(--plasma-typo-body-xs-font-style);", ":var(--plasma-typo-body-xs-font-weight);", ":var(--plasma-typo-body-xs-letter-spacing);", ":var(--plasma-typo-body-xs-line-height);"], tokens.height, tokens.padding, tokens.paddingWithChips, tokens.borderRadius, tokens.borderWidth, tokens.leftContentMargin, tokens.rightContentMargin, tokens.fontFamily, tokens.fontSize, tokens.fontStyle, tokens.fontWeight, tokens.letterSpacing, tokens.lineHeight, tokens.labelOffset, tokens.labelFontFamily, tokens.labelFontSize, tokens.labelFontStyle, tokens.labelFontWeight, tokens.labelLetterSpacing, tokens.labelLineHeight, tokens.leftHelperOffset, tokens.leftHelperFontFamily, tokens.leftHelperFontSize, tokens.leftHelperFontStyle, tokens.leftHelperFontWeight, tokens.leftHelperLetterSpacing, tokens.leftHelperLineHeight, tokens.labelInnerPadding, tokens.contentLabelInnerPadding, tokens.chipGap, tokens.chipBorderRadius, tokens.chipWidth, tokens.chipHeight, tokens.chipPaddingRight, tokens.chipPaddingLeft, tokens.chipClearContentMarginLeft, tokens.chipClearContentMarginRight, tokens.chipCloseIconSize, tokens.chipFontFamily, tokens.chipFontSize, tokens.chipFontStyle, tokens.chipFontWeight, tokens.chipLetterSpacing, tokens.chipLineHeight)
21
+ },
22
+ labelPlacement: {
23
+ inner: [labelPlacement_inner, /*#__PURE__*/css(["&.", "{", ":var(--plasma-input-label-color,var(--plasma-input-placeholder-color,var(--plasma-colors-secondary)));", ":var(--plasma-typo-body-xs-font-family);", ":var(--plasma-typo-body-xs-font-size);", ":var(--plasma-typo-body-xs-font-style);", ":var(--plasma-typo-body-xs-font-weight);", ":var(--plasma-typo-body-xs-letter-spacing);", ":var(--plasma-typo-body-xs-line-height);}"], labelPlacement_inner, tokens.placeholderColor, tokens.labelInnerFontFamily, tokens.labelInnerFontSize, tokens.labelInnerFontStyle, tokens.labelInnerFontWeight, tokens.labelInnerLetterSpacing, tokens.labelInnerLineHeight)],
24
+ outer: [labelPlacement_outer, /*#__PURE__*/css(["&.", "{}"], labelPlacement_outer)]
25
+ },
26
+ disabled: {
27
+ "true": /*#__PURE__*/css(["", ":0.4;"], tokens.disabledOpacity)
28
+ },
29
+ // TODO заменить --surface-transparent-primary на корректный токен
30
+ readOnly: {
31
+ "true": /*#__PURE__*/css(["", ":var(--text-primary);", ":var(--surface-clear);", ":var(--surface-transparent-tertiary);", ":var(--text-secondary);", ":var(--text-secondary);", ":var(--text-secondary);"], tokens.colorReadOnly, tokens.backgroundColorReadOnly, tokens.borderColorReadOnly, tokens.placeholderColorReadOnly, tokens.leftHelperColorReadOnly, tokens.labelColorReadOnly)
32
+ }
33
+ }
34
+ };
@@ -0,0 +1,5 @@
1
+ import { component, mergeConfig } from '../../../../engines';
2
+ import { textFieldConfig } from '../../../../components/TextField';
3
+ import { config } from './TextField.config';
4
+ var mergedConfig = /*#__PURE__*/mergeConfig(textFieldConfig, config);
5
+ export var TextField = /*#__PURE__*/component(mergedConfig);
@@ -0,0 +1,133 @@
1
+ import React, { ComponentProps, useState } from 'react';
2
+ import type { StoryObj, Meta } from '@storybook/react';
3
+ import { action } from '@storybook/addon-actions';
4
+ import { IconPlaceholder } from '@salutejs/plasma-sb-utils';
5
+
6
+ import { WithTheme } from '../../../_helpers';
7
+
8
+ import { TextField } from './TextField';
9
+
10
+ const onChange = action('onChange');
11
+ const onFocus = action('onFocus');
12
+ const onBlur = action('onBlur');
13
+ const onSearch = action('onSearch');
14
+
15
+ const sizes = ['l', 'm', 's', 'xs'];
16
+ const views = ['default', 'positive', 'warning', 'negative'];
17
+ const enumerationTypes = ['plain', 'chip'];
18
+ const labelPlacements = ['outer', 'inner'];
19
+
20
+ const meta: Meta<typeof TextField> = {
21
+ title: 'plasma_web/TextField',
22
+ component: TextField,
23
+ decorators: [WithTheme],
24
+ argTypes: {
25
+ view: {
26
+ options: views,
27
+ control: {
28
+ type: 'select',
29
+ },
30
+ },
31
+ maxLength: {
32
+ control: {
33
+ type: 'number',
34
+ },
35
+ },
36
+ labelPlacement: {
37
+ options: labelPlacements,
38
+ control: {
39
+ type: 'inline-radio',
40
+ },
41
+ },
42
+ enumerationType: {
43
+ options: enumerationTypes,
44
+ control: {
45
+ type: 'select',
46
+ },
47
+ },
48
+ size: {
49
+ options: sizes,
50
+ control: {
51
+ type: 'inline-radio',
52
+ },
53
+ },
54
+ },
55
+ };
56
+
57
+ export default meta;
58
+
59
+ type StoryPropsDefault = Omit<
60
+ ComponentProps<typeof TextField>,
61
+ | 'helperBlock'
62
+ | 'contentLeft'
63
+ | 'htmlSize'
64
+ | 'contentRight'
65
+ | 'type'
66
+ | 'name'
67
+ | 'onFocus'
68
+ | 'onBlur'
69
+ | 'onChange'
70
+ | 'value'
71
+ | 'checked'
72
+ | 'maxLength'
73
+ | 'minLength'
74
+ | 'required'
75
+ > & {
76
+ 'storybook:contentLeft': boolean;
77
+ 'storybook:contentRight': boolean;
78
+ };
79
+
80
+ const StoryDemo = ({
81
+ 'storybook:contentLeft': enableContentLeft,
82
+ 'storybook:contentRight': enableContentRight,
83
+ view,
84
+ ...rest
85
+ }: StoryPropsDefault) => {
86
+ const [text, setText] = useState('Значение поля');
87
+
88
+ const iconSize = rest.size === 'xs' ? 'xs' : 's';
89
+
90
+ return (
91
+ <TextField
92
+ {...rest}
93
+ value={text}
94
+ contentLeft={enableContentLeft ? <IconPlaceholder size={iconSize} /> : undefined}
95
+ contentRight={enableContentRight ? <IconPlaceholder size={iconSize} /> : undefined}
96
+ view={view}
97
+ onChange={(e) => {
98
+ setText(e.target.value);
99
+ onChange(e.target.value);
100
+ }}
101
+ onFocus={onFocus}
102
+ onBlur={onBlur}
103
+ onSearch={onSearch}
104
+ />
105
+ );
106
+ };
107
+
108
+ export const Default: StoryObj<StoryPropsDefault> = {
109
+ args: {
110
+ id: 'example-text-field',
111
+ size: 'l',
112
+ view: 'default',
113
+ label: 'Лейбл',
114
+ labelPlacement: 'outer',
115
+ placeholder: 'Заполните поле',
116
+ leftHelper: 'Подсказка к полю',
117
+ enumerationType: 'plain',
118
+ disabled: false,
119
+ readOnly: false,
120
+ 'storybook:contentLeft': true,
121
+ 'storybook:contentRight': true,
122
+ },
123
+ render: (args) => <StoryDemo {...args} />,
124
+ };
125
+
126
+ export const Chips: StoryObj<StoryPropsDefault> = {
127
+ args: {
128
+ ...Default.args,
129
+ enumerationType: 'chip',
130
+ values: ['1 value', '2 value', '3 value', '4 value'],
131
+ },
132
+ render: (args) => <StoryDemo {...args} />,
133
+ };
@@ -0,0 +1,37 @@
1
+ import { css } from 'styled-components';
2
+ import { textFieldTokens as tokens, textField_labelPlacement_inner as labelPlacement_inner, textField_labelPlacement_outer as labelPlacement_outer } from '../../../../components/TextField';
3
+ export var config = {
4
+ defaults: {
5
+ view: 'default',
6
+ size: 'l',
7
+ labelPlacement: 'outer'
8
+ },
9
+ variations: {
10
+ view: {
11
+ "default": /*#__PURE__*/css(["", ":var(--text-primary);", ":var(--surface-transparent-primary);", ":var(--surface-transparent-secondary);", ":var(--text-accent);", ":var(--text-secondary);", ":var(--text-primary);", ":var(--text-secondary);", ":var(--text-secondary);", ":var(--surface-clear);", ":var(--text-secondary);", ":var(--text-secondary);", ":var(--text-primary);", ":var(--surface-transparent-secondary);", ":var(--text-primary);", ":var(--surface-transparent-secondary-hover);", ":var(--text-primary);", ":var(--surface-transparent-secondary-active);", ":var(--surface-transparent-secondary);", ":var(--text-primary);", ":var(--surface-transparent-secondary);", ":var(--text-primary);", ":0.72;", ":var(--text-accent);"], tokens.color, tokens.backgroundColor, tokens.backgroundColorFocus, tokens.caretColor, tokens.placeholderColor, tokens.labelColor, tokens.leftHelperColor, tokens.colorReadOnly, tokens.backgroundColorReadOnly, tokens.placeholderColorReadOnly, tokens.chipCloseIconColor, tokens.chipColor, tokens.chipBackground, tokens.chipColorHover, tokens.chipBackgroundHover, tokens.chipColorActive, tokens.chipBackgroundActive, tokens.chipBackgroundReadOnly, tokens.chipColorReadOnly, tokens.chipBackgroundReadOnlyHover, tokens.chipColorReadOnlyHover, tokens.chipOpacityReadonly, tokens.focusColor),
12
+ // TODO заменить --surface-transparent-positive на корректный токен
13
+ positive: /*#__PURE__*/css(["", ":var(--plasma-colors-primary);", ":var(--surface-transparent-positive);", ":var(--surface-transparent-positive-active);", ":var(--text-accent);", ":var(--text-secondary);", ":var(--text-primary);", ":var(--text-positive);", ":var(--text-secondary);", ":var(--surface-clear);", ":var(--text-secondary);", ":var(--text-secondary);", ":var(--text-primary);", ":var(--surface-transparent-secondary);", ":var(--text-primary);", ":var(--surface-transparent-secondary-hover);", ":var(--text-primary);", ":var(--surface-transparent-secondary-active);", ":var(--surface-transparent-secondary);", ":var(--text-primary);", ":var(--surface-transparent-secondary);", ":var(--text-primary);", ":0.72;", ":var(--text-accent);"], tokens.color, tokens.backgroundColor, tokens.backgroundColorFocus, tokens.caretColor, tokens.placeholderColor, tokens.labelColor, tokens.leftHelperColor, tokens.colorReadOnly, tokens.backgroundColorReadOnly, tokens.placeholderColorReadOnly, tokens.chipCloseIconColor, tokens.chipColor, tokens.chipBackground, tokens.chipColorHover, tokens.chipBackgroundHover, tokens.chipColorActive, tokens.chipBackgroundActive, tokens.chipBackgroundReadOnly, tokens.chipColorReadOnly, tokens.chipBackgroundReadOnlyHover, tokens.chipColorReadOnlyHover, tokens.chipOpacityReadonly, tokens.focusColor),
14
+ // // TODO заменить --surface-transparent-warning на корректный токен
15
+ warning: /*#__PURE__*/css(["", ":var(--plasma-colors-primary);", ":var(--surface-transparent-warning);", ":var(--surface-transparent-warning-active);", ":var(--text-accent);", ":var(--text-secondary);", ":var(--text-primary);", ":var(--text-warning);", ":var(--text-secondary);", ":var(--surface-clear);", ":var(--text-secondary);", ":var(--text-secondary);", ":var(--text-primary);", ":var(--surface-transparent-secondary);", ":var(--text-primary);", ":var(--surface-transparent-secondary-hover);", ":var(--text-primary);", ":var(--surface-transparent-secondary-active);", ":var(--surface-transparent-secondary);", ":var(--text-primary);", ":var(--surface-transparent-secondary);", ":var(--text-primary);", ":0.72;", ":var(--text-accent);"], tokens.color, tokens.backgroundColor, tokens.backgroundColorFocus, tokens.caretColor, tokens.placeholderColor, tokens.labelColor, tokens.leftHelperColor, tokens.colorReadOnly, tokens.backgroundColorReadOnly, tokens.placeholderColorReadOnly, tokens.chipCloseIconColor, tokens.chipColor, tokens.chipBackground, tokens.chipColorHover, tokens.chipBackgroundHover, tokens.chipColorActive, tokens.chipBackgroundActive, tokens.chipBackgroundReadOnly, tokens.chipColorReadOnly, tokens.chipBackgroundReadOnlyHover, tokens.chipColorReadOnlyHover, tokens.chipOpacityReadonly, tokens.focusColor),
16
+ // // TODO заменить --surface-transparent-negative на корректный токен
17
+ negative: /*#__PURE__*/css(["", ":var(--plasma-colors-primary);", ":var(--surface-transparent-negative);", ":var(--surface-transparent-negative-active);", ":var(--text-accent);", ":var(--text-secondary);", ":var(--text-primary);", ":var(--text-negative);", ":var(--text-secondary);", ":var(--surface-clear);", ":var(--text-secondary);", ":var(--text-secondary);", ":var(--text-primary);", ":var(--surface-transparent-secondary);", ":var(--text-primary);", ":var(--surface-transparent-secondary-hover);", ":var(--text-primary);", ":var(--surface-transparent-secondary-active);", ":var(--surface-transparent-secondary);", ":var(--text-primary);", ":var(--surface-transparent-secondary);", ":var(--text-primary);", ":0.72;", ":var(--text-accent);"], tokens.color, tokens.backgroundColor, tokens.backgroundColorFocus, tokens.caretColor, tokens.placeholderColor, tokens.labelColor, tokens.leftHelperColor, tokens.colorReadOnly, tokens.backgroundColorReadOnly, tokens.placeholderColorReadOnly, tokens.chipCloseIconColor, tokens.chipColor, tokens.chipBackground, tokens.chipColorHover, tokens.chipBackgroundHover, tokens.chipColorActive, tokens.chipBackgroundActive, tokens.chipBackgroundReadOnly, tokens.chipColorReadOnly, tokens.chipBackgroundReadOnlyHover, tokens.chipColorReadOnlyHover, tokens.chipOpacityReadonly, tokens.focusColor)
18
+ },
19
+ size: {
20
+ l: /*#__PURE__*/css(["", ":3.5rem;", ":1.0625rem 1.125rem 1.0625rem 1.125rem;", ":0.375rem;", ":0.875rem;", ":-0.0625rem 0.5rem -0.0625rem -0.125rem;", ":-0.0625rem -0.125rem -0.0625rem 0.75rem;", ":var(--plasma-typo-body-l-font-family);", ":var(--plasma-typo-body-l-font-size);", ":var(--plasma-typo-body-l-font-style);", ":var(--plasma-typo-body-l-font-weight);", ":var(--plasma-typo-body-l-letter-spacing);", ":var(--plasma-typo-body-l-line-height);", ":0.75rem;", ":var(--plasma-typo-body-l-font-family);", ":var(--plasma-typo-body-l-font-size);", ":var(--plasma-typo-body-l-font-style);", ":var(--plasma-typo-body-l-font-weight);", ":var(--plasma-typo-body-l-letter-spacing);", ":var(--plasma-typo-body-l-line-height);", ":0.25rem;", ":var(--plasma-typo-body-xs-font-family);", ":var(--plasma-typo-body-xs-font-size);", ":var(--plasma-typo-body-xs-font-style);", ":var(--plasma-typo-body-xs-font-weight);", ":var(--plasma-typo-body-xs-letter-spacing);", ":var(--plasma-typo-body-xs-line-height);", ":0.5625rem 0 0.125rem 0;", ":1.5625rem 0 0.5625rem 0;", ":0.25rem;", ":0.5rem;", ":auto;", ":2.75rem;", ":0.75rem;", ":1rem;", ":0.625rem;", ":0rem;", ":1.5rem;", ":var(--plasma-typo-body-l-font-family);", ":var(--plasma-typo-body-l-font-size);", ":var(--plasma-typo-body-l-font-style);", ":var(--plasma-typo-body-l-font-weight);", ":var(--plasma-typo-body-l-letter-spacing);", ":var(--plasma-typo-body-l-line-height);"], tokens.height, tokens.padding, tokens.paddingWithChips, tokens.borderRadius, tokens.leftContentMargin, tokens.rightContentMargin, tokens.fontFamily, tokens.fontSize, tokens.fontStyle, tokens.fontWeight, tokens.letterSpacing, tokens.lineHeight, tokens.labelOffset, tokens.labelFontFamily, tokens.labelFontSize, tokens.labelFontStyle, tokens.labelFontWeight, tokens.labelLetterSpacing, tokens.labelLineHeight, tokens.leftHelperOffset, tokens.leftHelperFontFamily, tokens.leftHelperFontSize, tokens.leftHelperFontStyle, tokens.leftHelperFontWeight, tokens.leftHelperLetterSpacing, tokens.leftHelperLineHeight, tokens.labelInnerPadding, tokens.contentLabelInnerPadding, tokens.chipGap, tokens.chipBorderRadius, tokens.chipWidth, tokens.chipHeight, tokens.chipPaddingRight, tokens.chipPaddingLeft, tokens.chipClearContentMarginLeft, tokens.chipClearContentMarginRight, tokens.chipCloseIconSize, tokens.chipFontFamily, tokens.chipFontSize, tokens.chipFontStyle, tokens.chipFontWeight, tokens.chipLetterSpacing, tokens.chipLineHeight),
21
+ m: /*#__PURE__*/css(["", ":3rem;", ":0.875rem 1rem 0.875rem 1rem;", ":0.375rem;", ":0.75rem;", ":-0.125rem 0.375rem -0.125rem -0.125rem;", ":-0.125rem -0.125rem -0.125rem 0.75rem;", ":var(--plasma-typo-body-m-font-family);", ":var(--plasma-typo-body-m-font-size);", ":var(--plasma-typo-body-m-font-style);", ":var(--plasma-typo-body-m-font-weight);", ":var(--plasma-typo-body-m-letter-spacing);", ":var(--plasma-typo-body-m-line-height);", ":0.625rem;", ":var(--plasma-typo-body-m-font-family);", ":var(--plasma-typo-body-m-font-size);", ":var(--plasma-typo-body-m-font-style);", ":var(--plasma-typo-body-m-font-weight);", ":var(--plasma-typo-body-m-letter-spacing);", ":var(--plasma-typo-body-m-line-height);", ":0.25rem;", ":var(--plasma-typo-body-xs-font-family);", ":var(--plasma-typo-body-xs-font-size);", ":var(--plasma-typo-body-xs-font-style);", ":var(--plasma-typo-body-xs-font-weight);", ":var(--plasma-typo-body-xs-letter-spacing);", ":var(--plasma-typo-body-xs-line-height);", ":0.375rem 0 0.125rem 0;", ":1.375rem 0 0.375rem 0;", ":0.25rem;", ":0.375rem;", ":auto;", ":2.25rem;", ":0.625rem;", ":0.875rem;", ":0.5rem;", ":0rem;", ":1.25rem;", ":var(--plasma-typo-body-m-font-family);", ":var(--plasma-typo-body-m-font-size);", ":var(--plasma-typo-body-m-font-style);", ":var(--plasma-typo-body-m-font-weight);", ":var(--plasma-typo-body-m-letter-spacing);", ":var(--plasma-typo-body-m-line-height);"], tokens.height, tokens.padding, tokens.paddingWithChips, tokens.borderRadius, tokens.leftContentMargin, tokens.rightContentMargin, tokens.fontFamily, tokens.fontSize, tokens.fontStyle, tokens.fontWeight, tokens.letterSpacing, tokens.lineHeight, tokens.labelOffset, tokens.labelFontFamily, tokens.labelFontSize, tokens.labelFontStyle, tokens.labelFontWeight, tokens.labelLetterSpacing, tokens.labelLineHeight, tokens.leftHelperOffset, tokens.leftHelperFontFamily, tokens.leftHelperFontSize, tokens.leftHelperFontStyle, tokens.leftHelperFontWeight, tokens.leftHelperLetterSpacing, tokens.leftHelperLineHeight, tokens.labelInnerPadding, tokens.contentLabelInnerPadding, tokens.chipGap, tokens.chipBorderRadius, tokens.chipWidth, tokens.chipHeight, tokens.chipPaddingRight, tokens.chipPaddingLeft, tokens.chipClearContentMarginLeft, tokens.chipClearContentMarginRight, tokens.chipCloseIconSize, tokens.chipFontFamily, tokens.chipFontSize, tokens.chipFontStyle, tokens.chipFontWeight, tokens.chipLetterSpacing, tokens.chipLineHeight),
22
+ s: /*#__PURE__*/css(["", ":2.5rem;", ":0.6875rem 0.875rem 0.6875rem 0.875rem;", ":0.375rem;", ":0.625rem;", ":-0.1875rem 0.25rem -0.1875rem -0.125rem;", ":-0.1875rem -0.125rem -0.1875rem 0.75rem;", ":var(--plasma-typo-body-s-font-family);", ":var(--plasma-typo-body-s-font-size);", ":var(--plasma-typo-body-s-font-style);", ":var(--plasma-typo-body-s-font-weight);", ":var(--plasma-typo-body-s-letter-spacing);", ":var(--plasma-typo-body-s-line-height);", ":0.5rem;", ":var(--plasma-typo-body-s-font-family);", ":var(--plasma-typo-body-s-font-size);", ":var(--plasma-typo-body-s-font-style);", ":var(--plasma-typo-body-s-font-weight);", ":var(--plasma-typo-body-s-letter-spacing);", ":var(--plasma-typo-body-s-line-height);", ":0.25rem;", ":var(--plasma-typo-body-xs-font-family);", ":var(--plasma-typo-body-xs-font-size);", ":var(--plasma-typo-body-xs-font-style);", ":var(--plasma-typo-body-xs-font-weight);", ":var(--plasma-typo-body-xs-letter-spacing);", ":var(--plasma-typo-body-xs-line-height);", ":0.3125rem 0 0 0;", ":1.0625rem 0 0.3125rem 0;", ":0.25rem;", ":0.25rem;", ":auto;", ":1.75rem;", ":0.5rem;", ":0.75rem;", ":0.375rem;", ":0rem;", ":1rem;", ":var(--plasma-typo-body-s-font-family);", ":var(--plasma-typo-body-s-font-size);", ":var(--plasma-typo-body-s-font-style);", ":var(--plasma-typo-body-s-font-weight);", ":var(--plasma-typo-body-s-letter-spacing);", ":var(--plasma-typo-body-s-line-height);"], tokens.height, tokens.padding, tokens.paddingWithChips, tokens.borderRadius, tokens.leftContentMargin, tokens.rightContentMargin, tokens.fontFamily, tokens.fontSize, tokens.fontStyle, tokens.fontWeight, tokens.letterSpacing, tokens.lineHeight, tokens.labelOffset, tokens.labelFontFamily, tokens.labelFontSize, tokens.labelFontStyle, tokens.labelFontWeight, tokens.labelLetterSpacing, tokens.labelLineHeight, tokens.leftHelperOffset, tokens.leftHelperFontFamily, tokens.leftHelperFontSize, tokens.leftHelperFontStyle, tokens.leftHelperFontWeight, tokens.leftHelperLetterSpacing, tokens.leftHelperLineHeight, tokens.labelInnerPadding, tokens.contentLabelInnerPadding, tokens.chipGap, tokens.chipBorderRadius, tokens.chipWidth, tokens.chipHeight, tokens.chipPaddingRight, tokens.chipPaddingLeft, tokens.chipClearContentMarginLeft, tokens.chipClearContentMarginRight, tokens.chipCloseIconSize, tokens.chipFontFamily, tokens.chipFontSize, tokens.chipFontStyle, tokens.chipFontWeight, tokens.chipLetterSpacing, tokens.chipLineHeight),
23
+ xs: /*#__PURE__*/css(["", ":2rem;", ":0.5625rem 0.625rem 0.5625rem 0.625rem;", ":0.375rem;", ":0.5rem;", ":-0.0625rem 0.25rem -0.0625rem -0.125rem;", ":-0.0625rem -0.125rem -0.0625rem 0.75rem;", ":var(--plasma-typo-body-xs-font-family);", ":var(--plasma-typo-body-xs-font-size);", ":var(--plasma-typo-body-xs-font-style);", ":var(--plasma-typo-body-xs-font-weight);", ":var(--plasma-typo-body-xs-letter-spacing);", ":var(--plasma-typo-body-xs-line-height);", ":0.375rem;", ":var(--plasma-typo-body-xs-font-family);", ":var(--plasma-typo-body-xs-font-size);", ":var(--plasma-typo-body-xs-font-style);", ":var(--plasma-typo-body-xs-font-weight);", ":var(--plasma-typo-body-xs-letter-spacing);", ":var(--plasma-typo-body-xs-line-height);", ":0.25rem;", ":var(--plasma-typo-body-xs-font-family);", ":var(--plasma-typo-body-xs-font-size);", ":var(--plasma-typo-body-xs-font-style);", ":var(--plasma-typo-body-xs-font-weight);", ":var(--plasma-typo-body-xs-letter-spacing);", ":var(--plasma-typo-body-xs-line-height);", ":0.3125rem 0 0 0;", ":1.0625rem 0 0.3125rem 0;", ":0.25rem;", ":0.125rem;", ":auto;", ":1.25rem;", ":0.375rem;", ":0.625rem;", ":0.25rem;", ":0rem;", ":0.75rem;", ":var(--plasma-typo-body-xs-font-family);", ":var(--plasma-typo-body-xs-font-size);", ":var(--plasma-typo-body-xs-font-style);", ":var(--plasma-typo-body-xs-font-weight);", ":var(--plasma-typo-body-xs-letter-spacing);", ":var(--plasma-typo-body-xs-line-height);"], tokens.height, tokens.padding, tokens.paddingWithChips, tokens.borderRadius, tokens.leftContentMargin, tokens.rightContentMargin, tokens.fontFamily, tokens.fontSize, tokens.fontStyle, tokens.fontWeight, tokens.letterSpacing, tokens.lineHeight, tokens.labelOffset, tokens.labelFontFamily, tokens.labelFontSize, tokens.labelFontStyle, tokens.labelFontWeight, tokens.labelLetterSpacing, tokens.labelLineHeight, tokens.leftHelperOffset, tokens.leftHelperFontFamily, tokens.leftHelperFontSize, tokens.leftHelperFontStyle, tokens.leftHelperFontWeight, tokens.leftHelperLetterSpacing, tokens.leftHelperLineHeight, tokens.labelInnerPadding, tokens.contentLabelInnerPadding, tokens.chipGap, tokens.chipBorderRadius, tokens.chipWidth, tokens.chipHeight, tokens.chipPaddingRight, tokens.chipPaddingLeft, tokens.chipClearContentMarginLeft, tokens.chipClearContentMarginRight, tokens.chipCloseIconSize, tokens.chipFontFamily, tokens.chipFontSize, tokens.chipFontStyle, tokens.chipFontWeight, tokens.chipLetterSpacing, tokens.chipLineHeight)
24
+ },
25
+ labelPlacement: {
26
+ inner: [labelPlacement_inner, /*#__PURE__*/css(["&.", "{", ":var(--plasma-input-label-color,var(--plasma-input-placeholder-color,var(--plasma-colors-secondary)));", ":var(--plasma-typo-body-xs-font-family);", ":var(--plasma-typo-body-xs-font-size);", ":var(--plasma-typo-body-xs-font-style);", ":var(--plasma-typo-body-xs-font-weight);", ":var(--plasma-typo-body-xs-letter-spacing);", ":var(--plasma-typo-body-xs-line-height);}"], labelPlacement_inner, tokens.placeholderColor, tokens.labelInnerFontFamily, tokens.labelInnerFontSize, tokens.labelInnerFontStyle, tokens.labelInnerFontWeight, tokens.labelInnerLetterSpacing, tokens.labelInnerLineHeight)],
27
+ outer: [labelPlacement_outer, /*#__PURE__*/css(["&.", "{}"], labelPlacement_outer)]
28
+ },
29
+ disabled: {
30
+ "true": /*#__PURE__*/css(["", ":0.4;"], tokens.disabledOpacity)
31
+ },
32
+ // TODO заменить --surface-transparent-primary на корректный токен
33
+ readOnly: {
34
+ "true": /*#__PURE__*/css(["", ":var(--text-secondary);", ":var(--surface-transparent-primary);", ":var(--text-secondary);", ":var(--text-secondary);", ":var(--text-secondary);"], tokens.colorReadOnly, tokens.backgroundColorReadOnly, tokens.placeholderColorReadOnly, tokens.leftHelperColorReadOnly, tokens.labelColorReadOnly)
35
+ }
36
+ }
37
+ };
@@ -0,0 +1,5 @@
1
+ import { component, mergeConfig } from '../../../../engines';
2
+ import { textFieldConfig } from '../../../../components/TextField';
3
+ import { config } from './TextField.config';
4
+ var mergedConfig = /*#__PURE__*/mergeConfig(textFieldConfig, config);
5
+ export var TextField = /*#__PURE__*/component(mergedConfig);