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

Sign up to get free protection for your applications and to get access to all the features.
Files changed (435) hide show
  1. package/cjs/components/Combobox/Combobox.css +10 -10
  2. package/cjs/components/Combobox/Combobox.styles.js +5 -5
  3. package/cjs/components/Combobox/Combobox.styles.js.map +1 -1
  4. package/cjs/components/Combobox/{Combobox.styles_dw6hnk.css → Combobox.styles_17ei5vn.css} +1 -1
  5. package/cjs/components/Combobox/ui/ComboboxDivider/ComboboxDivider.css +4 -4
  6. package/cjs/components/Combobox/ui/ComboboxFooter/ComboboxFooter.css +4 -4
  7. package/cjs/components/Combobox/ui/ComboboxGroup/ComboboxGroup.css +4 -4
  8. package/cjs/components/Combobox/ui/ComboboxHeader/ComboboxHeader.css +4 -4
  9. package/cjs/components/Combobox/ui/ComboboxItem/ComboboxItem.css +4 -4
  10. package/cjs/components/Dropdown/Dropdown.css +4 -4
  11. package/cjs/components/Dropdown/Dropdown.js +1 -0
  12. package/cjs/components/Dropdown/Dropdown.js.map +1 -1
  13. package/cjs/components/Pagination/Pagination.css +9 -9
  14. package/cjs/components/Pagination/ui/PaginationSelectPerPage/PaginationSelectPerPage.css +9 -9
  15. package/cjs/components/Popover/Popover.css +4 -4
  16. package/cjs/components/Popover/Popover.js +43 -33
  17. package/cjs/components/Popover/Popover.js.map +1 -1
  18. package/cjs/components/Popover/Popover.styles.js +1 -1
  19. package/cjs/components/Popover/Popover.styles.js.map +1 -1
  20. package/cjs/components/Popover/{Popover.styles_1ggb66y.css → Popover.styles_1rk9t6z.css} +1 -1
  21. package/cjs/components/Select/Select.css +9 -9
  22. package/cjs/components/Select/Select.styles.js +7 -7
  23. package/cjs/components/Select/Select.styles.js.map +1 -1
  24. package/{es/components/Select/Select.styles_1q3i6gw.css → cjs/components/Select/Select.styles_ls547o.css} +1 -1
  25. package/cjs/components/Select/ui/SelectItem/SelectItem.css +4 -4
  26. package/cjs/components/Select/ui/SelectTarget/SelectTarget.js +1 -2
  27. package/cjs/components/Select/ui/SelectTarget/SelectTarget.js.map +1 -1
  28. package/cjs/components/TextField/TextField.js +166 -40
  29. package/cjs/components/TextField/TextField.js.map +1 -1
  30. package/cjs/components/TextField/TextField.styles.js +27 -11
  31. package/cjs/components/TextField/TextField.styles.js.map +1 -1
  32. package/cjs/components/TextField/TextField.styles_1b1mddp.css +8 -0
  33. package/cjs/components/TextField/TextField.tokens.js +68 -20
  34. package/cjs/components/TextField/TextField.tokens.js.map +1 -1
  35. package/cjs/components/TextField/TextField_wctd2m.css +1 -0
  36. package/cjs/components/TextField/hooks/useKeyNavigation.js +132 -0
  37. package/cjs/components/TextField/hooks/useKeyNavigation.js.map +1 -0
  38. package/cjs/components/TextField/ui/TextFieldChip/TextFieldChip.css +19 -0
  39. package/cjs/components/TextField/ui/TextFieldChip/TextFieldChip.js +38 -0
  40. package/cjs/components/TextField/ui/TextFieldChip/TextFieldChip.js.map +1 -0
  41. package/cjs/components/TextField/ui/TextFieldChip/TextFieldChip.styles.js +26 -0
  42. package/cjs/components/TextField/ui/TextFieldChip/TextFieldChip.styles.js.map +1 -0
  43. package/cjs/components/TextField/ui/TextFieldChip/TextFieldChip.styles_1y8n7la.css +1 -0
  44. package/cjs/components/{Select/ui/SelectDivider/variations/_view → TextField/variations/_disabled}/base.js +2 -2
  45. package/cjs/components/TextField/variations/_disabled/base.js.map +1 -0
  46. package/cjs/components/TextField/variations/_disabled/base_1tnjoy9.css +1 -0
  47. package/cjs/components/TextField/{_label-placement → variations/_label-placement}/base.js +1 -1
  48. package/cjs/components/TextField/variations/_label-placement/base.js.map +1 -0
  49. package/cjs/components/TextField/{_label-placement → variations/_label-placement}/inner.js +2 -2
  50. package/cjs/components/TextField/variations/_label-placement/inner.js.map +1 -0
  51. package/cjs/components/TextField/variations/_label-placement/inner_gqlcj2.css +1 -0
  52. package/cjs/components/TextField/{_label-placement → variations/_label-placement}/outer.js +2 -2
  53. package/cjs/components/TextField/variations/_label-placement/outer.js.map +1 -0
  54. package/cjs/components/TextField/variations/_label-placement/outer_is41nj.css +1 -0
  55. package/cjs/components/{Select/ui/SelectFooter/variations/_size → TextField/variations/_read-only}/base.js +2 -2
  56. package/cjs/components/TextField/variations/_read-only/base.js.map +1 -0
  57. package/cjs/components/TextField/variations/_read-only/base_134hshp.css +1 -0
  58. package/cjs/components/{Select/ui/SelectFooter/variations/_view → TextField/variations/_size}/base.js +2 -2
  59. package/cjs/components/TextField/variations/_size/base.js.map +1 -0
  60. package/cjs/components/TextField/variations/_size/base_1khzr9t.css +1 -0
  61. package/cjs/components/{Select/ui/SelectDivider/variations/_size → TextField/variations/_view}/base.js +2 -2
  62. package/cjs/components/TextField/variations/_view/base.js.map +1 -0
  63. package/cjs/components/TextField/variations/_view/base_1qd77x6.css +1 -0
  64. package/cjs/index.css +49 -42
  65. package/cjs/index.js +6 -41
  66. package/cjs/index.js.map +1 -1
  67. package/cjs/utils/index.js +1 -13
  68. package/cjs/utils/index.js.map +1 -1
  69. package/cjs/utils/react.js +2 -12
  70. package/cjs/utils/react.js.map +1 -1
  71. package/es/components/Combobox/Combobox.css +10 -10
  72. package/es/components/Combobox/Combobox.styles.js +5 -5
  73. package/es/components/Combobox/Combobox.styles.js.map +1 -1
  74. package/es/components/Combobox/{Combobox.styles_dw6hnk.css → Combobox.styles_17ei5vn.css} +1 -1
  75. package/es/components/Combobox/ui/ComboboxDivider/ComboboxDivider.css +4 -4
  76. package/es/components/Combobox/ui/ComboboxFooter/ComboboxFooter.css +4 -4
  77. package/es/components/Combobox/ui/ComboboxGroup/ComboboxGroup.css +4 -4
  78. package/es/components/Combobox/ui/ComboboxHeader/ComboboxHeader.css +4 -4
  79. package/es/components/Combobox/ui/ComboboxItem/ComboboxItem.css +4 -4
  80. package/es/components/Dropdown/Dropdown.css +4 -4
  81. package/es/components/Dropdown/Dropdown.js +1 -0
  82. package/es/components/Dropdown/Dropdown.js.map +1 -1
  83. package/es/components/Pagination/Pagination.css +9 -9
  84. package/es/components/Pagination/ui/PaginationSelectPerPage/PaginationSelectPerPage.css +9 -9
  85. package/es/components/Popover/Popover.css +4 -4
  86. package/es/components/Popover/Popover.js +43 -33
  87. package/es/components/Popover/Popover.js.map +1 -1
  88. package/es/components/Popover/Popover.styles.js +1 -1
  89. package/es/components/Popover/Popover.styles.js.map +1 -1
  90. package/es/components/Popover/{Popover.styles_1ggb66y.css → Popover.styles_1rk9t6z.css} +1 -1
  91. package/es/components/Select/Select.css +9 -9
  92. package/es/components/Select/Select.styles.js +7 -7
  93. package/es/components/Select/Select.styles.js.map +1 -1
  94. package/{cjs/components/Select/Select.styles_1q3i6gw.css → es/components/Select/Select.styles_ls547o.css} +1 -1
  95. package/es/components/Select/ui/SelectItem/SelectItem.css +4 -4
  96. package/es/components/Select/ui/SelectTarget/SelectTarget.js +1 -2
  97. package/es/components/Select/ui/SelectTarget/SelectTarget.js.map +1 -1
  98. package/es/components/TextField/TextField.js +169 -44
  99. package/es/components/TextField/TextField.js.map +1 -1
  100. package/es/components/TextField/TextField.styles.js +25 -12
  101. package/es/components/TextField/TextField.styles.js.map +1 -1
  102. package/es/components/TextField/TextField.styles_1b1mddp.css +8 -0
  103. package/es/components/TextField/TextField.tokens.js +68 -21
  104. package/es/components/TextField/TextField.tokens.js.map +1 -1
  105. package/es/components/TextField/TextField_wctd2m.css +1 -0
  106. package/es/components/TextField/hooks/useKeyNavigation.js +127 -0
  107. package/es/components/TextField/hooks/useKeyNavigation.js.map +1 -0
  108. package/es/components/TextField/ui/TextFieldChip/TextFieldChip.css +19 -0
  109. package/es/components/TextField/ui/TextFieldChip/TextFieldChip.js +34 -0
  110. package/es/components/TextField/ui/TextFieldChip/TextFieldChip.js.map +1 -0
  111. package/es/components/TextField/ui/TextFieldChip/TextFieldChip.styles.js +22 -0
  112. package/es/components/TextField/ui/TextFieldChip/TextFieldChip.styles.js.map +1 -0
  113. package/es/components/TextField/ui/TextFieldChip/TextFieldChip.styles_1y8n7la.css +1 -0
  114. package/es/components/TextField/variations/_disabled/base.js +5 -0
  115. package/es/components/TextField/variations/_disabled/base.js.map +1 -0
  116. package/es/components/TextField/variations/_disabled/base_1tnjoy9.css +1 -0
  117. package/es/components/TextField/{_label-placement → variations/_label-placement}/base.js +1 -1
  118. package/es/components/TextField/variations/_label-placement/base.js.map +1 -0
  119. package/es/components/TextField/variations/_label-placement/inner.js +5 -0
  120. package/es/components/TextField/variations/_label-placement/inner.js.map +1 -0
  121. package/es/components/TextField/variations/_label-placement/inner_gqlcj2.css +1 -0
  122. package/es/components/TextField/variations/_label-placement/outer.js +5 -0
  123. package/es/components/TextField/variations/_label-placement/outer.js.map +1 -0
  124. package/es/components/TextField/variations/_label-placement/outer_is41nj.css +1 -0
  125. package/es/components/TextField/variations/_read-only/base.js +5 -0
  126. package/es/components/TextField/variations/_read-only/base.js.map +1 -0
  127. package/es/components/TextField/variations/_read-only/base_134hshp.css +1 -0
  128. package/es/components/TextField/variations/_size/base.js +5 -0
  129. package/es/components/TextField/variations/_size/base.js.map +1 -0
  130. package/es/components/TextField/variations/_size/base_1khzr9t.css +1 -0
  131. package/es/components/{Select/ui/SelectDivider/variations/_size → TextField/variations/_view}/base.js +2 -2
  132. package/es/components/TextField/variations/_view/base.js.map +1 -0
  133. package/es/components/TextField/variations/_view/base_1qd77x6.css +1 -0
  134. package/es/index.css +49 -42
  135. package/es/index.js +2 -15
  136. package/es/index.js.map +1 -1
  137. package/es/utils/index.js +2 -11
  138. package/es/utils/index.js.map +1 -1
  139. package/es/utils/react.js +2 -9
  140. package/es/utils/react.js.map +1 -1
  141. package/package.json +2 -2
  142. package/styled-components/cjs/components/Combobox/Combobox.styles.js +1 -1
  143. package/styled-components/cjs/components/Dropdown/Dropdown.js +1 -0
  144. package/styled-components/cjs/components/Popover/Popover.js +43 -33
  145. package/styled-components/cjs/components/Popover/Popover.styles.js +1 -1
  146. package/styled-components/cjs/components/Select/Select.styles.js +1 -1
  147. package/styled-components/cjs/components/Select/ui/SelectTarget/SelectTarget.js +1 -2
  148. package/styled-components/cjs/components/TextField/TextField.js +173 -43
  149. package/styled-components/cjs/components/TextField/TextField.styles.js +18 -10
  150. package/styled-components/cjs/components/TextField/TextField.template-doc.mdx +24 -0
  151. package/styled-components/cjs/components/TextField/TextField.tokens.js +68 -21
  152. package/styled-components/cjs/components/TextField/hooks/index.js +12 -0
  153. package/styled-components/cjs/components/TextField/hooks/useKeyNavigation.js +138 -0
  154. package/styled-components/cjs/components/TextField/index.js +2 -2
  155. package/styled-components/cjs/components/TextField/ui/TextFieldChip/TextFieldChip.js +39 -0
  156. package/styled-components/cjs/components/TextField/ui/TextFieldChip/TextFieldChip.styles.js +25 -0
  157. package/styled-components/cjs/components/TextField/ui/TextFieldChip/TextFieldChip.types.js +5 -0
  158. package/styled-components/cjs/components/TextField/ui/index.js +12 -0
  159. package/styled-components/cjs/components/TextField/variations/_disabled/base.js +10 -0
  160. package/styled-components/cjs/components/TextField/variations/_label-placement/inner.js +10 -0
  161. package/styled-components/cjs/components/TextField/{_label-placement → variations/_label-placement}/outer.js +3 -3
  162. package/styled-components/cjs/components/TextField/variations/_read-only/base.js +10 -0
  163. package/styled-components/cjs/components/TextField/variations/_read-only/tokens.json +1 -0
  164. package/styled-components/cjs/components/TextField/variations/_size/base.js +10 -0
  165. package/styled-components/cjs/components/TextField/variations/_view/base.js +10 -0
  166. package/styled-components/cjs/examples/plasma_b2c/components/Popover/Popover.stories.tsx +7 -0
  167. package/styled-components/cjs/examples/plasma_b2c/components/TextField/TextField.config.js +43 -0
  168. package/styled-components/cjs/examples/plasma_b2c/components/TextField/TextField.js +11 -0
  169. package/styled-components/cjs/examples/plasma_b2c/components/TextField/TextField.stories.tsx +181 -0
  170. package/styled-components/cjs/examples/plasma_web/components/TextField/TextField.config.js +40 -0
  171. package/styled-components/cjs/examples/plasma_web/components/TextField/TextField.js +11 -0
  172. package/styled-components/cjs/examples/plasma_web/components/TextField/TextField.stories.tsx +181 -0
  173. package/styled-components/cjs/examples/sds_engineer/components/TextField/TextField.config.js +43 -0
  174. package/styled-components/cjs/examples/sds_engineer/components/TextField/TextField.js +11 -0
  175. package/styled-components/cjs/examples/sds_engineer/components/TextField/TextField.stories.tsx +181 -0
  176. package/styled-components/cjs/index.js +0 -22
  177. package/styled-components/es/components/Combobox/Combobox.styles.js +1 -1
  178. package/styled-components/es/components/Dropdown/Dropdown.js +1 -0
  179. package/styled-components/es/components/Popover/Popover.js +43 -33
  180. package/styled-components/es/components/Popover/Popover.styles.js +1 -1
  181. package/styled-components/es/components/Select/Select.styles.js +1 -1
  182. package/styled-components/es/components/Select/ui/SelectTarget/SelectTarget.js +1 -2
  183. package/styled-components/es/components/TextField/TextField.js +177 -47
  184. package/styled-components/es/components/TextField/TextField.styles.js +17 -9
  185. package/styled-components/es/components/TextField/TextField.template-doc.mdx +24 -0
  186. package/styled-components/es/components/TextField/TextField.tokens.js +67 -20
  187. package/styled-components/es/components/TextField/hooks/index.js +1 -0
  188. package/styled-components/es/components/TextField/hooks/useKeyNavigation.js +132 -0
  189. package/styled-components/es/components/TextField/index.js +2 -2
  190. package/styled-components/es/components/TextField/ui/TextFieldChip/TextFieldChip.js +30 -0
  191. package/styled-components/es/components/TextField/ui/TextFieldChip/TextFieldChip.styles.js +19 -0
  192. package/styled-components/es/components/TextField/ui/TextFieldChip/TextFieldChip.types.js +1 -0
  193. package/styled-components/es/components/TextField/ui/index.js +1 -0
  194. package/styled-components/es/components/TextField/variations/_disabled/base.js +4 -0
  195. package/styled-components/es/components/TextField/variations/_label-placement/inner.js +4 -0
  196. package/styled-components/es/components/TextField/variations/_label-placement/outer.js +4 -0
  197. package/styled-components/es/components/TextField/variations/_read-only/base.js +4 -0
  198. package/styled-components/es/components/TextField/variations/_read-only/tokens.json +1 -0
  199. package/styled-components/es/components/TextField/variations/_size/base.js +4 -0
  200. package/styled-components/es/components/TextField/variations/_view/base.js +4 -0
  201. package/styled-components/es/examples/plasma_b2c/components/Popover/Popover.stories.tsx +7 -0
  202. package/styled-components/es/examples/plasma_b2c/components/TextField/TextField.config.js +37 -0
  203. package/styled-components/es/examples/plasma_b2c/components/TextField/TextField.js +5 -0
  204. package/styled-components/es/examples/plasma_b2c/components/TextField/TextField.stories.tsx +181 -0
  205. package/styled-components/es/examples/plasma_web/components/TextField/TextField.config.js +34 -0
  206. package/styled-components/es/examples/plasma_web/components/TextField/TextField.js +5 -0
  207. package/styled-components/es/examples/plasma_web/components/TextField/TextField.stories.tsx +181 -0
  208. package/styled-components/es/examples/sds_engineer/components/TextField/TextField.config.js +37 -0
  209. package/styled-components/es/examples/sds_engineer/components/TextField/TextField.js +5 -0
  210. package/styled-components/es/examples/sds_engineer/components/TextField/TextField.stories.tsx +181 -0
  211. package/styled-components/es/index.js +0 -2
  212. package/types/components/Combobox/Combobox.styles.d.ts +8 -2
  213. package/types/components/Combobox/Combobox.styles.d.ts.map +1 -1
  214. package/types/components/Dropdown/Dropdown.d.ts.map +1 -1
  215. package/types/components/Dropdown/Dropdown.styles.d.ts +7 -1
  216. package/types/components/Dropdown/Dropdown.styles.d.ts.map +1 -1
  217. package/types/components/Popover/Popover.d.ts +2 -2
  218. package/types/components/Popover/Popover.d.ts.map +1 -1
  219. package/types/components/Popover/Popover.styles.d.ts.map +1 -1
  220. package/types/components/Popover/Popover.types.d.ts +19 -12
  221. package/types/components/Popover/Popover.types.d.ts.map +1 -1
  222. package/types/components/Select/Select.styles.d.ts +8 -2
  223. package/types/components/Select/Select.styles.d.ts.map +1 -1
  224. package/types/components/Select/ui/SelectTarget/SelectTarget.d.ts.map +1 -1
  225. package/types/components/TextField/TextField.d.ts +8 -3
  226. package/types/components/TextField/TextField.d.ts.map +1 -1
  227. package/types/components/TextField/TextField.styles.d.ts +6 -3
  228. package/types/components/TextField/TextField.styles.d.ts.map +1 -1
  229. package/types/components/TextField/TextField.tokens.d.ts +57 -8
  230. package/types/components/TextField/TextField.tokens.d.ts.map +1 -1
  231. package/types/components/TextField/TextField.types.d.ts +71 -6
  232. package/types/components/TextField/TextField.types.d.ts.map +1 -1
  233. package/types/components/TextField/hooks/index.d.ts +2 -0
  234. package/types/components/TextField/hooks/index.d.ts.map +1 -0
  235. package/types/components/TextField/hooks/useKeyNavigation.d.ts +17 -0
  236. package/types/components/TextField/hooks/useKeyNavigation.d.ts.map +1 -0
  237. package/types/components/TextField/index.d.ts +3 -2
  238. package/types/components/TextField/index.d.ts.map +1 -1
  239. package/types/components/TextField/ui/TextFieldChip/TextFieldChip.d.ts +7 -0
  240. package/types/components/TextField/ui/TextFieldChip/TextFieldChip.d.ts.map +1 -0
  241. package/types/components/TextField/ui/TextFieldChip/TextFieldChip.styles.d.ts +3 -0
  242. package/types/components/TextField/ui/TextFieldChip/TextFieldChip.styles.d.ts.map +1 -0
  243. package/types/components/TextField/ui/TextFieldChip/TextFieldChip.types.d.ts +37 -0
  244. package/types/components/TextField/ui/TextFieldChip/TextFieldChip.types.d.ts.map +1 -0
  245. package/types/components/TextField/ui/index.d.ts +2 -0
  246. package/types/components/TextField/ui/index.d.ts.map +1 -0
  247. package/types/components/TextField/variations/_disabled/base.d.ts.map +1 -0
  248. package/types/components/TextField/variations/_label-placement/base.d.ts.map +1 -0
  249. package/types/components/TextField/variations/_label-placement/index.d.ts.map +1 -0
  250. package/types/components/TextField/variations/_label-placement/inner.d.ts.map +1 -0
  251. package/types/components/TextField/variations/_label-placement/outer.d.ts.map +1 -0
  252. package/types/components/TextField/variations/_read-only/base.d.ts.map +1 -0
  253. package/types/components/TextField/variations/_size/base.d.ts.map +1 -0
  254. package/types/components/TextField/variations/_view/base.d.ts +2 -0
  255. package/types/components/TextField/variations/_view/base.d.ts.map +1 -0
  256. package/types/examples/plasma_b2c/components/Popover/Popover.d.ts +7 -1
  257. package/types/examples/plasma_b2c/components/Popover/Popover.d.ts.map +1 -1
  258. package/types/examples/plasma_b2c/components/TextField/TextField.config.d.ts +32 -0
  259. package/types/examples/plasma_b2c/components/TextField/TextField.config.d.ts.map +1 -0
  260. package/types/examples/plasma_b2c/components/TextField/TextField.d.ts +60 -0
  261. package/types/examples/plasma_b2c/components/TextField/TextField.d.ts.map +1 -0
  262. package/types/examples/plasma_web/components/Popover/Popover.d.ts +7 -1
  263. package/types/examples/plasma_web/components/Popover/Popover.d.ts.map +1 -1
  264. package/types/examples/plasma_web/components/TextField/TextField.config.d.ts +32 -0
  265. package/types/examples/plasma_web/components/TextField/TextField.config.d.ts.map +1 -0
  266. package/types/examples/plasma_web/components/TextField/TextField.d.ts +60 -0
  267. package/types/examples/plasma_web/components/TextField/TextField.d.ts.map +1 -0
  268. package/types/examples/sds_engineer/components/Popover/Popover.d.ts +7 -1
  269. package/types/examples/sds_engineer/components/Popover/Popover.d.ts.map +1 -1
  270. package/types/examples/sds_engineer/components/TextField/TextField.config.d.ts +32 -0
  271. package/types/examples/sds_engineer/components/TextField/TextField.config.d.ts.map +1 -0
  272. package/types/examples/sds_engineer/components/TextField/TextField.d.ts +60 -0
  273. package/types/examples/sds_engineer/components/TextField/TextField.d.ts.map +1 -0
  274. package/types/index.d.ts +0 -2
  275. package/types/index.d.ts.map +1 -1
  276. package/cjs/components/Select/ui/SelectDivider/SelectDivider.css +0 -23
  277. package/cjs/components/Select/ui/SelectDivider/SelectDivider.js +0 -40
  278. package/cjs/components/Select/ui/SelectDivider/SelectDivider.js.map +0 -1
  279. package/cjs/components/Select/ui/SelectDivider/SelectDivider.styles.js +0 -12
  280. package/cjs/components/Select/ui/SelectDivider/SelectDivider.styles.js.map +0 -1
  281. package/cjs/components/Select/ui/SelectDivider/SelectDivider.styles_673hj6.css +0 -1
  282. package/cjs/components/Select/ui/SelectDivider/variations/_size/base.js.map +0 -1
  283. package/cjs/components/Select/ui/SelectDivider/variations/_view/base.js.map +0 -1
  284. package/cjs/components/Select/ui/SelectFooter/SelectFooter.css +0 -23
  285. package/cjs/components/Select/ui/SelectFooter/SelectFooter.js +0 -40
  286. package/cjs/components/Select/ui/SelectFooter/SelectFooter.js.map +0 -1
  287. package/cjs/components/Select/ui/SelectFooter/SelectFooter.styles.js +0 -12
  288. package/cjs/components/Select/ui/SelectFooter/SelectFooter.styles.js.map +0 -1
  289. package/cjs/components/Select/ui/SelectFooter/SelectFooter.styles_11hk6tt.css +0 -1
  290. package/cjs/components/Select/ui/SelectFooter/variations/_size/base.js.map +0 -1
  291. package/cjs/components/Select/ui/SelectFooter/variations/_size/base_x642ct.css +0 -1
  292. package/cjs/components/Select/ui/SelectFooter/variations/_view/base.js.map +0 -1
  293. package/cjs/components/Select/ui/SelectFooter/variations/_view/base_x642ct.css +0 -1
  294. package/cjs/components/Select/ui/SelectGroup/SelectGroup.css +0 -23
  295. package/cjs/components/Select/ui/SelectGroup/SelectGroup.js +0 -40
  296. package/cjs/components/Select/ui/SelectGroup/SelectGroup.js.map +0 -1
  297. package/cjs/components/Select/ui/SelectGroup/SelectGroup.styles.js +0 -12
  298. package/cjs/components/Select/ui/SelectGroup/SelectGroup.styles.js.map +0 -1
  299. package/cjs/components/Select/ui/SelectGroup/SelectGroup.styles_mktu7e.css +0 -1
  300. package/cjs/components/Select/ui/SelectGroup/variations/_size/base.js +0 -9
  301. package/cjs/components/Select/ui/SelectGroup/variations/_size/base.js.map +0 -1
  302. package/cjs/components/Select/ui/SelectGroup/variations/_size/base_x642ct.css +0 -1
  303. package/cjs/components/Select/ui/SelectGroup/variations/_view/base.js +0 -9
  304. package/cjs/components/Select/ui/SelectGroup/variations/_view/base.js.map +0 -1
  305. package/cjs/components/Select/ui/SelectGroup/variations/_view/base_x642ct.css +0 -1
  306. package/cjs/components/Select/ui/SelectHeader/SelectHeader.css +0 -23
  307. package/cjs/components/Select/ui/SelectHeader/SelectHeader.js +0 -40
  308. package/cjs/components/Select/ui/SelectHeader/SelectHeader.js.map +0 -1
  309. package/cjs/components/Select/ui/SelectHeader/SelectHeader.styles.js +0 -12
  310. package/cjs/components/Select/ui/SelectHeader/SelectHeader.styles.js.map +0 -1
  311. package/cjs/components/Select/ui/SelectHeader/SelectHeader.styles_24gqog.css +0 -1
  312. package/cjs/components/Select/ui/SelectHeader/variations/_size/base.js +0 -9
  313. package/cjs/components/Select/ui/SelectHeader/variations/_size/base.js.map +0 -1
  314. package/cjs/components/Select/ui/SelectHeader/variations/_size/base_x642ct.css +0 -1
  315. package/cjs/components/Select/ui/SelectHeader/variations/_view/base.js +0 -9
  316. package/cjs/components/Select/ui/SelectHeader/variations/_view/base.js.map +0 -1
  317. package/cjs/components/Select/ui/SelectHeader/variations/_view/base_x642ct.css +0 -1
  318. package/cjs/components/TextField/TextField.styles_2qw1n8.css +0 -5
  319. package/cjs/components/TextField/TextField_1lzb2r1.css +0 -1
  320. package/cjs/components/TextField/_disabled/base.js +0 -9
  321. package/cjs/components/TextField/_disabled/base.js.map +0 -1
  322. package/cjs/components/TextField/_disabled/base_so3w81.css +0 -1
  323. package/cjs/components/TextField/_label-placement/base.js.map +0 -1
  324. package/cjs/components/TextField/_label-placement/base_x642ct.css +0 -1
  325. package/cjs/components/TextField/_label-placement/inner.js.map +0 -1
  326. package/cjs/components/TextField/_label-placement/inner_1tyuicp.css +0 -1
  327. package/cjs/components/TextField/_label-placement/outer.js.map +0 -1
  328. package/cjs/components/TextField/_label-placement/outer_19ekaek.css +0 -1
  329. package/cjs/components/TextField/_size/base.js +0 -9
  330. package/cjs/components/TextField/_size/base.js.map +0 -1
  331. package/cjs/components/TextField/_size/base_b5smyu.css +0 -1
  332. package/cjs/components/TextField/_view/base.js +0 -9
  333. package/cjs/components/TextField/_view/base.js.map +0 -1
  334. package/cjs/components/TextField/_view/base_5bqzed.css +0 -1
  335. package/es/components/Select/ui/SelectDivider/SelectDivider.css +0 -23
  336. package/es/components/Select/ui/SelectDivider/SelectDivider.js +0 -35
  337. package/es/components/Select/ui/SelectDivider/SelectDivider.js.map +0 -1
  338. package/es/components/Select/ui/SelectDivider/SelectDivider.styles.js +0 -7
  339. package/es/components/Select/ui/SelectDivider/SelectDivider.styles.js.map +0 -1
  340. package/es/components/Select/ui/SelectDivider/SelectDivider.styles_673hj6.css +0 -1
  341. package/es/components/Select/ui/SelectDivider/variations/_size/base.js.map +0 -1
  342. package/es/components/Select/ui/SelectDivider/variations/_size/base_x642ct.css +0 -1
  343. package/es/components/Select/ui/SelectDivider/variations/_view/base.js +0 -5
  344. package/es/components/Select/ui/SelectDivider/variations/_view/base.js.map +0 -1
  345. package/es/components/Select/ui/SelectDivider/variations/_view/base_x642ct.css +0 -1
  346. package/es/components/Select/ui/SelectFooter/SelectFooter.css +0 -23
  347. package/es/components/Select/ui/SelectFooter/SelectFooter.js +0 -35
  348. package/es/components/Select/ui/SelectFooter/SelectFooter.js.map +0 -1
  349. package/es/components/Select/ui/SelectFooter/SelectFooter.styles.js +0 -7
  350. package/es/components/Select/ui/SelectFooter/SelectFooter.styles.js.map +0 -1
  351. package/es/components/Select/ui/SelectFooter/SelectFooter.styles_11hk6tt.css +0 -1
  352. package/es/components/Select/ui/SelectFooter/variations/_size/base.js +0 -5
  353. package/es/components/Select/ui/SelectFooter/variations/_size/base.js.map +0 -1
  354. package/es/components/Select/ui/SelectFooter/variations/_size/base_x642ct.css +0 -1
  355. package/es/components/Select/ui/SelectFooter/variations/_view/base.js +0 -5
  356. package/es/components/Select/ui/SelectFooter/variations/_view/base.js.map +0 -1
  357. package/es/components/Select/ui/SelectFooter/variations/_view/base_x642ct.css +0 -1
  358. package/es/components/Select/ui/SelectGroup/SelectGroup.css +0 -23
  359. package/es/components/Select/ui/SelectGroup/SelectGroup.js +0 -35
  360. package/es/components/Select/ui/SelectGroup/SelectGroup.js.map +0 -1
  361. package/es/components/Select/ui/SelectGroup/SelectGroup.styles.js +0 -7
  362. package/es/components/Select/ui/SelectGroup/SelectGroup.styles.js.map +0 -1
  363. package/es/components/Select/ui/SelectGroup/SelectGroup.styles_mktu7e.css +0 -1
  364. package/es/components/Select/ui/SelectGroup/variations/_size/base.js +0 -5
  365. package/es/components/Select/ui/SelectGroup/variations/_size/base.js.map +0 -1
  366. package/es/components/Select/ui/SelectGroup/variations/_size/base_x642ct.css +0 -1
  367. package/es/components/Select/ui/SelectGroup/variations/_view/base.js +0 -5
  368. package/es/components/Select/ui/SelectGroup/variations/_view/base.js.map +0 -1
  369. package/es/components/Select/ui/SelectGroup/variations/_view/base_x642ct.css +0 -1
  370. package/es/components/Select/ui/SelectHeader/SelectHeader.css +0 -23
  371. package/es/components/Select/ui/SelectHeader/SelectHeader.js +0 -35
  372. package/es/components/Select/ui/SelectHeader/SelectHeader.js.map +0 -1
  373. package/es/components/Select/ui/SelectHeader/SelectHeader.styles.js +0 -7
  374. package/es/components/Select/ui/SelectHeader/SelectHeader.styles.js.map +0 -1
  375. package/es/components/Select/ui/SelectHeader/SelectHeader.styles_24gqog.css +0 -1
  376. package/es/components/Select/ui/SelectHeader/variations/_size/base.js +0 -5
  377. package/es/components/Select/ui/SelectHeader/variations/_size/base.js.map +0 -1
  378. package/es/components/Select/ui/SelectHeader/variations/_size/base_x642ct.css +0 -1
  379. package/es/components/Select/ui/SelectHeader/variations/_view/base.js +0 -5
  380. package/es/components/Select/ui/SelectHeader/variations/_view/base.js.map +0 -1
  381. package/es/components/Select/ui/SelectHeader/variations/_view/base_x642ct.css +0 -1
  382. package/es/components/TextField/TextField.styles_2qw1n8.css +0 -5
  383. package/es/components/TextField/TextField_1lzb2r1.css +0 -1
  384. package/es/components/TextField/_disabled/base.js +0 -5
  385. package/es/components/TextField/_disabled/base.js.map +0 -1
  386. package/es/components/TextField/_disabled/base_so3w81.css +0 -1
  387. package/es/components/TextField/_label-placement/base.js.map +0 -1
  388. package/es/components/TextField/_label-placement/base_x642ct.css +0 -1
  389. package/es/components/TextField/_label-placement/inner.js +0 -5
  390. package/es/components/TextField/_label-placement/inner.js.map +0 -1
  391. package/es/components/TextField/_label-placement/inner_1tyuicp.css +0 -1
  392. package/es/components/TextField/_label-placement/outer.js +0 -5
  393. package/es/components/TextField/_label-placement/outer.js.map +0 -1
  394. package/es/components/TextField/_label-placement/outer_19ekaek.css +0 -1
  395. package/es/components/TextField/_size/base.js +0 -5
  396. package/es/components/TextField/_size/base.js.map +0 -1
  397. package/es/components/TextField/_size/base_b5smyu.css +0 -1
  398. package/es/components/TextField/_view/base.js +0 -5
  399. package/es/components/TextField/_view/base.js.map +0 -1
  400. package/es/components/TextField/_view/base_5bqzed.css +0 -1
  401. package/styled-components/cjs/components/TextField/_disabled/base.js +0 -9
  402. package/styled-components/cjs/components/TextField/_label-placement/inner.js +0 -10
  403. package/styled-components/cjs/components/TextField/_size/base.js +0 -10
  404. package/styled-components/cjs/components/TextField/_view/base.js +0 -10
  405. package/styled-components/es/components/TextField/_disabled/base.js +0 -3
  406. package/styled-components/es/components/TextField/_label-placement/inner.js +0 -4
  407. package/styled-components/es/components/TextField/_label-placement/outer.js +0 -4
  408. package/styled-components/es/components/TextField/_size/base.js +0 -4
  409. package/styled-components/es/components/TextField/_view/base.js +0 -4
  410. package/types/components/TextField/_disabled/base.d.ts.map +0 -1
  411. package/types/components/TextField/_label-placement/base.d.ts.map +0 -1
  412. package/types/components/TextField/_label-placement/index.d.ts.map +0 -1
  413. package/types/components/TextField/_label-placement/inner.d.ts.map +0 -1
  414. package/types/components/TextField/_label-placement/outer.d.ts.map +0 -1
  415. package/types/components/TextField/_size/base.d.ts.map +0 -1
  416. package/types/components/TextField/_view/base.d.ts.map +0 -1
  417. /package/cjs/components/{Select/ui/SelectDivider/variations/_size → TextField/variations/_label-placement}/base_x642ct.css +0 -0
  418. /package/{cjs/components/Select/ui/SelectDivider/variations/_view → es/components/TextField/variations/_label-placement}/base_x642ct.css +0 -0
  419. /package/styled-components/cjs/components/TextField/{_disabled → variations/_disabled}/tokens.json +0 -0
  420. /package/styled-components/cjs/components/TextField/{_label-placement → variations/_label-placement}/base.js +0 -0
  421. /package/styled-components/cjs/components/TextField/{_label-placement → variations/_label-placement}/index.js +0 -0
  422. /package/styled-components/cjs/components/TextField/{_size → variations/_size}/tokens.json +0 -0
  423. /package/styled-components/cjs/components/TextField/{_view → variations/_view}/tokens.json +0 -0
  424. /package/styled-components/es/components/TextField/{_disabled → variations/_disabled}/tokens.json +0 -0
  425. /package/styled-components/es/components/TextField/{_label-placement → variations/_label-placement}/base.js +0 -0
  426. /package/styled-components/es/components/TextField/{_label-placement → variations/_label-placement}/index.js +0 -0
  427. /package/styled-components/es/components/TextField/{_size → variations/_size}/tokens.json +0 -0
  428. /package/styled-components/es/components/TextField/{_view → variations/_view}/tokens.json +0 -0
  429. /package/types/components/TextField/{_disabled → variations/_disabled}/base.d.ts +0 -0
  430. /package/types/components/TextField/{_label-placement → variations/_label-placement}/base.d.ts +0 -0
  431. /package/types/components/TextField/{_label-placement → variations/_label-placement}/index.d.ts +0 -0
  432. /package/types/components/TextField/{_label-placement → variations/_label-placement}/inner.d.ts +0 -0
  433. /package/types/components/TextField/{_label-placement → variations/_label-placement}/outer.d.ts +0 -0
  434. /package/types/components/TextField/{_size → variations/_read-only}/base.d.ts +0 -0
  435. /package/types/components/TextField/{_view → variations/_size}/base.d.ts +0 -0
@@ -0,0 +1,181 @@
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
+ const onChipsChange = action('onChipsChange');
15
+
16
+ const sizes = ['l', 'm', 's', 'xs'];
17
+ const views = ['default', 'positive', 'warning', 'negative'];
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
+ size: {
43
+ options: sizes,
44
+ control: {
45
+ type: 'inline-radio',
46
+ },
47
+ },
48
+ },
49
+ };
50
+
51
+ export default meta;
52
+
53
+ type StoryPropsDefault = Omit<
54
+ ComponentProps<typeof TextField>,
55
+ | 'helperBlock'
56
+ | 'contentLeft'
57
+ | 'htmlSize'
58
+ | 'contentRight'
59
+ | 'type'
60
+ | 'name'
61
+ | 'onFocus'
62
+ | 'onBlur'
63
+ | 'onChange'
64
+ | 'value'
65
+ | 'checked'
66
+ | 'maxLength'
67
+ | 'minLength'
68
+ | 'required'
69
+ | 'enumerationType'
70
+ | 'chips'
71
+ | 'onChangeChips'
72
+ > & {
73
+ 'storybook:contentLeft': boolean;
74
+ 'storybook:contentRight': boolean;
75
+ };
76
+
77
+ const StoryDemo = ({
78
+ 'storybook:contentLeft': enableContentLeft,
79
+ 'storybook:contentRight': enableContentRight,
80
+ view,
81
+ ...rest
82
+ }: StoryPropsDefault) => {
83
+ const [text, setText] = useState('Значение поля');
84
+
85
+ const iconSize = rest.size === 'xs' ? 'xs' : 's';
86
+
87
+ return (
88
+ <TextField
89
+ {...rest}
90
+ enumerationType="plain"
91
+ value={text}
92
+ contentLeft={enableContentLeft ? <IconPlaceholder size={iconSize} /> : undefined}
93
+ contentRight={enableContentRight ? <IconPlaceholder size={iconSize} /> : undefined}
94
+ view={view}
95
+ onChange={(e) => {
96
+ setText(e.target.value);
97
+ onChange(e.target.value);
98
+ }}
99
+ onFocus={onFocus}
100
+ onBlur={onBlur}
101
+ onSearch={onSearch}
102
+ />
103
+ );
104
+ };
105
+
106
+ export const Default: StoryObj<StoryPropsDefault> = {
107
+ args: {
108
+ id: 'example-text-field',
109
+ size: 'l',
110
+ view: 'default',
111
+ label: 'Лейбл',
112
+ labelPlacement: 'outer',
113
+ placeholder: 'Заполните поле',
114
+ leftHelper: 'Подсказка к полю',
115
+ disabled: false,
116
+ readOnly: false,
117
+ 'storybook:contentLeft': true,
118
+ 'storybook:contentRight': true,
119
+ },
120
+ render: (args) => <StoryDemo {...args} />,
121
+ };
122
+
123
+ type StoryPropsChips = Omit<
124
+ ComponentProps<typeof TextField>,
125
+ | 'helperBlock'
126
+ | 'contentLeft'
127
+ | 'htmlSize'
128
+ | 'contentRight'
129
+ | 'type'
130
+ | 'name'
131
+ | 'onFocus'
132
+ | 'onBlur'
133
+ | 'onChange'
134
+ | 'onSearch'
135
+ | 'value'
136
+ | 'checked'
137
+ | 'maxLength'
138
+ | 'minLength'
139
+ | 'required'
140
+ | 'enumerationType'
141
+ > & {
142
+ 'storybook:contentLeft': boolean;
143
+ 'storybook:contentRight': boolean;
144
+ };
145
+
146
+ const StoryChips = ({
147
+ 'storybook:contentLeft': enableContentLeft,
148
+ 'storybook:contentRight': enableContentRight,
149
+ view,
150
+ ...rest
151
+ }: StoryPropsChips) => {
152
+ const [text, setText] = useState('Значение поля');
153
+
154
+ const iconSize = rest.size === 'xs' ? 'xs' : 's';
155
+
156
+ return (
157
+ <TextField
158
+ {...rest}
159
+ enumerationType="chip"
160
+ value={text}
161
+ contentLeft={enableContentLeft ? <IconPlaceholder size={iconSize} /> : undefined}
162
+ contentRight={enableContentRight ? <IconPlaceholder size={iconSize} /> : undefined}
163
+ view={view}
164
+ onChange={(e) => {
165
+ setText(e.target.value);
166
+ onChange(e.target.value);
167
+ }}
168
+ onFocus={onFocus}
169
+ onBlur={onBlur}
170
+ onChangeChips={onChipsChange}
171
+ />
172
+ );
173
+ };
174
+
175
+ export const Chips: StoryObj<StoryPropsChips> = {
176
+ args: {
177
+ ...Default.args,
178
+ chips: ['1 value', '2 value', '3 value', '4 value'],
179
+ },
180
+ render: (args) => <StoryChips {...args} />,
181
+ };
@@ -0,0 +1,43 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.config = void 0;
7
+ var _styledComponents = /*#__PURE__*/require("styled-components");
8
+ var _TextField = /*#__PURE__*/require("../../../../components/TextField");
9
+ var config = exports.config = {
10
+ defaults: {
11
+ view: 'default',
12
+ size: 'l',
13
+ labelPlacement: 'outer'
14
+ },
15
+ variations: {
16
+ view: {
17
+ "default": /*#__PURE__*/(0, _styledComponents.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);"], _TextField.textFieldTokens.color, _TextField.textFieldTokens.backgroundColor, _TextField.textFieldTokens.backgroundColorFocus, _TextField.textFieldTokens.caretColor, _TextField.textFieldTokens.placeholderColor, _TextField.textFieldTokens.labelColor, _TextField.textFieldTokens.leftHelperColor, _TextField.textFieldTokens.colorReadOnly, _TextField.textFieldTokens.backgroundColorReadOnly, _TextField.textFieldTokens.placeholderColorReadOnly, _TextField.textFieldTokens.chipCloseIconColor, _TextField.textFieldTokens.chipColor, _TextField.textFieldTokens.chipBackground, _TextField.textFieldTokens.chipColorHover, _TextField.textFieldTokens.chipBackgroundHover, _TextField.textFieldTokens.chipColorActive, _TextField.textFieldTokens.chipBackgroundActive, _TextField.textFieldTokens.chipBackgroundReadOnly, _TextField.textFieldTokens.chipColorReadOnly, _TextField.textFieldTokens.chipBackgroundReadOnlyHover, _TextField.textFieldTokens.chipColorReadOnlyHover, _TextField.textFieldTokens.chipOpacityReadonly, _TextField.textFieldTokens.focusColor),
18
+ // TODO заменить --surface-transparent-positive на корректный токен
19
+ positive: /*#__PURE__*/(0, _styledComponents.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);"], _TextField.textFieldTokens.color, _TextField.textFieldTokens.backgroundColor, _TextField.textFieldTokens.backgroundColorFocus, _TextField.textFieldTokens.caretColor, _TextField.textFieldTokens.placeholderColor, _TextField.textFieldTokens.labelColor, _TextField.textFieldTokens.leftHelperColor, _TextField.textFieldTokens.colorReadOnly, _TextField.textFieldTokens.backgroundColorReadOnly, _TextField.textFieldTokens.placeholderColorReadOnly, _TextField.textFieldTokens.chipCloseIconColor, _TextField.textFieldTokens.chipColor, _TextField.textFieldTokens.chipBackground, _TextField.textFieldTokens.chipColorHover, _TextField.textFieldTokens.chipBackgroundHover, _TextField.textFieldTokens.chipColorActive, _TextField.textFieldTokens.chipBackgroundActive, _TextField.textFieldTokens.chipBackgroundReadOnly, _TextField.textFieldTokens.chipColorReadOnly, _TextField.textFieldTokens.chipBackgroundReadOnlyHover, _TextField.textFieldTokens.chipColorReadOnlyHover, _TextField.textFieldTokens.chipOpacityReadonly, _TextField.textFieldTokens.focusColor),
20
+ // // TODO заменить --surface-transparent-warning на корректный токен
21
+ warning: /*#__PURE__*/(0, _styledComponents.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);"], _TextField.textFieldTokens.color, _TextField.textFieldTokens.backgroundColor, _TextField.textFieldTokens.backgroundColorFocus, _TextField.textFieldTokens.caretColor, _TextField.textFieldTokens.placeholderColor, _TextField.textFieldTokens.labelColor, _TextField.textFieldTokens.leftHelperColor, _TextField.textFieldTokens.colorReadOnly, _TextField.textFieldTokens.backgroundColorReadOnly, _TextField.textFieldTokens.placeholderColorReadOnly, _TextField.textFieldTokens.chipCloseIconColor, _TextField.textFieldTokens.chipColor, _TextField.textFieldTokens.chipBackground, _TextField.textFieldTokens.chipColorHover, _TextField.textFieldTokens.chipBackgroundHover, _TextField.textFieldTokens.chipColorActive, _TextField.textFieldTokens.chipBackgroundActive, _TextField.textFieldTokens.chipBackgroundReadOnly, _TextField.textFieldTokens.chipColorReadOnly, _TextField.textFieldTokens.chipBackgroundReadOnlyHover, _TextField.textFieldTokens.chipColorReadOnlyHover, _TextField.textFieldTokens.chipOpacityReadonly, _TextField.textFieldTokens.focusColor),
22
+ // // TODO заменить --surface-transparent-negative на корректный токен
23
+ negative: /*#__PURE__*/(0, _styledComponents.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);"], _TextField.textFieldTokens.color, _TextField.textFieldTokens.backgroundColor, _TextField.textFieldTokens.backgroundColorFocus, _TextField.textFieldTokens.caretColor, _TextField.textFieldTokens.placeholderColor, _TextField.textFieldTokens.labelColor, _TextField.textFieldTokens.leftHelperColor, _TextField.textFieldTokens.colorReadOnly, _TextField.textFieldTokens.backgroundColorReadOnly, _TextField.textFieldTokens.placeholderColorReadOnly, _TextField.textFieldTokens.chipCloseIconColor, _TextField.textFieldTokens.chipColor, _TextField.textFieldTokens.chipBackground, _TextField.textFieldTokens.chipColorHover, _TextField.textFieldTokens.chipBackgroundHover, _TextField.textFieldTokens.chipColorActive, _TextField.textFieldTokens.chipBackgroundActive, _TextField.textFieldTokens.chipBackgroundReadOnly, _TextField.textFieldTokens.chipColorReadOnly, _TextField.textFieldTokens.chipBackgroundReadOnlyHover, _TextField.textFieldTokens.chipColorReadOnlyHover, _TextField.textFieldTokens.chipOpacityReadonly, _TextField.textFieldTokens.focusColor)
24
+ },
25
+ size: {
26
+ l: /*#__PURE__*/(0, _styledComponents.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);"], _TextField.textFieldTokens.height, _TextField.textFieldTokens.padding, _TextField.textFieldTokens.paddingWithChips, _TextField.textFieldTokens.borderRadius, _TextField.textFieldTokens.leftContentMargin, _TextField.textFieldTokens.rightContentMargin, _TextField.textFieldTokens.fontFamily, _TextField.textFieldTokens.fontSize, _TextField.textFieldTokens.fontStyle, _TextField.textFieldTokens.fontWeight, _TextField.textFieldTokens.letterSpacing, _TextField.textFieldTokens.lineHeight, _TextField.textFieldTokens.labelOffset, _TextField.textFieldTokens.labelFontFamily, _TextField.textFieldTokens.labelFontSize, _TextField.textFieldTokens.labelFontStyle, _TextField.textFieldTokens.labelFontWeight, _TextField.textFieldTokens.labelLetterSpacing, _TextField.textFieldTokens.labelLineHeight, _TextField.textFieldTokens.leftHelperOffset, _TextField.textFieldTokens.leftHelperFontFamily, _TextField.textFieldTokens.leftHelperFontSize, _TextField.textFieldTokens.leftHelperFontStyle, _TextField.textFieldTokens.leftHelperFontWeight, _TextField.textFieldTokens.leftHelperLetterSpacing, _TextField.textFieldTokens.leftHelperLineHeight, _TextField.textFieldTokens.labelInnerPadding, _TextField.textFieldTokens.contentLabelInnerPadding, _TextField.textFieldTokens.chipGap, _TextField.textFieldTokens.chipBorderRadius, _TextField.textFieldTokens.chipWidth, _TextField.textFieldTokens.chipHeight, _TextField.textFieldTokens.chipPaddingRight, _TextField.textFieldTokens.chipPaddingLeft, _TextField.textFieldTokens.chipClearContentMarginLeft, _TextField.textFieldTokens.chipClearContentMarginRight, _TextField.textFieldTokens.chipCloseIconSize, _TextField.textFieldTokens.chipFontFamily, _TextField.textFieldTokens.chipFontSize, _TextField.textFieldTokens.chipFontStyle, _TextField.textFieldTokens.chipFontWeight, _TextField.textFieldTokens.chipLetterSpacing, _TextField.textFieldTokens.chipLineHeight),
27
+ m: /*#__PURE__*/(0, _styledComponents.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);"], _TextField.textFieldTokens.height, _TextField.textFieldTokens.padding, _TextField.textFieldTokens.paddingWithChips, _TextField.textFieldTokens.borderRadius, _TextField.textFieldTokens.leftContentMargin, _TextField.textFieldTokens.rightContentMargin, _TextField.textFieldTokens.fontFamily, _TextField.textFieldTokens.fontSize, _TextField.textFieldTokens.fontStyle, _TextField.textFieldTokens.fontWeight, _TextField.textFieldTokens.letterSpacing, _TextField.textFieldTokens.lineHeight, _TextField.textFieldTokens.labelOffset, _TextField.textFieldTokens.labelFontFamily, _TextField.textFieldTokens.labelFontSize, _TextField.textFieldTokens.labelFontStyle, _TextField.textFieldTokens.labelFontWeight, _TextField.textFieldTokens.labelLetterSpacing, _TextField.textFieldTokens.labelLineHeight, _TextField.textFieldTokens.leftHelperOffset, _TextField.textFieldTokens.leftHelperFontFamily, _TextField.textFieldTokens.leftHelperFontSize, _TextField.textFieldTokens.leftHelperFontStyle, _TextField.textFieldTokens.leftHelperFontWeight, _TextField.textFieldTokens.leftHelperLetterSpacing, _TextField.textFieldTokens.leftHelperLineHeight, _TextField.textFieldTokens.labelInnerPadding, _TextField.textFieldTokens.contentLabelInnerPadding, _TextField.textFieldTokens.chipGap, _TextField.textFieldTokens.chipBorderRadius, _TextField.textFieldTokens.chipWidth, _TextField.textFieldTokens.chipHeight, _TextField.textFieldTokens.chipPaddingRight, _TextField.textFieldTokens.chipPaddingLeft, _TextField.textFieldTokens.chipClearContentMarginLeft, _TextField.textFieldTokens.chipClearContentMarginRight, _TextField.textFieldTokens.chipCloseIconSize, _TextField.textFieldTokens.chipFontFamily, _TextField.textFieldTokens.chipFontSize, _TextField.textFieldTokens.chipFontStyle, _TextField.textFieldTokens.chipFontWeight, _TextField.textFieldTokens.chipLetterSpacing, _TextField.textFieldTokens.chipLineHeight),
28
+ s: /*#__PURE__*/(0, _styledComponents.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);"], _TextField.textFieldTokens.height, _TextField.textFieldTokens.padding, _TextField.textFieldTokens.paddingWithChips, _TextField.textFieldTokens.borderRadius, _TextField.textFieldTokens.leftContentMargin, _TextField.textFieldTokens.rightContentMargin, _TextField.textFieldTokens.fontFamily, _TextField.textFieldTokens.fontSize, _TextField.textFieldTokens.fontStyle, _TextField.textFieldTokens.fontWeight, _TextField.textFieldTokens.letterSpacing, _TextField.textFieldTokens.lineHeight, _TextField.textFieldTokens.labelOffset, _TextField.textFieldTokens.labelFontFamily, _TextField.textFieldTokens.labelFontSize, _TextField.textFieldTokens.labelFontStyle, _TextField.textFieldTokens.labelFontWeight, _TextField.textFieldTokens.labelLetterSpacing, _TextField.textFieldTokens.labelLineHeight, _TextField.textFieldTokens.leftHelperOffset, _TextField.textFieldTokens.leftHelperFontFamily, _TextField.textFieldTokens.leftHelperFontSize, _TextField.textFieldTokens.leftHelperFontStyle, _TextField.textFieldTokens.leftHelperFontWeight, _TextField.textFieldTokens.leftHelperLetterSpacing, _TextField.textFieldTokens.leftHelperLineHeight, _TextField.textFieldTokens.labelInnerPadding, _TextField.textFieldTokens.contentLabelInnerPadding, _TextField.textFieldTokens.chipGap, _TextField.textFieldTokens.chipBorderRadius, _TextField.textFieldTokens.chipWidth, _TextField.textFieldTokens.chipHeight, _TextField.textFieldTokens.chipPaddingRight, _TextField.textFieldTokens.chipPaddingLeft, _TextField.textFieldTokens.chipClearContentMarginLeft, _TextField.textFieldTokens.chipClearContentMarginRight, _TextField.textFieldTokens.chipCloseIconSize, _TextField.textFieldTokens.chipFontFamily, _TextField.textFieldTokens.chipFontSize, _TextField.textFieldTokens.chipFontStyle, _TextField.textFieldTokens.chipFontWeight, _TextField.textFieldTokens.chipLetterSpacing, _TextField.textFieldTokens.chipLineHeight),
29
+ xs: /*#__PURE__*/(0, _styledComponents.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);"], _TextField.textFieldTokens.height, _TextField.textFieldTokens.padding, _TextField.textFieldTokens.paddingWithChips, _TextField.textFieldTokens.borderRadius, _TextField.textFieldTokens.leftContentMargin, _TextField.textFieldTokens.rightContentMargin, _TextField.textFieldTokens.fontFamily, _TextField.textFieldTokens.fontSize, _TextField.textFieldTokens.fontStyle, _TextField.textFieldTokens.fontWeight, _TextField.textFieldTokens.letterSpacing, _TextField.textFieldTokens.lineHeight, _TextField.textFieldTokens.labelOffset, _TextField.textFieldTokens.labelFontFamily, _TextField.textFieldTokens.labelFontSize, _TextField.textFieldTokens.labelFontStyle, _TextField.textFieldTokens.labelFontWeight, _TextField.textFieldTokens.labelLetterSpacing, _TextField.textFieldTokens.labelLineHeight, _TextField.textFieldTokens.leftHelperOffset, _TextField.textFieldTokens.leftHelperFontFamily, _TextField.textFieldTokens.leftHelperFontSize, _TextField.textFieldTokens.leftHelperFontStyle, _TextField.textFieldTokens.leftHelperFontWeight, _TextField.textFieldTokens.leftHelperLetterSpacing, _TextField.textFieldTokens.leftHelperLineHeight, _TextField.textFieldTokens.labelInnerPadding, _TextField.textFieldTokens.contentLabelInnerPadding, _TextField.textFieldTokens.chipGap, _TextField.textFieldTokens.chipBorderRadius, _TextField.textFieldTokens.chipWidth, _TextField.textFieldTokens.chipHeight, _TextField.textFieldTokens.chipPaddingRight, _TextField.textFieldTokens.chipPaddingLeft, _TextField.textFieldTokens.chipClearContentMarginLeft, _TextField.textFieldTokens.chipClearContentMarginRight, _TextField.textFieldTokens.chipCloseIconSize, _TextField.textFieldTokens.chipFontFamily, _TextField.textFieldTokens.chipFontSize, _TextField.textFieldTokens.chipFontStyle, _TextField.textFieldTokens.chipFontWeight, _TextField.textFieldTokens.chipLetterSpacing, _TextField.textFieldTokens.chipLineHeight)
30
+ },
31
+ labelPlacement: {
32
+ inner: [_TextField.textField_labelPlacement_inner, /*#__PURE__*/(0, _styledComponents.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);}"], _TextField.textField_labelPlacement_inner, _TextField.textFieldTokens.placeholderColor, _TextField.textFieldTokens.labelInnerFontFamily, _TextField.textFieldTokens.labelInnerFontSize, _TextField.textFieldTokens.labelInnerFontStyle, _TextField.textFieldTokens.labelInnerFontWeight, _TextField.textFieldTokens.labelInnerLetterSpacing, _TextField.textFieldTokens.labelInnerLineHeight)],
33
+ outer: [_TextField.textField_labelPlacement_outer, /*#__PURE__*/(0, _styledComponents.css)(["&.", "{}"], _TextField.textField_labelPlacement_outer)]
34
+ },
35
+ disabled: {
36
+ "true": /*#__PURE__*/(0, _styledComponents.css)(["", ":0.4;"], _TextField.textFieldTokens.disabledOpacity)
37
+ },
38
+ // TODO заменить --surface-transparent-primary на корректный токен
39
+ readOnly: {
40
+ "true": /*#__PURE__*/(0, _styledComponents.css)(["", ":var(--text-secondary);", ":var(--surface-transparent-primary);", ":var(--text-secondary);", ":var(--text-secondary);", ":var(--text-secondary);"], _TextField.textFieldTokens.colorReadOnly, _TextField.textFieldTokens.backgroundColorReadOnly, _TextField.textFieldTokens.placeholderColorReadOnly, _TextField.textFieldTokens.leftHelperColorReadOnly, _TextField.textFieldTokens.labelColorReadOnly)
41
+ }
42
+ }
43
+ };
@@ -0,0 +1,11 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.TextField = void 0;
7
+ var _engines = /*#__PURE__*/require("../../../../engines");
8
+ var _TextField = /*#__PURE__*/require("../../../../components/TextField");
9
+ var _TextField2 = /*#__PURE__*/require("./TextField.config");
10
+ var mergedConfig = /*#__PURE__*/(0, _engines.mergeConfig)(_TextField.textFieldConfig, _TextField2.config);
11
+ var TextField = exports.TextField = /*#__PURE__*/(0, _engines.component)(mergedConfig);
@@ -0,0 +1,181 @@
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
+ const onChipsChange = action('onChipsChange');
15
+
16
+ const sizes = ['l', 'm', 's', 'xs'];
17
+ const views = ['default', 'positive', 'warning', 'negative'];
18
+ const labelPlacements = ['outer', 'inner'];
19
+
20
+ const meta: Meta<typeof TextField> = {
21
+ title: 'sds_engineer/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
+ size: {
43
+ options: sizes,
44
+ control: {
45
+ type: 'inline-radio',
46
+ },
47
+ },
48
+ },
49
+ };
50
+
51
+ export default meta;
52
+
53
+ type StoryPropsDefault = Omit<
54
+ ComponentProps<typeof TextField>,
55
+ | 'helperBlock'
56
+ | 'contentLeft'
57
+ | 'htmlSize'
58
+ | 'contentRight'
59
+ | 'type'
60
+ | 'name'
61
+ | 'onFocus'
62
+ | 'onBlur'
63
+ | 'onChange'
64
+ | 'value'
65
+ | 'checked'
66
+ | 'maxLength'
67
+ | 'minLength'
68
+ | 'required'
69
+ | 'enumerationType'
70
+ | 'chips'
71
+ | 'onChangeChips'
72
+ > & {
73
+ 'storybook:contentLeft': boolean;
74
+ 'storybook:contentRight': boolean;
75
+ };
76
+
77
+ const StoryDemo = ({
78
+ 'storybook:contentLeft': enableContentLeft,
79
+ 'storybook:contentRight': enableContentRight,
80
+ view,
81
+ ...rest
82
+ }: StoryPropsDefault) => {
83
+ const [text, setText] = useState('Значение поля');
84
+
85
+ const iconSize = rest.size === 'xs' ? 'xs' : 's';
86
+
87
+ return (
88
+ <TextField
89
+ {...rest}
90
+ enumerationType="plain"
91
+ value={text}
92
+ contentLeft={enableContentLeft ? <IconPlaceholder size={iconSize} /> : undefined}
93
+ contentRight={enableContentRight ? <IconPlaceholder size={iconSize} /> : undefined}
94
+ view={view}
95
+ onChange={(e) => {
96
+ setText(e.target.value);
97
+ onChange(e.target.value);
98
+ }}
99
+ onFocus={onFocus}
100
+ onBlur={onBlur}
101
+ onSearch={onSearch}
102
+ />
103
+ );
104
+ };
105
+
106
+ export const Default: StoryObj<StoryPropsDefault> = {
107
+ args: {
108
+ id: 'example-text-field',
109
+ size: 'l',
110
+ view: 'default',
111
+ label: 'Лейбл',
112
+ labelPlacement: 'outer',
113
+ placeholder: 'Заполните поле',
114
+ leftHelper: 'Подсказка к полю',
115
+ disabled: false,
116
+ readOnly: false,
117
+ 'storybook:contentLeft': true,
118
+ 'storybook:contentRight': true,
119
+ },
120
+ render: (args) => <StoryDemo {...args} />,
121
+ };
122
+
123
+ type StoryPropsChips = Omit<
124
+ ComponentProps<typeof TextField>,
125
+ | 'helperBlock'
126
+ | 'contentLeft'
127
+ | 'htmlSize'
128
+ | 'contentRight'
129
+ | 'type'
130
+ | 'name'
131
+ | 'onFocus'
132
+ | 'onBlur'
133
+ | 'onChange'
134
+ | 'onSearch'
135
+ | 'value'
136
+ | 'checked'
137
+ | 'maxLength'
138
+ | 'minLength'
139
+ | 'required'
140
+ | 'enumerationType'
141
+ > & {
142
+ 'storybook:contentLeft': boolean;
143
+ 'storybook:contentRight': boolean;
144
+ };
145
+
146
+ const StoryChips = ({
147
+ 'storybook:contentLeft': enableContentLeft,
148
+ 'storybook:contentRight': enableContentRight,
149
+ view,
150
+ ...rest
151
+ }: StoryPropsChips) => {
152
+ const [text, setText] = useState('Значение поля');
153
+
154
+ const iconSize = rest.size === 'xs' ? 'xs' : 's';
155
+
156
+ return (
157
+ <TextField
158
+ {...rest}
159
+ enumerationType="chip"
160
+ value={text}
161
+ contentLeft={enableContentLeft ? <IconPlaceholder size={iconSize} /> : undefined}
162
+ contentRight={enableContentRight ? <IconPlaceholder size={iconSize} /> : undefined}
163
+ view={view}
164
+ onChange={(e) => {
165
+ setText(e.target.value);
166
+ onChange(e.target.value);
167
+ }}
168
+ onFocus={onFocus}
169
+ onBlur={onBlur}
170
+ onChangeChips={onChipsChange}
171
+ />
172
+ );
173
+ };
174
+
175
+ export const Chips: StoryObj<StoryPropsChips> = {
176
+ args: {
177
+ ...Default.args,
178
+ chips: ['1 value', '2 value', '3 value', '4 value'],
179
+ },
180
+ render: (args) => <StoryChips {...args} />,
181
+ };
@@ -36,17 +36,6 @@ Object.keys(_hooks).forEach(function (key) {
36
36
  }
37
37
  });
38
38
  });
39
- var _utils = /*#__PURE__*/require("./utils");
40
- Object.keys(_utils).forEach(function (key) {
41
- if (key === "default" || key === "__esModule") return;
42
- if (key in exports && exports[key] === _utils[key]) return;
43
- Object.defineProperty(exports, key, {
44
- enumerable: true,
45
- get: function get() {
46
- return _utils[key];
47
- }
48
- });
49
- });
50
39
  var _Button = /*#__PURE__*/require("./components/Button");
51
40
  Object.keys(_Button).forEach(function (key) {
52
41
  if (key === "default" || key === "__esModule") return;
@@ -465,17 +454,6 @@ Object.keys(_Progress).forEach(function (key) {
465
454
  }
466
455
  });
467
456
  });
468
- var _Select = /*#__PURE__*/require("./components/Select");
469
- Object.keys(_Select).forEach(function (key) {
470
- if (key === "default" || key === "__esModule") return;
471
- if (key in exports && exports[key] === _Select[key]) return;
472
- Object.defineProperty(exports, key, {
473
- enumerable: true,
474
- get: function get() {
475
- return _Select[key];
476
- }
477
- });
478
- });
479
457
  var _Divider = /*#__PURE__*/require("./components/Divider");
480
458
  Object.keys(_Divider).forEach(function (key) {
481
459
  if (key === "default" || key === "__esModule") return;
@@ -4,7 +4,7 @@ import { popoverClasses, popoverConfig } from '../Popover';
4
4
  import { tokens } from './Combobox.tokens';
5
5
  export var StyledRoot = /*#__PURE__*/styled.div.withConfig({
6
6
  componentId: "plasma-new-hope__sc-gt7m6a-0"
7
- })(["width:100%;position:relative;& .", "{display:block;}"], popoverClasses.wrapper);
7
+ })(["width:100%;position:relative;"]);
8
8
  export var StyledCombobox = /*#__PURE__*/styled.div.withConfig({
9
9
  componentId: "plasma-new-hope__sc-gt7m6a-1"
10
10
  })(["box-sizing:border-box;background:var(", ");box-shadow:var(", ");border-radius:var(", ");width:var(", ");height:var(", ");padding:var(", ") var(", ") var(", ") var(", ");"], tokens.background, tokens.boxShadow, tokens.borderRadius, tokens.width, tokens.height, tokens.paddingTop, tokens.paddingRight, tokens.paddingBottom, tokens.paddingLeft);
@@ -62,6 +62,7 @@ export var dropdownRoot = function dropdownRoot(Root) {
62
62
  placement: getPlacements(placement),
63
63
  trigger: trigger,
64
64
  closeOnOverlayClick: closeOnOverlayClick,
65
+ closeOnBeyondTargetHover: false,
65
66
  closeOnEsc: closeOnEsc,
66
67
  isFocusTrapped: isFocusTrapped,
67
68
  frame: frame
@@ -1,5 +1,5 @@
1
1
  function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
2
- var _excluded = ["target", "children", "isOpen", "trigger", "hasArrow", "frame", "className", "placement", "offset", "zIndex", "isFocusTrapped", "closeOnEsc", "preventOverflow", "usePortal", "view", "onToggle", "closeOnOverlayClick"];
2
+ var _excluded = ["target", "children", "isOpen", "trigger", "hasArrow", "frame", "className", "placement", "offset", "zIndex", "isFocusTrapped", "closeOnEsc", "preventOverflow", "usePortal", "view", "onToggle"];
3
3
  function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
4
4
  function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
5
5
  function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
@@ -30,34 +30,41 @@ export var POPOVER_PORTAL_ID = 'plasma-popover-root';
30
30
  * и вызова по клику либо ховеру.
31
31
  */
32
32
  export var popoverRoot = function popoverRoot(Root) {
33
- return /*#__PURE__*/forwardRef(function (_ref, outerRootRef) {
33
+ return /*#__PURE__*/forwardRef(function (props, outerRootRef) {
34
34
  var _placement$;
35
- var target = _ref.target,
36
- children = _ref.children,
37
- isOpen = _ref.isOpen,
38
- _ref$trigger = _ref.trigger,
39
- trigger = _ref$trigger === void 0 ? 'click' : _ref$trigger,
40
- hasArrow = _ref.hasArrow,
41
- _ref$frame = _ref.frame,
42
- frame = _ref$frame === void 0 ? 'document' : _ref$frame,
43
- className = _ref.className,
44
- _ref$placement = _ref.placement,
45
- placement = _ref$placement === void 0 ? 'auto' : _ref$placement,
46
- _ref$offset = _ref.offset,
47
- offset = _ref$offset === void 0 ? [0, 0] : _ref$offset,
48
- zIndex = _ref.zIndex,
49
- _ref$isFocusTrapped = _ref.isFocusTrapped,
50
- isFocusTrapped = _ref$isFocusTrapped === void 0 ? true : _ref$isFocusTrapped,
51
- _ref$closeOnEsc = _ref.closeOnEsc,
52
- closeOnEsc = _ref$closeOnEsc === void 0 ? true : _ref$closeOnEsc,
53
- _ref$preventOverflow = _ref.preventOverflow,
54
- preventOverflow = _ref$preventOverflow === void 0 ? true : _ref$preventOverflow,
55
- _ref$usePortal = _ref.usePortal,
56
- usePortal = _ref$usePortal === void 0 ? false : _ref$usePortal,
57
- view = _ref.view,
58
- onToggle = _ref.onToggle,
59
- closeOnOverlayClick = _ref.closeOnOverlayClick,
60
- rest = _objectWithoutProperties(_ref, _excluded);
35
+ var target = props.target,
36
+ children = props.children,
37
+ isOpen = props.isOpen,
38
+ _props$trigger = props.trigger,
39
+ trigger = _props$trigger === void 0 ? 'click' : _props$trigger,
40
+ hasArrow = props.hasArrow,
41
+ _props$frame = props.frame,
42
+ frame = _props$frame === void 0 ? 'document' : _props$frame,
43
+ className = props.className,
44
+ _props$placement = props.placement,
45
+ placement = _props$placement === void 0 ? 'auto' : _props$placement,
46
+ _props$offset = props.offset,
47
+ offset = _props$offset === void 0 ? [0, 0] : _props$offset,
48
+ zIndex = props.zIndex,
49
+ _props$isFocusTrapped = props.isFocusTrapped,
50
+ isFocusTrapped = _props$isFocusTrapped === void 0 ? true : _props$isFocusTrapped,
51
+ _props$closeOnEsc = props.closeOnEsc,
52
+ closeOnEsc = _props$closeOnEsc === void 0 ? true : _props$closeOnEsc,
53
+ _props$preventOverflo = props.preventOverflow,
54
+ preventOverflow = _props$preventOverflo === void 0 ? true : _props$preventOverflo,
55
+ _props$usePortal = props.usePortal,
56
+ usePortal = _props$usePortal === void 0 ? false : _props$usePortal,
57
+ view = props.view,
58
+ onToggle = props.onToggle,
59
+ rest = _objectWithoutProperties(props, _excluded);
60
+ var closeOnOverlayClick = true;
61
+ var closeOnBeyondTargetHover = true;
62
+ if (props.trigger === 'click' && props.closeOnOverlayClick === false) {
63
+ closeOnOverlayClick = false;
64
+ }
65
+ if (props.trigger === 'hover' && props.closeOnBeyondTargetHover === false) {
66
+ closeOnBeyondTargetHover = false;
67
+ }
61
68
  var rootRef = useRef(null);
62
69
  var popoverRef = useRef(null);
63
70
  var handleRef = useForkRef(rootRef, outerRootRef);
@@ -157,7 +164,7 @@ export var popoverRoot = function popoverRoot(Root) {
157
164
  return function () {
158
165
  return document.removeEventListener('click', onDocumentClick);
159
166
  };
160
- }, [isOpen, onToggle]);
167
+ }, [closeOnOverlayClick, isOpen, onToggle]);
161
168
  useEffect(function () {
162
169
  window.addEventListener('keydown', onEscape);
163
170
  return function () {
@@ -204,19 +211,22 @@ export var popoverRoot = function popoverRoot(Root) {
204
211
  Promise.resolve().then(forceUpdate);
205
212
  }, [isOpen, children, forceUpdate]);
206
213
  return /*#__PURE__*/React.createElement(StyledWrapper, {
207
- className: classes.wrapper,
208
- onMouseEnter: onMouseEnter,
209
- onMouseLeave: onMouseLeave
214
+ className: classes.wrapper
210
215
  }, /*#__PURE__*/React.createElement(StyledRoot, {
211
216
  ref: handleRef,
212
217
  onClick: onClick,
218
+ onMouseEnter: onMouseEnter,
219
+ onMouseLeave: onMouseLeave,
213
220
  onFocus: onFocus,
214
221
  onBlur: onBlur,
215
222
  className: cx(className, classes.target)
216
223
  }, target), children && portalRef.current && /*#__PURE__*/ReactDOM.createPortal( /*#__PURE__*/React.createElement(Root, _extends({
217
224
  view: view,
218
225
  className: className
219
- }, rest), /*#__PURE__*/React.createElement(StyledPopover, _extends({}, attributes.popper, {
226
+ }, rest, {
227
+ onMouseEnter: closeOnBeyondTargetHover ? undefined : onMouseEnter,
228
+ onMouseLeave: closeOnBeyondTargetHover ? undefined : onMouseEnter
229
+ }), /*#__PURE__*/React.createElement(StyledPopover, _extends({}, attributes.popper, {
220
230
  className: classes.root,
221
231
  ref: popoverForkRef,
222
232
  style: _objectSpread(_objectSpread(_objectSpread({}, styles.popper), {
@@ -3,7 +3,7 @@ import { DEFAULT_Z_INDEX } from '../Popup/utils';
3
3
  import { classes, tokens } from './Popover.tokens';
4
4
  export var StyledWrapper = /*#__PURE__*/styled.div.withConfig({
5
5
  componentId: "plasma-new-hope__sc-tnpyex-0"
6
- })(["display:inline-block;"]);
6
+ })([""]);
7
7
  export var StyledRoot = /*#__PURE__*/styled.div.withConfig({
8
8
  componentId: "plasma-new-hope__sc-tnpyex-1"
9
9
  })(["display:inline-flex;box-sizing:border-box;position:relative;"]);
@@ -6,7 +6,7 @@ var nativeSelectVisible = classes.nativeSelectVisible,
6
6
  selectTarget = classes.selectTarget;
7
7
  export var StyledRoot = /*#__PURE__*/styled.div.withConfig({
8
8
  componentId: "plasma-new-hope__sc-le54jv-0"
9
- })(["width:100%;position:relative;.", "{display:block;}& .", "{display:block;}"], /*#__PURE__*/String(nativeSelectVisible), popoverClasses.wrapper);
9
+ })(["width:100%;position:relative;.", "{display:block;}"], /*#__PURE__*/String(nativeSelectVisible));
10
10
  export var StyledSelect = /*#__PURE__*/styled.div.withConfig({
11
11
  componentId: "plasma-new-hope__sc-le54jv-1"
12
12
  })(["box-sizing:border-box;overflow-y:auto;background:var(", ");box-shadow:var(", ");border-radius:var(", ");width:var(", ");height:var(", ");padding:var(", ") var(", ") var(", ") var(", ");"], tokens.background, tokens.boxShadow, tokens.borderRadius, tokens.width, tokens.height, tokens.paddingTop, tokens.paddingRight, tokens.paddingBottom, tokens.paddingLeft);