@salutejs/plasma-new-hope 0.82.1-canary.1210.9186102644.0 → 0.83.0-canary.1194.9174145281.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (332) hide show
  1. package/cjs/components/Combobox/hooks/useFocusController.js +1 -0
  2. package/cjs/components/Combobox/hooks/useFocusController.js.map +1 -1
  3. package/cjs/components/Slider/Slider.css +69 -0
  4. package/cjs/components/Slider/Slider.js +48 -0
  5. package/cjs/components/Slider/Slider.js.map +1 -0
  6. package/cjs/components/Slider/Slider.tokens.js +79 -0
  7. package/cjs/components/Slider/Slider.tokens.js.map +1 -0
  8. package/cjs/components/Slider/components/Double/Double.css +62 -0
  9. package/cjs/components/Slider/components/Double/Double.js +306 -0
  10. package/cjs/components/Slider/components/Double/Double.js.map +1 -0
  11. package/cjs/components/Slider/components/Double/Double.styles.js +61 -0
  12. package/cjs/components/Slider/components/Double/Double.styles.js.map +1 -0
  13. package/cjs/components/Slider/components/Double/Double.styles_1jhda4u.css +7 -0
  14. package/cjs/components/Slider/components/Single/Single.css +16 -0
  15. package/cjs/components/Slider/components/Single/Single.js +164 -0
  16. package/cjs/components/Slider/components/Single/Single.js.map +1 -0
  17. package/cjs/components/Slider/components/Single/Single.styles.js +45 -0
  18. package/cjs/components/Slider/components/Single/Single.styles.js.map +1 -0
  19. package/cjs/components/Slider/components/Single/Single.styles_1r9f1e0.css +6 -0
  20. package/cjs/components/Slider/components/SliderBase/SliderBase.css +4 -0
  21. package/cjs/components/Slider/components/SliderBase/SliderBase.js +82 -0
  22. package/cjs/components/Slider/components/SliderBase/SliderBase.js.map +1 -0
  23. package/cjs/components/Slider/components/SliderBase/SliderBase.styles.js +33 -0
  24. package/cjs/components/Slider/components/SliderBase/SliderBase.styles.js.map +1 -0
  25. package/cjs/components/Slider/components/SliderBase/SliderBase.styles_7is2ll.css +4 -0
  26. package/cjs/components/Slider/ui/Handler/Handler.css +4 -0
  27. package/cjs/components/Slider/ui/Handler/Handler.js +167 -0
  28. package/cjs/components/Slider/ui/Handler/Handler.js.map +1 -0
  29. package/cjs/components/Slider/ui/Handler/Handler.styles.js +21 -0
  30. package/cjs/components/Slider/ui/Handler/Handler.styles.js.map +1 -0
  31. package/cjs/components/Slider/ui/Handler/Handler.styles_8crx5z.css +2 -0
  32. package/cjs/components/Slider/ui/Thumb/Thumb.css +1 -0
  33. package/cjs/components/Slider/ui/Thumb/Thumb.js +31 -0
  34. package/cjs/components/Slider/ui/Thumb/Thumb.js.map +1 -0
  35. package/cjs/components/Slider/ui/Thumb/Thumb.styles.js +15 -0
  36. package/cjs/components/Slider/ui/Thumb/Thumb.styles.js.map +1 -0
  37. package/cjs/components/Slider/ui/Thumb/Thumb.styles_4w4gzn.css +1 -0
  38. package/cjs/components/Slider/utils/index.js +56 -0
  39. package/cjs/components/Slider/utils/index.js.map +1 -0
  40. package/cjs/components/Slider/variations/_disabled/base.js +9 -0
  41. package/cjs/components/Slider/variations/_disabled/base.js.map +1 -0
  42. package/cjs/components/Slider/variations/_disabled/base_x642ct.css +1 -0
  43. package/cjs/components/Slider/variations/_size/base.js +9 -0
  44. package/cjs/components/Slider/variations/_size/base.js.map +1 -0
  45. package/cjs/components/Slider/variations/_size/base_x642ct.css +1 -0
  46. package/cjs/components/Slider/variations/_view/base.js +9 -0
  47. package/cjs/components/Slider/variations/_view/base.js.map +1 -0
  48. package/cjs/components/Slider/variations/_view/base_x642ct.css +1 -0
  49. package/cjs/components/TextField/TextField.js +12 -3
  50. package/cjs/components/TextField/TextField.js.map +1 -1
  51. package/cjs/engines/common.js +4 -0
  52. package/cjs/engines/common.js.map +1 -1
  53. package/cjs/engines/index.js.map +1 -1
  54. package/cjs/hooks/useIsomorphicLayoutEffect.js +15 -0
  55. package/cjs/hooks/useIsomorphicLayoutEffect.js.map +1 -0
  56. package/cjs/index.css +25 -0
  57. package/cjs/index.js +14 -0
  58. package/cjs/index.js.map +1 -1
  59. package/cjs/utils/canUseDOM.js +12 -0
  60. package/cjs/utils/canUseDOM.js.map +1 -0
  61. package/cjs/utils/index.js.map +1 -1
  62. package/es/components/Combobox/hooks/useFocusController.js +1 -0
  63. package/es/components/Combobox/hooks/useFocusController.js.map +1 -1
  64. package/es/components/Slider/Slider.css +69 -0
  65. package/es/components/Slider/Slider.js +43 -0
  66. package/es/components/Slider/Slider.js.map +1 -0
  67. package/es/components/Slider/Slider.tokens.js +74 -0
  68. package/es/components/Slider/Slider.tokens.js.map +1 -0
  69. package/es/components/Slider/components/Double/Double.css +62 -0
  70. package/es/components/Slider/components/Double/Double.js +302 -0
  71. package/es/components/Slider/components/Double/Double.js.map +1 -0
  72. package/es/components/Slider/components/Double/Double.styles.js +51 -0
  73. package/es/components/Slider/components/Double/Double.styles.js.map +1 -0
  74. package/es/components/Slider/components/Double/Double.styles_1jhda4u.css +7 -0
  75. package/es/components/Slider/components/Single/Single.css +16 -0
  76. package/es/components/Slider/components/Single/Single.js +160 -0
  77. package/es/components/Slider/components/Single/Single.js.map +1 -0
  78. package/es/components/Slider/components/Single/Single.styles.js +36 -0
  79. package/es/components/Slider/components/Single/Single.styles.js.map +1 -0
  80. package/es/components/Slider/components/Single/Single.styles_1r9f1e0.css +6 -0
  81. package/es/components/Slider/components/SliderBase/SliderBase.css +4 -0
  82. package/es/components/Slider/components/SliderBase/SliderBase.js +78 -0
  83. package/es/components/Slider/components/SliderBase/SliderBase.js.map +1 -0
  84. package/es/components/Slider/components/SliderBase/SliderBase.styles.js +26 -0
  85. package/es/components/Slider/components/SliderBase/SliderBase.styles.js.map +1 -0
  86. package/es/components/Slider/components/SliderBase/SliderBase.styles_7is2ll.css +4 -0
  87. package/es/components/Slider/ui/Handler/Handler.css +4 -0
  88. package/es/components/Slider/ui/Handler/Handler.js +163 -0
  89. package/es/components/Slider/ui/Handler/Handler.js.map +1 -0
  90. package/es/components/Slider/ui/Handler/Handler.styles.js +16 -0
  91. package/es/components/Slider/ui/Handler/Handler.styles.js.map +1 -0
  92. package/es/components/Slider/ui/Handler/Handler.styles_8crx5z.css +2 -0
  93. package/es/components/Slider/ui/Thumb/Thumb.css +1 -0
  94. package/es/components/Slider/ui/Thumb/Thumb.js +27 -0
  95. package/es/components/Slider/ui/Thumb/Thumb.js.map +1 -0
  96. package/es/components/Slider/ui/Thumb/Thumb.styles.js +11 -0
  97. package/es/components/Slider/ui/Thumb/Thumb.styles.js.map +1 -0
  98. package/es/components/Slider/ui/Thumb/Thumb.styles_4w4gzn.css +1 -0
  99. package/es/components/Slider/utils/index.js +50 -0
  100. package/es/components/Slider/utils/index.js.map +1 -0
  101. package/es/components/Slider/variations/_disabled/base.js +5 -0
  102. package/es/components/Slider/variations/_disabled/base.js.map +1 -0
  103. package/es/components/Slider/variations/_disabled/base_x642ct.css +1 -0
  104. package/es/components/Slider/variations/_size/base.js +5 -0
  105. package/es/components/Slider/variations/_size/base.js.map +1 -0
  106. package/es/components/Slider/variations/_size/base_x642ct.css +1 -0
  107. package/es/components/Slider/variations/_view/base.js +5 -0
  108. package/es/components/Slider/variations/_view/base.js.map +1 -0
  109. package/es/components/Slider/variations/_view/base_x642ct.css +1 -0
  110. package/es/components/TextField/TextField.js +12 -3
  111. package/es/components/TextField/TextField.js.map +1 -1
  112. package/es/engines/common.js +4 -0
  113. package/es/engines/common.js.map +1 -1
  114. package/es/engines/index.js.map +1 -1
  115. package/es/hooks/useIsomorphicLayoutEffect.js +11 -0
  116. package/es/hooks/useIsomorphicLayoutEffect.js.map +1 -0
  117. package/es/index.css +25 -0
  118. package/es/index.js +8 -0
  119. package/es/index.js.map +1 -1
  120. package/es/utils/canUseDOM.js +8 -0
  121. package/es/utils/canUseDOM.js.map +1 -0
  122. package/es/utils/index.js.map +1 -1
  123. package/package.json +3 -2
  124. package/styled-components/cjs/components/Avatar/Avatar.template-doc.mdx +1 -3
  125. package/styled-components/cjs/components/Badge/Badge.template-doc.mdx +9 -9
  126. package/styled-components/cjs/components/Button/Button.template-doc.mdx +9 -8
  127. package/styled-components/cjs/components/Checkbox/Checkbox.template-doc.mdx +2 -2
  128. package/styled-components/cjs/components/Chip/Chip.template-doc.mdx +1 -1
  129. package/styled-components/cjs/components/Combobox/Combobox.template-doc.mdx +14 -14
  130. package/styled-components/cjs/components/Counter/Counter.template-doc.mdx +5 -5
  131. package/styled-components/cjs/components/Drawer/Drawer.template-doc.mdx +3 -3
  132. package/styled-components/cjs/components/Dropdown/Dropdown.template-doc.mdx +261 -262
  133. package/styled-components/cjs/components/Image/Image.template-doc.mdx +1 -1
  134. package/styled-components/cjs/components/Link/Link.template-doc.mdx +4 -4
  135. package/styled-components/cjs/components/Modal/Modal.template-doc.mdx +33 -85
  136. package/styled-components/cjs/components/Notification/Notification.template-doc.mdx +2 -1
  137. package/styled-components/cjs/components/Popover/Popover.template-doc.mdx +3 -3
  138. package/styled-components/cjs/components/Popup/Popup.template-doc.mdx +74 -70
  139. package/styled-components/cjs/components/Radiobox/Radiobox.template-doc.mdx +1 -2
  140. package/styled-components/cjs/components/Segment/Segment.template-doc.mdx +2 -2
  141. package/styled-components/cjs/components/Skeleton/Skeleton.template-doc.mdx +4 -4
  142. package/styled-components/cjs/components/Slider/Slider.js +47 -0
  143. package/styled-components/cjs/components/Slider/Slider.tokens.js +77 -0
  144. package/styled-components/cjs/components/Slider/Slider.types.js +5 -0
  145. package/styled-components/cjs/components/Slider/components/Double/Double.js +318 -0
  146. package/styled-components/cjs/components/Slider/components/Double/Double.styles.js +36 -0
  147. package/styled-components/cjs/components/Slider/components/Double/Double.types.js +5 -0
  148. package/styled-components/cjs/components/Slider/components/Single/Single.js +176 -0
  149. package/styled-components/cjs/components/Slider/components/Single/Single.styles.js +27 -0
  150. package/styled-components/cjs/components/Slider/components/Single/Single.types.js +5 -0
  151. package/styled-components/cjs/components/Slider/components/SliderBase/SliderBase.js +83 -0
  152. package/styled-components/cjs/components/Slider/components/SliderBase/SliderBase.styles.js +21 -0
  153. package/styled-components/cjs/components/Slider/components/SliderBase/SliderBase.types.js +5 -0
  154. package/styled-components/cjs/components/Slider/components/index.js +27 -0
  155. package/styled-components/cjs/components/Slider/index.js +32 -0
  156. package/styled-components/cjs/components/Slider/ui/Handler/Handler.js +176 -0
  157. package/styled-components/cjs/components/Slider/ui/Handler/Handler.styles.js +15 -0
  158. package/styled-components/cjs/components/Slider/ui/Handler/Handler.types.js +5 -0
  159. package/styled-components/cjs/components/Slider/ui/Thumb/Thumb.js +32 -0
  160. package/styled-components/cjs/components/Slider/ui/Thumb/Thumb.styles.js +18 -0
  161. package/styled-components/cjs/components/Slider/ui/Thumb/Thumb.types.js +5 -0
  162. package/styled-components/cjs/components/Slider/ui/index.js +63 -0
  163. package/styled-components/cjs/components/Slider/utils/index.js +55 -0
  164. package/styled-components/cjs/components/Slider/variations/_disabled/base.js +8 -0
  165. package/styled-components/cjs/components/Slider/variations/_disabled/tokens.json +4 -0
  166. package/styled-components/cjs/components/Slider/variations/_size/base.js +8 -0
  167. package/styled-components/cjs/components/Slider/variations/_size/tokens.json +0 -0
  168. package/styled-components/cjs/components/Slider/variations/_view/base.js +8 -0
  169. package/styled-components/cjs/components/Slider/variations/_view/tokens.json +0 -0
  170. package/styled-components/cjs/components/Tabs/Tabs.template-doc.mdx +1 -1
  171. package/styled-components/cjs/components/TextField/TextField.js +12 -3
  172. package/styled-components/cjs/components/TextField/TextField.template-doc.mdx +2 -2
  173. package/styled-components/cjs/engines/common.js +4 -0
  174. package/styled-components/cjs/examples/plasma_b2c/components/Slider/Slider.config.js +29 -0
  175. package/styled-components/cjs/examples/plasma_b2c/components/Slider/Slider.js +16 -0
  176. package/styled-components/cjs/examples/plasma_b2c/components/Slider/Slider.stories.tsx +169 -0
  177. package/styled-components/cjs/examples/plasma_web/components/Slider/Slider.config.js +29 -0
  178. package/styled-components/cjs/examples/plasma_web/components/Slider/Slider.js +16 -0
  179. package/styled-components/cjs/examples/plasma_web/components/Slider/Slider.stories.tsx +168 -0
  180. package/styled-components/cjs/hooks/index.js +8 -1
  181. package/styled-components/cjs/hooks/useIsomorphicLayoutEffect.js +12 -0
  182. package/styled-components/cjs/index.js +11 -0
  183. package/styled-components/cjs/utils/canUseDOM.js +11 -0
  184. package/styled-components/cjs/utils/index.js +7 -0
  185. package/styled-components/es/components/Avatar/Avatar.template-doc.mdx +1 -3
  186. package/styled-components/es/components/Badge/Badge.template-doc.mdx +9 -9
  187. package/styled-components/es/components/Button/Button.template-doc.mdx +9 -8
  188. package/styled-components/es/components/Checkbox/Checkbox.template-doc.mdx +2 -2
  189. package/styled-components/es/components/Chip/Chip.template-doc.mdx +1 -1
  190. package/styled-components/es/components/Combobox/Combobox.template-doc.mdx +14 -14
  191. package/styled-components/es/components/Counter/Counter.template-doc.mdx +5 -5
  192. package/styled-components/es/components/Drawer/Drawer.template-doc.mdx +3 -3
  193. package/styled-components/es/components/Dropdown/Dropdown.template-doc.mdx +261 -262
  194. package/styled-components/es/components/Image/Image.template-doc.mdx +1 -1
  195. package/styled-components/es/components/Link/Link.template-doc.mdx +4 -4
  196. package/styled-components/es/components/Modal/Modal.template-doc.mdx +33 -85
  197. package/styled-components/es/components/Notification/Notification.template-doc.mdx +2 -1
  198. package/styled-components/es/components/Popover/Popover.template-doc.mdx +3 -3
  199. package/styled-components/es/components/Popup/Popup.template-doc.mdx +74 -70
  200. package/styled-components/es/components/Radiobox/Radiobox.template-doc.mdx +1 -2
  201. package/styled-components/es/components/Segment/Segment.template-doc.mdx +2 -2
  202. package/styled-components/es/components/Skeleton/Skeleton.template-doc.mdx +4 -4
  203. package/styled-components/es/components/Slider/Slider.js +38 -0
  204. package/styled-components/es/components/Slider/Slider.tokens.js +71 -0
  205. package/styled-components/es/components/Slider/Slider.types.js +1 -0
  206. package/styled-components/es/components/Slider/components/Double/Double.js +310 -0
  207. package/styled-components/es/components/Slider/components/Double/Double.styles.js +29 -0
  208. package/styled-components/es/components/Slider/components/Double/Double.types.js +1 -0
  209. package/styled-components/es/components/Slider/components/Single/Single.js +168 -0
  210. package/styled-components/es/components/Slider/components/Single/Single.styles.js +20 -0
  211. package/styled-components/es/components/Slider/components/Single/Single.types.js +1 -0
  212. package/styled-components/es/components/Slider/components/SliderBase/SliderBase.js +74 -0
  213. package/styled-components/es/components/Slider/components/SliderBase/SliderBase.styles.js +14 -0
  214. package/styled-components/es/components/Slider/components/SliderBase/SliderBase.types.js +1 -0
  215. package/styled-components/es/components/Slider/components/index.js +3 -0
  216. package/styled-components/es/components/Slider/index.js +3 -0
  217. package/styled-components/es/components/Slider/ui/Handler/Handler.js +167 -0
  218. package/styled-components/es/components/Slider/ui/Handler/Handler.styles.js +8 -0
  219. package/styled-components/es/components/Slider/ui/Handler/Handler.types.js +1 -0
  220. package/styled-components/es/components/Slider/ui/Thumb/Thumb.js +25 -0
  221. package/styled-components/es/components/Slider/ui/Thumb/Thumb.styles.js +11 -0
  222. package/styled-components/es/components/Slider/ui/Thumb/Thumb.types.js +1 -0
  223. package/styled-components/es/components/Slider/ui/index.js +5 -0
  224. package/styled-components/es/components/Slider/utils/index.js +47 -0
  225. package/styled-components/es/components/Slider/variations/_disabled/base.js +2 -0
  226. package/styled-components/es/components/Slider/variations/_disabled/tokens.json +4 -0
  227. package/styled-components/es/components/Slider/variations/_size/base.js +2 -0
  228. package/styled-components/es/components/Slider/variations/_size/tokens.json +0 -0
  229. package/styled-components/es/components/Slider/variations/_view/base.js +2 -0
  230. package/styled-components/es/components/Slider/variations/_view/tokens.json +0 -0
  231. package/styled-components/es/components/Tabs/Tabs.template-doc.mdx +1 -1
  232. package/styled-components/es/components/TextField/TextField.js +12 -3
  233. package/styled-components/es/components/TextField/TextField.template-doc.mdx +2 -2
  234. package/styled-components/es/engines/common.js +4 -0
  235. package/styled-components/es/examples/plasma_b2c/components/Slider/Slider.config.js +23 -0
  236. package/styled-components/es/examples/plasma_b2c/components/Slider/Slider.js +10 -0
  237. package/styled-components/es/examples/plasma_b2c/components/Slider/Slider.stories.tsx +169 -0
  238. package/styled-components/es/examples/plasma_web/components/Slider/Slider.config.js +23 -0
  239. package/styled-components/es/examples/plasma_web/components/Slider/Slider.js +10 -0
  240. package/styled-components/es/examples/plasma_web/components/Slider/Slider.stories.tsx +168 -0
  241. package/styled-components/es/hooks/index.js +2 -1
  242. package/styled-components/es/hooks/useIsomorphicLayoutEffect.js +7 -0
  243. package/styled-components/es/index.js +2 -1
  244. package/styled-components/es/utils/canUseDOM.js +5 -0
  245. package/styled-components/es/utils/index.js +1 -0
  246. package/types/components/Slider/Slider.d.ts +27 -0
  247. package/types/components/Slider/Slider.d.ts.map +1 -0
  248. package/types/components/Slider/Slider.tokens.d.ts +72 -0
  249. package/types/components/Slider/Slider.tokens.d.ts.map +1 -0
  250. package/types/components/Slider/Slider.types.d.ts +3 -0
  251. package/types/components/Slider/Slider.types.d.ts.map +1 -0
  252. package/types/components/Slider/components/Double/Double.d.ts +4 -0
  253. package/types/components/Slider/components/Double/Double.d.ts.map +1 -0
  254. package/types/components/Slider/components/Double/Double.styles.d.ts +43 -0
  255. package/types/components/Slider/components/Double/Double.styles.d.ts.map +1 -0
  256. package/types/components/Slider/components/Double/Double.types.d.ts +65 -0
  257. package/types/components/Slider/components/Double/Double.types.d.ts.map +1 -0
  258. package/types/components/Slider/components/Single/Single.d.ts +4 -0
  259. package/types/components/Slider/components/Single/Single.d.ts.map +1 -0
  260. package/types/components/Slider/components/Single/Single.styles.d.ts +8 -0
  261. package/types/components/Slider/components/Single/Single.styles.d.ts.map +1 -0
  262. package/types/components/Slider/components/Single/Single.types.d.ts +55 -0
  263. package/types/components/Slider/components/Single/Single.types.d.ts.map +1 -0
  264. package/types/components/Slider/components/SliderBase/SliderBase.d.ts +4 -0
  265. package/types/components/Slider/components/SliderBase/SliderBase.d.ts.map +1 -0
  266. package/types/components/Slider/components/SliderBase/SliderBase.styles.d.ts +6 -0
  267. package/types/components/Slider/components/SliderBase/SliderBase.styles.d.ts.map +1 -0
  268. package/types/components/Slider/components/SliderBase/SliderBase.types.d.ts +45 -0
  269. package/types/components/Slider/components/SliderBase/SliderBase.types.d.ts.map +1 -0
  270. package/types/components/Slider/components/index.d.ts +6 -0
  271. package/types/components/Slider/components/index.d.ts.map +1 -0
  272. package/types/components/Slider/index.d.ts +6 -0
  273. package/types/components/Slider/index.d.ts.map +1 -0
  274. package/types/components/Slider/ui/Handler/Handler.d.ts +9 -0
  275. package/types/components/Slider/ui/Handler/Handler.d.ts.map +1 -0
  276. package/types/components/Slider/ui/Handler/Handler.styles.d.ts +4 -0
  277. package/types/components/Slider/ui/Handler/Handler.styles.d.ts.map +1 -0
  278. package/types/components/Slider/ui/Handler/Handler.types.d.ts +24 -0
  279. package/types/components/Slider/ui/Handler/Handler.types.d.ts.map +1 -0
  280. package/types/components/Slider/ui/Thumb/Thumb.d.ts +4 -0
  281. package/types/components/Slider/ui/Thumb/Thumb.d.ts.map +1 -0
  282. package/types/components/Slider/ui/Thumb/Thumb.styles.d.ts +5 -0
  283. package/types/components/Slider/ui/Thumb/Thumb.styles.d.ts.map +1 -0
  284. package/types/components/Slider/ui/Thumb/Thumb.types.d.ts +12 -0
  285. package/types/components/Slider/ui/Thumb/Thumb.types.d.ts.map +1 -0
  286. package/types/components/Slider/ui/index.d.ts +6 -0
  287. package/types/components/Slider/ui/index.d.ts.map +1 -0
  288. package/types/components/Slider/utils/index.d.ts +33 -0
  289. package/types/components/Slider/utils/index.d.ts.map +1 -0
  290. package/types/components/Slider/variations/_disabled/base.d.ts +2 -0
  291. package/types/components/Slider/variations/_disabled/base.d.ts.map +1 -0
  292. package/types/components/Slider/variations/_size/base.d.ts +2 -0
  293. package/types/components/Slider/variations/_size/base.d.ts.map +1 -0
  294. package/types/components/Slider/variations/_view/base.d.ts +2 -0
  295. package/types/components/Slider/variations/_view/base.d.ts.map +1 -0
  296. package/types/components/TextField/TextField.d.ts.map +1 -1
  297. package/types/engines/common.d.ts +3 -3
  298. package/types/engines/common.d.ts.map +1 -1
  299. package/types/engines/index.d.ts +1 -1
  300. package/types/engines/index.d.ts.map +1 -1
  301. package/types/engines/types.d.ts +4 -0
  302. package/types/engines/types.d.ts.map +1 -1
  303. package/types/examples/plasma_b2c/components/Slider/Slider.config.d.ts +22 -0
  304. package/types/examples/plasma_b2c/components/Slider/Slider.config.d.ts.map +1 -0
  305. package/types/examples/plasma_b2c/components/Slider/Slider.d.ts +21 -0
  306. package/types/examples/plasma_b2c/components/Slider/Slider.d.ts.map +1 -0
  307. package/types/examples/plasma_web/components/Slider/Slider.config.d.ts +22 -0
  308. package/types/examples/plasma_web/components/Slider/Slider.config.d.ts.map +1 -0
  309. package/types/examples/plasma_web/components/Slider/Slider.d.ts +21 -0
  310. package/types/examples/plasma_web/components/Slider/Slider.d.ts.map +1 -0
  311. package/types/hooks/index.d.ts +1 -0
  312. package/types/hooks/index.d.ts.map +1 -1
  313. package/types/hooks/useIsomorphicLayoutEffect.d.ts +6 -0
  314. package/types/hooks/useIsomorphicLayoutEffect.d.ts.map +1 -0
  315. package/types/index.d.ts +1 -0
  316. package/types/index.d.ts.map +1 -1
  317. package/types/utils/canUseDOM.d.ts +6 -0
  318. package/types/utils/canUseDOM.d.ts.map +1 -0
  319. package/types/utils/index.d.ts +1 -0
  320. package/types/utils/index.d.ts.map +1 -1
  321. package/styled-components/cjs/components/Cell/Cell.template-doc.mdx +0 -68
  322. package/styled-components/cjs/components/Divider/Divider.template-docs.mdx +0 -57
  323. package/styled-components/cjs/components/IconButton/IconButton.template-doc.mdx +0 -156
  324. package/styled-components/cjs/components/Pagination/Pagination.template-doc.mdx +0 -130
  325. package/styled-components/cjs/components/Progress/Progress.template-doc.mdx +0 -33
  326. package/styled-components/cjs/components/Toolbar/Toolbar.template-doc.mdx +0 -120
  327. package/styled-components/es/components/Cell/Cell.template-doc.mdx +0 -68
  328. package/styled-components/es/components/Divider/Divider.template-docs.mdx +0 -57
  329. package/styled-components/es/components/IconButton/IconButton.template-doc.mdx +0 -156
  330. package/styled-components/es/components/Pagination/Pagination.template-doc.mdx +0 -130
  331. package/styled-components/es/components/Progress/Progress.template-doc.mdx +0 -33
  332. package/styled-components/es/components/Toolbar/Toolbar.template-doc.mdx +0 -120
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Single.js","sources":["../../../../../src/components/Slider/components/Single/Single.tsx"],"sourcesContent":["import React, { useCallback, useEffect, useState, useRef } from 'react';\nimport type { FC } from 'react';\n\nimport { SliderBase } from '../SliderBase/SliderBase';\nimport { Handler } from '../../ui';\nimport { sizeData } from '../../utils';\nimport type { HandlerProps } from '../../ui';\nimport { cx, isNumber } from '../../../../utils';\nimport { classes } from '../../Slider.tokens';\n\nimport type { SingleSliderProps } from './Single.types';\nimport {\n Label,\n LabelContentLeft,\n LabelWrapper,\n SingleWrapper,\n SliderBaseWrapper,\n StyledRangeValue,\n} from './Single.styles';\n\nexport const SingleSlider: FC<SingleSliderProps> = ({\n min,\n max,\n value,\n disabled,\n onChangeCommitted,\n onChange,\n ariaLabel,\n label,\n labelContentLeft,\n showRangeValues,\n showCurrentValue,\n hideMinValueDiff,\n hideMaxValueDiff,\n labelPlacement = 'outer',\n rangeValuesPlacement = 'outer',\n multipleStepSize = 10,\n size = 'm',\n ...rest\n}) => {\n const [state, setState] = useState({\n xHandle: 0,\n stepSize: 0,\n railFillWidth: 0,\n });\n\n const [startOffset, setStartOffset] = useState(0);\n const [endOffset, setEndOffset] = useState(0);\n\n const [dragValue, setDragValue] = useState(value);\n\n const { stepSize } = state;\n\n const hasLabelContent = label || labelContentLeft;\n const labelPlacementClass = labelPlacement === 'outer' ? classes.labelPlacementOuter : classes.labelPlacementInner;\n const rangeValuesPlacementClass =\n rangeValuesPlacement === 'outer' ? classes.rangeValuesPlacementOuter : classes.rangeValuesPlacementInner;\n const hideMinValueDiffClass = hideMinValueDiff && value - min <= hideMinValueDiff ? classes.hideMinValue : '';\n const hideMaxValueDiffClass = hideMaxValueDiff && max - value <= hideMaxValueDiff ? classes.hideMaxValue : '';\n\n const startLabelRef = useRef<HTMLDivElement>(null);\n const endLabelRef = useRef<HTMLDivElement>(null);\n\n const activeFirstValue = dragValue === min ? classes.activeRangeValue : undefined;\n const activeSecondValue = dragValue === max ? classes.activeRangeValue : undefined;\n\n useEffect(() => {\n const localValue = Math.min(Math.max(value, min), max) - min;\n\n if (rangeValuesPlacement === 'outer') {\n const startWidth = startLabelRef.current?.offsetWidth;\n if (isNumber(startWidth)) {\n setStartOffset(Number(startWidth));\n }\n\n const endWidth = endLabelRef.current?.offsetWidth;\n if (isNumber(endWidth)) {\n setEndOffset(Number(endWidth));\n }\n } else {\n setStartOffset(1);\n setEndOffset(1);\n }\n\n setState((prevState) => ({\n ...prevState,\n xHandle: stepSize * localValue,\n railFillWidth: stepSize * localValue,\n }));\n }, [value, labelPlacement, stepSize, rangeValuesPlacement, min, max, setStartOffset, setEndOffset]);\n\n const setStepSize = useCallback(\n (newStepSize: number) => {\n setState((prevState) => ({\n ...prevState,\n stepSize: newStepSize,\n }));\n },\n [setState],\n );\n\n const onHandleChange: NonNullable<HandlerProps['onChange']> = (handleValue, data) => {\n const newHandleXPosition = data.x;\n const newValue = Math.round(handleValue);\n\n setState((prevState) => ({\n ...prevState,\n railFillWidth: newHandleXPosition,\n }));\n\n if (onChange) {\n onChange(newValue);\n }\n\n setDragValue(newValue);\n };\n\n const onHandleChangeCommitted: NonNullable<HandlerProps['onChangeCommitted']> = (handleValue, data) => {\n const newValue = Math.round(handleValue);\n\n if (onChangeCommitted) {\n onChangeCommitted(newValue);\n }\n\n setState((prevState) => ({\n ...prevState,\n xHandle: data.lastX,\n railFillWidth: data.lastX,\n }));\n\n setDragValue(newValue);\n };\n\n return (\n <SingleWrapper className={labelPlacementClass}>\n {hasLabelContent && (\n <LabelWrapper>\n {labelContentLeft && <LabelContentLeft>{labelContentLeft}</LabelContentLeft>}\n {label && <Label>{label}</Label>}\n </LabelWrapper>\n )}\n <SliderBaseWrapper className={rangeValuesPlacementClass}>\n {showRangeValues && (\n <StyledRangeValue ref={startLabelRef} className={cx(hideMinValueDiffClass, activeFirstValue)}>\n {min}\n </StyledRangeValue>\n )}\n <SliderBase\n min={min}\n max={max}\n disabled={disabled}\n setStepSize={setStepSize}\n onChange={onHandleChangeCommitted}\n railFillWidth={state.railFillWidth}\n settings={sizeData[size]}\n labelPlacement={labelPlacement}\n rangeValuesPlacement={rangeValuesPlacement}\n {...rest}\n >\n <Handler\n stepSize={state.stepSize}\n onChangeCommitted={onHandleChangeCommitted}\n onChange={onHandleChange}\n xPosition={state.xHandle}\n min={min}\n max={max}\n startOffset={startOffset}\n endOffset={endOffset}\n value={dragValue}\n disabled={disabled}\n ariaLabel={ariaLabel}\n multipleStepSize={multipleStepSize}\n showCurrentValue={showCurrentValue}\n />\n </SliderBase>\n {showRangeValues && (\n <StyledRangeValue\n ref={endLabelRef}\n className={cx(classes.maxRangeValue, hideMaxValueDiffClass, activeSecondValue)}\n >\n {max}\n </StyledRangeValue>\n )}\n </SliderBaseWrapper>\n </SingleWrapper>\n );\n};\n"],"names":["SingleSlider","_ref","min","max","value","disabled","onChangeCommitted","onChange","ariaLabel","label","labelContentLeft","showRangeValues","showCurrentValue","hideMinValueDiff","hideMaxValueDiff","_ref$labelPlacement","labelPlacement","_ref$rangeValuesPlace","rangeValuesPlacement","_ref$multipleStepSize","multipleStepSize","_ref$size","size","rest","_objectWithoutProperties","_excluded","_useState","useState","xHandle","stepSize","railFillWidth","_useState2","_slicedToArray","state","setState","_useState3","_useState4","startOffset","setStartOffset","_useState5","_useState6","endOffset","setEndOffset","_useState7","_useState8","dragValue","setDragValue","hasLabelContent","labelPlacementClass","classes","labelPlacementOuter","labelPlacementInner","rangeValuesPlacementClass","rangeValuesPlacementOuter","rangeValuesPlacementInner","hideMinValueDiffClass","hideMinValue","hideMaxValueDiffClass","hideMaxValue","startLabelRef","useRef","endLabelRef","activeFirstValue","activeRangeValue","undefined","activeSecondValue","useEffect","localValue","Math","_startLabelRef$curren","_endLabelRef$current","startWidth","current","offsetWidth","isNumber","Number","endWidth","prevState","_objectSpread","setStepSize","useCallback","newStepSize","onHandleChange","handleValue","data","newHandleXPosition","x","newValue","round","onHandleChangeCommitted","lastX","React","createElement","SingleWrapper","className","LabelWrapper","LabelContentLeft","Label","SliderBaseWrapper","StyledRangeValue","ref","cx","SliderBase","_extends","settings","sizeData","Handler","xPosition","maxRangeValue"],"mappings":";;;;;;;;;;;;IAoBaA,YAAmC,GAAG,SAAtCA,YAAmCA,CAAAC,IAAA,EAmB1C;AAAA,EAAA,IAlBFC,GAAG,GAAAD,IAAA,CAAHC,GAAG;IACHC,GAAG,GAAAF,IAAA,CAAHE,GAAG;IACHC,KAAK,GAAAH,IAAA,CAALG,KAAK;IACLC,QAAQ,GAAAJ,IAAA,CAARI,QAAQ;IACRC,iBAAiB,GAAAL,IAAA,CAAjBK,iBAAiB;IACjBC,QAAQ,GAAAN,IAAA,CAARM,QAAQ;IACRC,SAAS,GAAAP,IAAA,CAATO,SAAS;IACTC,KAAK,GAAAR,IAAA,CAALQ,KAAK;IACLC,gBAAgB,GAAAT,IAAA,CAAhBS,gBAAgB;IAChBC,eAAe,GAAAV,IAAA,CAAfU,eAAe;IACfC,gBAAgB,GAAAX,IAAA,CAAhBW,gBAAgB;IAChBC,gBAAgB,GAAAZ,IAAA,CAAhBY,gBAAgB;IAChBC,gBAAgB,GAAAb,IAAA,CAAhBa,gBAAgB;IAAAC,mBAAA,GAAAd,IAAA,CAChBe,cAAc;AAAdA,IAAAA,cAAc,GAAAD,mBAAA,KAAG,KAAA,CAAA,GAAA,OAAO,GAAAA,mBAAA;IAAAE,qBAAA,GAAAhB,IAAA,CACxBiB,oBAAoB;AAApBA,IAAAA,oBAAoB,GAAAD,qBAAA,KAAG,KAAA,CAAA,GAAA,OAAO,GAAAA,qBAAA;IAAAE,qBAAA,GAAAlB,IAAA,CAC9BmB,gBAAgB;AAAhBA,IAAAA,gBAAgB,GAAAD,qBAAA,KAAG,KAAA,CAAA,GAAA,EAAE,GAAAA,qBAAA;IAAAE,SAAA,GAAApB,IAAA,CACrBqB,IAAI;AAAJA,IAAAA,IAAI,GAAAD,SAAA,KAAG,KAAA,CAAA,GAAA,GAAG,GAAAA,SAAA;AACPE,IAAAA,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;AACzB1B,IAAAA,GAAG,EAAEA,GAAI;AACTC,IAAAA,GAAG,EAAEA,GAAI;AACTkC,IAAAA,WAAW,EAAEA,WAAY;AACzBI,IAAAA,SAAS,EAAEA,SAAU;AACrBrC,IAAAA,KAAK,EAAEyC,SAAU;AACjBxC,IAAAA,QAAQ,EAAEA,QAAS;AACnBG,IAAAA,SAAS,EAAEA,SAAU;AACrBY,IAAAA,gBAAgB,EAAEA,gBAAiB;AACnCR,IAAAA,gBAAgB,EAAEA,gBAAAA;GACrB,CACO,CAAC,EACZD,eAAe,iBACZgF,KAAA,CAAAC,aAAA,CAACO,gBAAgB,EAAA;AACbC,IAAAA,GAAG,EAAEvC,WAAY;IACjBiC,SAAS,EAAEO,EAAE,CAACpD,OAAO,CAAC2D,aAAa,EAAEnD,qBAAqB,EAAEQ,iBAAiB,CAAA;GAE5E9D,EAAAA,GACa,CAEP,CACR,CAAC,CAAA;AAExB;;;;"}
@@ -0,0 +1,36 @@
1
+ import './Single.styles_1r9f1e0.css';
2
+ import { styled } from '@linaria/react';
3
+
4
+ var LabelWrapper = /*#__PURE__*/styled('div')({
5
+ name: "LabelWrapper",
6
+ "class": "l1p4kc08",
7
+ propsAsIs: false
8
+ });
9
+ var LabelContentLeft = /*#__PURE__*/styled('div')({
10
+ name: "LabelContentLeft",
11
+ "class": "ly2gexi",
12
+ propsAsIs: false
13
+ });
14
+ var Label = /*#__PURE__*/styled('label')({
15
+ name: "Label",
16
+ "class": "lozb535",
17
+ propsAsIs: false
18
+ });
19
+ var StyledRangeValue = /*#__PURE__*/styled('span')({
20
+ name: "StyledRangeValue",
21
+ "class": "s1w9icbd",
22
+ propsAsIs: false
23
+ });
24
+ var SliderBaseWrapper = /*#__PURE__*/styled('div')({
25
+ name: "SliderBaseWrapper",
26
+ "class": "s1d2sfgl",
27
+ propsAsIs: false
28
+ });
29
+ var SingleWrapper = /*#__PURE__*/styled('div')({
30
+ name: "SingleWrapper",
31
+ "class": "ss3ujqx",
32
+ propsAsIs: false
33
+ });
34
+
35
+ export { Label, LabelContentLeft, LabelWrapper, SingleWrapper, SliderBaseWrapper, StyledRangeValue };
36
+ //# sourceMappingURL=Single.styles.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Single.styles.js","sources":["../../../../../src/components/Slider/components/Single/Single.styles.ts"],"sourcesContent":["import { styled } from '@linaria/react';\n\nimport { classes, tokens } from '../../Slider.tokens';\n\nexport const LabelWrapper = styled.div`\n color: var(${tokens.labelColor});\n\n display: flex;\n gap: var(${tokens.labelWrapperGap});\n`;\n\nexport const LabelContentLeft = styled.div``;\n\nexport const Label = styled.label`\n font-family: var(${tokens.labelFontFamily});\n font-size: var(${tokens.labelFontSize});\n font-style: var(${tokens.labelFontStyle});\n font-weight: var(${tokens.labelFontWeight});\n letter-spacing: var(${tokens.labelLetterSpacing});\n line-height: var(${tokens.labelLineHeight});\n`;\n\nexport const StyledRangeValue = styled.span`\n color: var(${tokens.rangeValueColor});\n font-family: var(${tokens.rangeValueFontFamily});\n font-size: var(${tokens.rangeValueFontSize});\n font-style: var(${tokens.rangeValueFontStyle});\n font-weight: var(${tokens.rangeValueFontWeight});\n letter-spacing: var(${tokens.rangeValueLetterSpacing});\n line-height: var(${tokens.rangeValueLineHeight});\n\n transition: opacity 0.1s ease-in-out;\n\n &.${classes.hideMinValue}, &.${classes.hideMaxValue} {\n opacity: 0;\n }\n\n &.${classes.activeRangeValue} {\n color: var(${tokens.labelColor});\n }\n`;\n\nexport const SliderBaseWrapper = styled.div`\n position: relative;\n display: flex;\n flex: 1;\n\n &.${classes.rangeValuesPlacementOuter} {\n ${StyledRangeValue} {\n position: absolute;\n bottom: var(${tokens.rangeValueBottomOffset});\n left: 0;\n\n &.${classes.maxRangeValue} {\n left: unset;\n right: 0;\n }\n }\n }\n\n &.${classes.rangeValuesPlacementInner} {\n align-items: center;\n\n ${StyledRangeValue} {\n margin-right: var(${tokens.rangeMinValueMargin});\n\n &.${classes.maxRangeValue} {\n margin-right: 0;\n margin-left: var(${tokens.rangeMaxValueMargin});\n }\n }\n }\n`;\n\nexport const SingleWrapper = styled.div`\n display: flex;\n opacity: var(${tokens.disabledOpacity});\n\n &.${classes.labelPlacementOuter} {\n flex-direction: column;\n\n ${LabelWrapper} {\n margin-bottom: var(${tokens.labelWrapperMarginBottom});\n }\n }\n\n &.${classes.labelPlacementInner} {\n ${LabelWrapper} {\n margin-right: var(${tokens.labelWrapperMarginRight});\n }\n }\n`;\n"],"names":["LabelWrapper","styled","name","class","propsAsIs","LabelContentLeft","Label","StyledRangeValue","SliderBaseWrapper","SingleWrapper"],"mappings":";;AAIO,IAAMA,YAAY,gBAAGC,MAAM,CAAA,KAAA,CAAA,CAAA;AAAAC,EAAAA,IAAA,EAAA,cAAA;AAAAC,EAAAA,OAAAA,EAAA,UAAA;AAAAC,EAAAA,SAAA,EAAA,KAAA;AAAA,CAKjC,EAAA;AAEM,IAAMC,gBAAgB,gBAAGJ,MAAM,CAAA,KAAA,CAAA,CAAA;AAAAC,EAAAA,IAAA,EAAA,kBAAA;AAAAC,EAAAA,OAAAA,EAAA,SAAA;AAAAC,EAAAA,SAAA,EAAA,KAAA;AAAA,CAAM,EAAA;AAErC,IAAME,KAAK,gBAAGL,MAAM,CAAA,OAAA,CAAA,CAAA;AAAAC,EAAAA,IAAA,EAAA,OAAA;AAAAC,EAAAA,OAAAA,EAAA,SAAA;AAAAC,EAAAA,SAAA,EAAA,KAAA;AAAA,CAO1B,EAAA;AAEM,IAAMG,gBAAgB,gBAAGN,MAAM,CAAA,MAAA,CAAA,CAAA;AAAAC,EAAAA,IAAA,EAAA,kBAAA;AAAAC,EAAAA,OAAAA,EAAA,UAAA;AAAAC,EAAAA,SAAA,EAAA,KAAA;AAAA,CAkBrC,EAAA;AAEM,IAAMI,iBAAiB,gBAAGP,MAAM,CAAA,KAAA,CAAA,CAAA;AAAAC,EAAAA,IAAA,EAAA,mBAAA;AAAAC,EAAAA,OAAAA,EAAA,UAAA;AAAAC,EAAAA,SAAA,EAAA,KAAA;AAAA,CA8BtC,EAAA;AAEM,IAAMK,aAAa,gBAAGR,MAAM,CAAA,KAAA,CAAA,CAAA;AAAAC,EAAAA,IAAA,EAAA,eAAA;AAAAC,EAAAA,OAAAA,EAAA,SAAA;AAAAC,EAAAA,SAAA,EAAA,KAAA;AAAA,CAiBlC;;;;"}
@@ -0,0 +1,6 @@
1
+ .l1p4kc08{color:var(--plasma-slider-label-color);display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;gap:var(--plasma-slider-label-wrapper-gap);}
2
+
3
+ .lozb535{font-family:var(--plasma-slider-label-font-family);font-size:var(--plasma-slider-label-font-size);font-style:var(--plasma-slider-label-font-style);font-weight:var(--plasma-slider-label-font-weight);-webkit-letter-spacing:var(--plasma-slider-label-letter-spacing);-moz-letter-spacing:var(--plasma-slider-label-letter-spacing);-ms-letter-spacing:var(--plasma-slider-label-letter-spacing);letter-spacing:var(--plasma-slider-label-letter-spacing);line-height:var(--plasma-slider-label-line-height);}
4
+ .s1w9icbd{color:var(--plasma-slider-range-value-color);font-family:var(--plasma-slider-range-value-font-family);font-size:var(--plasma-slider-range-value-font-size);font-style:var(--plasma-slider-range-value-font-style);font-weight:var(--plasma-slider-range-value-font-weight);-webkit-letter-spacing:var(--plasma-slider-range-value-letter-spacing);-moz-letter-spacing:var(--plasma-slider-range-value-letter-spacing);-ms-letter-spacing:var(--plasma-slider-range-value-letter-spacing);letter-spacing:var(--plasma-slider-range-value-letter-spacing);line-height:var(--plasma-slider-range-value-line-height);-webkit-transition:opacity 0.1s ease-in-out;transition:opacity 0.1s ease-in-out;}.s1w9icbd.slider-hide-min-value,.s1w9icbd.slider-hide-max-value{opacity:0;}.s1w9icbd.slider-active-range-value{color:var(--plasma-slider-label-color);}
5
+ .s1d2sfgl{position:relative;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-flex:1;-ms-flex:1;flex:1;}.s1d2sfgl.slider-range-values-placement-outer .s1w9icbd{position:absolute;bottom:var(--plasma-slider-range-value-bottom-offset);left:0;}.s1d2sfgl.slider-range-values-placement-outer .s1w9icbd.slider-max-range-value{left:unset;right:0;}.s1d2sfgl.slider-range-values-placement-inner{-webkit-align-items:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;}.s1d2sfgl.slider-range-values-placement-inner .s1w9icbd{margin-right:var(--plasma-slider-range-min-value-margin);}.s1d2sfgl.slider-range-values-placement-inner .s1w9icbd.slider-max-range-value{margin-right:0;margin-left:var(--plasma-slider-range-max-value-margin);}
6
+ .ss3ujqx{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;opacity:var(--plasma-slider-disabled-opacity);}.ss3ujqx.slider-label-placement-outer{-webkit-flex-direction:column;-ms-flex-direction:column;flex-direction:column;}.ss3ujqx.slider-label-placement-outer .l1p4kc08{margin-bottom:var(--plasma-slider-label-wrapper-margin-bottom);}.ss3ujqx.slider-label-placement-inner .l1p4kc08{margin-right:var(--plasma-slider-label-wrapper-margin-right);}
@@ -0,0 +1,4 @@
1
+ .SliderBase_styles_7is2ll_s33crq1__0c0959e2{-webkit-flex:1;-ms-flex:1;flex:1;position:relative;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;height:var(--plasma-slider-height);}
2
+ .SliderBase_styles_7is2ll_rnaoqfb__0c0959e2{height:100%;}
3
+ .SliderBase_styles_7is2ll_r1bro5xo__0c0959e2{position:relative;top:50%;height:var(--plasma-slider-rail-height);border-radius:var(--plasma-slider-rail-border-radius);background-color:var(--plasma-slider-rail-background-color);overflow:hidden;-webkit-transform:translateY(-50%);-ms-transform:translateY(-50%);transform:translateY(-50%);}
4
+ .SliderBase_styles_7is2ll_fdg7yhg__0c0959e2{position:absolute;height:100%;top:0;left:0;background:var(--plasma-slider-fill-color);width:0;}
@@ -0,0 +1,78 @@
1
+ import React, { useRef, useEffect } from 'react';
2
+ import { useIsomorphicLayoutEffect } from '../../../../hooks/useIsomorphicLayoutEffect.js';
3
+ import { Slider, RailWrap, Rail, Fill } from './SliderBase.styles.js';
4
+
5
+ var SliderBase = function SliderBase(_ref) {
6
+ var max = _ref.max,
7
+ min = _ref.min,
8
+ setStepSize = _ref.setStepSize,
9
+ railFillWidth = _ref.railFillWidth,
10
+ children = _ref.children,
11
+ _ref$railFillXPositio = _ref.railFillXPosition,
12
+ railFillXPosition = _ref$railFillXPositio === void 0 ? 0 : _ref$railFillXPositio,
13
+ disabled = _ref.disabled,
14
+ labelPlacement = _ref.labelPlacement,
15
+ rangeValuesPlacement = _ref.rangeValuesPlacement,
16
+ onChange = _ref.onChange,
17
+ _ref$settings = _ref.settings,
18
+ settings = _ref$settings === void 0 ? {} : _ref$settings;
19
+ var _settings$indent = settings.indent,
20
+ indent = _settings$indent === void 0 ? 0.75 : _settings$indent,
21
+ _settings$fontSizeMul = settings.fontSizeMultiplier,
22
+ fontSizeMultiplier = _settings$fontSizeMul === void 0 ? 16 : _settings$fontSizeMul;
23
+ var ref = useRef(null);
24
+ var gap = indent * fontSizeMultiplier * 2;
25
+ useEffect(function () {
26
+ var resizeHandler = function resizeHandler() {
27
+ if (ref.current) {
28
+ var railSize = ref.current.offsetWidth - gap;
29
+ var totalSteps = max - min;
30
+ setStepSize(railSize / totalSteps);
31
+ }
32
+ };
33
+ resizeHandler();
34
+ }, [labelPlacement, rangeValuesPlacement, ref.current]);
35
+ var onHandleChange = function onHandleChange(e) {
36
+ if (!onChange || disabled) {
37
+ return;
38
+ }
39
+ var _e$currentTarget$getB = e.currentTarget.getBoundingClientRect(),
40
+ x = _e$currentTarget$getB.x,
41
+ width = _e$currentTarget$getB.width;
42
+ var lastX = e.clientX - x;
43
+ var position = min + lastX / (width - gap) * (max - min);
44
+ var result = Math.max(min, Math.min(max, position));
45
+ onChange(result, {
46
+ lastX: lastX
47
+ });
48
+ };
49
+ useIsomorphicLayoutEffect(function () {
50
+ var resizeHandler = function resizeHandler() {
51
+ if (ref.current) {
52
+ var railSize = ref.current.offsetWidth - gap;
53
+ var totalSteps = max - min;
54
+ setStepSize(railSize / totalSteps);
55
+ }
56
+ };
57
+ resizeHandler();
58
+ window.addEventListener('resize', resizeHandler);
59
+ return function () {
60
+ return window.removeEventListener('resize', resizeHandler);
61
+ };
62
+ }, [min, max, setStepSize, ref.current, gap, labelPlacement, rangeValuesPlacement]);
63
+ var fillStyle = {
64
+ left: "".concat(railFillXPosition, "px"),
65
+ width: "".concat(railFillWidth, "px")
66
+ };
67
+ return /*#__PURE__*/React.createElement(Slider, {
68
+ ref: ref
69
+ }, /*#__PURE__*/React.createElement(RailWrap, {
70
+ "aria-hidden": "true",
71
+ onMouseDown: onHandleChange
72
+ }, /*#__PURE__*/React.createElement(Rail, null, /*#__PURE__*/React.createElement(Fill, {
73
+ style: fillStyle
74
+ }))), children);
75
+ };
76
+
77
+ export { SliderBase };
78
+ //# sourceMappingURL=SliderBase.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SliderBase.js","sources":["../../../../../src/components/Slider/components/SliderBase/SliderBase.tsx"],"sourcesContent":["import React, { PropsWithChildren, useRef, MouseEventHandler, useEffect } from 'react';\nimport { DraggableData } from 'react-draggable';\n\nimport { useIsomorphicLayoutEffect } from '../../../../hooks';\n\nimport type { SliderViewProps } from './SliderBase.types';\nimport { Fill, Rail, RailWrap, Slider } from './SliderBase.styles';\n\nexport const SliderBase: React.FC<PropsWithChildren<SliderViewProps>> = ({\n max,\n min,\n setStepSize,\n railFillWidth,\n children,\n railFillXPosition = 0,\n disabled,\n labelPlacement,\n rangeValuesPlacement,\n onChange,\n settings = {},\n}) => {\n const { indent = 0.75, fontSizeMultiplier = 16 } = settings;\n\n const ref = useRef<HTMLDivElement | null>(null);\n const gap = indent * fontSizeMultiplier * 2;\n\n useEffect(() => {\n const resizeHandler = () => {\n if (ref.current) {\n const railSize = ref.current.offsetWidth - gap;\n const totalSteps = max - min;\n\n setStepSize(railSize / totalSteps);\n }\n };\n\n resizeHandler();\n }, [labelPlacement, rangeValuesPlacement, ref.current]);\n\n const onHandleChange: MouseEventHandler<HTMLDivElement> = (e) => {\n if (!onChange || disabled) {\n return;\n }\n\n const { x, width } = e.currentTarget.getBoundingClientRect();\n\n const lastX = e.clientX - x;\n\n const position = min + (lastX / (width - gap)) * (max - min);\n const result = Math.max(min, Math.min(max, position));\n\n onChange(result, { lastX } as DraggableData);\n };\n\n useIsomorphicLayoutEffect(() => {\n const resizeHandler = () => {\n if (ref.current) {\n const railSize = ref.current.offsetWidth - gap;\n const totalSteps = max - min;\n\n setStepSize(railSize / totalSteps);\n }\n };\n\n resizeHandler();\n window.addEventListener('resize', resizeHandler);\n\n return () => window.removeEventListener('resize', resizeHandler);\n }, [min, max, setStepSize, ref.current, gap, labelPlacement, rangeValuesPlacement]);\n\n const fillStyle = { left: `${railFillXPosition}px`, width: `${railFillWidth}px` };\n\n return (\n <Slider ref={ref}>\n <RailWrap aria-hidden=\"true\" onMouseDown={onHandleChange}>\n <Rail>\n <Fill style={fillStyle} />\n </Rail>\n </RailWrap>\n\n {children}\n </Slider>\n );\n};\n"],"names":["SliderBase","_ref","max","min","setStepSize","railFillWidth","children","_ref$railFillXPositio","railFillXPosition","disabled","labelPlacement","rangeValuesPlacement","onChange","_ref$settings","settings","_settings$indent","indent","_settings$fontSizeMul","fontSizeMultiplier","ref","useRef","gap","useEffect","resizeHandler","current","railSize","offsetWidth","totalSteps","onHandleChange","e","_e$currentTarget$getB","currentTarget","getBoundingClientRect","x","width","lastX","clientX","position","result","Math","useIsomorphicLayoutEffect","window","addEventListener","removeEventListener","fillStyle","left","concat","React","createElement","Slider","RailWrap","onMouseDown","Rail","Fill","style"],"mappings":";;;;IAQaA,UAAwD,GAAG,SAA3DA,UAAwDA,CAAAC,IAAA,EAY/D;AAAA,EAAA,IAXFC,GAAG,GAAAD,IAAA,CAAHC,GAAG;IACHC,GAAG,GAAAF,IAAA,CAAHE,GAAG;IACHC,WAAW,GAAAH,IAAA,CAAXG,WAAW;IACXC,aAAa,GAAAJ,IAAA,CAAbI,aAAa;IACbC,Q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AA,MAAM,CAACC,gBAAgB,CAAC,QAAQ,EAAEnB,aAAa,CAAC,CAAA;IAEhD,OAAO,YAAA;AAAA,MAAA,OAAMkB,MAAM,CAACE,mBAAmB,CAAC,QAAQ,EAAEpB,aAAa,CAAC,CAAA;AAAA,KAAA,CAAA;AACpE,GAAC,EAAE,CAACpB,GAAG,EAAED,GAAG,EAAEE,WAAW,EAAEe,GAAG,CAACK,OAAO,EAAEH,GAAG,EAAEX,cAAc,EAAEC,oBAAoB,CAAC,CAAC,CAAA;AAEnF,EAAA,IAAMiC,SAAS,GAAG;AAAEC,IAAAA,IAAI,EAAAC,EAAAA,CAAAA,MAAA,CAAKtC,iBAAiB,EAAI,IAAA,CAAA;IAAE0B,KAAK,EAAA,EAAA,CAAAY,MAAA,CAAKzC,aAAa,EAAA,IAAA,CAAA;GAAM,CAAA;AAEjF,EAAA,oBACI0C,KAAA,CAAAC,aAAA,CAACC,MAAM,EAAA;AAAC9B,IAAAA,GAAG,EAAEA,GAAAA;AAAI,GAAA,eACb4B,KAAA,CAAAC,aAAA,CAACE,QAAQ,EAAA;AAAC,IAAA,aAAA,EAAY,MAAM;AAACC,IAAAA,WAAW,EAAEvB,cAAAA;GACtCmB,eAAAA,KAAA,CAAAC,aAAA,CAACI,IAAI,qBACDL,KAAA,CAAAC,aAAA,CAACK,IAAI,EAAA;AAACC,IAAAA,KAAK,EAAEV,SAAAA;AAAU,GAAE,CACvB,CACA,CAAC,EAEVtC,QACG,CAAC,CAAA;AAEjB;;;;"}
@@ -0,0 +1,26 @@
1
+ import './SliderBase.styles_7is2ll.css';
2
+ import { styled } from '@linaria/react';
3
+
4
+ var Slider = /*#__PURE__*/styled('div')({
5
+ name: "Slider",
6
+ "class": "s33crq1",
7
+ propsAsIs: false
8
+ });
9
+ var RailWrap = /*#__PURE__*/styled('div')({
10
+ name: "RailWrap",
11
+ "class": "rnaoqfb",
12
+ propsAsIs: false
13
+ });
14
+ var Rail = /*#__PURE__*/styled('div')({
15
+ name: "Rail",
16
+ "class": "r1bro5xo",
17
+ propsAsIs: false
18
+ });
19
+ var Fill = /*#__PURE__*/styled('div')({
20
+ name: "Fill",
21
+ "class": "fdg7yhg",
22
+ propsAsIs: false
23
+ });
24
+
25
+ export { Fill, Rail, RailWrap, Slider };
26
+ //# sourceMappingURL=SliderBase.styles.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SliderBase.styles.js","sources":["../../../../../src/components/Slider/components/SliderBase/SliderBase.styles.ts"],"sourcesContent":["import { styled } from '@linaria/react';\n\nimport { tokens } from '../../Slider.tokens';\n\nexport const Slider = styled.div`\n flex: 1;\n position: relative;\n user-select: none;\n height: var(${tokens.height});\n`;\n\nexport const RailWrap = styled.div`\n height: 100%;\n`;\n\nexport const Rail = styled.div`\n position: relative;\n top: 50%;\n\n height: var(${tokens.railHeight});\n\n border-radius: var(${tokens.railBorderRadius});\n background-color: var(${tokens.railBackgroundColor});\n\n overflow: hidden;\n transform: translateY(-50%);\n`;\n\nexport const Fill = styled.div`\n position: absolute;\n height: 100%;\n top: 0;\n left: 0;\n background: var(${tokens.fillColor});\n width: 0;\n`;\n"],"names":["Slider","styled","name","class","propsAsIs","RailWrap","Rail","Fill"],"mappings":";;AAIO,IAAMA,MAAM,gBAAGC,MAAM,CAAA,KAAA,CAAA,CAAA;AAAAC,EAAAA,IAAA,EAAA,QAAA;AAAAC,EAAAA,OAAAA,EAAA,SAAA;AAAAC,EAAAA,SAAA,EAAA,KAAA;AAAA,CAK3B,EAAA;AAEM,IAAMC,QAAQ,gBAAGJ,MAAM,CAAA,KAAA,CAAA,CAAA;AAAAC,EAAAA,IAAA,EAAA,UAAA;AAAAC,EAAAA,OAAAA,EAAA,SAAA;AAAAC,EAAAA,SAAA,EAAA,KAAA;AAAA,CAE7B,EAAA;AAEM,IAAME,IAAI,gBAAGL,MAAM,CAAA,KAAA,CAAA,CAAA;AAAAC,EAAAA,IAAA,EAAA,MAAA;AAAAC,EAAAA,OAAAA,EAAA,UAAA;AAAAC,EAAAA,SAAA,EAAA,KAAA;AAAA,CAWzB,EAAA;AAEM,IAAMG,IAAI,gBAAGN,MAAM,CAAA,KAAA,CAAA,CAAA;AAAAC,EAAAA,IAAA,EAAA,MAAA;AAAAC,EAAAA,OAAAA,EAAA,SAAA;AAAAC,EAAAA,SAAA,EAAA,KAAA;AAAA,CAOzB;;;;"}
@@ -0,0 +1,4 @@
1
+ .s33crq1{-webkit-flex:1;-ms-flex:1;flex:1;position:relative;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;height:var(--plasma-slider-height);}
2
+ .rnaoqfb{height:100%;}
3
+ .r1bro5xo{position:relative;top:50%;height:var(--plasma-slider-rail-height);border-radius:var(--plasma-slider-rail-border-radius);background-color:var(--plasma-slider-rail-background-color);overflow:hidden;-webkit-transform:translateY(-50%);-ms-transform:translateY(-50%);transform:translateY(-50%);}
4
+ .fdg7yhg{position:absolute;height:100%;top:0;left:0;background:var(--plasma-slider-fill-color);width:0;}
@@ -0,0 +1,4 @@
1
+ .Thumb_styles_4w4gzn_tqbdf8b__14129a5b{width:var(--plasma-slider-thumb-size);height:var(--plasma-slider-thumb-size);position:relative;left:-0.125rem;top:-0.125rem;border-radius:50%;box-sizing:border-box;background:var(--plasma-slider-thumb-background-color);margin:0.125rem;-webkit-transition:border-color 0.1s ease-in-out;transition:border-color 0.1s ease-in-out;position:relative;}.Thumb_styles_4w4gzn_tqbdf8b__14129a5b:after{background:var(--plasma-slider-thumb-border-color);margin:-0.125rem;content:'';position:absolute;inset:0;z-index:-1;border-radius:inherit;}.Thumb_styles_4w4gzn_tqbdf8b__14129a5b:not([disabled]):hover:after,.Thumb_styles_4w4gzn_tqbdf8b__14129a5b:not([disabled]):active:after{background:var(--plasma-slider-thumb-focus-border-color);}.Thumb_styles_4w4gzn_tqbdf8b__14129a5b[disabled]{cursor:not-allowed;}.Thumb_styles_4w4gzn_tqbdf8b__14129a5b:focus{outline:none;}.Thumb_styles_4w4gzn_tqbdf8b__14129a5b::before{content:'';position:absolute;top:0.125rem;left:0.125rem;right:0.125rem;bottom:0.125rem;z-index:1;display:block;box-sizing:content-box;border:0.125rem solid transparent;border-radius:50%;-webkit-transition:box-shadow 0.2s ease-in-out;transition:box-shadow 0.2s ease-in-out;pointer-events:none;}.Thumb_styles_4w4gzn_tqbdf8b__14129a5b.Thumb_styles_4w4gzn_focusVisible__14129a5b:focus::before,.Thumb_styles_4w4gzn_tqbdf8b__14129a5b[data-focus-visible-added]::before{outline:none;box-shadow:0 0 0 0.125rem var(--plasma-slider-thumb-focus-border-color);}
2
+
3
+ .Handler_styles_8crx5z_h1tnrnip__2d4342c7{cursor:pointer;position:absolute;z-index:1;top:0;left:0;}
4
+ .Handler_styles_8crx5z_s12uu2lj__2d4342c7{position:absolute;z-index:1;top:var(--plasma-slider-current-value-top-offset);text-align:center;width:100%;margin-left:-0.125rem;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-box-pack:center;-webkit-justify-content:center;-ms-flex-pack:center;justify-content:center;font-family:var(--plasma-slider-current-value-font-family);font-size:var(--plasma-slider-current-value-font-size);font-style:var(--plasma-slider-current-value-font-style);font-weight:var(--plasma-slider-current-value-font-weight);-webkit-letter-spacing:var(--plasma-slider-current-value-letter-spacing);-moz-letter-spacing:var(--plasma-slider-current-value-letter-spacing);-ms-letter-spacing:var(--plasma-slider-current-value-letter-spacing);letter-spacing:var(--plasma-slider-current-value-letter-spacing);line-height:var(--plasma-slider-current-value-line-height);}
@@ -0,0 +1,163 @@
1
+ import { objectWithoutProperties as _objectWithoutProperties, slicedToArray as _slicedToArray, extends as _extends } from '../../../../_virtual/_rollupPluginBabelHelpers.js';
2
+ import React, { forwardRef, useRef } from 'react';
3
+ import Draggable from 'react-draggable';
4
+ import { getOffsets, getSliderThumbValue } from '../../utils/index.js';
5
+ import { Thumb } from '../Thumb/Thumb.js';
6
+ import { HandlerStyled, StyledValue } from './Handler.styles.js';
7
+
8
+ var _excluded = ["stepSize", "onChangeCommitted", "onChange", "xPosition", "min", "max", "bounds", "zIndex", "disabled", "side", "showCurrentValue", "startOffset", "endOffset", "value"];
9
+
10
+ // TODO: PLASMA-1707
11
+
12
+ var KeyboardSupport = {
13
+ PageUp: 33,
14
+ PageDown: 34,
15
+ End: 35,
16
+ Home: 36,
17
+ ArrowLeft: 37,
18
+ ArrowUp: 38,
19
+ ArrowRight: 39,
20
+ ArrowDown: 40
21
+ };
22
+ var Handler = /*#__PURE__*/forwardRef(function (_ref, ref) {
23
+ var stepSize = _ref.stepSize,
24
+ onChangeCommitted = _ref.onChangeCommitted,
25
+ onChange = _ref.onChange,
26
+ _ref$xPosition = _ref.xPosition,
27
+ xPosition = _ref$xPosition === void 0 ? 0 : _ref$xPosition,
28
+ min = _ref.min,
29
+ max = _ref.max,
30
+ _ref$bounds = _ref.bounds,
31
+ bounds = _ref$bounds === void 0 ? [] : _ref$bounds,
32
+ zIndex = _ref.zIndex,
33
+ disabled = _ref.disabled,
34
+ side = _ref.side,
35
+ _ref$showCurrentValue = _ref.showCurrentValue,
36
+ showCurrentValue = _ref$showCurrentValue === void 0 ? false : _ref$showCurrentValue,
37
+ _ref$startOffset = _ref.startOffset,
38
+ startOffset = _ref$startOffset === void 0 ? 0 : _ref$startOffset,
39
+ _ref$endOffset = _ref.endOffset,
40
+ endOffset = _ref$endOffset === void 0 ? 0 : _ref$endOffset,
41
+ value = _ref.value,
42
+ rest = _objectWithoutProperties(_ref, _excluded);
43
+ var lastOnChangeValue = useRef();
44
+ var _getOffsets = getOffsets(ref, side),
45
+ _getOffsets2 = _slicedToArray(_getOffsets, 2),
46
+ offsetLeft = _getOffsets2[0],
47
+ offsetRight = _getOffsets2[1];
48
+ var _bounds = _slicedToArray(bounds, 2),
49
+ leftValueBound = _bounds[0],
50
+ rightValueBound = _bounds[1];
51
+ var leftPositionBound = leftValueBound ? (leftValueBound - min) * stepSize : null;
52
+ var rightPositionBound = rightValueBound ? (rightValueBound - min) * stepSize : null;
53
+ var position = typeof xPosition === 'number' ? {
54
+ x: xPosition,
55
+ y: 0
56
+ } : undefined;
57
+ var tabIndex = disabled ? -1 : 0;
58
+ var computedBounds = {
59
+ left: (leftPositionBound !== null && leftPositionBound !== void 0 ? leftPositionBound : 0) + offsetLeft,
60
+ right: (rightPositionBound !== null && rightPositionBound !== void 0 ? rightPositionBound : stepSize * (max - min)) - offsetRight
61
+ };
62
+ var showCurrentValueCondition = showCurrentValue && (xPosition >= startOffset && xPosition <= max * stepSize - endOffset || xPosition === 0 && value !== 0);
63
+ var onDrag = function onDrag(_, data) {
64
+ var newValue = getSliderThumbValue(data.x, stepSize, min, max);
65
+ if (lastOnChangeValue.current !== newValue) {
66
+ onChange === null || onChange === void 0 || onChange(newValue, data);
67
+ lastOnChangeValue.current = newValue;
68
+ }
69
+ };
70
+ var onStop = function onStop(_, data) {
71
+ var newValue = getSliderThumbValue(data.x, stepSize, min, max);
72
+ onChangeCommitted && onChangeCommitted(newValue, data);
73
+ };
74
+ var onKeyPress = function onKeyPress(event) {
75
+ event.persist();
76
+ var keyCode = event.keyCode,
77
+ target = event.target;
78
+ if (!Object.values(KeyboardSupport).includes(keyCode)) {
79
+ return;
80
+ }
81
+ var ArrowUp = KeyboardSupport.ArrowUp,
82
+ ArrowRight = KeyboardSupport.ArrowRight,
83
+ ArrowDown = KeyboardSupport.ArrowDown,
84
+ ArrowLeft = KeyboardSupport.ArrowLeft,
85
+ Home = KeyboardSupport.Home,
86
+ End = KeyboardSupport.End,
87
+ PageDown = KeyboardSupport.PageDown,
88
+ PageUp = KeyboardSupport.PageUp;
89
+ var computedMultipleSteps = stepSize * (rest.multipleStepSize / 100 * max);
90
+ var data = {
91
+ x: 0,
92
+ deltaX: stepSize,
93
+ lastX: xPosition,
94
+ y: 0,
95
+ deltaY: 0,
96
+ lastY: 0,
97
+ node: target
98
+ };
99
+ switch (keyCode) {
100
+ case ArrowUp:
101
+ case ArrowRight:
102
+ data.x = xPosition + stepSize;
103
+ break;
104
+ case ArrowDown:
105
+ case ArrowLeft:
106
+ data.x = xPosition - stepSize;
107
+ data.deltaX = -stepSize;
108
+ break;
109
+ case PageUp:
110
+ data.x = xPosition + computedMultipleSteps;
111
+ data.deltaX = computedMultipleSteps;
112
+ break;
113
+ case PageDown:
114
+ data.x = xPosition - computedMultipleSteps;
115
+ data.deltaX = -computedMultipleSteps;
116
+ break;
117
+ case End:
118
+ data.x = max * stepSize;
119
+ break;
120
+ case Home:
121
+ data.x = 0;
122
+ break;
123
+ default:
124
+ data.x = 0;
125
+ }
126
+ var left = computedBounds.left,
127
+ right = computedBounds.right;
128
+
129
+ /*
130
+ * INFO: Находим значение в диапазоне между указанными левой и правой границами.
131
+ * Необходимо для правильного расчета положения SliderThumb.
132
+ * см. функция clamp
133
+ */
134
+ var boundedValue = Math.max(Math.min(right, data.x), left);
135
+ var computedValue = getSliderThumbValue(boundedValue, stepSize, min, max);
136
+ lastOnChangeValue.current = computedValue;
137
+ onChangeCommitted && onChangeCommitted(computedValue, data);
138
+ };
139
+ return /*#__PURE__*/React.createElement(Draggable, {
140
+ axis: "x",
141
+ bounds: computedBounds,
142
+ grid: [stepSize, 1],
143
+ onStop: onStop,
144
+ onDrag: onDrag,
145
+ position: position,
146
+ disabled: disabled
147
+ }, /*#__PURE__*/React.createElement(HandlerStyled, {
148
+ ref: ref,
149
+ style: {
150
+ zIndex: zIndex
151
+ },
152
+ onKeyDown: onKeyPress
153
+ }, /*#__PURE__*/React.createElement(Thumb, _extends({
154
+ tabIndex: tabIndex,
155
+ min: min,
156
+ max: max,
157
+ value: value,
158
+ disabled: disabled
159
+ }, rest)), showCurrentValueCondition && /*#__PURE__*/React.createElement(StyledValue, null, value)));
160
+ });
161
+
162
+ export { Handler };
163
+ //# sourceMappingURL=Handler.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Handler.js","sources":["../../../../../src/components/Slider/ui/Handler/Handler.tsx"],"sourcesContent":["import React, { useRef, forwardRef, KeyboardEvent } from 'react';\nimport Draggable, { DraggableEventHandler } from 'react-draggable';\nimport type { DraggableData } from 'react-draggable';\n\nimport { getSliderThumbValue, getOffsets } from '../../utils';\nimport { Thumb } from '../Thumb/Thumb';\n\nimport type { HandlerProps } from './Handler.types';\nimport { HandlerStyled, StyledValue } from './Handler.styles';\n\n// TODO: PLASMA-1707\ndeclare module 'react-draggable' {\n export interface DraggableProps {\n children: React.ReactNode;\n }\n}\n\nconst KeyboardSupport = {\n PageUp: 33,\n PageDown: 34,\n End: 35,\n Home: 36,\n ArrowLeft: 37,\n ArrowUp: 38,\n ArrowRight: 39,\n ArrowDown: 40,\n};\n\nexport const Handler = forwardRef<HTMLDivElement, HandlerProps>(\n (\n {\n stepSize,\n onChangeCommitted,\n onChange,\n xPosition = 0,\n min,\n max,\n bounds = [],\n zIndex,\n disabled,\n side,\n showCurrentValue = false,\n startOffset = 0,\n endOffset = 0,\n value,\n ...rest\n },\n ref,\n ) => {\n const lastOnChangeValue = useRef<number>();\n\n const [offsetLeft, offsetRight] = getOffsets(ref, side);\n\n const [leftValueBound, rightValueBound] = bounds;\n const leftPositionBound = leftValueBound ? (leftValueBound - min) * stepSize : null;\n const rightPositionBound = rightValueBound ? (rightValueBound - min) * stepSize : null;\n\n const position = typeof xPosition === 'number' ? { x: xPosition, y: 0 } : undefined;\n const tabIndex = disabled ? -1 : 0;\n\n const computedBounds = {\n left: (leftPositionBound ?? 0) + offsetLeft,\n right: (rightPositionBound ?? stepSize * (max - min)) - offsetRight,\n };\n\n const showCurrentValueCondition =\n showCurrentValue &&\n ((xPosition >= startOffset && xPosition <= max * stepSize - endOffset) || (xPosition === 0 && value !== 0));\n\n const onDrag: DraggableEventHandler = (_, data) => {\n const newValue = getSliderThumbValue(data.x, stepSize, min, max);\n if (lastOnChangeValue.current !== newValue) {\n onChange?.(newValue, data);\n lastOnChangeValue.current = newValue;\n }\n };\n\n const onStop: DraggableEventHandler = (_, data) => {\n const newValue = getSliderThumbValue(data.x, stepSize, min, max);\n onChangeCommitted && onChangeCommitted(newValue, data);\n };\n\n const onKeyPress = (event: KeyboardEvent<HTMLDivElement>) => {\n event.persist();\n\n const { keyCode, target } = event;\n\n if (!Object.values(KeyboardSupport).includes(keyCode)) {\n return;\n }\n\n const { ArrowUp, ArrowRight, ArrowDown, ArrowLeft, Home, End, PageDown, PageUp } = KeyboardSupport;\n\n const computedMultipleSteps = stepSize * ((rest.multipleStepSize / 100) * max);\n\n const data: DraggableData = {\n x: 0,\n deltaX: stepSize,\n lastX: xPosition,\n y: 0,\n deltaY: 0,\n lastY: 0,\n node: target as HTMLDivElement,\n };\n\n switch (keyCode) {\n case ArrowUp:\n case ArrowRight:\n data.x = xPosition + stepSize;\n break;\n case ArrowDown:\n case ArrowLeft:\n data.x = xPosition - stepSize;\n data.deltaX = -stepSize;\n break;\n case PageUp:\n data.x = xPosition + computedMultipleSteps;\n data.deltaX = computedMultipleSteps;\n break;\n case PageDown:\n data.x = xPosition - computedMultipleSteps;\n data.deltaX = -computedMultipleSteps;\n break;\n case End:\n data.x = max * stepSize;\n break;\n case Home:\n data.x = 0;\n break;\n default:\n data.x = 0;\n }\n\n const { left, right } = computedBounds;\n\n /*\n * INFO: Находим значение в диапазоне между указанными левой и правой границами.\n * Необходимо для правильного расчета положения SliderThumb.\n * см. функция clamp\n */\n const boundedValue = Math.max(Math.min(right, data.x), left);\n\n const computedValue = getSliderThumbValue(boundedValue, stepSize, min, max);\n lastOnChangeValue.current = computedValue;\n\n onChangeCommitted && onChangeCommitted(computedValue, data);\n };\n\n return (\n <Draggable\n axis=\"x\"\n bounds={computedBounds}\n grid={[stepSize, 1]}\n onStop={onStop}\n onDrag={onDrag}\n position={position}\n disabled={disabled}\n >\n <HandlerStyled ref={ref} style={{ zIndex }} onKeyDown={onKeyPress}>\n <Thumb tabIndex={tabIndex} min={min} max={max} value={value} disabled={disabled} {...rest} />\n {showCurrentValueCondition && <StyledValue>{value}</StyledValue>}\n </HandlerStyled>\n </Draggable>\n );\n },\n);\n"],"names":["KeyboardSupport","PageUp","PageDown","End","Home","ArrowLeft","ArrowUp","ArrowRight","ArrowDown","Handler","forwardRef","_ref","ref","stepSize","onChangeCommitted","onChange","_ref$xPosition","xPosition","min","max","_ref$bounds","bounds","zIndex","disabled","side","_ref$showCurrentValue","showCurrentValue","_ref$startOffset","startOffset","_ref$endOffset","endOffset","value","rest","_objectWithoutProperties","_excluded","lastOnChangeValue","useRef","_getOffsets","getOffsets","_getOffsets2","_slicedToArray","offsetLeft","offsetRight","_bounds","leftValueBound","rightValueBound","leftPositionBound","rightPositionBound","position","x","y","undefined","tabIndex","computedBounds","left","right","showCurrentValueCondition","onDrag","_","data","newValue","getSliderThumbValue","current","onStop","onKeyPress","event","persist","keyCode","target","Object","values","includes","computedMultipleSteps","multipleStepSize","deltaX","lastX","deltaY","lastY","node","boundedValue","Math","computedValue","React","createElement","Draggable","axis","grid","HandlerStyled","style","onKeyDown","Thumb","_extends","StyledValue"],"mappings":";;;;;;;;;AAUA;;AAOA,IAAMA,eAAe,GAAG;AACpBC,EAAAA,MAAM,EAAE,EAAE;AACVC,EAAAA,QAAQ,EAAE,EAAE;AACZC,EAAAA,GAAG,EAAE,EAAE;AACPC,EAAAA,IAAI,EAAE,EAAE;AACRC,EAAAA,SAAS,EAAE,EAAE;AACbC,EAAAA,OAAO,EAAE,EAAE;AACXC,EAAAA,UAAU,EAAE,EAAE;AACdC,EAAAA,SAAS,EAAE,EAAA;AACf,CAAC,CAAA;AAEM,IAAMC,OAAO,gBAAGC,UAAU,CAC7B,UAAAC,IAAA,EAkBIC,GAAG,EACF;AAAA,EAAA,IAjBGC,QAAQ,GAAAF,IAAA,CAARE,QAAQ;IACRC,iBAAiB,GAAAH,IAAA,CAAjBG,iBAAiB;IACjBC,QAAQ,GAAAJ,IAAA,CAARI,QAAQ;IAAAC,cAAA,GAAAL,IAAA,CACRM,SAAS;AAATA,IAAAA,SAAS,GAAAD,cAAA,KAAG,KAAA,CAAA,GAAA,CAAC,GAAAA,cAAA;IACbE,GAAG,GAAAP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AAAClC,IAAAA,GAAG,EAAEA,GAAI;AAACC,IAAAA,GAAG,EAAEA,GAAI;AAACY,IAAAA,KAAK,EAAEA,KAAM;AAACR,IAAAA,QAAQ,EAAEA,QAAAA;AAAS,GAAA,EAAKS,IAAI,CAAG,CAAC,EAC5FwB,yBAAyB,iBAAI0B,KAAA,CAAAC,aAAA,CAACS,WAAW,EAAA,IAAA,EAAE7D,KAAmB,CACpD,CACR,CAAC,CAAA;AAEpB,CACJ;;;;"}
@@ -0,0 +1,16 @@
1
+ import './Handler.styles_8crx5z.css';
2
+ import { styled } from '@linaria/react';
3
+
4
+ var HandlerStyled = /*#__PURE__*/styled('div')({
5
+ name: "HandlerStyled",
6
+ "class": "h1tnrnip",
7
+ propsAsIs: false
8
+ });
9
+ var StyledValue = /*#__PURE__*/styled('span')({
10
+ name: "StyledValue",
11
+ "class": "s12uu2lj",
12
+ propsAsIs: false
13
+ });
14
+
15
+ export { HandlerStyled, StyledValue };
16
+ //# sourceMappingURL=Handler.styles.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Handler.styles.js","sources":["../../../../../src/components/Slider/ui/Handler/Handler.styles.ts"],"sourcesContent":["import { styled } from '@linaria/react';\n\nimport { tokens } from '../../Slider.tokens';\n\nexport const HandlerStyled = styled.div`\n cursor: pointer;\n position: absolute;\n z-index: 1;\n top: 0;\n left: 0;\n`;\n\nexport const StyledValue = styled.span`\n position: absolute;\n z-index: 1;\n top: var(${tokens.currentValueTopOffset});\n text-align: center;\n width: 100%;\n margin-left: -0.125rem;\n display: flex;\n justify-content: center;\n font-family: var(${tokens.currentValueFontFamily});\n font-size: var(${tokens.currentValueFontSize});\n font-style: var(${tokens.currentValueFontStyle});\n font-weight: var(${tokens.currentValueFontWeight});\n letter-spacing: var(${tokens.currentValueLetterSpacing});\n line-height: var(${tokens.currentValueLineHeight});\n`;\n"],"names":["HandlerStyled","styled","name","class","propsAsIs","StyledValue"],"mappings":";;AAIO,IAAMA,aAAa,gBAAGC,MAAM,CAAA,KAAA,CAAA,CAAA;AAAAC,EAAAA,IAAA,EAAA,eAAA;AAAAC,EAAAA,OAAAA,EAAA,UAAA;AAAAC,EAAAA,SAAA,EAAA,KAAA;AAAA,CAMlC,EAAA;AAEM,IAAMC,WAAW,gBAAGJ,MAAM,CAAA,MAAA,CAAA,CAAA;AAAAC,EAAAA,IAAA,EAAA,aAAA;AAAAC,EAAAA,OAAAA,EAAA,UAAA;AAAAC,EAAAA,SAAA,EAAA,KAAA;AAAA,CAehC;;;;"}
@@ -0,0 +1,2 @@
1
+ .h1tnrnip{cursor:pointer;position:absolute;z-index:1;top:0;left:0;}
2
+ .s12uu2lj{position:absolute;z-index:1;top:var(--plasma-slider-current-value-top-offset);text-align:center;width:100%;margin-left:-0.125rem;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-box-pack:center;-webkit-justify-content:center;-ms-flex-pack:center;justify-content:center;font-family:var(--plasma-slider-current-value-font-family);font-size:var(--plasma-slider-current-value-font-size);font-style:var(--plasma-slider-current-value-font-style);font-weight:var(--plasma-slider-current-value-font-weight);-webkit-letter-spacing:var(--plasma-slider-current-value-letter-spacing);-moz-letter-spacing:var(--plasma-slider-current-value-letter-spacing);-ms-letter-spacing:var(--plasma-slider-current-value-letter-spacing);letter-spacing:var(--plasma-slider-current-value-letter-spacing);line-height:var(--plasma-slider-current-value-line-height);}
@@ -0,0 +1 @@
1
+ .Thumb_styles_4w4gzn_tqbdf8b__14129a5b{width:var(--plasma-slider-thumb-size);height:var(--plasma-slider-thumb-size);position:relative;left:-0.125rem;top:-0.125rem;border-radius:50%;box-sizing:border-box;background:var(--plasma-slider-thumb-background-color);margin:0.125rem;-webkit-transition:border-color 0.1s ease-in-out;transition:border-color 0.1s ease-in-out;position:relative;}.Thumb_styles_4w4gzn_tqbdf8b__14129a5b:after{background:var(--plasma-slider-thumb-border-color);margin:-0.125rem;content:'';position:absolute;inset:0;z-index:-1;border-radius:inherit;}.Thumb_styles_4w4gzn_tqbdf8b__14129a5b:not([disabled]):hover:after,.Thumb_styles_4w4gzn_tqbdf8b__14129a5b:not([disabled]):active:after{background:var(--plasma-slider-thumb-focus-border-color);}.Thumb_styles_4w4gzn_tqbdf8b__14129a5b[disabled]{cursor:not-allowed;}.Thumb_styles_4w4gzn_tqbdf8b__14129a5b:focus{outline:none;}.Thumb_styles_4w4gzn_tqbdf8b__14129a5b::before{content:'';position:absolute;top:0.125rem;left:0.125rem;right:0.125rem;bottom:0.125rem;z-index:1;display:block;box-sizing:content-box;border:0.125rem solid transparent;border-radius:50%;-webkit-transition:box-shadow 0.2s ease-in-out;transition:box-shadow 0.2s ease-in-out;pointer-events:none;}.Thumb_styles_4w4gzn_tqbdf8b__14129a5b.Thumb_styles_4w4gzn_focusVisible__14129a5b:focus::before,.Thumb_styles_4w4gzn_tqbdf8b__14129a5b[data-focus-visible-added]::before{outline:none;box-shadow:0 0 0 0.125rem var(--plasma-slider-thumb-focus-border-color);}
@@ -0,0 +1,27 @@
1
+ import { objectWithoutProperties as _objectWithoutProperties, extends as _extends } from '../../../../_virtual/_rollupPluginBabelHelpers.js';
2
+ import React from 'react';
3
+ import { ThumbBase } from './Thumb.styles.js';
4
+
5
+ var _excluded = ["min", "max", "value", "ariaValueMin", "ariaLabel", "disabled"];
6
+ var Thumb = function Thumb(_ref) {
7
+ var min = _ref.min,
8
+ max = _ref.max,
9
+ value = _ref.value,
10
+ _ref$ariaValueMin = _ref.ariaValueMin,
11
+ ariaValueMin = _ref$ariaValueMin === void 0 ? min : _ref$ariaValueMin,
12
+ ariaLabel = _ref.ariaLabel,
13
+ disabled = _ref.disabled,
14
+ rest = _objectWithoutProperties(_ref, _excluded);
15
+ return /*#__PURE__*/React.createElement(ThumbBase, _extends({
16
+ role: "slider",
17
+ "aria-label": ariaLabel,
18
+ "aria-valuemin": ariaValueMin,
19
+ "aria-valuemax": max,
20
+ "aria-valuenow": value,
21
+ disabled: disabled,
22
+ "aria-orientation": "horizontal"
23
+ }, rest));
24
+ };
25
+
26
+ export { Thumb };
27
+ //# sourceMappingURL=Thumb.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Thumb.js","sources":["../../../../../src/components/Slider/ui/Thumb/Thumb.tsx"],"sourcesContent":["import React from 'react';\n\nimport type { ThumbProps } from './Thumb.types';\nimport { ThumbBase } from './Thumb.styles';\n\nexport const Thumb = ({ min, max, value, ariaValueMin = min, ariaLabel, disabled, ...rest }: ThumbProps) => {\n return (\n <ThumbBase\n role=\"slider\"\n aria-label={ariaLabel}\n aria-valuemin={ariaValueMin}\n aria-valuemax={max}\n aria-valuenow={value}\n disabled={disabled}\n aria-orientation=\"horizontal\"\n {...rest}\n />\n );\n};\n"],"names":["Thumb","_ref","min","max","value","_ref$ariaValueMin","ariaValueMin","ariaLabel","disabled","rest","_objectWithoutProperties","_excluded","React","createElement","ThumbBase","_extends","role"],"mappings":";;;;;IAKaA,KAAK,GAAG,SAARA,KAAKA,CAAAC,IAAA,EAA0F;AAAA,EAAA,IAApFC,GAAG,GAAAD,IAAA,CAAHC,GAAG;IAAEC,GAAG,GAAAF,IAAA,CAAHE,GAAG;IAAEC,KAAK,GAAAH,IAAA,CAALG,KAAK;IAAAC,iBAAA,GAAAJ,IAAA,CAAEK,YAAY;AAAZA,IAAAA,YAAY,GAAAD,iBAAA,KAAGH,KAAAA,CAAAA,GAAAA,GAAG,GAAAG,iBAAA;IAAEE,SAAS,GAAAN,IAAA,CAATM,SAAS;IAAEC,QAAQ,GAAAP,IAAA,CAARO,QAAQ;AAAKC,IAAAA,IAAI,GAAAC,wBAAA,CAAAT,IAAA,EAAAU,SAAA,CAAA,CAAA;AACrF,EAAA,oBACIC,KAAA,CAAAC,aAAA,CAACC,SAAS,EAAAC,QAAA,CAAA;AACNC,IAAAA,IAAI,EAAC,QAAQ;AACb,IAAA,YAAA,EAAYT,SAAU;AACtB,IAAA,eAAA,EAAeD,YAAa;AAC5B,IAAA,eAAA,EAAeH,GAAI;AACnB,IAAA,eAAA,EAAeC,KAAM;AACrBI,IAAAA,QAAQ,EAAEA,QAAS;IACnB,kBAAiB,EAAA,YAAA;GACbC,EAAAA,IAAI,CACX,CAAC,CAAA;AAEV;;;;"}
@@ -0,0 +1,11 @@
1
+ import './Thumb.styles_4w4gzn.css';
2
+ import { styled } from '@linaria/react';
3
+
4
+ var ThumbBase = /*#__PURE__*/styled('div')({
5
+ name: "ThumbBase",
6
+ "class": "tqbdf8b",
7
+ propsAsIs: false
8
+ });
9
+
10
+ export { ThumbBase };
11
+ //# sourceMappingURL=Thumb.styles.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Thumb.styles.js","sources":["../../../../../src/components/Slider/ui/Thumb/Thumb.styles.ts"],"sourcesContent":["import { styled } from '@linaria/react';\n\nimport { addFocus } from '../../../../mixins';\nimport { tokens } from '../../Slider.tokens';\n\nexport const ThumbBase = styled.div<{ disabled?: boolean }>`\n width: var(${tokens.thumbSize});\n height: var(${tokens.thumbSize});\n position: relative;\n left: -0.125rem;\n top: -0.125rem;\n border-radius: 50%;\n box-sizing: border-box;\n background: var(${tokens.thumbBackgroundColor});\n margin: 0.125rem;\n transition: border-color 0.1s ease-in-out;\n\n &:after {\n background: var(${tokens.thumbBorderColor});\n margin: -0.125rem;\n content: '';\n position: absolute;\n inset: 0;\n z-index: -1;\n border-radius: inherit;\n }\n\n &:not([disabled]):hover:after,\n &:not([disabled]):active:after {\n background: var(${tokens.thumbFocusBorderColor});\n }\n\n &[disabled] {\n cursor: not-allowed;\n }\n\n &:focus {\n outline: none;\n }\n\n ${addFocus({\n outlineOffset: '0.125rem',\n outlineSize: '0.125rem',\n outlineRadius: '50%',\n outlineColor: `var(${tokens.thumbFocusBorderColor})`,\n })}\n`;\n"],"names":["ThumbBase","styled","name","class","propsAsIs"],"mappings":";;AAKO,IAAMA,SAAS,gBAAGC,MAAM,CAAA,KAAA,CAAA,CAAA;AAAAC,EAAAA,IAAA,EAAA,WAAA;AAAAC,EAAAA,OAAAA,EAAA,SAAA;AAAAC,EAAAA,SAAA,EAAA,KAAA;AAAA,CAyC9B;;;;"}
@@ -0,0 +1 @@
1
+ .tqbdf8b{width:var(--plasma-slider-thumb-size);height:var(--plasma-slider-thumb-size);position:relative;left:-0.125rem;top:-0.125rem;border-radius:50%;box-sizing:border-box;background:var(--plasma-slider-thumb-background-color);margin:0.125rem;-webkit-transition:border-color 0.1s ease-in-out;transition:border-color 0.1s ease-in-out;position:relative;}.tqbdf8b:after{background:var(--plasma-slider-thumb-border-color);margin:-0.125rem;content:'';position:absolute;inset:0;z-index:-1;border-radius:inherit;}.tqbdf8b:not([disabled]):hover:after,.tqbdf8b:not([disabled]):active:after{background:var(--plasma-slider-thumb-focus-border-color);}.tqbdf8b[disabled]{cursor:not-allowed;}.tqbdf8b:focus{outline:none;}.tqbdf8b::before{content:'';position:absolute;top:0.125rem;left:0.125rem;right:0.125rem;bottom:0.125rem;z-index:1;display:block;box-sizing:content-box;border:0.125rem solid transparent;border-radius:50%;-webkit-transition:box-shadow 0.2s ease-in-out;transition:box-shadow 0.2s ease-in-out;pointer-events:none;}.tqbdf8b.focus-visible:focus::before,.tqbdf8b[data-focus-visible-added]::before{outline:none;box-shadow:0 0 0 0.125rem var(--plasma-slider-thumb-focus-border-color);}
@@ -0,0 +1,50 @@
1
+ /**
2
+ * Расчитать значение слайдера с учетом его координат и шага изменений.
3
+ * @param {number} handleCenterXRelative
4
+ * @param {number} stepSize
5
+ * @param {number} min
6
+ * @param {number} max
7
+ * @return {number}
8
+ */
9
+ function getSliderThumbValue(handleCenterXRelative, stepSize, min, max) {
10
+ var newValue = Math.round(handleCenterXRelative / stepSize) + min;
11
+ return Math.min(Math.max(newValue, min), max);
12
+ }
13
+
14
+ /**
15
+ * Расчитывает значение отступа слайдера на основе его положения (справа, слева) на отрезке слайдера.
16
+ * Значение используется для правильного расчета ограничения движения слайдера.
17
+ * @param ref
18
+ * @param {'left' | 'right'} side
19
+ * @return Array<number>
20
+ */
21
+ function getOffsets(ref, side) {
22
+ if (!ref || !('current' in ref) || !ref.current || !side) {
23
+ return [0, 0];
24
+ }
25
+ var size = ref.current.clientWidth;
26
+ if (side === 'left') {
27
+ return [0, size];
28
+ }
29
+ if (side === 'right') {
30
+ return [size, 0];
31
+ }
32
+ return [0, 0];
33
+ }
34
+ var sizeData = {
35
+ s: {
36
+ indent: 0.5,
37
+ fontSizeMultiplier: 16
38
+ },
39
+ m: {
40
+ indent: 0.75,
41
+ fontSizeMultiplier: 16
42
+ },
43
+ l: {
44
+ indent: 0.75,
45
+ fontSizeMultiplier: 16
46
+ }
47
+ };
48
+
49
+ export { getOffsets, getSliderThumbValue, sizeData };
50
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sources":["../../../../src/components/Slider/utils/index.ts"],"sourcesContent":["import { MutableRefObject } from 'react';\n\n/**\n * Расчитать значение слайдера с учетом его координат и шага изменений.\n * @param {number} handleCenterXRelative\n * @param {number} stepSize\n * @param {number} min\n * @param {number} max\n * @return {number}\n */\nexport function getSliderThumbValue(handleCenterXRelative: number, stepSize: number, min: number, max: number) {\n const newValue = Math.round(handleCenterXRelative / stepSize) + min;\n\n return Math.min(Math.max(newValue, min), max);\n}\n\n/**\n * Расчитывает значение отступа слайдера на основе его положения (справа, слева) на отрезке слайдера.\n * Значение используется для правильного расчета ограничения движения слайдера.\n * @param ref\n * @param {'left' | 'right'} side\n * @return Array<number>\n */\nexport function getOffsets(\n ref: ((instance: HTMLDivElement | null) => void) | MutableRefObject<HTMLDivElement | null> | null,\n side?: 'left' | 'right',\n): number[] {\n if (!ref || !('current' in ref) || !ref.current || !side) {\n return [0, 0];\n }\n\n const size = ref.current.clientWidth;\n\n if (side === 'left') {\n return [0, size];\n }\n\n if (side === 'right') {\n return [size, 0];\n }\n\n return [0, 0];\n}\n\nexport const sizeData = {\n s: {\n indent: 0.5,\n fontSizeMultiplier: 16,\n },\n m: {\n indent: 0.75,\n fontSizeMultiplier: 16,\n },\n l: {\n indent: 0.75,\n fontSizeMultiplier: 16,\n },\n};\n"],"names":["getSliderThumbValue","handleCenterXRelative","stepSize","min","max","newValue","Math","round","getOffsets","ref","side","current","size","clientWidth","sizeData","s","indent","fontSizeMultiplier","m","l"],"mappings":"AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,SAASA,mBAAmBA,CAACC,qBAA6B,EAAEC,QAAgB,EAAEC,GAAW,EAAEC,GAAW,EAAE;EAC3G,IAAMC,QAAQ,GAAGC,IAAI,CAACC,KAAK,CAACN,qBAAqB,GAAGC,QAAQ,CAAC,GAAGC,GAAG,CAAA;AAEnE,EAAA,OAAOG,IAAI,CAACH,GAAG,CAACG,IAAI,CAACF,GAAG,CAACC,QAAQ,EAAEF,GAAG,CAAC,EAAEC,GAAG,CAAC,CAAA;AACjD,CAAA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,SAASI,UAAUA,CACtBC,GAAiG,EACjGC,IAAuB,EACf;AACR,EAAA,IAAI,CAACD,GAAG,IAAI,EAAE,SAAS,IAAIA,GAAG,CAAC,IAAI,CAACA,GAAG,CAACE,OAAO,IAAI,CAACD,IAAI,EAAE;AACtD,IAAA,OAAO,CAAC,CAAC,EAAE,CAAC,CAAC,CAAA;AACjB,GAAA;AAEA,EAAA,IAAME,IAAI,GAAGH,GAAG,CAACE,OAAO,CAACE,WAAW,CAAA;EAEpC,IAAIH,IAAI,KAAK,MAAM,EAAE;AACjB,IAAA,OAAO,CAAC,CAAC,EAAEE,IAAI,CAAC,CAAA;AACpB,GAAA;EAEA,IAAIF,IAAI,KAAK,OAAO,EAAE;AAClB,IAAA,OAAO,CAACE,IAAI,EAAE,CAAC,CAAC,CAAA;AACpB,GAAA;AAEA,EAAA,OAAO,CAAC,CAAC,EAAE,CAAC,CAAC,CAAA;AACjB,CAAA;AAEO,IAAME,QAAQ,GAAG;AACpBC,EAAAA,CAAC,EAAE;AACCC,IAAAA,MAAM,EAAE,GAAG;AACXC,IAAAA,kBAAkB,EAAE,EAAA;GACvB;AACDC,EAAAA,CAAC,EAAE;AACCF,IAAAA,MAAM,EAAE,IAAI;AACZC,IAAAA,kBAAkB,EAAE,EAAA;GACvB;AACDE,EAAAA,CAAC,EAAE;AACCH,IAAAA,MAAM,EAAE,IAAI;AACZC,IAAAA,kBAAkB,EAAE,EAAA;AACxB,GAAA;AACJ;;;;"}
@@ -0,0 +1,5 @@
1
+ import './base_x642ct.css';
2
+ var base = "bbio09e";
3
+
4
+ export { base };
5
+ //# sourceMappingURL=base.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"base.js","sources":["../../../../../src/components/Slider/variations/_disabled/base.tsx"],"sourcesContent":["import { css } from '@linaria/core';\n\nexport const base = css``;\n"],"names":["base"],"mappings":"AAEO,IAAMA,IAAI,GAAQ;;;;"}
@@ -0,0 +1,5 @@
1
+ import './base_x642ct.css';
2
+ var base = "b7iqet7";
3
+
4
+ export { base };
5
+ //# sourceMappingURL=base.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"base.js","sources":["../../../../../src/components/Slider/variations/_size/base.tsx"],"sourcesContent":["import { css } from '@linaria/core';\n\nexport const base = css``;\n"],"names":["base"],"mappings":"AAEO,IAAMA,IAAI,GAAQ;;;;"}