@salutejs/plasma-new-hope 0.179.0-canary.1500.11582881437.0 → 0.179.0-canary.1514.11588573893.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (272) hide show
  1. package/cjs/components/Badge/Badge.css +0 -2
  2. package/cjs/components/Badge/Badge.js +4 -17
  3. package/cjs/components/Badge/Badge.js.map +1 -1
  4. package/cjs/components/Badge/Badge.tokens.js +1 -2
  5. package/cjs/components/Badge/Badge.tokens.js.map +1 -1
  6. package/cjs/components/Counter/Counter.css +1 -1
  7. package/cjs/components/Counter/Counter.js +13 -3
  8. package/cjs/components/Counter/Counter.js.map +1 -1
  9. package/cjs/components/Counter/Counter.tokens.js +4 -0
  10. package/cjs/components/Counter/Counter.tokens.js.map +1 -1
  11. package/cjs/components/Counter/variations/_size/base.js +1 -1
  12. package/cjs/components/Counter/variations/_size/base.js.map +1 -1
  13. package/{es/components/Counter/variations/_size/base_1z0ohiy.css → cjs/components/Counter/variations/_size/base_4mz17d.css} +1 -1
  14. package/cjs/components/Popup/Popup.js +2 -2
  15. package/cjs/components/Popup/Popup.js.map +1 -1
  16. package/cjs/components/Popup/PopupContext.js +1 -1
  17. package/cjs/components/Popup/PopupContext.js.map +1 -1
  18. package/cjs/components/Portal/Portal.js +4 -0
  19. package/cjs/components/Portal/Portal.js.map +1 -1
  20. package/cjs/components/Tabs/tokens.js +1 -2
  21. package/cjs/components/Tabs/tokens.js.map +1 -1
  22. package/cjs/components/Tabs/ui/horizontal/HorizontalTabItem/HorizontalTabItem.css +5 -7
  23. package/cjs/components/Tabs/ui/horizontal/HorizontalTabItem/HorizontalTabItem.js +3 -14
  24. package/cjs/components/Tabs/ui/horizontal/HorizontalTabItem/HorizontalTabItem.js.map +1 -1
  25. package/cjs/components/Tabs/ui/horizontal/HorizontalTabItem/HorizontalTabItem.styles.js +1 -1
  26. package/cjs/components/Tabs/ui/horizontal/HorizontalTabItem/HorizontalTabItem.styles.js.map +1 -1
  27. package/cjs/components/Tabs/ui/horizontal/HorizontalTabItem/{HorizontalTabItem.styles_1vj7dbl.css → HorizontalTabItem.styles_hfqv5b.css} +1 -1
  28. package/cjs/components/Tabs/ui/vertical/VerticalTabItem/VerticalTabItem.css +5 -7
  29. package/cjs/components/Tabs/ui/vertical/VerticalTabItem/VerticalTabItem.js +3 -14
  30. package/cjs/components/Tabs/ui/vertical/VerticalTabItem/VerticalTabItem.js.map +1 -1
  31. package/cjs/components/Tabs/ui/vertical/VerticalTabItem/VerticalTabItem.styles.js +1 -1
  32. package/cjs/components/Tabs/ui/vertical/VerticalTabItem/VerticalTabItem.styles.js.map +1 -1
  33. package/cjs/components/Tabs/ui/vertical/VerticalTabItem/VerticalTabItem.styles_16d3lah.css +5 -0
  34. package/cjs/index.css +11 -17
  35. package/emotion/cjs/components/Badge/Badge.js +4 -22
  36. package/emotion/cjs/components/Badge/Badge.tokens.js +1 -2
  37. package/emotion/cjs/components/Counter/Counter.js +13 -3
  38. package/emotion/cjs/components/Counter/Counter.template-doc.mdx +2 -2
  39. package/emotion/cjs/components/Counter/Counter.tokens.js +4 -1
  40. package/emotion/cjs/components/Counter/variations/_size/base.js +1 -1
  41. package/emotion/cjs/components/Popup/Popup.js +1 -1
  42. package/emotion/cjs/components/Popup/PopupContext.js +1 -1
  43. package/emotion/cjs/components/Portal/Portal.js +4 -0
  44. package/emotion/cjs/components/Tabs/tokens.js +1 -2
  45. package/emotion/cjs/components/Tabs/ui/horizontal/HorizontalTabItem/HorizontalTabItem.js +3 -19
  46. package/emotion/cjs/components/Tabs/ui/horizontal/HorizontalTabItem/HorizontalTabItem.styles.js +6 -6
  47. package/emotion/cjs/components/Tabs/ui/vertical/VerticalTabItem/VerticalTabItem.js +3 -19
  48. package/emotion/cjs/components/Tabs/ui/vertical/VerticalTabItem/VerticalTabItem.styles.js +6 -6
  49. package/emotion/cjs/examples/plasma_b2c/components/Badge/Badge.config.js +14 -17
  50. package/emotion/cjs/examples/plasma_b2c/components/Badge/Badge.stories.tsx +1 -5
  51. package/emotion/cjs/examples/plasma_b2c/components/Counter/Counter.config.js +12 -9
  52. package/emotion/cjs/examples/plasma_b2c/components/Counter/Counter.stories.tsx +7 -5
  53. package/emotion/cjs/examples/plasma_b2c/components/Tabs/Tabs.stories.tsx +19 -51
  54. package/emotion/cjs/examples/plasma_b2c/components/Tabs/horizontal/HorizontalTabItem.config.js +15 -18
  55. package/emotion/cjs/examples/plasma_b2c/components/Tabs/vertical/VerticalTabItem.config.js +6 -9
  56. package/emotion/cjs/examples/plasma_web/components/Counter/Counter.config.js +12 -9
  57. package/emotion/cjs/examples/plasma_web/components/Counter/Counter.stories.tsx +7 -5
  58. package/emotion/cjs/examples/plasma_web/components/Tabs/Tabs.stories.tsx +19 -51
  59. package/emotion/cjs/examples/plasma_web/components/Tabs/horizontal/HorizontalTabItem.config.js +15 -18
  60. package/emotion/cjs/examples/plasma_web/components/Tabs/vertical/VerticalTabItem.config.js +6 -9
  61. package/emotion/es/components/Badge/Badge.js +4 -23
  62. package/emotion/es/components/Badge/Badge.tokens.js +1 -2
  63. package/emotion/es/components/Counter/Counter.js +13 -3
  64. package/emotion/es/components/Counter/Counter.template-doc.mdx +2 -2
  65. package/emotion/es/components/Counter/Counter.tokens.js +3 -0
  66. package/emotion/es/components/Counter/variations/_size/base.js +2 -2
  67. package/emotion/es/components/Popup/Popup.js +1 -1
  68. package/emotion/es/components/Popup/PopupContext.js +1 -1
  69. package/emotion/es/components/Portal/Portal.js +4 -0
  70. package/emotion/es/components/Tabs/tokens.js +1 -2
  71. package/emotion/es/components/Tabs/ui/horizontal/HorizontalTabItem/HorizontalTabItem.js +3 -20
  72. package/emotion/es/components/Tabs/ui/horizontal/HorizontalTabItem/HorizontalTabItem.styles.js +6 -6
  73. package/emotion/es/components/Tabs/ui/vertical/VerticalTabItem/VerticalTabItem.js +3 -20
  74. package/emotion/es/components/Tabs/ui/vertical/VerticalTabItem/VerticalTabItem.styles.js +6 -6
  75. package/emotion/es/examples/plasma_b2c/components/Badge/Badge.config.js +14 -17
  76. package/emotion/es/examples/plasma_b2c/components/Badge/Badge.stories.tsx +1 -5
  77. package/emotion/es/examples/plasma_b2c/components/Counter/Counter.config.js +12 -9
  78. package/emotion/es/examples/plasma_b2c/components/Counter/Counter.stories.tsx +7 -5
  79. package/emotion/es/examples/plasma_b2c/components/Tabs/Tabs.stories.tsx +19 -51
  80. package/emotion/es/examples/plasma_b2c/components/Tabs/horizontal/HorizontalTabItem.config.js +15 -18
  81. package/emotion/es/examples/plasma_b2c/components/Tabs/vertical/VerticalTabItem.config.js +6 -9
  82. package/emotion/es/examples/plasma_web/components/Counter/Counter.config.js +12 -9
  83. package/emotion/es/examples/plasma_web/components/Counter/Counter.stories.tsx +7 -5
  84. package/emotion/es/examples/plasma_web/components/Tabs/Tabs.stories.tsx +19 -51
  85. package/emotion/es/examples/plasma_web/components/Tabs/horizontal/HorizontalTabItem.config.js +15 -18
  86. package/emotion/es/examples/plasma_web/components/Tabs/vertical/VerticalTabItem.config.js +6 -9
  87. package/es/components/Badge/Badge.css +0 -2
  88. package/es/components/Badge/Badge.js +5 -18
  89. package/es/components/Badge/Badge.js.map +1 -1
  90. package/es/components/Badge/Badge.tokens.js +1 -2
  91. package/es/components/Badge/Badge.tokens.js.map +1 -1
  92. package/es/components/Counter/Counter.css +1 -1
  93. package/es/components/Counter/Counter.js +13 -3
  94. package/es/components/Counter/Counter.js.map +1 -1
  95. package/es/components/Counter/Counter.tokens.js +4 -1
  96. package/es/components/Counter/Counter.tokens.js.map +1 -1
  97. package/es/components/Counter/variations/_size/base.js +1 -1
  98. package/es/components/Counter/variations/_size/base.js.map +1 -1
  99. package/{cjs/components/Counter/variations/_size/base_1z0ohiy.css → es/components/Counter/variations/_size/base_4mz17d.css} +1 -1
  100. package/es/components/Popup/Popup.js +2 -2
  101. package/es/components/Popup/Popup.js.map +1 -1
  102. package/es/components/Popup/PopupContext.js +1 -1
  103. package/es/components/Popup/PopupContext.js.map +1 -1
  104. package/es/components/Portal/Portal.js +4 -0
  105. package/es/components/Portal/Portal.js.map +1 -1
  106. package/es/components/Tabs/tokens.js +1 -2
  107. package/es/components/Tabs/tokens.js.map +1 -1
  108. package/es/components/Tabs/ui/horizontal/HorizontalTabItem/HorizontalTabItem.css +5 -7
  109. package/es/components/Tabs/ui/horizontal/HorizontalTabItem/HorizontalTabItem.js +4 -15
  110. package/es/components/Tabs/ui/horizontal/HorizontalTabItem/HorizontalTabItem.js.map +1 -1
  111. package/es/components/Tabs/ui/horizontal/HorizontalTabItem/HorizontalTabItem.styles.js +1 -1
  112. package/es/components/Tabs/ui/horizontal/HorizontalTabItem/HorizontalTabItem.styles.js.map +1 -1
  113. package/es/components/Tabs/ui/horizontal/HorizontalTabItem/{HorizontalTabItem.styles_1vj7dbl.css → HorizontalTabItem.styles_hfqv5b.css} +1 -1
  114. package/es/components/Tabs/ui/vertical/VerticalTabItem/VerticalTabItem.css +5 -7
  115. package/es/components/Tabs/ui/vertical/VerticalTabItem/VerticalTabItem.js +4 -15
  116. package/es/components/Tabs/ui/vertical/VerticalTabItem/VerticalTabItem.js.map +1 -1
  117. package/es/components/Tabs/ui/vertical/VerticalTabItem/VerticalTabItem.styles.js +1 -1
  118. package/es/components/Tabs/ui/vertical/VerticalTabItem/VerticalTabItem.styles.js.map +1 -1
  119. package/es/components/Tabs/ui/vertical/VerticalTabItem/VerticalTabItem.styles_16d3lah.css +5 -0
  120. package/es/index.css +11 -17
  121. package/package.json +2 -2
  122. package/styled-components/cjs/components/Badge/Badge.js +4 -22
  123. package/styled-components/cjs/components/Badge/Badge.tokens.js +1 -2
  124. package/styled-components/cjs/components/Counter/Counter.js +13 -3
  125. package/styled-components/cjs/components/Counter/Counter.template-doc.mdx +2 -2
  126. package/styled-components/cjs/components/Counter/Counter.tokens.js +4 -1
  127. package/styled-components/cjs/components/Counter/variations/_size/base.js +1 -1
  128. package/styled-components/cjs/components/Popup/Popup.js +1 -1
  129. package/styled-components/cjs/components/Popup/PopupContext.js +1 -1
  130. package/styled-components/cjs/components/Portal/Portal.js +4 -0
  131. package/styled-components/cjs/components/Tabs/tokens.js +1 -2
  132. package/styled-components/cjs/components/Tabs/ui/horizontal/HorizontalTabItem/HorizontalTabItem.js +3 -19
  133. package/styled-components/cjs/components/Tabs/ui/horizontal/HorizontalTabItem/HorizontalTabItem.styles.js +1 -1
  134. package/styled-components/cjs/components/Tabs/ui/vertical/VerticalTabItem/VerticalTabItem.js +3 -19
  135. package/styled-components/cjs/components/Tabs/ui/vertical/VerticalTabItem/VerticalTabItem.styles.js +2 -2
  136. package/styled-components/cjs/examples/plasma_b2c/components/Badge/Badge.config.js +0 -3
  137. package/styled-components/cjs/examples/plasma_b2c/components/Badge/Badge.stories.tsx +1 -5
  138. package/styled-components/cjs/examples/plasma_b2c/components/Counter/Counter.config.js +5 -2
  139. package/styled-components/cjs/examples/plasma_b2c/components/Counter/Counter.stories.tsx +7 -5
  140. package/styled-components/cjs/examples/plasma_b2c/components/Tabs/Tabs.stories.tsx +19 -51
  141. package/styled-components/cjs/examples/plasma_b2c/components/Tabs/horizontal/HorizontalTabItem.config.js +0 -3
  142. package/styled-components/cjs/examples/plasma_b2c/components/Tabs/vertical/VerticalTabItem.config.js +0 -3
  143. package/styled-components/cjs/examples/plasma_web/components/Counter/Counter.config.js +5 -2
  144. package/styled-components/cjs/examples/plasma_web/components/Counter/Counter.stories.tsx +7 -5
  145. package/styled-components/cjs/examples/plasma_web/components/Tabs/Tabs.stories.tsx +19 -51
  146. package/styled-components/cjs/examples/plasma_web/components/Tabs/horizontal/HorizontalTabItem.config.js +0 -3
  147. package/styled-components/cjs/examples/plasma_web/components/Tabs/vertical/VerticalTabItem.config.js +0 -3
  148. package/styled-components/es/components/Badge/Badge.js +4 -23
  149. package/styled-components/es/components/Badge/Badge.tokens.js +1 -2
  150. package/styled-components/es/components/Counter/Counter.js +13 -3
  151. package/styled-components/es/components/Counter/Counter.template-doc.mdx +2 -2
  152. package/styled-components/es/components/Counter/Counter.tokens.js +3 -0
  153. package/styled-components/es/components/Counter/variations/_size/base.js +2 -2
  154. package/styled-components/es/components/Popup/Popup.js +1 -1
  155. package/styled-components/es/components/Popup/PopupContext.js +1 -1
  156. package/styled-components/es/components/Portal/Portal.js +4 -0
  157. package/styled-components/es/components/Tabs/tokens.js +1 -2
  158. package/styled-components/es/components/Tabs/ui/horizontal/HorizontalTabItem/HorizontalTabItem.js +3 -20
  159. package/styled-components/es/components/Tabs/ui/horizontal/HorizontalTabItem/HorizontalTabItem.styles.js +1 -1
  160. package/styled-components/es/components/Tabs/ui/vertical/VerticalTabItem/VerticalTabItem.js +3 -20
  161. package/styled-components/es/components/Tabs/ui/vertical/VerticalTabItem/VerticalTabItem.styles.js +2 -2
  162. package/styled-components/es/examples/plasma_b2c/components/Badge/Badge.config.js +0 -3
  163. package/styled-components/es/examples/plasma_b2c/components/Badge/Badge.stories.tsx +1 -5
  164. package/styled-components/es/examples/plasma_b2c/components/Counter/Counter.config.js +5 -2
  165. package/styled-components/es/examples/plasma_b2c/components/Counter/Counter.stories.tsx +7 -5
  166. package/styled-components/es/examples/plasma_b2c/components/Tabs/Tabs.stories.tsx +19 -51
  167. package/styled-components/es/examples/plasma_b2c/components/Tabs/horizontal/HorizontalTabItem.config.js +0 -3
  168. package/styled-components/es/examples/plasma_b2c/components/Tabs/vertical/VerticalTabItem.config.js +0 -3
  169. package/styled-components/es/examples/plasma_web/components/Counter/Counter.config.js +5 -2
  170. package/styled-components/es/examples/plasma_web/components/Counter/Counter.stories.tsx +7 -5
  171. package/styled-components/es/examples/plasma_web/components/Tabs/Tabs.stories.tsx +19 -51
  172. package/styled-components/es/examples/plasma_web/components/Tabs/horizontal/HorizontalTabItem.config.js +0 -3
  173. package/styled-components/es/examples/plasma_web/components/Tabs/vertical/VerticalTabItem.config.js +0 -3
  174. package/types/components/Badge/Badge.d.ts +2 -10
  175. package/types/components/Badge/Badge.d.ts.map +1 -1
  176. package/types/components/Badge/Badge.tokens.d.ts +0 -1
  177. package/types/components/Badge/Badge.tokens.d.ts.map +1 -1
  178. package/types/components/Badge/Badge.types.d.ts +0 -5
  179. package/types/components/Badge/Badge.types.d.ts.map +1 -1
  180. package/types/components/Counter/Counter.d.ts.map +1 -1
  181. package/types/components/Counter/Counter.tokens.d.ts +3 -0
  182. package/types/components/Counter/Counter.tokens.d.ts.map +1 -1
  183. package/types/components/Counter/Counter.types.d.ts +2 -2
  184. package/types/components/Counter/variations/_size/base.d.ts.map +1 -1
  185. package/types/components/Popup/PopupContext.d.ts.map +1 -1
  186. package/types/components/Portal/Portal.d.ts.map +1 -1
  187. package/types/components/Tabs/TabItem.types.d.ts +0 -5
  188. package/types/components/Tabs/TabItem.types.d.ts.map +1 -1
  189. package/types/components/Tabs/tokens.d.ts +0 -1
  190. package/types/components/Tabs/tokens.d.ts.map +1 -1
  191. package/types/components/Tabs/ui/horizontal/HorizontalTabItem/HorizontalTabItem.d.ts +2 -9
  192. package/types/components/Tabs/ui/horizontal/HorizontalTabItem/HorizontalTabItem.d.ts.map +1 -1
  193. package/types/components/Tabs/ui/horizontal/HorizontalTabItem/HorizontalTabItem.styles.d.ts.map +1 -1
  194. package/types/components/Tabs/ui/vertical/VerticalTabItem/VerticalTabItem.d.ts +2 -9
  195. package/types/components/Tabs/ui/vertical/VerticalTabItem/VerticalTabItem.d.ts.map +1 -1
  196. package/types/components/Tabs/ui/vertical/VerticalTabItem/VerticalTabItem.styles.d.ts.map +1 -1
  197. package/types/examples/plasma_b2c/components/Badge/Badge.config.d.ts +0 -3
  198. package/types/examples/plasma_b2c/components/Badge/Badge.config.d.ts.map +1 -1
  199. package/types/examples/plasma_b2c/components/Badge/Badge.d.ts +0 -6
  200. package/types/examples/plasma_b2c/components/Badge/Badge.d.ts.map +1 -1
  201. package/types/examples/plasma_b2c/components/Counter/Counter.config.d.ts +3 -0
  202. package/types/examples/plasma_b2c/components/Counter/Counter.config.d.ts.map +1 -1
  203. package/types/examples/plasma_b2c/components/Counter/Counter.d.ts +3 -0
  204. package/types/examples/plasma_b2c/components/Counter/Counter.d.ts.map +1 -1
  205. package/types/examples/plasma_b2c/components/Tabs/TabItem.d.ts +0 -6
  206. package/types/examples/plasma_b2c/components/Tabs/TabItem.d.ts.map +1 -1
  207. package/types/examples/plasma_b2c/components/Tabs/horizontal/HorizontalTabItem.config.d.ts +0 -3
  208. package/types/examples/plasma_b2c/components/Tabs/horizontal/HorizontalTabItem.config.d.ts.map +1 -1
  209. package/types/examples/plasma_b2c/components/Tabs/vertical/VerticalTabItem.config.d.ts +0 -3
  210. package/types/examples/plasma_b2c/components/Tabs/vertical/VerticalTabItem.config.d.ts.map +1 -1
  211. package/types/examples/plasma_web/components/Badge/Badge.d.ts +0 -3
  212. package/types/examples/plasma_web/components/Badge/Badge.d.ts.map +1 -1
  213. package/types/examples/plasma_web/components/Counter/Counter.config.d.ts +3 -0
  214. package/types/examples/plasma_web/components/Counter/Counter.config.d.ts.map +1 -1
  215. package/types/examples/plasma_web/components/Counter/Counter.d.ts +3 -0
  216. package/types/examples/plasma_web/components/Counter/Counter.d.ts.map +1 -1
  217. package/types/examples/plasma_web/components/Tabs/TabItem.d.ts +0 -6
  218. package/types/examples/plasma_web/components/Tabs/TabItem.d.ts.map +1 -1
  219. package/types/examples/plasma_web/components/Tabs/horizontal/HorizontalTabItem.config.d.ts +0 -3
  220. package/types/examples/plasma_web/components/Tabs/horizontal/HorizontalTabItem.config.d.ts.map +1 -1
  221. package/types/examples/plasma_web/components/Tabs/vertical/VerticalTabItem.config.d.ts +0 -3
  222. package/types/examples/plasma_web/components/Tabs/vertical/VerticalTabItem.config.d.ts.map +1 -1
  223. package/cjs/components/Badge/variations/_truncate/base.js +0 -9
  224. package/cjs/components/Badge/variations/_truncate/base.js.map +0 -1
  225. package/cjs/components/Badge/variations/_truncate/base_nf9u2h.css +0 -1
  226. package/cjs/components/Tabs/ui/horizontal/HorizontalTabItem/variations/_truncate/base.js +0 -9
  227. package/cjs/components/Tabs/ui/horizontal/HorizontalTabItem/variations/_truncate/base.js.map +0 -1
  228. package/cjs/components/Tabs/ui/horizontal/HorizontalTabItem/variations/_truncate/base_1b34xv3.css +0 -1
  229. package/cjs/components/Tabs/ui/vertical/VerticalTabItem/VerticalTabItem.styles_hh65kv.css +0 -5
  230. package/cjs/components/Tabs/ui/vertical/VerticalTabItem/variations/_truncate/base.js +0 -9
  231. package/cjs/components/Tabs/ui/vertical/VerticalTabItem/variations/_truncate/base.js.map +0 -1
  232. package/cjs/components/Tabs/ui/vertical/VerticalTabItem/variations/_truncate/base_1nwonlh.css +0 -1
  233. package/emotion/cjs/components/Badge/variations/_truncate/base.js +0 -10
  234. package/emotion/cjs/components/Badge/variations/_truncate/tokens.json +0 -1
  235. package/emotion/cjs/components/Tabs/ui/horizontal/HorizontalTabItem/variations/_truncate/base.js +0 -10
  236. package/emotion/cjs/components/Tabs/ui/horizontal/HorizontalTabItem/variations/_truncate/tokens.json +0 -1
  237. package/emotion/cjs/components/Tabs/ui/vertical/VerticalTabItem/variations/_truncate/base.js +0 -10
  238. package/emotion/cjs/components/Tabs/ui/vertical/VerticalTabItem/variations/_truncate/tokens.json +0 -1
  239. package/emotion/es/components/Badge/variations/_truncate/base.js +0 -4
  240. package/emotion/es/components/Badge/variations/_truncate/tokens.json +0 -1
  241. package/emotion/es/components/Tabs/ui/horizontal/HorizontalTabItem/variations/_truncate/base.js +0 -4
  242. package/emotion/es/components/Tabs/ui/horizontal/HorizontalTabItem/variations/_truncate/tokens.json +0 -1
  243. package/emotion/es/components/Tabs/ui/vertical/VerticalTabItem/variations/_truncate/base.js +0 -4
  244. package/emotion/es/components/Tabs/ui/vertical/VerticalTabItem/variations/_truncate/tokens.json +0 -1
  245. package/es/components/Badge/variations/_truncate/base.js +0 -5
  246. package/es/components/Badge/variations/_truncate/base.js.map +0 -1
  247. package/es/components/Badge/variations/_truncate/base_nf9u2h.css +0 -1
  248. package/es/components/Tabs/ui/horizontal/HorizontalTabItem/variations/_truncate/base.js +0 -5
  249. package/es/components/Tabs/ui/horizontal/HorizontalTabItem/variations/_truncate/base.js.map +0 -1
  250. package/es/components/Tabs/ui/horizontal/HorizontalTabItem/variations/_truncate/base_1b34xv3.css +0 -1
  251. package/es/components/Tabs/ui/vertical/VerticalTabItem/VerticalTabItem.styles_hh65kv.css +0 -5
  252. package/es/components/Tabs/ui/vertical/VerticalTabItem/variations/_truncate/base.js +0 -5
  253. package/es/components/Tabs/ui/vertical/VerticalTabItem/variations/_truncate/base.js.map +0 -1
  254. package/es/components/Tabs/ui/vertical/VerticalTabItem/variations/_truncate/base_1nwonlh.css +0 -1
  255. package/styled-components/cjs/components/Badge/variations/_truncate/base.js +0 -10
  256. package/styled-components/cjs/components/Badge/variations/_truncate/tokens.json +0 -1
  257. package/styled-components/cjs/components/Tabs/ui/horizontal/HorizontalTabItem/variations/_truncate/base.js +0 -10
  258. package/styled-components/cjs/components/Tabs/ui/horizontal/HorizontalTabItem/variations/_truncate/tokens.json +0 -1
  259. package/styled-components/cjs/components/Tabs/ui/vertical/VerticalTabItem/variations/_truncate/base.js +0 -10
  260. package/styled-components/cjs/components/Tabs/ui/vertical/VerticalTabItem/variations/_truncate/tokens.json +0 -1
  261. package/styled-components/es/components/Badge/variations/_truncate/base.js +0 -4
  262. package/styled-components/es/components/Badge/variations/_truncate/tokens.json +0 -1
  263. package/styled-components/es/components/Tabs/ui/horizontal/HorizontalTabItem/variations/_truncate/base.js +0 -4
  264. package/styled-components/es/components/Tabs/ui/horizontal/HorizontalTabItem/variations/_truncate/tokens.json +0 -1
  265. package/styled-components/es/components/Tabs/ui/vertical/VerticalTabItem/variations/_truncate/base.js +0 -4
  266. package/styled-components/es/components/Tabs/ui/vertical/VerticalTabItem/variations/_truncate/tokens.json +0 -1
  267. package/types/components/Badge/variations/_truncate/base.d.ts +0 -2
  268. package/types/components/Badge/variations/_truncate/base.d.ts.map +0 -1
  269. package/types/components/Tabs/ui/horizontal/HorizontalTabItem/variations/_truncate/base.d.ts +0 -2
  270. package/types/components/Tabs/ui/horizontal/HorizontalTabItem/variations/_truncate/base.d.ts.map +0 -1
  271. package/types/components/Tabs/ui/vertical/VerticalTabItem/variations/_truncate/base.d.ts +0 -2
  272. package/types/components/Tabs/ui/vertical/VerticalTabItem/variations/_truncate/base.d.ts.map +0 -1
@@ -23,9 +23,6 @@ var config = exports.config = {
23
23
  },
24
24
  disabled: {
25
25
  "true": /*#__PURE__*/(0, _styledComponents.css)(["", ":0.4;"], _Tabs.tabsTokens.disabledOpacity)
26
- },
27
- truncate: {
28
- "true": /*#__PURE__*/(0, _styledComponents.css)([""])
29
26
  }
30
27
  }
31
28
  };
@@ -1,11 +1,5 @@
1
- function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
2
- var _excluded = ["children", "className", "text", "contentLeft", "contentRight", "size", "view", "pilled", "transparent", "clear", "maxWidth"];
1
+ var _excluded = ["children", "className", "text", "contentLeft", "contentRight", "size", "view", "pilled", "transparent", "clear"];
3
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); }
4
- function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
5
- function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
6
- function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
7
- function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
8
- function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
9
3
  function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
10
4
  function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
11
5
  import React, { forwardRef } from 'react';
@@ -15,7 +9,6 @@ import { base as sizeCSS } from './variations/_size/base';
15
9
  import { base as pilledCSS } from './variations/_pilled/base';
16
10
  import { base as transparentCSS } from './variations/_transparent/base';
17
11
  import { base as clearCSS } from './variations/_clear/base';
18
- import { base as truncateCSS } from './variations/_truncate/base';
19
12
  import { StyledContentLeft, StyledContentMain, StyledContentRight, base } from './Badge.styles';
20
13
  import { classes } from './Badge.tokens';
21
14
  export var badgeRoot = function badgeRoot(Root) {
@@ -33,28 +26,20 @@ export var badgeRoot = function badgeRoot(Root) {
33
26
  transparent = _props$transparent === void 0 ? false : _props$transparent,
34
27
  _props$clear = props.clear,
35
28
  clear = _props$clear === void 0 ? false : _props$clear,
36
- _props$maxWidth = props.maxWidth,
37
- maxWidth = _props$maxWidth === void 0 ? 'auto' : _props$maxWidth,
38
29
  rest = _objectWithoutProperties(props, _excluded);
39
30
  var pilledClass = pilled ? classes.badgePilled : undefined;
40
31
  var transparentClass = transparent ? classes.badgeTransparent : undefined;
41
32
  var clearClass = clear ? classes.badgeClear : undefined;
42
33
  var txt = !text && typeof children === 'string' ? children : text;
43
- var truncate = maxWidth !== 'auto';
44
34
  return /*#__PURE__*/React.createElement(Root, _extends({
45
35
  ref: ref,
46
- className: cx(pilledClass, transparentClass, clearClass, truncate && classes.badgeTruncate, className),
36
+ className: cx(pilledClass, transparentClass, clearClass, className),
47
37
  view: view,
48
38
  size: size,
49
39
  pilled: pilled,
50
40
  transparent: transparent,
51
- clear: clear,
52
- truncate: truncate
53
- }, rest, {
54
- style: _objectSpread(_objectSpread({}, rest.style), {}, {
55
- maxWidth: maxWidth
56
- })
57
- }), contentLeft && /*#__PURE__*/React.createElement(StyledContentLeft, null, contentLeft), txt ? /*#__PURE__*/React.createElement(StyledContentMain, null, txt) : children, contentRight && /*#__PURE__*/React.createElement(StyledContentRight, null, contentRight));
41
+ clear: clear
42
+ }, rest), contentLeft && /*#__PURE__*/React.createElement(StyledContentLeft, null, contentLeft), txt ? /*#__PURE__*/React.createElement(StyledContentMain, null, txt) : children, contentRight && /*#__PURE__*/React.createElement(StyledContentRight, null, contentRight));
58
43
  });
59
44
  };
60
45
  export var badgeConfig = {
@@ -80,10 +65,6 @@ export var badgeConfig = {
80
65
  clear: {
81
66
  css: clearCSS,
82
67
  attrs: true
83
- },
84
- truncate: {
85
- css: truncateCSS,
86
- attrs: true
87
68
  }
88
69
  },
89
70
  defaults: {
@@ -1,8 +1,7 @@
1
1
  export var classes = {
2
2
  badgePilled: 'badge-pilled',
3
3
  badgeTransparent: 'badge-transparent',
4
- badgeClear: 'badge-clear',
5
- badgeTruncate: 'badge-truncate'
4
+ badgeClear: 'badge-clear'
6
5
  };
7
6
  export var tokens = {
8
7
  background: '--plasma-badge-background',
@@ -1,24 +1,34 @@
1
- var _excluded = ["count", "maxCount", "size", "view"];
1
+ var _excluded = ["count", "maxCount", "size", "view", "className"];
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 _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
4
4
  function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
5
5
  import React, { forwardRef } from 'react';
6
+ import { cx } from '../../utils';
6
7
  import { base as viewCSS } from './variations/_view/base';
7
8
  import { base as sizeCSS } from './variations/_size/base';
8
9
  import { base } from './Counter.styles';
10
+ import { classes } from './Counter.tokens';
11
+ var MIN_COUNT = 1;
9
12
  export var counterRoot = function counterRoot(Root) {
10
13
  return /*#__PURE__*/forwardRef(function (props, ref) {
11
14
  var count = props.count,
12
15
  maxCount = props.maxCount,
13
16
  size = props.size,
14
17
  view = props.view,
18
+ className = props.className,
15
19
  rest = _objectWithoutProperties(props, _excluded);
16
- var content = maxCount && count > maxCount ? "".concat(maxCount, "+") : count;
20
+ var currentCount = count < MIN_COUNT ? MIN_COUNT : count;
21
+ var currentMaxCount = maxCount && maxCount < MIN_COUNT ? MIN_COUNT : maxCount;
22
+ var isCurrentCountOneDigit = currentCount >= 0 && currentCount < 10;
23
+ var isCurrentMaxCountExceeded = currentMaxCount && currentCount > currentMaxCount;
24
+ var content = isCurrentMaxCountExceeded ? "".concat(currentMaxCount, "+") : currentCount;
25
+ var roundClass = !isCurrentMaxCountExceeded && isCurrentCountOneDigit ? classes.round : undefined;
17
26
  return /*#__PURE__*/React.createElement(Root, _extends({
18
27
  ref: ref,
19
28
  view: view,
20
29
  size: size,
21
- count: count
30
+ count: count,
31
+ className: cx(roundClass, className)
22
32
  }, rest), content);
23
33
  });
24
34
  };
@@ -12,7 +12,7 @@ import { PropsTable, Description } from '@site/src/components';
12
12
  ## Примеры
13
13
 
14
14
  ### Максимальное значение числового badge
15
- Задается с помощью свойства `maxCount`.
15
+ Задается с помощью свойства `maxCount`. Как и `count`, не может быть меньше 1.
16
16
 
17
17
  ```tsx live
18
18
  import React from 'react';
@@ -29,7 +29,7 @@ export function App() {
29
29
  ```
30
30
 
31
31
  ### Размер числового badge
32
- Размер задается с помощью свойства `size`. Возможные значения свойства: `"xs"` или `"xxs"`.
32
+ Размер задается с помощью свойства `size`. Возможные значения свойства: `xxs`, `xs`, `s`, `m`, `l`.
33
33
 
34
34
  ```tsx live
35
35
  import React from 'react';
@@ -1,3 +1,6 @@
1
+ export var classes = {
2
+ round: '--plasma-counter-round'
3
+ };
1
4
  export var tokens = {
2
5
  background: '--plasma-counter-background',
3
6
  color: '--plasma-counter-color',
@@ -1,3 +1,3 @@
1
1
  import { css } from 'styled-components';
2
- import { tokens } from '../../Counter.tokens';
3
- export var base = /*#__PURE__*/css(["font-family:var(", ");font-size:var(", ");font-style:var(", ");font-weight:var(", ");letter-spacing:var(", ");line-height:var(", ");border-radius:var(", ");height:var(", ");padding-top:var(", ");padding-right:var(", ");padding-bottom:var(", ");padding-left:var(", ");"], tokens.fontFamily, tokens.fontSize, tokens.fontStyle, tokens.fontWeight, tokens.letterSpacing, tokens.lineHeight, tokens.borderRadius, tokens.height, tokens.paddingTop, tokens.paddingRight, tokens.paddingBottom, tokens.paddingLeft);
2
+ import { classes, tokens } from '../../Counter.tokens';
3
+ export var base = /*#__PURE__*/css(["font-family:var(", ");font-size:var(", ");font-style:var(", ");font-weight:var(", ");letter-spacing:var(", ");line-height:var(", ");border-radius:var(", ");height:var(", ");padding-top:var(", ");padding-right:var(", ");padding-bottom:var(", ");padding-left:var(", ");&.", "{width:var(", ");}"], tokens.fontFamily, tokens.fontSize, tokens.fontStyle, tokens.fontWeight, tokens.letterSpacing, tokens.lineHeight, tokens.borderRadius, tokens.height, tokens.paddingTop, tokens.paddingRight, tokens.paddingBottom, tokens.paddingLeft, classes.round, tokens.height);
@@ -130,7 +130,7 @@ export var popupRoot = function popupRoot(Root) {
130
130
  animationInfo: animationInfo,
131
131
  setVisible: setVisible
132
132
  }, children));
133
- if (typeof frame !== 'string' && frame && frame.current) {
133
+ if (typeof frame !== 'string' && frame && frame.current && canUseDOM) {
134
134
  return /*#__PURE__*/React.createElement(Portal, {
135
135
  container: frame.current
136
136
  }, rootNode);
@@ -82,7 +82,7 @@ export var PopupProvider = function PopupProvider(_ref) {
82
82
  };
83
83
  return /*#__PURE__*/React.createElement(PopupContext.Provider, {
84
84
  value: context
85
- }, children, /*#__PURE__*/React.createElement(Portal, {
85
+ }, children, canUseDOM && /*#__PURE__*/React.createElement(Portal, {
86
86
  container: document.body
87
87
  }, /*#__PURE__*/React.createElement(StyledPortal, {
88
88
  id: rootId
@@ -1,5 +1,6 @@
1
1
  import React from 'react';
2
2
  import ReactDOM from 'react-dom';
3
+ import { canUseDOM } from '../../utils';
3
4
  /**
4
5
  * Вспомогательный компонент. Используется в Popup, Popover.
5
6
  * Представляет собой ReactDOM.createPortal() в форме компонента.
@@ -9,6 +10,9 @@ export var Portal = function Portal(_ref) {
9
10
  container = _ref.container,
10
11
  _ref$disabled = _ref.disabled,
11
12
  disabled = _ref$disabled === void 0 ? false : _ref$disabled;
13
+ if (!canUseDOM) {
14
+ return null;
15
+ }
12
16
  var portalContainer = typeof container === 'function' ? container() : container;
13
17
  return /*#__PURE__*/React.createElement(React.Fragment, null, disabled && children, !disabled && /*#__PURE__*/ReactDOM.createPortal(children, portalContainer));
14
18
  };
@@ -14,8 +14,7 @@ export var classes = {
14
14
  tabsHasTopArrow: 'tabs-has-top-arrow',
15
15
  tabsHasBottomArrow: 'tabs-has-bottom-arrow',
16
16
  tabsClipScroll: 'tabs-clip-scroll',
17
- tabsClipShowAll: 'tabs-clip-show-all',
18
- tabsTruncate: 'tabs-truncate'
17
+ tabsClipShowAll: 'tabs-clip-show-all'
19
18
  };
20
19
  export var tokens = {
21
20
  disabledOpacity: '--plasma-tabs-disabled-opacity',
@@ -1,11 +1,5 @@
1
- function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
2
- var _excluded = ["size", "view", "isActive", "selected", "disabled", "pilled", "children", "value", "contentLeft", "contentRight", "animated", "onIndexChange", "itemIndex", "tabIndex", "className", "onClick", "maxItemWidth"];
1
+ var _excluded = ["size", "view", "isActive", "selected", "disabled", "pilled", "children", "value", "contentLeft", "contentRight", "animated", "onIndexChange", "itemIndex", "tabIndex", "className", "onClick"];
3
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); }
4
- function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
5
- function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
6
- function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
7
- function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
8
- function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
9
3
  function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
10
4
  function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
11
5
  import React, { forwardRef, useRef, useContext, useEffect, useCallback } from 'react';
@@ -17,7 +11,6 @@ import { base as viewCSS } from './variations/_view/base';
17
11
  import { base as sizeCSS } from './variations/_size/base';
18
12
  import { base as pilledCSS } from './variations/_pilled/base';
19
13
  import { base as disabledCSS } from './variations/_disabled/base';
20
- import { base as truncateCSS } from './variations/_truncate/base';
21
14
  import { LeftContent, RightContent, StyledContent, TabItemValue, base } from './HorizontalTabItem.styles';
22
15
  export var horizontalTabItemRoot = function horizontalTabItemRoot(Root) {
23
16
  return /*#__PURE__*/forwardRef(function (props, outerRef) {
@@ -40,13 +33,11 @@ export var horizontalTabItemRoot = function horizontalTabItemRoot(Root) {
40
33
  tabIndex = props.tabIndex,
41
34
  className = props.className,
42
35
  onClick = props.onClick,
43
- maxWidth = props.maxItemWidth,
44
36
  rest = _objectWithoutProperties(props, _excluded);
45
37
  var innerRef = useRef(null);
46
38
  var ref = useForkRef(outerRef, innerRef);
47
39
  var refs = useContext(TabsContext);
48
40
  var role = 'tab';
49
- var truncate = maxWidth !== 'auto';
50
41
  var pilledAttr = view !== 'clear' && pilled;
51
42
  var animatedClass = animated ? classes.tabItemAnimated : undefined;
52
43
  var pilledClass = pilledAttr ? classes.tabsPilled : undefined;
@@ -105,16 +96,11 @@ export var horizontalTabItemRoot = function horizontalTabItemRoot(Root) {
105
96
  // TODO: убрать каст any, когда будут удалены deprecated props
106
97
  ,
107
98
  size: size,
108
- truncate: truncate,
109
99
  onFocus: onItemFocus,
110
100
  tabIndex: hasKeyNavigation ? navigationTabIndex : tabIndex,
111
- className: cx(pilledClass, selectedClass, animatedClass, truncate && classes.tabsTruncate, className),
101
+ className: cx(pilledClass, selectedClass, animatedClass, className),
112
102
  onClick: handleClick
113
- }, rest, {
114
- style: _objectSpread(_objectSpread({}, rest.style), {}, {
115
- maxWidth: maxWidth
116
- })
117
- }), /*#__PURE__*/React.createElement(React.Fragment, null, contentLeft && /*#__PURE__*/React.createElement(LeftContent, {
103
+ }, rest), /*#__PURE__*/React.createElement(React.Fragment, null, contentLeft && /*#__PURE__*/React.createElement(LeftContent, {
118
104
  className: classes.tabLeftContent
119
105
  }, contentLeft), /*#__PURE__*/React.createElement(StyledContent, {
120
106
  className: classes.tabContent
@@ -141,9 +127,6 @@ export var horizontalTabItemConfig = {
141
127
  },
142
128
  pilled: {
143
129
  css: pilledCSS
144
- },
145
- truncate: {
146
- css: truncateCSS
147
130
  }
148
131
  },
149
132
  defaults: {
@@ -2,7 +2,7 @@ import styled from 'styled-components';
2
2
  import { css } from 'styled-components';
3
3
  import { addFocus } from '../../../../../mixins';
4
4
  import { tokens } from '../../../tokens';
5
- export var base = /*#__PURE__*/css(["position:relative;display:flex;align-items:center;justify-content:center;box-sizing:border-box;align-items:center;white-space:nowrap;gap:var(", ");padding:var(", ",var(", "));appearance:none;border:none;outline:none;cursor:pointer;-webkit-tap-highlight-color:transparent;&:first-child{margin-left:0;}", ";"], tokens.itemContentGap, tokens.itemPaddingClear, tokens.itemPadding, /*#__PURE__*/addFocus({
5
+ export var base = /*#__PURE__*/css(["position:relative;display:flex;align-items:center;justify-content:center;box-sizing:border-box;align-items:center;gap:var(", ");padding:var(", ",var(", "));appearance:none;border:none;outline:none;cursor:pointer;-webkit-tap-highlight-color:transparent;&:first-child{margin-left:0;}", ";"], tokens.itemContentGap, tokens.itemPaddingClear, tokens.itemPadding, /*#__PURE__*/addFocus({
6
6
  outlineSize: '0.063rem',
7
7
  outlineOffset: '-0.125rem',
8
8
  outlineColor: /*#__PURE__*/"var(".concat(tokens.outlineFocusColor, ")"),
@@ -1,11 +1,5 @@
1
- function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
2
- var _excluded = ["size", "view", "selected", "disabled", "children", "value", "contentLeft", "contentRight", "onIndexChange", "itemIndex", "tabIndex", "className", "onClick", "maxItemWidth"];
1
+ var _excluded = ["size", "view", "selected", "disabled", "children", "value", "contentLeft", "contentRight", "onIndexChange", "itemIndex", "tabIndex", "className", "onClick"];
3
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); }
4
- function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
5
- function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
6
- function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
7
- function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
8
- function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
9
3
  function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
10
4
  function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
11
5
  import React, { forwardRef, useRef, useContext, useEffect, useCallback } from 'react';
@@ -17,7 +11,6 @@ import { base, LeftContent, RightContent, StyledContent, TabItemValue } from './
17
11
  import { base as viewCSS } from './variations/_view/base';
18
12
  import { base as sizeCSS } from './variations/_size/base';
19
13
  import { base as disabledCSS } from './variations/_disabled/base';
20
- import { base as truncateCSS } from './variations/_truncate/base';
21
14
  export var verticalTabItemRoot = function verticalTabItemRoot(Root) {
22
15
  return /*#__PURE__*/forwardRef(function (props, outerRef) {
23
16
  var size = props.size,
@@ -34,13 +27,11 @@ export var verticalTabItemRoot = function verticalTabItemRoot(Root) {
34
27
  tabIndex = props.tabIndex,
35
28
  className = props.className,
36
29
  onClick = props.onClick,
37
- maxWidth = props.maxItemWidth,
38
30
  rest = _objectWithoutProperties(props, _excluded);
39
31
  var innerRef = useRef(null);
40
32
  var ref = useForkRef(outerRef, innerRef);
41
33
  var refs = useContext(TabsContext);
42
34
  var role = 'tab';
43
- var truncate = maxWidth !== 'auto';
44
35
  var selectedClass = selected ? classes.selectedTabsItem : undefined;
45
36
  var hasKeyNavigation = itemIndex !== undefined && onIndexChange !== undefined;
46
37
  var navigationTabIndex = !disabled && (refs === null || refs === void 0 ? void 0 : refs.current) === itemIndex ? 0 : -1;
@@ -92,16 +83,11 @@ export var verticalTabItemRoot = function verticalTabItemRoot(Root) {
92
83
  role: role,
93
84
  view: view,
94
85
  size: size,
95
- truncate: truncate,
96
86
  onFocus: onItemFocus,
97
87
  tabIndex: hasKeyNavigation ? navigationTabIndex : tabIndex,
98
- className: cx(selectedClass, truncate && classes.tabsTruncate, className),
88
+ className: cx(selectedClass, className),
99
89
  onClick: handleClick
100
- }, rest, {
101
- style: _objectSpread(_objectSpread({}, rest.style), {}, {
102
- maxWidth: maxWidth
103
- })
104
- }), /*#__PURE__*/React.createElement(React.Fragment, null, contentLeft && /*#__PURE__*/React.createElement(LeftContent, {
90
+ }, rest), /*#__PURE__*/React.createElement(React.Fragment, null, contentLeft && /*#__PURE__*/React.createElement(LeftContent, {
105
91
  className: classes.tabLeftContent
106
92
  }, contentLeft), /*#__PURE__*/React.createElement(StyledContent, {
107
93
  className: classes.tabContent
@@ -125,9 +111,6 @@ export var verticalTabItemConfig = {
125
111
  disabled: {
126
112
  css: disabledCSS,
127
113
  attrs: true
128
- },
129
- truncate: {
130
- css: truncateCSS
131
114
  }
132
115
  },
133
116
  defaults: {
@@ -4,7 +4,7 @@ import { css } from 'styled-components';
4
4
  import styled from 'styled-components';
5
5
  import { addFocus } from '../../../../../mixins';
6
6
  import { tokens } from '../../../tokens';
7
- export var base = /*#__PURE__*/css(_templateObject || (_templateObject = /*#__PURE__*/_taggedTemplateLiteral(["\n position: relative;\n display: flex;\n align-items: center;\n justify-content: flex-start;\n box-sizing: border-box;\n white-space: nowrap;\n\n gap: var(", ");\n padding: var(", ");\n\n appearance: none;\n border: none;\n outline: none;\n cursor: pointer;\n -webkit-tap-highlight-color: transparent;\n\n ", ";\n"])), tokens.itemContentGap, tokens.itemPaddingOrientationVertical, /*#__PURE__*/addFocus({
7
+ export var base = /*#__PURE__*/css(_templateObject || (_templateObject = /*#__PURE__*/_taggedTemplateLiteral(["\n position: relative;\n display: flex;\n align-items: center;\n justify-content: flex-start;\n box-sizing: border-box;\n align-items: center;\n\n gap: var(", ");\n padding: var(", ");\n\n appearance: none;\n border: none;\n outline: none;\n cursor: pointer;\n -webkit-tap-highlight-color: transparent;\n\n ", ";\n"])), tokens.itemContentGap, tokens.itemPaddingOrientationVertical, /*#__PURE__*/addFocus({
8
8
  outlineSize: '0.063rem',
9
9
  outlineOffset: '-0.125rem',
10
10
  outlineColor: /*#__PURE__*/"var(".concat(tokens.outlineFocusColor, ")"),
@@ -16,7 +16,7 @@ export var StyledContent = /*#__PURE__*/styled.div.withConfig({
16
16
  })(["display:inline-block;width:fit-content;padding:0 var(", ",var(", "));"], tokens.itemContentPaddingClear, tokens.itemContentPadding);
17
17
  export var TabItemValue = /*#__PURE__*/styled.span.withConfig({
18
18
  componentId: "plasma-new-hope__sc-1pflgj8-1"
19
- })(["white-space:nowrap;color:var(", ");"], tokens.itemValueColor);
19
+ })(["color:var(", ");"], tokens.itemValueColor);
20
20
  export var RightContent = /*#__PURE__*/styled.div.withConfig({
21
21
  componentId: "plasma-new-hope__sc-1pflgj8-2"
22
22
  })(["display:flex;color:inherit;&:hover{color:inherit;}"]);
@@ -29,9 +29,6 @@ export var config = {
29
29
  },
30
30
  clear: {
31
31
  "true": /*#__PURE__*/css([""])
32
- },
33
- truncate: {
34
- "true": /*#__PURE__*/css([""])
35
32
  }
36
33
  }
37
34
  };
@@ -31,9 +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
34
  ...disableProps(['contentLeft', 'contentRight']),
38
35
  },
39
36
  };
@@ -67,7 +64,7 @@ export const Default: Story = {
67
64
  },
68
65
  },
69
66
  args: {
70
- text: 'Hello Kitty',
67
+ text: 'Hello',
71
68
  view: 'default',
72
69
  size: 'm',
73
70
  enableContentLeft: false,
@@ -75,7 +72,6 @@ export const Default: Story = {
75
72
  clear: false,
76
73
  pilled: false,
77
74
  transparent: false,
78
- maxWidth: '',
79
75
  },
80
76
  render: ({ enableContentLeft, enableContentRight, size, ...rest }: StoryProps) => {
81
77
  const iconSize = size === 'l' ? '1rem' : '0.75rem';
@@ -16,8 +16,11 @@ export var config = {
16
16
  light: /*#__PURE__*/css(["", ":var(--on-light-text-primary);", ":var(--on-dark-surface-solid-default);"], counterTokens.color, counterTokens.background)
17
17
  },
18
18
  size: {
19
- xs: /*#__PURE__*/css(["", ":0.5rem;", ":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);"], counterTokens.borderRadius, counterTokens.height, counterTokens.paddingRight, counterTokens.paddingLeft, counterTokens.fontFamily, counterTokens.fontSize, counterTokens.fontStyle, counterTokens.fontWeight, counterTokens.letterSpacing, counterTokens.lineHeight),
20
- xxs: /*#__PURE__*/css(["", ":0.5rem;", ":0.75rem;", ":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);"], counterTokens.borderRadius, counterTokens.height, counterTokens.paddingRight, counterTokens.paddingLeft, counterTokens.fontFamily, counterTokens.fontSize, counterTokens.fontStyle, counterTokens.fontWeight, counterTokens.letterSpacing, counterTokens.lineHeight)
19
+ l: /*#__PURE__*/css(["", ":1rem;", ":1.75rem;", ":0.625rem;", ":0.625rem;", ":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);"], counterTokens.borderRadius, counterTokens.height, counterTokens.paddingRight, counterTokens.paddingLeft, counterTokens.fontFamily, counterTokens.fontSize, counterTokens.fontStyle, counterTokens.fontWeight, counterTokens.letterSpacing, counterTokens.lineHeight),
20
+ m: /*#__PURE__*/css(["", ":1rem;", ":1.5rem;", ":0.5rem;", ":0.5rem;", ":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);"], counterTokens.borderRadius, counterTokens.height, counterTokens.paddingRight, counterTokens.paddingLeft, counterTokens.fontFamily, counterTokens.fontSize, counterTokens.fontStyle, counterTokens.fontWeight, counterTokens.letterSpacing, counterTokens.lineHeight),
21
+ s: /*#__PURE__*/css(["", ":1rem;", ":1.25rem;", ":0.375rem;", ":0.375rem;", ":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);"], counterTokens.borderRadius, counterTokens.height, counterTokens.paddingRight, counterTokens.paddingLeft, counterTokens.fontFamily, counterTokens.fontSize, counterTokens.fontStyle, counterTokens.fontWeight, counterTokens.letterSpacing, counterTokens.lineHeight),
22
+ xs: /*#__PURE__*/css(["", ":1rem;", ":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);"], counterTokens.borderRadius, counterTokens.height, counterTokens.paddingRight, counterTokens.paddingLeft, counterTokens.fontFamily, counterTokens.fontSize, counterTokens.fontStyle, counterTokens.fontWeight, counterTokens.letterSpacing, counterTokens.lineHeight),
23
+ xxs: /*#__PURE__*/css(["", ":1rem;", ":0.75rem;", ":0.125rem;", ":0.125rem;", ":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);"], counterTokens.borderRadius, counterTokens.height, counterTokens.paddingRight, counterTokens.paddingLeft, counterTokens.fontFamily, counterTokens.fontSize, counterTokens.fontStyle, counterTokens.fontWeight, counterTokens.letterSpacing, counterTokens.lineHeight)
21
24
  }
22
25
  }
23
26
  };
@@ -1,4 +1,3 @@
1
- import React from 'react';
2
1
  import { disableProps } from '@salutejs/plasma-sb-utils';
3
2
  import type { StoryObj, Meta } from '@storybook/react';
4
3
 
@@ -6,19 +5,22 @@ import { WithTheme } from '../../../_helpers';
6
5
 
7
6
  import { Counter } from './Counter';
8
7
 
8
+ const sizes = ['l', 'm', 's', 'xs', 'xxs'];
9
+ const views = ['default', 'accent', 'positive', 'warning', 'negative', 'dark', 'light'];
10
+
9
11
  const meta: Meta<typeof Counter> = {
10
12
  title: 'plasma_b2c/Counter',
11
13
  component: Counter,
12
14
  decorators: [WithTheme],
13
15
  argTypes: {
14
16
  size: {
15
- options: ['xs', 'xxs'],
17
+ options: sizes,
16
18
  control: {
17
19
  type: 'select',
18
20
  },
19
21
  },
20
22
  view: {
21
- options: ['default', 'accent', 'positive', 'warning', 'negative', 'dark', 'light'],
23
+ options: views,
22
24
  control: {
23
25
  type: 'select',
24
26
  },
@@ -33,8 +35,8 @@ type Story = StoryObj<typeof Counter>;
33
35
 
34
36
  export const Default: Story = {
35
37
  args: {
36
- count: 25,
37
- maxCount: 100,
38
+ count: 123,
39
+ maxCount: 200,
38
40
  view: 'default',
39
41
  size: 'xs',
40
42
  },