@salutejs/plasma-new-hope 0.176.1-canary.1510.11572230988.0 → 0.177.0-canary.1500.11571505911.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (311) hide show
  1. package/cjs/components/Badge/Badge.css +2 -0
  2. package/cjs/components/Badge/Badge.js +17 -4
  3. package/cjs/components/Badge/Badge.js.map +1 -1
  4. package/cjs/components/Badge/Badge.tokens.js +2 -1
  5. package/cjs/components/Badge/Badge.tokens.js.map +1 -1
  6. package/cjs/components/Badge/variations/_truncate/base.js +9 -0
  7. package/cjs/components/Badge/variations/_truncate/base.js.map +1 -0
  8. package/cjs/components/Badge/variations/_truncate/base_nf9u2h.css +1 -0
  9. package/cjs/components/Notification/Notification.css +11 -11
  10. package/cjs/components/Notification/Notification.js +2 -2
  11. package/cjs/components/Notification/Notification.js.map +1 -1
  12. package/cjs/components/Notification/Notification.styles.js +2 -11
  13. package/cjs/components/Notification/Notification.styles.js.map +1 -1
  14. package/cjs/components/Notification/{Notification.styles_e6274r.css → Notification.styles_7h8hp0.css} +2 -2
  15. package/cjs/components/Notification/Notification.tokens.js +1 -2
  16. package/cjs/components/Notification/Notification.tokens.js.map +1 -1
  17. package/cjs/components/Notification/Notification.types.js.map +1 -1
  18. package/cjs/components/Notification/NotificationsPortal.js +4 -8
  19. package/cjs/components/Notification/NotificationsPortal.js.map +1 -1
  20. package/cjs/components/Notification/NotificationsProvider.css +11 -11
  21. package/cjs/components/Notification/NotificationsProvider.js +1 -3
  22. package/cjs/components/Notification/NotificationsProvider.js.map +1 -1
  23. package/cjs/components/Pagination/Pagination.css +12 -12
  24. package/cjs/components/Pagination/ui/PaginationSelectPerPage/PaginationSelectPerPage.css +12 -12
  25. package/cjs/components/Select/Select.css +12 -12
  26. package/cjs/components/Select/Select.tokens.js +1 -2
  27. package/cjs/components/Select/Select.tokens.js.map +1 -1
  28. package/cjs/components/Select/ui/Inner/Inner.css +12 -12
  29. package/cjs/components/Select/ui/Inner/ui/Item/Item.css +12 -12
  30. package/cjs/components/Select/ui/Target/Target.css +12 -12
  31. package/cjs/components/Select/ui/Target/ui/Textfield/Textfield.css +12 -12
  32. package/cjs/components/Select/ui/Target/ui/Textfield/Textfield.styles.js +1 -1
  33. package/cjs/components/Select/ui/Target/ui/Textfield/Textfield.styles.js.map +1 -1
  34. package/{es/components/Select/ui/Target/ui/Textfield/Textfield.styles_jzeap2.css → cjs/components/Select/ui/Target/ui/Textfield/Textfield.styles_11yj58s.css} +1 -1
  35. package/cjs/components/Tabs/tokens.js +2 -1
  36. package/cjs/components/Tabs/tokens.js.map +1 -1
  37. package/cjs/components/Tabs/ui/horizontal/HorizontalTabItem/HorizontalTabItem.css +7 -5
  38. package/cjs/components/Tabs/ui/horizontal/HorizontalTabItem/HorizontalTabItem.js +14 -3
  39. package/cjs/components/Tabs/ui/horizontal/HorizontalTabItem/HorizontalTabItem.js.map +1 -1
  40. package/cjs/components/Tabs/ui/horizontal/HorizontalTabItem/HorizontalTabItem.styles.js +1 -1
  41. package/cjs/components/Tabs/ui/horizontal/HorizontalTabItem/HorizontalTabItem.styles.js.map +1 -1
  42. package/{es/components/Tabs/ui/horizontal/HorizontalTabItem/HorizontalTabItem.styles_hfqv5b.css → cjs/components/Tabs/ui/horizontal/HorizontalTabItem/HorizontalTabItem.styles_1vj7dbl.css} +1 -1
  43. package/cjs/components/Tabs/ui/horizontal/HorizontalTabItem/variations/_truncate/base.js +9 -0
  44. package/cjs/components/Tabs/ui/horizontal/HorizontalTabItem/variations/_truncate/base.js.map +1 -0
  45. package/cjs/components/Tabs/ui/horizontal/HorizontalTabItem/variations/_truncate/base_1b34xv3.css +1 -0
  46. package/cjs/components/Tabs/ui/vertical/VerticalTabItem/VerticalTabItem.css +7 -5
  47. package/cjs/components/Tabs/ui/vertical/VerticalTabItem/VerticalTabItem.js +14 -3
  48. package/cjs/components/Tabs/ui/vertical/VerticalTabItem/VerticalTabItem.js.map +1 -1
  49. package/cjs/components/Tabs/ui/vertical/VerticalTabItem/VerticalTabItem.styles.js +1 -1
  50. package/cjs/components/Tabs/ui/vertical/VerticalTabItem/VerticalTabItem.styles.js.map +1 -1
  51. package/cjs/components/Tabs/ui/vertical/VerticalTabItem/VerticalTabItem.styles_6ssvos.css +5 -0
  52. package/cjs/components/Tabs/ui/vertical/VerticalTabItem/variations/_truncate/base.js +9 -0
  53. package/cjs/components/Tabs/ui/vertical/VerticalTabItem/variations/_truncate/base.js.map +1 -0
  54. package/cjs/components/Tabs/ui/vertical/VerticalTabItem/variations/_truncate/base_1nwonlh.css +1 -0
  55. package/cjs/index.css +39 -33
  56. package/cjs/index.js +1 -1
  57. package/emotion/cjs/components/Badge/Badge.js +22 -4
  58. package/emotion/cjs/components/Badge/Badge.tokens.js +2 -1
  59. package/emotion/cjs/components/Badge/variations/_truncate/base.js +10 -0
  60. package/emotion/cjs/components/Badge/variations/_truncate/tokens.json +1 -0
  61. package/emotion/cjs/components/Notification/Notification.js +2 -2
  62. package/emotion/cjs/components/Notification/Notification.styles.js +19 -14
  63. package/emotion/cjs/components/Notification/Notification.template-doc.mdx +8 -17
  64. package/emotion/cjs/components/Notification/Notification.tokens.js +1 -2
  65. package/emotion/cjs/components/Notification/NotificationsPortal.js +5 -9
  66. package/emotion/cjs/components/Notification/NotificationsProvider.js +1 -3
  67. package/emotion/cjs/components/Notification/index.js +4 -4
  68. package/emotion/cjs/components/Select/Select.tokens.js +1 -2
  69. package/emotion/cjs/components/Select/ui/Target/ui/Textfield/Textfield.styles.js +21 -12
  70. package/emotion/cjs/components/Tabs/tokens.js +2 -1
  71. package/emotion/cjs/components/Tabs/ui/horizontal/HorizontalTabItem/HorizontalTabItem.js +19 -3
  72. package/emotion/cjs/components/Tabs/ui/horizontal/HorizontalTabItem/HorizontalTabItem.styles.js +6 -6
  73. package/emotion/cjs/components/Tabs/ui/horizontal/HorizontalTabItem/variations/_truncate/base.js +10 -0
  74. package/emotion/cjs/components/Tabs/ui/horizontal/HorizontalTabItem/variations/_truncate/tokens.json +1 -0
  75. package/emotion/cjs/components/Tabs/ui/vertical/VerticalTabItem/VerticalTabItem.js +19 -3
  76. package/emotion/cjs/components/Tabs/ui/vertical/VerticalTabItem/VerticalTabItem.styles.js +6 -6
  77. package/emotion/cjs/components/Tabs/ui/vertical/VerticalTabItem/variations/_truncate/base.js +10 -0
  78. package/emotion/cjs/components/Tabs/ui/vertical/VerticalTabItem/variations/_truncate/tokens.json +1 -0
  79. package/emotion/cjs/examples/plasma_b2c/components/Badge/Badge.config.js +17 -14
  80. package/emotion/cjs/examples/plasma_b2c/components/Badge/Badge.stories.tsx +5 -1
  81. package/emotion/cjs/examples/plasma_b2c/components/Notification/Notification.js +3 -5
  82. package/emotion/cjs/examples/plasma_b2c/components/Notification/Notification.stories.tsx +4 -25
  83. package/emotion/cjs/examples/plasma_b2c/components/Tabs/Tabs.stories.tsx +48 -16
  84. package/emotion/cjs/examples/plasma_b2c/components/Tabs/horizontal/HorizontalTabItem.config.js +18 -15
  85. package/emotion/cjs/examples/plasma_b2c/components/Tabs/vertical/VerticalTabItem.config.js +9 -6
  86. package/emotion/cjs/examples/plasma_web/components/Notification/Notification.js +3 -5
  87. package/emotion/cjs/examples/plasma_web/components/Notification/Notification.stories.tsx +4 -25
  88. package/emotion/cjs/examples/plasma_web/components/Tabs/Tabs.stories.tsx +48 -16
  89. package/emotion/cjs/examples/plasma_web/components/Tabs/horizontal/HorizontalTabItem.config.js +18 -15
  90. package/emotion/cjs/examples/plasma_web/components/Tabs/vertical/VerticalTabItem.config.js +9 -6
  91. package/emotion/es/components/Badge/Badge.js +23 -4
  92. package/emotion/es/components/Badge/Badge.tokens.js +2 -1
  93. package/emotion/es/components/Badge/variations/_truncate/base.js +4 -0
  94. package/emotion/es/components/Badge/variations/_truncate/tokens.json +1 -0
  95. package/emotion/es/components/Notification/Notification.js +1 -1
  96. package/emotion/es/components/Notification/Notification.styles.js +19 -14
  97. package/emotion/es/components/Notification/Notification.template-doc.mdx +8 -17
  98. package/emotion/es/components/Notification/Notification.tokens.js +1 -2
  99. package/emotion/es/components/Notification/NotificationsPortal.js +5 -9
  100. package/emotion/es/components/Notification/NotificationsProvider.js +1 -3
  101. package/emotion/es/components/Notification/index.js +1 -1
  102. package/emotion/es/components/Select/Select.tokens.js +1 -2
  103. package/emotion/es/components/Select/ui/Target/ui/Textfield/Textfield.styles.js +21 -12
  104. package/emotion/es/components/Tabs/tokens.js +2 -1
  105. package/emotion/es/components/Tabs/ui/horizontal/HorizontalTabItem/HorizontalTabItem.js +20 -3
  106. package/emotion/es/components/Tabs/ui/horizontal/HorizontalTabItem/HorizontalTabItem.styles.js +6 -6
  107. package/emotion/es/components/Tabs/ui/horizontal/HorizontalTabItem/variations/_truncate/base.js +4 -0
  108. package/emotion/es/components/Tabs/ui/horizontal/HorizontalTabItem/variations/_truncate/tokens.json +1 -0
  109. package/emotion/es/components/Tabs/ui/vertical/VerticalTabItem/VerticalTabItem.js +20 -3
  110. package/emotion/es/components/Tabs/ui/vertical/VerticalTabItem/VerticalTabItem.styles.js +6 -6
  111. package/emotion/es/components/Tabs/ui/vertical/VerticalTabItem/variations/_truncate/base.js +4 -0
  112. package/emotion/es/components/Tabs/ui/vertical/VerticalTabItem/variations/_truncate/tokens.json +1 -0
  113. package/emotion/es/examples/plasma_b2c/components/Badge/Badge.config.js +17 -14
  114. package/emotion/es/examples/plasma_b2c/components/Badge/Badge.stories.tsx +5 -1
  115. package/emotion/es/examples/plasma_b2c/components/Notification/Notification.js +4 -6
  116. package/emotion/es/examples/plasma_b2c/components/Notification/Notification.stories.tsx +4 -25
  117. package/emotion/es/examples/plasma_b2c/components/Tabs/Tabs.stories.tsx +48 -16
  118. package/emotion/es/examples/plasma_b2c/components/Tabs/horizontal/HorizontalTabItem.config.js +18 -15
  119. package/emotion/es/examples/plasma_b2c/components/Tabs/vertical/VerticalTabItem.config.js +9 -6
  120. package/emotion/es/examples/plasma_web/components/Notification/Notification.js +4 -6
  121. package/emotion/es/examples/plasma_web/components/Notification/Notification.stories.tsx +4 -25
  122. package/emotion/es/examples/plasma_web/components/Tabs/Tabs.stories.tsx +48 -16
  123. package/emotion/es/examples/plasma_web/components/Tabs/horizontal/HorizontalTabItem.config.js +18 -15
  124. package/emotion/es/examples/plasma_web/components/Tabs/vertical/VerticalTabItem.config.js +9 -6
  125. package/es/components/Badge/Badge.css +2 -0
  126. package/es/components/Badge/Badge.js +18 -5
  127. package/es/components/Badge/Badge.js.map +1 -1
  128. package/es/components/Badge/Badge.tokens.js +2 -1
  129. package/es/components/Badge/Badge.tokens.js.map +1 -1
  130. package/es/components/Badge/variations/_truncate/base.js +5 -0
  131. package/es/components/Badge/variations/_truncate/base.js.map +1 -0
  132. package/es/components/Badge/variations/_truncate/base_nf9u2h.css +1 -0
  133. package/es/components/Notification/Notification.css +11 -11
  134. package/es/components/Notification/Notification.js +2 -2
  135. package/es/components/Notification/Notification.js.map +1 -1
  136. package/es/components/Notification/Notification.styles.js +2 -11
  137. package/es/components/Notification/Notification.styles.js.map +1 -1
  138. package/es/components/Notification/{Notification.styles_e6274r.css → Notification.styles_7h8hp0.css} +2 -2
  139. package/es/components/Notification/Notification.tokens.js +1 -2
  140. package/es/components/Notification/Notification.tokens.js.map +1 -1
  141. package/es/components/Notification/Notification.types.js.map +1 -1
  142. package/es/components/Notification/NotificationsPortal.js +4 -8
  143. package/es/components/Notification/NotificationsPortal.js.map +1 -1
  144. package/es/components/Notification/NotificationsProvider.css +11 -11
  145. package/es/components/Notification/NotificationsProvider.js +1 -3
  146. package/es/components/Notification/NotificationsProvider.js.map +1 -1
  147. package/es/components/Pagination/Pagination.css +12 -12
  148. package/es/components/Pagination/ui/PaginationSelectPerPage/PaginationSelectPerPage.css +12 -12
  149. package/es/components/Select/Select.css +12 -12
  150. package/es/components/Select/Select.tokens.js +1 -2
  151. package/es/components/Select/Select.tokens.js.map +1 -1
  152. package/es/components/Select/ui/Inner/Inner.css +12 -12
  153. package/es/components/Select/ui/Inner/ui/Item/Item.css +12 -12
  154. package/es/components/Select/ui/Target/Target.css +12 -12
  155. package/es/components/Select/ui/Target/ui/Textfield/Textfield.css +12 -12
  156. package/es/components/Select/ui/Target/ui/Textfield/Textfield.styles.js +1 -1
  157. package/es/components/Select/ui/Target/ui/Textfield/Textfield.styles.js.map +1 -1
  158. package/{cjs/components/Select/ui/Target/ui/Textfield/Textfield.styles_jzeap2.css → es/components/Select/ui/Target/ui/Textfield/Textfield.styles_11yj58s.css} +1 -1
  159. package/es/components/Tabs/tokens.js +2 -1
  160. package/es/components/Tabs/tokens.js.map +1 -1
  161. package/es/components/Tabs/ui/horizontal/HorizontalTabItem/HorizontalTabItem.css +7 -5
  162. package/es/components/Tabs/ui/horizontal/HorizontalTabItem/HorizontalTabItem.js +15 -4
  163. package/es/components/Tabs/ui/horizontal/HorizontalTabItem/HorizontalTabItem.js.map +1 -1
  164. package/es/components/Tabs/ui/horizontal/HorizontalTabItem/HorizontalTabItem.styles.js +1 -1
  165. package/es/components/Tabs/ui/horizontal/HorizontalTabItem/HorizontalTabItem.styles.js.map +1 -1
  166. package/{cjs/components/Tabs/ui/horizontal/HorizontalTabItem/HorizontalTabItem.styles_hfqv5b.css → es/components/Tabs/ui/horizontal/HorizontalTabItem/HorizontalTabItem.styles_1vj7dbl.css} +1 -1
  167. package/es/components/Tabs/ui/horizontal/HorizontalTabItem/variations/_truncate/base.js +5 -0
  168. package/es/components/Tabs/ui/horizontal/HorizontalTabItem/variations/_truncate/base.js.map +1 -0
  169. package/es/components/Tabs/ui/horizontal/HorizontalTabItem/variations/_truncate/base_1b34xv3.css +1 -0
  170. package/es/components/Tabs/ui/vertical/VerticalTabItem/VerticalTabItem.css +7 -5
  171. package/es/components/Tabs/ui/vertical/VerticalTabItem/VerticalTabItem.js +15 -4
  172. package/es/components/Tabs/ui/vertical/VerticalTabItem/VerticalTabItem.js.map +1 -1
  173. package/es/components/Tabs/ui/vertical/VerticalTabItem/VerticalTabItem.styles.js +1 -1
  174. package/es/components/Tabs/ui/vertical/VerticalTabItem/VerticalTabItem.styles.js.map +1 -1
  175. package/es/components/Tabs/ui/vertical/VerticalTabItem/VerticalTabItem.styles_6ssvos.css +5 -0
  176. package/es/components/Tabs/ui/vertical/VerticalTabItem/variations/_truncate/base.js +5 -0
  177. package/es/components/Tabs/ui/vertical/VerticalTabItem/variations/_truncate/base.js.map +1 -0
  178. package/es/components/Tabs/ui/vertical/VerticalTabItem/variations/_truncate/base_1nwonlh.css +1 -0
  179. package/es/index.css +39 -33
  180. package/es/index.js +1 -1
  181. package/package.json +2 -2
  182. package/styled-components/cjs/components/Badge/Badge.js +22 -4
  183. package/styled-components/cjs/components/Badge/Badge.tokens.js +2 -1
  184. package/styled-components/cjs/components/Badge/variations/_truncate/base.js +10 -0
  185. package/styled-components/cjs/components/Badge/variations/_truncate/tokens.json +1 -0
  186. package/styled-components/cjs/components/Notification/Notification.js +2 -2
  187. package/styled-components/cjs/components/Notification/Notification.styles.js +2 -5
  188. package/styled-components/cjs/components/Notification/Notification.template-doc.mdx +8 -17
  189. package/styled-components/cjs/components/Notification/Notification.tokens.js +1 -2
  190. package/styled-components/cjs/components/Notification/NotificationsPortal.js +4 -8
  191. package/styled-components/cjs/components/Notification/NotificationsProvider.js +1 -3
  192. package/styled-components/cjs/components/Notification/index.js +4 -4
  193. package/styled-components/cjs/components/Select/Select.tokens.js +1 -2
  194. package/styled-components/cjs/components/Select/ui/Target/ui/Textfield/Textfield.styles.js +1 -1
  195. package/styled-components/cjs/components/Tabs/tokens.js +2 -1
  196. package/styled-components/cjs/components/Tabs/ui/horizontal/HorizontalTabItem/HorizontalTabItem.js +19 -3
  197. package/styled-components/cjs/components/Tabs/ui/horizontal/HorizontalTabItem/HorizontalTabItem.styles.js +1 -1
  198. package/styled-components/cjs/components/Tabs/ui/horizontal/HorizontalTabItem/variations/_truncate/base.js +10 -0
  199. package/styled-components/cjs/components/Tabs/ui/horizontal/HorizontalTabItem/variations/_truncate/tokens.json +1 -0
  200. package/styled-components/cjs/components/Tabs/ui/vertical/VerticalTabItem/VerticalTabItem.js +19 -3
  201. package/styled-components/cjs/components/Tabs/ui/vertical/VerticalTabItem/VerticalTabItem.styles.js +2 -2
  202. package/styled-components/cjs/components/Tabs/ui/vertical/VerticalTabItem/variations/_truncate/base.js +10 -0
  203. package/styled-components/cjs/components/Tabs/ui/vertical/VerticalTabItem/variations/_truncate/tokens.json +1 -0
  204. package/styled-components/cjs/examples/plasma_b2c/components/Badge/Badge.config.js +3 -0
  205. package/styled-components/cjs/examples/plasma_b2c/components/Badge/Badge.stories.tsx +5 -1
  206. package/styled-components/cjs/examples/plasma_b2c/components/Notification/Notification.js +3 -5
  207. package/styled-components/cjs/examples/plasma_b2c/components/Notification/Notification.stories.tsx +4 -25
  208. package/styled-components/cjs/examples/plasma_b2c/components/Tabs/Tabs.stories.tsx +48 -16
  209. package/styled-components/cjs/examples/plasma_b2c/components/Tabs/horizontal/HorizontalTabItem.config.js +3 -0
  210. package/styled-components/cjs/examples/plasma_b2c/components/Tabs/vertical/VerticalTabItem.config.js +3 -0
  211. package/styled-components/cjs/examples/plasma_web/components/Notification/Notification.js +3 -5
  212. package/styled-components/cjs/examples/plasma_web/components/Notification/Notification.stories.tsx +4 -25
  213. package/styled-components/cjs/examples/plasma_web/components/Tabs/Tabs.stories.tsx +48 -16
  214. package/styled-components/cjs/examples/plasma_web/components/Tabs/horizontal/HorizontalTabItem.config.js +3 -0
  215. package/styled-components/cjs/examples/plasma_web/components/Tabs/vertical/VerticalTabItem.config.js +3 -0
  216. package/styled-components/es/components/Badge/Badge.js +23 -4
  217. package/styled-components/es/components/Badge/Badge.tokens.js +2 -1
  218. package/styled-components/es/components/Badge/variations/_truncate/base.js +4 -0
  219. package/styled-components/es/components/Badge/variations/_truncate/tokens.json +1 -0
  220. package/styled-components/es/components/Notification/Notification.js +1 -1
  221. package/styled-components/es/components/Notification/Notification.styles.js +2 -5
  222. package/styled-components/es/components/Notification/Notification.template-doc.mdx +8 -17
  223. package/styled-components/es/components/Notification/Notification.tokens.js +1 -2
  224. package/styled-components/es/components/Notification/NotificationsPortal.js +4 -8
  225. package/styled-components/es/components/Notification/NotificationsProvider.js +1 -3
  226. package/styled-components/es/components/Notification/index.js +1 -1
  227. package/styled-components/es/components/Select/Select.tokens.js +1 -2
  228. package/styled-components/es/components/Select/ui/Target/ui/Textfield/Textfield.styles.js +1 -1
  229. package/styled-components/es/components/Tabs/tokens.js +2 -1
  230. package/styled-components/es/components/Tabs/ui/horizontal/HorizontalTabItem/HorizontalTabItem.js +20 -3
  231. package/styled-components/es/components/Tabs/ui/horizontal/HorizontalTabItem/HorizontalTabItem.styles.js +1 -1
  232. package/styled-components/es/components/Tabs/ui/horizontal/HorizontalTabItem/variations/_truncate/base.js +4 -0
  233. package/styled-components/es/components/Tabs/ui/horizontal/HorizontalTabItem/variations/_truncate/tokens.json +1 -0
  234. package/styled-components/es/components/Tabs/ui/vertical/VerticalTabItem/VerticalTabItem.js +20 -3
  235. package/styled-components/es/components/Tabs/ui/vertical/VerticalTabItem/VerticalTabItem.styles.js +2 -2
  236. package/styled-components/es/components/Tabs/ui/vertical/VerticalTabItem/variations/_truncate/base.js +4 -0
  237. package/styled-components/es/components/Tabs/ui/vertical/VerticalTabItem/variations/_truncate/tokens.json +1 -0
  238. package/styled-components/es/examples/plasma_b2c/components/Badge/Badge.config.js +3 -0
  239. package/styled-components/es/examples/plasma_b2c/components/Badge/Badge.stories.tsx +5 -1
  240. package/styled-components/es/examples/plasma_b2c/components/Notification/Notification.js +4 -6
  241. package/styled-components/es/examples/plasma_b2c/components/Notification/Notification.stories.tsx +4 -25
  242. package/styled-components/es/examples/plasma_b2c/components/Tabs/Tabs.stories.tsx +48 -16
  243. package/styled-components/es/examples/plasma_b2c/components/Tabs/horizontal/HorizontalTabItem.config.js +3 -0
  244. package/styled-components/es/examples/plasma_b2c/components/Tabs/vertical/VerticalTabItem.config.js +3 -0
  245. package/styled-components/es/examples/plasma_web/components/Notification/Notification.js +4 -6
  246. package/styled-components/es/examples/plasma_web/components/Notification/Notification.stories.tsx +4 -25
  247. package/styled-components/es/examples/plasma_web/components/Tabs/Tabs.stories.tsx +48 -16
  248. package/styled-components/es/examples/plasma_web/components/Tabs/horizontal/HorizontalTabItem.config.js +3 -0
  249. package/styled-components/es/examples/plasma_web/components/Tabs/vertical/VerticalTabItem.config.js +3 -0
  250. package/types/components/Badge/Badge.d.ts +10 -2
  251. package/types/components/Badge/Badge.d.ts.map +1 -1
  252. package/types/components/Badge/Badge.tokens.d.ts +1 -0
  253. package/types/components/Badge/Badge.tokens.d.ts.map +1 -1
  254. package/types/components/Badge/Badge.types.d.ts +5 -0
  255. package/types/components/Badge/Badge.types.d.ts.map +1 -1
  256. package/types/components/Badge/variations/_truncate/base.d.ts +2 -0
  257. package/types/components/Badge/variations/_truncate/base.d.ts.map +1 -0
  258. package/types/components/Notification/Notification.d.ts +3 -3
  259. package/types/components/Notification/Notification.d.ts.map +1 -1
  260. package/types/components/Notification/Notification.styles.d.ts +2 -4
  261. package/types/components/Notification/Notification.styles.d.ts.map +1 -1
  262. package/types/components/Notification/Notification.tokens.d.ts +0 -1
  263. package/types/components/Notification/Notification.tokens.d.ts.map +1 -1
  264. package/types/components/Notification/Notification.types.d.ts +5 -11
  265. package/types/components/Notification/Notification.types.d.ts.map +1 -1
  266. package/types/components/Notification/NotificationsPortal.d.ts.map +1 -1
  267. package/types/components/Notification/NotificationsProvider.d.ts +3 -4
  268. package/types/components/Notification/NotificationsProvider.d.ts.map +1 -1
  269. package/types/components/Notification/index.d.ts +2 -2
  270. package/types/components/Notification/index.d.ts.map +1 -1
  271. package/types/components/Select/Select.tokens.d.ts +0 -1
  272. package/types/components/Select/Select.tokens.d.ts.map +1 -1
  273. package/types/components/Select/ui/Target/ui/Textfield/Textfield.styles.d.ts.map +1 -1
  274. package/types/components/Tabs/TabItem.types.d.ts +5 -0
  275. package/types/components/Tabs/TabItem.types.d.ts.map +1 -1
  276. package/types/components/Tabs/tokens.d.ts +1 -0
  277. package/types/components/Tabs/tokens.d.ts.map +1 -1
  278. package/types/components/Tabs/ui/horizontal/HorizontalTabItem/HorizontalTabItem.d.ts +9 -2
  279. package/types/components/Tabs/ui/horizontal/HorizontalTabItem/HorizontalTabItem.d.ts.map +1 -1
  280. package/types/components/Tabs/ui/horizontal/HorizontalTabItem/HorizontalTabItem.styles.d.ts.map +1 -1
  281. package/types/components/Tabs/ui/horizontal/HorizontalTabItem/variations/_truncate/base.d.ts +2 -0
  282. package/types/components/Tabs/ui/horizontal/HorizontalTabItem/variations/_truncate/base.d.ts.map +1 -0
  283. package/types/components/Tabs/ui/vertical/VerticalTabItem/VerticalTabItem.d.ts +9 -2
  284. package/types/components/Tabs/ui/vertical/VerticalTabItem/VerticalTabItem.d.ts.map +1 -1
  285. package/types/components/Tabs/ui/vertical/VerticalTabItem/VerticalTabItem.styles.d.ts.map +1 -1
  286. package/types/components/Tabs/ui/vertical/VerticalTabItem/variations/_truncate/base.d.ts +2 -0
  287. package/types/components/Tabs/ui/vertical/VerticalTabItem/variations/_truncate/base.d.ts.map +1 -0
  288. package/types/examples/plasma_b2c/components/Badge/Badge.config.d.ts +3 -0
  289. package/types/examples/plasma_b2c/components/Badge/Badge.config.d.ts.map +1 -1
  290. package/types/examples/plasma_b2c/components/Badge/Badge.d.ts +6 -0
  291. package/types/examples/plasma_b2c/components/Badge/Badge.d.ts.map +1 -1
  292. package/types/examples/plasma_b2c/components/Notification/Notification.d.ts +2 -4
  293. package/types/examples/plasma_b2c/components/Notification/Notification.d.ts.map +1 -1
  294. package/types/examples/plasma_b2c/components/Tabs/TabItem.d.ts +6 -0
  295. package/types/examples/plasma_b2c/components/Tabs/TabItem.d.ts.map +1 -1
  296. package/types/examples/plasma_b2c/components/Tabs/horizontal/HorizontalTabItem.config.d.ts +3 -0
  297. package/types/examples/plasma_b2c/components/Tabs/horizontal/HorizontalTabItem.config.d.ts.map +1 -1
  298. package/types/examples/plasma_b2c/components/Tabs/vertical/VerticalTabItem.config.d.ts +3 -0
  299. package/types/examples/plasma_b2c/components/Tabs/vertical/VerticalTabItem.config.d.ts.map +1 -1
  300. package/types/examples/plasma_web/components/Badge/Badge.d.ts +3 -0
  301. package/types/examples/plasma_web/components/Badge/Badge.d.ts.map +1 -1
  302. package/types/examples/plasma_web/components/Notification/Notification.d.ts +13 -4
  303. package/types/examples/plasma_web/components/Notification/Notification.d.ts.map +1 -1
  304. package/types/examples/plasma_web/components/Tabs/TabItem.d.ts +6 -0
  305. package/types/examples/plasma_web/components/Tabs/TabItem.d.ts.map +1 -1
  306. package/types/examples/plasma_web/components/Tabs/horizontal/HorizontalTabItem.config.d.ts +3 -0
  307. package/types/examples/plasma_web/components/Tabs/horizontal/HorizontalTabItem.config.d.ts.map +1 -1
  308. package/types/examples/plasma_web/components/Tabs/vertical/VerticalTabItem.config.d.ts +3 -0
  309. package/types/examples/plasma_web/components/Tabs/vertical/VerticalTabItem.config.d.ts.map +1 -1
  310. package/cjs/components/Tabs/ui/vertical/VerticalTabItem/VerticalTabItem.styles_16d3lah.css +0 -5
  311. package/es/components/Tabs/ui/vertical/VerticalTabItem/VerticalTabItem.styles_16d3lah.css +0 -5
@@ -29,6 +29,7 @@ type CustomStoryTabsProps = {
29
29
 
30
30
  const contentLeftOptions = ['none', 'icon'];
31
31
  const contentRightOptions = ['none', 'counter', 'icon'];
32
+ const labels = ['Label', 'Middle label', 'Very long label'];
32
33
 
33
34
  const getContentLeft = (contentLeftOption: string, size: Size) => {
34
35
  const iconSize = size === 'xs' ? 'xs' : 's';
@@ -76,6 +77,12 @@ const meta: Meta<StoryTabsProps> = {
76
77
  },
77
78
  if: { arg: 'helperText', eq: '' },
78
79
  },
80
+ maxItemWidth: {
81
+ control: {
82
+ type: 'text',
83
+ },
84
+ if: { arg: 'stretch', truthy: false },
85
+ },
79
86
  },
80
87
  };
81
88
 
@@ -90,13 +97,14 @@ const StoryHorizontalDefault = (props: HorizontalStoryTabsProps) => {
90
97
  contentRight: contentRightOption,
91
98
  hasDivider,
92
99
  stretch,
100
+ maxItemWidth,
93
101
  helperText,
94
102
  } = props;
95
103
  const items = Array(itemQuantity).fill(0);
96
104
  const [index, setIndex] = useState(0);
97
105
 
98
106
  return (
99
- <Tabs view={hasDivider ? 'divider' : 'clear'} stretch={stretch} disabled={disabled} size={size}>
107
+ <Tabs clip="none" view={hasDivider ? 'divider' : 'clear'} stretch={stretch} disabled={disabled} size={size}>
100
108
  {items.map((_, i) => {
101
109
  if (helperText !== '') {
102
110
  return (
@@ -110,8 +118,9 @@ const StoryHorizontalDefault = (props: HorizontalStoryTabsProps) => {
110
118
  value={helperText}
111
119
  contentLeft={getContentLeft(contentLeftOption, size as Size)}
112
120
  size={size as Size}
121
+ maxItemWidth={maxItemWidth}
113
122
  >
114
- {`Label${i + 1}`}
123
+ {`${labels[i % labels.length]} ${i + 1}`}
115
124
  </TabItem>
116
125
  );
117
126
  }
@@ -127,8 +136,9 @@ const StoryHorizontalDefault = (props: HorizontalStoryTabsProps) => {
127
136
  contentLeft={getContentLeft(contentLeftOption, size as Size)}
128
137
  contentRight={getContentRight(contentRightOption, size as Size)}
129
138
  size={size as Size}
139
+ maxItemWidth={maxItemWidth}
130
140
  >
131
- {`Label${i + 1}`}
141
+ {`${labels[i % labels.length]} ${i + 1}`}
132
142
  </TabItem>
133
143
  );
134
144
  })}
@@ -147,6 +157,7 @@ const StoryHorizontalScroll = (props: HorizontalStoryTabsProps) => {
147
157
  hasDivider,
148
158
  helperText,
149
159
  width,
160
+ maxItemWidth,
150
161
  } = props;
151
162
  const items = Array(itemQuantity).fill(0);
152
163
  const [index, setIndex] = useState(0);
@@ -166,8 +177,9 @@ const StoryHorizontalScroll = (props: HorizontalStoryTabsProps) => {
166
177
  value={helperText}
167
178
  contentLeft={getContentLeft(contentLeftOption, size as Size)}
168
179
  size={size as Size}
180
+ maxItemWidth={maxItemWidth}
169
181
  >
170
- {`Label${i + 1}`}
182
+ {`${labels[i % labels.length]} ${i + 1}`}
171
183
  </TabItem>
172
184
  );
173
185
  }
@@ -183,8 +195,9 @@ const StoryHorizontalScroll = (props: HorizontalStoryTabsProps) => {
183
195
  contentLeft={getContentLeft(contentLeftOption, size as Size)}
184
196
  contentRight={getContentRight(contentRightOption, size as Size)}
185
197
  size={size as Size}
198
+ maxItemWidth={maxItemWidth}
186
199
  >
187
- {`Label${i + 1}`}
200
+ {`${labels[i % labels.length]} ${i + 1}`}
188
201
  </TabItem>
189
202
  );
190
203
  })}
@@ -202,6 +215,7 @@ const StoryHorizontalShowAll = (props: HorizontalStoryTabsProps) => {
202
215
  contentRight: contentRightOption,
203
216
  hasDivider,
204
217
  helperText,
218
+ maxItemWidth,
205
219
  } = props;
206
220
  const maxItemQuantity = 3;
207
221
  const items = Array(itemQuantity).fill(0);
@@ -234,8 +248,9 @@ const StoryHorizontalShowAll = (props: HorizontalStoryTabsProps) => {
234
248
  value={helperText}
235
249
  contentLeft={getContentLeft(contentLeftOption, size as Size)}
236
250
  size={size as Size}
251
+ maxItemWidth={maxItemWidth}
237
252
  >
238
- {`Label${i + 1}`}
253
+ {`${labels[i % labels.length]} ${i + 1}`}
239
254
  </TabItem>
240
255
  );
241
256
  }
@@ -251,8 +266,9 @@ const StoryHorizontalShowAll = (props: HorizontalStoryTabsProps) => {
251
266
  contentLeft={getContentLeft(contentLeftOption, size as Size)}
252
267
  contentRight={getContentRight(contentRightOption, size as Size)}
253
268
  size={size as Size}
269
+ maxItemWidth={maxItemWidth}
254
270
  >
255
- {`Label${i + 1}`}
271
+ {`${labels[i % labels.length]} ${i + 1}`}
256
272
  </TabItem>
257
273
  );
258
274
  })}
@@ -269,6 +285,7 @@ const StoryHorizontalShowAll = (props: HorizontalStoryTabsProps) => {
269
285
  tabIndex={!disabled ? 0 : -1}
270
286
  disabled={disabled}
271
287
  size={size as Size}
288
+ maxItemWidth="auto"
272
289
  >
273
290
  ShowAll
274
291
  </TabItem>
@@ -285,9 +302,10 @@ export const HorizontalTabs: StoryObj<HorizontalStoryTabsProps> = {
285
302
  disabled: false,
286
303
  hasDivider: true,
287
304
  helperText: '',
288
- itemQuantity: 8,
305
+ itemQuantity: 6,
289
306
  stretch: false,
290
307
  width: '15rem',
308
+ maxItemWidth: '',
291
309
  },
292
310
  argTypes: {
293
311
  contentLeft: {
@@ -343,6 +361,7 @@ const StoryVerticalDefault = (props: VerticalStoryTabsProps) => {
343
361
  contentRight: contentRightOption,
344
362
  hasDivider,
345
363
  helperText,
364
+ maxItemWidth,
346
365
  } = props;
347
366
  const items = Array(itemQuantity).fill(0);
348
367
  const [index, setIndex] = useState(0);
@@ -363,8 +382,9 @@ const StoryVerticalDefault = (props: VerticalStoryTabsProps) => {
363
382
  value={helperText}
364
383
  contentLeft={getContentLeft(contentLeftOption, size as Size)}
365
384
  size={size as Size}
385
+ maxItemWidth={maxItemWidth}
366
386
  >
367
- {`Label${i + 1}`}
387
+ {`${labels[i % labels.length]} ${i + 1}`}
368
388
  </TabItem>
369
389
  );
370
390
  }
@@ -381,8 +401,9 @@ const StoryVerticalDefault = (props: VerticalStoryTabsProps) => {
381
401
  contentLeft={getContentLeft(contentLeftOption, size as Size)}
382
402
  contentRight={getContentRight(contentRightOption, size as Size)}
383
403
  size={size as Size}
404
+ maxItemWidth={maxItemWidth}
384
405
  >
385
- {`Label${i + 1}`}
406
+ {`${labels[i % labels.length]} ${i + 1}`}
386
407
  </TabItem>
387
408
  );
388
409
  })}
@@ -401,6 +422,7 @@ const StoryVerticalScroll = (props: VerticalStoryTabsProps) => {
401
422
  hasDivider,
402
423
  helperText,
403
424
  height,
425
+ maxItemWidth,
404
426
  } = props;
405
427
  const items = Array(itemQuantity).fill(0);
406
428
  const [index, setIndex] = useState(0);
@@ -428,8 +450,9 @@ const StoryVerticalScroll = (props: VerticalStoryTabsProps) => {
428
450
  value={helperText}
429
451
  contentLeft={getContentLeft(contentLeftOption, size as Size)}
430
452
  size={size as Size}
453
+ maxItemWidth={maxItemWidth}
431
454
  >
432
- {`Label${i + 1}`}
455
+ {`${labels[i % labels.length]} ${i + 1}`}
433
456
  </TabItem>
434
457
  );
435
458
  }
@@ -446,8 +469,9 @@ const StoryVerticalScroll = (props: VerticalStoryTabsProps) => {
446
469
  contentLeft={getContentLeft(contentLeftOption, size as Size)}
447
470
  contentRight={getContentRight(contentRightOption, size as Size)}
448
471
  size={size as Size}
472
+ maxItemWidth={maxItemWidth}
449
473
  >
450
- {`Label${i + 1}`}
474
+ {`${labels[i % labels.length]} ${i + 1}`}
451
475
  </TabItem>
452
476
  );
453
477
  })}
@@ -465,6 +489,7 @@ const StoryVerticalShowAll = (props: VerticalStoryTabsProps) => {
465
489
  contentRight: contentRightOption,
466
490
  hasDivider,
467
491
  helperText,
492
+ maxItemWidth,
468
493
  } = props;
469
494
  const maxItemQuantity = 3;
470
495
  const items = Array(itemQuantity).fill(0);
@@ -498,8 +523,9 @@ const StoryVerticalShowAll = (props: VerticalStoryTabsProps) => {
498
523
  value={helperText}
499
524
  contentLeft={getContentLeft(contentLeftOption, size as Size)}
500
525
  size={size as Size}
526
+ maxItemWidth={maxItemWidth}
501
527
  >
502
- {`Label${i + 1}`}
528
+ {`${labels[i % labels.length]} ${i + 1}`}
503
529
  </TabItem>
504
530
  );
505
531
  }
@@ -516,8 +542,9 @@ const StoryVerticalShowAll = (props: VerticalStoryTabsProps) => {
516
542
  contentLeft={getContentLeft(contentLeftOption, size as Size)}
517
543
  contentRight={getContentRight(contentRightOption, size as Size)}
518
544
  size={size as Size}
545
+ maxItemWidth={maxItemWidth}
519
546
  >
520
- {`Label${i + 1}`}
547
+ {`${labels[i % labels.length]} ${i + 1}`}
521
548
  </TabItem>
522
549
  );
523
550
  })}
@@ -534,6 +561,7 @@ const StoryVerticalShowAll = (props: VerticalStoryTabsProps) => {
534
561
  tabIndex={!disabled ? 0 : -1}
535
562
  disabled={disabled}
536
563
  size={size as Size}
564
+ maxItemWidth="auto"
537
565
  >
538
566
  ShowAll
539
567
  </TabItem>
@@ -548,10 +576,11 @@ export const VerticalTabs: StoryObj<VerticalStoryTabsProps> = {
548
576
  size: 'xs',
549
577
  disabled: false,
550
578
  hasDivider: true,
551
- itemQuantity: 8,
579
+ itemQuantity: 6,
552
580
  orientation: 'vertical',
553
581
  helperText: '',
554
582
  height: '10rem',
583
+ maxItemWidth: '',
555
584
  },
556
585
  argTypes: {
557
586
  contentLeft: {
@@ -612,6 +641,7 @@ const StoryHeaderTabs = (props: StoryTabsProps) => {
612
641
  contentRight: contentRightOption,
613
642
  hasDivider,
614
643
  stretch,
644
+ maxItemWidth,
615
645
  } = props;
616
646
  const items = Array(itemQuantity).fill(0);
617
647
  const [index, setIndex] = useState(0);
@@ -629,8 +659,9 @@ const StoryHeaderTabs = (props: StoryTabsProps) => {
629
659
  contentLeft={getContentLeft(contentLeftOption, size as Size)}
630
660
  contentRight={getContentRight(contentRightOption, size as Size)}
631
661
  size={size as HeaderSize}
662
+ maxItemWidth={maxItemWidth}
632
663
  >
633
- {`Label${i + 1}`}
664
+ {`${labels[i % labels.length]} ${i + 1}`}
634
665
  </TabItem>
635
666
  ))}
636
667
  </Tabs>
@@ -643,6 +674,7 @@ export const HeaderTabs: StoryObj<StoryTabsProps> = {
643
674
  disabled: false,
644
675
  hasDivider: true,
645
676
  itemQuantity: 4,
677
+ maxItemWidth: '',
646
678
  },
647
679
  argTypes: {
648
680
  size: {
@@ -34,6 +34,9 @@ var config = exports.config = {
34
34
  },
35
35
  pilled: {
36
36
  "true": /*#__PURE__*/(0, _styledComponents.css)(["", ":1.5rem;"], _Tabs.tabsTokens.itemPilledBorderRadius)
37
+ },
38
+ truncate: {
39
+ "true": /*#__PURE__*/(0, _styledComponents.css)([""])
37
40
  }
38
41
  }
39
42
  };
@@ -23,6 +23,9 @@ 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)([""])
26
29
  }
27
30
  }
28
31
  };
@@ -1,5 +1,11 @@
1
- var _excluded = ["children", "className", "text", "contentLeft", "contentRight", "size", "view", "pilled", "transparent", "clear"];
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"];
2
3
  function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
4
+ 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); }
3
9
  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
10
  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
11
  import React, { forwardRef } from 'react';
@@ -9,6 +15,7 @@ import { base as sizeCSS } from './variations/_size/base';
9
15
  import { base as pilledCSS } from './variations/_pilled/base';
10
16
  import { base as transparentCSS } from './variations/_transparent/base';
11
17
  import { base as clearCSS } from './variations/_clear/base';
18
+ import { base as truncateCSS } from './variations/_truncate/base';
12
19
  import { StyledContentLeft, StyledContentMain, StyledContentRight, base } from './Badge.styles';
13
20
  import { classes } from './Badge.tokens';
14
21
  export var badgeRoot = function badgeRoot(Root) {
@@ -26,20 +33,28 @@ export var badgeRoot = function badgeRoot(Root) {
26
33
  transparent = _props$transparent === void 0 ? false : _props$transparent,
27
34
  _props$clear = props.clear,
28
35
  clear = _props$clear === void 0 ? false : _props$clear,
36
+ _props$maxWidth = props.maxWidth,
37
+ maxWidth = _props$maxWidth === void 0 ? 'auto' : _props$maxWidth,
29
38
  rest = _objectWithoutProperties(props, _excluded);
30
39
  var pilledClass = pilled ? classes.badgePilled : undefined;
31
40
  var transparentClass = transparent ? classes.badgeTransparent : undefined;
32
41
  var clearClass = clear ? classes.badgeClear : undefined;
33
42
  var txt = !text && typeof children === 'string' ? children : text;
43
+ var truncate = maxWidth !== 'auto';
34
44
  return /*#__PURE__*/React.createElement(Root, _extends({
35
45
  ref: ref,
36
- className: cx(pilledClass, transparentClass, clearClass, className),
46
+ className: cx(pilledClass, transparentClass, clearClass, truncate && classes.badgeTruncate, className),
37
47
  view: view,
38
48
  size: size,
39
49
  pilled: pilled,
40
50
  transparent: transparent,
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));
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));
43
58
  });
44
59
  };
45
60
  export var badgeConfig = {
@@ -65,6 +80,10 @@ export var badgeConfig = {
65
80
  clear: {
66
81
  css: clearCSS,
67
82
  attrs: true
83
+ },
84
+ truncate: {
85
+ css: truncateCSS,
86
+ attrs: true
68
87
  }
69
88
  },
70
89
  defaults: {
@@ -1,7 +1,8 @@
1
1
  export var classes = {
2
2
  badgePilled: 'badge-pilled',
3
3
  badgeTransparent: 'badge-transparent',
4
- badgeClear: 'badge-clear'
4
+ badgeClear: 'badge-clear',
5
+ badgeTruncate: 'badge-truncate'
5
6
  };
6
7
  export var tokens = {
7
8
  background: '--plasma-badge-background',
@@ -0,0 +1,4 @@
1
+ import { css } from 'styled-components';
2
+ import { classes } from '../../Badge.tokens';
3
+ import { StyledContentMain } from '../../Badge.styles';
4
+ export var base = /*#__PURE__*/css(["&.", "{max-width:100%;", "{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}}"], classes.badgeTruncate, StyledContentMain);
@@ -86,7 +86,7 @@ export var notificationRoot = function notificationRoot(Root) {
86
86
  })))));
87
87
  });
88
88
  };
89
- export var notificationConfig = {
89
+ export var noticationConfig = {
90
90
  name: 'Notification',
91
91
  tag: 'div',
92
92
  layout: notificationRoot,
@@ -58,10 +58,7 @@ export var StyledContent = /*#__PURE__*/styled.div.withConfig({
58
58
  })(["font-family:var(", ");font-size:var(", ");font-style:var(", ");font-weight:var(", ");letter-spacing:var(", ");line-height:var(", ");", ";color:var(", ");"], tokens.contentFontFamily, tokens.contentFontSize, tokens.contentFontStyle, tokens.contentFontWeight, tokens.contentFontLetterSpacing, tokens.contentFontLineHeight, /*#__PURE__*/String(applyHyphens), tokens.contentColor);
59
59
  export var StyledItemWrapper = /*#__PURE__*/styled.div.withConfig({
60
60
  componentId: "plasma-new-hope__sc-1iufy9r-8"
61
- })(["margin-top:1rem;opacity:1;&&.", "{animation:0.4s showAnimation ease-out;&.", "{animation:0.4s showLeftToRightAnimation ease-out;}}&&.", "{animation:0.4s hideAnimation ease-out;&.", "{animation:0.4s hideLeftToRightAnimation ease-out;}}@keyframes showLeftToRightAnimation{0%{transform:translateX(-100%);opacity:0;}100%{transform:translateX(0);opacity:1;}}@keyframes hideLeftToRightAnimation{0%{transform:translateX(0);opacity:1;}100%{transform:translateX(-100%);opacity:0;}}@keyframes showAnimation{0%{transform:translateX(100%);opacity:0;}100%{transform:translateX(0);opacity:1;}}@keyframes hideAnimation{0%{transform:translateX(0);opacity:1;}100%{transform:translateX(100%);opacity:0;}}"], classes.notificationItemOpened, classes.notificationLeftToRightAnimation, classes.notificationItemHidden, classes.notificationLeftToRightAnimation);
61
+ })(["margin-top:1rem;opacity:1;&&.", "{animation:0.4s showAnimation ease-out;}&&.", "{animation:0.4s hideAnimation ease-out;}@keyframes showAnimation{0%{transform:translateX(100%);opacity:0;}100%{transform:translateX(0);opacity:1;}}@keyframes hideAnimation{0%{transform:translateX(0);opacity:1;}100%{transform:translateX(100%);opacity:0;}}"], classes.notificationItemOpened, classes.notificationItemHidden);
62
62
  export var StyledRoot = /*#__PURE__*/styled.div.withConfig({
63
63
  componentId: "plasma-new-hope__sc-1iufy9r-9"
64
- })(["display:flex;flex-direction:column-reverse;box-sizing:border-box;padding:0 1.5rem 1.5rem;max-height:100%;align-items:", ";"], function (_ref8) {
65
- var placement = _ref8.placement;
66
- return placement === 'bottom-left' ? 'flex-start' : 'flex-end';
67
- });
64
+ })(["display:flex;flex-direction:column-reverse;box-sizing:border-box;padding:0 1.5rem 1.5rem;max-height:100%;align-items:flex-end;"]);
@@ -10,15 +10,14 @@ import { PropsTable, Description } from '@site/src/components';
10
10
  <PropsTable name="Notification" />
11
11
 
12
12
  ## Использование
13
- Компонент `Notification` может использоваться для создания собственных систем оповещения.
13
+ Компонент `Notification` может использоваться для создания собственных систем оповещения.
14
14
  Вид компонента контролируется свойствами (props).
15
- Текстовая часть оповещения состоит из `title` и `children`.
15
+ Текстовая часть оповещения состоит из `title` и `children`.
16
16
  Слева или сверху от нее, также можно пробросить иконку через свойство `icon`.
17
17
  Также есть часть `actions`, в которой предполагается отображение кнопок для взаимодействия.
18
18
 
19
19
  ### Провайдер контекста
20
- Поместите `NotificationsProvider` в [корень приложения](../../#корень-приложения) или там, где будете применять модальные окна.
21
- В качестве свойств можно указать контейнер для оповещений через `frame` и расположение в контейнере через свойство `placement`, как `bottom-right` _(по умолчанию)_ или `bottom-left`.
20
+ Поместите `NotificationsProvider` в [корень приложения](../../#корень-приложения) или там, где будете применять модальные окна:
22
21
 
23
22
  ```tsx title="index.ts"
24
23
  import ReactDOM from 'react-dom';
@@ -35,32 +34,24 @@ ReactDOM.render(
35
34
  ```
36
35
 
37
36
  ### Вызов уведомления
38
- После подключения `NotificationsProvider` станет возможен вызов функции `addNotification`, который приведет к отображению оповещения.
39
- Функция принимает значения свойств компонента `Notification`, включая необязательное поле `id`. И возвращает сгенерированный или переданный `id`, по которому можно закрыть оповещение через вызов `closeNotification`.
37
+ После подключения `NotificationsProvider` станет возможен вызов функции `addNotification`,который приведет к отображению оповещения.
38
+ Функция принимает значения свойств компонента `Notification`:
40
39
 
41
40
  ```tsx live
42
41
  import React from 'react';
43
- import { Button, ButtonGroup, addNotification, closeNotification, NotificationsProvider } from '@salutejs/{{ package }}';
42
+ import { Button, addNotification, NotificationsProvider } from '@salutejs/{{ package }}';
44
43
 
45
44
  export function App() {
46
- const handleShow = React.useCallback(() => {
45
+ const handleClick = React.useCallback(() => {
47
46
  addNotification({
48
- id: 'incoming-call',
49
47
  title: 'Входящий вызов',
50
48
  children: 'Принять?',
51
49
  }, 1000);
52
50
  }, []);
53
51
 
54
- const handleHide = React.useCallback(() => {
55
- closeNotification('incoming-call');
56
- }, []);
57
-
58
52
  return (
59
53
  <NotificationsProvider>
60
- <ButtonGroup>
61
- <Button text="Показать оповещение" onClick={handleShow} />
62
- <Button text="Скрыть оповещение" onClick={handleHide} />
63
- </ButtonGroup>
54
+ <Button text="Показать оповещение" onClick={handleClick} />
64
55
  </NotificationsProvider>
65
56
  );
66
57
  }
@@ -13,8 +13,7 @@ export var classes = {
13
13
  withoutIcon: 'notification-without-icon',
14
14
  withoutCloseIcon: 'notification-without-close-icon',
15
15
  notificationItemOpened: 'notification-item-opened',
16
- notificationItemHidden: 'notification-item-hidden',
17
- notificationLeftToRightAnimation: 'notification-left-to-right-animation'
16
+ notificationItemHidden: 'notification-item-hidden'
18
17
  };
19
18
  export var tokens = {
20
19
  background: '--plasma-notification-backgorund',
@@ -24,9 +24,7 @@ var StyledPopup = /*#__PURE__*/styled(Popup).withConfig({
24
24
  */
25
25
  export var NotificationsPortal = function NotificationsPortal(_ref) {
26
26
  var config = _ref.config,
27
- frame = _ref.frame,
28
- _ref$placement = _ref.placement,
29
- placement = _ref$placement === void 0 ? 'bottom-right' : _ref$placement;
27
+ frame = _ref.frame;
30
28
  var _useStoreon = useStoreon('notifications'),
31
29
  notifications = _useStoreon.notifications;
32
30
  var Notification = useMemo(function () {
@@ -35,17 +33,15 @@ export var NotificationsPortal = function NotificationsPortal(_ref) {
35
33
  return /*#__PURE__*/React.createElement(PopupProvider, null, notifications.length > 0 && /*#__PURE__*/React.createElement(StyledPopup, {
36
34
  opened: true,
37
35
  frame: frame,
38
- placement: placement,
36
+ placement: "bottom-right",
39
37
  zIndex: "9100"
40
- }, /*#__PURE__*/React.createElement(StyledRoot, {
41
- placement: placement
42
- }, notifications.map(function (_ref2) {
38
+ }, /*#__PURE__*/React.createElement(StyledRoot, null, notifications.map(function (_ref2) {
43
39
  var id = _ref2.id,
44
40
  isHidden = _ref2.isHidden,
45
41
  rest = _objectWithoutProperties(_ref2, _excluded);
46
42
  return /*#__PURE__*/React.createElement(StyledItemWrapper, {
47
43
  key: id,
48
- className: cx(isHidden ? classes.notificationItemHidden : classes.notificationItemOpened, placement === 'bottom-left' && classes.notificationLeftToRightAnimation),
44
+ className: cx(isHidden ? classes.notificationItemHidden : classes.notificationItemOpened),
49
45
  isHidden: isHidden || false
50
46
  }, /*#__PURE__*/React.createElement(Notification, _extends({
51
47
  key: id,
@@ -5,13 +5,11 @@ import { NotificationsPortal } from './NotificationsPortal';
5
5
  export var NotificationsProvider = function NotificationsProvider(_ref) {
6
6
  var children = _ref.children,
7
7
  config = _ref.config,
8
- frame = _ref.frame,
9
- placement = _ref.placement;
8
+ frame = _ref.frame;
10
9
  return /*#__PURE__*/React.createElement(StoreContext.Provider, {
11
10
  value: NotificationsStore
12
11
  }, children, /*#__PURE__*/React.createElement(NotificationsPortal, {
13
12
  frame: frame,
14
- placement: placement,
15
13
  config: config
16
14
  }));
17
15
  };
@@ -1,4 +1,4 @@
1
1
  export { NotificationsProvider } from './NotificationsProvider';
2
- export { notificationRoot, notificationConfig } from './Notification';
2
+ export { notificationRoot, noticationConfig } from './Notification';
3
3
  export { addNotification, closeNotification } from './NotificationsStore';
4
4
  export { classes as notificationClasses, tokens as notificationTokens } from './Notification.tokens';
@@ -93,8 +93,7 @@ export var tokens = {
93
93
  spinnerSize: '--plasma-select-spinner-size',
94
94
  spinnerSizeTight: '--plasma-select-spinner-size-tight',
95
95
  disclosureIconColor: '--plasma-select-disclosure-icon-color',
96
- disclosureIconColorHover: '--plasma-select-disclosure-icon-color-hover',
97
- contentLeftColor: '--plasma-select-content-left-color'
96
+ disclosureIconColorHover: '--plasma-select-disclosure-icon-color-hover'
98
97
  };
99
98
  export var constants = {
100
99
  focusColor: '--surface-accent',
@@ -63,7 +63,7 @@ export var InnerLabel = /*#__PURE__*/styled.label.withConfig({
63
63
  })(["color:var(", ");font-family:var(", ");font-size:var(", ");font-style:var(", ");font-weight:var(", ");letter-spacing:var(", ");line-height:var(", ");text-align:left;"], constants.textfieldInnerLabelColor, constants.fontFamily, constants.fontSize, constants.fontStyle, constants.fontWeight, constants.fontLetterSpacing, constants.fontLineHeight);
64
64
  export var ContentLeftWrapper = /*#__PURE__*/styled.div.withConfig({
65
65
  componentId: "plasma-new-hope__sc-1akl2tk-10"
66
- })(["flex:none;margin-left:-0.125rem;margin-right:0.375rem;line-height:0;color:var(", ");"], tokens.contentLeftColor);
66
+ })(["flex:none;margin-left:-0.125rem;margin-right:0.375rem;line-height:0;"]);
67
67
  export var Value = /*#__PURE__*/styled.span.withConfig({
68
68
  componentId: "plasma-new-hope__sc-1akl2tk-11"
69
69
  })(["", ""], /*#__PURE__*/applyEllipsis());
@@ -14,7 +14,8 @@ 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'
17
+ tabsClipShowAll: 'tabs-clip-show-all',
18
+ tabsTruncate: 'tabs-truncate'
18
19
  };
19
20
  export var tokens = {
20
21
  disabledOpacity: '--plasma-tabs-disabled-opacity',
@@ -1,5 +1,11 @@
1
- var _excluded = ["size", "view", "isActive", "selected", "disabled", "pilled", "children", "value", "contentLeft", "contentRight", "animated", "onIndexChange", "itemIndex", "tabIndex", "className", "onClick"];
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"];
2
3
  function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
4
+ 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); }
3
9
  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
10
  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
11
  import React, { forwardRef, useRef, useContext, useEffect, useCallback } from 'react';
@@ -11,6 +17,7 @@ import { base as viewCSS } from './variations/_view/base';
11
17
  import { base as sizeCSS } from './variations/_size/base';
12
18
  import { base as pilledCSS } from './variations/_pilled/base';
13
19
  import { base as disabledCSS } from './variations/_disabled/base';
20
+ import { base as truncateCSS } from './variations/_truncate/base';
14
21
  import { LeftContent, RightContent, StyledContent, TabItemValue, base } from './HorizontalTabItem.styles';
15
22
  export var horizontalTabItemRoot = function horizontalTabItemRoot(Root) {
16
23
  return /*#__PURE__*/forwardRef(function (props, outerRef) {
@@ -33,11 +40,13 @@ export var horizontalTabItemRoot = function horizontalTabItemRoot(Root) {
33
40
  tabIndex = props.tabIndex,
34
41
  className = props.className,
35
42
  onClick = props.onClick,
43
+ maxWidth = props.maxItemWidth,
36
44
  rest = _objectWithoutProperties(props, _excluded);
37
45
  var innerRef = useRef(null);
38
46
  var ref = useForkRef(outerRef, innerRef);
39
47
  var refs = useContext(TabsContext);
40
48
  var role = 'tab';
49
+ var truncate = maxWidth !== 'auto';
41
50
  var pilledAttr = view !== 'clear' && pilled;
42
51
  var animatedClass = animated ? classes.tabItemAnimated : undefined;
43
52
  var pilledClass = pilledAttr ? classes.tabsPilled : undefined;
@@ -94,11 +103,16 @@ export var horizontalTabItemRoot = function horizontalTabItemRoot(Root) {
94
103
  role: role,
95
104
  view: view,
96
105
  size: size,
106
+ truncate: truncate,
97
107
  onFocus: onItemFocus,
98
108
  tabIndex: hasKeyNavigation ? navigationTabIndex : tabIndex,
99
- className: cx(pilledClass, selectedClass, animatedClass, className),
109
+ className: cx(pilledClass, selectedClass, animatedClass, truncate && classes.tabsTruncate, className),
100
110
  onClick: handleClick
101
- }, rest), /*#__PURE__*/React.createElement(React.Fragment, null, contentLeft && /*#__PURE__*/React.createElement(LeftContent, {
111
+ }, rest, {
112
+ style: _objectSpread(_objectSpread({}, rest.style), {}, {
113
+ maxWidth: maxWidth
114
+ })
115
+ }), /*#__PURE__*/React.createElement(React.Fragment, null, contentLeft && /*#__PURE__*/React.createElement(LeftContent, {
102
116
  className: classes.tabLeftContent
103
117
  }, contentLeft), /*#__PURE__*/React.createElement(StyledContent, {
104
118
  className: classes.tabContent
@@ -125,6 +139,9 @@ export var horizontalTabItemConfig = {
125
139
  },
126
140
  pilled: {
127
141
  css: pilledCSS
142
+ },
143
+ truncate: {
144
+ css: truncateCSS
128
145
  }
129
146
  },
130
147
  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;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;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({
6
6
  outlineSize: '0.063rem',
7
7
  outlineOffset: '-0.125rem',
8
8
  outlineColor: /*#__PURE__*/"var(".concat(tokens.outlineFocusColor, ")"),