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

Sign up to get free protection for your applications and to get access to all the features.
Files changed (732) 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.js +4 -10
  59. package/cjs/components/Combobox/ComboboxOld/Combobox.js.map +1 -1
  60. package/cjs/components/Combobox/ComboboxOld/Combobox.styles.js +0 -1
  61. package/cjs/components/Combobox/ComboboxOld/Combobox.styles.js.map +1 -1
  62. package/cjs/components/Combobox/ComboboxOld/hooks/useFocusController.js +0 -1
  63. package/cjs/components/Combobox/ComboboxOld/hooks/useFocusController.js.map +1 -1
  64. package/cjs/components/Combobox/ComboboxOld/ui/ComboboxChip/ComboboxChip.styles.js +1 -2
  65. package/cjs/components/Combobox/ComboboxOld/ui/ComboboxChip/ComboboxChip.styles.js.map +1 -1
  66. package/cjs/components/Combobox/ComboboxOld/ui/ComboboxDivider/ComboboxDivider.js +1 -10
  67. package/cjs/components/Combobox/ComboboxOld/ui/ComboboxDivider/ComboboxDivider.js.map +1 -1
  68. package/cjs/components/Combobox/ComboboxOld/ui/ComboboxFooter/ComboboxFooter.js +1 -10
  69. package/cjs/components/Combobox/ComboboxOld/ui/ComboboxFooter/ComboboxFooter.js.map +1 -1
  70. package/cjs/components/Combobox/ComboboxOld/ui/ComboboxGroup/ComboboxGroup.js +1 -10
  71. package/cjs/components/Combobox/ComboboxOld/ui/ComboboxGroup/ComboboxGroup.js.map +1 -1
  72. package/cjs/components/Combobox/ComboboxOld/ui/ComboboxHeader/ComboboxHeader.js +1 -10
  73. package/cjs/components/Combobox/ComboboxOld/ui/ComboboxHeader/ComboboxHeader.js.map +1 -1
  74. package/cjs/components/Combobox/ComboboxOld/ui/ComboboxItem/ComboboxItem.styles.js +0 -2
  75. package/cjs/components/Combobox/ComboboxOld/ui/ComboboxItem/ComboboxItem.styles.js.map +1 -1
  76. package/cjs/components/Combobox/ComboboxOld/ui/ComboboxTarget/ComboboxTarget.js +1 -1
  77. package/cjs/components/Combobox/ComboboxOld/ui/ComboboxTarget/ComboboxTarget.styles.js +1 -2
  78. package/cjs/components/Combobox/ComboboxOld/ui/ComboboxTarget/ComboboxTarget.styles.js.map +1 -1
  79. package/cjs/components/DatePicker/DatePickerBase.styles.js +1 -7
  80. package/cjs/components/DatePicker/DatePickerBase.styles.js.map +1 -1
  81. package/cjs/components/DatePicker/RangeDate/RangeDate.js +1 -1
  82. package/cjs/components/DatePicker/RangeDate/RangeDate.styles.js +0 -1
  83. package/cjs/components/DatePicker/RangeDate/RangeDate.styles.js.map +1 -1
  84. package/cjs/components/DatePicker/RangeDate/RangeDatePopover/RangeDatePopover.js +1 -2
  85. package/cjs/components/DatePicker/RangeDate/RangeDatePopover/RangeDatePopover.js.map +1 -1
  86. package/cjs/components/DatePicker/RangeDate/RangeDatePopover/RangeDatePopover.styles.js +2 -5
  87. package/cjs/components/DatePicker/RangeDate/RangeDatePopover/RangeDatePopover.styles.js.map +1 -1
  88. package/cjs/components/DatePicker/SingleDate/SingleDate.styles.js +0 -1
  89. package/cjs/components/DatePicker/SingleDate/SingleDate.styles.js.map +1 -1
  90. package/cjs/components/Drawer/Drawer.js +5 -10
  91. package/cjs/components/Drawer/Drawer.js.map +1 -1
  92. package/cjs/components/Drawer/Drawer.styles.js +0 -4
  93. package/cjs/components/Drawer/Drawer.styles.js.map +1 -1
  94. package/cjs/components/Drawer/hooks/useDrawer.js +0 -4
  95. package/cjs/components/Drawer/hooks/useDrawer.js.map +1 -1
  96. package/cjs/components/Drawer/ui/DrawerContent/DrawerContent.js +0 -7
  97. package/cjs/components/Drawer/ui/DrawerContent/DrawerContent.js.map +1 -1
  98. package/cjs/components/Drawer/ui/DrawerFooter/DrawerFooter.js +0 -7
  99. package/cjs/components/Drawer/ui/DrawerFooter/DrawerFooter.js.map +1 -1
  100. package/cjs/components/Drawer/ui/DrawerHeader/DrawerHeader.js +0 -3
  101. package/cjs/components/Drawer/ui/DrawerHeader/DrawerHeader.js.map +1 -1
  102. package/cjs/components/Dropdown/Dropdown.js +3 -10
  103. package/cjs/components/Dropdown/Dropdown.js.map +1 -1
  104. package/cjs/components/Dropdown/Dropdown.styles.js +2 -3
  105. package/cjs/components/Dropdown/Dropdown.styles.js.map +1 -1
  106. package/cjs/components/Dropdown/ui/DropdownInner/DropdownInner.js +1 -9
  107. package/cjs/components/Dropdown/ui/DropdownInner/DropdownInner.js.map +1 -1
  108. package/cjs/components/Dropdown/ui/DropdownItem/DropdownItem.js +1 -2
  109. package/cjs/components/Dropdown/ui/DropdownItem/DropdownItem.js.map +1 -1
  110. package/cjs/components/Dropdown/ui/DropdownItemOld/DropdownItem.styles.js +0 -2
  111. package/cjs/components/Dropdown/ui/DropdownItemOld/DropdownItem.styles.js.map +1 -1
  112. package/cjs/components/Dropdown/ui/DropdownOld/Dropdown.styles.js +0 -1
  113. package/cjs/components/Dropdown/ui/DropdownOld/Dropdown.styles.js.map +1 -1
  114. package/cjs/components/Editable/Editable.js +3 -4
  115. package/cjs/components/Editable/Editable.js.map +1 -1
  116. package/cjs/components/Editable/utils/clearSelection.js +0 -2
  117. package/cjs/components/Editable/utils/clearSelection.js.map +1 -1
  118. package/cjs/components/Editable/utils/selectText.js +0 -2
  119. package/cjs/components/Editable/utils/selectText.js.map +1 -1
  120. package/cjs/components/EmptyState/EmptyState.styles.js +1 -2
  121. package/cjs/components/EmptyState/EmptyState.styles.js.map +1 -1
  122. package/cjs/components/IconButton/IconButton.js +1 -1
  123. package/cjs/components/IconButton/IconButton.styles.js +0 -8
  124. package/cjs/components/IconButton/IconButton.styles.js.map +1 -1
  125. package/cjs/components/Modal/Modal.js +6 -8
  126. package/cjs/components/Modal/Modal.js.map +1 -1
  127. package/cjs/components/Modal/hooks/useModal.js +0 -4
  128. package/cjs/components/Modal/hooks/useModal.js.map +1 -1
  129. package/cjs/components/Notification/Notification.styles.js +2 -3
  130. package/cjs/components/Notification/Notification.styles.js.map +1 -1
  131. package/cjs/components/Notification/NotificationsPortal.js +3 -4
  132. package/cjs/components/Notification/NotificationsPortal.js.map +1 -1
  133. package/cjs/components/Pagination/Pagination.styles.js +1 -2
  134. package/cjs/components/Pagination/Pagination.styles.js.map +1 -1
  135. package/cjs/components/Pagination/ui/PaginationSelectPerPage/PaginationSelectPerPage.styles.js +1 -2
  136. package/cjs/components/Pagination/ui/PaginationSelectPerPage/PaginationSelectPerPage.styles.js.map +1 -1
  137. package/cjs/components/Panel/ui/PanelHeader/PanelHeader.js +1 -2
  138. package/cjs/components/Panel/ui/PanelHeader/PanelHeader.js.map +1 -1
  139. package/cjs/components/Panel/ui/PanelHeader/PanelHeader.styles.js +1 -2
  140. package/cjs/components/Panel/ui/PanelHeader/PanelHeader.styles.js.map +1 -1
  141. package/cjs/components/Popover/Popover.js +1 -1
  142. package/cjs/components/Popup/Popup.js +2 -2
  143. package/cjs/components/Popup/PopupContext.js +1 -1
  144. package/cjs/components/Range/Range.styles.js +0 -1
  145. package/cjs/components/Range/Range.styles.js.map +1 -1
  146. package/cjs/components/Segment/ui/SegmentGroup/SegmentGroup.js +4 -5
  147. package/cjs/components/Segment/ui/SegmentGroup/SegmentGroup.js.map +1 -1
  148. package/cjs/components/Select/Select.js +11 -12
  149. package/cjs/components/Select/Select.js.map +1 -1
  150. package/cjs/components/Select/Select.styles.js +2 -5
  151. package/cjs/components/Select/Select.styles.js.map +1 -1
  152. package/cjs/components/Select/hooks/usePathMaps.js +0 -2
  153. package/cjs/components/Select/hooks/usePathMaps.js.map +1 -1
  154. package/cjs/components/Select/ui/Inner/Inner.js +1 -2
  155. package/cjs/components/Select/ui/Inner/Inner.js.map +1 -1
  156. package/cjs/components/Select/ui/Inner/ui/Item/Item.js +4 -5
  157. package/cjs/components/Select/ui/Inner/ui/Item/Item.js.map +1 -1
  158. package/cjs/components/Select/ui/Inner/ui/Item/Item.styles.js +0 -1
  159. package/cjs/components/Select/ui/Inner/ui/Item/Item.styles.js.map +1 -1
  160. package/cjs/components/Select/ui/Target/ui/Button/Button.js +1 -1
  161. package/cjs/components/Select/ui/Target/ui/Button/Button.styles.js +1 -3
  162. package/cjs/components/Select/ui/Target/ui/Button/Button.styles.js.map +1 -1
  163. package/cjs/components/Select/ui/Target/ui/Textfield/Textfield.js +2 -2
  164. package/cjs/components/Select/ui/Target/ui/Textfield/Textfield.styles.js +1 -4
  165. package/cjs/components/Select/ui/Target/ui/Textfield/Textfield.styles.js.map +1 -1
  166. package/cjs/components/Select/ui/Target/ui/Textfield/ui/Chip/Chip.styles.js +1 -2
  167. package/cjs/components/Select/ui/Target/ui/Textfield/ui/Chip/Chip.styles.js.map +1 -1
  168. package/cjs/components/Select/utils/getButtonLabel.js +0 -2
  169. package/cjs/components/Select/utils/getButtonLabel.js.map +1 -1
  170. package/cjs/components/Sheet/Sheet.js +3 -3
  171. package/cjs/components/Skeleton/LineSkeleton/LineSkeleton.js +2 -4
  172. package/cjs/components/Skeleton/LineSkeleton/LineSkeleton.js.map +1 -1
  173. package/cjs/components/Skeleton/RectSkeleton/RectSkeleton.js +2 -4
  174. package/cjs/components/Skeleton/RectSkeleton/RectSkeleton.js.map +1 -1
  175. package/cjs/components/Slider/Slider.css +13 -15
  176. package/cjs/components/Slider/Slider.js +2 -18
  177. package/cjs/components/Slider/Slider.js.map +1 -1
  178. package/cjs/components/Slider/Slider.tokens.js +17 -23
  179. package/cjs/components/Slider/Slider.tokens.js.map +1 -1
  180. package/cjs/components/Slider/components/Double/Double.css +8 -8
  181. package/cjs/components/Slider/components/Double/Double.js +24 -60
  182. package/cjs/components/Slider/components/Double/Double.js.map +1 -1
  183. package/cjs/components/Slider/components/Double/Double.styles.js +0 -1
  184. package/cjs/components/Slider/components/Double/Double.styles.js.map +1 -1
  185. package/cjs/components/Slider/components/DoubleUncontrolled/DoubleUncontrolled.js +0 -3
  186. package/cjs/components/Slider/components/DoubleUncontrolled/DoubleUncontrolled.js.map +1 -1
  187. package/cjs/components/Slider/components/Single/Single.css +14 -14
  188. package/cjs/components/Slider/components/Single/Single.js +34 -66
  189. package/cjs/components/Slider/components/Single/Single.js.map +1 -1
  190. package/cjs/components/Slider/components/Single/Single.styles.js +4 -4
  191. package/cjs/components/Slider/components/Single/Single.styles.js.map +1 -1
  192. package/cjs/components/Slider/components/Single/Single.styles_1r9f1e0.css +6 -0
  193. package/cjs/components/Slider/components/SliderBase/SliderBase.css +5 -5
  194. package/cjs/components/Slider/components/SliderBase/SliderBase.js +13 -32
  195. package/cjs/components/Slider/components/SliderBase/SliderBase.js.map +1 -1
  196. package/cjs/components/Slider/components/SliderBase/SliderBase.styles.js +7 -7
  197. package/cjs/components/Slider/components/SliderBase/SliderBase.styles.js.map +1 -1
  198. package/cjs/components/Slider/components/SliderBase/SliderBase.styles_9s4eb3.css +5 -0
  199. package/cjs/components/Slider/ui/Handler/Handler.css +3 -3
  200. package/cjs/components/Slider/ui/Handler/Handler.js +88 -49
  201. package/cjs/components/Slider/ui/Handler/Handler.js.map +1 -1
  202. package/cjs/components/Slider/ui/Handler/Handler.styles.js +7 -17
  203. package/cjs/components/Slider/ui/Handler/Handler.styles.js.map +1 -1
  204. package/cjs/components/Slider/ui/Handler/Handler.styles_8crx5z.css +2 -0
  205. package/cjs/components/Slider/ui/Thumb/Thumb.css +1 -1
  206. package/cjs/components/Slider/ui/Thumb/Thumb.js +2 -3
  207. package/cjs/components/Slider/ui/Thumb/Thumb.js.map +1 -1
  208. package/cjs/components/Slider/ui/Thumb/Thumb.styles.js +1 -1
  209. package/cjs/components/Slider/ui/Thumb/Thumb.styles.js.map +1 -1
  210. package/cjs/components/Slider/ui/Thumb/Thumb.styles_4w4gzn.css +1 -0
  211. package/cjs/components/Slider/utils/index.js +10 -28
  212. package/cjs/components/Slider/utils/index.js.map +1 -1
  213. package/cjs/components/Slider/variations/_view/base.js +1 -1
  214. package/cjs/components/Slider/variations/_view/base.js.map +1 -1
  215. package/cjs/components/Slider/variations/_view/base_x642ct.css +1 -0
  216. package/cjs/components/Steps/Steps.js +1 -1
  217. package/cjs/components/Steps/ui/StepItem/StepItem.styles.js +0 -1
  218. package/cjs/components/Steps/ui/StepItem/StepItem.styles.js.map +1 -1
  219. package/cjs/components/Tabs/ui/horizontal/HorizontalTabs/HorizontalTabs.js +2 -3
  220. package/cjs/components/Tabs/ui/horizontal/HorizontalTabs/HorizontalTabs.js.map +1 -1
  221. package/cjs/components/Tabs/ui/vertical/VerticalTabs/VerticalTabs.js +2 -3
  222. package/cjs/components/Tabs/ui/vertical/VerticalTabs/VerticalTabs.js.map +1 -1
  223. package/cjs/components/TextArea/TextArea.js +2 -2
  224. package/cjs/components/TextArea/TextArea.styles.js +2 -3
  225. package/cjs/components/TextArea/TextArea.styles.js.map +1 -1
  226. package/cjs/components/TextArea/ui/Hint/Hint.js +1 -2
  227. package/cjs/components/TextArea/ui/Hint/Hint.js.map +1 -1
  228. package/cjs/components/TextField/TextField.js +3 -3
  229. package/cjs/components/TextField/TextField.styles.js +1 -2
  230. package/cjs/components/TextField/TextField.styles.js.map +1 -1
  231. package/cjs/components/TextField/ui/Hint/Hint.js +1 -2
  232. package/cjs/components/TextField/ui/Hint/Hint.js.map +1 -1
  233. package/cjs/components/TextField/ui/TextFieldChip/TextFieldChip.styles.js +1 -2
  234. package/cjs/components/TextField/ui/TextFieldChip/TextFieldChip.styles.js.map +1 -1
  235. package/cjs/components/Toast/Toast.styles.js +1 -1
  236. package/cjs/components/Toast/ToastController.js +1 -1
  237. package/cjs/components/Toast/utils.js +1 -2
  238. package/cjs/components/Toast/utils.js.map +1 -1
  239. package/cjs/components/Toolbar/ui/ToolbarDivider/ToolbarDivider.js +1 -1
  240. package/cjs/components/Tooltip/Tooltip.js +2 -3
  241. package/cjs/components/Tooltip/Tooltip.js.map +1 -1
  242. package/cjs/components/ViewContainer/ViewContainer.js +38 -0
  243. package/cjs/components/ViewContainer/ViewContainer.js.map +1 -0
  244. package/cjs/components/ViewContainer/ViewContainer_yiqfcb.css +1 -0
  245. package/cjs/components/ViewContainer/_view/base.js +9 -0
  246. package/cjs/components/ViewContainer/_view/base.js.map +1 -0
  247. package/cjs/components/ViewContainer/_view/base_x642ct.css +1 -0
  248. package/cjs/engines/index.js +0 -2
  249. package/cjs/engines/index.js.map +1 -1
  250. package/cjs/hooks/useIsomorphicLayoutEffect.js +0 -1
  251. package/cjs/hooks/useIsomorphicLayoutEffect.js.map +1 -1
  252. package/cjs/index.css +15 -15
  253. package/cjs/index.js +51 -51
  254. package/cjs/utils/index.js +0 -5
  255. package/cjs/utils/index.js.map +1 -1
  256. package/emotion/cjs/components/Slider/Slider.js +2 -10
  257. package/emotion/cjs/components/Slider/Slider.template-doc.mdx +0 -26
  258. package/emotion/cjs/components/Slider/Slider.tokens.js +17 -23
  259. package/emotion/cjs/components/Slider/components/Double/Double.js +19 -54
  260. package/emotion/cjs/components/Slider/components/Single/Single.js +33 -64
  261. package/emotion/cjs/components/Slider/components/Single/Single.styles.js +9 -18
  262. package/emotion/cjs/components/Slider/components/SliderBase/SliderBase.js +12 -31
  263. package/emotion/cjs/components/Slider/components/SliderBase/SliderBase.styles.js +10 -10
  264. package/emotion/cjs/components/Slider/ui/Handler/Handler.js +88 -52
  265. package/emotion/cjs/components/Slider/ui/Handler/Handler.styles.js +15 -9
  266. package/emotion/cjs/components/Slider/ui/Thumb/Thumb.js +2 -3
  267. package/emotion/cjs/components/Slider/ui/Thumb/Thumb.styles.js +3 -3
  268. package/emotion/cjs/components/Slider/utils/index.js +10 -28
  269. package/emotion/cjs/components/Slider/variations/_view/base.js +1 -2
  270. package/emotion/cjs/components/ViewContainer/ViewContainer.js +49 -0
  271. package/emotion/cjs/components/ViewContainer/ViewContainer.template-doc.mdx +82 -0
  272. package/emotion/cjs/components/ViewContainer/_view/base.js +8 -0
  273. package/emotion/cjs/components/ViewContainer/_view/tokens.json +1 -0
  274. package/emotion/cjs/components/ViewContainer/index.js +18 -0
  275. package/emotion/cjs/examples/_helpers.js +3 -14
  276. package/emotion/cjs/examples/plasma_b2c/components/Slider/Slider.config.js +7 -7
  277. package/emotion/cjs/examples/plasma_b2c/components/Slider/Slider.stories.tsx +16 -90
  278. package/emotion/cjs/examples/plasma_b2c/components/ViewContainer/ViewContainer.config.js +16 -0
  279. package/emotion/cjs/examples/plasma_b2c/components/ViewContainer/ViewContainer.js +11 -0
  280. package/emotion/cjs/examples/plasma_b2c/components/ViewContainer/ViewContainer.stories.tsx +65 -0
  281. package/emotion/cjs/examples/plasma_web/components/Slider/Slider.config.js +7 -7
  282. package/emotion/cjs/examples/plasma_web/components/Slider/Slider.stories.tsx +15 -90
  283. package/emotion/cjs/examples/plasma_web/components/ViewContainer/ViewContainer.config.js +16 -0
  284. package/emotion/cjs/examples/plasma_web/components/ViewContainer/ViewContainer.js +11 -0
  285. package/emotion/cjs/examples/plasma_web/components/ViewContainer/ViewContainer.stories.tsx +65 -0
  286. package/emotion/cjs/index.js +11 -0
  287. package/emotion/es/components/Slider/Slider.js +2 -11
  288. package/emotion/es/components/Slider/Slider.template-doc.mdx +0 -26
  289. package/emotion/es/components/Slider/Slider.tokens.js +17 -23
  290. package/emotion/es/components/Slider/components/Double/Double.js +19 -54
  291. package/emotion/es/components/Slider/components/Single/Single.js +34 -65
  292. package/emotion/es/components/Slider/components/Single/Single.styles.js +8 -17
  293. package/emotion/es/components/Slider/components/SliderBase/SliderBase.js +12 -31
  294. package/emotion/es/components/Slider/components/SliderBase/SliderBase.styles.js +11 -11
  295. package/emotion/es/components/Slider/ui/Handler/Handler.js +86 -51
  296. package/emotion/es/components/Slider/ui/Handler/Handler.styles.js +16 -10
  297. package/emotion/es/components/Slider/ui/Thumb/Thumb.js +2 -3
  298. package/emotion/es/components/Slider/ui/Thumb/Thumb.styles.js +3 -3
  299. package/emotion/es/components/Slider/utils/index.js +10 -28
  300. package/emotion/es/components/Slider/variations/_view/base.js +1 -2
  301. package/emotion/es/components/ViewContainer/ViewContainer.js +40 -0
  302. package/emotion/es/components/ViewContainer/ViewContainer.template-doc.mdx +82 -0
  303. package/emotion/es/components/ViewContainer/_view/base.js +2 -0
  304. package/emotion/es/components/ViewContainer/_view/tokens.json +1 -0
  305. package/emotion/es/components/ViewContainer/index.js +1 -0
  306. package/emotion/es/examples/_helpers.js +3 -14
  307. package/emotion/es/examples/plasma_b2c/components/Slider/Slider.config.js +7 -7
  308. package/emotion/es/examples/plasma_b2c/components/Slider/Slider.stories.tsx +16 -90
  309. package/emotion/es/examples/plasma_b2c/components/ViewContainer/ViewContainer.config.js +10 -0
  310. package/emotion/es/examples/plasma_b2c/components/ViewContainer/ViewContainer.js +5 -0
  311. package/emotion/es/examples/plasma_b2c/components/ViewContainer/ViewContainer.stories.tsx +65 -0
  312. package/emotion/es/examples/plasma_web/components/Slider/Slider.config.js +7 -7
  313. package/emotion/es/examples/plasma_web/components/Slider/Slider.stories.tsx +15 -90
  314. package/emotion/es/examples/plasma_web/components/ViewContainer/ViewContainer.config.js +10 -0
  315. package/emotion/es/examples/plasma_web/components/ViewContainer/ViewContainer.js +5 -0
  316. package/emotion/es/examples/plasma_web/components/ViewContainer/ViewContainer.stories.tsx +65 -0
  317. package/emotion/es/index.js +2 -1
  318. package/emotion/package.json +2 -1
  319. package/es/components/Accordion/ui/AccordionItem/AccordionItem.styles.js +0 -1
  320. package/es/components/Accordion/ui/AccordionItem/AccordionItem.styles.js.map +1 -1
  321. package/es/components/Attach/Attach.js +3 -4
  322. package/es/components/Attach/Attach.js.map +1 -1
  323. package/es/components/Attach/components/AttachButton/AttachButton.js +0 -1
  324. package/es/components/Attach/components/AttachButton/AttachButton.js.map +1 -1
  325. package/es/components/Attach/ui/Button/Button.styles.js +0 -1
  326. package/es/components/Attach/ui/Button/Button.styles.js.map +1 -1
  327. package/es/components/Attach/ui/Cell/Cell.styles.js +0 -2
  328. package/es/components/Attach/ui/Cell/Cell.styles.js.map +1 -1
  329. package/es/components/Attach/ui/IconButton/IconButton.styles.js +0 -1
  330. package/es/components/Attach/ui/IconButton/IconButton.styles.js.map +1 -1
  331. package/es/components/Attach/utils/getFileicon.js +3 -4
  332. package/es/components/Attach/utils/getFileicon.js.map +1 -1
  333. package/es/components/Attach/utils/index.js +0 -3
  334. package/es/components/Attach/utils/index.js.map +1 -1
  335. package/es/components/Autocomplete/Autocomplete.js +5 -6
  336. package/es/components/Autocomplete/Autocomplete.js.map +1 -1
  337. package/es/components/Autocomplete/Autocomplete.styles.js +2 -3
  338. package/es/components/Autocomplete/Autocomplete.styles.js.map +1 -1
  339. package/es/components/Autocomplete/ui/TextField/TextField.styles.js +1 -2
  340. package/es/components/Autocomplete/ui/TextField/TextField.styles.js.map +1 -1
  341. package/es/components/Avatar/Avatar.js +2 -3
  342. package/es/components/Avatar/Avatar.js.map +1 -1
  343. package/es/components/Breadcrumbs/Breadcrumbs.styles.js +2 -4
  344. package/es/components/Breadcrumbs/Breadcrumbs.styles.js.map +1 -1
  345. package/es/components/Button/Button.styles.js +0 -3
  346. package/es/components/Button/Button.styles.js.map +1 -1
  347. package/es/components/Calendar/CalendarBase/CalendarBase.js +5 -5
  348. package/es/components/Calendar/CalendarDouble/CalendarDouble.js +8 -8
  349. package/es/components/Calendar/hooks/useDays.js +2 -2
  350. package/es/components/Calendar/hooks/useKeyNavigation.js +1 -1
  351. package/es/components/Calendar/hooks/useMonths.js +2 -2
  352. package/es/components/Calendar/hooks/useQuarters.js +2 -2
  353. package/es/components/Calendar/hooks/useYears.js +2 -2
  354. package/es/components/Calendar/ui/CalendarDays/CalendarDays.js +4 -4
  355. package/es/components/Calendar/ui/CalendarHeader/CalendarHeader.js +5 -6
  356. package/es/components/Calendar/ui/CalendarHeader/CalendarHeader.js.map +1 -1
  357. package/es/components/Calendar/ui/CalendarHeader/CalendarHeader.styles.js +0 -1
  358. package/es/components/Calendar/ui/CalendarHeader/CalendarHeader.styles.js.map +1 -1
  359. package/es/components/Calendar/ui/CalendarMonths/CalendarMonths.js +4 -4
  360. package/es/components/Calendar/ui/CalendarQuarters/CalendarQuarters.js +4 -4
  361. package/es/components/Calendar/ui/CalendarYears/CalendarYears.js +4 -4
  362. package/es/components/Combobox/ComboboxNew/Combobox.js +11 -12
  363. package/es/components/Combobox/ComboboxNew/Combobox.js.map +1 -1
  364. package/es/components/Combobox/ComboboxNew/Combobox.styles.js +2 -4
  365. package/es/components/Combobox/ComboboxNew/Combobox.styles.js.map +1 -1
  366. package/es/components/Combobox/ComboboxNew/hooks/getPathMaps.js +0 -2
  367. package/es/components/Combobox/ComboboxNew/hooks/getPathMaps.js.map +1 -1
  368. package/es/components/Combobox/ComboboxNew/ui/Inner/Inner.js +1 -2
  369. package/es/components/Combobox/ComboboxNew/ui/Inner/Inner.js.map +1 -1
  370. package/es/components/Combobox/ComboboxNew/ui/Inner/ui/Item/Item.js +5 -6
  371. package/es/components/Combobox/ComboboxNew/ui/Inner/ui/Item/Item.js.map +1 -1
  372. package/es/components/Combobox/ComboboxNew/ui/Inner/ui/Item/Item.styles.js +1 -3
  373. package/es/components/Combobox/ComboboxNew/ui/Inner/ui/Item/Item.styles.js.map +1 -1
  374. package/es/components/Combobox/ComboboxNew/ui/Target/Target.styles.js +1 -2
  375. package/es/components/Combobox/ComboboxNew/ui/Target/Target.styles.js.map +1 -1
  376. package/es/components/Combobox/ComboboxOld/Combobox.js +4 -10
  377. package/es/components/Combobox/ComboboxOld/Combobox.js.map +1 -1
  378. package/es/components/Combobox/ComboboxOld/Combobox.styles.js +0 -1
  379. package/es/components/Combobox/ComboboxOld/Combobox.styles.js.map +1 -1
  380. package/es/components/Combobox/ComboboxOld/hooks/useFocusController.js +0 -1
  381. package/es/components/Combobox/ComboboxOld/hooks/useFocusController.js.map +1 -1
  382. package/es/components/Combobox/ComboboxOld/ui/ComboboxChip/ComboboxChip.styles.js +1 -2
  383. package/es/components/Combobox/ComboboxOld/ui/ComboboxChip/ComboboxChip.styles.js.map +1 -1
  384. package/es/components/Combobox/ComboboxOld/ui/ComboboxDivider/ComboboxDivider.js +1 -10
  385. package/es/components/Combobox/ComboboxOld/ui/ComboboxDivider/ComboboxDivider.js.map +1 -1
  386. package/es/components/Combobox/ComboboxOld/ui/ComboboxFooter/ComboboxFooter.js +1 -10
  387. package/es/components/Combobox/ComboboxOld/ui/ComboboxFooter/ComboboxFooter.js.map +1 -1
  388. package/es/components/Combobox/ComboboxOld/ui/ComboboxGroup/ComboboxGroup.js +1 -10
  389. package/es/components/Combobox/ComboboxOld/ui/ComboboxGroup/ComboboxGroup.js.map +1 -1
  390. package/es/components/Combobox/ComboboxOld/ui/ComboboxHeader/ComboboxHeader.js +1 -10
  391. package/es/components/Combobox/ComboboxOld/ui/ComboboxHeader/ComboboxHeader.js.map +1 -1
  392. package/es/components/Combobox/ComboboxOld/ui/ComboboxItem/ComboboxItem.styles.js +0 -2
  393. package/es/components/Combobox/ComboboxOld/ui/ComboboxItem/ComboboxItem.styles.js.map +1 -1
  394. package/es/components/Combobox/ComboboxOld/ui/ComboboxTarget/ComboboxTarget.js +1 -1
  395. package/es/components/Combobox/ComboboxOld/ui/ComboboxTarget/ComboboxTarget.styles.js +1 -2
  396. package/es/components/Combobox/ComboboxOld/ui/ComboboxTarget/ComboboxTarget.styles.js.map +1 -1
  397. package/es/components/DatePicker/DatePickerBase.styles.js +1 -7
  398. package/es/components/DatePicker/DatePickerBase.styles.js.map +1 -1
  399. package/es/components/DatePicker/RangeDate/RangeDate.js +1 -1
  400. package/es/components/DatePicker/RangeDate/RangeDate.styles.js +0 -1
  401. package/es/components/DatePicker/RangeDate/RangeDate.styles.js.map +1 -1
  402. package/es/components/DatePicker/RangeDate/RangeDatePopover/RangeDatePopover.js +1 -2
  403. package/es/components/DatePicker/RangeDate/RangeDatePopover/RangeDatePopover.js.map +1 -1
  404. package/es/components/DatePicker/RangeDate/RangeDatePopover/RangeDatePopover.styles.js +2 -5
  405. package/es/components/DatePicker/RangeDate/RangeDatePopover/RangeDatePopover.styles.js.map +1 -1
  406. package/es/components/DatePicker/SingleDate/SingleDate.styles.js +0 -1
  407. package/es/components/DatePicker/SingleDate/SingleDate.styles.js.map +1 -1
  408. package/es/components/Drawer/Drawer.js +5 -10
  409. package/es/components/Drawer/Drawer.js.map +1 -1
  410. package/es/components/Drawer/Drawer.styles.js +0 -4
  411. package/es/components/Drawer/Drawer.styles.js.map +1 -1
  412. package/es/components/Drawer/hooks/useDrawer.js +0 -4
  413. package/es/components/Drawer/hooks/useDrawer.js.map +1 -1
  414. package/es/components/Drawer/ui/DrawerContent/DrawerContent.js +0 -7
  415. package/es/components/Drawer/ui/DrawerContent/DrawerContent.js.map +1 -1
  416. package/es/components/Drawer/ui/DrawerFooter/DrawerFooter.js +0 -7
  417. package/es/components/Drawer/ui/DrawerFooter/DrawerFooter.js.map +1 -1
  418. package/es/components/Drawer/ui/DrawerHeader/DrawerHeader.js +0 -3
  419. package/es/components/Drawer/ui/DrawerHeader/DrawerHeader.js.map +1 -1
  420. package/es/components/Dropdown/Dropdown.js +3 -10
  421. package/es/components/Dropdown/Dropdown.js.map +1 -1
  422. package/es/components/Dropdown/Dropdown.styles.js +2 -3
  423. package/es/components/Dropdown/Dropdown.styles.js.map +1 -1
  424. package/es/components/Dropdown/ui/DropdownInner/DropdownInner.js +1 -9
  425. package/es/components/Dropdown/ui/DropdownInner/DropdownInner.js.map +1 -1
  426. package/es/components/Dropdown/ui/DropdownItem/DropdownItem.js +1 -2
  427. package/es/components/Dropdown/ui/DropdownItem/DropdownItem.js.map +1 -1
  428. package/es/components/Dropdown/ui/DropdownItemOld/DropdownItem.styles.js +0 -2
  429. package/es/components/Dropdown/ui/DropdownItemOld/DropdownItem.styles.js.map +1 -1
  430. package/es/components/Dropdown/ui/DropdownOld/Dropdown.styles.js +0 -1
  431. package/es/components/Dropdown/ui/DropdownOld/Dropdown.styles.js.map +1 -1
  432. package/es/components/Editable/Editable.js +3 -4
  433. package/es/components/Editable/Editable.js.map +1 -1
  434. package/es/components/Editable/utils/clearSelection.js +0 -2
  435. package/es/components/Editable/utils/clearSelection.js.map +1 -1
  436. package/es/components/Editable/utils/selectText.js +0 -2
  437. package/es/components/Editable/utils/selectText.js.map +1 -1
  438. package/es/components/EmptyState/EmptyState.styles.js +1 -2
  439. package/es/components/EmptyState/EmptyState.styles.js.map +1 -1
  440. package/es/components/IconButton/IconButton.js +1 -1
  441. package/es/components/IconButton/IconButton.styles.js +0 -8
  442. package/es/components/IconButton/IconButton.styles.js.map +1 -1
  443. package/es/components/Modal/Modal.js +6 -8
  444. package/es/components/Modal/Modal.js.map +1 -1
  445. package/es/components/Modal/hooks/useModal.js +0 -4
  446. package/es/components/Modal/hooks/useModal.js.map +1 -1
  447. package/es/components/Notification/Notification.styles.js +2 -3
  448. package/es/components/Notification/Notification.styles.js.map +1 -1
  449. package/es/components/Notification/NotificationsPortal.js +3 -4
  450. package/es/components/Notification/NotificationsPortal.js.map +1 -1
  451. package/es/components/Pagination/Pagination.styles.js +1 -2
  452. package/es/components/Pagination/Pagination.styles.js.map +1 -1
  453. package/es/components/Pagination/ui/PaginationSelectPerPage/PaginationSelectPerPage.styles.js +1 -2
  454. package/es/components/Pagination/ui/PaginationSelectPerPage/PaginationSelectPerPage.styles.js.map +1 -1
  455. package/es/components/Panel/ui/PanelHeader/PanelHeader.js +1 -2
  456. package/es/components/Panel/ui/PanelHeader/PanelHeader.js.map +1 -1
  457. package/es/components/Panel/ui/PanelHeader/PanelHeader.styles.js +1 -2
  458. package/es/components/Panel/ui/PanelHeader/PanelHeader.styles.js.map +1 -1
  459. package/es/components/Popover/Popover.js +1 -1
  460. package/es/components/Popup/Popup.js +2 -2
  461. package/es/components/Popup/PopupContext.js +1 -1
  462. package/es/components/Range/Range.styles.js +0 -1
  463. package/es/components/Range/Range.styles.js.map +1 -1
  464. package/es/components/Segment/ui/SegmentGroup/SegmentGroup.js +4 -5
  465. package/es/components/Segment/ui/SegmentGroup/SegmentGroup.js.map +1 -1
  466. package/es/components/Select/Select.js +11 -12
  467. package/es/components/Select/Select.js.map +1 -1
  468. package/es/components/Select/Select.styles.js +2 -5
  469. package/es/components/Select/Select.styles.js.map +1 -1
  470. package/es/components/Select/hooks/usePathMaps.js +0 -2
  471. package/es/components/Select/hooks/usePathMaps.js.map +1 -1
  472. package/es/components/Select/ui/Inner/Inner.js +1 -2
  473. package/es/components/Select/ui/Inner/Inner.js.map +1 -1
  474. package/es/components/Select/ui/Inner/ui/Item/Item.js +4 -5
  475. package/es/components/Select/ui/Inner/ui/Item/Item.js.map +1 -1
  476. package/es/components/Select/ui/Inner/ui/Item/Item.styles.js +0 -1
  477. package/es/components/Select/ui/Inner/ui/Item/Item.styles.js.map +1 -1
  478. package/es/components/Select/ui/Target/ui/Button/Button.js +1 -1
  479. package/es/components/Select/ui/Target/ui/Button/Button.styles.js +1 -3
  480. package/es/components/Select/ui/Target/ui/Button/Button.styles.js.map +1 -1
  481. package/es/components/Select/ui/Target/ui/Textfield/Textfield.js +2 -2
  482. package/es/components/Select/ui/Target/ui/Textfield/Textfield.styles.js +1 -4
  483. package/es/components/Select/ui/Target/ui/Textfield/Textfield.styles.js.map +1 -1
  484. package/es/components/Select/ui/Target/ui/Textfield/ui/Chip/Chip.styles.js +1 -2
  485. package/es/components/Select/ui/Target/ui/Textfield/ui/Chip/Chip.styles.js.map +1 -1
  486. package/es/components/Select/utils/getButtonLabel.js +0 -2
  487. package/es/components/Select/utils/getButtonLabel.js.map +1 -1
  488. package/es/components/Sheet/Sheet.js +3 -3
  489. package/es/components/Skeleton/LineSkeleton/LineSkeleton.js +2 -4
  490. package/es/components/Skeleton/LineSkeleton/LineSkeleton.js.map +1 -1
  491. package/es/components/Skeleton/RectSkeleton/RectSkeleton.js +2 -4
  492. package/es/components/Skeleton/RectSkeleton/RectSkeleton.js.map +1 -1
  493. package/es/components/Slider/Slider.css +13 -15
  494. package/es/components/Slider/Slider.js +2 -18
  495. package/es/components/Slider/Slider.js.map +1 -1
  496. package/es/components/Slider/Slider.tokens.js +17 -23
  497. package/es/components/Slider/Slider.tokens.js.map +1 -1
  498. package/es/components/Slider/components/Double/Double.css +8 -8
  499. package/es/components/Slider/components/Double/Double.js +20 -56
  500. package/es/components/Slider/components/Double/Double.js.map +1 -1
  501. package/es/components/Slider/components/Double/Double.styles.js +0 -1
  502. package/es/components/Slider/components/Double/Double.styles.js.map +1 -1
  503. package/es/components/Slider/components/DoubleUncontrolled/DoubleUncontrolled.js +0 -3
  504. package/es/components/Slider/components/DoubleUncontrolled/DoubleUncontrolled.js.map +1 -1
  505. package/es/components/Slider/components/Single/Single.css +14 -14
  506. package/es/components/Slider/components/Single/Single.js +35 -67
  507. package/es/components/Slider/components/Single/Single.js.map +1 -1
  508. package/es/components/Slider/components/Single/Single.styles.js +4 -4
  509. package/es/components/Slider/components/Single/Single.styles.js.map +1 -1
  510. package/es/components/Slider/components/Single/Single.styles_1r9f1e0.css +6 -0
  511. package/es/components/Slider/components/SliderBase/SliderBase.css +5 -5
  512. package/es/components/Slider/components/SliderBase/SliderBase.js +13 -32
  513. package/es/components/Slider/components/SliderBase/SliderBase.js.map +1 -1
  514. package/es/components/Slider/components/SliderBase/SliderBase.styles.js +7 -7
  515. package/es/components/Slider/components/SliderBase/SliderBase.styles.js.map +1 -1
  516. package/es/components/Slider/components/SliderBase/SliderBase.styles_9s4eb3.css +5 -0
  517. package/es/components/Slider/ui/Handler/Handler.css +3 -3
  518. package/es/components/Slider/ui/Handler/Handler.js +87 -48
  519. package/es/components/Slider/ui/Handler/Handler.js.map +1 -1
  520. package/es/components/Slider/ui/Handler/Handler.styles.js +7 -17
  521. package/es/components/Slider/ui/Handler/Handler.styles.js.map +1 -1
  522. package/es/components/Slider/ui/Handler/Handler.styles_8crx5z.css +2 -0
  523. package/es/components/Slider/ui/Thumb/Thumb.css +1 -1
  524. package/es/components/Slider/ui/Thumb/Thumb.js +2 -3
  525. package/es/components/Slider/ui/Thumb/Thumb.js.map +1 -1
  526. package/es/components/Slider/ui/Thumb/Thumb.styles.js +1 -1
  527. package/es/components/Slider/ui/Thumb/Thumb.styles.js.map +1 -1
  528. package/es/components/Slider/ui/Thumb/Thumb.styles_4w4gzn.css +1 -0
  529. package/es/components/Slider/utils/index.js +10 -28
  530. package/es/components/Slider/utils/index.js.map +1 -1
  531. package/es/components/Slider/variations/_view/base.js +1 -1
  532. package/es/components/Slider/variations/_view/base.js.map +1 -1
  533. package/es/components/Slider/variations/_view/base_x642ct.css +1 -0
  534. package/es/components/Steps/Steps.js +1 -1
  535. package/es/components/Steps/ui/StepItem/StepItem.styles.js +0 -1
  536. package/es/components/Steps/ui/StepItem/StepItem.styles.js.map +1 -1
  537. package/es/components/Tabs/ui/horizontal/HorizontalTabs/HorizontalTabs.js +2 -3
  538. package/es/components/Tabs/ui/horizontal/HorizontalTabs/HorizontalTabs.js.map +1 -1
  539. package/es/components/Tabs/ui/vertical/VerticalTabs/VerticalTabs.js +2 -3
  540. package/es/components/Tabs/ui/vertical/VerticalTabs/VerticalTabs.js.map +1 -1
  541. package/es/components/TextArea/TextArea.js +2 -2
  542. package/es/components/TextArea/TextArea.styles.js +2 -3
  543. package/es/components/TextArea/TextArea.styles.js.map +1 -1
  544. package/es/components/TextArea/ui/Hint/Hint.js +1 -2
  545. package/es/components/TextArea/ui/Hint/Hint.js.map +1 -1
  546. package/es/components/TextField/TextField.js +3 -3
  547. package/es/components/TextField/TextField.styles.js +1 -2
  548. package/es/components/TextField/TextField.styles.js.map +1 -1
  549. package/es/components/TextField/ui/Hint/Hint.js +1 -2
  550. package/es/components/TextField/ui/Hint/Hint.js.map +1 -1
  551. package/es/components/TextField/ui/TextFieldChip/TextFieldChip.styles.js +1 -2
  552. package/es/components/TextField/ui/TextFieldChip/TextFieldChip.styles.js.map +1 -1
  553. package/es/components/Toast/Toast.styles.js +1 -1
  554. package/es/components/Toast/ToastController.js +1 -1
  555. package/es/components/Toast/utils.js +1 -2
  556. package/es/components/Toast/utils.js.map +1 -1
  557. package/es/components/Toolbar/ui/ToolbarDivider/ToolbarDivider.js +1 -1
  558. package/es/components/Tooltip/Tooltip.js +2 -3
  559. package/es/components/Tooltip/Tooltip.js.map +1 -1
  560. package/es/components/ViewContainer/ViewContainer.js +33 -0
  561. package/es/components/ViewContainer/ViewContainer.js.map +1 -0
  562. package/es/components/ViewContainer/ViewContainer_yiqfcb.css +1 -0
  563. package/es/components/ViewContainer/_view/base.js +5 -0
  564. package/es/components/ViewContainer/_view/base.js.map +1 -0
  565. package/es/components/ViewContainer/_view/base_x642ct.css +1 -0
  566. package/es/engines/index.js +0 -2
  567. package/es/engines/index.js.map +1 -1
  568. package/es/hooks/useIsomorphicLayoutEffect.js +0 -1
  569. package/es/hooks/useIsomorphicLayoutEffect.js.map +1 -1
  570. package/es/index.css +15 -15
  571. package/es/index.js +22 -24
  572. package/es/index.js.map +1 -1
  573. package/es/utils/index.js +0 -3
  574. package/es/utils/index.js.map +1 -1
  575. package/package.json +6 -2
  576. package/styled-components/cjs/components/Slider/Slider.js +2 -10
  577. package/styled-components/cjs/components/Slider/Slider.template-doc.mdx +0 -26
  578. package/styled-components/cjs/components/Slider/Slider.tokens.js +17 -23
  579. package/styled-components/cjs/components/Slider/components/Double/Double.js +19 -54
  580. package/styled-components/cjs/components/Slider/components/Single/Single.js +33 -64
  581. package/styled-components/cjs/components/Slider/components/Single/Single.styles.js +6 -6
  582. package/styled-components/cjs/components/Slider/components/SliderBase/SliderBase.js +12 -31
  583. package/styled-components/cjs/components/Slider/components/SliderBase/SliderBase.styles.js +6 -6
  584. package/styled-components/cjs/components/Slider/ui/Handler/Handler.js +88 -52
  585. package/styled-components/cjs/components/Slider/ui/Handler/Handler.styles.js +4 -7
  586. package/styled-components/cjs/components/Slider/ui/Thumb/Thumb.js +2 -3
  587. package/styled-components/cjs/components/Slider/ui/Thumb/Thumb.styles.js +2 -2
  588. package/styled-components/cjs/components/Slider/utils/index.js +10 -28
  589. package/styled-components/cjs/components/Slider/variations/_view/base.js +1 -2
  590. package/styled-components/cjs/components/ViewContainer/ViewContainer.js +40 -0
  591. package/styled-components/cjs/components/ViewContainer/ViewContainer.template-doc.mdx +82 -0
  592. package/styled-components/cjs/components/ViewContainer/_view/base.js +8 -0
  593. package/styled-components/cjs/components/ViewContainer/_view/tokens.json +1 -0
  594. package/styled-components/cjs/components/ViewContainer/index.js +18 -0
  595. package/styled-components/cjs/examples/_helpers.js +3 -14
  596. package/styled-components/cjs/examples/plasma_b2c/components/Slider/Slider.config.js +3 -3
  597. package/styled-components/cjs/examples/plasma_b2c/components/Slider/Slider.stories.tsx +16 -90
  598. package/styled-components/cjs/examples/plasma_b2c/components/ViewContainer/ViewContainer.config.js +16 -0
  599. package/styled-components/cjs/examples/plasma_b2c/components/ViewContainer/ViewContainer.js +11 -0
  600. package/styled-components/cjs/examples/plasma_b2c/components/ViewContainer/ViewContainer.stories.tsx +65 -0
  601. package/styled-components/cjs/examples/plasma_web/components/Slider/Slider.config.js +3 -3
  602. package/styled-components/cjs/examples/plasma_web/components/Slider/Slider.stories.tsx +15 -90
  603. package/styled-components/cjs/examples/plasma_web/components/ViewContainer/ViewContainer.config.js +16 -0
  604. package/styled-components/cjs/examples/plasma_web/components/ViewContainer/ViewContainer.js +11 -0
  605. package/styled-components/cjs/examples/plasma_web/components/ViewContainer/ViewContainer.stories.tsx +65 -0
  606. package/styled-components/cjs/index.js +11 -0
  607. package/styled-components/es/components/Slider/Slider.js +2 -11
  608. package/styled-components/es/components/Slider/Slider.template-doc.mdx +0 -26
  609. package/styled-components/es/components/Slider/Slider.tokens.js +17 -23
  610. package/styled-components/es/components/Slider/components/Double/Double.js +19 -54
  611. package/styled-components/es/components/Slider/components/Single/Single.js +34 -65
  612. package/styled-components/es/components/Slider/components/Single/Single.styles.js +5 -5
  613. package/styled-components/es/components/Slider/components/SliderBase/SliderBase.js +12 -31
  614. package/styled-components/es/components/Slider/components/SliderBase/SliderBase.styles.js +7 -7
  615. package/styled-components/es/components/Slider/ui/Handler/Handler.js +86 -51
  616. package/styled-components/es/components/Slider/ui/Handler/Handler.styles.js +5 -8
  617. package/styled-components/es/components/Slider/ui/Thumb/Thumb.js +2 -3
  618. package/styled-components/es/components/Slider/ui/Thumb/Thumb.styles.js +2 -2
  619. package/styled-components/es/components/Slider/utils/index.js +10 -28
  620. package/styled-components/es/components/Slider/variations/_view/base.js +1 -2
  621. package/styled-components/es/components/ViewContainer/ViewContainer.js +31 -0
  622. package/styled-components/es/components/ViewContainer/ViewContainer.template-doc.mdx +82 -0
  623. package/styled-components/es/components/ViewContainer/_view/base.js +2 -0
  624. package/styled-components/es/components/ViewContainer/_view/tokens.json +1 -0
  625. package/styled-components/es/components/ViewContainer/index.js +1 -0
  626. package/styled-components/es/examples/_helpers.js +3 -14
  627. package/styled-components/es/examples/plasma_b2c/components/Slider/Slider.config.js +3 -3
  628. package/styled-components/es/examples/plasma_b2c/components/Slider/Slider.stories.tsx +16 -90
  629. package/styled-components/es/examples/plasma_b2c/components/ViewContainer/ViewContainer.config.js +10 -0
  630. package/styled-components/es/examples/plasma_b2c/components/ViewContainer/ViewContainer.js +5 -0
  631. package/styled-components/es/examples/plasma_b2c/components/ViewContainer/ViewContainer.stories.tsx +65 -0
  632. package/styled-components/es/examples/plasma_web/components/Slider/Slider.config.js +3 -3
  633. package/styled-components/es/examples/plasma_web/components/Slider/Slider.stories.tsx +15 -90
  634. package/styled-components/es/examples/plasma_web/components/ViewContainer/ViewContainer.config.js +10 -0
  635. package/styled-components/es/examples/plasma_web/components/ViewContainer/ViewContainer.js +5 -0
  636. package/styled-components/es/examples/plasma_web/components/ViewContainer/ViewContainer.stories.tsx +65 -0
  637. package/styled-components/es/index.js +2 -1
  638. package/styled-components/package.json +2 -1
  639. package/types/components/Slider/Slider.d.ts.map +1 -1
  640. package/types/components/Slider/Slider.tokens.d.ts +16 -22
  641. package/types/components/Slider/Slider.tokens.d.ts.map +1 -1
  642. package/types/components/Slider/components/Double/Double.d.ts.map +1 -1
  643. package/types/components/Slider/components/Double/Double.types.d.ts +0 -1
  644. package/types/components/Slider/components/Double/Double.types.d.ts.map +1 -1
  645. package/types/components/Slider/components/Single/Single.d.ts.map +1 -1
  646. package/types/components/Slider/components/Single/Single.styles.d.ts +1 -1
  647. package/types/components/Slider/components/Single/Single.styles.d.ts.map +1 -1
  648. package/types/components/Slider/components/Single/Single.types.d.ts +7 -80
  649. package/types/components/Slider/components/Single/Single.types.d.ts.map +1 -1
  650. package/types/components/Slider/components/SliderBase/SliderBase.d.ts.map +1 -1
  651. package/types/components/Slider/components/SliderBase/SliderBase.styles.d.ts +1 -1
  652. package/types/components/Slider/components/SliderBase/SliderBase.styles.d.ts.map +1 -1
  653. package/types/components/Slider/components/SliderBase/SliderBase.types.d.ts +0 -6
  654. package/types/components/Slider/components/SliderBase/SliderBase.types.d.ts.map +1 -1
  655. package/types/components/Slider/ui/Handler/Handler.d.ts.map +1 -1
  656. package/types/components/Slider/ui/Handler/Handler.styles.d.ts +2 -6
  657. package/types/components/Slider/ui/Handler/Handler.styles.d.ts.map +1 -1
  658. package/types/components/Slider/ui/Handler/Handler.types.d.ts +1 -5
  659. package/types/components/Slider/ui/Handler/Handler.types.d.ts.map +1 -1
  660. package/types/components/Slider/ui/Thumb/Thumb.d.ts +1 -1
  661. package/types/components/Slider/ui/Thumb/Thumb.d.ts.map +1 -1
  662. package/types/components/Slider/ui/Thumb/Thumb.styles.d.ts.map +1 -1
  663. package/types/components/Slider/ui/Thumb/Thumb.types.d.ts +0 -1
  664. package/types/components/Slider/ui/Thumb/Thumb.types.d.ts.map +1 -1
  665. package/types/components/Slider/utils/index.d.ts +8 -26
  666. package/types/components/Slider/utils/index.d.ts.map +1 -1
  667. package/types/components/Slider/variations/_view/base.d.ts.map +1 -1
  668. package/types/components/ViewContainer/ViewContainer.d.ts +26 -0
  669. package/types/components/ViewContainer/ViewContainer.d.ts.map +1 -0
  670. package/types/components/ViewContainer/_view/base.d.ts +2 -0
  671. package/types/components/ViewContainer/_view/base.d.ts.map +1 -0
  672. package/types/components/ViewContainer/index.d.ts +2 -0
  673. package/types/components/ViewContainer/index.d.ts.map +1 -0
  674. package/types/examples/_helpers.d.ts.map +1 -1
  675. package/types/examples/plasma_b2c/components/Slider/Slider.config.d.ts.map +1 -1
  676. package/types/examples/plasma_b2c/components/Slider/Slider.d.ts +2 -84
  677. package/types/examples/plasma_b2c/components/Slider/Slider.d.ts.map +1 -1
  678. package/types/examples/plasma_b2c/components/ViewContainer/ViewContainer.config.d.ts +9 -0
  679. package/types/examples/plasma_b2c/components/ViewContainer/ViewContainer.config.d.ts.map +1 -0
  680. package/types/examples/plasma_b2c/components/ViewContainer/ViewContainer.d.ts +8 -0
  681. package/types/examples/plasma_b2c/components/ViewContainer/ViewContainer.d.ts.map +1 -0
  682. package/types/examples/plasma_web/components/Slider/Slider.config.d.ts.map +1 -1
  683. package/types/examples/plasma_web/components/Slider/Slider.d.ts +2 -84
  684. package/types/examples/plasma_web/components/Slider/Slider.d.ts.map +1 -1
  685. package/types/examples/plasma_web/components/ViewContainer/ViewContainer.config.d.ts +9 -0
  686. package/types/examples/plasma_web/components/ViewContainer/ViewContainer.config.d.ts.map +1 -0
  687. package/types/examples/plasma_web/components/ViewContainer/ViewContainer.d.ts +8 -0
  688. package/types/examples/plasma_web/components/ViewContainer/ViewContainer.d.ts.map +1 -0
  689. package/types/index.d.ts +1 -0
  690. package/types/index.d.ts.map +1 -1
  691. package/types/utils/index.d.ts +1 -1
  692. package/types/utils/index.d.ts.map +1 -1
  693. package/cjs/components/Slider/components/DoubleUncontrolled/DoubleUncontrolled.css +0 -98
  694. package/cjs/components/Slider/components/Single/Single.styles_1h7n2s2.css +0 -6
  695. package/cjs/components/Slider/components/SliderBase/SliderBase.styles_1qt1224.css +0 -5
  696. package/cjs/components/Slider/ui/Handler/Handler.styles_irtcgm.css +0 -2
  697. package/cjs/components/Slider/ui/Handler/computeKeyPressData.js +0 -122
  698. package/cjs/components/Slider/ui/Handler/computeKeyPressData.js.map +0 -1
  699. package/cjs/components/Slider/ui/Thumb/Thumb.styles_uyn20e.css +0 -1
  700. package/cjs/components/Slider/variations/_view/base_1s3f6q8.css +0 -1
  701. package/emotion/cjs/components/Slider/ui/Handler/computeKeyPressData.js +0 -121
  702. package/emotion/cjs/examples/themes/declaration.d.ts +0 -4
  703. package/emotion/cjs/examples/themes/index.js +0 -15
  704. package/emotion/cjs/examples/themes/plasma_b2c.module.css +0 -984
  705. package/emotion/cjs/examples/themes/plasma_web.module.css +0 -984
  706. package/emotion/es/components/Slider/ui/Handler/computeKeyPressData.js +0 -115
  707. package/emotion/es/examples/themes/declaration.d.ts +0 -4
  708. package/emotion/es/examples/themes/index.js +0 -7
  709. package/emotion/es/examples/themes/plasma_b2c.module.css +0 -984
  710. package/emotion/es/examples/themes/plasma_web.module.css +0 -984
  711. package/es/components/Slider/components/DoubleUncontrolled/DoubleUncontrolled.css +0 -98
  712. package/es/components/Slider/components/Single/Single.styles_1h7n2s2.css +0 -6
  713. package/es/components/Slider/components/SliderBase/SliderBase.styles_1qt1224.css +0 -5
  714. package/es/components/Slider/ui/Handler/Handler.styles_irtcgm.css +0 -2
  715. package/es/components/Slider/ui/Handler/computeKeyPressData.js +0 -118
  716. package/es/components/Slider/ui/Handler/computeKeyPressData.js.map +0 -1
  717. package/es/components/Slider/ui/Thumb/Thumb.styles_uyn20e.css +0 -1
  718. package/es/components/Slider/variations/_view/base_1s3f6q8.css +0 -1
  719. package/styled-components/cjs/components/Slider/ui/Handler/computeKeyPressData.js +0 -121
  720. package/styled-components/cjs/examples/themes/declaration.d.ts +0 -4
  721. package/styled-components/cjs/examples/themes/index.js +0 -15
  722. package/styled-components/cjs/examples/themes/plasma_b2c.module.css +0 -984
  723. package/styled-components/cjs/examples/themes/plasma_web.module.css +0 -984
  724. package/styled-components/es/components/Slider/ui/Handler/computeKeyPressData.js +0 -115
  725. package/styled-components/es/examples/themes/declaration.d.ts +0 -4
  726. package/styled-components/es/examples/themes/index.js +0 -7
  727. package/styled-components/es/examples/themes/plasma_b2c.module.css +0 -984
  728. package/styled-components/es/examples/themes/plasma_web.module.css +0 -984
  729. package/types/components/Slider/ui/Handler/computeKeyPressData.d.ts +0 -12
  730. package/types/components/Slider/ui/Handler/computeKeyPressData.d.ts.map +0 -1
  731. package/types/examples/themes/index.d.ts +0 -6
  732. package/types/examples/themes/index.d.ts.map +0 -1
@@ -1,4 +1,4 @@
1
- .Thumb_styles_uyn20e_tqbdf8b__de0962c7{width:var(--thumb-size);height:var(--thumb-size);min-width:var(--thumb-size);min-height:var(--thumb-size);position:relative;border-radius:50%;box-sizing:border-box;background:var(--plasma-slider-thumb-background-color);margin:0.0625rem;-webkit-transition:border-color 0.1s ease-in-out;transition:border-color 0.1s ease-in-out;position:relative;}.Thumb_styles_uyn20e_tqbdf8b__de0962c7:after{background:var(--plasma-slider-thumb-border-color);margin:-0.0625rem;content:'';position:absolute;inset:0;z-index:-1;border-radius:inherit;}.Thumb_styles_uyn20e_tqbdf8b__de0962c7:not([disabled]):hover:after,.Thumb_styles_uyn20e_tqbdf8b__de0962c7:not([disabled]):active:after{background:var(--plasma-slider-thumb-focus-border-color);}.Thumb_styles_uyn20e_tqbdf8b__de0962c7[disabled]{cursor:not-allowed;}.Thumb_styles_uyn20e_tqbdf8b__de0962c7:focus{outline:none;}.Thumb_styles_uyn20e_tqbdf8b__de0962c7::before{content:'';position:absolute;top:0.0625rem;left:0.0625rem;right:0.0625rem;bottom:0.0625rem;z-index:1;display:block;box-sizing:content-box;border:0.125rem solid transparent;border-radius:50%;-webkit-transition:box-shadow 0.2s ease-in-out;transition:box-shadow 0.2s ease-in-out;pointer-events:none;}.Thumb_styles_uyn20e_tqbdf8b__de0962c7.Thumb_styles_uyn20e_focusVisible__de0962c7:focus::before,.Thumb_styles_uyn20e_tqbdf8b__de0962c7[data-focus-visible-added]::before{outline:none;box-shadow:0 0 0 0.125rem var(--plasma-slider-thumb-focus-border-color);}
1
+ .Thumb_styles_4w4gzn_tqbdf8b__14129a5b{width:var(--plasma-slider-thumb-size);height:var(--plasma-slider-thumb-size);position:relative;left:-0.125rem;top:-0.125rem;border-radius:50%;box-sizing:border-box;background:var(--plasma-slider-thumb-background-color);margin:0.125rem;-webkit-transition:border-color 0.1s ease-in-out;transition:border-color 0.1s ease-in-out;position:relative;}.Thumb_styles_4w4gzn_tqbdf8b__14129a5b:after{background:var(--plasma-slider-thumb-border-color);margin:-0.125rem;content:'';position:absolute;inset:0;z-index:-1;border-radius:inherit;}.Thumb_styles_4w4gzn_tqbdf8b__14129a5b:not([disabled]):hover:after,.Thumb_styles_4w4gzn_tqbdf8b__14129a5b:not([disabled]):active:after{background:var(--plasma-slider-thumb-focus-border-color);}.Thumb_styles_4w4gzn_tqbdf8b__14129a5b[disabled]{cursor:not-allowed;}.Thumb_styles_4w4gzn_tqbdf8b__14129a5b:focus{outline:none;}.Thumb_styles_4w4gzn_tqbdf8b__14129a5b::before{content:'';position:absolute;top:0.125rem;left:0.125rem;right:0.125rem;bottom:0.125rem;z-index:1;display:block;box-sizing:content-box;border:0.125rem solid transparent;border-radius:50%;-webkit-transition:box-shadow 0.2s ease-in-out;transition:box-shadow 0.2s ease-in-out;pointer-events:none;}.Thumb_styles_4w4gzn_tqbdf8b__14129a5b.Thumb_styles_4w4gzn_focusVisible__14129a5b:focus::before,.Thumb_styles_4w4gzn_tqbdf8b__14129a5b[data-focus-visible-added]::before{outline:none;box-shadow:0 0 0 0.125rem var(--plasma-slider-thumb-focus-border-color);}
2
2
 
3
- .Handler_styles_irtcgm_s1tnrnip__e8f853c5{position:absolute;z-index:1;top:var(--plasma-slider-current-value-top-offset);text-align:center;width:100%;margin-left:-0.125rem;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-box-pack:center;-webkit-justify-content:center;-ms-flex-pack:center;justify-content:center;font-family:var(--plasma-slider-value-font-family);font-size:var(--plasma-slider-value-font-size);font-style:var(--plasma-slider-value-font-style);font-weight:var(--plasma-slider-value-font-weight);-webkit-letter-spacing:var(--plasma-slider-value-letter-spacing);-moz-letter-spacing:var(--plasma-slider-value-letter-spacing);-ms-letter-spacing:var(--plasma-slider-value-letter-spacing);letter-spacing:var(--plasma-slider-value-letter-spacing);line-height:var(--plasma-slider-value-line-height);}
4
- .Handler_styles_irtcgm_h12uu2lj__e8f853c5{cursor:pointer;position:absolute;z-index:1;top:0;left:0;bottom:0;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-align-items:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:center;-webkit-justify-content:center;-ms-flex-pack:center;justify-content:center;--thumb-size:var(--h12uu2lj-0);}.Handler_styles_irtcgm_h12uu2lj__e8f853c5.Handler_styles_irtcgm_sliderVerticalOrientation__e8f853c5{right:0;bottom:auto;-webkit-align-items:flex-start;-webkit-box-align:flex-start;-ms-flex-align:flex-start;align-items:flex-start;-webkit-box-pack:center;-webkit-justify-content:center;-ms-flex-pack:center;justify-content:center;}.Handler_styles_irtcgm_h12uu2lj__e8f853c5.Handler_styles_irtcgm_sliderVerticalOrientation__e8f853c5 .Handler_styles_irtcgm_s1tnrnip__e8f853c5{margin:0;top:0;bottom:0;right:0;left:calc(var(--plasma-slider-size) - (var(--plasma-slider-size) - var(--thumb-size)) / 2 + 0.25rem);-webkit-align-items:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:start;-webkit-justify-content:flex-start;-ms-flex-pack:start;justify-content:flex-start;}.Handler_styles_irtcgm_h12uu2lj__e8f853c5.Handler_styles_irtcgm_sliderValuePlacementLeft__e8f853c5 .Handler_styles_irtcgm_s1tnrnip__e8f853c5{left:auto;right:calc(var(--plasma-slider-size) - (var(--plasma-slider-size) - var(--thumb-size)) / 2 + 0.3125rem);-webkit-box-pack:end;-webkit-justify-content:flex-end;-ms-flex-pack:end;justify-content:flex-end;}
3
+ .Handler_styles_8crx5z_h1tnrnip__2d4342c7{cursor:pointer;position:absolute;z-index:1;top:0;left:0;}
4
+ .Handler_styles_8crx5z_s12uu2lj__2d4342c7{position:absolute;z-index:1;top:var(--plasma-slider-current-value-top-offset);text-align:center;width:100%;margin-left:-0.125rem;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-box-pack:center;-webkit-justify-content:center;-ms-flex-pack:center;justify-content:center;font-family:var(--plasma-slider-current-value-font-family);font-size:var(--plasma-slider-current-value-font-size);font-style:var(--plasma-slider-current-value-font-style);font-weight:var(--plasma-slider-current-value-font-weight);-webkit-letter-spacing:var(--plasma-slider-current-value-letter-spacing);-moz-letter-spacing:var(--plasma-slider-current-value-letter-spacing);-ms-letter-spacing:var(--plasma-slider-current-value-letter-spacing);letter-spacing:var(--plasma-slider-current-value-letter-spacing);line-height:var(--plasma-slider-current-value-line-height);}
@@ -1,25 +1,30 @@
1
- import { objectWithoutProperties as _objectWithoutProperties, slicedToArray as _slicedToArray, defineProperty as _defineProperty, extends as _extends } from '../../../../_virtual/_rollupPluginBabelHelpers.js';
1
+ import { objectWithoutProperties as _objectWithoutProperties, slicedToArray as _slicedToArray, extends as _extends } from '../../../../_virtual/_rollupPluginBabelHelpers.js';
2
2
  import React, { forwardRef, useRef } from 'react';
3
3
  import Draggable from 'react-draggable';
4
- import { cx } from '../../../../utils/index.js';
5
4
  import { getOffsets, getSliderThumbValue } from '../../utils/index.js';
6
5
  import { Thumb } from '../Thumb/Thumb.js';
7
- import { classes } from '../../Slider.tokens.js';
8
6
  import { HandlerStyled, StyledValue } from './Handler.styles.js';
9
- import { computeKeyPressData } from './computeKeyPressData.js';
10
7
 
11
- var _excluded = ["size", "orientation", "stepSize", "onChangeCommitted", "onChange", "position", "min", "max", "bounds", "zIndex", "disabled", "side", "showCurrentValue", "startOffset", "endOffset", "value", "valuePlacement"];
8
+ var _excluded = ["stepSize", "onChangeCommitted", "onChange", "xPosition", "min", "max", "bounds", "zIndex", "disabled", "side", "showCurrentValue", "startOffset", "endOffset", "value"];
12
9
 
13
10
  // TODO: PLASMA-1707
14
11
 
12
+ var KeyboardSupport = {
13
+ PageUp: 33,
14
+ PageDown: 34,
15
+ End: 35,
16
+ Home: 36,
17
+ ArrowLeft: 37,
18
+ ArrowUp: 38,
19
+ ArrowRight: 39,
20
+ ArrowDown: 40
21
+ };
15
22
  var Handler = /*#__PURE__*/forwardRef(function (_ref, ref) {
16
- var size = _ref.size,
17
- orientation = _ref.orientation,
18
- stepSize = _ref.stepSize,
23
+ var stepSize = _ref.stepSize,
19
24
  onChangeCommitted = _ref.onChangeCommitted,
20
25
  onChange = _ref.onChange,
21
- _ref$position = _ref.position,
22
- position = _ref$position === void 0 ? 0 : _ref$position,
26
+ _ref$xPosition = _ref.xPosition,
27
+ xPosition = _ref$xPosition === void 0 ? 0 : _ref$xPosition,
23
28
  min = _ref.min,
24
29
  max = _ref.max,
25
30
  _ref$bounds = _ref.bounds,
@@ -34,89 +39,123 @@ var Handler = /*#__PURE__*/forwardRef(function (_ref, ref) {
34
39
  _ref$endOffset = _ref.endOffset,
35
40
  endOffset = _ref$endOffset === void 0 ? 0 : _ref$endOffset,
36
41
  value = _ref.value,
37
- valuePlacement = _ref.valuePlacement,
38
42
  rest = _objectWithoutProperties(_ref, _excluded);
39
- var isVertical = orientation === 'vertical';
40
43
  var lastOnChangeValue = useRef();
41
- var _getOffsets = getOffsets(ref, side, isVertical),
44
+ var _getOffsets = getOffsets(ref, side),
42
45
  _getOffsets2 = _slicedToArray(_getOffsets, 2),
43
- startClientOffset = _getOffsets2[0],
44
- endClientOffset = _getOffsets2[1];
46
+ offsetLeft = _getOffsets2[0],
47
+ offsetRight = _getOffsets2[1];
45
48
  var _bounds = _slicedToArray(bounds, 2),
46
- startValueBound = _bounds[0],
47
- endValueBound = _bounds[1];
48
- var startPositionBound = startValueBound ? (startValueBound - min) * stepSize : null;
49
- var endPositionBound = endValueBound ? (endValueBound - min) * stepSize : null;
50
- var dragPosition = typeof position === 'number' ? {
51
- x: isVertical ? 0 : position,
52
- y: isVertical ? position : 0
49
+ leftValueBound = _bounds[0],
50
+ rightValueBound = _bounds[1];
51
+ var leftPositionBound = leftValueBound ? (leftValueBound - min) * stepSize : null;
52
+ var rightPositionBound = rightValueBound ? (rightValueBound - min) * stepSize : null;
53
+ var position = typeof xPosition === 'number' ? {
54
+ x: xPosition,
55
+ y: 0
53
56
  } : undefined;
54
57
  var tabIndex = disabled ? -1 : 0;
55
- var computedBounds = _defineProperty(_defineProperty({}, isVertical ? 'top' : 'left', (startPositionBound !== null && startPositionBound !== void 0 ? startPositionBound : 0) - (startClientOffset ? stepSize : 0)), isVertical ? 'bottom' : 'right', (endPositionBound !== null && endPositionBound !== void 0 ? endPositionBound : stepSize * (max - min)) - (endClientOffset ? stepSize : 0));
56
- var showCurrentValueCondition = showCurrentValue && (position >= startOffset && position <= max * stepSize - endOffset || position === 0 && value !== 0);
58
+ var computedBounds = {
59
+ left: (leftPositionBound !== null && leftPositionBound !== void 0 ? leftPositionBound : 0) - (offsetLeft ? stepSize : 0),
60
+ right: (rightPositionBound !== null && rightPositionBound !== void 0 ? rightPositionBound : stepSize * (max - min)) - (offsetRight ? stepSize : 0)
61
+ };
62
+ var showCurrentValueCondition = showCurrentValue && (xPosition >= startOffset && xPosition <= max * stepSize - endOffset || xPosition === 0 && value !== 0);
57
63
  var onDrag = function onDrag(_, data) {
58
- var newValue = getSliderThumbValue(isVertical ? data.y : data.x, stepSize, min, max);
64
+ var newValue = getSliderThumbValue(data.x, stepSize, min, max);
59
65
  if (lastOnChangeValue.current !== newValue) {
60
66
  onChange === null || onChange === void 0 || onChange(newValue, data);
61
67
  lastOnChangeValue.current = newValue;
62
68
  }
63
69
  };
64
70
  var onStop = function onStop(_, data) {
65
- var newValue = getSliderThumbValue(isVertical ? data.y : data.x, stepSize, min, max);
71
+ var newValue = getSliderThumbValue(data.x, stepSize, min, max);
66
72
  onChangeCommitted && onChangeCommitted(newValue, data);
67
73
  };
68
74
  var onKeyPress = function onKeyPress(event) {
69
75
  event.persist();
70
- var computedMultipleSteps = stepSize * (rest.multipleStepSize / 100 * max);
71
- var data = computeKeyPressData(event, {
72
- isVertical: isVertical,
73
- stepSize: stepSize,
74
- position: position,
75
- max: max,
76
- computedMultipleSteps: computedMultipleSteps
77
- });
78
- if (!data) {
76
+ var keyCode = event.keyCode,
77
+ target = event.target;
78
+ if (!Object.values(KeyboardSupport).includes(keyCode)) {
79
79
  return;
80
80
  }
81
+ var ArrowUp = KeyboardSupport.ArrowUp,
82
+ ArrowRight = KeyboardSupport.ArrowRight,
83
+ ArrowDown = KeyboardSupport.ArrowDown,
84
+ ArrowLeft = KeyboardSupport.ArrowLeft,
85
+ Home = KeyboardSupport.Home,
86
+ End = KeyboardSupport.End,
87
+ PageDown = KeyboardSupport.PageDown,
88
+ PageUp = KeyboardSupport.PageUp;
89
+ var computedMultipleSteps = stepSize * (rest.multipleStepSize / 100 * max);
90
+ var data = {
91
+ x: 0,
92
+ deltaX: stepSize,
93
+ lastX: xPosition,
94
+ y: 0,
95
+ deltaY: 0,
96
+ lastY: 0,
97
+ node: target
98
+ };
99
+ switch (keyCode) {
100
+ case ArrowUp:
101
+ case ArrowRight:
102
+ data.x = xPosition + stepSize;
103
+ break;
104
+ case ArrowDown:
105
+ case ArrowLeft:
106
+ data.x = xPosition - stepSize;
107
+ data.deltaX = -stepSize;
108
+ break;
109
+ case PageUp:
110
+ data.x = xPosition + computedMultipleSteps;
111
+ data.deltaX = computedMultipleSteps;
112
+ break;
113
+ case PageDown:
114
+ data.x = xPosition - computedMultipleSteps;
115
+ data.deltaX = -computedMultipleSteps;
116
+ break;
117
+ case End:
118
+ data.x = max * stepSize;
119
+ break;
120
+ case Home:
121
+ data.x = 0;
122
+ break;
123
+ default:
124
+ data.x = 0;
125
+ }
81
126
  var left = computedBounds.left,
82
- right = computedBounds.right,
83
- top = computedBounds.top,
84
- bottom = computedBounds.bottom;
127
+ right = computedBounds.right;
85
128
 
86
129
  /*
87
130
  * INFO: Находим значение в диапазоне между указанными левой и правой границами.
88
- * Или между верхней и нижней
89
131
  * Необходимо для правильного расчета положения SliderThumb.
90
132
  * см. функция clamp
91
133
  */
92
- var boundedValue = isVertical ? Math.max(Math.min(bottom, data.y), top) : Math.max(Math.min(right, data.x), left);
134
+ var boundedValue = Math.max(Math.min(right, data.x), left);
93
135
  var computedValue = getSliderThumbValue(boundedValue, stepSize, min, max);
94
136
  lastOnChangeValue.current = computedValue;
95
137
  onChangeCommitted && onChangeCommitted(computedValue, data);
96
138
  };
97
139
  return /*#__PURE__*/React.createElement(Draggable, {
98
- axis: isVertical ? 'y' : 'x',
140
+ axis: "x",
99
141
  bounds: computedBounds,
100
- grid: isVertical ? [1, stepSize] : [stepSize, 1],
142
+ grid: [stepSize, 1],
101
143
  onStop: onStop,
102
144
  onDrag: onDrag,
103
- position: dragPosition,
145
+ position: position,
104
146
  disabled: disabled
105
147
  }, /*#__PURE__*/React.createElement(HandlerStyled, {
106
148
  ref: ref,
107
149
  style: {
108
150
  zIndex: zIndex
109
151
  },
110
- className: cx(isVertical && classes.verticalOrientation, valuePlacement === 'left' && classes.valuePlacementLeft),
111
- isLarge: size === 'large',
112
152
  onKeyDown: onKeyPress
113
- }, size !== 'none' && /*#__PURE__*/React.createElement(Thumb, _extends({
153
+ }, /*#__PURE__*/React.createElement(Thumb, _extends({
114
154
  tabIndex: tabIndex,
115
155
  min: min,
116
156
  max: max,
117
157
  value: value,
118
- disabled: disabled,
119
- orientation: orientation
158
+ disabled: disabled
120
159
  }, rest)), showCurrentValueCondition && /*#__PURE__*/React.createElement(StyledValue, null, value)));
121
160
  });
122
161
 
@@ -1 +1 @@
1
- {"version":3,"file":"Handler.js","sources":["../../../../../src/components/Slider/ui/Handler/Handler.tsx"],"sourcesContent":["import React, { useRef, forwardRef, KeyboardEvent } from 'react';\nimport Draggable, { DraggableEventHandler } from 'react-draggable';\n\nimport { cx } from '../../../../utils';\nimport { getSliderThumbValue, getOffsets } from '../../utils';\nimport { Thumb } from '../Thumb/Thumb';\nimport { classes } from '../../Slider.tokens';\n\nimport type { HandlerProps } from './Handler.types';\nimport { HandlerStyled, StyledValue } from './Handler.styles';\nimport { computeKeyPressData } from './computeKeyPressData';\n\n// TODO: PLASMA-1707\ndeclare module 'react-draggable' {\n export interface DraggableProps {\n children: React.ReactNode;\n }\n}\n\nexport const Handler = forwardRef<HTMLDivElement, HandlerProps>(\n (\n {\n size,\n orientation,\n stepSize,\n onChangeCommitted,\n onChange,\n position = 0,\n min,\n max,\n bounds = [],\n zIndex,\n disabled,\n side,\n showCurrentValue = false,\n startOffset = 0,\n endOffset = 0,\n value,\n valuePlacement,\n ...rest\n },\n ref,\n ) => {\n const isVertical = orientation === 'vertical';\n\n const lastOnChangeValue = useRef<number>();\n const [startClientOffset, endClientOffset] = getOffsets(ref, side, isVertical);\n\n const [startValueBound, endValueBound] = bounds;\n const startPositionBound = startValueBound ? (startValueBound - min) * stepSize : null;\n const endPositionBound = endValueBound ? (endValueBound - min) * stepSize : null;\n\n const dragPosition =\n typeof position === 'number' ? { x: isVertical ? 0 : position, y: isVertical ? position : 0 } : undefined;\n const tabIndex = disabled ? -1 : 0;\n\n const computedBounds = {\n [isVertical ? 'top' : 'left']: (startPositionBound ?? 0) - (startClientOffset ? stepSize : 0),\n [isVertical ? 'bottom' : 'right']:\n (endPositionBound ?? stepSize * (max - min)) - (endClientOffset ? stepSize : 0),\n };\n\n const showCurrentValueCondition =\n showCurrentValue &&\n ((position >= startOffset && position <= max * stepSize - endOffset) || (position === 0 && value !== 0));\n\n const onDrag: DraggableEventHandler = (_, data) => {\n const newValue = getSliderThumbValue(isVertical ? data.y : data.x, stepSize, min, max);\n if (lastOnChangeValue.current !== newValue) {\n onChange?.(newValue, data);\n lastOnChangeValue.current = newValue;\n }\n };\n\n const onStop: DraggableEventHandler = (_, data) => {\n const newValue = getSliderThumbValue(isVertical ? data.y : data.x, stepSize, min, max);\n onChangeCommitted && onChangeCommitted(newValue, data);\n };\n\n const onKeyPress = (event: KeyboardEvent<HTMLDivElement>) => {\n event.persist();\n\n const computedMultipleSteps = stepSize * ((rest.multipleStepSize / 100) * max);\n\n const data = computeKeyPressData(event, {\n isVertical,\n stepSize,\n position,\n max,\n computedMultipleSteps,\n });\n\n if (!data) {\n return;\n }\n\n const { left, right, top, bottom } = computedBounds;\n\n /*\n * INFO: Находим значение в диапазоне между указанными левой и правой границами.\n * Или между верхней и нижней\n * Необходимо для правильного расчета положения SliderThumb.\n * см. функция clamp\n */\n const boundedValue = isVertical\n ? Math.max(Math.min(bottom, data.y), top)\n : Math.max(Math.min(right, data.x), left);\n\n const computedValue = getSliderThumbValue(boundedValue, stepSize, min, max);\n lastOnChangeValue.current = computedValue;\n\n onChangeCommitted && onChangeCommitted(computedValue, data);\n };\n\n return (\n <Draggable\n axis={isVertical ? 'y' : 'x'}\n bounds={computedBounds}\n grid={isVertical ? [1, stepSize] : [stepSize, 1]}\n onStop={onStop}\n onDrag={onDrag}\n position={dragPosition}\n disabled={disabled}\n >\n <HandlerStyled\n ref={ref}\n style={{ zIndex }}\n className={cx(\n isVertical && classes.verticalOrientation,\n valuePlacement === 'left' && classes.valuePlacementLeft,\n )}\n isLarge={size === 'large'}\n onKeyDown={onKeyPress}\n >\n {size !== 'none' && (\n <Thumb\n tabIndex={tabIndex}\n min={min}\n max={max}\n value={value}\n disabled={disabled}\n orientation={orientation}\n {...rest}\n />\n )}\n {showCurrentValueCondition && <StyledValue>{value}</StyledValue>}\n </HandlerStyled>\n </Draggable>\n );\n },\n);\n"],"names":["Handler","forwardRef","_ref","ref","size","orientation","stepSize","onChangeCommitted","onChange","_ref$position","position","min","max","_ref$bounds","bounds","zIndex","disabled","side","_ref$showCurrentValue","showCurrentValue","_ref$startOffset","startOffset","_ref$endOffset","endOffset","value","valuePlacement","rest","_objectWithoutProperties","_excluded","isVertical","lastOnChangeValue","useRef","_getOffsets","getOffsets","_getOffsets2","_slicedToArray","startClientOffset","endClientOffset","_bounds","startValueBound","endValueBound","startPositionBound","endPositionBound","dragPosition","x","y","undefined","tabIndex","computedBounds","_defineProperty","showCurrentValueCondition","onDrag","_","data","newValue","getSliderThumbValue","current","onStop","onKeyPress","event","persist","computedMultipleSteps","multipleStepSize","computeKeyPressData","left","right","top","bottom","boundedValue","Math","computedValue","React","createElement","Draggable","axis","grid","HandlerStyled","style","className","cx","classes","verticalOrientation","valuePlacementLeft","isLarge","onKeyDown","Thumb","_extends","StyledValue"],"mappings":";;;;;;;;;;;;AAYA;;AAOO,IAAMA,OAAO,gBAAGC,UAAU,CAC7B,UAAAC,IAAA,EAqBIC,GAAG,EACF;AAAA,EAAA,IApBGC,IAAI,GAAAF,IAAA,CAAJE,IAAI;IACJC,WAAW,GAAAH,IAAA,CAAXG,WAAW;IACXC,QAAQ,GAAAJ,IAAA,CAARI,QAAQ;IACRC,iBAAiB,GAAAL,IAAA,CAAjBK,iBAAiB;IACjBC,QAAQ,GAAAN,IAAA,CAARM,QAAQ;IAAAC,aAAA,GAAAP,IAAA,CACRQ,QAAQ;AAARA,IAAAA,QAAQ,GAAAD,aAAA,KAAG,KAAA,CAAA,GAAA,CAAC,GAAAA,aAAA;IACZE,GAAG,GAAAT,IAAA,CAAHS,GAAG;IACHC,GAAG,GAAAV,IAAA,CAAHU,GAAG;IAAAC,WAAA,GAAAX,IAAA,CACHY,MAAM;AAANA,IAAAA,MAAM,GAAAD,WAAA,KAAG,KAAA,CAAA,GAAA,EAAE,GAAAA,WAAA;IACXE,MAAM,GAAAb,IAAA,CAANa,MAAM;IACNC,QAAQ,GAAAd,IAAA,CAARc,QAAQ;IACRC,IAAI,GAAAf,IAAA,CAAJe,IAAI;IAAAC,qBAAA,GAAAhB,IAAA,CACJiB,gBAAgB;AAAhBA,IAAAA,gBAAgB,GAAAD,qBAAA,KAAG,KAAA,CAAA,GAAA,KAAK,GAAAA,qBAAA;IAAAE,gBAAA,GAAAlB,IAAA,CACxBmB,WAAW;AAAXA,IAAAA,WAAW,GAAAD,gBAAA,KAAG,KAAA,CAAA,GAAA,CAAC,GAAAA,gBAAA;IAAAE,cAAA,GAAApB,IAAA,CACfqB,SAAS;AAATA,IAAAA,SAA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,EAAEA,QAAS;AACnBpC,IAAAA,GAAG,EAAEA,GAAI;AACTC,IAAAA,GAAG,EAAEA,GAAI;AACTY,IAAAA,KAAK,EAAEA,KAAM;AACbR,IAAAA,QAAQ,EAAEA,QAAS;AACnBX,IAAAA,WAAW,EAAEA,WAAAA;AAAY,GAAA,EACrBqB,IAAI,CACX,CACJ,EACAwB,yBAAyB,iBAAIqB,KAAA,CAAAC,aAAA,CAACe,WAAW,EAAA,IAAA,EAAE/D,KAAmB,CACpD,CACR,CAAC,CAAA;AAEpB,CACJ;;;;"}
1
+ {"version":3,"file":"Handler.js","sources":["../../../../../src/components/Slider/ui/Handler/Handler.tsx"],"sourcesContent":["import React, { useRef, forwardRef, KeyboardEvent } from 'react';\nimport Draggable, { DraggableEventHandler } from 'react-draggable';\nimport type { DraggableData } from 'react-draggable';\n\nimport { getSliderThumbValue, getOffsets } from '../../utils';\nimport { Thumb } from '../Thumb/Thumb';\n\nimport type { HandlerProps } from './Handler.types';\nimport { HandlerStyled, StyledValue } from './Handler.styles';\n\n// TODO: PLASMA-1707\ndeclare module 'react-draggable' {\n export interface DraggableProps {\n children: React.ReactNode;\n }\n}\n\nconst KeyboardSupport = {\n PageUp: 33,\n PageDown: 34,\n End: 35,\n Home: 36,\n ArrowLeft: 37,\n ArrowUp: 38,\n ArrowRight: 39,\n ArrowDown: 40,\n};\n\nexport const Handler = forwardRef<HTMLDivElement, HandlerProps>(\n (\n {\n stepSize,\n onChangeCommitted,\n onChange,\n xPosition = 0,\n min,\n max,\n bounds = [],\n zIndex,\n disabled,\n side,\n showCurrentValue = false,\n startOffset = 0,\n endOffset = 0,\n value,\n ...rest\n },\n ref,\n ) => {\n const lastOnChangeValue = useRef<number>();\n\n const [offsetLeft, offsetRight] = getOffsets(ref, side);\n\n const [leftValueBound, rightValueBound] = bounds;\n const leftPositionBound = leftValueBound ? (leftValueBound - min) * stepSize : null;\n const rightPositionBound = rightValueBound ? (rightValueBound - min) * stepSize : null;\n\n const position = typeof xPosition === 'number' ? { x: xPosition, y: 0 } : undefined;\n const tabIndex = disabled ? -1 : 0;\n\n const computedBounds = {\n left: (leftPositionBound ?? 0) - (offsetLeft ? stepSize : 0),\n right: (rightPositionBound ?? stepSize * (max - min)) - (offsetRight ? stepSize : 0),\n };\n\n const showCurrentValueCondition =\n showCurrentValue &&\n ((xPosition >= startOffset && xPosition <= max * stepSize - endOffset) || (xPosition === 0 && value !== 0));\n\n const onDrag: DraggableEventHandler = (_, data) => {\n const newValue = getSliderThumbValue(data.x, stepSize, min, max);\n if (lastOnChangeValue.current !== newValue) {\n onChange?.(newValue, data);\n lastOnChangeValue.current = newValue;\n }\n };\n\n const onStop: DraggableEventHandler = (_, data) => {\n const newValue = getSliderThumbValue(data.x, stepSize, min, max);\n onChangeCommitted && onChangeCommitted(newValue, data);\n };\n\n const onKeyPress = (event: KeyboardEvent<HTMLDivElement>) => {\n event.persist();\n\n const { keyCode, target } = event;\n\n if (!Object.values(KeyboardSupport).includes(keyCode)) {\n return;\n }\n\n const { ArrowUp, ArrowRight, ArrowDown, ArrowLeft, Home, End, PageDown, PageUp } = KeyboardSupport;\n\n const computedMultipleSteps = stepSize * ((rest.multipleStepSize / 100) * max);\n\n const data: DraggableData = {\n x: 0,\n deltaX: stepSize,\n lastX: xPosition,\n y: 0,\n deltaY: 0,\n lastY: 0,\n node: target as HTMLDivElement,\n };\n\n switch (keyCode) {\n case ArrowUp:\n case ArrowRight:\n data.x = xPosition + stepSize;\n break;\n case ArrowDown:\n case ArrowLeft:\n data.x = xPosition - stepSize;\n data.deltaX = -stepSize;\n break;\n case PageUp:\n data.x = xPosition + computedMultipleSteps;\n data.deltaX = computedMultipleSteps;\n break;\n case PageDown:\n data.x = xPosition - computedMultipleSteps;\n data.deltaX = -computedMultipleSteps;\n break;\n case End:\n data.x = max * stepSize;\n break;\n case Home:\n data.x = 0;\n break;\n default:\n data.x = 0;\n }\n\n const { left, right } = computedBounds;\n\n /*\n * INFO: Находим значение в диапазоне между указанными левой и правой границами.\n * Необходимо для правильного расчета положения SliderThumb.\n * см. функция clamp\n */\n const boundedValue = Math.max(Math.min(right, data.x), left);\n\n const computedValue = getSliderThumbValue(boundedValue, stepSize, min, max);\n lastOnChangeValue.current = computedValue;\n\n onChangeCommitted && onChangeCommitted(computedValue, data);\n };\n\n return (\n <Draggable\n axis=\"x\"\n bounds={computedBounds}\n grid={[stepSize, 1]}\n onStop={onStop}\n onDrag={onDrag}\n position={position}\n disabled={disabled}\n >\n <HandlerStyled ref={ref} style={{ zIndex }} onKeyDown={onKeyPress}>\n <Thumb tabIndex={tabIndex} min={min} max={max} value={value} disabled={disabled} {...rest} />\n {showCurrentValueCondition && <StyledValue>{value}</StyledValue>}\n </HandlerStyled>\n </Draggable>\n );\n },\n);\n"],"names":["KeyboardSupport","PageUp","PageDown","End","Home","ArrowLeft","ArrowUp","ArrowRight","ArrowDown","Handler","forwardRef","_ref","ref","stepSize","onChangeCommitted","onChange","_ref$xPosition","xPosition","min","max","_ref$bounds","bounds","zIndex","disabled","side","_ref$showCurrentValue","showCurrentValue","_ref$startOffset","startOffset","_ref$endOffset","endOffset","value","rest","_objectWithoutProperties","_excluded","lastOnChangeValue","useRef","_getOffsets","getOffsets","_getOffsets2","_slicedToArray","offsetLeft","offsetRight","_bounds","leftValueBound","rightValueBound","leftPositionBound","rightPositionBound","position","x","y","undefined","tabIndex","computedBounds","left","right","showCurrentValueCondition","onDrag","_","data","newValue","getSliderThumbValue","current","onStop","onKeyPress","event","persist","keyCode","target","Object","values","includes","computedMultipleSteps","multipleStepSize","deltaX","lastX","deltaY","lastY","node","boundedValue","Math","computedValue","React","createElement","Draggable","axis","grid","HandlerStyled","style","onKeyDown","Thumb","_extends","StyledValue"],"mappings":";;;;;;;;;AAUA;;AAOA,IAAMA,eAAe,GAAG;AACpBC,EAAAA,MAAM,EAAE,EAAE;AACVC,EAAAA,QAAQ,EAAE,EAAE;AACZC,EAAAA,GAAG,EAAE,EAAE;AACPC,EAAAA,IAAI,E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,EAAA;AACNC,IAAAA,IAAI,EAAC,GAAG;AACRhE,IAAAA,MAAM,EAAEgC,cAAe;AACvBiC,IAAAA,IAAI,EAAE,CAACzE,QAAQ,EAAE,CAAC,CAAE;AACpBkD,IAAAA,MAAM,EAAEA,MAAO;AACfN,IAAAA,MAAM,EAAEA,MAAO;AACfT,IAAAA,QAAQ,EAAEA,QAAS;AACnBzB,IAAAA,QAAQ,EAAEA,QAAAA;AAAS,GAAA,eAEnB2D,KAAA,CAAAC,aAAA,CAACI,aAAa,EAAA;AAAC3E,IAAAA,GAAG,EAAEA,GAAI;AAAC4E,IAAAA,KAAK,EAAE;AAAElE,MAAAA,MAAM,EAANA,MAAAA;KAAS;AAACmE,IAAAA,SAAS,EAAEzB,UAAAA;AAAW,GAAA,eAC9DkB,KAAA,CAAAC,aAAA,CAACO,KAAK,EAAAC,QAAA,CAAA;AAACvC,IAAAA,QAAQ,EAAEA,QAAS;AAAClC,IAAAA,GAAG,EAAEA,GAAI;AAACC,IAAAA,GAAG,EAAEA,GAAI;AAACY,IAAAA,KAAK,EAAEA,KAAM;AAACR,IAAAA,QAAQ,EAAEA,QAAAA;AAAS,GAAA,EAAKS,IAAI,CAAG,CAAC,EAC5FwB,yBAAyB,iBAAI0B,KAAA,CAAAC,aAAA,CAACS,WAAW,EAAA,IAAA,EAAE7D,KAAmB,CACpD,CACR,CAAC,CAAA;AAEpB,CACJ;;;;"}
@@ -1,26 +1,16 @@
1
- import './Handler.styles_irtcgm.css';
1
+ import './Handler.styles_8crx5z.css';
2
2
  import { styled } from '@linaria/react';
3
- import { tokens } from '../../Slider.tokens.js';
4
3
 
4
+ var HandlerStyled = /*#__PURE__*/styled('div')({
5
+ name: "HandlerStyled",
6
+ "class": "h1tnrnip",
7
+ propsAsIs: false
8
+ });
5
9
  var StyledValue = /*#__PURE__*/styled('span')({
6
10
  name: "StyledValue",
7
- "class": "s1tnrnip",
11
+ "class": "s12uu2lj",
8
12
  propsAsIs: false
9
13
  });
10
- var _exp8 = function _exp8() {
11
- return function (_ref) {
12
- var isLarge = _ref.isLarge;
13
- return isLarge ? "var(".concat(tokens.thumbSizeLarge, ")") : "var(".concat(tokens.thumbSize, ")");
14
- };
15
- };
16
- var HandlerStyled = /*#__PURE__*/styled('div')({
17
- name: "HandlerStyled",
18
- "class": "h12uu2lj",
19
- propsAsIs: false,
20
- vars: {
21
- "h12uu2lj-0": [/*#__PURE__*/_exp8()]
22
- }
23
- });
24
14
 
25
15
  export { HandlerStyled, StyledValue };
26
16
  //# sourceMappingURL=Handler.styles.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"Handler.styles.js","sources":["../../../../../src/components/Slider/ui/Handler/Handler.styles.ts"],"sourcesContent":["import { styled } from '@linaria/react';\n\nimport { classes, tokens } from '../../Slider.tokens';\n\nexport const StyledValue = styled.span<{ isLargeThumb?: boolean }>`\n position: absolute;\n z-index: 1;\n top: var(${tokens.currentValueTopOffset});\n text-align: center;\n width: 100%;\n margin-left: -0.125rem;\n display: flex;\n justify-content: center;\n font-family: var(${tokens.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\nexport const HandlerStyled = styled.div<{ isLarge?: boolean }>`\n cursor: pointer;\n position: absolute;\n z-index: 1;\n top: 0;\n left: 0;\n bottom: 0;\n display: flex;\n align-items: center;\n justify-content: center;\n\n --thumb-size: ${({ isLarge }) => (isLarge ? `var(${tokens.thumbSizeLarge})` : `var(${tokens.thumbSize})`)};\n\n &.${classes.verticalOrientation} {\n right: 0;\n bottom: auto;\n align-items: flex-start;\n justify-content: center;\n\n ${StyledValue} {\n margin: 0;\n top: 0;\n bottom: 0;\n right: 0;\n left: calc(var(${tokens.size}) - (var(${tokens.size}) - var(--thumb-size)) / 2 + 0.25rem);\n align-items: center;\n justify-content: flex-start;\n }\n }\n\n &.${classes.valuePlacementLeft} {\n ${StyledValue} {\n left: auto;\n right: calc(var(${tokens.size}) - (var(${tokens.size}) - var(--thumb-size)) / 2 + 0.3125rem);\n justify-content: flex-end;\n }\n }\n`;\n"],"names":["StyledValue","styled","name","class","propsAsIs","_exp8","_ref","isLarge","concat","tokens","thumbSizeLarge","thumbSize","HandlerStyled","vars"],"mappings":";;;AAIO,IAAMA,WAAW,gBAAGC,MAAM,CAAA,MAAA,CAAA,CAAA;AAAAC,EAAAA,IAAA,EAAA,aAAA;AAAAC,EAAAA,OAAAA,EAAA,UAAA;AAAAC,EAAAA,SAAA,EAAA,KAAA;AAAA,CAehC,EAAA;AAAC,IAAAC,KAAA,GAlBgBA,SAkBhBA,KAAAA,GAAA;AAAA,EAAA,OAakB,UAAAC,IAAA,EAAA;AAAA,IAAA,IAAGC,OAAAA,GAAAA,IAAAA,CAAAA,OAAAA,CAAAA;AAAAA,IAAAA,OAAeA,OAAO,GAAA,MAAA,CAAAC,MAAA,CAAUC,MAAM,CAACC,cAAe,EAAA,GAAA,CAAA,GAAA,MAAA,CAAAF,MAAA,CAAYC,MAAM,CAACE,SAAU,EAAG,GAAA,CAAA,CAAA;AAAA,GAAA,CAAA;AAAA,CAAA,CAAA;AAXtG,IAAMC,aAAa,gBAAGX,MAAM,CAAA,KAAA,CAAA,CAAA;AAAAC,EAAAA,IAAA,EAAA,eAAA;AAAAC,EAAAA,OAAAA,EAAA,UAAA;AAAAC,EAAAA,SAAA,EAAA,KAAA;AAAAS,EAAAA,IAAA,EAAA;AAAA,IAAA,YAAA,EAAA,cAWfR,KAAyF,EAAA,CAAA;AAAA,GAAA;AAAA,CA0B5G;;;;"}
1
+ {"version":3,"file":"Handler.styles.js","sources":["../../../../../src/components/Slider/ui/Handler/Handler.styles.ts"],"sourcesContent":["import { styled } from '@linaria/react';\n\nimport { tokens } from '../../Slider.tokens';\n\nexport const HandlerStyled = styled.div`\n cursor: pointer;\n position: absolute;\n z-index: 1;\n top: 0;\n left: 0;\n`;\n\nexport const StyledValue = styled.span`\n position: absolute;\n z-index: 1;\n top: var(${tokens.currentValueTopOffset});\n text-align: center;\n width: 100%;\n margin-left: -0.125rem;\n display: flex;\n justify-content: center;\n font-family: var(${tokens.currentValueFontFamily});\n font-size: var(${tokens.currentValueFontSize});\n font-style: var(${tokens.currentValueFontStyle});\n font-weight: var(${tokens.currentValueFontWeight});\n letter-spacing: var(${tokens.currentValueLetterSpacing});\n line-height: var(${tokens.currentValueLineHeight});\n`;\n"],"names":["HandlerStyled","styled","name","class","propsAsIs","StyledValue"],"mappings":";;AAIO,IAAMA,aAAa,gBAAGC,MAAM,CAAA,KAAA,CAAA,CAAA;AAAAC,EAAAA,IAAA,EAAA,eAAA;AAAAC,EAAAA,OAAAA,EAAA,UAAA;AAAAC,EAAAA,SAAA,EAAA,KAAA;AAAA,CAMlC,EAAA;AAEM,IAAMC,WAAW,gBAAGJ,MAAM,CAAA,MAAA,CAAA,CAAA;AAAAC,EAAAA,IAAA,EAAA,aAAA;AAAAC,EAAAA,OAAAA,EAAA,UAAA;AAAAC,EAAAA,SAAA,EAAA,KAAA;AAAA,CAehC;;;;"}
@@ -0,0 +1,2 @@
1
+ .h1tnrnip{cursor:pointer;position:absolute;z-index:1;top:0;left:0;}
2
+ .s12uu2lj{position:absolute;z-index:1;top:var(--plasma-slider-current-value-top-offset);text-align:center;width:100%;margin-left:-0.125rem;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-box-pack:center;-webkit-justify-content:center;-ms-flex-pack:center;justify-content:center;font-family:var(--plasma-slider-current-value-font-family);font-size:var(--plasma-slider-current-value-font-size);font-style:var(--plasma-slider-current-value-font-style);font-weight:var(--plasma-slider-current-value-font-weight);-webkit-letter-spacing:var(--plasma-slider-current-value-letter-spacing);-moz-letter-spacing:var(--plasma-slider-current-value-letter-spacing);-ms-letter-spacing:var(--plasma-slider-current-value-letter-spacing);letter-spacing:var(--plasma-slider-current-value-letter-spacing);line-height:var(--plasma-slider-current-value-line-height);}
@@ -1 +1 @@
1
- .Thumb_styles_uyn20e_tqbdf8b__de0962c7{width:var(--thumb-size);height:var(--thumb-size);min-width:var(--thumb-size);min-height:var(--thumb-size);position:relative;border-radius:50%;box-sizing:border-box;background:var(--plasma-slider-thumb-background-color);margin:0.0625rem;-webkit-transition:border-color 0.1s ease-in-out;transition:border-color 0.1s ease-in-out;position:relative;}.Thumb_styles_uyn20e_tqbdf8b__de0962c7:after{background:var(--plasma-slider-thumb-border-color);margin:-0.0625rem;content:'';position:absolute;inset:0;z-index:-1;border-radius:inherit;}.Thumb_styles_uyn20e_tqbdf8b__de0962c7:not([disabled]):hover:after,.Thumb_styles_uyn20e_tqbdf8b__de0962c7:not([disabled]):active:after{background:var(--plasma-slider-thumb-focus-border-color);}.Thumb_styles_uyn20e_tqbdf8b__de0962c7[disabled]{cursor:not-allowed;}.Thumb_styles_uyn20e_tqbdf8b__de0962c7:focus{outline:none;}.Thumb_styles_uyn20e_tqbdf8b__de0962c7::before{content:'';position:absolute;top:0.0625rem;left:0.0625rem;right:0.0625rem;bottom:0.0625rem;z-index:1;display:block;box-sizing:content-box;border:0.125rem solid transparent;border-radius:50%;-webkit-transition:box-shadow 0.2s ease-in-out;transition:box-shadow 0.2s ease-in-out;pointer-events:none;}.Thumb_styles_uyn20e_tqbdf8b__de0962c7.Thumb_styles_uyn20e_focusVisible__de0962c7:focus::before,.Thumb_styles_uyn20e_tqbdf8b__de0962c7[data-focus-visible-added]::before{outline:none;box-shadow:0 0 0 0.125rem var(--plasma-slider-thumb-focus-border-color);}
1
+ .Thumb_styles_4w4gzn_tqbdf8b__14129a5b{width:var(--plasma-slider-thumb-size);height:var(--plasma-slider-thumb-size);position:relative;left:-0.125rem;top:-0.125rem;border-radius:50%;box-sizing:border-box;background:var(--plasma-slider-thumb-background-color);margin:0.125rem;-webkit-transition:border-color 0.1s ease-in-out;transition:border-color 0.1s ease-in-out;position:relative;}.Thumb_styles_4w4gzn_tqbdf8b__14129a5b:after{background:var(--plasma-slider-thumb-border-color);margin:-0.125rem;content:'';position:absolute;inset:0;z-index:-1;border-radius:inherit;}.Thumb_styles_4w4gzn_tqbdf8b__14129a5b:not([disabled]):hover:after,.Thumb_styles_4w4gzn_tqbdf8b__14129a5b:not([disabled]):active:after{background:var(--plasma-slider-thumb-focus-border-color);}.Thumb_styles_4w4gzn_tqbdf8b__14129a5b[disabled]{cursor:not-allowed;}.Thumb_styles_4w4gzn_tqbdf8b__14129a5b:focus{outline:none;}.Thumb_styles_4w4gzn_tqbdf8b__14129a5b::before{content:'';position:absolute;top:0.125rem;left:0.125rem;right:0.125rem;bottom:0.125rem;z-index:1;display:block;box-sizing:content-box;border:0.125rem solid transparent;border-radius:50%;-webkit-transition:box-shadow 0.2s ease-in-out;transition:box-shadow 0.2s ease-in-out;pointer-events:none;}.Thumb_styles_4w4gzn_tqbdf8b__14129a5b.Thumb_styles_4w4gzn_focusVisible__14129a5b:focus::before,.Thumb_styles_4w4gzn_tqbdf8b__14129a5b[data-focus-visible-added]::before{outline:none;box-shadow:0 0 0 0.125rem var(--plasma-slider-thumb-focus-border-color);}
@@ -2,7 +2,7 @@ import { objectWithoutProperties as _objectWithoutProperties, extends as _extend
2
2
  import React from 'react';
3
3
  import { ThumbBase } from './Thumb.styles.js';
4
4
 
5
- var _excluded = ["min", "max", "value", "ariaValueMin", "ariaLabel", "disabled", "orientation"];
5
+ var _excluded = ["min", "max", "value", "ariaValueMin", "ariaLabel", "disabled"];
6
6
  var Thumb = function Thumb(_ref) {
7
7
  var min = _ref.min,
8
8
  max = _ref.max,
@@ -11,7 +11,6 @@ var Thumb = function Thumb(_ref) {
11
11
  ariaValueMin = _ref$ariaValueMin === void 0 ? min : _ref$ariaValueMin,
12
12
  ariaLabel = _ref.ariaLabel,
13
13
  disabled = _ref.disabled,
14
- orientation = _ref.orientation,
15
14
  rest = _objectWithoutProperties(_ref, _excluded);
16
15
  return /*#__PURE__*/React.createElement(ThumbBase, _extends({
17
16
  role: "slider",
@@ -20,7 +19,7 @@ var Thumb = function Thumb(_ref) {
20
19
  "aria-valuemax": max,
21
20
  "aria-valuenow": value,
22
21
  disabled: disabled,
23
- "aria-orientation": orientation
22
+ "aria-orientation": "horizontal"
24
23
  }, rest));
25
24
  };
26
25
 
@@ -1 +1 @@
1
- {"version":3,"file":"Thumb.js","sources":["../../../../../src/components/Slider/ui/Thumb/Thumb.tsx"],"sourcesContent":["import React from 'react';\n\nimport type { ThumbProps } from './Thumb.types';\nimport { ThumbBase } from './Thumb.styles';\n\nexport const Thumb = ({\n min,\n max,\n value,\n ariaValueMin = min,\n ariaLabel,\n disabled,\n orientation,\n ...rest\n}: ThumbProps) => {\n return (\n <ThumbBase\n role=\"slider\"\n aria-label={ariaLabel}\n aria-valuemin={ariaValueMin}\n aria-valuemax={max}\n aria-valuenow={value}\n disabled={disabled}\n aria-orientation={orientation}\n {...rest}\n />\n );\n};\n"],"names":["Thumb","_ref","min","max","value","_ref$ariaValueMin","ariaValueMin","ariaLabel","disabled","orientation","rest","_objectWithoutProperties","_excluded","React","createElement","ThumbBase","_extends","role"],"mappings":";;;;;IAKaA,KAAK,GAAG,SAARA,KAAKA,CAAAC,IAAA,EASA;AAAA,EAAA,IARdC,GAAG,GAAAD,IAAA,CAAHC,GAAG;IACHC,GAAG,GAAAF,IAAA,CAAHE,GAAG;IACHC,KAAK,GAAAH,IAAA,CAALG,KAAK;IAAAC,iBAAA,GAAAJ,IAAA,CACLK,YAAY;AAAZA,IAAAA,YAAY,GAAAD,iBAAA,KAAGH,KAAAA,CAAAA,GAAAA,GAAG,GAAAG,iBAAA;IAClBE,SAAS,GAAAN,IAAA,CAATM,SAAS;IACTC,QAAQ,GAAAP,IAAA,CAARO,QAAQ;IACRC,WAAW,GAAAR,IAAA,CAAXQ,WAAW;AACRC,IAAAA,IAAI,GAAAC,wBAAA,CAAAV,IAAA,EAAAW,SAAA,CAAA,CAAA;AAEP,EAAA,oBACIC,KAAA,CAAAC,aAAA,CAACC,SAAS,EAAAC,QAAA,CAAA;AACNC,IAAAA,IAAI,EAAC,QAAQ;AACb,IAAA,YAAA,EAAYV,SAAU;AACtB,IAAA,eAAA,EAAeD,YAAa;AAC5B,IAAA,eAAA,EAAeH,GAAI;AACnB,IAAA,eAAA,EAAeC,KAAM;AACrBI,IAAAA,QAAQ,EAAEA,QAAS;IACnB,kBAAkBC,EAAAA,WAAAA;GACdC,EAAAA,IAAI,CACX,CAAC,CAAA;AAEV;;;;"}
1
+ {"version":3,"file":"Thumb.js","sources":["../../../../../src/components/Slider/ui/Thumb/Thumb.tsx"],"sourcesContent":["import React from 'react';\n\nimport type { ThumbProps } from './Thumb.types';\nimport { ThumbBase } from './Thumb.styles';\n\nexport const Thumb = ({ min, max, value, ariaValueMin = min, ariaLabel, disabled, ...rest }: ThumbProps) => {\n return (\n <ThumbBase\n role=\"slider\"\n aria-label={ariaLabel}\n aria-valuemin={ariaValueMin}\n aria-valuemax={max}\n aria-valuenow={value}\n disabled={disabled}\n aria-orientation=\"horizontal\"\n {...rest}\n />\n );\n};\n"],"names":["Thumb","_ref","min","max","value","_ref$ariaValueMin","ariaValueMin","ariaLabel","disabled","rest","_objectWithoutProperties","_excluded","React","createElement","ThumbBase","_extends","role"],"mappings":";;;;;IAKaA,KAAK,GAAG,SAARA,KAAKA,CAAAC,IAAA,EAA0F;AAAA,EAAA,IAApFC,GAAG,GAAAD,IAAA,CAAHC,GAAG;IAAEC,GAAG,GAAAF,IAAA,CAAHE,GAAG;IAAEC,KAAK,GAAAH,IAAA,CAALG,KAAK;IAAAC,iBAAA,GAAAJ,IAAA,CAAEK,YAAY;AAAZA,IAAAA,YAAY,GAAAD,iBAAA,KAAGH,KAAAA,CAAAA,GAAAA,GAAG,GAAAG,iBAAA;IAAEE,SAAS,GAAAN,IAAA,CAATM,SAAS;IAAEC,QAAQ,GAAAP,IAAA,CAARO,QAAQ;AAAKC,IAAAA,IAAI,GAAAC,wBAAA,CAAAT,IAAA,EAAAU,SAAA,CAAA,CAAA;AACrF,EAAA,oBACIC,KAAA,CAAAC,aAAA,CAACC,SAAS,EAAAC,QAAA,CAAA;AACNC,IAAAA,IAAI,EAAC,QAAQ;AACb,IAAA,YAAA,EAAYT,SAAU;AACtB,IAAA,eAAA,EAAeD,YAAa;AAC5B,IAAA,eAAA,EAAeH,GAAI;AACnB,IAAA,eAAA,EAAeC,KAAM;AACrBI,IAAAA,QAAQ,EAAEA,QAAS;IACnB,kBAAiB,EAAA,YAAA;GACbC,EAAAA,IAAI,CACX,CAAC,CAAA;AAEV;;;;"}
@@ -1,4 +1,4 @@
1
- import './Thumb.styles_uyn20e.css';
1
+ import './Thumb.styles_4w4gzn.css';
2
2
  import { styled } from '@linaria/react';
3
3
 
4
4
  var ThumbBase = /*#__PURE__*/styled('div')({
@@ -1 +1 @@
1
- {"version":3,"file":"Thumb.styles.js","sources":["../../../../../src/components/Slider/ui/Thumb/Thumb.styles.ts"],"sourcesContent":["import { styled } from '@linaria/react';\n\nimport { addFocus } from '../../../../mixins';\nimport { tokens } from '../../Slider.tokens';\n\nexport const ThumbBase = styled.div<{ disabled?: boolean }>`\n width: var(--thumb-size);\n height: var(--thumb-size);\n min-width: var(--thumb-size);\n min-height: var(--thumb-size);\n\n position: relative;\n border-radius: 50%;\n box-sizing: border-box;\n background: var(${tokens.thumbBackgroundColor});\n margin: 0.0625rem;\n transition: border-color 0.1s ease-in-out;\n\n &:after {\n background: var(${tokens.thumbBorderColor});\n margin: -0.0625rem;\n content: '';\n position: absolute;\n inset: 0;\n z-index: -1;\n border-radius: inherit;\n }\n\n &:not([disabled]):hover:after,\n &:not([disabled]):active:after {\n background: var(${tokens.thumbFocusBorderColor});\n }\n\n &[disabled] {\n cursor: not-allowed;\n }\n\n &:focus {\n outline: none;\n }\n\n ${addFocus({\n outlineOffset: '0.0625rem',\n outlineSize: '0.125rem',\n outlineRadius: '50%',\n outlineColor: `var(${tokens.thumbFocusBorderColor})`,\n })}\n`;\n"],"names":["ThumbBase","styled","name","class","propsAsIs"],"mappings":";;AAKO,IAAMA,SAAS,gBAAGC,MAAM,CAAA,KAAA,CAAA,CAAA;AAAAC,EAAAA,IAAA,EAAA,WAAA;AAAAC,EAAAA,OAAAA,EAAA,SAAA;AAAAC,EAAAA,SAAA,EAAA,KAAA;AAAA,CA0C9B;;;;"}
1
+ {"version":3,"file":"Thumb.styles.js","sources":["../../../../../src/components/Slider/ui/Thumb/Thumb.styles.ts"],"sourcesContent":["import { styled } from '@linaria/react';\n\nimport { addFocus } from '../../../../mixins';\nimport { tokens } from '../../Slider.tokens';\n\nexport const ThumbBase = styled.div<{ disabled?: boolean }>`\n width: var(${tokens.thumbSize});\n height: var(${tokens.thumbSize});\n position: relative;\n left: -0.125rem;\n top: -0.125rem;\n border-radius: 50%;\n box-sizing: border-box;\n background: var(${tokens.thumbBackgroundColor});\n margin: 0.125rem;\n transition: border-color 0.1s ease-in-out;\n\n &:after {\n background: var(${tokens.thumbBorderColor});\n margin: -0.125rem;\n content: '';\n position: absolute;\n inset: 0;\n z-index: -1;\n border-radius: inherit;\n }\n\n &:not([disabled]):hover:after,\n &:not([disabled]):active:after {\n background: var(${tokens.thumbFocusBorderColor});\n }\n\n &[disabled] {\n cursor: not-allowed;\n }\n\n &:focus {\n outline: none;\n }\n\n ${addFocus({\n outlineOffset: '0.125rem',\n outlineSize: '0.125rem',\n outlineRadius: '50%',\n outlineColor: `var(${tokens.thumbFocusBorderColor})`,\n })}\n`;\n"],"names":["ThumbBase","styled","name","class","propsAsIs"],"mappings":";;AAKO,IAAMA,SAAS,gBAAGC,MAAM,CAAA,KAAA,CAAA,CAAA;AAAAC,EAAAA,IAAA,EAAA,WAAA;AAAAC,EAAAA,OAAAA,EAAA,SAAA;AAAAC,EAAAA,SAAA,EAAA,KAAA;AAAA,CAyC9B;;;;"}
@@ -0,0 +1 @@
1
+ .tqbdf8b{width:var(--plasma-slider-thumb-size);height:var(--plasma-slider-thumb-size);position:relative;left:-0.125rem;top:-0.125rem;border-radius:50%;box-sizing:border-box;background:var(--plasma-slider-thumb-background-color);margin:0.125rem;-webkit-transition:border-color 0.1s ease-in-out;transition:border-color 0.1s ease-in-out;position:relative;}.tqbdf8b:after{background:var(--plasma-slider-thumb-border-color);margin:-0.125rem;content:'';position:absolute;inset:0;z-index:-1;border-radius:inherit;}.tqbdf8b:not([disabled]):hover:after,.tqbdf8b:not([disabled]):active:after{background:var(--plasma-slider-thumb-focus-border-color);}.tqbdf8b[disabled]{cursor:not-allowed;}.tqbdf8b:focus{outline:none;}.tqbdf8b::before{content:'';position:absolute;top:0.125rem;left:0.125rem;right:0.125rem;bottom:0.125rem;z-index:1;display:block;box-sizing:content-box;border:0.125rem solid transparent;border-radius:50%;-webkit-transition:box-shadow 0.2s ease-in-out;transition:box-shadow 0.2s ease-in-out;pointer-events:none;}.tqbdf8b.focus-visible:focus::before,.tqbdf8b[data-focus-visible-added]::before{outline:none;box-shadow:0 0 0 0.125rem var(--plasma-slider-thumb-focus-border-color);}
@@ -6,8 +6,8 @@
6
6
  * @param {number} max
7
7
  * @return {number}
8
8
  */
9
- function getSliderThumbValue(handleCenterPosRelative, stepSize, min, max) {
10
- var newValue = Math.round(handleCenterPosRelative / stepSize) + min;
9
+ function getSliderThumbValue(handleCenterXRelative, stepSize, min, max) {
10
+ var newValue = Math.round(handleCenterXRelative / stepSize) + min;
11
11
  return Math.min(Math.max(newValue, min), max);
12
12
  }
13
13
 
@@ -18,11 +18,11 @@ function getSliderThumbValue(handleCenterPosRelative, stepSize, min, max) {
18
18
  * @param {'left' | 'right'} side
19
19
  * @return Array<number>
20
20
  */
21
- function getOffsets(ref, side, isVertical) {
21
+ function getOffsets(ref, side) {
22
22
  if (!ref || !('current' in ref) || !ref.current || !side) {
23
23
  return [0, 0];
24
24
  }
25
- var size = isVertical ? ref.current.clientHeight : ref.current.clientWidth;
25
+ var size = ref.current.clientWidth;
26
26
  if (side === 'left') {
27
27
  return [0, size];
28
28
  }
@@ -33,34 +33,16 @@ function getOffsets(ref, side, isVertical) {
33
33
  }
34
34
  var sizeData = {
35
35
  s: {
36
- small: {
37
- indent: 0.5,
38
- fontSizeMultiplier: 16
39
- },
40
- large: {
41
- indent: 0.625,
42
- fontSizeMultiplier: 16
43
- }
36
+ indent: 0.5,
37
+ fontSizeMultiplier: 16
44
38
  },
45
39
  m: {
46
- small: {
47
- indent: 0.5,
48
- fontSizeMultiplier: 16
49
- },
50
- large: {
51
- indent: 0.625,
52
- fontSizeMultiplier: 16
53
- }
40
+ indent: 0.75,
41
+ fontSizeMultiplier: 16
54
42
  },
55
43
  l: {
56
- small: {
57
- indent: 0.5,
58
- fontSizeMultiplier: 16
59
- },
60
- large: {
61
- indent: 0.625,
62
- fontSizeMultiplier: 16
63
- }
44
+ indent: 0.75,
45
+ fontSizeMultiplier: 16
64
46
  }
65
47
  };
66
48
 
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sources":["../../../../src/components/Slider/utils/index.ts"],"sourcesContent":["import { MutableRefObject } from 'react';\n\n/**\n * Расчитать значение слайдера с учетом его координат и шага изменений.\n * @param {number} handleCenterXRelative\n * @param {number} stepSize\n * @param {number} min\n * @param {number} max\n * @return {number}\n */\nexport function getSliderThumbValue(handleCenterPosRelative: number, stepSize: number, min: number, max: number) {\n const newValue = Math.round(handleCenterPosRelative / stepSize) + min;\n\n return Math.min(Math.max(newValue, min), max);\n}\n\n/**\n * Расчитывает значение отступа слайдера на основе его положения (справа, слева) на отрезке слайдера.\n * Значение используется для правильного расчета ограничения движения слайдера.\n * @param ref\n * @param {'left' | 'right'} side\n * @return Array<number>\n */\nexport function getOffsets(\n ref: ((instance: HTMLDivElement | null) => void) | MutableRefObject<HTMLDivElement | null> | null,\n side?: 'left' | 'right',\n isVertical?: boolean,\n): number[] {\n if (!ref || !('current' in ref) || !ref.current || !side) {\n return [0, 0];\n }\n\n const size = isVertical ? ref.current.clientHeight : ref.current.clientWidth;\n\n if (side === 'left') {\n return [0, size];\n }\n\n if (side === 'right') {\n return [size, 0];\n }\n\n return [0, 0];\n}\n\nexport const sizeData = {\n s: {\n small: {\n indent: 0.5,\n fontSizeMultiplier: 16,\n },\n large: {\n indent: 0.625,\n fontSizeMultiplier: 16,\n },\n },\n m: {\n small: {\n indent: 0.5,\n fontSizeMultiplier: 16,\n },\n large: {\n indent: 0.625,\n fontSizeMultiplier: 16,\n },\n },\n l: {\n small: {\n indent: 0.5,\n fontSizeMultiplier: 16,\n },\n large: {\n indent: 0.625,\n fontSizeMultiplier: 16,\n },\n },\n};\n"],"names":["getSliderThumbValue","handleCenterPosRelative","stepSize","min","max","newValue","Math","round","getOffsets","ref","side","isVertical","current","size","clientHeight","clientWidth","sizeData","s","small","indent","fontSizeMultiplier","large","m","l"],"mappings":"AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,SAASA,mBAAmBA,CAACC,uBAA+B,EAAEC,QAAgB,EAAEC,GAAW,EAAEC,GAAW,EAAE;EAC7G,IAAMC,QAAQ,GAAGC,IAAI,CAACC,KAAK,CAACN,uBAAuB,GAAGC,QAAQ,CAAC,GAAGC,GAAG,CAAA;AAErE,EAAA,OAAOG,IAAI,CAACH,GAAG,CAACG,IAAI,CAACF,GAAG,CAACC,QAAQ,EAAEF,GAAG,CAAC,EAAEC,GAAG,CAAC,CAAA;AACjD,CAAA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,SAASI,UAAUA,CACtBC,GAAiG,EACjGC,IAAuB,EACvBC,UAAoB,EACZ;AACR,EAAA,IAAI,CAACF,GAAG,IAAI,EAAE,SAAS,IAAIA,GAAG,CAAC,IAAI,CAACA,GAAG,CAACG,OAAO,IAAI,CAACF,IAAI,EAAE;AACtD,IAAA,OAAO,CAAC,CAAC,EAAE,CAAC,CAAC,CAAA;AACjB,GAAA;AAEA,EAAA,IAAMG,IAAI,GAAGF,UAAU,GAAGF,GAAG,CAACG,OAAO,CAACE,YAAY,GAAGL,GAAG,CAACG,OAAO,CAACG,WAAW,CAAA;EAE5E,IAAIL,IAAI,KAAK,MAAM,EAAE;AACjB,IAAA,OAAO,CAAC,CAAC,EAAEG,IAAI,CAAC,CAAA;AACpB,GAAA;EAEA,IAAIH,IAAI,KAAK,OAAO,EAAE;AAClB,IAAA,OAAO,CAACG,IAAI,EAAE,CAAC,CAAC,CAAA;AACpB,GAAA;AAEA,EAAA,OAAO,CAAC,CAAC,EAAE,CAAC,CAAC,CAAA;AACjB,CAAA;AAEO,IAAMG,QAAQ,GAAG;AACpBC,EAAAA,CAAC,EAAE;AACCC,IAAAA,KAAK,EAAE;AACHC,MAAAA,MAAM,EAAE,GAAG;AACXC,MAAAA,kBAAkB,EAAE,EAAA;KACvB;AACDC,IAAAA,KAAK,EAAE;AACHF,MAAAA,MAAM,EAAE,KAAK;AACbC,MAAAA,kBAAkB,EAAE,EAAA;AACxB,KAAA;GACH;AACDE,EAAAA,CAAC,EAAE;AACCJ,IAAAA,KAAK,EAAE;AACHC,MAAAA,MAAM,EAAE,GAAG;AACXC,MAAAA,kBAAkB,EAAE,EAAA;KACvB;AACDC,IAAAA,KAAK,EAAE;AACHF,MAAAA,MAAM,EAAE,KAAK;AACbC,MAAAA,kBAAkB,EAAE,EAAA;AACxB,KAAA;GACH;AACDG,EAAAA,CAAC,EAAE;AACCL,IAAAA,KAAK,EAAE;AACHC,MAAAA,MAAM,EAAE,GAAG;AACXC,MAAAA,kBAAkB,EAAE,EAAA;KACvB;AACDC,IAAAA,KAAK,EAAE;AACHF,MAAAA,MAAM,EAAE,KAAK;AACbC,MAAAA,kBAAkB,EAAE,EAAA;AACxB,KAAA;AACJ,GAAA;AACJ;;;;"}
1
+ {"version":3,"file":"index.js","sources":["../../../../src/components/Slider/utils/index.ts"],"sourcesContent":["import { MutableRefObject } from 'react';\n\n/**\n * Расчитать значение слайдера с учетом его координат и шага изменений.\n * @param {number} handleCenterXRelative\n * @param {number} stepSize\n * @param {number} min\n * @param {number} max\n * @return {number}\n */\nexport function getSliderThumbValue(handleCenterXRelative: number, stepSize: number, min: number, max: number) {\n const newValue = Math.round(handleCenterXRelative / stepSize) + min;\n\n return Math.min(Math.max(newValue, min), max);\n}\n\n/**\n * Расчитывает значение отступа слайдера на основе его положения (справа, слева) на отрезке слайдера.\n * Значение используется для правильного расчета ограничения движения слайдера.\n * @param ref\n * @param {'left' | 'right'} side\n * @return Array<number>\n */\nexport function getOffsets(\n ref: ((instance: HTMLDivElement | null) => void) | MutableRefObject<HTMLDivElement | null> | null,\n side?: 'left' | 'right',\n): number[] {\n if (!ref || !('current' in ref) || !ref.current || !side) {\n return [0, 0];\n }\n\n const size = ref.current.clientWidth;\n\n if (side === 'left') {\n return [0, size];\n }\n\n if (side === 'right') {\n return [size, 0];\n }\n\n return [0, 0];\n}\n\nexport const sizeData = {\n s: {\n indent: 0.5,\n fontSizeMultiplier: 16,\n },\n m: {\n indent: 0.75,\n fontSizeMultiplier: 16,\n },\n l: {\n indent: 0.75,\n fontSizeMultiplier: 16,\n },\n};\n"],"names":["getSliderThumbValue","handleCenterXRelative","stepSize","min","max","newValue","Math","round","getOffsets","ref","side","current","size","clientWidth","sizeData","s","indent","fontSizeMultiplier","m","l"],"mappings":"AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,SAASA,mBAAmBA,CAACC,qBAA6B,EAAEC,QAAgB,EAAEC,GAAW,EAAEC,GAAW,EAAE;EAC3G,IAAMC,QAAQ,GAAGC,IAAI,CAACC,KAAK,CAACN,qBAAqB,GAAGC,QAAQ,CAAC,GAAGC,GAAG,CAAA;AAEnE,EAAA,OAAOG,IAAI,CAACH,GAAG,CAACG,IAAI,CAACF,GAAG,CAACC,QAAQ,EAAEF,GAAG,CAAC,EAAEC,GAAG,CAAC,CAAA;AACjD,CAAA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,SAASI,UAAUA,CACtBC,GAAiG,EACjGC,IAAuB,EACf;AACR,EAAA,IAAI,CAACD,GAAG,IAAI,EAAE,SAAS,IAAIA,GAAG,CAAC,IAAI,CAACA,GAAG,CAACE,OAAO,IAAI,CAACD,IAAI,EAAE;AACtD,IAAA,OAAO,CAAC,CAAC,EAAE,CAAC,CAAC,CAAA;AACjB,GAAA;AAEA,EAAA,IAAME,IAAI,GAAGH,GAAG,CAACE,OAAO,CAACE,WAAW,CAAA;EAEpC,IAAIH,IAAI,KAAK,MAAM,EAAE;AACjB,IAAA,OAAO,CAAC,CAAC,EAAEE,IAAI,CAAC,CAAA;AACpB,GAAA;EAEA,IAAIF,IAAI,KAAK,OAAO,EAAE;AAClB,IAAA,OAAO,CAACE,IAAI,EAAE,CAAC,CAAC,CAAA;AACpB,GAAA;AAEA,EAAA,OAAO,CAAC,CAAC,EAAE,CAAC,CAAC,CAAA;AACjB,CAAA;AAEO,IAAME,QAAQ,GAAG;AACpBC,EAAAA,CAAC,EAAE;AACCC,IAAAA,MAAM,EAAE,GAAG;AACXC,IAAAA,kBAAkB,EAAE,EAAA;GACvB;AACDC,EAAAA,CAAC,EAAE;AACCF,IAAAA,MAAM,EAAE,IAAI;AACZC,IAAAA,kBAAkB,EAAE,EAAA;GACvB;AACDE,EAAAA,CAAC,EAAE;AACCH,IAAAA,MAAM,EAAE,IAAI;AACZC,IAAAA,kBAAkB,EAAE,EAAA;AACxB,GAAA;AACJ;;;;"}
@@ -1,4 +1,4 @@
1
- import './base_1s3f6q8.css';
1
+ import './base_x642ct.css';
2
2
  var base = "b1c93yiw";
3
3
 
4
4
  export { base };
@@ -1 +1 @@
1
- {"version":3,"file":"base.js","sources":["../../../../../src/components/Slider/variations/_view/base.tsx"],"sourcesContent":["import { css } from '@linaria/core';\n\nimport { classes } from '../../Slider.tokens';\n\nexport const base = css`\n &.${classes.verticalOrientation} {\n height: 100%;\n display: inline-flex;\n }\n`;\n"],"names":["base"],"mappings":"AAIO,IAAMA,IAAI,GAKhB;;;;"}
1
+ {"version":3,"file":"base.js","sources":["../../../../../src/components/Slider/variations/_view/base.tsx"],"sourcesContent":["import { css } from '@linaria/core';\n\nexport const base = css``;\n"],"names":["base"],"mappings":"AAEO,IAAMA,IAAI,GAAQ;;;;"}
@@ -2,11 +2,11 @@ import { objectWithoutProperties as _objectWithoutProperties, slicedToArray as _
2
2
  import React, { forwardRef, useState, useEffect } from 'react';
3
3
  import cls from 'classnames';
4
4
  import { classes } from './Steps.tokens.js';
5
- import { StepItem } from './ui/StepItem/StepItem.js';
6
5
  import { base } from './Steps.styles.js';
7
6
  import { base as base$1 } from './variations/_size/base.js';
8
7
  import { base as base$2 } from './variations/_view/base.js';
9
8
  import { getItemStatus } from './utils/getItemStatus.js';
9
+ import { StepItem } from './ui/StepItem/StepItem.js';
10
10
 
11
11
  var _excluded = ["view", "size", "orientation", "contentAlign", "hasLine", "hasContent", "hasLoader", "items", "onChange", "current", "status"];
12
12
  var stepsRoot = function stepsRoot(Root) {
@@ -1,7 +1,6 @@
1
1
  import './StepItem.styles_sp9rcd.css';
2
2
  import { styled } from '@linaria/react';
3
3
  import { tokens } from '../../Steps.tokens.js';
4
- import '@linaria/core';
5
4
  import { component, mergeConfig } from '../../../../engines/common.js';
6
5
  import { spinnerConfig } from '../../../Spinner/Spinner.js';
7
6
 
@@ -1 +1 @@
1
- {"version":3,"file":"StepItem.styles.js","sources":["../../../../../src/components/Steps/ui/StepItem/StepItem.styles.ts"],"sourcesContent":["import { styled } from '@linaria/react';\n\nimport { classes, tokens } from '../../Steps.tokens';\nimport { component, mergeConfig } from '../../../../engines';\nimport { spinnerConfig, spinnerTokens } from '../../../Spinner';\n\nconst mergedConfig = mergeConfig(spinnerConfig);\nconst Spinner = component(mergedConfig);\n\nexport const SpinnerStyled = styled(Spinner)<{ hasIndicator?: boolean }>`\n ${spinnerTokens.size}: ${({ hasIndicator }) =>\n hasIndicator ? `var(${tokens.activeIndicatorSize})` : `var(${tokens.activeBulletSize})`};\n ${spinnerTokens.color}: var(${tokens.activeIndicatorColor});\n`;\n\nexport const StepItemTitle = styled.div`\n padding-top: var(${tokens.titlePaddingTop});\n padding-right: var(${tokens.contentSidePadding});\n\n font-family: var(${tokens.titleFontFamily});\n font-size: var(${tokens.titleFontSize});\n font-style: var(${tokens.titleFontStyle});\n font-weight: var(${tokens.titleFontWeight});\n letter-spacing: var(${tokens.titleLetterSpacing});\n line-height: var(${tokens.titleLineHeight});\n\n word-break: break-word;\n`;\n\nexport const StepItemContent = styled.div`\n padding-top: var(${tokens.contentPaddingTop});\n padding-right: var(${tokens.contentSidePadding});\n\n font-family: var(${tokens.contentFontFamily});\n font-size: var(${tokens.contentFontSize});\n font-style: var(${tokens.contentFontStyle});\n font-weight: var(${tokens.contentFontWeight});\n letter-spacing: var(${tokens.contentLetterSpacing});\n line-height: var(${tokens.contentLineHeight});\n\n word-break: break-word;\n\n color: var(${tokens.contentColor});\n`;\n\nexport const BulletIndicatorWrapper = styled.div`\n display: flex;\n align-items: center;\n\n &:not(.${classes.simple}) {\n flex: 0;\n\n &.${classes.hasIndicator} {\n width: 100%;\n min-height: var(${tokens.activeIndicatorSize});\n }\n &:not(.${classes.hasIndicator}) {\n width: 100%;\n min-height: var(${tokens.activeBulletSize});\n }\n\n &.${classes.verticalOrientation} {\n padding-right: var(${tokens.verticalContentPaddingLeft});\n }\n }\n\n &.${classes.verticalOrientation} {\n flex-direction: column;\n align-items: center;\n justify-content: center;\n min-height: 100%;\n\n &.${classes.hasIndicator} {\n min-width: var(${tokens.activeIndicatorSize});\n }\n &:not(.${classes.hasIndicator}) {\n min-width: var(${tokens.activeBulletSize});\n }\n }\n\n &.${classes.centered} {\n justify-content: center;\n }\n`;\n\nexport const BulletIndicator = styled.div`\n display: flex;\n align-items: center;\n justify-content: center;\n\n width: var(${tokens.indicatorSize});\n height: var(${tokens.indicatorSize});\n border-radius: 50%;\n box-sizing: border-box;\n position: relative;\n\n color: var(${tokens.completedIndicatorColor});\n background-color: var(${tokens.completedIndicatorBackground});\n\n font-family: var(${tokens.indicatorFontFamily});\n font-size: var(${tokens.indicatorFontSize});\n font-style: var(${tokens.indicatorFontStyle});\n font-weight: var(${tokens.indicatorFontWeight});\n letter-spacing: var(${tokens.indicatorLetterSpacing});\n line-height: var(${tokens.indicatorLineHeight});\n\n &.${classes.active} {\n width: var(${tokens.activeIndicatorSize});\n height: var(${tokens.activeIndicatorSize});\n\n border: var(${tokens.dividerThickness}) var(${tokens.activeIndicatorBorder});\n\n font-family: var(${tokens.activeIndicatorFontFamily});\n font-size: var(${tokens.activeIndicatorFontSize});\n font-style: var(${tokens.activeIndicatorFontStyle});\n font-weight: var(${tokens.activeIndicatorFontWeight});\n letter-spacing: var(${tokens.activeIndicatorLetterSpacing});\n line-height: var(${tokens.activeIndicatorLineHeight});\n\n color: var(${tokens.activeIndicatorColor});\n background: var(${tokens.activeIndicatorBackground});\n }\n\n &.${classes.inactive} {\n color: var(${tokens.inactiveIndicatorColor});\n background: var(${tokens.inactiveIndicatorBackground});\n\n &:before,\n &:after {\n background: var(${tokens.inactiveIndicatorBackground});\n }\n }\n`;\n\nexport const Bullet = styled(BulletIndicator)`\n width: var(${tokens.bulletSize});\n height: var(${tokens.bulletSize});\n\n &.${classes.active} {\n width: var(${tokens.activeBulletSize});\n height: var(${tokens.activeBulletSize});\n\n border: var(${tokens.dividerThickness}) var(${tokens.activeIndicatorBorder});\n\n background-color: var(${tokens.activeIndicatorBackground});\n }\n`;\n\nexport const StepItemDivider = styled.div<{ indentToken?: string }>`\n width: 100%;\n height: var(${tokens.dividerThickness});\n\n flex: 1;\n background-color: var(${tokens.activeIndicatorColor});\n\n &.${classes.inactive} {\n background-color: var(${tokens.inactiveIndicatorBackground});\n }\n\n &.${classes.transparentDivider} {\n background-color: transparent;\n }\n\n &.${classes.verticalOrientation} {\n width: var(${tokens.dividerThickness});\n height: 100%;\n }\n\n &.${classes.indentDivider} {\n height: ${({ indentToken }) => indentToken || ''};\n min-height: ${({ indentToken }) => indentToken || ''};\n max-height: ${({ indentToken }) => indentToken || ''};\n\n &.${classes.simple} {\n height: auto;\n max-height: none;\n }\n }\n`;\n\nexport const StepItemContentWrapper = styled.div`\n &.${classes.verticalOrientation} {\n ${StepItemTitle} {\n padding-top: var(${tokens.contentVerticalPadding});\n padding-right: 0;\n }\n\n ${StepItemContent} {\n padding-top: var(${tokens.contentVerticalPadding});\n padding-bottom: var(${tokens.contentVerticalPadding});\n padding-right: 0;\n }\n }\n`;\n\nexport const StepItemStyled = styled.div`\n display: flex;\n flex-direction: column;\n align-items: flex-start;\n flex: 1;\n\n &.${classes.verticalOrientation} {\n flex-direction: row;\n align-items: stretch;\n\n ${StepItemDivider} {\n width: var(${tokens.dividerThickness});\n height: 100%;\n }\n }\n\n &.${classes.active} {\n ${StepItemTitle} {\n color: var(${tokens.activeTitleColor});\n }\n }\n\n &.${classes.inactive} {\n ${StepItemTitle} {\n color: var(${tokens.inactiveTitleColor});\n }\n }\n\n &.${classes.hovered} {\n &:not(.${classes.active}) {\n ${StepItemTitle} {\n cursor: pointer;\n color: var(${tokens.activeTitleColorHover});\n }\n ${BulletIndicator}, ${Bullet} {\n color: var(${tokens.completedIndicatorColorHover});\n background: var(${tokens.completedIndicatorBackgroundHover});\n }\n }\n\n &.${classes.inactive} {\n ${StepItemTitle} {\n color: var(${tokens.inactiveTitleColorHover});\n }\n ${BulletIndicator}, ${Bullet} {\n color: var(${tokens.inactiveIndicatorColorHover});\n background: var(${tokens.inactiveIndicatorBackgroundHover});\n }\n }\n\n ${BulletIndicatorWrapper} {\n cursor: pointer;\n }\n }\n\n &.${classes.centered} {\n align-items: center;\n\n ${StepItemContentWrapper} {\n display: flex;\n flex-direction: column;\n align-items: center;\n\n padding-left: calc(var(${tokens.contentSidePadding}) / 2);\n padding-right: calc(var(${tokens.contentSidePadding}) / 2);\n\n ${StepItemTitle} {\n width: 100%;\n }\n\n ${StepItemTitle}, ${StepItemContent} {\n padding-right: 0;\n text-align: center;\n }\n }\n }\n\n &.${classes.simple} {\n flex: 0;\n }\n\n &.${classes.disabled} {\n opacity: var(${tokens.disabledOpacity});\n }\n`;\n"],"names":["mergedConfig","mergeConfig","spinnerConfig","Spinner","component","_exp","_exp3","_ref","hasIndicator","concat","tokens","activeIndicatorSize","activeBulletSize","SpinnerStyled","styled","name","class","propsAsIs","vars","StepItemTitle","StepItemContent","BulletIndicatorWrapper","BulletIndicator","_exp63","Bullet","_exp82","_ref2","indentToken","StepItemDivider","StepItemContentWrapper","StepItemStyled"],"mappings":";;;;;;AAMA,IAAMA,YAAY,gBAAGC,WAAW,CAACC,aAAa,CAAC,CAAA;AAC/C,IAAMC,OAAO,gBAAGC,SAAS,CAACJ,YAAY,CAAC,CAAA;AAAC,IAAAK,IAAA,GANtBA,SAMsBA,IAAAA,GAAA;AAAA,EAAA,OAEJF,OAAO,CAAA;AAAA,CAAA,CAAA;AAAA,IAAAG,KAAA,GARzBA,SAQyBA,KAAAA,GAAA;AAAA,EAAA,OACd,UAAAC,IAAA,EAAA;AAAA,IAAA,IAAGC,YAAAA,GAAAA,IAAAA,CAAAA,YAAAA,CAAAA;AAAAA,IAAAA,OAC5BA,YAAY,GAAA,MAAA,CAAAC,MAAA,CAAUC,MAAM,CAACC,mBAAoB,EAAA,GAAA,CAAA,GAAA,MAAA,CAAAF,MAAA,CAAYC,MAAM,CAACE,gBAAiB,EAAE,GAAA,CAAA,CAAA;AAAA,GAAA,CAAA;AAAA,CAAA,CAAA;AAFpF,IAAMC,aAAa,gBAAGC,MAAM,CAAAT,IAAA,EAAA,CAAA,CAAA;AAAAU,EAAAA,IAAA,EAAA,eAAA;AAAAC,EAAAA,OAAAA,EAAA,SAAA;AAAAC,EAAAA,SAAA,EAAA,IAAA;AAAAC,EAAAA,IAAA,EAAA;AAAA,IAAA,WAAA,EAAA,cACNZ,KAC8D,EAAA,CAAA;AAAA,GAAA;AAAA,CAE1F,EAAA;AAEM,IAAMa,aAAa,gBAAGL,MAAM,CAAA,KAAA,CAAA,CAAA;AAAAC,EAAAA,IAAA,EAAA,eAAA;AAAAC,EAAAA,OAAAA,EAAA,SAAA;AAAAC,EAAAA,SAAA,EAAA,KAAA;AAAA,CAYlC,EAAA;AAEM,IAAMG,eAAe,gBAAG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AA,cAuBfO,MAAsC,EAAA,CAAA;AAAA,GAAA;AAAA,CAO3D,EAAA;AAEM,IAAMI,sBAAsB,gBAAGf,MAAM,CAAA,KAAA,CAAA,CAAA;AAAAC,EAAAA,IAAA,EAAA,wBAAA;AAAAC,EAAAA,OAAAA,EAAA,SAAA;AAAAC,EAAAA,SAAA,EAAA,KAAA;AAAA,CAa3C,EAAA;AAEM,IAAMa,cAAc,gBAAGhB,MAAM,CAAA,KAAA,CAAA,CAAA;AAAAC,EAAAA,IAAA,EAAA,gBAAA;AAAAC,EAAAA,OAAAA,EAAA,UAAA;AAAAC,EAAAA,SAAA,EAAA,KAAA;AAAA,CAoFnC;;;;"}
1
+ {"version":3,"file":"StepItem.styles.js","sources":["../../../../../src/components/Steps/ui/StepItem/StepItem.styles.ts"],"sourcesContent":["import { styled } from '@linaria/react';\n\nimport { classes, tokens } from '../../Steps.tokens';\nimport { component, mergeConfig } from '../../../../engines';\nimport { spinnerConfig, spinnerTokens } from '../../../Spinner';\n\nconst mergedConfig = mergeConfig(spinnerConfig);\nconst Spinner = component(mergedConfig);\n\nexport const SpinnerStyled = styled(Spinner)<{ hasIndicator?: boolean }>`\n ${spinnerTokens.size}: ${({ hasIndicator }) =>\n hasIndicator ? `var(${tokens.activeIndicatorSize})` : `var(${tokens.activeBulletSize})`};\n ${spinnerTokens.color}: var(${tokens.activeIndicatorColor});\n`;\n\nexport const StepItemTitle = styled.div`\n padding-top: var(${tokens.titlePaddingTop});\n padding-right: var(${tokens.contentSidePadding});\n\n font-family: var(${tokens.titleFontFamily});\n font-size: var(${tokens.titleFontSize});\n font-style: var(${tokens.titleFontStyle});\n font-weight: var(${tokens.titleFontWeight});\n letter-spacing: var(${tokens.titleLetterSpacing});\n line-height: var(${tokens.titleLineHeight});\n\n word-break: break-word;\n`;\n\nexport const StepItemContent = styled.div`\n padding-top: var(${tokens.contentPaddingTop});\n padding-right: var(${tokens.contentSidePadding});\n\n font-family: var(${tokens.contentFontFamily});\n font-size: var(${tokens.contentFontSize});\n font-style: var(${tokens.contentFontStyle});\n font-weight: var(${tokens.contentFontWeight});\n letter-spacing: var(${tokens.contentLetterSpacing});\n line-height: var(${tokens.contentLineHeight});\n\n word-break: break-word;\n\n color: var(${tokens.contentColor});\n`;\n\nexport const BulletIndicatorWrapper = styled.div`\n display: flex;\n align-items: center;\n\n &:not(.${classes.simple}) {\n flex: 0;\n\n &.${classes.hasIndicator} {\n width: 100%;\n min-height: var(${tokens.activeIndicatorSize});\n }\n &:not(.${classes.hasIndicator}) {\n width: 100%;\n min-height: var(${tokens.activeBulletSize});\n }\n\n &.${classes.verticalOrientation} {\n padding-right: var(${tokens.verticalContentPaddingLeft});\n }\n }\n\n &.${classes.verticalOrientation} {\n flex-direction: column;\n align-items: center;\n justify-content: center;\n min-height: 100%;\n\n &.${classes.hasIndicator} {\n min-width: var(${tokens.activeIndicatorSize});\n }\n &:not(.${classes.hasIndicator}) {\n min-width: var(${tokens.activeBulletSize});\n }\n }\n\n &.${classes.centered} {\n justify-content: center;\n }\n`;\n\nexport const BulletIndicator = styled.div`\n display: flex;\n align-items: center;\n justify-content: center;\n\n width: var(${tokens.indicatorSize});\n height: var(${tokens.indicatorSize});\n border-radius: 50%;\n box-sizing: border-box;\n position: relative;\n\n color: var(${tokens.completedIndicatorColor});\n background-color: var(${tokens.completedIndicatorBackground});\n\n font-family: var(${tokens.indicatorFontFamily});\n font-size: var(${tokens.indicatorFontSize});\n font-style: var(${tokens.indicatorFontStyle});\n font-weight: var(${tokens.indicatorFontWeight});\n letter-spacing: var(${tokens.indicatorLetterSpacing});\n line-height: var(${tokens.indicatorLineHeight});\n\n &.${classes.active} {\n width: var(${tokens.activeIndicatorSize});\n height: var(${tokens.activeIndicatorSize});\n\n border: var(${tokens.dividerThickness}) var(${tokens.activeIndicatorBorder});\n\n font-family: var(${tokens.activeIndicatorFontFamily});\n font-size: var(${tokens.activeIndicatorFontSize});\n font-style: var(${tokens.activeIndicatorFontStyle});\n font-weight: var(${tokens.activeIndicatorFontWeight});\n letter-spacing: var(${tokens.activeIndicatorLetterSpacing});\n line-height: var(${tokens.activeIndicatorLineHeight});\n\n color: var(${tokens.activeIndicatorColor});\n background: var(${tokens.activeIndicatorBackground});\n }\n\n &.${classes.inactive} {\n color: var(${tokens.inactiveIndicatorColor});\n background: var(${tokens.inactiveIndicatorBackground});\n\n &:before,\n &:after {\n background: var(${tokens.inactiveIndicatorBackground});\n }\n }\n`;\n\nexport const Bullet = styled(BulletIndicator)`\n width: var(${tokens.bulletSize});\n height: var(${tokens.bulletSize});\n\n &.${classes.active} {\n width: var(${tokens.activeBulletSize});\n height: var(${tokens.activeBulletSize});\n\n border: var(${tokens.dividerThickness}) var(${tokens.activeIndicatorBorder});\n\n background-color: var(${tokens.activeIndicatorBackground});\n }\n`;\n\nexport const StepItemDivider = styled.div<{ indentToken?: string }>`\n width: 100%;\n height: var(${tokens.dividerThickness});\n\n flex: 1;\n background-color: var(${tokens.activeIndicatorColor});\n\n &.${classes.inactive} {\n background-color: var(${tokens.inactiveIndicatorBackground});\n }\n\n &.${classes.transparentDivider} {\n background-color: transparent;\n }\n\n &.${classes.verticalOrientation} {\n width: var(${tokens.dividerThickness});\n height: 100%;\n }\n\n &.${classes.indentDivider} {\n height: ${({ indentToken }) => indentToken || ''};\n min-height: ${({ indentToken }) => indentToken || ''};\n max-height: ${({ indentToken }) => indentToken || ''};\n\n &.${classes.simple} {\n height: auto;\n max-height: none;\n }\n }\n`;\n\nexport const StepItemContentWrapper = styled.div`\n &.${classes.verticalOrientation} {\n ${StepItemTitle} {\n padding-top: var(${tokens.contentVerticalPadding});\n padding-right: 0;\n }\n\n ${StepItemContent} {\n padding-top: var(${tokens.contentVerticalPadding});\n padding-bottom: var(${tokens.contentVerticalPadding});\n padding-right: 0;\n }\n }\n`;\n\nexport const StepItemStyled = styled.div`\n display: flex;\n flex-direction: column;\n align-items: flex-start;\n flex: 1;\n\n &.${classes.verticalOrientation} {\n flex-direction: row;\n align-items: stretch;\n\n ${StepItemDivider} {\n width: var(${tokens.dividerThickness});\n height: 100%;\n }\n }\n\n &.${classes.active} {\n ${StepItemTitle} {\n color: var(${tokens.activeTitleColor});\n }\n }\n\n &.${classes.inactive} {\n ${StepItemTitle} {\n color: var(${tokens.inactiveTitleColor});\n }\n }\n\n &.${classes.hovered} {\n &:not(.${classes.active}) {\n ${StepItemTitle} {\n cursor: pointer;\n color: var(${tokens.activeTitleColorHover});\n }\n ${BulletIndicator}, ${Bullet} {\n color: var(${tokens.completedIndicatorColorHover});\n background: var(${tokens.completedIndicatorBackgroundHover});\n }\n }\n\n &.${classes.inactive} {\n ${StepItemTitle} {\n color: var(${tokens.inactiveTitleColorHover});\n }\n ${BulletIndicator}, ${Bullet} {\n color: var(${tokens.inactiveIndicatorColorHover});\n background: var(${tokens.inactiveIndicatorBackgroundHover});\n }\n }\n\n ${BulletIndicatorWrapper} {\n cursor: pointer;\n }\n }\n\n &.${classes.centered} {\n align-items: center;\n\n ${StepItemContentWrapper} {\n display: flex;\n flex-direction: column;\n align-items: center;\n\n padding-left: calc(var(${tokens.contentSidePadding}) / 2);\n padding-right: calc(var(${tokens.contentSidePadding}) / 2);\n\n ${StepItemTitle} {\n width: 100%;\n }\n\n ${StepItemTitle}, ${StepItemContent} {\n padding-right: 0;\n text-align: center;\n }\n }\n }\n\n &.${classes.simple} {\n flex: 0;\n }\n\n &.${classes.disabled} {\n opacity: var(${tokens.disabledOpacity});\n }\n`;\n"],"names":["mergedConfig","mergeConfig","spinnerConfig","Spinner","component","_exp","_exp3","_ref","hasIndicator","concat","tokens","activeIndicatorSize","activeBulletSize","SpinnerStyled","styled","name","class","propsAsIs","vars","StepItemTitle","StepItemContent","BulletIndicatorWrapper","BulletIndicator","_exp63","Bullet","_exp82","_ref2","indentToken","StepItemDivider","StepItemContentWrapper","StepItemStyled"],"mappings":";;;;;AAMA,IAAMA,YAAY,gBAAGC,WAAW,CAACC,aAAa,CAAC,CAAA;AAC/C,IAAMC,OAAO,gBAA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