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

Sign up to get free protection for your applications and to get access to all the features.
Files changed (254) hide show
  1. package/cjs/components/NumberInput/NumberInput.css +1 -1
  2. package/cjs/components/NumberInput/NumberInput.tokens.js +2 -1
  3. package/cjs/components/NumberInput/NumberInput.tokens.js.map +1 -1
  4. package/cjs/components/NumberInput/ui/Input/Input.js +2 -2
  5. package/cjs/components/NumberInput/ui/Input/Input.js.map +1 -1
  6. package/cjs/components/NumberInput/variations/_segmentation/base.js +1 -1
  7. package/cjs/components/NumberInput/variations/_segmentation/base.js.map +1 -1
  8. package/cjs/components/NumberInput/variations/_segmentation/base_3r9a58.css +1 -0
  9. package/cjs/components/Slider/Slider.css +15 -13
  10. package/cjs/components/Slider/Slider.js +11 -2
  11. package/cjs/components/Slider/Slider.js.map +1 -1
  12. package/cjs/components/Slider/Slider.tokens.js +23 -17
  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 +58 -23
  16. package/cjs/components/Slider/components/Double/Double.js.map +1 -1
  17. package/cjs/components/Slider/components/DoubleUncontrolled/DoubleUncontrolled.css +98 -0
  18. package/cjs/components/Slider/components/Single/Single.css +14 -14
  19. package/cjs/components/Slider/components/Single/Single.js +64 -33
  20. package/cjs/components/Slider/components/Single/Single.js.map +1 -1
  21. package/cjs/components/Slider/components/Single/Single.styles.js +4 -4
  22. package/cjs/components/Slider/components/Single/Single.styles.js.map +1 -1
  23. package/cjs/components/Slider/components/Single/Single.styles_1h7n2s2.css +6 -0
  24. package/cjs/components/Slider/components/SliderBase/SliderBase.css +5 -5
  25. package/cjs/components/Slider/components/SliderBase/SliderBase.js +31 -12
  26. package/cjs/components/Slider/components/SliderBase/SliderBase.js.map +1 -1
  27. package/cjs/components/Slider/components/SliderBase/SliderBase.styles.js +7 -7
  28. package/cjs/components/Slider/components/SliderBase/SliderBase.styles.js.map +1 -1
  29. package/cjs/components/Slider/components/SliderBase/SliderBase.styles_1qt1224.css +5 -0
  30. package/cjs/components/Slider/ui/Handler/Handler.css +3 -3
  31. package/cjs/components/Slider/ui/Handler/Handler.js +49 -88
  32. package/cjs/components/Slider/ui/Handler/Handler.js.map +1 -1
  33. package/cjs/components/Slider/ui/Handler/Handler.styles.js +17 -7
  34. package/cjs/components/Slider/ui/Handler/Handler.styles.js.map +1 -1
  35. package/cjs/components/Slider/ui/Handler/Handler.styles_irtcgm.css +2 -0
  36. package/cjs/components/Slider/ui/Handler/computeKeyPressData.js +122 -0
  37. package/cjs/components/Slider/ui/Handler/computeKeyPressData.js.map +1 -0
  38. package/cjs/components/Slider/ui/Thumb/Thumb.css +1 -1
  39. package/cjs/components/Slider/ui/Thumb/Thumb.js +3 -2
  40. package/cjs/components/Slider/ui/Thumb/Thumb.js.map +1 -1
  41. package/cjs/components/Slider/ui/Thumb/Thumb.styles.js +1 -1
  42. package/cjs/components/Slider/ui/Thumb/Thumb.styles.js.map +1 -1
  43. package/cjs/components/Slider/ui/Thumb/Thumb.styles_uyn20e.css +1 -0
  44. package/cjs/components/Slider/utils/index.js +28 -10
  45. package/cjs/components/Slider/utils/index.js.map +1 -1
  46. package/cjs/components/Slider/variations/_view/base.js +1 -1
  47. package/cjs/components/Slider/variations/_view/base.js.map +1 -1
  48. package/cjs/components/Slider/variations/_view/base_1s3f6q8.css +1 -0
  49. package/cjs/index.css +16 -14
  50. package/cjs/utils/index.js.map +1 -1
  51. package/emotion/cjs/components/NumberInput/NumberInput.tokens.js +2 -1
  52. package/emotion/cjs/components/NumberInput/ui/Input/Input.js +2 -2
  53. package/emotion/cjs/components/NumberInput/variations/_segmentation/base.js +1 -1
  54. package/emotion/cjs/components/Slider/Slider.js +10 -2
  55. package/emotion/cjs/components/Slider/Slider.template-doc.mdx +26 -0
  56. package/emotion/cjs/components/Slider/Slider.tokens.js +23 -17
  57. package/emotion/cjs/components/Slider/components/Double/Double.js +54 -19
  58. package/emotion/cjs/components/Slider/components/Single/Single.js +64 -33
  59. package/emotion/cjs/components/Slider/components/Single/Single.styles.js +18 -9
  60. package/emotion/cjs/components/Slider/components/SliderBase/SliderBase.js +31 -12
  61. package/emotion/cjs/components/Slider/components/SliderBase/SliderBase.styles.js +10 -10
  62. package/emotion/cjs/components/Slider/ui/Handler/Handler.js +52 -88
  63. package/emotion/cjs/components/Slider/ui/Handler/Handler.styles.js +9 -15
  64. package/emotion/cjs/components/Slider/ui/Handler/computeKeyPressData.js +121 -0
  65. package/emotion/cjs/components/Slider/ui/Thumb/Thumb.js +3 -2
  66. package/emotion/cjs/components/Slider/ui/Thumb/Thumb.styles.js +3 -3
  67. package/emotion/cjs/components/Slider/utils/index.js +28 -10
  68. package/emotion/cjs/components/Slider/variations/_view/base.js +2 -1
  69. package/emotion/cjs/examples/plasma_b2c/components/NumberInput/NumberInput.config.js +16 -16
  70. package/emotion/cjs/examples/plasma_b2c/components/Slider/Slider.config.js +7 -7
  71. package/emotion/cjs/examples/plasma_b2c/components/Slider/Slider.stories.tsx +98 -16
  72. package/emotion/cjs/examples/plasma_web/components/NumberInput/NumberInput.config.js +16 -16
  73. package/emotion/cjs/examples/plasma_web/components/Slider/Slider.config.js +7 -7
  74. package/emotion/cjs/examples/plasma_web/components/Slider/Slider.stories.tsx +98 -15
  75. package/emotion/es/components/NumberInput/NumberInput.tokens.js +2 -1
  76. package/emotion/es/components/NumberInput/ui/Input/Input.js +2 -2
  77. package/emotion/es/components/NumberInput/variations/_segmentation/base.js +1 -1
  78. package/emotion/es/components/Slider/Slider.js +11 -2
  79. package/emotion/es/components/Slider/Slider.template-doc.mdx +26 -0
  80. package/emotion/es/components/Slider/Slider.tokens.js +23 -17
  81. package/emotion/es/components/Slider/components/Double/Double.js +54 -19
  82. package/emotion/es/components/Slider/components/Single/Single.js +65 -34
  83. package/emotion/es/components/Slider/components/Single/Single.styles.js +17 -8
  84. package/emotion/es/components/Slider/components/SliderBase/SliderBase.js +31 -12
  85. package/emotion/es/components/Slider/components/SliderBase/SliderBase.styles.js +11 -11
  86. package/emotion/es/components/Slider/ui/Handler/Handler.js +51 -86
  87. package/emotion/es/components/Slider/ui/Handler/Handler.styles.js +10 -16
  88. package/emotion/es/components/Slider/ui/Handler/computeKeyPressData.js +115 -0
  89. package/emotion/es/components/Slider/ui/Thumb/Thumb.js +3 -2
  90. package/emotion/es/components/Slider/ui/Thumb/Thumb.styles.js +3 -3
  91. package/emotion/es/components/Slider/utils/index.js +28 -10
  92. package/emotion/es/components/Slider/variations/_view/base.js +2 -1
  93. package/emotion/es/examples/plasma_b2c/components/NumberInput/NumberInput.config.js +16 -16
  94. package/emotion/es/examples/plasma_b2c/components/Slider/Slider.config.js +7 -7
  95. package/emotion/es/examples/plasma_b2c/components/Slider/Slider.stories.tsx +98 -16
  96. package/emotion/es/examples/plasma_web/components/NumberInput/NumberInput.config.js +16 -16
  97. package/emotion/es/examples/plasma_web/components/Slider/Slider.config.js +7 -7
  98. package/emotion/es/examples/plasma_web/components/Slider/Slider.stories.tsx +98 -15
  99. package/es/components/NumberInput/NumberInput.css +1 -1
  100. package/es/components/NumberInput/NumberInput.tokens.js +2 -1
  101. package/es/components/NumberInput/NumberInput.tokens.js.map +1 -1
  102. package/es/components/NumberInput/ui/Input/Input.js +2 -2
  103. package/es/components/NumberInput/ui/Input/Input.js.map +1 -1
  104. package/es/components/NumberInput/variations/_segmentation/base.js +1 -1
  105. package/es/components/NumberInput/variations/_segmentation/base.js.map +1 -1
  106. package/es/components/NumberInput/variations/_segmentation/base_3r9a58.css +1 -0
  107. package/es/components/Slider/Slider.css +15 -13
  108. package/es/components/Slider/Slider.js +11 -2
  109. package/es/components/Slider/Slider.js.map +1 -1
  110. package/es/components/Slider/Slider.tokens.js +23 -17
  111. package/es/components/Slider/Slider.tokens.js.map +1 -1
  112. package/es/components/Slider/components/Double/Double.css +8 -8
  113. package/es/components/Slider/components/Double/Double.js +54 -19
  114. package/es/components/Slider/components/Double/Double.js.map +1 -1
  115. package/es/components/Slider/components/DoubleUncontrolled/DoubleUncontrolled.css +98 -0
  116. package/es/components/Slider/components/Single/Single.css +14 -14
  117. package/es/components/Slider/components/Single/Single.js +65 -34
  118. package/es/components/Slider/components/Single/Single.js.map +1 -1
  119. package/es/components/Slider/components/Single/Single.styles.js +4 -4
  120. package/es/components/Slider/components/Single/Single.styles.js.map +1 -1
  121. package/es/components/Slider/components/Single/Single.styles_1h7n2s2.css +6 -0
  122. package/es/components/Slider/components/SliderBase/SliderBase.css +5 -5
  123. package/es/components/Slider/components/SliderBase/SliderBase.js +31 -12
  124. package/es/components/Slider/components/SliderBase/SliderBase.js.map +1 -1
  125. package/es/components/Slider/components/SliderBase/SliderBase.styles.js +7 -7
  126. package/es/components/Slider/components/SliderBase/SliderBase.styles.js.map +1 -1
  127. package/es/components/Slider/components/SliderBase/SliderBase.styles_1qt1224.css +5 -0
  128. package/es/components/Slider/ui/Handler/Handler.css +3 -3
  129. package/es/components/Slider/ui/Handler/Handler.js +48 -87
  130. package/es/components/Slider/ui/Handler/Handler.js.map +1 -1
  131. package/es/components/Slider/ui/Handler/Handler.styles.js +17 -7
  132. package/es/components/Slider/ui/Handler/Handler.styles.js.map +1 -1
  133. package/es/components/Slider/ui/Handler/Handler.styles_irtcgm.css +2 -0
  134. package/es/components/Slider/ui/Handler/computeKeyPressData.js +118 -0
  135. package/es/components/Slider/ui/Handler/computeKeyPressData.js.map +1 -0
  136. package/es/components/Slider/ui/Thumb/Thumb.css +1 -1
  137. package/es/components/Slider/ui/Thumb/Thumb.js +3 -2
  138. package/es/components/Slider/ui/Thumb/Thumb.js.map +1 -1
  139. package/es/components/Slider/ui/Thumb/Thumb.styles.js +1 -1
  140. package/es/components/Slider/ui/Thumb/Thumb.styles.js.map +1 -1
  141. package/es/components/Slider/ui/Thumb/Thumb.styles_uyn20e.css +1 -0
  142. package/es/components/Slider/utils/index.js +28 -10
  143. package/es/components/Slider/utils/index.js.map +1 -1
  144. package/es/components/Slider/variations/_view/base.js +1 -1
  145. package/es/components/Slider/variations/_view/base.js.map +1 -1
  146. package/es/components/Slider/variations/_view/base_1s3f6q8.css +1 -0
  147. package/es/index.css +16 -14
  148. package/es/utils/index.js.map +1 -1
  149. package/package.json +2 -2
  150. package/styled-components/cjs/components/NumberInput/NumberInput.tokens.js +2 -1
  151. package/styled-components/cjs/components/NumberInput/ui/Input/Input.js +2 -2
  152. package/styled-components/cjs/components/NumberInput/variations/_segmentation/base.js +1 -1
  153. package/styled-components/cjs/components/Slider/Slider.js +10 -2
  154. package/styled-components/cjs/components/Slider/Slider.template-doc.mdx +26 -0
  155. package/styled-components/cjs/components/Slider/Slider.tokens.js +23 -17
  156. package/styled-components/cjs/components/Slider/components/Double/Double.js +54 -19
  157. package/styled-components/cjs/components/Slider/components/Single/Single.js +64 -33
  158. package/styled-components/cjs/components/Slider/components/Single/Single.styles.js +6 -6
  159. package/styled-components/cjs/components/Slider/components/SliderBase/SliderBase.js +31 -12
  160. package/styled-components/cjs/components/Slider/components/SliderBase/SliderBase.styles.js +6 -6
  161. package/styled-components/cjs/components/Slider/ui/Handler/Handler.js +52 -88
  162. package/styled-components/cjs/components/Slider/ui/Handler/Handler.styles.js +7 -4
  163. package/styled-components/cjs/components/Slider/ui/Handler/computeKeyPressData.js +121 -0
  164. package/styled-components/cjs/components/Slider/ui/Thumb/Thumb.js +3 -2
  165. package/styled-components/cjs/components/Slider/ui/Thumb/Thumb.styles.js +2 -2
  166. package/styled-components/cjs/components/Slider/utils/index.js +28 -10
  167. package/styled-components/cjs/components/Slider/variations/_view/base.js +2 -1
  168. package/styled-components/cjs/examples/plasma_b2c/components/NumberInput/NumberInput.config.js +4 -4
  169. package/styled-components/cjs/examples/plasma_b2c/components/Slider/Slider.config.js +3 -3
  170. package/styled-components/cjs/examples/plasma_b2c/components/Slider/Slider.stories.tsx +98 -16
  171. package/styled-components/cjs/examples/plasma_web/components/NumberInput/NumberInput.config.js +4 -4
  172. package/styled-components/cjs/examples/plasma_web/components/Slider/Slider.config.js +3 -3
  173. package/styled-components/cjs/examples/plasma_web/components/Slider/Slider.stories.tsx +98 -15
  174. package/styled-components/es/components/NumberInput/NumberInput.tokens.js +2 -1
  175. package/styled-components/es/components/NumberInput/ui/Input/Input.js +2 -2
  176. package/styled-components/es/components/NumberInput/variations/_segmentation/base.js +1 -1
  177. package/styled-components/es/components/Slider/Slider.js +11 -2
  178. package/styled-components/es/components/Slider/Slider.template-doc.mdx +26 -0
  179. package/styled-components/es/components/Slider/Slider.tokens.js +23 -17
  180. package/styled-components/es/components/Slider/components/Double/Double.js +54 -19
  181. package/styled-components/es/components/Slider/components/Single/Single.js +65 -34
  182. package/styled-components/es/components/Slider/components/Single/Single.styles.js +5 -5
  183. package/styled-components/es/components/Slider/components/SliderBase/SliderBase.js +31 -12
  184. package/styled-components/es/components/Slider/components/SliderBase/SliderBase.styles.js +7 -7
  185. package/styled-components/es/components/Slider/ui/Handler/Handler.js +51 -86
  186. package/styled-components/es/components/Slider/ui/Handler/Handler.styles.js +8 -5
  187. package/styled-components/es/components/Slider/ui/Handler/computeKeyPressData.js +115 -0
  188. package/styled-components/es/components/Slider/ui/Thumb/Thumb.js +3 -2
  189. package/styled-components/es/components/Slider/ui/Thumb/Thumb.styles.js +2 -2
  190. package/styled-components/es/components/Slider/utils/index.js +28 -10
  191. package/styled-components/es/components/Slider/variations/_view/base.js +2 -1
  192. package/styled-components/es/examples/plasma_b2c/components/NumberInput/NumberInput.config.js +4 -4
  193. package/styled-components/es/examples/plasma_b2c/components/Slider/Slider.config.js +3 -3
  194. package/styled-components/es/examples/plasma_b2c/components/Slider/Slider.stories.tsx +98 -16
  195. package/styled-components/es/examples/plasma_web/components/NumberInput/NumberInput.config.js +4 -4
  196. package/styled-components/es/examples/plasma_web/components/Slider/Slider.config.js +3 -3
  197. package/styled-components/es/examples/plasma_web/components/Slider/Slider.stories.tsx +98 -15
  198. package/types/components/NumberInput/NumberInput.tokens.d.ts +2 -1
  199. package/types/components/NumberInput/NumberInput.tokens.d.ts.map +1 -1
  200. package/types/components/NumberInput/ui/Input/Input.d.ts.map +1 -1
  201. package/types/components/NumberInput/variations/_segmentation/base.d.ts.map +1 -1
  202. package/types/components/Slider/Slider.d.ts.map +1 -1
  203. package/types/components/Slider/Slider.tokens.d.ts +22 -16
  204. package/types/components/Slider/Slider.tokens.d.ts.map +1 -1
  205. package/types/components/Slider/components/Double/Double.d.ts.map +1 -1
  206. package/types/components/Slider/components/Double/Double.types.d.ts +1 -0
  207. package/types/components/Slider/components/Double/Double.types.d.ts.map +1 -1
  208. package/types/components/Slider/components/Single/Single.d.ts.map +1 -1
  209. package/types/components/Slider/components/Single/Single.styles.d.ts +1 -1
  210. package/types/components/Slider/components/Single/Single.styles.d.ts.map +1 -1
  211. package/types/components/Slider/components/Single/Single.types.d.ts +79 -7
  212. package/types/components/Slider/components/Single/Single.types.d.ts.map +1 -1
  213. package/types/components/Slider/components/SliderBase/SliderBase.d.ts.map +1 -1
  214. package/types/components/Slider/components/SliderBase/SliderBase.styles.d.ts +1 -1
  215. package/types/components/Slider/components/SliderBase/SliderBase.styles.d.ts.map +1 -1
  216. package/types/components/Slider/components/SliderBase/SliderBase.types.d.ts +6 -0
  217. package/types/components/Slider/components/SliderBase/SliderBase.types.d.ts.map +1 -1
  218. package/types/components/Slider/ui/Handler/Handler.d.ts.map +1 -1
  219. package/types/components/Slider/ui/Handler/Handler.styles.d.ts +6 -2
  220. package/types/components/Slider/ui/Handler/Handler.styles.d.ts.map +1 -1
  221. package/types/components/Slider/ui/Handler/Handler.types.d.ts +5 -1
  222. package/types/components/Slider/ui/Handler/Handler.types.d.ts.map +1 -1
  223. package/types/components/Slider/ui/Handler/computeKeyPressData.d.ts +12 -0
  224. package/types/components/Slider/ui/Handler/computeKeyPressData.d.ts.map +1 -0
  225. package/types/components/Slider/ui/Thumb/Thumb.d.ts +1 -1
  226. package/types/components/Slider/ui/Thumb/Thumb.d.ts.map +1 -1
  227. package/types/components/Slider/ui/Thumb/Thumb.styles.d.ts.map +1 -1
  228. package/types/components/Slider/ui/Thumb/Thumb.types.d.ts +1 -0
  229. package/types/components/Slider/ui/Thumb/Thumb.types.d.ts.map +1 -1
  230. package/types/components/Slider/utils/index.d.ts +26 -8
  231. package/types/components/Slider/utils/index.d.ts.map +1 -1
  232. package/types/components/Slider/variations/_view/base.d.ts.map +1 -1
  233. package/types/examples/plasma_b2c/components/NumberInput/NumberInput.config.d.ts.map +1 -1
  234. package/types/examples/plasma_b2c/components/Slider/Slider.config.d.ts.map +1 -1
  235. package/types/examples/plasma_b2c/components/Slider/Slider.d.ts +80 -2
  236. package/types/examples/plasma_b2c/components/Slider/Slider.d.ts.map +1 -1
  237. package/types/examples/plasma_web/components/NumberInput/NumberInput.config.d.ts.map +1 -1
  238. package/types/examples/plasma_web/components/Slider/Slider.config.d.ts.map +1 -1
  239. package/types/examples/plasma_web/components/Slider/Slider.d.ts +80 -2
  240. package/types/examples/plasma_web/components/Slider/Slider.d.ts.map +1 -1
  241. package/types/utils/index.d.ts +1 -1
  242. package/types/utils/index.d.ts.map +1 -1
  243. package/cjs/components/NumberInput/variations/_segmentation/base_1jt83uh.css +0 -1
  244. package/cjs/components/Slider/components/Single/Single.styles_1r9f1e0.css +0 -6
  245. package/cjs/components/Slider/components/SliderBase/SliderBase.styles_9s4eb3.css +0 -5
  246. package/cjs/components/Slider/ui/Handler/Handler.styles_8crx5z.css +0 -2
  247. package/cjs/components/Slider/ui/Thumb/Thumb.styles_4w4gzn.css +0 -1
  248. package/cjs/components/Slider/variations/_view/base_x642ct.css +0 -1
  249. package/es/components/NumberInput/variations/_segmentation/base_1jt83uh.css +0 -1
  250. package/es/components/Slider/components/Single/Single.styles_1r9f1e0.css +0 -6
  251. package/es/components/Slider/components/SliderBase/SliderBase.styles_9s4eb3.css +0 -5
  252. package/es/components/Slider/ui/Handler/Handler.styles_8crx5z.css +0 -2
  253. package/es/components/Slider/ui/Thumb/Thumb.styles_4w4gzn.css +0 -1
  254. package/es/components/Slider/variations/_view/base_x642ct.css +0 -1
@@ -3,16 +3,19 @@ import type { ComponentProps } from 'react';
3
3
  import styled from 'styled-components';
4
4
  import { disableProps } from '@salutejs/plasma-sb-utils';
5
5
  import type { StoryObj, Meta } from '@storybook/react';
6
- import { action } from '@storybook/addon-actions';
7
6
 
7
+ import { IconMic } from '../../../../components/_Icon';
8
8
  import { WithTheme } from '../../../_helpers';
9
9
 
10
10
  import { Slider } from './Slider';
11
11
 
12
12
  const sizes = ['l', 'm', 's'];
13
+ const pointerSizes = ['small', 'large', 'none'];
13
14
  const views = ['default', 'accent', 'gradient'];
14
- const labelPlacements = ['outer', 'inner'];
15
- const rangeValuesPlacement = ['outer', 'inner'];
15
+ const sliderAligns = ['center', 'left', 'right', 'none'];
16
+ const labelPlacements = ['top', 'left'];
17
+ const scaleAligns = ['side', 'bottom'];
18
+ const orientations: Array<string> = ['vertical', 'horizontal'];
16
19
 
17
20
  const meta: Meta<typeof Slider> = {
18
21
  title: 'plasma_b2c/Slider',
@@ -31,9 +34,24 @@ const meta: Meta<typeof Slider> = {
31
34
  type: 'inline-radio',
32
35
  },
33
36
  },
37
+ pointerSize: {
38
+ options: pointerSizes,
39
+ control: {
40
+ type: 'inline-radio',
41
+ },
42
+ },
43
+ orientation: {
44
+ options: orientations,
45
+ control: {
46
+ type: 'select',
47
+ },
48
+ },
34
49
  ...disableProps([
35
50
  'value',
36
51
  'onChangeCommitted',
52
+ 'onChangeTextField',
53
+ 'onBlurTextField',
54
+ 'onKeyDownTextField',
37
55
  'ariaLabel',
38
56
  'onChange',
39
57
  'fontSizeMultiplier',
@@ -41,6 +59,14 @@ const meta: Meta<typeof Slider> = {
41
59
  'settings',
42
60
  'hasHoverAnimation',
43
61
  'type',
62
+ 'labelContentLeft',
63
+ 'rangeValuesPlacement',
64
+ 'name',
65
+ 'defaultValue',
66
+ 'labelContent',
67
+ 'showRangeValues',
68
+ 'hideMinValueDiff',
69
+ 'hideMaxValueDiff',
44
70
  ]),
45
71
  },
46
72
  };
@@ -53,8 +79,9 @@ type StorySingleProps = StoryProps;
53
79
  type StorySingle = StoryObj<StorySingleProps>;
54
80
  type StoryDouble = StoryObj<StoryProps>;
55
81
 
56
- const SliderWrapper = styled.div`
57
- width: 25rem;
82
+ const SliderWrapper = styled.div<{ isVertical?: boolean }>`
83
+ width: ${({ isVertical }) => (isVertical ? 'auto' : '25rem')};
84
+ height: ${({ isVertical }) => (isVertical ? '25rem' : 'auto')};
58
85
  `;
59
86
 
60
87
  const StoryDefault = (args: StorySingleProps) => {
@@ -68,41 +95,86 @@ const StoryDefault = (args: StorySingleProps) => {
68
95
  setValue(values);
69
96
  };
70
97
 
98
+ const { hasIcon, showIcon, orientation, labelPlacement, labelVerticalPlacement, ...rest } = args;
99
+ const isVertical = orientation === 'vertical';
100
+
71
101
  return (
72
- <SliderWrapper>
73
- <Slider value={value} onChangeCommitted={onChangeCommittedHandle} onChange={onChangeHandle} {...args} />
102
+ <SliderWrapper isVertical={isVertical}>
103
+ <Slider
104
+ value={value}
105
+ orientation={orientation}
106
+ labelPlacement={labelPlacement}
107
+ labelContent={showIcon ? <IconMic size={rest.size === 's' ? 'xs' : 's'} /> : null}
108
+ onChangeCommitted={onChangeCommittedHandle}
109
+ onChange={onChangeHandle}
110
+ {...rest}
111
+ />
74
112
  </SliderWrapper>
75
113
  );
76
114
  };
77
115
 
78
116
  export const Default: StorySingle = {
79
117
  argTypes: {
118
+ sliderAlign: {
119
+ options: sliderAligns,
120
+ control: {
121
+ type: 'inline-radio',
122
+ },
123
+ if: { arg: 'orientation', eq: 'vertical' },
124
+ },
80
125
  labelPlacement: {
81
126
  options: labelPlacements,
82
127
  control: {
83
128
  type: 'inline-radio',
84
129
  },
130
+ if: { arg: 'orientation', eq: 'horizontal' },
131
+ },
132
+ labelReversed: {
133
+ control: {
134
+ type: 'boolean',
135
+ expanded: true,
136
+ },
137
+ if: { arg: 'orientation', eq: 'vertical' },
138
+ },
139
+ scaleAlign: {
140
+ options: scaleAligns,
141
+ control: {
142
+ type: 'inline-radio',
143
+ },
144
+ if: { arg: 'orientation', eq: 'horizontal' },
85
145
  },
86
- rangeValuesPlacement: {
87
- options: rangeValuesPlacement,
146
+ orientation: {
147
+ options: orientations,
88
148
  control: {
89
149
  type: 'inline-radio',
90
150
  },
91
151
  },
152
+ reversed: {
153
+ control: {
154
+ type: 'boolean',
155
+ },
156
+ if: { arg: 'orientation', eq: 'vertical' },
157
+ },
92
158
  },
93
159
  args: {
94
160
  view: 'default',
95
161
  size: 'm',
162
+ pointerSize: 'small',
96
163
  min: 0,
97
164
  max: 100,
98
- disabled: false,
99
- ariaLabel: 'Цена товара',
165
+ orientation: 'horizontal',
166
+ ariaLabel: 'Цена микрофона',
100
167
  multipleStepSize: 10,
101
- label: 'Цена товара',
102
- labelPlacement: 'outer',
103
- rangeValuesPlacement: 'outer',
104
- showRangeValues: true,
168
+ label: 'Цена микрофона',
169
+ labelPlacement: 'top',
170
+ sliderAlign: 'center',
171
+ scaleAlign: 'bottom',
172
+ showScale: true,
105
173
  showCurrentValue: false,
174
+ showIcon: true,
175
+ reversed: false,
176
+ labelReversed: false,
177
+ disabled: false,
106
178
  },
107
179
  render: (args) => <StoryDefault {...args} />,
108
180
  };
@@ -142,7 +214,7 @@ const StoryMultipleValues = (args: StoryProps) => {
142
214
  };
143
215
 
144
216
  return (
145
- <SliderWrapper>
217
+ <SliderWrapper isVertical={args.orientation === 'vertical'}>
146
218
  <Slider
147
219
  value={value}
148
220
  onKeyDownTextField={onKeyDownTextField}
@@ -159,6 +231,7 @@ export const MultipleValues: StoryDouble = {
159
231
  args: {
160
232
  view: 'default',
161
233
  size: 'm',
234
+ pointerSize: 'small',
162
235
  min: 0,
163
236
  max: 100,
164
237
  disabled: false,
@@ -166,5 +239,14 @@ export const MultipleValues: StoryDouble = {
166
239
  ariaLabel: ['Минимальная цена товара', 'Максимальная цена товара'],
167
240
  multipleStepSize: 10,
168
241
  },
242
+ argTypes: {
243
+ pointerSize: {
244
+ options: ['small', 'large'],
245
+ control: {
246
+ type: 'inline-radio',
247
+ },
248
+ },
249
+ ...disableProps(['orientation']),
250
+ },
169
251
  render: (args) => <StoryMultipleValues {...args} />,
170
252
  };
@@ -15,10 +15,10 @@ var config = exports.config = {
15
15
  },
16
16
  variations: {
17
17
  view: {
18
- "default": /*#__PURE__*/(0, _styledComponents.css)(["", ":var(--text-accent);", ":var(--text-negative);", ":var(--surface-negative);", ":var(--text-primary);", ":var(--inverse-text-primary);", ":var(--text-tertiary);", ":var(--on-dark-text-tertiary);", ":var(--surface-accent);", ":var(--surface-accent);", ":var(--surface-solid-default);", ":var(--inverse-text-primary);", ":var(--inverse-text-primary-hover);", ":var(--surface-solid-default);", ":var(--inverse-text-primary);", ":var(--surface-solid-default-hover);", ":var(--inverse-text-primary);", ":var(--surface-solid-default-active);", ":0.4;", ":inherit;", ":inherit;"], _NumberInput.numberInputTokens.caretColor, _NumberInput.numberInputTokens.errorColor, _NumberInput.numberInputTokens.borderErrorColor, _NumberInput.numberInputTokens.color, _NumberInput.numberInputTokens.colorSolid, _NumberInput.numberInputTokens.additionalTextColor, _NumberInput.numberInputTokens.additionalTextColorSolid, _NumberInput.numberInputTokens.borderColorFocus, _NumberInput.numberInputTokens.borderColorSolidFocus, _NumberInput.numberInputTokens.backgroundColorSolid, _NumberInput.numberInputTokens.iconButtonColor, _NumberInput.numberInputTokens.iconButtonColorSolidHover, _NumberInput.numberInputTokens.iconButtonBackgroundColor, _NumberInput.numberInputTokens.iconButtonColorHover, _NumberInput.numberInputTokens.iconButtonBackgroundColorHover, _NumberInput.numberInputTokens.iconButtonColorActive, _NumberInput.numberInputTokens.iconButtonBackgroundColorActive, _NumberInput.numberInputTokens.actionButtonDisabledOpacity, _NumberInput.numberInputTokens.loaderSpinnerColor, _NumberInput.numberInputTokens.loaderSpinnerColorSolid),
19
- secondary: /*#__PURE__*/(0, _styledComponents.css)(["", ":var(--text-accent);", ":var(--text-negative);", ":var(--surface-negative);", ":var(--text-primary);", ":var(--text-primary);", ":var(--text-tertiary);", ":var(--text-tertiary);", ":var(--surface-accent);", ":var(--surface-accent);", ":var(--surface-transparent-secondary);", ":var(--text-primary);", ":var(--text-primary-hover);", ":var(--surface-transparent-secondary);", ":var(--text-primary);", ":var(--surface-transparent-secondary-hover);", ":var(--text-primary);", ":var(--surface-transparent-secondary-active);", ":0.4;", ":inherit;", ":inherit;"], _NumberInput.numberInputTokens.caretColor, _NumberInput.numberInputTokens.errorColor, _NumberInput.numberInputTokens.borderErrorColor, _NumberInput.numberInputTokens.color, _NumberInput.numberInputTokens.colorSolid, _NumberInput.numberInputTokens.additionalTextColor, _NumberInput.numberInputTokens.additionalTextColorSolid, _NumberInput.numberInputTokens.borderColorFocus, _NumberInput.numberInputTokens.borderColorSolidFocus, _NumberInput.numberInputTokens.backgroundColorSolid, _NumberInput.numberInputTokens.iconButtonColor, _NumberInput.numberInputTokens.iconButtonColorSolidHover, _NumberInput.numberInputTokens.iconButtonBackgroundColor, _NumberInput.numberInputTokens.iconButtonColorHover, _NumberInput.numberInputTokens.iconButtonBackgroundColorHover, _NumberInput.numberInputTokens.iconButtonColorActive, _NumberInput.numberInputTokens.iconButtonBackgroundColorActive, _NumberInput.numberInputTokens.actionButtonDisabledOpacity, _NumberInput.numberInputTokens.loaderSpinnerColor, _NumberInput.numberInputTokens.loaderSpinnerColorSolid),
20
- accent: /*#__PURE__*/(0, _styledComponents.css)(["", ":var(--text-accent);", ":var(--inverse-text-primary);", ":var(--text-negative);", ":var(--surface-negative);", ":var(--text-primary);", ":var(--inverse-text-primary);", ":var(--text-tertiary);", ":var(--on-dark-text-tertiary);", ":var(--surface-accent);", ":var(--light-background-primary);", ":var(--surface-accent);", ":var(--inverse-text-primary);", ":var(--inverse-text-primary-hover);", ":var(--surface-accent);", ":var(--inverse-text-primary);", ":var(--surface-accent-hover);", ":var(--inverse-text-primary);", ":var(--surface-accent-active);", ":0.4;", ":inherit;", ":inherit;"], _NumberInput.numberInputTokens.caretColor, _NumberInput.numberInputTokens.caretColorSolid, _NumberInput.numberInputTokens.errorColor, _NumberInput.numberInputTokens.borderErrorColor, _NumberInput.numberInputTokens.color, _NumberInput.numberInputTokens.colorSolid, _NumberInput.numberInputTokens.additionalTextColor, _NumberInput.numberInputTokens.additionalTextColorSolid, _NumberInput.numberInputTokens.borderColorFocus, _NumberInput.numberInputTokens.borderColorSolidFocus, _NumberInput.numberInputTokens.backgroundColorSolid, _NumberInput.numberInputTokens.iconButtonColor, _NumberInput.numberInputTokens.iconButtonColorSolidHover, _NumberInput.numberInputTokens.iconButtonBackgroundColor, _NumberInput.numberInputTokens.iconButtonColorHover, _NumberInput.numberInputTokens.iconButtonBackgroundColorHover, _NumberInput.numberInputTokens.iconButtonColorActive, _NumberInput.numberInputTokens.iconButtonBackgroundColorActive, _NumberInput.numberInputTokens.actionButtonDisabledOpacity, _NumberInput.numberInputTokens.loaderSpinnerColor, _NumberInput.numberInputTokens.loaderSpinnerColorSolid),
21
- clear: /*#__PURE__*/(0, _styledComponents.css)(["", ":var(--text-accent);", ":var(--text-negative);", ":var(--surface-negative);", ":var(--text-primary);", ":var(--text-primary);", ":var(--text-tertiary);", ":var(--text-tertiary);", ":var(--surface-accent);", ":var(--surface-accent);", ":transparent;", ":var(--text-primary);", ":var(--text-primary-hover);", ":transparent;", ":var(--text-primary);", ":transparent;", ":var(--text-primary);", ":transparent;", ":0.4;", ":inherit;", ":inherit;"], _NumberInput.numberInputTokens.caretColor, _NumberInput.numberInputTokens.errorColor, _NumberInput.numberInputTokens.borderErrorColor, _NumberInput.numberInputTokens.color, _NumberInput.numberInputTokens.colorSolid, _NumberInput.numberInputTokens.additionalTextColor, _NumberInput.numberInputTokens.additionalTextColorSolid, _NumberInput.numberInputTokens.borderColorFocus, _NumberInput.numberInputTokens.borderColorSolidFocus, _NumberInput.numberInputTokens.backgroundColorSolid, _NumberInput.numberInputTokens.iconButtonColor, _NumberInput.numberInputTokens.iconButtonColorSolidHover, _NumberInput.numberInputTokens.iconButtonBackgroundColor, _NumberInput.numberInputTokens.iconButtonColorHover, _NumberInput.numberInputTokens.iconButtonBackgroundColorHover, _NumberInput.numberInputTokens.iconButtonColorActive, _NumberInput.numberInputTokens.iconButtonBackgroundColorActive, _NumberInput.numberInputTokens.actionButtonDisabledOpacity, _NumberInput.numberInputTokens.loaderSpinnerColor, _NumberInput.numberInputTokens.loaderSpinnerColorSolid)
18
+ "default": /*#__PURE__*/(0, _styledComponents.css)(["", ":var(--text-accent);", ":var(--text-negative);", ":var(--surface-negative);", ":var(--text-primary);", ":var(--inverse-text-primary);", ":var(--text-tertiary);", ":var(--on-dark-text-tertiary);", ":var(--surface-accent);", ":var(--surface-accent);", ":var(--surface-solid-default);", ":var(--inverse-text-primary);", ":var(--surface-solid-default);", ":var(--inverse-text-primary);", ":var(--inverse-text-primary-hover);", ":var(--surface-solid-default-hover);", ":var(--inverse-text-primary);", ":var(--inverse-text-primary-active);", ":var(--surface-solid-default-active);", ":0.4;", ":inherit;", ":inherit;"], _NumberInput.numberInputTokens.caretColor, _NumberInput.numberInputTokens.errorColor, _NumberInput.numberInputTokens.borderErrorColor, _NumberInput.numberInputTokens.color, _NumberInput.numberInputTokens.colorSolid, _NumberInput.numberInputTokens.additionalTextColor, _NumberInput.numberInputTokens.additionalTextColorSolid, _NumberInput.numberInputTokens.borderColorFocus, _NumberInput.numberInputTokens.borderColorSolidFocus, _NumberInput.numberInputTokens.backgroundColorSolid, _NumberInput.numberInputTokens.iconButtonColor, _NumberInput.numberInputTokens.iconButtonBackgroundColor, _NumberInput.numberInputTokens.iconButtonColorHover, _NumberInput.numberInputTokens.iconButtonColorSolidHover, _NumberInput.numberInputTokens.iconButtonBackgroundColorHover, _NumberInput.numberInputTokens.iconButtonColorActive, _NumberInput.numberInputTokens.iconButtonColorSolidActive, _NumberInput.numberInputTokens.iconButtonBackgroundColorActive, _NumberInput.numberInputTokens.actionButtonDisabledOpacity, _NumberInput.numberInputTokens.loaderSpinnerColor, _NumberInput.numberInputTokens.loaderSpinnerColorSolid),
19
+ secondary: /*#__PURE__*/(0, _styledComponents.css)(["", ":var(--text-accent);", ":var(--text-negative);", ":var(--surface-negative);", ":var(--text-primary);", ":var(--text-primary);", ":var(--text-tertiary);", ":var(--text-tertiary);", ":var(--surface-accent);", ":var(--surface-accent);", ":var(--surface-transparent-secondary);", ":var(--text-primary);", ":var(--surface-transparent-secondary);", ":var(--text-primary);", ":var(--text-primary-hover);", ":var(--surface-transparent-secondary-hover);", ":var(--text-primary);", ":var(--text-primary-active);", ":var(--surface-transparent-secondary-active);", ":0.4;", ":inherit;", ":inherit;"], _NumberInput.numberInputTokens.caretColor, _NumberInput.numberInputTokens.errorColor, _NumberInput.numberInputTokens.borderErrorColor, _NumberInput.numberInputTokens.color, _NumberInput.numberInputTokens.colorSolid, _NumberInput.numberInputTokens.additionalTextColor, _NumberInput.numberInputTokens.additionalTextColorSolid, _NumberInput.numberInputTokens.borderColorFocus, _NumberInput.numberInputTokens.borderColorSolidFocus, _NumberInput.numberInputTokens.backgroundColorSolid, _NumberInput.numberInputTokens.iconButtonColor, _NumberInput.numberInputTokens.iconButtonBackgroundColor, _NumberInput.numberInputTokens.iconButtonColorHover, _NumberInput.numberInputTokens.iconButtonColorSolidHover, _NumberInput.numberInputTokens.iconButtonBackgroundColorHover, _NumberInput.numberInputTokens.iconButtonColorActive, _NumberInput.numberInputTokens.iconButtonColorSolidActive, _NumberInput.numberInputTokens.iconButtonBackgroundColorActive, _NumberInput.numberInputTokens.actionButtonDisabledOpacity, _NumberInput.numberInputTokens.loaderSpinnerColor, _NumberInput.numberInputTokens.loaderSpinnerColorSolid),
20
+ accent: /*#__PURE__*/(0, _styledComponents.css)(["", ":var(--text-accent);", ":var(--inverse-text-primary);", ":var(--text-negative);", ":var(--surface-negative);", ":var(--text-primary);", ":var(--inverse-text-primary);", ":var(--text-tertiary);", ":var(--on-dark-text-tertiary);", ":var(--surface-accent);", ":var(--light-background-primary);", ":var(--surface-accent);", ":var(--inverse-text-primary);", ":var(--surface-accent);", ":var(--inverse-text-primary);", ":var(--inverse-text-primary-hover);", ":var(--surface-accent-hover);", ":var(--inverse-text-primary);", ":var(--inverse-text-primary-active);", ":var(--surface-accent-active);", ":0.4;", ":inherit;", ":inherit;"], _NumberInput.numberInputTokens.caretColor, _NumberInput.numberInputTokens.caretColorSolid, _NumberInput.numberInputTokens.errorColor, _NumberInput.numberInputTokens.borderErrorColor, _NumberInput.numberInputTokens.color, _NumberInput.numberInputTokens.colorSolid, _NumberInput.numberInputTokens.additionalTextColor, _NumberInput.numberInputTokens.additionalTextColorSolid, _NumberInput.numberInputTokens.borderColorFocus, _NumberInput.numberInputTokens.borderColorSolidFocus, _NumberInput.numberInputTokens.backgroundColorSolid, _NumberInput.numberInputTokens.iconButtonColor, _NumberInput.numberInputTokens.iconButtonBackgroundColor, _NumberInput.numberInputTokens.iconButtonColorHover, _NumberInput.numberInputTokens.iconButtonColorSolidHover, _NumberInput.numberInputTokens.iconButtonBackgroundColorHover, _NumberInput.numberInputTokens.iconButtonColorActive, _NumberInput.numberInputTokens.iconButtonColorSolidActive, _NumberInput.numberInputTokens.iconButtonBackgroundColorActive, _NumberInput.numberInputTokens.actionButtonDisabledOpacity, _NumberInput.numberInputTokens.loaderSpinnerColor, _NumberInput.numberInputTokens.loaderSpinnerColorSolid),
21
+ clear: /*#__PURE__*/(0, _styledComponents.css)(["", ":var(--text-accent);", ":var(--text-negative);", ":var(--surface-negative);", ":var(--text-primary);", ":var(--text-primary);", ":var(--text-tertiary);", ":var(--text-tertiary);", ":var(--surface-accent);", ":var(--surface-accent);", ":transparent;", ":var(--text-primary);", ":transparent;", ":var(--text-primary);", ":var(--text-primary-hover);", ":transparent;", ":var(--text-primary);", ":var(--surface-transparent-secondary);", ":transparent;", ":0.4;", ":inherit;", ":inherit;"], _NumberInput.numberInputTokens.caretColor, _NumberInput.numberInputTokens.errorColor, _NumberInput.numberInputTokens.borderErrorColor, _NumberInput.numberInputTokens.color, _NumberInput.numberInputTokens.colorSolid, _NumberInput.numberInputTokens.additionalTextColor, _NumberInput.numberInputTokens.additionalTextColorSolid, _NumberInput.numberInputTokens.borderColorFocus, _NumberInput.numberInputTokens.borderColorSolidFocus, _NumberInput.numberInputTokens.backgroundColorSolid, _NumberInput.numberInputTokens.iconButtonColor, _NumberInput.numberInputTokens.iconButtonBackgroundColor, _NumberInput.numberInputTokens.iconButtonColorHover, _NumberInput.numberInputTokens.iconButtonColorSolidHover, _NumberInput.numberInputTokens.iconButtonBackgroundColorHover, _NumberInput.numberInputTokens.iconButtonColorActive, _NumberInput.numberInputTokens.backgroundColorFocus, _NumberInput.numberInputTokens.iconButtonBackgroundColorActive, _NumberInput.numberInputTokens.actionButtonDisabledOpacity, _NumberInput.numberInputTokens.loaderSpinnerColor, _NumberInput.numberInputTokens.loaderSpinnerColorSolid)
22
22
  },
23
23
  size: {
24
24
  l: /*#__PURE__*/(0, _styledComponents.css)(["", ":11.75rem;", ":3.5rem;", ":3.5rem;", ":1.5rem;", ":var(--plasma-typo-body-l-font-family);", ":var(--plasma-typo-body-l-font-size);", ":var(--plasma-typo-body-l-font-style);", ":var(--plasma-typo-body-l-bold-font-weight);", ":var(--plasma-typo-body-l-letter-spacing);", ":var(--plasma-typo-body-l-line-height);", ":0.875rem;", ":0.375rem;", ":0 0.125rem;", ":0.875rem;", ":3.5rem;", ":0.063rem;", ":1.063rem 1.125rem;", ":var(--plasma-typo-body-l-font-family);", ":var(--plasma-typo-body-l-font-size);", ":var(--plasma-typo-body-l-font-style);", ":var(--plasma-typo-body-l-font-weight);", ":var(--plasma-typo-body-l-letter-spacing);", ":var(--plasma-typo-body-l-line-height);", ":0.25rem;", ":0.25rem;", ":1.375rem;"], _NumberInput.numberInputTokens.rootMinWidth, _NumberInput.numberInputTokens.iconButtonHeight, _NumberInput.numberInputTokens.iconButtonWidth, _NumberInput.numberInputTokens.iconButtonPadding, _NumberInput.numberInputTokens.iconButtonFontFamily, _NumberInput.numberInputTokens.iconButtonFontSize, _NumberInput.numberInputTokens.iconButtonFontStyle, _NumberInput.numberInputTokens.iconButtonFontWeight, _NumberInput.numberInputTokens.iconButtonLetterSpacing, _NumberInput.numberInputTokens.iconButtonLineHeight, _NumberInput.numberInputTokens.iconButtonRadius, _NumberInput.numberInputTokens.iconButtonSegmentationRadius, _NumberInput.numberInputTokens.inputWrapperMargin, _NumberInput.numberInputTokens.inputWrapperBorderRadius, _NumberInput.numberInputTokens.textWrapperHeight, _NumberInput.numberInputTokens.inputWrapperBorderWidth, _NumberInput.numberInputTokens.textWrapperPadding, _NumberInput.numberInputTokens.fontFamily, _NumberInput.numberInputTokens.fontSize, _NumberInput.numberInputTokens.fontStyle, _NumberInput.numberInputTokens.fontWeight, _NumberInput.numberInputTokens.letterSpacing, _NumberInput.numberInputTokens.lineHeight, _NumberInput.numberInputTokens.textBeforeMarginRight, _NumberInput.numberInputTokens.textAfterMarginLeft, _NumberInput.numberInputTokens.loaderSpinnerSize),
@@ -18,9 +18,9 @@ var config = exports.config = {
18
18
  gradient: /*#__PURE__*/(0, _styledComponents.css)(["", ":var(--text-primary);", ":var(--text-secondary);", ":var(--surface-solid-tertiary);", ":var(--on-light-surface-solid-card);", ":var(--surface-accent-gradient);", ":var(--surface-solid-tertiary);", ":var(--surface-accent-gradient);", ":var(--text-secondary);", ":var(--surface-transparent-primary);", ":var(--text-primary);", ":var(--text-secondary);", ":var(--text-primary);", ":var(--text-primary);"], _Slider.sliderTokens.labelColor, _Slider.sliderTokens.rangeValueColor, _Slider.sliderTokens.thumbBorderColor, _Slider.sliderTokens.thumbBackgroundColor, _Slider.sliderTokens.thumbFocusBorderColor, _Slider.sliderTokens.railBackgroundColor, _Slider.sliderTokens.fillColor, _Slider.sliderTokens.textFieldColor, _Slider.sliderTokens.textFieldBackgroundColor, _Slider.sliderTokens.textFieldCaretColor, _Slider.sliderTokens.textFieldPlaceholderColor, _Slider.sliderTokens.textFiledFocusColor, _Slider.sliderTokens.textFieldActiveColor)
19
19
  },
20
20
  size: {
21
- l: /*#__PURE__*/(0, _styledComponents.css)(["", ":1.5rem;", ":0.375rem;", ":0.25rem;", ":0.25rem;", ":0.875rem;", ":var(--plasma-typo-body-l-font-family);", ":var(--plasma-typo-body-l-font-size);", ":var(--plasma-typo-body-l-font-style);", ":var(--plasma-typo-body-l-font-weight);", ":var(--plasma-typo-body-l-letter-spacing);", ":var(--plasma-typo-body-l-line-height);", ":0.75rem;", ":0.75rem;", ":-1.25rem;", ":var(--plasma-typo-body-s-font-family);", ":var(--plasma-typo-body-s-font-size);", ":var(--plasma-typo-body-s-font-style);", ":var(--plasma-typo-body-s-font-weight);", ":var(--plasma-typo-body-s-letter-spacing);", ":var(--plasma-typo-body-s-line-height);", ":1.5rem;", ":0.125rem solid;", ":1.625rem;", ":var(--plasma-typo-text-s-font-family);", ":var(--plasma-typo-text-s-font-size);", ":var(--plasma-typo-text-s-font-style);", ":var(--plasma-typo-text-s-font-weight);", ":var(--plasma-typo-text-s-letter-spacing);", ":var(--plasma-typo-text-s-line-height);", ":0.25rem;", ":0.125rem;", ":0.75rem;", ":0.125rem;", ":3.5rem;", ":1.25rem 1rem 1.25rem 1rem;", ":0.75rem;", ":var(--plasma-typo-body-l-font-family);", ":var(--plasma-typo-body-l-font-size);", ":var(--plasma-typo-body-l-font-style);", ":var(--plasma-typo-body-l-font-weight);", ":var(--plasma-typo-body-l-letter-spacing);", ":var(--plasma-typo-body-l-line-height);"], _Slider.sliderTokens.height, _Slider.sliderTokens.doubleWrapperGap, _Slider.sliderTokens.labelWrapperGap, _Slider.sliderTokens.labelWrapperMarginBottom, _Slider.sliderTokens.labelWrapperMarginRight, _Slider.sliderTokens.labelFontFamily, _Slider.sliderTokens.labelFontSize, _Slider.sliderTokens.labelFontStyle, _Slider.sliderTokens.labelFontWeight, _Slider.sliderTokens.labelLetterSpacing, _Slider.sliderTokens.labelLineHeight, _Slider.sliderTokens.rangeMinValueMargin, _Slider.sliderTokens.rangeMaxValueMargin, _Slider.sliderTokens.rangeValueBottomOffset, _Slider.sliderTokens.rangeValueFontFamily, _Slider.sliderTokens.rangeValueFontSize, _Slider.sliderTokens.rangeValueFontStyle, _Slider.sliderTokens.rangeValueFontWeight, _Slider.sliderTokens.rangeValueLetterSpacing, _Slider.sliderTokens.rangeValueLineHeight, _Slider.sliderTokens.thumbSize, _Slider.sliderTokens.thumbBorder, _Slider.sliderTokens.currentValueTopOffset, _Slider.sliderTokens.currentValueFontFamily, _Slider.sliderTokens.currentValueFontSize, _Slider.sliderTokens.currentValueFontStyle, _Slider.sliderTokens.currentValueFontWeight, _Slider.sliderTokens.currentValueLetterSpacing, _Slider.sliderTokens.currentValueLineHeight, _Slider.sliderTokens.railHeight, _Slider.sliderTokens.railBorderRadius, _Slider.sliderTokens.railIndent, _Slider.sliderTokens.textFieldWrapperGap, _Slider.sliderTokens.textFieldHeight, _Slider.sliderTokens.textFieldPadding, _Slider.sliderTokens.textFieldBorderRadius, _Slider.sliderTokens.textFieldFontFamily, _Slider.sliderTokens.textFieldFontSize, _Slider.sliderTokens.textFieldFontStyle, _Slider.sliderTokens.textFieldFontWeight, _Slider.sliderTokens.textFieldLetterSpacing, _Slider.sliderTokens.textFieldLineHeight),
22
- m: /*#__PURE__*/(0, _styledComponents.css)(["", ":1.5rem;", ":0.375rem;", ":0.25rem;", ":0.25rem;", ":0.875rem;", ":var(--plasma-typo-body-m-font-family);", ":var(--plasma-typo-body-m-font-size);", ":var(--plasma-typo-body-m-font-style);", ":var(--plasma-typo-body-m-font-weight);", ":var(--plasma-typo-body-m-letter-spacing);", ":var(--plasma-typo-body-m-line-height);", ":0.75rem;", ":0.75rem;", ":-1.25rem;", ":var(--plasma-typo-body-s-font-family);", ":var(--plasma-typo-body-s-font-size);", ":var(--plasma-typo-body-s-font-style);", ":var(--plasma-typo-body-s-font-weight);", ":var(--plasma-typo-body-s-letter-spacing);", ":var(--plasma-typo-body-s-line-height);", ":1.5rem;", ":0.125rem solid;", ":1.75rem;", ":var(--plasma-typo-text-xs-font-family);", ":var(--plasma-typo-text-xs-font-size);", ":var(--plasma-typo-text-xs-font-style);", ":var(--plasma-typo-text-xs-font-weight);", ":var(--plasma-typo-text-xs-letter-spacing);", ":var(--plasma-typo-text-xs-line-height);", ":0.25rem;", ":0.125rem;", ":0.75rem;", ":0.125rem;", ":3rem;", ":0.875rem 1rem 0.875rem 1rem;", ":0.75rem;", ":var(--plasma-typo-body-m-font-family);", ":var(--plasma-typo-body-m-font-size);", ":var(--plasma-typo-body-m-font-style);", ":var(--plasma-typo-body-m-font-weight);", ":var(--plasma-typo-body-m-letter-spacing);", ":var(--plasma-typo-body-m-line-height);"], _Slider.sliderTokens.height, _Slider.sliderTokens.doubleWrapperGap, _Slider.sliderTokens.labelWrapperGap, _Slider.sliderTokens.labelWrapperMarginBottom, _Slider.sliderTokens.labelWrapperMarginRight, _Slider.sliderTokens.labelFontFamily, _Slider.sliderTokens.labelFontSize, _Slider.sliderTokens.labelFontStyle, _Slider.sliderTokens.labelFontWeight, _Slider.sliderTokens.labelLetterSpacing, _Slider.sliderTokens.labelLineHeight, _Slider.sliderTokens.rangeMinValueMargin, _Slider.sliderTokens.rangeMaxValueMargin, _Slider.sliderTokens.rangeValueBottomOffset, _Slider.sliderTokens.rangeValueFontFamily, _Slider.sliderTokens.rangeValueFontSize, _Slider.sliderTokens.rangeValueFontStyle, _Slider.sliderTokens.rangeValueFontWeight, _Slider.sliderTokens.rangeValueLetterSpacing, _Slider.sliderTokens.rangeValueLineHeight, _Slider.sliderTokens.thumbSize, _Slider.sliderTokens.thumbBorder, _Slider.sliderTokens.currentValueTopOffset, _Slider.sliderTokens.currentValueFontFamily, _Slider.sliderTokens.currentValueFontSize, _Slider.sliderTokens.currentValueFontStyle, _Slider.sliderTokens.currentValueFontWeight, _Slider.sliderTokens.currentValueLetterSpacing, _Slider.sliderTokens.currentValueLineHeight, _Slider.sliderTokens.railHeight, _Slider.sliderTokens.railBorderRadius, _Slider.sliderTokens.railIndent, _Slider.sliderTokens.textFieldWrapperGap, _Slider.sliderTokens.textFieldHeight, _Slider.sliderTokens.textFieldPadding, _Slider.sliderTokens.textFieldBorderRadius, _Slider.sliderTokens.textFieldFontFamily, _Slider.sliderTokens.textFieldFontSize, _Slider.sliderTokens.textFieldFontStyle, _Slider.sliderTokens.textFieldFontWeight, _Slider.sliderTokens.textFieldLetterSpacing, _Slider.sliderTokens.textFieldLineHeight),
23
- s: /*#__PURE__*/(0, _styledComponents.css)(["", ":1rem;", ":0.375rem;", ":0.25rem;", ":0.25rem;", ":0.875rem;", ":var(--plasma-typo-body-s-font-family);", ":var(--plasma-typo-body-s-font-size);", ":var(--plasma-typo-body-s-font-style);", ":var(--plasma-typo-body-s-font-weight);", ":var(--plasma-typo-body-s-letter-spacing);", ":var(--plasma-typo-body-s-line-height);", ":0.5rem;", ":0.5rem;", ":-1.25rem;", ":var(--plasma-typo-body-xs-font-family);", ":var(--plasma-typo-body-xs-font-size);", ":var(--plasma-typo-body-xs-font-style);", ":var(--plasma-typo-body-xs-font-weight);", ":var(--plasma-typo-body-xs-letter-spacing);", ":var(--plasma-typo-body-xs-line-height);", ":1rem;", ":0.125rem solid;", ":1.25rem;", ":var(--plasma-typo-text-xs-font-family);", ":var(--plasma-typo-text-xs-font-size);", ":var(--plasma-typo-text-xs-font-style);", ":var(--plasma-typo-text-xs-font-weight);", ":var(--plasma-typo-text-xs-letter-spacing);", ":var(--plasma-typo-text-xs-line-height);", ":0.25rem;", ":0.125rem;", ":0.75rem;", ":0.125rem;", ":2.5rem;", ":0.5rem 1rem 0.5rem 1rem;", ":0.625rem;", ":var(--plasma-typo-body-s-font-family);", ":var(--plasma-typo-body-s-font-size);", ":var(--plasma-typo-body-s-font-style);", ":var(--plasma-typo-body-s-font-weight);", ":var(--plasma-typo-body-s-letter-spacing);", ":var(--plasma-typo-body-s-line-height);"], _Slider.sliderTokens.height, _Slider.sliderTokens.doubleWrapperGap, _Slider.sliderTokens.labelWrapperGap, _Slider.sliderTokens.labelWrapperMarginBottom, _Slider.sliderTokens.labelWrapperMarginRight, _Slider.sliderTokens.labelFontFamily, _Slider.sliderTokens.labelFontSize, _Slider.sliderTokens.labelFontStyle, _Slider.sliderTokens.labelFontWeight, _Slider.sliderTokens.labelLetterSpacing, _Slider.sliderTokens.labelLineHeight, _Slider.sliderTokens.rangeMinValueMargin, _Slider.sliderTokens.rangeMaxValueMargin, _Slider.sliderTokens.rangeValueBottomOffset, _Slider.sliderTokens.rangeValueFontFamily, _Slider.sliderTokens.rangeValueFontSize, _Slider.sliderTokens.rangeValueFontStyle, _Slider.sliderTokens.rangeValueFontWeight, _Slider.sliderTokens.rangeValueLetterSpacing, _Slider.sliderTokens.rangeValueLineHeight, _Slider.sliderTokens.thumbSize, _Slider.sliderTokens.thumbBorder, _Slider.sliderTokens.currentValueTopOffset, _Slider.sliderTokens.currentValueFontFamily, _Slider.sliderTokens.currentValueFontSize, _Slider.sliderTokens.currentValueFontStyle, _Slider.sliderTokens.currentValueFontWeight, _Slider.sliderTokens.currentValueLetterSpacing, _Slider.sliderTokens.currentValueLineHeight, _Slider.sliderTokens.railHeight, _Slider.sliderTokens.railBorderRadius, _Slider.sliderTokens.railIndent, _Slider.sliderTokens.textFieldWrapperGap, _Slider.sliderTokens.textFieldHeight, _Slider.sliderTokens.textFieldPadding, _Slider.sliderTokens.textFieldBorderRadius, _Slider.sliderTokens.textFieldFontFamily, _Slider.sliderTokens.textFieldFontSize, _Slider.sliderTokens.textFieldFontStyle, _Slider.sliderTokens.textFieldFontWeight, _Slider.sliderTokens.textFieldLetterSpacing, _Slider.sliderTokens.textFieldLineHeight)
21
+ l: /*#__PURE__*/(0, _styledComponents.css)(["", ":1.5rem;", ":0.375rem;", ":0.25rem;", ":0.25rem;", ":0.875rem;", ":1rem;", ":var(--plasma-typo-body-l-font-family);", ":var(--plasma-typo-body-l-font-size);", ":var(--plasma-typo-body-l-font-style);", ":var(--plasma-typo-body-l-font-weight);", ":var(--plasma-typo-body-l-letter-spacing);", ":var(--plasma-typo-body-l-line-height);", ":0.75rem;", ":0.875rem;", ":0.875rem;", ":0.75rem;", ":var(--plasma-typo-body-m-font-family);", ":var(--plasma-typo-body-m-font-size);", ":var(--plasma-typo-body-m-font-style);", ":var(--plasma-typo-body-m-font-weight);", ":var(--plasma-typo-body-m-letter-spacing);", ":var(--plasma-typo-body-m-line-height);", ":1rem;", ":1.25rem;", ":0.0625rem solid;", ":1.625rem;", ":0.25rem;", ":0.125rem;", ":0.75rem;", ":0.125rem;", ":3.5rem;", ":1.25rem 1rem 1.25rem 1rem;", ":0.75rem;", ":var(--plasma-typo-body-l-font-family);", ":var(--plasma-typo-body-l-font-size);", ":var(--plasma-typo-body-l-font-style);", ":var(--plasma-typo-body-l-font-weight);", ":var(--plasma-typo-body-l-letter-spacing);", ":var(--plasma-typo-body-l-line-height);"], _Slider.sliderTokens.size, _Slider.sliderTokens.doubleWrapperGap, _Slider.sliderTokens.labelWrapperGap, _Slider.sliderTokens.labelWrapperMarginBottom, _Slider.sliderTokens.labelWrapperMarginRight, _Slider.sliderTokens.labelWrapperVerticalMargin, _Slider.sliderTokens.labelFontFamily, _Slider.sliderTokens.labelFontSize, _Slider.sliderTokens.labelFontStyle, _Slider.sliderTokens.labelFontWeight, _Slider.sliderTokens.labelLetterSpacing, _Slider.sliderTokens.labelLineHeight, _Slider.sliderTokens.rangeValueHorizontalMargin, _Slider.sliderTokens.rangeValueBottomOffset, _Slider.sliderTokens.rangeValueHorizontalOffset, _Slider.sliderTokens.rangeValueVerticalMargin, _Slider.sliderTokens.valueFontFamily, _Slider.sliderTokens.valueFontSize, _Slider.sliderTokens.valueFontStyle, _Slider.sliderTokens.valueFontWeight, _Slider.sliderTokens.valueLetterSpacing, _Slider.sliderTokens.valueLineHeight, _Slider.sliderTokens.thumbSize, _Slider.sliderTokens.thumbSizeLarge, _Slider.sliderTokens.thumbBorder, _Slider.sliderTokens.currentValueTopOffset, _Slider.sliderTokens.railThickness, _Slider.sliderTokens.railBorderRadius, _Slider.sliderTokens.railIndent, _Slider.sliderTokens.textFieldWrapperGap, _Slider.sliderTokens.textFieldHeight, _Slider.sliderTokens.textFieldPadding, _Slider.sliderTokens.textFieldBorderRadius, _Slider.sliderTokens.textFieldFontFamily, _Slider.sliderTokens.textFieldFontSize, _Slider.sliderTokens.textFieldFontStyle, _Slider.sliderTokens.textFieldFontWeight, _Slider.sliderTokens.textFieldLetterSpacing, _Slider.sliderTokens.textFieldLineHeight),
22
+ m: /*#__PURE__*/(0, _styledComponents.css)(["", ":1.5rem;", ":0.375rem;", ":0.25rem;", ":0.25rem;", ":0.875rem;", ":0.75rem;", ":var(--plasma-typo-body-m-font-family);", ":var(--plasma-typo-body-m-font-size);", ":var(--plasma-typo-body-m-font-style);", ":var(--plasma-typo-body-m-font-weight);", ":var(--plasma-typo-body-m-letter-spacing);", ":var(--plasma-typo-body-m-line-height);", ":0.75rem;", ":0.75rem;", ":0.875rem;", ":0.625rem;", ":var(--plasma-typo-body-s-font-family);", ":var(--plasma-typo-body-s-font-size);", ":var(--plasma-typo-body-s-font-style);", ":var(--plasma-typo-body-s-font-weight);", ":var(--plasma-typo-body-s-letter-spacing);", ":var(--plasma-typo-body-s-line-height);", ":1rem;", ":1.25rem;", ":0.0625rem solid;", ":1.75rem;", ":0.25rem;", ":0.125rem;", ":0.75rem;", ":0.125rem;", ":3rem;", ":0.875rem 1rem 0.875rem 1rem;", ":0.75rem;", ":var(--plasma-typo-body-m-font-family);", ":var(--plasma-typo-body-m-font-size);", ":var(--plasma-typo-body-m-font-style);", ":var(--plasma-typo-body-m-font-weight);", ":var(--plasma-typo-body-m-letter-spacing);", ":var(--plasma-typo-body-m-line-height);"], _Slider.sliderTokens.size, _Slider.sliderTokens.doubleWrapperGap, _Slider.sliderTokens.labelWrapperGap, _Slider.sliderTokens.labelWrapperMarginBottom, _Slider.sliderTokens.labelWrapperMarginRight, _Slider.sliderTokens.labelWrapperVerticalMargin, _Slider.sliderTokens.labelFontFamily, _Slider.sliderTokens.labelFontSize, _Slider.sliderTokens.labelFontStyle, _Slider.sliderTokens.labelFontWeight, _Slider.sliderTokens.labelLetterSpacing, _Slider.sliderTokens.labelLineHeight, _Slider.sliderTokens.rangeValueHorizontalMargin, _Slider.sliderTokens.rangeValueBottomOffset, _Slider.sliderTokens.rangeValueHorizontalOffset, _Slider.sliderTokens.rangeValueVerticalMargin, _Slider.sliderTokens.valueFontFamily, _Slider.sliderTokens.valueFontSize, _Slider.sliderTokens.valueFontStyle, _Slider.sliderTokens.valueFontWeight, _Slider.sliderTokens.valueLetterSpacing, _Slider.sliderTokens.valueLineHeight, _Slider.sliderTokens.thumbSize, _Slider.sliderTokens.thumbSizeLarge, _Slider.sliderTokens.thumbBorder, _Slider.sliderTokens.currentValueTopOffset, _Slider.sliderTokens.railThickness, _Slider.sliderTokens.railBorderRadius, _Slider.sliderTokens.railIndent, _Slider.sliderTokens.textFieldWrapperGap, _Slider.sliderTokens.textFieldHeight, _Slider.sliderTokens.textFieldPadding, _Slider.sliderTokens.textFieldBorderRadius, _Slider.sliderTokens.textFieldFontFamily, _Slider.sliderTokens.textFieldFontSize, _Slider.sliderTokens.textFieldFontStyle, _Slider.sliderTokens.textFieldFontWeight, _Slider.sliderTokens.textFieldLetterSpacing, _Slider.sliderTokens.textFieldLineHeight),
23
+ s: /*#__PURE__*/(0, _styledComponents.css)(["", ":1rem;", ":0.375rem;", ":0.25rem;", ":0.25rem;", ":0.875rem;", ":0.625rem;", ":var(--plasma-typo-body-s-font-family);", ":var(--plasma-typo-body-s-font-size);", ":var(--plasma-typo-body-s-font-style);", ":var(--plasma-typo-body-s-font-weight);", ":var(--plasma-typo-body-s-letter-spacing);", ":var(--plasma-typo-body-s-line-height);", ":0.5rem;", ":0.625rem;", ":0.625rem;", ":0.5rem;", ":var(--plasma-typo-body-xs-font-family);", ":var(--plasma-typo-body-xs-font-size);", ":var(--plasma-typo-body-xs-font-style);", ":var(--plasma-typo-body-xs-font-weight);", ":var(--plasma-typo-body-xs-letter-spacing);", ":var(--plasma-typo-body-xs-line-height);", ":1rem;", ":1.25rem;", ":0.0625rem solid;", ":1.25rem;", ":0.25rem;", ":0.125rem;", ":0.75rem;", ":0.125rem;", ":2.5rem;", ":0.5rem 1rem 0.5rem 1rem;", ":0.625rem;", ":var(--plasma-typo-body-s-font-family);", ":var(--plasma-typo-body-s-font-size);", ":var(--plasma-typo-body-s-font-style);", ":var(--plasma-typo-body-s-font-weight);", ":var(--plasma-typo-body-s-letter-spacing);", ":var(--plasma-typo-body-s-line-height);"], _Slider.sliderTokens.size, _Slider.sliderTokens.doubleWrapperGap, _Slider.sliderTokens.labelWrapperGap, _Slider.sliderTokens.labelWrapperMarginBottom, _Slider.sliderTokens.labelWrapperMarginRight, _Slider.sliderTokens.labelWrapperVerticalMargin, _Slider.sliderTokens.labelFontFamily, _Slider.sliderTokens.labelFontSize, _Slider.sliderTokens.labelFontStyle, _Slider.sliderTokens.labelFontWeight, _Slider.sliderTokens.labelLetterSpacing, _Slider.sliderTokens.labelLineHeight, _Slider.sliderTokens.rangeValueHorizontalMargin, _Slider.sliderTokens.rangeValueBottomOffset, _Slider.sliderTokens.rangeValueHorizontalOffset, _Slider.sliderTokens.rangeValueVerticalMargin, _Slider.sliderTokens.valueFontFamily, _Slider.sliderTokens.valueFontSize, _Slider.sliderTokens.valueFontStyle, _Slider.sliderTokens.valueFontWeight, _Slider.sliderTokens.valueLetterSpacing, _Slider.sliderTokens.valueLineHeight, _Slider.sliderTokens.thumbSize, _Slider.sliderTokens.thumbSizeLarge, _Slider.sliderTokens.thumbBorder, _Slider.sliderTokens.currentValueTopOffset, _Slider.sliderTokens.railThickness, _Slider.sliderTokens.railBorderRadius, _Slider.sliderTokens.railIndent, _Slider.sliderTokens.textFieldWrapperGap, _Slider.sliderTokens.textFieldHeight, _Slider.sliderTokens.textFieldPadding, _Slider.sliderTokens.textFieldBorderRadius, _Slider.sliderTokens.textFieldFontFamily, _Slider.sliderTokens.textFieldFontSize, _Slider.sliderTokens.textFieldFontStyle, _Slider.sliderTokens.textFieldFontWeight, _Slider.sliderTokens.textFieldLetterSpacing, _Slider.sliderTokens.textFieldLineHeight)
24
24
  },
25
25
  disabled: {
26
26
  "true": /*#__PURE__*/(0, _styledComponents.css)(["", ":0.4;"], _Slider.sliderTokens.disabledOpacity)
@@ -4,14 +4,18 @@ import styled from 'styled-components';
4
4
  import { disableProps } from '@salutejs/plasma-sb-utils';
5
5
  import type { StoryObj, Meta } from '@storybook/react';
6
6
 
7
+ import { IconMic } from '../../../../components/_Icon';
7
8
  import { WithTheme } from '../../../_helpers';
8
9
 
9
10
  import { Slider } from './Slider';
10
11
 
11
12
  const sizes = ['l', 'm', 's'];
13
+ const pointerSizes = ['small', 'large', 'none'];
12
14
  const views = ['default', 'accent', 'gradient'];
13
- const labelPlacements = ['outer', 'inner'];
14
- const rangeValuesPlacement = ['outer', 'inner'];
15
+ const sliderAligns = ['center', 'left', 'right', 'none'];
16
+ const labelPlacements = ['top', 'left'];
17
+ const scaleAligns = ['side', 'bottom'];
18
+ const orientations: Array<string> = ['vertical', 'horizontal'];
15
19
 
16
20
  const meta: Meta<typeof Slider> = {
17
21
  title: 'plasma_web/Slider',
@@ -30,9 +34,24 @@ const meta: Meta<typeof Slider> = {
30
34
  type: 'inline-radio',
31
35
  },
32
36
  },
37
+ pointerSize: {
38
+ options: pointerSizes,
39
+ control: {
40
+ type: 'inline-radio',
41
+ },
42
+ },
43
+ orientation: {
44
+ options: orientations,
45
+ control: {
46
+ type: 'select',
47
+ },
48
+ },
33
49
  ...disableProps([
34
50
  'value',
35
51
  'onChangeCommitted',
52
+ 'onChangeTextField',
53
+ 'onBlurTextField',
54
+ 'onKeyDownTextField',
36
55
  'ariaLabel',
37
56
  'onChange',
38
57
  'fontSizeMultiplier',
@@ -40,6 +59,14 @@ const meta: Meta<typeof Slider> = {
40
59
  'settings',
41
60
  'hasHoverAnimation',
42
61
  'type',
62
+ 'labelContentLeft',
63
+ 'rangeValuesPlacement',
64
+ 'name',
65
+ 'defaultValue',
66
+ 'labelContent',
67
+ 'showRangeValues',
68
+ 'hideMinValueDiff',
69
+ 'hideMaxValueDiff',
43
70
  ]),
44
71
  },
45
72
  };
@@ -52,8 +79,9 @@ type StorySingleProps = StoryProps;
52
79
  type StorySingle = StoryObj<StorySingleProps>;
53
80
  type StoryDouble = StoryObj<StoryProps>;
54
81
 
55
- const SliderWrapper = styled.div`
56
- width: 25rem;
82
+ const SliderWrapper = styled.div<{ isVertical?: boolean }>`
83
+ width: ${({ isVertical }) => (isVertical ? 'auto' : '25rem')};
84
+ height: ${({ isVertical }) => (isVertical ? '25rem' : 'auto')};
57
85
  `;
58
86
 
59
87
  const StoryDefault = (args: StorySingleProps) => {
@@ -67,41 +95,86 @@ const StoryDefault = (args: StorySingleProps) => {
67
95
  setValue(values);
68
96
  };
69
97
 
98
+ const { hasIcon, showIcon, orientation, labelPlacement, labelVerticalPlacement, ...rest } = args;
99
+ const isVertical = orientation === 'vertical';
100
+
70
101
  return (
71
- <SliderWrapper>
72
- <Slider value={value} onChangeCommitted={onChangeCommittedHandle} onChange={onChangeHandle} {...args} />
102
+ <SliderWrapper isVertical={isVertical}>
103
+ <Slider
104
+ value={value}
105
+ orientation={orientation}
106
+ labelPlacement={labelPlacement}
107
+ labelContent={showIcon ? <IconMic size={rest.size === 's' ? 'xs' : 's'} /> : null}
108
+ onChangeCommitted={onChangeCommittedHandle}
109
+ onChange={onChangeHandle}
110
+ {...rest}
111
+ />
73
112
  </SliderWrapper>
74
113
  );
75
114
  };
76
115
 
77
116
  export const Default: StorySingle = {
78
117
  argTypes: {
118
+ sliderAlign: {
119
+ options: sliderAligns,
120
+ control: {
121
+ type: 'inline-radio',
122
+ },
123
+ if: { arg: 'orientation', eq: 'vertical' },
124
+ },
79
125
  labelPlacement: {
80
126
  options: labelPlacements,
81
127
  control: {
82
128
  type: 'inline-radio',
83
129
  },
130
+ if: { arg: 'orientation', eq: 'horizontal' },
131
+ },
132
+ labelReversed: {
133
+ control: {
134
+ type: 'boolean',
135
+ expanded: true,
136
+ },
137
+ if: { arg: 'orientation', eq: 'vertical' },
138
+ },
139
+ scaleAlign: {
140
+ options: scaleAligns,
141
+ control: {
142
+ type: 'inline-radio',
143
+ },
144
+ if: { arg: 'orientation', eq: 'horizontal' },
84
145
  },
85
- rangeValuesPlacement: {
86
- options: rangeValuesPlacement,
146
+ orientation: {
147
+ options: orientations,
87
148
  control: {
88
149
  type: 'inline-radio',
89
150
  },
90
151
  },
152
+ reversed: {
153
+ control: {
154
+ type: 'boolean',
155
+ },
156
+ if: { arg: 'orientation', eq: 'vertical' },
157
+ },
91
158
  },
92
159
  args: {
93
160
  view: 'default',
94
161
  size: 'm',
162
+ pointerSize: 'small',
95
163
  min: 0,
96
164
  max: 100,
97
- disabled: false,
98
- ariaLabel: 'Цена товара',
165
+ orientation: 'horizontal',
166
+ ariaLabel: 'Цена микрофона',
99
167
  multipleStepSize: 10,
100
- label: 'Цена товара',
101
- labelPlacement: 'outer',
102
- rangeValuesPlacement: 'outer',
103
- showRangeValues: true,
168
+ label: 'Цена микрофона',
169
+ labelPlacement: 'top',
170
+ sliderAlign: 'center',
171
+ scaleAlign: 'bottom',
172
+ showScale: true,
104
173
  showCurrentValue: false,
174
+ showIcon: true,
175
+ reversed: false,
176
+ labelReversed: false,
177
+ disabled: false,
105
178
  },
106
179
  render: (args) => <StoryDefault {...args} />,
107
180
  };
@@ -141,7 +214,7 @@ const StoryMultipleValues = (args: StoryProps) => {
141
214
  };
142
215
 
143
216
  return (
144
- <SliderWrapper>
217
+ <SliderWrapper isVertical={args.orientation === 'vertical'}>
145
218
  <Slider
146
219
  value={value}
147
220
  onKeyDownTextField={onKeyDownTextField}
@@ -158,6 +231,7 @@ export const MultipleValues: StoryDouble = {
158
231
  args: {
159
232
  view: 'default',
160
233
  size: 'm',
234
+ pointerSize: 'small',
161
235
  min: 0,
162
236
  max: 100,
163
237
  disabled: false,
@@ -165,5 +239,14 @@ export const MultipleValues: StoryDouble = {
165
239
  ariaLabel: ['Минимальная цена товара', 'Максимальная цена товара'],
166
240
  multipleStepSize: 10,
167
241
  },
242
+ argTypes: {
243
+ pointerSize: {
244
+ options: ['small', 'large'],
245
+ control: {
246
+ type: 'inline-radio',
247
+ },
248
+ },
249
+ ...disableProps(['orientation']),
250
+ },
168
251
  render: (args) => <StoryMultipleValues {...args} />,
169
252
  };
@@ -23,11 +23,12 @@ export var tokens = {
23
23
  disabledOpacity: '--plasma-number-input_disabled-opacity',
24
24
  // Action button view tokens
25
25
  iconButtonColor: '--plasma-number-input_icon-button_color',
26
- iconButtonColorSolidHover: '--plasma-number-input_icon-button_color_solid-hover',
27
26
  iconButtonBackgroundColor: '--plasma-number-input_icon-button_background-color',
28
27
  iconButtonColorHover: '--plasma-number-input_icon-button_color-hover',
28
+ iconButtonColorSolidHover: '--plasma-number-input_icon-button_color_solid-hover',
29
29
  iconButtonBackgroundColorHover: '--plasma-number-input_icon-button_background-color-hover',
30
30
  iconButtonColorActive: '--plasma-number-input_icon-button_color-active',
31
+ iconButtonColorSolidActive: '--plasma-number-input_icon-button_color_solid-active',
31
32
  iconButtonBackgroundColorActive: '--plasma-number-input_icon-button_background-color-active',
32
33
  actionButtonDisabledOpacity: '--plasma-number-input_action-button_disabled-opacity',
33
34
  // Action button size tokens
@@ -176,7 +176,7 @@ export var NumberInput = /*#__PURE__*/forwardRef(function (_ref, ref) {
176
176
  onClick: handleClickInputWrapper
177
177
  }, /*#__PURE__*/React.createElement(TextWrapper, {
178
178
  ref: textWrapperRef
179
- }, textBefore && /*#__PURE__*/React.createElement(AdditionalText, {
179
+ }, !isLoading && textBefore && /*#__PURE__*/React.createElement(AdditionalText, {
180
180
  className: classes.textBefore
181
181
  }, textBefore), isLoading ? /*#__PURE__*/React.createElement(Loader, null, loader || _StyledSpinner || (_StyledSpinner = /*#__PURE__*/React.createElement(StyledSpinner, null))) : /*#__PURE__*/React.createElement(DynamicInput, null, /*#__PURE__*/React.createElement(Input, _extends({
182
182
  ref: inputForkRef,
@@ -192,7 +192,7 @@ export var NumberInput = /*#__PURE__*/forwardRef(function (_ref, ref) {
192
192
  }
193
193
  }, rest)), /*#__PURE__*/React.createElement(InputWidthHelper, {
194
194
  ref: inputHelperRef
195
- }, value)), textAfter && /*#__PURE__*/React.createElement(AdditionalText, {
195
+ }, value)), !isLoading && textAfter && /*#__PURE__*/React.createElement(AdditionalText, {
196
196
  className: classes.textAfter
197
197
  }, textAfter)));
198
198
  });
@@ -3,4 +3,4 @@ import { classes, privateTokens, tokens } from '../../NumberInput.tokens';
3
3
  import { StyledIconButton } from '../../ui/ActionButton/ActionButton.styles';
4
4
  import { AdditionalText, Input, InputWrapper, StyledSpinner } from '../../ui/Input/Input.styles';
5
5
  import { spinnerTokens } from '../../../Spinner';
6
- export var base = /*#__PURE__*/css(["", "{border-radius:var(", ");}", "{", ":var(", ");&.", ",&.", "{", ":var(", ",var(", "));}&.", "{border-radius:var(", ") var(", ") var(", ") var(", ");}&.", "{border-radius:var(", ") var(", ") var(", ") var(", ");}}&.", "{", "{border-radius:var(", ");}}&.", "{position:relative;&:before{content:'';position:absolute;top:0;left:50%;transform:translateX(-50%);width:calc(100% - var(", ") * 2);height:100%;background:var(", ");}", "{position:relative;color:var(", ");&:not(", ").", ":focus-within{background-color:var(", ");box-shadow:inset 0 0 0 var(", ") var(", ");}}", "{:hover,:active{background-color:var(", ");color:var(", ");}&.", ",&.", "{opacity:1;svg{opacity:var(", ");}:hover,:active{color:var(", ");svg{opacity:var(", ");}}}}&.", "{", "{&.", ",&.", "{:hover,:active{background-color:transparent;}}}}", "{", ":var(", ");}", "{caret-color:var(", ",var(", "));&:not(.", "){color:var(", ");}}", "{color:var(", ");}}"], InputWrapper, tokens.inputWrapperBorderRadius, StyledIconButton, privateTokens.segmentationBorderRadius, tokens.iconButtonRadius, classes.segmentedView, classes.solidView, privateTokens.segmentationBorderRadius, tokens.iconButtonSegmentationRadius, tokens.iconButtonRadius, classes.actionButtonDecrement, tokens.iconButtonRadius, privateTokens.segmentationBorderRadius, privateTokens.segmentationBorderRadius, tokens.iconButtonRadius, classes.actionButtonIncrement, privateTokens.segmentationBorderRadius, tokens.iconButtonRadius, tokens.iconButtonRadius, privateTokens.segmentationBorderRadius, classes.segmentedView, InputWrapper, tokens.iconButtonSegmentationRadius, classes.solidView, tokens.iconButtonWidth, tokens.backgroundColorSolid, InputWrapper, tokens.colorSolid, classes.errorAnimation, classes.manualInput, tokens.backgroundColorSolidFocus, tokens.inputWrapperBorderWidth, tokens.borderColorSolidFocus, StyledIconButton, tokens.iconButtonBackgroundColor, tokens.iconButtonColorSolidHover, classes.actionButtonDecrementDisabled, classes.actionButtonIncrementDisabled, tokens.actionButtonDisabledOpacity, tokens.iconButtonColor, tokens.actionButtonDisabledOpacity, classes.clearView, StyledIconButton, classes.actionButtonDecrementDisabled, classes.actionButtonIncrementDisabled, StyledSpinner, spinnerTokens.color, tokens.loaderSpinnerColorSolid, Input, tokens.caretColorSolid, tokens.caretColor, classes.errorAnimation, tokens.colorSolid, AdditionalText, tokens.additionalTextColorSolid);
6
+ export var base = /*#__PURE__*/css(["", "{border-radius:var(", ");}", "{", ":var(", ");&.", ",&.", "{", ":var(", ",var(", "));}&.", "{border-radius:var(", ") var(", ") var(", ") var(", ");}&.", "{border-radius:var(", ") var(", ") var(", ") var(", ");}}&.", "{", "{border-radius:var(", ");}}&.", "{position:relative;&:before{content:'';position:absolute;top:0;left:50%;transform:translateX(-50%);width:calc(100% - var(", ") * 2);height:100%;background:var(", ");}", "{position:relative;color:var(", ");&:not(", ").", ":focus-within{background-color:var(", ");box-shadow:inset 0 0 0 var(", ") var(", ");}}", "{:hover,:active{background-color:var(", ");}:hover{color:var(", ");}:active{color:var(", ");}&.", ",&.", "{opacity:1;svg{opacity:var(", ");}:hover,:active{color:var(", ");svg{opacity:var(", ");}}}}&.", "{", "{&.", ",&.", "{:hover,:active{background-color:transparent;}}}}", "{", ":var(", ");}", "{caret-color:var(", ",var(", "));&:not(.", "){color:var(", ");}}", "{color:var(", ");}}"], InputWrapper, tokens.inputWrapperBorderRadius, StyledIconButton, privateTokens.segmentationBorderRadius, tokens.iconButtonRadius, classes.segmentedView, classes.solidView, privateTokens.segmentationBorderRadius, tokens.iconButtonSegmentationRadius, tokens.iconButtonRadius, classes.actionButtonDecrement, tokens.iconButtonRadius, privateTokens.segmentationBorderRadius, privateTokens.segmentationBorderRadius, tokens.iconButtonRadius, classes.actionButtonIncrement, privateTokens.segmentationBorderRadius, tokens.iconButtonRadius, tokens.iconButtonRadius, privateTokens.segmentationBorderRadius, classes.segmentedView, InputWrapper, tokens.iconButtonSegmentationRadius, classes.solidView, tokens.iconButtonWidth, tokens.backgroundColorSolid, InputWrapper, tokens.colorSolid, classes.errorAnimation, classes.manualInput, tokens.backgroundColorSolidFocus, tokens.inputWrapperBorderWidth, tokens.borderColorSolidFocus, StyledIconButton, tokens.iconButtonBackgroundColor, tokens.iconButtonColorSolidHover, tokens.iconButtonColorSolidActive, classes.actionButtonDecrementDisabled, classes.actionButtonIncrementDisabled, tokens.actionButtonDisabledOpacity, tokens.iconButtonColor, tokens.actionButtonDisabledOpacity, classes.clearView, StyledIconButton, classes.actionButtonDecrementDisabled, classes.actionButtonIncrementDisabled, StyledSpinner, spinnerTokens.color, tokens.loaderSpinnerColorSolid, Input, tokens.caretColorSolid, tokens.caretColor, classes.errorAnimation, tokens.colorSolid, AdditionalText, tokens.additionalTextColorSolid);
@@ -4,10 +4,13 @@ function _objectWithoutProperties(source, excluded) { if (source == null) return
4
4
  function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
5
5
  function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
6
6
  import React, { forwardRef } from 'react';
7
+ import { cx } from '../../utils';
7
8
  import { base as viewCSS } from './variations/_view/base';
8
9
  import { base as sizeCSS } from './variations/_size/base';
9
10
  import { base as disabledCSS } from './variations/_disabled/base';
10
11
  import { SingleSlider, DoubleUncontrolled } from './components';
12
+ import { classes } from './Slider.tokens';
13
+
11
14
  // TODO: проверить, можно ли обойтись без каста типов
12
15
 
13
16
  var isSingleValueProps = function isSingleValueProps(props, type) {
@@ -21,9 +24,15 @@ export var sliderRoot = function sliderRoot(Root) {
21
24
  var _ref$type = _ref.type,
22
25
  type = _ref$type === void 0 ? 'single' : _ref$type,
23
26
  props = _objectWithoutProperties(_ref, _excluded);
24
- return /*#__PURE__*/React.createElement(Root, _extends({}, props, {
27
+ if (isSingleValueProps(props, type)) {
28
+ return /*#__PURE__*/React.createElement(Root, _extends({}, props, {
29
+ className: cx(props.orientation === 'vertical' && classes.verticalOrientation, props.className),
30
+ ref: ref
31
+ }), /*#__PURE__*/React.createElement(SingleSlider, props));
32
+ }
33
+ return /*#__PURE__*/React.createElement(Root, _extends({
25
34
  ref: ref
26
- }), isSingleValueProps(props, type) && /*#__PURE__*/React.createElement(SingleSlider, props), isDoubleValueProps(props, type) && /*#__PURE__*/React.createElement(DoubleUncontrolled, props));
35
+ }, props), isDoubleValueProps(props, type) && /*#__PURE__*/React.createElement(DoubleUncontrolled, props));
27
36
  });
28
37
  };
29
38
  export var sliderConfig = {
@@ -76,3 +76,29 @@ export function App() {
76
76
  );
77
77
  }
78
78
  ```
79
+
80
+ # Вертикальное отображение
81
+
82
+ ```tsx live
83
+ import React from 'react';
84
+ import { Slider } from '@salutejs/{{ package }}';
85
+ import { IconMic } from '@salutejs/plasma-icons';
86
+
87
+ export function App() {
88
+ return (
89
+ <section style={{ height: '300px' }}>
90
+ <Slider
91
+ onChangeCommitted={() => {}}
92
+ min={0}
93
+ max={100}
94
+ value={30}
95
+ label="Громкость"
96
+ labelContent={<IconMic size="s" />}
97
+ orientation="vertical"
98
+ sliderAlign="center"
99
+ size="m"
100
+ />
101
+ </section>
102
+ );
103
+ }
104
+ ```