@salutejs/plasma-new-hope 0.175.0-canary.1452.11541985977.0 → 0.175.0-canary.1500.11549138907.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (370) 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/Slider/Slider.css +13 -15
  10. package/cjs/components/Slider/Slider.js +2 -11
  11. package/cjs/components/Slider/Slider.js.map +1 -1
  12. package/cjs/components/Slider/Slider.tokens.js +17 -23
  13. package/cjs/components/Slider/Slider.tokens.js.map +1 -1
  14. package/cjs/components/Slider/components/Double/Double.css +8 -8
  15. package/cjs/components/Slider/components/Double/Double.js +23 -58
  16. package/cjs/components/Slider/components/Double/Double.js.map +1 -1
  17. package/cjs/components/Slider/components/Single/Single.css +14 -14
  18. package/cjs/components/Slider/components/Single/Single.js +33 -64
  19. package/cjs/components/Slider/components/Single/Single.js.map +1 -1
  20. package/cjs/components/Slider/components/Single/Single.styles.js +4 -4
  21. package/cjs/components/Slider/components/Single/Single.styles.js.map +1 -1
  22. package/cjs/components/Slider/components/Single/Single.styles_1r9f1e0.css +6 -0
  23. package/cjs/components/Slider/components/SliderBase/SliderBase.css +5 -5
  24. package/cjs/components/Slider/components/SliderBase/SliderBase.js +12 -31
  25. package/cjs/components/Slider/components/SliderBase/SliderBase.js.map +1 -1
  26. package/cjs/components/Slider/components/SliderBase/SliderBase.styles.js +7 -7
  27. package/cjs/components/Slider/components/SliderBase/SliderBase.styles.js.map +1 -1
  28. package/cjs/components/Slider/components/SliderBase/SliderBase.styles_9s4eb3.css +5 -0
  29. package/cjs/components/Slider/ui/Handler/Handler.css +3 -3
  30. package/cjs/components/Slider/ui/Handler/Handler.js +88 -49
  31. package/cjs/components/Slider/ui/Handler/Handler.js.map +1 -1
  32. package/cjs/components/Slider/ui/Handler/Handler.styles.js +7 -17
  33. package/cjs/components/Slider/ui/Handler/Handler.styles.js.map +1 -1
  34. package/cjs/components/Slider/ui/Handler/Handler.styles_8crx5z.css +2 -0
  35. package/cjs/components/Slider/ui/Thumb/Thumb.css +1 -1
  36. package/cjs/components/Slider/ui/Thumb/Thumb.js +2 -3
  37. package/cjs/components/Slider/ui/Thumb/Thumb.js.map +1 -1
  38. package/cjs/components/Slider/ui/Thumb/Thumb.styles.js +1 -1
  39. package/cjs/components/Slider/ui/Thumb/Thumb.styles.js.map +1 -1
  40. package/cjs/components/Slider/ui/Thumb/Thumb.styles_4w4gzn.css +1 -0
  41. package/cjs/components/Slider/utils/index.js +10 -28
  42. package/cjs/components/Slider/utils/index.js.map +1 -1
  43. package/cjs/components/Slider/variations/_view/base.js +1 -1
  44. package/cjs/components/Slider/variations/_view/base.js.map +1 -1
  45. package/cjs/components/Slider/variations/_view/base_x642ct.css +1 -0
  46. package/cjs/components/Tabs/tokens.js +2 -1
  47. package/cjs/components/Tabs/tokens.js.map +1 -1
  48. package/cjs/components/Tabs/ui/horizontal/HorizontalTabItem/HorizontalTabItem.css +7 -5
  49. package/cjs/components/Tabs/ui/horizontal/HorizontalTabItem/HorizontalTabItem.js +14 -3
  50. package/cjs/components/Tabs/ui/horizontal/HorizontalTabItem/HorizontalTabItem.js.map +1 -1
  51. package/cjs/components/Tabs/ui/horizontal/HorizontalTabItem/HorizontalTabItem.styles.js +1 -1
  52. package/cjs/components/Tabs/ui/horizontal/HorizontalTabItem/HorizontalTabItem.styles.js.map +1 -1
  53. package/cjs/components/Tabs/ui/horizontal/HorizontalTabItem/{HorizontalTabItem.styles_hfqv5b.css → HorizontalTabItem.styles_1vj7dbl.css} +1 -1
  54. package/cjs/components/Tabs/ui/horizontal/HorizontalTabItem/variations/_truncate/base.js +9 -0
  55. package/cjs/components/Tabs/ui/horizontal/HorizontalTabItem/variations/_truncate/base.js.map +1 -0
  56. package/cjs/components/Tabs/ui/horizontal/HorizontalTabItem/variations/_truncate/base_1b34xv3.css +1 -0
  57. package/cjs/components/Tabs/ui/vertical/VerticalTabItem/VerticalTabItem.css +7 -5
  58. package/cjs/components/Tabs/ui/vertical/VerticalTabItem/VerticalTabItem.js +14 -3
  59. package/cjs/components/Tabs/ui/vertical/VerticalTabItem/VerticalTabItem.js.map +1 -1
  60. package/cjs/components/Tabs/ui/vertical/VerticalTabItem/VerticalTabItem.styles.js +1 -1
  61. package/cjs/components/Tabs/ui/vertical/VerticalTabItem/VerticalTabItem.styles.js.map +1 -1
  62. package/cjs/components/Tabs/ui/vertical/VerticalTabItem/VerticalTabItem.styles_6ssvos.css +5 -0
  63. package/cjs/components/Tabs/ui/vertical/VerticalTabItem/variations/_truncate/base.js +9 -0
  64. package/cjs/components/Tabs/ui/vertical/VerticalTabItem/variations/_truncate/base.js.map +1 -0
  65. package/cjs/components/Tabs/ui/vertical/VerticalTabItem/variations/_truncate/base_1nwonlh.css +1 -0
  66. package/cjs/index.css +29 -25
  67. package/emotion/cjs/components/Badge/Badge.js +22 -4
  68. package/emotion/cjs/components/Badge/Badge.tokens.js +2 -1
  69. package/emotion/cjs/components/Badge/variations/_truncate/base.js +10 -0
  70. package/emotion/cjs/components/Badge/variations/_truncate/tokens.json +1 -0
  71. package/emotion/cjs/components/Slider/Slider.js +2 -10
  72. package/emotion/cjs/components/Slider/Slider.template-doc.mdx +0 -26
  73. package/emotion/cjs/components/Slider/Slider.tokens.js +17 -23
  74. package/emotion/cjs/components/Slider/components/Double/Double.js +19 -54
  75. package/emotion/cjs/components/Slider/components/Single/Single.js +33 -64
  76. package/emotion/cjs/components/Slider/components/Single/Single.styles.js +9 -18
  77. package/emotion/cjs/components/Slider/components/SliderBase/SliderBase.js +12 -31
  78. package/emotion/cjs/components/Slider/components/SliderBase/SliderBase.styles.js +10 -10
  79. package/emotion/cjs/components/Slider/ui/Handler/Handler.js +88 -52
  80. package/emotion/cjs/components/Slider/ui/Handler/Handler.styles.js +15 -9
  81. package/emotion/cjs/components/Slider/ui/Thumb/Thumb.js +2 -3
  82. package/emotion/cjs/components/Slider/ui/Thumb/Thumb.styles.js +3 -3
  83. package/emotion/cjs/components/Slider/utils/index.js +10 -28
  84. package/emotion/cjs/components/Slider/variations/_view/base.js +1 -2
  85. package/emotion/cjs/components/Tabs/tokens.js +2 -1
  86. package/emotion/cjs/components/Tabs/ui/horizontal/HorizontalTabItem/HorizontalTabItem.js +19 -3
  87. package/emotion/cjs/components/Tabs/ui/horizontal/HorizontalTabItem/HorizontalTabItem.styles.js +6 -6
  88. package/emotion/cjs/components/Tabs/ui/horizontal/HorizontalTabItem/variations/_truncate/base.js +10 -0
  89. package/emotion/cjs/components/Tabs/ui/horizontal/HorizontalTabItem/variations/_truncate/tokens.json +1 -0
  90. package/emotion/cjs/components/Tabs/ui/vertical/VerticalTabItem/VerticalTabItem.js +19 -3
  91. package/emotion/cjs/components/Tabs/ui/vertical/VerticalTabItem/VerticalTabItem.styles.js +6 -6
  92. package/emotion/cjs/components/Tabs/ui/vertical/VerticalTabItem/variations/_truncate/base.js +10 -0
  93. package/emotion/cjs/components/Tabs/ui/vertical/VerticalTabItem/variations/_truncate/tokens.json +1 -0
  94. package/emotion/cjs/examples/plasma_b2c/components/Badge/Badge.config.js +17 -14
  95. package/emotion/cjs/examples/plasma_b2c/components/Badge/Badge.stories.tsx +5 -1
  96. package/emotion/cjs/examples/plasma_b2c/components/Slider/Slider.config.js +7 -7
  97. package/emotion/cjs/examples/plasma_b2c/components/Slider/Slider.stories.tsx +16 -98
  98. package/emotion/cjs/examples/plasma_b2c/components/Tabs/Tabs.stories.tsx +49 -16
  99. package/emotion/cjs/examples/plasma_b2c/components/Tabs/horizontal/HorizontalTabItem.config.js +18 -15
  100. package/emotion/cjs/examples/plasma_b2c/components/Tabs/vertical/VerticalTabItem.config.js +9 -6
  101. package/emotion/cjs/examples/plasma_web/components/Slider/Slider.config.js +7 -7
  102. package/emotion/cjs/examples/plasma_web/components/Slider/Slider.stories.tsx +15 -98
  103. package/emotion/es/components/Badge/Badge.js +23 -4
  104. package/emotion/es/components/Badge/Badge.tokens.js +2 -1
  105. package/emotion/es/components/Badge/variations/_truncate/base.js +4 -0
  106. package/emotion/es/components/Badge/variations/_truncate/tokens.json +1 -0
  107. package/emotion/es/components/Slider/Slider.js +2 -11
  108. package/emotion/es/components/Slider/Slider.template-doc.mdx +0 -26
  109. package/emotion/es/components/Slider/Slider.tokens.js +17 -23
  110. package/emotion/es/components/Slider/components/Double/Double.js +19 -54
  111. package/emotion/es/components/Slider/components/Single/Single.js +34 -65
  112. package/emotion/es/components/Slider/components/Single/Single.styles.js +8 -17
  113. package/emotion/es/components/Slider/components/SliderBase/SliderBase.js +12 -31
  114. package/emotion/es/components/Slider/components/SliderBase/SliderBase.styles.js +11 -11
  115. package/emotion/es/components/Slider/ui/Handler/Handler.js +86 -51
  116. package/emotion/es/components/Slider/ui/Handler/Handler.styles.js +16 -10
  117. package/emotion/es/components/Slider/ui/Thumb/Thumb.js +2 -3
  118. package/emotion/es/components/Slider/ui/Thumb/Thumb.styles.js +3 -3
  119. package/emotion/es/components/Slider/utils/index.js +10 -28
  120. package/emotion/es/components/Slider/variations/_view/base.js +1 -2
  121. package/emotion/es/components/Tabs/tokens.js +2 -1
  122. package/emotion/es/components/Tabs/ui/horizontal/HorizontalTabItem/HorizontalTabItem.js +20 -3
  123. package/emotion/es/components/Tabs/ui/horizontal/HorizontalTabItem/HorizontalTabItem.styles.js +6 -6
  124. package/emotion/es/components/Tabs/ui/horizontal/HorizontalTabItem/variations/_truncate/base.js +4 -0
  125. package/emotion/es/components/Tabs/ui/horizontal/HorizontalTabItem/variations/_truncate/tokens.json +1 -0
  126. package/emotion/es/components/Tabs/ui/vertical/VerticalTabItem/VerticalTabItem.js +20 -3
  127. package/emotion/es/components/Tabs/ui/vertical/VerticalTabItem/VerticalTabItem.styles.js +6 -6
  128. package/emotion/es/components/Tabs/ui/vertical/VerticalTabItem/variations/_truncate/base.js +4 -0
  129. package/emotion/es/components/Tabs/ui/vertical/VerticalTabItem/variations/_truncate/tokens.json +1 -0
  130. package/emotion/es/examples/plasma_b2c/components/Badge/Badge.config.js +17 -14
  131. package/emotion/es/examples/plasma_b2c/components/Badge/Badge.stories.tsx +5 -1
  132. package/emotion/es/examples/plasma_b2c/components/Slider/Slider.config.js +7 -7
  133. package/emotion/es/examples/plasma_b2c/components/Slider/Slider.stories.tsx +16 -98
  134. package/emotion/es/examples/plasma_b2c/components/Tabs/Tabs.stories.tsx +49 -16
  135. package/emotion/es/examples/plasma_b2c/components/Tabs/horizontal/HorizontalTabItem.config.js +18 -15
  136. package/emotion/es/examples/plasma_b2c/components/Tabs/vertical/VerticalTabItem.config.js +9 -6
  137. package/emotion/es/examples/plasma_web/components/Slider/Slider.config.js +7 -7
  138. package/emotion/es/examples/plasma_web/components/Slider/Slider.stories.tsx +15 -98
  139. package/es/components/Badge/Badge.css +2 -0
  140. package/es/components/Badge/Badge.js +18 -5
  141. package/es/components/Badge/Badge.js.map +1 -1
  142. package/es/components/Badge/Badge.tokens.js +2 -1
  143. package/es/components/Badge/Badge.tokens.js.map +1 -1
  144. package/es/components/Badge/variations/_truncate/base.js +5 -0
  145. package/es/components/Badge/variations/_truncate/base.js.map +1 -0
  146. package/es/components/Badge/variations/_truncate/base_nf9u2h.css +1 -0
  147. package/es/components/Slider/Slider.css +13 -15
  148. package/es/components/Slider/Slider.js +2 -11
  149. package/es/components/Slider/Slider.js.map +1 -1
  150. package/es/components/Slider/Slider.tokens.js +17 -23
  151. package/es/components/Slider/Slider.tokens.js.map +1 -1
  152. package/es/components/Slider/components/Double/Double.css +8 -8
  153. package/es/components/Slider/components/Double/Double.js +19 -54
  154. package/es/components/Slider/components/Double/Double.js.map +1 -1
  155. package/es/components/Slider/components/Single/Single.css +14 -14
  156. package/es/components/Slider/components/Single/Single.js +34 -65
  157. package/es/components/Slider/components/Single/Single.js.map +1 -1
  158. package/es/components/Slider/components/Single/Single.styles.js +4 -4
  159. package/es/components/Slider/components/Single/Single.styles.js.map +1 -1
  160. package/es/components/Slider/components/Single/Single.styles_1r9f1e0.css +6 -0
  161. package/es/components/Slider/components/SliderBase/SliderBase.css +5 -5
  162. package/es/components/Slider/components/SliderBase/SliderBase.js +12 -31
  163. package/es/components/Slider/components/SliderBase/SliderBase.js.map +1 -1
  164. package/es/components/Slider/components/SliderBase/SliderBase.styles.js +7 -7
  165. package/es/components/Slider/components/SliderBase/SliderBase.styles.js.map +1 -1
  166. package/es/components/Slider/components/SliderBase/SliderBase.styles_9s4eb3.css +5 -0
  167. package/es/components/Slider/ui/Handler/Handler.css +3 -3
  168. package/es/components/Slider/ui/Handler/Handler.js +87 -48
  169. package/es/components/Slider/ui/Handler/Handler.js.map +1 -1
  170. package/es/components/Slider/ui/Handler/Handler.styles.js +7 -17
  171. package/es/components/Slider/ui/Handler/Handler.styles.js.map +1 -1
  172. package/es/components/Slider/ui/Handler/Handler.styles_8crx5z.css +2 -0
  173. package/es/components/Slider/ui/Thumb/Thumb.css +1 -1
  174. package/es/components/Slider/ui/Thumb/Thumb.js +2 -3
  175. package/es/components/Slider/ui/Thumb/Thumb.js.map +1 -1
  176. package/es/components/Slider/ui/Thumb/Thumb.styles.js +1 -1
  177. package/es/components/Slider/ui/Thumb/Thumb.styles.js.map +1 -1
  178. package/es/components/Slider/ui/Thumb/Thumb.styles_4w4gzn.css +1 -0
  179. package/es/components/Slider/utils/index.js +10 -28
  180. package/es/components/Slider/utils/index.js.map +1 -1
  181. package/es/components/Slider/variations/_view/base.js +1 -1
  182. package/es/components/Slider/variations/_view/base.js.map +1 -1
  183. package/es/components/Slider/variations/_view/base_x642ct.css +1 -0
  184. package/es/components/Tabs/tokens.js +2 -1
  185. package/es/components/Tabs/tokens.js.map +1 -1
  186. package/es/components/Tabs/ui/horizontal/HorizontalTabItem/HorizontalTabItem.css +7 -5
  187. package/es/components/Tabs/ui/horizontal/HorizontalTabItem/HorizontalTabItem.js +15 -4
  188. package/es/components/Tabs/ui/horizontal/HorizontalTabItem/HorizontalTabItem.js.map +1 -1
  189. package/es/components/Tabs/ui/horizontal/HorizontalTabItem/HorizontalTabItem.styles.js +1 -1
  190. package/es/components/Tabs/ui/horizontal/HorizontalTabItem/HorizontalTabItem.styles.js.map +1 -1
  191. package/es/components/Tabs/ui/horizontal/HorizontalTabItem/{HorizontalTabItem.styles_hfqv5b.css → HorizontalTabItem.styles_1vj7dbl.css} +1 -1
  192. package/es/components/Tabs/ui/horizontal/HorizontalTabItem/variations/_truncate/base.js +5 -0
  193. package/es/components/Tabs/ui/horizontal/HorizontalTabItem/variations/_truncate/base.js.map +1 -0
  194. package/es/components/Tabs/ui/horizontal/HorizontalTabItem/variations/_truncate/base_1b34xv3.css +1 -0
  195. package/es/components/Tabs/ui/vertical/VerticalTabItem/VerticalTabItem.css +7 -5
  196. package/es/components/Tabs/ui/vertical/VerticalTabItem/VerticalTabItem.js +15 -4
  197. package/es/components/Tabs/ui/vertical/VerticalTabItem/VerticalTabItem.js.map +1 -1
  198. package/es/components/Tabs/ui/vertical/VerticalTabItem/VerticalTabItem.styles.js +1 -1
  199. package/es/components/Tabs/ui/vertical/VerticalTabItem/VerticalTabItem.styles.js.map +1 -1
  200. package/es/components/Tabs/ui/vertical/VerticalTabItem/VerticalTabItem.styles_6ssvos.css +5 -0
  201. package/es/components/Tabs/ui/vertical/VerticalTabItem/variations/_truncate/base.js +5 -0
  202. package/es/components/Tabs/ui/vertical/VerticalTabItem/variations/_truncate/base.js.map +1 -0
  203. package/es/components/Tabs/ui/vertical/VerticalTabItem/variations/_truncate/base_1nwonlh.css +1 -0
  204. package/es/index.css +29 -25
  205. package/package.json +2 -2
  206. package/styled-components/cjs/components/Badge/Badge.js +22 -4
  207. package/styled-components/cjs/components/Badge/Badge.tokens.js +2 -1
  208. package/styled-components/cjs/components/Badge/variations/_truncate/base.js +10 -0
  209. package/styled-components/cjs/components/Badge/variations/_truncate/tokens.json +1 -0
  210. package/styled-components/cjs/components/Slider/Slider.js +2 -10
  211. package/styled-components/cjs/components/Slider/Slider.template-doc.mdx +0 -26
  212. package/styled-components/cjs/components/Slider/Slider.tokens.js +17 -23
  213. package/styled-components/cjs/components/Slider/components/Double/Double.js +19 -54
  214. package/styled-components/cjs/components/Slider/components/Single/Single.js +33 -64
  215. package/styled-components/cjs/components/Slider/components/Single/Single.styles.js +6 -6
  216. package/styled-components/cjs/components/Slider/components/SliderBase/SliderBase.js +12 -31
  217. package/styled-components/cjs/components/Slider/components/SliderBase/SliderBase.styles.js +6 -6
  218. package/styled-components/cjs/components/Slider/ui/Handler/Handler.js +88 -52
  219. package/styled-components/cjs/components/Slider/ui/Handler/Handler.styles.js +4 -7
  220. package/styled-components/cjs/components/Slider/ui/Thumb/Thumb.js +2 -3
  221. package/styled-components/cjs/components/Slider/ui/Thumb/Thumb.styles.js +2 -2
  222. package/styled-components/cjs/components/Slider/utils/index.js +10 -28
  223. package/styled-components/cjs/components/Slider/variations/_view/base.js +1 -2
  224. package/styled-components/cjs/components/Tabs/tokens.js +2 -1
  225. package/styled-components/cjs/components/Tabs/ui/horizontal/HorizontalTabItem/HorizontalTabItem.js +19 -3
  226. package/styled-components/cjs/components/Tabs/ui/horizontal/HorizontalTabItem/HorizontalTabItem.styles.js +1 -1
  227. package/styled-components/cjs/components/Tabs/ui/horizontal/HorizontalTabItem/variations/_truncate/base.js +10 -0
  228. package/styled-components/cjs/components/Tabs/ui/horizontal/HorizontalTabItem/variations/_truncate/tokens.json +1 -0
  229. package/styled-components/cjs/components/Tabs/ui/vertical/VerticalTabItem/VerticalTabItem.js +19 -3
  230. package/styled-components/cjs/components/Tabs/ui/vertical/VerticalTabItem/VerticalTabItem.styles.js +2 -2
  231. package/styled-components/cjs/components/Tabs/ui/vertical/VerticalTabItem/variations/_truncate/base.js +10 -0
  232. package/styled-components/cjs/components/Tabs/ui/vertical/VerticalTabItem/variations/_truncate/tokens.json +1 -0
  233. package/styled-components/cjs/examples/plasma_b2c/components/Badge/Badge.config.js +3 -0
  234. package/styled-components/cjs/examples/plasma_b2c/components/Badge/Badge.stories.tsx +5 -1
  235. package/styled-components/cjs/examples/plasma_b2c/components/Slider/Slider.config.js +3 -3
  236. package/styled-components/cjs/examples/plasma_b2c/components/Slider/Slider.stories.tsx +16 -98
  237. package/styled-components/cjs/examples/plasma_b2c/components/Tabs/Tabs.stories.tsx +49 -16
  238. package/styled-components/cjs/examples/plasma_b2c/components/Tabs/horizontal/HorizontalTabItem.config.js +3 -0
  239. package/styled-components/cjs/examples/plasma_b2c/components/Tabs/vertical/VerticalTabItem.config.js +3 -0
  240. package/styled-components/cjs/examples/plasma_web/components/Slider/Slider.config.js +3 -3
  241. package/styled-components/cjs/examples/plasma_web/components/Slider/Slider.stories.tsx +15 -98
  242. package/styled-components/es/components/Badge/Badge.js +23 -4
  243. package/styled-components/es/components/Badge/Badge.tokens.js +2 -1
  244. package/styled-components/es/components/Badge/variations/_truncate/base.js +4 -0
  245. package/styled-components/es/components/Badge/variations/_truncate/tokens.json +1 -0
  246. package/styled-components/es/components/Slider/Slider.js +2 -11
  247. package/styled-components/es/components/Slider/Slider.template-doc.mdx +0 -26
  248. package/styled-components/es/components/Slider/Slider.tokens.js +17 -23
  249. package/styled-components/es/components/Slider/components/Double/Double.js +19 -54
  250. package/styled-components/es/components/Slider/components/Single/Single.js +34 -65
  251. package/styled-components/es/components/Slider/components/Single/Single.styles.js +5 -5
  252. package/styled-components/es/components/Slider/components/SliderBase/SliderBase.js +12 -31
  253. package/styled-components/es/components/Slider/components/SliderBase/SliderBase.styles.js +7 -7
  254. package/styled-components/es/components/Slider/ui/Handler/Handler.js +86 -51
  255. package/styled-components/es/components/Slider/ui/Handler/Handler.styles.js +5 -8
  256. package/styled-components/es/components/Slider/ui/Thumb/Thumb.js +2 -3
  257. package/styled-components/es/components/Slider/ui/Thumb/Thumb.styles.js +2 -2
  258. package/styled-components/es/components/Slider/utils/index.js +10 -28
  259. package/styled-components/es/components/Slider/variations/_view/base.js +1 -2
  260. package/styled-components/es/components/Tabs/tokens.js +2 -1
  261. package/styled-components/es/components/Tabs/ui/horizontal/HorizontalTabItem/HorizontalTabItem.js +20 -3
  262. package/styled-components/es/components/Tabs/ui/horizontal/HorizontalTabItem/HorizontalTabItem.styles.js +1 -1
  263. package/styled-components/es/components/Tabs/ui/horizontal/HorizontalTabItem/variations/_truncate/base.js +4 -0
  264. package/styled-components/es/components/Tabs/ui/horizontal/HorizontalTabItem/variations/_truncate/tokens.json +1 -0
  265. package/styled-components/es/components/Tabs/ui/vertical/VerticalTabItem/VerticalTabItem.js +20 -3
  266. package/styled-components/es/components/Tabs/ui/vertical/VerticalTabItem/VerticalTabItem.styles.js +2 -2
  267. package/styled-components/es/components/Tabs/ui/vertical/VerticalTabItem/variations/_truncate/base.js +4 -0
  268. package/styled-components/es/components/Tabs/ui/vertical/VerticalTabItem/variations/_truncate/tokens.json +1 -0
  269. package/styled-components/es/examples/plasma_b2c/components/Badge/Badge.config.js +3 -0
  270. package/styled-components/es/examples/plasma_b2c/components/Badge/Badge.stories.tsx +5 -1
  271. package/styled-components/es/examples/plasma_b2c/components/Slider/Slider.config.js +3 -3
  272. package/styled-components/es/examples/plasma_b2c/components/Slider/Slider.stories.tsx +16 -98
  273. package/styled-components/es/examples/plasma_b2c/components/Tabs/Tabs.stories.tsx +49 -16
  274. package/styled-components/es/examples/plasma_b2c/components/Tabs/horizontal/HorizontalTabItem.config.js +3 -0
  275. package/styled-components/es/examples/plasma_b2c/components/Tabs/vertical/VerticalTabItem.config.js +3 -0
  276. package/styled-components/es/examples/plasma_web/components/Slider/Slider.config.js +3 -3
  277. package/styled-components/es/examples/plasma_web/components/Slider/Slider.stories.tsx +15 -98
  278. package/types/components/Badge/Badge.d.ts +10 -2
  279. package/types/components/Badge/Badge.d.ts.map +1 -1
  280. package/types/components/Badge/Badge.tokens.d.ts +1 -0
  281. package/types/components/Badge/Badge.tokens.d.ts.map +1 -1
  282. package/types/components/Badge/Badge.types.d.ts +5 -0
  283. package/types/components/Badge/Badge.types.d.ts.map +1 -1
  284. package/types/components/Badge/variations/_truncate/base.d.ts +2 -0
  285. package/types/components/Badge/variations/_truncate/base.d.ts.map +1 -0
  286. package/types/components/Slider/Slider.d.ts.map +1 -1
  287. package/types/components/Slider/Slider.tokens.d.ts +16 -22
  288. package/types/components/Slider/Slider.tokens.d.ts.map +1 -1
  289. package/types/components/Slider/components/Double/Double.d.ts.map +1 -1
  290. package/types/components/Slider/components/Double/Double.types.d.ts +0 -1
  291. package/types/components/Slider/components/Double/Double.types.d.ts.map +1 -1
  292. package/types/components/Slider/components/Single/Single.d.ts.map +1 -1
  293. package/types/components/Slider/components/Single/Single.styles.d.ts +1 -1
  294. package/types/components/Slider/components/Single/Single.styles.d.ts.map +1 -1
  295. package/types/components/Slider/components/Single/Single.types.d.ts +7 -79
  296. package/types/components/Slider/components/Single/Single.types.d.ts.map +1 -1
  297. package/types/components/Slider/components/SliderBase/SliderBase.d.ts.map +1 -1
  298. package/types/components/Slider/components/SliderBase/SliderBase.styles.d.ts +1 -1
  299. package/types/components/Slider/components/SliderBase/SliderBase.styles.d.ts.map +1 -1
  300. package/types/components/Slider/components/SliderBase/SliderBase.types.d.ts +0 -6
  301. package/types/components/Slider/components/SliderBase/SliderBase.types.d.ts.map +1 -1
  302. package/types/components/Slider/ui/Handler/Handler.d.ts.map +1 -1
  303. package/types/components/Slider/ui/Handler/Handler.styles.d.ts +2 -6
  304. package/types/components/Slider/ui/Handler/Handler.styles.d.ts.map +1 -1
  305. package/types/components/Slider/ui/Handler/Handler.types.d.ts +1 -5
  306. package/types/components/Slider/ui/Handler/Handler.types.d.ts.map +1 -1
  307. package/types/components/Slider/ui/Thumb/Thumb.d.ts +1 -1
  308. package/types/components/Slider/ui/Thumb/Thumb.d.ts.map +1 -1
  309. package/types/components/Slider/ui/Thumb/Thumb.styles.d.ts.map +1 -1
  310. package/types/components/Slider/ui/Thumb/Thumb.types.d.ts +0 -1
  311. package/types/components/Slider/ui/Thumb/Thumb.types.d.ts.map +1 -1
  312. package/types/components/Slider/utils/index.d.ts +8 -26
  313. package/types/components/Slider/utils/index.d.ts.map +1 -1
  314. package/types/components/Slider/variations/_view/base.d.ts.map +1 -1
  315. package/types/components/Tabs/TabItem.types.d.ts +5 -0
  316. package/types/components/Tabs/TabItem.types.d.ts.map +1 -1
  317. package/types/components/Tabs/tokens.d.ts +1 -0
  318. package/types/components/Tabs/tokens.d.ts.map +1 -1
  319. package/types/components/Tabs/ui/horizontal/HorizontalTabItem/HorizontalTabItem.d.ts +9 -2
  320. package/types/components/Tabs/ui/horizontal/HorizontalTabItem/HorizontalTabItem.d.ts.map +1 -1
  321. package/types/components/Tabs/ui/horizontal/HorizontalTabItem/HorizontalTabItem.styles.d.ts.map +1 -1
  322. package/types/components/Tabs/ui/horizontal/HorizontalTabItem/variations/_truncate/base.d.ts +2 -0
  323. package/types/components/Tabs/ui/horizontal/HorizontalTabItem/variations/_truncate/base.d.ts.map +1 -0
  324. package/types/components/Tabs/ui/vertical/VerticalTabItem/VerticalTabItem.d.ts +9 -2
  325. package/types/components/Tabs/ui/vertical/VerticalTabItem/VerticalTabItem.d.ts.map +1 -1
  326. package/types/components/Tabs/ui/vertical/VerticalTabItem/VerticalTabItem.styles.d.ts.map +1 -1
  327. package/types/components/Tabs/ui/vertical/VerticalTabItem/variations/_truncate/base.d.ts +2 -0
  328. package/types/components/Tabs/ui/vertical/VerticalTabItem/variations/_truncate/base.d.ts.map +1 -0
  329. package/types/examples/plasma_b2c/components/Badge/Badge.config.d.ts +3 -0
  330. package/types/examples/plasma_b2c/components/Badge/Badge.config.d.ts.map +1 -1
  331. package/types/examples/plasma_b2c/components/Badge/Badge.d.ts +6 -0
  332. package/types/examples/plasma_b2c/components/Badge/Badge.d.ts.map +1 -1
  333. package/types/examples/plasma_b2c/components/Slider/Slider.config.d.ts.map +1 -1
  334. package/types/examples/plasma_b2c/components/Slider/Slider.d.ts +2 -80
  335. package/types/examples/plasma_b2c/components/Slider/Slider.d.ts.map +1 -1
  336. package/types/examples/plasma_b2c/components/Tabs/TabItem.d.ts +6 -0
  337. package/types/examples/plasma_b2c/components/Tabs/TabItem.d.ts.map +1 -1
  338. package/types/examples/plasma_b2c/components/Tabs/horizontal/HorizontalTabItem.config.d.ts +3 -0
  339. package/types/examples/plasma_b2c/components/Tabs/horizontal/HorizontalTabItem.config.d.ts.map +1 -1
  340. package/types/examples/plasma_b2c/components/Tabs/vertical/VerticalTabItem.config.d.ts +3 -0
  341. package/types/examples/plasma_b2c/components/Tabs/vertical/VerticalTabItem.config.d.ts.map +1 -1
  342. package/types/examples/plasma_web/components/Badge/Badge.d.ts +3 -0
  343. package/types/examples/plasma_web/components/Badge/Badge.d.ts.map +1 -1
  344. package/types/examples/plasma_web/components/Slider/Slider.config.d.ts.map +1 -1
  345. package/types/examples/plasma_web/components/Slider/Slider.d.ts +2 -80
  346. package/types/examples/plasma_web/components/Slider/Slider.d.ts.map +1 -1
  347. package/cjs/components/Slider/components/DoubleUncontrolled/DoubleUncontrolled.css +0 -98
  348. package/cjs/components/Slider/components/Single/Single.styles_1h7n2s2.css +0 -6
  349. package/cjs/components/Slider/components/SliderBase/SliderBase.styles_1qt1224.css +0 -5
  350. package/cjs/components/Slider/ui/Handler/Handler.styles_irtcgm.css +0 -2
  351. package/cjs/components/Slider/ui/Handler/computeKeyPressData.js +0 -122
  352. package/cjs/components/Slider/ui/Handler/computeKeyPressData.js.map +0 -1
  353. package/cjs/components/Slider/ui/Thumb/Thumb.styles_uyn20e.css +0 -1
  354. package/cjs/components/Slider/variations/_view/base_1s3f6q8.css +0 -1
  355. package/cjs/components/Tabs/ui/vertical/VerticalTabItem/VerticalTabItem.styles_16d3lah.css +0 -5
  356. package/emotion/cjs/components/Slider/ui/Handler/computeKeyPressData.js +0 -121
  357. package/emotion/es/components/Slider/ui/Handler/computeKeyPressData.js +0 -115
  358. package/es/components/Slider/components/DoubleUncontrolled/DoubleUncontrolled.css +0 -98
  359. package/es/components/Slider/components/Single/Single.styles_1h7n2s2.css +0 -6
  360. package/es/components/Slider/components/SliderBase/SliderBase.styles_1qt1224.css +0 -5
  361. package/es/components/Slider/ui/Handler/Handler.styles_irtcgm.css +0 -2
  362. package/es/components/Slider/ui/Handler/computeKeyPressData.js +0 -118
  363. package/es/components/Slider/ui/Handler/computeKeyPressData.js.map +0 -1
  364. package/es/components/Slider/ui/Thumb/Thumb.styles_uyn20e.css +0 -1
  365. package/es/components/Slider/variations/_view/base_1s3f6q8.css +0 -1
  366. package/es/components/Tabs/ui/vertical/VerticalTabItem/VerticalTabItem.styles_16d3lah.css +0 -5
  367. package/styled-components/cjs/components/Slider/ui/Handler/computeKeyPressData.js +0 -121
  368. package/styled-components/es/components/Slider/ui/Handler/computeKeyPressData.js +0 -115
  369. package/types/components/Slider/ui/Handler/computeKeyPressData.d.ts +0 -12
  370. package/types/components/Slider/ui/Handler/computeKeyPressData.d.ts.map +0 -1
@@ -1,15 +1,15 @@
1
1
  import styled from 'styled-components';
2
2
  import { applyHidden } from '../../../../mixins';
3
- import { classes, tokens } from '../../Slider.tokens';
4
- export var Rail = /*#__PURE__*/styled.div.withConfig({
5
- componentId: "plasma-new-hope__sc-ik0bjb-0"
6
- })(["position:relative;top:50%;height:var(", ");border-radius:var(", ");background-color:var(", ");overflow:hidden;transform:translateY(-50%);"], tokens.railThickness, tokens.railBorderRadius, tokens.railBackgroundColor);
3
+ import { tokens } from '../../Slider.tokens';
7
4
  export var Slider = /*#__PURE__*/styled.div.withConfig({
8
- componentId: "plasma-new-hope__sc-ik0bjb-1"
9
- })(["flex:1;position:relative;user-select:none;height:var(", ");&.", "{width:var(", ");height:auto;", "{top:0;left:50%;transform:translateX(-50%);width:var(", ");height:100%;}}"], tokens.size, classes.verticalOrientation, tokens.size, Rail, tokens.railThickness);
5
+ componentId: "plasma-new-hope__sc-ik0bjb-0"
6
+ })(["flex:1;position:relative;user-select:none;height:var(", ");"], tokens.height);
10
7
  export var RailWrap = /*#__PURE__*/styled.div.withConfig({
11
- componentId: "plasma-new-hope__sc-ik0bjb-2"
8
+ componentId: "plasma-new-hope__sc-ik0bjb-1"
12
9
  })(["height:100%;"]);
10
+ export var Rail = /*#__PURE__*/styled.div.withConfig({
11
+ componentId: "plasma-new-hope__sc-ik0bjb-2"
12
+ })(["position:relative;top:50%;height:var(", ");border-radius:var(", ");background-color:var(", ");overflow:hidden;transform:translateY(-50%);"], tokens.railHeight, tokens.railBorderRadius, tokens.railBackgroundColor);
13
13
  export var Fill = /*#__PURE__*/styled.div.withConfig({
14
14
  componentId: "plasma-new-hope__sc-ik0bjb-3"
15
15
  })(["position:absolute;height:100%;top:0;left:0;background:var(", ");width:0;"], tokens.fillColor);
@@ -1,9 +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", "orientation", "stepSize", "onChangeCommitted", "onChange", "position", "min", "max", "bounds", "zIndex", "disabled", "side", "showCurrentValue", "startOffset", "endOffset", "value", "valuePlacement"];
1
+ var _excluded = ["stepSize", "onChangeCommitted", "onChange", "xPosition", "min", "max", "bounds", "zIndex", "disabled", "side", "showCurrentValue", "startOffset", "endOffset", "value"];
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 _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; }
5
- function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
6
- 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); }
7
3
  function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
8
4
  function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
9
5
  function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
@@ -14,23 +10,28 @@ function _objectWithoutProperties(source, excluded) { if (source == null) return
14
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; }
15
11
  import React, { useRef, forwardRef } from 'react';
16
12
  import Draggable from 'react-draggable';
17
- import { cx } from '../../../../utils';
18
13
  import { getSliderThumbValue, getOffsets } from '../../utils';
19
14
  import { Thumb } from '../Thumb/Thumb';
20
- import { classes } from '../../Slider.tokens';
21
15
  import { HandlerStyled, StyledValue } from './Handler.styles';
22
- import { computeKeyPressData } from './computeKeyPressData';
23
16
 
24
17
  // TODO: PLASMA-1707
25
18
 
19
+ var KeyboardSupport = {
20
+ PageUp: 33,
21
+ PageDown: 34,
22
+ End: 35,
23
+ Home: 36,
24
+ ArrowLeft: 37,
25
+ ArrowUp: 38,
26
+ ArrowRight: 39,
27
+ ArrowDown: 40
28
+ };
26
29
  export var Handler = /*#__PURE__*/forwardRef(function (_ref, ref) {
27
- var size = _ref.size,
28
- orientation = _ref.orientation,
29
- stepSize = _ref.stepSize,
30
+ var stepSize = _ref.stepSize,
30
31
  onChangeCommitted = _ref.onChangeCommitted,
31
32
  onChange = _ref.onChange,
32
- _ref$position = _ref.position,
33
- position = _ref$position === void 0 ? 0 : _ref$position,
33
+ _ref$xPosition = _ref.xPosition,
34
+ xPosition = _ref$xPosition === void 0 ? 0 : _ref$xPosition,
34
35
  min = _ref.min,
35
36
  max = _ref.max,
36
37
  _ref$bounds = _ref.bounds,
@@ -45,88 +46,122 @@ export var Handler = /*#__PURE__*/forwardRef(function (_ref, ref) {
45
46
  _ref$endOffset = _ref.endOffset,
46
47
  endOffset = _ref$endOffset === void 0 ? 0 : _ref$endOffset,
47
48
  value = _ref.value,
48
- valuePlacement = _ref.valuePlacement,
49
49
  rest = _objectWithoutProperties(_ref, _excluded);
50
- var isVertical = orientation === 'vertical';
51
50
  var lastOnChangeValue = useRef();
52
- var _getOffsets = getOffsets(ref, side, isVertical),
51
+ var _getOffsets = getOffsets(ref, side),
53
52
  _getOffsets2 = _slicedToArray(_getOffsets, 2),
54
- startClientOffset = _getOffsets2[0],
55
- endClientOffset = _getOffsets2[1];
53
+ offsetLeft = _getOffsets2[0],
54
+ offsetRight = _getOffsets2[1];
56
55
  var _bounds = _slicedToArray(bounds, 2),
57
- startValueBound = _bounds[0],
58
- endValueBound = _bounds[1];
59
- var startPositionBound = startValueBound ? (startValueBound - min) * stepSize : null;
60
- var endPositionBound = endValueBound ? (endValueBound - min) * stepSize : null;
61
- var dragPosition = typeof position === 'number' ? {
62
- x: isVertical ? 0 : position,
63
- y: isVertical ? position : 0
56
+ leftValueBound = _bounds[0],
57
+ rightValueBound = _bounds[1];
58
+ var leftPositionBound = leftValueBound ? (leftValueBound - min) * stepSize : null;
59
+ var rightPositionBound = rightValueBound ? (rightValueBound - min) * stepSize : null;
60
+ var position = typeof xPosition === 'number' ? {
61
+ x: xPosition,
62
+ y: 0
64
63
  } : undefined;
65
64
  var tabIndex = disabled ? -1 : 0;
66
- var computedBounds = _defineProperty(_defineProperty({}, isVertical ? 'top' : 'left', (startPositionBound !== null && startPositionBound !== void 0 ? startPositionBound : 0) - (startClientOffset ? stepSize : 0)), isVertical ? 'bottom' : 'right', (endPositionBound !== null && endPositionBound !== void 0 ? endPositionBound : stepSize * (max - min)) - (endClientOffset ? stepSize : 0));
67
- var showCurrentValueCondition = showCurrentValue && (position >= startOffset && position <= max * stepSize - endOffset || position === 0 && value !== 0);
65
+ var computedBounds = {
66
+ left: (leftPositionBound !== null && leftPositionBound !== void 0 ? leftPositionBound : 0) - (offsetLeft ? stepSize : 0),
67
+ right: (rightPositionBound !== null && rightPositionBound !== void 0 ? rightPositionBound : stepSize * (max - min)) - (offsetRight ? stepSize : 0)
68
+ };
69
+ var showCurrentValueCondition = showCurrentValue && (xPosition >= startOffset && xPosition <= max * stepSize - endOffset || xPosition === 0 && value !== 0);
68
70
  var onDrag = function onDrag(_, data) {
69
- var newValue = getSliderThumbValue(isVertical ? data.y : data.x, stepSize, min, max);
71
+ var newValue = getSliderThumbValue(data.x, stepSize, min, max);
70
72
  if (lastOnChangeValue.current !== newValue) {
71
73
  onChange === null || onChange === void 0 || onChange(newValue, data);
72
74
  lastOnChangeValue.current = newValue;
73
75
  }
74
76
  };
75
77
  var onStop = function onStop(_, data) {
76
- var newValue = getSliderThumbValue(isVertical ? data.y : data.x, stepSize, min, max);
78
+ var newValue = getSliderThumbValue(data.x, stepSize, min, max);
77
79
  onChangeCommitted && onChangeCommitted(newValue, data);
78
80
  };
79
81
  var onKeyPress = function onKeyPress(event) {
80
82
  event.persist();
81
- var computedMultipleSteps = stepSize * (rest.multipleStepSize / 100 * max);
82
- var data = computeKeyPressData(event, {
83
- isVertical: isVertical,
84
- stepSize: stepSize,
85
- position: position,
86
- max: max,
87
- computedMultipleSteps: computedMultipleSteps
88
- });
89
- if (!data) {
83
+ var keyCode = event.keyCode,
84
+ target = event.target;
85
+ if (!Object.values(KeyboardSupport).includes(keyCode)) {
90
86
  return;
91
87
  }
88
+ var ArrowUp = KeyboardSupport.ArrowUp,
89
+ ArrowRight = KeyboardSupport.ArrowRight,
90
+ ArrowDown = KeyboardSupport.ArrowDown,
91
+ ArrowLeft = KeyboardSupport.ArrowLeft,
92
+ Home = KeyboardSupport.Home,
93
+ End = KeyboardSupport.End,
94
+ PageDown = KeyboardSupport.PageDown,
95
+ PageUp = KeyboardSupport.PageUp;
96
+ var computedMultipleSteps = stepSize * (rest.multipleStepSize / 100 * max);
97
+ var data = {
98
+ x: 0,
99
+ deltaX: stepSize,
100
+ lastX: xPosition,
101
+ y: 0,
102
+ deltaY: 0,
103
+ lastY: 0,
104
+ node: target
105
+ };
106
+ switch (keyCode) {
107
+ case ArrowUp:
108
+ case ArrowRight:
109
+ data.x = xPosition + stepSize;
110
+ break;
111
+ case ArrowDown:
112
+ case ArrowLeft:
113
+ data.x = xPosition - stepSize;
114
+ data.deltaX = -stepSize;
115
+ break;
116
+ case PageUp:
117
+ data.x = xPosition + computedMultipleSteps;
118
+ data.deltaX = computedMultipleSteps;
119
+ break;
120
+ case PageDown:
121
+ data.x = xPosition - computedMultipleSteps;
122
+ data.deltaX = -computedMultipleSteps;
123
+ break;
124
+ case End:
125
+ data.x = max * stepSize;
126
+ break;
127
+ case Home:
128
+ data.x = 0;
129
+ break;
130
+ default:
131
+ data.x = 0;
132
+ }
92
133
  var left = computedBounds.left,
93
- right = computedBounds.right,
94
- top = computedBounds.top,
95
- bottom = computedBounds.bottom;
134
+ right = computedBounds.right;
96
135
 
97
136
  /*
98
137
  * INFO: Находим значение в диапазоне между указанными левой и правой границами.
99
- * Или между верхней и нижней
100
138
  * Необходимо для правильного расчета положения SliderThumb.
101
139
  * см. функция clamp
102
140
  */
103
- var boundedValue = isVertical ? Math.max(Math.min(bottom, data.y), top) : Math.max(Math.min(right, data.x), left);
141
+ var boundedValue = Math.max(Math.min(right, data.x), left);
104
142
  var computedValue = getSliderThumbValue(boundedValue, stepSize, min, max);
105
143
  lastOnChangeValue.current = computedValue;
106
144
  onChangeCommitted && onChangeCommitted(computedValue, data);
107
145
  };
108
146
  return /*#__PURE__*/React.createElement(Draggable, {
109
- axis: isVertical ? 'y' : 'x',
147
+ axis: "x",
110
148
  bounds: computedBounds,
111
- grid: isVertical ? [1, stepSize] : [stepSize, 1],
149
+ grid: [stepSize, 1],
112
150
  onStop: onStop,
113
151
  onDrag: onDrag,
114
- position: dragPosition,
152
+ position: position,
115
153
  disabled: disabled
116
154
  }, /*#__PURE__*/React.createElement(HandlerStyled, {
117
155
  ref: ref,
118
156
  style: {
119
157
  zIndex: zIndex
120
158
  },
121
- className: cx(isVertical && classes.verticalOrientation, valuePlacement === 'left' && classes.valuePlacementLeft),
122
- isLarge: size === 'large',
123
159
  onKeyDown: onKeyPress
124
- }, size !== 'none' && /*#__PURE__*/React.createElement(Thumb, _extends({
160
+ }, /*#__PURE__*/React.createElement(Thumb, _extends({
125
161
  tabIndex: tabIndex,
126
162
  min: min,
127
163
  max: max,
128
164
  value: value,
129
- disabled: disabled,
130
- orientation: orientation
165
+ disabled: disabled
131
166
  }, rest)), showCurrentValueCondition && /*#__PURE__*/React.createElement(StyledValue, null, value)));
132
167
  });
@@ -1,11 +1,8 @@
1
1
  import styled from 'styled-components';
2
- import { classes, tokens } from '../../Slider.tokens';
3
- export var StyledValue = /*#__PURE__*/styled.span.withConfig({
4
- componentId: "plasma-new-hope__sc-a1py3c-0"
5
- })(["position:absolute;z-index:1;top:var(", ");text-align:center;width:100%;margin-left:-0.125rem;display:flex;justify-content:center;font-family:var(", ");font-size:var(", ");font-style:var(", ");font-weight:var(", ");letter-spacing:var(", ");line-height:var(", ");"], tokens.currentValueTopOffset, tokens.valueFontFamily, tokens.valueFontSize, tokens.valueFontStyle, tokens.valueFontWeight, tokens.valueLetterSpacing, tokens.valueLineHeight);
2
+ import { tokens } from '../../Slider.tokens';
6
3
  export var HandlerStyled = /*#__PURE__*/styled.div.withConfig({
4
+ componentId: "plasma-new-hope__sc-a1py3c-0"
5
+ })(["cursor:pointer;position:absolute;z-index:1;top:0;left:0;"]);
6
+ export var StyledValue = /*#__PURE__*/styled.span.withConfig({
7
7
  componentId: "plasma-new-hope__sc-a1py3c-1"
8
- })(["cursor:pointer;position:absolute;z-index:1;top:0;left:0;bottom:0;display:flex;align-items:center;justify-content:center;--thumb-size:", ";&.", "{right:0;bottom:auto;align-items:flex-start;justify-content:center;", "{margin:0;top:0;bottom:0;right:0;left:calc(var(", ") - (var(", ") - var(--thumb-size)) / 2 + 0.25rem);align-items:center;justify-content:flex-start;}}&.", "{", "{left:auto;right:calc(var(", ") - (var(", ") - var(--thumb-size)) / 2 + 0.3125rem);justify-content:flex-end;}}"], function (_ref) {
9
- var isLarge = _ref.isLarge;
10
- return isLarge ? "var(".concat(tokens.thumbSizeLarge, ")") : "var(".concat(tokens.thumbSize, ")");
11
- }, classes.verticalOrientation, StyledValue, tokens.size, tokens.size, classes.valuePlacementLeft, StyledValue, tokens.size, tokens.size);
8
+ })(["position:absolute;z-index:1;top:var(", ");text-align:center;width:100%;margin-left:-0.125rem;display:flex;justify-content:center;font-family:var(", ");font-size:var(", ");font-style:var(", ");font-weight:var(", ");letter-spacing:var(", ");line-height:var(", ");"], tokens.currentValueTopOffset, tokens.currentValueFontFamily, tokens.currentValueFontSize, tokens.currentValueFontStyle, tokens.currentValueFontWeight, tokens.currentValueLetterSpacing, tokens.currentValueLineHeight);
@@ -1,4 +1,4 @@
1
- var _excluded = ["min", "max", "value", "ariaValueMin", "ariaLabel", "disabled", "orientation"];
1
+ var _excluded = ["min", "max", "value", "ariaValueMin", "ariaLabel", "disabled"];
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; }
@@ -12,7 +12,6 @@ export var Thumb = function Thumb(_ref) {
12
12
  ariaValueMin = _ref$ariaValueMin === void 0 ? min : _ref$ariaValueMin,
13
13
  ariaLabel = _ref.ariaLabel,
14
14
  disabled = _ref.disabled,
15
- orientation = _ref.orientation,
16
15
  rest = _objectWithoutProperties(_ref, _excluded);
17
16
  return /*#__PURE__*/React.createElement(ThumbBase, _extends({
18
17
  role: "slider",
@@ -21,6 +20,6 @@ export var Thumb = function Thumb(_ref) {
21
20
  "aria-valuemax": max,
22
21
  "aria-valuenow": value,
23
22
  disabled: disabled,
24
- "aria-orientation": orientation
23
+ "aria-orientation": "horizontal"
25
24
  }, rest));
26
25
  };
@@ -3,8 +3,8 @@ import { addFocus } from '../../../../mixins';
3
3
  import { tokens } from '../../Slider.tokens';
4
4
  export var ThumbBase = /*#__PURE__*/styled.div.withConfig({
5
5
  componentId: "plasma-new-hope__sc-13botku-0"
6
- })(["width:var(--thumb-size);height:var(--thumb-size);min-width:var(--thumb-size);min-height:var(--thumb-size);position:relative;border-radius:50%;box-sizing:border-box;background:var(", ");margin:0.0625rem;transition:border-color 0.1s ease-in-out;&:after{background:var(", ");margin:-0.0625rem;content:'';position:absolute;inset:0;z-index:-1;border-radius:inherit;}&:not([disabled]):hover:after,&:not([disabled]):active:after{background:var(", ");}&[disabled]{cursor:not-allowed;}&:focus{outline:none;}", ""], tokens.thumbBackgroundColor, tokens.thumbBorderColor, tokens.thumbFocusBorderColor, /*#__PURE__*/addFocus({
7
- outlineOffset: '0.0625rem',
6
+ })(["width:var(", ");height:var(", ");position:relative;left:-0.125rem;top:-0.125rem;border-radius:50%;box-sizing:border-box;background:var(", ");margin:0.125rem;transition:border-color 0.1s ease-in-out;&:after{background:var(", ");margin:-0.125rem;content:'';position:absolute;inset:0;z-index:-1;border-radius:inherit;}&:not([disabled]):hover:after,&:not([disabled]):active:after{background:var(", ");}&[disabled]{cursor:not-allowed;}&:focus{outline:none;}", ""], tokens.thumbSize, tokens.thumbSize, tokens.thumbBackgroundColor, tokens.thumbBorderColor, tokens.thumbFocusBorderColor, /*#__PURE__*/addFocus({
7
+ outlineOffset: '0.125rem',
8
8
  outlineSize: '0.125rem',
9
9
  outlineRadius: '50%',
10
10
  outlineColor: /*#__PURE__*/"var(".concat(tokens.thumbFocusBorderColor, ")")
@@ -6,8 +6,8 @@
6
6
  * @param {number} max
7
7
  * @return {number}
8
8
  */
9
- export function getSliderThumbValue(handleCenterPosRelative, stepSize, min, max) {
10
- var newValue = Math.round(handleCenterPosRelative / stepSize) + min;
9
+ export function getSliderThumbValue(handleCenterXRelative, stepSize, min, max) {
10
+ var newValue = Math.round(handleCenterXRelative / stepSize) + min;
11
11
  return Math.min(Math.max(newValue, min), max);
12
12
  }
13
13
 
@@ -18,11 +18,11 @@ export function getSliderThumbValue(handleCenterPosRelative, stepSize, min, max)
18
18
  * @param {'left' | 'right'} side
19
19
  * @return Array<number>
20
20
  */
21
- export function getOffsets(ref, side, isVertical) {
21
+ export function getOffsets(ref, side) {
22
22
  if (!ref || !('current' in ref) || !ref.current || !side) {
23
23
  return [0, 0];
24
24
  }
25
- var size = isVertical ? ref.current.clientHeight : ref.current.clientWidth;
25
+ var size = ref.current.clientWidth;
26
26
  if (side === 'left') {
27
27
  return [0, size];
28
28
  }
@@ -33,33 +33,15 @@ export function getOffsets(ref, side, isVertical) {
33
33
  }
34
34
  export var sizeData = {
35
35
  s: {
36
- small: {
37
- indent: 0.5,
38
- fontSizeMultiplier: 16
39
- },
40
- large: {
41
- indent: 0.625,
42
- fontSizeMultiplier: 16
43
- }
36
+ indent: 0.5,
37
+ fontSizeMultiplier: 16
44
38
  },
45
39
  m: {
46
- small: {
47
- indent: 0.5,
48
- fontSizeMultiplier: 16
49
- },
50
- large: {
51
- indent: 0.625,
52
- fontSizeMultiplier: 16
53
- }
40
+ indent: 0.75,
41
+ fontSizeMultiplier: 16
54
42
  },
55
43
  l: {
56
- small: {
57
- indent: 0.5,
58
- fontSizeMultiplier: 16
59
- },
60
- large: {
61
- indent: 0.625,
62
- fontSizeMultiplier: 16
63
- }
44
+ indent: 0.75,
45
+ fontSizeMultiplier: 16
64
46
  }
65
47
  };
@@ -1,3 +1,2 @@
1
1
  import { css } from 'styled-components';
2
- import { classes } from '../../Slider.tokens';
3
- export var base = /*#__PURE__*/css(["&.", "{height:100%;display:inline-flex;}"], classes.verticalOrientation);
2
+ export var base = /*#__PURE__*/css([""]);
@@ -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", "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, 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.maxWidth,
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, ")"),
@@ -0,0 +1,4 @@
1
+ import { css } from 'styled-components';
2
+ import { classes } from '../../../../../tokens';
3
+ import { StyledContent, TabItemValue } from '../../HorizontalTabItem.styles';
4
+ export var base = /*#__PURE__*/css(["&.", "{", "{overflow:hidden;text-overflow:ellipsis;}", "{overflow:hidden;text-overflow:ellipsis;}}"], classes.tabsTruncate, StyledContent, TabItemValue);
@@ -1,5 +1,11 @@
1
- var _excluded = ["size", "view", "selected", "disabled", "children", "value", "contentLeft", "contentRight", "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", "selected", "disabled", "children", "value", "contentLeft", "contentRight", "onIndexChange", "itemIndex", "tabIndex", "className", "onClick", "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, useRef, useContext, useEffect, useCallback } from 'react';
@@ -11,6 +17,7 @@ import { base, LeftContent, RightContent, StyledContent, TabItemValue } from './
11
17
  import { base as viewCSS } from './variations/_view/base';
12
18
  import { base as sizeCSS } from './variations/_size/base';
13
19
  import { base as disabledCSS } from './variations/_disabled/base';
20
+ import { base as truncateCSS } from './variations/_truncate/base';
14
21
  export var verticalTabItemRoot = function verticalTabItemRoot(Root) {
15
22
  return /*#__PURE__*/forwardRef(function (props, outerRef) {
16
23
  var size = props.size,
@@ -27,11 +34,13 @@ export var verticalTabItemRoot = function verticalTabItemRoot(Root) {
27
34
  tabIndex = props.tabIndex,
28
35
  className = props.className,
29
36
  onClick = props.onClick,
37
+ maxWidth = props.maxWidth,
30
38
  rest = _objectWithoutProperties(props, _excluded);
31
39
  var innerRef = useRef(null);
32
40
  var ref = useForkRef(outerRef, innerRef);
33
41
  var refs = useContext(TabsContext);
34
42
  var role = 'tab';
43
+ var truncate = maxWidth !== 'auto';
35
44
  var selectedClass = selected ? classes.selectedTabsItem : undefined;
36
45
  var hasKeyNavigation = itemIndex !== undefined && onIndexChange !== undefined;
37
46
  var navigationTabIndex = !disabled && (refs === null || refs === void 0 ? void 0 : refs.current) === itemIndex ? 0 : -1;
@@ -83,11 +92,16 @@ export var verticalTabItemRoot = function verticalTabItemRoot(Root) {
83
92
  role: role,
84
93
  view: view,
85
94
  size: size,
95
+ truncate: truncate,
86
96
  onFocus: onItemFocus,
87
97
  tabIndex: hasKeyNavigation ? navigationTabIndex : tabIndex,
88
- className: cx(selectedClass, className),
98
+ className: cx(selectedClass, truncate && classes.tabsTruncate, className),
89
99
  onClick: handleClick
90
- }, rest), /*#__PURE__*/React.createElement(React.Fragment, null, contentLeft && /*#__PURE__*/React.createElement(LeftContent, {
100
+ }, rest, {
101
+ style: _objectSpread(_objectSpread({}, rest.style), {}, {
102
+ maxWidth: maxWidth
103
+ })
104
+ }), /*#__PURE__*/React.createElement(React.Fragment, null, contentLeft && /*#__PURE__*/React.createElement(LeftContent, {
91
105
  className: classes.tabLeftContent
92
106
  }, contentLeft), /*#__PURE__*/React.createElement(StyledContent, {
93
107
  className: classes.tabContent
@@ -111,6 +125,9 @@ export var verticalTabItemConfig = {
111
125
  disabled: {
112
126
  css: disabledCSS,
113
127
  attrs: true
128
+ },
129
+ truncate: {
130
+ css: truncateCSS
114
131
  }
115
132
  },
116
133
  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 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({
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 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({
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
- })(["color:var(", ");"], tokens.itemValueColor);
19
+ })(["white-space:nowrap;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;}"]);
@@ -0,0 +1,4 @@
1
+ import { css } from 'styled-components';
2
+ import { classes } from '../../../../../tokens';
3
+ import { StyledContent, TabItemValue } from '../../VerticalTabItem.styles';
4
+ export var base = /*#__PURE__*/css(["&.", "{", "{overflow:hidden;text-overflow:ellipsis;}", "{overflow:hidden;text-overflow:ellipsis;}}"], classes.tabsTruncate, StyledContent, TabItemValue);
@@ -29,6 +29,9 @@ export var config = {
29
29
  },
30
30
  clear: {
31
31
  "true": /*#__PURE__*/css([""])
32
+ },
33
+ truncate: {
34
+ "true": /*#__PURE__*/css([""])
32
35
  }
33
36
  }
34
37
  };
@@ -31,6 +31,9 @@ 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
+ },
34
37
  ...disableProps(['contentLeft', 'contentRight']),
35
38
  },
36
39
  };
@@ -64,7 +67,7 @@ export const Default: Story = {
64
67
  },
65
68
  },
66
69
  args: {
67
- text: 'Hello',
70
+ text: 'Hello Kitty',
68
71
  view: 'default',
69
72
  size: 'm',
70
73
  enableContentLeft: false,
@@ -72,6 +75,7 @@ export const Default: Story = {
72
75
  clear: false,
73
76
  pilled: false,
74
77
  transparent: false,
78
+ maxWidth: '',
75
79
  },
76
80
  render: ({ enableContentLeft, enableContentRight, size, ...rest }: StoryProps) => {
77
81
  const iconSize = size === 'l' ? '1rem' : '0.75rem';