@salutejs/plasma-new-hope 0.195.0-canary.1546.11913646617.0 → 0.195.0-canary.1556.11915399849.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (277) 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/Badge/Badge.css +4 -4
  5. package/cjs/components/Badge/Badge.js +7 -17
  6. package/cjs/components/Badge/Badge.js.map +1 -1
  7. package/cjs/components/Badge/Badge.tokens.js +5 -10
  8. package/cjs/components/Badge/Badge.tokens.js.map +1 -1
  9. package/cjs/components/Badge/variations/_clear/base.js +1 -1
  10. package/cjs/components/Badge/variations/_clear/base.js.map +1 -1
  11. package/cjs/components/Badge/variations/_clear/base_oopyb7.css +1 -0
  12. package/cjs/components/Badge/variations/_size/base.js +1 -1
  13. package/cjs/components/Badge/variations/_size/base.js.map +1 -1
  14. package/{es/components/Badge/variations/_size/base_bu5opk.css → cjs/components/Badge/variations/_size/base_to0y5x.css} +1 -1
  15. package/cjs/components/Badge/variations/_transparent/base.js +1 -1
  16. package/cjs/components/Badge/variations/_transparent/base.js.map +1 -1
  17. package/cjs/components/Badge/variations/_transparent/base_1l6036y.css +1 -0
  18. package/cjs/components/Badge/variations/_view/base.js +1 -1
  19. package/cjs/components/Badge/variations/_view/base.js.map +1 -1
  20. package/cjs/components/Badge/variations/_view/base_qlxank.css +1 -0
  21. package/cjs/components/Combobox/ComboboxNew/Combobox.css +17 -17
  22. package/cjs/components/Combobox/ComboboxNew/Combobox.js +7 -2
  23. package/cjs/components/Combobox/ComboboxNew/Combobox.js.map +1 -1
  24. package/cjs/components/Combobox/ComboboxNew/ui/Inner/Inner.css +17 -17
  25. package/cjs/components/Combobox/ComboboxNew/ui/Inner/ui/Item/Item.css +17 -17
  26. package/cjs/components/DatePicker/RangeDate/RangeDate.css +17 -17
  27. package/cjs/components/DatePicker/RangeDate/RangeDatePopover/RangeDatePopover.css +17 -17
  28. package/cjs/components/DatePicker/SingleDate/SingleDate.css +17 -17
  29. package/cjs/components/DatePicker/SingleDate/SingleDate.js +9 -4
  30. package/cjs/components/DatePicker/SingleDate/SingleDate.js.map +1 -1
  31. package/cjs/components/Pagination/Pagination.css +17 -17
  32. package/cjs/components/Pagination/ui/PaginationSelectPerPage/PaginationSelectPerPage.css +17 -17
  33. package/cjs/components/Range/Range.css +17 -17
  34. package/cjs/components/Select/Select.css +17 -17
  35. package/cjs/components/Select/ui/Inner/Inner.css +17 -17
  36. package/cjs/components/Select/ui/Inner/ui/Item/Item.css +17 -17
  37. package/cjs/components/Select/ui/Target/Target.css +17 -17
  38. package/cjs/components/Select/ui/Target/ui/Textfield/Textfield.css +17 -17
  39. package/cjs/components/Select/ui/Target/ui/Textfield/Textfield.js +10 -3
  40. package/cjs/components/Select/ui/Target/ui/Textfield/Textfield.js.map +1 -1
  41. package/cjs/components/Slider/Slider.css +17 -17
  42. package/cjs/components/Slider/components/Double/Double.css +17 -17
  43. package/cjs/components/Slider/components/DoubleUncontrolled/DoubleUncontrolled.css +17 -17
  44. package/cjs/components/TextField/TextField.js +9 -5
  45. package/cjs/components/TextField/TextField.js.map +1 -1
  46. package/cjs/components/TextField/TextField.styles.js +20 -11
  47. package/cjs/components/TextField/TextField.styles.js.map +1 -1
  48. package/cjs/components/TextField/{TextField.styles_j7dqpn.css → TextField.styles_ppcxpx.css} +1 -1
  49. package/cjs/components/TextField/TextField.tokens.js +1 -0
  50. package/cjs/components/TextField/TextField.tokens.js.map +1 -1
  51. package/cjs/components/TextField/ui/Hint/Hint.css +20 -20
  52. package/cjs/components/TextField/variations/_label-placement/base.js +1 -1
  53. package/cjs/components/TextField/variations/_label-placement/base.js.map +1 -1
  54. package/cjs/components/TextField/variations/_label-placement/base_y1lvvc.css +1 -0
  55. package/cjs/index.css +21 -21
  56. package/emotion/cjs/components/Autocomplete/Autocomplete.js +7 -1
  57. package/emotion/cjs/components/Badge/Badge.js +7 -17
  58. package/emotion/cjs/components/Badge/Badge.template-doc.mdx +16 -40
  59. package/emotion/cjs/components/Badge/Badge.tokens.js +6 -10
  60. package/emotion/cjs/components/Badge/variations/_clear/base.js +1 -1
  61. package/emotion/cjs/components/Badge/variations/_size/base.js +1 -2
  62. package/emotion/cjs/components/Badge/variations/_transparent/base.js +1 -1
  63. package/emotion/cjs/components/Badge/variations/_view/base.js +1 -1
  64. package/emotion/cjs/components/Combobox/ComboboxNew/Combobox.js +7 -2
  65. package/emotion/cjs/components/DatePicker/SingleDate/SingleDate.js +9 -4
  66. package/emotion/cjs/components/Select/ui/Target/ui/Textfield/Textfield.js +10 -3
  67. package/emotion/cjs/components/TextField/TextField.js +10 -6
  68. package/emotion/cjs/components/TextField/TextField.styles.js +29 -26
  69. package/emotion/cjs/components/TextField/TextField.tokens.js +1 -0
  70. package/emotion/cjs/components/TextField/variations/_label-placement/base.js +1 -1
  71. package/emotion/cjs/examples/plasma_b2c/components/Badge/Badge.config.js +15 -15
  72. package/emotion/cjs/examples/plasma_b2c/components/Badge/Badge.stories.tsx +6 -23
  73. package/emotion/cjs/examples/plasma_b2c/components/TextField/TextField.stories.tsx +7 -0
  74. package/emotion/cjs/examples/plasma_web/components/Badge/Badge.config.js +14 -14
  75. package/emotion/cjs/examples/plasma_web/components/Badge/Badge.stories.tsx +6 -27
  76. package/emotion/cjs/examples/plasma_web/components/TextField/TextField.stories.tsx +9 -2
  77. package/emotion/es/components/Autocomplete/Autocomplete.js +7 -1
  78. package/emotion/es/components/Badge/Badge.js +8 -18
  79. package/emotion/es/components/Badge/Badge.template-doc.mdx +16 -40
  80. package/emotion/es/components/Badge/Badge.tokens.js +5 -9
  81. package/emotion/es/components/Badge/variations/_clear/base.js +2 -2
  82. package/emotion/es/components/Badge/variations/_size/base.js +2 -3
  83. package/emotion/es/components/Badge/variations/_transparent/base.js +2 -2
  84. package/emotion/es/components/Badge/variations/_view/base.js +2 -2
  85. package/emotion/es/components/Combobox/ComboboxNew/Combobox.js +7 -2
  86. package/emotion/es/components/DatePicker/SingleDate/SingleDate.js +9 -4
  87. package/emotion/es/components/Select/ui/Target/ui/Textfield/Textfield.js +10 -3
  88. package/emotion/es/components/TextField/TextField.js +10 -6
  89. package/emotion/es/components/TextField/TextField.styles.js +29 -26
  90. package/emotion/es/components/TextField/TextField.tokens.js +1 -0
  91. package/emotion/es/components/TextField/variations/_label-placement/base.js +1 -1
  92. package/emotion/es/examples/plasma_b2c/components/Badge/Badge.config.js +15 -15
  93. package/emotion/es/examples/plasma_b2c/components/Badge/Badge.stories.tsx +6 -23
  94. package/emotion/es/examples/plasma_b2c/components/TextField/TextField.stories.tsx +7 -0
  95. package/emotion/es/examples/plasma_web/components/Badge/Badge.config.js +14 -14
  96. package/emotion/es/examples/plasma_web/components/Badge/Badge.stories.tsx +6 -27
  97. package/emotion/es/examples/plasma_web/components/TextField/TextField.stories.tsx +9 -2
  98. package/es/components/Autocomplete/Autocomplete.css +17 -17
  99. package/es/components/Autocomplete/Autocomplete.js +7 -1
  100. package/es/components/Autocomplete/Autocomplete.js.map +1 -1
  101. package/es/components/Badge/Badge.css +4 -4
  102. package/es/components/Badge/Badge.js +10 -20
  103. package/es/components/Badge/Badge.js.map +1 -1
  104. package/es/components/Badge/Badge.tokens.js +6 -10
  105. package/es/components/Badge/Badge.tokens.js.map +1 -1
  106. package/es/components/Badge/variations/_clear/base.js +1 -1
  107. package/es/components/Badge/variations/_clear/base.js.map +1 -1
  108. package/es/components/Badge/variations/_clear/base_oopyb7.css +1 -0
  109. package/es/components/Badge/variations/_size/base.js +1 -1
  110. package/es/components/Badge/variations/_size/base.js.map +1 -1
  111. package/{cjs/components/Badge/variations/_size/base_bu5opk.css → es/components/Badge/variations/_size/base_to0y5x.css} +1 -1
  112. package/es/components/Badge/variations/_transparent/base.js +1 -1
  113. package/es/components/Badge/variations/_transparent/base.js.map +1 -1
  114. package/es/components/Badge/variations/_transparent/base_1l6036y.css +1 -0
  115. package/es/components/Badge/variations/_view/base.js +1 -1
  116. package/es/components/Badge/variations/_view/base.js.map +1 -1
  117. package/es/components/Badge/variations/_view/base_qlxank.css +1 -0
  118. package/es/components/Combobox/ComboboxNew/Combobox.css +17 -17
  119. package/es/components/Combobox/ComboboxNew/Combobox.js +7 -2
  120. package/es/components/Combobox/ComboboxNew/Combobox.js.map +1 -1
  121. package/es/components/Combobox/ComboboxNew/ui/Inner/Inner.css +17 -17
  122. package/es/components/Combobox/ComboboxNew/ui/Inner/ui/Item/Item.css +17 -17
  123. package/es/components/DatePicker/RangeDate/RangeDate.css +17 -17
  124. package/es/components/DatePicker/RangeDate/RangeDatePopover/RangeDatePopover.css +17 -17
  125. package/es/components/DatePicker/SingleDate/SingleDate.css +17 -17
  126. package/es/components/DatePicker/SingleDate/SingleDate.js +9 -4
  127. package/es/components/DatePicker/SingleDate/SingleDate.js.map +1 -1
  128. package/es/components/Pagination/Pagination.css +17 -17
  129. package/es/components/Pagination/ui/PaginationSelectPerPage/PaginationSelectPerPage.css +17 -17
  130. package/es/components/Range/Range.css +17 -17
  131. package/es/components/Select/Select.css +17 -17
  132. package/es/components/Select/ui/Inner/Inner.css +17 -17
  133. package/es/components/Select/ui/Inner/ui/Item/Item.css +17 -17
  134. package/es/components/Select/ui/Target/Target.css +17 -17
  135. package/es/components/Select/ui/Target/ui/Textfield/Textfield.css +17 -17
  136. package/es/components/Select/ui/Target/ui/Textfield/Textfield.js +10 -3
  137. package/es/components/Select/ui/Target/ui/Textfield/Textfield.js.map +1 -1
  138. package/es/components/Slider/Slider.css +17 -17
  139. package/es/components/Slider/components/Double/Double.css +17 -17
  140. package/es/components/Slider/components/DoubleUncontrolled/DoubleUncontrolled.css +17 -17
  141. package/es/components/TextField/TextField.js +9 -5
  142. package/es/components/TextField/TextField.js.map +1 -1
  143. package/es/components/TextField/TextField.styles.js +20 -11
  144. package/es/components/TextField/TextField.styles.js.map +1 -1
  145. package/es/components/TextField/{TextField.styles_j7dqpn.css → TextField.styles_ppcxpx.css} +1 -1
  146. package/es/components/TextField/TextField.tokens.js +1 -0
  147. package/es/components/TextField/TextField.tokens.js.map +1 -1
  148. package/es/components/TextField/ui/Hint/Hint.css +20 -20
  149. package/es/components/TextField/variations/_label-placement/base.js +1 -1
  150. package/es/components/TextField/variations/_label-placement/base.js.map +1 -1
  151. package/es/components/TextField/variations/_label-placement/base_y1lvvc.css +1 -0
  152. package/es/index.css +21 -21
  153. package/package.json +2 -2
  154. package/styled-components/cjs/components/Autocomplete/Autocomplete.js +7 -1
  155. package/styled-components/cjs/components/Badge/Badge.js +7 -17
  156. package/styled-components/cjs/components/Badge/Badge.template-doc.mdx +16 -40
  157. package/styled-components/cjs/components/Badge/Badge.tokens.js +6 -10
  158. package/styled-components/cjs/components/Badge/variations/_clear/base.js +1 -1
  159. package/styled-components/cjs/components/Badge/variations/_size/base.js +1 -2
  160. package/styled-components/cjs/components/Badge/variations/_transparent/base.js +1 -1
  161. package/styled-components/cjs/components/Badge/variations/_view/base.js +1 -1
  162. package/styled-components/cjs/components/Combobox/ComboboxNew/Combobox.js +7 -2
  163. package/styled-components/cjs/components/DatePicker/SingleDate/SingleDate.js +9 -4
  164. package/styled-components/cjs/components/Select/ui/Target/ui/Textfield/Textfield.js +10 -3
  165. package/styled-components/cjs/components/TextField/TextField.js +9 -5
  166. package/styled-components/cjs/components/TextField/TextField.styles.js +9 -6
  167. package/styled-components/cjs/components/TextField/TextField.tokens.js +1 -0
  168. package/styled-components/cjs/components/TextField/variations/_label-placement/base.js +1 -1
  169. package/styled-components/cjs/examples/plasma_b2c/components/Badge/Badge.config.js +5 -5
  170. package/styled-components/cjs/examples/plasma_b2c/components/Badge/Badge.stories.tsx +6 -23
  171. package/styled-components/cjs/examples/plasma_b2c/components/TextField/TextField.stories.tsx +7 -0
  172. package/styled-components/cjs/examples/plasma_web/components/Badge/Badge.config.js +5 -5
  173. package/styled-components/cjs/examples/plasma_web/components/Badge/Badge.stories.tsx +6 -27
  174. package/styled-components/cjs/examples/plasma_web/components/TextField/TextField.stories.tsx +9 -2
  175. package/styled-components/es/components/Autocomplete/Autocomplete.js +7 -1
  176. package/styled-components/es/components/Badge/Badge.js +8 -18
  177. package/styled-components/es/components/Badge/Badge.template-doc.mdx +16 -40
  178. package/styled-components/es/components/Badge/Badge.tokens.js +5 -9
  179. package/styled-components/es/components/Badge/variations/_clear/base.js +2 -2
  180. package/styled-components/es/components/Badge/variations/_size/base.js +2 -3
  181. package/styled-components/es/components/Badge/variations/_transparent/base.js +2 -2
  182. package/styled-components/es/components/Badge/variations/_view/base.js +2 -2
  183. package/styled-components/es/components/Combobox/ComboboxNew/Combobox.js +7 -2
  184. package/styled-components/es/components/DatePicker/SingleDate/SingleDate.js +9 -4
  185. package/styled-components/es/components/Select/ui/Target/ui/Textfield/Textfield.js +10 -3
  186. package/styled-components/es/components/TextField/TextField.js +9 -5
  187. package/styled-components/es/components/TextField/TextField.styles.js +9 -6
  188. package/styled-components/es/components/TextField/TextField.tokens.js +1 -0
  189. package/styled-components/es/components/TextField/variations/_label-placement/base.js +1 -1
  190. package/styled-components/es/examples/plasma_b2c/components/Badge/Badge.config.js +5 -5
  191. package/styled-components/es/examples/plasma_b2c/components/Badge/Badge.stories.tsx +6 -23
  192. package/styled-components/es/examples/plasma_b2c/components/TextField/TextField.stories.tsx +7 -0
  193. package/styled-components/es/examples/plasma_web/components/Badge/Badge.config.js +5 -5
  194. package/styled-components/es/examples/plasma_web/components/Badge/Badge.stories.tsx +6 -27
  195. package/styled-components/es/examples/plasma_web/components/TextField/TextField.stories.tsx +9 -2
  196. package/types/components/Autocomplete/Autocomplete.d.ts.map +1 -1
  197. package/types/components/Autocomplete/ui/TextField/TextField.styles.d.ts +717 -61
  198. package/types/components/Autocomplete/ui/TextField/TextField.styles.d.ts.map +1 -1
  199. package/types/components/Badge/Badge.d.ts.map +1 -1
  200. package/types/components/Badge/Badge.tokens.d.ts +4 -8
  201. package/types/components/Badge/Badge.tokens.d.ts.map +1 -1
  202. package/types/components/Badge/Badge.types.d.ts +5 -18
  203. package/types/components/Badge/Badge.types.d.ts.map +1 -1
  204. package/types/components/Badge/variations/_clear/base.d.ts.map +1 -1
  205. package/types/components/Badge/variations/_size/base.d.ts.map +1 -1
  206. package/types/components/Combobox/ComboboxNew/Combobox.d.ts.map +1 -1
  207. package/types/components/Combobox/ComboboxNew/Combobox.types.d.ts +30 -10
  208. package/types/components/Combobox/ComboboxNew/Combobox.types.d.ts.map +1 -1
  209. package/types/components/Combobox/ComboboxNew/ui/Target/Target.styles.d.ts +717 -61
  210. package/types/components/Combobox/ComboboxNew/ui/Target/Target.styles.d.ts.map +1 -1
  211. package/types/components/DatePicker/SingleDate/SingleDate.d.ts +2 -2
  212. package/types/components/DatePicker/SingleDate/SingleDate.d.ts.map +1 -1
  213. package/types/components/DatePicker/SingleDate/SingleDate.styles.d.ts +717 -61
  214. package/types/components/DatePicker/SingleDate/SingleDate.styles.d.ts.map +1 -1
  215. package/types/components/DatePicker/SingleDate/SingleDate.types.d.ts +28 -9
  216. package/types/components/DatePicker/SingleDate/SingleDate.types.d.ts.map +1 -1
  217. package/types/components/Pagination/ui/PaginationSelectPerPage/PaginationSelectPerPage.styles.d.ts +176 -4
  218. package/types/components/Pagination/ui/PaginationSelectPerPage/PaginationSelectPerPage.styles.d.ts.map +1 -1
  219. package/types/components/Range/Range.styles.d.ts +717 -61
  220. package/types/components/Range/Range.styles.d.ts.map +1 -1
  221. package/types/components/Select/Select.types.d.ts +30 -10
  222. package/types/components/Select/Select.types.d.ts.map +1 -1
  223. package/types/components/Select/ui/Target/Target.d.ts +1 -1
  224. package/types/components/Select/ui/Target/Target.types.d.ts +1 -1
  225. package/types/components/Select/ui/Target/Target.types.d.ts.map +1 -1
  226. package/types/components/Select/ui/Target/ui/Textfield/Textfield.d.ts.map +1 -1
  227. package/types/components/Select/ui/Target/ui/Textfield/Textfield.styles.d.ts +717 -61
  228. package/types/components/Select/ui/Target/ui/Textfield/Textfield.styles.d.ts.map +1 -1
  229. package/types/components/Select/ui/Target/ui/Textfield/Textfield.types.d.ts +1 -1
  230. package/types/components/Select/ui/Target/ui/Textfield/Textfield.types.d.ts.map +1 -1
  231. package/types/components/Slider/components/Double/Double.styles.d.ts +717 -61
  232. package/types/components/Slider/components/Double/Double.styles.d.ts.map +1 -1
  233. package/types/components/TextField/TextField.d.ts.map +1 -1
  234. package/types/components/TextField/TextField.styles.d.ts +3 -1
  235. package/types/components/TextField/TextField.styles.d.ts.map +1 -1
  236. package/types/components/TextField/TextField.tokens.d.ts +1 -0
  237. package/types/components/TextField/TextField.tokens.d.ts.map +1 -1
  238. package/types/components/TextField/TextField.types.d.ts +43 -20
  239. package/types/components/TextField/TextField.types.d.ts.map +1 -1
  240. package/types/examples/plasma_b2c/components/Autocomplete/Autocomplete.d.ts +3 -5
  241. package/types/examples/plasma_b2c/components/Autocomplete/Autocomplete.d.ts.map +1 -1
  242. package/types/examples/plasma_b2c/components/Badge/Badge.config.d.ts.map +1 -1
  243. package/types/examples/plasma_b2c/components/Badge/Badge.d.ts +4 -61
  244. package/types/examples/plasma_b2c/components/Badge/Badge.d.ts.map +1 -1
  245. package/types/examples/plasma_b2c/components/Combobox/Combobox.d.ts +1045 -133
  246. package/types/examples/plasma_b2c/components/Combobox/Combobox.d.ts.map +1 -1
  247. package/types/examples/plasma_b2c/components/DatePicker/DatePicker.d.ts +47 -1
  248. package/types/examples/plasma_b2c/components/DatePicker/DatePicker.d.ts.map +1 -1
  249. package/types/examples/plasma_b2c/components/Mask/Mask.d.ts +1246 -62
  250. package/types/examples/plasma_b2c/components/Mask/Mask.d.ts.map +1 -1
  251. package/types/examples/plasma_b2c/components/Select/Select.d.ts +176 -4
  252. package/types/examples/plasma_b2c/components/Select/Select.d.ts.map +1 -1
  253. package/types/examples/plasma_b2c/components/TextField/TextField.d.ts +717 -61
  254. package/types/examples/plasma_b2c/components/TextField/TextField.d.ts.map +1 -1
  255. package/types/examples/plasma_web/components/Autocomplete/Autocomplete.d.ts +3 -5
  256. package/types/examples/plasma_web/components/Autocomplete/Autocomplete.d.ts.map +1 -1
  257. package/types/examples/plasma_web/components/Badge/Badge.config.d.ts.map +1 -1
  258. package/types/examples/plasma_web/components/Badge/Badge.d.ts +4 -61
  259. package/types/examples/plasma_web/components/Badge/Badge.d.ts.map +1 -1
  260. package/types/examples/plasma_web/components/Combobox/Combobox.d.ts +1045 -133
  261. package/types/examples/plasma_web/components/Combobox/Combobox.d.ts.map +1 -1
  262. package/types/examples/plasma_web/components/DatePicker/DatePicker.d.ts +47 -1
  263. package/types/examples/plasma_web/components/DatePicker/DatePicker.d.ts.map +1 -1
  264. package/types/examples/plasma_web/components/Mask/Mask.d.ts +1246 -62
  265. package/types/examples/plasma_web/components/Mask/Mask.d.ts.map +1 -1
  266. package/types/examples/plasma_web/components/Select/Select.d.ts +176 -4
  267. package/types/examples/plasma_web/components/Select/Select.d.ts.map +1 -1
  268. package/types/examples/plasma_web/components/TextField/TextField.d.ts +717 -61
  269. package/types/examples/plasma_web/components/TextField/TextField.d.ts.map +1 -1
  270. package/cjs/components/Badge/variations/_clear/base_wiboj8.css +0 -1
  271. package/cjs/components/Badge/variations/_transparent/base_aapqhz.css +0 -1
  272. package/cjs/components/Badge/variations/_view/base_j3xzf3.css +0 -1
  273. package/cjs/components/TextField/variations/_label-placement/base_gttvto.css +0 -1
  274. package/es/components/Badge/variations/_clear/base_wiboj8.css +0 -1
  275. package/es/components/Badge/variations/_transparent/base_aapqhz.css +0 -1
  276. package/es/components/Badge/variations/_view/base_j3xzf3.css +0 -1
  277. package/es/components/TextField/variations/_label-placement/base_gttvto.css +0 -1
@@ -10,9 +10,10 @@ export var Textfield = /*#__PURE__*/forwardRef(function (_ref, ref) {
10
10
  multiselect = _ref.multiselect,
11
11
  value = _ref.value,
12
12
  label = _ref.label,
13
+ labelPlacement = _ref.labelPlacement,
14
+ hasPlaceholder = _ref.hasPlaceholder,
13
15
  placeholder = _ref.placeholder,
14
16
  onKeyDown = _ref.onKeyDown,
15
- labelPlacement = _ref.labelPlacement,
16
17
  size = _ref.size,
17
18
  view = _ref.view,
18
19
  handleClickArrow = _ref.handleClickArrow,
@@ -58,10 +59,16 @@ export var Textfield = /*#__PURE__*/forwardRef(function (_ref, ref) {
58
59
  value: multiselect ? undefined : ((_valueToItemMap$get = valueToItemMap.get(value.toString())) === null || _valueToItemMap$get === void 0 ? void 0 : _valueToItemMap$get.label) || '',
59
60
  size: size,
60
61
  view: view,
61
- chipView: chipView,
62
+ chipView: chipView
63
+ }, labelPlacement === 'inner' ? {
64
+ label: label,
62
65
  labelPlacement: labelPlacement,
63
- disabled: disabled,
66
+ hasPlaceholder: hasPlaceholder
67
+ } : {
64
68
  label: label,
69
+ labelPlacement: labelPlacement
70
+ }, {
71
+ disabled: disabled,
65
72
  placeholder: value instanceof Array && value.length ? '' : placeholder,
66
73
  contentLeft: contentLeft,
67
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);
@@ -16,10 +16,10 @@ export var config = {
16
16
  light: /*#__PURE__*/css(["", ":var(--on-light-text-primary);", ":var(--on-dark-surface-solid-default);", ":var(--on-dark-text-primary);", ":var(--on-dark-surface-transparent-card);", ":var(--on-dark-text-primary);"], badgeTokens.color, badgeTokens.background, badgeTokens.colorTransparent, badgeTokens.backgroundTransparent, badgeTokens.colorClear)
17
17
  },
18
18
  size: {
19
- l: /*#__PURE__*/css(["", ":0.5rem;", ":1.75rem;", ":0 0.6875rem;", ":0 0.375rem;", ":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.0625rem;", ":0.25rem;", ":0.25rem;", ":-0.0625rem;"], badgeTokens.borderRadius, badgeTokens.height, badgeTokens.padding, badgeTokens.paddingIconOnly, badgeTokens.fontFamily, badgeTokens.fontSize, badgeTokens.fontStyle, badgeTokens.fontWeight, badgeTokens.letterSpacing, badgeTokens.lineHeight, badgeTokens.leftContentMarginLeft, badgeTokens.leftContentMarginRight, badgeTokens.rightContentMarginLeft, badgeTokens.rightContentMarginRight),
20
- m: /*#__PURE__*/css(["", ":0.375rem;", ":1.5rem;", ":0 0.5625rem;", ":0 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.0625rem;", ":0.1875rem;", ":0.1875rem;", ":-0.0625rem;"], badgeTokens.borderRadius, badgeTokens.height, badgeTokens.padding, badgeTokens.paddingIconOnly, badgeTokens.fontFamily, badgeTokens.fontSize, badgeTokens.fontStyle, badgeTokens.fontWeight, badgeTokens.letterSpacing, badgeTokens.lineHeight, badgeTokens.leftContentMarginLeft, badgeTokens.leftContentMarginRight, badgeTokens.rightContentMarginLeft, badgeTokens.rightContentMarginRight),
21
- s: /*#__PURE__*/css(["", ":0.375rem;", ":1.25rem;", ":0 0.4375rem;", ":0 0.25rem;", ":var(--plasma-typo-body-xxs-font-family);", ":var(--plasma-typo-body-xxs-font-size);", ":var(--plasma-typo-body-xxs-font-style);", ":var(--plasma-typo-body-xxs-font-weight);", ":var(--plasma-typo-body-xxs-letter-spacing);", ":var(--plasma-typo-body-xxs-line-height);", ":-0.0625rem;", ":0.125rem;", ":0.125rem;", ":-0.0625rem;"], badgeTokens.borderRadius, badgeTokens.height, badgeTokens.padding, badgeTokens.paddingIconOnly, badgeTokens.fontFamily, badgeTokens.fontSize, badgeTokens.fontStyle, badgeTokens.fontWeight, badgeTokens.letterSpacing, badgeTokens.lineHeight, badgeTokens.leftContentMarginLeft, badgeTokens.leftContentMarginRight, badgeTokens.rightContentMarginLeft, badgeTokens.rightContentMarginRight),
22
- xs: /*#__PURE__*/css(["", ":0.25rem;", ":1rem;", ":0 0.25rem;", ":0 0.188rem;", ":var(--plasma-typo-body-xxs-font-family);", ":var(--plasma-typo-body-xxs-font-size);", ":var(--plasma-typo-body-xxs-font-style);", ":var(--plasma-typo-body-xxs-font-weight);", ":var(--plasma-typo-body-xxs-letter-spacing);", ":var(--plasma-typo-body-xxs-line-height);", ":-0.0625rem;", ":0.125rem;", ":0.125rem;", ":-0.0625rem;"], badgeTokens.borderRadius, badgeTokens.height, badgeTokens.padding, badgeTokens.paddingIconOnly, badgeTokens.fontFamily, badgeTokens.fontSize, badgeTokens.fontStyle, badgeTokens.fontWeight, badgeTokens.letterSpacing, badgeTokens.lineHeight, badgeTokens.leftContentMarginLeft, badgeTokens.leftContentMarginRight, badgeTokens.rightContentMarginLeft, badgeTokens.rightContentMarginRight)
19
+ l: /*#__PURE__*/css(["", ":0.5rem;", ":1.75rem;", ":0.6875rem;", ":0.6875rem;", ":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.0625rem;", ":0.25rem;", ":0.25rem;", ":-0.0625rem;"], badgeTokens.borderRadius, badgeTokens.height, badgeTokens.paddingRight, badgeTokens.paddingLeft, badgeTokens.fontFamily, badgeTokens.fontSize, badgeTokens.fontStyle, badgeTokens.fontWeight, badgeTokens.letterSpacing, badgeTokens.lineHeight, badgeTokens.leftContentMarginLeft, badgeTokens.leftContentMarginRight, badgeTokens.rightContentMarginLeft, badgeTokens.rightContentMarginRight),
20
+ m: /*#__PURE__*/css(["", ":0.375rem;", ":1.5rem;", ":0.5625rem;", ":0.5625rem;", ":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.0625rem;", ":0.1875rem;", ":0.1875rem;", ":-0.0625rem;"], badgeTokens.borderRadius, badgeTokens.height, badgeTokens.paddingRight, badgeTokens.paddingLeft, badgeTokens.fontFamily, badgeTokens.fontSize, badgeTokens.fontStyle, badgeTokens.fontWeight, badgeTokens.letterSpacing, badgeTokens.lineHeight, badgeTokens.leftContentMarginLeft, badgeTokens.leftContentMarginRight, badgeTokens.rightContentMarginLeft, badgeTokens.rightContentMarginRight),
21
+ s: /*#__PURE__*/css(["", ":0.375rem;", ":1.25rem;", ":0.4375rem;", ":0.4375rem;", ":var(--plasma-typo-body-xxs-font-family);", ":var(--plasma-typo-body-xxs-font-size);", ":var(--plasma-typo-body-xxs-font-style);", ":var(--plasma-typo-body-xxs-font-weight);", ":var(--plasma-typo-body-xxs-letter-spacing);", ":var(--plasma-typo-body-xxs-line-height);", ":-0.0625rem;", ":0.125rem;", ":0.125rem;", ":-0.0625rem;"], badgeTokens.borderRadius, badgeTokens.height, badgeTokens.paddingRight, badgeTokens.paddingLeft, badgeTokens.fontFamily, badgeTokens.fontSize, badgeTokens.fontStyle, badgeTokens.fontWeight, badgeTokens.letterSpacing, badgeTokens.lineHeight, badgeTokens.leftContentMarginLeft, badgeTokens.leftContentMarginRight, badgeTokens.rightContentMarginLeft, badgeTokens.rightContentMarginRight),
22
+ xs: /*#__PURE__*/css(["", ":0.25rem;", ":1rem;", ":0.25rem;", ":0.25rem;", ":var(--plasma-typo-body-xxs-font-family);", ":var(--plasma-typo-body-xxs-font-size);", ":var(--plasma-typo-body-xxs-font-style);", ":var(--plasma-typo-body-xxs-font-weight);", ":var(--plasma-typo-body-xxs-letter-spacing);", ":var(--plasma-typo-body-xxs-line-height);", ":-0.0625rem;", ":0.125rem;", ":0.125rem;", ":-0.0625rem;"], badgeTokens.borderRadius, badgeTokens.height, badgeTokens.paddingRight, badgeTokens.paddingLeft, badgeTokens.fontFamily, badgeTokens.fontSize, badgeTokens.fontStyle, badgeTokens.fontWeight, badgeTokens.letterSpacing, badgeTokens.lineHeight, badgeTokens.leftContentMarginLeft, badgeTokens.leftContentMarginRight, badgeTokens.rightContentMarginLeft, badgeTokens.rightContentMarginRight)
23
23
  },
24
24
  pilled: {
25
25
  "true": /*#__PURE__*/css(["", ":1.25rem;"], badgeTokens.pilledBorderRadius)
@@ -28,7 +28,7 @@ export var config = {
28
28
  "true": /*#__PURE__*/css([""])
29
29
  },
30
30
  clear: {
31
- "true": /*#__PURE__*/css(["", ":var(--surface-clear);"], badgeTokens.backgroundClear)
31
+ "true": /*#__PURE__*/css([""])
32
32
  },
33
33
  truncate: {
34
34
  "true": /*#__PURE__*/css([""])
@@ -34,10 +34,6 @@ const meta: Meta<typeof Badge> = {
34
34
  maxWidth: {
35
35
  control: { type: 'text' },
36
36
  },
37
- text: {
38
- control: { type: 'text' },
39
- if: { arg: 'enableText', truthy: true },
40
- },
41
37
  ...disableProps(['contentLeft', 'contentRight']),
42
38
  },
43
39
  };
@@ -47,7 +43,6 @@ export default meta;
47
43
  type StoryProps = ComponentProps<typeof Badge> & {
48
44
  enableContentLeft: boolean;
49
45
  enableContentRight: boolean;
50
- enableText: boolean;
51
46
  };
52
47
  type Story = StoryObj<StoryProps>;
53
48
 
@@ -68,14 +63,13 @@ export const Default: Story = {
68
63
  },
69
64
  enableContentRight: {
70
65
  control: { type: 'boolean' },
71
- if: { arg: 'enableText', truthy: true },
66
+ if: { arg: 'enableContentLeft', truthy: false },
72
67
  },
73
68
  },
74
69
  args: {
70
+ text: 'Hello Kitty',
75
71
  view: 'default',
76
72
  size: 'm',
77
- enableText: true,
78
- text: 'Hello',
79
73
  enableContentLeft: false,
80
74
  enableContentRight: false,
81
75
  clear: false,
@@ -83,24 +77,13 @@ export const Default: Story = {
83
77
  transparent: false,
84
78
  maxWidth: '',
85
79
  },
86
- render: ({ enableContentLeft, enableContentRight, enableText, size, ...rest }: StoryProps) => {
87
- const iconSize = () => {
88
- switch (size) {
89
- case 'l':
90
- return '1rem';
91
- case 'xs':
92
- return '0.625rem';
93
- default:
94
- return '0.75rem';
95
- }
96
- };
80
+ render: ({ enableContentLeft, enableContentRight, size, ...rest }: StoryProps) => {
81
+ const iconSize = size === 'l' ? '1rem' : '0.75rem';
97
82
 
98
83
  return (
99
84
  <Badge
100
- contentLeft={
101
- enableContentLeft || !enableText ? <BellIcon width={iconSize()} height={iconSize()} /> : undefined
102
- }
103
- contentRight={enableContentRight ? <BellIcon width={iconSize()} height={iconSize()} /> : undefined}
85
+ contentLeft={enableContentLeft ? <BellIcon width={iconSize} height={iconSize} /> : undefined}
86
+ contentRight={enableContentRight ? <BellIcon width={iconSize} height={iconSize} /> : undefined}
104
87
  size={size}
105
88
  {...rest}
106
89
  />
@@ -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: '',
@@ -16,10 +16,10 @@ export var config = {
16
16
  light: /*#__PURE__*/css(["", ":var(--on-light-text-primary);", ":var(--on-dark-surface-solid-default);", ":var(--on-dark-text-primary);", ":var(--on-dark-surface-transparent-card);", ":var(--on-dark-text-primary);"], badgeTokens.color, badgeTokens.background, badgeTokens.colorTransparent, badgeTokens.backgroundTransparent, badgeTokens.colorClear)
17
17
  },
18
18
  size: {
19
- l: /*#__PURE__*/css(["", ":0.5rem;", ":1.75rem;", ":0 0.6875rem;", ":0 0.375rem;", ":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.0625rem;", ":0.25rem;", ":0.25rem;", ":-0.0625rem;"], badgeTokens.borderRadius, badgeTokens.height, badgeTokens.padding, badgeTokens.paddingIconOnly, badgeTokens.fontFamily, badgeTokens.fontSize, badgeTokens.fontStyle, badgeTokens.fontWeight, badgeTokens.letterSpacing, badgeTokens.lineHeight, badgeTokens.leftContentMarginLeft, badgeTokens.leftContentMarginRight, badgeTokens.rightContentMarginLeft, badgeTokens.rightContentMarginRight),
20
- m: /*#__PURE__*/css(["", ":0.375rem;", ":1.5rem;", ":0 0.5625rem;", ":0 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.0625rem;", ":0.1875rem;", ":0.1875rem;", ":-0.0625rem;"], badgeTokens.borderRadius, badgeTokens.height, badgeTokens.padding, badgeTokens.paddingIconOnly, badgeTokens.fontFamily, badgeTokens.fontSize, badgeTokens.fontStyle, badgeTokens.fontWeight, badgeTokens.letterSpacing, badgeTokens.lineHeight, badgeTokens.leftContentMarginLeft, badgeTokens.leftContentMarginRight, badgeTokens.rightContentMarginLeft, badgeTokens.rightContentMarginRight),
21
- s: /*#__PURE__*/css(["", ":0.375rem;", ":1.25rem;", ":0 0.4375rem;", ":0 0.25rem;", ":var(--plasma-typo-body-xxs-font-family);", ":var(--plasma-typo-body-xxs-font-size);", ":var(--plasma-typo-body-xxs-font-style);", ":var(--plasma-typo-body-xxs-font-weight);", ":var(--plasma-typo-body-xxs-letter-spacing);", ":var(--plasma-typo-body-xxs-line-height);", ":-0.0625rem;", ":0.125rem;", ":0.125rem;", ":-0.0625rem;"], badgeTokens.borderRadius, badgeTokens.height, badgeTokens.padding, badgeTokens.paddingIconOnly, badgeTokens.fontFamily, badgeTokens.fontSize, badgeTokens.fontStyle, badgeTokens.fontWeight, badgeTokens.letterSpacing, badgeTokens.lineHeight, badgeTokens.leftContentMarginLeft, badgeTokens.leftContentMarginRight, badgeTokens.rightContentMarginLeft, badgeTokens.rightContentMarginRight),
22
- xs: /*#__PURE__*/css(["", ":0.25rem;", ":1rem;", ":0 0.25rem;", ":0 0.188rem;", ":var(--plasma-typo-body-xxs-font-family);", ":var(--plasma-typo-body-xxs-font-size);", ":var(--plasma-typo-body-xxs-font-style);", ":var(--plasma-typo-body-xxs-font-weight);", ":var(--plasma-typo-body-xxs-letter-spacing);", ":var(--plasma-typo-body-xxs-line-height);", ":-0.0625rem;", ":0.125rem;", ":0.125rem;", ":-0.0625rem;"], badgeTokens.borderRadius, badgeTokens.height, badgeTokens.padding, badgeTokens.paddingIconOnly, badgeTokens.fontFamily, badgeTokens.fontSize, badgeTokens.fontStyle, badgeTokens.fontWeight, badgeTokens.letterSpacing, badgeTokens.lineHeight, badgeTokens.leftContentMarginLeft, badgeTokens.leftContentMarginRight, badgeTokens.rightContentMarginLeft, badgeTokens.rightContentMarginRight)
19
+ l: /*#__PURE__*/css(["", ":0.5rem;", ":1.75rem;", ":0.6875rem;", ":0.6875rem;", ":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.0625rem;", ":0.25rem;", ":0.25rem;", ":-0.0625rem;"], badgeTokens.borderRadius, badgeTokens.height, badgeTokens.paddingRight, badgeTokens.paddingLeft, badgeTokens.fontFamily, badgeTokens.fontSize, badgeTokens.fontStyle, badgeTokens.fontWeight, badgeTokens.letterSpacing, badgeTokens.lineHeight, badgeTokens.leftContentMarginLeft, badgeTokens.leftContentMarginRight, badgeTokens.rightContentMarginLeft, badgeTokens.rightContentMarginRight),
20
+ m: /*#__PURE__*/css(["", ":0.375rem;", ":1.5rem;", ":0.5625rem;", ":0.5625rem;", ":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.0625rem;", ":0.1875rem;", ":0.1875rem;", ":-0.0625rem;"], badgeTokens.borderRadius, badgeTokens.height, badgeTokens.paddingRight, badgeTokens.paddingLeft, badgeTokens.fontFamily, badgeTokens.fontSize, badgeTokens.fontStyle, badgeTokens.fontWeight, badgeTokens.letterSpacing, badgeTokens.lineHeight, badgeTokens.leftContentMarginLeft, badgeTokens.leftContentMarginRight, badgeTokens.rightContentMarginLeft, badgeTokens.rightContentMarginRight),
21
+ s: /*#__PURE__*/css(["", ":0.375rem;", ":1.25rem;", ":0.4375rem;", ":0.4375rem;", ":var(--plasma-typo-body-xxs-font-family);", ":var(--plasma-typo-body-xxs-font-size);", ":var(--plasma-typo-body-xxs-font-style);", ":var(--plasma-typo-body-xxs-font-weight);", ":var(--plasma-typo-body-xxs-letter-spacing);", ":var(--plasma-typo-body-xxs-line-height);", ":-0.0625rem;", ":0.125rem;", ":0.125rem;", ":-0.0625rem;"], badgeTokens.borderRadius, badgeTokens.height, badgeTokens.paddingRight, badgeTokens.paddingLeft, badgeTokens.fontFamily, badgeTokens.fontSize, badgeTokens.fontStyle, badgeTokens.fontWeight, badgeTokens.letterSpacing, badgeTokens.lineHeight, badgeTokens.leftContentMarginLeft, badgeTokens.leftContentMarginRight, badgeTokens.rightContentMarginLeft, badgeTokens.rightContentMarginRight),
22
+ xs: /*#__PURE__*/css(["", ":0.25rem;", ":1rem;", ":0.25rem;", ":0.25rem;", ":var(--plasma-typo-body-xxs-font-family);", ":var(--plasma-typo-body-xxs-font-size);", ":var(--plasma-typo-body-xxs-font-style);", ":var(--plasma-typo-body-xxs-font-weight);", ":var(--plasma-typo-body-xxs-letter-spacing);", ":var(--plasma-typo-body-xxs-line-height);", ":-0.0625rem;", ":0.125rem;", ":0.125rem;", ":-0.0625rem;"], badgeTokens.borderRadius, badgeTokens.height, badgeTokens.paddingRight, badgeTokens.paddingLeft, badgeTokens.fontFamily, badgeTokens.fontSize, badgeTokens.fontStyle, badgeTokens.fontWeight, badgeTokens.letterSpacing, badgeTokens.lineHeight, badgeTokens.leftContentMarginLeft, badgeTokens.leftContentMarginRight, badgeTokens.rightContentMarginLeft, badgeTokens.rightContentMarginRight)
23
23
  },
24
24
  pilled: {
25
25
  "true": /*#__PURE__*/css(["", ":1.25rem;"], badgeTokens.pilledBorderRadius)
@@ -28,7 +28,7 @@ export var config = {
28
28
  "true": /*#__PURE__*/css([""])
29
29
  },
30
30
  clear: {
31
- "true": /*#__PURE__*/css(["", ":var(--surface-clear);"], badgeTokens.backgroundClear)
31
+ "true": /*#__PURE__*/css([""])
32
32
  }
33
33
  }
34
34
  };
@@ -31,13 +31,6 @@ const meta: Meta<typeof Badge> = {
31
31
  control: { type: 'boolean' },
32
32
  if: { arg: 'clear', truthy: false },
33
33
  },
34
- maxWidth: {
35
- control: { type: 'text' },
36
- },
37
- text: {
38
- control: { type: 'text' },
39
- if: { arg: 'enableText', truthy: true },
40
- },
41
34
  ...disableProps(['contentLeft', 'contentRight']),
42
35
  },
43
36
  };
@@ -47,7 +40,6 @@ export default meta;
47
40
  type StoryProps = ComponentProps<typeof Badge> & {
48
41
  enableContentLeft: boolean;
49
42
  enableContentRight: boolean;
50
- enableText: boolean;
51
43
  };
52
44
  type Story = StoryObj<StoryProps>;
53
45
 
@@ -68,39 +60,26 @@ export const Default: Story = {
68
60
  },
69
61
  enableContentRight: {
70
62
  control: { type: 'boolean' },
71
- if: { arg: 'enableText', truthy: true },
63
+ if: { arg: 'enableContentLeft', truthy: false },
72
64
  },
73
65
  },
74
66
  args: {
67
+ text: 'Hello',
75
68
  view: 'default',
76
69
  size: 'm',
77
- enableText: true,
78
- text: 'Hello',
79
70
  enableContentLeft: false,
80
71
  enableContentRight: false,
81
72
  clear: false,
82
73
  pilled: false,
83
74
  transparent: false,
84
- maxWidth: '',
85
75
  },
86
- render: ({ enableContentLeft, enableContentRight, enableText, size, ...rest }: StoryProps) => {
87
- const iconSize = () => {
88
- switch (size) {
89
- case 'l':
90
- return '1rem';
91
- case 'xs':
92
- return '0.625rem';
93
- default:
94
- return '0.75rem';
95
- }
96
- };
76
+ render: ({ enableContentLeft, enableContentRight, size, ...rest }: StoryProps) => {
77
+ const iconSize = size === 'l' ? '1rem' : '0.75rem';
97
78
 
98
79
  return (
99
80
  <Badge
100
- contentLeft={
101
- enableContentLeft || !enableText ? <BellIcon width={iconSize()} height={iconSize()} /> : undefined
102
- }
103
- contentRight={enableContentRight ? <BellIcon width={iconSize()} height={iconSize()} /> : undefined}
81
+ contentLeft={enableContentLeft ? <BellIcon width={iconSize} height={iconSize} /> : undefined}
82
+ contentRight={enableContentRight ? <BellIcon width={iconSize} height={iconSize} /> : undefined}
104
83
  size={size}
105
84
  {...rest}
106
85
  />
@@ -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"}