@salutejs/plasma-new-hope 0.82.1-canary.1209.9162541836.0 → 0.83.0-canary.1194.9157747369.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (308) 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 +288 -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 +174 -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/TextArea/TextArea.js +5 -7
  50. package/cjs/components/TextArea/TextArea.js.map +1 -1
  51. package/cjs/components/TextArea/TextArea.tokens.js +0 -4
  52. package/cjs/components/TextArea/TextArea.tokens.js.map +1 -1
  53. package/cjs/components/TextArea/TextArea_qicm5y.css +1 -0
  54. package/cjs/components/TextField/TextField.js +12 -3
  55. package/cjs/components/TextField/TextField.js.map +1 -1
  56. package/cjs/engines/common.js +4 -0
  57. package/cjs/engines/common.js.map +1 -1
  58. package/cjs/engines/index.js.map +1 -1
  59. package/cjs/hooks/useIsomorphicLayoutEffect.js +15 -0
  60. package/cjs/hooks/useIsomorphicLayoutEffect.js.map +1 -0
  61. package/cjs/index.css +26 -1
  62. package/cjs/index.js +14 -0
  63. package/cjs/index.js.map +1 -1
  64. package/cjs/utils/canUseDOM.js +12 -0
  65. package/cjs/utils/canUseDOM.js.map +1 -0
  66. package/cjs/utils/index.js.map +1 -1
  67. package/es/components/Combobox/hooks/useFocusController.js +1 -0
  68. package/es/components/Combobox/hooks/useFocusController.js.map +1 -1
  69. package/es/components/Slider/Slider.css +69 -0
  70. package/es/components/Slider/Slider.js +43 -0
  71. package/es/components/Slider/Slider.js.map +1 -0
  72. package/es/components/Slider/Slider.tokens.js +74 -0
  73. package/es/components/Slider/Slider.tokens.js.map +1 -0
  74. package/es/components/Slider/components/Double/Double.css +62 -0
  75. package/es/components/Slider/components/Double/Double.js +284 -0
  76. package/es/components/Slider/components/Double/Double.js.map +1 -0
  77. package/es/components/Slider/components/Double/Double.styles.js +51 -0
  78. package/es/components/Slider/components/Double/Double.styles.js.map +1 -0
  79. package/es/components/Slider/components/Double/Double.styles_1jhda4u.css +7 -0
  80. package/es/components/Slider/components/Single/Single.css +16 -0
  81. package/es/components/Slider/components/Single/Single.js +160 -0
  82. package/es/components/Slider/components/Single/Single.js.map +1 -0
  83. package/es/components/Slider/components/Single/Single.styles.js +36 -0
  84. package/es/components/Slider/components/Single/Single.styles.js.map +1 -0
  85. package/es/components/Slider/components/Single/Single.styles_1r9f1e0.css +6 -0
  86. package/es/components/Slider/components/SliderBase/SliderBase.css +4 -0
  87. package/es/components/Slider/components/SliderBase/SliderBase.js +78 -0
  88. package/es/components/Slider/components/SliderBase/SliderBase.js.map +1 -0
  89. package/es/components/Slider/components/SliderBase/SliderBase.styles.js +26 -0
  90. package/es/components/Slider/components/SliderBase/SliderBase.styles.js.map +1 -0
  91. package/es/components/Slider/components/SliderBase/SliderBase.styles_7is2ll.css +4 -0
  92. package/es/components/Slider/ui/Handler/Handler.css +4 -0
  93. package/es/components/Slider/ui/Handler/Handler.js +170 -0
  94. package/es/components/Slider/ui/Handler/Handler.js.map +1 -0
  95. package/es/components/Slider/ui/Handler/Handler.styles.js +16 -0
  96. package/es/components/Slider/ui/Handler/Handler.styles.js.map +1 -0
  97. package/es/components/Slider/ui/Handler/Handler.styles_8crx5z.css +2 -0
  98. package/es/components/Slider/ui/Thumb/Thumb.css +1 -0
  99. package/es/components/Slider/ui/Thumb/Thumb.js +27 -0
  100. package/es/components/Slider/ui/Thumb/Thumb.js.map +1 -0
  101. package/es/components/Slider/ui/Thumb/Thumb.styles.js +11 -0
  102. package/es/components/Slider/ui/Thumb/Thumb.styles.js.map +1 -0
  103. package/es/components/Slider/ui/Thumb/Thumb.styles_4w4gzn.css +1 -0
  104. package/es/components/Slider/utils/index.js +50 -0
  105. package/es/components/Slider/utils/index.js.map +1 -0
  106. package/es/components/Slider/variations/_disabled/base.js +5 -0
  107. package/es/components/Slider/variations/_disabled/base.js.map +1 -0
  108. package/es/components/Slider/variations/_disabled/base_x642ct.css +1 -0
  109. package/es/components/Slider/variations/_size/base.js +5 -0
  110. package/es/components/Slider/variations/_size/base.js.map +1 -0
  111. package/es/components/Slider/variations/_size/base_x642ct.css +1 -0
  112. package/es/components/Slider/variations/_view/base.js +5 -0
  113. package/es/components/Slider/variations/_view/base.js.map +1 -0
  114. package/es/components/Slider/variations/_view/base_x642ct.css +1 -0
  115. package/es/components/TextArea/TextArea.js +5 -7
  116. package/es/components/TextArea/TextArea.js.map +1 -1
  117. package/es/components/TextArea/TextArea.tokens.js +0 -4
  118. package/es/components/TextArea/TextArea.tokens.js.map +1 -1
  119. package/es/components/TextArea/TextArea_qicm5y.css +1 -0
  120. package/es/components/TextField/TextField.js +12 -3
  121. package/es/components/TextField/TextField.js.map +1 -1
  122. package/es/engines/common.js +4 -0
  123. package/es/engines/common.js.map +1 -1
  124. package/es/engines/index.js.map +1 -1
  125. package/es/hooks/useIsomorphicLayoutEffect.js +11 -0
  126. package/es/hooks/useIsomorphicLayoutEffect.js.map +1 -0
  127. package/es/index.css +26 -1
  128. package/es/index.js +8 -0
  129. package/es/index.js.map +1 -1
  130. package/es/utils/canUseDOM.js +8 -0
  131. package/es/utils/canUseDOM.js.map +1 -0
  132. package/es/utils/index.js.map +1 -1
  133. package/package.json +3 -2
  134. package/styled-components/cjs/components/Slider/Slider.js +47 -0
  135. package/styled-components/cjs/components/Slider/Slider.tokens.js +77 -0
  136. package/styled-components/cjs/components/Slider/Slider.types.js +5 -0
  137. package/styled-components/cjs/components/Slider/components/Double/Double.js +300 -0
  138. package/styled-components/cjs/components/Slider/components/Double/Double.styles.js +36 -0
  139. package/styled-components/cjs/components/Slider/components/Double/Double.types.js +5 -0
  140. package/styled-components/cjs/components/Slider/components/Single/Single.js +176 -0
  141. package/styled-components/cjs/components/Slider/components/Single/Single.styles.js +27 -0
  142. package/styled-components/cjs/components/Slider/components/Single/Single.types.js +5 -0
  143. package/styled-components/cjs/components/Slider/components/SliderBase/SliderBase.js +83 -0
  144. package/styled-components/cjs/components/Slider/components/SliderBase/SliderBase.styles.js +21 -0
  145. package/styled-components/cjs/components/Slider/components/SliderBase/SliderBase.types.js +5 -0
  146. package/styled-components/cjs/components/Slider/components/index.js +27 -0
  147. package/styled-components/cjs/components/Slider/index.js +32 -0
  148. package/styled-components/cjs/components/Slider/ui/Handler/Handler.js +183 -0
  149. package/styled-components/cjs/components/Slider/ui/Handler/Handler.styles.js +15 -0
  150. package/styled-components/cjs/components/Slider/ui/Handler/Handler.types.js +5 -0
  151. package/styled-components/cjs/components/Slider/ui/Thumb/Thumb.js +32 -0
  152. package/styled-components/cjs/components/Slider/ui/Thumb/Thumb.styles.js +18 -0
  153. package/styled-components/cjs/components/Slider/ui/Thumb/Thumb.types.js +5 -0
  154. package/styled-components/cjs/components/Slider/ui/index.js +63 -0
  155. package/styled-components/cjs/components/Slider/utils/index.js +55 -0
  156. package/styled-components/cjs/components/Slider/variations/_disabled/base.js +8 -0
  157. package/styled-components/cjs/components/Slider/variations/_disabled/tokens.json +4 -0
  158. package/styled-components/cjs/components/Slider/variations/_size/base.js +8 -0
  159. package/styled-components/cjs/components/Slider/variations/_size/tokens.json +0 -0
  160. package/styled-components/cjs/components/Slider/variations/_view/base.js +8 -0
  161. package/styled-components/cjs/components/Slider/variations/_view/tokens.json +0 -0
  162. package/styled-components/cjs/components/TextArea/TextArea.js +4 -6
  163. package/styled-components/cjs/components/TextArea/TextArea.tokens.js +0 -4
  164. package/styled-components/cjs/components/TextArea/mixins/applyDynamicLabel.js +1 -1
  165. package/styled-components/cjs/components/TextField/TextField.js +12 -3
  166. package/styled-components/cjs/engines/common.js +4 -0
  167. package/styled-components/cjs/examples/plasma_b2c/components/Slider/Slider.config.js +29 -0
  168. package/styled-components/cjs/examples/plasma_b2c/components/Slider/Slider.js +16 -0
  169. package/styled-components/cjs/examples/plasma_b2c/components/Slider/Slider.stories.tsx +164 -0
  170. package/styled-components/cjs/examples/plasma_b2c/components/TextArea/TextArea.config.js +4 -4
  171. package/styled-components/cjs/examples/plasma_web/components/Slider/Slider.config.js +29 -0
  172. package/styled-components/cjs/examples/plasma_web/components/Slider/Slider.js +16 -0
  173. package/styled-components/cjs/examples/plasma_web/components/Slider/Slider.stories.tsx +163 -0
  174. package/styled-components/cjs/examples/plasma_web/components/TextArea/TextArea.config.js +4 -4
  175. package/styled-components/cjs/hooks/index.js +8 -1
  176. package/styled-components/cjs/hooks/useIsomorphicLayoutEffect.js +12 -0
  177. package/styled-components/cjs/index.js +11 -0
  178. package/styled-components/cjs/utils/canUseDOM.js +11 -0
  179. package/styled-components/cjs/utils/index.js +7 -0
  180. package/styled-components/es/components/Slider/Slider.js +38 -0
  181. package/styled-components/es/components/Slider/Slider.tokens.js +71 -0
  182. package/styled-components/es/components/Slider/Slider.types.js +1 -0
  183. package/styled-components/es/components/Slider/components/Double/Double.js +292 -0
  184. package/styled-components/es/components/Slider/components/Double/Double.styles.js +29 -0
  185. package/styled-components/es/components/Slider/components/Double/Double.types.js +1 -0
  186. package/styled-components/es/components/Slider/components/Single/Single.js +168 -0
  187. package/styled-components/es/components/Slider/components/Single/Single.styles.js +20 -0
  188. package/styled-components/es/components/Slider/components/Single/Single.types.js +1 -0
  189. package/styled-components/es/components/Slider/components/SliderBase/SliderBase.js +74 -0
  190. package/styled-components/es/components/Slider/components/SliderBase/SliderBase.styles.js +14 -0
  191. package/styled-components/es/components/Slider/components/SliderBase/SliderBase.types.js +1 -0
  192. package/styled-components/es/components/Slider/components/index.js +3 -0
  193. package/styled-components/es/components/Slider/index.js +3 -0
  194. package/styled-components/es/components/Slider/ui/Handler/Handler.js +174 -0
  195. package/styled-components/es/components/Slider/ui/Handler/Handler.styles.js +8 -0
  196. package/styled-components/es/components/Slider/ui/Handler/Handler.types.js +1 -0
  197. package/styled-components/es/components/Slider/ui/Thumb/Thumb.js +25 -0
  198. package/styled-components/es/components/Slider/ui/Thumb/Thumb.styles.js +11 -0
  199. package/styled-components/es/components/Slider/ui/Thumb/Thumb.types.js +1 -0
  200. package/styled-components/es/components/Slider/ui/index.js +5 -0
  201. package/styled-components/es/components/Slider/utils/index.js +47 -0
  202. package/styled-components/es/components/Slider/variations/_disabled/base.js +2 -0
  203. package/styled-components/es/components/Slider/variations/_disabled/tokens.json +4 -0
  204. package/styled-components/es/components/Slider/variations/_size/base.js +2 -0
  205. package/styled-components/es/components/Slider/variations/_size/tokens.json +0 -0
  206. package/styled-components/es/components/Slider/variations/_view/base.js +2 -0
  207. package/styled-components/es/components/Slider/variations/_view/tokens.json +0 -0
  208. package/styled-components/es/components/TextArea/TextArea.js +4 -6
  209. package/styled-components/es/components/TextArea/TextArea.tokens.js +0 -4
  210. package/styled-components/es/components/TextArea/mixins/applyDynamicLabel.js +1 -1
  211. package/styled-components/es/components/TextField/TextField.js +12 -3
  212. package/styled-components/es/engines/common.js +4 -0
  213. package/styled-components/es/examples/plasma_b2c/components/Slider/Slider.config.js +23 -0
  214. package/styled-components/es/examples/plasma_b2c/components/Slider/Slider.js +10 -0
  215. package/styled-components/es/examples/plasma_b2c/components/Slider/Slider.stories.tsx +164 -0
  216. package/styled-components/es/examples/plasma_b2c/components/TextArea/TextArea.config.js +4 -4
  217. package/styled-components/es/examples/plasma_web/components/Slider/Slider.config.js +23 -0
  218. package/styled-components/es/examples/plasma_web/components/Slider/Slider.js +10 -0
  219. package/styled-components/es/examples/plasma_web/components/Slider/Slider.stories.tsx +163 -0
  220. package/styled-components/es/examples/plasma_web/components/TextArea/TextArea.config.js +4 -4
  221. package/styled-components/es/hooks/index.js +2 -1
  222. package/styled-components/es/hooks/useIsomorphicLayoutEffect.js +7 -0
  223. package/styled-components/es/index.js +2 -1
  224. package/styled-components/es/utils/canUseDOM.js +5 -0
  225. package/styled-components/es/utils/index.js +1 -0
  226. package/types/components/Slider/Slider.d.ts +27 -0
  227. package/types/components/Slider/Slider.d.ts.map +1 -0
  228. package/types/components/Slider/Slider.tokens.d.ts +72 -0
  229. package/types/components/Slider/Slider.tokens.d.ts.map +1 -0
  230. package/types/components/Slider/Slider.types.d.ts +3 -0
  231. package/types/components/Slider/Slider.types.d.ts.map +1 -0
  232. package/types/components/Slider/components/Double/Double.d.ts +4 -0
  233. package/types/components/Slider/components/Double/Double.d.ts.map +1 -0
  234. package/types/components/Slider/components/Double/Double.styles.d.ts +43 -0
  235. package/types/components/Slider/components/Double/Double.styles.d.ts.map +1 -0
  236. package/types/components/Slider/components/Double/Double.types.d.ts +65 -0
  237. package/types/components/Slider/components/Double/Double.types.d.ts.map +1 -0
  238. package/types/components/Slider/components/Single/Single.d.ts +4 -0
  239. package/types/components/Slider/components/Single/Single.d.ts.map +1 -0
  240. package/types/components/Slider/components/Single/Single.styles.d.ts +8 -0
  241. package/types/components/Slider/components/Single/Single.styles.d.ts.map +1 -0
  242. package/types/components/Slider/components/Single/Single.types.d.ts +55 -0
  243. package/types/components/Slider/components/Single/Single.types.d.ts.map +1 -0
  244. package/types/components/Slider/components/SliderBase/SliderBase.d.ts +4 -0
  245. package/types/components/Slider/components/SliderBase/SliderBase.d.ts.map +1 -0
  246. package/types/components/Slider/components/SliderBase/SliderBase.styles.d.ts +6 -0
  247. package/types/components/Slider/components/SliderBase/SliderBase.styles.d.ts.map +1 -0
  248. package/types/components/Slider/components/SliderBase/SliderBase.types.d.ts +45 -0
  249. package/types/components/Slider/components/SliderBase/SliderBase.types.d.ts.map +1 -0
  250. package/types/components/Slider/components/index.d.ts +6 -0
  251. package/types/components/Slider/components/index.d.ts.map +1 -0
  252. package/types/components/Slider/index.d.ts +6 -0
  253. package/types/components/Slider/index.d.ts.map +1 -0
  254. package/types/components/Slider/ui/Handler/Handler.d.ts +9 -0
  255. package/types/components/Slider/ui/Handler/Handler.d.ts.map +1 -0
  256. package/types/components/Slider/ui/Handler/Handler.styles.d.ts +4 -0
  257. package/types/components/Slider/ui/Handler/Handler.styles.d.ts.map +1 -0
  258. package/types/components/Slider/ui/Handler/Handler.types.d.ts +24 -0
  259. package/types/components/Slider/ui/Handler/Handler.types.d.ts.map +1 -0
  260. package/types/components/Slider/ui/Thumb/Thumb.d.ts +4 -0
  261. package/types/components/Slider/ui/Thumb/Thumb.d.ts.map +1 -0
  262. package/types/components/Slider/ui/Thumb/Thumb.styles.d.ts +5 -0
  263. package/types/components/Slider/ui/Thumb/Thumb.styles.d.ts.map +1 -0
  264. package/types/components/Slider/ui/Thumb/Thumb.types.d.ts +12 -0
  265. package/types/components/Slider/ui/Thumb/Thumb.types.d.ts.map +1 -0
  266. package/types/components/Slider/ui/index.d.ts +6 -0
  267. package/types/components/Slider/ui/index.d.ts.map +1 -0
  268. package/types/components/Slider/utils/index.d.ts +33 -0
  269. package/types/components/Slider/utils/index.d.ts.map +1 -0
  270. package/types/components/Slider/variations/_disabled/base.d.ts +2 -0
  271. package/types/components/Slider/variations/_disabled/base.d.ts.map +1 -0
  272. package/types/components/Slider/variations/_size/base.d.ts +2 -0
  273. package/types/components/Slider/variations/_size/base.d.ts.map +1 -0
  274. package/types/components/Slider/variations/_view/base.d.ts +2 -0
  275. package/types/components/Slider/variations/_view/base.d.ts.map +1 -0
  276. package/types/components/TextArea/TextArea.d.ts.map +1 -1
  277. package/types/components/TextArea/TextArea.tokens.d.ts +0 -4
  278. package/types/components/TextArea/TextArea.tokens.d.ts.map +1 -1
  279. package/types/components/TextArea/mixins/applyDynamicLabel.d.ts.map +1 -1
  280. package/types/components/TextField/TextField.d.ts.map +1 -1
  281. package/types/engines/common.d.ts +3 -3
  282. package/types/engines/common.d.ts.map +1 -1
  283. package/types/engines/index.d.ts +1 -1
  284. package/types/engines/index.d.ts.map +1 -1
  285. package/types/engines/types.d.ts +4 -0
  286. package/types/engines/types.d.ts.map +1 -1
  287. package/types/examples/plasma_b2c/components/Slider/Slider.config.d.ts +22 -0
  288. package/types/examples/plasma_b2c/components/Slider/Slider.config.d.ts.map +1 -0
  289. package/types/examples/plasma_b2c/components/Slider/Slider.d.ts +21 -0
  290. package/types/examples/plasma_b2c/components/Slider/Slider.d.ts.map +1 -0
  291. package/types/examples/plasma_b2c/components/TextArea/TextArea.config.d.ts.map +1 -1
  292. package/types/examples/plasma_web/components/Slider/Slider.config.d.ts +22 -0
  293. package/types/examples/plasma_web/components/Slider/Slider.config.d.ts.map +1 -0
  294. package/types/examples/plasma_web/components/Slider/Slider.d.ts +21 -0
  295. package/types/examples/plasma_web/components/Slider/Slider.d.ts.map +1 -0
  296. package/types/examples/plasma_web/components/TextArea/TextArea.config.d.ts.map +1 -1
  297. package/types/hooks/index.d.ts +1 -0
  298. package/types/hooks/index.d.ts.map +1 -1
  299. package/types/hooks/useIsomorphicLayoutEffect.d.ts +6 -0
  300. package/types/hooks/useIsomorphicLayoutEffect.d.ts.map +1 -0
  301. package/types/index.d.ts +1 -0
  302. package/types/index.d.ts.map +1 -1
  303. package/types/utils/canUseDOM.d.ts +6 -0
  304. package/types/utils/canUseDOM.d.ts.map +1 -0
  305. package/types/utils/index.d.ts +1 -0
  306. package/types/utils/index.d.ts.map +1 -1
  307. package/cjs/components/TextArea/TextArea_ob9y3r.css +0 -1
  308. package/es/components/TextArea/TextArea_ob9y3r.css +0 -1
@@ -0,0 +1,288 @@
1
+ 'use strict';
2
+
3
+ Object.defineProperty(exports, '__esModule', { value: true });
4
+
5
+ var _rollupPluginBabelHelpers = require('../../../../_virtual/_rollupPluginBabelHelpers.js');
6
+ var React = require('react');
7
+ var SliderBase = require('../SliderBase/SliderBase.js');
8
+ var Handler = require('../../ui/Handler/Handler.js');
9
+ require('@linaria/react');
10
+ var index = require('../../utils/index.js');
11
+ var index$1 = require('../../../../utils/index.js');
12
+ var Slider_tokens = require('../../Slider.tokens.js');
13
+ var Double_styles = require('./Double.styles.js');
14
+ var isNumber = require('../../../../utils/isNumber.js');
15
+
16
+ var _excluded = ["min", "max", "value", "disabled", "label", "labelContentLeft", "size", "onChangeCommitted", "onChangeTextField", "onBlurTextField", "onKeyDownTextField", "onChange", "ariaLabel", "multipleStepSize"];
17
+ function getXCenterHandle(handle) {
18
+ var _handle$parentElement;
19
+ var containerX = ((_handle$parentElement = handle.parentElement) === null || _handle$parentElement === void 0 || (_handle$parentElement = _handle$parentElement.getBoundingClientRect()) === null || _handle$parentElement === void 0 ? void 0 : _handle$parentElement.x) || 0;
20
+ var handleRect = handle.getBoundingClientRect();
21
+ var handlePosition = handleRect.x;
22
+ return handlePosition - containerX;
23
+ }
24
+ var DoubleSlider = function DoubleSlider(_ref) {
25
+ var min = _ref.min,
26
+ max = _ref.max,
27
+ value = _ref.value,
28
+ disabled = _ref.disabled,
29
+ label = _ref.label,
30
+ labelContentLeft = _ref.labelContentLeft,
31
+ _ref$size = _ref.size,
32
+ size = _ref$size === void 0 ? 'm' : _ref$size,
33
+ onChangeCommitted = _ref.onChangeCommitted,
34
+ onChangeTextField = _ref.onChangeTextField,
35
+ onBlurTextField = _ref.onBlurTextField,
36
+ onKeyDownTextField = _ref.onKeyDownTextField,
37
+ onChange = _ref.onChange,
38
+ ariaLabel = _ref.ariaLabel,
39
+ _ref$multipleStepSize = _ref.multipleStepSize,
40
+ multipleStepSize = _ref$multipleStepSize === void 0 ? 10 : _ref$multipleStepSize,
41
+ rest = _rollupPluginBabelHelpers.objectWithoutProperties(_ref, _excluded);
42
+ var _useState = React.useState({
43
+ stepSize: 0,
44
+ railFillWidth: 0,
45
+ railFillXPosition: 0,
46
+ xFirstHandle: 0,
47
+ xSecondHandle: 0,
48
+ firstHandleZIndex: 100,
49
+ secondHandleZIndex: 101,
50
+ firstValue: value[0],
51
+ secondValue: value[1]
52
+ }),
53
+ _useState2 = _rollupPluginBabelHelpers.slicedToArray(_useState, 2),
54
+ state = _useState2[0],
55
+ setState = _useState2[1];
56
+ var _useState3 = React.useState(false),
57
+ _useState4 = _rollupPluginBabelHelpers.slicedToArray(_useState3, 2),
58
+ firstInputActive = _useState4[0],
59
+ setFirstInputActive = _useState4[1];
60
+ var _useState5 = React.useState(false),
61
+ _useState6 = _rollupPluginBabelHelpers.slicedToArray(_useState5, 2),
62
+ secondInputActive = _useState6[0],
63
+ setSecondInputActive = _useState6[1];
64
+ var _useState7 = React.useState(value[0]),
65
+ _useState8 = _rollupPluginBabelHelpers.slicedToArray(_useState7, 2),
66
+ firstValue = _useState8[0],
67
+ setFirstValue = _useState8[1];
68
+ var _useState9 = React.useState(value[1]),
69
+ _useState10 = _rollupPluginBabelHelpers.slicedToArray(_useState9, 2),
70
+ secondValue = _useState10[0],
71
+ setSecondValue = _useState10[1];
72
+ var firstHandleRef = React.useRef(null);
73
+ var secondHandleRef = React.useRef(null);
74
+ var firstHandleValue = React.useRef(value[0]);
75
+ var secondHandleValue = React.useRef(value[1]);
76
+ var stepSize = state.stepSize;
77
+ var hasLabelContent = label || labelContentLeft;
78
+ var firstInputActiveClass = firstInputActive && !disabled ? Slider_tokens.classes.textFieldActive : undefined;
79
+ var secondInputActiveClass = secondInputActive && !disabled ? Slider_tokens.classes.textFieldActive : undefined;
80
+ React.useEffect(function () {
81
+ var firstLocalValue = Math.min(Math.max(value[0], min), max) - min;
82
+ var secondLocalValue = Math.min(Math.max(value[1], min), max) - min;
83
+ setFirstValue(value[0]);
84
+ setSecondValue(value[1]);
85
+ setState(function (prevState) {
86
+ return _rollupPluginBabelHelpers.objectSpread2(_rollupPluginBabelHelpers.objectSpread2({}, prevState), {}, {
87
+ railFillXPosition: stepSize * firstLocalValue,
88
+ railFillWidth: stepSize * secondLocalValue - stepSize * firstLocalValue,
89
+ xFirstHandle: stepSize * firstLocalValue,
90
+ xSecondHandle: stepSize * secondLocalValue
91
+ });
92
+ });
93
+ }, [value, stepSize, min, max, setFirstValue, setSecondValue]);
94
+ var setStepSize = React.useCallback(function (newStepSize) {
95
+ setState(function (prevState) {
96
+ return _rollupPluginBabelHelpers.objectSpread2(_rollupPluginBabelHelpers.objectSpread2({}, prevState), {}, {
97
+ stepSize: newStepSize
98
+ });
99
+ });
100
+ }, [setState]);
101
+ var onFirstHandleChange = function onFirstHandleChange(handleValue, data) {
102
+ if (!(secondHandleRef !== null && secondHandleRef !== void 0 && secondHandleRef.current)) {
103
+ return;
104
+ }
105
+ var newHandleXPosition = data.x;
106
+ var secondHandleXPosition = getXCenterHandle(secondHandleRef.current);
107
+ var fillWidth = secondHandleXPosition - newHandleXPosition;
108
+ firstHandleValue.current = handleValue;
109
+ setFirstValue(handleValue);
110
+ setState(function (prevState) {
111
+ return _rollupPluginBabelHelpers.objectSpread2(_rollupPluginBabelHelpers.objectSpread2({}, prevState), {}, {
112
+ firstHandleZIndex: 101,
113
+ secondHandleZIndex: 100,
114
+ railFillWidth: fillWidth < 0 ? 0 : fillWidth,
115
+ railFillXPosition: newHandleXPosition
116
+ });
117
+ });
118
+ if (onChange) {
119
+ onChange([handleValue, value[1]]);
120
+ }
121
+ };
122
+ var onFirstHandleChangeCommitted = function onFirstHandleChangeCommitted(handleValue, data) {
123
+ setFirstValue(handleValue);
124
+ if (onChangeCommitted) {
125
+ onChangeCommitted([handleValue, value[1]]);
126
+ }
127
+ setState(function (prevState) {
128
+ return _rollupPluginBabelHelpers.objectSpread2(_rollupPluginBabelHelpers.objectSpread2({}, prevState), {}, {
129
+ firstValue: handleValue,
130
+ xFirstHandle: data.lastX
131
+ });
132
+ });
133
+ };
134
+ var onFirstTextfieldChange = function onFirstTextfieldChange(event) {
135
+ if (!isNumber.isNumber(event.target.value)) {
136
+ return;
137
+ }
138
+ var handleValue = Number(event.target.value);
139
+ setFirstValue(handleValue);
140
+ if (onChangeTextField) {
141
+ onChangeTextField([handleValue, secondValue], event);
142
+ }
143
+ };
144
+ var onFirstTextfieldBlur = function onFirstTextfieldBlur(event) {
145
+ if (!isNumber.isNumber(event.target.value)) {
146
+ return;
147
+ }
148
+ var handleValue = Number(event.target.value);
149
+ setFirstValue(handleValue);
150
+ if (onBlurTextField) {
151
+ onBlurTextField && onBlurTextField([handleValue, secondValue], event);
152
+ }
153
+ };
154
+ var onSecondHandleChange = function onSecondHandleChange(handleValue, data) {
155
+ if (!(firstHandleRef !== null && firstHandleRef !== void 0 && firstHandleRef.current)) {
156
+ return;
157
+ }
158
+ var firstXHandleXPosition = getXCenterHandle(firstHandleRef.current);
159
+ var newHandleXPosition = data.x;
160
+ var fillWidth = newHandleXPosition - firstXHandleXPosition;
161
+ secondHandleValue.current = handleValue;
162
+ setSecondValue(handleValue);
163
+ setState(function (prevState) {
164
+ return _rollupPluginBabelHelpers.objectSpread2(_rollupPluginBabelHelpers.objectSpread2({}, prevState), {}, {
165
+ firstHandleZIndex: 100,
166
+ secondHandleZIndex: 101,
167
+ railFillWidth: fillWidth < 0 ? 0 : fillWidth,
168
+ railFillXPosition: firstXHandleXPosition
169
+ });
170
+ });
171
+ if (onChange) {
172
+ onChange([value[0], handleValue]);
173
+ }
174
+ };
175
+ var onSecondHandleChangeCommitted = function onSecondHandleChangeCommitted(handleValue, data) {
176
+ if (onChangeCommitted) {
177
+ onChangeCommitted([value[0], handleValue]);
178
+ }
179
+ setSecondValue(handleValue);
180
+ setState(function (prevState) {
181
+ return _rollupPluginBabelHelpers.objectSpread2(_rollupPluginBabelHelpers.objectSpread2({}, prevState), {}, {
182
+ secondValue: handleValue,
183
+ xSecondHandle: data.lastX
184
+ });
185
+ });
186
+ };
187
+ var onSecondTextfieldChange = function onSecondTextfieldChange(event) {
188
+ if (!isNumber.isNumber(event.target.value)) {
189
+ return;
190
+ }
191
+ var handleValue = Number(event.target.value);
192
+ setSecondValue(handleValue);
193
+ if (onChangeTextField) {
194
+ onChangeTextField([firstValue, handleValue], event);
195
+ }
196
+ };
197
+ var onSecondTextfieldBlur = function onSecondTextfieldBlur(event) {
198
+ if (!isNumber.isNumber(event.target.value)) {
199
+ return;
200
+ }
201
+ var handleValue = Number(event.target.value);
202
+ setSecondValue(handleValue);
203
+ if (onBlurTextField) {
204
+ onBlurTextField([firstValue, handleValue], event);
205
+ }
206
+ };
207
+ var onTextfieldKeyDown = function onTextfieldKeyDown(event) {
208
+ if (onKeyDownTextField) {
209
+ onKeyDownTextField([firstValue, secondValue], event);
210
+ }
211
+ };
212
+ var _ref2 = ariaLabel || [],
213
+ _ref3 = _rollupPluginBabelHelpers.slicedToArray(_ref2, 2),
214
+ ariaLabelLeft = _ref3[0],
215
+ ariaLabelRight = _ref3[1];
216
+ var currentFirstSliderValue = Math.max(state.firstValue, min);
217
+ return /*#__PURE__*/React.createElement(Double_styles.DoubleWrapper, null, hasLabelContent && /*#__PURE__*/React.createElement(Double_styles.LabelWrapper, null, labelContentLeft && /*#__PURE__*/React.createElement(Double_styles.LabelContentLeft, null, labelContentLeft), label && /*#__PURE__*/React.createElement(Double_styles.Label, null, label)), /*#__PURE__*/React.createElement(Double_styles.SliderWrapper, null, /*#__PURE__*/React.createElement(SliderBase.SliderBase, _rollupPluginBabelHelpers.extends({
218
+ min: min,
219
+ max: max,
220
+ disabled: disabled,
221
+ setStepSize: setStepSize,
222
+ railFillWidth: state.railFillWidth,
223
+ settings: index.sizeData[size],
224
+ railFillXPosition: state.railFillXPosition
225
+ }, rest), /*#__PURE__*/React.createElement(Handler.Handler, {
226
+ ref: firstHandleRef,
227
+ stepSize: state.stepSize,
228
+ multipleStepSize: multipleStepSize,
229
+ onChangeCommitted: onFirstHandleChangeCommitted,
230
+ onChange: onFirstHandleChange,
231
+ min: min,
232
+ max: state.secondValue,
233
+ disabled: disabled,
234
+ bounds: [min, state.secondValue],
235
+ side: "left",
236
+ xPosition: state.xFirstHandle,
237
+ zIndex: state.firstHandleZIndex,
238
+ value: currentFirstSliderValue,
239
+ ariaLabel: ariaLabelLeft,
240
+ onMouseEnter: function onMouseEnter() {
241
+ return setFirstInputActive(true);
242
+ },
243
+ onMouseLeave: function onMouseLeave() {
244
+ return setFirstInputActive(false);
245
+ }
246
+ }), /*#__PURE__*/React.createElement(Handler.Handler, {
247
+ ref: secondHandleRef,
248
+ stepSize: state.stepSize,
249
+ multipleStepSize: multipleStepSize,
250
+ onChangeCommitted: onSecondHandleChangeCommitted,
251
+ onChange: onSecondHandleChange,
252
+ min: min,
253
+ ariaValueMin: currentFirstSliderValue,
254
+ max: max,
255
+ disabled: disabled,
256
+ bounds: [state.firstValue, max],
257
+ side: "right",
258
+ xPosition: state.xSecondHandle,
259
+ zIndex: state.secondHandleZIndex,
260
+ value: Math.max(state.secondValue, min),
261
+ ariaLabel: ariaLabelRight,
262
+ onMouseEnter: function onMouseEnter() {
263
+ return setSecondInputActive(true);
264
+ },
265
+ onMouseLeave: function onMouseLeave() {
266
+ return setSecondInputActive(false);
267
+ }
268
+ })), /*#__PURE__*/React.createElement(Double_styles.InputsWrapper, null, /*#__PURE__*/React.createElement(Double_styles.StyledInput, {
269
+ className: index$1.cx(Slider_tokens.classes.firstTextField, firstInputActiveClass),
270
+ enumerationType: "plain",
271
+ disabled: disabled,
272
+ value: firstValue,
273
+ onChange: onFirstTextfieldChange,
274
+ onBlur: onFirstTextfieldBlur,
275
+ onKeyDown: onTextfieldKeyDown
276
+ }), /*#__PURE__*/React.createElement(Double_styles.StyledInput, {
277
+ className: index$1.cx(Slider_tokens.classes.secondTextField, secondInputActiveClass),
278
+ enumerationType: "plain",
279
+ disabled: disabled,
280
+ value: secondValue,
281
+ onChange: onSecondTextfieldChange,
282
+ onBlur: onSecondTextfieldBlur,
283
+ onKeyDown: onTextfieldKeyDown
284
+ }))));
285
+ };
286
+
287
+ exports.DoubleSlider = DoubleSlider;
288
+ //# sourceMappingURL=Double.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Double.js","sources":["../../../../../src/components/Slider/components/Double/Double.tsx"],"sourcesContent":["import React, { useCallback, useEffect, useRef, useState } from 'react';\nimport type { FC, ChangeEvent, KeyboardEvent, FocusEvent } from 'react';\n\nimport { SliderBase } from '../SliderBase/SliderBase';\nimport { Handler } from '../../ui';\nimport type { HandlerProps } from '../../ui';\nimport { sizeData } from '../../utils';\nimport { cx, isNumber } from '../../../../utils';\nimport { classes } from '../../Slider.tokens';\n\nimport { DoubleSliderProps } from './Double.types';\nimport {\n SliderWrapper,\n InputsWrapper,\n Label,\n LabelContentLeft,\n LabelWrapper,\n StyledInput,\n DoubleWrapper,\n} from './Double.styles';\n\nfunction getXCenterHandle(handle: HTMLDivElement) {\n const containerX = handle.parentElement?.getBoundingClientRect()?.x || 0;\n const handleRect = handle.getBoundingClientRect();\n const handlePosition = handleRect.x;\n return handlePosition - containerX;\n}\n\nexport const DoubleSlider: FC<DoubleSliderProps> = ({\n min,\n max,\n value,\n disabled,\n label,\n labelContentLeft,\n size = 'm',\n onChangeCommitted,\n onChangeTextField,\n onBlurTextField,\n onKeyDownTextField,\n onChange,\n ariaLabel,\n multipleStepSize = 10,\n ...rest\n}) => {\n const [state, setState] = useState({\n stepSize: 0,\n railFillWidth: 0,\n railFillXPosition: 0,\n xFirstHandle: 0,\n xSecondHandle: 0,\n firstHandleZIndex: 100,\n secondHandleZIndex: 101,\n firstValue: value[0],\n secondValue: value[1],\n });\n const [firstInputActive, setFirstInputActive] = useState(false);\n const [secondInputActive, setSecondInputActive] = useState(false);\n\n const [firstValue, setFirstValue] = useState<number>(value[0]);\n const [secondValue, setSecondValue] = useState<number>(value[1]);\n\n const firstHandleRef = useRef<HTMLDivElement | null>(null);\n const secondHandleRef = useRef<HTMLDivElement | null>(null);\n\n const firstHandleValue = useRef<number>(value[0]);\n const secondHandleValue = useRef<number>(value[1]);\n\n const { stepSize } = state;\n\n const hasLabelContent = label || labelContentLeft;\n const firstInputActiveClass = firstInputActive && !disabled ? classes.textFieldActive : undefined;\n const secondInputActiveClass = secondInputActive && !disabled ? classes.textFieldActive : undefined;\n\n useEffect(() => {\n const firstLocalValue = Math.min(Math.max(value[0], min), max) - min;\n const secondLocalValue = Math.min(Math.max(value[1], min), max) - min;\n\n setFirstValue(value[0]);\n setSecondValue(value[1]);\n\n setState((prevState) => ({\n ...prevState,\n railFillXPosition: stepSize * firstLocalValue,\n railFillWidth: stepSize * secondLocalValue - stepSize * firstLocalValue,\n xFirstHandle: stepSize * firstLocalValue,\n xSecondHandle: stepSize * secondLocalValue,\n }));\n }, [value, stepSize, min, max, setFirstValue, setSecondValue]);\n\n const setStepSize = useCallback(\n (newStepSize: number) => {\n setState((prevState) => ({\n ...prevState,\n stepSize: newStepSize,\n }));\n },\n [setState],\n );\n\n const onFirstHandleChange: NonNullable<HandlerProps['onChange']> = (handleValue, data) => {\n if (!secondHandleRef?.current) {\n return;\n }\n const newHandleXPosition = data.x;\n const secondHandleXPosition = getXCenterHandle(secondHandleRef.current);\n const fillWidth = secondHandleXPosition - newHandleXPosition;\n\n firstHandleValue.current = handleValue;\n\n setFirstValue(handleValue);\n\n setState((prevState) => ({\n ...prevState,\n firstHandleZIndex: 101,\n secondHandleZIndex: 100,\n railFillWidth: fillWidth < 0 ? 0 : fillWidth,\n railFillXPosition: newHandleXPosition,\n }));\n if (onChange) {\n onChange([handleValue, value[1]]);\n }\n };\n\n const onFirstHandleChangeCommitted: NonNullable<HandlerProps['onChangeCommitted']> = (handleValue, data) => {\n setFirstValue(handleValue);\n if (onChangeCommitted) {\n onChangeCommitted([handleValue, value[1]]);\n }\n\n setState((prevState) => ({\n ...prevState,\n firstValue: handleValue,\n xFirstHandle: data.lastX,\n }));\n };\n\n const onFirstTextfieldChange = (event: ChangeEvent<HTMLInputElement>) => {\n if (!isNumber(event.target.value)) {\n return;\n }\n\n const handleValue = Number(event.target.value);\n\n setFirstValue(handleValue);\n if (onChangeTextField) {\n onChangeTextField([handleValue, secondValue], event);\n }\n };\n\n const onFirstTextfieldBlur = (event: FocusEvent<HTMLInputElement>) => {\n if (!isNumber(event.target.value)) {\n return;\n }\n\n const handleValue = Number(event.target.value);\n\n setFirstValue(handleValue);\n if (onBlurTextField) {\n onBlurTextField && onBlurTextField([handleValue, secondValue], event);\n }\n };\n\n const onSecondHandleChange: NonNullable<HandlerProps['onChange']> = (handleValue, data) => {\n if (!firstHandleRef?.current) {\n return;\n }\n const firstXHandleXPosition = getXCenterHandle(firstHandleRef.current);\n\n const newHandleXPosition = data.x;\n const fillWidth = newHandleXPosition - firstXHandleXPosition;\n\n secondHandleValue.current = handleValue;\n\n setSecondValue(handleValue);\n setState((prevState) => ({\n ...prevState,\n firstHandleZIndex: 100,\n secondHandleZIndex: 101,\n railFillWidth: fillWidth < 0 ? 0 : fillWidth,\n railFillXPosition: firstXHandleXPosition,\n }));\n if (onChange) {\n onChange([value[0], handleValue]);\n }\n };\n\n const onSecondHandleChangeCommitted: NonNullable<HandlerProps['onChangeCommitted']> = (handleValue, data) => {\n if (onChangeCommitted) {\n onChangeCommitted([value[0], handleValue]);\n }\n\n setSecondValue(handleValue);\n setState((prevState) => ({\n ...prevState,\n secondValue: handleValue,\n xSecondHandle: data.lastX,\n }));\n };\n\n const onSecondTextfieldChange = (event: ChangeEvent<HTMLInputElement>) => {\n if (!isNumber(event.target.value)) {\n return;\n }\n const handleValue = Number(event.target.value);\n\n setSecondValue(handleValue);\n if (onChangeTextField) {\n onChangeTextField([firstValue, handleValue], event);\n }\n };\n\n const onSecondTextfieldBlur = (event: FocusEvent<HTMLInputElement>) => {\n if (!isNumber(event.target.value)) {\n return;\n }\n\n const handleValue = Number(event.target.value);\n\n setSecondValue(handleValue);\n if (onBlurTextField) {\n onBlurTextField([firstValue, handleValue], event);\n }\n };\n\n const onTextfieldKeyDown = (event: ChangeEvent<HTMLInputElement> & KeyboardEvent<HTMLInputElement>) => {\n if (onKeyDownTextField) {\n onKeyDownTextField([firstValue, secondValue], event);\n }\n };\n\n const [ariaLabelLeft, ariaLabelRight] = ariaLabel || [];\n const currentFirstSliderValue = Math.max(state.firstValue, min);\n\n return (\n <DoubleWrapper>\n {hasLabelContent && (\n <LabelWrapper>\n {labelContentLeft && <LabelContentLeft>{labelContentLeft}</LabelContentLeft>}\n {label && <Label>{label}</Label>}\n </LabelWrapper>\n )}\n <SliderWrapper>\n <SliderBase\n min={min}\n max={max}\n disabled={disabled}\n setStepSize={setStepSize}\n railFillWidth={state.railFillWidth}\n settings={sizeData[size]}\n railFillXPosition={state.railFillXPosition}\n {...rest}\n >\n <Handler\n ref={firstHandleRef}\n stepSize={state.stepSize}\n multipleStepSize={multipleStepSize}\n onChangeCommitted={onFirstHandleChangeCommitted}\n onChange={onFirstHandleChange}\n min={min}\n max={state.secondValue}\n disabled={disabled}\n bounds={[min, state.secondValue]}\n side=\"left\"\n xPosition={state.xFirstHandle}\n zIndex={state.firstHandleZIndex}\n value={currentFirstSliderValue}\n ariaLabel={ariaLabelLeft}\n onMouseEnter={() => setFirstInputActive(true)}\n onMouseLeave={() => setFirstInputActive(false)}\n />\n <Handler\n ref={secondHandleRef}\n stepSize={state.stepSize}\n multipleStepSize={multipleStepSize}\n onChangeCommitted={onSecondHandleChangeCommitted}\n onChange={onSecondHandleChange}\n min={min}\n ariaValueMin={currentFirstSliderValue}\n max={max}\n disabled={disabled}\n bounds={[state.firstValue, max]}\n side=\"right\"\n xPosition={state.xSecondHandle}\n zIndex={state.secondHandleZIndex}\n value={Math.max(state.secondValue, min)}\n ariaLabel={ariaLabelRight}\n onMouseEnter={() => setSecondInputActive(true)}\n onMouseLeave={() => setSecondInputActive(false)}\n />\n </SliderBase>\n\n <InputsWrapper>\n <StyledInput\n className={cx(classes.firstTextField, firstInputActiveClass)}\n enumerationType=\"plain\"\n disabled={disabled}\n value={firstValue}\n onChange={onFirstTextfieldChange}\n onBlur={onFirstTextfieldBlur}\n onKeyDown={onTextfieldKeyDown}\n />\n <StyledInput\n className={cx(classes.secondTextField, secondInputActiveClass)}\n enumerationType=\"plain\"\n disabled={disabled}\n value={secondValue}\n onChange={onSecondTextfieldChange}\n onBlur={onSecondTextfieldBlur}\n onKeyDown={onTextfieldKeyDown}\n />\n </InputsWrapper>\n </SliderWrapper>\n </DoubleWrapper>\n );\n};\n"],"names":["getXCenterHandle","handle","_handle$parentElement","containerX","parentElement","getBoundingClientRect","x","handleRect","handlePosition","DoubleSlider","_ref","min","max","value","disabled","label","labelContentLeft","_ref$size","size","onChangeCommitted","onChangeTextField","onBlurTextField","onKeyDownTextField","onChange","ariaLabel","_ref$multipleStepSize","multipleStepSize","rest","_objectWithoutProperties","_excluded","_useState","useState","stepSize","railFillWidth","railFillXPosition","xFirstHandle","xSecondHandle","firstHandleZIndex","secondHandleZIndex","firstValue","secondValue","_useState2","_slicedToArray","state","setState","_useState3","_useState4","firstInputActive","setFirstInputActive","_useState5","_useState6","secondInputActive","setSecondInputActive","_useState7","_useState8","setFirstValue","_useState9","_useState10","setSecondValue","firstHandleRef","useRef","secondHandleRef","firstHandleValue","secondHandleValue","hasLabelContent","firstInputActiveClass","classes","textFieldActive","undefined","secondInputActiveClass","useEffect","firstLocalValue","Math","secondLocalValue","prevState","_objectSpread","setStepSize","useCallback","newStepSize","onFirstHandleChange","handleValue","data","current","newHandleXPosition","secondHandleXPosition","fillWidth","onFirstHandleChangeCommitted","lastX","onFirstTextfieldChange","event","isNumber","target","Number","onFirstTextfieldBlur","onSecondHandleChange","firstXHandleXPosition","onSecondHandleChangeCommitted","onSecondTextfieldChange","onSecondTextfieldBlur","onTextfieldKeyDown","_ref2","_ref3","ariaLabelLeft","ariaLabelRight","currentFirstSliderValue","React","createElement","DoubleWrapper","LabelWrapper","LabelContentLeft","Label","SliderWrapper","SliderBase","_extends","settings","sizeData","Handler","ref","bounds","side","xPosition","zIndex","onMouseEnter","onMouseLeave","ariaValueMin","InputsWrapper","StyledInput","className","cx","firstTextField","enumerationType","onBlur","onKeyDown","secondTextField"],"mappings":";;;;;;;;;;;;;;;;AAqBA,SAASA,gBAAgBA,CAACC,MAAsB,EAAE;AAAA,EAAA,IAAAC,qBAAA,CAAA;EAC9C,IAAMC,UAAU,GAAG,CAAA,CAAAD,qBAAA,GAAAD,MAAM,CAACG,aAAa,MAAAF,IAAAA,IAAAA,qBAAA,KAAAA,KAAAA,CAAAA,IAAAA,CAAAA,qBAAA,GAApBA,qBAAA,CAAsBG,qBAAqB,EAAE,MAAA,IAAA,IAAAH,qBAAA,KAAA,KAAA,CAAA,GAAA,KAAA,CAAA,GAA7CA,qBAAA,CAA+CI,CAAC,KAAI,CAAC,CAAA;AACxE,EAAA,IAAMC,UAAU,GAAGN,MAAM,CAACI,qBAAqB,EAAE,CAAA;AACjD,EAAA,IAAMG,cAAc,GAAGD,UAAU,CAACD,CAAC,CAAA;EACnC,OAAOE,cAAc,GAAGL,UAAU,CAAA;AACtC,CAAA;IAEaM,YAAmC,GAAG,SAAtCA,YAAmCA,CAAAC,IAAA,EAgB1C;AAAA,EAAA,IAfFC,GAAG,GAAAD,IAAA,CAAHC,GAAG;IACHC,GAAG,GAAAF,IAAA,CAAHE,GAAG;IACHC,KAAK,GAAAH,IAAA,CAALG,KAAK;IACLC,QAAQ,GAAAJ,IAAA,CAARI,QAAQ;IACRC,KAAK,GAAAL,IAAA,CAALK,KAAK;IACLC,gBAAgB,GAAAN,IAAA,CAAhBM,gBAAgB;IAAAC,SAAA,GAAAP,IAAA,CAChBQ,IAAI;AAAJA,IAAAA,IAAI,GAAAD,SAAA,KAAG,KAAA,CAAA,GAAA,GAAG,GAAAA,SAAA;IACVE,iBAAiB,GAAAT,IAAA,CAAjBS,iBAAiB;IACjBC,iBAAiB,GAAAV,IAAA,CAAjBU,iBA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A,QAAQ,EAAEA,QAAS;AACnBD,IAAAA,KAAK,EAAE2B,WAAY;AACnBjB,IAAAA,QAAQ,EAAE0E,uBAAwB;AAClCkC,IAAAA,MAAM,EAAEjC,qBAAsB;AAC9BkC,IAAAA,SAAS,EAAEjC,kBAAAA;GACd,CACU,CACJ,CACJ,CAAC,CAAA;AAExB;;;;"}
@@ -0,0 +1,61 @@
1
+ import './Double.styles_1jhda4u.css';
2
+ 'use strict';
3
+
4
+ Object.defineProperty(exports, '__esModule', { value: true });
5
+
6
+ var react = require('@linaria/react');
7
+ require('@linaria/core');
8
+ var common = require('../../../../engines/common.js');
9
+ var TextField$1 = require('../../../TextField/TextField.js');
10
+
11
+ var mergedConfig = /*#__PURE__*/common.mergeConfig(TextField$1.textFieldConfig);
12
+ var TextField = /*#__PURE__*/common.component(mergedConfig);
13
+ var LabelWrapper = /*#__PURE__*/react.styled('div')({
14
+ name: "LabelWrapper",
15
+ "class": "lcs82cd",
16
+ propsAsIs: false
17
+ });
18
+ var LabelContentLeft = /*#__PURE__*/react.styled('div')({
19
+ name: "LabelContentLeft",
20
+ "class": "l1tvgbgq",
21
+ propsAsIs: false
22
+ });
23
+ var Label = /*#__PURE__*/react.styled('label')({
24
+ name: "Label",
25
+ "class": "l1at2q9b",
26
+ propsAsIs: false
27
+ });
28
+ var InputsWrapper = /*#__PURE__*/react.styled('div')({
29
+ name: "InputsWrapper",
30
+ "class": "i11dc2og",
31
+ propsAsIs: false
32
+ });
33
+
34
+ // NOTE: переопределение токенов TextField
35
+ var _exp12 = function _exp12() {
36
+ return TextField;
37
+ };
38
+ var StyledInput = /*#__PURE__*/react.styled(_exp12())({
39
+ name: "StyledInput",
40
+ "class": "s4zvp7i",
41
+ propsAsIs: true
42
+ });
43
+ var DoubleWrapper = /*#__PURE__*/react.styled('div')({
44
+ name: "DoubleWrapper",
45
+ "class": "d3kvcjo",
46
+ propsAsIs: false
47
+ });
48
+ var SliderWrapper = /*#__PURE__*/react.styled('div')({
49
+ name: "SliderWrapper",
50
+ "class": "s11ntvbh",
51
+ propsAsIs: false
52
+ });
53
+
54
+ exports.DoubleWrapper = DoubleWrapper;
55
+ exports.InputsWrapper = InputsWrapper;
56
+ exports.Label = Label;
57
+ exports.LabelContentLeft = LabelContentLeft;
58
+ exports.LabelWrapper = LabelWrapper;
59
+ exports.SliderWrapper = SliderWrapper;
60
+ exports.StyledInput = StyledInput;
61
+ //# sourceMappingURL=Double.styles.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Double.styles.js","sources":["../../../../../src/components/Slider/components/Double/Double.styles.ts"],"sourcesContent":["import { styled } from '@linaria/react';\n\nimport { classes, tokens } from '../../Slider.tokens';\nimport { component, mergeConfig } from '../../../../engines';\nimport { textFieldConfig, textFieldTokens } from '../../../TextField';\n\nconst mergedConfig = mergeConfig(textFieldConfig);\nconst TextField = component(mergedConfig);\n\nexport const LabelWrapper = styled.div`\n color: var(${tokens.labelColor});\n\n display: flex;\n gap: var(${tokens.labelWrapperGap});\n margin-bottom: var(${tokens.labelWrapperMarginBottom});\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 InputsWrapper = styled.div`\n display: flex;\n gap: var(${tokens.textFieldWrapperGap});\n margin-top: var(${tokens.doubleWrapperGap});\n`;\n\n// NOTE: переопределение токенов TextField\nexport const StyledInput = styled(TextField)`\n flex: 1;\n \n ${textFieldTokens.color}: var(${tokens.textFieldColor});\n ${textFieldTokens.backgroundColor}: var(${tokens.textFieldBackgroundColor});\n ${textFieldTokens.caretColor}: var(${tokens.textFieldCaretColor});\n ${textFieldTokens.placeholderColor}: var(${tokens.textFieldPlaceholderColor});\n ${textFieldTokens.disabledOpacity}: var(${tokens.disabledOpacity});\n\n ${textFieldTokens.height}: var(${tokens.textFieldHeight});\n ${textFieldTokens.padding}: var(${tokens.textFieldPadding});\n ${textFieldTokens.borderRadius}: var(${tokens.textFieldBorderRadius});\n\n ${textFieldTokens.fontFamily}: var(${tokens.textFieldFontFamily});\n ${textFieldTokens.fontSize}: var(${tokens.textFieldFontSize});\n ${textFieldTokens.fontStyle}: var(${tokens.textFieldFontStyle});\n ${textFieldTokens.fontWeight}: var(${tokens.textFieldFontWeight});\n ${textFieldTokens.letterSpacing}: var(${tokens.textFieldLetterSpacing});\n ${textFieldTokens.lineHeight}: var(${tokens.textFieldLineHeight});\n\n &.${classes.firstTextField} > div {\n border-top-right-radius: 0;\n border-bottom-right-radius: 0;\n }\n\n &.${classes.secondTextField} > div {\n border-top-left-radius: 0;\n border-bottom-left-radius: 0;\n }\n \n input:focus, &.${classes.textFieldActive} {\n ${textFieldTokens.color}: var(${tokens.textFiledFocusColor});\n }\n`;\n\nexport const DoubleWrapper = styled.div`\n opacity: var(${tokens.disabledOpacity});\n`;\n\nexport const SliderWrapper = styled.div``;\n"],"names":["mergedConfig","mergeConfig","textFieldConfig","TextField","component","LabelWrapper","styled","name","class","propsAsIs","LabelContentLeft","Label","InputsWrapper","_exp12","StyledInput","DoubleWrapper","SliderWrapper"],"mappings":";;;;;;;;;AAMA,IAAMA,YAAY,gBAAGC,kBAAW,CAACC,2BAAe,CAAC,CAAA;AACjD,IAAMC,SAAS,gBAAGC,gBAAS,CAACJ,YAAY,CAAC,CAAA;AAElC,IAAMK,YAAY,gBAAGC,YAAM,CAAA,KAAA,CAAA,CAAA;AAAAC,EAAAA,IAAA,EAAA,cAAA;AAAAC,EAAAA,OAAAA,EAAA,SAAA;AAAAC,EAAAA,SAAA,EAAA,KAAA;AAAA,CAMjC,EAAA;AAEM,IAAMC,gBAAgB,gBAAGJ,YAAM,CAAA,KAAA,CAAA,CAAA;AAAAC,EAAAA,IAAA,EAAA,kBAAA;AAAAC,EAAAA,OAAAA,EAAA,UAAA;AAAAC,EAAAA,SAAA,EAAA,KAAA;AAAA,CAAM,EAAA;AAErC,IAAME,KAAK,gBAAGL,YAAM,CAAA,OAAA,CAAA,CAAA;AAAAC,EAAAA,IAAA,EAAA,OAAA;AAAAC,EAAAA,OAAAA,EAAA,UAAA;AAAAC,EAAAA,SAAA,EAAA,KAAA;AAAA,CAO1B,EAAA;AAEM,IAAMG,aAAa,gBAAGN,YAAM,CAAA,KAAA,CAAA,CAAA;AAAAC,EAAAA,IAAA,EAAA,eAAA;AAAAC,EAAAA,OAAAA,EAAA,UAAA;AAAAC,EAAAA,SAAA,EAAA,KAAA;AAAA,CAIlC,EAAA;;AAED;AAAA,IAAAI,MAAA,GAjCkBA,SAiClBA,MAAAA,GAAA;AAAA,EAAA,OACkCV,SAAS,CAAA;AAAA,CAAA,CAAA;AAApC,IAAMW,WAAW,gBAAGR,YAAM,CAAAO,MAAA,EAAA,CAAA,CAAA;AAAAN,EAAAA,IAAA,EAAA,aAAA;AAAAC,EAAAA,OAAAA,EAAA,SAAA;AAAAC,EAAAA,SAAA,EAAA,IAAA;AAAA,CAiChC,EAAA;AAEM,IAAMM,aAAa,gBAAGT,YAAM,CAAA,KAAA,CAAA,CAAA;AAAAC,EAAAA,IAAA,EAAA,eAAA;AAAAC,EAAAA,OAAAA,EAAA,SAAA;AAAAC,EAAAA,SAAA,EAAA,KAAA;AAAA,CAElC,EAAA;AAEM,IAAMO,aAAa,gBAAGV,YAAM,CAAA,KAAA,CAAA,CAAA;AAAAC,EAAAA,IAAA,EAAA,eAAA;AAAAC,EAAAA,OAAAA,EAAA,UAAA;AAAAC,EAAAA,SAAA,EAAA,KAAA;AAAA,CAAM;;;;;;;;;;"}
@@ -0,0 +1,7 @@
1
+ .lcs82cd{color:var(--plasma-slider-label-color);display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;gap:var(--plasma-slider-label-wrapper-gap);margin-bottom:var(--plasma-slider-label-wrapper-margin-bottom);}
2
+
3
+ .l1at2q9b{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
+ .i11dc2og{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;gap:var(--plasma-slider-text-field-wrapper-gap);margin-top:var(--plasma-slider-double-wrapper-gap);}
5
+ .s4zvp7i{-webkit-flex:1;-ms-flex:1;flex:1;--plasma-textfield-color:var(--plasma-slider-text-field-color);--plasma-textfield-bg-color:var(--plasma-slider-text-field-background-color);--plasma-textfield__caret-color:var(--plasma-slider-text-field-caret-color);--plasma-textfield__placeholder-color:var(--plasma-slider-text-field-placeholder-color);--plasma-textfield-disabled-opacity:var(--plasma-slider-disabled-opacity);--plasma-textfield-height:var(--plasma-slider-text-field-height);--plasma-textfield-padding:var(--plasma-slider-text-field-padding);--plasma-textfield-border-radius:var(--plasma-slider-text-field-border-radius);--plasma-textfield-font-family:var(--plasma-slider-text-field-font-family);--plasma-textfield-font-size:var(--plasma-slider-text-field-font-size);--plasma-textfield-font-style:var(--plasma-slider-text-field-font-style);--plasma-textfield-font-weight:var(--plasma-slider-text-field-font-weight);--plasma-textfield-letter-spacing:var(--plasma-slider-text-field-letter-spacing);--plasma-textfield-line-height:var(--plasma-slider-text-field-line-height);}.s4zvp7i.slider-first-text-field > div{border-top-right-radius:0;border-bottom-right-radius:0;}.s4zvp7i.slider-second-text-field > div{border-top-left-radius:0;border-bottom-left-radius:0;}.s4zvp7i input:focus,.s4zvp7i.slider-text-field-active{--plasma-textfield-color:var(--plasma-slider-text-field-focus-color);}
6
+ .d3kvcjo{opacity:var(--plasma-slider-disabled-opacity);}
7
+
@@ -0,0 +1,16 @@
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;}
5
+
6
+ .Handler_styles_8crx5z_h1tnrnip__2d4342c7{cursor:pointer;position:absolute;z-index:1;top:0;left:0;}
7
+ .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);}
8
+
9
+ .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);}
10
+
11
+ .Single_styles_1r9f1e0_l1p4kc08__4db690dd{color:var(--plasma-slider-label-color);display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;gap:var(--plasma-slider-label-wrapper-gap);}
12
+
13
+ .Single_styles_1r9f1e0_lozb535__4db690dd{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);}
14
+ .Single_styles_1r9f1e0_s1w9icbd__4db690dd{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;}.Single_styles_1r9f1e0_s1w9icbd__4db690dd.Single_styles_1r9f1e0_sliderHideMinValue__4db690dd,.Single_styles_1r9f1e0_s1w9icbd__4db690dd.Single_styles_1r9f1e0_sliderHideMaxValue__4db690dd{opacity:0;}.Single_styles_1r9f1e0_s1w9icbd__4db690dd.Single_styles_1r9f1e0_sliderActiveRangeValue__4db690dd{color:var(--plasma-slider-label-color);}
15
+ .Single_styles_1r9f1e0_s1d2sfgl__4db690dd{position:relative;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-flex:1;-ms-flex:1;flex:1;}.Single_styles_1r9f1e0_s1d2sfgl__4db690dd.Single_styles_1r9f1e0_sliderRangeValuesPlacementOuter__4db690dd .Single_styles_1r9f1e0_s1w9icbd__4db690dd{position:absolute;bottom:var(--plasma-slider-range-value-bottom-offset);left:0;}.Single_styles_1r9f1e0_s1d2sfgl__4db690dd.Single_styles_1r9f1e0_sliderRangeValuesPlacementOuter__4db690dd .Single_styles_1r9f1e0_s1w9icbd__4db690dd.Single_styles_1r9f1e0_sliderMaxRangeValue__4db690dd{left:unset;right:0;}.Single_styles_1r9f1e0_s1d2sfgl__4db690dd.Single_styles_1r9f1e0_sliderRangeValuesPlacementInner__4db690dd{-webkit-align-items:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;}.Single_styles_1r9f1e0_s1d2sfgl__4db690dd.Single_styles_1r9f1e0_sliderRangeValuesPlacementInner__4db690dd .Single_styles_1r9f1e0_s1w9icbd__4db690dd{margin-right:var(--plasma-slider-range-min-value-margin);}.Single_styles_1r9f1e0_s1d2sfgl__4db690dd.Single_styles_1r9f1e0_sliderRangeValuesPlacementInner__4db690dd .Single_styles_1r9f1e0_s1w9icbd__4db690dd.Single_styles_1r9f1e0_sliderMaxRangeValue__4db690dd{margin-right:0;margin-left:var(--plasma-slider-range-max-value-margin);}
16
+ .Single_styles_1r9f1e0_ss3ujqx__4db690dd{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;opacity:var(--plasma-slider-disabled-opacity);}.Single_styles_1r9f1e0_ss3ujqx__4db690dd.Single_styles_1r9f1e0_sliderLabelPlacementOuter__4db690dd{-webkit-flex-direction:column;-ms-flex-direction:column;flex-direction:column;}.Single_styles_1r9f1e0_ss3ujqx__4db690dd.Single_styles_1r9f1e0_sliderLabelPlacementOuter__4db690dd .Single_styles_1r9f1e0_l1p4kc08__4db690dd{margin-bottom:var(--plasma-slider-label-wrapper-margin-bottom);}.Single_styles_1r9f1e0_ss3ujqx__4db690dd.Single_styles_1r9f1e0_sliderLabelPlacementInner__4db690dd .Single_styles_1r9f1e0_l1p4kc08__4db690dd{margin-right:var(--plasma-slider-label-wrapper-margin-right);}
@@ -0,0 +1,164 @@
1
+ 'use strict';
2
+
3
+ Object.defineProperty(exports, '__esModule', { value: true });
4
+
5
+ var _rollupPluginBabelHelpers = require('../../../../_virtual/_rollupPluginBabelHelpers.js');
6
+ var React = require('react');
7
+ var SliderBase = require('../SliderBase/SliderBase.js');
8
+ var Handler = require('../../ui/Handler/Handler.js');
9
+ require('@linaria/react');
10
+ var index$1 = require('../../utils/index.js');
11
+ var index = require('../../../../utils/index.js');
12
+ var Slider_tokens = require('../../Slider.tokens.js');
13
+ var Single_styles = require('./Single.styles.js');
14
+ var isNumber = require('../../../../utils/isNumber.js');
15
+
16
+ var _excluded = ["min", "max", "value", "disabled", "onChangeCommitted", "onChange", "ariaLabel", "label", "labelContentLeft", "showRangeValues", "showCurrentValue", "hideMinValueDiff", "hideMaxValueDiff", "labelPlacement", "rangeValuesPlacement", "multipleStepSize", "size"];
17
+ var SingleSlider = function SingleSlider(_ref) {
18
+ var min = _ref.min,
19
+ max = _ref.max,
20
+ value = _ref.value,
21
+ disabled = _ref.disabled,
22
+ onChangeCommitted = _ref.onChangeCommitted,
23
+ onChange = _ref.onChange,
24
+ ariaLabel = _ref.ariaLabel,
25
+ label = _ref.label,
26
+ labelContentLeft = _ref.labelContentLeft,
27
+ showRangeValues = _ref.showRangeValues,
28
+ showCurrentValue = _ref.showCurrentValue,
29
+ hideMinValueDiff = _ref.hideMinValueDiff,
30
+ hideMaxValueDiff = _ref.hideMaxValueDiff,
31
+ _ref$labelPlacement = _ref.labelPlacement,
32
+ labelPlacement = _ref$labelPlacement === void 0 ? 'outer' : _ref$labelPlacement,
33
+ _ref$rangeValuesPlace = _ref.rangeValuesPlacement,
34
+ rangeValuesPlacement = _ref$rangeValuesPlace === void 0 ? 'outer' : _ref$rangeValuesPlace,
35
+ _ref$multipleStepSize = _ref.multipleStepSize,
36
+ multipleStepSize = _ref$multipleStepSize === void 0 ? 10 : _ref$multipleStepSize,
37
+ _ref$size = _ref.size,
38
+ size = _ref$size === void 0 ? 'm' : _ref$size,
39
+ rest = _rollupPluginBabelHelpers.objectWithoutProperties(_ref, _excluded);
40
+ var _useState = React.useState({
41
+ xHandle: 0,
42
+ stepSize: 0,
43
+ railFillWidth: 0
44
+ }),
45
+ _useState2 = _rollupPluginBabelHelpers.slicedToArray(_useState, 2),
46
+ state = _useState2[0],
47
+ setState = _useState2[1];
48
+ var _useState3 = React.useState(0),
49
+ _useState4 = _rollupPluginBabelHelpers.slicedToArray(_useState3, 2),
50
+ startOffset = _useState4[0],
51
+ setStartOffset = _useState4[1];
52
+ var _useState5 = React.useState(0),
53
+ _useState6 = _rollupPluginBabelHelpers.slicedToArray(_useState5, 2),
54
+ endOffset = _useState6[0],
55
+ setEndOffset = _useState6[1];
56
+ var _useState7 = React.useState(value),
57
+ _useState8 = _rollupPluginBabelHelpers.slicedToArray(_useState7, 2),
58
+ dragValue = _useState8[0],
59
+ setDragValue = _useState8[1];
60
+ var stepSize = state.stepSize;
61
+ var hasLabelContent = label || labelContentLeft;
62
+ var labelPlacementClass = labelPlacement === 'outer' ? Slider_tokens.classes.labelPlacementOuter : Slider_tokens.classes.labelPlacementInner;
63
+ var rangeValuesPlacementClass = rangeValuesPlacement === 'outer' ? Slider_tokens.classes.rangeValuesPlacementOuter : Slider_tokens.classes.rangeValuesPlacementInner;
64
+ var hideMinValueDiffClass = hideMinValueDiff && value - min <= hideMinValueDiff ? Slider_tokens.classes.hideMinValue : '';
65
+ var hideMaxValueDiffClass = hideMaxValueDiff && max - value <= hideMaxValueDiff ? Slider_tokens.classes.hideMaxValue : '';
66
+ var startLabelRef = React.useRef(null);
67
+ var endLabelRef = React.useRef(null);
68
+ var activeFirstValue = dragValue === min ? Slider_tokens.classes.activeRangeValue : undefined;
69
+ var activeSecondValue = dragValue === max ? Slider_tokens.classes.activeRangeValue : undefined;
70
+ React.useEffect(function () {
71
+ var localValue = Math.min(Math.max(value, min), max) - min;
72
+ if (rangeValuesPlacement === 'outer') {
73
+ var _startLabelRef$curren, _endLabelRef$current;
74
+ var startWidth = (_startLabelRef$curren = startLabelRef.current) === null || _startLabelRef$curren === void 0 ? void 0 : _startLabelRef$curren.offsetWidth;
75
+ if (isNumber.isNumber(startWidth)) {
76
+ setStartOffset(Number(startWidth));
77
+ }
78
+ var endWidth = (_endLabelRef$current = endLabelRef.current) === null || _endLabelRef$current === void 0 ? void 0 : _endLabelRef$current.offsetWidth;
79
+ if (isNumber.isNumber(endWidth)) {
80
+ setEndOffset(Number(endWidth));
81
+ }
82
+ } else {
83
+ setStartOffset(1);
84
+ setEndOffset(1);
85
+ }
86
+ setState(function (prevState) {
87
+ return _rollupPluginBabelHelpers.objectSpread2(_rollupPluginBabelHelpers.objectSpread2({}, prevState), {}, {
88
+ xHandle: stepSize * localValue,
89
+ railFillWidth: stepSize * localValue
90
+ });
91
+ });
92
+ }, [value, labelPlacement, stepSize, rangeValuesPlacement, min, max, setStartOffset, setEndOffset]);
93
+ var setStepSize = React.useCallback(function (newStepSize) {
94
+ setState(function (prevState) {
95
+ return _rollupPluginBabelHelpers.objectSpread2(_rollupPluginBabelHelpers.objectSpread2({}, prevState), {}, {
96
+ stepSize: newStepSize
97
+ });
98
+ });
99
+ }, [setState]);
100
+ var onHandleChange = function onHandleChange(handleValue, data) {
101
+ var newHandleXPosition = data.x;
102
+ var newValue = Math.round(handleValue);
103
+ setState(function (prevState) {
104
+ return _rollupPluginBabelHelpers.objectSpread2(_rollupPluginBabelHelpers.objectSpread2({}, prevState), {}, {
105
+ railFillWidth: newHandleXPosition
106
+ });
107
+ });
108
+ if (onChange) {
109
+ onChange(newValue);
110
+ }
111
+ setDragValue(newValue);
112
+ };
113
+ var onHandleChangeCommitted = function onHandleChangeCommitted(handleValue, data) {
114
+ var newValue = Math.round(handleValue);
115
+ if (onChangeCommitted) {
116
+ onChangeCommitted(newValue);
117
+ }
118
+ setState(function (prevState) {
119
+ return _rollupPluginBabelHelpers.objectSpread2(_rollupPluginBabelHelpers.objectSpread2({}, prevState), {}, {
120
+ xHandle: data.lastX,
121
+ railFillWidth: data.lastX
122
+ });
123
+ });
124
+ setDragValue(newValue);
125
+ };
126
+ return /*#__PURE__*/React.createElement(Single_styles.SingleWrapper, {
127
+ className: labelPlacementClass
128
+ }, hasLabelContent && /*#__PURE__*/React.createElement(Single_styles.LabelWrapper, null, labelContentLeft && /*#__PURE__*/React.createElement(Single_styles.LabelContentLeft, null, labelContentLeft), label && /*#__PURE__*/React.createElement(Single_styles.Label, null, label)), /*#__PURE__*/React.createElement(Single_styles.SliderBaseWrapper, {
129
+ className: rangeValuesPlacementClass
130
+ }, showRangeValues && /*#__PURE__*/React.createElement(Single_styles.StyledRangeValue, {
131
+ ref: startLabelRef,
132
+ className: index.cx(hideMinValueDiffClass, activeFirstValue)
133
+ }, min), /*#__PURE__*/React.createElement(SliderBase.SliderBase, _rollupPluginBabelHelpers.extends({
134
+ min: min,
135
+ max: max,
136
+ disabled: disabled,
137
+ setStepSize: setStepSize,
138
+ onChange: onHandleChangeCommitted,
139
+ railFillWidth: state.railFillWidth,
140
+ settings: index$1.sizeData[size],
141
+ labelPlacement: labelPlacement,
142
+ rangeValuesPlacement: rangeValuesPlacement
143
+ }, rest), /*#__PURE__*/React.createElement(Handler.Handler, {
144
+ stepSize: state.stepSize,
145
+ onChangeCommitted: onHandleChangeCommitted,
146
+ onChange: onHandleChange,
147
+ xPosition: state.xHandle,
148
+ min: min,
149
+ max: max,
150
+ startOffset: startOffset,
151
+ endOffset: endOffset,
152
+ value: dragValue,
153
+ disabled: disabled,
154
+ ariaLabel: ariaLabel,
155
+ multipleStepSize: multipleStepSize,
156
+ showCurrentValue: showCurrentValue
157
+ })), showRangeValues && /*#__PURE__*/React.createElement(Single_styles.StyledRangeValue, {
158
+ ref: endLabelRef,
159
+ className: index.cx(Slider_tokens.classes.maxRangeValue, hideMaxValueDiffClass, activeSecondValue)
160
+ }, max)));
161
+ };
162
+
163
+ exports.SingleSlider = SingleSlider;
164
+ //# sourceMappingURL=Single.js.map