@salutejs/plasma-new-hope 0.174.0-canary.1452.11462555994.0 → 0.174.0-canary.1497.11480463527.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (798) hide show
  1. package/cjs/components/Accordion/ui/AccordionItem/AccordionItem.styles.js +0 -1
  2. package/cjs/components/Accordion/ui/AccordionItem/AccordionItem.styles.js.map +1 -1
  3. package/cjs/components/Attach/Attach.js +3 -4
  4. package/cjs/components/Attach/Attach.js.map +1 -1
  5. package/cjs/components/Attach/components/AttachButton/AttachButton.js +0 -1
  6. package/cjs/components/Attach/components/AttachButton/AttachButton.js.map +1 -1
  7. package/cjs/components/Attach/ui/Button/Button.styles.js +0 -1
  8. package/cjs/components/Attach/ui/Button/Button.styles.js.map +1 -1
  9. package/cjs/components/Attach/ui/Cell/Cell.styles.js +0 -2
  10. package/cjs/components/Attach/ui/Cell/Cell.styles.js.map +1 -1
  11. package/cjs/components/Attach/ui/IconButton/IconButton.styles.js +0 -1
  12. package/cjs/components/Attach/ui/IconButton/IconButton.styles.js.map +1 -1
  13. package/cjs/components/Attach/utils/getFileicon.js +3 -4
  14. package/cjs/components/Attach/utils/getFileicon.js.map +1 -1
  15. package/cjs/components/Attach/utils/index.js +0 -3
  16. package/cjs/components/Attach/utils/index.js.map +1 -1
  17. package/cjs/components/Autocomplete/Autocomplete.js +5 -6
  18. package/cjs/components/Autocomplete/Autocomplete.js.map +1 -1
  19. package/cjs/components/Autocomplete/Autocomplete.styles.js +2 -3
  20. package/cjs/components/Autocomplete/Autocomplete.styles.js.map +1 -1
  21. package/cjs/components/Autocomplete/ui/TextField/TextField.styles.js +1 -2
  22. package/cjs/components/Autocomplete/ui/TextField/TextField.styles.js.map +1 -1
  23. package/cjs/components/Avatar/Avatar.js +2 -3
  24. package/cjs/components/Avatar/Avatar.js.map +1 -1
  25. package/cjs/components/Breadcrumbs/Breadcrumbs.styles.js +2 -4
  26. package/cjs/components/Breadcrumbs/Breadcrumbs.styles.js.map +1 -1
  27. package/cjs/components/Button/Button.styles.js +0 -3
  28. package/cjs/components/Button/Button.styles.js.map +1 -1
  29. package/cjs/components/Calendar/CalendarBase/CalendarBase.js +5 -5
  30. package/cjs/components/Calendar/CalendarDouble/CalendarDouble.js +8 -8
  31. package/cjs/components/Calendar/hooks/useDays.js +2 -2
  32. package/cjs/components/Calendar/hooks/useKeyNavigation.js +1 -1
  33. package/cjs/components/Calendar/hooks/useMonths.js +2 -2
  34. package/cjs/components/Calendar/hooks/useQuarters.js +2 -2
  35. package/cjs/components/Calendar/hooks/useYears.js +2 -2
  36. package/cjs/components/Calendar/ui/CalendarDays/CalendarDays.js +4 -4
  37. package/cjs/components/Calendar/ui/CalendarHeader/CalendarHeader.js +5 -6
  38. package/cjs/components/Calendar/ui/CalendarHeader/CalendarHeader.js.map +1 -1
  39. package/cjs/components/Calendar/ui/CalendarHeader/CalendarHeader.styles.js +0 -1
  40. package/cjs/components/Calendar/ui/CalendarHeader/CalendarHeader.styles.js.map +1 -1
  41. package/cjs/components/Calendar/ui/CalendarMonths/CalendarMonths.js +4 -4
  42. package/cjs/components/Calendar/ui/CalendarQuarters/CalendarQuarters.js +4 -4
  43. package/cjs/components/Calendar/ui/CalendarYears/CalendarYears.js +4 -4
  44. package/cjs/components/Combobox/ComboboxNew/Combobox.js +11 -12
  45. package/cjs/components/Combobox/ComboboxNew/Combobox.js.map +1 -1
  46. package/cjs/components/Combobox/ComboboxNew/Combobox.styles.js +2 -4
  47. package/cjs/components/Combobox/ComboboxNew/Combobox.styles.js.map +1 -1
  48. package/cjs/components/Combobox/ComboboxNew/hooks/getPathMaps.js +0 -2
  49. package/cjs/components/Combobox/ComboboxNew/hooks/getPathMaps.js.map +1 -1
  50. package/cjs/components/Combobox/ComboboxNew/ui/Inner/Inner.js +1 -2
  51. package/cjs/components/Combobox/ComboboxNew/ui/Inner/Inner.js.map +1 -1
  52. package/cjs/components/Combobox/ComboboxNew/ui/Inner/ui/Item/Item.js +5 -6
  53. package/cjs/components/Combobox/ComboboxNew/ui/Inner/ui/Item/Item.js.map +1 -1
  54. package/cjs/components/Combobox/ComboboxNew/ui/Inner/ui/Item/Item.styles.js +1 -3
  55. package/cjs/components/Combobox/ComboboxNew/ui/Inner/ui/Item/Item.styles.js.map +1 -1
  56. package/cjs/components/Combobox/ComboboxNew/ui/Target/Target.styles.js +1 -2
  57. package/cjs/components/Combobox/ComboboxNew/ui/Target/Target.styles.js.map +1 -1
  58. package/cjs/components/Combobox/ComboboxOld/Combobox.css +28 -14
  59. package/cjs/components/Combobox/ComboboxOld/Combobox.js +4 -10
  60. package/cjs/components/Combobox/ComboboxOld/Combobox.js.map +1 -1
  61. package/cjs/components/Combobox/ComboboxOld/Combobox.styles.js +0 -1
  62. package/cjs/components/Combobox/ComboboxOld/Combobox.styles.js.map +1 -1
  63. package/cjs/components/Combobox/ComboboxOld/hooks/useFocusController.js +0 -1
  64. package/cjs/components/Combobox/ComboboxOld/hooks/useFocusController.js.map +1 -1
  65. package/cjs/components/Combobox/ComboboxOld/ui/ComboboxChip/ComboboxChip.styles.js +1 -2
  66. package/cjs/components/Combobox/ComboboxOld/ui/ComboboxChip/ComboboxChip.styles.js.map +1 -1
  67. package/cjs/components/Combobox/ComboboxOld/ui/ComboboxDivider/ComboboxDivider.css +32 -18
  68. package/cjs/components/Combobox/ComboboxOld/ui/ComboboxDivider/ComboboxDivider.js +1 -10
  69. package/cjs/components/Combobox/ComboboxOld/ui/ComboboxDivider/ComboboxDivider.js.map +1 -1
  70. package/cjs/components/Combobox/ComboboxOld/ui/ComboboxFooter/ComboboxFooter.css +32 -18
  71. package/cjs/components/Combobox/ComboboxOld/ui/ComboboxFooter/ComboboxFooter.js +1 -10
  72. package/cjs/components/Combobox/ComboboxOld/ui/ComboboxFooter/ComboboxFooter.js.map +1 -1
  73. package/cjs/components/Combobox/ComboboxOld/ui/ComboboxGroup/ComboboxGroup.css +32 -18
  74. package/cjs/components/Combobox/ComboboxOld/ui/ComboboxGroup/ComboboxGroup.js +1 -10
  75. package/cjs/components/Combobox/ComboboxOld/ui/ComboboxGroup/ComboboxGroup.js.map +1 -1
  76. package/cjs/components/Combobox/ComboboxOld/ui/ComboboxHeader/ComboboxHeader.css +32 -18
  77. package/cjs/components/Combobox/ComboboxOld/ui/ComboboxHeader/ComboboxHeader.js +1 -10
  78. package/cjs/components/Combobox/ComboboxOld/ui/ComboboxHeader/ComboboxHeader.js.map +1 -1
  79. package/cjs/components/Combobox/ComboboxOld/ui/ComboboxItem/ComboboxItem.styles.js +0 -2
  80. package/cjs/components/Combobox/ComboboxOld/ui/ComboboxItem/ComboboxItem.styles.js.map +1 -1
  81. package/cjs/components/Combobox/ComboboxOld/ui/ComboboxTarget/ComboboxTarget.js +1 -1
  82. package/cjs/components/Combobox/ComboboxOld/ui/ComboboxTarget/ComboboxTarget.styles.js +1 -2
  83. package/cjs/components/Combobox/ComboboxOld/ui/ComboboxTarget/ComboboxTarget.styles.js.map +1 -1
  84. package/cjs/components/DatePicker/DatePickerBase.styles.js +1 -7
  85. package/cjs/components/DatePicker/DatePickerBase.styles.js.map +1 -1
  86. package/cjs/components/DatePicker/RangeDate/RangeDate.js +1 -1
  87. package/cjs/components/DatePicker/RangeDate/RangeDate.styles.js +0 -1
  88. package/cjs/components/DatePicker/RangeDate/RangeDate.styles.js.map +1 -1
  89. package/cjs/components/DatePicker/RangeDate/RangeDatePopover/RangeDatePopover.js +1 -2
  90. package/cjs/components/DatePicker/RangeDate/RangeDatePopover/RangeDatePopover.js.map +1 -1
  91. package/cjs/components/DatePicker/RangeDate/RangeDatePopover/RangeDatePopover.styles.js +2 -5
  92. package/cjs/components/DatePicker/RangeDate/RangeDatePopover/RangeDatePopover.styles.js.map +1 -1
  93. package/cjs/components/DatePicker/SingleDate/SingleDate.styles.js +0 -1
  94. package/cjs/components/DatePicker/SingleDate/SingleDate.styles.js.map +1 -1
  95. package/cjs/components/Drawer/Drawer.js +5 -10
  96. package/cjs/components/Drawer/Drawer.js.map +1 -1
  97. package/cjs/components/Drawer/Drawer.styles.js +0 -4
  98. package/cjs/components/Drawer/Drawer.styles.js.map +1 -1
  99. package/cjs/components/Drawer/hooks/useDrawer.js +0 -4
  100. package/cjs/components/Drawer/hooks/useDrawer.js.map +1 -1
  101. package/cjs/components/Drawer/ui/DrawerContent/DrawerContent.js +0 -7
  102. package/cjs/components/Drawer/ui/DrawerContent/DrawerContent.js.map +1 -1
  103. package/cjs/components/Drawer/ui/DrawerFooter/DrawerFooter.js +0 -7
  104. package/cjs/components/Drawer/ui/DrawerFooter/DrawerFooter.js.map +1 -1
  105. package/cjs/components/Drawer/ui/DrawerHeader/DrawerHeader.js +0 -3
  106. package/cjs/components/Drawer/ui/DrawerHeader/DrawerHeader.js.map +1 -1
  107. package/cjs/components/Dropdown/Dropdown.css +30 -16
  108. package/cjs/components/Dropdown/Dropdown.js +63 -47
  109. package/cjs/components/Dropdown/Dropdown.js.map +1 -1
  110. package/cjs/components/Dropdown/Dropdown.styles.js +14 -27
  111. package/cjs/components/Dropdown/Dropdown.styles.js.map +1 -1
  112. package/cjs/components/Dropdown/Dropdown.styles_1ix6io8.css +2 -0
  113. package/cjs/components/Dropdown/Dropdown.tokens.js +24 -1
  114. package/cjs/components/Dropdown/Dropdown.tokens.js.map +1 -1
  115. package/cjs/components/Dropdown/FloatingPopover.js +104 -0
  116. package/cjs/components/Dropdown/FloatingPopover.js.map +1 -0
  117. package/cjs/components/Dropdown/ui/DropdownInner/DropdownInner.js +18 -60
  118. package/cjs/components/Dropdown/ui/DropdownInner/DropdownInner.js.map +1 -1
  119. package/cjs/components/Dropdown/ui/DropdownItem/DropdownItem.css +46 -6
  120. package/cjs/components/Dropdown/ui/DropdownItem/DropdownItem.js +30 -20
  121. package/cjs/components/Dropdown/ui/DropdownItem/DropdownItem.js.map +1 -1
  122. package/cjs/components/Dropdown/ui/DropdownItem/DropdownItem.styles.js +25 -31
  123. package/cjs/components/Dropdown/ui/DropdownItem/DropdownItem.styles.js.map +1 -1
  124. package/cjs/components/Dropdown/ui/DropdownItem/DropdownItem.styles_17va0nk.css +5 -0
  125. package/cjs/components/Dropdown/ui/DropdownItemOld/DropdownItem.styles.js +1 -3
  126. package/cjs/components/Dropdown/ui/DropdownItemOld/DropdownItem.styles.js.map +1 -1
  127. package/cjs/components/Dropdown/ui/DropdownItemOld/{DropdownItem.styles_12e50g5.css → DropdownItem.styles_1lyg81y.css} +1 -1
  128. package/cjs/components/Dropdown/ui/DropdownItemOld/DropdownItemOld.css +4 -4
  129. package/cjs/components/Dropdown/ui/DropdownOld/Dropdown.styles.js +0 -1
  130. package/cjs/components/Dropdown/ui/DropdownOld/Dropdown.styles.js.map +1 -1
  131. package/cjs/components/Dropdown/utils/getItemByFocused.js +13 -0
  132. package/cjs/components/Dropdown/utils/getItemByFocused.js.map +1 -0
  133. package/cjs/components/Dropdown/utils/getItemId.js +10 -0
  134. package/cjs/components/Dropdown/utils/getItemId.js.map +1 -0
  135. package/cjs/components/Dropdown/utils/getPlacement.js +16 -0
  136. package/cjs/components/Dropdown/utils/getPlacement.js.map +1 -0
  137. package/cjs/components/Dropdown/utils/index.js.map +1 -1
  138. package/cjs/components/Editable/Editable.js +3 -4
  139. package/cjs/components/Editable/Editable.js.map +1 -1
  140. package/cjs/components/Editable/utils/clearSelection.js +0 -2
  141. package/cjs/components/Editable/utils/clearSelection.js.map +1 -1
  142. package/cjs/components/Editable/utils/selectText.js +0 -2
  143. package/cjs/components/Editable/utils/selectText.js.map +1 -1
  144. package/cjs/components/EmptyState/EmptyState.styles.js +1 -2
  145. package/cjs/components/EmptyState/EmptyState.styles.js.map +1 -1
  146. package/cjs/components/IconButton/IconButton.js +1 -1
  147. package/cjs/components/IconButton/IconButton.styles.js +0 -8
  148. package/cjs/components/IconButton/IconButton.styles.js.map +1 -1
  149. package/cjs/components/Modal/Modal.js +6 -8
  150. package/cjs/components/Modal/Modal.js.map +1 -1
  151. package/cjs/components/Modal/hooks/useModal.js +0 -4
  152. package/cjs/components/Modal/hooks/useModal.js.map +1 -1
  153. package/cjs/components/Notification/Notification.styles.js +2 -3
  154. package/cjs/components/Notification/Notification.styles.js.map +1 -1
  155. package/cjs/components/Notification/NotificationsPortal.js +3 -4
  156. package/cjs/components/Notification/NotificationsPortal.js.map +1 -1
  157. package/cjs/components/Pagination/Pagination.styles.js +1 -2
  158. package/cjs/components/Pagination/Pagination.styles.js.map +1 -1
  159. package/cjs/components/Pagination/ui/PaginationSelectPerPage/PaginationSelectPerPage.styles.js +1 -2
  160. package/cjs/components/Pagination/ui/PaginationSelectPerPage/PaginationSelectPerPage.styles.js.map +1 -1
  161. package/cjs/components/Panel/ui/PanelHeader/PanelHeader.js +1 -2
  162. package/cjs/components/Panel/ui/PanelHeader/PanelHeader.js.map +1 -1
  163. package/cjs/components/Panel/ui/PanelHeader/PanelHeader.styles.js +1 -2
  164. package/cjs/components/Panel/ui/PanelHeader/PanelHeader.styles.js.map +1 -1
  165. package/cjs/components/Popover/Popover.js +1 -1
  166. package/cjs/components/Popup/Popup.js +2 -2
  167. package/cjs/components/Popup/PopupContext.js +1 -1
  168. package/cjs/components/Range/Range.styles.js +0 -1
  169. package/cjs/components/Range/Range.styles.js.map +1 -1
  170. package/cjs/components/Segment/ui/SegmentGroup/SegmentGroup.js +4 -5
  171. package/cjs/components/Segment/ui/SegmentGroup/SegmentGroup.js.map +1 -1
  172. package/cjs/components/Select/Select.js +11 -12
  173. package/cjs/components/Select/Select.js.map +1 -1
  174. package/cjs/components/Select/Select.styles.js +2 -5
  175. package/cjs/components/Select/Select.styles.js.map +1 -1
  176. package/cjs/components/Select/hooks/usePathMaps.js +0 -2
  177. package/cjs/components/Select/hooks/usePathMaps.js.map +1 -1
  178. package/cjs/components/Select/ui/Inner/Inner.js +1 -2
  179. package/cjs/components/Select/ui/Inner/Inner.js.map +1 -1
  180. package/cjs/components/Select/ui/Inner/ui/Item/Item.js +4 -5
  181. package/cjs/components/Select/ui/Inner/ui/Item/Item.js.map +1 -1
  182. package/cjs/components/Select/ui/Inner/ui/Item/Item.styles.js +0 -1
  183. package/cjs/components/Select/ui/Inner/ui/Item/Item.styles.js.map +1 -1
  184. package/cjs/components/Select/ui/Target/ui/Button/Button.js +1 -1
  185. package/cjs/components/Select/ui/Target/ui/Button/Button.styles.js +1 -3
  186. package/cjs/components/Select/ui/Target/ui/Button/Button.styles.js.map +1 -1
  187. package/cjs/components/Select/ui/Target/ui/Textfield/Textfield.js +2 -2
  188. package/cjs/components/Select/ui/Target/ui/Textfield/Textfield.styles.js +1 -4
  189. package/cjs/components/Select/ui/Target/ui/Textfield/Textfield.styles.js.map +1 -1
  190. package/cjs/components/Select/ui/Target/ui/Textfield/ui/Chip/Chip.styles.js +1 -2
  191. package/cjs/components/Select/ui/Target/ui/Textfield/ui/Chip/Chip.styles.js.map +1 -1
  192. package/cjs/components/Select/utils/getButtonLabel.js +0 -2
  193. package/cjs/components/Select/utils/getButtonLabel.js.map +1 -1
  194. package/cjs/components/Select/utils/getCorrectHeight.js.map +1 -1
  195. package/cjs/components/Sheet/Sheet.js +3 -3
  196. package/cjs/components/Skeleton/LineSkeleton/LineSkeleton.js +2 -4
  197. package/cjs/components/Skeleton/LineSkeleton/LineSkeleton.js.map +1 -1
  198. package/cjs/components/Skeleton/RectSkeleton/RectSkeleton.js +2 -4
  199. package/cjs/components/Skeleton/RectSkeleton/RectSkeleton.js.map +1 -1
  200. package/cjs/components/Slider/Slider.css +13 -15
  201. package/cjs/components/Slider/Slider.js +2 -18
  202. package/cjs/components/Slider/Slider.js.map +1 -1
  203. package/cjs/components/Slider/Slider.tokens.js +17 -23
  204. package/cjs/components/Slider/Slider.tokens.js.map +1 -1
  205. package/cjs/components/Slider/components/Double/Double.css +8 -8
  206. package/cjs/components/Slider/components/Double/Double.js +24 -60
  207. package/cjs/components/Slider/components/Double/Double.js.map +1 -1
  208. package/cjs/components/Slider/components/Double/Double.styles.js +0 -1
  209. package/cjs/components/Slider/components/Double/Double.styles.js.map +1 -1
  210. package/cjs/components/Slider/components/DoubleUncontrolled/DoubleUncontrolled.js +0 -3
  211. package/cjs/components/Slider/components/DoubleUncontrolled/DoubleUncontrolled.js.map +1 -1
  212. package/cjs/components/Slider/components/Single/Single.css +14 -14
  213. package/cjs/components/Slider/components/Single/Single.js +34 -66
  214. package/cjs/components/Slider/components/Single/Single.js.map +1 -1
  215. package/cjs/components/Slider/components/Single/Single.styles.js +4 -4
  216. package/cjs/components/Slider/components/Single/Single.styles.js.map +1 -1
  217. package/cjs/components/Slider/components/Single/Single.styles_1r9f1e0.css +6 -0
  218. package/cjs/components/Slider/components/SliderBase/SliderBase.css +5 -5
  219. package/cjs/components/Slider/components/SliderBase/SliderBase.js +13 -32
  220. package/cjs/components/Slider/components/SliderBase/SliderBase.js.map +1 -1
  221. package/cjs/components/Slider/components/SliderBase/SliderBase.styles.js +7 -7
  222. package/cjs/components/Slider/components/SliderBase/SliderBase.styles.js.map +1 -1
  223. package/cjs/components/Slider/components/SliderBase/SliderBase.styles_9s4eb3.css +5 -0
  224. package/cjs/components/Slider/ui/Handler/Handler.css +3 -3
  225. package/cjs/components/Slider/ui/Handler/Handler.js +88 -49
  226. package/cjs/components/Slider/ui/Handler/Handler.js.map +1 -1
  227. package/cjs/components/Slider/ui/Handler/Handler.styles.js +7 -17
  228. package/cjs/components/Slider/ui/Handler/Handler.styles.js.map +1 -1
  229. package/cjs/components/Slider/ui/Handler/Handler.styles_8crx5z.css +2 -0
  230. package/cjs/components/Slider/ui/Thumb/Thumb.css +1 -1
  231. package/cjs/components/Slider/ui/Thumb/Thumb.js +2 -3
  232. package/cjs/components/Slider/ui/Thumb/Thumb.js.map +1 -1
  233. package/cjs/components/Slider/ui/Thumb/Thumb.styles.js +1 -1
  234. package/cjs/components/Slider/ui/Thumb/Thumb.styles.js.map +1 -1
  235. package/cjs/components/Slider/ui/Thumb/Thumb.styles_4w4gzn.css +1 -0
  236. package/cjs/components/Slider/utils/index.js +10 -28
  237. package/cjs/components/Slider/utils/index.js.map +1 -1
  238. package/cjs/components/Slider/variations/_view/base.js +1 -1
  239. package/cjs/components/Slider/variations/_view/base.js.map +1 -1
  240. package/cjs/components/Slider/variations/_view/base_x642ct.css +1 -0
  241. package/cjs/components/Steps/Steps.js +1 -1
  242. package/cjs/components/Steps/ui/StepItem/StepItem.styles.js +0 -1
  243. package/cjs/components/Steps/ui/StepItem/StepItem.styles.js.map +1 -1
  244. package/cjs/components/Tabs/ui/horizontal/HorizontalTabs/HorizontalTabs.js +2 -3
  245. package/cjs/components/Tabs/ui/horizontal/HorizontalTabs/HorizontalTabs.js.map +1 -1
  246. package/cjs/components/Tabs/ui/vertical/VerticalTabs/VerticalTabs.js +2 -3
  247. package/cjs/components/Tabs/ui/vertical/VerticalTabs/VerticalTabs.js.map +1 -1
  248. package/cjs/components/TextArea/TextArea.js +2 -2
  249. package/cjs/components/TextArea/TextArea.styles.js +2 -3
  250. package/cjs/components/TextArea/TextArea.styles.js.map +1 -1
  251. package/cjs/components/TextArea/ui/Hint/Hint.js +1 -2
  252. package/cjs/components/TextArea/ui/Hint/Hint.js.map +1 -1
  253. package/cjs/components/TextField/TextField.js +3 -3
  254. package/cjs/components/TextField/TextField.styles.js +1 -2
  255. package/cjs/components/TextField/TextField.styles.js.map +1 -1
  256. package/cjs/components/TextField/ui/Hint/Hint.js +1 -2
  257. package/cjs/components/TextField/ui/Hint/Hint.js.map +1 -1
  258. package/cjs/components/TextField/ui/TextFieldChip/TextFieldChip.styles.js +1 -2
  259. package/cjs/components/TextField/ui/TextFieldChip/TextFieldChip.styles.js.map +1 -1
  260. package/cjs/components/Toast/Toast.styles.js +1 -1
  261. package/cjs/components/Toast/ToastController.js +1 -1
  262. package/cjs/components/Toast/utils.js +1 -2
  263. package/cjs/components/Toast/utils.js.map +1 -1
  264. package/cjs/components/Toolbar/ui/ToolbarDivider/ToolbarDivider.js +1 -1
  265. package/cjs/components/Tooltip/Tooltip.js +2 -3
  266. package/cjs/components/Tooltip/Tooltip.js.map +1 -1
  267. package/cjs/engines/index.js +0 -2
  268. package/cjs/engines/index.js.map +1 -1
  269. package/cjs/hooks/useIsomorphicLayoutEffect.js +0 -1
  270. package/cjs/hooks/useIsomorphicLayoutEffect.js.map +1 -1
  271. package/cjs/hooks/useOutsideClick.js +1 -1
  272. package/cjs/hooks/useOutsideClick.js.map +1 -1
  273. package/cjs/index.css +24 -28
  274. package/cjs/index.js +48 -51
  275. package/cjs/index.js.map +1 -1
  276. package/cjs/utils/index.js +0 -5
  277. package/cjs/utils/index.js.map +1 -1
  278. package/emotion/cjs/components/Dropdown/Dropdown.js +58 -37
  279. package/emotion/cjs/components/Dropdown/Dropdown.styles.js +9 -25
  280. package/emotion/cjs/components/Dropdown/Dropdown.tokens.js +36 -2
  281. package/emotion/cjs/components/Dropdown/FloatingPopover.js +109 -0
  282. package/emotion/cjs/components/Dropdown/ui/DropdownInner/DropdownInner.js +17 -51
  283. package/emotion/cjs/components/Dropdown/ui/DropdownItem/DropdownItem.js +29 -18
  284. package/emotion/cjs/components/Dropdown/ui/DropdownItem/DropdownItem.styles.js +21 -41
  285. package/emotion/cjs/components/Dropdown/utils/getItemByFocused.js +12 -0
  286. package/emotion/cjs/components/Dropdown/utils/getItemId.js +9 -0
  287. package/emotion/cjs/components/Dropdown/utils/getPlacement.js +15 -0
  288. package/emotion/cjs/components/Dropdown/utils/index.js +23 -1
  289. package/emotion/cjs/components/Slider/Slider.js +2 -10
  290. package/emotion/cjs/components/Slider/Slider.template-doc.mdx +0 -26
  291. package/emotion/cjs/components/Slider/Slider.tokens.js +17 -23
  292. package/emotion/cjs/components/Slider/components/Double/Double.js +19 -54
  293. package/emotion/cjs/components/Slider/components/Single/Single.js +33 -64
  294. package/emotion/cjs/components/Slider/components/Single/Single.styles.js +9 -18
  295. package/emotion/cjs/components/Slider/components/SliderBase/SliderBase.js +12 -31
  296. package/emotion/cjs/components/Slider/components/SliderBase/SliderBase.styles.js +10 -10
  297. package/emotion/cjs/components/Slider/ui/Handler/Handler.js +88 -52
  298. package/emotion/cjs/components/Slider/ui/Handler/Handler.styles.js +15 -9
  299. package/emotion/cjs/components/Slider/ui/Thumb/Thumb.js +2 -3
  300. package/emotion/cjs/components/Slider/ui/Thumb/Thumb.styles.js +3 -3
  301. package/emotion/cjs/components/Slider/utils/index.js +10 -28
  302. package/emotion/cjs/components/Slider/variations/_view/base.js +1 -2
  303. package/emotion/cjs/examples/plasma_b2c/components/Dropdown/Dropdown.config.js +5 -5
  304. package/emotion/cjs/examples/plasma_b2c/components/Dropdown/Dropdown.stories.tsx +6 -5
  305. package/emotion/cjs/examples/plasma_b2c/components/Slider/Slider.config.js +7 -7
  306. package/emotion/cjs/examples/plasma_b2c/components/Slider/Slider.stories.tsx +16 -90
  307. package/emotion/cjs/examples/plasma_web/components/Dropdown/Dropdown.config.js +5 -5
  308. package/emotion/cjs/examples/plasma_web/components/Dropdown/Dropdown.stories.tsx +6 -5
  309. package/emotion/cjs/examples/plasma_web/components/Slider/Slider.config.js +7 -7
  310. package/emotion/cjs/examples/plasma_web/components/Slider/Slider.stories.tsx +15 -90
  311. package/emotion/cjs/hooks/useOutsideClick.js +1 -1
  312. package/emotion/es/components/Dropdown/Dropdown.js +60 -40
  313. package/emotion/es/components/Dropdown/Dropdown.styles.js +9 -25
  314. package/emotion/es/components/Dropdown/Dropdown.tokens.js +35 -1
  315. package/emotion/es/components/Dropdown/FloatingPopover.js +102 -0
  316. package/emotion/es/components/Dropdown/ui/DropdownInner/DropdownInner.js +18 -52
  317. package/emotion/es/components/Dropdown/ui/DropdownItem/DropdownItem.js +31 -20
  318. package/emotion/es/components/Dropdown/ui/DropdownItem/DropdownItem.styles.js +22 -42
  319. package/emotion/es/components/Dropdown/utils/getItemByFocused.js +6 -0
  320. package/emotion/es/components/Dropdown/utils/getItemId.js +3 -0
  321. package/emotion/es/components/Dropdown/utils/getPlacement.js +9 -0
  322. package/emotion/es/components/Dropdown/utils/index.js +4 -1
  323. package/emotion/es/components/Slider/Slider.js +2 -11
  324. package/emotion/es/components/Slider/Slider.template-doc.mdx +0 -26
  325. package/emotion/es/components/Slider/Slider.tokens.js +17 -23
  326. package/emotion/es/components/Slider/components/Double/Double.js +19 -54
  327. package/emotion/es/components/Slider/components/Single/Single.js +34 -65
  328. package/emotion/es/components/Slider/components/Single/Single.styles.js +8 -17
  329. package/emotion/es/components/Slider/components/SliderBase/SliderBase.js +12 -31
  330. package/emotion/es/components/Slider/components/SliderBase/SliderBase.styles.js +11 -11
  331. package/emotion/es/components/Slider/ui/Handler/Handler.js +86 -51
  332. package/emotion/es/components/Slider/ui/Handler/Handler.styles.js +16 -10
  333. package/emotion/es/components/Slider/ui/Thumb/Thumb.js +2 -3
  334. package/emotion/es/components/Slider/ui/Thumb/Thumb.styles.js +3 -3
  335. package/emotion/es/components/Slider/utils/index.js +10 -28
  336. package/emotion/es/components/Slider/variations/_view/base.js +1 -2
  337. package/emotion/es/examples/plasma_b2c/components/Dropdown/Dropdown.config.js +6 -6
  338. package/emotion/es/examples/plasma_b2c/components/Dropdown/Dropdown.stories.tsx +6 -5
  339. package/emotion/es/examples/plasma_b2c/components/Slider/Slider.config.js +7 -7
  340. package/emotion/es/examples/plasma_b2c/components/Slider/Slider.stories.tsx +16 -90
  341. package/emotion/es/examples/plasma_web/components/Dropdown/Dropdown.config.js +6 -6
  342. package/emotion/es/examples/plasma_web/components/Dropdown/Dropdown.stories.tsx +6 -5
  343. package/emotion/es/examples/plasma_web/components/Slider/Slider.config.js +7 -7
  344. package/emotion/es/examples/plasma_web/components/Slider/Slider.stories.tsx +15 -90
  345. package/emotion/es/hooks/useOutsideClick.js +1 -1
  346. package/emotion/package.json +2 -1
  347. package/es/components/Accordion/ui/AccordionItem/AccordionItem.styles.js +0 -1
  348. package/es/components/Accordion/ui/AccordionItem/AccordionItem.styles.js.map +1 -1
  349. package/es/components/Attach/Attach.js +3 -4
  350. package/es/components/Attach/Attach.js.map +1 -1
  351. package/es/components/Attach/components/AttachButton/AttachButton.js +0 -1
  352. package/es/components/Attach/components/AttachButton/AttachButton.js.map +1 -1
  353. package/es/components/Attach/ui/Button/Button.styles.js +0 -1
  354. package/es/components/Attach/ui/Button/Button.styles.js.map +1 -1
  355. package/es/components/Attach/ui/Cell/Cell.styles.js +0 -2
  356. package/es/components/Attach/ui/Cell/Cell.styles.js.map +1 -1
  357. package/es/components/Attach/ui/IconButton/IconButton.styles.js +0 -1
  358. package/es/components/Attach/ui/IconButton/IconButton.styles.js.map +1 -1
  359. package/es/components/Attach/utils/getFileicon.js +3 -4
  360. package/es/components/Attach/utils/getFileicon.js.map +1 -1
  361. package/es/components/Attach/utils/index.js +0 -3
  362. package/es/components/Attach/utils/index.js.map +1 -1
  363. package/es/components/Autocomplete/Autocomplete.js +5 -6
  364. package/es/components/Autocomplete/Autocomplete.js.map +1 -1
  365. package/es/components/Autocomplete/Autocomplete.styles.js +2 -3
  366. package/es/components/Autocomplete/Autocomplete.styles.js.map +1 -1
  367. package/es/components/Autocomplete/ui/TextField/TextField.styles.js +1 -2
  368. package/es/components/Autocomplete/ui/TextField/TextField.styles.js.map +1 -1
  369. package/es/components/Avatar/Avatar.js +2 -3
  370. package/es/components/Avatar/Avatar.js.map +1 -1
  371. package/es/components/Breadcrumbs/Breadcrumbs.styles.js +2 -4
  372. package/es/components/Breadcrumbs/Breadcrumbs.styles.js.map +1 -1
  373. package/es/components/Button/Button.styles.js +0 -3
  374. package/es/components/Button/Button.styles.js.map +1 -1
  375. package/es/components/Calendar/CalendarBase/CalendarBase.js +5 -5
  376. package/es/components/Calendar/CalendarDouble/CalendarDouble.js +8 -8
  377. package/es/components/Calendar/hooks/useDays.js +2 -2
  378. package/es/components/Calendar/hooks/useKeyNavigation.js +1 -1
  379. package/es/components/Calendar/hooks/useMonths.js +2 -2
  380. package/es/components/Calendar/hooks/useQuarters.js +2 -2
  381. package/es/components/Calendar/hooks/useYears.js +2 -2
  382. package/es/components/Calendar/ui/CalendarDays/CalendarDays.js +4 -4
  383. package/es/components/Calendar/ui/CalendarHeader/CalendarHeader.js +5 -6
  384. package/es/components/Calendar/ui/CalendarHeader/CalendarHeader.js.map +1 -1
  385. package/es/components/Calendar/ui/CalendarHeader/CalendarHeader.styles.js +0 -1
  386. package/es/components/Calendar/ui/CalendarHeader/CalendarHeader.styles.js.map +1 -1
  387. package/es/components/Calendar/ui/CalendarMonths/CalendarMonths.js +4 -4
  388. package/es/components/Calendar/ui/CalendarQuarters/CalendarQuarters.js +4 -4
  389. package/es/components/Calendar/ui/CalendarYears/CalendarYears.js +4 -4
  390. package/es/components/Combobox/ComboboxNew/Combobox.js +11 -12
  391. package/es/components/Combobox/ComboboxNew/Combobox.js.map +1 -1
  392. package/es/components/Combobox/ComboboxNew/Combobox.styles.js +2 -4
  393. package/es/components/Combobox/ComboboxNew/Combobox.styles.js.map +1 -1
  394. package/es/components/Combobox/ComboboxNew/hooks/getPathMaps.js +0 -2
  395. package/es/components/Combobox/ComboboxNew/hooks/getPathMaps.js.map +1 -1
  396. package/es/components/Combobox/ComboboxNew/ui/Inner/Inner.js +1 -2
  397. package/es/components/Combobox/ComboboxNew/ui/Inner/Inner.js.map +1 -1
  398. package/es/components/Combobox/ComboboxNew/ui/Inner/ui/Item/Item.js +5 -6
  399. package/es/components/Combobox/ComboboxNew/ui/Inner/ui/Item/Item.js.map +1 -1
  400. package/es/components/Combobox/ComboboxNew/ui/Inner/ui/Item/Item.styles.js +1 -3
  401. package/es/components/Combobox/ComboboxNew/ui/Inner/ui/Item/Item.styles.js.map +1 -1
  402. package/es/components/Combobox/ComboboxNew/ui/Target/Target.styles.js +1 -2
  403. package/es/components/Combobox/ComboboxNew/ui/Target/Target.styles.js.map +1 -1
  404. package/es/components/Combobox/ComboboxOld/Combobox.css +28 -14
  405. package/es/components/Combobox/ComboboxOld/Combobox.js +4 -10
  406. package/es/components/Combobox/ComboboxOld/Combobox.js.map +1 -1
  407. package/es/components/Combobox/ComboboxOld/Combobox.styles.js +0 -1
  408. package/es/components/Combobox/ComboboxOld/Combobox.styles.js.map +1 -1
  409. package/es/components/Combobox/ComboboxOld/hooks/useFocusController.js +0 -1
  410. package/es/components/Combobox/ComboboxOld/hooks/useFocusController.js.map +1 -1
  411. package/es/components/Combobox/ComboboxOld/ui/ComboboxChip/ComboboxChip.styles.js +1 -2
  412. package/es/components/Combobox/ComboboxOld/ui/ComboboxChip/ComboboxChip.styles.js.map +1 -1
  413. package/es/components/Combobox/ComboboxOld/ui/ComboboxDivider/ComboboxDivider.css +32 -18
  414. package/es/components/Combobox/ComboboxOld/ui/ComboboxDivider/ComboboxDivider.js +1 -10
  415. package/es/components/Combobox/ComboboxOld/ui/ComboboxDivider/ComboboxDivider.js.map +1 -1
  416. package/es/components/Combobox/ComboboxOld/ui/ComboboxFooter/ComboboxFooter.css +32 -18
  417. package/es/components/Combobox/ComboboxOld/ui/ComboboxFooter/ComboboxFooter.js +1 -10
  418. package/es/components/Combobox/ComboboxOld/ui/ComboboxFooter/ComboboxFooter.js.map +1 -1
  419. package/es/components/Combobox/ComboboxOld/ui/ComboboxGroup/ComboboxGroup.css +32 -18
  420. package/es/components/Combobox/ComboboxOld/ui/ComboboxGroup/ComboboxGroup.js +1 -10
  421. package/es/components/Combobox/ComboboxOld/ui/ComboboxGroup/ComboboxGroup.js.map +1 -1
  422. package/es/components/Combobox/ComboboxOld/ui/ComboboxHeader/ComboboxHeader.css +32 -18
  423. package/es/components/Combobox/ComboboxOld/ui/ComboboxHeader/ComboboxHeader.js +1 -10
  424. package/es/components/Combobox/ComboboxOld/ui/ComboboxHeader/ComboboxHeader.js.map +1 -1
  425. package/es/components/Combobox/ComboboxOld/ui/ComboboxItem/ComboboxItem.styles.js +0 -2
  426. package/es/components/Combobox/ComboboxOld/ui/ComboboxItem/ComboboxItem.styles.js.map +1 -1
  427. package/es/components/Combobox/ComboboxOld/ui/ComboboxTarget/ComboboxTarget.js +1 -1
  428. package/es/components/Combobox/ComboboxOld/ui/ComboboxTarget/ComboboxTarget.styles.js +1 -2
  429. package/es/components/Combobox/ComboboxOld/ui/ComboboxTarget/ComboboxTarget.styles.js.map +1 -1
  430. package/es/components/DatePicker/DatePickerBase.styles.js +1 -7
  431. package/es/components/DatePicker/DatePickerBase.styles.js.map +1 -1
  432. package/es/components/DatePicker/RangeDate/RangeDate.js +1 -1
  433. package/es/components/DatePicker/RangeDate/RangeDate.styles.js +0 -1
  434. package/es/components/DatePicker/RangeDate/RangeDate.styles.js.map +1 -1
  435. package/es/components/DatePicker/RangeDate/RangeDatePopover/RangeDatePopover.js +1 -2
  436. package/es/components/DatePicker/RangeDate/RangeDatePopover/RangeDatePopover.js.map +1 -1
  437. package/es/components/DatePicker/RangeDate/RangeDatePopover/RangeDatePopover.styles.js +2 -5
  438. package/es/components/DatePicker/RangeDate/RangeDatePopover/RangeDatePopover.styles.js.map +1 -1
  439. package/es/components/DatePicker/SingleDate/SingleDate.styles.js +0 -1
  440. package/es/components/DatePicker/SingleDate/SingleDate.styles.js.map +1 -1
  441. package/es/components/Drawer/Drawer.js +5 -10
  442. package/es/components/Drawer/Drawer.js.map +1 -1
  443. package/es/components/Drawer/Drawer.styles.js +0 -4
  444. package/es/components/Drawer/Drawer.styles.js.map +1 -1
  445. package/es/components/Drawer/hooks/useDrawer.js +0 -4
  446. package/es/components/Drawer/hooks/useDrawer.js.map +1 -1
  447. package/es/components/Drawer/ui/DrawerContent/DrawerContent.js +0 -7
  448. package/es/components/Drawer/ui/DrawerContent/DrawerContent.js.map +1 -1
  449. package/es/components/Drawer/ui/DrawerFooter/DrawerFooter.js +0 -7
  450. package/es/components/Drawer/ui/DrawerFooter/DrawerFooter.js.map +1 -1
  451. package/es/components/Drawer/ui/DrawerHeader/DrawerHeader.js +0 -3
  452. package/es/components/Drawer/ui/DrawerHeader/DrawerHeader.js.map +1 -1
  453. package/es/components/Dropdown/Dropdown.css +30 -16
  454. package/es/components/Dropdown/Dropdown.js +65 -50
  455. package/es/components/Dropdown/Dropdown.js.map +1 -1
  456. package/es/components/Dropdown/Dropdown.styles.js +15 -27
  457. package/es/components/Dropdown/Dropdown.styles.js.map +1 -1
  458. package/es/components/Dropdown/Dropdown.styles_1ix6io8.css +2 -0
  459. package/es/components/Dropdown/Dropdown.tokens.js +24 -1
  460. package/es/components/Dropdown/Dropdown.tokens.js.map +1 -1
  461. package/es/components/Dropdown/FloatingPopover.js +100 -0
  462. package/es/components/Dropdown/FloatingPopover.js.map +1 -0
  463. package/es/components/Dropdown/ui/DropdownInner/DropdownInner.js +18 -60
  464. package/es/components/Dropdown/ui/DropdownInner/DropdownInner.js.map +1 -1
  465. package/es/components/Dropdown/ui/DropdownItem/DropdownItem.css +46 -6
  466. package/es/components/Dropdown/ui/DropdownItem/DropdownItem.js +31 -21
  467. package/es/components/Dropdown/ui/DropdownItem/DropdownItem.js.map +1 -1
  468. package/es/components/Dropdown/ui/DropdownItem/DropdownItem.styles.js +24 -29
  469. package/es/components/Dropdown/ui/DropdownItem/DropdownItem.styles.js.map +1 -1
  470. package/es/components/Dropdown/ui/DropdownItem/DropdownItem.styles_17va0nk.css +5 -0
  471. package/es/components/Dropdown/ui/DropdownItemOld/DropdownItem.styles.js +1 -3
  472. package/es/components/Dropdown/ui/DropdownItemOld/DropdownItem.styles.js.map +1 -1
  473. package/es/components/Dropdown/ui/DropdownItemOld/{DropdownItem.styles_12e50g5.css → DropdownItem.styles_1lyg81y.css} +1 -1
  474. package/es/components/Dropdown/ui/DropdownItemOld/DropdownItemOld.css +4 -4
  475. package/es/components/Dropdown/ui/DropdownOld/Dropdown.styles.js +0 -1
  476. package/es/components/Dropdown/ui/DropdownOld/Dropdown.styles.js.map +1 -1
  477. package/es/components/Dropdown/utils/getItemByFocused.js +9 -0
  478. package/es/components/Dropdown/utils/getItemByFocused.js.map +1 -0
  479. package/es/components/Dropdown/utils/getItemId.js +6 -0
  480. package/es/components/Dropdown/utils/getItemId.js.map +1 -0
  481. package/es/components/Dropdown/utils/getPlacement.js +12 -0
  482. package/es/components/Dropdown/utils/getPlacement.js.map +1 -0
  483. package/es/components/Dropdown/utils/index.js.map +1 -1
  484. package/es/components/Editable/Editable.js +3 -4
  485. package/es/components/Editable/Editable.js.map +1 -1
  486. package/es/components/Editable/utils/clearSelection.js +0 -2
  487. package/es/components/Editable/utils/clearSelection.js.map +1 -1
  488. package/es/components/Editable/utils/selectText.js +0 -2
  489. package/es/components/Editable/utils/selectText.js.map +1 -1
  490. package/es/components/EmptyState/EmptyState.styles.js +1 -2
  491. package/es/components/EmptyState/EmptyState.styles.js.map +1 -1
  492. package/es/components/IconButton/IconButton.js +1 -1
  493. package/es/components/IconButton/IconButton.styles.js +0 -8
  494. package/es/components/IconButton/IconButton.styles.js.map +1 -1
  495. package/es/components/Modal/Modal.js +6 -8
  496. package/es/components/Modal/Modal.js.map +1 -1
  497. package/es/components/Modal/hooks/useModal.js +0 -4
  498. package/es/components/Modal/hooks/useModal.js.map +1 -1
  499. package/es/components/Notification/Notification.styles.js +2 -3
  500. package/es/components/Notification/Notification.styles.js.map +1 -1
  501. package/es/components/Notification/NotificationsPortal.js +3 -4
  502. package/es/components/Notification/NotificationsPortal.js.map +1 -1
  503. package/es/components/Pagination/Pagination.styles.js +1 -2
  504. package/es/components/Pagination/Pagination.styles.js.map +1 -1
  505. package/es/components/Pagination/ui/PaginationSelectPerPage/PaginationSelectPerPage.styles.js +1 -2
  506. package/es/components/Pagination/ui/PaginationSelectPerPage/PaginationSelectPerPage.styles.js.map +1 -1
  507. package/es/components/Panel/ui/PanelHeader/PanelHeader.js +1 -2
  508. package/es/components/Panel/ui/PanelHeader/PanelHeader.js.map +1 -1
  509. package/es/components/Panel/ui/PanelHeader/PanelHeader.styles.js +1 -2
  510. package/es/components/Panel/ui/PanelHeader/PanelHeader.styles.js.map +1 -1
  511. package/es/components/Popover/Popover.js +1 -1
  512. package/es/components/Popup/Popup.js +2 -2
  513. package/es/components/Popup/PopupContext.js +1 -1
  514. package/es/components/Range/Range.styles.js +0 -1
  515. package/es/components/Range/Range.styles.js.map +1 -1
  516. package/es/components/Segment/ui/SegmentGroup/SegmentGroup.js +4 -5
  517. package/es/components/Segment/ui/SegmentGroup/SegmentGroup.js.map +1 -1
  518. package/es/components/Select/Select.js +11 -12
  519. package/es/components/Select/Select.js.map +1 -1
  520. package/es/components/Select/Select.styles.js +2 -5
  521. package/es/components/Select/Select.styles.js.map +1 -1
  522. package/es/components/Select/hooks/usePathMaps.js +0 -2
  523. package/es/components/Select/hooks/usePathMaps.js.map +1 -1
  524. package/es/components/Select/ui/Inner/Inner.js +1 -2
  525. package/es/components/Select/ui/Inner/Inner.js.map +1 -1
  526. package/es/components/Select/ui/Inner/ui/Item/Item.js +4 -5
  527. package/es/components/Select/ui/Inner/ui/Item/Item.js.map +1 -1
  528. package/es/components/Select/ui/Inner/ui/Item/Item.styles.js +0 -1
  529. package/es/components/Select/ui/Inner/ui/Item/Item.styles.js.map +1 -1
  530. package/es/components/Select/ui/Target/ui/Button/Button.js +1 -1
  531. package/es/components/Select/ui/Target/ui/Button/Button.styles.js +1 -3
  532. package/es/components/Select/ui/Target/ui/Button/Button.styles.js.map +1 -1
  533. package/es/components/Select/ui/Target/ui/Textfield/Textfield.js +2 -2
  534. package/es/components/Select/ui/Target/ui/Textfield/Textfield.styles.js +1 -4
  535. package/es/components/Select/ui/Target/ui/Textfield/Textfield.styles.js.map +1 -1
  536. package/es/components/Select/ui/Target/ui/Textfield/ui/Chip/Chip.styles.js +1 -2
  537. package/es/components/Select/ui/Target/ui/Textfield/ui/Chip/Chip.styles.js.map +1 -1
  538. package/es/components/Select/utils/getButtonLabel.js +0 -2
  539. package/es/components/Select/utils/getButtonLabel.js.map +1 -1
  540. package/es/components/Select/utils/getCorrectHeight.js.map +1 -1
  541. package/es/components/Sheet/Sheet.js +3 -3
  542. package/es/components/Skeleton/LineSkeleton/LineSkeleton.js +2 -4
  543. package/es/components/Skeleton/LineSkeleton/LineSkeleton.js.map +1 -1
  544. package/es/components/Skeleton/RectSkeleton/RectSkeleton.js +2 -4
  545. package/es/components/Skeleton/RectSkeleton/RectSkeleton.js.map +1 -1
  546. package/es/components/Slider/Slider.css +13 -15
  547. package/es/components/Slider/Slider.js +2 -18
  548. package/es/components/Slider/Slider.js.map +1 -1
  549. package/es/components/Slider/Slider.tokens.js +17 -23
  550. package/es/components/Slider/Slider.tokens.js.map +1 -1
  551. package/es/components/Slider/components/Double/Double.css +8 -8
  552. package/es/components/Slider/components/Double/Double.js +20 -56
  553. package/es/components/Slider/components/Double/Double.js.map +1 -1
  554. package/es/components/Slider/components/Double/Double.styles.js +0 -1
  555. package/es/components/Slider/components/Double/Double.styles.js.map +1 -1
  556. package/es/components/Slider/components/DoubleUncontrolled/DoubleUncontrolled.js +0 -3
  557. package/es/components/Slider/components/DoubleUncontrolled/DoubleUncontrolled.js.map +1 -1
  558. package/es/components/Slider/components/Single/Single.css +14 -14
  559. package/es/components/Slider/components/Single/Single.js +35 -67
  560. package/es/components/Slider/components/Single/Single.js.map +1 -1
  561. package/es/components/Slider/components/Single/Single.styles.js +4 -4
  562. package/es/components/Slider/components/Single/Single.styles.js.map +1 -1
  563. package/es/components/Slider/components/Single/Single.styles_1r9f1e0.css +6 -0
  564. package/es/components/Slider/components/SliderBase/SliderBase.css +5 -5
  565. package/es/components/Slider/components/SliderBase/SliderBase.js +13 -32
  566. package/es/components/Slider/components/SliderBase/SliderBase.js.map +1 -1
  567. package/es/components/Slider/components/SliderBase/SliderBase.styles.js +7 -7
  568. package/es/components/Slider/components/SliderBase/SliderBase.styles.js.map +1 -1
  569. package/es/components/Slider/components/SliderBase/SliderBase.styles_9s4eb3.css +5 -0
  570. package/es/components/Slider/ui/Handler/Handler.css +3 -3
  571. package/es/components/Slider/ui/Handler/Handler.js +87 -48
  572. package/es/components/Slider/ui/Handler/Handler.js.map +1 -1
  573. package/es/components/Slider/ui/Handler/Handler.styles.js +7 -17
  574. package/es/components/Slider/ui/Handler/Handler.styles.js.map +1 -1
  575. package/es/components/Slider/ui/Handler/Handler.styles_8crx5z.css +2 -0
  576. package/es/components/Slider/ui/Thumb/Thumb.css +1 -1
  577. package/es/components/Slider/ui/Thumb/Thumb.js +2 -3
  578. package/es/components/Slider/ui/Thumb/Thumb.js.map +1 -1
  579. package/es/components/Slider/ui/Thumb/Thumb.styles.js +1 -1
  580. package/es/components/Slider/ui/Thumb/Thumb.styles.js.map +1 -1
  581. package/es/components/Slider/ui/Thumb/Thumb.styles_4w4gzn.css +1 -0
  582. package/es/components/Slider/utils/index.js +10 -28
  583. package/es/components/Slider/utils/index.js.map +1 -1
  584. package/es/components/Slider/variations/_view/base.js +1 -1
  585. package/es/components/Slider/variations/_view/base.js.map +1 -1
  586. package/es/components/Slider/variations/_view/base_x642ct.css +1 -0
  587. package/es/components/Steps/Steps.js +1 -1
  588. package/es/components/Steps/ui/StepItem/StepItem.styles.js +0 -1
  589. package/es/components/Steps/ui/StepItem/StepItem.styles.js.map +1 -1
  590. package/es/components/Tabs/ui/horizontal/HorizontalTabs/HorizontalTabs.js +2 -3
  591. package/es/components/Tabs/ui/horizontal/HorizontalTabs/HorizontalTabs.js.map +1 -1
  592. package/es/components/Tabs/ui/vertical/VerticalTabs/VerticalTabs.js +2 -3
  593. package/es/components/Tabs/ui/vertical/VerticalTabs/VerticalTabs.js.map +1 -1
  594. package/es/components/TextArea/TextArea.js +2 -2
  595. package/es/components/TextArea/TextArea.styles.js +2 -3
  596. package/es/components/TextArea/TextArea.styles.js.map +1 -1
  597. package/es/components/TextArea/ui/Hint/Hint.js +1 -2
  598. package/es/components/TextArea/ui/Hint/Hint.js.map +1 -1
  599. package/es/components/TextField/TextField.js +3 -3
  600. package/es/components/TextField/TextField.styles.js +1 -2
  601. package/es/components/TextField/TextField.styles.js.map +1 -1
  602. package/es/components/TextField/ui/Hint/Hint.js +1 -2
  603. package/es/components/TextField/ui/Hint/Hint.js.map +1 -1
  604. package/es/components/TextField/ui/TextFieldChip/TextFieldChip.styles.js +1 -2
  605. package/es/components/TextField/ui/TextFieldChip/TextFieldChip.styles.js.map +1 -1
  606. package/es/components/Toast/Toast.styles.js +1 -1
  607. package/es/components/Toast/ToastController.js +1 -1
  608. package/es/components/Toast/utils.js +1 -2
  609. package/es/components/Toast/utils.js.map +1 -1
  610. package/es/components/Toolbar/ui/ToolbarDivider/ToolbarDivider.js +1 -1
  611. package/es/components/Tooltip/Tooltip.js +2 -3
  612. package/es/components/Tooltip/Tooltip.js.map +1 -1
  613. package/es/engines/index.js +0 -2
  614. package/es/engines/index.js.map +1 -1
  615. package/es/hooks/useIsomorphicLayoutEffect.js +0 -1
  616. package/es/hooks/useIsomorphicLayoutEffect.js.map +1 -1
  617. package/es/hooks/useOutsideClick.js +1 -1
  618. package/es/hooks/useOutsideClick.js.map +1 -1
  619. package/es/index.css +24 -28
  620. package/es/index.js +21 -24
  621. package/es/index.js.map +1 -1
  622. package/es/utils/index.js +0 -3
  623. package/es/utils/index.js.map +1 -1
  624. package/package.json +5 -2
  625. package/styled-components/cjs/components/Dropdown/Dropdown.js +58 -37
  626. package/styled-components/cjs/components/Dropdown/Dropdown.styles.js +9 -15
  627. package/styled-components/cjs/components/Dropdown/Dropdown.tokens.js +36 -2
  628. package/styled-components/cjs/components/Dropdown/FloatingPopover.js +109 -0
  629. package/styled-components/cjs/components/Dropdown/ui/DropdownInner/DropdownInner.js +17 -51
  630. package/styled-components/cjs/components/Dropdown/ui/DropdownItem/DropdownItem.js +29 -18
  631. package/styled-components/cjs/components/Dropdown/ui/DropdownItem/DropdownItem.styles.js +17 -19
  632. package/styled-components/cjs/components/Dropdown/utils/getItemByFocused.js +12 -0
  633. package/styled-components/cjs/components/Dropdown/utils/getItemId.js +9 -0
  634. package/styled-components/cjs/components/Dropdown/utils/getPlacement.js +15 -0
  635. package/styled-components/cjs/components/Dropdown/utils/index.js +23 -1
  636. package/styled-components/cjs/components/Slider/Slider.js +2 -10
  637. package/styled-components/cjs/components/Slider/Slider.template-doc.mdx +0 -26
  638. package/styled-components/cjs/components/Slider/Slider.tokens.js +17 -23
  639. package/styled-components/cjs/components/Slider/components/Double/Double.js +19 -54
  640. package/styled-components/cjs/components/Slider/components/Single/Single.js +33 -64
  641. package/styled-components/cjs/components/Slider/components/Single/Single.styles.js +6 -6
  642. package/styled-components/cjs/components/Slider/components/SliderBase/SliderBase.js +12 -31
  643. package/styled-components/cjs/components/Slider/components/SliderBase/SliderBase.styles.js +6 -6
  644. package/styled-components/cjs/components/Slider/ui/Handler/Handler.js +88 -52
  645. package/styled-components/cjs/components/Slider/ui/Handler/Handler.styles.js +4 -7
  646. package/styled-components/cjs/components/Slider/ui/Thumb/Thumb.js +2 -3
  647. package/styled-components/cjs/components/Slider/ui/Thumb/Thumb.styles.js +2 -2
  648. package/styled-components/cjs/components/Slider/utils/index.js +10 -28
  649. package/styled-components/cjs/components/Slider/variations/_view/base.js +1 -2
  650. package/styled-components/cjs/examples/plasma_b2c/components/Dropdown/Dropdown.config.js +5 -5
  651. package/styled-components/cjs/examples/plasma_b2c/components/Dropdown/Dropdown.stories.tsx +6 -5
  652. package/styled-components/cjs/examples/plasma_b2c/components/Slider/Slider.config.js +3 -3
  653. package/styled-components/cjs/examples/plasma_b2c/components/Slider/Slider.stories.tsx +16 -90
  654. package/styled-components/cjs/examples/plasma_web/components/Dropdown/Dropdown.config.js +5 -5
  655. package/styled-components/cjs/examples/plasma_web/components/Dropdown/Dropdown.stories.tsx +6 -5
  656. package/styled-components/cjs/examples/plasma_web/components/Slider/Slider.config.js +3 -3
  657. package/styled-components/cjs/examples/plasma_web/components/Slider/Slider.stories.tsx +15 -90
  658. package/styled-components/cjs/hooks/useOutsideClick.js +1 -1
  659. package/styled-components/es/components/Dropdown/Dropdown.js +60 -40
  660. package/styled-components/es/components/Dropdown/Dropdown.styles.js +9 -15
  661. package/styled-components/es/components/Dropdown/Dropdown.tokens.js +35 -1
  662. package/styled-components/es/components/Dropdown/FloatingPopover.js +102 -0
  663. package/styled-components/es/components/Dropdown/ui/DropdownInner/DropdownInner.js +18 -52
  664. package/styled-components/es/components/Dropdown/ui/DropdownItem/DropdownItem.js +31 -20
  665. package/styled-components/es/components/Dropdown/ui/DropdownItem/DropdownItem.styles.js +18 -20
  666. package/styled-components/es/components/Dropdown/utils/getItemByFocused.js +6 -0
  667. package/styled-components/es/components/Dropdown/utils/getItemId.js +3 -0
  668. package/styled-components/es/components/Dropdown/utils/getPlacement.js +9 -0
  669. package/styled-components/es/components/Dropdown/utils/index.js +4 -1
  670. package/styled-components/es/components/Slider/Slider.js +2 -11
  671. package/styled-components/es/components/Slider/Slider.template-doc.mdx +0 -26
  672. package/styled-components/es/components/Slider/Slider.tokens.js +17 -23
  673. package/styled-components/es/components/Slider/components/Double/Double.js +19 -54
  674. package/styled-components/es/components/Slider/components/Single/Single.js +34 -65
  675. package/styled-components/es/components/Slider/components/Single/Single.styles.js +5 -5
  676. package/styled-components/es/components/Slider/components/SliderBase/SliderBase.js +12 -31
  677. package/styled-components/es/components/Slider/components/SliderBase/SliderBase.styles.js +7 -7
  678. package/styled-components/es/components/Slider/ui/Handler/Handler.js +86 -51
  679. package/styled-components/es/components/Slider/ui/Handler/Handler.styles.js +5 -8
  680. package/styled-components/es/components/Slider/ui/Thumb/Thumb.js +2 -3
  681. package/styled-components/es/components/Slider/ui/Thumb/Thumb.styles.js +2 -2
  682. package/styled-components/es/components/Slider/utils/index.js +10 -28
  683. package/styled-components/es/components/Slider/variations/_view/base.js +1 -2
  684. package/styled-components/es/examples/plasma_b2c/components/Dropdown/Dropdown.config.js +6 -6
  685. package/styled-components/es/examples/plasma_b2c/components/Dropdown/Dropdown.stories.tsx +6 -5
  686. package/styled-components/es/examples/plasma_b2c/components/Slider/Slider.config.js +3 -3
  687. package/styled-components/es/examples/plasma_b2c/components/Slider/Slider.stories.tsx +16 -90
  688. package/styled-components/es/examples/plasma_web/components/Dropdown/Dropdown.config.js +6 -6
  689. package/styled-components/es/examples/plasma_web/components/Dropdown/Dropdown.stories.tsx +6 -5
  690. package/styled-components/es/examples/plasma_web/components/Slider/Slider.config.js +3 -3
  691. package/styled-components/es/examples/plasma_web/components/Slider/Slider.stories.tsx +15 -90
  692. package/styled-components/es/hooks/useOutsideClick.js +1 -1
  693. package/styled-components/package.json +2 -1
  694. package/types/components/Combobox/ComboboxOld/Combobox.types.d.ts +2 -1
  695. package/types/components/Combobox/ComboboxOld/Combobox.types.d.ts.map +1 -1
  696. package/types/components/Dropdown/Dropdown.d.ts +2 -1
  697. package/types/components/Dropdown/Dropdown.d.ts.map +1 -1
  698. package/types/components/Dropdown/Dropdown.styles.d.ts +1 -6
  699. package/types/components/Dropdown/Dropdown.styles.d.ts.map +1 -1
  700. package/types/components/Dropdown/Dropdown.tokens.d.ts +25 -0
  701. package/types/components/Dropdown/Dropdown.tokens.d.ts.map +1 -1
  702. package/types/components/Dropdown/Dropdown.types.d.ts +30 -4
  703. package/types/components/Dropdown/Dropdown.types.d.ts.map +1 -1
  704. package/types/components/Dropdown/FloatingPopover.d.ts +5 -0
  705. package/types/components/Dropdown/FloatingPopover.d.ts.map +1 -0
  706. package/types/components/Dropdown/index.d.ts +1 -1
  707. package/types/components/Dropdown/index.d.ts.map +1 -1
  708. package/types/components/Dropdown/ui/DropdownInner/DropdownInner.d.ts.map +1 -1
  709. package/types/components/Dropdown/ui/DropdownInner/DropdownInner.type.d.ts +1 -12
  710. package/types/components/Dropdown/ui/DropdownInner/DropdownInner.type.d.ts.map +1 -1
  711. package/types/components/Dropdown/ui/DropdownItem/DropdownItem.d.ts.map +1 -1
  712. package/types/components/Dropdown/ui/DropdownItem/DropdownItem.styles.d.ts +32 -3
  713. package/types/components/Dropdown/ui/DropdownItem/DropdownItem.styles.d.ts.map +1 -1
  714. package/types/components/Dropdown/ui/DropdownItem/DropdownItem.type.d.ts +1 -14
  715. package/types/components/Dropdown/ui/DropdownItem/DropdownItem.type.d.ts.map +1 -1
  716. package/types/components/Dropdown/utils/getItemByFocused.d.ts +4 -0
  717. package/types/components/Dropdown/utils/getItemByFocused.d.ts.map +1 -0
  718. package/types/components/Dropdown/utils/getItemId.d.ts +2 -0
  719. package/types/components/Dropdown/utils/getItemId.d.ts.map +1 -0
  720. package/types/components/Dropdown/utils/getPlacement.d.ts +3 -0
  721. package/types/components/Dropdown/utils/getPlacement.d.ts.map +1 -0
  722. package/types/components/Dropdown/utils/index.d.ts +3 -0
  723. package/types/components/Dropdown/utils/index.d.ts.map +1 -1
  724. package/types/components/Select/utils/getCorrectHeight.d.ts +2 -2
  725. package/types/components/Select/utils/getCorrectHeight.d.ts.map +1 -1
  726. package/types/components/Slider/Slider.d.ts.map +1 -1
  727. package/types/components/Slider/Slider.tokens.d.ts +16 -22
  728. package/types/components/Slider/Slider.tokens.d.ts.map +1 -1
  729. package/types/components/Slider/components/Double/Double.d.ts.map +1 -1
  730. package/types/components/Slider/components/Double/Double.types.d.ts +0 -1
  731. package/types/components/Slider/components/Double/Double.types.d.ts.map +1 -1
  732. package/types/components/Slider/components/Single/Single.d.ts.map +1 -1
  733. package/types/components/Slider/components/Single/Single.styles.d.ts +1 -1
  734. package/types/components/Slider/components/Single/Single.styles.d.ts.map +1 -1
  735. package/types/components/Slider/components/Single/Single.types.d.ts +7 -80
  736. package/types/components/Slider/components/Single/Single.types.d.ts.map +1 -1
  737. package/types/components/Slider/components/SliderBase/SliderBase.d.ts.map +1 -1
  738. package/types/components/Slider/components/SliderBase/SliderBase.styles.d.ts +1 -1
  739. package/types/components/Slider/components/SliderBase/SliderBase.styles.d.ts.map +1 -1
  740. package/types/components/Slider/components/SliderBase/SliderBase.types.d.ts +0 -6
  741. package/types/components/Slider/components/SliderBase/SliderBase.types.d.ts.map +1 -1
  742. package/types/components/Slider/ui/Handler/Handler.d.ts.map +1 -1
  743. package/types/components/Slider/ui/Handler/Handler.styles.d.ts +2 -6
  744. package/types/components/Slider/ui/Handler/Handler.styles.d.ts.map +1 -1
  745. package/types/components/Slider/ui/Handler/Handler.types.d.ts +1 -5
  746. package/types/components/Slider/ui/Handler/Handler.types.d.ts.map +1 -1
  747. package/types/components/Slider/ui/Thumb/Thumb.d.ts +1 -1
  748. package/types/components/Slider/ui/Thumb/Thumb.d.ts.map +1 -1
  749. package/types/components/Slider/ui/Thumb/Thumb.styles.d.ts.map +1 -1
  750. package/types/components/Slider/ui/Thumb/Thumb.types.d.ts +0 -1
  751. package/types/components/Slider/ui/Thumb/Thumb.types.d.ts.map +1 -1
  752. package/types/components/Slider/utils/index.d.ts +8 -26
  753. package/types/components/Slider/utils/index.d.ts.map +1 -1
  754. package/types/components/Slider/variations/_view/base.d.ts.map +1 -1
  755. package/types/examples/plasma_b2c/components/Dropdown/Dropdown.config.d.ts +3 -3
  756. package/types/examples/plasma_b2c/components/Dropdown/Dropdown.config.d.ts.map +1 -1
  757. package/types/examples/plasma_b2c/components/Dropdown/Dropdown.d.ts +4 -4
  758. package/types/examples/plasma_b2c/components/Dropdown/Dropdown.d.ts.map +1 -1
  759. package/types/examples/plasma_b2c/components/Slider/Slider.config.d.ts.map +1 -1
  760. package/types/examples/plasma_b2c/components/Slider/Slider.d.ts +2 -84
  761. package/types/examples/plasma_b2c/components/Slider/Slider.d.ts.map +1 -1
  762. package/types/examples/plasma_web/components/Dropdown/Dropdown.config.d.ts +3 -3
  763. package/types/examples/plasma_web/components/Dropdown/Dropdown.config.d.ts.map +1 -1
  764. package/types/examples/plasma_web/components/Dropdown/Dropdown.d.ts +4 -4
  765. package/types/examples/plasma_web/components/Dropdown/Dropdown.d.ts.map +1 -1
  766. package/types/examples/plasma_web/components/Slider/Slider.config.d.ts.map +1 -1
  767. package/types/examples/plasma_web/components/Slider/Slider.d.ts +2 -84
  768. package/types/examples/plasma_web/components/Slider/Slider.d.ts.map +1 -1
  769. package/types/hooks/useOutsideClick.d.ts +1 -1
  770. package/types/hooks/useOutsideClick.d.ts.map +1 -1
  771. package/types/utils/index.d.ts +1 -1
  772. package/types/utils/index.d.ts.map +1 -1
  773. package/cjs/components/Dropdown/Dropdown.styles_1tihqkp.css +0 -3
  774. package/cjs/components/Dropdown/ui/DropdownItem/DropdownItem.styles_blclup.css +0 -6
  775. package/cjs/components/Slider/components/DoubleUncontrolled/DoubleUncontrolled.css +0 -98
  776. package/cjs/components/Slider/components/Single/Single.styles_1h7n2s2.css +0 -6
  777. package/cjs/components/Slider/components/SliderBase/SliderBase.styles_1qt1224.css +0 -5
  778. package/cjs/components/Slider/ui/Handler/Handler.styles_irtcgm.css +0 -2
  779. package/cjs/components/Slider/ui/Handler/computeKeyPressData.js +0 -122
  780. package/cjs/components/Slider/ui/Handler/computeKeyPressData.js.map +0 -1
  781. package/cjs/components/Slider/ui/Thumb/Thumb.styles_uyn20e.css +0 -1
  782. package/cjs/components/Slider/variations/_view/base_1s3f6q8.css +0 -1
  783. package/emotion/cjs/components/Slider/ui/Handler/computeKeyPressData.js +0 -121
  784. package/emotion/es/components/Slider/ui/Handler/computeKeyPressData.js +0 -115
  785. package/es/components/Dropdown/Dropdown.styles_1tihqkp.css +0 -3
  786. package/es/components/Dropdown/ui/DropdownItem/DropdownItem.styles_blclup.css +0 -6
  787. package/es/components/Slider/components/DoubleUncontrolled/DoubleUncontrolled.css +0 -98
  788. package/es/components/Slider/components/Single/Single.styles_1h7n2s2.css +0 -6
  789. package/es/components/Slider/components/SliderBase/SliderBase.styles_1qt1224.css +0 -5
  790. package/es/components/Slider/ui/Handler/Handler.styles_irtcgm.css +0 -2
  791. package/es/components/Slider/ui/Handler/computeKeyPressData.js +0 -118
  792. package/es/components/Slider/ui/Handler/computeKeyPressData.js.map +0 -1
  793. package/es/components/Slider/ui/Thumb/Thumb.styles_uyn20e.css +0 -1
  794. package/es/components/Slider/variations/_view/base_1s3f6q8.css +0 -1
  795. package/styled-components/cjs/components/Slider/ui/Handler/computeKeyPressData.js +0 -121
  796. package/styled-components/es/components/Slider/ui/Handler/computeKeyPressData.js +0 -115
  797. package/types/components/Slider/ui/Handler/computeKeyPressData.d.ts +0 -12
  798. package/types/components/Slider/ui/Handler/computeKeyPressData.d.ts.map +0 -1
@@ -1,17 +1,16 @@
1
1
  import { objectWithoutProperties as _objectWithoutProperties, slicedToArray as _slicedToArray, objectSpread2 as _objectSpread2, extends as _extends } from '../../../../_virtual/_rollupPluginBabelHelpers.js';
2
2
  import React, { useState, useRef, useEffect, useCallback } from 'react';
3
3
  import { SliderBase } from '../SliderBase/SliderBase.js';
4
- import { Handler } from '../../ui/Handler/Handler.js';
5
- import '@linaria/react';
6
4
  import { sizeData } from '../../utils/index.js';
7
5
  import { cx } from '../../../../utils/index.js';
8
6
  import { classes } from '../../Slider.tokens.js';
9
7
  import { InputHidden } from '../SliderBase/SliderBase.styles.js';
10
- import { SingleWrapper, LabelWrapper, LabelContent, Label, SliderBaseWrapper, StyledRangeValue } from './Single.styles.js';
8
+ import { SingleWrapper, LabelWrapper, LabelContentLeft, Label, SliderBaseWrapper, StyledRangeValue } from './Single.styles.js';
11
9
  import { isNumber } from '../../../../utils/isNumber.js';
10
+ import { Handler } from '../../ui/Handler/Handler.js';
12
11
  import { noop } from '../../../../utils/noop.js';
13
12
 
14
- var _excluded = ["min", "max", "value", "disabled", "onChangeCommitted", "onChange", "ariaLabel", "label", "labelContentLeft", "labelContent", "sliderAlign", "showScale", "showRangeValues", "showCurrentValue", "hideMinValueDiff", "hideMaxValueDiff", "labelPlacement", "rangeValuesPlacement", "scaleAlign", "multipleStepSize", "defaultValue", "size", "name", "pointerSize", "orientation", "reversed", "labelReversed"];
13
+ var _excluded = ["min", "max", "value", "disabled", "onChangeCommitted", "onChange", "ariaLabel", "label", "labelContentLeft", "showRangeValues", "showCurrentValue", "hideMinValueDiff", "hideMaxValueDiff", "labelPlacement", "rangeValuesPlacement", "multipleStepSize", "defaultValue", "size", "name"];
15
14
  var SingleSlider = function SingleSlider(_ref) {
16
15
  var _ref2;
17
16
  var min = _ref.min,
@@ -23,35 +22,23 @@ var SingleSlider = function SingleSlider(_ref) {
23
22
  ariaLabel = _ref.ariaLabel,
24
23
  label = _ref.label,
25
24
  labelContentLeft = _ref.labelContentLeft,
26
- labelContent = _ref.labelContent,
27
- _ref$sliderAlign = _ref.sliderAlign,
28
- sliderAlign = _ref$sliderAlign === void 0 ? 'left' : _ref$sliderAlign,
29
- showScale = _ref.showScale,
30
25
  showRangeValues = _ref.showRangeValues,
31
26
  showCurrentValue = _ref.showCurrentValue,
32
27
  hideMinValueDiff = _ref.hideMinValueDiff,
33
28
  hideMaxValueDiff = _ref.hideMaxValueDiff,
34
29
  _ref$labelPlacement = _ref.labelPlacement,
35
- labelPlacement = _ref$labelPlacement === void 0 ? 'top' : _ref$labelPlacement,
36
- rangeValuesPlacementOld = _ref.rangeValuesPlacement,
37
- _ref$scaleAlign = _ref.scaleAlign,
38
- scaleAlign = _ref$scaleAlign === void 0 ? 'bottom' : _ref$scaleAlign,
30
+ labelPlacement = _ref$labelPlacement === void 0 ? 'outer' : _ref$labelPlacement,
31
+ _ref$rangeValuesPlace = _ref.rangeValuesPlacement,
32
+ rangeValuesPlacement = _ref$rangeValuesPlace === void 0 ? 'outer' : _ref$rangeValuesPlace,
39
33
  _ref$multipleStepSize = _ref.multipleStepSize,
40
34
  multipleStepSize = _ref$multipleStepSize === void 0 ? 10 : _ref$multipleStepSize,
41
35
  defaultValue = _ref.defaultValue,
42
36
  _ref$size = _ref.size,
43
37
  size = _ref$size === void 0 ? 'm' : _ref$size,
44
38
  name = _ref.name,
45
- _ref$pointerSize = _ref.pointerSize,
46
- pointerSize = _ref$pointerSize === void 0 ? 'small' : _ref$pointerSize,
47
- _ref$orientation = _ref.orientation,
48
- orientation = _ref$orientation === void 0 ? 'horizontal' : _ref$orientation,
49
- reversed = _ref.reversed,
50
- labelReversed = _ref.labelReversed,
51
39
  rest = _objectWithoutProperties(_ref, _excluded);
52
- var isVertical = orientation === 'vertical';
53
40
  var _useState = useState({
54
- handlePosition: 0,
41
+ xHandle: 0,
55
42
  stepSize: 0,
56
43
  railFillWidth: 0
57
44
  }),
@@ -67,28 +54,23 @@ var SingleSlider = function SingleSlider(_ref) {
67
54
  _useState6 = _slicedToArray(_useState5, 2),
68
55
  endOffset = _useState6[0],
69
56
  setEndOffset = _useState6[1];
70
- var innerValue = (_ref2 = value !== null && value !== void 0 ? value : defaultValue) !== null && _ref2 !== void 0 ? _ref2 : min;
71
- var _useState7 = useState(innerValue),
57
+ var _useState7 = useState((_ref2 = value !== null && value !== void 0 ? value : defaultValue) !== null && _ref2 !== void 0 ? _ref2 : min),
72
58
  _useState8 = _slicedToArray(_useState7, 2),
73
59
  dragValue = _useState8[0],
74
60
  setDragValue = _useState8[1];
75
61
  var stepSize = state.stepSize;
76
- var innerShowScale = showRangeValues || showScale;
77
- var hasLabelContent = Boolean(label || labelContentLeft || labelContent) && (!isVertical || isVertical && sliderAlign !== 'none');
78
- var labelPlacementClass = !isVertical && (labelPlacement === 'outer' || labelPlacement === 'top') ? classes.labelPlacementOuter : classes.labelPlacementInner;
79
- var rangeValuesPlacement = rangeValuesPlacementOld === 'outer' || scaleAlign === 'bottom' ? 'outer' : 'inner';
80
- var scaleAlignClass = rangeValuesPlacement === 'outer' ? classes.rangeValuesPlacementOuter : classes.rangeValuesPlacementInner;
62
+ var hasLabelContent = label || labelContentLeft;
63
+ var labelPlacementClass = labelPlacement === 'outer' ? classes.labelPlacementOuter : classes.labelPlacementInner;
64
+ var rangeValuesPlacementClass = rangeValuesPlacement === 'outer' ? classes.rangeValuesPlacementOuter : classes.rangeValuesPlacementInner;
81
65
  var hideMinValueDiffClass = hideMinValueDiff && dragValue - min <= hideMinValueDiff ? classes.hideMinValue : '';
82
66
  var hideMaxValueDiffClass = hideMaxValueDiff && max - dragValue <= hideMaxValueDiff ? classes.hideMaxValue : '';
83
- var verticalOrientationClass = orientation === 'vertical' ? classes.verticalOrientation : '';
84
67
  var startLabelRef = useRef(null);
85
68
  var endLabelRef = useRef(null);
86
69
  var activeFirstValue = dragValue === min ? classes.activeRangeValue : undefined;
87
70
  var activeSecondValue = dragValue === max ? classes.activeRangeValue : undefined;
88
71
  useEffect(function () {
89
- var visibleValue = reversed ? max - dragValue + min : dragValue;
90
- var localValue = Math.min(Math.max(visibleValue, min), max) - min;
91
- if (!isVertical && rangeValuesPlacement === 'outer') {
72
+ var localValue = Math.min(Math.max(dragValue, min), max) - min;
73
+ if (rangeValuesPlacement === 'outer') {
92
74
  var _startLabelRef$curren, _endLabelRef$current;
93
75
  var startWidth = (_startLabelRef$curren = startLabelRef.current) === null || _startLabelRef$curren === void 0 ? void 0 : _startLabelRef$curren.offsetWidth;
94
76
  if (isNumber(startWidth)) {
@@ -98,35 +80,30 @@ var SingleSlider = function SingleSlider(_ref) {
98
80
  if (isNumber(endWidth)) {
99
81
  setEndOffset(Number(endWidth));
100
82
  }
101
- } else if (isVertical && innerShowScale && sliderAlign !== 'center') {
102
- setStartOffset(12);
103
- setEndOffset(12);
104
83
  } else {
105
84
  setStartOffset(1);
106
85
  setEndOffset(1);
107
86
  }
108
87
  setState(function (prevState) {
109
88
  return _objectSpread2(_objectSpread2({}, prevState), {}, {
110
- handlePosition: stepSize * localValue,
89
+ xHandle: stepSize * localValue,
111
90
  railFillWidth: stepSize * localValue
112
91
  });
113
92
  });
114
- }, [dragValue, innerShowScale, labelPlacement, stepSize, rangeValuesPlacement, min, max, isVertical, reversed,
115
- // для перерасчета размеров
116
- sliderAlign, size]);
93
+ }, [dragValue, labelPlacement, stepSize, rangeValuesPlacement, min, max, setStartOffset, setEndOffset]);
117
94
  var setStepSize = useCallback(function (newStepSize) {
118
95
  setState(function (prevState) {
119
96
  return _objectSpread2(_objectSpread2({}, prevState), {}, {
120
97
  stepSize: newStepSize
121
98
  });
122
99
  });
123
- }, []);
100
+ }, [setState]);
124
101
  var onHandleChange = function onHandleChange(handleValue, data) {
125
- var newValue = Math.round(reversed ? max - handleValue + min : handleValue);
126
- var newHandlePosition = isVertical ? data.y : data.x;
102
+ var newHandleXPosition = data.x;
103
+ var newValue = Math.round(handleValue);
127
104
  setState(function (prevState) {
128
105
  return _objectSpread2(_objectSpread2({}, prevState), {}, {
129
- railFillWidth: newHandlePosition
106
+ railFillWidth: newHandleXPosition
130
107
  });
131
108
  });
132
109
  if (onChange) {
@@ -144,49 +121,41 @@ var SingleSlider = function SingleSlider(_ref) {
144
121
  }
145
122
  setDragValue(newValue);
146
123
  };
147
- var onHandleChangeCommitted = useCallback(function (handleValue, data) {
148
- var newValue = Math.round(reversed ? max - handleValue + min : handleValue);
124
+ var onHandleChangeCommitted = function onHandleChangeCommitted(handleValue, data) {
125
+ var newValue = Math.round(handleValue);
149
126
  if (onChangeCommitted) {
150
127
  onChangeCommitted(newValue);
151
128
  }
152
129
  setState(function (prevState) {
153
130
  return _objectSpread2(_objectSpread2({}, prevState), {}, {
154
- handlePosition: isVertical ? data.lastY : data.lastX,
155
- railFillWidth: isVertical ? data.lastY : data.lastX
131
+ xHandle: data.lastX,
132
+ railFillWidth: data.lastX
156
133
  });
157
134
  });
158
135
  setDragValue(newValue);
159
- }, [isVertical, min, max, reversed]);
160
- var labelVerticalPlacement = reversed ? 'bottom' : 'top';
161
- var valuePlacement = sliderAlign === 'right' ? 'left' : 'right';
162
- var settings = sizeData[size][pointerSize === 'large' ? 'large' : 'small'];
136
+ };
163
137
  return /*#__PURE__*/React.createElement(SingleWrapper, {
164
- className: cx(labelPlacementClass, scaleAlignClass, verticalOrientationClass, sliderAlign === 'right' && classes.labelAlignLeft, (sliderAlign === 'center' || sliderAlign === 'none') && classes.labelAlignCenter, sliderAlign === 'left' && classes.labelAlignRight, labelVerticalPlacement === 'bottom' && classes.labelPlacementBottom, labelReversed && classes.labelContentReversed)
165
- }, hasLabelContent && /*#__PURE__*/React.createElement(LabelWrapper, null, (labelContentLeft || labelContent) && /*#__PURE__*/React.createElement(LabelContent, null, labelContent), label && /*#__PURE__*/React.createElement(Label, null, label)), /*#__PURE__*/React.createElement(SliderBaseWrapper, {
166
- className: cx(!isVertical && rangeValuesPlacement === 'outer' && classes.rangeValuesPlacementOuter, !isVertical && rangeValuesPlacement !== 'outer' && classes.rangeValuesPlacementInner, verticalOrientationClass)
167
- }, innerShowScale && /*#__PURE__*/React.createElement(StyledRangeValue, {
138
+ className: labelPlacementClass
139
+ }, hasLabelContent && /*#__PURE__*/React.createElement(LabelWrapper, null, labelContentLeft && /*#__PURE__*/React.createElement(LabelContentLeft, null, labelContentLeft), label && /*#__PURE__*/React.createElement(Label, null, label)), /*#__PURE__*/React.createElement(SliderBaseWrapper, {
140
+ className: rangeValuesPlacementClass
141
+ }, showRangeValues && /*#__PURE__*/React.createElement(StyledRangeValue, {
168
142
  ref: startLabelRef,
169
143
  className: cx(hideMinValueDiffClass, activeFirstValue)
170
- }, reversed ? max : min), /*#__PURE__*/React.createElement(SliderBase, _extends({
144
+ }, min), /*#__PURE__*/React.createElement(SliderBase, _extends({
171
145
  min: min,
172
146
  max: max,
173
147
  disabled: disabled,
174
- size: size,
175
- sliderAlign: sliderAlign,
176
148
  setStepSize: setStepSize,
177
149
  onChange: onHandleChangeCommitted,
178
150
  railFillWidth: state.railFillWidth,
179
- settings: settings,
151
+ settings: sizeData[size],
180
152
  labelPlacement: labelPlacement,
181
- rangeValuesPlacement: rangeValuesPlacement,
182
- orientation: orientation
153
+ rangeValuesPlacement: rangeValuesPlacement
183
154
  }, rest), /*#__PURE__*/React.createElement(Handler, {
184
- size: pointerSize,
185
- orientation: orientation,
186
155
  stepSize: state.stepSize,
187
156
  onChangeCommitted: onHandleChangeCommitted,
188
157
  onChange: onHandleChange,
189
- position: state.handlePosition,
158
+ xPosition: state.xHandle,
190
159
  min: min,
191
160
  max: max,
192
161
  startOffset: startOffset,
@@ -195,12 +164,11 @@ var SingleSlider = function SingleSlider(_ref) {
195
164
  disabled: disabled,
196
165
  ariaLabel: ariaLabel,
197
166
  multipleStepSize: multipleStepSize,
198
- showCurrentValue: showCurrentValue,
199
- valuePlacement: valuePlacement
200
- })), innerShowScale && /*#__PURE__*/React.createElement(StyledRangeValue, {
167
+ showCurrentValue: showCurrentValue
168
+ })), showRangeValues && /*#__PURE__*/React.createElement(StyledRangeValue, {
201
169
  ref: endLabelRef,
202
170
  className: cx(classes.maxRangeValue, hideMaxValueDiffClass, activeSecondValue)
203
- }, reversed ? min : max)), /*#__PURE__*/React.createElement(InputHidden, _extends({
171
+ }, max)), /*#__PURE__*/React.createElement(InputHidden, _extends({
204
172
  name: name,
205
173
  type: "number",
206
174
  datatype: "slider-single",
@@ -1 +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, noop } from '../../../../utils';\nimport { classes } from '../../Slider.tokens';\nimport { InputHidden } from '../SliderBase/SliderBase.styles';\nimport { FormTypeNumber } from '../../../../types/FormType';\n\nimport type { SingleSliderProps } from './Single.types';\nimport { Label, LabelContent, LabelWrapper, SingleWrapper, SliderBaseWrapper, StyledRangeValue } 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 labelContent,\n sliderAlign = 'left',\n showScale,\n showRangeValues,\n showCurrentValue,\n hideMinValueDiff,\n hideMaxValueDiff,\n labelPlacement = 'top',\n rangeValuesPlacement: rangeValuesPlacementOld,\n scaleAlign = 'bottom',\n multipleStepSize = 10,\n defaultValue,\n size = 'm',\n name,\n pointerSize = 'small',\n orientation = 'horizontal',\n reversed,\n labelReversed,\n ...rest\n}) => {\n const isVertical = orientation === 'vertical';\n\n const [state, setState] = useState({\n handlePosition: 0,\n stepSize: 0,\n railFillWidth: 0,\n });\n\n const innerRef = useRef<HTMLInputElement>(null);\n\n const [startOffset, setStartOffset] = useState(0);\n const [endOffset, setEndOffset] = useState(0);\n\n const innerValue = value ?? defaultValue ?? min;\n const [dragValue, setDragValue] = useState(innerValue);\n\n const { stepSize } = state;\n\n const innerShowScale = showRangeValues || showScale;\n\n const hasLabelContent =\n Boolean(label || labelContentLeft || labelContent) && (!isVertical || (isVertical && sliderAlign !== 'none'));\n const labelPlacementClass =\n !isVertical && (labelPlacement === 'outer' || labelPlacement === 'top')\n ? classes.labelPlacementOuter\n : classes.labelPlacementInner;\n\n const rangeValuesPlacement = rangeValuesPlacementOld === 'outer' || scaleAlign === 'bottom' ? 'outer' : 'inner';\n const scaleAlignClass =\n rangeValuesPlacement === 'outer' ? classes.rangeValuesPlacementOuter : classes.rangeValuesPlacementInner;\n\n const hideMinValueDiffClass = hideMinValueDiff && dragValue - min <= hideMinValueDiff ? classes.hideMinValue : '';\n const hideMaxValueDiffClass = hideMaxValueDiff && max - dragValue <= hideMaxValueDiff ? classes.hideMaxValue : '';\n const verticalOrientationClass = orientation === 'vertical' ? classes.verticalOrientation : '';\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 visibleValue = reversed ? max - dragValue + min : dragValue;\n const localValue = Math.min(Math.max(visibleValue, min), max) - min;\n\n if (!isVertical && 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 if (isVertical && innerShowScale && sliderAlign !== 'center') {\n setStartOffset(12);\n setEndOffset(12);\n } else {\n setStartOffset(1);\n setEndOffset(1);\n }\n\n setState((prevState) => ({\n ...prevState,\n handlePosition: stepSize * localValue,\n railFillWidth: stepSize * localValue,\n }));\n }, [\n dragValue,\n innerShowScale,\n labelPlacement,\n stepSize,\n rangeValuesPlacement,\n min,\n max,\n isVertical,\n reversed,\n // для перерасчета размеров\n sliderAlign,\n size,\n ]);\n\n const setStepSize = useCallback((newStepSize: number) => {\n setState((prevState) => ({\n ...prevState,\n stepSize: newStepSize,\n }));\n }, []);\n\n const onHandleChange: NonNullable<HandlerProps['onChange']> = (handleValue, data) => {\n const newValue = Math.round(reversed ? max - handleValue + min : handleValue);\n\n const newHandlePosition = isVertical ? data.y : data.x;\n setState((prevState) => ({\n ...prevState,\n railFillWidth: newHandlePosition,\n }));\n\n if (onChange) {\n if (value !== undefined) {\n (onChange as (value: number) => void)(newValue);\n }\n\n if (name && !value) {\n (onChange as (event: FormTypeNumber) => void)({\n target: {\n value: newValue,\n name,\n },\n });\n }\n }\n\n setDragValue(newValue);\n };\n\n const onHandleChangeCommitted: NonNullable<HandlerProps['onChangeCommitted']> = useCallback(\n (handleValue, data) => {\n const newValue = Math.round(reversed ? max - handleValue + min : handleValue);\n\n if (onChangeCommitted) {\n onChangeCommitted(newValue);\n }\n\n setState((prevState) => ({\n ...prevState,\n handlePosition: isVertical ? data.lastY : data.lastX,\n railFillWidth: isVertical ? data.lastY : data.lastX,\n }));\n\n setDragValue(newValue);\n },\n [isVertical, min, max, reversed],\n );\n\n const labelVerticalPlacement = reversed ? 'bottom' : 'top';\n const valuePlacement = sliderAlign === 'right' ? 'left' : 'right';\n const settings = sizeData[size][pointerSize === 'large' ? 'large' : 'small'];\n\n return (\n <SingleWrapper\n className={cx(\n labelPlacementClass,\n scaleAlignClass,\n verticalOrientationClass,\n sliderAlign === 'right' && classes.labelAlignLeft,\n (sliderAlign === 'center' || sliderAlign === 'none') && classes.labelAlignCenter,\n sliderAlign === 'left' && classes.labelAlignRight,\n labelVerticalPlacement === 'bottom' && classes.labelPlacementBottom,\n labelReversed && classes.labelContentReversed,\n )}\n >\n {hasLabelContent && (\n <LabelWrapper>\n {(labelContentLeft || labelContent) && <LabelContent>{labelContent}</LabelContent>}\n {label && <Label>{label}</Label>}\n </LabelWrapper>\n )}\n <SliderBaseWrapper\n className={cx(\n !isVertical && rangeValuesPlacement === 'outer' && classes.rangeValuesPlacementOuter,\n !isVertical && rangeValuesPlacement !== 'outer' && classes.rangeValuesPlacementInner,\n verticalOrientationClass,\n )}\n >\n {innerShowScale && (\n <StyledRangeValue ref={startLabelRef} className={cx(hideMinValueDiffClass, activeFirstValue)}>\n {reversed ? max : min}\n </StyledRangeValue>\n )}\n <SliderBase\n min={min}\n max={max}\n disabled={disabled}\n size={size}\n sliderAlign={sliderAlign}\n setStepSize={setStepSize}\n onChange={onHandleChangeCommitted}\n railFillWidth={state.railFillWidth}\n settings={settings}\n labelPlacement={labelPlacement}\n rangeValuesPlacement={rangeValuesPlacement}\n orientation={orientation}\n {...rest}\n >\n <Handler\n size={pointerSize}\n orientation={orientation}\n stepSize={state.stepSize}\n onChangeCommitted={onHandleChangeCommitted}\n onChange={onHandleChange}\n position={state.handlePosition}\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 valuePlacement={valuePlacement}\n />\n </SliderBase>\n {innerShowScale && (\n <StyledRangeValue\n ref={endLabelRef}\n className={cx(classes.maxRangeValue, hideMaxValueDiffClass, activeSecondValue)}\n >\n {reversed ? min : max}\n </StyledRangeValue>\n )}\n </SliderBaseWrapper>\n <InputHidden\n name={name}\n type=\"number\"\n datatype=\"slider-single\"\n value={dragValue}\n ref={innerRef}\n {...noop}\n />\n </SingleWrapper>\n );\n};\n"],"names":["SingleSlider","_ref","_ref2","min","max","value","disabled","onChangeCommitted","onChange","ariaLabel","label","labelContentLeft","labelContent","_ref$sliderAlign","sliderAlign","showScale","showRangeValues","showCurrentValue","hideMinValueDiff","hideMaxValueDiff","_ref$labelPlacement","labelPlacement","rangeValuesPlacementOld","rangeValuesPlacement","_ref$scaleAlign","scaleAlign","_ref$multipleStepSize","multipleStepSize","defaultValue","_ref$size","size","name","_ref$pointerSize","pointerSize","_ref$orientation","orientation","reversed","labelReversed","rest","_objectWithoutProperties","_excluded","isVertical","_useState","useState","handlePosition","stepSize","railFillWidth","_useState2","_slicedToArray","state","setState","innerRef","useRef","_useState3","_useState4","startOffset","setStartOffset","_useState5","_useState6","endOffset","setEndOffset","innerValue","_useState7","_useState8","dragValue","setDragValue","innerShowScale","hasLabelContent","Boolean","labelPlacementClass","classes","labelPlacementOuter","labelPlacementInner","scaleAlignClass","rangeValuesPlacementOuter","rangeValuesPlacementInner","hideMinValueDiffClass","hideMinValue","hideMaxValueDiffClass","hideMaxValue","verticalOrientationClass","verticalOrientation","startLabelRef","endLabelRef","activeFirstValue","activeRangeValue","undefined","activeSecondValue","useEffect","visibleValue","localValue","Math","_startLabelRef$curren","_endLabelRef$current","startWidth","current","offsetWidth","isNumber","Number","endWidth","prevState","_objectSpread","setStepSize","useCallback","newStepSize","onHandleChange","handleValue","data","newValue","round","newHandlePosition","y","x","target","onHandleChangeCommitted","lastY","lastX","labelVerticalPlacement","valuePlacement","settings","sizeData","React","createElement","SingleWrapper","className","cx","labelAlignLeft","labelAlignCenter","labelAlignRight","labelPlacementBottom","labelContentReversed","LabelWrapper","LabelContent","Label","SliderBaseWrapper","StyledRangeValue","ref","SliderBase","_extends","Handler","position","maxRangeValue","InputHidden","type","datatype","noop"],"mappings":";;;;;;;;;;;;;;IAeaA,YAAmC,GAAG,SAAtCA,YAAmCA,CAAAC,IAAA,EA6B1C;AAAA,EAAA,IAAAC,KAAA,CAAA;AAAA,EAAA,IA5BFC,GAAG,GAAAF,IAAA,CAAHE,GAAG;IACHC,GAAG,GAAAH,IAAA,CAAHG,GAAG;IACHC,KAAK,GAAAJ,IAAA,CAALI,KAAK;IACLC,QAAQ,GAAAL,IAAA,CAARK,QAAQ;IACRC,iBAAiB,GAAAN,IAAA,CAAjBM,iBAAiB;IACjBC,QAAQ,GAAAP,IAAA,CAARO,QAAQ;IACRC,SAAS,GAAAR,IAAA,CAATQ,SAAS;IACTC,KAAK,GAAAT,IAAA,CAALS,KAAK;IACLC,gBAAgB,GAAAV,IAAA,CAAhBU,gBAAgB;IAChBC,YAAY,GAAAX,IAAA,CAAZW,YAAY;IAAAC,gB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,WAAY;AAClBE,IAAAA,WAAW,EAAEA,WAAY;IACzBU,QAAQ,EAAEI,KAAK,CAACJ,QAAS;AACzBtC,IAAAA,iBAAiB,EAAE2G,uBAAwB;AAC3C1G,IAAAA,QAAQ,EAAEiG,cAAe;IACzBmC,QAAQ,EAAE3F,KAAK,CAACL,cAAe;AAC/BzC,IAAAA,GAAG,EAAEA,GAAI;AACTC,IAAAA,GAAG,EAAEA,GAAI;AACTmD,IAAAA,WAAW,EAAEA,WAAY;AACzBI,IAAAA,SAAS,EAAEA,SAAU;AACrBtD,IAAAA,KAAK,EAAE2D,SAAU;AACjB1D,IAAAA,QAAQ,EAAEA,QAAS;AACnBG,IAAAA,SAAS,EAAEA,SAAU;AACrBkB,IAAAA,gBAAgB,EAAEA,gBAAiB;AACnCV,IAAAA,gBAAgB,EAAEA,gBAAiB;AACnCqG,IAAAA,cAAc,EAAEA,cAAAA;GACnB,CACO,CAAC,EACZpD,cAAc,iBACXuD,KAAA,CAAAC,aAAA,CAACa,gBAAgB,EAAA;AACbC,IAAAA,GAAG,EAAErD,WAAY;IACjByC,SAAS,EAAEC,EAAE,CAACvD,OAAO,CAACuE,aAAa,EAAE/D,qBAAqB,EAAES,iBAAiB,CAAA;AAAE,GAAA,EAE9EnD,QAAQ,GAAGjC,GAAG,GAAGC,GACJ,CAEP,CAAC,eACpBqH,KAAA,CAAAC,aAAA,CAACoB,WAAW,EAAAJ,QAAA,CAAA;AACR3G,IAAAA,IAAI,EAAEA,IAAK;AACXgH,IAAAA,IAAI,EAAC,QAAQ;AACbC,IAAAA,QAAQ,EAAC,eAAe;AACxB3I,IAAAA,KAAK,EAAE2D,SAAU;AACjBwE,IAAAA,GAAG,EAAErF,QAAAA;GACD8F,EAAAA,IAAI,CACX,CACU,CAAC,CAAA;AAExB;;;;"}
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, noop } from '../../../../utils';\nimport { classes } from '../../Slider.tokens';\nimport { InputHidden } from '../SliderBase/SliderBase.styles';\nimport { FormTypeNumber } from '../../../../types/FormType';\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 defaultValue,\n size = 'm',\n name,\n ...rest\n}) => {\n const [state, setState] = useState({\n xHandle: 0,\n stepSize: 0,\n railFillWidth: 0,\n });\n\n const innerRef = useRef<HTMLInputElement>(null);\n\n const [startOffset, setStartOffset] = useState(0);\n const [endOffset, setEndOffset] = useState(0);\n\n const [dragValue, setDragValue] = useState(value ?? defaultValue ?? min);\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 && dragValue - min <= hideMinValueDiff ? classes.hideMinValue : '';\n const hideMaxValueDiffClass = hideMaxValueDiff && max - dragValue <= 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(dragValue, 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 }, [dragValue, 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 if (value !== undefined) {\n (onChange as (value: number) => void)(newValue);\n }\n\n if (name && !value) {\n (onChange as (event: FormTypeNumber) => void)({\n target: {\n value: newValue,\n name,\n },\n });\n }\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 <InputHidden\n name={name}\n type=\"number\"\n datatype=\"slider-single\"\n value={dragValue}\n ref={innerRef}\n {...noop}\n />\n </SingleWrapper>\n );\n};\n"],"names":["SingleSlider","_ref","_ref2","min","max","value","disabled","onChangeCommitted","onChange","ariaLabel","label","labelContentLeft","showRangeValues","showCurrentValue","hideMinValueDiff","hideMaxValueDiff","_ref$labelPlacement","labelPlacement","_ref$rangeValuesPlace","rangeValuesPlacement","_ref$multipleStepSize","multipleStepSize","defaultValue","_ref$size","size","name","rest","_objectWithoutProperties","_excluded","_useState","useState","xHandle","stepSize","railFillWidth","_useState2","_slicedToArray","state","setState","innerRef","useRef","_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","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","target","onHandleChangeCommitted","lastX","React","createElement","SingleWrapper","className","LabelWrapper","LabelContentLeft","Label","SliderBaseWrapper","StyledRangeValue","ref","cx","SliderBase","_extends","settings","sizeData","Handler","xPosition","maxRangeValue","InputHidden","type","datatype","noop"],"mappings":";;;;;;;;;;;;;IAsBaA,YAAmC,GAAG,SAAtCA,YAAmCA,CAAAC,IAAA,EAqB1C;AAAA,EAAA,IAAAC,KAAA,CAAA;AAAA,EAAA,IApBFC,GAAG,GAAAF,IAAA,CAAHE,GAAG;IACHC,GAAG,GAAAH,IAAA,CAAHG,GAAG;IACHC,KAAK,GAAAJ,IAAA,CAALI,KAAK;IACLC,QAAQ,GAAAL,IAAA,CAARK,QAAQ;IACRC,iBAAiB,GAAAN,IAAA,CAAjBM,iBAAiB;IACjBC,QAAQ,GAAAP,IAAA,CAARO,QAAQ;IACRC,SAAS,GAAAR,IAAA,CAATQ,SAAS;IACTC,KAAK,GAAAT,IAAA,CAALS,KAAK;IACLC,gBAAgB,GAAAV,IAAA,CAAhBU,gBAAgB;IAChBC,eAAe,GAAAX,IAAA,CAAfW,eAAe;IACfC,gBAAgB,GAAAZ,IAAA,CAAhBY,gBAAgB;IAChBC,gBAAgB,GAAAb,IAAA,CAAhBa,gBAAgB;IAChBC,gBAAgB,GAAAd,IAAA,CAAhBc,gBAAgB;IAAAC,mBAAA,GAAAf,IAAA,CAChBgB,cAAc;AAAdA,IAAAA,cAAc,GAAAD,mBAAA,KAAG,KAAA,CAAA,GAAA,OAAO,GAAAA,mBAAA;IAAAE,qBAAA,GAAAjB,IAAA,CACxBkB,oBAAoB;AAApBA,IAAAA,oBAAoB,GAAAD,qBAAA,KAAG,KAAA,CAAA,GAAA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,EAAA;AACbC,IAAAA,GAAG,EAAExC,WAAY;IACjBkC,SAAS,EAAEO,EAAE,CAACpD,OAAO,CAAC2D,aAAa,EAAEnD,qBAAqB,EAAEO,iBAAiB,CAAA;GAE5EjE,EAAAA,GACa,CAEP,CAAC,eACpB4F,KAAA,CAAAC,aAAA,CAACiB,WAAW,EAAAN,QAAA,CAAA;AACRnF,IAAAA,IAAI,EAAEA,IAAK;AACX0F,IAAAA,IAAI,EAAC,QAAQ;AACbC,IAAAA,QAAQ,EAAC,eAAe;AACxB/G,IAAAA,KAAK,EAAE6C,SAAU;AACjBuD,IAAAA,GAAG,EAAEnE,QAAAA;GACD+E,EAAAA,IAAI,CACX,CACU,CAAC,CAAA;AAExB;;;;"}
@@ -1,4 +1,4 @@
1
- import './Single.styles_1h7n2s2.css';
1
+ import './Single.styles_1r9f1e0.css';
2
2
  import { styled } from '@linaria/react';
3
3
 
4
4
  var LabelWrapper = /*#__PURE__*/styled('div')({
@@ -6,8 +6,8 @@ var LabelWrapper = /*#__PURE__*/styled('div')({
6
6
  "class": "l1p4kc08",
7
7
  propsAsIs: false
8
8
  });
9
- var LabelContent = /*#__PURE__*/styled('div')({
10
- name: "LabelContent",
9
+ var LabelContentLeft = /*#__PURE__*/styled('div')({
10
+ name: "LabelContentLeft",
11
11
  "class": "ly2gexi",
12
12
  propsAsIs: false
13
13
  });
@@ -32,5 +32,5 @@ var SingleWrapper = /*#__PURE__*/styled('div')({
32
32
  propsAsIs: false
33
33
  });
34
34
 
35
- export { Label, LabelContent, LabelWrapper, SingleWrapper, SliderBaseWrapper, StyledRangeValue };
35
+ export { Label, LabelContentLeft, LabelWrapper, SingleWrapper, SliderBaseWrapper, StyledRangeValue };
36
36
  //# sourceMappingURL=Single.styles.js.map
@@ -1 +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 LabelContent = styled.div`\n display: inline-flex;\n`;\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.valueFontFamily});\n font-size: var(${tokens.valueFontSize});\n font-style: var(${tokens.valueFontStyle});\n font-weight: var(${tokens.valueFontWeight});\n letter-spacing: var(${tokens.valueLetterSpacing});\n line-height: var(${tokens.valueLineHeight});\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: calc(var(${tokens.railThickness}) * -1.5 - 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.rangeValueHorizontalMargin});\n\n &.${classes.maxRangeValue} {\n margin-right: 0;\n margin-left: var(${tokens.rangeValueHorizontalMargin});\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 &.${classes.verticalOrientation} {\n flex-direction: column;\n align-items: center;\n\n &.${classes.labelAlignCenter} {\n ${LabelWrapper} {\n flex-direction: column-reverse;\n }\n\n &.${classes.labelPlacementBottom} {\n ${LabelWrapper} {\n flex-direction: column;\n }\n\n &.${classes.labelContentReversed} {\n ${LabelWrapper} {\n flex-direction: column-reverse;\n }\n }\n }\n\n &.${classes.labelContentReversed} {\n ${LabelWrapper} {\n flex-direction: column;\n }\n }\n }\n\n ${LabelWrapper} {\n align-items: center;\n }\n\n ${SliderBaseWrapper} {\n width: var(${tokens.size});\n }\n\n &.${classes.labelPlacementInner} {\n ${LabelWrapper} {\n margin-right: 0;\n margin-bottom: var(${tokens.labelWrapperVerticalMargin});\n }\n }\n\n &.${classes.labelAlignLeft} {\n align-items: flex-end;\n\n ${LabelWrapper} {\n flex-direction: row-reverse;\n }\n }\n\n &.${classes.labelAlignRight} {\n align-items: flex-start;\n }\n\n &.${classes.labelPlacementBottom} {\n flex-direction: column-reverse;\n\n ${LabelWrapper} {\n margin-top: var(${tokens.labelWrapperVerticalMargin});\n margin-right: 0;\n margin-bottom: 0;\n }\n }\n }\n\n &.${classes.verticalOrientation} {\n flex-direction: column;\n align-items: center;\n justify-content: center;\n\n ${SliderBaseWrapper} {\n flex-direction: column;\n align-items: center;\n justify-content: center;\n }\n\n &.${classes.labelAlignCenter} {\n ${StyledRangeValue} {\n position: static;\n bottom: 0;\n left: 0;\n margin-bottom: var(${tokens.rangeValueVerticalMargin});\n\n &.${classes.maxRangeValue} {\n left: 0;\n right: 0;\n bottom: 0;\n margin-top: var(${tokens.rangeValueVerticalMargin});\n margin-bottom: 0;\n }\n }\n }\n\n &.${classes.labelAlignLeft}, &.${classes.labelAlignRight} {\n ${StyledRangeValue} {\n margin-right: 0;\n margin-bottom: 0;\n position: absolute;\n top: 0;\n\n right: calc(\n var(${tokens.railThickness}) / 2 + var(${tokens.size}) / 2 +\n var(${tokens.rangeValueHorizontalOffset})\n );\n\n &.${classes.maxRangeValue} {\n margin-right: 0;\n margin-left: 0;\n top: auto;\n bottom: 0;\n }\n }\n }\n\n &.${classes.labelAlignRight} {\n ${StyledRangeValue} {\n left: calc(var(${tokens.size}) + var(${tokens.railThickness}));\n }\n }\n }\n`;\n"],"names":["LabelWrapper","styled","name","class","propsAsIs","LabelContent","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,YAAY,gBAAGJ,MAAM,CAAA,KAAA,CAAA,CAAA;AAAAC,EAAAA,IAAA,EAAA,cAAA;AAAAC,EAAAA,OAAAA,EAAA,SAAA;AAAAC,EAAAA,SAAA,EAAA,KAAA;AAAA,CAEjC,EAAA;AAEM,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,CA2IlC;;;;"}
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);}
@@ -1,5 +1,5 @@
1
- .SliderBase_styles_1qt1224_r33crq1__8fd7c64a{position:relative;top:50%;height:var(--plasma-slider-rail-thickness);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%);}
2
- .SliderBase_styles_1qt1224_snaoqfb__8fd7c64a{-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-size);}.SliderBase_styles_1qt1224_snaoqfb__8fd7c64a.SliderBase_styles_1qt1224_sliderVerticalOrientation__8fd7c64a{width:var(--plasma-slider-size);height:auto;}.SliderBase_styles_1qt1224_snaoqfb__8fd7c64a.SliderBase_styles_1qt1224_sliderVerticalOrientation__8fd7c64a .SliderBase_styles_1qt1224_r33crq1__8fd7c64a{top:0;left:50%;-webkit-transform:translateX(-50%);-ms-transform:translateX(-50%);transform:translateX(-50%);width:var(--plasma-slider-rail-thickness);height:100%;}
3
- .SliderBase_styles_1qt1224_r1bro5xo__8fd7c64a{height:100%;}
4
- .SliderBase_styles_1qt1224_fdg7yhg__8fd7c64a{position:absolute;height:100%;top:0;left:0;background:var(--plasma-slider-fill-color);width:0;}
5
- .SliderBase_styles_1qt1224_i17ya4q3__8fd7c64a{visibility:hidden;width:0;height:0;opacity:0;margin:0;padding:0;border:none;}
1
+ .SliderBase_styles_9s4eb3_s33crq1__d6fac54b{-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_9s4eb3_rnaoqfb__d6fac54b{height:100%;}
3
+ .SliderBase_styles_9s4eb3_r1bro5xo__d6fac54b{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_9s4eb3_fdg7yhg__d6fac54b{position:absolute;height:100%;top:0;left:0;background:var(--plasma-slider-fill-color);width:0;}
5
+ .SliderBase_styles_9s4eb3_i17ya4q3__d6fac54b{visibility:hidden;width:0;height:0;opacity:0;margin:0;padding:0;border:none;}
@@ -1,8 +1,6 @@
1
1
  import React, { useRef, useEffect } from 'react';
2
- import { useIsomorphicLayoutEffect } from '../../../../hooks/useIsomorphicLayoutEffect.js';
3
- import { classes } from '../../Slider.tokens.js';
4
- import { cx } from '../../../../utils/index.js';
5
2
  import { Slider, RailWrap, Rail, Fill } from './SliderBase.styles.js';
3
+ import { useIsomorphicLayoutEffect } from '../../../../hooks/useIsomorphicLayoutEffect.js';
6
4
 
7
5
  var SliderBase = function SliderBase(_ref) {
8
6
  var max = _ref.max,
@@ -16,9 +14,6 @@ var SliderBase = function SliderBase(_ref) {
16
14
  labelPlacement = _ref.labelPlacement,
17
15
  rangeValuesPlacement = _ref.rangeValuesPlacement,
18
16
  onChange = _ref.onChange,
19
- orientation = _ref.orientation,
20
- size = _ref.size,
21
- sliderAlign = _ref.sliderAlign,
22
17
  _ref$settings = _ref.settings,
23
18
  settings = _ref$settings === void 0 ? {} : _ref$settings;
24
19
  var _settings$indent = settings.indent,
@@ -27,43 +22,34 @@ var SliderBase = function SliderBase(_ref) {
27
22
  fontSizeMultiplier = _settings$fontSizeMul === void 0 ? 16 : _settings$fontSizeMul;
28
23
  var ref = useRef(null);
29
24
  var gap = indent * fontSizeMultiplier * 2;
30
- var isVertical = orientation === 'vertical';
31
25
  useEffect(function () {
32
26
  var resizeHandler = function resizeHandler() {
33
27
  if (ref.current) {
34
- var railSize = isVertical ? ref.current.offsetHeight - gap : ref.current.offsetWidth - gap;
28
+ var railSize = ref.current.offsetWidth - gap;
35
29
  var totalSteps = max - min;
36
30
  setStepSize(railSize / totalSteps);
37
31
  }
38
32
  };
39
33
  resizeHandler();
40
- }, [labelPlacement, rangeValuesPlacement, gap, isVertical,
41
- // для перерасчета размеров
42
- size, sliderAlign]);
34
+ }, [labelPlacement, rangeValuesPlacement]);
43
35
  var onHandleChange = function onHandleChange(e) {
44
36
  if (!onChange || disabled) {
45
37
  return;
46
38
  }
47
39
  var _e$currentTarget$getB = e.currentTarget.getBoundingClientRect(),
48
40
  x = _e$currentTarget$getB.x,
49
- width = _e$currentTarget$getB.width,
50
- y = _e$currentTarget$getB.y,
51
- height = _e$currentTarget$getB.height;
52
- var lastPos = isVertical ? e.clientY - y : e.clientX - x;
53
- var sliderWidth = isVertical ? height : width;
54
- var position = min + lastPos / (sliderWidth - gap) * (max - min);
41
+ width = _e$currentTarget$getB.width;
42
+ var lastX = e.clientX - x;
43
+ var position = min + lastX / (width - gap) * (max - min);
55
44
  var result = Math.max(min, Math.min(max, position));
56
- var data = isVertical ? {
57
- lastY: lastPos
58
- } : {
59
- lastX: lastPos
60
- };
61
- onChange(result, data);
45
+ onChange(result, {
46
+ lastX: lastX
47
+ });
62
48
  };
63
49
  useIsomorphicLayoutEffect(function () {
64
50
  var resizeHandler = function resizeHandler() {
65
51
  if (ref.current) {
66
- var railSize = isVertical ? ref.current.offsetHeight - gap : ref.current.offsetWidth - gap;
52
+ var railSize = ref.current.offsetWidth - gap;
67
53
  var totalSteps = max - min;
68
54
  setStepSize(railSize / totalSteps);
69
55
  }
@@ -73,18 +59,13 @@ var SliderBase = function SliderBase(_ref) {
73
59
  return function () {
74
60
  return window.removeEventListener('resize', resizeHandler);
75
61
  };
76
- }, [min, max, setStepSize, gap, labelPlacement, rangeValuesPlacement, isVertical]);
77
- var fillStyle = isVertical ? {
78
- top: "".concat(railFillXPosition, "px"),
79
- height: "".concat(railFillWidth, "px"),
80
- width: '100%'
81
- } : {
62
+ }, [min, max, setStepSize, gap, labelPlacement, rangeValuesPlacement]);
63
+ var fillStyle = {
82
64
  left: "".concat(railFillXPosition, "px"),
83
65
  width: "".concat(railFillWidth, "px")
84
66
  };
85
67
  return /*#__PURE__*/React.createElement(Slider, {
86
- ref: ref,
87
- className: cx(orientation === 'vertical' && classes.verticalOrientation)
68
+ ref: ref
88
69
  }, /*#__PURE__*/React.createElement(RailWrap, {
89
70
  "aria-hidden": "true",
90
71
  onMouseDown: onHandleChange
@@ -1 +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';\nimport { classes } from '../../Slider.tokens';\nimport { cx } from '../../../../utils';\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 orientation,\n size,\n sliderAlign,\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 const isVertical = orientation === 'vertical';\n\n useEffect(() => {\n const resizeHandler = () => {\n if (ref.current) {\n const railSize = isVertical ? ref.current.offsetHeight - gap : ref.current.offsetWidth - gap;\n const totalSteps = max - min;\n\n setStepSize(railSize / totalSteps);\n }\n };\n\n resizeHandler();\n }, [\n labelPlacement,\n rangeValuesPlacement,\n gap,\n isVertical,\n // для перерасчета размеров\n size,\n sliderAlign,\n ]);\n\n const onHandleChange: MouseEventHandler<HTMLDivElement> = (e) => {\n if (!onChange || disabled) {\n return;\n }\n\n const { x, width, y, height } = e.currentTarget.getBoundingClientRect();\n\n const lastPos = isVertical ? e.clientY - y : e.clientX - x;\n const sliderWidth = isVertical ? height : width;\n\n const position = min + (lastPos / (sliderWidth - gap)) * (max - min);\n const result = Math.max(min, Math.min(max, position));\n\n const data = isVertical ? { lastY: lastPos } : { lastX: lastPos };\n onChange(result, (data as unknown) as DraggableData);\n };\n\n useIsomorphicLayoutEffect(() => {\n const resizeHandler = () => {\n if (ref.current) {\n const railSize = isVertical ? ref.current.offsetHeight - gap : 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, gap, labelPlacement, rangeValuesPlacement, isVertical]);\n\n const fillStyle = isVertical\n ? { top: `${railFillXPosition}px`, height: `${railFillWidth}px`, width: '100%' }\n : { left: `${railFillXPosition}px`, width: `${railFillWidth}px` };\n\n return (\n <Slider ref={ref} className={cx(orientation === 'vertical' && classes.verticalOrientation)}>\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","orientation","size","sliderAlign","_ref$settings","settings","_settings$indent","indent","_settings$fontSizeMul","fontSizeMultiplier","ref","useRef","gap","isVertical","useEffect","resizeHandler","current","railSize","offsetHeight","offsetWidth","totalSteps","onHandleChange","e","_e$currentTarget$getB","currentTarget","getBoundingClientRect","x","width","y","height","lastPos","clientY","clientX","sliderWidth","position","result","Math","data","lastY","lastX","useIsomorphicLayoutEffect","window","addEventListener","removeEventListener","fillStyle","top","concat","left","React","createElement","Slider","className","cx","classes","verticalOrientation","RailWrap","onMouseDown","Rail","Fill","style"],"mappings":";;;;;;IAUaA,UAAwD,GAAG,SAA3DA,UAAwDA,CAAAC,IAAA,EAe/D;AAAA,EAAA,IAdFC,GAAG,GAAAD,IAAA,CAAHC,GAAG;IACHC,GAAG,GAAAF,IAAA,CAAHE,GAAG;IACHC,WAAW,GAAAH,IAAA,CAAXG,WAAW;IACXC,aAAa,GAAAJ,IAAA,CAAbI,aAAa;IACbC,QAAQ,GAAAL,IAAA,CAARK,QAAQ;IAAAC,qBAAA,GAAAN,IAAA,CACRO,iBAAiB;AAAjBA,IAAAA,iBAAiB,GAAAD,qBAAA,KAAG,KAAA,CAAA,GAAA,CAAC,GAAAA,qBAAA;IACrBE,QAAQ,GAAAR,IAAA,CAARQ,QAAQ;IACRC,cAAc,GAAAT,IAAA,CAAdS,cAAc;IACdC,oBAAoB,GAAAV,IAAA,CAApBU,oBAAoB;IACpBC,QAAQ,GAAAX,IAAA,CAARW,QAAQ;IACRC,WAAW,GAAAZ,IAAA,CAAXY,WAAW;IACXC,IAAI,GAAAb,IAAA,CAAJa,IAAI;IACJC,WAAW,GAAAd,IAAA,CAAXc,WAAW;IAAAC,aAAA,GAAAf,IAAA,CACXgB,QAAQ;AAARA,IAAAA,QAAQ,GAAAD,aAAA,KAAA,KAAA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T,KAAA,CAAAC,aAAA,CAACS,IAAI,EAAA;AAACC,IAAAA,KAAK,EAAEf,SAAAA;AAAU,GAAE,CACvB,CACA,CAAC,EAEVlD,QACG,CAAC,CAAA;AAEjB;;;;"}
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]);\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, 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,QAAQ,GAAAL,IAAA,CAARK,QAAQ;IAAAC,qBAAA,GAAAN,IAAA,CACRO,iBAAiB;AAAjBA,IAAAA,iBAAiB,GAAAD,qBAAA,KAAG,KAAA,CAAA,GAAA,CAAC,GAAAA,qBAAA;IACrBE,QAAQ,GAAAR,IAAA,CAARQ,QAAQ;IACRC,cAAc,GAAAT,IAAA,CAAdS,cAAc;IACdC,oBAAoB,GAAAV,IAAA,CAApBU,oBAAoB;IACpBC,QAAQ,GAAAX,IAAA,CAARW,QAAQ;IAAAC,aAAA,GAAAZ,IAAA,CACRa,QAAQ;AAARA,IAAAA,QAAQ,GAAAD,aAAA,KAAA,KAAA,CAAA,G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,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;;;;"}
@@ -1,18 +1,18 @@
1
- import './SliderBase.styles_1qt1224.css';
1
+ import './SliderBase.styles_9s4eb3.css';
2
2
  import { styled } from '@linaria/react';
3
3
 
4
- var Rail = /*#__PURE__*/styled('div')({
5
- name: "Rail",
6
- "class": "r33crq1",
7
- propsAsIs: false
8
- });
9
4
  var Slider = /*#__PURE__*/styled('div')({
10
5
  name: "Slider",
11
- "class": "snaoqfb",
6
+ "class": "s33crq1",
12
7
  propsAsIs: false
13
8
  });
14
9
  var RailWrap = /*#__PURE__*/styled('div')({
15
10
  name: "RailWrap",
11
+ "class": "rnaoqfb",
12
+ propsAsIs: false
13
+ });
14
+ var Rail = /*#__PURE__*/styled('div')({
15
+ name: "Rail",
16
16
  "class": "r1bro5xo",
17
17
  propsAsIs: false
18
18
  });
@@ -1 +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 { applyHidden } from '../../../../mixins';\nimport { classes, tokens } from '../../Slider.tokens';\n\nexport const Rail = styled.div`\n position: relative;\n top: 50%;\n\n height: var(${tokens.railThickness});\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 Slider = styled.div`\n flex: 1;\n position: relative;\n user-select: none;\n height: var(${tokens.size});\n\n &.${classes.verticalOrientation} {\n width: var(${tokens.size});\n height: auto;\n\n ${Rail} {\n top: 0;\n left: 50%;\n transform: translateX(-50%);\n width: var(${tokens.railThickness});\n height: 100%;\n }\n }\n`;\n\nexport const RailWrap = styled.div`\n height: 100%;\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\nexport const InputHidden = styled.input`\n ${applyHidden()};\n`;\n"],"names":["Rail","styled","name","class","propsAsIs","Slider","RailWrap","Fill","InputHidden"],"mappings":";;AAKO,IAAMA,IAAI,gBAAGC,MAAM,CAAA,KAAA,CAAA,CAAA;AAAAC,EAAAA,IAAA,EAAA,MAAA;AAAAC,EAAAA,OAAAA,EAAA,SAAA;AAAAC,EAAAA,SAAA,EAAA,KAAA;AAAA,CAWzB,EAAA;AAEM,IAAMC,MAAM,gBAAGJ,MAAM,CAAA,KAAA,CAAA,CAAA;AAAAC,EAAAA,IAAA,EAAA,QAAA;AAAAC,EAAAA,OAAAA,EAAA,SAAA;AAAAC,EAAAA,SAAA,EAAA,KAAA;AAAA,CAkB3B,EAAA;AAEM,IAAME,QAAQ,gBAAGL,MAAM,CAAA,KAAA,CAAA,CAAA;AAAAC,EAAAA,IAAA,EAAA,UAAA;AAAAC,EAAAA,OAAAA,EAAA,UAAA;AAAAC,EAAAA,SAAA,EAAA,KAAA;AAAA,CAE7B,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,EAAA;AAEM,IAAMI,WAAW,gBAAGP,MAAM,CAAA,OAAA,CAAA,CAAA;AAAAC,EAAAA,IAAA,EAAA,aAAA;AAAAC,EAAAA,OAAAA,EAAA,UAAA;AAAAC,EAAAA,SAAA,EAAA,KAAA;AAAA,CAEhC;;;;"}
1
+ {"version":3,"file":"SliderBase.styles.js","sources":["../../../../../src/components/Slider/components/SliderBase/SliderBase.styles.ts"],"sourcesContent":["import { styled } from '@linaria/react';\n\nimport { applyHidden } from '../../../../mixins';\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\nexport const InputHidden = styled.input`\n ${applyHidden()};\n`;\n"],"names":["Slider","styled","name","class","propsAsIs","RailWrap","Rail","Fill","InputHidden"],"mappings":";;AAKO,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,EAAA;AAEM,IAAMI,WAAW,gBAAGP,MAAM,CAAA,OAAA,CAAA,CAAA;AAAAC,EAAAA,IAAA,EAAA,aAAA;AAAAC,EAAAA,OAAAA,EAAA,UAAA;AAAAC,EAAAA,SAAA,EAAA,KAAA;AAAA,CAEhC;;;;"}
@@ -0,0 +1,5 @@
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;}
5
+ .i17ya4q3{visibility:hidden;width:0;height:0;opacity:0;margin:0;padding:0;border:none;}