@salutejs/plasma-new-hope 0.176.0-canary.1511.11570259013.0 → 0.176.0-canary.1513.11570030354.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (482) hide show
  1. package/cjs/components/Slider/Slider.css +13 -15
  2. package/cjs/components/Slider/Slider.js +2 -11
  3. package/cjs/components/Slider/Slider.js.map +1 -1
  4. package/cjs/components/Slider/Slider.tokens.js +17 -23
  5. package/cjs/components/Slider/Slider.tokens.js.map +1 -1
  6. package/cjs/components/Slider/components/Double/Double.css +8 -8
  7. package/cjs/components/Slider/components/Double/Double.js +23 -58
  8. package/cjs/components/Slider/components/Double/Double.js.map +1 -1
  9. package/cjs/components/Slider/components/Single/Single.css +14 -14
  10. package/cjs/components/Slider/components/Single/Single.js +33 -64
  11. package/cjs/components/Slider/components/Single/Single.js.map +1 -1
  12. package/cjs/components/Slider/components/Single/Single.styles.js +4 -4
  13. package/cjs/components/Slider/components/Single/Single.styles.js.map +1 -1
  14. package/cjs/components/Slider/components/Single/Single.styles_1r9f1e0.css +6 -0
  15. package/cjs/components/Slider/components/SliderBase/SliderBase.css +5 -5
  16. package/cjs/components/Slider/components/SliderBase/SliderBase.js +12 -31
  17. package/cjs/components/Slider/components/SliderBase/SliderBase.js.map +1 -1
  18. package/cjs/components/Slider/components/SliderBase/SliderBase.styles.js +7 -7
  19. package/cjs/components/Slider/components/SliderBase/SliderBase.styles.js.map +1 -1
  20. package/cjs/components/Slider/components/SliderBase/SliderBase.styles_9s4eb3.css +5 -0
  21. package/cjs/components/Slider/ui/Handler/Handler.css +3 -3
  22. package/cjs/components/Slider/ui/Handler/Handler.js +88 -49
  23. package/cjs/components/Slider/ui/Handler/Handler.js.map +1 -1
  24. package/cjs/components/Slider/ui/Handler/Handler.styles.js +7 -17
  25. package/cjs/components/Slider/ui/Handler/Handler.styles.js.map +1 -1
  26. package/cjs/components/Slider/ui/Handler/Handler.styles_8crx5z.css +2 -0
  27. package/cjs/components/Slider/ui/Thumb/Thumb.css +1 -1
  28. package/cjs/components/Slider/ui/Thumb/Thumb.js +2 -3
  29. package/cjs/components/Slider/ui/Thumb/Thumb.js.map +1 -1
  30. package/cjs/components/Slider/ui/Thumb/Thumb.styles.js +1 -1
  31. package/cjs/components/Slider/ui/Thumb/Thumb.styles.js.map +1 -1
  32. package/cjs/components/Slider/ui/Thumb/Thumb.styles_4w4gzn.css +1 -0
  33. package/cjs/components/Slider/utils/index.js +10 -28
  34. package/cjs/components/Slider/utils/index.js.map +1 -1
  35. package/cjs/components/Slider/variations/_view/base.js +1 -1
  36. package/cjs/components/Slider/variations/_view/base.js.map +1 -1
  37. package/cjs/index.css +13 -38
  38. package/cjs/index.js +0 -6
  39. package/cjs/index.js.map +1 -1
  40. package/cjs/utils/index.js.map +1 -1
  41. package/emotion/cjs/components/Slider/Slider.js +2 -10
  42. package/emotion/cjs/components/Slider/Slider.template-doc.mdx +0 -26
  43. package/emotion/cjs/components/Slider/Slider.tokens.js +17 -23
  44. package/emotion/cjs/components/Slider/components/Double/Double.js +19 -54
  45. package/emotion/cjs/components/Slider/components/Single/Single.js +33 -64
  46. package/emotion/cjs/components/Slider/components/Single/Single.styles.js +9 -18
  47. package/emotion/cjs/components/Slider/components/SliderBase/SliderBase.js +12 -31
  48. package/emotion/cjs/components/Slider/components/SliderBase/SliderBase.styles.js +10 -10
  49. package/emotion/cjs/components/Slider/ui/Handler/Handler.js +88 -52
  50. package/emotion/cjs/components/Slider/ui/Handler/Handler.styles.js +15 -9
  51. package/emotion/cjs/components/Slider/ui/Thumb/Thumb.js +2 -3
  52. package/emotion/cjs/components/Slider/ui/Thumb/Thumb.styles.js +3 -3
  53. package/emotion/cjs/components/Slider/utils/index.js +10 -28
  54. package/emotion/cjs/components/Slider/variations/_view/base.js +1 -2
  55. package/emotion/cjs/examples/plasma_b2c/components/Slider/Slider.config.js +7 -7
  56. package/emotion/cjs/examples/plasma_b2c/components/Slider/Slider.stories.tsx +16 -98
  57. package/emotion/cjs/examples/plasma_b2c/components/TextArea/TextArea.stories.tsx +9 -6
  58. package/emotion/cjs/examples/plasma_b2c/components/TextField/TextField.stories.tsx +10 -6
  59. package/emotion/cjs/examples/plasma_web/components/Slider/Slider.config.js +7 -7
  60. package/emotion/cjs/examples/plasma_web/components/Slider/Slider.stories.tsx +15 -98
  61. package/emotion/cjs/examples/plasma_web/components/TextArea/TextArea.stories.tsx +9 -6
  62. package/emotion/cjs/examples/plasma_web/components/TextField/TextField.stories.tsx +10 -6
  63. package/emotion/cjs/index.js +0 -11
  64. package/emotion/es/components/Slider/Slider.js +2 -11
  65. package/emotion/es/components/Slider/Slider.template-doc.mdx +0 -26
  66. package/emotion/es/components/Slider/Slider.tokens.js +17 -23
  67. package/emotion/es/components/Slider/components/Double/Double.js +19 -54
  68. package/emotion/es/components/Slider/components/Single/Single.js +34 -65
  69. package/emotion/es/components/Slider/components/Single/Single.styles.js +8 -17
  70. package/emotion/es/components/Slider/components/SliderBase/SliderBase.js +12 -31
  71. package/emotion/es/components/Slider/components/SliderBase/SliderBase.styles.js +11 -11
  72. package/emotion/es/components/Slider/ui/Handler/Handler.js +86 -51
  73. package/emotion/es/components/Slider/ui/Handler/Handler.styles.js +16 -10
  74. package/emotion/es/components/Slider/ui/Thumb/Thumb.js +2 -3
  75. package/emotion/es/components/Slider/ui/Thumb/Thumb.styles.js +3 -3
  76. package/emotion/es/components/Slider/utils/index.js +10 -28
  77. package/emotion/es/components/Slider/variations/_view/base.js +1 -2
  78. package/emotion/es/examples/plasma_b2c/components/Slider/Slider.config.js +7 -7
  79. package/emotion/es/examples/plasma_b2c/components/Slider/Slider.stories.tsx +16 -98
  80. package/emotion/es/examples/plasma_b2c/components/TextArea/TextArea.stories.tsx +9 -6
  81. package/emotion/es/examples/plasma_b2c/components/TextField/TextField.stories.tsx +10 -6
  82. package/emotion/es/examples/plasma_web/components/Slider/Slider.config.js +7 -7
  83. package/emotion/es/examples/plasma_web/components/Slider/Slider.stories.tsx +15 -98
  84. package/emotion/es/examples/plasma_web/components/TextArea/TextArea.stories.tsx +9 -6
  85. package/emotion/es/examples/plasma_web/components/TextField/TextField.stories.tsx +10 -6
  86. package/emotion/es/index.js +1 -2
  87. package/es/components/Slider/Slider.css +13 -15
  88. package/es/components/Slider/Slider.js +2 -11
  89. package/es/components/Slider/Slider.js.map +1 -1
  90. package/es/components/Slider/Slider.tokens.js +17 -23
  91. package/es/components/Slider/Slider.tokens.js.map +1 -1
  92. package/es/components/Slider/components/Double/Double.css +8 -8
  93. package/es/components/Slider/components/Double/Double.js +19 -54
  94. package/es/components/Slider/components/Double/Double.js.map +1 -1
  95. package/es/components/Slider/components/Single/Single.css +14 -14
  96. package/es/components/Slider/components/Single/Single.js +34 -65
  97. package/es/components/Slider/components/Single/Single.js.map +1 -1
  98. package/es/components/Slider/components/Single/Single.styles.js +4 -4
  99. package/es/components/Slider/components/Single/Single.styles.js.map +1 -1
  100. package/es/components/Slider/components/Single/Single.styles_1r9f1e0.css +6 -0
  101. package/es/components/Slider/components/SliderBase/SliderBase.css +5 -5
  102. package/es/components/Slider/components/SliderBase/SliderBase.js +12 -31
  103. package/es/components/Slider/components/SliderBase/SliderBase.js.map +1 -1
  104. package/es/components/Slider/components/SliderBase/SliderBase.styles.js +7 -7
  105. package/es/components/Slider/components/SliderBase/SliderBase.styles.js.map +1 -1
  106. package/es/components/Slider/components/SliderBase/SliderBase.styles_9s4eb3.css +5 -0
  107. package/es/components/Slider/ui/Handler/Handler.css +3 -3
  108. package/es/components/Slider/ui/Handler/Handler.js +87 -48
  109. package/es/components/Slider/ui/Handler/Handler.js.map +1 -1
  110. package/es/components/Slider/ui/Handler/Handler.styles.js +7 -17
  111. package/es/components/Slider/ui/Handler/Handler.styles.js.map +1 -1
  112. package/es/components/Slider/ui/Handler/Handler.styles_8crx5z.css +2 -0
  113. package/es/components/Slider/ui/Thumb/Thumb.css +1 -1
  114. package/es/components/Slider/ui/Thumb/Thumb.js +2 -3
  115. package/es/components/Slider/ui/Thumb/Thumb.js.map +1 -1
  116. package/es/components/Slider/ui/Thumb/Thumb.styles.js +1 -1
  117. package/es/components/Slider/ui/Thumb/Thumb.styles.js.map +1 -1
  118. package/es/components/Slider/ui/Thumb/Thumb.styles_4w4gzn.css +1 -0
  119. package/es/components/Slider/utils/index.js +10 -28
  120. package/es/components/Slider/utils/index.js.map +1 -1
  121. package/es/components/Slider/variations/_view/base.js +1 -1
  122. package/es/components/Slider/variations/_view/base.js.map +1 -1
  123. package/es/index.css +13 -38
  124. package/es/index.js +0 -2
  125. package/es/index.js.map +1 -1
  126. package/es/utils/index.js.map +1 -1
  127. package/package.json +2 -2
  128. package/styled-components/cjs/components/Slider/Slider.js +2 -10
  129. package/styled-components/cjs/components/Slider/Slider.template-doc.mdx +0 -26
  130. package/styled-components/cjs/components/Slider/Slider.tokens.js +17 -23
  131. package/styled-components/cjs/components/Slider/components/Double/Double.js +19 -54
  132. package/styled-components/cjs/components/Slider/components/Single/Single.js +33 -64
  133. package/styled-components/cjs/components/Slider/components/Single/Single.styles.js +6 -6
  134. package/styled-components/cjs/components/Slider/components/SliderBase/SliderBase.js +12 -31
  135. package/styled-components/cjs/components/Slider/components/SliderBase/SliderBase.styles.js +6 -6
  136. package/styled-components/cjs/components/Slider/ui/Handler/Handler.js +88 -52
  137. package/styled-components/cjs/components/Slider/ui/Handler/Handler.styles.js +4 -7
  138. package/styled-components/cjs/components/Slider/ui/Thumb/Thumb.js +2 -3
  139. package/styled-components/cjs/components/Slider/ui/Thumb/Thumb.styles.js +2 -2
  140. package/styled-components/cjs/components/Slider/utils/index.js +10 -28
  141. package/styled-components/cjs/components/Slider/variations/_view/base.js +1 -2
  142. package/styled-components/cjs/examples/plasma_b2c/components/Slider/Slider.config.js +3 -3
  143. package/styled-components/cjs/examples/plasma_b2c/components/Slider/Slider.stories.tsx +16 -98
  144. package/styled-components/cjs/examples/plasma_b2c/components/TextArea/TextArea.stories.tsx +9 -6
  145. package/styled-components/cjs/examples/plasma_b2c/components/TextField/TextField.stories.tsx +10 -6
  146. package/styled-components/cjs/examples/plasma_web/components/Slider/Slider.config.js +3 -3
  147. package/styled-components/cjs/examples/plasma_web/components/Slider/Slider.stories.tsx +15 -98
  148. package/styled-components/cjs/examples/plasma_web/components/TextArea/TextArea.stories.tsx +9 -6
  149. package/styled-components/cjs/examples/plasma_web/components/TextField/TextField.stories.tsx +10 -6
  150. package/styled-components/cjs/index.js +0 -11
  151. package/styled-components/es/components/Slider/Slider.js +2 -11
  152. package/styled-components/es/components/Slider/Slider.template-doc.mdx +0 -26
  153. package/styled-components/es/components/Slider/Slider.tokens.js +17 -23
  154. package/styled-components/es/components/Slider/components/Double/Double.js +19 -54
  155. package/styled-components/es/components/Slider/components/Single/Single.js +34 -65
  156. package/styled-components/es/components/Slider/components/Single/Single.styles.js +5 -5
  157. package/styled-components/es/components/Slider/components/SliderBase/SliderBase.js +12 -31
  158. package/styled-components/es/components/Slider/components/SliderBase/SliderBase.styles.js +7 -7
  159. package/styled-components/es/components/Slider/ui/Handler/Handler.js +86 -51
  160. package/styled-components/es/components/Slider/ui/Handler/Handler.styles.js +5 -8
  161. package/styled-components/es/components/Slider/ui/Thumb/Thumb.js +2 -3
  162. package/styled-components/es/components/Slider/ui/Thumb/Thumb.styles.js +2 -2
  163. package/styled-components/es/components/Slider/utils/index.js +10 -28
  164. package/styled-components/es/components/Slider/variations/_view/base.js +1 -2
  165. package/styled-components/es/examples/plasma_b2c/components/Slider/Slider.config.js +3 -3
  166. package/styled-components/es/examples/plasma_b2c/components/Slider/Slider.stories.tsx +16 -98
  167. package/styled-components/es/examples/plasma_b2c/components/TextArea/TextArea.stories.tsx +9 -6
  168. package/styled-components/es/examples/plasma_b2c/components/TextField/TextField.stories.tsx +10 -6
  169. package/styled-components/es/examples/plasma_web/components/Slider/Slider.config.js +3 -3
  170. package/styled-components/es/examples/plasma_web/components/Slider/Slider.stories.tsx +15 -98
  171. package/styled-components/es/examples/plasma_web/components/TextArea/TextArea.stories.tsx +9 -6
  172. package/styled-components/es/examples/plasma_web/components/TextField/TextField.stories.tsx +10 -6
  173. package/styled-components/es/index.js +1 -2
  174. package/types/components/Slider/Slider.d.ts.map +1 -1
  175. package/types/components/Slider/Slider.tokens.d.ts +16 -22
  176. package/types/components/Slider/Slider.tokens.d.ts.map +1 -1
  177. package/types/components/Slider/components/Double/Double.d.ts.map +1 -1
  178. package/types/components/Slider/components/Double/Double.types.d.ts +0 -1
  179. package/types/components/Slider/components/Double/Double.types.d.ts.map +1 -1
  180. package/types/components/Slider/components/Single/Single.d.ts.map +1 -1
  181. package/types/components/Slider/components/Single/Single.styles.d.ts +1 -1
  182. package/types/components/Slider/components/Single/Single.styles.d.ts.map +1 -1
  183. package/types/components/Slider/components/Single/Single.types.d.ts +7 -79
  184. package/types/components/Slider/components/Single/Single.types.d.ts.map +1 -1
  185. package/types/components/Slider/components/SliderBase/SliderBase.d.ts.map +1 -1
  186. package/types/components/Slider/components/SliderBase/SliderBase.styles.d.ts +1 -1
  187. package/types/components/Slider/components/SliderBase/SliderBase.styles.d.ts.map +1 -1
  188. package/types/components/Slider/components/SliderBase/SliderBase.types.d.ts +0 -6
  189. package/types/components/Slider/components/SliderBase/SliderBase.types.d.ts.map +1 -1
  190. package/types/components/Slider/ui/Handler/Handler.d.ts.map +1 -1
  191. package/types/components/Slider/ui/Handler/Handler.styles.d.ts +2 -6
  192. package/types/components/Slider/ui/Handler/Handler.styles.d.ts.map +1 -1
  193. package/types/components/Slider/ui/Handler/Handler.types.d.ts +1 -5
  194. package/types/components/Slider/ui/Handler/Handler.types.d.ts.map +1 -1
  195. package/types/components/Slider/ui/Thumb/Thumb.d.ts +1 -1
  196. package/types/components/Slider/ui/Thumb/Thumb.d.ts.map +1 -1
  197. package/types/components/Slider/ui/Thumb/Thumb.styles.d.ts.map +1 -1
  198. package/types/components/Slider/ui/Thumb/Thumb.types.d.ts +0 -1
  199. package/types/components/Slider/ui/Thumb/Thumb.types.d.ts.map +1 -1
  200. package/types/components/Slider/utils/index.d.ts +8 -26
  201. package/types/components/Slider/utils/index.d.ts.map +1 -1
  202. package/types/components/Slider/variations/_view/base.d.ts.map +1 -1
  203. package/types/examples/plasma_b2c/components/Slider/Slider.config.d.ts.map +1 -1
  204. package/types/examples/plasma_b2c/components/Slider/Slider.d.ts +2 -80
  205. package/types/examples/plasma_b2c/components/Slider/Slider.d.ts.map +1 -1
  206. package/types/examples/plasma_web/components/Slider/Slider.config.d.ts.map +1 -1
  207. package/types/examples/plasma_web/components/Slider/Slider.d.ts +2 -80
  208. package/types/examples/plasma_web/components/Slider/Slider.d.ts.map +1 -1
  209. package/types/index.d.ts +0 -1
  210. package/types/index.d.ts.map +1 -1
  211. package/types/utils/index.d.ts +1 -1
  212. package/types/utils/index.d.ts.map +1 -1
  213. package/cjs/components/NumberInput/NumberInput.css +0 -52
  214. package/cjs/components/NumberInput/NumberInput.js +0 -183
  215. package/cjs/components/NumberInput/NumberInput.js.map +0 -1
  216. package/cjs/components/NumberInput/NumberInput.styles.js +0 -9
  217. package/cjs/components/NumberInput/NumberInput.styles.js.map +0 -1
  218. package/cjs/components/NumberInput/NumberInput.styles_jeawjl.css +0 -1
  219. package/cjs/components/NumberInput/NumberInput.tokens.js +0 -93
  220. package/cjs/components/NumberInput/NumberInput.tokens.js.map +0 -1
  221. package/cjs/components/NumberInput/ui/ActionButton/ActionButton.js +0 -19
  222. package/cjs/components/NumberInput/ui/ActionButton/ActionButton.js.map +0 -1
  223. package/cjs/components/NumberInput/ui/ActionButton/ActionButton.styles.js +0 -22
  224. package/cjs/components/NumberInput/ui/ActionButton/ActionButton.styles.js.map +0 -1
  225. package/cjs/components/NumberInput/ui/Input/Input.css +0 -15
  226. package/cjs/components/NumberInput/ui/Input/Input.js +0 -199
  227. package/cjs/components/NumberInput/ui/Input/Input.js.map +0 -1
  228. package/cjs/components/NumberInput/ui/Input/Input.styles.js +0 -96
  229. package/cjs/components/NumberInput/ui/Input/Input.styles.js.map +0 -1
  230. package/cjs/components/NumberInput/ui/Input/Input.styles_fhgb95.css +0 -8
  231. package/cjs/components/NumberInput/utils/index.js +0 -8
  232. package/cjs/components/NumberInput/utils/index.js.map +0 -1
  233. package/cjs/components/NumberInput/variations/_background-type/base.js +0 -9
  234. package/cjs/components/NumberInput/variations/_background-type/base.js.map +0 -1
  235. package/cjs/components/NumberInput/variations/_background-type/base_dx9knv.css +0 -1
  236. package/cjs/components/NumberInput/variations/_disabled/base.js +0 -9
  237. package/cjs/components/NumberInput/variations/_disabled/base.js.map +0 -1
  238. package/cjs/components/NumberInput/variations/_disabled/base_1sl0mh8.css +0 -1
  239. package/cjs/components/NumberInput/variations/_segmentation/base.js +0 -9
  240. package/cjs/components/NumberInput/variations/_segmentation/base.js.map +0 -1
  241. package/cjs/components/NumberInput/variations/_segmentation/base_3r9a58.css +0 -1
  242. package/cjs/components/NumberInput/variations/_shape/base.js +0 -9
  243. package/cjs/components/NumberInput/variations/_shape/base.js.map +0 -1
  244. package/cjs/components/NumberInput/variations/_shape/base_k05biw.css +0 -1
  245. package/cjs/components/NumberInput/variations/_size/base.js +0 -9
  246. package/cjs/components/NumberInput/variations/_size/base.js.map +0 -1
  247. package/cjs/components/NumberInput/variations/_size/base_yqdmk4.css +0 -1
  248. package/cjs/components/NumberInput/variations/_view/base.js +0 -9
  249. package/cjs/components/NumberInput/variations/_view/base.js.map +0 -1
  250. package/cjs/components/NumberInput/variations/_view/base_3gefjm.css +0 -1
  251. package/cjs/components/Slider/components/DoubleUncontrolled/DoubleUncontrolled.css +0 -98
  252. package/cjs/components/Slider/components/Single/Single.styles_1h7n2s2.css +0 -6
  253. package/cjs/components/Slider/components/SliderBase/SliderBase.styles_1qt1224.css +0 -5
  254. package/cjs/components/Slider/ui/Handler/Handler.styles_irtcgm.css +0 -2
  255. package/cjs/components/Slider/ui/Handler/computeKeyPressData.js +0 -122
  256. package/cjs/components/Slider/ui/Handler/computeKeyPressData.js.map +0 -1
  257. package/cjs/components/Slider/ui/Thumb/Thumb.styles_uyn20e.css +0 -1
  258. package/cjs/components/Slider/variations/_view/base_1s3f6q8.css +0 -1
  259. package/emotion/cjs/components/NumberInput/NumberInput.js +0 -193
  260. package/emotion/cjs/components/NumberInput/NumberInput.styles.js +0 -17
  261. package/emotion/cjs/components/NumberInput/NumberInput.tokens.js +0 -90
  262. package/emotion/cjs/components/NumberInput/NumberInput.types.js +0 -5
  263. package/emotion/cjs/components/NumberInput/index.js +0 -31
  264. package/emotion/cjs/components/NumberInput/ui/ActionButton/ActionButton.js +0 -18
  265. package/emotion/cjs/components/NumberInput/ui/ActionButton/ActionButton.styles.js +0 -16
  266. package/emotion/cjs/components/NumberInput/ui/ActionButton/ActionButton.types.js +0 -5
  267. package/emotion/cjs/components/NumberInput/ui/Input/Input.js +0 -207
  268. package/emotion/cjs/components/NumberInput/ui/Input/Input.styles.js +0 -81
  269. package/emotion/cjs/components/NumberInput/ui/Input/Input.types.js +0 -5
  270. package/emotion/cjs/components/NumberInput/ui/index.js +0 -19
  271. package/emotion/cjs/components/NumberInput/utils/index.js +0 -7
  272. package/emotion/cjs/components/NumberInput/variations/_background-type/base.js +0 -10
  273. package/emotion/cjs/components/NumberInput/variations/_background-type/tokens.json +0 -6
  274. package/emotion/cjs/components/NumberInput/variations/_disabled/base.js +0 -9
  275. package/emotion/cjs/components/NumberInput/variations/_disabled/tokens.json +0 -4
  276. package/emotion/cjs/components/NumberInput/variations/_segmentation/base.js +0 -12
  277. package/emotion/cjs/components/NumberInput/variations/_segmentation/tokens.json +0 -1
  278. package/emotion/cjs/components/NumberInput/variations/_shape/base.js +0 -11
  279. package/emotion/cjs/components/NumberInput/variations/_shape/tokens.json +0 -1
  280. package/emotion/cjs/components/NumberInput/variations/_size/base.js +0 -13
  281. package/emotion/cjs/components/NumberInput/variations/_size/tokens.json +0 -22
  282. package/emotion/cjs/components/NumberInput/variations/_view/base.js +0 -13
  283. package/emotion/cjs/components/NumberInput/variations/_view/tokens.json +0 -14
  284. package/emotion/cjs/components/Slider/ui/Handler/computeKeyPressData.js +0 -121
  285. package/emotion/cjs/examples/plasma_b2c/components/NumberInput/NumberInput.config.js +0 -46
  286. package/emotion/cjs/examples/plasma_b2c/components/NumberInput/NumberInput.js +0 -11
  287. package/emotion/cjs/examples/plasma_b2c/components/NumberInput/NumberInput.stories.tsx +0 -108
  288. package/emotion/cjs/examples/plasma_web/components/NumberInput/NumberInput.config.js +0 -46
  289. package/emotion/cjs/examples/plasma_web/components/NumberInput/NumberInput.js +0 -11
  290. package/emotion/cjs/examples/plasma_web/components/NumberInput/NumberInput.stories.tsx +0 -108
  291. package/emotion/es/components/NumberInput/NumberInput.js +0 -185
  292. package/emotion/es/components/NumberInput/NumberInput.styles.js +0 -11
  293. package/emotion/es/components/NumberInput/NumberInput.tokens.js +0 -84
  294. package/emotion/es/components/NumberInput/NumberInput.types.js +0 -1
  295. package/emotion/es/components/NumberInput/index.js +0 -2
  296. package/emotion/es/components/NumberInput/ui/ActionButton/ActionButton.js +0 -11
  297. package/emotion/es/components/NumberInput/ui/ActionButton/ActionButton.styles.js +0 -9
  298. package/emotion/es/components/NumberInput/ui/ActionButton/ActionButton.types.js +0 -1
  299. package/emotion/es/components/NumberInput/ui/Input/Input.js +0 -198
  300. package/emotion/es/components/NumberInput/ui/Input/Input.styles.js +0 -74
  301. package/emotion/es/components/NumberInput/ui/Input/Input.types.js +0 -1
  302. package/emotion/es/components/NumberInput/ui/index.js +0 -2
  303. package/emotion/es/components/NumberInput/utils/index.js +0 -1
  304. package/emotion/es/components/NumberInput/variations/_background-type/base.js +0 -4
  305. package/emotion/es/components/NumberInput/variations/_background-type/tokens.json +0 -6
  306. package/emotion/es/components/NumberInput/variations/_disabled/base.js +0 -3
  307. package/emotion/es/components/NumberInput/variations/_disabled/tokens.json +0 -4
  308. package/emotion/es/components/NumberInput/variations/_segmentation/base.js +0 -6
  309. package/emotion/es/components/NumberInput/variations/_segmentation/tokens.json +0 -1
  310. package/emotion/es/components/NumberInput/variations/_shape/base.js +0 -5
  311. package/emotion/es/components/NumberInput/variations/_shape/tokens.json +0 -1
  312. package/emotion/es/components/NumberInput/variations/_size/base.js +0 -7
  313. package/emotion/es/components/NumberInput/variations/_size/tokens.json +0 -22
  314. package/emotion/es/components/NumberInput/variations/_view/base.js +0 -7
  315. package/emotion/es/components/NumberInput/variations/_view/tokens.json +0 -14
  316. package/emotion/es/components/Slider/ui/Handler/computeKeyPressData.js +0 -115
  317. package/emotion/es/examples/plasma_b2c/components/NumberInput/NumberInput.config.js +0 -40
  318. package/emotion/es/examples/plasma_b2c/components/NumberInput/NumberInput.js +0 -5
  319. package/emotion/es/examples/plasma_b2c/components/NumberInput/NumberInput.stories.tsx +0 -108
  320. package/emotion/es/examples/plasma_web/components/NumberInput/NumberInput.config.js +0 -40
  321. package/emotion/es/examples/plasma_web/components/NumberInput/NumberInput.js +0 -5
  322. package/emotion/es/examples/plasma_web/components/NumberInput/NumberInput.stories.tsx +0 -108
  323. package/es/components/NumberInput/NumberInput.css +0 -52
  324. package/es/components/NumberInput/NumberInput.js +0 -178
  325. package/es/components/NumberInput/NumberInput.js.map +0 -1
  326. package/es/components/NumberInput/NumberInput.styles.js +0 -5
  327. package/es/components/NumberInput/NumberInput.styles.js.map +0 -1
  328. package/es/components/NumberInput/NumberInput.styles_jeawjl.css +0 -1
  329. package/es/components/NumberInput/NumberInput.tokens.js +0 -87
  330. package/es/components/NumberInput/NumberInput.tokens.js.map +0 -1
  331. package/es/components/NumberInput/ui/ActionButton/ActionButton.js +0 -15
  332. package/es/components/NumberInput/ui/ActionButton/ActionButton.js.map +0 -1
  333. package/es/components/NumberInput/ui/ActionButton/ActionButton.styles.js +0 -18
  334. package/es/components/NumberInput/ui/ActionButton/ActionButton.styles.js.map +0 -1
  335. package/es/components/NumberInput/ui/Input/Input.css +0 -15
  336. package/es/components/NumberInput/ui/Input/Input.js +0 -195
  337. package/es/components/NumberInput/ui/Input/Input.js.map +0 -1
  338. package/es/components/NumberInput/ui/Input/Input.styles.js +0 -85
  339. package/es/components/NumberInput/ui/Input/Input.styles.js.map +0 -1
  340. package/es/components/NumberInput/ui/Input/Input.styles_fhgb95.css +0 -8
  341. package/es/components/NumberInput/utils/index.js +0 -4
  342. package/es/components/NumberInput/utils/index.js.map +0 -1
  343. package/es/components/NumberInput/variations/_background-type/base.js +0 -5
  344. package/es/components/NumberInput/variations/_background-type/base.js.map +0 -1
  345. package/es/components/NumberInput/variations/_background-type/base_dx9knv.css +0 -1
  346. package/es/components/NumberInput/variations/_disabled/base.js +0 -5
  347. package/es/components/NumberInput/variations/_disabled/base.js.map +0 -1
  348. package/es/components/NumberInput/variations/_disabled/base_1sl0mh8.css +0 -1
  349. package/es/components/NumberInput/variations/_segmentation/base.js +0 -5
  350. package/es/components/NumberInput/variations/_segmentation/base.js.map +0 -1
  351. package/es/components/NumberInput/variations/_segmentation/base_3r9a58.css +0 -1
  352. package/es/components/NumberInput/variations/_shape/base.js +0 -5
  353. package/es/components/NumberInput/variations/_shape/base.js.map +0 -1
  354. package/es/components/NumberInput/variations/_shape/base_k05biw.css +0 -1
  355. package/es/components/NumberInput/variations/_size/base.js +0 -5
  356. package/es/components/NumberInput/variations/_size/base.js.map +0 -1
  357. package/es/components/NumberInput/variations/_size/base_yqdmk4.css +0 -1
  358. package/es/components/NumberInput/variations/_view/base.js +0 -5
  359. package/es/components/NumberInput/variations/_view/base.js.map +0 -1
  360. package/es/components/NumberInput/variations/_view/base_3gefjm.css +0 -1
  361. package/es/components/Slider/components/DoubleUncontrolled/DoubleUncontrolled.css +0 -98
  362. package/es/components/Slider/components/Single/Single.styles_1h7n2s2.css +0 -6
  363. package/es/components/Slider/components/SliderBase/SliderBase.styles_1qt1224.css +0 -5
  364. package/es/components/Slider/ui/Handler/Handler.styles_irtcgm.css +0 -2
  365. package/es/components/Slider/ui/Handler/computeKeyPressData.js +0 -118
  366. package/es/components/Slider/ui/Handler/computeKeyPressData.js.map +0 -1
  367. package/es/components/Slider/ui/Thumb/Thumb.styles_uyn20e.css +0 -1
  368. package/es/components/Slider/variations/_view/base_1s3f6q8.css +0 -1
  369. package/styled-components/cjs/components/NumberInput/NumberInput.js +0 -193
  370. package/styled-components/cjs/components/NumberInput/NumberInput.styles.js +0 -8
  371. package/styled-components/cjs/components/NumberInput/NumberInput.tokens.js +0 -90
  372. package/styled-components/cjs/components/NumberInput/NumberInput.types.js +0 -5
  373. package/styled-components/cjs/components/NumberInput/index.js +0 -31
  374. package/styled-components/cjs/components/NumberInput/ui/ActionButton/ActionButton.js +0 -18
  375. package/styled-components/cjs/components/NumberInput/ui/ActionButton/ActionButton.styles.js +0 -15
  376. package/styled-components/cjs/components/NumberInput/ui/ActionButton/ActionButton.types.js +0 -5
  377. package/styled-components/cjs/components/NumberInput/ui/Input/Input.js +0 -207
  378. package/styled-components/cjs/components/NumberInput/ui/Input/Input.styles.js +0 -48
  379. package/styled-components/cjs/components/NumberInput/ui/Input/Input.types.js +0 -5
  380. package/styled-components/cjs/components/NumberInput/ui/index.js +0 -19
  381. package/styled-components/cjs/components/NumberInput/utils/index.js +0 -7
  382. package/styled-components/cjs/components/NumberInput/variations/_background-type/base.js +0 -10
  383. package/styled-components/cjs/components/NumberInput/variations/_background-type/tokens.json +0 -6
  384. package/styled-components/cjs/components/NumberInput/variations/_disabled/base.js +0 -9
  385. package/styled-components/cjs/components/NumberInput/variations/_disabled/tokens.json +0 -4
  386. package/styled-components/cjs/components/NumberInput/variations/_segmentation/base.js +0 -12
  387. package/styled-components/cjs/components/NumberInput/variations/_segmentation/tokens.json +0 -1
  388. package/styled-components/cjs/components/NumberInput/variations/_shape/base.js +0 -11
  389. package/styled-components/cjs/components/NumberInput/variations/_shape/tokens.json +0 -1
  390. package/styled-components/cjs/components/NumberInput/variations/_size/base.js +0 -13
  391. package/styled-components/cjs/components/NumberInput/variations/_size/tokens.json +0 -22
  392. package/styled-components/cjs/components/NumberInput/variations/_view/base.js +0 -13
  393. package/styled-components/cjs/components/NumberInput/variations/_view/tokens.json +0 -14
  394. package/styled-components/cjs/components/Slider/ui/Handler/computeKeyPressData.js +0 -121
  395. package/styled-components/cjs/examples/plasma_b2c/components/NumberInput/NumberInput.config.js +0 -46
  396. package/styled-components/cjs/examples/plasma_b2c/components/NumberInput/NumberInput.js +0 -11
  397. package/styled-components/cjs/examples/plasma_b2c/components/NumberInput/NumberInput.stories.tsx +0 -108
  398. package/styled-components/cjs/examples/plasma_web/components/NumberInput/NumberInput.config.js +0 -46
  399. package/styled-components/cjs/examples/plasma_web/components/NumberInput/NumberInput.js +0 -11
  400. package/styled-components/cjs/examples/plasma_web/components/NumberInput/NumberInput.stories.tsx +0 -108
  401. package/styled-components/es/components/NumberInput/NumberInput.js +0 -185
  402. package/styled-components/es/components/NumberInput/NumberInput.styles.js +0 -2
  403. package/styled-components/es/components/NumberInput/NumberInput.tokens.js +0 -84
  404. package/styled-components/es/components/NumberInput/NumberInput.types.js +0 -1
  405. package/styled-components/es/components/NumberInput/index.js +0 -2
  406. package/styled-components/es/components/NumberInput/ui/ActionButton/ActionButton.js +0 -11
  407. package/styled-components/es/components/NumberInput/ui/ActionButton/ActionButton.styles.js +0 -8
  408. package/styled-components/es/components/NumberInput/ui/ActionButton/ActionButton.types.js +0 -1
  409. package/styled-components/es/components/NumberInput/ui/Input/Input.js +0 -198
  410. package/styled-components/es/components/NumberInput/ui/Input/Input.styles.js +0 -41
  411. package/styled-components/es/components/NumberInput/ui/Input/Input.types.js +0 -1
  412. package/styled-components/es/components/NumberInput/ui/index.js +0 -2
  413. package/styled-components/es/components/NumberInput/utils/index.js +0 -1
  414. package/styled-components/es/components/NumberInput/variations/_background-type/base.js +0 -4
  415. package/styled-components/es/components/NumberInput/variations/_background-type/tokens.json +0 -6
  416. package/styled-components/es/components/NumberInput/variations/_disabled/base.js +0 -3
  417. package/styled-components/es/components/NumberInput/variations/_disabled/tokens.json +0 -4
  418. package/styled-components/es/components/NumberInput/variations/_segmentation/base.js +0 -6
  419. package/styled-components/es/components/NumberInput/variations/_segmentation/tokens.json +0 -1
  420. package/styled-components/es/components/NumberInput/variations/_shape/base.js +0 -5
  421. package/styled-components/es/components/NumberInput/variations/_shape/tokens.json +0 -1
  422. package/styled-components/es/components/NumberInput/variations/_size/base.js +0 -7
  423. package/styled-components/es/components/NumberInput/variations/_size/tokens.json +0 -22
  424. package/styled-components/es/components/NumberInput/variations/_view/base.js +0 -7
  425. package/styled-components/es/components/NumberInput/variations/_view/tokens.json +0 -14
  426. package/styled-components/es/components/Slider/ui/Handler/computeKeyPressData.js +0 -115
  427. package/styled-components/es/examples/plasma_b2c/components/NumberInput/NumberInput.config.js +0 -40
  428. package/styled-components/es/examples/plasma_b2c/components/NumberInput/NumberInput.js +0 -5
  429. package/styled-components/es/examples/plasma_b2c/components/NumberInput/NumberInput.stories.tsx +0 -108
  430. package/styled-components/es/examples/plasma_web/components/NumberInput/NumberInput.config.js +0 -40
  431. package/styled-components/es/examples/plasma_web/components/NumberInput/NumberInput.js +0 -5
  432. package/styled-components/es/examples/plasma_web/components/NumberInput/NumberInput.stories.tsx +0 -108
  433. package/types/components/NumberInput/NumberInput.d.ts +0 -38
  434. package/types/components/NumberInput/NumberInput.d.ts.map +0 -1
  435. package/types/components/NumberInput/NumberInput.styles.d.ts +0 -2
  436. package/types/components/NumberInput/NumberInput.styles.d.ts.map +0 -1
  437. package/types/components/NumberInput/NumberInput.tokens.d.ts +0 -79
  438. package/types/components/NumberInput/NumberInput.tokens.d.ts.map +0 -1
  439. package/types/components/NumberInput/NumberInput.types.d.ts +0 -112
  440. package/types/components/NumberInput/NumberInput.types.d.ts.map +0 -1
  441. package/types/components/NumberInput/index.d.ts +0 -3
  442. package/types/components/NumberInput/index.d.ts.map +0 -1
  443. package/types/components/NumberInput/ui/ActionButton/ActionButton.d.ts +0 -4
  444. package/types/components/NumberInput/ui/ActionButton/ActionButton.d.ts.map +0 -1
  445. package/types/components/NumberInput/ui/ActionButton/ActionButton.styles.d.ts +0 -45
  446. package/types/components/NumberInput/ui/ActionButton/ActionButton.styles.d.ts.map +0 -1
  447. package/types/components/NumberInput/ui/ActionButton/ActionButton.types.d.ts +0 -7
  448. package/types/components/NumberInput/ui/ActionButton/ActionButton.types.d.ts.map +0 -1
  449. package/types/components/NumberInput/ui/Input/Input.d.ts +0 -16
  450. package/types/components/NumberInput/ui/Input/Input.d.ts.map +0 -1
  451. package/types/components/NumberInput/ui/Input/Input.styles.d.ts +0 -30
  452. package/types/components/NumberInput/ui/Input/Input.styles.d.ts.map +0 -1
  453. package/types/components/NumberInput/ui/Input/Input.types.d.ts +0 -16
  454. package/types/components/NumberInput/ui/Input/Input.types.d.ts.map +0 -1
  455. package/types/components/NumberInput/ui/index.d.ts +0 -3
  456. package/types/components/NumberInput/ui/index.d.ts.map +0 -1
  457. package/types/components/NumberInput/utils/index.d.ts +0 -2
  458. package/types/components/NumberInput/utils/index.d.ts.map +0 -1
  459. package/types/components/NumberInput/variations/_background-type/base.d.ts +0 -2
  460. package/types/components/NumberInput/variations/_background-type/base.d.ts.map +0 -1
  461. package/types/components/NumberInput/variations/_disabled/base.d.ts +0 -2
  462. package/types/components/NumberInput/variations/_disabled/base.d.ts.map +0 -1
  463. package/types/components/NumberInput/variations/_segmentation/base.d.ts +0 -2
  464. package/types/components/NumberInput/variations/_segmentation/base.d.ts.map +0 -1
  465. package/types/components/NumberInput/variations/_shape/base.d.ts +0 -2
  466. package/types/components/NumberInput/variations/_shape/base.d.ts.map +0 -1
  467. package/types/components/NumberInput/variations/_size/base.d.ts +0 -2
  468. package/types/components/NumberInput/variations/_size/base.d.ts.map +0 -1
  469. package/types/components/NumberInput/variations/_view/base.d.ts +0 -2
  470. package/types/components/NumberInput/variations/_view/base.d.ts.map +0 -1
  471. package/types/components/Slider/ui/Handler/computeKeyPressData.d.ts +0 -12
  472. package/types/components/Slider/ui/Handler/computeKeyPressData.d.ts.map +0 -1
  473. package/types/examples/plasma_b2c/components/NumberInput/NumberInput.config.d.ts +0 -39
  474. package/types/examples/plasma_b2c/components/NumberInput/NumberInput.config.d.ts.map +0 -1
  475. package/types/examples/plasma_b2c/components/NumberInput/NumberInput.d.ts +0 -82
  476. package/types/examples/plasma_b2c/components/NumberInput/NumberInput.d.ts.map +0 -1
  477. package/types/examples/plasma_web/components/NumberInput/NumberInput.config.d.ts +0 -39
  478. package/types/examples/plasma_web/components/NumberInput/NumberInput.config.d.ts.map +0 -1
  479. package/types/examples/plasma_web/components/NumberInput/NumberInput.d.ts +0 -82
  480. package/types/examples/plasma_web/components/NumberInput/NumberInput.d.ts.map +0 -1
  481. /package/cjs/components/{NumberInput/ui/ActionButton/ActionButton.styles_x642ct.css → Slider/variations/_view/base_x642ct.css} +0 -0
  482. /package/es/components/{NumberInput/ui/ActionButton/ActionButton.styles_x642ct.css → Slider/variations/_view/base_x642ct.css} +0 -0
@@ -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",
@@ -3,25 +3,25 @@
3
3
  Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
- exports.StyledRangeValue = exports.SliderBaseWrapper = exports.SingleWrapper = exports.LabelWrapper = exports.LabelContent = exports.Label = void 0;
6
+ exports.StyledRangeValue = exports.SliderBaseWrapper = exports.SingleWrapper = exports.LabelWrapper = exports.LabelContentLeft = exports.Label = void 0;
7
7
  var _styledComponents = /*#__PURE__*/_interopRequireDefault( /*#__PURE__*/require("styled-components"));
8
8
  var _Slider = /*#__PURE__*/require("../../Slider.tokens");
9
9
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
10
10
  var LabelWrapper = exports.LabelWrapper = /*#__PURE__*/_styledComponents["default"].div.withConfig({
11
11
  componentId: "plasma-new-hope__sc-1qm4elt-0"
12
12
  })(["color:var(", ");display:flex;gap:var(", ");"], _Slider.tokens.labelColor, _Slider.tokens.labelWrapperGap);
13
- var LabelContent = exports.LabelContent = /*#__PURE__*/_styledComponents["default"].div.withConfig({
13
+ var LabelContentLeft = exports.LabelContentLeft = /*#__PURE__*/_styledComponents["default"].div.withConfig({
14
14
  componentId: "plasma-new-hope__sc-1qm4elt-1"
15
- })(["display:inline-flex;"]);
15
+ })([""]);
16
16
  var Label = exports.Label = /*#__PURE__*/_styledComponents["default"].label.withConfig({
17
17
  componentId: "plasma-new-hope__sc-1qm4elt-2"
18
18
  })(["font-family:var(", ");font-size:var(", ");font-style:var(", ");font-weight:var(", ");letter-spacing:var(", ");line-height:var(", ");"], _Slider.tokens.labelFontFamily, _Slider.tokens.labelFontSize, _Slider.tokens.labelFontStyle, _Slider.tokens.labelFontWeight, _Slider.tokens.labelLetterSpacing, _Slider.tokens.labelLineHeight);
19
19
  var StyledRangeValue = exports.StyledRangeValue = /*#__PURE__*/_styledComponents["default"].span.withConfig({
20
20
  componentId: "plasma-new-hope__sc-1qm4elt-3"
21
- })(["color:var(", ");font-family:var(", ");font-size:var(", ");font-style:var(", ");font-weight:var(", ");letter-spacing:var(", ");line-height:var(", ");transition:opacity 0.1s ease-in-out;&.", ",&.", "{opacity:0;}&.", "{color:var(", ");}"], _Slider.tokens.rangeValueColor, _Slider.tokens.valueFontFamily, _Slider.tokens.valueFontSize, _Slider.tokens.valueFontStyle, _Slider.tokens.valueFontWeight, _Slider.tokens.valueLetterSpacing, _Slider.tokens.valueLineHeight, _Slider.classes.hideMinValue, _Slider.classes.hideMaxValue, _Slider.classes.activeRangeValue, _Slider.tokens.labelColor);
21
+ })(["color:var(", ");font-family:var(", ");font-size:var(", ");font-style:var(", ");font-weight:var(", ");letter-spacing:var(", ");line-height:var(", ");transition:opacity 0.1s ease-in-out;&.", ",&.", "{opacity:0;}&.", "{color:var(", ");}"], _Slider.tokens.rangeValueColor, _Slider.tokens.rangeValueFontFamily, _Slider.tokens.rangeValueFontSize, _Slider.tokens.rangeValueFontStyle, _Slider.tokens.rangeValueFontWeight, _Slider.tokens.rangeValueLetterSpacing, _Slider.tokens.rangeValueLineHeight, _Slider.classes.hideMinValue, _Slider.classes.hideMaxValue, _Slider.classes.activeRangeValue, _Slider.tokens.labelColor);
22
22
  var SliderBaseWrapper = exports.SliderBaseWrapper = /*#__PURE__*/_styledComponents["default"].div.withConfig({
23
23
  componentId: "plasma-new-hope__sc-1qm4elt-4"
24
- })(["position:relative;display:flex;flex:1;&.", "{", "{position:absolute;bottom:calc(var(", ") * -1.5 - var(", "));left:0;&.", "{left:unset;right:0;}}}&.", "{align-items:center;", "{margin-right:var(", ");&.", "{margin-right:0;margin-left:var(", ");}}}"], _Slider.classes.rangeValuesPlacementOuter, StyledRangeValue, _Slider.tokens.railThickness, _Slider.tokens.rangeValueBottomOffset, _Slider.classes.maxRangeValue, _Slider.classes.rangeValuesPlacementInner, StyledRangeValue, _Slider.tokens.rangeValueHorizontalMargin, _Slider.classes.maxRangeValue, _Slider.tokens.rangeValueHorizontalMargin);
24
+ })(["position:relative;display:flex;flex:1;&.", "{", "{position:absolute;bottom:var(", ");left:0;&.", "{left:unset;right:0;}}}&.", "{align-items:center;", "{margin-right:var(", ");&.", "{margin-right:0;margin-left:var(", ");}}}"], _Slider.classes.rangeValuesPlacementOuter, StyledRangeValue, _Slider.tokens.rangeValueBottomOffset, _Slider.classes.maxRangeValue, _Slider.classes.rangeValuesPlacementInner, StyledRangeValue, _Slider.tokens.rangeMinValueMargin, _Slider.classes.maxRangeValue, _Slider.tokens.rangeMaxValueMargin);
25
25
  var SingleWrapper = exports.SingleWrapper = /*#__PURE__*/_styledComponents["default"].div.withConfig({
26
26
  componentId: "plasma-new-hope__sc-1qm4elt-5"
27
- })(["display:flex;opacity:var(", ");&.", "{flex-direction:column;", "{margin-bottom:var(", ");}}&.", "{", "{margin-right:var(", ");}}&.", "{flex-direction:column;align-items:center;&.", "{", "{flex-direction:column-reverse;}&.", "{", "{flex-direction:column;}&.", "{", "{flex-direction:column-reverse;}}}&.", "{", "{flex-direction:column;}}}", "{align-items:center;}", "{width:var(", ");}&.", "{", "{margin-right:0;margin-bottom:var(", ");}}&.", "{align-items:flex-end;", "{flex-direction:row-reverse;}}&.", "{align-items:flex-start;}&.", "{flex-direction:column-reverse;", "{margin-top:var(", ");margin-right:0;margin-bottom:0;}}}&.", "{flex-direction:column;align-items:center;justify-content:center;", "{flex-direction:column;align-items:center;justify-content:center;}&.", "{", "{position:static;bottom:0;left:0;margin-bottom:var(", ");&.", "{left:0;right:0;bottom:0;margin-top:var(", ");margin-bottom:0;}}}&.", ",&.", "{", "{margin-right:0;margin-bottom:0;position:absolute;top:0;right:calc( var(", ") / 2 + var(", ") / 2 + var(", ") );&.", "{margin-right:0;margin-left:0;top:auto;bottom:0;}}}&.", "{", "{left:calc(var(", ") + var(", "));}}}"], _Slider.tokens.disabledOpacity, _Slider.classes.labelPlacementOuter, LabelWrapper, _Slider.tokens.labelWrapperMarginBottom, _Slider.classes.labelPlacementInner, LabelWrapper, _Slider.tokens.labelWrapperMarginRight, _Slider.classes.verticalOrientation, _Slider.classes.labelAlignCenter, LabelWrapper, _Slider.classes.labelPlacementBottom, LabelWrapper, _Slider.classes.labelContentReversed, LabelWrapper, _Slider.classes.labelContentReversed, LabelWrapper, LabelWrapper, SliderBaseWrapper, _Slider.tokens.size, _Slider.classes.labelPlacementInner, LabelWrapper, _Slider.tokens.labelWrapperVerticalMargin, _Slider.classes.labelAlignLeft, LabelWrapper, _Slider.classes.labelAlignRight, _Slider.classes.labelPlacementBottom, LabelWrapper, _Slider.tokens.labelWrapperVerticalMargin, _Slider.classes.verticalOrientation, SliderBaseWrapper, _Slider.classes.labelAlignCenter, StyledRangeValue, _Slider.tokens.rangeValueVerticalMargin, _Slider.classes.maxRangeValue, _Slider.tokens.rangeValueVerticalMargin, _Slider.classes.labelAlignLeft, _Slider.classes.labelAlignRight, StyledRangeValue, _Slider.tokens.railThickness, _Slider.tokens.size, _Slider.tokens.rangeValueHorizontalOffset, _Slider.classes.maxRangeValue, _Slider.classes.labelAlignRight, StyledRangeValue, _Slider.tokens.size, _Slider.tokens.railThickness);
27
+ })(["display:flex;opacity:var(", ");&.", "{flex-direction:column;", "{margin-bottom:var(", ");}}&.", "{", "{margin-right:var(", ");}}"], _Slider.tokens.disabledOpacity, _Slider.classes.labelPlacementOuter, LabelWrapper, _Slider.tokens.labelWrapperMarginBottom, _Slider.classes.labelPlacementInner, LabelWrapper, _Slider.tokens.labelWrapperMarginRight);
@@ -7,8 +7,6 @@ Object.defineProperty(exports, "__esModule", {
7
7
  exports.SliderBase = void 0;
8
8
  var _react = /*#__PURE__*/_interopRequireWildcard( /*#__PURE__*/require("react"));
9
9
  var _hooks = /*#__PURE__*/require("../../../../hooks");
10
- var _Slider = /*#__PURE__*/require("../../Slider.tokens");
11
- var _utils = /*#__PURE__*/require("../../../../utils");
12
10
  var _SliderBase = /*#__PURE__*/require("./SliderBase.styles");
13
11
  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); }
14
12
  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; }
@@ -24,9 +22,6 @@ var SliderBase = exports.SliderBase = function SliderBase(_ref) {
24
22
  labelPlacement = _ref.labelPlacement,
25
23
  rangeValuesPlacement = _ref.rangeValuesPlacement,
26
24
  onChange = _ref.onChange,
27
- orientation = _ref.orientation,
28
- size = _ref.size,
29
- sliderAlign = _ref.sliderAlign,
30
25
  _ref$settings = _ref.settings,
31
26
  settings = _ref$settings === void 0 ? {} : _ref$settings;
32
27
  var _settings$indent = settings.indent,
@@ -35,43 +30,34 @@ var SliderBase = exports.SliderBase = function SliderBase(_ref) {
35
30
  fontSizeMultiplier = _settings$fontSizeMul === void 0 ? 16 : _settings$fontSizeMul;
36
31
  var ref = (0, _react.useRef)(null);
37
32
  var gap = indent * fontSizeMultiplier * 2;
38
- var isVertical = orientation === 'vertical';
39
33
  (0, _react.useEffect)(function () {
40
34
  var resizeHandler = function resizeHandler() {
41
35
  if (ref.current) {
42
- var railSize = isVertical ? ref.current.offsetHeight - gap : ref.current.offsetWidth - gap;
36
+ var railSize = ref.current.offsetWidth - gap;
43
37
  var totalSteps = max - min;
44
38
  setStepSize(railSize / totalSteps);
45
39
  }
46
40
  };
47
41
  resizeHandler();
48
- }, [labelPlacement, rangeValuesPlacement, gap, isVertical,
49
- // для перерасчета размеров
50
- size, sliderAlign]);
42
+ }, [labelPlacement, rangeValuesPlacement]);
51
43
  var onHandleChange = function onHandleChange(e) {
52
44
  if (!onChange || disabled) {
53
45
  return;
54
46
  }
55
47
  var _e$currentTarget$getB = e.currentTarget.getBoundingClientRect(),
56
48
  x = _e$currentTarget$getB.x,
57
- width = _e$currentTarget$getB.width,
58
- y = _e$currentTarget$getB.y,
59
- height = _e$currentTarget$getB.height;
60
- var lastPos = isVertical ? e.clientY - y : e.clientX - x;
61
- var sliderWidth = isVertical ? height : width;
62
- var position = min + lastPos / (sliderWidth - gap) * (max - min);
49
+ width = _e$currentTarget$getB.width;
50
+ var lastX = e.clientX - x;
51
+ var position = min + lastX / (width - gap) * (max - min);
63
52
  var result = Math.max(min, Math.min(max, position));
64
- var data = isVertical ? {
65
- lastY: lastPos
66
- } : {
67
- lastX: lastPos
68
- };
69
- onChange(result, data);
53
+ onChange(result, {
54
+ lastX: lastX
55
+ });
70
56
  };
71
57
  (0, _hooks.useIsomorphicLayoutEffect)(function () {
72
58
  var resizeHandler = function resizeHandler() {
73
59
  if (ref.current) {
74
- var railSize = isVertical ? ref.current.offsetHeight - gap : ref.current.offsetWidth - gap;
60
+ var railSize = ref.current.offsetWidth - gap;
75
61
  var totalSteps = max - min;
76
62
  setStepSize(railSize / totalSteps);
77
63
  }
@@ -81,18 +67,13 @@ var SliderBase = exports.SliderBase = function SliderBase(_ref) {
81
67
  return function () {
82
68
  return window.removeEventListener('resize', resizeHandler);
83
69
  };
84
- }, [min, max, setStepSize, gap, labelPlacement, rangeValuesPlacement, isVertical]);
85
- var fillStyle = isVertical ? {
86
- top: "".concat(railFillXPosition, "px"),
87
- height: "".concat(railFillWidth, "px"),
88
- width: '100%'
89
- } : {
70
+ }, [min, max, setStepSize, gap, labelPlacement, rangeValuesPlacement]);
71
+ var fillStyle = {
90
72
  left: "".concat(railFillXPosition, "px"),
91
73
  width: "".concat(railFillWidth, "px")
92
74
  };
93
75
  return /*#__PURE__*/_react["default"].createElement(_SliderBase.Slider, {
94
- ref: ref,
95
- className: (0, _utils.cx)(orientation === 'vertical' && _Slider.classes.verticalOrientation)
76
+ ref: ref
96
77
  }, /*#__PURE__*/_react["default"].createElement(_SliderBase.RailWrap, {
97
78
  "aria-hidden": "true",
98
79
  onMouseDown: onHandleChange
@@ -8,15 +8,15 @@ var _styledComponents = /*#__PURE__*/_interopRequireDefault( /*#__PURE__*/requir
8
8
  var _mixins = /*#__PURE__*/require("../../../../mixins");
9
9
  var _Slider = /*#__PURE__*/require("../../Slider.tokens");
10
10
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
11
- var Rail = exports.Rail = /*#__PURE__*/_styledComponents["default"].div.withConfig({
12
- componentId: "plasma-new-hope__sc-ik0bjb-0"
13
- })(["position:relative;top:50%;height:var(", ");border-radius:var(", ");background-color:var(", ");overflow:hidden;transform:translateY(-50%);"], _Slider.tokens.railThickness, _Slider.tokens.railBorderRadius, _Slider.tokens.railBackgroundColor);
14
11
  var Slider = exports.Slider = /*#__PURE__*/_styledComponents["default"].div.withConfig({
15
- componentId: "plasma-new-hope__sc-ik0bjb-1"
16
- })(["flex:1;position:relative;user-select:none;height:var(", ");&.", "{width:var(", ");height:auto;", "{top:0;left:50%;transform:translateX(-50%);width:var(", ");height:100%;}}"], _Slider.tokens.size, _Slider.classes.verticalOrientation, _Slider.tokens.size, Rail, _Slider.tokens.railThickness);
12
+ componentId: "plasma-new-hope__sc-ik0bjb-0"
13
+ })(["flex:1;position:relative;user-select:none;height:var(", ");"], _Slider.tokens.height);
17
14
  var RailWrap = exports.RailWrap = /*#__PURE__*/_styledComponents["default"].div.withConfig({
18
- componentId: "plasma-new-hope__sc-ik0bjb-2"
15
+ componentId: "plasma-new-hope__sc-ik0bjb-1"
19
16
  })(["height:100%;"]);
17
+ var Rail = exports.Rail = /*#__PURE__*/_styledComponents["default"].div.withConfig({
18
+ componentId: "plasma-new-hope__sc-ik0bjb-2"
19
+ })(["position:relative;top:50%;height:var(", ");border-radius:var(", ");background-color:var(", ");overflow:hidden;transform:translateY(-50%);"], _Slider.tokens.railHeight, _Slider.tokens.railBorderRadius, _Slider.tokens.railBackgroundColor);
20
20
  var Fill = exports.Fill = /*#__PURE__*/_styledComponents["default"].div.withConfig({
21
21
  componentId: "plasma-new-hope__sc-ik0bjb-3"
22
22
  })(["position:absolute;height:100%;top:0;left:0;background:var(", ");width:0;"], _Slider.tokens.fillColor);
@@ -7,20 +7,14 @@ Object.defineProperty(exports, "__esModule", {
7
7
  exports.Handler = void 0;
8
8
  var _react = /*#__PURE__*/_interopRequireWildcard( /*#__PURE__*/require("react"));
9
9
  var _reactDraggable = /*#__PURE__*/_interopRequireDefault( /*#__PURE__*/require("react-draggable"));
10
- var _utils = /*#__PURE__*/require("../../../../utils");
11
- var _utils2 = /*#__PURE__*/require("../../utils");
10
+ var _utils = /*#__PURE__*/require("../../utils");
12
11
  var _Thumb = /*#__PURE__*/require("../Thumb/Thumb");
13
- var _Slider = /*#__PURE__*/require("../../Slider.tokens");
14
12
  var _Handler = /*#__PURE__*/require("./Handler.styles");
15
- var _computeKeyPressData = /*#__PURE__*/require("./computeKeyPressData");
16
- var _excluded = ["size", "orientation", "stepSize", "onChangeCommitted", "onChange", "position", "min", "max", "bounds", "zIndex", "disabled", "side", "showCurrentValue", "startOffset", "endOffset", "value", "valuePlacement"];
13
+ var _excluded = ["stepSize", "onChangeCommitted", "onChange", "xPosition", "min", "max", "bounds", "zIndex", "disabled", "side", "showCurrentValue", "startOffset", "endOffset", "value"];
17
14
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
18
15
  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); }
19
16
  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; }
20
17
  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); }
21
- 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; }
22
- function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
23
- 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); }
24
18
  function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
25
19
  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."); }
26
20
  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); }
@@ -31,14 +25,22 @@ function _objectWithoutProperties(source, excluded) { if (source == null) return
31
25
  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; }
32
26
  // TODO: PLASMA-1707
33
27
 
28
+ var KeyboardSupport = {
29
+ PageUp: 33,
30
+ PageDown: 34,
31
+ End: 35,
32
+ Home: 36,
33
+ ArrowLeft: 37,
34
+ ArrowUp: 38,
35
+ ArrowRight: 39,
36
+ ArrowDown: 40
37
+ };
34
38
  var Handler = exports.Handler = /*#__PURE__*/(0, _react.forwardRef)(function (_ref, ref) {
35
- var size = _ref.size,
36
- orientation = _ref.orientation,
37
- stepSize = _ref.stepSize,
39
+ var stepSize = _ref.stepSize,
38
40
  onChangeCommitted = _ref.onChangeCommitted,
39
41
  onChange = _ref.onChange,
40
- _ref$position = _ref.position,
41
- position = _ref$position === void 0 ? 0 : _ref$position,
42
+ _ref$xPosition = _ref.xPosition,
43
+ xPosition = _ref$xPosition === void 0 ? 0 : _ref$xPosition,
42
44
  min = _ref.min,
43
45
  max = _ref.max,
44
46
  _ref$bounds = _ref.bounds,
@@ -53,88 +55,122 @@ var Handler = exports.Handler = /*#__PURE__*/(0, _react.forwardRef)(function (_r
53
55
  _ref$endOffset = _ref.endOffset,
54
56
  endOffset = _ref$endOffset === void 0 ? 0 : _ref$endOffset,
55
57
  value = _ref.value,
56
- valuePlacement = _ref.valuePlacement,
57
58
  rest = _objectWithoutProperties(_ref, _excluded);
58
- var isVertical = orientation === 'vertical';
59
59
  var lastOnChangeValue = (0, _react.useRef)();
60
- var _getOffsets = (0, _utils2.getOffsets)(ref, side, isVertical),
60
+ var _getOffsets = (0, _utils.getOffsets)(ref, side),
61
61
  _getOffsets2 = _slicedToArray(_getOffsets, 2),
62
- startClientOffset = _getOffsets2[0],
63
- endClientOffset = _getOffsets2[1];
62
+ offsetLeft = _getOffsets2[0],
63
+ offsetRight = _getOffsets2[1];
64
64
  var _bounds = _slicedToArray(bounds, 2),
65
- startValueBound = _bounds[0],
66
- endValueBound = _bounds[1];
67
- var startPositionBound = startValueBound ? (startValueBound - min) * stepSize : null;
68
- var endPositionBound = endValueBound ? (endValueBound - min) * stepSize : null;
69
- var dragPosition = typeof position === 'number' ? {
70
- x: isVertical ? 0 : position,
71
- y: isVertical ? position : 0
65
+ leftValueBound = _bounds[0],
66
+ rightValueBound = _bounds[1];
67
+ var leftPositionBound = leftValueBound ? (leftValueBound - min) * stepSize : null;
68
+ var rightPositionBound = rightValueBound ? (rightValueBound - min) * stepSize : null;
69
+ var position = typeof xPosition === 'number' ? {
70
+ x: xPosition,
71
+ y: 0
72
72
  } : undefined;
73
73
  var tabIndex = disabled ? -1 : 0;
74
- 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));
75
- var showCurrentValueCondition = showCurrentValue && (position >= startOffset && position <= max * stepSize - endOffset || position === 0 && value !== 0);
74
+ var computedBounds = {
75
+ left: (leftPositionBound !== null && leftPositionBound !== void 0 ? leftPositionBound : 0) - (offsetLeft ? stepSize : 0),
76
+ right: (rightPositionBound !== null && rightPositionBound !== void 0 ? rightPositionBound : stepSize * (max - min)) - (offsetRight ? stepSize : 0)
77
+ };
78
+ var showCurrentValueCondition = showCurrentValue && (xPosition >= startOffset && xPosition <= max * stepSize - endOffset || xPosition === 0 && value !== 0);
76
79
  var onDrag = function onDrag(_, data) {
77
- var newValue = (0, _utils2.getSliderThumbValue)(isVertical ? data.y : data.x, stepSize, min, max);
80
+ var newValue = (0, _utils.getSliderThumbValue)(data.x, stepSize, min, max);
78
81
  if (lastOnChangeValue.current !== newValue) {
79
82
  onChange === null || onChange === void 0 || onChange(newValue, data);
80
83
  lastOnChangeValue.current = newValue;
81
84
  }
82
85
  };
83
86
  var onStop = function onStop(_, data) {
84
- var newValue = (0, _utils2.getSliderThumbValue)(isVertical ? data.y : data.x, stepSize, min, max);
87
+ var newValue = (0, _utils.getSliderThumbValue)(data.x, stepSize, min, max);
85
88
  onChangeCommitted && onChangeCommitted(newValue, data);
86
89
  };
87
90
  var onKeyPress = function onKeyPress(event) {
88
91
  event.persist();
89
- var computedMultipleSteps = stepSize * (rest.multipleStepSize / 100 * max);
90
- var data = (0, _computeKeyPressData.computeKeyPressData)(event, {
91
- isVertical: isVertical,
92
- stepSize: stepSize,
93
- position: position,
94
- max: max,
95
- computedMultipleSteps: computedMultipleSteps
96
- });
97
- if (!data) {
92
+ var keyCode = event.keyCode,
93
+ target = event.target;
94
+ if (!Object.values(KeyboardSupport).includes(keyCode)) {
98
95
  return;
99
96
  }
97
+ var ArrowUp = KeyboardSupport.ArrowUp,
98
+ ArrowRight = KeyboardSupport.ArrowRight,
99
+ ArrowDown = KeyboardSupport.ArrowDown,
100
+ ArrowLeft = KeyboardSupport.ArrowLeft,
101
+ Home = KeyboardSupport.Home,
102
+ End = KeyboardSupport.End,
103
+ PageDown = KeyboardSupport.PageDown,
104
+ PageUp = KeyboardSupport.PageUp;
105
+ var computedMultipleSteps = stepSize * (rest.multipleStepSize / 100 * max);
106
+ var data = {
107
+ x: 0,
108
+ deltaX: stepSize,
109
+ lastX: xPosition,
110
+ y: 0,
111
+ deltaY: 0,
112
+ lastY: 0,
113
+ node: target
114
+ };
115
+ switch (keyCode) {
116
+ case ArrowUp:
117
+ case ArrowRight:
118
+ data.x = xPosition + stepSize;
119
+ break;
120
+ case ArrowDown:
121
+ case ArrowLeft:
122
+ data.x = xPosition - stepSize;
123
+ data.deltaX = -stepSize;
124
+ break;
125
+ case PageUp:
126
+ data.x = xPosition + computedMultipleSteps;
127
+ data.deltaX = computedMultipleSteps;
128
+ break;
129
+ case PageDown:
130
+ data.x = xPosition - computedMultipleSteps;
131
+ data.deltaX = -computedMultipleSteps;
132
+ break;
133
+ case End:
134
+ data.x = max * stepSize;
135
+ break;
136
+ case Home:
137
+ data.x = 0;
138
+ break;
139
+ default:
140
+ data.x = 0;
141
+ }
100
142
  var left = computedBounds.left,
101
- right = computedBounds.right,
102
- top = computedBounds.top,
103
- bottom = computedBounds.bottom;
143
+ right = computedBounds.right;
104
144
 
105
145
  /*
106
146
  * INFO: Находим значение в диапазоне между указанными левой и правой границами.
107
- * Или между верхней и нижней
108
147
  * Необходимо для правильного расчета положения SliderThumb.
109
148
  * см. функция clamp
110
149
  */
111
- var boundedValue = isVertical ? Math.max(Math.min(bottom, data.y), top) : Math.max(Math.min(right, data.x), left);
112
- var computedValue = (0, _utils2.getSliderThumbValue)(boundedValue, stepSize, min, max);
150
+ var boundedValue = Math.max(Math.min(right, data.x), left);
151
+ var computedValue = (0, _utils.getSliderThumbValue)(boundedValue, stepSize, min, max);
113
152
  lastOnChangeValue.current = computedValue;
114
153
  onChangeCommitted && onChangeCommitted(computedValue, data);
115
154
  };
116
155
  return /*#__PURE__*/_react["default"].createElement(_reactDraggable["default"], {
117
- axis: isVertical ? 'y' : 'x',
156
+ axis: "x",
118
157
  bounds: computedBounds,
119
- grid: isVertical ? [1, stepSize] : [stepSize, 1],
158
+ grid: [stepSize, 1],
120
159
  onStop: onStop,
121
160
  onDrag: onDrag,
122
- position: dragPosition,
161
+ position: position,
123
162
  disabled: disabled
124
163
  }, /*#__PURE__*/_react["default"].createElement(_Handler.HandlerStyled, {
125
164
  ref: ref,
126
165
  style: {
127
166
  zIndex: zIndex
128
167
  },
129
- className: (0, _utils.cx)(isVertical && _Slider.classes.verticalOrientation, valuePlacement === 'left' && _Slider.classes.valuePlacementLeft),
130
- isLarge: size === 'large',
131
168
  onKeyDown: onKeyPress
132
- }, size !== 'none' && /*#__PURE__*/_react["default"].createElement(_Thumb.Thumb, _extends({
169
+ }, /*#__PURE__*/_react["default"].createElement(_Thumb.Thumb, _extends({
133
170
  tabIndex: tabIndex,
134
171
  min: min,
135
172
  max: max,
136
173
  value: value,
137
- disabled: disabled,
138
- orientation: orientation
174
+ disabled: disabled
139
175
  }, rest)), showCurrentValueCondition && /*#__PURE__*/_react["default"].createElement(_Handler.StyledValue, null, value)));
140
176
  });
@@ -7,12 +7,9 @@ exports.StyledValue = exports.HandlerStyled = void 0;
7
7
  var _styledComponents = /*#__PURE__*/_interopRequireDefault( /*#__PURE__*/require("styled-components"));
8
8
  var _Slider = /*#__PURE__*/require("../../Slider.tokens");
9
9
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
10
- var StyledValue = exports.StyledValue = /*#__PURE__*/_styledComponents["default"].span.withConfig({
11
- componentId: "plasma-new-hope__sc-a1py3c-0"
12
- })(["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(", ");"], _Slider.tokens.currentValueTopOffset, _Slider.tokens.valueFontFamily, _Slider.tokens.valueFontSize, _Slider.tokens.valueFontStyle, _Slider.tokens.valueFontWeight, _Slider.tokens.valueLetterSpacing, _Slider.tokens.valueLineHeight);
13
10
  var HandlerStyled = exports.HandlerStyled = /*#__PURE__*/_styledComponents["default"].div.withConfig({
11
+ componentId: "plasma-new-hope__sc-a1py3c-0"
12
+ })(["cursor:pointer;position:absolute;z-index:1;top:0;left:0;"]);
13
+ var StyledValue = exports.StyledValue = /*#__PURE__*/_styledComponents["default"].span.withConfig({
14
14
  componentId: "plasma-new-hope__sc-a1py3c-1"
15
- })(["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) {
16
- var isLarge = _ref.isLarge;
17
- return isLarge ? "var(".concat(_Slider.tokens.thumbSizeLarge, ")") : "var(".concat(_Slider.tokens.thumbSize, ")");
18
- }, _Slider.classes.verticalOrientation, StyledValue, _Slider.tokens.size, _Slider.tokens.size, _Slider.classes.valuePlacementLeft, StyledValue, _Slider.tokens.size, _Slider.tokens.size);
15
+ })(["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(", ");"], _Slider.tokens.currentValueTopOffset, _Slider.tokens.currentValueFontFamily, _Slider.tokens.currentValueFontSize, _Slider.tokens.currentValueFontStyle, _Slider.tokens.currentValueFontWeight, _Slider.tokens.currentValueLetterSpacing, _Slider.tokens.currentValueLineHeight);