@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
@@ -4,18 +4,14 @@ import styled from 'styled-components';
4
4
  import { disableProps } from '@salutejs/plasma-sb-utils';
5
5
  import type { StoryObj, Meta } from '@storybook/react';
6
6
 
7
- import { IconMic } from '../../../../components/_Icon';
8
7
  import { WithTheme } from '../../../_helpers';
9
8
 
10
9
  import { Slider } from './Slider';
11
10
 
12
11
  const sizes = ['l', 'm', 's'];
13
- const pointerSizes = ['small', 'large', 'none'];
14
12
  const views = ['default', 'accent', 'gradient'];
15
- const sliderAligns = ['center', 'left', 'right', 'none'];
16
- const labelPlacements = ['top', 'left'];
17
- const scaleAligns = ['side', 'bottom'];
18
- const orientations: Array<string> = ['vertical', 'horizontal'];
13
+ const labelPlacements = ['outer', 'inner'];
14
+ const rangeValuesPlacement = ['outer', 'inner'];
19
15
 
20
16
  const meta: Meta<typeof Slider> = {
21
17
  title: 'plasma_web/Slider',
@@ -34,24 +30,9 @@ const meta: Meta<typeof Slider> = {
34
30
  type: 'inline-radio',
35
31
  },
36
32
  },
37
- pointerSize: {
38
- options: pointerSizes,
39
- control: {
40
- type: 'inline-radio',
41
- },
42
- },
43
- orientation: {
44
- options: orientations,
45
- control: {
46
- type: 'select',
47
- },
48
- },
49
33
  ...disableProps([
50
34
  'value',
51
35
  'onChangeCommitted',
52
- 'onChangeTextField',
53
- 'onBlurTextField',
54
- 'onKeyDownTextField',
55
36
  'ariaLabel',
56
37
  'onChange',
57
38
  'fontSizeMultiplier',
@@ -71,9 +52,8 @@ type StorySingleProps = StoryProps;
71
52
  type StorySingle = StoryObj<StorySingleProps>;
72
53
  type StoryDouble = StoryObj<StoryProps>;
73
54
 
74
- const SliderWrapper = styled.div<{ isVertical?: boolean }>`
75
- width: ${({ isVertical }) => (isVertical ? 'auto' : '25rem')};
76
- height: ${({ isVertical }) => (isVertical ? '25rem' : 'auto')};
55
+ const SliderWrapper = styled.div`
56
+ width: 25rem;
77
57
  `;
78
58
 
79
59
  const StoryDefault = (args: StorySingleProps) => {
@@ -87,86 +67,41 @@ const StoryDefault = (args: StorySingleProps) => {
87
67
  setValue(values);
88
68
  };
89
69
 
90
- const { hasIcon, showIcon, orientation, labelPlacement, labelVerticalPlacement, ...rest } = args;
91
- const isVertical = orientation === 'vertical';
92
-
93
70
  return (
94
- <SliderWrapper isVertical={isVertical}>
95
- <Slider
96
- value={value}
97
- orientation={orientation}
98
- labelPlacement={labelPlacement}
99
- labelContent={showIcon ? <IconMic size={rest.size === 's' ? 'xs' : 's'} /> : null}
100
- onChangeCommitted={onChangeCommittedHandle}
101
- onChange={onChangeHandle}
102
- {...rest}
103
- />
71
+ <SliderWrapper>
72
+ <Slider value={value} onChangeCommitted={onChangeCommittedHandle} onChange={onChangeHandle} {...args} />
104
73
  </SliderWrapper>
105
74
  );
106
75
  };
107
76
 
108
77
  export const Default: StorySingle = {
109
78
  argTypes: {
110
- sliderAlign: {
111
- options: sliderAligns,
112
- control: {
113
- type: 'inline-radio',
114
- },
115
- if: { arg: 'orientation', eq: 'vertical' },
116
- },
117
79
  labelPlacement: {
118
80
  options: labelPlacements,
119
81
  control: {
120
82
  type: 'inline-radio',
121
83
  },
122
- if: { arg: 'orientation', eq: 'horizontal' },
123
- },
124
- labelReversed: {
125
- control: {
126
- type: 'boolean',
127
- expanded: true,
128
- },
129
- if: { arg: 'orientation', eq: 'vertical' },
130
- },
131
- scaleAlign: {
132
- options: scaleAligns,
133
- control: {
134
- type: 'inline-radio',
135
- },
136
- if: { arg: 'orientation', eq: 'horizontal' },
137
84
  },
138
- orientation: {
139
- options: orientations,
85
+ rangeValuesPlacement: {
86
+ options: rangeValuesPlacement,
140
87
  control: {
141
88
  type: 'inline-radio',
142
89
  },
143
90
  },
144
- reversed: {
145
- control: {
146
- type: 'boolean',
147
- },
148
- if: { arg: 'orientation', eq: 'vertical' },
149
- },
150
91
  },
151
92
  args: {
152
93
  view: 'default',
153
94
  size: 'm',
154
- pointerSize: 'small',
155
95
  min: 0,
156
96
  max: 100,
157
- orientation: 'horizontal',
158
- ariaLabel: 'Цена микрофона',
97
+ disabled: false,
98
+ ariaLabel: 'Цена товара',
159
99
  multipleStepSize: 10,
160
- label: 'Цена микрофона',
161
- labelPlacement: 'top',
162
- sliderAlign: 'center',
163
- scaleAlign: 'bottom',
164
- showScale: true,
100
+ label: 'Цена товара',
101
+ labelPlacement: 'outer',
102
+ rangeValuesPlacement: 'outer',
103
+ showRangeValues: true,
165
104
  showCurrentValue: false,
166
- showIcon: true,
167
- reversed: false,
168
- labelReversed: false,
169
- disabled: false,
170
105
  },
171
106
  render: (args) => <StoryDefault {...args} />,
172
107
  };
@@ -206,7 +141,7 @@ const StoryMultipleValues = (args: StoryProps) => {
206
141
  };
207
142
 
208
143
  return (
209
- <SliderWrapper isVertical={args.orientation === 'vertical'}>
144
+ <SliderWrapper>
210
145
  <Slider
211
146
  value={value}
212
147
  onKeyDownTextField={onKeyDownTextField}
@@ -223,7 +158,6 @@ export const MultipleValues: StoryDouble = {
223
158
  args: {
224
159
  view: 'default',
225
160
  size: 'm',
226
- pointerSize: 'small',
227
161
  min: 0,
228
162
  max: 100,
229
163
  disabled: false,
@@ -231,14 +165,5 @@ export const MultipleValues: StoryDouble = {
231
165
  ariaLabel: ['Минимальная цена товара', 'Максимальная цена товара'],
232
166
  multipleStepSize: 10,
233
167
  },
234
- argTypes: {
235
- pointerSize: {
236
- options: ['small', 'large'],
237
- control: {
238
- type: 'inline-radio',
239
- },
240
- },
241
- ...disableProps(['orientation']),
242
- },
243
168
  render: (args) => <StoryMultipleValues {...args} />,
244
169
  };
@@ -0,0 +1,10 @@
1
+ import { css } from '@emotion/react';
2
+ import { viewContainer } from '@salutejs/plasma-themes/tokens/plasma_b2c';
3
+ export var config = {
4
+ variations: {
5
+ view: {
6
+ onDark: /*#__PURE__*/css(viewContainer.dark, ";;label:plasma-new-hope__onDark;" + (process.env.NODE_ENV === "production" ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uLy4uL3NyYy1lbW90aW9uL2V4YW1wbGVzL3BsYXNtYV93ZWIvY29tcG9uZW50cy9WaWV3Q29udGFpbmVyL1ZpZXdDb250YWluZXIuY29uZmlnLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQU11QiIsImZpbGUiOiIuLi8uLi8uLi8uLi8uLi8uLi9zcmMtZW1vdGlvbi9leGFtcGxlcy9wbGFzbWFfd2ViL2NvbXBvbmVudHMvVmlld0NvbnRhaW5lci9WaWV3Q29udGFpbmVyLmNvbmZpZy50cyIsInNvdXJjZXNDb250ZW50IjpbImltcG9ydCB7IGNzcyB9IGZyb20gJ0BlbW90aW9uL3JlYWN0JztcbmltcG9ydCB7IHZpZXdDb250YWluZXIgfSBmcm9tICdAc2FsdXRlanMvcGxhc21hLXRoZW1lcy90b2tlbnMvcGxhc21hX2IyYyc7XG5cbmV4cG9ydCBjb25zdCBjb25maWcgPSB7XG4gICAgdmFyaWF0aW9uczoge1xuICAgICAgICB2aWV3OiB7XG4gICAgICAgICAgICBvbkRhcms6IGNzc2BcbiAgICAgICAgICAgICAgICAke3ZpZXdDb250YWluZXIuZGFya31cbiAgICAgICAgICAgIGAsXG4gICAgICAgICAgICBvbkxpZ2h0OiBjc3NgXG4gICAgICAgICAgICAgICAgJHt2aWV3Q29udGFpbmVyLmxpZ2h0fVxuICAgICAgICAgICAgYCxcbiAgICAgICAgfSxcbiAgICB9LFxufTtcbiJdfQ== */")),
7
+ onLight: /*#__PURE__*/css(viewContainer.light, ";;label:plasma-new-hope__onLight;" + (process.env.NODE_ENV === "production" ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uLy4uL3NyYy1lbW90aW9uL2V4YW1wbGVzL3BsYXNtYV93ZWIvY29tcG9uZW50cy9WaWV3Q29udGFpbmVyL1ZpZXdDb250YWluZXIuY29uZmlnLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQVN3QiIsImZpbGUiOiIuLi8uLi8uLi8uLi8uLi8uLi9zcmMtZW1vdGlvbi9leGFtcGxlcy9wbGFzbWFfd2ViL2NvbXBvbmVudHMvVmlld0NvbnRhaW5lci9WaWV3Q29udGFpbmVyLmNvbmZpZy50cyIsInNvdXJjZXNDb250ZW50IjpbImltcG9ydCB7IGNzcyB9IGZyb20gJ0BlbW90aW9uL3JlYWN0JztcbmltcG9ydCB7IHZpZXdDb250YWluZXIgfSBmcm9tICdAc2FsdXRlanMvcGxhc21hLXRoZW1lcy90b2tlbnMvcGxhc21hX2IyYyc7XG5cbmV4cG9ydCBjb25zdCBjb25maWcgPSB7XG4gICAgdmFyaWF0aW9uczoge1xuICAgICAgICB2aWV3OiB7XG4gICAgICAgICAgICBvbkRhcms6IGNzc2BcbiAgICAgICAgICAgICAgICAke3ZpZXdDb250YWluZXIuZGFya31cbiAgICAgICAgICAgIGAsXG4gICAgICAgICAgICBvbkxpZ2h0OiBjc3NgXG4gICAgICAgICAgICAgICAgJHt2aWV3Q29udGFpbmVyLmxpZ2h0fVxuICAgICAgICAgICAgYCxcbiAgICAgICAgfSxcbiAgICB9LFxufTtcbiJdfQ== */"))
8
+ }
9
+ }
10
+ };
@@ -0,0 +1,5 @@
1
+ import { viewContainerConfig } from '../../../../components/ViewContainer';
2
+ import { component, mergeConfig } from '../../../../engines';
3
+ import { config } from './ViewContainer.config';
4
+ var mergedConfig = /*#__PURE__*/mergeConfig(viewContainerConfig, config);
5
+ export var ViewContainer = /*#__PURE__*/component(mergedConfig);
@@ -0,0 +1,65 @@
1
+ import React, { ComponentProps } from 'react';
2
+ import type { StoryObj, Meta } from '@storybook/react';
3
+
4
+ import { Button } from '../Button/Button';
5
+ import { TextField } from '../TextField/TextField';
6
+ import { Checkbox } from '../Checkbox/Checkbox';
7
+
8
+ import { ViewContainer } from './ViewContainer';
9
+
10
+ type StoryViewProps = ComponentProps<typeof ViewContainer>;
11
+
12
+ const meta: Meta<StoryViewProps> = {
13
+ title: 'plasma_web/ViewContainer',
14
+ };
15
+
16
+ export default meta;
17
+
18
+ type Story = StoryObj<StoryViewProps>;
19
+
20
+ const ViewExample = ({ view }: StoryViewProps) => {
21
+ const style = view
22
+ ? {
23
+ background: view === 'onDark' ? '#1a1a1a' : '#ededed',
24
+ color: view === 'onDark' ? 'white' : 'black',
25
+ }
26
+ : undefined;
27
+
28
+ return (
29
+ <>
30
+ <h4>view: {view ?? 'default'}</h4>
31
+ <div>
32
+ <ViewContainer
33
+ view={view}
34
+ style={{
35
+ ...style,
36
+ padding: '1rem',
37
+ borderRadius: '1rem',
38
+ display: 'flex',
39
+ flexDirection: 'column',
40
+ gap: '1rem',
41
+ }}
42
+ >
43
+ <h3 style={{ margin: 0 }}>Inside ViewContainer</h3>
44
+ <Button text="default Button" />
45
+ <Checkbox checked label="Label" />
46
+ <TextField value="Example Value" label="Label" labelPlacement="inner" />
47
+ </ViewContainer>
48
+ </div>
49
+ </>
50
+ );
51
+ };
52
+
53
+ export const Default: Story = {
54
+ render: () => {
55
+ return (
56
+ <>
57
+ <ViewExample />
58
+ <br />
59
+ <ViewExample view="onDark" />
60
+ <br />
61
+ <ViewExample view="onLight" />
62
+ </>
63
+ );
64
+ },
65
+ };
@@ -60,4 +60,5 @@ export * from './components/Autocomplete';
60
60
  export * from './components/EmptyState';
61
61
  export * from './components/Editable';
62
62
  export * from './components/Mask';
63
- export * from './components/Attach';
63
+ export * from './components/Attach';
64
+ export * from './components/ViewContainer';
@@ -1,5 +1,6 @@
1
1
  {
2
2
  "module": "es/index.js",
3
3
  "main": "cjs/index.js",
4
- "types": "../types/index.d.ts"
4
+ "types": "../types/index.d.ts",
5
+ "sideEffects": false
5
6
  }
@@ -1,6 +1,5 @@
1
1
  import './AccordionItem.styles_aus2x3.css';
2
2
  import { styled } from '@linaria/react';
3
- import 'react';
4
3
  import { IconChevronDownFill } from '../../../_Icon/Icons/IconChevronDownFill.js';
5
4
  import { IconMinus } from '../../../_Icon/Icons/IconMinus.js';
6
5
 
@@ -1 +1 @@
1
- {"version":3,"file":"AccordionItem.styles.js","sources":["../../../../../src/components/Accordion/ui/AccordionItem/AccordionItem.styles.ts"],"sourcesContent":["import { styled } from '@linaria/react';\n\nimport { IconChevronDownFill, IconMinus } from '../../../_Icon';\nimport { classes, tokens } from '../../Accordion.tokens';\nimport { addFocus } from '../../../../mixins';\n\nexport const StyledAccordionItem = styled.div`\n background: var(${tokens.accordionItemBackground});\n border: var(${tokens.accordionItemBorder});\n border-bottom: var(${tokens.accordionItemBorderBottom});\n\n &:last-child {\n border-bottom: var(${tokens.accordionItemBorder});\n }\n\n &.${classes.accordionDisabled} {\n opacity: 0.4;\n cursor: not-allowed;\n }\n`;\n\nexport const StyledAccordionHeader = styled.button`\n width: 100%;\n border: none;\n padding: var(${tokens.accordionItemPadding});\n display: flex;\n gap: var(${tokens.accordionItemGap});\n justify-content: space-between;\n align-items: center;\n background: none;\n box-sizing: border-box;\n cursor: pointer;\n\n &:focus {\n outline: none;\n }\n\n ${addFocus({\n outlineOffset: '0.125rem',\n outlineSize: '0.125rem',\n outlineRadius: '0',\n outlineColor: `var(${tokens.accordionItemFocus})`,\n })}\n`;\n\nexport const StyledAccordionHeaderLeft = styled.div`\n display: flex;\n gap: var(${tokens.accordionItemGap});\n justify-content: space-between;\n align-items: center;\n`;\n\nexport const StyledAccordionContentRight = styled.div`\n transition: 0.2s;\n transform: rotate(90deg);\n\n &.${classes.accordionItemShowBody} {\n transition: 0.2s;\n transform: rotate(0deg);\n }\n`;\n\nexport const StyledAccordionContentLeft = styled.div`\n transition: 0.2s;\n display: flex;\n align-items: center;\n\n &.${classes.accordionItemShowBody} {\n transition: 0.2s;\n transform: rotate(180deg);\n }\n`;\n\nexport const StyledAccordionTitle = styled.div`\n color: var(${tokens.accordionItemTitleColor});\n font-family: var(${tokens.accordionItemTitleFontFamily});\n font-size: var(${tokens.accordionItemTitleFontSize});\n font-weight: var(${tokens.accordionItemTitleFontWeight});\n font-style: var(${tokens.accordionItemTitleFontStyle});\n letter-spacing: var(${tokens.accordionItemTitleLetterSpacing});\n line-height: var(${tokens.accordionItemTitleLineHeight});\n text-align: left;\n`;\n\nexport const StyledAccordionBodyAnimate = styled.div`\n display: grid;\n grid-template-rows: 0fr;\n transition: grid-template-rows 0.2s ease-out;\n overflow: hidden;\n\n &.${classes.accordionItemShowBody} {\n grid-template-rows: 1fr;\n padding-bottom: var(${tokens.accordionItemPaddingVertical});\n\n &.${classes.accordionPlusAnimationElement} {\n transition: 0.2s;\n transform: rotate(0deg);\n }\n }\n`;\n\nexport const StyledAccordionBody = styled.div`\n color: var(${tokens.accordionItemTextColor});\n font-family: var(${tokens.accordionItemTextFontFamily});\n font-size: var(${tokens.accordionItemTextFontSize});\n font-weight: var(${tokens.accordionItemTextFontWeight});\n font-style: var(${tokens.accordionItemTextFontStyle});\n letter-spacing: var(${tokens.accordionItemTextLetterSpacing});\n line-height: var(${tokens.accordionItemTextLineHeight});\n overflow: hidden;\n padding-right: var(${tokens.accordionItemPaddingHorizontal});\n padding-left: var(${tokens.accordionItemPaddingHorizontalLeft});\n text-align: left;\n`;\n\nexport const StyledArrow = styled(IconChevronDownFill)`\n pointer-events: none;\n user-select: none;\n color: var(${tokens.accordionItemIconColor});\n`;\n\nexport const StyledMinus = styled(IconMinus)`\n pointer-events: none;\n user-select: none;\n color: var(${tokens.accordionItemIconColor});\n display: flex;\n align-items: center;\n position: absolute;\n top: 0;\n left: 0;\n\n &.${classes.accordionPlusAnimationElement} {\n transition: 0.2s;\n transform: rotate(90deg);\n }\n\n &.${classes.accordionItemShowBody} {\n transition: 0.2s;\n transform: rotate(0deg);\n }\n`;\n\nexport const StyledPlus = styled.div`\n position: relative;\n height: 1rem;\n display: flex;\n align-items: center;\n justify-content: center;\n width: 1rem;\n`;\n"],"names":["StyledAccordionItem","styled","name","class","propsAsIs","StyledAccordionHeader","StyledAccordionHeaderLeft","StyledAccordionContentRight","StyledAccordionContentLeft","StyledAccordionTitle","StyledAccordionBodyAnimate","StyledAccordionBody","_exp31","IconChevronDownFill","StyledArrow","_exp33","IconMinus","StyledMinus","StyledPlus"],"mappings":";;;;;AAMO,IAAMA,mBAAmB,gBAAGC,MAAM,CAAA,KAAA,CAAA,CAAA;AAAAC,EAAAA,IAAA,EAAA,qBAAA;AAAAC,EAAAA,OAAAA,EAAA,UAAA;AAAAC,EAAAA,SAAA,EAAA,KAAA;AAAA,CAaxC,EAAA;AAEM,IAAMC,qBAAqB,gBAAGJ,MAAM,CAAA,QAAA,CAAA,CAAA;AAAAC,EAAAA,IAAA,EAAA,uBAAA;AAAAC,EAAAA,OAAAA,EAAA,UAAA;AAAAC,EAAAA,SAAA,EAAA,KAAA;AAAA,CAsB1C,EAAA;AAEM,IAAME,yBAAyB,gBAAGL,MAAM,CAAA,KAAA,CAAA,CAAA;AAAAC,EAAAA,IAAA,EAAA,2BAAA;AAAAC,EAAAA,OAAAA,EAAA,UAAA;AAAAC,EAAAA,SAAA,EAAA,KAAA;AAAA,CAK9C,EAAA;AAEM,IAAMG,2BAA2B,gBAAGN,MAAM,CAAA,KAAA,CAAA,CAAA;AAAAC,EAAAA,IAAA,EAAA,6BAAA;AAAAC,EAAAA,OAAAA,EAAA,SAAA;AAAAC,EAAAA,SAAA,EAAA,KAAA;AAAA,CAQhD,EAAA;AAEM,IAAMI,0BAA0B,gBAAGP,MAAM,CAAA,KAAA,CAAA,CAAA;AAAAC,EAAAA,IAAA,EAAA,4BAAA;AAAAC,EAAAA,OAAAA,EAAA,UAAA;AAAAC,EAAAA,SAAA,EAAA,KAAA;AAAA,CAS/C,EAAA;AAEM,IAAMK,oBAAoB,gBAAGR,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AA,KAAA;AAAA,CAO/B;;;;"}
1
+ {"version":3,"file":"AccordionItem.styles.js","sources":["../../../../../src/components/Accordion/ui/AccordionItem/AccordionItem.styles.ts"],"sourcesContent":["import { styled } from '@linaria/react';\n\nimport { IconChevronDownFill, IconMinus } from '../../../_Icon';\nimport { classes, tokens } from '../../Accordion.tokens';\nimport { addFocus } from '../../../../mixins';\n\nexport const StyledAccordionItem = styled.div`\n background: var(${tokens.accordionItemBackground});\n border: var(${tokens.accordionItemBorder});\n border-bottom: var(${tokens.accordionItemBorderBottom});\n\n &:last-child {\n border-bottom: var(${tokens.accordionItemBorder});\n }\n\n &.${classes.accordionDisabled} {\n opacity: 0.4;\n cursor: not-allowed;\n }\n`;\n\nexport const StyledAccordionHeader = styled.button`\n width: 100%;\n border: none;\n padding: var(${tokens.accordionItemPadding});\n display: flex;\n gap: var(${tokens.accordionItemGap});\n justify-content: space-between;\n align-items: center;\n background: none;\n box-sizing: border-box;\n cursor: pointer;\n\n &:focus {\n outline: none;\n }\n\n ${addFocus({\n outlineOffset: '0.125rem',\n outlineSize: '0.125rem',\n outlineRadius: '0',\n outlineColor: `var(${tokens.accordionItemFocus})`,\n })}\n`;\n\nexport const StyledAccordionHeaderLeft = styled.div`\n display: flex;\n gap: var(${tokens.accordionItemGap});\n justify-content: space-between;\n align-items: center;\n`;\n\nexport const StyledAccordionContentRight = styled.div`\n transition: 0.2s;\n transform: rotate(90deg);\n\n &.${classes.accordionItemShowBody} {\n transition: 0.2s;\n transform: rotate(0deg);\n }\n`;\n\nexport const StyledAccordionContentLeft = styled.div`\n transition: 0.2s;\n display: flex;\n align-items: center;\n\n &.${classes.accordionItemShowBody} {\n transition: 0.2s;\n transform: rotate(180deg);\n }\n`;\n\nexport const StyledAccordionTitle = styled.div`\n color: var(${tokens.accordionItemTitleColor});\n font-family: var(${tokens.accordionItemTitleFontFamily});\n font-size: var(${tokens.accordionItemTitleFontSize});\n font-weight: var(${tokens.accordionItemTitleFontWeight});\n font-style: var(${tokens.accordionItemTitleFontStyle});\n letter-spacing: var(${tokens.accordionItemTitleLetterSpacing});\n line-height: var(${tokens.accordionItemTitleLineHeight});\n text-align: left;\n`;\n\nexport const StyledAccordionBodyAnimate = styled.div`\n display: grid;\n grid-template-rows: 0fr;\n transition: grid-template-rows 0.2s ease-out;\n overflow: hidden;\n\n &.${classes.accordionItemShowBody} {\n grid-template-rows: 1fr;\n padding-bottom: var(${tokens.accordionItemPaddingVertical});\n\n &.${classes.accordionPlusAnimationElement} {\n transition: 0.2s;\n transform: rotate(0deg);\n }\n }\n`;\n\nexport const StyledAccordionBody = styled.div`\n color: var(${tokens.accordionItemTextColor});\n font-family: var(${tokens.accordionItemTextFontFamily});\n font-size: var(${tokens.accordionItemTextFontSize});\n font-weight: var(${tokens.accordionItemTextFontWeight});\n font-style: var(${tokens.accordionItemTextFontStyle});\n letter-spacing: var(${tokens.accordionItemTextLetterSpacing});\n line-height: var(${tokens.accordionItemTextLineHeight});\n overflow: hidden;\n padding-right: var(${tokens.accordionItemPaddingHorizontal});\n padding-left: var(${tokens.accordionItemPaddingHorizontalLeft});\n text-align: left;\n`;\n\nexport const StyledArrow = styled(IconChevronDownFill)`\n pointer-events: none;\n user-select: none;\n color: var(${tokens.accordionItemIconColor});\n`;\n\nexport const StyledMinus = styled(IconMinus)`\n pointer-events: none;\n user-select: none;\n color: var(${tokens.accordionItemIconColor});\n display: flex;\n align-items: center;\n position: absolute;\n top: 0;\n left: 0;\n\n &.${classes.accordionPlusAnimationElement} {\n transition: 0.2s;\n transform: rotate(90deg);\n }\n\n &.${classes.accordionItemShowBody} {\n transition: 0.2s;\n transform: rotate(0deg);\n }\n`;\n\nexport const StyledPlus = styled.div`\n position: relative;\n height: 1rem;\n display: flex;\n align-items: center;\n justify-content: center;\n width: 1rem;\n`;\n"],"names":["StyledAccordionItem","styled","name","class","propsAsIs","StyledAccordionHeader","StyledAccordionHeaderLeft","StyledAccordionContentRight","StyledAccordionContentLeft","StyledAccordionTitle","StyledA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AAC,EAAAA,IAAA,EAAA,4BAAA;AAAAC,EAAAA,OAAAA,EAAA,SAAA;AAAAC,EAAAA,SAAA,EAAA,KAAA;AAAA,CAe/C,EAAA;AAEM,IAAMO,mBAAmB,gBAAGV,MAAM,CAAA,KAAA,CAAA,CAAA;AAAAC,EAAAA,IAAA,EAAA,qBAAA;AAAAC,EAAAA,OAAAA,EAAA,UAAA;AAAAC,EAAAA,SAAA,EAAA,KAAA;AAAA,CAYxC,EAAA;AAAC,IAAAQ,MAAA,GAhHgBA,SAgHhBA,MAAAA,GAAA;AAAA,EAAA,OAEgCC,mBAAmB,CAAA;AAAA,CAAA,CAAA;AAA9C,IAAMC,WAAW,gBAAGb,MAAM,CAAAW,MAAA,EAAA,CAAA,CAAA;AAAAV,EAAAA,IAAA,EAAA,aAAA;AAAAC,EAAAA,OAAAA,EAAA,UAAA;AAAAC,EAAAA,SAAA,EAAA,IAAA;AAAA,CAIhC,EAAA;AAAC,IAAAW,MAAA,GAtHgBA,SAsHhBA,MAAAA,GAAA;AAAA,EAAA,OAEgCC,SAAS,CAAA;AAAA,CAAA,CAAA;AAApC,IAAMC,WAAW,gBAAGhB,MAAM,CAAAc,MAAA,EAAA,CAAA,CAAA;AAAAb,EAAAA,IAAA,EAAA,aAAA;AAAAC,EAAAA,OAAAA,EAAA,SAAA;AAAAC,EAAAA,SAAA,EAAA,IAAA;AAAA,CAmBhC,EAAA;AAEM,IAAMc,UAAU,gBAAGjB,MAAM,CAAA,KAAA,CAAA,CAAA;AAAAC,EAAAA,IAAA,EAAA,YAAA;AAAAC,EAAAA,OAAAA,EAAA,UAAA;AAAAC,EAAAA,SAAA,EAAA,KAAA;AAAA,CAO/B;;;;"}
@@ -2,18 +2,17 @@ import { objectWithoutProperties as _objectWithoutProperties, slicedToArray as _
2
2
  import React, { forwardRef, useRef, useState, useEffect } from 'react';
3
3
  import { useForkRef, useIsomorphicLayoutEffect } from '@salutejs/plasma-core';
4
4
  import { cx } from '../../utils/index.js';
5
- import '@linaria/react';
6
- import { IconCloseCircleOutline } from '../_Icon/Icons/IconCloseCircleOutline.js';
7
5
  import { base as base$2 } from './variations/_size/base.js';
8
6
  import { base as base$1 } from './variations/_view/base.js';
9
7
  import { StyledHiddenInput, StyledHiddenInputHelper, base } from './Attach.styles.js';
10
- import { StyledCell } from './ui/Cell/Cell.styles.js';
11
8
  import { separator } from './utils/index.js';
12
9
  import { classes } from './Attach.tokens.js';
13
- import { AttachButton } from './components/AttachButton/AttachButton.js';
14
10
  import { StyledIconButtonCancel } from './ui/IconButton/IconButton.styles.js';
15
11
  import { extractExtension } from './utils/extractExtension.js';
16
12
  import { addSeparator } from './utils/addSeparator.js';
13
+ import { AttachButton } from './components/AttachButton/AttachButton.js';
14
+ import { StyledCell } from './ui/Cell/Cell.styles.js';
15
+ import { IconCloseCircleOutline } from '../_Icon/Icons/IconCloseCircleOutline.js';
17
16
  import { getFileicon } from './utils/getFileicon.js';
18
17
 
19
18
  var _IconCloseCircleOutli;
@@ -1 +1 @@
1
- {"version":3,"file":"Attach.js","sources":["../../../src/components/Attach/Attach.tsx"],"sourcesContent":["import React, { forwardRef, useEffect, useRef, useState } from 'react';\nimport type { ChangeEvent } from 'react';\nimport { useForkRef, useIsomorphicLayoutEffect } from '@salutejs/plasma-core';\n\nimport { RootProps } from '../../engines';\nimport { cx } from '../../utils';\nimport { IconCloseCircleOutline } from '../_Icon';\n\nimport { AttachProps } from './Attach.types';\nimport { base as sizeCSS } from './variations/_size/base';\nimport { base as viewCSS } from './variations/_view/base';\nimport { base, StyledHiddenInput, StyledHiddenInputHelper } from './Attach.styles';\nimport { StyledCell } from './ui/Cell/Cell';\nimport { extractExtension, getFileicon, addSeparator, separator } from './utils';\nimport { classes } from './Attach.tokens';\nimport { AttachButton } from './components/AttachButton';\nimport { StyledIconButtonCancel } from './ui/IconButton/IconButton.styles';\n\nexport const attachRoot = (Root: RootProps<HTMLDivElement, AttachProps>) =>\n forwardRef<HTMLDivElement, AttachProps>((props, outerRef) => {\n const {\n flow = 'auto',\n buttonType = 'button',\n hasAttachment = true,\n acceptedFileFormats,\n size,\n view,\n className,\n style,\n isLoading,\n disabled,\n id,\n name,\n onChange,\n onClear,\n ...rest\n } = props;\n\n const innerRef = useRef<HTMLDivElement>(null);\n const ref = useForkRef(outerRef, innerRef);\n\n const inputRef = useRef<HTMLInputElement | null>(null);\n const inputHelperRef = useRef<HTMLDivElement | null>(null);\n const cellRef = useRef<HTMLDivElement | null>(null);\n const buttonRef = useRef<HTMLButtonElement | null>(null);\n\n const emptyTextCellWidth = useRef<number | null>(null);\n\n const [filename, setFilename] = useState<string>('');\n const [truncatedFilename, setTruncatedFilename] = useState<string>('');\n\n const horizontalClass = flow === 'horizontal' ? classes.horizontal : undefined;\n const verticalClass = flow === 'vertical' ? classes.vertical : undefined;\n const autoClass = flow === 'auto' ? classes.auto : undefined;\n const cellHiddenClass = truncatedFilename.length === 0 ? classes.cellHidden : undefined;\n\n const accept = acceptedFileFormats?.join(',');\n const extension = extractExtension(filename);\n const cellContentLeft = getFileicon(extension, size);\n\n useEffect(() => {\n emptyTextCellWidth.current = cellRef.current?.offsetWidth || 0;\n }, []);\n\n useIsomorphicLayoutEffect(() => {\n if (\n !cellRef.current ||\n !cellRef.current.parentElement ||\n !inputHelperRef.current ||\n !inputHelperRef.current.textContent ||\n !emptyTextCellWidth.current ||\n !buttonRef.current\n ) {\n return;\n }\n\n const { offsetWidth: textWidth } = inputHelperRef.current;\n const { offsetWidth: buttonWidth } = buttonRef.current;\n const { width: parentWidth, left: parentLeft } = cellRef.current.parentElement.getBoundingClientRect();\n const { left: cellLeft } = cellRef.current.getBoundingClientRect();\n const leftDiff = cellLeft - parentLeft;\n let currentTextWidth = textWidth;\n\n if (\n currentTextWidth + emptyTextCellWidth.current + leftDiff <= parentWidth ||\n currentTextWidth + emptyTextCellWidth.current < buttonWidth\n ) {\n setTruncatedFilename(filename);\n return;\n }\n\n let currFilename = addSeparator(filename, separator);\n for (let i = currFilename.indexOf(separator) - 1; i > 0; i -= 1) {\n if (currentTextWidth + emptyTextCellWidth.current + leftDiff <= parentWidth) {\n break;\n }\n\n const left = currFilename.slice(0, i);\n const right = currFilename.slice(i + 1);\n const newFilename = `${left}${right}`;\n inputHelperRef.current.textContent = newFilename;\n currentTextWidth = inputHelperRef.current.offsetWidth;\n\n if (currentTextWidth + emptyTextCellWidth.current < buttonWidth) {\n break;\n }\n\n currFilename = newFilename;\n }\n\n inputHelperRef.current.textContent = filename;\n setTruncatedFilename(currFilename);\n });\n\n const handleClick = () => {\n if (!inputRef.current) {\n return;\n }\n\n inputRef.current.click();\n };\n\n const handleChange = (e: ChangeEvent<HTMLInputElement>) => {\n if (!e.target.files) {\n return;\n }\n\n if (onChange) {\n onChange(e);\n }\n\n setFilename(e.target.files[0].name);\n };\n\n const handleClear = () => {\n if (!inputRef.current) {\n return;\n }\n\n if (onClear) {\n onClear();\n }\n\n inputRef.current.value = '';\n setFilename('');\n setTruncatedFilename('');\n };\n\n return (\n <Root\n className={cx(horizontalClass, verticalClass, autoClass, className)}\n style={style}\n size={size}\n view={view}\n ref={ref}\n >\n <StyledHiddenInput\n ref={inputRef}\n accept={accept}\n type=\"file\"\n id={id}\n name={name}\n onChange={handleChange}\n />\n <StyledHiddenInputHelper ref={inputHelperRef}>{filename}</StyledHiddenInputHelper>\n\n <AttachButton\n buttonType={buttonType}\n view={view}\n size={size}\n onClick={handleClick}\n isLoading={isLoading}\n disabled={disabled}\n ref={buttonRef}\n {...rest}\n />\n {hasAttachment && (\n <StyledCell\n stretching=\"fixed\"\n className={cellHiddenClass}\n ref={cellRef}\n size={size}\n title={truncatedFilename}\n contentLeft={cellContentLeft}\n contentRight={\n <StyledIconButtonCancel view={view} size={size} onClick={handleClear}>\n <IconCloseCircleOutline size=\"xs\" color=\"inherit\" />\n </StyledIconButtonCancel>\n }\n />\n )}\n </Root>\n );\n });\n\nexport const attachConfig = {\n name: 'Attach',\n tag: 'div',\n layout: attachRoot,\n base,\n variations: {\n view: {\n css: viewCSS,\n },\n size: {\n css: sizeCSS,\n },\n },\n defaults: {\n view: 'default',\n size: 'm',\n },\n};\n"],"names":["attachRoot","Root","forwardRef","props","outerRef","_props$flow","flow","_props$buttonType","buttonType","_props$hasAttachment","hasAttachment","acceptedFileFormats","size","view","className","style","isLoading","disabled","id","name","onChange","onClear","rest","_objectWithoutProperties","_excluded","innerRef","useRef","ref","useForkRef","inputRef","inputHelperRef","cellRef","buttonRef","emptyTextCellWidth","_useState","useState","_useState2","_slicedToArray","filename","setFilename","_useState3","_useState4","truncatedFilename","setTruncatedFilename","horizontalClass","classes","horizontal","undefined","verticalClass","vertical","autoClass","auto","cellHiddenClass","length","cellHidden","accept","join","extension","extractExtension","cellContentLeft","getFileicon","useEffect","_cellRef$current","current","offsetWidth","useIsomorphicLayoutEffect","parentElement","textContent","textWidth","buttonWidth","_cellRef$current$pare","getBoundingClientRect","parentWidth","width","parentLeft","left","_cellRef$current$getB","cellLeft","leftDiff","currentTextWidth","currFilename","addSeparator","separator","i","indexOf","slice","right","newFilename","concat","handleClick","click","handleChange","e","target","files","handleClear","value","React","createElement","cx","StyledHiddenInput","type","StyledHiddenInputHelper","AttachButton","_extends","onClick","StyledCell","stretching","title","contentLeft","contentRight","StyledIconButtonCancel","_IconCloseCircleOutli","IconCloseCircleOutline","color","attachConfig","tag","layout","base","variations","css","viewCSS","sizeCSS","defaults"],"mappings":";;;;;;;;;;;;;;;;;;;;IAkBaA,UAAU,GAAG,SAAbA,UAAUA,CAAIC,IAA4C,EAAA;AAAA,EAAA,oBACnEC,UAAU,CAA8B,UAACC,KAAK,EAAEC,QAAQ,EAAK;AACzD,IAAA,IAAAC,WAAA,GAgBIF,KAAK,CAfLG,IAAI;AAAJA,MAAAA,IAAI,GAAAD,WAAA,KAAG,KAAA,CAAA,GAAA,MAAM,GAAAA,WAAA;MAAAE,iBAAA,GAebJ,KAAK,CAdLK,UAAU;AAAVA,MAAAA,UAAU,GAAAD,iBAAA,KAAG,KAAA,CA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QAAQ;AACdiG,EAAAA,GAAG,EAAE,KAAK;AACVC,EAAAA,MAAM,EAAErH,UAAU;AAClBsH,EAAAA,IAAI,EAAJA,IAAI;AACJC,EAAAA,UAAU,EAAE;AACR1G,IAAAA,IAAI,EAAE;AACF2G,MAAAA,GAAG,EAAEC,MAAAA;KACR;AACD7G,IAAAA,IAAI,EAAE;AACF4G,MAAAA,GAAG,EAAEE,MAAAA;AACT,KAAA;GACH;AACDC,EAAAA,QAAQ,EAAE;AACN9G,IAAAA,IAAI,EAAE,SAAS;AACfD,IAAAA,IAAI,EAAE,GAAA;AACV,GAAA;AACJ;;;;"}
1
+ {"version":3,"file":"Attach.js","sources":["../../../src/components/Attach/Attach.tsx"],"sourcesContent":["import React, { forwardRef, useEffect, useRef, useState } from 'react';\nimport type { ChangeEvent } from 'react';\nimport { useForkRef, useIsomorphicLayoutEffect } from '@salutejs/plasma-core';\n\nimport { RootProps } from '../../engines';\nimport { cx } from '../../utils';\nimport { IconCloseCircleOutline } from '../_Icon';\n\nimport { AttachProps } from './Attach.types';\nimport { base as sizeCSS } from './variations/_size/base';\nimport { base as viewCSS } from './variations/_view/base';\nimport { base, StyledHiddenInput, StyledHiddenInputHelper } from './Attach.styles';\nimport { StyledCell } from './ui/Cell/Cell';\nimport { extractExtension, getFileicon, addSeparator, separator } from './utils';\nimport { classes } from './Attach.tokens';\nimport { AttachButton } from './components/AttachButton';\nimport { StyledIconButtonCancel } from './ui/IconButton/IconButton.styles';\n\nexport const attachRoot = (Root: RootProps<HTMLDivElement, AttachProps>) =>\n forwardRef<HTMLDivElement, AttachProps>((props, outerRef) => {\n const {\n flow = 'auto',\n buttonType = 'button',\n hasAttachment = true,\n acceptedFileFormats,\n size,\n view,\n className,\n style,\n isLoading,\n disabled,\n id,\n name,\n onChange,\n onClear,\n ...rest\n } = props;\n\n const innerRef = useRef<HTMLDivElement>(null);\n const ref = useForkRef(outerRef, innerRef);\n\n const inputRef = useRef<HTMLInputElement | null>(null);\n const inputHelperRef = useRef<HTMLDivElement | null>(null);\n const cellRef = useRef<HTMLDivElement | null>(null);\n const buttonRef = useRef<HTMLButtonElement | null>(null);\n\n const emptyTextCellWidth = useRef<number | null>(null);\n\n const [filename, setFilename] = useState<string>('');\n const [truncatedFilename, setTruncatedFilename] = useState<string>('');\n\n const horizontalClass = flow === 'horizontal' ? classes.horizontal : undefined;\n const verticalClass = flow === 'vertical' ? classes.vertical : undefined;\n const autoClass = flow === 'auto' ? classes.auto : undefined;\n const cellHiddenClass = truncatedFilename.length === 0 ? classes.cellHidden : undefined;\n\n const accept = acceptedFileFormats?.join(',');\n const extension = extractExtension(filename);\n const cellContentLeft = getFileicon(extension, size);\n\n useEffect(() => {\n emptyTextCellWidth.current = cellRef.current?.offsetWidth || 0;\n }, []);\n\n useIsomorphicLayoutEffect(() => {\n if (\n !cellRef.current ||\n !cellRef.current.parentElement ||\n !inputHelperRef.current ||\n !inputHelperRef.current.textContent ||\n !emptyTextCellWidth.current ||\n !buttonRef.current\n ) {\n return;\n }\n\n const { offsetWidth: textWidth } = inputHelperRef.current;\n const { offsetWidth: buttonWidth } = buttonRef.current;\n const { width: parentWidth, left: parentLeft } = cellRef.current.parentElement.getBoundingClientRect();\n const { left: cellLeft } = cellRef.current.getBoundingClientRect();\n const leftDiff = cellLeft - parentLeft;\n let currentTextWidth = textWidth;\n\n if (\n currentTextWidth + emptyTextCellWidth.current + leftDiff <= parentWidth ||\n currentTextWidth + emptyTextCellWidth.current < buttonWidth\n ) {\n setTruncatedFilename(filename);\n return;\n }\n\n let currFilename = addSeparator(filename, separator);\n for (let i = currFilename.indexOf(separator) - 1; i > 0; i -= 1) {\n if (currentTextWidth + emptyTextCellWidth.current + leftDiff <= parentWidth) {\n break;\n }\n\n const left = currFilename.slice(0, i);\n const right = currFilename.slice(i + 1);\n const newFilename = `${left}${right}`;\n inputHelperRef.current.textContent = newFilename;\n currentTextWidth = inputHelperRef.current.offsetWidth;\n\n if (currentTextWidth + emptyTextCellWidth.current < buttonWidth) {\n break;\n }\n\n currFilename = newFilename;\n }\n\n inputHelperRef.current.textContent = filename;\n setTruncatedFilename(currFilename);\n });\n\n const handleClick = () => {\n if (!inputRef.current) {\n return;\n }\n\n inputRef.current.click();\n };\n\n const handleChange = (e: ChangeEvent<HTMLInputElement>) => {\n if (!e.target.files) {\n return;\n }\n\n if (onChange) {\n onChange(e);\n }\n\n setFilename(e.target.files[0].name);\n };\n\n const handleClear = () => {\n if (!inputRef.current) {\n return;\n }\n\n if (onClear) {\n onClear();\n }\n\n inputRef.current.value = '';\n setFilename('');\n setTruncatedFilename('');\n };\n\n return (\n <Root\n className={cx(horizontalClass, verticalClass, autoClass, className)}\n style={style}\n size={size}\n view={view}\n ref={ref}\n >\n <StyledHiddenInput\n ref={inputRef}\n accept={accept}\n type=\"file\"\n id={id}\n name={name}\n onChange={handleChange}\n />\n <StyledHiddenInputHelper ref={inputHelperRef}>{filename}</StyledHiddenInputHelper>\n\n <AttachButton\n buttonType={buttonType}\n view={view}\n size={size}\n onClick={handleClick}\n isLoading={isLoading}\n disabled={disabled}\n ref={buttonRef}\n {...rest}\n />\n {hasAttachment && (\n <StyledCell\n stretching=\"fixed\"\n className={cellHiddenClass}\n ref={cellRef}\n size={size}\n title={truncatedFilename}\n contentLeft={cellContentLeft}\n contentRight={\n <StyledIconButtonCancel view={view} size={size} onClick={handleClear}>\n <IconCloseCircleOutline size=\"xs\" color=\"inherit\" />\n </StyledIconButtonCancel>\n }\n />\n )}\n </Root>\n );\n });\n\nexport const attachConfig = {\n name: 'Attach',\n tag: 'div',\n layout: attachRoot,\n base,\n variations: {\n view: {\n css: viewCSS,\n },\n size: {\n css: sizeCSS,\n },\n },\n defaults: {\n view: 'default',\n size: 'm',\n },\n};\n"],"names":["attachRoot","Root","forwardRef","props","outerRef","_props$flow","flow","_props$buttonType","buttonType","_props$hasAttachment","hasAttachment","acceptedFileFormats","size","view","className","style","isLoading","disabled","id","name","onChange","onClear","rest","_objectWithoutProperties","_excluded","innerRef","useRef","ref","useForkRef","inputRef","inputHelperRef","cellRef","buttonRef","emptyTextCellWidth","_useState","useState","_useState2","_slicedToArray","filename","setFilename","_useState3","_useState4","truncatedFilename","setTruncatedFilename","horizontalClass","classes","horizontal","undefined","verticalClass","vertical","autoClass","auto","cellHiddenClass","length","cellHidden","accept","join","extension","extractExtension","cellContentLeft","getFileicon","useEffect","_cellRef$current","current","offsetWidth","useIsomorphicLayoutEffect","parentElement","textContent","textWidth","buttonWidth","_cellRef$current$pare","getBoundingClientRect","parentWidth","width","parentLeft","left","_cellRef$current$getB","cellLeft","leftDiff","currentTextWidth","currFilename","addSeparator","separator","i","indexOf","slice","right","newFilename","concat","handleClick","click","handleChange","e","target","files","handleClear","value","React","createElement","cx","StyledHiddenInput","type","StyledHiddenInputHelper","AttachButton","_extends","onClick","StyledCell","stretching","title","contentLeft","contentRight","StyledIconButtonCancel","_IconCloseCircleOutli","IconCloseCircleOutline","color","attachConfig","tag","layout","base","variations","css","viewCSS","sizeCSS","defaults"],"mappings":";;;;;;;;;;;;;;;;;;;IAkBaA,UAAU,GAAG,SAAbA,UAAUA,CAAIC,IAA4C,EAAA;AAAA,EAAA,oBACnEC,UAAU,CAA8B,UAACC,KAAK,EAAEC,QAAQ,EAAK;AACzD,IAAA,IAAAC,WAAA,GAgBIF,KAAK,CAfLG,IAAI;AAAJA,MAAAA,IAAI,GAAAD,WAAA,KAAG,KAAA,CAAA,GAAA,MAAM,GAAAA,WAAA;MAAAE,iBAAA,GAebJ,KAAK,CAdLK,UAAU;AAAVA,MAAAA,UAAU,GAAAD,iBAAA,KAAG,KAAA,CAAA,GAAA,QAAQ,GAAAA,iBAAA;MAAAE,oBAAA,GAcrBN,KAAK,CAbLO,aAAa;AAAbA,MAAAA,aAAa,GAAAD,oBAAA,KAAG,KAAA,CAAA,GAAA,IAAI,GAAAA,oBAAA;MACpBE,mBAAmB,GAYnBR,KAAK,CAZLQ,mBAAmB;MACnBC,IAAI,GAWJT,KAAK,CAXLS,IA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AA,GAAG,EAAEE,MAAAA;AACT,KAAA;GACH;AACDC,EAAAA,QAAQ,EAAE;AACN9G,IAAAA,IAAI,EAAE,SAAS;AACfD,IAAAA,IAAI,EAAE,GAAA;AACV,GAAA;AACJ;;;;"}
@@ -2,7 +2,6 @@ import { objectWithoutProperties as _objectWithoutProperties, extends as _extend
2
2
  import React, { forwardRef } from 'react';
3
3
  import { StyledIconButton } from '../../ui/IconButton/IconButton.styles.js';
4
4
  import { StyledButton } from '../../ui/Button/Button.styles.js';
5
- import '@linaria/react';
6
5
  import { IconPlus } from '../../../_Icon/Icons/IconPlus.js';
7
6
 
8
7
  var _excluded = ["size", "icon"],
@@ -1 +1 @@
1
- {"version":3,"file":"AttachButton.js","sources":["../../../../../src/components/Attach/components/AttachButton/AttachButton.tsx"],"sourcesContent":["import React, { forwardRef } from 'react';\n\nimport { AttachButtonProps } from '../../Attach.types';\nimport { StyledIconButton } from '../../ui/IconButton/IconButton';\nimport { StyledButton } from '../../ui/Button/Button';\nimport { IconPlus } from '../../../_Icon';\n\nconst getDefaultIcon = (size?: string) => {\n let iconSize: 'xs' | 's' | 'm';\n switch (size) {\n case 'xs':\n iconSize = 'xs';\n break;\n case 's':\n iconSize = 's';\n break;\n default:\n iconSize = 'm';\n }\n return <IconPlus size={iconSize} color=\"inherit\" />;\n};\n\nexport const AttachButton = forwardRef<HTMLButtonElement, AttachButtonProps>((props, ref) => {\n if (props.buttonType === 'iconButton') {\n const { size, icon, ...rest } = props;\n\n return (\n <StyledIconButton ref={ref} {...rest}>\n {icon || getDefaultIcon(size)}\n </StyledIconButton>\n );\n }\n\n const { text = 'Загрузить файл', ...rest } = props;\n return <StyledButton ref={ref} text={text} {...rest} />;\n});\n"],"names":["getDefaultIcon","size","iconSize","React","createElement","IconPlus","color","AttachButton","forwardRef","props","ref","buttonType","icon","rest","_objectWithoutProperties","_excluded","StyledIconButton","_extends","_props$text","text","_excluded2","StyledButton"],"mappings":";;;;;;;;;AAOA,IAAMA,cAAc,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B,YAAY,EAAAJ,QAAA,CAAA;AAACP,IAAAA,GAAG,EAAEA,GAAI;AAACS,IAAAA,IAAI,EAAEA,IAAAA;GAAUN,EAAAA,IAAI,CAAG,CAAC,CAAA;AAC3D,CAAC;;;;"}
1
+ {"version":3,"file":"AttachButton.js","sources":["../../../../../src/components/Attach/components/AttachButton/AttachButton.tsx"],"sourcesContent":["import React, { forwardRef } from 'react';\n\nimport { AttachButtonProps } from '../../Attach.types';\nimport { StyledIconButton } from '../../ui/IconButton/IconButton';\nimport { StyledButton } from '../../ui/Button/Button';\nimport { IconPlus } from '../../../_Icon';\n\nconst getDefaultIcon = (size?: string) => {\n let iconSize: 'xs' | 's' | 'm';\n switch (size) {\n case 'xs':\n iconSize = 'xs';\n break;\n case 's':\n iconSize = 's';\n break;\n default:\n iconSize = 'm';\n }\n return <IconPlus size={iconSize} color=\"inherit\" />;\n};\n\nexport const AttachButton = forwardRef<HTMLButtonElement, AttachButtonProps>((props, ref) => {\n if (props.buttonType === 'iconButton') {\n const { size, icon, ...rest } = props;\n\n return (\n <StyledIconButton ref={ref} {...rest}>\n {icon || getDefaultIcon(size)}\n </StyledIconButton>\n );\n }\n\n const { text = 'Загрузить файл', ...rest } = props;\n return <StyledButton ref={ref} text={text} {...rest} />;\n});\n"],"names":["getDefaultIcon","size","iconSize","React","createElement","IconPlus","color","AttachButton","forwardRef","props","ref","buttonType","icon","rest","_objectWithoutProperties","_excluded","StyledIconButton","_extends","_props$text","text","_excluded2","StyledButton"],"mappings":";;;;;;;;AAOA,IAAMA,cAAc,GAAG,SAAjBA,cAAcA,CAAIC,IAAa,EAAK;AACtC,EAAA,IAAIC,QAA0B,CAAA;AAC9B,EAAA,QAAQD,IAAI;AACR,IAAA,KAAK,IAAI;AACLC,MAAAA,QAAQ,GAAG,IAAI,CAAA;AACf,MAAA,MAAA;AACJ,IAAA,KAAK,GAAG;AACJA,MAAAA,QAAQ,GAAG,GAAG,CAAA;AACd,MAAA,MAAA;AACJ,IAAA;AACIA,MAAAA,QAAQ,GAAG,GAAG,CAAA;AACtB,GAAA;AACA,EAAA,oBAAOC,KAAA,CAAAC,aAAA,CAACC,QAAQ,EAAA;AAACJ,IAAAA,IAAI,EAAEC,QAAS;AAACI,IAAAA,KAAK,EAAC,SAAA;AAAS,GAAE,CAAC,CAAA;AACvD,CAAC,CAAA;AAEM,IAAMC,YAAY,gBAAGC,UAAU,CAAuC,UAACC,KAAK,EAAEC,GAAG,EAAK;AACzF,EAAA,IAAID,KAAK,CAACE,UAAU,KAAK,YAAY,EAAE;AACnC,IAAA,IAAQV,IAAI,GAAoBQ,KAAK,CAA7BR,IAAI;MAAEW,IAAI,GAAcH,KAAK,CAAvBG,IAAI;AAAKC,MAAAA,KAAI,GAAAC,wBAAA,CAAKL,KAAK,EAAAM,SAAA,CAAA,CAAA;AAErC,IAAA,oBACIZ,KAAA,CAAAC,aAAA,CAACY,gBAAgB,EAAAC,QAAA,CAAA;AAACP,MAAAA,GAAG,EAAEA,GAAAA;KAASG,EAAAA,KAAI,GAC/BD,IAAI,IAAIZ,cAAc,CAACC,IAAI,CACd,CAAC,CAAA;AAE3B,GAAA;AAEA,EAAA,IAAAiB,WAAA,GAA6CT,KAAK,CAA1CU,IAAI;AAAJA,IAAAA,IAAI,GAAAD,WAAA,KAAG,KAAA,CAAA,GAAA,gBAAgB,GAAAA,WAAA;AAAKL,IAAAA,IAAI,GAAAC,wBAAA,CAAKL,KAAK,EAAAW,UAAA,CAAA,CAAA;AAClD,EAAA,oBAAOjB,KAAA,CAAAC,aAAA,CAACiB,YAAY,EAAAJ,QAAA,CAAA;AAACP,IAAAA,GAAG,EAAEA,GAAI;AAACS,IAAAA,IAAI,EAAEA,IAAAA;GAAUN,EAAAA,IAAI,CAAG,CAAC,CAAA;AAC3D,CAAC;;;;"}
@@ -1,6 +1,5 @@
1
1
  import './Button.styles_bj69th.css';
2
2
  import { styled } from '@linaria/react';
3
- import '@linaria/core';
4
3
  import { component, mergeConfig } from '../../../../engines/common.js';
5
4
  import { buttonConfig } from '../../../Button/Button.js';
6
5
 
@@ -1 +1 @@
1
- {"version":3,"file":"Button.styles.js","sources":["../../../../../src/components/Attach/ui/Button/Button.styles.tsx"],"sourcesContent":["import { styled } from '@linaria/react';\n\nimport { component, mergeConfig } from '../../../../engines';\nimport { buttonConfig, buttonTokens } from '../../../Button';\nimport { tokens as attachTokens } from '../../Attach.tokens';\n\nconst mergedConfig = mergeConfig(buttonConfig);\nconst Button = component(mergedConfig);\n\nexport const StyledButton = styled(Button)`\n ${buttonTokens.buttonColor}: var(${attachTokens.buttonColor});\n ${buttonTokens.buttonValueColor}: var(${attachTokens.buttonValueColor});\n ${buttonTokens.buttonBackgroundColor}: var(${attachTokens.buttonBackgroundColor});\n ${buttonTokens.buttonColorHover}: var(${attachTokens.buttonColorHover});\n ${buttonTokens.buttonBackgroundColorHover}: var(${attachTokens.buttonBackgroundColorHover});\n ${buttonTokens.buttonColorActive}: var(${attachTokens.buttonColorActive});\n ${buttonTokens.buttonBackgroundColorActive}: var(${attachTokens.buttonBackgroundColorActive});\n ${buttonTokens.buttonLoadingBackgroundColor}: var(${attachTokens.buttonLoadingBackgroundColor});\n\n ${buttonTokens.buttonScaleHover}: var(${attachTokens.buttonScaleHover});\n ${buttonTokens.buttonScaleActive}: var(${attachTokens.buttonScaleActive});\n ${buttonTokens.buttonHeight}: var(${attachTokens.buttonHeight});\n ${buttonTokens.buttonWidth}: var(${attachTokens.buttonWidth});\n ${buttonTokens.buttonPadding}: var(${attachTokens.buttonPadding});\n ${buttonTokens.buttonRadius}: var(${attachTokens.buttonRadius});\n ${buttonTokens.buttonRadiusCircle}: var(${attachTokens.buttonRadiusCircle});\n\n ${buttonTokens.buttonFontFamily}: var(${attachTokens.buttonFontFamily});\n ${buttonTokens.buttonFontSize}: var(${attachTokens.buttonFontSize});\n ${buttonTokens.buttonFontStyle}: var(${attachTokens.buttonFontStyle});\n ${buttonTokens.buttonFontWeight}: var(${attachTokens.buttonFontWeight});\n ${buttonTokens.buttonLetterSpacing}: var(${attachTokens.buttonLetterSpacing});\n ${buttonTokens.buttonLineHeight}: var(${attachTokens.buttonLineHeight});\n\n ${buttonTokens.buttonLeftContentMargin}: var(${attachTokens.buttonLeftContentMargin});\n ${buttonTokens.buttonLeftContentAlignSelf}: var(${attachTokens.buttonLeftContentAlignSelf});\n ${buttonTokens.buttonRightContentMargin}: var(${attachTokens.buttonRightContentMargin});\n ${buttonTokens.buttonRightContentAlignSelf}: var(${attachTokens.buttonRightContentAlignSelf});\n ${buttonTokens.buttonValueMargin}: var(${attachTokens.buttonValueMargin});\n\n ${buttonTokens.buttonDisabledOpacity}: var(${attachTokens.buttonDisabledOpacity});\n ${buttonTokens.buttonFocusColor}: var(${attachTokens.buttonFocusColor});\n\n ${buttonTokens.buttonSpinnerColor}: var(${attachTokens.buttonSpinnerColor});\n ${buttonTokens.buttonSpinnerSize}: var(${attachTokens.buttonSpinnerSize});\n`;\n"],"names":["mergedConfig","mergeConfig","buttonConfig","Button","component","_exp","StyledButton","styled","name","class","propsAsIs"],"mappings":";;;;;AAMA,IAAMA,YAAY,gBAAGC,WAAW,CAACC,YAAY,CAAC,CAAA;AAC9C,IAAMC,MAAM,gBAAGC,SAAS,CAACJ,YAAY,CAAC,CAAA;AAAC,IAAAK,IAAA,GANrBA,SAMqBA,IAAAA,GAAA;AAAA,EAAA,OAEJF,MAAM,CAAA;AAAA,CAAA,CAAA;AAAlC,IAAMG,YAAY,gBAAGC,MAAM,CAAAF,IAAA,EAAA,CAAA,CAAA;AAAAG,EAAAA,IAAA,EAAA,cAAA;AAAAC,EAAAA,OAAAA,EAAA,SAAA;AAAAC,EAAAA,SAAA,EAAA,IAAA;AAAA,CAoCjC;;;;"}
1
+ {"version":3,"file":"Button.styles.js","sources":["../../../../../src/components/Attach/ui/Button/Button.styles.tsx"],"sourcesContent":["import { styled } from '@linaria/react';\n\nimport { component, mergeConfig } from '../../../../engines';\nimport { buttonConfig, buttonTokens } from '../../../Button';\nimport { tokens as attachTokens } from '../../Attach.tokens';\n\nconst mergedConfig = mergeConfig(buttonConfig);\nconst Button = component(mergedConfig);\n\nexport const StyledButton = styled(Button)`\n ${buttonTokens.buttonColor}: var(${attachTokens.buttonColor});\n ${buttonTokens.buttonValueColor}: var(${attachTokens.buttonValueColor});\n ${buttonTokens.buttonBackgroundColor}: var(${attachTokens.buttonBackgroundColor});\n ${buttonTokens.buttonColorHover}: var(${attachTokens.buttonColorHover});\n ${buttonTokens.buttonBackgroundColorHover}: var(${attachTokens.buttonBackgroundColorHover});\n ${buttonTokens.buttonColorActive}: var(${attachTokens.buttonColorActive});\n ${buttonTokens.buttonBackgroundColorActive}: var(${attachTokens.buttonBackgroundColorActive});\n ${buttonTokens.buttonLoadingBackgroundColor}: var(${attachTokens.buttonLoadingBackgroundColor});\n\n ${buttonTokens.buttonScaleHover}: var(${attachTokens.buttonScaleHover});\n ${buttonTokens.buttonScaleActive}: var(${attachTokens.buttonScaleActive});\n ${buttonTokens.buttonHeight}: var(${attachTokens.buttonHeight});\n ${buttonTokens.buttonWidth}: var(${attachTokens.buttonWidth});\n ${buttonTokens.buttonPadding}: var(${attachTokens.buttonPadding});\n ${buttonTokens.buttonRadius}: var(${attachTokens.buttonRadius});\n ${buttonTokens.buttonRadiusCircle}: var(${attachTokens.buttonRadiusCircle});\n\n ${buttonTokens.buttonFontFamily}: var(${attachTokens.buttonFontFamily});\n ${buttonTokens.buttonFontSize}: var(${attachTokens.buttonFontSize});\n ${buttonTokens.buttonFontStyle}: var(${attachTokens.buttonFontStyle});\n ${buttonTokens.buttonFontWeight}: var(${attachTokens.buttonFontWeight});\n ${buttonTokens.buttonLetterSpacing}: var(${attachTokens.buttonLetterSpacing});\n ${buttonTokens.buttonLineHeight}: var(${attachTokens.buttonLineHeight});\n\n ${buttonTokens.buttonLeftContentMargin}: var(${attachTokens.buttonLeftContentMargin});\n ${buttonTokens.buttonLeftContentAlignSelf}: var(${attachTokens.buttonLeftContentAlignSelf});\n ${buttonTokens.buttonRightContentMargin}: var(${attachTokens.buttonRightContentMargin});\n ${buttonTokens.buttonRightContentAlignSelf}: var(${attachTokens.buttonRightContentAlignSelf});\n ${buttonTokens.buttonValueMargin}: var(${attachTokens.buttonValueMargin});\n\n ${buttonTokens.buttonDisabledOpacity}: var(${attachTokens.buttonDisabledOpacity});\n ${buttonTokens.buttonFocusColor}: var(${attachTokens.buttonFocusColor});\n\n ${buttonTokens.buttonSpinnerColor}: var(${attachTokens.buttonSpinnerColor});\n ${buttonTokens.buttonSpinnerSize}: var(${attachTokens.buttonSpinnerSize});\n`;\n"],"names":["mergedConfig","mergeConfig","buttonConfig","Button","component","_exp","StyledButton","styled","name","class","propsAsIs"],"mappings":";;;;AAMA,IAAMA,YAAY,gBAAGC,WAAW,CAACC,YAAY,CAAC,CAAA;AAC9C,IAAMC,MAAM,gBAAGC,SAAS,CAACJ,YAAY,CAAC,CAAA;AAAC,IAAAK,IAAA,GANrBA,SAMqBA,IAAAA,GAAA;AAAA,EAAA,OAEJF,MAAM,CAAA;AAAA,CAAA,CAAA;AAAlC,IAAMG,YAAY,gBAAGC,MAAM,CAAAF,IAAA,EAAA,CAAA,CAAA;AAAAG,EAAAA,IAAA,EAAA,cAAA;AAAAC,EAAAA,OAAAA,EAAA,SAAA;AAAAC,EAAAA,SAAA,EAAA,IAAA;AAAA,CAoCjC;;;;"}
@@ -1,8 +1,6 @@
1
1
  import './Cell.styles_69w962.css';
2
2
  import { styled } from '@linaria/react';
3
- import '@linaria/core';
4
3
  import { component, mergeConfig } from '../../../../engines/common.js';
5
- import 'react';
6
4
  import { cellConfig } from '../../../Cell/Cell.js';
7
5
 
8
6
  var mergedConfig = /*#__PURE__*/mergeConfig(cellConfig);
@@ -1 +1 @@
1
- {"version":3,"file":"Cell.styles.js","sources":["../../../../../src/components/Attach/ui/Cell/Cell.styles.tsx"],"sourcesContent":["import { styled } from '@linaria/react';\n\nimport { component, mergeConfig } from '../../../../engines';\nimport { cellConfig, cellTokens } from '../../../Cell';\nimport { tokens as attachTokens, classes } from '../../Attach.tokens';\n\nconst mergedConfig = mergeConfig(cellConfig);\nconst Cell = component(mergedConfig);\n\nexport const StyledCell = styled(Cell)`\n ${cellTokens.cellLabelColor}: var(${attachTokens.cellLabelColor});\n ${cellTokens.cellTitleColor}: var(${attachTokens.cellTitleColor});\n ${cellTokens.cellSubtitleColor}: var(${attachTokens.cellSubtitleColor});\n ${cellTokens.cellBackgroundColor}: var(${attachTokens.cellBackgroundColor});\n\n ${cellTokens.cellWidth}: var(${attachTokens.cellWidth});\n ${cellTokens.cellPadding}: var(${attachTokens.cellPadding});\n ${cellTokens.cellPaddingLeftContent}: var(${attachTokens.cellPaddingLeftContent});\n ${cellTokens.cellPaddingContent}: var(${attachTokens.cellPaddingContent});\n ${cellTokens.cellPaddingRightContent}: var(${attachTokens.cellPaddingRightContent});\n\n ${cellTokens.cellTextboxGap}: var(${attachTokens.cellTextboxGap});\n ${cellTokens.cellGap}: var(${attachTokens.cellGap});\n\n ${cellTokens.cellLabelFontFamily}: var(${attachTokens.cellLabelFontFamily});\n ${cellTokens.cellLabelFontSize}: var(${attachTokens.cellLabelFontSize});\n ${cellTokens.cellLabelFontStyle}: var(${attachTokens.cellLabelFontStyle});\n ${cellTokens.cellLabelFontWeight}: var(${attachTokens.cellLabelFontWeight});\n ${cellTokens.cellLabelLetterSpacing}: var(${attachTokens.cellLabelLetterSpacing});\n ${cellTokens.cellLabelLineHeight}: var(${attachTokens.cellLabelLineHeight});\n\n ${cellTokens.cellTitleFontFamily}: var(${attachTokens.cellTitleFontFamily});\n ${cellTokens.cellTitleFontSize}: var(${attachTokens.cellTitleFontSize});\n ${cellTokens.cellTitleFontStyle}: var(${attachTokens.cellTitleFontStyle});\n ${cellTokens.cellTitleFontWeight}: var(${attachTokens.cellTitleFontWeight});\n ${cellTokens.cellTitleLetterSpacing}: var(${attachTokens.cellTitleLetterSpacing});\n ${cellTokens.cellTitleLineHeight}: var(${attachTokens.cellTitleLineHeight});\n\n ${cellTokens.cellSubtitleFontFamily}: var(${attachTokens.cellSubtitleFontFamily});\n ${cellTokens.cellSubtitleFontSize}: var(${attachTokens.cellSubtitleFontSize});\n ${cellTokens.cellSubtitleFontStyle}: var(${attachTokens.cellSubtitleFontStyle});\n ${cellTokens.cellSubtitleFontWeight}: var(${attachTokens.cellSubtitleFontWeight});\n ${cellTokens.cellSubtitleLetterSpacing}: var(${attachTokens.cellSubtitleLetterSpacing});\n ${cellTokens.cellSubtitleLineHeight}: var(${attachTokens.cellSubtitleLineHeight});\n\n white-space: nowrap;\n\n &.${classes.cellHidden} {\n visibility: hidden;\n }\n`;\n"],"names":["mergedConfig","mergeConfig","cellConfig","Cell","component","_exp","StyledCell","styled","name","class","propsAsIs"],"mappings":";;;;;;AAMA,IAAMA,YAAY,gBAAGC,WAAW,CAACC,UAAU,CAAC,CAAA;AAC5C,IAAMC,IAAI,gBAAGC,SAAS,CAACJ,YAAY,CAAC,CAAA;AAAC,IAAAK,IAAA,GANnBA,SAMmBA,IAAAA,GAAA;AAAA,EAAA,OAEJF,IAAI,CAAA;AAAA,CAAA,CAAA;AAA9B,IAAMG,UAAU,gBAAGC,MAAM,CAAAF,IAAA,EAAA,CAAA,CAAA;AAAAG,EAAAA,IAAA,EAAA,YAAA;AAAAC,EAAAA,OAAAA,EAAA,SAAA;AAAAC,EAAAA,SAAA,EAAA,IAAA;AAAA,CAyC/B;;;;"}
1
+ {"version":3,"file":"Cell.styles.js","sources":["../../../../../src/components/Attach/ui/Cell/Cell.styles.tsx"],"sourcesContent":["import { styled } from '@linaria/react';\n\nimport { component, mergeConfig } from '../../../../engines';\nimport { cellConfig, cellTokens } from '../../../Cell';\nimport { tokens as attachTokens, classes } from '../../Attach.tokens';\n\nconst mergedConfig = mergeConfig(cellConfig);\nconst Cell = component(mergedConfig);\n\nexport const StyledCell = styled(Cell)`\n ${cellTokens.cellLabelColor}: var(${attachTokens.cellLabelColor});\n ${cellTokens.cellTitleColor}: var(${attachTokens.cellTitleColor});\n ${cellTokens.cellSubtitleColor}: var(${attachTokens.cellSubtitleColor});\n ${cellTokens.cellBackgroundColor}: var(${attachTokens.cellBackgroundColor});\n\n ${cellTokens.cellWidth}: var(${attachTokens.cellWidth});\n ${cellTokens.cellPadding}: var(${attachTokens.cellPadding});\n ${cellTokens.cellPaddingLeftContent}: var(${attachTokens.cellPaddingLeftContent});\n ${cellTokens.cellPaddingContent}: var(${attachTokens.cellPaddingContent});\n ${cellTokens.cellPaddingRightContent}: var(${attachTokens.cellPaddingRightContent});\n\n ${cellTokens.cellTextboxGap}: var(${attachTokens.cellTextboxGap});\n ${cellTokens.cellGap}: var(${attachTokens.cellGap});\n\n ${cellTokens.cellLabelFontFamily}: var(${attachTokens.cellLabelFontFamily});\n ${cellTokens.cellLabelFontSize}: var(${attachTokens.cellLabelFontSize});\n ${cellTokens.cellLabelFontStyle}: var(${attachTokens.cellLabelFontStyle});\n ${cellTokens.cellLabelFontWeight}: var(${attachTokens.cellLabelFontWeight});\n ${cellTokens.cellLabelLetterSpacing}: var(${attachTokens.cellLabelLetterSpacing});\n ${cellTokens.cellLabelLineHeight}: var(${attachTokens.cellLabelLineHeight});\n\n ${cellTokens.cellTitleFontFamily}: var(${attachTokens.cellTitleFontFamily});\n ${cellTokens.cellTitleFontSize}: var(${attachTokens.cellTitleFontSize});\n ${cellTokens.cellTitleFontStyle}: var(${attachTokens.cellTitleFontStyle});\n ${cellTokens.cellTitleFontWeight}: var(${attachTokens.cellTitleFontWeight});\n ${cellTokens.cellTitleLetterSpacing}: var(${attachTokens.cellTitleLetterSpacing});\n ${cellTokens.cellTitleLineHeight}: var(${attachTokens.cellTitleLineHeight});\n\n ${cellTokens.cellSubtitleFontFamily}: var(${attachTokens.cellSubtitleFontFamily});\n ${cellTokens.cellSubtitleFontSize}: var(${attachTokens.cellSubtitleFontSize});\n ${cellTokens.cellSubtitleFontStyle}: var(${attachTokens.cellSubtitleFontStyle});\n ${cellTokens.cellSubtitleFontWeight}: var(${attachTokens.cellSubtitleFontWeight});\n ${cellTokens.cellSubtitleLetterSpacing}: var(${attachTokens.cellSubtitleLetterSpacing});\n ${cellTokens.cellSubtitleLineHeight}: var(${attachTokens.cellSubtitleLineHeight});\n\n white-space: nowrap;\n\n &.${classes.cellHidden} {\n visibility: hidden;\n }\n`;\n"],"names":["mergedConfig","mergeConfig","cellConfig","Cell","component","_exp","StyledCell","styled","name","class","propsAsIs"],"mappings":";;;;AAMA,IAAMA,YAAY,gBAAGC,WAAW,CAACC,UAAU,CAAC,CAAA;AAC5C,IAAMC,IAAI,gBAAGC,SAAS,CAACJ,YAAY,CAAC,CAAA;AAAC,IAAAK,IAAA,GANnBA,SAMmBA,IAAAA,GAAA;AAAA,EAAA,OAEJF,IAAI,CAAA;AAAA,CAAA,CAAA;AAA9B,IAAMG,UAAU,gBAAGC,MAAM,CAAAF,IAAA,EAAA,CAAA,CAAA;AAAAG,EAAAA,IAAA,EAAA,YAAA;AAAAC,EAAAA,OAAAA,EAAA,SAAA;AAAAC,EAAAA,SAAA,EAAA,IAAA;AAAA,CAyC/B;;;;"}
@@ -1,6 +1,5 @@
1
1
  import './IconButton.styles_1q2jfs2.css';
2
2
  import { styled } from '@linaria/react';
3
- import '@linaria/core';
4
3
  import { component, mergeConfig } from '../../../../engines/common.js';
5
4
  import { iconButtonConfig } from '../../../IconButton/IconButton.js';
6
5
 
@@ -1 +1 @@
1
- {"version":3,"file":"IconButton.styles.js","sources":["../../../../../src/components/Attach/ui/IconButton/IconButton.styles.tsx"],"sourcesContent":["import { styled } from '@linaria/react';\n\nimport { component, mergeConfig } from '../../../../engines';\nimport { iconButtonConfig, iconButtonTokens } from '../../../IconButton';\nimport { tokens as attachTokens } from '../../Attach.tokens';\n\nconst mergedConfig = mergeConfig(iconButtonConfig);\nconst IconButton = component(mergedConfig);\n\nexport const StyledIconButton = styled(IconButton)`\n ${iconButtonTokens.iconButtonColor}: var(${attachTokens.iconButtonColor});\n ${iconButtonTokens.iconButtonBackgroundColor}: var(${attachTokens.iconButtonBackgroundColor});\n ${iconButtonTokens.iconButtonLoadingBackgroundColor}: var(${attachTokens.iconButtonLoadingBackgroundColor});\n ${iconButtonTokens.iconButtonColorHover}: var(${attachTokens.iconButtonColorHover});\n ${iconButtonTokens.iconButtonBackgroundColorHover}: var(${attachTokens.iconButtonBackgroundColorHover});\n ${iconButtonTokens.iconButtonColorActive}: var(${attachTokens.iconButtonColorActive});\n ${iconButtonTokens.iconButtonBackgroundColorActive}: var(${attachTokens.iconButtonBackgroundColorActive});\n\n ${iconButtonTokens.iconButtonScaleHover}: var(${attachTokens.iconButtonScaleHover});\n ${iconButtonTokens.iconButtonScaleActive}: var(${attachTokens.iconButtonScaleActive});\n ${iconButtonTokens.iconButtonHeight}: var(${attachTokens.iconButtonHeight});\n ${iconButtonTokens.iconButtonWidth}: var(${attachTokens.iconButtonWidth});\n ${iconButtonTokens.iconButtonPadding}: var(${attachTokens.iconButtonPadding});\n ${iconButtonTokens.iconButtonRadius}: var(${attachTokens.iconButtonRadius});\n ${iconButtonTokens.iconButtonRadiusCircle}: var(${attachTokens.iconButtonRadiusCircle});\n\n ${iconButtonTokens.iconButtonFontFamily}: var(${attachTokens.iconButtonFontFamily});\n ${iconButtonTokens.iconButtonFontSize}: var(${attachTokens.iconButtonFontSize});\n ${iconButtonTokens.iconButtonFontStyle}: var(${attachTokens.iconButtonFontStyle});\n ${iconButtonTokens.iconButtonFontWeight}: var(${attachTokens.iconButtonFontWeight});\n ${iconButtonTokens.iconButtonLetterSpacing}: var(${attachTokens.iconButtonLetterSpacing});\n ${iconButtonTokens.iconButtonLineHeight}: var(${attachTokens.iconButtonLineHeight});\n\n ${iconButtonTokens.iconButtonDisabledOpacity}: var(${attachTokens.iconButtonDisabledOpacity});\n ${iconButtonTokens.iconButtonFocusColor}: var(${attachTokens.iconButtonFocusColor});\n ${iconButtonTokens.iconButtonSpinnerColor}: var(${attachTokens.iconButtonSpinnerColor});\n ${iconButtonTokens.iconButtonSpinnerSize}: var(${attachTokens.iconButtonSpinnerSize});\n\n flex-shrink: 0;\n`;\n\nexport const StyledIconButtonCancel = styled(IconButton)`\n ${iconButtonTokens.iconButtonColor}: var(${attachTokens.iconButtonCancelColor});\n ${iconButtonTokens.iconButtonBackgroundColor}: var(${attachTokens.iconButtonCancelBackgroundColor});\n ${iconButtonTokens.iconButtonLoadingBackgroundColor}: var(${attachTokens.iconButtonCancelLoadingBackgroundColor});\n ${iconButtonTokens.iconButtonColorHover}: var(${attachTokens.iconButtonCancelColorHover});\n ${iconButtonTokens.iconButtonBackgroundColorHover}: var(${attachTokens.iconButtonCancelBackgroundColorHover});\n ${iconButtonTokens.iconButtonColorActive}: var(${attachTokens.iconButtonCancelColorActive});\n ${iconButtonTokens.iconButtonBackgroundColorActive}: var(${attachTokens.iconButtonCancelBackgroundColorActive});\n\n ${iconButtonTokens.iconButtonScaleHover}: var(${attachTokens.iconButtonCancelScaleHover});\n ${iconButtonTokens.iconButtonScaleActive}: var(${attachTokens.iconButtonCancelScaleActive});\n ${iconButtonTokens.iconButtonHeight}: var(${attachTokens.iconButtonCancelHeight});\n ${iconButtonTokens.iconButtonWidth}: var(${attachTokens.iconButtonCancelWidth});\n ${iconButtonTokens.iconButtonPadding}: var(${attachTokens.iconButtonCancelPadding});\n ${iconButtonTokens.iconButtonRadius}: var(${attachTokens.iconButtonCancelRadius});\n ${iconButtonTokens.iconButtonRadiusCircle}: var(${attachTokens.iconButtonCancelRadiusCircle});\n\n ${iconButtonTokens.iconButtonFontFamily}: var(${attachTokens.iconButtonCancelFontFamily});\n ${iconButtonTokens.iconButtonFontSize}: var(${attachTokens.iconButtonCancelFontSize});\n ${iconButtonTokens.iconButtonFontStyle}: var(${attachTokens.iconButtonCancelFontStyle});\n ${iconButtonTokens.iconButtonFontWeight}: var(${attachTokens.iconButtonCancelFontWeight});\n ${iconButtonTokens.iconButtonLetterSpacing}: var(${attachTokens.iconButtonCancelLetterSpacing});\n ${iconButtonTokens.iconButtonLineHeight}: var(${attachTokens.iconButtonCancelLineHeight});\n\n ${iconButtonTokens.iconButtonDisabledOpacity}: var(${attachTokens.iconButtonCancelDisabledOpacity});\n ${iconButtonTokens.iconButtonFocusColor}: var(${attachTokens.iconButtonCancelFocusColor});\n ${iconButtonTokens.iconButtonSpinnerColor}: var(${attachTokens.iconButtonCancelSpinnerColor});\n ${iconButtonTokens.iconButtonSpinnerSize}: var(${attachTokens.iconButtonCancelSpinnerSize});\n`;\n"],"names":["mergedConfig","mergeConfig","iconButtonConfig","IconButton","component","_exp","StyledIconButton","styled","name","class","propsAsIs","_exp50","StyledIconButtonCancel"],"mappings":";;;;;AAMA,IAAMA,YAAY,gBAAGC,WAAW,CAACC,gBAAgB,CAAC,CAAA;AAClD,IAAMC,UAAU,gBAAGC,SAAS,CAACJ,YAAY,CAAC,CAAA;AAAC,IAAAK,IAAA,GANzBA,SAMyBA,IAAAA,GAAA;AAAA,EAAA,OAEJF,UAAU,CAAA;AAAA,CAAA,CAAA;AAA1C,IAAMG,gBAAgB,gBAAGC,MAAM,CAAAF,IAAA,EAAA,CAAA,CAAA;AAAAG,EAAAA,IAAA,EAAA,kBAAA;AAAAC,EAAAA,OAAAA,EAAA,UAAA;AAAAC,EAAAA,SAAA,EAAA,IAAA;AAAA,CA8BrC,EAAA;AAAC,IAAAC,MAAA,GAtCgBA,SAsChBA,MAAAA,GAAA;AAAA,EAAA,OAE2CR,UAAU,CAAA;AAAA,CAAA,CAAA;AAAhD,IAAMS,sBAAsB,gBAAGL,MAAM,CAAAI,MAAA,EAAA,CAAA,CAAA;AAAAH,EAAAA,IAAA,EAAA,wBAAA;AAAAC,EAAAA,OAAAA,EAAA,SAAA;AAAAC,EAAAA,SAAA,EAAA,IAAA;AAAA,CA4B3C;;;;"}
1
+ {"version":3,"file":"IconButton.styles.js","sources":["../../../../../src/components/Attach/ui/IconButton/IconButton.styles.tsx"],"sourcesContent":["import { styled } from '@linaria/react';\n\nimport { component, mergeConfig } from '../../../../engines';\nimport { iconButtonConfig, iconButtonTokens } from '../../../IconButton';\nimport { tokens as attachTokens } from '../../Attach.tokens';\n\nconst mergedConfig = mergeConfig(iconButtonConfig);\nconst IconButton = component(mergedConfig);\n\nexport const StyledIconButton = styled(IconButton)`\n ${iconButtonTokens.iconButtonColor}: var(${attachTokens.iconButtonColor});\n ${iconButtonTokens.iconButtonBackgroundColor}: var(${attachTokens.iconButtonBackgroundColor});\n ${iconButtonTokens.iconButtonLoadingBackgroundColor}: var(${attachTokens.iconButtonLoadingBackgroundColor});\n ${iconButtonTokens.iconButtonColorHover}: var(${attachTokens.iconButtonColorHover});\n ${iconButtonTokens.iconButtonBackgroundColorHover}: var(${attachTokens.iconButtonBackgroundColorHover});\n ${iconButtonTokens.iconButtonColorActive}: var(${attachTokens.iconButtonColorActive});\n ${iconButtonTokens.iconButtonBackgroundColorActive}: var(${attachTokens.iconButtonBackgroundColorActive});\n\n ${iconButtonTokens.iconButtonScaleHover}: var(${attachTokens.iconButtonScaleHover});\n ${iconButtonTokens.iconButtonScaleActive}: var(${attachTokens.iconButtonScaleActive});\n ${iconButtonTokens.iconButtonHeight}: var(${attachTokens.iconButtonHeight});\n ${iconButtonTokens.iconButtonWidth}: var(${attachTokens.iconButtonWidth});\n ${iconButtonTokens.iconButtonPadding}: var(${attachTokens.iconButtonPadding});\n ${iconButtonTokens.iconButtonRadius}: var(${attachTokens.iconButtonRadius});\n ${iconButtonTokens.iconButtonRadiusCircle}: var(${attachTokens.iconButtonRadiusCircle});\n\n ${iconButtonTokens.iconButtonFontFamily}: var(${attachTokens.iconButtonFontFamily});\n ${iconButtonTokens.iconButtonFontSize}: var(${attachTokens.iconButtonFontSize});\n ${iconButtonTokens.iconButtonFontStyle}: var(${attachTokens.iconButtonFontStyle});\n ${iconButtonTokens.iconButtonFontWeight}: var(${attachTokens.iconButtonFontWeight});\n ${iconButtonTokens.iconButtonLetterSpacing}: var(${attachTokens.iconButtonLetterSpacing});\n ${iconButtonTokens.iconButtonLineHeight}: var(${attachTokens.iconButtonLineHeight});\n\n ${iconButtonTokens.iconButtonDisabledOpacity}: var(${attachTokens.iconButtonDisabledOpacity});\n ${iconButtonTokens.iconButtonFocusColor}: var(${attachTokens.iconButtonFocusColor});\n ${iconButtonTokens.iconButtonSpinnerColor}: var(${attachTokens.iconButtonSpinnerColor});\n ${iconButtonTokens.iconButtonSpinnerSize}: var(${attachTokens.iconButtonSpinnerSize});\n\n flex-shrink: 0;\n`;\n\nexport const StyledIconButtonCancel = styled(IconButton)`\n ${iconButtonTokens.iconButtonColor}: var(${attachTokens.iconButtonCancelColor});\n ${iconButtonTokens.iconButtonBackgroundColor}: var(${attachTokens.iconButtonCancelBackgroundColor});\n ${iconButtonTokens.iconButtonLoadingBackgroundColor}: var(${attachTokens.iconButtonCancelLoadingBackgroundColor});\n ${iconButtonTokens.iconButtonColorHover}: var(${attachTokens.iconButtonCancelColorHover});\n ${iconButtonTokens.iconButtonBackgroundColorHover}: var(${attachTokens.iconButtonCancelBackgroundColorHover});\n ${iconButtonTokens.iconButtonColorActive}: var(${attachTokens.iconButtonCancelColorActive});\n ${iconButtonTokens.iconButtonBackgroundColorActive}: var(${attachTokens.iconButtonCancelBackgroundColorActive});\n\n ${iconButtonTokens.iconButtonScaleHover}: var(${attachTokens.iconButtonCancelScaleHover});\n ${iconButtonTokens.iconButtonScaleActive}: var(${attachTokens.iconButtonCancelScaleActive});\n ${iconButtonTokens.iconButtonHeight}: var(${attachTokens.iconButtonCancelHeight});\n ${iconButtonTokens.iconButtonWidth}: var(${attachTokens.iconButtonCancelWidth});\n ${iconButtonTokens.iconButtonPadding}: var(${attachTokens.iconButtonCancelPadding});\n ${iconButtonTokens.iconButtonRadius}: var(${attachTokens.iconButtonCancelRadius});\n ${iconButtonTokens.iconButtonRadiusCircle}: var(${attachTokens.iconButtonCancelRadiusCircle});\n\n ${iconButtonTokens.iconButtonFontFamily}: var(${attachTokens.iconButtonCancelFontFamily});\n ${iconButtonTokens.iconButtonFontSize}: var(${attachTokens.iconButtonCancelFontSize});\n ${iconButtonTokens.iconButtonFontStyle}: var(${attachTokens.iconButtonCancelFontStyle});\n ${iconButtonTokens.iconButtonFontWeight}: var(${attachTokens.iconButtonCancelFontWeight});\n ${iconButtonTokens.iconButtonLetterSpacing}: var(${attachTokens.iconButtonCancelLetterSpacing});\n ${iconButtonTokens.iconButtonLineHeight}: var(${attachTokens.iconButtonCancelLineHeight});\n\n ${iconButtonTokens.iconButtonDisabledOpacity}: var(${attachTokens.iconButtonCancelDisabledOpacity});\n ${iconButtonTokens.iconButtonFocusColor}: var(${attachTokens.iconButtonCancelFocusColor});\n ${iconButtonTokens.iconButtonSpinnerColor}: var(${attachTokens.iconButtonCancelSpinnerColor});\n ${iconButtonTokens.iconButtonSpinnerSize}: var(${attachTokens.iconButtonCancelSpinnerSize});\n`;\n"],"names":["mergedConfig","mergeConfig","iconButtonConfig","IconButton","component","_exp","StyledIconButton","styled","name","class","propsAsIs","_exp50","StyledIconButtonCancel"],"mappings":";;;;AAMA,IAAMA,YAAY,gBAAGC,WAAW,CAACC,gBAAgB,CAAC,CAAA;AAClD,IAAMC,UAAU,gBAAGC,SAAS,CAACJ,YAAY,CAAC,CAAA;AAAC,IAAAK,IAAA,GANzBA,SAMyBA,IAAAA,GAAA;AAAA,EAAA,OAEJF,UAAU,CAAA;AAAA,CAAA,CAAA;AAA1C,IAAMG,gBAAgB,gBAAGC,MAAM,CAAAF,IAAA,EAAA,CAAA,CAAA;AAAAG,EAAAA,IAAA,EAAA,kBAAA;AAAAC,EAAAA,OAAAA,EAAA,UAAA;AAAAC,EAAAA,SAAA,EAAA,IAAA;AAAA,CA8BrC,EAAA;AAAC,IAAAC,MAAA,GAtCgBA,SAsChBA,MAAAA,GAAA;AAAA,EAAA,OAE2CR,UAAU,CAAA;AAAA,CAAA,CAAA;AAAhD,IAAMS,sBAAsB,gBAAGL,MAAM,CAAAI,MAAA,EAAA,CAAA,CAAA;AAAAH,EAAAA,IAAA,EAAA,wBAAA;AAAAC,EAAAA,OAAAA,EAAA,SAAA;AAAAC,EAAAA,SAAA,EAAA,IAAA;AAAA,CA4B3C;;;;"}
@@ -1,11 +1,10 @@
1
1
  import React from 'react';
2
- import '@linaria/react';
3
- import { IconBlankCsvOutline } from '../../_Icon/Icons/IconBlankCsvOutline.js';
4
- import { IconBlankDocOutline } from '../../_Icon/Icons/IconBlankDocOutline.js';
5
2
  import { IconBlankOutline } from '../../_Icon/Icons/IconBlankOutline.js';
6
- import { IconBlankPdfOutline } from '../../_Icon/Icons/IconBlankPdfOutline.js';
3
+ import { IconBlankCsvOutline } from '../../_Icon/Icons/IconBlankCsvOutline.js';
7
4
  import { IconBlankTxtOutline } from '../../_Icon/Icons/IconBlankTxtOutline.js';
8
5
  import { IconBlankXlsOutline } from '../../_Icon/Icons/IconBlankXlsOutline.js';
6
+ import { IconBlankDocOutline } from '../../_Icon/Icons/IconBlankDocOutline.js';
7
+ import { IconBlankPdfOutline } from '../../_Icon/Icons/IconBlankPdfOutline.js';
9
8
 
10
9
  var getFileicon = function getFileicon(extension, size) {
11
10
  var iconSize = size === 'xs' ? 'xs' : 's';
@@ -1 +1 @@
1
- {"version":3,"file":"getFileicon.js","sources":["../../../../src/components/Attach/utils/getFileicon.tsx"],"sourcesContent":["import React from 'react';\n\nimport {\n IconBlankCsvOutline,\n IconBlankDocOutline,\n IconBlankOutline,\n IconBlankPdfOutline,\n IconBlankTxtOutline,\n IconBlankXlsOutline,\n} from '../../_Icon';\n\nexport const getFileicon = (extension?: string, size?: string) => {\n const iconSize = size === 'xs' ? 'xs' : 's';\n\n switch (extension) {\n case 'pdf':\n return <IconBlankPdfOutline size={iconSize} color=\"inherit\" />;\n case 'doc':\n return <IconBlankDocOutline size={iconSize} color=\"inherit\" />;\n case 'xls':\n return <IconBlankXlsOutline size={iconSize} color=\"inherit\" />;\n case 'txt':\n return <IconBlankTxtOutline size={iconSize} color=\"inherit\" />;\n case 'csv':\n return <IconBlankCsvOutline size={iconSize} color=\"inherit\" />;\n default:\n return <IconBlankOutline size={iconSize} color=\"inherit\" />;\n }\n};\n"],"names":["getFileicon","extension","size","iconSize","React","createElement","IconBlankPdfOutline","color","IconBlankDocOutline","IconBlankXlsOutline","IconBlankTxtOutline","IconBlankCsvOutline","IconBlankOutline"],"mappings":";;;;;;;;;AAWO,IAAMA,WAAW,GAAG,SAAdA,WAAWA,CAAIC,SAAkB,EAAEC,IAAa,EAAK;EAC9D,IAAMC,QAAQ,GAAGD,IAAI,KAAK,IAAI,GAAG,IAAI,GAAG,GAAG,CAAA;AAE3C,EAAA,QAAQD,SAAS;AACb,IAAA,KAAK,KAAK;AACN,MAAA,oBAAOG,KAAA,CAAAC,aAAA,CAACC,mBAAmB,EAAA;AAACJ,QAAAA,IAAI,EAAEC,QAAS;AAACI,QAAAA,KAAK,EAAC,SAAA;AAAS,OAAE,CAAC,CAAA;AAClE,IAAA,KAAK,KAAK;AACN,MAAA,oBAAOH,KAAA,CAAAC,aAAA,CAACG,mBAAmB,EAAA;AAACN,QAAAA,IAAI,EAAEC,QAAS;AAACI,QAAAA,KAAK,EAAC,SAAA;AAAS,OAAE,CAAC,CAAA;AAClE,IAAA,KAAK,KAAK;AACN,MAAA,oBAAOH,KAAA,CAAAC,aAAA,CAACI,mBAAmB,EAAA;AAACP,QAAAA,IAAI,EAAEC,QAAS;AAACI,QAAAA,KAAK,EAAC,SAAA;AAAS,OAAE,CAAC,CAAA;AAClE,IAAA,KAAK,KAAK;AACN,MAAA,oBAAOH,KAAA,CAAAC,aAAA,CAACK,mBAAmB,EAAA;AAACR,QAAAA,IAAI,EAAEC,QAAS;AAACI,QAAAA,KAAK,EAAC,SAAA;AAAS,OAAE,CAAC,CAAA;AAClE,IAAA,KAAK,KAAK;AACN,MAAA,oBAAOH,KAAA,CAAAC,aAAA,CAACM,mBAAmB,EAAA;AAACT,QAAAA,IAAI,EAAEC,QAAS;AAACI,QAAAA,KAAK,EAAC,SAAA;AAAS,OAAE,CAAC,CAAA;AAClE,IAAA;AACI,MAAA,oBAAOH,KAAA,CAAAC,aAAA,CAACO,gBAAgB,EAAA;AAACV,QAAAA,IAAI,EAAEC,QAAS;AAACI,QAAAA,KAAK,EAAC,SAAA;AAAS,OAAE,CAAC,CAAA;AACnE,GAAA;AACJ;;;;"}
1
+ {"version":3,"file":"getFileicon.js","sources":["../../../../src/components/Attach/utils/getFileicon.tsx"],"sourcesContent":["import React from 'react';\n\nimport {\n IconBlankCsvOutline,\n IconBlankDocOutline,\n IconBlankOutline,\n IconBlankPdfOutline,\n IconBlankTxtOutline,\n IconBlankXlsOutline,\n} from '../../_Icon';\n\nexport const getFileicon = (extension?: string, size?: string) => {\n const iconSize = size === 'xs' ? 'xs' : 's';\n\n switch (extension) {\n case 'pdf':\n return <IconBlankPdfOutline size={iconSize} color=\"inherit\" />;\n case 'doc':\n return <IconBlankDocOutline size={iconSize} color=\"inherit\" />;\n case 'xls':\n return <IconBlankXlsOutline size={iconSize} color=\"inherit\" />;\n case 'txt':\n return <IconBlankTxtOutline size={iconSize} color=\"inherit\" />;\n case 'csv':\n return <IconBlankCsvOutline size={iconSize} color=\"inherit\" />;\n default:\n return <IconBlankOutline size={iconSize} color=\"inherit\" />;\n }\n};\n"],"names":["getFileicon","extension","size","iconSize","React","createElement","IconBlankPdfOutline","color","IconBlankDocOutline","IconBlankXlsOutline","IconBlankTxtOutline","IconBlankCsvOutline","IconBlankOutline"],"mappings":";;;;;;;;AAWO,IAAMA,WAAW,GAAG,SAAdA,WAAWA,CAAIC,SAAkB,EAAEC,IAAa,EAAK;EAC9D,IAAMC,QAAQ,GAAGD,IAAI,KAAK,IAAI,GAAG,IAAI,GAAG,GAAG,CAAA;AAE3C,EAAA,QAAQD,SAAS;AACb,IAAA,KAAK,KAAK;AACN,MAAA,oBAAOG,KAAA,CAAAC,aAAA,CAACC,mBAAmB,EAAA;AAACJ,QAAAA,IAAI,EAAEC,QAAS;AAACI,QAAAA,KAAK,EAAC,SAAA;AAAS,OAAE,CAAC,CAAA;AAClE,IAAA,KAAK,KAAK;AACN,MAAA,oBAAOH,KAAA,CAAAC,aAAA,CAACG,mBAAmB,EAAA;AAACN,QAAAA,IAAI,EAAEC,QAAS;AAACI,QAAAA,KAAK,EAAC,SAAA;AAAS,OAAE,CAAC,CAAA;AAClE,IAAA,KAAK,KAAK;AACN,MAAA,oBAAOH,KAAA,CAAAC,aAAA,CAACI,mBAAmB,EAAA;AAACP,QAAAA,IAAI,EAAEC,QAAS;AAACI,QAAAA,KAAK,EAAC,SAAA;AAAS,OAAE,CAAC,CAAA;AAClE,IAAA,KAAK,KAAK;AACN,MAAA,oBAAOH,KAAA,CAAAC,aAAA,CAACK,mBAAmB,EAAA;AAACR,QAAAA,IAAI,EAAEC,QAAS;AAACI,QAAAA,KAAK,EAAC,SAAA;AAAS,OAAE,CAAC,CAAA;AAClE,IAAA,KAAK,KAAK;AACN,MAAA,oBAAOH,KAAA,CAAAC,aAAA,CAACM,mBAAmB,EAAA;AAACT,QAAAA,IAAI,EAAEC,QAAS;AAACI,QAAAA,KAAK,EAAC,SAAA;AAAS,OAAE,CAAC,CAAA;AAClE,IAAA;AACI,MAAA,oBAAOH,KAAA,CAAAC,aAAA,CAACO,gBAAgB,EAAA;AAACV,QAAAA,IAAI,EAAEC,QAAS;AAACI,QAAAA,KAAK,EAAC,SAAA;AAAS,OAAE,CAAC,CAAA;AACnE,GAAA;AACJ;;;;"}
@@ -1,6 +1,3 @@
1
- import 'react';
2
- import '@linaria/react';
3
-
4
1
  var separator = '...';
5
2
 
6
3
  export { separator };
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sources":["../../../../src/components/Attach/utils/index.ts"],"sourcesContent":["export { extractExtension } from './extractExtension';\nexport { getFileicon } from './getFileicon';\nexport { addSeparator } from './addSeparator';\n\nexport const separator = '...';\n"],"names":["separator"],"mappings":";;;AAIO,IAAMA,SAAS,GAAG;;;;"}
1
+ {"version":3,"file":"index.js","sources":["../../../../src/components/Attach/utils/index.ts"],"sourcesContent":["export { extractExtension } from './extractExtension';\nexport { getFileicon } from './getFileicon';\nexport { addSeparator } from './addSeparator';\n\nexport const separator = '...';\n"],"names":["separator"],"mappings":"AAIO,IAAMA,SAAS,GAAG;;;;"}