@salutejs/plasma-new-hope 0.174.0-canary.1503.11466452273.0 → 0.174.0-canary.1503.11500823810.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (525) 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 +9 -5
  37. package/cjs/components/Calendar/ui/CalendarDays/CalendarDays.js.map +1 -1
  38. package/cjs/components/Calendar/ui/CalendarHeader/CalendarHeader.js +5 -6
  39. package/cjs/components/Calendar/ui/CalendarHeader/CalendarHeader.js.map +1 -1
  40. package/cjs/components/Calendar/ui/CalendarHeader/CalendarHeader.styles.js +0 -1
  41. package/cjs/components/Calendar/ui/CalendarHeader/CalendarHeader.styles.js.map +1 -1
  42. package/cjs/components/Calendar/ui/CalendarMonths/CalendarMonths.js +9 -5
  43. package/cjs/components/Calendar/ui/CalendarMonths/CalendarMonths.js.map +1 -1
  44. package/cjs/components/Calendar/ui/CalendarQuarters/CalendarQuarters.js +9 -5
  45. package/cjs/components/Calendar/ui/CalendarQuarters/CalendarQuarters.js.map +1 -1
  46. package/cjs/components/Calendar/ui/CalendarYears/CalendarYears.js +9 -5
  47. package/cjs/components/Calendar/ui/CalendarYears/CalendarYears.js.map +1 -1
  48. package/cjs/components/Combobox/ComboboxNew/Combobox.js +11 -12
  49. package/cjs/components/Combobox/ComboboxNew/Combobox.js.map +1 -1
  50. package/cjs/components/Combobox/ComboboxNew/Combobox.styles.js +2 -4
  51. package/cjs/components/Combobox/ComboboxNew/Combobox.styles.js.map +1 -1
  52. package/cjs/components/Combobox/ComboboxNew/hooks/getPathMaps.js +0 -2
  53. package/cjs/components/Combobox/ComboboxNew/hooks/getPathMaps.js.map +1 -1
  54. package/cjs/components/Combobox/ComboboxNew/ui/Inner/Inner.js +1 -2
  55. package/cjs/components/Combobox/ComboboxNew/ui/Inner/Inner.js.map +1 -1
  56. package/cjs/components/Combobox/ComboboxNew/ui/Inner/ui/Item/Item.js +5 -6
  57. package/cjs/components/Combobox/ComboboxNew/ui/Inner/ui/Item/Item.js.map +1 -1
  58. package/cjs/components/Combobox/ComboboxNew/ui/Inner/ui/Item/Item.styles.js +1 -3
  59. package/cjs/components/Combobox/ComboboxNew/ui/Inner/ui/Item/Item.styles.js.map +1 -1
  60. package/cjs/components/Combobox/ComboboxNew/ui/Target/Target.styles.js +1 -2
  61. package/cjs/components/Combobox/ComboboxNew/ui/Target/Target.styles.js.map +1 -1
  62. package/cjs/components/Combobox/ComboboxOld/Combobox.js +4 -10
  63. package/cjs/components/Combobox/ComboboxOld/Combobox.js.map +1 -1
  64. package/cjs/components/Combobox/ComboboxOld/Combobox.styles.js +0 -1
  65. package/cjs/components/Combobox/ComboboxOld/Combobox.styles.js.map +1 -1
  66. package/cjs/components/Combobox/ComboboxOld/hooks/useFocusController.js +0 -1
  67. package/cjs/components/Combobox/ComboboxOld/hooks/useFocusController.js.map +1 -1
  68. package/cjs/components/Combobox/ComboboxOld/ui/ComboboxChip/ComboboxChip.styles.js +1 -2
  69. package/cjs/components/Combobox/ComboboxOld/ui/ComboboxChip/ComboboxChip.styles.js.map +1 -1
  70. package/cjs/components/Combobox/ComboboxOld/ui/ComboboxDivider/ComboboxDivider.js +1 -10
  71. package/cjs/components/Combobox/ComboboxOld/ui/ComboboxDivider/ComboboxDivider.js.map +1 -1
  72. package/cjs/components/Combobox/ComboboxOld/ui/ComboboxFooter/ComboboxFooter.js +1 -10
  73. package/cjs/components/Combobox/ComboboxOld/ui/ComboboxFooter/ComboboxFooter.js.map +1 -1
  74. package/cjs/components/Combobox/ComboboxOld/ui/ComboboxGroup/ComboboxGroup.js +1 -10
  75. package/cjs/components/Combobox/ComboboxOld/ui/ComboboxGroup/ComboboxGroup.js.map +1 -1
  76. package/cjs/components/Combobox/ComboboxOld/ui/ComboboxHeader/ComboboxHeader.js +1 -10
  77. package/cjs/components/Combobox/ComboboxOld/ui/ComboboxHeader/ComboboxHeader.js.map +1 -1
  78. package/cjs/components/Combobox/ComboboxOld/ui/ComboboxItem/ComboboxItem.styles.js +0 -2
  79. package/cjs/components/Combobox/ComboboxOld/ui/ComboboxItem/ComboboxItem.styles.js.map +1 -1
  80. package/cjs/components/Combobox/ComboboxOld/ui/ComboboxTarget/ComboboxTarget.js +1 -1
  81. package/cjs/components/Combobox/ComboboxOld/ui/ComboboxTarget/ComboboxTarget.styles.js +1 -2
  82. package/cjs/components/Combobox/ComboboxOld/ui/ComboboxTarget/ComboboxTarget.styles.js.map +1 -1
  83. package/cjs/components/DatePicker/DatePickerBase.styles.js +1 -7
  84. package/cjs/components/DatePicker/DatePickerBase.styles.js.map +1 -1
  85. package/cjs/components/DatePicker/RangeDate/RangeDate.js +1 -1
  86. package/cjs/components/DatePicker/RangeDate/RangeDate.styles.js +0 -1
  87. package/cjs/components/DatePicker/RangeDate/RangeDate.styles.js.map +1 -1
  88. package/cjs/components/DatePicker/RangeDate/RangeDatePopover/RangeDatePopover.js +1 -2
  89. package/cjs/components/DatePicker/RangeDate/RangeDatePopover/RangeDatePopover.js.map +1 -1
  90. package/cjs/components/DatePicker/RangeDate/RangeDatePopover/RangeDatePopover.styles.js +2 -5
  91. package/cjs/components/DatePicker/RangeDate/RangeDatePopover/RangeDatePopover.styles.js.map +1 -1
  92. package/cjs/components/DatePicker/SingleDate/SingleDate.styles.js +0 -1
  93. package/cjs/components/DatePicker/SingleDate/SingleDate.styles.js.map +1 -1
  94. package/cjs/components/Drawer/Drawer.js +5 -10
  95. package/cjs/components/Drawer/Drawer.js.map +1 -1
  96. package/cjs/components/Drawer/Drawer.styles.js +0 -4
  97. package/cjs/components/Drawer/Drawer.styles.js.map +1 -1
  98. package/cjs/components/Drawer/hooks/useDrawer.js +0 -4
  99. package/cjs/components/Drawer/hooks/useDrawer.js.map +1 -1
  100. package/cjs/components/Drawer/ui/DrawerContent/DrawerContent.js +0 -7
  101. package/cjs/components/Drawer/ui/DrawerContent/DrawerContent.js.map +1 -1
  102. package/cjs/components/Drawer/ui/DrawerFooter/DrawerFooter.js +0 -7
  103. package/cjs/components/Drawer/ui/DrawerFooter/DrawerFooter.js.map +1 -1
  104. package/cjs/components/Drawer/ui/DrawerHeader/DrawerHeader.js +0 -3
  105. package/cjs/components/Drawer/ui/DrawerHeader/DrawerHeader.js.map +1 -1
  106. package/cjs/components/Dropdown/Dropdown.js +3 -10
  107. package/cjs/components/Dropdown/Dropdown.js.map +1 -1
  108. package/cjs/components/Dropdown/Dropdown.styles.js +2 -3
  109. package/cjs/components/Dropdown/Dropdown.styles.js.map +1 -1
  110. package/cjs/components/Dropdown/ui/DropdownInner/DropdownInner.js +1 -9
  111. package/cjs/components/Dropdown/ui/DropdownInner/DropdownInner.js.map +1 -1
  112. package/cjs/components/Dropdown/ui/DropdownItem/DropdownItem.js +1 -2
  113. package/cjs/components/Dropdown/ui/DropdownItem/DropdownItem.js.map +1 -1
  114. package/cjs/components/Dropdown/ui/DropdownItemOld/DropdownItem.styles.js +0 -2
  115. package/cjs/components/Dropdown/ui/DropdownItemOld/DropdownItem.styles.js.map +1 -1
  116. package/cjs/components/Dropdown/ui/DropdownOld/Dropdown.styles.js +0 -1
  117. package/cjs/components/Dropdown/ui/DropdownOld/Dropdown.styles.js.map +1 -1
  118. package/cjs/components/Editable/Editable.js +3 -4
  119. package/cjs/components/Editable/Editable.js.map +1 -1
  120. package/cjs/components/Editable/utils/clearSelection.js +0 -2
  121. package/cjs/components/Editable/utils/clearSelection.js.map +1 -1
  122. package/cjs/components/Editable/utils/selectText.js +0 -2
  123. package/cjs/components/Editable/utils/selectText.js.map +1 -1
  124. package/cjs/components/EmptyState/EmptyState.styles.js +1 -2
  125. package/cjs/components/EmptyState/EmptyState.styles.js.map +1 -1
  126. package/cjs/components/IconButton/IconButton.js +1 -1
  127. package/cjs/components/IconButton/IconButton.styles.js +0 -8
  128. package/cjs/components/IconButton/IconButton.styles.js.map +1 -1
  129. package/cjs/components/Modal/Modal.js +6 -8
  130. package/cjs/components/Modal/Modal.js.map +1 -1
  131. package/cjs/components/Modal/hooks/useModal.js +0 -4
  132. package/cjs/components/Modal/hooks/useModal.js.map +1 -1
  133. package/cjs/components/Notification/Notification.css +11 -11
  134. package/cjs/components/Notification/Notification.styles.js +3 -4
  135. package/cjs/components/Notification/Notification.styles.js.map +1 -1
  136. package/cjs/components/Notification/{Notification.styles_7h8hp0.css → Notification.styles_1cf2gwd.css} +1 -1
  137. package/cjs/components/Notification/Notification.tokens.js +2 -1
  138. package/cjs/components/Notification/Notification.tokens.js.map +1 -1
  139. package/cjs/components/Notification/NotificationsPortal.js +4 -5
  140. package/cjs/components/Notification/NotificationsPortal.js.map +1 -1
  141. package/cjs/components/Notification/NotificationsProvider.css +11 -11
  142. package/cjs/components/Pagination/Pagination.styles.js +1 -2
  143. package/cjs/components/Pagination/Pagination.styles.js.map +1 -1
  144. package/cjs/components/Pagination/ui/PaginationSelectPerPage/PaginationSelectPerPage.styles.js +1 -2
  145. package/cjs/components/Pagination/ui/PaginationSelectPerPage/PaginationSelectPerPage.styles.js.map +1 -1
  146. package/cjs/components/Panel/ui/PanelHeader/PanelHeader.js +1 -2
  147. package/cjs/components/Panel/ui/PanelHeader/PanelHeader.js.map +1 -1
  148. package/cjs/components/Panel/ui/PanelHeader/PanelHeader.styles.js +1 -2
  149. package/cjs/components/Panel/ui/PanelHeader/PanelHeader.styles.js.map +1 -1
  150. package/cjs/components/Popover/Popover.js +1 -1
  151. package/cjs/components/Popup/Popup.js +2 -2
  152. package/cjs/components/Popup/PopupContext.js +1 -1
  153. package/cjs/components/Range/Range.styles.js +0 -1
  154. package/cjs/components/Range/Range.styles.js.map +1 -1
  155. package/cjs/components/Segment/ui/SegmentGroup/SegmentGroup.js +4 -5
  156. package/cjs/components/Segment/ui/SegmentGroup/SegmentGroup.js.map +1 -1
  157. package/cjs/components/Select/Select.js +11 -12
  158. package/cjs/components/Select/Select.js.map +1 -1
  159. package/cjs/components/Select/Select.styles.js +2 -5
  160. package/cjs/components/Select/Select.styles.js.map +1 -1
  161. package/cjs/components/Select/hooks/usePathMaps.js +0 -2
  162. package/cjs/components/Select/hooks/usePathMaps.js.map +1 -1
  163. package/cjs/components/Select/ui/Inner/Inner.js +1 -2
  164. package/cjs/components/Select/ui/Inner/Inner.js.map +1 -1
  165. package/cjs/components/Select/ui/Inner/ui/Item/Item.js +4 -5
  166. package/cjs/components/Select/ui/Inner/ui/Item/Item.js.map +1 -1
  167. package/cjs/components/Select/ui/Inner/ui/Item/Item.styles.js +0 -1
  168. package/cjs/components/Select/ui/Inner/ui/Item/Item.styles.js.map +1 -1
  169. package/cjs/components/Select/ui/Target/ui/Button/Button.js +1 -1
  170. package/cjs/components/Select/ui/Target/ui/Button/Button.styles.js +1 -3
  171. package/cjs/components/Select/ui/Target/ui/Button/Button.styles.js.map +1 -1
  172. package/cjs/components/Select/ui/Target/ui/Textfield/Textfield.js +2 -2
  173. package/cjs/components/Select/ui/Target/ui/Textfield/Textfield.styles.js +1 -4
  174. package/cjs/components/Select/ui/Target/ui/Textfield/Textfield.styles.js.map +1 -1
  175. package/cjs/components/Select/ui/Target/ui/Textfield/ui/Chip/Chip.styles.js +1 -2
  176. package/cjs/components/Select/ui/Target/ui/Textfield/ui/Chip/Chip.styles.js.map +1 -1
  177. package/cjs/components/Select/utils/getButtonLabel.js +0 -2
  178. package/cjs/components/Select/utils/getButtonLabel.js.map +1 -1
  179. package/cjs/components/Sheet/Sheet.js +3 -3
  180. package/cjs/components/Skeleton/LineSkeleton/LineSkeleton.js +2 -4
  181. package/cjs/components/Skeleton/LineSkeleton/LineSkeleton.js.map +1 -1
  182. package/cjs/components/Skeleton/RectSkeleton/RectSkeleton.js +2 -4
  183. package/cjs/components/Skeleton/RectSkeleton/RectSkeleton.js.map +1 -1
  184. package/cjs/components/Slider/Slider.js +0 -8
  185. package/cjs/components/Slider/Slider.js.map +1 -1
  186. package/cjs/components/Slider/components/Double/Double.js +1 -2
  187. package/cjs/components/Slider/components/Double/Double.js.map +1 -1
  188. package/cjs/components/Slider/components/Double/Double.styles.js +0 -1
  189. package/cjs/components/Slider/components/Double/Double.styles.js.map +1 -1
  190. package/cjs/components/Slider/components/DoubleUncontrolled/DoubleUncontrolled.js +0 -3
  191. package/cjs/components/Slider/components/DoubleUncontrolled/DoubleUncontrolled.js.map +1 -1
  192. package/cjs/components/Slider/components/Single/Single.js +1 -2
  193. package/cjs/components/Slider/components/Single/Single.js.map +1 -1
  194. package/cjs/components/Slider/components/SliderBase/SliderBase.js +1 -1
  195. package/cjs/components/Steps/Steps.js +1 -1
  196. package/cjs/components/Steps/ui/StepItem/StepItem.styles.js +0 -1
  197. package/cjs/components/Steps/ui/StepItem/StepItem.styles.js.map +1 -1
  198. package/cjs/components/Tabs/ui/horizontal/HorizontalTabs/HorizontalTabs.js +2 -3
  199. package/cjs/components/Tabs/ui/horizontal/HorizontalTabs/HorizontalTabs.js.map +1 -1
  200. package/cjs/components/Tabs/ui/vertical/VerticalTabs/VerticalTabs.js +2 -3
  201. package/cjs/components/Tabs/ui/vertical/VerticalTabs/VerticalTabs.js.map +1 -1
  202. package/cjs/components/TextArea/TextArea.js +3 -3
  203. package/cjs/components/TextArea/TextArea.js.map +1 -1
  204. package/cjs/components/TextArea/TextArea.styles.js +4 -5
  205. package/cjs/components/TextArea/TextArea.styles.js.map +1 -1
  206. package/cjs/components/TextArea/ui/Hint/Hint.js +1 -2
  207. package/cjs/components/TextArea/ui/Hint/Hint.js.map +1 -1
  208. package/cjs/components/TextField/TextField.js +4 -4
  209. package/cjs/components/TextField/TextField.js.map +1 -1
  210. package/cjs/components/TextField/TextField.styles.js +3 -4
  211. package/cjs/components/TextField/TextField.styles.js.map +1 -1
  212. package/cjs/components/TextField/ui/Hint/Hint.js +1 -2
  213. package/cjs/components/TextField/ui/Hint/Hint.js.map +1 -1
  214. package/cjs/components/TextField/ui/TextFieldChip/TextFieldChip.styles.js +1 -2
  215. package/cjs/components/TextField/ui/TextFieldChip/TextFieldChip.styles.js.map +1 -1
  216. package/cjs/components/Toast/Toast.styles.js +1 -1
  217. package/cjs/components/Toast/ToastController.js +1 -1
  218. package/cjs/components/Toast/utils.js +1 -2
  219. package/cjs/components/Toast/utils.js.map +1 -1
  220. package/cjs/components/Toolbar/ui/ToolbarDivider/ToolbarDivider.js +1 -1
  221. package/cjs/components/Tooltip/Tooltip.js +2 -3
  222. package/cjs/components/Tooltip/Tooltip.js.map +1 -1
  223. package/cjs/engines/index.js +0 -2
  224. package/cjs/engines/index.js.map +1 -1
  225. package/cjs/hooks/useIsomorphicLayoutEffect.js +0 -1
  226. package/cjs/hooks/useIsomorphicLayoutEffect.js.map +1 -1
  227. package/cjs/index.css +11 -11
  228. package/cjs/index.js +48 -51
  229. package/cjs/index.js.map +1 -1
  230. package/cjs/utils/index.js +0 -5
  231. package/cjs/utils/index.js.map +1 -1
  232. package/emotion/cjs/components/Calendar/ui/CalendarDays/CalendarDays.js +5 -1
  233. package/emotion/cjs/components/Calendar/ui/CalendarMonths/CalendarMonths.js +5 -1
  234. package/emotion/cjs/components/Calendar/ui/CalendarQuarters/CalendarQuarters.js +5 -1
  235. package/emotion/cjs/components/Calendar/ui/CalendarYears/CalendarYears.js +5 -1
  236. package/emotion/cjs/components/Notification/Notification.styles.js +11 -11
  237. package/emotion/cjs/components/Notification/Notification.tokens.js +2 -1
  238. package/emotion/cjs/components/Notification/NotificationsPortal.js +2 -2
  239. package/emotion/cjs/components/TextArea/TextArea.js +2 -2
  240. package/emotion/cjs/components/TextArea/TextArea.styles.js +20 -20
  241. package/emotion/cjs/components/TextField/TextField.js +2 -2
  242. package/emotion/cjs/components/TextField/TextField.styles.js +24 -24
  243. package/emotion/es/components/Calendar/ui/CalendarDays/CalendarDays.js +5 -1
  244. package/emotion/es/components/Calendar/ui/CalendarMonths/CalendarMonths.js +5 -1
  245. package/emotion/es/components/Calendar/ui/CalendarQuarters/CalendarQuarters.js +5 -1
  246. package/emotion/es/components/Calendar/ui/CalendarYears/CalendarYears.js +5 -1
  247. package/emotion/es/components/Notification/Notification.styles.js +11 -11
  248. package/emotion/es/components/Notification/Notification.tokens.js +2 -1
  249. package/emotion/es/components/Notification/NotificationsPortal.js +2 -2
  250. package/emotion/es/components/TextArea/TextArea.js +2 -2
  251. package/emotion/es/components/TextArea/TextArea.styles.js +20 -20
  252. package/emotion/es/components/TextField/TextField.js +2 -2
  253. package/emotion/es/components/TextField/TextField.styles.js +24 -24
  254. package/emotion/package.json +2 -1
  255. package/es/components/Accordion/ui/AccordionItem/AccordionItem.styles.js +0 -1
  256. package/es/components/Accordion/ui/AccordionItem/AccordionItem.styles.js.map +1 -1
  257. package/es/components/Attach/Attach.js +3 -4
  258. package/es/components/Attach/Attach.js.map +1 -1
  259. package/es/components/Attach/components/AttachButton/AttachButton.js +0 -1
  260. package/es/components/Attach/components/AttachButton/AttachButton.js.map +1 -1
  261. package/es/components/Attach/ui/Button/Button.styles.js +0 -1
  262. package/es/components/Attach/ui/Button/Button.styles.js.map +1 -1
  263. package/es/components/Attach/ui/Cell/Cell.styles.js +0 -2
  264. package/es/components/Attach/ui/Cell/Cell.styles.js.map +1 -1
  265. package/es/components/Attach/ui/IconButton/IconButton.styles.js +0 -1
  266. package/es/components/Attach/ui/IconButton/IconButton.styles.js.map +1 -1
  267. package/es/components/Attach/utils/getFileicon.js +3 -4
  268. package/es/components/Attach/utils/getFileicon.js.map +1 -1
  269. package/es/components/Attach/utils/index.js +0 -3
  270. package/es/components/Attach/utils/index.js.map +1 -1
  271. package/es/components/Autocomplete/Autocomplete.js +5 -6
  272. package/es/components/Autocomplete/Autocomplete.js.map +1 -1
  273. package/es/components/Autocomplete/Autocomplete.styles.js +2 -3
  274. package/es/components/Autocomplete/Autocomplete.styles.js.map +1 -1
  275. package/es/components/Autocomplete/ui/TextField/TextField.styles.js +1 -2
  276. package/es/components/Autocomplete/ui/TextField/TextField.styles.js.map +1 -1
  277. package/es/components/Avatar/Avatar.js +2 -3
  278. package/es/components/Avatar/Avatar.js.map +1 -1
  279. package/es/components/Breadcrumbs/Breadcrumbs.styles.js +2 -4
  280. package/es/components/Breadcrumbs/Breadcrumbs.styles.js.map +1 -1
  281. package/es/components/Button/Button.styles.js +0 -3
  282. package/es/components/Button/Button.styles.js.map +1 -1
  283. package/es/components/Calendar/CalendarBase/CalendarBase.js +5 -5
  284. package/es/components/Calendar/CalendarDouble/CalendarDouble.js +8 -8
  285. package/es/components/Calendar/hooks/useDays.js +2 -2
  286. package/es/components/Calendar/hooks/useKeyNavigation.js +1 -1
  287. package/es/components/Calendar/hooks/useMonths.js +2 -2
  288. package/es/components/Calendar/hooks/useQuarters.js +2 -2
  289. package/es/components/Calendar/hooks/useYears.js +2 -2
  290. package/es/components/Calendar/ui/CalendarDays/CalendarDays.js +9 -5
  291. package/es/components/Calendar/ui/CalendarDays/CalendarDays.js.map +1 -1
  292. package/es/components/Calendar/ui/CalendarHeader/CalendarHeader.js +5 -6
  293. package/es/components/Calendar/ui/CalendarHeader/CalendarHeader.js.map +1 -1
  294. package/es/components/Calendar/ui/CalendarHeader/CalendarHeader.styles.js +0 -1
  295. package/es/components/Calendar/ui/CalendarHeader/CalendarHeader.styles.js.map +1 -1
  296. package/es/components/Calendar/ui/CalendarMonths/CalendarMonths.js +9 -5
  297. package/es/components/Calendar/ui/CalendarMonths/CalendarMonths.js.map +1 -1
  298. package/es/components/Calendar/ui/CalendarQuarters/CalendarQuarters.js +9 -5
  299. package/es/components/Calendar/ui/CalendarQuarters/CalendarQuarters.js.map +1 -1
  300. package/es/components/Calendar/ui/CalendarYears/CalendarYears.js +9 -5
  301. package/es/components/Calendar/ui/CalendarYears/CalendarYears.js.map +1 -1
  302. package/es/components/Combobox/ComboboxNew/Combobox.js +11 -12
  303. package/es/components/Combobox/ComboboxNew/Combobox.js.map +1 -1
  304. package/es/components/Combobox/ComboboxNew/Combobox.styles.js +2 -4
  305. package/es/components/Combobox/ComboboxNew/Combobox.styles.js.map +1 -1
  306. package/es/components/Combobox/ComboboxNew/hooks/getPathMaps.js +0 -2
  307. package/es/components/Combobox/ComboboxNew/hooks/getPathMaps.js.map +1 -1
  308. package/es/components/Combobox/ComboboxNew/ui/Inner/Inner.js +1 -2
  309. package/es/components/Combobox/ComboboxNew/ui/Inner/Inner.js.map +1 -1
  310. package/es/components/Combobox/ComboboxNew/ui/Inner/ui/Item/Item.js +5 -6
  311. package/es/components/Combobox/ComboboxNew/ui/Inner/ui/Item/Item.js.map +1 -1
  312. package/es/components/Combobox/ComboboxNew/ui/Inner/ui/Item/Item.styles.js +1 -3
  313. package/es/components/Combobox/ComboboxNew/ui/Inner/ui/Item/Item.styles.js.map +1 -1
  314. package/es/components/Combobox/ComboboxNew/ui/Target/Target.styles.js +1 -2
  315. package/es/components/Combobox/ComboboxNew/ui/Target/Target.styles.js.map +1 -1
  316. package/es/components/Combobox/ComboboxOld/Combobox.js +4 -10
  317. package/es/components/Combobox/ComboboxOld/Combobox.js.map +1 -1
  318. package/es/components/Combobox/ComboboxOld/Combobox.styles.js +0 -1
  319. package/es/components/Combobox/ComboboxOld/Combobox.styles.js.map +1 -1
  320. package/es/components/Combobox/ComboboxOld/hooks/useFocusController.js +0 -1
  321. package/es/components/Combobox/ComboboxOld/hooks/useFocusController.js.map +1 -1
  322. package/es/components/Combobox/ComboboxOld/ui/ComboboxChip/ComboboxChip.styles.js +1 -2
  323. package/es/components/Combobox/ComboboxOld/ui/ComboboxChip/ComboboxChip.styles.js.map +1 -1
  324. package/es/components/Combobox/ComboboxOld/ui/ComboboxDivider/ComboboxDivider.js +1 -10
  325. package/es/components/Combobox/ComboboxOld/ui/ComboboxDivider/ComboboxDivider.js.map +1 -1
  326. package/es/components/Combobox/ComboboxOld/ui/ComboboxFooter/ComboboxFooter.js +1 -10
  327. package/es/components/Combobox/ComboboxOld/ui/ComboboxFooter/ComboboxFooter.js.map +1 -1
  328. package/es/components/Combobox/ComboboxOld/ui/ComboboxGroup/ComboboxGroup.js +1 -10
  329. package/es/components/Combobox/ComboboxOld/ui/ComboboxGroup/ComboboxGroup.js.map +1 -1
  330. package/es/components/Combobox/ComboboxOld/ui/ComboboxHeader/ComboboxHeader.js +1 -10
  331. package/es/components/Combobox/ComboboxOld/ui/ComboboxHeader/ComboboxHeader.js.map +1 -1
  332. package/es/components/Combobox/ComboboxOld/ui/ComboboxItem/ComboboxItem.styles.js +0 -2
  333. package/es/components/Combobox/ComboboxOld/ui/ComboboxItem/ComboboxItem.styles.js.map +1 -1
  334. package/es/components/Combobox/ComboboxOld/ui/ComboboxTarget/ComboboxTarget.js +1 -1
  335. package/es/components/Combobox/ComboboxOld/ui/ComboboxTarget/ComboboxTarget.styles.js +1 -2
  336. package/es/components/Combobox/ComboboxOld/ui/ComboboxTarget/ComboboxTarget.styles.js.map +1 -1
  337. package/es/components/DatePicker/DatePickerBase.styles.js +1 -7
  338. package/es/components/DatePicker/DatePickerBase.styles.js.map +1 -1
  339. package/es/components/DatePicker/RangeDate/RangeDate.js +1 -1
  340. package/es/components/DatePicker/RangeDate/RangeDate.styles.js +0 -1
  341. package/es/components/DatePicker/RangeDate/RangeDate.styles.js.map +1 -1
  342. package/es/components/DatePicker/RangeDate/RangeDatePopover/RangeDatePopover.js +1 -2
  343. package/es/components/DatePicker/RangeDate/RangeDatePopover/RangeDatePopover.js.map +1 -1
  344. package/es/components/DatePicker/RangeDate/RangeDatePopover/RangeDatePopover.styles.js +2 -5
  345. package/es/components/DatePicker/RangeDate/RangeDatePopover/RangeDatePopover.styles.js.map +1 -1
  346. package/es/components/DatePicker/SingleDate/SingleDate.styles.js +0 -1
  347. package/es/components/DatePicker/SingleDate/SingleDate.styles.js.map +1 -1
  348. package/es/components/Drawer/Drawer.js +5 -10
  349. package/es/components/Drawer/Drawer.js.map +1 -1
  350. package/es/components/Drawer/Drawer.styles.js +0 -4
  351. package/es/components/Drawer/Drawer.styles.js.map +1 -1
  352. package/es/components/Drawer/hooks/useDrawer.js +0 -4
  353. package/es/components/Drawer/hooks/useDrawer.js.map +1 -1
  354. package/es/components/Drawer/ui/DrawerContent/DrawerContent.js +0 -7
  355. package/es/components/Drawer/ui/DrawerContent/DrawerContent.js.map +1 -1
  356. package/es/components/Drawer/ui/DrawerFooter/DrawerFooter.js +0 -7
  357. package/es/components/Drawer/ui/DrawerFooter/DrawerFooter.js.map +1 -1
  358. package/es/components/Drawer/ui/DrawerHeader/DrawerHeader.js +0 -3
  359. package/es/components/Drawer/ui/DrawerHeader/DrawerHeader.js.map +1 -1
  360. package/es/components/Dropdown/Dropdown.js +3 -10
  361. package/es/components/Dropdown/Dropdown.js.map +1 -1
  362. package/es/components/Dropdown/Dropdown.styles.js +2 -3
  363. package/es/components/Dropdown/Dropdown.styles.js.map +1 -1
  364. package/es/components/Dropdown/ui/DropdownInner/DropdownInner.js +1 -9
  365. package/es/components/Dropdown/ui/DropdownInner/DropdownInner.js.map +1 -1
  366. package/es/components/Dropdown/ui/DropdownItem/DropdownItem.js +1 -2
  367. package/es/components/Dropdown/ui/DropdownItem/DropdownItem.js.map +1 -1
  368. package/es/components/Dropdown/ui/DropdownItemOld/DropdownItem.styles.js +0 -2
  369. package/es/components/Dropdown/ui/DropdownItemOld/DropdownItem.styles.js.map +1 -1
  370. package/es/components/Dropdown/ui/DropdownOld/Dropdown.styles.js +0 -1
  371. package/es/components/Dropdown/ui/DropdownOld/Dropdown.styles.js.map +1 -1
  372. package/es/components/Editable/Editable.js +3 -4
  373. package/es/components/Editable/Editable.js.map +1 -1
  374. package/es/components/Editable/utils/clearSelection.js +0 -2
  375. package/es/components/Editable/utils/clearSelection.js.map +1 -1
  376. package/es/components/Editable/utils/selectText.js +0 -2
  377. package/es/components/Editable/utils/selectText.js.map +1 -1
  378. package/es/components/EmptyState/EmptyState.styles.js +1 -2
  379. package/es/components/EmptyState/EmptyState.styles.js.map +1 -1
  380. package/es/components/IconButton/IconButton.js +1 -1
  381. package/es/components/IconButton/IconButton.styles.js +0 -8
  382. package/es/components/IconButton/IconButton.styles.js.map +1 -1
  383. package/es/components/Modal/Modal.js +6 -8
  384. package/es/components/Modal/Modal.js.map +1 -1
  385. package/es/components/Modal/hooks/useModal.js +0 -4
  386. package/es/components/Modal/hooks/useModal.js.map +1 -1
  387. package/es/components/Notification/Notification.css +11 -11
  388. package/es/components/Notification/Notification.styles.js +3 -4
  389. package/es/components/Notification/Notification.styles.js.map +1 -1
  390. package/es/components/Notification/{Notification.styles_7h8hp0.css → Notification.styles_1cf2gwd.css} +1 -1
  391. package/es/components/Notification/Notification.tokens.js +2 -1
  392. package/es/components/Notification/Notification.tokens.js.map +1 -1
  393. package/es/components/Notification/NotificationsPortal.js +4 -5
  394. package/es/components/Notification/NotificationsPortal.js.map +1 -1
  395. package/es/components/Notification/NotificationsProvider.css +11 -11
  396. package/es/components/Pagination/Pagination.styles.js +1 -2
  397. package/es/components/Pagination/Pagination.styles.js.map +1 -1
  398. package/es/components/Pagination/ui/PaginationSelectPerPage/PaginationSelectPerPage.styles.js +1 -2
  399. package/es/components/Pagination/ui/PaginationSelectPerPage/PaginationSelectPerPage.styles.js.map +1 -1
  400. package/es/components/Panel/ui/PanelHeader/PanelHeader.js +1 -2
  401. package/es/components/Panel/ui/PanelHeader/PanelHeader.js.map +1 -1
  402. package/es/components/Panel/ui/PanelHeader/PanelHeader.styles.js +1 -2
  403. package/es/components/Panel/ui/PanelHeader/PanelHeader.styles.js.map +1 -1
  404. package/es/components/Popover/Popover.js +1 -1
  405. package/es/components/Popup/Popup.js +2 -2
  406. package/es/components/Popup/PopupContext.js +1 -1
  407. package/es/components/Range/Range.styles.js +0 -1
  408. package/es/components/Range/Range.styles.js.map +1 -1
  409. package/es/components/Segment/ui/SegmentGroup/SegmentGroup.js +4 -5
  410. package/es/components/Segment/ui/SegmentGroup/SegmentGroup.js.map +1 -1
  411. package/es/components/Select/Select.js +11 -12
  412. package/es/components/Select/Select.js.map +1 -1
  413. package/es/components/Select/Select.styles.js +2 -5
  414. package/es/components/Select/Select.styles.js.map +1 -1
  415. package/es/components/Select/hooks/usePathMaps.js +0 -2
  416. package/es/components/Select/hooks/usePathMaps.js.map +1 -1
  417. package/es/components/Select/ui/Inner/Inner.js +1 -2
  418. package/es/components/Select/ui/Inner/Inner.js.map +1 -1
  419. package/es/components/Select/ui/Inner/ui/Item/Item.js +4 -5
  420. package/es/components/Select/ui/Inner/ui/Item/Item.js.map +1 -1
  421. package/es/components/Select/ui/Inner/ui/Item/Item.styles.js +0 -1
  422. package/es/components/Select/ui/Inner/ui/Item/Item.styles.js.map +1 -1
  423. package/es/components/Select/ui/Target/ui/Button/Button.js +1 -1
  424. package/es/components/Select/ui/Target/ui/Button/Button.styles.js +1 -3
  425. package/es/components/Select/ui/Target/ui/Button/Button.styles.js.map +1 -1
  426. package/es/components/Select/ui/Target/ui/Textfield/Textfield.js +2 -2
  427. package/es/components/Select/ui/Target/ui/Textfield/Textfield.styles.js +1 -4
  428. package/es/components/Select/ui/Target/ui/Textfield/Textfield.styles.js.map +1 -1
  429. package/es/components/Select/ui/Target/ui/Textfield/ui/Chip/Chip.styles.js +1 -2
  430. package/es/components/Select/ui/Target/ui/Textfield/ui/Chip/Chip.styles.js.map +1 -1
  431. package/es/components/Select/utils/getButtonLabel.js +0 -2
  432. package/es/components/Select/utils/getButtonLabel.js.map +1 -1
  433. package/es/components/Sheet/Sheet.js +3 -3
  434. package/es/components/Skeleton/LineSkeleton/LineSkeleton.js +2 -4
  435. package/es/components/Skeleton/LineSkeleton/LineSkeleton.js.map +1 -1
  436. package/es/components/Skeleton/RectSkeleton/RectSkeleton.js +2 -4
  437. package/es/components/Skeleton/RectSkeleton/RectSkeleton.js.map +1 -1
  438. package/es/components/Slider/Slider.js +0 -8
  439. package/es/components/Slider/Slider.js.map +1 -1
  440. package/es/components/Slider/components/Double/Double.js +1 -2
  441. package/es/components/Slider/components/Double/Double.js.map +1 -1
  442. package/es/components/Slider/components/Double/Double.styles.js +0 -1
  443. package/es/components/Slider/components/Double/Double.styles.js.map +1 -1
  444. package/es/components/Slider/components/DoubleUncontrolled/DoubleUncontrolled.js +0 -3
  445. package/es/components/Slider/components/DoubleUncontrolled/DoubleUncontrolled.js.map +1 -1
  446. package/es/components/Slider/components/Single/Single.js +1 -2
  447. package/es/components/Slider/components/Single/Single.js.map +1 -1
  448. package/es/components/Slider/components/SliderBase/SliderBase.js +1 -1
  449. package/es/components/Steps/Steps.js +1 -1
  450. package/es/components/Steps/ui/StepItem/StepItem.styles.js +0 -1
  451. package/es/components/Steps/ui/StepItem/StepItem.styles.js.map +1 -1
  452. package/es/components/Tabs/ui/horizontal/HorizontalTabs/HorizontalTabs.js +2 -3
  453. package/es/components/Tabs/ui/horizontal/HorizontalTabs/HorizontalTabs.js.map +1 -1
  454. package/es/components/Tabs/ui/vertical/VerticalTabs/VerticalTabs.js +2 -3
  455. package/es/components/Tabs/ui/vertical/VerticalTabs/VerticalTabs.js.map +1 -1
  456. package/es/components/TextArea/TextArea.js +3 -3
  457. package/es/components/TextArea/TextArea.js.map +1 -1
  458. package/es/components/TextArea/TextArea.styles.js +4 -5
  459. package/es/components/TextArea/TextArea.styles.js.map +1 -1
  460. package/es/components/TextArea/ui/Hint/Hint.js +1 -2
  461. package/es/components/TextArea/ui/Hint/Hint.js.map +1 -1
  462. package/es/components/TextField/TextField.js +4 -4
  463. package/es/components/TextField/TextField.js.map +1 -1
  464. package/es/components/TextField/TextField.styles.js +3 -4
  465. package/es/components/TextField/TextField.styles.js.map +1 -1
  466. package/es/components/TextField/ui/Hint/Hint.js +1 -2
  467. package/es/components/TextField/ui/Hint/Hint.js.map +1 -1
  468. package/es/components/TextField/ui/TextFieldChip/TextFieldChip.styles.js +1 -2
  469. package/es/components/TextField/ui/TextFieldChip/TextFieldChip.styles.js.map +1 -1
  470. package/es/components/Toast/Toast.styles.js +1 -1
  471. package/es/components/Toast/ToastController.js +1 -1
  472. package/es/components/Toast/utils.js +1 -2
  473. package/es/components/Toast/utils.js.map +1 -1
  474. package/es/components/Toolbar/ui/ToolbarDivider/ToolbarDivider.js +1 -1
  475. package/es/components/Tooltip/Tooltip.js +2 -3
  476. package/es/components/Tooltip/Tooltip.js.map +1 -1
  477. package/es/engines/index.js +0 -2
  478. package/es/engines/index.js.map +1 -1
  479. package/es/hooks/useIsomorphicLayoutEffect.js +0 -1
  480. package/es/hooks/useIsomorphicLayoutEffect.js.map +1 -1
  481. package/es/index.css +11 -11
  482. package/es/index.js +21 -24
  483. package/es/index.js.map +1 -1
  484. package/es/utils/index.js +0 -3
  485. package/es/utils/index.js.map +1 -1
  486. package/package.json +5 -2
  487. package/styled-components/cjs/components/Calendar/ui/CalendarDays/CalendarDays.js +5 -1
  488. package/styled-components/cjs/components/Calendar/ui/CalendarMonths/CalendarMonths.js +5 -1
  489. package/styled-components/cjs/components/Calendar/ui/CalendarQuarters/CalendarQuarters.js +5 -1
  490. package/styled-components/cjs/components/Calendar/ui/CalendarYears/CalendarYears.js +5 -1
  491. package/styled-components/cjs/components/Notification/Notification.styles.js +1 -1
  492. package/styled-components/cjs/components/Notification/Notification.tokens.js +2 -1
  493. package/styled-components/cjs/components/Notification/NotificationsPortal.js +1 -1
  494. package/styled-components/cjs/components/TextArea/TextArea.js +1 -1
  495. package/styled-components/cjs/components/TextArea/TextArea.styles.js +2 -2
  496. package/styled-components/cjs/components/TextField/TextField.js +1 -1
  497. package/styled-components/cjs/components/TextField/TextField.styles.js +2 -2
  498. package/styled-components/es/components/Calendar/ui/CalendarDays/CalendarDays.js +5 -1
  499. package/styled-components/es/components/Calendar/ui/CalendarMonths/CalendarMonths.js +5 -1
  500. package/styled-components/es/components/Calendar/ui/CalendarQuarters/CalendarQuarters.js +5 -1
  501. package/styled-components/es/components/Calendar/ui/CalendarYears/CalendarYears.js +5 -1
  502. package/styled-components/es/components/Notification/Notification.styles.js +1 -1
  503. package/styled-components/es/components/Notification/Notification.tokens.js +2 -1
  504. package/styled-components/es/components/Notification/NotificationsPortal.js +1 -1
  505. package/styled-components/es/components/TextArea/TextArea.js +1 -1
  506. package/styled-components/es/components/TextArea/TextArea.styles.js +2 -2
  507. package/styled-components/es/components/TextField/TextField.js +1 -1
  508. package/styled-components/es/components/TextField/TextField.styles.js +2 -2
  509. package/styled-components/package.json +2 -1
  510. package/types/components/Calendar/ui/CalendarDays/CalendarDays.d.ts.map +1 -1
  511. package/types/components/Calendar/ui/CalendarMonths/CalendarMonths.d.ts.map +1 -1
  512. package/types/components/Calendar/ui/CalendarQuarters/CalendarQuarters.d.ts.map +1 -1
  513. package/types/components/Calendar/ui/CalendarYears/CalendarYears.d.ts.map +1 -1
  514. package/types/components/DatePicker/SingleDate/SingleDate.types.d.ts +4 -0
  515. package/types/components/DatePicker/SingleDate/SingleDate.types.d.ts.map +1 -1
  516. package/types/components/Notification/Notification.styles.d.ts.map +1 -1
  517. package/types/components/Notification/Notification.tokens.d.ts +1 -0
  518. package/types/components/Notification/Notification.tokens.d.ts.map +1 -1
  519. package/types/components/Notification/NotificationsPortal.d.ts.map +1 -1
  520. package/types/components/TextArea/TextArea.styles.d.ts +1 -1
  521. package/types/components/TextArea/TextArea.styles.d.ts.map +1 -1
  522. package/types/components/TextField/TextField.styles.d.ts +1 -1
  523. package/types/components/TextField/TextField.styles.d.ts.map +1 -1
  524. package/types/utils/index.d.ts +1 -1
  525. package/types/utils/index.d.ts.map +1 -1
@@ -1 +1 @@
1
- {"version":3,"file":"Editable.js","sources":["../../../src/components/Editable/Editable.tsx"],"sourcesContent":["import React, { forwardRef, useEffect, useRef, useState } from 'react';\nimport type {\n ChangeEvent,\n ClipboardEvent,\n FocusEvent,\n ClipboardEventHandler,\n FocusEventHandler,\n FormEventHandler,\n KeyboardEventHandler,\n} from 'react';\nimport { useForkRef } from '@salutejs/plasma-core';\n\nimport type { RootProps } from '../../engines';\nimport { constants } from '../../utils';\n\nimport type { EditableProps, TypographyVariants } from './Editable.types';\nimport { clearSelection, selectText } from './utils';\nimport { classes } from './Editable.tokens';\nimport { base, EditButton, StyledInput, StyledPlacehpolder } from './Editable.styles';\nimport { base as viewCSS } from './variations/_view/base';\nimport { base as sizeCSS } from './variations/_size/base';\n\nexport const editableRoot = (typograpyVariants: TypographyVariants) => (\n Root: RootProps<HTMLSpanElement, Omit<EditableProps<typeof typograpyVariants>, 'textComponent'>>,\n) =>\n forwardRef<HTMLInputElement, EditableProps<typeof typograpyVariants>>(\n (\n {\n textComponent,\n value,\n icon,\n maxLength,\n spellCheck = 'false',\n placeholder,\n name,\n onChange,\n onBlur,\n onPaste,\n ...props\n },\n outerRef,\n ) => {\n const Component = textComponent;\n\n const [isEditing, setIsEditing] = useState(false);\n\n const inputRef = useRef<HTMLDivElement>(null);\n const innerRef = useForkRef(inputRef, outerRef);\n\n const prevValueRef = useRef(value || '');\n\n const handlePaste: ClipboardEventHandler<HTMLDivElement> = (e) => {\n if (!inputRef.current) {\n return;\n }\n\n e.preventDefault();\n\n const text = e.clipboardData.getData('text/plain').replace(/[\\n\\r]/gi, '');\n\n if (document.queryCommandSupported('insertText')) {\n document.execCommand('insertText', false, text);\n } else {\n try {\n navigator.clipboard.writeText(text);\n } catch {\n inputRef.current.textContent = text;\n }\n }\n\n if (onPaste) {\n onPaste(e as ClipboardEvent<HTMLInputElement>);\n }\n };\n\n const handleBlur: FocusEventHandler<HTMLDivElement> = (e) => {\n setIsEditing(false);\n\n clearSelection();\n\n // NOTE: Remove <br> tag inserted by Safari\n const editableElement = inputRef.current;\n if (editableElement && editableElement.innerHTML === '<br>') {\n editableElement.innerHTML = '';\n }\n\n if (onBlur) {\n onBlur(e as FocusEvent<HTMLInputElement>);\n }\n };\n\n const handleFocus: FocusEventHandler = () => {\n setIsEditing(true);\n\n inputRef.current && selectText(inputRef.current);\n };\n\n const handleEditClick = () => {\n inputRef.current?.focus();\n };\n\n const handleKeyDown: KeyboardEventHandler = (e) => {\n if ([constants.keyCodes.Enter, constants.keyCodes.Escape].includes(e.keyCode)) {\n inputRef.current?.blur();\n }\n };\n\n const handleChange: FormEventHandler = (e) => {\n if (!inputRef.current) {\n return;\n }\n\n const contentLength = inputRef.current.textContent?.length || 0;\n\n if (!maxLength || contentLength <= maxLength) {\n prevValueRef.current = inputRef.current.textContent || '';\n\n onChange && onChange(e as ChangeEvent<HTMLInputElement>);\n } else {\n inputRef.current.textContent = prevValueRef.current;\n }\n };\n\n useEffect(() => {\n if (!inputRef.current || typeof value === 'undefined' || value === inputRef.current.textContent) {\n return;\n }\n\n inputRef.current.textContent = value;\n }, [value, textComponent]);\n\n return (\n <Root {...props}>\n <Component\n ref={innerRef}\n className={classes.editableTextBox}\n role=\"textbox\"\n spellCheck={spellCheck}\n contentEditable\n onPaste={handlePaste}\n onInput={handleChange}\n onBlur={handleBlur}\n onFocus={handleFocus}\n onKeyDown={handleKeyDown}\n aria-label={placeholder}\n />\n {prevValueRef.current?.length === 0 && !isEditing && (\n <Component>\n <StyledPlacehpolder onClick={handleEditClick}>{placeholder}</StyledPlacehpolder>\n </Component>\n )}\n <StyledInput type=\"hidden\" value={prevValueRef.current} name={name} />\n <EditButton onClick={handleEditClick} isHidden={isEditing}>\n {icon}\n </EditButton>\n </Root>\n );\n },\n );\n\nexport const editableConfig = (typographyVariants: TypographyVariants) => ({\n name: 'Editable',\n tag: 'span',\n layout: editableRoot(typographyVariants),\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":["editableRoot","typograpyVariants","Root","forwardRef","_ref","outerRef","_prevValueRef$current","textComponent","value","icon","maxLength","_ref$spellCheck","spellCheck","placeholder","name","onChange","onBlur","onPaste","props","_objectWithoutProperties","_excluded","Component","_useState","useState","_useState2","_slicedToArray","isEditing","setIsEditing","inputRef","useRef","innerRef","useForkRef","prevValueRef","handlePaste","e","current","preventDefault","text","clipboardData","getData","replace","document","queryCommandSupported","execCommand","navigator","clipboard","writeText","_unused","textContent","handleBlur","clearSelection","editableElement","innerHTML","handleFocus","selectText","handleEditClick","_inputRef$current","focus","handleKeyDown","constants","Enter","Escape","includes","keyCode","_inputRef$current2","blur","handleChange","_inputRef$current$tex","contentLength","length","useEffect","React","createElement","ref","className","classes","editableTextBox","role","contentEditable","onInput","onFocus","onKeyDown","StyledPlacehpolder","onClick","StyledInput","type","EditButton","isHidden","editableConfig","typographyVariants","tag","layout","base","variations","view","css","viewCSS","size","sizeCSS","defaults"],"mappings":";;;;;;;;;;;;;;;;;IAsBaA,YAAY,GAAG,SAAfA,YAAYA,CAAIC,iBAAqC,EAAA;AAAA,EAAA,OAAK,UACnEC,IAAgG,EAAA;AAAA,IAAA,oBAEhGC,gBAAU,CACN,UAAAC,IAAA,EAcIC,QAAQ,EACP;AAAA,MAAA,IAAAC,qBAAA,CAAA;AAAA,MAAA,IAbGC,aAAa,GAAAH,IAAA,CAAbG,aAAa;QACbC,KAAK,GAAAJ,IAAA,CAALI,KAAK;QACLC,IAAI,GAAAL,IAAA,CAAJK,IAAI;QACJC,SAAS,GAAAN,IAAA,CAATM,SAAS;QAAAC,eAAA,GAAAP,IAAA,CACTQ,UAAU;AAAVA,QAAAA,UAAU,GAAAD,eAAA,KAAG,KAAA,CAAA,GAAA,OAAO,GAAAA,eAAA;QACpBE,WAAW,GAAAT,IAAA,CAAXS,WAAW;QACXC,IAAI,GAAAV,IAAA,CAAJU,IAAI;QACJC,QAAQ,GAAAX,IAAA,CAARW,QAAQ;QACRC,MAAM,GAAAZ,IAAA,CAANY,MAAM;QACNC,OAAO,GAAAb,IAAA,CAAPa,OAAO;AACJC,QAAAA,KAAK,GAAAC,iDAAA,CAAAf,IAAA,EAAAgB,SAAA,CAAA,CAAA;MAIZ,IAAMC,SAAS,GAAGd,aAAa,CAAA;AAE/B,MAAA,IAAAe,SAAA,GAAkCC,cAAQ,CAAC,KAAK,CAAC;QAAAC,UAAA,GAAAC,uCAAA,CAAAH,SAAA,EAAA,CAAA,CAAA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;AACFC,QAAAA,GAAG,EAAEC,SAAAA;OACR;AACDC,MAAAA,IAAI,EAAE;AACFF,QAAAA,GAAG,EAAEG,WAAAA;AACT,OAAA;KACH;AACDC,IAAAA,QAAQ,EAAE;AACNL,MAAAA,IAAI,EAAE,SAAS;AACfG,MAAAA,IAAI,EAAE,GAAA;AACV,KAAA;GACH,CAAA;AAAA;;;;;"}
1
+ {"version":3,"file":"Editable.js","sources":["../../../src/components/Editable/Editable.tsx"],"sourcesContent":["import React, { forwardRef, useEffect, useRef, useState } from 'react';\nimport type {\n ChangeEvent,\n ClipboardEvent,\n FocusEvent,\n ClipboardEventHandler,\n FocusEventHandler,\n FormEventHandler,\n KeyboardEventHandler,\n} from 'react';\nimport { useForkRef } from '@salutejs/plasma-core';\n\nimport type { RootProps } from '../../engines';\nimport { constants } from '../../utils';\n\nimport type { EditableProps, TypographyVariants } from './Editable.types';\nimport { clearSelection, selectText } from './utils';\nimport { classes } from './Editable.tokens';\nimport { base, EditButton, StyledInput, StyledPlacehpolder } from './Editable.styles';\nimport { base as viewCSS } from './variations/_view/base';\nimport { base as sizeCSS } from './variations/_size/base';\n\nexport const editableRoot = (typograpyVariants: TypographyVariants) => (\n Root: RootProps<HTMLSpanElement, Omit<EditableProps<typeof typograpyVariants>, 'textComponent'>>,\n) =>\n forwardRef<HTMLInputElement, EditableProps<typeof typograpyVariants>>(\n (\n {\n textComponent,\n value,\n icon,\n maxLength,\n spellCheck = 'false',\n placeholder,\n name,\n onChange,\n onBlur,\n onPaste,\n ...props\n },\n outerRef,\n ) => {\n const Component = textComponent;\n\n const [isEditing, setIsEditing] = useState(false);\n\n const inputRef = useRef<HTMLDivElement>(null);\n const innerRef = useForkRef(inputRef, outerRef);\n\n const prevValueRef = useRef(value || '');\n\n const handlePaste: ClipboardEventHandler<HTMLDivElement> = (e) => {\n if (!inputRef.current) {\n return;\n }\n\n e.preventDefault();\n\n const text = e.clipboardData.getData('text/plain').replace(/[\\n\\r]/gi, '');\n\n if (document.queryCommandSupported('insertText')) {\n document.execCommand('insertText', false, text);\n } else {\n try {\n navigator.clipboard.writeText(text);\n } catch {\n inputRef.current.textContent = text;\n }\n }\n\n if (onPaste) {\n onPaste(e as ClipboardEvent<HTMLInputElement>);\n }\n };\n\n const handleBlur: FocusEventHandler<HTMLDivElement> = (e) => {\n setIsEditing(false);\n\n clearSelection();\n\n // NOTE: Remove <br> tag inserted by Safari\n const editableElement = inputRef.current;\n if (editableElement && editableElement.innerHTML === '<br>') {\n editableElement.innerHTML = '';\n }\n\n if (onBlur) {\n onBlur(e as FocusEvent<HTMLInputElement>);\n }\n };\n\n const handleFocus: FocusEventHandler = () => {\n setIsEditing(true);\n\n inputRef.current && selectText(inputRef.current);\n };\n\n const handleEditClick = () => {\n inputRef.current?.focus();\n };\n\n const handleKeyDown: KeyboardEventHandler = (e) => {\n if ([constants.keyCodes.Enter, constants.keyCodes.Escape].includes(e.keyCode)) {\n inputRef.current?.blur();\n }\n };\n\n const handleChange: FormEventHandler = (e) => {\n if (!inputRef.current) {\n return;\n }\n\n const contentLength = inputRef.current.textContent?.length || 0;\n\n if (!maxLength || contentLength <= maxLength) {\n prevValueRef.current = inputRef.current.textContent || '';\n\n onChange && onChange(e as ChangeEvent<HTMLInputElement>);\n } else {\n inputRef.current.textContent = prevValueRef.current;\n }\n };\n\n useEffect(() => {\n if (!inputRef.current || typeof value === 'undefined' || value === inputRef.current.textContent) {\n return;\n }\n\n inputRef.current.textContent = value;\n }, [value, textComponent]);\n\n return (\n <Root {...props}>\n <Component\n ref={innerRef}\n className={classes.editableTextBox}\n role=\"textbox\"\n spellCheck={spellCheck}\n contentEditable\n onPaste={handlePaste}\n onInput={handleChange}\n onBlur={handleBlur}\n onFocus={handleFocus}\n onKeyDown={handleKeyDown}\n aria-label={placeholder}\n />\n {prevValueRef.current?.length === 0 && !isEditing && (\n <Component>\n <StyledPlacehpolder onClick={handleEditClick}>{placeholder}</StyledPlacehpolder>\n </Component>\n )}\n <StyledInput type=\"hidden\" value={prevValueRef.current} name={name} />\n <EditButton onClick={handleEditClick} isHidden={isEditing}>\n {icon}\n </EditButton>\n </Root>\n );\n },\n );\n\nexport const editableConfig = (typographyVariants: TypographyVariants) => ({\n name: 'Editable',\n tag: 'span',\n layout: editableRoot(typographyVariants),\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":["editableRoot","typograpyVariants","Root","forwardRef","_ref","outerRef","_prevValueRef$current","textComponent","value","icon","maxLength","_ref$spellCheck","spellCheck","placeholder","name","onChange","onBlur","onPaste","props","_objectWithoutProperties","_excluded","Component","_useState","useState","_useState2","_slicedToArray","isEditing","setIsEditing","inputRef","useRef","innerRef","useForkRef","prevValueRef","handlePaste","e","current","preventDefault","text","clipboardData","getData","replace","document","queryCommandSupported","execCommand","navigator","clipboard","writeText","_unused","textContent","handleBlur","clearSelection","editableElement","innerHTML","handleFocus","selectText","handleEditClick","_inputRef$current","focus","handleKeyDown","constants","Enter","Escape","includes","keyCode","_inputRef$current2","blur","handleChange","_inputRef$current$tex","contentLength","length","useEffect","React","createElement","ref","className","classes","editableTextBox","role","contentEditable","onInput","onFocus","onKeyDown","StyledPlacehpolder","onClick","StyledInput","type","EditButton","isHidden","editableConfig","typographyVariants","tag","layout","base","variations","view","css","viewCSS","size","sizeCSS","defaults"],"mappings":";;;;;;;;;;;;;;;;IAsBaA,YAAY,GAAG,SAAfA,YAAYA,CAAIC,iBAAqC,EAAA;AAAA,EAAA,OAAK,UACnEC,IAAgG,EAAA;AAAA,IAAA,oBAEhGC,gBAAU,CACN,UAAAC,IAAA,EAcIC,QAAQ,EACP;AAAA,MAAA,IAAAC,qBAAA,CAAA;AAAA,MAAA,IAbGC,aAAa,GAAAH,IAAA,CAAbG,aAAa;QACbC,KAAK,GAAAJ,IAAA,CAALI,KAAK;QACLC,IAAI,GAAAL,IAAA,CAAJK,IAAI;QACJC,SAAS,GAAAN,I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EwB,YAAY,CAACG,OAAQ;AAACrB,QAAAA,IAAI,EAAEA,IAAAA;AAAK,OAAE,CAAC,eACtEyD,KAAA,CAAAC,aAAA,CAACc,0BAAU,EAAA;AAACH,QAAAA,OAAO,EAAE5B,eAAgB;AAACgC,QAAAA,QAAQ,EAAE7D,SAAAA;OAC3CjB,EAAAA,IACO,CACV,CAAC,CAAA;AAEf,KACJ,CAAC,CAAA;AAAA,GAAA,CAAA;AAAA,EAAA;IAEQ+E,cAAc,GAAG,SAAjBA,cAAcA,CAAIC,kBAAsC,EAAA;EAAA,OAAM;AACvE3E,IAAAA,IAAI,EAAE,UAAU;AAChB4E,IAAAA,GAAG,EAAE,MAAM;AACXC,IAAAA,MAAM,EAAE3F,YAAY,CAAmB,CAAC;AACxC4F,IAAAA,IAAI,EAAJA,oBAAI;AACJC,IAAAA,UAAU,EAAE;AACRC,MAAAA,IAAI,EAAE;AACFC,QAAAA,GAAG,EAAEC,SAAAA;OACR;AACDC,MAAAA,IAAI,EAAE;AACFF,QAAAA,GAAG,EAAEG,WAAAA;AACT,OAAA;KACH;AACDC,IAAAA,QAAQ,EAAE;AACNL,MAAAA,IAAI,EAAE,SAAS;AACfG,MAAAA,IAAI,EAAE,GAAA;AACV,KAAA;GACH,CAAA;AAAA;;;;;"}
@@ -3,8 +3,6 @@
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
5
  var canUseDOM = require('../../../utils/canUseDOM.js');
6
- require('react');
7
- require('../../../utils/react.js');
8
6
 
9
7
  var clearSelection = function clearSelection() {
10
8
  if (!canUseDOM.canUseDOM) {
@@ -1 +1 @@
1
- {"version":3,"file":"clearSelection.js","sources":["../../../../src/components/Editable/utils/clearSelection.ts"],"sourcesContent":["import { canUseDOM } from '../../../utils';\n\ninterface CustomDocument extends Document {\n selection?: {\n empty: () => void;\n };\n}\n\nexport const clearSelection = () => {\n if (!canUseDOM) {\n return;\n }\n\n const doc = document as CustomDocument;\n\n if (window.getSelection) {\n window.getSelection()?.removeAllRanges();\n } else if (doc.selection) {\n doc.selection.empty();\n }\n};\n"],"names":["clearSelection","canUseDOM","doc","document","window","getSelection","_window$getSelection","removeAllRanges","selection","empty"],"mappings":";;;;;;;;IAQaA,cAAc,GAAG,SAAjBA,cAAcA,GAAS;EAChC,IAAI,CAACC,mBAAS,EAAE;AACZ,IAAA,OAAA;AACJ,GAAA;EAEA,IAAMC,GAAG,GAAGC,QAA0B,CAAA;EAEtC,IAAIC,MAAM,CAACC,YAAY,EAAE;AAAA,IAAA,IAAAC,oBAAA,CAAA;AACrB,IAAA,CAAAA,oBAAA,GAAAF,MAAM,CAACC,YAAY,EAAE,MAAAC,IAAAA,IAAAA,oBAAA,KAArBA,KAAAA,CAAAA,IAAAA,oBAAA,CAAuBC,eAAe,EAAE,CAAA;AAC5C,GAAC,MAAM,IAAIL,GAAG,CAACM,SAAS,EAAE;AACtBN,IAAAA,GAAG,CAACM,SAAS,CAACC,KAAK,EAAE,CAAA;AACzB,GAAA;AACJ;;;;"}
1
+ {"version":3,"file":"clearSelection.js","sources":["../../../../src/components/Editable/utils/clearSelection.ts"],"sourcesContent":["import { canUseDOM } from '../../../utils';\n\ninterface CustomDocument extends Document {\n selection?: {\n empty: () => void;\n };\n}\n\nexport const clearSelection = () => {\n if (!canUseDOM) {\n return;\n }\n\n const doc = document as CustomDocument;\n\n if (window.getSelection) {\n window.getSelection()?.removeAllRanges();\n } else if (doc.selection) {\n doc.selection.empty();\n }\n};\n"],"names":["clearSelection","canUseDOM","doc","document","window","getSelection","_window$getSelection","removeAllRanges","selection","empty"],"mappings":";;;;;;IAQaA,cAAc,GAAG,SAAjBA,cAAcA,GAAS;EAChC,IAAI,CAACC,mBAAS,EAAE;AACZ,IAAA,OAAA;AACJ,GAAA;EAEA,IAAMC,GAAG,GAAGC,QAA0B,CAAA;EAEtC,IAAIC,MAAM,CAACC,YAAY,EAAE;AAAA,IAAA,IAAAC,oBAAA,CAAA;AACrB,IAAA,CAAAA,oBAAA,GAAAF,MAAM,CAACC,YAAY,EAAE,MAAAC,IAAAA,IAAAA,oBAAA,KAArBA,KAAAA,CAAAA,IAAAA,oBAAA,CAAuBC,eAAe,EAAE,CAAA;AAC5C,GAAC,MAAM,IAAIL,GAAG,CAACM,SAAS,EAAE;AACtBN,IAAAA,GAAG,CAACM,SAAS,CAACC,KAAK,EAAE,CAAA;AACzB,GAAA;AACJ;;;;"}
@@ -3,8 +3,6 @@
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
5
  var canUseDOM = require('../../../utils/canUseDOM.js');
6
- require('react');
7
- require('../../../utils/react.js');
8
6
 
9
7
  var selectText = function selectText(node) {
10
8
  if (!canUseDOM.canUseDOM) {
@@ -1 +1 @@
1
- {"version":3,"file":"selectText.js","sources":["../../../../src/components/Editable/utils/selectText.ts"],"sourcesContent":["import { canUseDOM } from '../../../utils';\n\ninterface Body extends HTMLElement {\n createTextRange: () => {\n moveToElementText: (node: Node) => {};\n select: () => {};\n };\n}\n\nexport const selectText = (node: Node) => {\n if (!canUseDOM) {\n return;\n }\n\n setTimeout(() => {\n const body = document.body as Body;\n\n if (window.getSelection && document.createRange) {\n const range = document.createRange();\n range.selectNodeContents(node);\n const selection = window.getSelection();\n selection?.removeAllRanges();\n selection?.addRange(range);\n } else if (body.createTextRange) {\n const range = body.createTextRange();\n range.moveToElementText(node);\n range.select();\n }\n });\n};\n"],"names":["selectText","node","canUseDOM","setTimeout","body","document","window","getSelection","createRange","range","selectNodeContents","selection","removeAllRanges","addRange","createTextRange","moveToElementText","select"],"mappings":";;;;;;;;IASaA,UAAU,GAAG,SAAbA,UAAUA,CAAIC,IAAU,EAAK;EACtC,IAAI,CAACC,mBAAS,EAAE;AACZ,IAAA,OAAA;AACJ,GAAA;AAEAC,EAAAA,UAAU,CAAC,YAAM;AACb,IAAA,IAAMC,IAAI,GAAGC,QAAQ,CAACD,IAAY,CAAA;AAElC,IAAA,IAAIE,MAAM,CAACC,YAAY,IAAIF,QAAQ,CAACG,WAAW,EAAE;AAC7C,MAAA,IAAMC,KAAK,GAAGJ,QAAQ,CAACG,WAAW,EAAE,CAAA;AACpCC,MAAAA,KAAK,CAACC,kBAAkB,CAACT,IAAI,CAAC,CAAA;AAC9B,MAAA,IAAMU,SAAS,GAAGL,MAAM,CAACC,YAAY,EAAE,CAAA;AACvCI,MAAAA,SAAS,aAATA,SAAS,KAAA,KAAA,CAAA,IAATA,SAAS,CAAEC,eAAe,EAAE,CAAA;MAC5BD,SAAS,KAAA,IAAA,IAATA,SAAS,KAATA,KAAAA,CAAAA,IAAAA,SAAS,CAAEE,QAAQ,CAACJ,KAAK,CAAC,CAAA;AAC9B,KAAC,MAAM,IAAIL,IAAI,CAACU,eAAe,EAAE;AAC7B,MAAA,IAAML,MAAK,GAAGL,IAAI,CAACU,eAAe,EAAE,CAAA;AACpCL,MAAAA,MAAK,CAACM,iBAAiB,CAACd,IAAI,CAAC,CAAA;MAC7BQ,MAAK,CAACO,MAAM,EAAE,CAAA;AAClB,KAAA;AACJ,GAAC,CAAC,CAAA;AACN;;;;"}
1
+ {"version":3,"file":"selectText.js","sources":["../../../../src/components/Editable/utils/selectText.ts"],"sourcesContent":["import { canUseDOM } from '../../../utils';\n\ninterface Body extends HTMLElement {\n createTextRange: () => {\n moveToElementText: (node: Node) => {};\n select: () => {};\n };\n}\n\nexport const selectText = (node: Node) => {\n if (!canUseDOM) {\n return;\n }\n\n setTimeout(() => {\n const body = document.body as Body;\n\n if (window.getSelection && document.createRange) {\n const range = document.createRange();\n range.selectNodeContents(node);\n const selection = window.getSelection();\n selection?.removeAllRanges();\n selection?.addRange(range);\n } else if (body.createTextRange) {\n const range = body.createTextRange();\n range.moveToElementText(node);\n range.select();\n }\n });\n};\n"],"names":["selectText","node","canUseDOM","setTimeout","body","document","window","getSelection","createRange","range","selectNodeContents","selection","removeAllRanges","addRange","createTextRange","moveToElementText","select"],"mappings":";;;;;;IASaA,UAAU,GAAG,SAAbA,UAAUA,CAAIC,IAAU,EAAK;EACtC,IAAI,CAACC,mBAAS,EAAE;AACZ,IAAA,OAAA;AACJ,GAAA;AAEAC,EAAAA,UAAU,CAAC,YAAM;AACb,IAAA,IAAMC,IAAI,GAAGC,QAAQ,CAACD,IAAY,CAAA;AAElC,IAAA,IAAIE,MAAM,CAACC,YAAY,IAAIF,QAAQ,CAACG,WAAW,EAAE;AAC7C,MAAA,IAAMC,KAAK,GAAGJ,QAAQ,CAACG,WAAW,EAAE,CAAA;AACpCC,MAAAA,KAAK,CAACC,kBAAkB,CAACT,IAAI,CAAC,CAAA;AAC9B,MAAA,IAAMU,SAAS,GAAGL,MAAM,CAACC,YAAY,EAAE,CAAA;AACvCI,MAAAA,SAAS,aAATA,SAAS,KAAA,KAAA,CAAA,IAATA,SAAS,CAAEC,eAAe,EAAE,CAAA;MAC5BD,SAAS,KAAA,IAAA,IAATA,SAAS,KAATA,KAAAA,CAAAA,IAAAA,SAAS,CAAEE,QAAQ,CAACJ,KAAK,CAAC,CAAA;AAC9B,KAAC,MAAM,IAAIL,IAAI,CAACU,eAAe,EAAE;AAC7B,MAAA,IAAML,MAAK,GAAGL,IAAI,CAACU,eAAe,EAAE,CAAA;AACpCL,MAAAA,MAAK,CAACM,iBAAiB,CAACd,IAAI,CAAC,CAAA;MAC7BQ,MAAK,CAACO,MAAM,EAAE,CAAA;AAClB,KAAA;AACJ,GAAC,CAAC,CAAA;AACN;;;;"}
@@ -4,9 +4,8 @@ import './EmptyState.styles_s585zf.css';
4
4
  Object.defineProperty(exports, '__esModule', { value: true });
5
5
 
6
6
  var react = require('@linaria/react');
7
- var Button$1 = require('../Button/Button.js');
8
- require('@linaria/core');
9
7
  var common = require('../../engines/common.js');
8
+ var Button$1 = require('../Button/Button.js');
10
9
 
11
10
  var mergedButtonConfig = /*#__PURE__*/common.mergeConfig(Button$1.buttonConfig);
12
11
  var Button = /*#__PURE__*/common.component(mergedButtonConfig);
@@ -1 +1 @@
1
- {"version":3,"file":"EmptyState.styles.js","sources":["../../../src/components/EmptyState/EmptyState.styles.ts"],"sourcesContent":["import { styled } from '@linaria/react';\nimport { css } from '@linaria/core';\n\nimport { buttonConfig, buttonTokens } from '../Button';\nimport { component, mergeConfig } from '../../engines';\n\nimport { tokens } from './EmptyState.tokens';\n\nconst mergedButtonConfig = mergeConfig(buttonConfig);\nconst Button = component(mergedButtonConfig);\n\nexport const base = css`\n display: flex;\n flex-direction: column;\n align-items: center;\n background: var(--surface-solid-card);\n box-shadow: 0 4px 14px -4px rgba(8, 8, 8, 0.08), 0 1px 4px -1px rgba(0, 0, 0, 0.04);\n border-radius: var(${tokens.borderRadius});\n padding: var(${tokens.padding});\n text-align: center;\n`;\n\nexport const StyledButton = styled(Button)`\n ${buttonTokens.buttonColor}: var(--text-primary);\n ${buttonTokens.buttonColorActive}: var(--text-primary-active);\n ${buttonTokens.buttonColorHover}: var(--text-primary-hover);\n ${buttonTokens.buttonBackgroundColor}: none;\n ${buttonTokens.buttonPadding}: 0;\n ${buttonTokens.buttonHeight}: var(${tokens.buttonHeight});\n ${buttonTokens.buttonRadius}: 0;\n ${buttonTokens.buttonFontFamily}: var(${tokens.fontFamily});\n ${buttonTokens.buttonFontSize}: var(${tokens.fontSize});\n ${buttonTokens.buttonFontStyle}: var(${tokens.fontStyle});\n ${buttonTokens.buttonFontWeight}: 600;\n ${buttonTokens.buttonLetterSpacing}: var(${tokens.fontLetterSpacing});\n ${buttonTokens.buttonLineHeight}: var(${tokens.fontLineHeight});\n margin: var(${tokens.buttonMargin});\n`;\n\nexport const IconWrapper = styled.div`\n margin: var(${tokens.iconMargin});\n line-height: 0;\n`;\n\nexport const Description = styled.div`\n margin: var(${tokens.descriptionMargin});\n font-family: var(${tokens.fontFamily});\n font-size: var(${tokens.fontSize});\n font-style: var(${tokens.fontStyle});\n font-weight: var(${tokens.fontWeight});\n letter-spacing: var(${tokens.fontLetterSpacing});\n line-height: var(${tokens.fontLineHeight});\n`;\n"],"names":["mergedButtonConfig","mergeConfig","buttonConfig","Button","component","base","_exp3","StyledButton","styled","name","class","propsAsIs","IconWrapper","Description"],"mappings":";;;;;;;;;AAQA,IAAMA,kBAAkB,gBAAGC,kBAAW,CAACC,qBAAY,CAAC,CAAA;AACpD,IAAMC,MAAM,gBAAGC,gBAAS,CAACJ,kBAAkB,CAAC,CAAA;AAErC,IAAMK,IAAI,GAShB,UAAA;AAAC,IAAAC,KAAA,GAnBgBA,SAmBhBA,KAAAA,GAAA;AAAA,EAAA,OAEiCH,MAAM,CAAA;AAAA,CAAA,CAAA;AAAlC,IAAMI,YAAY,gBAAGC,YAAM,CAAAF,KAAA,EAAA,CAAA,CAAA;AAAAG,EAAAA,IAAA,EAAA,cAAA;AAAAC,EAAAA,OAAAA,EAAA,UAAA;AAAAC,EAAAA,SAAA,EAAA,IAAA;AAAA,CAejC,EAAA;AAEM,IAAMC,WAAW,gBAAGJ,YAAM,CAAA,KAAA,CAAA,CAAA;AAAAC,EAAAA,IAAA,EAAA,aAAA;AAAAC,EAAAA,OAAAA,EAAA,SAAA;AAAAC,EAAAA,SAAA,EAAA,KAAA;AAAA,CAGhC,EAAA;AAEM,IAAME,WAAW,gBAAGL,YAAM,CAAA,KAAA,CAAA,CAAA;AAAAC,EAAAA,IAAA,EAAA,aAAA;AAAAC,EAAAA,OAAAA,EAAA,UAAA;AAAAC,EAAAA,SAAA,EAAA,KAAA;AAAA,CAQhC;;;;;;;"}
1
+ {"version":3,"file":"EmptyState.styles.js","sources":["../../../src/components/EmptyState/EmptyState.styles.ts"],"sourcesContent":["import { styled } from '@linaria/react';\nimport { css } from '@linaria/core';\n\nimport { buttonConfig, buttonTokens } from '../Button';\nimport { component, mergeConfig } from '../../engines';\n\nimport { tokens } from './EmptyState.tokens';\n\nconst mergedButtonConfig = mergeConfig(buttonConfig);\nconst Button = component(mergedButtonConfig);\n\nexport const base = css`\n display: flex;\n flex-direction: column;\n align-items: center;\n background: var(--surface-solid-card);\n box-shadow: 0 4px 14px -4px rgba(8, 8, 8, 0.08), 0 1px 4px -1px rgba(0, 0, 0, 0.04);\n border-radius: var(${tokens.borderRadius});\n padding: var(${tokens.padding});\n text-align: center;\n`;\n\nexport const StyledButton = styled(Button)`\n ${buttonTokens.buttonColor}: var(--text-primary);\n ${buttonTokens.buttonColorActive}: var(--text-primary-active);\n ${buttonTokens.buttonColorHover}: var(--text-primary-hover);\n ${buttonTokens.buttonBackgroundColor}: none;\n ${buttonTokens.buttonPadding}: 0;\n ${buttonTokens.buttonHeight}: var(${tokens.buttonHeight});\n ${buttonTokens.buttonRadius}: 0;\n ${buttonTokens.buttonFontFamily}: var(${tokens.fontFamily});\n ${buttonTokens.buttonFontSize}: var(${tokens.fontSize});\n ${buttonTokens.buttonFontStyle}: var(${tokens.fontStyle});\n ${buttonTokens.buttonFontWeight}: 600;\n ${buttonTokens.buttonLetterSpacing}: var(${tokens.fontLetterSpacing});\n ${buttonTokens.buttonLineHeight}: var(${tokens.fontLineHeight});\n margin: var(${tokens.buttonMargin});\n`;\n\nexport const IconWrapper = styled.div`\n margin: var(${tokens.iconMargin});\n line-height: 0;\n`;\n\nexport const Description = styled.div`\n margin: var(${tokens.descriptionMargin});\n font-family: var(${tokens.fontFamily});\n font-size: var(${tokens.fontSize});\n font-style: var(${tokens.fontStyle});\n font-weight: var(${tokens.fontWeight});\n letter-spacing: var(${tokens.fontLetterSpacing});\n line-height: var(${tokens.fontLineHeight});\n`;\n"],"names":["mergedButtonConfig","mergeConfig","buttonConfig","Button","component","base","_exp3","StyledButton","styled","name","class","propsAsIs","IconWrapper","Description"],"mappings":";;;;;;;;AAQA,IAAMA,kBAAkB,gBAAGC,kBAAW,CAACC,qBAAY,CAAC,CAAA;AACpD,IAAMC,MAAM,gBAAGC,gBAAS,CAACJ,kBAAkB,CAAC,CAAA;AAErC,IAAMK,IAAI,GAShB,UAAA;AAAC,IAAAC,KAAA,GAnBgBA,SAmBhBA,KAAAA,GAAA;AAAA,EAAA,OAEiCH,MAAM,CAAA;AAAA,CAAA,CAAA;AAAlC,IAAMI,YAAY,gBAAGC,YAAM,CAAAF,KAAA,EAAA,CAAA,CAAA;AAAAG,EAAAA,IAAA,EAAA,cAAA;AAAAC,EAAAA,OAAAA,EAAA,UAAA;AAAAC,EAAAA,SAAA,EAAA,IAAA;AAAA,CAejC,EAAA;AAEM,IAAMC,WAAW,gBAAGJ,YAAM,CAAA,KAAA,CAAA,CAAA;AAAAC,EAAAA,IAAA,EAAA,aAAA;AAAAC,EAAAA,OAAAA,EAAA,SAAA;AAAAC,EAAAA,SAAA,EAAA,KAAA;AAAA,CAGhC,EAAA;AAEM,IAAME,WAAW,gBAAGL,YAAM,CAAA,KAAA,CAAA,CAAA;AAAAC,EAAAA,IAAA,EAAA,aAAA;AAAAC,EAAAA,OAAAA,EAAA,UAAA;AAAAC,EAAAA,SAAA,EAAA,KAAA;AAAA,CAQhC;;;;;;;"}
@@ -2,7 +2,6 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- var Button = require('../Button/Button.js');
6
5
  var base = require('../Button/variations/_view/base.js');
7
6
  var base$1 = require('../Button/variations/_size/base.js');
8
7
  var base$2 = require('../Button/variations/_disabled/base.js');
@@ -10,6 +9,7 @@ var base$3 = require('../Button/variations/_focused/base.js');
10
9
  var base$4 = require('../Button/variations/_blurred/base.js');
11
10
  var base$5 = require('../Button/variations/_stretching/base.js');
12
11
  var IconButton_styles = require('./IconButton.styles.js');
12
+ var Button = require('../Button/Button.js');
13
13
 
14
14
  var iconButtonRoot = Button.buttonRoot;
15
15
  var iconButtonConfig = {
@@ -3,14 +3,6 @@ import './IconButton.styles_sttslf.css';
3
3
 
4
4
  Object.defineProperty(exports, '__esModule', { value: true });
5
5
 
6
- require('react');
7
- require('../../utils/react.js');
8
- require('@linaria/react');
9
- require('focus-visible');
10
- require('styled-components');
11
- require('@linaria/core');
12
- require('@salutejs/plasma-core');
13
-
14
6
  var base = "b1ua728l";
15
7
 
16
8
  exports.base = base;
@@ -1 +1 @@
1
- {"version":3,"file":"IconButton.styles.js","sources":["../../../src/components/IconButton/IconButton.styles.ts"],"sourcesContent":["import { css } from '@linaria/core';\n\nimport { buttonTokens } from '../Button';\nimport { baseContent as buttonBase } from '../Button/Button.styles';\n\nimport { tokens } from './IconButton.tokens';\n\n// Переопределние токенов из Button\nexport const mappingOverride = `\n ${buttonTokens.buttonPadding}: 0;\n\n ${buttonTokens.buttonColor}: var(${tokens.iconButtonColor});\n ${buttonTokens.buttonBackgroundColor}: var(${tokens.iconButtonBackgroundColor});\n\n ${buttonTokens.buttonColorHover}: var(${tokens.iconButtonColorHover});\n ${buttonTokens.buttonBackgroundColorHover}: var(${tokens.iconButtonBackgroundColorHover});\n\n ${buttonTokens.buttonColorActive}: var(${tokens.iconButtonColorActive});\n ${buttonTokens.buttonBackgroundColorActive}: var(${tokens.iconButtonBackgroundColorActive});\n\n ${buttonTokens.buttonLoadingBackgroundColor}: var(${tokens.iconButtonLoadingBackgroundColor});\n\n ${buttonTokens.buttonFontFamily}: var(${tokens.iconButtonFontFamily});\n ${buttonTokens.buttonFontSize}: var(${tokens.iconButtonFontSize});\n ${buttonTokens.buttonFontStyle}: var(${tokens.iconButtonFontStyle});\n ${buttonTokens.buttonFontWeight}:var(${tokens.iconButtonFontWeight});\n ${buttonTokens.buttonLetterSpacing}: var(${tokens.iconButtonLetterSpacing});\n ${buttonTokens.buttonLineHeight}: var(${tokens.iconButtonLineHeight});\n\n ${buttonTokens.buttonWidth}: var(${tokens.iconButtonWidth});\n ${buttonTokens.buttonHeight}: var(${tokens.iconButtonHeight});\n ${buttonTokens.buttonRadius}: var(${tokens.iconButtonRadius});\n\n ${buttonTokens.buttonDisabledOpacity}: var(${tokens.iconButtonDisabledOpacity});\n ${buttonTokens.buttonFocusColor}: var(${tokens.iconButtonFocusColor});\n\n ${buttonTokens.buttonSpinnerSize}: var(${tokens.iconButtonSpinnerSize});\n ${buttonTokens.buttonSpinnerColor}: var(${tokens.iconButtonSpinnerColor});\n`;\n\nexport const base = css`\n ${buttonBase};\n ${mappingOverride};\n`;\n"],"names":["base"],"mappings":";;;;;;;;;;;;AAwCO,IAAMA,IAAI,GAGhB;;;;"}
1
+ {"version":3,"file":"IconButton.styles.js","sources":["../../../src/components/IconButton/IconButton.styles.ts"],"sourcesContent":["import { css } from '@linaria/core';\n\nimport { buttonTokens } from '../Button';\nimport { baseContent as buttonBase } from '../Button/Button.styles';\n\nimport { tokens } from './IconButton.tokens';\n\n// Переопределние токенов из Button\nexport const mappingOverride = `\n ${buttonTokens.buttonPadding}: 0;\n\n ${buttonTokens.buttonColor}: var(${tokens.iconButtonColor});\n ${buttonTokens.buttonBackgroundColor}: var(${tokens.iconButtonBackgroundColor});\n\n ${buttonTokens.buttonColorHover}: var(${tokens.iconButtonColorHover});\n ${buttonTokens.buttonBackgroundColorHover}: var(${tokens.iconButtonBackgroundColorHover});\n\n ${buttonTokens.buttonColorActive}: var(${tokens.iconButtonColorActive});\n ${buttonTokens.buttonBackgroundColorActive}: var(${tokens.iconButtonBackgroundColorActive});\n\n ${buttonTokens.buttonLoadingBackgroundColor}: var(${tokens.iconButtonLoadingBackgroundColor});\n\n ${buttonTokens.buttonFontFamily}: var(${tokens.iconButtonFontFamily});\n ${buttonTokens.buttonFontSize}: var(${tokens.iconButtonFontSize});\n ${buttonTokens.buttonFontStyle}: var(${tokens.iconButtonFontStyle});\n ${buttonTokens.buttonFontWeight}:var(${tokens.iconButtonFontWeight});\n ${buttonTokens.buttonLetterSpacing}: var(${tokens.iconButtonLetterSpacing});\n ${buttonTokens.buttonLineHeight}: var(${tokens.iconButtonLineHeight});\n\n ${buttonTokens.buttonWidth}: var(${tokens.iconButtonWidth});\n ${buttonTokens.buttonHeight}: var(${tokens.iconButtonHeight});\n ${buttonTokens.buttonRadius}: var(${tokens.iconButtonRadius});\n\n ${buttonTokens.buttonDisabledOpacity}: var(${tokens.iconButtonDisabledOpacity});\n ${buttonTokens.buttonFocusColor}: var(${tokens.iconButtonFocusColor});\n\n ${buttonTokens.buttonSpinnerSize}: var(${tokens.iconButtonSpinnerSize});\n ${buttonTokens.buttonSpinnerColor}: var(${tokens.iconButtonSpinnerColor});\n`;\n\nexport const base = css`\n ${buttonBase};\n ${mappingOverride};\n`;\n"],"names":["base"],"mappings":";;;;AAwCO,IAAMA,IAAI,GAGhB;;;;"}
@@ -5,18 +5,16 @@ Object.defineProperty(exports, '__esModule', { value: true });
5
5
  var _rollupPluginBabelHelpers = require('../../_virtual/_rollupPluginBabelHelpers.js');
6
6
  var React = require('react');
7
7
  var plasmaCore = require('@salutejs/plasma-core');
8
- require('@linaria/core');
9
- var common = require('../../engines/common.js');
10
- var PopupContext = require('../Popup/PopupContext.js');
11
- var Popup$1 = require('../Popup/Popup.js');
12
- var Overlay = require('../Overlay/Overlay.js');
13
8
  var index = require('../Popup/utils/index.js');
14
- var useFocusTrap = require('../../hooks/useFocusTrap.js');
15
- require('../../utils/react.js');
16
9
  var Modal_tokens = require('./Modal.tokens.js');
17
- var useModal = require('./hooks/useModal.js');
18
10
  var base = require('./variations/_view/base.js');
19
11
  var ModalContext = require('./ModalContext.js');
12
+ var useFocusTrap = require('../../hooks/useFocusTrap.js');
13
+ var PopupContext = require('../Popup/PopupContext.js');
14
+ var useModal = require('./hooks/useModal.js');
15
+ var Overlay = require('../Overlay/Overlay.js');
16
+ var common = require('../../engines/common.js');
17
+ var Popup$1 = require('../Popup/Popup.js');
20
18
 
21
19
  var _excluded = ["id", "withAnimation", "onClose", "onOverlayClick", "onEscKeyDown", "closeOnEsc", "closeOnOverlayClick", "withBlur", "initialFocusRef", "focusAfterRef", "zIndex", "popupInfo", "children", "view", "opened", "isOpen"];
22
20
 
@@ -1 +1 @@
1
- {"version":3,"file":"Modal.js","sources":["../../../src/components/Modal/Modal.tsx"],"sourcesContent":["import React, { forwardRef, useCallback, useMemo } from 'react';\nimport { useForkRef, safeUseId } from '@salutejs/plasma-core';\n\nimport { RootProps, component } from '../../engines';\nimport { popupConfig, usePopupContext } from '../Popup';\nimport { Overlay } from '../Overlay';\nimport { DEFAULT_Z_INDEX } from '../Popup/utils';\nimport { useFocusTrap } from '../../hooks';\n\nimport { classes, tokens } from './Modal.tokens';\nimport { ModalProps } from './Modal.types';\nimport { useModal } from './hooks';\nimport { base as viewCSS } from './variations/_view/base';\nimport { getIdLastModal } from './ModalContext';\n\n// issue #823\nconst Popup = component(popupConfig);\n\n/**\n * Modal.\n * Управляет показом/скрытием, подложкой и анимацией визуальной части модального окна.\n */\nexport const modalRoot = (Root: RootProps<HTMLDivElement, ModalProps>) =>\n forwardRef<HTMLDivElement, ModalProps>(\n (\n {\n id,\n withAnimation,\n onClose,\n onOverlayClick,\n onEscKeyDown,\n closeOnEsc = true,\n closeOnOverlayClick = true,\n withBlur,\n initialFocusRef,\n focusAfterRef,\n zIndex,\n popupInfo,\n children,\n view,\n opened,\n isOpen,\n ...rest\n },\n outerRootRef,\n ) => {\n const innerIsOpen = Boolean(isOpen || opened);\n const trapRef = useFocusTrap(true, initialFocusRef, focusAfterRef, true);\n const popupController = usePopupContext();\n\n const innerRef = useForkRef<HTMLDivElement>(trapRef, outerRootRef);\n\n const uniqId = safeUseId();\n const innerId = id || uniqId;\n const overlayBackgroundToken = withBlur\n ? `var(${tokens.modalOverlayWithBlurColor})`\n : `var(${tokens.modalOverlayColor})`;\n\n const { modalInfo } = useModal({\n id: innerId,\n isOpen: innerIsOpen,\n closeOnEsc,\n onEscKeyDown,\n onClose,\n popupInfo,\n });\n\n const transparent = useMemo(() => getIdLastModal(popupController.items) !== innerId, [\n innerId,\n popupController.items,\n ]);\n\n const onModalOverlayKeyDown = useCallback(\n (event: React.MouseEvent<HTMLDivElement>) => {\n if (onOverlayClick) {\n onOverlayClick(event);\n return;\n }\n\n if (onClose) {\n onClose();\n }\n },\n [closeOnOverlayClick, onOverlayClick, onClose],\n );\n\n return (\n <Popup\n id={innerId}\n opened={innerIsOpen}\n ref={innerRef}\n popupInfo={modalInfo}\n withAnimation={withAnimation}\n zIndex={zIndex}\n overlay={\n <Root view={view}>\n <Overlay\n className={classes.overlay}\n zIndex={zIndex || DEFAULT_Z_INDEX}\n backgroundColorProperty={overlayBackgroundToken}\n withBlur={withBlur}\n transparent={transparent}\n isClickable={closeOnOverlayClick}\n onOverlayClick={onModalOverlayKeyDown}\n />\n </Root>\n }\n {...rest}\n >\n {children}\n </Popup>\n );\n },\n );\n\nexport const modalConfig = {\n name: 'Modal',\n tag: 'div',\n layout: modalRoot,\n base: '',\n variations: {\n view: {\n css: viewCSS,\n },\n },\n defaults: {\n view: 'default',\n },\n};\n"],"names":["Popup","component","popupConfig","modalRoot","Root","forwardRef","_ref","outerRootRef","id","withAnimation","onClose","onOverlayClick","onEscKeyDown","_ref$closeOnEsc","closeOnEsc","_ref$closeOnOverlayCl","closeOnOverlayClick","withBlur","initialFocusRef","focusAfterRef","zIndex","popupInfo","children","view","opened","isOpen","rest","_objectWithoutProperties","_excluded","innerIsOpen","Boolean","trapRef","useFocusTrap","popupController","usePopupContext","innerRef","useForkRef","uniqId","safeUseId","innerId","overlayBackgroundToken","concat","tokens","modalOverlayWithBlurColor","modalOverlayColor","_useModal","useModal","modalInfo","transparent","useMemo","getIdLastModal","items","onModalOverlayKeyDown","useCallback","event","React","createElement","_extends","ref","overlay","Overlay","className","classes","DEFAULT_Z_INDEX","backgroundColorProperty","isClickable","modalConfig","name","tag","layout","base","variations","css","viewCSS","defaults"],"mappings":";;;;;;;;;;;;;;;;;;;;;;AAeA;AACA,IAAMA,KAAK,gBAAGC,gBAAS,CAACC,mBAAW,CAAC,CAAA;;AAEpC;AACA;AACA;AACA;IACaC,SAAS,GAAG,SAAZA,SAASA,CAAIC,IAA2C,EAAA;AAAA,EAAA,oBACjEC,gBAAU,CACN,UAAAC,IAAA,EAoBIC,YAAY,EACX;AAAA,IAAA,IAnBGC,EAAE,GAAAF,IAAA,CAAFE,EAAE;MACFC,aAAa,GAAAH,IAAA,CAAbG,aAAa;MACbC,OAAO,GAAAJ,IAAA,CAAPI,OAAO;MACPC,cAAc,GAAA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A,CAACpD,IAAI,EAAA;AAACmB,QAAAA,IAAI,EAAEA,IAAAA;AAAK,OAAA,eACbgC,KAAA,CAAAC,aAAA,CAACI,eAAO,EAAA;QACJC,SAAS,EAAEC,oBAAO,CAACH,OAAQ;QAC3BvC,MAAM,EAAEA,MAAM,IAAI2C,qBAAgB;AAClCC,QAAAA,uBAAuB,EAAExB,sBAAuB;AAChDvB,QAAAA,QAAQ,EAAEA,QAAS;AACnB+B,QAAAA,WAAW,EAAEA,WAAY;AACzBiB,QAAAA,WAAW,EAAEjD,mBAAoB;AACjCL,QAAAA,cAAc,EAAEyC,qBAAAA;AAAsB,OACzC,CACC,CAAA;KAEN1B,EAAAA,IAAI,CAEPJ,EAAAA,QACE,CAAC,CAAA;AAEhB,GACJ,CAAC,CAAA;AAAA,EAAA;AAEE,IAAM4C,WAAW,GAAG;AACvBC,EAAAA,IAAI,EAAE,OAAO;AACbC,EAAAA,GAAG,EAAE,KAAK;AACVC,EAAAA,MAAM,EAAElE,SAAS;AACjBmE,EAAAA,IAAI,EAAE,EAAE;AACRC,EAAAA,UAAU,EAAE;AACRhD,IAAAA,IAAI,EAAE;AACFiD,MAAAA,GAAG,EAAEC,SAAAA;AACT,KAAA;GACH;AACDC,EAAAA,QAAQ,EAAE;AACNnD,IAAAA,IAAI,EAAE,SAAA;AACV,GAAA;AACJ;;;;;"}
1
+ {"version":3,"file":"Modal.js","sources":["../../../src/components/Modal/Modal.tsx"],"sourcesContent":["import React, { forwardRef, useCallback, useMemo } from 'react';\nimport { useForkRef, safeUseId } from '@salutejs/plasma-core';\n\nimport { RootProps, component } from '../../engines';\nimport { popupConfig, usePopupContext } from '../Popup';\nimport { Overlay } from '../Overlay';\nimport { DEFAULT_Z_INDEX } from '../Popup/utils';\nimport { useFocusTrap } from '../../hooks';\n\nimport { classes, tokens } from './Modal.tokens';\nimport { ModalProps } from './Modal.types';\nimport { useModal } from './hooks';\nimport { base as viewCSS } from './variations/_view/base';\nimport { getIdLastModal } from './ModalContext';\n\n// issue #823\nconst Popup = component(popupConfig);\n\n/**\n * Modal.\n * Управляет показом/скрытием, подложкой и анимацией визуальной части модального окна.\n */\nexport const modalRoot = (Root: RootProps<HTMLDivElement, ModalProps>) =>\n forwardRef<HTMLDivElement, ModalProps>(\n (\n {\n id,\n withAnimation,\n onClose,\n onOverlayClick,\n onEscKeyDown,\n closeOnEsc = true,\n closeOnOverlayClick = true,\n withBlur,\n initialFocusRef,\n focusAfterRef,\n zIndex,\n popupInfo,\n children,\n view,\n opened,\n isOpen,\n ...rest\n },\n outerRootRef,\n ) => {\n const innerIsOpen = Boolean(isOpen || opened);\n const trapRef = useFocusTrap(true, initialFocusRef, focusAfterRef, true);\n const popupController = usePopupContext();\n\n const innerRef = useForkRef<HTMLDivElement>(trapRef, outerRootRef);\n\n const uniqId = safeUseId();\n const innerId = id || uniqId;\n const overlayBackgroundToken = withBlur\n ? `var(${tokens.modalOverlayWithBlurColor})`\n : `var(${tokens.modalOverlayColor})`;\n\n const { modalInfo } = useModal({\n id: innerId,\n isOpen: innerIsOpen,\n closeOnEsc,\n onEscKeyDown,\n onClose,\n popupInfo,\n });\n\n const transparent = useMemo(() => getIdLastModal(popupController.items) !== innerId, [\n innerId,\n popupController.items,\n ]);\n\n const onModalOverlayKeyDown = useCallback(\n (event: React.MouseEvent<HTMLDivElement>) => {\n if (onOverlayClick) {\n onOverlayClick(event);\n return;\n }\n\n if (onClose) {\n onClose();\n }\n },\n [closeOnOverlayClick, onOverlayClick, onClose],\n );\n\n return (\n <Popup\n id={innerId}\n opened={innerIsOpen}\n ref={innerRef}\n popupInfo={modalInfo}\n withAnimation={withAnimation}\n zIndex={zIndex}\n overlay={\n <Root view={view}>\n <Overlay\n className={classes.overlay}\n zIndex={zIndex || DEFAULT_Z_INDEX}\n backgroundColorProperty={overlayBackgroundToken}\n withBlur={withBlur}\n transparent={transparent}\n isClickable={closeOnOverlayClick}\n onOverlayClick={onModalOverlayKeyDown}\n />\n </Root>\n }\n {...rest}\n >\n {children}\n </Popup>\n );\n },\n );\n\nexport const modalConfig = {\n name: 'Modal',\n tag: 'div',\n layout: modalRoot,\n base: '',\n variations: {\n view: {\n css: viewCSS,\n },\n },\n defaults: {\n view: 'default',\n },\n};\n"],"names":["Popup","component","popupConfig","modalRoot","Root","forwardRef","_ref","outerRootRef","id","withAnimation","onClose","onOverlayClick","onEscKeyDown","_ref$closeOnEsc","closeOnEsc","_ref$closeOnOverlayCl","closeOnOverlayClick","withBlur","initialFocusRef","focusAfterRef","zIndex","popupInfo","children","view","opened","isOpen","rest","_objectWithoutProperties","_excluded","innerIsOpen","Boolean","trapRef","useFocusTrap","popupController","usePopupContext","innerRef","useForkRef","uniqId","safeUseId","innerId","overlayBackgroundToken","concat","tokens","modalOverlayWithBlurColor","modalOverlayColor","_useModal","useModal","modalInfo","transparent","useMemo","getIdLastModal","items","onModalOverlayKeyDown","useCallback","event","React","createElement","_extends","ref","overlay","Overlay","className","classes","DEFAULT_Z_INDEX","backgroundColorProperty","isClickable","modalConfig","name","tag","layout","base","variations","css","viewCSS","defaults"],"mappings":";;;;;;;;;;;;;;;;;;;;AAeA;AACA,IAAMA,KAAK,gBAAGC,gBAAS,CAACC,mBAAW,CAAC,CAAA;;AAEpC;AACA;AACA;AACA;IACaC,SAAS,GAAG,SAAZA,SAASA,CAAIC,IAA2C,EAAA;AAAA,EAAA,oBACjEC,gBAAU,CACN,UAAAC,IAAA,EAoBIC,YAAY,EACX;AAAA,IAAA,IAnBGC,EAAE,GAAAF,IAAA,CAAFE,EAAE;MACFC,aAAa,GAAAH,IAAA,CAAbG,aAAa;MACbC,OAAO,GAAAJ,IAAA,CAAPI,OAAO;MACPC,cAAc,GAAAL,IAAA,CAAdK,cAAc;MACdC,YAAY,GAAAN,IAAA,CAAZM,YAAY;MAAAC,eAAA,GAAAP,IAAA,CACZQ,UAAU;AAAVA,MAAAA,UAAU,GAAAD,eAAA,KAAG,KAAA,CAAA,GAAA,IAAI,GAAAA,eAAA;MAAAE,qB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2C,qBAAgB;AAClCC,QAAAA,uBAAuB,EAAExB,sBAAuB;AAChDvB,QAAAA,QAAQ,EAAEA,QAAS;AACnB+B,QAAAA,WAAW,EAAEA,WAAY;AACzBiB,QAAAA,WAAW,EAAEjD,mBAAoB;AACjCL,QAAAA,cAAc,EAAEyC,qBAAAA;AAAsB,OACzC,CACC,CAAA;KAEN1B,EAAAA,IAAI,CAEPJ,EAAAA,QACE,CAAC,CAAA;AAEhB,GACJ,CAAC,CAAA;AAAA,EAAA;AAEE,IAAM4C,WAAW,GAAG;AACvBC,EAAAA,IAAI,EAAE,OAAO;AACbC,EAAAA,GAAG,EAAE,KAAK;AACVC,EAAAA,MAAM,EAAElE,SAAS;AACjBmE,EAAAA,IAAI,EAAE,EAAE;AACRC,EAAAA,UAAU,EAAE;AACRhD,IAAAA,IAAI,EAAE;AACFiD,MAAAA,GAAG,EAAEC,SAAAA;AACT,KAAA;GACH;AACDC,EAAAA,QAAQ,EAAE;AACNnD,IAAAA,IAAI,EAAE,SAAA;AACV,GAAA;AACJ;;;;;"}
@@ -6,10 +6,6 @@ var _rollupPluginBabelHelpers = require('../../../_virtual/_rollupPluginBabelHel
6
6
  var React = require('react');
7
7
  var ModalContext = require('../ModalContext.js');
8
8
  var PopupContext = require('../../Popup/PopupContext.js');
9
- require('@salutejs/plasma-core');
10
- require('../../../utils/react.js');
11
- require('react-dom');
12
- require('@linaria/react');
13
9
 
14
10
  var ESCAPE_KEYCODE = 27;
15
11
  var useModal = function useModal(_ref) {
@@ -1 +1 @@
1
- {"version":3,"file":"useModal.js","sources":["../../../../src/components/Modal/hooks/useModal.ts"],"sourcesContent":["import { useCallback, useEffect } from 'react';\n\nimport { ModalInfo, getIdLastModal } from '../ModalContext';\nimport { ModalHookArgs } from '../Modal.types';\nimport { usePopupContext } from '../../Popup';\n\nconst ESCAPE_KEYCODE = 27;\n\nexport const useModal = ({ id, popupInfo, onEscKeyDown, onClose, closeOnEsc = true }: ModalHookArgs) => {\n const popupController = usePopupContext();\n\n // При ESC закрывает текущее окно, если это возможно\n const onKeyDown = useCallback(\n (event: KeyboardEvent) => {\n if (!closeOnEsc) {\n return;\n }\n if (event.keyCode === ESCAPE_KEYCODE && getIdLastModal(popupController.items) === id) {\n if (onEscKeyDown) {\n onEscKeyDown(event);\n return;\n }\n\n if (onClose) {\n onClose();\n }\n }\n },\n [onClose, onEscKeyDown, popupController.items, closeOnEsc],\n );\n\n useEffect(() => {\n window.addEventListener('keydown', onKeyDown);\n return () => {\n window.removeEventListener('keydown', onKeyDown);\n };\n }, [onClose, onEscKeyDown, popupController.items, closeOnEsc]);\n\n const modalInfo: ModalInfo = {\n id,\n info: {\n isModal: true,\n },\n ...popupInfo,\n };\n\n return { modalInfo };\n};\n"],"names":["ESCAPE_KEYCODE","useModal","_ref","id","popupInfo","onEscKeyDown","onClose","_ref$closeOnEsc","closeOnEsc","popupController","usePopupContext","onKeyDown","useCallback","event","keyCode","getIdLastModal","items","useEffect","window","addEventListener","removeEventListener","modalInfo","_objectSpread","info","isModal"],"mappings":";;;;;;;;;;;;;AAMA,IAAMA,cAAc,GAAG,EAAE,CAAA;IAEZC,QAAQ,GAAG,SAAXA,QAAQA,CAAAC,IAAA,EAAmF;AAAA,EAAA,IAA7EC,EAAE,GAAAD,IAAA,CAAFC,EAAE;IAAEC,SAAS,GAAAF,IAAA,CAATE,SAAS;IAAEC,YAAY,GAAAH,IAAA,CAAZG,YAAY;IAAEC,OAAO,GAAAJ,IAAA,CAAPI,OAAO;IAAAC,eAAA,GAAAL,IAAA,CAAEM,UAAU;AAAVA,IAAAA,UAAU,GAAAD,eAAA,KAAG,KAAA,CAAA,GAAA,IAAI,GAAAA,eAAA,CAAA;AAC9E,EAAA,IAAME,eAAe,GAAGC,4BAAe,EAAE,CAAA;;AAEzC;AACA,EAAA,IAAMC,SAAS,GAAGC,iBAAW,CACzB,UAACC,KAAoB,EAAK;IACtB,IAAI,CAACL,UAAU,EAAE;AACb,MAAA,OAAA;AACJ,KAAA;AACA,IAAA,IAAIK,KAAK,CAACC,OAAO,KAAKd,cAAc,IAAIe,2BAAc,CAACN,eAAe,CAACO,KAAK,CAAC,KAAKb,EAAE,EAAE;AAClF,MAAA,IAAIE,YAAY,EAAE;QACdA,YAAY,CAACQ,KAAK,CAAC,CAAA;AACnB,QAAA,OAAA;AACJ,OAAA;AAEA,MAAA,IAAIP,OAAO,EAAE;AACTA,QAAAA,OAAO,EAAE,CAAA;AACb,OAAA;AACJ,KAAA;AACJ,GAAC,EACD,CAACA,OAAO,EAAED,YAAY,EAAEI,eAAe,CAACO,KAAK,EAAER,UAAU,CAC7D,CAAC,CAAA;AAEDS,EAAAA,eAAS,CAAC,YAAM;AACZC,IAAAA,MAAM,CAACC,gBAAgB,CAAC,SAAS,EAAER,SAAS,CAAC,CAAA;AAC7C,IAAA,OAAO,YAAM;AACTO,MAAAA,MAAM,CAACE,mBAAmB,CAAC,SAAS,EAAET,SAAS,CAAC,CAAA;KACnD,CAAA;AACL,GAAC,EAAE,CAACL,OAAO,EAAED,YAAY,EAAEI,eAAe,CAACO,KAAK,EAAER,UAAU,CAAC,CAAC,CAAA;EAE9D,IAAMa,SAAoB,GAAAC,uCAAA,CAAA;AACtBnB,IAAAA,EAAE,EAAFA,EAAE;AACFoB,IAAAA,IAAI,EAAE;AACFC,MAAAA,OAAO,EAAE,IAAA;AACb,KAAA;AAAC,GAAA,EACEpB,SAAS,CACf,CAAA;EAED,OAAO;AAAEiB,IAAAA,SAAS,EAATA,SAAAA;GAAW,CAAA;AACxB;;;;"}
1
+ {"version":3,"file":"useModal.js","sources":["../../../../src/components/Modal/hooks/useModal.ts"],"sourcesContent":["import { useCallback, useEffect } from 'react';\n\nimport { ModalInfo, getIdLastModal } from '../ModalContext';\nimport { ModalHookArgs } from '../Modal.types';\nimport { usePopupContext } from '../../Popup';\n\nconst ESCAPE_KEYCODE = 27;\n\nexport const useModal = ({ id, popupInfo, onEscKeyDown, onClose, closeOnEsc = true }: ModalHookArgs) => {\n const popupController = usePopupContext();\n\n // При ESC закрывает текущее окно, если это возможно\n const onKeyDown = useCallback(\n (event: KeyboardEvent) => {\n if (!closeOnEsc) {\n return;\n }\n if (event.keyCode === ESCAPE_KEYCODE && getIdLastModal(popupController.items) === id) {\n if (onEscKeyDown) {\n onEscKeyDown(event);\n return;\n }\n\n if (onClose) {\n onClose();\n }\n }\n },\n [onClose, onEscKeyDown, popupController.items, closeOnEsc],\n );\n\n useEffect(() => {\n window.addEventListener('keydown', onKeyDown);\n return () => {\n window.removeEventListener('keydown', onKeyDown);\n };\n }, [onClose, onEscKeyDown, popupController.items, closeOnEsc]);\n\n const modalInfo: ModalInfo = {\n id,\n info: {\n isModal: true,\n },\n ...popupInfo,\n };\n\n return { modalInfo };\n};\n"],"names":["ESCAPE_KEYCODE","useModal","_ref","id","popupInfo","onEscKeyDown","onClose","_ref$closeOnEsc","closeOnEsc","popupController","usePopupContext","onKeyDown","useCallback","event","keyCode","getIdLastModal","items","useEffect","window","addEventListener","removeEventListener","modalInfo","_objectSpread","info","isModal"],"mappings":";;;;;;;;;AAMA,IAAMA,cAAc,GAAG,EAAE,CAAA;IAEZC,QAAQ,GAAG,SAAXA,QAAQA,CAAAC,IAAA,EAAmF;AAAA,EAAA,IAA7EC,EAAE,GAAAD,IAAA,CAAFC,EAAE;IAAEC,SAAS,GAAAF,IAAA,CAATE,SAAS;IAAEC,YAAY,GAAAH,IAAA,CAAZG,YAAY;IAAEC,OAAO,GAAAJ,IAAA,CAAPI,OAAO;IAAAC,eAAA,GAAAL,IAAA,CAAEM,UAAU;AAAVA,IAAAA,UAAU,GAAAD,eAAA,KAAG,KAAA,CAAA,GAAA,IAAI,GAAAA,eAAA,CAAA;AAC9E,EAAA,IAAME,eAAe,GAAGC,4BAAe,EAAE,CAAA;;AAEzC;AACA,EAAA,IAAMC,SAAS,GAAGC,iBAAW,CACzB,UAACC,KAAoB,EAAK;IACtB,IAAI,CAACL,UAAU,EAAE;AACb,MAAA,OAAA;AACJ,KAAA;AACA,IAAA,IAAIK,KAAK,CAACC,OAAO,KAAKd,cAAc,IAAIe,2BAAc,CAACN,eAAe,CAACO,KAAK,CAAC,KAAKb,EAAE,EAAE;AAClF,MAAA,IAAIE,YAAY,EAAE;QACdA,YAAY,CAACQ,KAAK,CAAC,CAAA;AACnB,QAAA,OAAA;AACJ,OAAA;AAEA,MAAA,IAAIP,OAAO,EAAE;AACTA,QAAAA,OAAO,EAAE,CAAA;AACb,OAAA;AACJ,KAAA;AACJ,GAAC,EACD,CAACA,OAAO,EAAED,YAAY,EAAEI,eAAe,CAACO,KAAK,EAAER,UAAU,CAC7D,CAAC,CAAA;AAEDS,EAAAA,eAAS,CAAC,YAAM;AACZC,IAAAA,MAAM,CAACC,gBAAgB,CAAC,SAAS,EAAER,SAAS,CAAC,CAAA;AAC7C,IAAA,OAAO,YAAM;AACTO,MAAAA,MAAM,CAACE,mBAAmB,CAAC,SAAS,EAAET,SAAS,CAAC,CAAA;KACnD,CAAA;AACL,GAAC,EAAE,CAACL,OAAO,EAAED,YAAY,EAAEI,eAAe,CAACO,KAAK,EAAER,UAAU,CAAC,CAAC,CAAA;EAE9D,IAAMa,SAAoB,GAAAC,uCAAA,CAAA;AACtBnB,IAAAA,EAAE,EAAFA,EAAE;AACFoB,IAAAA,IAAI,EAAE;AACFC,MAAAA,OAAO,EAAE,IAAA;AACb,KAAA;AAAC,GAAA,EACEpB,SAAS,CACf,CAAA;EAED,OAAO;AAAEiB,IAAAA,SAAS,EAATA,SAAAA;GAAW,CAAA;AACxB;;;;"}
@@ -30,14 +30,14 @@
30
30
  .Button_styles_1sopr3d_s1rjh7ra__8219590b{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;margin:var(--plasma-button-right-content-margin);-webkit-align-self:var(--plasma-button-right-content-align-self);-ms-flex-item-align:var(--plasma-button-right-content-align);align-self:var(--plasma-button-right-content-align-self);}
31
31
  .Button_styles_1sopr3d_b9ga1dj__8219590b{position:relative;display:-webkit-inline-box;display:-webkit-inline-flex;display:-ms-inline-flexbox;display:inline-flex;-webkit-align-items:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;box-sizing:border-box;-webkit-box-pack:center;-webkit-justify-content:center;-ms-flex-pack:center;justify-content:center;-webkit-appearance:none;-moz-appearance:none;appearance:none;border:none;cursor:pointer;-webkit-tap-highlight-color:rgba(0,0,0,0);--plasma_private-btn-br:var(--plasma_computed-btn-br);border-radius:var(--plasma_private-btn-br);}a.Button_styles_1sopr3d_b9ga1dj__8219590b{-webkit-text-decoration:none;text-decoration:none;}.Button_styles_1sopr3d_b9ga1dj__8219590b.Button_styles_1sopr3d_b9ga1dj__8219590b.Button_styles_1sopr3d_buttonSquare__8219590b{width:var(--plasma-button-height);padding:0;}
32
32
 
33
- .Notification_styles_7h8hp0_sb12p__2b784e15{width:-webkit-fit-content;width:-moz-fit-content;width:fit-content;}
34
- .Notification_styles_7h8hp0_crvd7hm__2b784e15{position:absolute;width:1.5rem;height:1.5rem;color:var(--plasma-notification-close-icon-color);}.Notification_styles_7h8hp0_crvd7hm__2b784e15:hover{color:var(--plasma-notification-close-icon-color-on-hover);}.Notification_styles_7h8hp0_crvd7hm__2b784e15.Notification_styles_7h8hp0_notificationLayoutHorizontal__2b784e15{position:relative;}
35
- .Notification_styles_7h8hp0_wg1ga5v__2b784e15{position:relative;box-sizing:border-box;background:var(--plasma-notification-backgorund);border-radius:var(--plasma-notification-border-radius);}.Notification_styles_7h8hp0_wg1ga5v__2b784e15.Notification_styles_7h8hp0_notificationLayoutHorizontal__2b784e15{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-align-items:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;gap:var(--plasma-notification-horizontal-layout-gap);}
36
- .Notification_styles_7h8hp0_b1amsn8a__2b784e15{margin-top:var(--plasma-notification-buttons-margin-top);margin-left:var(--b1amsn8a-0);}.Notification_styles_7h8hp0_b1amsn8a__2b784e15.Notification_styles_7h8hp0_notificationLayoutHorizontal__2b784e15{margin-top:unset;margin-left:unset;}
37
- .Notification_styles_7h8hp0_i14raqr9__2b784e15{width:var(--plasma-notification-content-left-icon-size);height:var(--plasma-notification-content-left-icon-size);margin-right:var(--i14raqr9-0);margin-bottom:var(--i14raqr9-1);}.Notification_styles_7h8hp0_i14raqr9__2b784e15.Notification_styles_7h8hp0_notificationLayoutHorizontal__2b784e15{margin-right:var(--plasma-notification-horizontal-layout-left-icon-margin);margin-bottom:unset;}
38
- .Notification_styles_7h8hp0_c157peez__2b784e15{display:var(--c157peez-0);padding-top:var(--c157peez-1);}.Notification_styles_7h8hp0_c157peez__2b784e15.Notification_styles_7h8hp0_notificationLayoutHorizontal__2b784e15{padding:unset;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-align-items:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-flex:1;-webkit-flex-grow:1;-ms-flex-positive:1;flex-grow:1;}
39
- .Notification_styles_7h8hp0_t1vmb0f2__2b784e15{padding:var(--plasma-notification-textbox-padding-top) var(--plasma-notification-textbox-padding-right) var(--plasma-notification-textbox-padding-bottom) var(--plasma-notification-textbox-padding-left);padding-top:var(--t1vmb0f2-0);padding-right:var(--t1vmb0f2-1);display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-flex-direction:column;-ms-flex-direction:column;flex-direction:column;row-gap:var(--plasma-notification-textbox-gap);word-break:break-word;}.Notification_styles_7h8hp0_t1vmb0f2__2b784e15.Notification_styles_7h8hp0_notificationLayoutHorizontal__2b784e15{padding:unset;}
40
- .Notification_styles_7h8hp0_s1k4e58v__2b784e15{font-family:var(--plasma-notification-title-font-family);font-size:var(--plasma-notification-title-font-size);font-style:var(--plasma-notification-title-font-style);font-weight:var(--plasma-notification-title-font-weight);-webkit-letter-spacing:var(--plasma-notification-title-font-letter-spacing);-moz-letter-spacing:var(--plasma-notification-title-font-letter-spacing);-ms-letter-spacing:var(--plasma-notification-title-font-letter-spacing);letter-spacing:var(--plasma-notification-title-font-letter-spacing);line-height:var(--plasma-notification-title-font-line-height);overflow-wrap:break-word;-webkit-hyphens:auto;-moz-hyphens:auto;-ms-hyphens:auto;hyphens:auto;}
41
- .Notification_styles_7h8hp0_s92kmpm__2b784e15{font-family:var(--plasma-notification-content-font-family);font-size:var(--plasma-notification-content-font-size);font-style:var(--plasma-notification-content-font-style);font-weight:var(--plasma-notification-content-font-weight);-webkit-letter-spacing:var(--plasma-notification-content-font-letter-spacing);-moz-letter-spacing:var(--plasma-notification-content-font-letter-spacing);-ms-letter-spacing:var(--plasma-notification-content-font-letter-spacing);letter-spacing:var(--plasma-notification-content-font-letter-spacing);line-height:var(--plasma-notification-content-font-line-height);overflow-wrap:break-word;-webkit-hyphens:auto;-moz-hyphens:auto;-ms-hyphens:auto;hyphens:auto;color:var(--plasma-notification-content-color);}
42
- .Notification_styles_7h8hp0_s18m0x6v__2b784e15{margin-top:1rem;opacity:1;}.Notification_styles_7h8hp0_s18m0x6v__2b784e15.Notification_styles_7h8hp0_s18m0x6v__2b784e15.Notification_styles_7h8hp0_notificationItemOpened__2b784e15{-webkit-animation:0.4s Notification_styles_7h8hp0_showAnimationS18m0x6v__2b784e15 ease-out;animation:0.4s Notification_styles_7h8hp0_showAnimationS18m0x6v__2b784e15 ease-out;}.Notification_styles_7h8hp0_s18m0x6v__2b784e15.Notification_styles_7h8hp0_s18m0x6v__2b784e15.Notification_styles_7h8hp0_notificationItemHidden__2b784e15{-webkit-animation:0.4s Notification_styles_7h8hp0_hideAnimationS18m0x6v__2b784e15 ease-out;animation:0.4s Notification_styles_7h8hp0_hideAnimationS18m0x6v__2b784e15 ease-out;}@-webkit-keyframes Notification_styles_7h8hp0_showAnimationS18m0x6v__2b784e15{0%{-webkit-transform:translateX(100%);-ms-transform:translateX(100%);transform:translateX(100%);opacity:0;}100%{-webkit-transform:translateX(0);-ms-transform:translateX(0);transform:translateX(0);opacity:1;}}@keyframes Notification_styles_7h8hp0_showAnimationS18m0x6v__2b784e15{0%{-webkit-transform:translateX(100%);-ms-transform:translateX(100%);transform:translateX(100%);opacity:0;}100%{-webkit-transform:translateX(0);-ms-transform:translateX(0);transform:translateX(0);opacity:1;}}@-webkit-keyframes Notification_styles_7h8hp0_hideAnimationS18m0x6v__2b784e15{0%{-webkit-transform:translateX(0);-ms-transform:translateX(0);transform:translateX(0);opacity:1;}100%{-webkit-transform:translateX(100%);-ms-transform:translateX(100%);transform:translateX(100%);opacity:0;}}@keyframes Notification_styles_7h8hp0_hideAnimationS18m0x6v__2b784e15{0%{-webkit-transform:translateX(0);-ms-transform:translateX(0);transform:translateX(0);opacity:1;}100%{-webkit-transform:translateX(100%);-ms-transform:translateX(100%);transform:translateX(100%);opacity:0;}}
43
- .Notification_styles_7h8hp0_sfe5ql2__2b784e15{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-flex-direction:column-reverse;-ms-flex-direction:column-reverse;flex-direction:column-reverse;box-sizing:border-box;padding:0 1.5rem 1.5rem;max-height:100%;-webkit-align-items:flex-end;-webkit-box-align:flex-end;-ms-flex-align:flex-end;align-items:flex-end;}
33
+ .Notification_styles_1cf2gwd_sb12p__3923b472{width:-webkit-fit-content;width:-moz-fit-content;width:fit-content;}
34
+ .Notification_styles_1cf2gwd_crvd7hm__3923b472{position:absolute;width:1.5rem;height:1.5rem;color:var(--plasma-notification-close-icon-color);}.Notification_styles_1cf2gwd_crvd7hm__3923b472:hover{color:var(--plasma-notification-close-icon-color-on-hover);}.Notification_styles_1cf2gwd_crvd7hm__3923b472.Notification_styles_1cf2gwd_notificationLayoutHorizontal__3923b472{position:relative;}
35
+ .Notification_styles_1cf2gwd_wg1ga5v__3923b472{position:relative;box-sizing:border-box;background:var(--plasma-notification-backgorund);border-radius:var(--plasma-notification-border-radius);}.Notification_styles_1cf2gwd_wg1ga5v__3923b472.Notification_styles_1cf2gwd_notificationLayoutHorizontal__3923b472{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-align-items:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;gap:var(--plasma-notification-horizontal-layout-gap);}
36
+ .Notification_styles_1cf2gwd_b1amsn8a__3923b472{margin-top:var(--plasma-notification-buttons-margin-top);margin-left:var(--b1amsn8a-0);}.Notification_styles_1cf2gwd_b1amsn8a__3923b472.Notification_styles_1cf2gwd_notificationLayoutHorizontal__3923b472{margin-top:unset;margin-left:unset;}
37
+ .Notification_styles_1cf2gwd_i14raqr9__3923b472{width:var(--plasma-notification-content-left-icon-size);height:var(--plasma-notification-content-left-icon-size);margin-right:var(--i14raqr9-0);margin-bottom:var(--i14raqr9-1);}.Notification_styles_1cf2gwd_i14raqr9__3923b472.Notification_styles_1cf2gwd_notificationLayoutHorizontal__3923b472{margin-right:var(--plasma-notification-horizontal-layout-left-icon-margin);margin-bottom:unset;}
38
+ .Notification_styles_1cf2gwd_c157peez__3923b472{display:var(--c157peez-0);padding-top:var(--c157peez-1);}.Notification_styles_1cf2gwd_c157peez__3923b472.Notification_styles_1cf2gwd_notificationLayoutHorizontal__3923b472{padding:unset;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-align-items:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-flex:1;-webkit-flex-grow:1;-ms-flex-positive:1;flex-grow:1;}
39
+ .Notification_styles_1cf2gwd_t1vmb0f2__3923b472{padding:var(--plasma-notification-textbox-padding-top) var(--plasma-notification-textbox-padding-right) var(--plasma-notification-textbox-padding-bottom) var(--plasma-notification-textbox-padding-left);padding-top:var(--t1vmb0f2-0);padding-right:var(--t1vmb0f2-1);display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-flex-direction:column;-ms-flex-direction:column;flex-direction:column;row-gap:var(--plasma-notification-textbox-gap);word-break:break-word;}.Notification_styles_1cf2gwd_t1vmb0f2__3923b472.Notification_styles_1cf2gwd_notificationLayoutHorizontal__3923b472{padding:unset;}
40
+ .Notification_styles_1cf2gwd_s1k4e58v__3923b472{font-family:var(--plasma-notification-title-font-family);font-size:var(--plasma-notification-title-font-size);font-style:var(--plasma-notification-title-font-style);font-weight:var(--plasma-notification-title-font-weight);-webkit-letter-spacing:var(--plasma-notification-title-font-letter-spacing);-moz-letter-spacing:var(--plasma-notification-title-font-letter-spacing);-ms-letter-spacing:var(--plasma-notification-title-font-letter-spacing);letter-spacing:var(--plasma-notification-title-font-letter-spacing);line-height:var(--plasma-notification-title-font-line-height);overflow-wrap:break-word;-webkit-hyphens:auto;-moz-hyphens:auto;-ms-hyphens:auto;hyphens:auto;}
41
+ .Notification_styles_1cf2gwd_s92kmpm__3923b472{font-family:var(--plasma-notification-content-font-family);font-size:var(--plasma-notification-content-font-size);font-style:var(--plasma-notification-content-font-style);font-weight:var(--plasma-notification-content-font-weight);-webkit-letter-spacing:var(--plasma-notification-content-font-letter-spacing);-moz-letter-spacing:var(--plasma-notification-content-font-letter-spacing);-ms-letter-spacing:var(--plasma-notification-content-font-letter-spacing);letter-spacing:var(--plasma-notification-content-font-letter-spacing);line-height:var(--plasma-notification-content-font-line-height);overflow-wrap:break-word;-webkit-hyphens:auto;-moz-hyphens:auto;-ms-hyphens:auto;hyphens:auto;color:var(--plasma-notification-content-color);}
42
+ .Notification_styles_1cf2gwd_s18m0x6v__3923b472{margin-top:1rem;opacity:1;}.Notification_styles_1cf2gwd_s18m0x6v__3923b472.Notification_styles_1cf2gwd_s18m0x6v__3923b472.Notification_styles_1cf2gwd_notificationItemOpened__3923b472{-webkit-animation:0.4s Notification_styles_1cf2gwd_showAnimationS18m0x6v__3923b472 ease-out;animation:0.4s Notification_styles_1cf2gwd_showAnimationS18m0x6v__3923b472 ease-out;}.Notification_styles_1cf2gwd_s18m0x6v__3923b472.Notification_styles_1cf2gwd_s18m0x6v__3923b472.Notification_styles_1cf2gwd_notificationItemOpened__3923b472.Notification_styles_1cf2gwd_notificationLeftToRightAnimation__3923b472{-webkit-animation:0.4s Notification_styles_1cf2gwd_showLeftToRightAnimationS18m0x6v__3923b472 ease-out;animation:0.4s Notification_styles_1cf2gwd_showLeftToRightAnimationS18m0x6v__3923b472 ease-out;}.Notification_styles_1cf2gwd_s18m0x6v__3923b472.Notification_styles_1cf2gwd_s18m0x6v__3923b472.Notification_styles_1cf2gwd_notificationItemHidden__3923b472{-webkit-animation:0.4s Notification_styles_1cf2gwd_hideAnimationS18m0x6v__3923b472 ease-out;animation:0.4s Notification_styles_1cf2gwd_hideAnimationS18m0x6v__3923b472 ease-out;}.Notification_styles_1cf2gwd_s18m0x6v__3923b472.Notification_styles_1cf2gwd_s18m0x6v__3923b472.Notification_styles_1cf2gwd_notificationItemHidden__3923b472.Notification_styles_1cf2gwd_notificationLeftToRightAnimation__3923b472{-webkit-animation:0.4s Notification_styles_1cf2gwd_hideLeftToRightAnimationS18m0x6v__3923b472 ease-out;animation:0.4s Notification_styles_1cf2gwd_hideLeftToRightAnimationS18m0x6v__3923b472 ease-out;}@-webkit-keyframes Notification_styles_1cf2gwd_showLeftToRightAnimationS18m0x6v__3923b472{0%{-webkit-transform:translateX(-100%);-ms-transform:translateX(-100%);transform:translateX(-100%);opacity:0;}100%{-webkit-transform:translateX(0);-ms-transform:translateX(0);transform:translateX(0);opacity:1;}}@keyframes Notification_styles_1cf2gwd_showLeftToRightAnimationS18m0x6v__3923b472{0%{-webkit-transform:translateX(-100%);-ms-transform:translateX(-100%);transform:translateX(-100%);opacity:0;}100%{-webkit-transform:translateX(0);-ms-transform:translateX(0);transform:translateX(0);opacity:1;}}@-webkit-keyframes Notification_styles_1cf2gwd_hideLeftToRightAnimationS18m0x6v__3923b472{0%{-webkit-transform:translateX(0);-ms-transform:translateX(0);transform:translateX(0);opacity:1;}100%{-webkit-transform:translateX(-100%);-ms-transform:translateX(-100%);transform:translateX(-100%);opacity:0;}}@keyframes Notification_styles_1cf2gwd_hideLeftToRightAnimationS18m0x6v__3923b472{0%{-webkit-transform:translateX(0);-ms-transform:translateX(0);transform:translateX(0);opacity:1;}100%{-webkit-transform:translateX(-100%);-ms-transform:translateX(-100%);transform:translateX(-100%);opacity:0;}}@-webkit-keyframes Notification_styles_1cf2gwd_showAnimationS18m0x6v__3923b472{0%{-webkit-transform:translateX(100%);-ms-transform:translateX(100%);transform:translateX(100%);opacity:0;}100%{-webkit-transform:translateX(0);-ms-transform:translateX(0);transform:translateX(0);opacity:1;}}@keyframes Notification_styles_1cf2gwd_showAnimationS18m0x6v__3923b472{0%{-webkit-transform:translateX(100%);-ms-transform:translateX(100%);transform:translateX(100%);opacity:0;}100%{-webkit-transform:translateX(0);-ms-transform:translateX(0);transform:translateX(0);opacity:1;}}@-webkit-keyframes Notification_styles_1cf2gwd_hideAnimationS18m0x6v__3923b472{0%{-webkit-transform:translateX(0);-ms-transform:translateX(0);transform:translateX(0);opacity:1;}100%{-webkit-transform:translateX(100%);-ms-transform:translateX(100%);transform:translateX(100%);opacity:0;}}@keyframes Notification_styles_1cf2gwd_hideAnimationS18m0x6v__3923b472{0%{-webkit-transform:translateX(0);-ms-transform:translateX(0);transform:translateX(0);opacity:1;}100%{-webkit-transform:translateX(100%);-ms-transform:translateX(100%);transform:translateX(100%);opacity:0;}}
43
+ .Notification_styles_1cf2gwd_sfe5ql2__3923b472{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-flex-direction:column-reverse;-ms-flex-direction:column-reverse;flex-direction:column-reverse;box-sizing:border-box;padding:0 1.5rem 1.5rem;max-height:100%;-webkit-align-items:flex-end;-webkit-box-align:flex-end;-ms-flex-align:flex-end;align-items:flex-end;}
@@ -1,14 +1,13 @@
1
- import './Notification.styles_7h8hp0.css';
1
+ import './Notification.styles_1cf2gwd.css';
2
2
  'use strict';
3
3
 
4
4
  Object.defineProperty(exports, '__esModule', { value: true });
5
5
 
6
6
  var react = require('@linaria/react');
7
- var Button$1 = require('../Button/Button.js');
8
- require('@linaria/core');
9
- var common = require('../../engines/common.js');
10
7
  var Notification_tokens = require('./Notification.tokens.js');
11
8
  var Notification_types = require('./Notification.types.js');
9
+ var common = require('../../engines/common.js');
10
+ var Button$1 = require('../Button/Button.js');
12
11
 
13
12
  var StyledNotification = "sb12p";
14
13
  var mergedButtonConfig = /*#__PURE__*/common.mergeConfig(Button$1.buttonConfig);
@@ -1 +1 @@
1
- {"version":3,"file":"Notification.styles.js","sources":["../../../src/components/Notification/Notification.styles.ts"],"sourcesContent":["import { css } from '@linaria/core';\nimport { styled } from '@linaria/react';\n\nimport { applyHyphens } from '../../mixins';\nimport { buttonConfig } from '../Button';\nimport { component, mergeConfig } from '../../engines';\n\nimport { classes, tokens } from './Notification.tokens';\nimport { CloseIconType, IconPlacementType, placements } from './Notification.types';\n\nexport const StyledNotification = css`\n width: fit-content;\n`;\n\nconst mergedButtonConfig = mergeConfig(buttonConfig);\nconst Button = component(mergedButtonConfig);\n\nexport const CloseIconWrapper = styled(Button)`\n position: absolute;\n width: 1.5rem;\n height: 1.5rem;\n\n color: var(${tokens.closeIconColor});\n\n :hover {\n color: var(${tokens.closeIconColorOnHover});\n }\n\n &.${classes.horizontal} {\n position: relative;\n }\n`;\n\nexport const Wrapper = styled.div`\n position: relative;\n box-sizing: border-box;\n\n background: var(${tokens.background});\n border-radius: var(${tokens.borderRadius});\n\n &.${classes.horizontal} {\n display: flex;\n align-items: center;\n gap: var(${tokens.horizontalLayoutGap});\n }\n`;\n\nexport const ButtonsWrapper = styled.div<IconPlacementType>`\n margin-top: var(${tokens.buttonsMarginTop});\n margin-left: ${({ iconPlacement }) =>\n iconPlacement === placements.left ? `var(${tokens.buttonsMarginLeft})` : 'unset'};\n\n &.${classes.horizontal} {\n margin-top: unset;\n margin-left: unset;\n }\n`;\n\nexport const IconWrapper = styled.div<IconPlacementType>`\n width: var(${tokens.contentLeftIconSize});\n height: var(${tokens.contentLeftIconSize});\n\n margin-right: ${({ iconPlacement }) =>\n iconPlacement === placements.left ? `var(${tokens.contentLeftIconMargin})` : 'unset'};\n margin-bottom: ${({ iconPlacement }) =>\n iconPlacement === placements.top ? `var(${tokens.contentTopIconMargin})` : 'unset'};\n\n &.${classes.horizontal} {\n margin-right: var(${tokens.horizontalLayoutLeftIconMargin});\n margin-bottom: unset;\n }\n`;\n\nexport const ContentBox = styled.div<IconPlacementType>`\n // TODO: переделать, когда научимся работать с токенами при пересечнии свойств\n // issue #909\n display: ${({ iconPlacement }) => (iconPlacement === placements.left ? 'flex' : 'block')};\n\n padding-top: ${({ iconPlacement }) =>\n iconPlacement ? `var(${tokens.contentPaddingTop})` : `var(${tokens.contentPaddingTopWithoutIcon})`};\n\n &.${classes.horizontal} {\n padding: unset;\n display: flex;\n align-items: center;\n flex-grow: 1;\n }\n`;\n\nexport const TextBox = styled.div<CloseIconType & IconPlacementType>`\n padding: var(${tokens.textboxPaddingTop}) var(${tokens.textboxPaddingRight}) var(${tokens.textboxPaddingBottom})\n var(${tokens.textboxPaddingLeft});\n\n padding-top: ${({ iconPlacement }) =>\n !iconPlacement || iconPlacement === placements.top\n ? `var(${tokens.textboxPaddingTopWithTopIcon})`\n : `var(${tokens.textboxPaddingTop})`};\n padding-right: ${({ showCloseIcon, iconPlacement }) =>\n showCloseIcon && iconPlacement !== placements.top\n ? `var(${tokens.textboxPaddingRightWithCloseIcon})`\n : `var(${tokens.textboxPaddingRight})`};\n\n display: flex;\n flex-direction: column;\n row-gap: var(${tokens.textboxGap});\n word-break: break-word;\n\n &.${classes.horizontal} {\n padding: unset;\n }\n`;\n\nexport const StyledTitle = styled.div`\n font-family: var(${tokens.titleFontFamily});\n font-size: var(${tokens.titleFontSize});\n font-style: var(${tokens.titleFontStyle});\n font-weight: var(${tokens.titleFontWeight});\n letter-spacing: var(${tokens.titleFontLetterSpacing});\n line-height: var(${tokens.titleFontLineHeight});\n ${String(applyHyphens)};\n`;\n\nexport const StyledContent = styled.div`\n font-family: var(${tokens.contentFontFamily});\n font-size: var(${tokens.contentFontSize});\n font-style: var(${tokens.contentFontStyle});\n font-weight: var(${tokens.contentFontWeight});\n letter-spacing: var(${tokens.contentFontLetterSpacing});\n line-height: var(${tokens.contentFontLineHeight});\n ${String(applyHyphens)};\n\n color: var(${tokens.contentColor});\n`;\n\nexport const StyledItemWrapper = styled.div<{ isHidden: boolean }>`\n margin-top: 1rem;\n opacity: 1;\n\n &&.${classes.notificationItemOpened} {\n animation: 0.4s showAnimation ease-out;\n }\n\n &&.${classes.notificationItemHidden} {\n animation: 0.4s hideAnimation ease-out;\n }\n\n @keyframes showAnimation {\n 0% {\n transform: translateX(100%);\n opacity: 0;\n }\n\n 100% {\n transform: translateX(0);\n opacity: 1;\n }\n }\n\n @keyframes hideAnimation {\n 0% {\n transform: translateX(0);\n opacity: 1;\n }\n\n 100% {\n transform: translateX(100%);\n opacity: 0;\n }\n }\n`;\n\nexport const StyledRoot = styled.div`\n display: flex;\n flex-direction: column-reverse;\n box-sizing: border-box;\n padding: 0 1.5rem 1.5rem;\n max-height: 100%;\n align-items: flex-end;\n`;\n"],"names":["StyledNotification","mergedButtonConfig","mergeConfig","buttonConfig","Button","component","_exp","CloseIconWrapper","styled","name","class","propsAsIs","Wrapper","_exp10","_ref","iconPlacement","placements","left","concat","tokens","buttonsMarginLeft","ButtonsWrapper","vars","_exp14","_ref2","contentLeftIconMargin","_exp15","_ref3","top","contentTopIconMargin","IconWrapper","_exp18","_ref4","_exp19","_ref5","contentPaddingTop","contentPaddingTopWithoutIcon","ContentBox","_exp25","_ref6","textboxPaddingTopWithTopIcon","textboxPaddingTop","_exp26","_ref7","showCloseIcon","textboxPaddingRightWithCloseIcon","textboxPaddingRight","TextBox","StyledTitle","StyledContent","StyledItemWrapper","StyledRoot"],"mappings":";;;;;;;;;;;AAUO,IAAMA,kBAAkB,GAE9B,QAAA;AAED,IAAMC,kBAAkB,gBAAGC,kBAAW,CAACC,qBAAY,CAAC,CAAA;AACpD,IAAMC,MAAM,gBAAGC,gBAAS,CAACJ,kBAAkB,CAAC,CAAA;AAAC,IAAAK,IAAA,GAd3BA,SAc2BA,IAAAA,GAAA;AAAA,EAAA,OAENF,MAAM,CAAA;AAA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ria/core';\nimport { styled } from '@linaria/react';\n\nimport { applyHyphens } from '../../mixins';\nimport { buttonConfig } from '../Button';\nimport { component, mergeConfig } from '../../engines';\n\nimport { classes, tokens } from './Notification.tokens';\nimport { CloseIconType, IconPlacementType, placements } from './Notification.types';\n\nexport const StyledNotification = css`\n width: fit-content;\n`;\n\nconst mergedButtonConfig = mergeConfig(buttonConfig);\nconst Button = component(mergedButtonConfig);\n\nexport const CloseIconWrapper = styled(Button)`\n position: absolute;\n width: 1.5rem;\n height: 1.5rem;\n\n color: var(${tokens.closeIconColor});\n\n :hover {\n color: var(${tokens.closeIconColorOnHover});\n }\n\n &.${classes.horizontal} {\n position: relative;\n }\n`;\n\nexport const Wrapper = styled.div`\n position: relative;\n box-sizing: border-box;\n\n background: var(${tokens.background});\n border-radius: var(${tokens.borderRadius});\n\n &.${classes.horizontal} {\n display: flex;\n align-items: center;\n gap: var(${tokens.horizontalLayoutGap});\n }\n`;\n\nexport const ButtonsWrapper = styled.div<IconPlacementType>`\n margin-top: var(${tokens.buttonsMarginTop});\n margin-left: ${({ iconPlacement }) =>\n iconPlacement === placements.left ? `var(${tokens.buttonsMarginLeft})` : 'unset'};\n\n &.${classes.horizontal} {\n margin-top: unset;\n margin-left: unset;\n }\n`;\n\nexport const IconWrapper = styled.div<IconPlacementType>`\n width: var(${tokens.contentLeftIconSize});\n height: var(${tokens.contentLeftIconSize});\n\n margin-right: ${({ iconPlacement }) =>\n iconPlacement === placements.left ? `var(${tokens.contentLeftIconMargin})` : 'unset'};\n margin-bottom: ${({ iconPlacement }) =>\n iconPlacement === placements.top ? `var(${tokens.contentTopIconMargin})` : 'unset'};\n\n &.${classes.horizontal} {\n margin-right: var(${tokens.horizontalLayoutLeftIconMargin});\n margin-bottom: unset;\n }\n`;\n\nexport const ContentBox = styled.div<IconPlacementType>`\n // TODO: переделать, когда научимся работать с токенами при пересечнии свойств\n // issue #909\n display: ${({ iconPlacement }) => (iconPlacement === placements.left ? 'flex' : 'block')};\n\n padding-top: ${({ iconPlacement }) =>\n iconPlacement ? `var(${tokens.contentPaddingTop})` : `var(${tokens.contentPaddingTopWithoutIcon})`};\n\n &.${classes.horizontal} {\n padding: unset;\n display: flex;\n align-items: center;\n flex-grow: 1;\n }\n`;\n\nexport const TextBox = styled.div<CloseIconType & IconPlacementType>`\n padding: var(${tokens.textboxPaddingTop}) var(${tokens.textboxPaddingRight}) var(${tokens.textboxPaddingBottom})\n var(${tokens.textboxPaddingLeft});\n\n padding-top: ${({ iconPlacement }) =>\n !iconPlacement || iconPlacement === placements.top\n ? `var(${tokens.textboxPaddingTopWithTopIcon})`\n : `var(${tokens.textboxPaddingTop})`};\n padding-right: ${({ showCloseIcon, iconPlacement }) =>\n showCloseIcon && iconPlacement !== placements.top\n ? `var(${tokens.textboxPaddingRightWithCloseIcon})`\n : `var(${tokens.textboxPaddingRight})`};\n\n display: flex;\n flex-direction: column;\n row-gap: var(${tokens.textboxGap});\n word-break: break-word;\n\n &.${classes.horizontal} {\n padding: unset;\n }\n`;\n\nexport const StyledTitle = styled.div`\n font-family: var(${tokens.titleFontFamily});\n font-size: var(${tokens.titleFontSize});\n font-style: var(${tokens.titleFontStyle});\n font-weight: var(${tokens.titleFontWeight});\n letter-spacing: var(${tokens.titleFontLetterSpacing});\n line-height: var(${tokens.titleFontLineHeight});\n ${String(applyHyphens)};\n`;\n\nexport const StyledContent = styled.div`\n font-family: var(${tokens.contentFontFamily});\n font-size: var(${tokens.contentFontSize});\n font-style: var(${tokens.contentFontStyle});\n font-weight: var(${tokens.contentFontWeight});\n letter-spacing: var(${tokens.contentFontLetterSpacing});\n line-height: var(${tokens.contentFontLineHeight});\n ${String(applyHyphens)};\n\n color: var(${tokens.contentColor});\n`;\n\nexport const StyledItemWrapper = styled.div<{ isHidden: boolean }>`\n margin-top: 1rem;\n opacity: 1;\n\n &&.${classes.notificationItemOpened} {\n animation: 0.4s showAnimation ease-out;\n\n &.${classes.notificationLeftToRightAnimation} {\n animation: 0.4s showLeftToRightAnimation ease-out;\n }\n }\n\n &&.${classes.notificationItemHidden} {\n animation: 0.4s hideAnimation ease-out;\n\n &.${classes.notificationLeftToRightAnimation} {\n animation: 0.4s hideLeftToRightAnimation ease-out;\n }\n }\n\n @keyframes showLeftToRightAnimation {\n 0% {\n transform: translateX(-100%);\n opacity: 0;\n }\n\n 100% {\n transform: translateX(0);\n opacity: 1;\n }\n }\n\n @keyframes hideLeftToRightAnimation {\n 0% {\n transform: translateX(0);\n opacity: 1;\n }\n\n 100% {\n transform: translateX(-100%);\n opacity: 0;\n }\n }\n\n @keyframes showAnimation {\n 0% {\n transform: translateX(100%);\n opacity: 0;\n }\n\n 100% {\n transform: translateX(0);\n opacity: 1;\n }\n }\n\n @keyframes hideAnimation {\n 0% {\n transform: translateX(0);\n opacity: 1;\n }\n\n 100% {\n transform: translateX(100%);\n opacity: 0;\n }\n }\n`;\n\nexport const StyledRoot = styled.div`\n display: flex;\n flex-direction: column-reverse;\n box-sizing: border-box;\n padding: 0 1.5rem 1.5rem;\n max-height: 100%;\n align-items: flex-end;\n`;\n"],"names":["StyledNotification","mergedButtonConfig","mergeConfig","buttonConfig","Button","component","_exp","CloseIconWrapper","styled","name","class","propsAsIs","Wrapper","_exp10","_ref","iconPlacement","placements","left","concat","tokens","buttonsMarginLeft","ButtonsWrapper","vars","_exp14","_ref2","contentLeftIconMargin","_exp15","_ref3","top","contentTopIconMargin","IconWrapper","_exp18","_ref4","_exp19","_ref5","contentPaddingTop","contentPaddingTopWithoutIcon","ContentBox","_exp25","_ref6","textboxPaddingTopWithTopIcon","textboxPaddingTop","_exp26","_ref7","showCloseIcon","textboxPaddingRightWithCloseIcon","textboxPaddingRight","TextBox","StyledTitle","StyledContent","StyledItemWrapper","StyledRoot"],"mappings":";;;;;;;;;;AAUO,IAAMA,kBAAkB,GAE9B,QAAA;AAED,IAAMC,kBAAkB,gBAAGC,kBAAW,CAACC,qBAAY,CAAC,CAAA;AACpD,IAAMC,MAAM,gBAAGC,gBAAS,CAAC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CAO/B;;;;;;;;;;;;;;"}
@@ -7,5 +7,5 @@
7
7
  .t1vmb0f2{padding:var(--plasma-notification-textbox-padding-top) var(--plasma-notification-textbox-padding-right) var(--plasma-notification-textbox-padding-bottom) var(--plasma-notification-textbox-padding-left);padding-top:var(--t1vmb0f2-0);padding-right:var(--t1vmb0f2-1);display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-flex-direction:column;-ms-flex-direction:column;flex-direction:column;row-gap:var(--plasma-notification-textbox-gap);word-break:break-word;}.t1vmb0f2.notification-layout-horizontal{padding:unset;}
8
8
  .s1k4e58v{font-family:var(--plasma-notification-title-font-family);font-size:var(--plasma-notification-title-font-size);font-style:var(--plasma-notification-title-font-style);font-weight:var(--plasma-notification-title-font-weight);-webkit-letter-spacing:var(--plasma-notification-title-font-letter-spacing);-moz-letter-spacing:var(--plasma-notification-title-font-letter-spacing);-ms-letter-spacing:var(--plasma-notification-title-font-letter-spacing);letter-spacing:var(--plasma-notification-title-font-letter-spacing);line-height:var(--plasma-notification-title-font-line-height);overflow-wrap:break-word;-webkit-hyphens:auto;-moz-hyphens:auto;-ms-hyphens:auto;hyphens:auto;}
9
9
  .s92kmpm{font-family:var(--plasma-notification-content-font-family);font-size:var(--plasma-notification-content-font-size);font-style:var(--plasma-notification-content-font-style);font-weight:var(--plasma-notification-content-font-weight);-webkit-letter-spacing:var(--plasma-notification-content-font-letter-spacing);-moz-letter-spacing:var(--plasma-notification-content-font-letter-spacing);-ms-letter-spacing:var(--plasma-notification-content-font-letter-spacing);letter-spacing:var(--plasma-notification-content-font-letter-spacing);line-height:var(--plasma-notification-content-font-line-height);overflow-wrap:break-word;-webkit-hyphens:auto;-moz-hyphens:auto;-ms-hyphens:auto;hyphens:auto;color:var(--plasma-notification-content-color);}
10
- .s18m0x6v{margin-top:1rem;opacity:1;}.s18m0x6v.s18m0x6v.notification-item-opened{-webkit-animation:0.4s showAnimation-s18m0x6v ease-out;animation:0.4s showAnimation-s18m0x6v ease-out;}.s18m0x6v.s18m0x6v.notification-item-hidden{-webkit-animation:0.4s hideAnimation-s18m0x6v ease-out;animation:0.4s hideAnimation-s18m0x6v ease-out;}@-webkit-keyframes showAnimation-s18m0x6v{0%{-webkit-transform:translateX(100%);-ms-transform:translateX(100%);transform:translateX(100%);opacity:0;}100%{-webkit-transform:translateX(0);-ms-transform:translateX(0);transform:translateX(0);opacity:1;}}@keyframes showAnimation-s18m0x6v{0%{-webkit-transform:translateX(100%);-ms-transform:translateX(100%);transform:translateX(100%);opacity:0;}100%{-webkit-transform:translateX(0);-ms-transform:translateX(0);transform:translateX(0);opacity:1;}}@-webkit-keyframes hideAnimation-s18m0x6v{0%{-webkit-transform:translateX(0);-ms-transform:translateX(0);transform:translateX(0);opacity:1;}100%{-webkit-transform:translateX(100%);-ms-transform:translateX(100%);transform:translateX(100%);opacity:0;}}@keyframes hideAnimation-s18m0x6v{0%{-webkit-transform:translateX(0);-ms-transform:translateX(0);transform:translateX(0);opacity:1;}100%{-webkit-transform:translateX(100%);-ms-transform:translateX(100%);transform:translateX(100%);opacity:0;}}
10
+ .s18m0x6v{margin-top:1rem;opacity:1;}.s18m0x6v.s18m0x6v.notification-item-opened{-webkit-animation:0.4s showAnimation-s18m0x6v ease-out;animation:0.4s showAnimation-s18m0x6v ease-out;}.s18m0x6v.s18m0x6v.notification-item-opened.notification-left-to-right-animation{-webkit-animation:0.4s showLeftToRightAnimation-s18m0x6v ease-out;animation:0.4s showLeftToRightAnimation-s18m0x6v ease-out;}.s18m0x6v.s18m0x6v.notification-item-hidden{-webkit-animation:0.4s hideAnimation-s18m0x6v ease-out;animation:0.4s hideAnimation-s18m0x6v ease-out;}.s18m0x6v.s18m0x6v.notification-item-hidden.notification-left-to-right-animation{-webkit-animation:0.4s hideLeftToRightAnimation-s18m0x6v ease-out;animation:0.4s hideLeftToRightAnimation-s18m0x6v ease-out;}@-webkit-keyframes showLeftToRightAnimation-s18m0x6v{0%{-webkit-transform:translateX(-100%);-ms-transform:translateX(-100%);transform:translateX(-100%);opacity:0;}100%{-webkit-transform:translateX(0);-ms-transform:translateX(0);transform:translateX(0);opacity:1;}}@keyframes showLeftToRightAnimation-s18m0x6v{0%{-webkit-transform:translateX(-100%);-ms-transform:translateX(-100%);transform:translateX(-100%);opacity:0;}100%{-webkit-transform:translateX(0);-ms-transform:translateX(0);transform:translateX(0);opacity:1;}}@-webkit-keyframes hideLeftToRightAnimation-s18m0x6v{0%{-webkit-transform:translateX(0);-ms-transform:translateX(0);transform:translateX(0);opacity:1;}100%{-webkit-transform:translateX(-100%);-ms-transform:translateX(-100%);transform:translateX(-100%);opacity:0;}}@keyframes hideLeftToRightAnimation-s18m0x6v{0%{-webkit-transform:translateX(0);-ms-transform:translateX(0);transform:translateX(0);opacity:1;}100%{-webkit-transform:translateX(-100%);-ms-transform:translateX(-100%);transform:translateX(-100%);opacity:0;}}@-webkit-keyframes showAnimation-s18m0x6v{0%{-webkit-transform:translateX(100%);-ms-transform:translateX(100%);transform:translateX(100%);opacity:0;}100%{-webkit-transform:translateX(0);-ms-transform:translateX(0);transform:translateX(0);opacity:1;}}@keyframes showAnimation-s18m0x6v{0%{-webkit-transform:translateX(100%);-ms-transform:translateX(100%);transform:translateX(100%);opacity:0;}100%{-webkit-transform:translateX(0);-ms-transform:translateX(0);transform:translateX(0);opacity:1;}}@-webkit-keyframes hideAnimation-s18m0x6v{0%{-webkit-transform:translateX(0);-ms-transform:translateX(0);transform:translateX(0);opacity:1;}100%{-webkit-transform:translateX(100%);-ms-transform:translateX(100%);transform:translateX(100%);opacity:0;}}@keyframes hideAnimation-s18m0x6v{0%{-webkit-transform:translateX(0);-ms-transform:translateX(0);transform:translateX(0);opacity:1;}100%{-webkit-transform:translateX(100%);-ms-transform:translateX(100%);transform:translateX(100%);opacity:0;}}
11
11
  .sfe5ql2{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-flex-direction:column-reverse;-ms-flex-direction:column-reverse;flex-direction:column-reverse;box-sizing:border-box;padding:0 1.5rem 1.5rem;max-height:100%;-webkit-align-items:flex-end;-webkit-box-align:flex-end;-ms-flex-align:flex-end;align-items:flex-end;}
@@ -17,7 +17,8 @@ var classes = {
17
17
  withoutIcon: 'notification-without-icon',
18
18
  withoutCloseIcon: 'notification-without-close-icon',
19
19
  notificationItemOpened: 'notification-item-opened',
20
- notificationItemHidden: 'notification-item-hidden'
20
+ notificationItemHidden: 'notification-item-hidden',
21
+ notificationLeftToRightAnimation: 'notification-left-to-right-animation'
21
22
  };
22
23
  var tokens = {
23
24
  background: '--plasma-notification-backgorund',
@@ -1 +1 @@
1
- {"version":3,"file":"Notification.tokens.js","sources":["../../../src/components/Notification/Notification.tokens.ts"],"sourcesContent":["export const classes = {\n textbox: 'notificaiton-textbox',\n contentBox: 'notificaiton-content-box',\n title: 'notification-title',\n text: 'notification-text',\n wrapper: 'notification-wrapper',\n icon: 'notification-icon',\n closeIcon: 'notification-close-icon',\n buttonsWrapper: 'notification-buttons-wrapper',\n\n horizontal: 'notification-layout-horizontal',\n vertical: 'notification-layout-vertical',\n oneLine: 'notification-one-line-textbox',\n withoutIcon: 'notification-without-icon',\n withoutCloseIcon: 'notification-without-close-icon',\n\n notificationItemOpened: 'notification-item-opened',\n notificationItemHidden: 'notification-item-hidden',\n};\n\nexport const tokens = {\n background: '--plasma-notification-backgorund',\n padding: '--plasma-notification-padding',\n horizontalLayoutPadding: '--plasma-notification-horizontal-layout-padding',\n width: '--plasma-notification-width',\n borderRadius: '--plasma-notification-border-radius',\n\n paddingOneLineTextbox: '--plasma-notification-padding-one-line-textbox',\n horizontalLayoutGap: '--plasma-notification-horizontal-layout-gap',\n horizontalLayoutLeftIconMargin: '--plasma-notification-horizontal-layout-left-icon-margin',\n horizontalLayoutRightPaddingWithoutCloseIcon:\n '--plasma-notification-horizontal-layout-right-padding-without-close-icon',\n\n contentPaddingTop: '--plasma-notification-content-padding-top',\n contentPaddingRight: '--plasma-notification-content-padding-right',\n contentPaddingBottom: '--plasma-notification-content-padding-bottom',\n contentPaddingLeft: '--plasma-notification-content-padding-left',\n\n contentPaddingTopWithoutIcon: '--plasma-notification-content-padding-top-without-icon',\n\n textboxPaddingTop: '--plasma-notification-textbox-padding-top',\n textboxPaddingRight: '--plasma-notification-textbox-padding-right',\n textboxPaddingBottom: '--plasma-notification-textbox-padding-bottom',\n textboxPaddingLeft: '--plasma-notification-textbox-padding-left',\n\n textboxPaddingTopWithTopIcon: '--plasma-notification-textbox-padding-top-with-top-icon',\n textboxPaddingRightWithCloseIcon: '--plasma-notification-textbox-padding-right-with-close-icon',\n textboxGap: '--plasma-notification-textbox-gap',\n\n buttonsMarginTop: '--plasma-notification-buttons-margin-top',\n buttonsMarginLeft: '--plasma-notification-buttons-margin-left',\n\n contentLeftIconSize: '--plasma-notification-content-left-icon-size',\n contentLeftIconMargin: '--plasma-notification-content-left-icon-margin',\n contentTopIconMargin: '--plasma-notification-content-top-icon-margin',\n\n contentColor: '--plasma-notification-content-color',\n contentFontFamily: '--plasma-notification-content-font-family',\n contentFontSize: '--plasma-notification-content-font-size',\n contentFontStyle: '--plasma-notification-content-font-style',\n contentFontWeight: '--plasma-notification-content-font-weight',\n contentFontWeightBold: '--plasma-notification-content-font-weight-bold',\n contentFontLetterSpacing: '--plasma-notification-content-font-letter-spacing',\n contentFontLineHeight: '--plasma-notification-content-font-line-height',\n\n titleColor: '--plasma-notification-title-color',\n titleFontFamily: '--plasma-notification-title-font-family',\n titleFontSize: '--plasma-notification-title-font-size',\n titleFontStyle: '--plasma-notification-title-font-style',\n titleFontWeight: '--plasma-notification-title-font-weight',\n titleFontWeightBold: '--plasma-notification-title-font-weight-bold',\n titleFontLetterSpacing: '--plasma-notification-title-font-letter-spacing',\n titleFontLineHeight: '--plasma-notification-title-font-line-height',\n\n closeIconTop: '--plasma-notification-close-icon-top',\n closeIconRight: '--plasma-notification-close-icon-right',\n closeIconColor: '--plasma-notification-close-icon-color',\n closeIconColorOnHover: '--plasma-notification-close-icon-color-on-hover',\n};\n"],"names":["classes","textbox","contentBox","title","text","wrapper","icon","closeIcon","buttonsWrapper","horizontal","vertical","oneLine","withoutIcon","withoutCloseIcon","notificationItemOpened","notificationItemHidden","tokens","background","padding","horizontalLayoutPadding","width","borderRadius","paddingOneLineTextbox","horizontalLayoutGap","horizontalLayoutLeftIconMargin","horizontalLayoutRightPaddingWithoutCloseIcon","contentPaddingTop","contentPaddingRight","contentPaddingBottom","contentPaddingLeft","contentPaddingTopWithoutIcon","textboxPaddingTop","textboxPaddingRight","textboxPaddingBottom","textboxPaddingLeft","textboxPaddingTopWithTopIcon","textboxPaddingRightWithCloseIcon","textboxGap","buttonsMarginTop","buttonsMarginLeft","contentLeftIconSize","contentLeftIconMargin","contentTopIconMargin","contentColor","contentFontFamily","contentFontSize","contentFontStyle","contentFontWeight","contentFontWeightBold","contentFontLetterSpacing","contentFontLineHeight","titleColor","titleFontFamily","titleFontSize","titleFontStyle","titleFontWeight","titleFontWeightBold","titleFontLetterSpacing","titleFontLineHeight","closeIconTop","closeIconRight","closeIconColor","closeIconColorOnHover"],"mappings":";;;;AAAO,IAAMA,OAAO,GAAG;AACnBC,EAAAA,OAAO,EAAE,sBAAsB;AAC/BC,EAAAA,UAAU,EAAE,0BAA0B;AACtCC,EAAAA,KAAK,EAAE,oBAAoB;AAC3BC,EAAAA,IAAI,EAAE,mBAAmB;AACzBC,EAAAA,OAAO,EAAE,sBAAsB;AAC/BC,EAAAA,IAAI,EAAE,mBAAmB;AACzBC,EAAAA,SAAS,EAAE,yBAAyB;AACpCC,EAAAA,cAAc,EAAE,8BAA8B;AAE9CC,EAAAA,UAAU,EAAE,gCAAgC;AAC5CC,EAAAA,QAAQ,EAAE,8BAA8B;AACxCC,EAAAA,OAAO,EAAE,+BAA+B;AACxCC,EAAAA,WAAW,EAAE,2BAA2B;AACxCC,EAAAA,gBAAgB,EAAE,iCAAiC;AAEnDC,EAAAA,sBAAsB,EAAE,0BAA0B;AAClDC,EAAAA,sBAAsB,EAAE,0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E,gDAAgD;AACvEC,EAAAA,wBAAwB,EAAE,mDAAmD;AAC7EC,EAAAA,qBAAqB,EAAE,gDAAgD;AAEvEC,EAAAA,UAAU,EAAE,mCAAmC;AAC/CC,EAAAA,eAAe,EAAE,yCAAyC;AAC1DC,EAAAA,aAAa,EAAE,uCAAuC;AACtDC,EAAAA,cAAc,EAAE,wCAAwC;AACxDC,EAAAA,eAAe,EAAE,yCAAyC;AAC1DC,EAAAA,mBAAmB,EAAE,8CAA8C;AACnEC,EAAAA,sBAAsB,EAAE,iDAAiD;AACzEC,EAAAA,mBAAmB,EAAE,8CAA8C;AAEnEC,EAAAA,YAAY,EAAE,sCAAsC;AACpDC,EAAAA,cAAc,EAAE,wCAAwC;AACxDC,EAAAA,cAAc,EAAE,wCAAwC;AACxDC,EAAAA,qBAAqB,EAAE,iDAAA;AAC3B;;;;;"}
1
+ {"version":3,"file":"Notification.tokens.js","sources":["../../../src/components/Notification/Notification.tokens.ts"],"sourcesContent":["export const classes = {\n textbox: 'notificaiton-textbox',\n contentBox: 'notificaiton-content-box',\n title: 'notification-title',\n text: 'notification-text',\n wrapper: 'notification-wrapper',\n icon: 'notification-icon',\n closeIcon: 'notification-close-icon',\n buttonsWrapper: 'notification-buttons-wrapper',\n\n horizontal: 'notification-layout-horizontal',\n vertical: 'notification-layout-vertical',\n oneLine: 'notification-one-line-textbox',\n withoutIcon: 'notification-without-icon',\n withoutCloseIcon: 'notification-without-close-icon',\n\n notificationItemOpened: 'notification-item-opened',\n notificationItemHidden: 'notification-item-hidden',\n notificationLeftToRightAnimation: 'notification-left-to-right-animation',\n};\n\nexport const tokens = {\n background: '--plasma-notification-backgorund',\n padding: '--plasma-notification-padding',\n horizontalLayoutPadding: '--plasma-notification-horizontal-layout-padding',\n width: '--plasma-notification-width',\n borderRadius: '--plasma-notification-border-radius',\n\n paddingOneLineTextbox: '--plasma-notification-padding-one-line-textbox',\n horizontalLayoutGap: '--plasma-notification-horizontal-layout-gap',\n horizontalLayoutLeftIconMargin: '--plasma-notification-horizontal-layout-left-icon-margin',\n horizontalLayoutRightPaddingWithoutCloseIcon:\n '--plasma-notification-horizontal-layout-right-padding-without-close-icon',\n\n contentPaddingTop: '--plasma-notification-content-padding-top',\n contentPaddingRight: '--plasma-notification-content-padding-right',\n contentPaddingBottom: '--plasma-notification-content-padding-bottom',\n contentPaddingLeft: '--plasma-notification-content-padding-left',\n\n contentPaddingTopWithoutIcon: '--plasma-notification-content-padding-top-without-icon',\n\n textboxPaddingTop: '--plasma-notification-textbox-padding-top',\n textboxPaddingRight: '--plasma-notification-textbox-padding-right',\n textboxPaddingBottom: '--plasma-notification-textbox-padding-bottom',\n textboxPaddingLeft: '--plasma-notification-textbox-padding-left',\n\n textboxPaddingTopWithTopIcon: '--plasma-notification-textbox-padding-top-with-top-icon',\n textboxPaddingRightWithCloseIcon: '--plasma-notification-textbox-padding-right-with-close-icon',\n textboxGap: '--plasma-notification-textbox-gap',\n\n buttonsMarginTop: '--plasma-notification-buttons-margin-top',\n buttonsMarginLeft: '--plasma-notification-buttons-margin-left',\n\n contentLeftIconSize: '--plasma-notification-content-left-icon-size',\n contentLeftIconMargin: '--plasma-notification-content-left-icon-margin',\n contentTopIconMargin: '--plasma-notification-content-top-icon-margin',\n\n contentColor: '--plasma-notification-content-color',\n contentFontFamily: '--plasma-notification-content-font-family',\n contentFontSize: '--plasma-notification-content-font-size',\n contentFontStyle: '--plasma-notification-content-font-style',\n contentFontWeight: '--plasma-notification-content-font-weight',\n contentFontWeightBold: '--plasma-notification-content-font-weight-bold',\n contentFontLetterSpacing: '--plasma-notification-content-font-letter-spacing',\n contentFontLineHeight: '--plasma-notification-content-font-line-height',\n\n titleColor: '--plasma-notification-title-color',\n titleFontFamily: '--plasma-notification-title-font-family',\n titleFontSize: '--plasma-notification-title-font-size',\n titleFontStyle: '--plasma-notification-title-font-style',\n titleFontWeight: '--plasma-notification-title-font-weight',\n titleFontWeightBold: '--plasma-notification-title-font-weight-bold',\n titleFontLetterSpacing: '--plasma-notification-title-font-letter-spacing',\n titleFontLineHeight: '--plasma-notification-title-font-line-height',\n\n closeIconTop: '--plasma-notification-close-icon-top',\n closeIconRight: '--plasma-notification-close-icon-right',\n closeIconColor: '--plasma-notification-close-icon-color',\n closeIconColorOnHover: '--plasma-notification-close-icon-color-on-hover',\n};\n"],"names":["classes","textbox","contentBox","title","text","wrapper","icon","closeIcon","buttonsWrapper","horizontal","vertical","oneLine","withoutIcon","withoutCloseIcon","notificationItemOpened","notificationItemHidden","notificationLeftToRightAnimation","tokens","background","padding","horizontalLayoutPadding","width","borderRadius","paddingOneLineTextbox","horizontalLayoutGap","horizontalLayoutLeftIconMargin","horizontalLayoutRightPaddingWithoutCloseIcon","contentPaddingTop","contentPaddingRight","contentPaddingBottom","contentPaddingLeft","contentPaddingTopWithoutIcon","textboxPaddingTop","textboxPaddingRight","textboxPaddingBottom","textboxPaddingLeft","textboxPaddingTopWithTopIcon","textboxPaddingRightWithCloseIcon","textboxGap","buttonsMarginTop","buttonsMarginLeft","contentLeftIconSize","contentLeftIconMargin","contentTopIconMargin","contentColor","contentFontFamily","contentFontSize","contentFontStyle","contentFontWeight","contentFontWeightBold","contentFontLetterSpacing","contentFontLineHeight","titleColor","titleFontFamily","titleFontSize","titleFontStyle","titleFontWeight","titleFontWeightBold","titleFontLetterSpacing","titleFontLineHeight","closeIconTop","closeIconRight","closeIconColor","closeIconColorOnHover"],"mappings":";;;;AAAO,IAAMA,OAAO,GAAG;AACnBC,EAAAA,OAAO,EAAE,sBAAsB;AAC/BC,EAAAA,UAAU,EAAE,0BAA0B;AACtCC,EAAAA,KAAK,EAAE,oBAAoB;AAC3BC,EAAAA,IAAI,EAAE,mBAAmB;AACzBC,EAAAA,OAAO,EAAE,sBAAsB;AAC/BC,EAAAA,IAAI,EAAE,mBAAmB;AACzBC,EAAAA,SAAS,EAAE,yBAAyB;AACpCC,EAAAA,cAAc,EAAE,8BAA8B;AAE9CC,EAAAA,UAAU,EAAE,gCAAgC;AA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EC,EAAAA,oBAAoB,EAAE,+CAA+C;AAErEC,EAAAA,YAAY,EAAE,qCAAqC;AACnDC,EAAAA,iBAAiB,EAAE,2CAA2C;AAC9DC,EAAAA,eAAe,EAAE,yCAAyC;AAC1DC,EAAAA,gBAAgB,EAAE,0CAA0C;AAC5DC,EAAAA,iBAAiB,EAAE,2CAA2C;AAC9DC,EAAAA,qBAAqB,EAAE,gDAAgD;AACvEC,EAAAA,wBAAwB,EAAE,mDAAmD;AAC7EC,EAAAA,qBAAqB,EAAE,gDAAgD;AAEvEC,EAAAA,UAAU,EAAE,mCAAmC;AAC/CC,EAAAA,eAAe,EAAE,yCAAyC;AAC1DC,EAAAA,aAAa,EAAE,uCAAuC;AACtDC,EAAAA,cAAc,EAAE,wCAAwC;AACxDC,EAAAA,eAAe,EAAE,yCAAyC;AAC1DC,EAAAA,mBAAmB,EAAE,8CAA8C;AACnEC,EAAAA,sBAAsB,EAAE,iDAAiD;AACzEC,EAAAA,mBAAmB,EAAE,8CAA8C;AAEnEC,EAAAA,YAAY,EAAE,sCAAsC;AACpDC,EAAAA,cAAc,EAAE,wCAAwC;AACxDC,EAAAA,cAAc,EAAE,wCAAwC;AACxDC,EAAAA,qBAAqB,EAAE,iDAAA;AAC3B;;;;;"}
@@ -7,14 +7,13 @@ var _rollupPluginBabelHelpers = require('../../_virtual/_rollupPluginBabelHelper
7
7
  var React = require('react');
8
8
  var react = require('storeon/react');
9
9
  var react$1 = require('@linaria/react');
10
- var PopupContext = require('../Popup/PopupContext.js');
11
- var Popup$1 = require('../Popup/Popup.js');
12
- require('@linaria/core');
13
- var common = require('../../engines/common.js');
14
10
  var index = require('../../utils/index.js');
15
11
  var NotificationsStore = require('./NotificationsStore.js');
16
12
  var Notification_styles = require('./Notification.styles.js');
17
13
  var Notification_tokens = require('./Notification.tokens.js');
14
+ var common = require('../../engines/common.js');
15
+ var PopupContext = require('../Popup/PopupContext.js');
16
+ var Popup$1 = require('../Popup/Popup.js');
18
17
 
19
18
  var _excluded = ["id", "isHidden"];
20
19
 
@@ -53,7 +52,7 @@ var NotificationsPortal = function NotificationsPortal(_ref) {
53
52
  rest = _rollupPluginBabelHelpers.objectWithoutProperties(_ref2, _excluded);
54
53
  return /*#__PURE__*/React.createElement(Notification_styles.StyledItemWrapper, {
55
54
  key: id,
56
- className: index.cx(isHidden ? Notification_tokens.classes.notificationItemHidden : Notification_tokens.classes.notificationItemOpened),
55
+ className: index.cx(isHidden ? Notification_tokens.classes.notificationItemHidden : Notification_tokens.classes.notificationItemOpened, placement === 'bottom-left' && Notification_tokens.classes.notificationLeftToRightAnimation),
57
56
  isHidden: isHidden || false
58
57
  }, /*#__PURE__*/React.createElement(Notification, _rollupPluginBabelHelpers.extends({
59
58
  key: id,
@@ -1 +1 @@
1
- {"version":3,"file":"NotificationsPortal.js","sources":["../../../src/components/Notification/NotificationsPortal.tsx"],"sourcesContent":["import React, { FC, ForwardRefExoticComponent, RefAttributes, useMemo } from 'react';\nimport { useStoreon } from 'storeon/react';\nimport { styled } from '@linaria/react';\nimport { popupBaseRootClass } from '@salutejs/plasma-core';\n\nimport { PopupProvider, popupConfig } from '../Popup';\nimport { component } from '../../engines';\nimport { cx } from '../../utils';\n\nimport { NotificationsState, NotificationsEvents, closeNotification } from './NotificationsStore';\nimport { NotificationPortalProps, NotificationProps } from './Notification.types';\nimport { StyledItemWrapper, StyledRoot } from './Notification.styles';\nimport { classes } from './Notification.tokens';\n\n// issue #823\nconst Popup = component(popupConfig);\n\nconst StyledPopup = styled(Popup)`\n & > .${popupBaseRootClass} {\n overflow: hidden;\n }\n`;\n\n/**\n * Обертка для визуального представления уведомлений.\n */\nexport const NotificationsPortal: FC<NotificationPortalProps> = ({ config, frame, placement = 'bottom-right' }) => {\n const { notifications } = useStoreon<NotificationsState, NotificationsEvents>('notifications');\n\n const Notification = useMemo(\n () => component(config) as ForwardRefExoticComponent<NotificationProps & RefAttributes<HTMLDivElement>>,\n [],\n );\n\n return (\n <PopupProvider>\n {notifications.length > 0 && (\n <StyledPopup opened frame={frame} placement={placement} zIndex=\"9100\">\n <StyledRoot>\n {notifications.map(({ id, isHidden, ...rest }) => (\n <StyledItemWrapper\n key={id}\n className={cx(\n isHidden ? classes.notificationItemHidden : classes.notificationItemOpened,\n )}\n isHidden={isHidden || false}\n >\n <Notification\n key={id}\n id={id}\n onCloseButtonClick={() => closeNotification(id)}\n {...rest}\n />\n </StyledItemWrapper>\n ))}\n </StyledRoot>\n </StyledPopup>\n )}\n </PopupProvider>\n );\n};\n"],"names":["Popup","component","popupConfig","_exp","StyledPopup","styled","name","class","propsAsIs","NotificationsPortal","_ref","config","frame","_ref$placement","placement","_useStoreon","useStoreon","notifications","Notification","useMemo","React","createElement","PopupProvider","length","opened","zIndex","StyledRoot","map","_ref2","id","isHidden","rest","StyledItemWrapper","key","className","cx","classes","notificationItemHidden","notificationItemOpened","_extends","onCloseButtonClick","closeNotification"],"mappings":";;;;;;;;;;;;;;;;;;;AAcA;AACA,IAAMA,KAAK,gBAAGC,gBAAS,CAACC,mBAAW,CAAC,CAAA;AAAC,IAAAC,IAAA,GAdnBA,SAcmBA,IAAAA,GAAA;AAAA,EAAA,OAEVH,KAAK,CAAA;AAAA,CAAA,CAAA;AAAhC,IAAMI,WAAW,gBAAGC,cAAM,CAAAF,IAAA,EAAA,CAAA,CAAA;AAAAG,EAAAA,IAAA,EAAA,aAAA;AAAAC,EAAAA,OAAAA,EAAA,UAAA;AAAAC,EAAAA,SAAA,EAAA,IAAA;AAAA,CAIzB,CAAA,CAAA;;AAED;AACA;AACA;IACaC,mBAAgD,GAAGA,SAAnDA,mBAAgDA,CAAAC,IAAA,EAAsD;AAAA,EAAA,IAAhDC,MAAM,GAAAD,IAAA,CAANC,MAAM;IAAEC,KAAK,GAAAF,IAAA,CAALE,KAAK;IAAAC,cAAA,GAAAH,IAAA,CAAEI,SAAS;AAATA,IAAAA,SAAS,GAAAD,cAAA,KAAG,KAAA,CAAA,GAAA,cAAA,GAAAA,cAAA,CAAA;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,CAAC,CAAA;AAAA,OAAA;KAC3CE,EAAAA,IAAI,CAAC,CAEE,CACtB,CAAA;GACO,CAAA,CACH,CAEN,CAAC,CAAA;AAExB;;;;"}
1
+ {"version":3,"file":"NotificationsPortal.js","sources":["../../../src/components/Notification/NotificationsPortal.tsx"],"sourcesContent":["import React, { FC, ForwardRefExoticComponent, RefAttributes, useMemo } from 'react';\nimport { useStoreon } from 'storeon/react';\nimport { styled } from '@linaria/react';\nimport { popupBaseRootClass } from '@salutejs/plasma-core';\n\nimport { PopupProvider, popupConfig } from '../Popup';\nimport { component } from '../../engines';\nimport { cx } from '../../utils';\n\nimport { NotificationsState, NotificationsEvents, closeNotification } from './NotificationsStore';\nimport { NotificationPortalProps, NotificationProps } from './Notification.types';\nimport { StyledItemWrapper, StyledRoot } from './Notification.styles';\nimport { classes } from './Notification.tokens';\n\n// issue #823\nconst Popup = component(popupConfig);\n\nconst StyledPopup = styled(Popup)`\n & > .${popupBaseRootClass} {\n overflow: hidden;\n }\n`;\n\n/**\n * Обертка для визуального представления уведомлений.\n */\nexport const NotificationsPortal: FC<NotificationPortalProps> = ({ config, frame, placement = 'bottom-right' }) => {\n const { notifications } = useStoreon<NotificationsState, NotificationsEvents>('notifications');\n\n const Notification = useMemo(\n () => component(config) as ForwardRefExoticComponent<NotificationProps & RefAttributes<HTMLDivElement>>,\n [],\n );\n\n return (\n <PopupProvider>\n {notifications.length > 0 && (\n <StyledPopup opened frame={frame} placement={placement} zIndex=\"9100\">\n <StyledRoot>\n {notifications.map(({ id, isHidden, ...rest }) => (\n <StyledItemWrapper\n key={id}\n className={cx(\n isHidden ? classes.notificationItemHidden : classes.notificationItemOpened,\n placement === 'bottom-left' && classes.notificationLeftToRightAnimation,\n )}\n isHidden={isHidden || false}\n >\n <Notification\n key={id}\n id={id}\n onCloseButtonClick={() => closeNotification(id)}\n {...rest}\n />\n </StyledItemWrapper>\n ))}\n </StyledRoot>\n </StyledPopup>\n )}\n </PopupProvider>\n );\n};\n"],"names":["Popup","component","popupConfig","_exp","StyledPopup","styled","name","class","propsAsIs","NotificationsPortal","_ref","config","frame","_ref$placement","placement","_useStoreon","useStoreon","notifications","Notification","useMemo","React","createElement","PopupProvider","length","opened","zIndex","StyledRoot","map","_ref2","id","isHidden","rest","StyledItemWrapper","key","className","cx","classes","notificationItemHidden","notificationItemOpened","notificationLeftToRightAnimation","_extends","onCloseButtonClick","closeNotification"],"mappings":";;;;;;;;;;;;;;;;;;AAcA;AACA,IAAMA,KAAK,gBAAGC,gBAAS,CAACC,mBAAW,CAAC,CAAA;AAAC,IAAAC,IAAA,GAdnBA,SAcmBA,IAAAA,GAAA;AAAA,EAAA,OAEVH,KAAK,CAAA;AAAA,CAAA,CAAA;AAAhC,IAAMI,WAAW,gBAAGC,cAAM,CAAAF,IAAA,EAAA,CAAA,CAAA;AAAAG,EAAAA,IAAA,EAAA,aAAA;AAAAC,EAAAA,OAAAA,EAAA,UAAA;AAAAC,EAAAA,SAAA,EAAA,IAAA;AAAA,CAIzB,CAAA,CAAA;;AAED;AACA;AACA;IACaC,mBAAgD,GAAGA,SAAnDA,mBAAgDA,CAAAC,IAAA,EAAsD;AAAA,EAAA,IAAhDC,MAAM,GAAAD,IAAA,CAANC,MAAM;IAAEC,KAAK,GAAAF,IAAA,CAALE,KAAK;IAAAC,cAAA,GAAAH,IAAA,CAAEI,SAAS;AAATA,IAAAA,SAAS,GAAAD,cAAA,KAAG,KAAA,CAAA,GAAA,cAAA,GAAAA,cAAA,CAAA;AAC1F,EAAA,IAAAE,WAAA,GAA0BC,gBAAU,CAA0C,eAAe,CAAC;IAAtFC,aAAAA,GAAAA,WAAAA,CAAAA,aAAAA,CAAAA;EAER,IAAMC,YAAY,GAAGC,aAAO,CACxB,YAAA;IAAA,OAAMlB,gBAAS,CAACU,MAAM,CAAC,CAAA;GACvB,EAAA,EACJ,CAAC,CAAA;AAED,EAAA,oBACIS,KAAA,CAAAC,aAAA,CAACC,0BAAa,QACTL,aAAa,CAACM,MAAM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