@salutejs/plasma-new-hope 0.193.1-canary.1562.11858039838.0 → 0.194.0-canary.1556.11879682469.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (260) hide show
  1. package/cjs/components/Autocomplete/Autocomplete.css +17 -17
  2. package/cjs/components/Autocomplete/Autocomplete.js +7 -1
  3. package/cjs/components/Autocomplete/Autocomplete.js.map +1 -1
  4. package/cjs/components/Combobox/ComboboxNew/Combobox.css +17 -17
  5. package/cjs/components/Combobox/ComboboxNew/Combobox.js +11 -20
  6. package/cjs/components/Combobox/ComboboxNew/Combobox.js.map +1 -1
  7. package/cjs/components/Combobox/ComboboxNew/ui/Inner/Inner.css +17 -17
  8. package/cjs/components/Combobox/ComboboxNew/ui/Inner/ui/Item/Item.css +17 -17
  9. package/cjs/components/Combobox/ComboboxNew/ui/Inner/ui/Item/Item.js +2 -1
  10. package/cjs/components/Combobox/ComboboxNew/ui/Inner/ui/Item/Item.js.map +1 -1
  11. package/cjs/components/Combobox/ComboboxOld/Combobox.css +4 -5
  12. package/cjs/components/Combobox/ComboboxOld/ui/ComboboxDivider/ComboboxDivider.css +4 -5
  13. package/cjs/components/Combobox/ComboboxOld/ui/ComboboxFooter/ComboboxFooter.css +4 -5
  14. package/cjs/components/Combobox/ComboboxOld/ui/ComboboxGroup/ComboboxGroup.css +4 -5
  15. package/cjs/components/Combobox/ComboboxOld/ui/ComboboxHeader/ComboboxHeader.css +4 -5
  16. package/cjs/components/DatePicker/RangeDate/RangeDate.css +17 -17
  17. package/cjs/components/DatePicker/RangeDate/RangeDatePopover/RangeDatePopover.css +17 -17
  18. package/cjs/components/DatePicker/SingleDate/SingleDate.css +17 -17
  19. package/cjs/components/DatePicker/SingleDate/SingleDate.js +9 -4
  20. package/cjs/components/DatePicker/SingleDate/SingleDate.js.map +1 -1
  21. package/cjs/components/Dropdown/Dropdown.css +4 -5
  22. package/cjs/components/Dropdown/Dropdown.js +2 -4
  23. package/cjs/components/Dropdown/Dropdown.js.map +1 -1
  24. package/cjs/components/Dropdown/ui/DropdownItem/DropdownItem.css +4 -5
  25. package/cjs/components/Dropdown/ui/DropdownItem/DropdownItem.js +2 -3
  26. package/cjs/components/Dropdown/ui/DropdownItem/DropdownItem.js.map +1 -1
  27. package/cjs/components/Dropdown/ui/DropdownItem/DropdownItem.styles.js +1 -7
  28. package/cjs/components/Dropdown/ui/DropdownItem/DropdownItem.styles.js.map +1 -1
  29. package/cjs/components/Dropdown/ui/DropdownItem/{DropdownItem.styles_14yih1y.css → DropdownItem.styles_1b439rx.css} +0 -1
  30. package/cjs/components/Pagination/Pagination.css +17 -17
  31. package/cjs/components/Pagination/ui/PaginationSelectPerPage/PaginationSelectPerPage.css +17 -17
  32. package/cjs/components/Range/Range.css +17 -17
  33. package/cjs/components/Select/Select.css +17 -17
  34. package/cjs/components/Select/Select.js +1 -0
  35. package/cjs/components/Select/Select.js.map +1 -1
  36. package/cjs/components/Select/ui/Inner/Inner.css +17 -17
  37. package/cjs/components/Select/ui/Inner/ui/Item/Item.css +17 -17
  38. package/cjs/components/Select/ui/Inner/ui/Item/Item.js +2 -1
  39. package/cjs/components/Select/ui/Inner/ui/Item/Item.js.map +1 -1
  40. package/cjs/components/Select/ui/Target/Target.css +17 -17
  41. package/cjs/components/Select/ui/Target/ui/Textfield/Textfield.css +17 -17
  42. package/cjs/components/Select/ui/Target/ui/Textfield/Textfield.js +13 -21
  43. package/cjs/components/Select/ui/Target/ui/Textfield/Textfield.js.map +1 -1
  44. package/cjs/components/Slider/Slider.css +17 -17
  45. package/cjs/components/Slider/components/Double/Double.css +17 -17
  46. package/cjs/components/Slider/components/DoubleUncontrolled/DoubleUncontrolled.css +17 -17
  47. package/cjs/components/TextField/TextField.js +9 -5
  48. package/cjs/components/TextField/TextField.js.map +1 -1
  49. package/cjs/components/TextField/TextField.styles.js +20 -11
  50. package/cjs/components/TextField/TextField.styles.js.map +1 -1
  51. package/cjs/components/TextField/{TextField.styles_j7dqpn.css → TextField.styles_ppcxpx.css} +1 -1
  52. package/cjs/components/TextField/TextField.tokens.js +1 -0
  53. package/cjs/components/TextField/TextField.tokens.js.map +1 -1
  54. package/cjs/components/TextField/ui/Hint/Hint.css +20 -20
  55. package/cjs/components/TextField/variations/_label-placement/base.js +1 -1
  56. package/cjs/components/TextField/variations/_label-placement/base.js.map +1 -1
  57. package/cjs/components/TextField/variations/_label-placement/base_y1lvvc.css +1 -0
  58. package/cjs/index.css +21 -22
  59. package/emotion/cjs/components/Autocomplete/Autocomplete.js +7 -1
  60. package/emotion/cjs/components/Combobox/ComboboxNew/Combobox.js +11 -24
  61. package/emotion/cjs/components/Combobox/ComboboxNew/ui/Inner/ui/Item/Item.js +2 -1
  62. package/emotion/cjs/components/DatePicker/SingleDate/SingleDate.js +9 -4
  63. package/emotion/cjs/components/Dropdown/Dropdown.js +2 -4
  64. package/emotion/cjs/components/Dropdown/ui/DropdownItem/DropdownItem.js +2 -3
  65. package/emotion/cjs/components/Dropdown/ui/DropdownItem/DropdownItem.styles.js +11 -15
  66. package/emotion/cjs/components/Select/Select.js +1 -0
  67. package/emotion/cjs/components/Select/ui/Inner/ui/Item/Item.js +2 -1
  68. package/emotion/cjs/components/Select/ui/Target/ui/Textfield/Textfield.js +13 -27
  69. package/emotion/cjs/components/TextField/TextField.js +10 -6
  70. package/emotion/cjs/components/TextField/TextField.styles.js +29 -26
  71. package/emotion/cjs/components/TextField/TextField.tokens.js +1 -0
  72. package/emotion/cjs/components/TextField/variations/_label-placement/base.js +1 -1
  73. package/emotion/cjs/examples/plasma_b2c/components/TextField/TextField.stories.tsx +7 -0
  74. package/emotion/cjs/examples/plasma_web/components/TextField/TextField.stories.tsx +9 -2
  75. package/emotion/es/components/Autocomplete/Autocomplete.js +7 -1
  76. package/emotion/es/components/Combobox/ComboboxNew/Combobox.js +11 -24
  77. package/emotion/es/components/Combobox/ComboboxNew/ui/Inner/ui/Item/Item.js +2 -1
  78. package/emotion/es/components/DatePicker/SingleDate/SingleDate.js +9 -4
  79. package/emotion/es/components/Dropdown/Dropdown.js +2 -4
  80. package/emotion/es/components/Dropdown/ui/DropdownItem/DropdownItem.js +3 -4
  81. package/emotion/es/components/Dropdown/ui/DropdownItem/DropdownItem.styles.js +11 -15
  82. package/emotion/es/components/Select/Select.js +1 -0
  83. package/emotion/es/components/Select/ui/Inner/ui/Item/Item.js +2 -1
  84. package/emotion/es/components/Select/ui/Target/ui/Textfield/Textfield.js +13 -27
  85. package/emotion/es/components/TextField/TextField.js +10 -6
  86. package/emotion/es/components/TextField/TextField.styles.js +29 -26
  87. package/emotion/es/components/TextField/TextField.tokens.js +1 -0
  88. package/emotion/es/components/TextField/variations/_label-placement/base.js +1 -1
  89. package/emotion/es/examples/plasma_b2c/components/TextField/TextField.stories.tsx +7 -0
  90. package/emotion/es/examples/plasma_web/components/TextField/TextField.stories.tsx +9 -2
  91. package/es/components/Autocomplete/Autocomplete.css +17 -17
  92. package/es/components/Autocomplete/Autocomplete.js +7 -1
  93. package/es/components/Autocomplete/Autocomplete.js.map +1 -1
  94. package/es/components/Combobox/ComboboxNew/Combobox.css +17 -17
  95. package/es/components/Combobox/ComboboxNew/Combobox.js +12 -21
  96. package/es/components/Combobox/ComboboxNew/Combobox.js.map +1 -1
  97. package/es/components/Combobox/ComboboxNew/ui/Inner/Inner.css +17 -17
  98. package/es/components/Combobox/ComboboxNew/ui/Inner/ui/Item/Item.css +17 -17
  99. package/es/components/Combobox/ComboboxNew/ui/Inner/ui/Item/Item.js +2 -1
  100. package/es/components/Combobox/ComboboxNew/ui/Inner/ui/Item/Item.js.map +1 -1
  101. package/es/components/Combobox/ComboboxOld/Combobox.css +4 -5
  102. package/es/components/Combobox/ComboboxOld/ui/ComboboxDivider/ComboboxDivider.css +4 -5
  103. package/es/components/Combobox/ComboboxOld/ui/ComboboxFooter/ComboboxFooter.css +4 -5
  104. package/es/components/Combobox/ComboboxOld/ui/ComboboxGroup/ComboboxGroup.css +4 -5
  105. package/es/components/Combobox/ComboboxOld/ui/ComboboxHeader/ComboboxHeader.css +4 -5
  106. package/es/components/DatePicker/RangeDate/RangeDate.css +17 -17
  107. package/es/components/DatePicker/RangeDate/RangeDatePopover/RangeDatePopover.css +17 -17
  108. package/es/components/DatePicker/SingleDate/SingleDate.css +17 -17
  109. package/es/components/DatePicker/SingleDate/SingleDate.js +9 -4
  110. package/es/components/DatePicker/SingleDate/SingleDate.js.map +1 -1
  111. package/es/components/Dropdown/Dropdown.css +4 -5
  112. package/es/components/Dropdown/Dropdown.js +2 -4
  113. package/es/components/Dropdown/Dropdown.js.map +1 -1
  114. package/es/components/Dropdown/ui/DropdownItem/DropdownItem.css +4 -5
  115. package/es/components/Dropdown/ui/DropdownItem/DropdownItem.js +3 -4
  116. package/es/components/Dropdown/ui/DropdownItem/DropdownItem.js.map +1 -1
  117. package/es/components/Dropdown/ui/DropdownItem/DropdownItem.styles.js +2 -7
  118. package/es/components/Dropdown/ui/DropdownItem/DropdownItem.styles.js.map +1 -1
  119. package/es/components/Dropdown/ui/DropdownItem/{DropdownItem.styles_14yih1y.css → DropdownItem.styles_1b439rx.css} +0 -1
  120. package/es/components/Pagination/Pagination.css +17 -17
  121. package/es/components/Pagination/ui/PaginationSelectPerPage/PaginationSelectPerPage.css +17 -17
  122. package/es/components/Range/Range.css +17 -17
  123. package/es/components/Select/Select.css +17 -17
  124. package/es/components/Select/Select.js +1 -0
  125. package/es/components/Select/Select.js.map +1 -1
  126. package/es/components/Select/ui/Inner/Inner.css +17 -17
  127. package/es/components/Select/ui/Inner/ui/Item/Item.css +17 -17
  128. package/es/components/Select/ui/Inner/ui/Item/Item.js +2 -1
  129. package/es/components/Select/ui/Inner/ui/Item/Item.js.map +1 -1
  130. package/es/components/Select/ui/Target/Target.css +17 -17
  131. package/es/components/Select/ui/Target/ui/Textfield/Textfield.css +17 -17
  132. package/es/components/Select/ui/Target/ui/Textfield/Textfield.js +14 -22
  133. package/es/components/Select/ui/Target/ui/Textfield/Textfield.js.map +1 -1
  134. package/es/components/Slider/Slider.css +17 -17
  135. package/es/components/Slider/components/Double/Double.css +17 -17
  136. package/es/components/Slider/components/DoubleUncontrolled/DoubleUncontrolled.css +17 -17
  137. package/es/components/TextField/TextField.js +9 -5
  138. package/es/components/TextField/TextField.js.map +1 -1
  139. package/es/components/TextField/TextField.styles.js +20 -11
  140. package/es/components/TextField/TextField.styles.js.map +1 -1
  141. package/es/components/TextField/{TextField.styles_j7dqpn.css → TextField.styles_ppcxpx.css} +1 -1
  142. package/es/components/TextField/TextField.tokens.js +1 -0
  143. package/es/components/TextField/TextField.tokens.js.map +1 -1
  144. package/es/components/TextField/ui/Hint/Hint.css +20 -20
  145. package/es/components/TextField/variations/_label-placement/base.js +1 -1
  146. package/es/components/TextField/variations/_label-placement/base.js.map +1 -1
  147. package/es/components/TextField/variations/_label-placement/base_y1lvvc.css +1 -0
  148. package/es/index.css +21 -22
  149. package/package.json +2 -3
  150. package/styled-components/cjs/components/Autocomplete/Autocomplete.js +7 -1
  151. package/styled-components/cjs/components/Combobox/ComboboxNew/Combobox.js +11 -24
  152. package/styled-components/cjs/components/Combobox/ComboboxNew/ui/Inner/ui/Item/Item.js +2 -1
  153. package/styled-components/cjs/components/DatePicker/SingleDate/SingleDate.js +9 -4
  154. package/styled-components/cjs/components/Dropdown/Dropdown.js +2 -4
  155. package/styled-components/cjs/components/Dropdown/ui/DropdownItem/DropdownItem.js +2 -3
  156. package/styled-components/cjs/components/Dropdown/ui/DropdownItem/DropdownItem.styles.js +2 -5
  157. package/styled-components/cjs/components/Select/Select.js +1 -0
  158. package/styled-components/cjs/components/Select/ui/Inner/ui/Item/Item.js +2 -1
  159. package/styled-components/cjs/components/Select/ui/Target/ui/Textfield/Textfield.js +13 -27
  160. package/styled-components/cjs/components/TextField/TextField.js +9 -5
  161. package/styled-components/cjs/components/TextField/TextField.styles.js +9 -6
  162. package/styled-components/cjs/components/TextField/TextField.tokens.js +1 -0
  163. package/styled-components/cjs/components/TextField/variations/_label-placement/base.js +1 -1
  164. package/styled-components/cjs/examples/plasma_b2c/components/TextField/TextField.stories.tsx +7 -0
  165. package/styled-components/cjs/examples/plasma_web/components/TextField/TextField.stories.tsx +9 -2
  166. package/styled-components/es/components/Autocomplete/Autocomplete.js +7 -1
  167. package/styled-components/es/components/Combobox/ComboboxNew/Combobox.js +11 -24
  168. package/styled-components/es/components/Combobox/ComboboxNew/ui/Inner/ui/Item/Item.js +2 -1
  169. package/styled-components/es/components/DatePicker/SingleDate/SingleDate.js +9 -4
  170. package/styled-components/es/components/Dropdown/Dropdown.js +2 -4
  171. package/styled-components/es/components/Dropdown/ui/DropdownItem/DropdownItem.js +3 -4
  172. package/styled-components/es/components/Dropdown/ui/DropdownItem/DropdownItem.styles.js +2 -5
  173. package/styled-components/es/components/Select/Select.js +1 -0
  174. package/styled-components/es/components/Select/ui/Inner/ui/Item/Item.js +2 -1
  175. package/styled-components/es/components/Select/ui/Target/ui/Textfield/Textfield.js +13 -27
  176. package/styled-components/es/components/TextField/TextField.js +9 -5
  177. package/styled-components/es/components/TextField/TextField.styles.js +9 -6
  178. package/styled-components/es/components/TextField/TextField.tokens.js +1 -0
  179. package/styled-components/es/components/TextField/variations/_label-placement/base.js +1 -1
  180. package/styled-components/es/examples/plasma_b2c/components/TextField/TextField.stories.tsx +7 -0
  181. package/styled-components/es/examples/plasma_web/components/TextField/TextField.stories.tsx +9 -2
  182. package/types/components/Autocomplete/Autocomplete.d.ts.map +1 -1
  183. package/types/components/Autocomplete/ui/TextField/TextField.styles.d.ts +717 -61
  184. package/types/components/Autocomplete/ui/TextField/TextField.styles.d.ts.map +1 -1
  185. package/types/components/Combobox/ComboboxNew/Combobox.d.ts.map +1 -1
  186. package/types/components/Combobox/ComboboxNew/Combobox.types.d.ts +32 -11
  187. package/types/components/Combobox/ComboboxNew/Combobox.types.d.ts.map +1 -1
  188. package/types/components/Combobox/ComboboxNew/ui/Inner/ui/Item/Item.d.ts.map +1 -1
  189. package/types/components/Combobox/ComboboxNew/ui/Target/Target.styles.d.ts +717 -61
  190. package/types/components/Combobox/ComboboxNew/ui/Target/Target.styles.d.ts.map +1 -1
  191. package/types/components/DatePicker/SingleDate/SingleDate.d.ts +2 -2
  192. package/types/components/DatePicker/SingleDate/SingleDate.d.ts.map +1 -1
  193. package/types/components/DatePicker/SingleDate/SingleDate.styles.d.ts +717 -61
  194. package/types/components/DatePicker/SingleDate/SingleDate.styles.d.ts.map +1 -1
  195. package/types/components/DatePicker/SingleDate/SingleDate.types.d.ts +28 -9
  196. package/types/components/DatePicker/SingleDate/SingleDate.types.d.ts.map +1 -1
  197. package/types/components/Dropdown/Dropdown.d.ts +2 -50
  198. package/types/components/Dropdown/Dropdown.d.ts.map +1 -1
  199. package/types/components/Dropdown/Dropdown.types.d.ts +6 -11
  200. package/types/components/Dropdown/Dropdown.types.d.ts.map +1 -1
  201. package/types/components/Dropdown/index.d.ts +0 -1
  202. package/types/components/Dropdown/index.d.ts.map +1 -1
  203. package/types/components/Dropdown/ui/DropdownItem/DropdownItem.d.ts.map +1 -1
  204. package/types/components/Dropdown/ui/DropdownItem/DropdownItem.styles.d.ts +0 -1
  205. package/types/components/Dropdown/ui/DropdownItem/DropdownItem.styles.d.ts.map +1 -1
  206. package/types/components/Pagination/ui/PaginationSelectPerPage/PaginationSelectPerPage.styles.d.ts +176 -4
  207. package/types/components/Pagination/ui/PaginationSelectPerPage/PaginationSelectPerPage.styles.d.ts.map +1 -1
  208. package/types/components/Range/Range.styles.d.ts +717 -61
  209. package/types/components/Range/Range.styles.d.ts.map +1 -1
  210. package/types/components/Select/Select.d.ts.map +1 -1
  211. package/types/components/Select/Select.types.d.ts +32 -11
  212. package/types/components/Select/Select.types.d.ts.map +1 -1
  213. package/types/components/Select/ui/Inner/ui/Item/Item.d.ts.map +1 -1
  214. package/types/components/Select/ui/Target/Target.d.ts +1 -1
  215. package/types/components/Select/ui/Target/Target.types.d.ts +1 -1
  216. package/types/components/Select/ui/Target/Target.types.d.ts.map +1 -1
  217. package/types/components/Select/ui/Target/ui/Textfield/Textfield.d.ts.map +1 -1
  218. package/types/components/Select/ui/Target/ui/Textfield/Textfield.styles.d.ts +717 -61
  219. package/types/components/Select/ui/Target/ui/Textfield/Textfield.styles.d.ts.map +1 -1
  220. package/types/components/Select/ui/Target/ui/Textfield/Textfield.types.d.ts +1 -1
  221. package/types/components/Select/ui/Target/ui/Textfield/Textfield.types.d.ts.map +1 -1
  222. package/types/components/Slider/components/Double/Double.styles.d.ts +717 -61
  223. package/types/components/Slider/components/Double/Double.styles.d.ts.map +1 -1
  224. package/types/components/TextField/TextField.d.ts.map +1 -1
  225. package/types/components/TextField/TextField.styles.d.ts +3 -1
  226. package/types/components/TextField/TextField.styles.d.ts.map +1 -1
  227. package/types/components/TextField/TextField.tokens.d.ts +1 -0
  228. package/types/components/TextField/TextField.tokens.d.ts.map +1 -1
  229. package/types/components/TextField/TextField.types.d.ts +43 -20
  230. package/types/components/TextField/TextField.types.d.ts.map +1 -1
  231. package/types/examples/plasma_b2c/components/Autocomplete/Autocomplete.d.ts +3 -5
  232. package/types/examples/plasma_b2c/components/Autocomplete/Autocomplete.d.ts.map +1 -1
  233. package/types/examples/plasma_b2c/components/Combobox/Combobox.d.ts +1045 -133
  234. package/types/examples/plasma_b2c/components/Combobox/Combobox.d.ts.map +1 -1
  235. package/types/examples/plasma_b2c/components/DatePicker/DatePicker.d.ts +47 -1
  236. package/types/examples/plasma_b2c/components/DatePicker/DatePicker.d.ts.map +1 -1
  237. package/types/examples/plasma_b2c/components/Dropdown/Dropdown.d.ts +1 -25
  238. package/types/examples/plasma_b2c/components/Dropdown/Dropdown.d.ts.map +1 -1
  239. package/types/examples/plasma_b2c/components/Mask/Mask.d.ts +1246 -62
  240. package/types/examples/plasma_b2c/components/Mask/Mask.d.ts.map +1 -1
  241. package/types/examples/plasma_b2c/components/Select/Select.d.ts +176 -4
  242. package/types/examples/plasma_b2c/components/Select/Select.d.ts.map +1 -1
  243. package/types/examples/plasma_b2c/components/TextField/TextField.d.ts +717 -61
  244. package/types/examples/plasma_b2c/components/TextField/TextField.d.ts.map +1 -1
  245. package/types/examples/plasma_web/components/Autocomplete/Autocomplete.d.ts +3 -5
  246. package/types/examples/plasma_web/components/Autocomplete/Autocomplete.d.ts.map +1 -1
  247. package/types/examples/plasma_web/components/Combobox/Combobox.d.ts +1045 -133
  248. package/types/examples/plasma_web/components/Combobox/Combobox.d.ts.map +1 -1
  249. package/types/examples/plasma_web/components/DatePicker/DatePicker.d.ts +47 -1
  250. package/types/examples/plasma_web/components/DatePicker/DatePicker.d.ts.map +1 -1
  251. package/types/examples/plasma_web/components/Dropdown/Dropdown.d.ts +1 -25
  252. package/types/examples/plasma_web/components/Dropdown/Dropdown.d.ts.map +1 -1
  253. package/types/examples/plasma_web/components/Mask/Mask.d.ts +1246 -62
  254. package/types/examples/plasma_web/components/Mask/Mask.d.ts.map +1 -1
  255. package/types/examples/plasma_web/components/Select/Select.d.ts +176 -4
  256. package/types/examples/plasma_web/components/Select/Select.d.ts.map +1 -1
  257. package/types/examples/plasma_web/components/TextField/TextField.d.ts +717 -61
  258. package/types/examples/plasma_web/components/TextField/TextField.d.ts.map +1 -1
  259. package/cjs/components/TextField/variations/_label-placement/base_gttvto.css +0 -1
  260. package/es/components/TextField/variations/_label-placement/base_gttvto.css +0 -1
@@ -7,4 +7,4 @@ exports.base = void 0;
7
7
  var _styledComponents = /*#__PURE__*/require("styled-components");
8
8
  var _TextField = /*#__PURE__*/require("../../TextField.tokens");
9
9
  var _TextField2 = /*#__PURE__*/require("../../TextField.styles");
10
- var base = exports.base = /*#__PURE__*/(0, _styledComponents.css)(["&.", "{", "{position:relative;display:inline-block;color:var(", ");}}&.", "{", "{padding:var(", ");}", ",", "{padding:var(", ");}", ":focus ~ ", ",", ".", " ~ ", "{color:var(", ");align-items:flex-start;padding:var(", ");font-family:var(", ");font-size:var(", ");font-style:var(", ");font-weight:var(", ");letter-spacing:var(", ");line-height:var(", ");}", "{color:var(", ");pointer-events:none;position:absolute;top:0;display:flex;align-items:center;box-sizing:border-box;height:var(", ");padding-top:calc(calc(var(", ") - var(", ")) / 2);padding-bottom:calc(calc(var(", ") - var(", ")) / 2);}&.", " ", "{color:var(", ");}}"], _TextField.classes.outerLabelPlacement, _TextField2.Label, _TextField.tokens.labelColor, _TextField.classes.innerLabelPlacement, _TextField2.InputContainer, _TextField.tokens.contentLabelInnerPadding, _TextField2.StyledTextAfter, _TextField2.StyledTextBefore, _TextField.tokens.contentLabelInnerPadding, _TextField2.Input, _TextField2.Label, _TextField2.Input, _TextField.classes.hasValue, _TextField2.Label, _TextField.tokens.placeholderColor, _TextField.tokens.labelInnerPadding, _TextField.tokens.labelInnerFontFamily, _TextField.tokens.labelInnerFontSize, _TextField.tokens.labelInnerFontStyle, _TextField.tokens.labelInnerFontWeight, _TextField.tokens.labelInnerLetterSpacing, _TextField.tokens.labelInnerLineHeight, _TextField2.Label, _TextField.tokens.placeholderColor, _TextField.tokens.height, _TextField.tokens.height, _TextField.tokens.labelLineHeight, _TextField.tokens.height, _TextField.tokens.labelLineHeight, _TextField.classes.clear, _TextField2.Label, _TextField.tokens.clearPlaceholderColor);
10
+ var base = exports.base = /*#__PURE__*/(0, _styledComponents.css)(["&.", "{", "{position:relative;display:inline-block;color:var(", ");}}&.", "{", "{padding:var(", ");}", ",", "{padding:var(", ");}", ":focus ~ ", ",", ".", " ~ ", ",", ".", " ~ ", "{color:var(", ");align-items:flex-start;padding:var(", ");font-family:var(", ");font-size:var(", ");font-style:var(", ");font-weight:var(", ");letter-spacing:var(", ");line-height:var(", ");}", "{color:var(", ");pointer-events:none;position:absolute;top:0;display:flex;align-items:center;box-sizing:border-box;height:var(", ");padding-top:calc(calc(var(", ") - var(", ")) / 2);padding-bottom:calc(calc(var(", ") - var(", ")) / 2);}&.", " ", "{color:var(", ");}}"], _TextField.classes.outerLabelPlacement, _TextField2.Label, _TextField.tokens.labelColor, _TextField.classes.innerLabelPlacement, _TextField2.InputContainer, _TextField.tokens.contentLabelInnerPadding, _TextField2.StyledTextAfter, _TextField2.StyledTextBefore, _TextField.tokens.contentLabelInnerPadding, _TextField2.Input, _TextField2.Label, _TextField2.Input, _TextField.classes.hasValue, _TextField2.Label, _TextField2.Input, _TextField.classes.forcePlaceholder, _TextField2.Label, _TextField.tokens.placeholderColor, _TextField.tokens.labelInnerPadding, _TextField.tokens.labelInnerFontFamily, _TextField.tokens.labelInnerFontSize, _TextField.tokens.labelInnerFontStyle, _TextField.tokens.labelInnerFontWeight, _TextField.tokens.labelInnerLetterSpacing, _TextField.tokens.labelInnerLineHeight, _TextField2.Label, _TextField.tokens.placeholderColor, _TextField.tokens.height, _TextField.tokens.height, _TextField.tokens.labelLineHeight, _TextField.tokens.height, _TextField.tokens.labelLineHeight, _TextField.classes.clear, _TextField2.Label, _TextField.tokens.clearPlaceholderColor);
@@ -87,6 +87,12 @@ const meta: Meta<typeof TextField> = {
87
87
  type: 'inline-radio',
88
88
  },
89
89
  },
90
+ hasPlaceholder: {
91
+ control: {
92
+ type: 'boolean',
93
+ },
94
+ if: { arg: 'labelPlacement', eq: 'inner' },
95
+ },
90
96
  size: {
91
97
  options: sizes,
92
98
  control: {
@@ -210,6 +216,7 @@ export const Default: StoryObj<StoryPropsDefault> = {
210
216
  view: 'default',
211
217
  label: 'Лейбл',
212
218
  labelPlacement: 'outer',
219
+ hasPlaceholder: false,
213
220
  titleCaption: 'Подпись к полю',
214
221
  textBefore: '',
215
222
  textAfter: '',
@@ -87,6 +87,12 @@ const meta: Meta<typeof TextField> = {
87
87
  type: 'inline-radio',
88
88
  },
89
89
  },
90
+ hasPlaceholder: {
91
+ control: {
92
+ type: 'boolean',
93
+ },
94
+ if: { arg: 'labelPlacement', eq: 'inner' },
95
+ },
90
96
  size: {
91
97
  options: sizes,
92
98
  control: {
@@ -210,6 +216,7 @@ export const Default: StoryObj<StoryPropsDefault> = {
210
216
  view: 'default',
211
217
  label: 'Лейбл',
212
218
  labelPlacement: 'outer',
219
+ hasPlaceholder: false,
213
220
  titleCaption: 'Подпись к полю',
214
221
  textBefore: '',
215
222
  textAfter: '',
@@ -219,11 +226,11 @@ export const Default: StoryObj<StoryPropsDefault> = {
219
226
  readOnly: false,
220
227
  enableContentLeft: true,
221
228
  enableContentRight: true,
222
- clear: false,
223
- hasDivider: false,
224
229
  optional: false,
225
230
  required: false,
226
231
  requiredPlacement: 'right',
232
+ clear: false,
233
+ hasDivider: false,
227
234
  hasHint: true,
228
235
  hintText: 'Текст подсказки',
229
236
  hintTrigger: 'hover',
@@ -1,4 +1,4 @@
1
- var _excluded = ["value", "onChange", "suggestions", "view", "size", "labelPlacement", "disabled", "readOnly", "label", "leftHelper", "contentLeft", "contentRight", "textBefore", "textAfter", "onScroll", "listMaxHeight", "listWidth", "portal", "filter", "onSuggestionSelect", "threshold", "renderList", "renderListEnd", "onSearch", "hintText"];
1
+ var _excluded = ["value", "onChange", "suggestions", "view", "size", "labelPlacement", "hasPlaceholder", "disabled", "readOnly", "label", "leftHelper", "contentLeft", "contentRight", "textBefore", "textAfter", "onScroll", "listMaxHeight", "listWidth", "portal", "filter", "onSuggestionSelect", "threshold", "renderList", "renderListEnd", "onSearch", "hintText"];
2
2
  function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
3
3
  function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
4
4
  function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
@@ -28,6 +28,7 @@ export var autocompleteRoot = function autocompleteRoot(Root) {
28
28
  view = _ref.view,
29
29
  size = _ref.size,
30
30
  labelPlacement = _ref.labelPlacement,
31
+ hasPlaceholder = _ref.hasPlaceholder,
31
32
  disabled = _ref.disabled,
32
33
  readOnly = _ref.readOnly,
33
34
  label = _ref.label,
@@ -147,6 +148,11 @@ export var autocompleteRoot = function autocompleteRoot(Root) {
147
148
  "aria-activedescendant": "".concat(listId, "/").concat(focused),
148
149
  "aria-describedby": helperTextId,
149
150
  hintText: String(hintText || '')
151
+ }, labelPlacement === 'inner' ? {
152
+ labelPlacement: labelPlacement,
153
+ hasPlaceholder: hasPlaceholder
154
+ } : {
155
+ labelPlacement: labelPlacement
150
156
  }, rest)),
151
157
  preventOverflow: false,
152
158
  ref: targetRef,
@@ -1,9 +1,5 @@
1
- var _excluded = ["multiple", "value", "onChange", "isTargetAmount", "targetAmount", "items", "placement", "label", "placeholder", "helperText", "contentLeft", "textBefore", "textAfter", "variant", "listOverflow", "listHeight", "listWidth", "portal", "renderItem", "view", "size", "labelPlacement", "readOnly", "disabled", "alwaysOpened", "filter", "closeAfterSelect", "renderValue"];
1
+ var _excluded = ["multiple", "value", "onChange", "isTargetAmount", "targetAmount", "items", "placement", "label", "placeholder", "helperText", "contentLeft", "textBefore", "textAfter", "variant", "listOverflow", "listHeight", "listWidth", "portal", "renderItem", "view", "size", "labelPlacement", "hasPlaceholder", "readOnly", "disabled", "alwaysOpened", "filter", "closeAfterSelect", "renderValue"];
2
2
  function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
3
- function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }
4
- function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
5
- function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
6
- function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }
7
3
  function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
8
4
  function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
9
5
  function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
@@ -59,6 +55,7 @@ export var comboboxRoot = function comboboxRoot(Root) {
59
55
  view = props.view,
60
56
  size = props.size,
61
57
  labelPlacement = props.labelPlacement,
58
+ hasPlaceholder = props.hasPlaceholder,
62
59
  _props$readOnly = props.readOnly,
63
60
  readOnly = _props$readOnly === void 0 ? false : _props$readOnly,
64
61
  _props$disabled = props.disabled,
@@ -181,24 +178,9 @@ export var comboboxRoot = function comboboxRoot(Root) {
181
178
 
182
179
  // Обработчик чипов
183
180
  var handleChipsChange = function handleChipsChange(chipLabels) {
184
- if (!Array.isArray(value)) return;
185
-
186
- // TODO: #1564
187
- // Из лейблов чипов получаем value у item и далее прокидываем его в onChange.
188
- if (renderValue && !isTargetAmount) {
189
- var resultValues = _toConsumableArray(value);
190
- value.forEach(function (_, index) {
191
- var labelAfterRenderValue = renderValue(labelToItemMap.get(valueToItemMap.get(value[index]).label));
192
- if (!chipLabels.includes(labelAfterRenderValue)) {
193
- resultValues.splice(index, 1);
194
- }
195
- });
196
- onChange(resultValues);
197
- } else {
198
- onChange(chipLabels.map(function (chipLabel) {
199
- return labelToItemMap.get(chipLabel).value;
200
- }));
201
- }
181
+ onChange(chipLabels.map(function (chipLabel) {
182
+ return labelToItemMap.get(chipLabel).value;
183
+ }));
202
184
  };
203
185
 
204
186
  // Обработчик открытия/закрытия выпадающего списка
@@ -367,6 +349,7 @@ export var comboboxRoot = function comboboxRoot(Root) {
367
349
  handleItemClick: handleItemClick,
368
350
  variant: variant,
369
351
  renderItem: renderItem,
352
+ valueToItemMap: valueToItemMap,
370
353
  treeId: treeId
371
354
  }
372
355
  }, /*#__PURE__*/React.createElement(FloatingPopover, {
@@ -386,7 +369,6 @@ export var comboboxRoot = function comboboxRoot(Root) {
386
369
  onChange: handleTextValueChange,
387
370
  size: size,
388
371
  view: view,
389
- labelPlacement: labelPlacement,
390
372
  disabled: disabled,
391
373
  readOnly: readOnly,
392
374
  label: label,
@@ -409,6 +391,11 @@ export var comboboxRoot = function comboboxRoot(Root) {
409
391
  "aria-controls": "".concat(treeId, "_tree_level_1"),
410
392
  "aria-expanded": isCurrentListOpen,
411
393
  "aria-activedescendant": activeDescendantItemValue ? getItemId(treeId, activeDescendantItemValue) : ''
394
+ }, labelPlacement === 'inner' ? {
395
+ labelPlacement: labelPlacement,
396
+ hasPlaceholder: hasPlaceholder
397
+ } : {
398
+ labelPlacement: labelPlacement
412
399
  }, multiple ? {
413
400
  enumerationType: 'chip',
414
401
  chips: getChips(),
@@ -31,6 +31,7 @@ export var Item = function Item(_ref) {
31
31
  handleItemClick = _useContext.handleItemClick,
32
32
  variant = _useContext.variant,
33
33
  renderItem = _useContext.renderItem,
34
+ valueToItemMap = _useContext.valueToItemMap,
34
35
  treeId = _useContext.treeId;
35
36
  var disabledClassName = disabled ? classes.dropdownItemIsDisabled : undefined;
36
37
  var focusedClass = currentLevel === focusedPath.length - 1 && index === (focusedPath === null || focusedPath === void 0 ? void 0 : focusedPath[currentLevel]) ? classes.dropdownItemIsFocused : undefined;
@@ -84,7 +85,7 @@ export var Item = function Item(_ref) {
84
85
  }))), !multiple && checked.get(item.value) === 'done' && /*#__PURE__*/React.createElement(IconDone, {
85
86
  size: sizeToIconSize(size, variant),
86
87
  color: "inherit"
87
- })), renderItem ? /*#__PURE__*/React.createElement(StyledText, null, renderItem(item)) : /*#__PURE__*/React.createElement(StyledWrapper, null, /*#__PURE__*/React.createElement(StyledCell, {
88
+ })), renderItem ? /*#__PURE__*/React.createElement(StyledText, null, renderItem(valueToItemMap.get(value))) : /*#__PURE__*/React.createElement(StyledWrapper, null, /*#__PURE__*/React.createElement(StyledCell, {
88
89
  view: "default",
89
90
  size: "l",
90
91
  contentLeft: contentLeft,
@@ -1,4 +1,4 @@
1
- var _excluded = ["className", "opened", "label", "labelPlacement", "placeholder", "leftHelper", "contentLeft", "contentRight", "textBefore", "textAfter", "view", "size", "readOnly", "disabled", "name", "defaultDate", "valueError", "valueSuccess", "format", "lang", "maskWithFormat", "min", "max", "includeEdgeDates", "eventList", "disabledList", "eventMonthList", "disabledMonthList", "eventQuarterList", "disabledQuarterList", "eventYearList", "disabledYearList", "type", "frame", "usePortal", "placement", "closeOnOverlayClick", "closeOnEsc", "offset", "onChangeValue", "onCommitDate", "onToggle", "onFocus", "onBlur", "onChange"];
1
+ var _excluded = ["className", "opened", "label", "labelPlacement", "hasPlaceholder", "placeholder", "leftHelper", "contentLeft", "contentRight", "textBefore", "textAfter", "view", "size", "readOnly", "disabled", "name", "defaultDate", "valueError", "valueSuccess", "format", "lang", "maskWithFormat", "min", "max", "includeEdgeDates", "eventList", "disabledList", "eventMonthList", "disabledMonthList", "eventQuarterList", "disabledQuarterList", "eventYearList", "disabledYearList", "type", "frame", "usePortal", "placement", "closeOnOverlayClick", "closeOnEsc", "offset", "onChangeValue", "onCommitDate", "onToggle", "onFocus", "onBlur", "onChange"];
2
2
  function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
3
3
  function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
4
4
  function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
@@ -28,6 +28,7 @@ export var datePickerRoot = function datePickerRoot(Root) {
28
28
  label = _ref.label,
29
29
  _ref$labelPlacement = _ref.labelPlacement,
30
30
  labelPlacement = _ref$labelPlacement === void 0 ? 'outer' : _ref$labelPlacement,
31
+ hasPlaceholder = _ref.hasPlaceholder,
31
32
  placeholder = _ref.placeholder,
32
33
  leftHelper = _ref.leftHelper,
33
34
  contentLeft = _ref.contentLeft,
@@ -164,10 +165,14 @@ export var datePickerRoot = function datePickerRoot(Root) {
164
165
  },
165
166
  onFocus: onFocus,
166
167
  onBlur: onBlur,
167
- onKeyDown: onKeyDown
168
- }, innerLabelPlacement && {
169
- label: label,
168
+ onKeyDown: onKeyDown,
170
169
  labelPlacement: labelPlacement
170
+ }, labelPlacement === 'inner' ? {
171
+ label: label,
172
+ labelPlacement: labelPlacement,
173
+ hasPlaceholder: hasPlaceholder
174
+ } : {
175
+ labelPlacement: undefined
171
176
  }));
172
177
  useEffect(function () {
173
178
  setIsInnerOpen(function (prevOpen) {
@@ -1,4 +1,4 @@
1
- var _excluded = ["items", "children", "placement", "offset", "closeOnOverlayClick", "onToggle", "size", "view", "itemRole", "className", "listWidth", "listHeight", "listOverflow", "closeOnSelect", "onHover", "onItemSelect", "onItemClick", "trigger", "variant", "hasArrow", "alwaysOpened", "portal", "renderItem"];
1
+ var _excluded = ["items", "children", "placement", "offset", "closeOnOverlayClick", "onToggle", "size", "view", "itemRole", "className", "listWidth", "listHeight", "listOverflow", "closeOnSelect", "onHover", "onItemSelect", "onItemClick", "trigger", "variant", "hasArrow", "alwaysOpened", "portal"];
2
2
  function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
3
3
  function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
4
4
  function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
@@ -60,7 +60,6 @@ export var dropdownRoot = function dropdownRoot(Root) {
60
60
  _ref$alwaysOpened = _ref.alwaysOpened,
61
61
  alwaysOpened = _ref$alwaysOpened === void 0 ? false : _ref$alwaysOpened,
62
62
  portal = _ref.portal,
63
- renderItem = _ref.renderItem,
64
63
  rest = _objectWithoutProperties(_ref, _excluded);
65
64
  var _useReducer = useReducer(pathReducer, []),
66
65
  _useReducer2 = _slicedToArray(_useReducer, 2),
@@ -136,8 +135,7 @@ export var dropdownRoot = function dropdownRoot(Root) {
136
135
  onItemClick: onItemClick,
137
136
  onItemSelect: onItemSelect,
138
137
  hasArrow: hasArrow,
139
- treeId: treeId,
140
- renderItem: renderItem
138
+ treeId: treeId
141
139
  }
142
140
  }, /*#__PURE__*/React.createElement(FloatingPopover, {
143
141
  ref: floatingPopoverRef,
@@ -4,7 +4,7 @@ import { cx } from '../../../../utils';
4
4
  import { IconDisclosureRight } from '../../../_Icon';
5
5
  import { Context } from '../../Dropdown';
6
6
  import { getItemId } from '../../utils';
7
- import { Wrapper, DisclosureIconWrapper, Divider, CellWrapper, StyledCell, RenderItemWrapper } from './DropdownItem.styles';
7
+ import { Wrapper, DisclosureIconWrapper, Divider, CellWrapper, StyledCell } from './DropdownItem.styles';
8
8
  export var DropdownItem = function DropdownItem(_ref) {
9
9
  var item = _ref.item,
10
10
  path = _ref.path,
@@ -34,8 +34,7 @@ export var DropdownItem = function DropdownItem(_ref) {
34
34
  onItemSelect = _useContext.onItemSelect,
35
35
  onItemClick = _useContext.onItemClick,
36
36
  hasArrow = _useContext.hasArrow,
37
- treeId = _useContext.treeId,
38
- renderItem = _useContext.renderItem;
37
+ treeId = _useContext.treeId;
39
38
  var hasDescendants = Boolean(item.items);
40
39
  var disclosureIconSize = size === 'xs' ? 'xs' : 's';
41
40
  var isDisabledClassName = disabled || isDisabled ? classes.dropdownItemIsDisabled : undefined;
@@ -86,7 +85,7 @@ export var DropdownItem = function DropdownItem(_ref) {
86
85
  "aria-expanded": ariaExpanded,
87
86
  "aria-level": ariaLevel,
88
87
  "aria-label": ariaLabel
89
- }, renderItem ? /*#__PURE__*/React.createElement(RenderItemWrapper, null, renderItem(item)) : /*#__PURE__*/React.createElement(CellWrapper, null, /*#__PURE__*/React.createElement(StyledCell, {
88
+ }, /*#__PURE__*/React.createElement(CellWrapper, null, /*#__PURE__*/React.createElement(StyledCell, {
90
89
  contentLeft: contentLeft,
91
90
  contentRight: contentRight,
92
91
  alignContentLeft: "center",
@@ -1,6 +1,6 @@
1
1
  import styled from 'styled-components';
2
2
  import { classes, tokens, constants } from '../../Dropdown.tokens';
3
- import { addFocus, applyEllipsis } from '../../../../mixins';
3
+ import { addFocus } from '../../../../mixins';
4
4
  import { cellConfig, cellTokens } from '../../../Cell';
5
5
  import { component, mergeConfig } from '../../../../engines';
6
6
  var mergedCellConfig = /*#__PURE__*/mergeConfig(cellConfig);
@@ -35,7 +35,4 @@ export var Wrapper = /*#__PURE__*/styled.li.withConfig({
35
35
  outlineRadius: /*#__PURE__*/"var(".concat(tokens.itemBorderRadius, ")"),
36
36
  hasTransition: false,
37
37
  customFocusRules: /*#__PURE__*/"\n &.".concat(classes.dropdownItemIsFocused, ":before {\n outline: none;\n box-shadow: 0 0 0 0.0625rem var(").concat(constants.focusColor, ");\n }\n ")
38
- }));
39
- export var RenderItemWrapper = /*#__PURE__*/styled.div.withConfig({
40
- componentId: "plasma-new-hope__sc-hs0ek1-5"
41
- })(["", ";flex:1;"], /*#__PURE__*/applyEllipsis());
38
+ }));
@@ -272,6 +272,7 @@ export var selectRoot = function selectRoot(Root) {
272
272
  handleItemClick: handleItemClick,
273
273
  variant: variant,
274
274
  renderItem: renderItem,
275
+ valueToItemMap: valueToItemMap,
275
276
  treeId: treeId
276
277
  }
277
278
  }, /*#__PURE__*/React.createElement(FloatingPopover, {
@@ -32,6 +32,7 @@ export var Item = function Item(_ref) {
32
32
  handleItemClick = _useContext.handleItemClick,
33
33
  variant = _useContext.variant,
34
34
  renderItem = _useContext.renderItem,
35
+ valueToItemMap = _useContext.valueToItemMap,
35
36
  treeId = _useContext.treeId;
36
37
  var itemDisabled = Boolean(disabled || isDisabled);
37
38
  var disabledClassName = itemDisabled ? classes.dropdownItemIsDisabled : undefined;
@@ -86,7 +87,7 @@ export var Item = function Item(_ref) {
86
87
  }))), !multiselect && checked.get(item.value) === 'done' && /*#__PURE__*/React.createElement(IconDone, {
87
88
  size: sizeToIconSize(size, variant),
88
89
  color: "inherit"
89
- })), renderItem ? /*#__PURE__*/React.createElement(StyledText, null, renderItem(item)) : /*#__PURE__*/React.createElement(StyledWrapper, null, /*#__PURE__*/React.createElement(StyledCell, {
90
+ })), renderItem ? /*#__PURE__*/React.createElement(StyledText, null, renderItem(valueToItemMap.get(value))) : /*#__PURE__*/React.createElement(StyledWrapper, null, /*#__PURE__*/React.createElement(StyledCell, {
90
91
  contentLeft: contentLeft,
91
92
  contentRight: contentRight
92
93
  // TODO: #1548
@@ -1,10 +1,4 @@
1
1
  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); }
2
- function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }
3
- function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
4
- function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
5
- function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
6
- function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }
7
- function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
8
2
  import React, { forwardRef } from 'react';
9
3
  import { sizeToIconSize, getItemId } from '../../../../utils';
10
4
  import { classes } from '../../../../Select.tokens';
@@ -16,9 +10,10 @@ export var Textfield = /*#__PURE__*/forwardRef(function (_ref, ref) {
16
10
  multiselect = _ref.multiselect,
17
11
  value = _ref.value,
18
12
  label = _ref.label,
13
+ labelPlacement = _ref.labelPlacement,
14
+ hasPlaceholder = _ref.hasPlaceholder,
19
15
  placeholder = _ref.placeholder,
20
16
  onKeyDown = _ref.onKeyDown,
21
- labelPlacement = _ref.labelPlacement,
22
17
  size = _ref.size,
23
18
  view = _ref.view,
24
19
  handleClickArrow = _ref.handleClickArrow,
@@ -53,24 +48,9 @@ export var Textfield = /*#__PURE__*/forwardRef(function (_ref, ref) {
53
48
 
54
49
  // Обработчик чипов
55
50
  var handleChipsChange = function handleChipsChange(chipLabels) {
56
- if (!Array.isArray(value)) return;
57
-
58
- // TODO: #1564
59
- // Из лейблов чипов получаем value у item и далее прокидываем его в onChange.
60
- if (renderValue && !isTargetAmount) {
61
- var resultValues = _toConsumableArray(value);
62
- value.forEach(function (_, index) {
63
- var labelAfterRenderValue = renderValue(labelToItemMap.get(valueToItemMap.get(value[index]).label));
64
- if (!chipLabels.includes(labelAfterRenderValue)) {
65
- resultValues.splice(index, 1);
66
- }
67
- });
68
- onChange(resultValues);
69
- } else {
70
- onChange(chipLabels.map(function (chipLabel) {
71
- return labelToItemMap.get(chipLabel).value;
72
- }));
73
- }
51
+ onChange(chipLabels.map(function (chipLabel) {
52
+ return labelToItemMap.get(chipLabel).value;
53
+ }));
74
54
  };
75
55
  return /*#__PURE__*/React.createElement(StyledTextField, _extends({
76
56
  ref: ref,
@@ -79,10 +59,16 @@ export var Textfield = /*#__PURE__*/forwardRef(function (_ref, ref) {
79
59
  value: multiselect ? undefined : ((_valueToItemMap$get = valueToItemMap.get(value.toString())) === null || _valueToItemMap$get === void 0 ? void 0 : _valueToItemMap$get.label) || '',
80
60
  size: size,
81
61
  view: view,
82
- chipView: chipView,
62
+ chipView: chipView
63
+ }, labelPlacement === 'inner' ? {
64
+ label: label,
83
65
  labelPlacement: labelPlacement,
84
- disabled: disabled,
66
+ hasPlaceholder: hasPlaceholder
67
+ } : {
85
68
  label: label,
69
+ labelPlacement: labelPlacement
70
+ }, {
71
+ disabled: disabled,
86
72
  placeholder: value instanceof Array && value.length ? '' : placeholder,
87
73
  contentLeft: contentLeft,
88
74
  contentRight: /*#__PURE__*/React.createElement(IconArrowWrapper, {
@@ -1,4 +1,4 @@
1
- var _excluded = ["id", "className", "style", "contentLeft", "contentRight", "label", "labelPlacement", "textBefore", "textAfter", "placeholder", "leftHelper", "enumerationType", "requiredPlacement", "titleCaption", "hintTrigger", "hintText", "hintView", "hintSize", "hintTargetIcon", "hintPlacement", "hintHasArrow", "hintOffset", "hintWidth", "hintContentLeft", "view", "size", "readOnly", "disabled", "required", "clear", "optional", "hasDivider", "value", "chips", "onChange", "onChangeChips", "onSearch", "onKeyDown"];
1
+ var _excluded = ["id", "className", "style", "contentLeft", "contentRight", "label", "labelPlacement", "hasPlaceholder", "textBefore", "textAfter", "placeholder", "leftHelper", "enumerationType", "requiredPlacement", "titleCaption", "hintTrigger", "hintText", "hintView", "hintSize", "hintTargetIcon", "hintPlacement", "hintHasArrow", "hintOffset", "hintWidth", "hintContentLeft", "view", "size", "readOnly", "disabled", "required", "clear", "optional", "hasDivider", "value", "chips", "onChange", "onChangeChips", "onSearch", "onKeyDown"];
2
2
  function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
3
3
  function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
4
4
  function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
@@ -39,6 +39,7 @@ export var textFieldRoot = function textFieldRoot(Root) {
39
39
  contentRight = _ref.contentRight,
40
40
  label = _ref.label,
41
41
  labelPlacement = _ref.labelPlacement,
42
+ hasPlaceholder = _ref.hasPlaceholder,
42
43
  textBefore = _ref.textBefore,
43
44
  textAfter = _ref.textAfter,
44
45
  placeholder = _ref.placeholder,
@@ -114,10 +115,10 @@ export var textFieldRoot = function textFieldRoot(Root) {
114
115
  var hasLabelValue = Boolean(label);
115
116
  var hasInnerLabel = size !== 'xs' && labelPlacement === 'inner' && !isChipsVisible && hasLabelValue;
116
117
  var hasOuterLabel = labelPlacement === 'outer' && hasLabelValue;
117
- var hasPlaceholder = Boolean(placeholder) && !hasInnerLabel;
118
+ var innerHasPlaceholder = Boolean(placeholder) && (hasPlaceholder || !hasInnerLabel);
118
119
  var innerLabelValue = hasInnerLabel || hasOuterLabel ? label : undefined;
119
120
  var innerLabelPlacementValue = labelPlacement === 'inner' && !hasInnerLabel ? undefined : labelPlacement;
120
- var innerPlaceholderValue = hasPlaceholder ? placeholder : undefined;
121
+ var innerPlaceholderValue = innerHasPlaceholder ? placeholder : undefined;
121
122
  var placeholderShown = Boolean(innerPlaceholderValue) && !hasValue;
122
123
  var clearClass = clear ? classes.clear : undefined;
123
124
  var hasDividerClass = hasDivider ? classes.hasDivider : undefined;
@@ -125,6 +126,7 @@ export var textFieldRoot = function textFieldRoot(Root) {
125
126
  var requiredPlacementClass = requiredPlacement === 'right' ? classes.requiredAlignRight : undefined;
126
127
  var labelPlacementClass = innerLabelPlacementValue ? classes["".concat(innerLabelPlacementValue, "LabelPlacement")] : undefined;
127
128
  var hasValueClass = hasValue ? classes.hasValue : undefined;
129
+ var hasPlaceholderClass = innerHasPlaceholder && placeholderShown && classes.forcePlaceholder;
128
130
  var wrapperWithoutLeftContent = !contentLeft && isChipsVisible ? classes.hasEmptyContentLeft : undefined;
129
131
  var wrapperWithoutRightContent = !contentRight && isChipsVisible ? classes.hasEmptyContentRight : undefined;
130
132
  var hintRef = useOutsideClick(function () {
@@ -333,7 +335,7 @@ export var textFieldRoot = function textFieldRoot(Root) {
333
335
  "aria-labelledby": labelId,
334
336
  "aria-describedby": helperTextId,
335
337
  placeholder: innerPlaceholderValue,
336
- className: cx(hasValueClass),
338
+ className: cx(hasValueClass, hasPlaceholderClass),
337
339
  disabled: disabled,
338
340
  readOnly: !disabled && readOnly,
339
341
  onInput: handleInput,
@@ -342,7 +344,9 @@ export var textFieldRoot = function textFieldRoot(Root) {
342
344
  }, rest)), hasInnerLabel && /*#__PURE__*/React.createElement(Label, {
343
345
  id: labelId,
344
346
  htmlFor: innerId
345
- }, innerLabelValue, optionalTextNode), placeholderShown && !hasValue && /*#__PURE__*/React.createElement(InputPlaceholder, null, innerPlaceholderValue, hasPlaceholderOptional && optionalTextNode)), textAfter && /*#__PURE__*/React.createElement(StyledTextAfter, null, textAfter)), contentRight && /*#__PURE__*/React.createElement(StyledContentRight, null, contentRight)), leftHelper && /*#__PURE__*/React.createElement(LeftHelper, {
347
+ }, innerLabelValue, optionalTextNode), placeholderShown && !hasValue && /*#__PURE__*/React.createElement(InputPlaceholder, {
348
+ hasPadding: hasPlaceholder && size !== 'xs'
349
+ }, innerPlaceholderValue, hasPlaceholderOptional && optionalTextNode)), textAfter && /*#__PURE__*/React.createElement(StyledTextAfter, null, textAfter)), contentRight && /*#__PURE__*/React.createElement(StyledContentRight, null, contentRight)), leftHelper && /*#__PURE__*/React.createElement(LeftHelper, {
346
350
  id: helperTextId
347
351
  }, leftHelper));
348
352
  });
@@ -24,11 +24,14 @@ export var InputContainer = /*#__PURE__*/styled.div.withConfig({
24
24
  })(["position:relative;flex:1;min-width:60%;"]);
25
25
  export var InputPlaceholder = /*#__PURE__*/styled.div.withConfig({
26
26
  componentId: "plasma-new-hope__sc-g4vxbb-6"
27
- })(["position:absolute;top:0;left:0;right:0;bottom:0;z-index:0;white-space:nowrap;pointer-events:none;user-select:none;font:inherit;letter-spacing:inherit;line-height:inherit;color:var(", ");"], tokens.placeholderColor);
27
+ })(["position:absolute;top:0;left:0;right:0;bottom:0;z-index:0;white-space:nowrap;pointer-events:none;user-select:none;font:inherit;letter-spacing:inherit;line-height:inherit;color:var(", ");padding:", ";"], tokens.placeholderColor, function (_ref) {
28
+ var hasPadding = _ref.hasPadding;
29
+ return hasPadding ? "var(".concat(tokens.contentLabelInnerPadding, ")") : '0';
30
+ });
28
31
  export var OuterLabelWrapper = /*#__PURE__*/styled.div.withConfig({
29
32
  componentId: "plasma-new-hope__sc-g4vxbb-7"
30
- })(["display:flex;align-items:center;margin-bottom:", ";"], function (_ref) {
31
- var isInnerLabel = _ref.isInnerLabel;
33
+ })(["display:flex;align-items:center;margin-bottom:", ";"], function (_ref2) {
34
+ var isInnerLabel = _ref2.isInnerLabel;
32
35
  return isInnerLabel ? "var(".concat(tokens.titleCaptionInnerLabelOffset, ")") : "var(".concat(tokens.labelOffset, ")");
33
36
  });
34
37
  export var TitleCaption = /*#__PURE__*/styled.div.withConfig({
@@ -42,9 +45,9 @@ export var Label = /*#__PURE__*/styled.label.withConfig({
42
45
  })(["display:inline-flex;"]);
43
46
  export var StyledContentLeft = /*#__PURE__*/styled.div.withConfig({
44
47
  componentId: "plasma-new-hope__sc-g4vxbb-11"
45
- })(["margin:var(", ");color:", ";line-height:0;"], tokens.leftContentMargin, function (_ref2) {
46
- var isDefaultView = _ref2.isDefaultView,
47
- isClear = _ref2.isClear;
48
+ })(["margin:var(", ");color:", ";line-height:0;"], tokens.leftContentMargin, function (_ref3) {
49
+ var isDefaultView = _ref3.isDefaultView,
50
+ isClear = _ref3.isClear;
48
51
  return !isDefaultView && isClear ? "var(".concat(tokens.clearColor, ")") : "var(".concat(tokens.contentSlotColor, ")");
49
52
  });
50
53
  export var StyledContentRight = /*#__PURE__*/styled.div.withConfig({
@@ -1,6 +1,7 @@
1
1
  export var classes = {
2
2
  hasChips: 'has-chips',
3
3
  hasValue: 'has-value',
4
+ forcePlaceholder: 'force-placeholder',
4
5
  hasEmptyContentLeft: 'has-empty-content-left',
5
6
  hasEmptyContentRight: 'has-empty-content-right',
6
7
  innerLabelPlacement: 'label-placement-inner',
@@ -1,4 +1,4 @@
1
1
  import { css } from 'styled-components';
2
2
  import { classes, tokens } from '../../TextField.tokens';
3
3
  import { Input, InputContainer, Label, StyledTextAfter, StyledTextBefore } from '../../TextField.styles';
4
- export var base = /*#__PURE__*/css(["&.", "{", "{position:relative;display:inline-block;color:var(", ");}}&.", "{", "{padding:var(", ");}", ",", "{padding:var(", ");}", ":focus ~ ", ",", ".", " ~ ", "{color:var(", ");align-items:flex-start;padding:var(", ");font-family:var(", ");font-size:var(", ");font-style:var(", ");font-weight:var(", ");letter-spacing:var(", ");line-height:var(", ");}", "{color:var(", ");pointer-events:none;position:absolute;top:0;display:flex;align-items:center;box-sizing:border-box;height:var(", ");padding-top:calc(calc(var(", ") - var(", ")) / 2);padding-bottom:calc(calc(var(", ") - var(", ")) / 2);}&.", " ", "{color:var(", ");}}"], classes.outerLabelPlacement, Label, tokens.labelColor, classes.innerLabelPlacement, InputContainer, tokens.contentLabelInnerPadding, StyledTextAfter, StyledTextBefore, tokens.contentLabelInnerPadding, Input, Label, Input, classes.hasValue, Label, tokens.placeholderColor, tokens.labelInnerPadding, tokens.labelInnerFontFamily, tokens.labelInnerFontSize, tokens.labelInnerFontStyle, tokens.labelInnerFontWeight, tokens.labelInnerLetterSpacing, tokens.labelInnerLineHeight, Label, tokens.placeholderColor, tokens.height, tokens.height, tokens.labelLineHeight, tokens.height, tokens.labelLineHeight, classes.clear, Label, tokens.clearPlaceholderColor);
4
+ export var base = /*#__PURE__*/css(["&.", "{", "{position:relative;display:inline-block;color:var(", ");}}&.", "{", "{padding:var(", ");}", ",", "{padding:var(", ");}", ":focus ~ ", ",", ".", " ~ ", ",", ".", " ~ ", "{color:var(", ");align-items:flex-start;padding:var(", ");font-family:var(", ");font-size:var(", ");font-style:var(", ");font-weight:var(", ");letter-spacing:var(", ");line-height:var(", ");}", "{color:var(", ");pointer-events:none;position:absolute;top:0;display:flex;align-items:center;box-sizing:border-box;height:var(", ");padding-top:calc(calc(var(", ") - var(", ")) / 2);padding-bottom:calc(calc(var(", ") - var(", ")) / 2);}&.", " ", "{color:var(", ");}}"], classes.outerLabelPlacement, Label, tokens.labelColor, classes.innerLabelPlacement, InputContainer, tokens.contentLabelInnerPadding, StyledTextAfter, StyledTextBefore, tokens.contentLabelInnerPadding, Input, Label, Input, classes.hasValue, Label, Input, classes.forcePlaceholder, Label, tokens.placeholderColor, tokens.labelInnerPadding, tokens.labelInnerFontFamily, tokens.labelInnerFontSize, tokens.labelInnerFontStyle, tokens.labelInnerFontWeight, tokens.labelInnerLetterSpacing, tokens.labelInnerLineHeight, Label, tokens.placeholderColor, tokens.height, tokens.height, tokens.labelLineHeight, tokens.height, tokens.labelLineHeight, classes.clear, Label, tokens.clearPlaceholderColor);
@@ -87,6 +87,12 @@ const meta: Meta<typeof TextField> = {
87
87
  type: 'inline-radio',
88
88
  },
89
89
  },
90
+ hasPlaceholder: {
91
+ control: {
92
+ type: 'boolean',
93
+ },
94
+ if: { arg: 'labelPlacement', eq: 'inner' },
95
+ },
90
96
  size: {
91
97
  options: sizes,
92
98
  control: {
@@ -210,6 +216,7 @@ export const Default: StoryObj<StoryPropsDefault> = {
210
216
  view: 'default',
211
217
  label: 'Лейбл',
212
218
  labelPlacement: 'outer',
219
+ hasPlaceholder: false,
213
220
  titleCaption: 'Подпись к полю',
214
221
  textBefore: '',
215
222
  textAfter: '',
@@ -87,6 +87,12 @@ const meta: Meta<typeof TextField> = {
87
87
  type: 'inline-radio',
88
88
  },
89
89
  },
90
+ hasPlaceholder: {
91
+ control: {
92
+ type: 'boolean',
93
+ },
94
+ if: { arg: 'labelPlacement', eq: 'inner' },
95
+ },
90
96
  size: {
91
97
  options: sizes,
92
98
  control: {
@@ -210,6 +216,7 @@ export const Default: StoryObj<StoryPropsDefault> = {
210
216
  view: 'default',
211
217
  label: 'Лейбл',
212
218
  labelPlacement: 'outer',
219
+ hasPlaceholder: false,
213
220
  titleCaption: 'Подпись к полю',
214
221
  textBefore: '',
215
222
  textAfter: '',
@@ -219,11 +226,11 @@ export const Default: StoryObj<StoryPropsDefault> = {
219
226
  readOnly: false,
220
227
  enableContentLeft: true,
221
228
  enableContentRight: true,
222
- clear: false,
223
- hasDivider: false,
224
229
  optional: false,
225
230
  required: false,
226
231
  requiredPlacement: 'right',
232
+ clear: false,
233
+ hasDivider: false,
227
234
  hasHint: true,
228
235
  hintText: 'Текст подсказки',
229
236
  hintTrigger: 'hover',
@@ -1 +1 @@
1
- {"version":3,"file":"Autocomplete.d.ts","sourceRoot":"","sources":["../../../src/components/Autocomplete/Autocomplete.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA2C,MAAM,OAAO,CAAC;AAIhE,OAAO,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAM1C,OAAO,KAAK,EAAE,iBAAiB,EAAsB,MAAM,sBAAsB,CAAC;AAGlF;;GAEG;AACH,eAAO,MAAM,gBAAgB,SAAU,UAAU,gBAAgB,EAAE,iBAAiB,CAAC,+FAuLhF,CAAC;AAEN,eAAO,MAAM,kBAAkB;;;mBAzLQ,UAAU,gBAAgB,EAAE,iBAAiB,CAAC;;;;;;;;;;;;CAwMpF,CAAC"}
1
+ {"version":3,"file":"Autocomplete.d.ts","sourceRoot":"","sources":["../../../src/components/Autocomplete/Autocomplete.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA2C,MAAM,OAAO,CAAC;AAIhE,OAAO,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAM1C,OAAO,KAAK,EAAE,iBAAiB,EAAsB,MAAM,sBAAsB,CAAC;AAGlF;;GAEG;AACH,eAAO,MAAM,gBAAgB,SAAU,UAAU,gBAAgB,EAAE,iBAAiB,CAAC,+FA8LhF,CAAC;AAEN,eAAO,MAAM,kBAAkB;;;mBAhMQ,UAAU,gBAAgB,EAAE,iBAAiB,CAAC;;;;;;;;;;;;CA+MpF,CAAC"}