@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
@@ -7,12 +7,6 @@ exports.tokens = exports.classes = void 0;
7
7
  var classes = exports.classes = {
8
8
  labelPlacementOuter: 'slider-label-placement-outer',
9
9
  labelPlacementInner: 'slider-label-placement-inner',
10
- labelPlacementBottom: 'slider-label-placement-bottom',
11
- labelAlignLeft: 'slider-label-align-left',
12
- labelAlignCenter: 'slider-label-align-center',
13
- labelAlignRight: 'slider-label-align-right',
14
- labelAlignNone: 'slider-label-align-none',
15
- labelContentReversed: 'slider-label-content-reversed',
16
10
  rangeValuesPlacementOuter: 'slider-range-values-placement-outer',
17
11
  rangeValuesPlacementInner: 'slider-range-values-placement-inner',
18
12
  maxRangeValue: 'slider-max-range-value',
@@ -21,17 +15,13 @@ var classes = exports.classes = {
21
15
  textFieldActive: 'slider-text-field-active',
22
16
  firstTextField: 'slider-first-text-field',
23
17
  secondTextField: 'slider-second-text-field',
24
- activeRangeValue: 'slider-active-range-value',
25
- verticalOrientation: 'slider-vertical-orientation',
26
- valuePlacementLeft: 'slider-value-placement-left',
27
- reversed: 'slider-reversed'
18
+ activeRangeValue: 'slider-active-range-value'
28
19
  };
29
20
  var tokens = exports.tokens = {
30
- size: '--plasma-slider-size',
21
+ height: '--plasma-slider-height',
31
22
  labelWrapperGap: '--plasma-slider-label-wrapper-gap',
32
23
  labelWrapperMarginBottom: '--plasma-slider-label-wrapper-margin-bottom',
33
24
  labelWrapperMarginRight: '--plasma-slider-label-wrapper-margin-right',
34
- labelWrapperVerticalMargin: '--plasma-slider-label-wrapper-vertical-margin',
35
25
  labelColor: '--plasma-slider-label-color',
36
26
  labelFontFamily: '--plasma-slider-label-font-family',
37
27
  labelFontSize: '--plasma-slider-label-font-size',
@@ -39,27 +29,31 @@ var tokens = exports.tokens = {
39
29
  labelFontWeight: '--plasma-slider-label-font-weight',
40
30
  labelLetterSpacing: '--plasma-slider-label-letter-spacing',
41
31
  labelLineHeight: '--plasma-slider-label-line-height',
32
+ rangeMinValueMargin: '--plasma-slider-range-min-value-margin',
33
+ rangeMaxValueMargin: '--plasma-slider-range-max-value-margin',
42
34
  rangeValueBottomOffset: '--plasma-slider-range-value-bottom-offset',
43
- rangeValueHorizontalMargin: '--plasma-slider-range-value-horizontal-margin',
44
- rangeValueHorizontalOffset: '--plasma-slider-range-value-horizontal-offset',
45
- rangeValueVerticalMargin: '--plasma-slider-range-value-vertical-margin',
46
35
  rangeValueColor: '--plasma-slider-range-value-color',
47
- valueFontFamily: '--plasma-slider-value-font-family',
48
- valueFontSize: '--plasma-slider-value-font-size',
49
- valueFontStyle: '--plasma-slider-value-font-style',
50
- valueFontWeight: '--plasma-slider-value-font-weight',
51
- valueLetterSpacing: '--plasma-slider-value-letter-spacing',
52
- valueLineHeight: '--plasma-slider-value-line-height',
36
+ rangeValueFontFamily: '--plasma-slider-range-value-font-family',
37
+ rangeValueFontSize: '--plasma-slider-range-value-font-size',
38
+ rangeValueFontStyle: '--plasma-slider-range-value-font-style',
39
+ rangeValueFontWeight: '--plasma-slider-range-value-font-weight',
40
+ rangeValueLetterSpacing: '--plasma-slider-range-value-letter-spacing',
41
+ rangeValueLineHeight: '--plasma-slider-range-value-line-height',
53
42
  doubleWrapperGap: '--plasma-slider-double-wrapper-gap',
54
43
  thumbSize: '--plasma-slider-thumb-size',
55
- thumbSizeLarge: '--plasma-slider-thumb-size-large',
56
44
  thumbBorder: '--plasma-slider-thumb-border',
57
45
  thumbBorderColor: '--plasma-slider-thumb-border-color',
58
46
  thumbBackgroundColor: '--plasma-slider-thumb-background-color',
59
47
  thumbFocusBorderColor: '--plasma-slider-thumb-focus-border-color',
60
48
  currentValueTopOffset: '--plasma-slider-current-value-top-offset',
49
+ currentValueFontFamily: '--plasma-slider-current-value-font-family',
50
+ currentValueFontSize: '--plasma-slider-current-value-font-size',
51
+ currentValueFontStyle: '--plasma-slider-current-value-font-style',
52
+ currentValueFontWeight: '--plasma-slider-current-value-font-weight',
53
+ currentValueLetterSpacing: '--plasma-slider-current-value-letter-spacing',
54
+ currentValueLineHeight: '--plasma-slider-current-value-line-height',
61
55
  railBackgroundColor: '--plasma-slider-rail-background-color',
62
- railThickness: '--plasma-slider-rail-thickness',
56
+ railHeight: '--plasma-slider-rail-height',
63
57
  railBorderRadius: '--plasma-slider-rail-border-radius',
64
58
  railIndent: '--plasma-slider-rail-indent',
65
59
  fillColor: '--plasma-slider-fill-color',
@@ -13,7 +13,7 @@ var _utils2 = /*#__PURE__*/require("../../utils");
13
13
  var _Slider = /*#__PURE__*/require("../../Slider.tokens");
14
14
  var _SliderBase2 = /*#__PURE__*/require("../SliderBase/SliderBase.styles");
15
15
  var _Double = /*#__PURE__*/require("./Double.styles");
16
- var _excluded = ["min", "max", "value", "disabled", "label", "labelContentLeft", "size", "pointerSize", "onChangeCommitted", "onChangeTextField", "onBlurTextField", "onKeyDownTextField", "onChange", "ariaLabel", "multipleStepSize", "name"];
16
+ var _excluded = ["min", "max", "value", "disabled", "label", "labelContentLeft", "size", "onChangeCommitted", "onChangeTextField", "onBlurTextField", "onKeyDownTextField", "onChange", "ariaLabel", "multipleStepSize", "name"];
17
17
  function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
18
18
  function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { "default": e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n["default"] = e, t && t.set(e, n), n; }
19
19
  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); }
@@ -46,8 +46,6 @@ var DoubleSlider = exports.DoubleSlider = function DoubleSlider(_ref) {
46
46
  labelContentLeft = _ref.labelContentLeft,
47
47
  _ref$size = _ref.size,
48
48
  size = _ref$size === void 0 ? 'm' : _ref$size,
49
- _ref$pointerSize = _ref.pointerSize,
50
- pointerSize = _ref$pointerSize === void 0 ? 'small' : _ref$pointerSize,
51
49
  onChangeCommitted = _ref.onChangeCommitted,
52
50
  onChangeTextField = _ref.onChangeTextField,
53
51
  onBlurTextField = _ref.onBlurTextField,
@@ -74,30 +72,20 @@ var DoubleSlider = exports.DoubleSlider = function DoubleSlider(_ref) {
74
72
  setState = _useState2[1];
75
73
  var _useState3 = (0, _react.useState)(false),
76
74
  _useState4 = _slicedToArray(_useState3, 2),
77
- firstInputHovered = _useState4[0],
78
- setFirstInputHovered = _useState4[1];
75
+ firstInputActive = _useState4[0],
76
+ setFirstInputActive = _useState4[1];
79
77
  var _useState5 = (0, _react.useState)(false),
80
78
  _useState6 = _slicedToArray(_useState5, 2),
81
- firstInputFocused = _useState6[0],
82
- setFirstInputFocused = _useState6[1];
83
- var _useState7 = (0, _react.useState)(false),
79
+ secondInputActive = _useState6[0],
80
+ setSecondInputActive = _useState6[1];
81
+ var _useState7 = (0, _react.useState)(value[0]),
84
82
  _useState8 = _slicedToArray(_useState7, 2),
85
- secondInputHovered = _useState8[0],
86
- setSecondInputHovered = _useState8[1];
87
- var _useState9 = (0, _react.useState)(false),
83
+ firstValue = _useState8[0],
84
+ setFirstValue = _useState8[1];
85
+ var _useState9 = (0, _react.useState)(value[1]),
88
86
  _useState10 = _slicedToArray(_useState9, 2),
89
- secondInputFocused = _useState10[0],
90
- setSecondInputFocused = _useState10[1];
91
- var firstInputActive = firstInputHovered || firstInputFocused;
92
- var secondInputActive = secondInputHovered || secondInputFocused;
93
- var _useState11 = (0, _react.useState)(value[0]),
94
- _useState12 = _slicedToArray(_useState11, 2),
95
- firstValue = _useState12[0],
96
- setFirstValue = _useState12[1];
97
- var _useState13 = (0, _react.useState)(value[1]),
98
- _useState14 = _slicedToArray(_useState13, 2),
99
- secondValue = _useState14[0],
100
- setSecondValue = _useState14[1];
87
+ secondValue = _useState10[0],
88
+ setSecondValue = _useState10[1];
101
89
  var firstHandleRef = (0, _react.useRef)(null);
102
90
  var secondHandleRef = (0, _react.useRef)(null);
103
91
  var firstHandleValue = (0, _react.useRef)(value[0]);
@@ -122,16 +110,6 @@ var DoubleSlider = exports.DoubleSlider = function DoubleSlider(_ref) {
122
110
  });
123
111
  });
124
112
  }, [value, stepSize, min, max, setFirstValue, setSecondValue]);
125
- (0, _react.useEffect)(function () {
126
- var onMouseUp = function onMouseUp() {
127
- setFirstInputFocused(false);
128
- setSecondInputFocused(false);
129
- };
130
- window.addEventListener('mouseup', onMouseUp);
131
- return function () {
132
- window.removeEventListener('mouseup', onMouseUp);
133
- };
134
- }, []);
135
113
  var setStepSize = (0, _react.useCallback)(function (newStepSize) {
136
114
  setState(function (prevState) {
137
115
  return _objectSpread(_objectSpread({}, prevState), {}, {
@@ -273,20 +251,16 @@ var DoubleSlider = exports.DoubleSlider = function DoubleSlider(_ref) {
273
251
  ariaLabelLeft = _ref3[0],
274
252
  ariaLabelRight = _ref3[1];
275
253
  var currentFirstSliderValue = Math.max(state.firstValue, min);
276
- var settings = _utils2.sizeData[size][pointerSize === 'large' ? 'large' : 'small'];
277
254
  return /*#__PURE__*/_react["default"].createElement(_Double.DoubleWrapper, null, hasLabelContent && /*#__PURE__*/_react["default"].createElement(_Double.LabelWrapper, null, labelContentLeft && /*#__PURE__*/_react["default"].createElement(_Double.LabelContentLeft, null, labelContentLeft), label && /*#__PURE__*/_react["default"].createElement(_Double.Label, null, label)), /*#__PURE__*/_react["default"].createElement(_Double.SliderWrapper, null, /*#__PURE__*/_react["default"].createElement(_SliderBase.SliderBase, _extends({
278
255
  min: min,
279
256
  max: max,
280
- size: size,
281
257
  disabled: disabled,
282
258
  setStepSize: setStepSize,
283
259
  railFillWidth: state.railFillWidth,
284
- settings: settings,
285
- railFillXPosition: state.railFillXPosition,
286
- orientation: "horizontal"
260
+ settings: _utils2.sizeData[size],
261
+ railFillXPosition: state.railFillXPosition
287
262
  }, rest), /*#__PURE__*/_react["default"].createElement(_ui.Handler, {
288
263
  ref: firstHandleRef,
289
- size: pointerSize,
290
264
  stepSize: state.stepSize,
291
265
  multipleStepSize: multipleStepSize,
292
266
  onChangeCommitted: onFirstHandleChangeCommitted,
@@ -296,23 +270,18 @@ var DoubleSlider = exports.DoubleSlider = function DoubleSlider(_ref) {
296
270
  disabled: disabled,
297
271
  bounds: [min, state.secondValue],
298
272
  side: "left",
299
- orientation: "horizontal",
300
- position: state.xFirstHandle,
273
+ xPosition: state.xFirstHandle,
301
274
  zIndex: state.firstHandleZIndex,
302
275
  value: currentFirstSliderValue,
303
276
  ariaLabel: ariaLabelLeft,
304
- onMouseDown: function onMouseDown() {
305
- return setFirstInputFocused(true);
306
- },
307
277
  onMouseEnter: function onMouseEnter() {
308
- return setFirstInputHovered(true);
278
+ return setFirstInputActive(true);
309
279
  },
310
280
  onMouseLeave: function onMouseLeave() {
311
- return setFirstInputHovered(false);
281
+ return setFirstInputActive(false);
312
282
  }
313
283
  }), /*#__PURE__*/_react["default"].createElement(_ui.Handler, {
314
284
  ref: secondHandleRef,
315
- size: pointerSize,
316
285
  stepSize: state.stepSize,
317
286
  multipleStepSize: multipleStepSize,
318
287
  onChangeCommitted: onSecondHandleChangeCommitted,
@@ -323,19 +292,15 @@ var DoubleSlider = exports.DoubleSlider = function DoubleSlider(_ref) {
323
292
  disabled: disabled,
324
293
  bounds: [state.firstValue, max],
325
294
  side: "right",
326
- orientation: "horizontal",
327
- position: state.xSecondHandle,
295
+ xPosition: state.xSecondHandle,
328
296
  zIndex: state.secondHandleZIndex,
329
297
  value: Math.max(state.secondValue, min),
330
298
  ariaLabel: ariaLabelRight,
331
- onMouseDown: function onMouseDown() {
332
- return setSecondInputFocused(true);
333
- },
334
299
  onMouseEnter: function onMouseEnter() {
335
- return setSecondInputHovered(true);
300
+ return setSecondInputActive(true);
336
301
  },
337
302
  onMouseLeave: function onMouseLeave() {
338
- return setSecondInputHovered(false);
303
+ return setSecondInputActive(false);
339
304
  }
340
305
  })), /*#__PURE__*/_react["default"].createElement(_Double.InputsWrapper, null, /*#__PURE__*/_react["default"].createElement(_Double.StyledInput, {
341
306
  className: (0, _utils.cx)(_Slider.classes.firstTextField, firstInputActiveClass),
@@ -13,7 +13,7 @@ var _utils2 = /*#__PURE__*/require("../../../../utils");
13
13
  var _Slider = /*#__PURE__*/require("../../Slider.tokens");
14
14
  var _SliderBase2 = /*#__PURE__*/require("../SliderBase/SliderBase.styles");
15
15
  var _Single = /*#__PURE__*/require("./Single.styles");
16
- var _excluded = ["min", "max", "value", "disabled", "onChangeCommitted", "onChange", "ariaLabel", "label", "labelContentLeft", "labelContent", "sliderAlign", "showScale", "showRangeValues", "showCurrentValue", "hideMinValueDiff", "hideMaxValueDiff", "labelPlacement", "rangeValuesPlacement", "scaleAlign", "multipleStepSize", "defaultValue", "size", "name", "pointerSize", "orientation", "reversed", "labelReversed"];
16
+ var _excluded = ["min", "max", "value", "disabled", "onChangeCommitted", "onChange", "ariaLabel", "label", "labelContentLeft", "showRangeValues", "showCurrentValue", "hideMinValueDiff", "hideMaxValueDiff", "labelPlacement", "rangeValuesPlacement", "multipleStepSize", "defaultValue", "size", "name"];
17
17
  function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
18
18
  function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { "default": e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n["default"] = e, t && t.set(e, n), n; }
19
19
  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); }
@@ -41,35 +41,23 @@ var SingleSlider = exports.SingleSlider = function SingleSlider(_ref) {
41
41
  ariaLabel = _ref.ariaLabel,
42
42
  label = _ref.label,
43
43
  labelContentLeft = _ref.labelContentLeft,
44
- labelContent = _ref.labelContent,
45
- _ref$sliderAlign = _ref.sliderAlign,
46
- sliderAlign = _ref$sliderAlign === void 0 ? 'left' : _ref$sliderAlign,
47
- showScale = _ref.showScale,
48
44
  showRangeValues = _ref.showRangeValues,
49
45
  showCurrentValue = _ref.showCurrentValue,
50
46
  hideMinValueDiff = _ref.hideMinValueDiff,
51
47
  hideMaxValueDiff = _ref.hideMaxValueDiff,
52
48
  _ref$labelPlacement = _ref.labelPlacement,
53
- labelPlacement = _ref$labelPlacement === void 0 ? 'top' : _ref$labelPlacement,
54
- rangeValuesPlacementOld = _ref.rangeValuesPlacement,
55
- _ref$scaleAlign = _ref.scaleAlign,
56
- scaleAlign = _ref$scaleAlign === void 0 ? 'bottom' : _ref$scaleAlign,
49
+ labelPlacement = _ref$labelPlacement === void 0 ? 'outer' : _ref$labelPlacement,
50
+ _ref$rangeValuesPlace = _ref.rangeValuesPlacement,
51
+ rangeValuesPlacement = _ref$rangeValuesPlace === void 0 ? 'outer' : _ref$rangeValuesPlace,
57
52
  _ref$multipleStepSize = _ref.multipleStepSize,
58
53
  multipleStepSize = _ref$multipleStepSize === void 0 ? 10 : _ref$multipleStepSize,
59
54
  defaultValue = _ref.defaultValue,
60
55
  _ref$size = _ref.size,
61
56
  size = _ref$size === void 0 ? 'm' : _ref$size,
62
57
  name = _ref.name,
63
- _ref$pointerSize = _ref.pointerSize,
64
- pointerSize = _ref$pointerSize === void 0 ? 'small' : _ref$pointerSize,
65
- _ref$orientation = _ref.orientation,
66
- orientation = _ref$orientation === void 0 ? 'horizontal' : _ref$orientation,
67
- reversed = _ref.reversed,
68
- labelReversed = _ref.labelReversed,
69
58
  rest = _objectWithoutProperties(_ref, _excluded);
70
- var isVertical = orientation === 'vertical';
71
59
  var _useState = (0, _react.useState)({
72
- handlePosition: 0,
60
+ xHandle: 0,
73
61
  stepSize: 0,
74
62
  railFillWidth: 0
75
63
  }),
@@ -85,28 +73,23 @@ var SingleSlider = exports.SingleSlider = function SingleSlider(_ref) {
85
73
  _useState6 = _slicedToArray(_useState5, 2),
86
74
  endOffset = _useState6[0],
87
75
  setEndOffset = _useState6[1];
88
- var innerValue = (_ref2 = value !== null && value !== void 0 ? value : defaultValue) !== null && _ref2 !== void 0 ? _ref2 : min;
89
- var _useState7 = (0, _react.useState)(innerValue),
76
+ var _useState7 = (0, _react.useState)((_ref2 = value !== null && value !== void 0 ? value : defaultValue) !== null && _ref2 !== void 0 ? _ref2 : min),
90
77
  _useState8 = _slicedToArray(_useState7, 2),
91
78
  dragValue = _useState8[0],
92
79
  setDragValue = _useState8[1];
93
80
  var stepSize = state.stepSize;
94
- var innerShowScale = showRangeValues || showScale;
95
- var hasLabelContent = Boolean(label || labelContentLeft || labelContent) && (!isVertical || isVertical && sliderAlign !== 'none');
96
- var labelPlacementClass = !isVertical && (labelPlacement === 'outer' || labelPlacement === 'top') ? _Slider.classes.labelPlacementOuter : _Slider.classes.labelPlacementInner;
97
- var rangeValuesPlacement = rangeValuesPlacementOld === 'outer' || scaleAlign === 'bottom' ? 'outer' : 'inner';
98
- var scaleAlignClass = rangeValuesPlacement === 'outer' ? _Slider.classes.rangeValuesPlacementOuter : _Slider.classes.rangeValuesPlacementInner;
81
+ var hasLabelContent = label || labelContentLeft;
82
+ var labelPlacementClass = labelPlacement === 'outer' ? _Slider.classes.labelPlacementOuter : _Slider.classes.labelPlacementInner;
83
+ var rangeValuesPlacementClass = rangeValuesPlacement === 'outer' ? _Slider.classes.rangeValuesPlacementOuter : _Slider.classes.rangeValuesPlacementInner;
99
84
  var hideMinValueDiffClass = hideMinValueDiff && dragValue - min <= hideMinValueDiff ? _Slider.classes.hideMinValue : '';
100
85
  var hideMaxValueDiffClass = hideMaxValueDiff && max - dragValue <= hideMaxValueDiff ? _Slider.classes.hideMaxValue : '';
101
- var verticalOrientationClass = orientation === 'vertical' ? _Slider.classes.verticalOrientation : '';
102
86
  var startLabelRef = (0, _react.useRef)(null);
103
87
  var endLabelRef = (0, _react.useRef)(null);
104
88
  var activeFirstValue = dragValue === min ? _Slider.classes.activeRangeValue : undefined;
105
89
  var activeSecondValue = dragValue === max ? _Slider.classes.activeRangeValue : undefined;
106
90
  (0, _react.useEffect)(function () {
107
- var visibleValue = reversed ? max - dragValue + min : dragValue;
108
- var localValue = Math.min(Math.max(visibleValue, min), max) - min;
109
- if (!isVertical && rangeValuesPlacement === 'outer') {
91
+ var localValue = Math.min(Math.max(dragValue, min), max) - min;
92
+ if (rangeValuesPlacement === 'outer') {
110
93
  var _startLabelRef$curren, _endLabelRef$current;
111
94
  var startWidth = (_startLabelRef$curren = startLabelRef.current) === null || _startLabelRef$curren === void 0 ? void 0 : _startLabelRef$curren.offsetWidth;
112
95
  if ((0, _utils2.isNumber)(startWidth)) {
@@ -116,35 +99,30 @@ var SingleSlider = exports.SingleSlider = function SingleSlider(_ref) {
116
99
  if ((0, _utils2.isNumber)(endWidth)) {
117
100
  setEndOffset(Number(endWidth));
118
101
  }
119
- } else if (isVertical && innerShowScale && sliderAlign !== 'center') {
120
- setStartOffset(12);
121
- setEndOffset(12);
122
102
  } else {
123
103
  setStartOffset(1);
124
104
  setEndOffset(1);
125
105
  }
126
106
  setState(function (prevState) {
127
107
  return _objectSpread(_objectSpread({}, prevState), {}, {
128
- handlePosition: stepSize * localValue,
108
+ xHandle: stepSize * localValue,
129
109
  railFillWidth: stepSize * localValue
130
110
  });
131
111
  });
132
- }, [dragValue, innerShowScale, labelPlacement, stepSize, rangeValuesPlacement, min, max, isVertical, reversed,
133
- // для перерасчета размеров
134
- sliderAlign, size]);
112
+ }, [dragValue, labelPlacement, stepSize, rangeValuesPlacement, min, max, setStartOffset, setEndOffset]);
135
113
  var setStepSize = (0, _react.useCallback)(function (newStepSize) {
136
114
  setState(function (prevState) {
137
115
  return _objectSpread(_objectSpread({}, prevState), {}, {
138
116
  stepSize: newStepSize
139
117
  });
140
118
  });
141
- }, []);
119
+ }, [setState]);
142
120
  var onHandleChange = function onHandleChange(handleValue, data) {
143
- var newValue = Math.round(reversed ? max - handleValue + min : handleValue);
144
- var newHandlePosition = isVertical ? data.y : data.x;
121
+ var newHandleXPosition = data.x;
122
+ var newValue = Math.round(handleValue);
145
123
  setState(function (prevState) {
146
124
  return _objectSpread(_objectSpread({}, prevState), {}, {
147
- railFillWidth: newHandlePosition
125
+ railFillWidth: newHandleXPosition
148
126
  });
149
127
  });
150
128
  if (onChange) {
@@ -162,49 +140,41 @@ var SingleSlider = exports.SingleSlider = function SingleSlider(_ref) {
162
140
  }
163
141
  setDragValue(newValue);
164
142
  };
165
- var onHandleChangeCommitted = (0, _react.useCallback)(function (handleValue, data) {
166
- var newValue = Math.round(reversed ? max - handleValue + min : handleValue);
143
+ var onHandleChangeCommitted = function onHandleChangeCommitted(handleValue, data) {
144
+ var newValue = Math.round(handleValue);
167
145
  if (onChangeCommitted) {
168
146
  onChangeCommitted(newValue);
169
147
  }
170
148
  setState(function (prevState) {
171
149
  return _objectSpread(_objectSpread({}, prevState), {}, {
172
- handlePosition: isVertical ? data.lastY : data.lastX,
173
- railFillWidth: isVertical ? data.lastY : data.lastX
150
+ xHandle: data.lastX,
151
+ railFillWidth: data.lastX
174
152
  });
175
153
  });
176
154
  setDragValue(newValue);
177
- }, [isVertical, min, max, reversed]);
178
- var labelVerticalPlacement = reversed ? 'bottom' : 'top';
179
- var valuePlacement = sliderAlign === 'right' ? 'left' : 'right';
180
- var settings = _utils.sizeData[size][pointerSize === 'large' ? 'large' : 'small'];
155
+ };
181
156
  return /*#__PURE__*/_react["default"].createElement(_Single.SingleWrapper, {
182
- className: (0, _utils2.cx)(labelPlacementClass, scaleAlignClass, verticalOrientationClass, sliderAlign === 'right' && _Slider.classes.labelAlignLeft, (sliderAlign === 'center' || sliderAlign === 'none') && _Slider.classes.labelAlignCenter, sliderAlign === 'left' && _Slider.classes.labelAlignRight, labelVerticalPlacement === 'bottom' && _Slider.classes.labelPlacementBottom, labelReversed && _Slider.classes.labelContentReversed)
183
- }, hasLabelContent && /*#__PURE__*/_react["default"].createElement(_Single.LabelWrapper, null, (labelContentLeft || labelContent) && /*#__PURE__*/_react["default"].createElement(_Single.LabelContent, null, labelContent), label && /*#__PURE__*/_react["default"].createElement(_Single.Label, null, label)), /*#__PURE__*/_react["default"].createElement(_Single.SliderBaseWrapper, {
184
- className: (0, _utils2.cx)(!isVertical && rangeValuesPlacement === 'outer' && _Slider.classes.rangeValuesPlacementOuter, !isVertical && rangeValuesPlacement !== 'outer' && _Slider.classes.rangeValuesPlacementInner, verticalOrientationClass)
185
- }, innerShowScale && /*#__PURE__*/_react["default"].createElement(_Single.StyledRangeValue, {
157
+ className: labelPlacementClass
158
+ }, hasLabelContent && /*#__PURE__*/_react["default"].createElement(_Single.LabelWrapper, null, labelContentLeft && /*#__PURE__*/_react["default"].createElement(_Single.LabelContentLeft, null, labelContentLeft), label && /*#__PURE__*/_react["default"].createElement(_Single.Label, null, label)), /*#__PURE__*/_react["default"].createElement(_Single.SliderBaseWrapper, {
159
+ className: rangeValuesPlacementClass
160
+ }, showRangeValues && /*#__PURE__*/_react["default"].createElement(_Single.StyledRangeValue, {
186
161
  ref: startLabelRef,
187
162
  className: (0, _utils2.cx)(hideMinValueDiffClass, activeFirstValue)
188
- }, reversed ? max : min), /*#__PURE__*/_react["default"].createElement(_SliderBase.SliderBase, _extends({
163
+ }, min), /*#__PURE__*/_react["default"].createElement(_SliderBase.SliderBase, _extends({
189
164
  min: min,
190
165
  max: max,
191
166
  disabled: disabled,
192
- size: size,
193
- sliderAlign: sliderAlign,
194
167
  setStepSize: setStepSize,
195
168
  onChange: onHandleChangeCommitted,
196
169
  railFillWidth: state.railFillWidth,
197
- settings: settings,
170
+ settings: _utils.sizeData[size],
198
171
  labelPlacement: labelPlacement,
199
- rangeValuesPlacement: rangeValuesPlacement,
200
- orientation: orientation
172
+ rangeValuesPlacement: rangeValuesPlacement
201
173
  }, rest), /*#__PURE__*/_react["default"].createElement(_ui.Handler, {
202
- size: pointerSize,
203
- orientation: orientation,
204
174
  stepSize: state.stepSize,
205
175
  onChangeCommitted: onHandleChangeCommitted,
206
176
  onChange: onHandleChange,
207
- position: state.handlePosition,
177
+ xPosition: state.xHandle,
208
178
  min: min,
209
179
  max: max,
210
180
  startOffset: startOffset,
@@ -213,12 +183,11 @@ var SingleSlider = exports.SingleSlider = function SingleSlider(_ref) {
213
183
  disabled: disabled,
214
184
  ariaLabel: ariaLabel,
215
185
  multipleStepSize: multipleStepSize,
216
- showCurrentValue: showCurrentValue,
217
- valuePlacement: valuePlacement
218
- })), innerShowScale && /*#__PURE__*/_react["default"].createElement(_Single.StyledRangeValue, {
186
+ showCurrentValue: showCurrentValue
187
+ })), showRangeValues && /*#__PURE__*/_react["default"].createElement(_Single.StyledRangeValue, {
219
188
  ref: endLabelRef,
220
189
  className: (0, _utils2.cx)(_Slider.classes.maxRangeValue, hideMaxValueDiffClass, activeSecondValue)
221
- }, reversed ? min : max)), /*#__PURE__*/_react["default"].createElement(_SliderBase2.InputHidden, _extends({
190
+ }, max)), /*#__PURE__*/_react["default"].createElement(_SliderBase2.InputHidden, _extends({
222
191
  name: name,
223
192
  type: "number",
224
193
  datatype: "slider-single",