@salutejs/plasma-new-hope 0.174.0-canary.1497.11501781410.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 (315) hide show
  1. package/cjs/components/Combobox/ComboboxNew/Combobox.css +10 -10
  2. package/cjs/components/Combobox/ComboboxNew/ui/Inner/Inner.css +10 -10
  3. package/cjs/components/Combobox/ComboboxNew/ui/Inner/ui/Item/Item.css +10 -10
  4. package/cjs/components/Combobox/ComboboxNew/ui/Inner/ui/Item/Item.js +2 -1
  5. package/cjs/components/Combobox/ComboboxNew/ui/Inner/ui/Item/Item.js.map +1 -1
  6. package/cjs/components/Combobox/ComboboxNew/ui/Inner/ui/Item/Item.styles.js +20 -6
  7. package/cjs/components/Combobox/ComboboxNew/ui/Inner/ui/Item/Item.styles.js.map +1 -1
  8. package/cjs/components/Combobox/ComboboxNew/ui/Inner/ui/Item/{Item.styles_y71664.css → Item.styles_1us8jz1.css} +1 -1
  9. package/cjs/components/Combobox/ComboboxOld/Combobox.css +14 -28
  10. package/cjs/components/Combobox/ComboboxOld/ui/ComboboxDivider/ComboboxDivider.css +18 -32
  11. package/cjs/components/Combobox/ComboboxOld/ui/ComboboxFooter/ComboboxFooter.css +18 -32
  12. package/cjs/components/Combobox/ComboboxOld/ui/ComboboxGroup/ComboboxGroup.css +18 -32
  13. package/cjs/components/Combobox/ComboboxOld/ui/ComboboxHeader/ComboboxHeader.css +18 -32
  14. package/cjs/components/Dropdown/Dropdown.css +16 -30
  15. package/cjs/components/Dropdown/Dropdown.js +37 -60
  16. package/cjs/components/Dropdown/Dropdown.js.map +1 -1
  17. package/cjs/components/Dropdown/Dropdown.styles.js +26 -14
  18. package/cjs/components/Dropdown/Dropdown.styles.js.map +1 -1
  19. package/cjs/components/Dropdown/Dropdown.styles_1tihqkp.css +3 -0
  20. package/cjs/components/Dropdown/Dropdown.tokens.js +1 -24
  21. package/cjs/components/Dropdown/Dropdown.tokens.js.map +1 -1
  22. package/cjs/components/Dropdown/ui/DropdownInner/DropdownInner.js +51 -17
  23. package/cjs/components/Dropdown/ui/DropdownInner/DropdownInner.js.map +1 -1
  24. package/cjs/components/Dropdown/ui/DropdownItem/DropdownItem.css +6 -46
  25. package/cjs/components/Dropdown/ui/DropdownItem/DropdownItem.js +18 -29
  26. package/cjs/components/Dropdown/ui/DropdownItem/DropdownItem.js.map +1 -1
  27. package/cjs/components/Dropdown/ui/DropdownItem/DropdownItem.styles.js +31 -25
  28. package/cjs/components/Dropdown/ui/DropdownItem/DropdownItem.styles.js.map +1 -1
  29. package/cjs/components/Dropdown/ui/DropdownItem/DropdownItem.styles_blclup.css +6 -0
  30. package/cjs/components/Dropdown/ui/DropdownItemOld/DropdownItem.styles.js +1 -1
  31. package/cjs/components/Dropdown/ui/DropdownItemOld/{DropdownItem.styles_1lyg81y.css → DropdownItem.styles_12e50g5.css} +1 -1
  32. package/cjs/components/Dropdown/ui/DropdownItemOld/DropdownItemOld.css +4 -4
  33. package/cjs/components/Dropdown/utils/index.js.map +1 -1
  34. package/cjs/components/Notification/Notification.css +11 -11
  35. package/cjs/components/Notification/Notification.js +2 -2
  36. package/cjs/components/Notification/Notification.js.map +1 -1
  37. package/cjs/components/Notification/Notification.styles.js +1 -1
  38. package/cjs/components/Notification/Notification.styles.js.map +1 -1
  39. package/cjs/components/Notification/{Notification.styles_7h8hp0.css → Notification.styles_1cf2gwd.css} +1 -1
  40. package/cjs/components/Notification/Notification.tokens.js +2 -1
  41. package/cjs/components/Notification/Notification.tokens.js.map +1 -1
  42. package/cjs/components/Notification/Notification.types.js.map +1 -1
  43. package/cjs/components/Notification/NotificationsPortal.js +5 -3
  44. package/cjs/components/Notification/NotificationsPortal.js.map +1 -1
  45. package/cjs/components/Notification/NotificationsProvider.css +11 -11
  46. package/cjs/components/Notification/NotificationsProvider.js +3 -1
  47. package/cjs/components/Notification/NotificationsProvider.js.map +1 -1
  48. package/cjs/components/Select/Select.js +1 -1
  49. package/cjs/components/Select/utils/getCorrectHeight.js.map +1 -1
  50. package/cjs/hooks/useOutsideClick.js +1 -1
  51. package/cjs/hooks/useOutsideClick.js.map +1 -1
  52. package/cjs/index.css +33 -31
  53. package/cjs/index.js +1 -1
  54. package/cjs/utils/index.js.map +1 -1
  55. package/emotion/cjs/components/Combobox/ComboboxNew/ui/Inner/ui/Item/Item.js +2 -1
  56. package/emotion/cjs/components/Combobox/ComboboxNew/ui/Inner/ui/Item/Item.styles.js +20 -14
  57. package/emotion/cjs/components/Dropdown/Dropdown.js +37 -58
  58. package/emotion/cjs/components/Dropdown/Dropdown.styles.js +25 -9
  59. package/emotion/cjs/components/Dropdown/Dropdown.tokens.js +2 -36
  60. package/emotion/cjs/components/Dropdown/ui/DropdownInner/DropdownInner.js +51 -17
  61. package/emotion/cjs/components/Dropdown/ui/DropdownItem/DropdownItem.js +18 -29
  62. package/emotion/cjs/components/Dropdown/ui/DropdownItem/DropdownItem.styles.js +41 -21
  63. package/emotion/cjs/components/Dropdown/utils/index.js +1 -23
  64. package/emotion/cjs/components/Notification/Notification.js +2 -2
  65. package/emotion/cjs/components/Notification/Notification.styles.js +11 -11
  66. package/emotion/cjs/components/Notification/Notification.template-doc.mdx +15 -7
  67. package/emotion/cjs/components/Notification/Notification.tokens.js +2 -1
  68. package/emotion/cjs/components/Notification/NotificationsPortal.js +6 -4
  69. package/emotion/cjs/components/Notification/NotificationsProvider.js +3 -1
  70. package/emotion/cjs/components/Notification/index.js +4 -4
  71. package/emotion/cjs/examples/plasma_b2c/components/Combobox/Combobox.config.js +12 -12
  72. package/emotion/cjs/examples/plasma_b2c/components/Dropdown/Dropdown.config.js +5 -5
  73. package/emotion/cjs/examples/plasma_b2c/components/Dropdown/Dropdown.stories.tsx +5 -6
  74. package/emotion/cjs/examples/plasma_b2c/components/Notification/Notification.js +5 -3
  75. package/emotion/cjs/examples/plasma_b2c/components/Notification/Notification.stories.tsx +25 -4
  76. package/emotion/cjs/examples/plasma_web/components/Combobox/Combobox.config.js +12 -12
  77. package/emotion/cjs/examples/plasma_web/components/Dropdown/Dropdown.config.js +5 -5
  78. package/emotion/cjs/examples/plasma_web/components/Dropdown/Dropdown.stories.tsx +5 -6
  79. package/emotion/cjs/examples/plasma_web/components/Notification/Notification.js +5 -3
  80. package/emotion/cjs/examples/plasma_web/components/Notification/Notification.stories.tsx +25 -4
  81. package/emotion/cjs/hooks/useOutsideClick.js +1 -1
  82. package/emotion/es/components/Combobox/ComboboxNew/ui/Inner/ui/Item/Item.js +2 -1
  83. package/emotion/es/components/Combobox/ComboboxNew/ui/Inner/ui/Item/Item.styles.js +20 -14
  84. package/emotion/es/components/Dropdown/Dropdown.js +40 -60
  85. package/emotion/es/components/Dropdown/Dropdown.styles.js +25 -9
  86. package/emotion/es/components/Dropdown/Dropdown.tokens.js +1 -35
  87. package/emotion/es/components/Dropdown/ui/DropdownInner/DropdownInner.js +52 -18
  88. package/emotion/es/components/Dropdown/ui/DropdownItem/DropdownItem.js +20 -31
  89. package/emotion/es/components/Dropdown/ui/DropdownItem/DropdownItem.styles.js +42 -22
  90. package/emotion/es/components/Dropdown/utils/index.js +1 -4
  91. package/emotion/es/components/Notification/Notification.js +1 -1
  92. package/emotion/es/components/Notification/Notification.styles.js +11 -11
  93. package/emotion/es/components/Notification/Notification.template-doc.mdx +15 -7
  94. package/emotion/es/components/Notification/Notification.tokens.js +2 -1
  95. package/emotion/es/components/Notification/NotificationsPortal.js +6 -4
  96. package/emotion/es/components/Notification/NotificationsProvider.js +3 -1
  97. package/emotion/es/components/Notification/index.js +1 -1
  98. package/emotion/es/examples/plasma_b2c/components/Combobox/Combobox.config.js +12 -12
  99. package/emotion/es/examples/plasma_b2c/components/Dropdown/Dropdown.config.js +6 -6
  100. package/emotion/es/examples/plasma_b2c/components/Dropdown/Dropdown.stories.tsx +5 -6
  101. package/emotion/es/examples/plasma_b2c/components/Notification/Notification.js +6 -4
  102. package/emotion/es/examples/plasma_b2c/components/Notification/Notification.stories.tsx +25 -4
  103. package/emotion/es/examples/plasma_web/components/Combobox/Combobox.config.js +12 -12
  104. package/emotion/es/examples/plasma_web/components/Dropdown/Dropdown.config.js +6 -6
  105. package/emotion/es/examples/plasma_web/components/Dropdown/Dropdown.stories.tsx +5 -6
  106. package/emotion/es/examples/plasma_web/components/Notification/Notification.js +6 -4
  107. package/emotion/es/examples/plasma_web/components/Notification/Notification.stories.tsx +25 -4
  108. package/emotion/es/hooks/useOutsideClick.js +1 -1
  109. package/es/components/Combobox/ComboboxNew/Combobox.css +10 -10
  110. package/es/components/Combobox/ComboboxNew/ui/Inner/Inner.css +10 -10
  111. package/es/components/Combobox/ComboboxNew/ui/Inner/ui/Item/Item.css +10 -10
  112. package/es/components/Combobox/ComboboxNew/ui/Inner/ui/Item/Item.js +2 -1
  113. package/es/components/Combobox/ComboboxNew/ui/Inner/ui/Item/Item.js.map +1 -1
  114. package/es/components/Combobox/ComboboxNew/ui/Inner/ui/Item/Item.styles.js +20 -6
  115. package/es/components/Combobox/ComboboxNew/ui/Inner/ui/Item/Item.styles.js.map +1 -1
  116. package/es/components/Combobox/ComboboxNew/ui/Inner/ui/Item/{Item.styles_y71664.css → Item.styles_1us8jz1.css} +1 -1
  117. package/es/components/Combobox/ComboboxOld/Combobox.css +14 -28
  118. package/es/components/Combobox/ComboboxOld/ui/ComboboxDivider/ComboboxDivider.css +18 -32
  119. package/es/components/Combobox/ComboboxOld/ui/ComboboxFooter/ComboboxFooter.css +18 -32
  120. package/es/components/Combobox/ComboboxOld/ui/ComboboxGroup/ComboboxGroup.css +18 -32
  121. package/es/components/Combobox/ComboboxOld/ui/ComboboxHeader/ComboboxHeader.css +18 -32
  122. package/es/components/Dropdown/Dropdown.css +16 -30
  123. package/es/components/Dropdown/Dropdown.js +40 -62
  124. package/es/components/Dropdown/Dropdown.js.map +1 -1
  125. package/es/components/Dropdown/Dropdown.styles.js +26 -15
  126. package/es/components/Dropdown/Dropdown.styles.js.map +1 -1
  127. package/es/components/Dropdown/Dropdown.styles_1tihqkp.css +3 -0
  128. package/es/components/Dropdown/Dropdown.tokens.js +1 -24
  129. package/es/components/Dropdown/Dropdown.tokens.js.map +1 -1
  130. package/es/components/Dropdown/ui/DropdownInner/DropdownInner.js +52 -18
  131. package/es/components/Dropdown/ui/DropdownInner/DropdownInner.js.map +1 -1
  132. package/es/components/Dropdown/ui/DropdownItem/DropdownItem.css +6 -46
  133. package/es/components/Dropdown/ui/DropdownItem/DropdownItem.js +20 -31
  134. package/es/components/Dropdown/ui/DropdownItem/DropdownItem.js.map +1 -1
  135. package/es/components/Dropdown/ui/DropdownItem/DropdownItem.styles.js +29 -24
  136. package/es/components/Dropdown/ui/DropdownItem/DropdownItem.styles.js.map +1 -1
  137. package/es/components/Dropdown/ui/DropdownItem/DropdownItem.styles_blclup.css +6 -0
  138. package/es/components/Dropdown/ui/DropdownItemOld/DropdownItem.styles.js +1 -1
  139. package/es/components/Dropdown/ui/DropdownItemOld/{DropdownItem.styles_1lyg81y.css → DropdownItem.styles_12e50g5.css} +1 -1
  140. package/es/components/Dropdown/ui/DropdownItemOld/DropdownItemOld.css +4 -4
  141. package/es/components/Dropdown/utils/index.js.map +1 -1
  142. package/es/components/Notification/Notification.css +11 -11
  143. package/es/components/Notification/Notification.js +2 -2
  144. package/es/components/Notification/Notification.js.map +1 -1
  145. package/es/components/Notification/Notification.styles.js +1 -1
  146. package/es/components/Notification/Notification.styles.js.map +1 -1
  147. package/es/components/Notification/{Notification.styles_7h8hp0.css → Notification.styles_1cf2gwd.css} +1 -1
  148. package/es/components/Notification/Notification.tokens.js +2 -1
  149. package/es/components/Notification/Notification.tokens.js.map +1 -1
  150. package/es/components/Notification/Notification.types.js.map +1 -1
  151. package/es/components/Notification/NotificationsPortal.js +5 -3
  152. package/es/components/Notification/NotificationsPortal.js.map +1 -1
  153. package/es/components/Notification/NotificationsProvider.css +11 -11
  154. package/es/components/Notification/NotificationsProvider.js +3 -1
  155. package/es/components/Notification/NotificationsProvider.js.map +1 -1
  156. package/es/components/Select/Select.js +1 -1
  157. package/es/components/Select/utils/getCorrectHeight.js.map +1 -1
  158. package/es/hooks/useOutsideClick.js +1 -1
  159. package/es/hooks/useOutsideClick.js.map +1 -1
  160. package/es/index.css +33 -31
  161. package/es/index.js +1 -1
  162. package/es/utils/index.js.map +1 -1
  163. package/package.json +2 -2
  164. package/styled-components/cjs/components/Combobox/ComboboxNew/ui/Inner/ui/Item/Item.js +2 -1
  165. package/styled-components/cjs/components/Combobox/ComboboxNew/ui/Inner/ui/Item/Item.styles.js +10 -4
  166. package/styled-components/cjs/components/Dropdown/Dropdown.js +37 -58
  167. package/styled-components/cjs/components/Dropdown/Dropdown.styles.js +15 -9
  168. package/styled-components/cjs/components/Dropdown/Dropdown.tokens.js +2 -36
  169. package/styled-components/cjs/components/Dropdown/ui/DropdownInner/DropdownInner.js +51 -17
  170. package/styled-components/cjs/components/Dropdown/ui/DropdownItem/DropdownItem.js +18 -29
  171. package/styled-components/cjs/components/Dropdown/ui/DropdownItem/DropdownItem.styles.js +19 -17
  172. package/styled-components/cjs/components/Dropdown/utils/index.js +1 -23
  173. package/styled-components/cjs/components/Notification/Notification.js +2 -2
  174. package/styled-components/cjs/components/Notification/Notification.styles.js +1 -1
  175. package/styled-components/cjs/components/Notification/Notification.template-doc.mdx +15 -7
  176. package/styled-components/cjs/components/Notification/Notification.tokens.js +2 -1
  177. package/styled-components/cjs/components/Notification/NotificationsPortal.js +5 -3
  178. package/styled-components/cjs/components/Notification/NotificationsProvider.js +3 -1
  179. package/styled-components/cjs/components/Notification/index.js +4 -4
  180. package/styled-components/cjs/examples/plasma_b2c/components/Combobox/Combobox.config.js +4 -4
  181. package/styled-components/cjs/examples/plasma_b2c/components/Dropdown/Dropdown.config.js +5 -5
  182. package/styled-components/cjs/examples/plasma_b2c/components/Dropdown/Dropdown.stories.tsx +5 -6
  183. package/styled-components/cjs/examples/plasma_b2c/components/Notification/Notification.js +5 -3
  184. package/styled-components/cjs/examples/plasma_b2c/components/Notification/Notification.stories.tsx +25 -4
  185. package/styled-components/cjs/examples/plasma_web/components/Combobox/Combobox.config.js +4 -4
  186. package/styled-components/cjs/examples/plasma_web/components/Dropdown/Dropdown.config.js +5 -5
  187. package/styled-components/cjs/examples/plasma_web/components/Dropdown/Dropdown.stories.tsx +5 -6
  188. package/styled-components/cjs/examples/plasma_web/components/Notification/Notification.js +5 -3
  189. package/styled-components/cjs/examples/plasma_web/components/Notification/Notification.stories.tsx +25 -4
  190. package/styled-components/cjs/hooks/useOutsideClick.js +1 -1
  191. package/styled-components/es/components/Combobox/ComboboxNew/ui/Inner/ui/Item/Item.js +2 -1
  192. package/styled-components/es/components/Combobox/ComboboxNew/ui/Inner/ui/Item/Item.styles.js +10 -4
  193. package/styled-components/es/components/Dropdown/Dropdown.js +40 -60
  194. package/styled-components/es/components/Dropdown/Dropdown.styles.js +15 -9
  195. package/styled-components/es/components/Dropdown/Dropdown.tokens.js +1 -35
  196. package/styled-components/es/components/Dropdown/ui/DropdownInner/DropdownInner.js +52 -18
  197. package/styled-components/es/components/Dropdown/ui/DropdownItem/DropdownItem.js +20 -31
  198. package/styled-components/es/components/Dropdown/ui/DropdownItem/DropdownItem.styles.js +20 -18
  199. package/styled-components/es/components/Dropdown/utils/index.js +1 -4
  200. package/styled-components/es/components/Notification/Notification.js +1 -1
  201. package/styled-components/es/components/Notification/Notification.styles.js +1 -1
  202. package/styled-components/es/components/Notification/Notification.template-doc.mdx +15 -7
  203. package/styled-components/es/components/Notification/Notification.tokens.js +2 -1
  204. package/styled-components/es/components/Notification/NotificationsPortal.js +5 -3
  205. package/styled-components/es/components/Notification/NotificationsProvider.js +3 -1
  206. package/styled-components/es/components/Notification/index.js +1 -1
  207. package/styled-components/es/examples/plasma_b2c/components/Combobox/Combobox.config.js +4 -4
  208. package/styled-components/es/examples/plasma_b2c/components/Dropdown/Dropdown.config.js +6 -6
  209. package/styled-components/es/examples/plasma_b2c/components/Dropdown/Dropdown.stories.tsx +5 -6
  210. package/styled-components/es/examples/plasma_b2c/components/Notification/Notification.js +6 -4
  211. package/styled-components/es/examples/plasma_b2c/components/Notification/Notification.stories.tsx +25 -4
  212. package/styled-components/es/examples/plasma_web/components/Combobox/Combobox.config.js +4 -4
  213. package/styled-components/es/examples/plasma_web/components/Dropdown/Dropdown.config.js +6 -6
  214. package/styled-components/es/examples/plasma_web/components/Dropdown/Dropdown.stories.tsx +5 -6
  215. package/styled-components/es/examples/plasma_web/components/Notification/Notification.js +6 -4
  216. package/styled-components/es/examples/plasma_web/components/Notification/Notification.stories.tsx +25 -4
  217. package/styled-components/es/hooks/useOutsideClick.js +1 -1
  218. package/types/components/Combobox/ComboboxNew/ui/Inner/ui/Item/Item.d.ts.map +1 -1
  219. package/types/components/Combobox/ComboboxNew/ui/Inner/ui/Item/Item.styles.d.ts.map +1 -1
  220. package/types/components/Combobox/ComboboxOld/Combobox.types.d.ts +1 -2
  221. package/types/components/Combobox/ComboboxOld/Combobox.types.d.ts.map +1 -1
  222. package/types/components/Dropdown/Dropdown.d.ts +1 -2
  223. package/types/components/Dropdown/Dropdown.d.ts.map +1 -1
  224. package/types/components/Dropdown/Dropdown.styles.d.ts +6 -1
  225. package/types/components/Dropdown/Dropdown.styles.d.ts.map +1 -1
  226. package/types/components/Dropdown/Dropdown.tokens.d.ts +0 -25
  227. package/types/components/Dropdown/Dropdown.tokens.d.ts.map +1 -1
  228. package/types/components/Dropdown/Dropdown.types.d.ts +4 -30
  229. package/types/components/Dropdown/Dropdown.types.d.ts.map +1 -1
  230. package/types/components/Dropdown/index.d.ts +1 -1
  231. package/types/components/Dropdown/index.d.ts.map +1 -1
  232. package/types/components/Dropdown/ui/DropdownInner/DropdownInner.d.ts.map +1 -1
  233. package/types/components/Dropdown/ui/DropdownInner/DropdownInner.type.d.ts +12 -1
  234. package/types/components/Dropdown/ui/DropdownInner/DropdownInner.type.d.ts.map +1 -1
  235. package/types/components/Dropdown/ui/DropdownItem/DropdownItem.d.ts.map +1 -1
  236. package/types/components/Dropdown/ui/DropdownItem/DropdownItem.styles.d.ts +3 -32
  237. package/types/components/Dropdown/ui/DropdownItem/DropdownItem.styles.d.ts.map +1 -1
  238. package/types/components/Dropdown/ui/DropdownItem/DropdownItem.type.d.ts +14 -1
  239. package/types/components/Dropdown/ui/DropdownItem/DropdownItem.type.d.ts.map +1 -1
  240. package/types/components/Dropdown/utils/index.d.ts +0 -3
  241. package/types/components/Dropdown/utils/index.d.ts.map +1 -1
  242. package/types/components/Notification/Notification.d.ts +3 -3
  243. package/types/components/Notification/Notification.d.ts.map +1 -1
  244. package/types/components/Notification/Notification.styles.d.ts.map +1 -1
  245. package/types/components/Notification/Notification.tokens.d.ts +1 -0
  246. package/types/components/Notification/Notification.tokens.d.ts.map +1 -1
  247. package/types/components/Notification/Notification.types.d.ts +11 -5
  248. package/types/components/Notification/Notification.types.d.ts.map +1 -1
  249. package/types/components/Notification/NotificationsPortal.d.ts.map +1 -1
  250. package/types/components/Notification/NotificationsProvider.d.ts +4 -3
  251. package/types/components/Notification/NotificationsProvider.d.ts.map +1 -1
  252. package/types/components/Notification/index.d.ts +2 -2
  253. package/types/components/Notification/index.d.ts.map +1 -1
  254. package/types/components/Select/utils/getCorrectHeight.d.ts +2 -2
  255. package/types/components/Select/utils/getCorrectHeight.d.ts.map +1 -1
  256. package/types/examples/plasma_b2c/components/Dropdown/Dropdown.config.d.ts +3 -3
  257. package/types/examples/plasma_b2c/components/Dropdown/Dropdown.config.d.ts.map +1 -1
  258. package/types/examples/plasma_b2c/components/Dropdown/Dropdown.d.ts +4 -4
  259. package/types/examples/plasma_b2c/components/Dropdown/Dropdown.d.ts.map +1 -1
  260. package/types/examples/plasma_b2c/components/Notification/Notification.d.ts +4 -2
  261. package/types/examples/plasma_b2c/components/Notification/Notification.d.ts.map +1 -1
  262. package/types/examples/plasma_web/components/Dropdown/Dropdown.config.d.ts +3 -3
  263. package/types/examples/plasma_web/components/Dropdown/Dropdown.config.d.ts.map +1 -1
  264. package/types/examples/plasma_web/components/Dropdown/Dropdown.d.ts +4 -4
  265. package/types/examples/plasma_web/components/Dropdown/Dropdown.d.ts.map +1 -1
  266. package/types/examples/plasma_web/components/Notification/Notification.d.ts +4 -13
  267. package/types/examples/plasma_web/components/Notification/Notification.d.ts.map +1 -1
  268. package/types/hooks/useOutsideClick.d.ts +1 -1
  269. package/types/hooks/useOutsideClick.d.ts.map +1 -1
  270. package/types/utils/index.d.ts +1 -1
  271. package/types/utils/index.d.ts.map +1 -1
  272. package/cjs/components/Dropdown/Dropdown.styles_1ix6io8.css +0 -2
  273. package/cjs/components/Dropdown/FloatingPopover.js +0 -104
  274. package/cjs/components/Dropdown/FloatingPopover.js.map +0 -1
  275. package/cjs/components/Dropdown/ui/DropdownItem/DropdownItem.styles_17va0nk.css +0 -5
  276. package/cjs/components/Dropdown/utils/getItemByFocused.js +0 -13
  277. package/cjs/components/Dropdown/utils/getItemByFocused.js.map +0 -1
  278. package/cjs/components/Dropdown/utils/getItemId.js +0 -10
  279. package/cjs/components/Dropdown/utils/getItemId.js.map +0 -1
  280. package/cjs/components/Dropdown/utils/getPlacement.js +0 -16
  281. package/cjs/components/Dropdown/utils/getPlacement.js.map +0 -1
  282. package/emotion/cjs/components/Dropdown/FloatingPopover.js +0 -109
  283. package/emotion/cjs/components/Dropdown/utils/getItemByFocused.js +0 -12
  284. package/emotion/cjs/components/Dropdown/utils/getItemId.js +0 -9
  285. package/emotion/cjs/components/Dropdown/utils/getPlacement.js +0 -15
  286. package/emotion/es/components/Dropdown/FloatingPopover.js +0 -102
  287. package/emotion/es/components/Dropdown/utils/getItemByFocused.js +0 -6
  288. package/emotion/es/components/Dropdown/utils/getItemId.js +0 -3
  289. package/emotion/es/components/Dropdown/utils/getPlacement.js +0 -9
  290. package/es/components/Dropdown/Dropdown.styles_1ix6io8.css +0 -2
  291. package/es/components/Dropdown/FloatingPopover.js +0 -100
  292. package/es/components/Dropdown/FloatingPopover.js.map +0 -1
  293. package/es/components/Dropdown/ui/DropdownItem/DropdownItem.styles_17va0nk.css +0 -5
  294. package/es/components/Dropdown/utils/getItemByFocused.js +0 -9
  295. package/es/components/Dropdown/utils/getItemByFocused.js.map +0 -1
  296. package/es/components/Dropdown/utils/getItemId.js +0 -6
  297. package/es/components/Dropdown/utils/getItemId.js.map +0 -1
  298. package/es/components/Dropdown/utils/getPlacement.js +0 -12
  299. package/es/components/Dropdown/utils/getPlacement.js.map +0 -1
  300. package/styled-components/cjs/components/Dropdown/FloatingPopover.js +0 -109
  301. package/styled-components/cjs/components/Dropdown/utils/getItemByFocused.js +0 -12
  302. package/styled-components/cjs/components/Dropdown/utils/getItemId.js +0 -9
  303. package/styled-components/cjs/components/Dropdown/utils/getPlacement.js +0 -15
  304. package/styled-components/es/components/Dropdown/FloatingPopover.js +0 -102
  305. package/styled-components/es/components/Dropdown/utils/getItemByFocused.js +0 -6
  306. package/styled-components/es/components/Dropdown/utils/getItemId.js +0 -3
  307. package/styled-components/es/components/Dropdown/utils/getPlacement.js +0 -9
  308. package/types/components/Dropdown/FloatingPopover.d.ts +0 -5
  309. package/types/components/Dropdown/FloatingPopover.d.ts.map +0 -1
  310. package/types/components/Dropdown/utils/getItemByFocused.d.ts +0 -4
  311. package/types/components/Dropdown/utils/getItemByFocused.d.ts.map +0 -1
  312. package/types/components/Dropdown/utils/getItemId.d.ts +0 -2
  313. package/types/components/Dropdown/utils/getItemId.d.ts.map +0 -1
  314. package/types/components/Dropdown/utils/getPlacement.d.ts +0 -3
  315. package/types/components/Dropdown/utils/getPlacement.d.ts.map +0 -1
@@ -89,7 +89,7 @@ var notificationRoot = function notificationRoot(Root) {
89
89
  })))));
90
90
  });
91
91
  };
92
- var noticationConfig = {
92
+ var notificationConfig = {
93
93
  name: 'Notification',
94
94
  tag: 'div',
95
95
  layout: notificationRoot,
@@ -112,6 +112,6 @@ var noticationConfig = {
112
112
  }
113
113
  };
114
114
 
115
- exports.noticationConfig = noticationConfig;
115
+ exports.notificationConfig = notificationConfig;
116
116
  exports.notificationRoot = notificationRoot;
117
117
  //# sourceMappingURL=Notification.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"Notification.js","sources":["../../../src/components/Notification/Notification.tsx"],"sourcesContent":["import React, { forwardRef, useMemo } from 'react';\n\nimport { RootProps } from '../../engines';\nimport { cx } from '../../utils';\nimport { IconCross } from '../_Icon/Icons/IconCross';\n\nimport { classes } from './Notification.tokens';\nimport { base as viewCSS } from './variations/_view/base';\nimport { base as layoutCSS } from './variations/_layout/base';\nimport { base as sizeCSS } from './variations/_size/base';\nimport { NotificationLayout, NotificationProps, layouts } from './Notification.types';\nimport {\n ButtonsWrapper,\n CloseIconWrapper,\n ContentBox,\n IconWrapper,\n StyledContent,\n StyledNotification,\n StyledTitle,\n TextBox,\n Wrapper,\n} from './Notification.styles';\nimport { getLayoutClass } from './utils';\n\n/**\n * Компонент для небольших уведомлений пользователя\n */\nexport const notificationRoot = (Root: RootProps<HTMLDivElement, NotificationProps>) =>\n forwardRef<HTMLDivElement, NotificationProps>((props, ref) => {\n const {\n role = 'status',\n title,\n children: content,\n actions,\n view,\n size,\n iconPlacement,\n showCloseIcon = true,\n layout = layouts.vertical as NotificationLayout,\n icon,\n onCloseButtonClick,\n ...rest\n } = props;\n\n let ariaLive: 'assertive' | 'polite' = 'polite';\n let ariaAtomic = false;\n\n if (role === 'alert') {\n ariaLive = 'assertive';\n } else if (role === 'status') {\n ariaAtomic = true;\n }\n\n const isOneLine = !content || !title;\n const oneLineClass = isOneLine ? classes.oneLine : undefined;\n const withoutIconClass = icon ? undefined : classes.withoutIcon;\n const withoutCloseIconClass = showCloseIcon ? undefined : classes.withoutCloseIcon;\n\n const IconPlacementInternal = useMemo(() => (icon ? iconPlacement : undefined), [icon, iconPlacement]);\n\n return (\n <Root\n view={view}\n size={size}\n layout={layout}\n ref={ref}\n role={role}\n aria-live={ariaLive}\n aria-atomic={ariaAtomic}\n {...rest}\n >\n <Wrapper className={cx(classes.wrapper, getLayoutClass(layout), oneLineClass, withoutCloseIconClass)}>\n <ContentBox\n iconPlacement={IconPlacementInternal}\n className={cx(classes.contentBox, getLayoutClass(layout), withoutIconClass)}\n >\n {icon && (\n <IconWrapper\n iconPlacement={IconPlacementInternal}\n className={cx(classes.icon, getLayoutClass(layout))}\n >\n {icon}\n </IconWrapper>\n )}\n <TextBox\n iconPlacement={IconPlacementInternal}\n showCloseIcon={showCloseIcon}\n className={cx(classes.textbox, getLayoutClass(layout))}\n >\n {title && <StyledTitle className={classes.title}>{title}</StyledTitle>}\n {content && <StyledContent className={classes.text}>{content}</StyledContent>}\n </TextBox>\n </ContentBox>\n {actions && (\n <ButtonsWrapper\n iconPlacement={IconPlacementInternal}\n className={cx(classes.buttonsWrapper, getLayoutClass(layout))}\n >\n {actions}\n </ButtonsWrapper>\n )}\n\n {showCloseIcon && (\n <CloseIconWrapper\n view=\"clear\"\n size=\"s\"\n onClick={onCloseButtonClick}\n className={cx(classes.closeIcon, getLayoutClass(layout))}\n >\n <IconCross size=\"s\" color=\"inherit\" />\n </CloseIconWrapper>\n )}\n </Wrapper>\n </Root>\n );\n });\n\nexport const noticationConfig = {\n name: 'Notification',\n tag: 'div',\n layout: notificationRoot,\n base: StyledNotification,\n variations: {\n layout: {\n css: layoutCSS,\n },\n view: {\n css: viewCSS,\n },\n size: {\n css: sizeCSS,\n },\n },\n defaults: {\n view: 'default',\n layout: layouts.vertical,\n size: 'xs',\n },\n};\n"],"names":["notificationRoot","Root","forwardRef","props","ref","_props$role","role","title","content","children","actions","view","size","iconPlacement","_props$showCloseIcon","showCloseIcon","_props$layout","layout","layouts","vertical","icon","onCloseButtonClick","rest","_objectWithoutProperties","_excluded","ariaLive","ariaAtomic","isOneLine","oneLineClass","classes","oneLine","undefined","withoutIconClass","withoutIcon","withoutCloseIconClass","withoutCloseIcon","IconPlacementInternal","useMemo","React","createElement","_extends","Wrapper","className","cx","wrapper","getLayoutClass","ContentBox","contentBox","IconWrapper","TextBox","textbox","StyledTitle","StyledContent","text","ButtonsWrapper","buttonsWrapper","CloseIconWrapper","onClick","closeIcon","_IconCross","IconCross","color","noticationConfig","name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,UAAA,KAAAA,UAAA,gBAEzDrB,KAAA,CAAAC,aAAA,CAACqB,mBAAS,EAAA;AAAChD,MAAAA,IAAI,EAAC,GAAG;AAACiD,MAAAA,KAAK,EAAC,SAAA;AAAS,KAAE,CAAC,CACxB,CAEjB,CACP,CAAC,CAAA;AAEf,GAAC,CAAC,CAAA;AAAA,EAAA;AAEC,IAAMC,gBAAgB,GAAG;AAC5BC,EAAAA,IAAI,EAAE,cAAc;AACpBC,EAAAA,GAAG,EAAE,KAAK;AACV/C,EAAAA,MAAM,EAAEjB,gBAAgB;AACxBiE,EAAAA,IAAI,EAAEC,sCAAkB;AACxBC,EAAAA,UAAU,EAAE;AACRlD,IAAAA,MAAM,EAAE;AACJmD,MAAAA,GAAG,EAAEC,SAAAA;KACR;AACD1D,IAAAA,IAAI,EAAE;AACFyD,MAAAA,GAAG,EAAEE,WAAAA;KACR;AACD1D,IAAAA,IAAI,EAAE;AACFwD,MAAAA,GAAG,EAAEG,WAAAA;AACT,KAAA;GACH;AACDC,EAAAA,QAAQ,EAAE;AACN7D,IAAAA,IAAI,EAAE,SAAS;IACfM,MAAM,EAAEC,0BAAO,CAACC,QAAQ;AACxBP,IAAAA,IAAI,EAAE,IAAA;AACV,GAAA;AACJ;;;;;"}
1
+ {"version":3,"file":"Notification.js","sources":["../../../src/components/Notification/Notification.tsx"],"sourcesContent":["import React, { forwardRef, useMemo } from 'react';\n\nimport { RootProps } from '../../engines';\nimport { cx } from '../../utils';\nimport { IconCross } from '../_Icon/Icons/IconCross';\n\nimport { classes } from './Notification.tokens';\nimport { base as viewCSS } from './variations/_view/base';\nimport { base as layoutCSS } from './variations/_layout/base';\nimport { base as sizeCSS } from './variations/_size/base';\nimport { NotificationLayout, NotificationProps, layouts } from './Notification.types';\nimport {\n ButtonsWrapper,\n CloseIconWrapper,\n ContentBox,\n IconWrapper,\n StyledContent,\n StyledNotification,\n StyledTitle,\n TextBox,\n Wrapper,\n} from './Notification.styles';\nimport { getLayoutClass } from './utils';\n\n/**\n * Компонент для небольших уведомлений пользователя\n */\nexport const notificationRoot = (Root: RootProps<HTMLDivElement, Omit<NotificationProps, 'title'>>) =>\n forwardRef<HTMLDivElement, NotificationProps>((props, ref) => {\n const {\n role = 'status',\n title,\n children: content,\n actions,\n view,\n size,\n iconPlacement,\n showCloseIcon = true,\n layout = layouts.vertical as NotificationLayout,\n icon,\n onCloseButtonClick,\n ...rest\n } = props;\n\n let ariaLive: 'assertive' | 'polite' = 'polite';\n let ariaAtomic = false;\n\n if (role === 'alert') {\n ariaLive = 'assertive';\n } else if (role === 'status') {\n ariaAtomic = true;\n }\n\n const isOneLine = !content || !title;\n const oneLineClass = isOneLine ? classes.oneLine : undefined;\n const withoutIconClass = icon ? undefined : classes.withoutIcon;\n const withoutCloseIconClass = showCloseIcon ? undefined : classes.withoutCloseIcon;\n\n const IconPlacementInternal = useMemo(() => (icon ? iconPlacement : undefined), [icon, iconPlacement]);\n\n return (\n <Root\n view={view}\n size={size}\n layout={layout}\n ref={ref}\n role={role}\n aria-live={ariaLive}\n aria-atomic={ariaAtomic}\n {...rest}\n >\n <Wrapper className={cx(classes.wrapper, getLayoutClass(layout), oneLineClass, withoutCloseIconClass)}>\n <ContentBox\n iconPlacement={IconPlacementInternal}\n className={cx(classes.contentBox, getLayoutClass(layout), withoutIconClass)}\n >\n {icon && (\n <IconWrapper\n iconPlacement={IconPlacementInternal}\n className={cx(classes.icon, getLayoutClass(layout))}\n >\n {icon}\n </IconWrapper>\n )}\n <TextBox\n iconPlacement={IconPlacementInternal}\n showCloseIcon={showCloseIcon}\n className={cx(classes.textbox, getLayoutClass(layout))}\n >\n {title && <StyledTitle className={classes.title}>{title}</StyledTitle>}\n {content && <StyledContent className={classes.text}>{content}</StyledContent>}\n </TextBox>\n </ContentBox>\n {actions && (\n <ButtonsWrapper\n iconPlacement={IconPlacementInternal}\n className={cx(classes.buttonsWrapper, getLayoutClass(layout))}\n >\n {actions}\n </ButtonsWrapper>\n )}\n\n {showCloseIcon && (\n <CloseIconWrapper\n view=\"clear\"\n size=\"s\"\n onClick={onCloseButtonClick}\n className={cx(classes.closeIcon, getLayoutClass(layout))}\n >\n <IconCross size=\"s\" color=\"inherit\" />\n </CloseIconWrapper>\n )}\n </Wrapper>\n </Root>\n );\n });\n\nexport const notificationConfig = {\n name: 'Notification',\n tag: 'div',\n layout: notificationRoot,\n base: StyledNotification,\n variations: {\n layout: {\n css: layoutCSS,\n },\n view: {\n css: viewCSS,\n },\n size: {\n css: sizeCSS,\n },\n },\n defaults: {\n view: 'default',\n layout: layouts.vertical,\n size: 'xs',\n },\n};\n"],"names":["notificationRoot","Root","forwardRef","props","ref","_props$role","role","title","content","children","actions","view","size","iconPlacement","_props$showCloseIcon","showCloseIcon","_props$layout","layout","layouts","vertical","icon","onCloseButtonClick","rest","_objectWithoutProperties","_excluded","ariaLive","ariaAtomic","isOneLine","oneLineClass","classes","oneLine","undefined","withoutIconClass","withoutIcon","withoutCloseIconClass","withoutCloseIcon","IconPlacementInternal","useMemo","React","createElement","_extends","Wrapper","className","cx","wrapper","getLayoutClass","ContentBox","contentBox","IconWrapper","TextBox","textbox","StyledTitle","StyledContent","text","ButtonsWrapper","buttonsWrapper","CloseIconWrapper","onClick","closeIcon","_IconCross","IconCross","color","notificationConfig","name","tag","base","StyledNotification","variations","css","layoutCSS","viewCSS","sizeCSS","defaults"],"mappings":";;;;;;;;;;;;;;;;;;;AAwBA;AACA;AACA;IACaA,gBAAgB,GAAG,SAAnBA,gBAAgBA,CAAIC,IAAiE,EAAA;AAAA,EAAA,oBAC9FC,gBAAU,CAAoC,UAACC,KAAK,EAAEC,GAAG,EAAK;AAC1D,IAAA,IAAAC,WAAA,GAaIF,KAAK,CAZLG,IAAI;AAAJA,MAAAA,IAAI,GAAAD,WAAA,KAAG,KAAA,CAAA,GAAA,QAAQ,GAAAA,WAAA;MACfE,KAAK,GAWLJ,KAAK,CAXLI,KAAK;MACKC,OAAO,GAUjBL,KAAK,CAVLM,QAAQ;MACRC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;AACJmD,MAAAA,GAAG,EAAEC,SAAAA;KACR;AACD1D,IAAAA,IAAI,EAAE;AACFyD,MAAAA,GAAG,EAAEE,WAAAA;KACR;AACD1D,IAAAA,IAAI,EAAE;AACFwD,MAAAA,GAAG,EAAEG,WAAAA;AACT,KAAA;GACH;AACDC,EAAAA,QAAQ,EAAE;AACN7D,IAAAA,IAAI,EAAE,SAAS;IACfM,MAAM,EAAEC,0BAAO,CAACC,QAAQ;AACxBP,IAAAA,IAAI,EAAE,IAAA;AACV,GAAA;AACJ;;;;;"}
@@ -1,4 +1,4 @@
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 });
@@ -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","textboxP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,UAAA;AAAAC,EAAAA,SAAA,EAAA,KAAA;AAAA,CAmCtC,EAAA;AAEM,IAAMwC,UAAU,gBAAG3C,YAAM,CAAA,KAAA,CAAA,CAAA;AAAAC,EAAAA,IAAA,EAAA,YAAA;AAAAC,EAAAA,OAAAA,EAAA,SAAA;AAAAC,EAAAA,SAAA,EAAA,KAAA;AAAA,CAO/B;;;;;;;;;;;;;;"}
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 &.${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,CAACJ,kBAAkB,CAAC,CAAA;AAAC,IAAAK,IAAA,GAd3BA,SAc2BA,IAAAA,GAAA;AAAA,EAAA,OAENF,MAAM,CAAA;AAAA,CAAA,CAAA;AAAtC,IAAMG,gBAAgB,gBAAGC,YAAM,CAAAF,IAAA,EAAA,CAAA,CAAA;AAAAG,EAAAA,IAAA,EAAA,kBAAA;AAAAC,EAAAA,OAAAA,EAAA,SAAA;AAAAC,EAAAA,SAAA,EAAA,IAAA;AAAA,CAcrC,EAAA;AAEM,IAAMC,OAAO,gBAAGJ,YAAM,CAAA,KAAA,CAAA,CAAA;AAAAC,EAAAA,IAAA,EAAA,SAAA;AAAAC,EAAAA,OAAAA,EAAA,SAAA;AAAAC,EAAAA,SAAA,EAAA,KAAA;AAAA,CAY5B,EAAA;AAAC,IAAAE,MAAA,GA5CgBA,SA4ChBA,MAAAA,GAAA;AAAA,EAAA,OAIiB,UAAAC,IAAA,EAAA;AAAA,IAAA,IAAGC,aAAAA,GAAAA,IAAAA,CAAAA,aAAAA,CAAAA;AAAAA,IAAAA,OACdA,aAAa,KAAKC,6BAAU,CAACC,IAAI,GAAA,MAAA,CAAAC,MAAA,CAAUC,0BAAM,CAACC,iBAAkB,EAAA,GAAA,CAAA,GAAK,OAAO,CAAA;AAAA,GAAA,CAAA;AAAA,CAAA,CAAA;AAHjF,IAAMC,cAAc,gBAAGb,YAAM,CAAA,KAAA,CAAA,CAAA;AAAAC,EAAAA,IAAA,EA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BAAiB,gBAAG1C,YAAM,CAAA,KAAA,CAAA,CAAA;AAAAC,EAAAA,IAAA,EAAA,mBAAA;AAAAC,EAAAA,OAAAA,EAAA,UAAA;AAAAC,EAAAA,SAAA,EAAA,KAAA;AAAA,CAmEtC,EAAA;AAEM,IAAMwC,UAAU,gBAAG3C,YAAM,CAAA,KAAA,CAAA,CAAA;AAAAC,EAAAA,IAAA,EAAA,YAAA;AAAAC,EAAAA,OAAAA,EAAA,SAAA;AAAAC,EAAAA,SAAA,EAAA,KAAA;AAAA,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,E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AA2C;AAE9DC,EAAAA,mBAAmB,EAAE,8CAA8C;AACnEC,EAAAA,qBAAqB,EAAE,gDAAgD;AACvEC,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;;;;;"}
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,O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AA,oBAAoB,EAAE,8CAA8C;AACpEC,EAAAA,kBAAkB,EAAE,4CAA4C;AAEhEC,EAAAA,4BAA4B,EAAE,yDAAyD;AACvFC,EAAAA,gCAAgC,EAAE,6DAA6D;AAC/FC,EAAAA,UAAU,EAAE,mCAAmC;AAE/CC,EAAAA,gBAAgB,EAAE,0CAA0C;AAC5DC,EAAAA,iBAAiB,EAAE,2CAA2C;AAE9DC,EAAAA,mBAAmB,EAAE,8CAA8C;AACnEC,EAAAA,qBAAqB,EAAE,gDAAgD;AACvEC,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;;;;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"Notification.types.js","sources":["../../../src/components/Notification/Notification.types.ts"],"sourcesContent":["import type { AsProps } from '@salutejs/plasma-core';\nimport { HTMLAttributes, ReactNode, RefAttributes } from 'react';\n\nimport { ComponentConfig, PropsType, Variants } from '../../engines/types';\n\nexport const layouts = {\n horizontal: 'horizontal',\n vertical: 'vertical',\n};\n\nexport type NotificationLayout = keyof typeof layouts;\n\nexport const placements = {\n top: 'top',\n left: 'left',\n};\n\nexport type NotificationIconPlacement = keyof typeof placements;\n\nexport type LayoutType = {\n layout?: NotificationLayout;\n};\n\nexport type IconPlacementType = {\n iconPlacement?: NotificationIconPlacement;\n};\n\nexport type CloseIconType = {\n showCloseIcon?: boolean;\n};\n\nexport interface NotificationProps extends AsProps, HTMLAttributes<HTMLDivElement> {\n /**\n * Заголовок.\n */\n title?: string;\n /**\n * Контент под заголовком.\n */\n children?: ReactNode;\n /**\n * Кнопки снизу/справа для необходимых действий.\n */\n actions?: ReactNode;\n /**\n * Cхема расположение блоков Notification.\n */\n layout?: NotificationLayout;\n /**\n * Иконка слева.\n */\n icon?: ReactNode;\n /**\n * Расположение иконки слева внутри Textbox.\n */\n iconPlacement?: NotificationIconPlacement;\n /**\n * Показывать ли иконку закрытия справа.\n * @default\n * true\n */\n showCloseIcon?: boolean;\n /**\n * Колбек при нажатии на кнопку закрытия.\n */\n onCloseButtonClick?: () => void;\n /**\n * @deprecated\n * Не влияет на отображение компонента.\n * Статус компонента Notification.\n */\n status?: string;\n\n /**\n * Вид Notification.\n */\n view?: string;\n /**\n * Размер Notification (необходимо связать с размером используемых Button).\n */\n size?: string;\n}\n\nexport interface NotificationPortalProps extends HTMLAttributes<HTMLDivElement> {\n /**\n * Конфиг компонента Notification.\n */\n config: ComponentConfig<string, Variants, PropsType<Variants>, NotificationProps & RefAttributes<HTMLDivElement>>;\n /**\n * В каком контейнере позиционируется(по умолчанию document), можно также указать id элемента или ref для него.\n */\n frame?: string;\n}\n"],"names":["layouts","horizontal","vertical","placements","top","left"],"mappings":";;;;AAKO,IAAMA,OAAO,GAAG;AACnBC,EAAAA,UAAU,EAAE,YAAY;AACxBC,EAAAA,QAAQ,EAAE,UAAA;AACd,EAAC;AAIM,IAAMC,UAAU,GAAG;AACtBC,EAAAA,GAAG,EAAE,KAAK;AACVC,EAAAA,IAAI,EAAE,MAAA;AACV;;;;;"}
1
+ {"version":3,"file":"Notification.types.js","sources":["../../../src/components/Notification/Notification.types.ts"],"sourcesContent":["import type { AsProps } from '@salutejs/plasma-core';\nimport { HTMLAttributes, ReactNode } from 'react';\n\nimport { ComponentConfig, PropsType, Variants } from '../../engines/types';\n\nexport const layouts = {\n horizontal: 'horizontal',\n vertical: 'vertical',\n};\n\nexport type NotificationLayout = keyof typeof layouts;\n\nexport const placements = {\n top: 'top',\n left: 'left',\n};\n\nexport type NotificationIconPlacement = keyof typeof placements;\nexport type NotificationPlacement = 'bottom-right' | 'bottom-left';\n\nexport type LayoutType = {\n layout?: NotificationLayout;\n};\n\nexport type IconPlacementType = {\n iconPlacement?: NotificationIconPlacement;\n};\n\nexport type CloseIconType = {\n showCloseIcon?: boolean;\n};\n\nexport interface NotificationProps extends AsProps, Omit<HTMLAttributes<HTMLDivElement>, 'title'> {\n /**\n * Заголовок.\n */\n title?: ReactNode;\n /**\n * Контент под заголовком.\n */\n children?: ReactNode;\n /**\n * Кнопки снизу/справа для необходимых действий.\n */\n actions?: ReactNode;\n /**\n * Cхема расположение блоков Notification.\n */\n layout?: NotificationLayout;\n /**\n * Иконка слева.\n */\n icon?: ReactNode;\n /**\n * Расположение иконки слева внутри Textbox.\n */\n iconPlacement?: NotificationIconPlacement;\n /**\n * Показывать ли иконку закрытия справа.\n * @default\n * true\n */\n showCloseIcon?: boolean;\n /**\n * Колбек при нажатии на кнопку закрытия.\n */\n onCloseButtonClick?: () => void;\n /**\n * @deprecated\n * Не влияет на отображение компонента.\n * Статус компонента Notification.\n */\n status?: string;\n\n /**\n * Вид Notification.\n */\n view?: string;\n /**\n * Размер Notification (необходимо связать с размером используемых Button).\n */\n size?: string;\n}\n\nexport interface NotificationPortalProps extends Omit<HTMLAttributes<HTMLDivElement>, 'title'> {\n /**\n * Конфиг компонента Notification.\n */\n config: ComponentConfig<string, Variants, PropsType<Variants>, NotificationProps & HTMLAttributes<HTMLDivElement>>;\n /**\n * В каком контейнере позиционируется(по умолчанию document), можно также указать id элемента или ref для него.\n */\n frame?: string;\n /**\n * Расположение компонента Notification во frame\n * @default bottom-right\n */\n placement?: NotificationPlacement;\n}\n"],"names":["layouts","horizontal","vertical","placements","top","left"],"mappings":";;;;AAKO,IAAMA,OAAO,GAAG;AACnBC,EAAAA,UAAU,EAAE,YAAY;AACxBC,EAAAA,QAAQ,EAAE,UAAA;AACd,EAAC;AAIM,IAAMC,UAAU,GAAG;AACtBC,EAAAA,GAAG,EAAE,KAAK;AACVC,EAAAA,IAAI,EAAE,MAAA;AACV;;;;;"}
@@ -33,7 +33,9 @@ var StyledPopup = /*#__PURE__*/react$1.styled(_exp())({
33
33
  */
34
34
  var NotificationsPortal = function NotificationsPortal(_ref) {
35
35
  var config = _ref.config,
36
- frame = _ref.frame;
36
+ frame = _ref.frame,
37
+ _ref$placement = _ref.placement,
38
+ placement = _ref$placement === void 0 ? 'bottom-right' : _ref$placement;
37
39
  var _useStoreon = react.useStoreon('notifications'),
38
40
  notifications = _useStoreon.notifications;
39
41
  var Notification = React.useMemo(function () {
@@ -42,7 +44,7 @@ var NotificationsPortal = function NotificationsPortal(_ref) {
42
44
  return /*#__PURE__*/React.createElement(PopupContext.PopupProvider, null, notifications.length > 0 && /*#__PURE__*/React.createElement(StyledPopup, {
43
45
  opened: true,
44
46
  frame: frame,
45
- placement: "bottom-right",
47
+ placement: placement,
46
48
  zIndex: "9100"
47
49
  }, /*#__PURE__*/React.createElement(Notification_styles.StyledRoot, null, notifications.map(function (_ref2) {
48
50
  var id = _ref2.id,
@@ -50,7 +52,7 @@ var NotificationsPortal = function NotificationsPortal(_ref) {
50
52
  rest = _rollupPluginBabelHelpers.objectWithoutProperties(_ref2, _excluded);
51
53
  return /*#__PURE__*/React.createElement(Notification_styles.StyledItemWrapper, {
52
54
  key: id,
53
- 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),
54
56
  isHidden: isHidden || false
55
57
  }, /*#__PURE__*/React.createElement(Notification, _rollupPluginBabelHelpers.extends({
56
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 }) => {\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=\"bottom-right\" 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","_useStoreon","useStoreon","notifications","Notification","useMemo","React","createElement","PopupProvider","length","opened","placement","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,EAA0B;AAAA,EAAA,IAApBC,MAAM,GAAAD,IAAA,CAANC,MAAM;IAAEC,KAAAA,GAAAA,IAAAA,CAAAA,KAAAA,CAAAA;AACvE,EAAA,IAAAC,WAAA,GAA0BC,gBAAU,CAA0C,eAAe,CAAC;IAAtFC,aAAAA,GAAAA,WAAAA,CAAAA,aAAAA,CAAAA;EAER,IAAMC,YAAY,GAAGC,aAAO,CACxB,YAAA;IAAA,OAAMhB,gBAAS,CAACU,MAAM,CAAC,CAAA;GACvB,EAAA,EACJ,CAAC,CAAA;AAED,EAAA,oBACIO,KAAA,CAAAC,aAAA,CAACC,0BAAa,QACTL,aAAa,CAACM,MAAM,GAAG,CAAC,iBACrBH,KAAA,CAAAC,aAAA,CAACf,WAAW,EAAA;IAACkB,MAAM,EAAA,IAAA;AAACV,IAAAA,KAAK,EAAEA,KAAM;AAACW,IAAAA,SAAS,EAAC,cAAc;AAACC,IAAAA,MAAM,EAAC,MAAA;GAC9DN,eAAAA,KAAA,CAAAC,aAAA,CAACM,8BAAU,EACNV,IAAAA,EAAAA,aAAa,CAACW,GAAG,CAAC,UAAAC,KAAA,EAAA;AAAA,IAAA,IAAGC,EAAE,GAAAD,KAAA,CAAFC,EAAE;MAAEC,QAAQ,GAAAF,KAAA,CAARE,QAAQ;AAAKC,MAAAA,IAAAA,GAAAA,iDAAAA,CAAAA,KAAAA,EAAAA,SAAAA,CAAAA,CAAAA;AAAAA,IAAAA,oBACnCZ,KAAA,CAAAC,aAAA,CAACY,qCAAiB,EAAA;AACdC,MAAAA,GAAG,EAAEJ,EAAG;AACRK,MAAAA,SAAS,EAAEC,QAAE,CACTL,QAAQ,GAAGM,2BAAO,CAACC,sBAAsB,GAAGD,2BAAO,CAACE,sBACxD,CAAE;MACFR,QAAQ,EAAEA,QAAQ,IAAI,KAAA;AAAM,KAAA,eAE5BX,KAAA,CAAAC,aAAA,CAACH,YAAY,EAAAsB,iCAAA,CAAA;AACTN,MAAAA,GAAG,EAAEJ,EAAG;AACRA,MAAAA,EAAE,EAAEA,EAAG;MACPW,kBAAkB,EAAE,SAAAA,kBAAA,GAAA;QAAA,OAAMC,oCAAiB,CAACZ,EAAE,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,gBAA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AAD,KAAA,CAAFC,EAAE;MAAEC,QAAQ,GAAAF,KAAA,CAARE,QAAQ;AAAKC,MAAAA,IAAAA,GAAAA,iDAAAA,CAAAA,KAAAA,EAAAA,SAAAA,CAAAA,CAAAA;AAAAA,IAAAA,oBACnCX,KAAA,CAAAC,aAAA,CAACW,qCAAiB,EAAA;AACdC,MAAAA,GAAG,EAAEJ,EAAG;MACRK,SAAS,EAAEC,QAAE,CACTL,QAAQ,GAAGM,2BAAO,CAACC,sBAAsB,GAAGD,2BAAO,CAACE,sBAAsB,EAC1ExB,SAAS,KAAK,aAAa,IAAIsB,2BAAO,CAACG,gCAC3C,CAAE;MACFT,QAAQ,EAAEA,QAAQ,IAAI,KAAA;AAAM,KAAA,eAE5BV,KAAA,CAAAC,aAAA,CAACH,YAAY,EAAAsB,iCAAA,CAAA;AACTP,MAAAA,GAAG,EAAEJ,EAAG;AACRA,MAAAA,EAAE,EAAEA,EAAG;MACPY,kBAAkB,EAAE,SAAAA,kBAAA,GAAA;QAAA,OAAMC,oCAAiB,CAACb,EAAE,CAAC,CAAA;AAAA,OAAA;KAC3CE,EAAAA,IAAI,CAAC,CAEE,CACtB,CAAA;GACO,CAAA,CACH,CAEN,CAAC,CAAA;AAExB;;;;"}
@@ -29,16 +29,16 @@
29
29
  .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);}
30
30
  .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;}
31
31
 
32
- .Notification_styles_7h8hp0_sb12p__2b784e15{width:-webkit-fit-content;width:-moz-fit-content;width:fit-content;}
33
- .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;}
34
- .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);}
35
- .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;}
36
- .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;}
37
- .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;}
38
- .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;}
39
- .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;}
40
- .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);}
41
- .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;}}
42
- .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;}
32
+ .Notification_styles_1cf2gwd_sb12p__3923b472{width:-webkit-fit-content;width:-moz-fit-content;width:fit-content;}
33
+ .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;}
34
+ .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);}
35
+ .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;}
36
+ .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;}
37
+ .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;}
38
+ .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;}
39
+ .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;}
40
+ .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);}
41
+ .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;}}
42
+ .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;}
43
43
 
44
44
  .NotificationsPortal_6417q6_s19gbs9t__4166aeb6 > .NotificationsPortal_6417q6_popupBaseRoot__4166aeb6{overflow:hidden;}
@@ -10,11 +10,13 @@ var NotificationsPortal = require('./NotificationsPortal.js');
10
10
  var NotificationsProvider = function NotificationsProvider(_ref) {
11
11
  var children = _ref.children,
12
12
  config = _ref.config,
13
- frame = _ref.frame;
13
+ frame = _ref.frame,
14
+ placement = _ref.placement;
14
15
  return /*#__PURE__*/React.createElement(react.StoreContext.Provider, {
15
16
  value: NotificationsStore.NotificationsStore
16
17
  }, children, /*#__PURE__*/React.createElement(NotificationsPortal.NotificationsPortal, {
17
18
  frame: frame,
19
+ placement: placement,
18
20
  config: config
19
21
  }));
20
22
  };
@@ -1 +1 @@
1
- {"version":3,"file":"NotificationsProvider.js","sources":["../../../src/components/Notification/NotificationsProvider.tsx"],"sourcesContent":["import React, { FC, ReactNode, RefAttributes } from 'react';\nimport { StoreContext } from 'storeon/react';\n\nimport { ComponentConfig } from '../../engines';\nimport { PropsType, Variants } from '../../engines/types';\n\nimport { NotificationsStore } from './NotificationsStore';\nimport { NotificationsPortal } from './NotificationsPortal';\nimport { NotificationProps } from './Notification.types';\n\nexport const NotificationsProvider: FC<{\n children: ReactNode;\n config: ComponentConfig<string, Variants, PropsType<Variants>, NotificationProps & RefAttributes<HTMLDivElement>>;\n frame?: string;\n}> = ({ children, config, frame }) => {\n return (\n <StoreContext.Provider value={NotificationsStore}>\n {children}\n <NotificationsPortal frame={frame} config={config} />\n </StoreContext.Provider>\n );\n};\n"],"names":["NotificationsProvider","_ref","children","config","frame","React","createElement","StoreContext","Provider","value","NotificationsStore","NotificationsPortal"],"mappings":";;;;;;;;;IAUaA,qBAIX,GAAG,SAJQA,qBAIXA,CAAAC,IAAA,EAAoC;AAAA,EAAA,IAA9BC,QAAQ,GAAAD,IAAA,CAARC,QAAQ;IAAEC,MAAM,GAAAF,IAAA,CAANE,MAAM;IAAEC,KAAK,GAAAH,IAAA,CAALG,KAAK,CAAA;AAC3B,EAAA,oBACIC,KAAA,CAAAC,aAAA,CAACC,kBAAY,CAACC,QAAQ,EAAA;AAACC,IAAAA,KAAK,EAAEC,qCAAAA;AAAmB,GAAA,EAC5CR,QAAQ,eACTG,KAAA,CAAAC,aAAA,CAACK,uCAAmB,EAAA;AAACP,IAAAA,KAAK,EAAEA,KAAM;AAACD,IAAAA,MAAM,EAAEA,MAAAA;AAAO,GAAE,CACjC,CAAC,CAAA;AAEhC;;;;"}
1
+ {"version":3,"file":"NotificationsProvider.js","sources":["../../../src/components/Notification/NotificationsProvider.tsx"],"sourcesContent":["import React, { FC, HTMLAttributes, ReactNode } from 'react';\nimport { StoreContext } from 'storeon/react';\n\nimport { ComponentConfig } from '../../engines';\nimport { PropsType, Variants } from '../../engines/types';\n\nimport { NotificationsStore } from './NotificationsStore';\nimport { NotificationsPortal } from './NotificationsPortal';\nimport { NotificationPlacement, NotificationProps } from './Notification.types';\n\nexport const NotificationsProvider: FC<{\n children: ReactNode;\n config: ComponentConfig<string, Variants, PropsType<Variants>, NotificationProps & HTMLAttributes<HTMLDivElement>>;\n frame?: string;\n placement?: NotificationPlacement;\n}> = ({ children, config, frame, placement }) => {\n return (\n <StoreContext.Provider value={NotificationsStore}>\n {children}\n <NotificationsPortal frame={frame} placement={placement} config={config} />\n </StoreContext.Provider>\n );\n};\n"],"names":["NotificationsProvider","_ref","children","config","frame","placement","React","createElement","StoreContext","Provider","value","NotificationsStore","NotificationsPortal"],"mappings":";;;;;;;;;IAUaA,qBAKX,GAAG,SALQA,qBAKXA,CAAAC,IAAA,EAA+C;AAAA,EAAA,IAAzCC,QAAQ,GAAAD,IAAA,CAARC,QAAQ;IAAEC,MAAM,GAAAF,IAAA,CAANE,MAAM;IAAEC,KAAK,GAAAH,IAAA,CAALG,KAAK;IAAEC,SAAS,GAAAJ,IAAA,CAATI,SAAS,CAAA;AACtC,EAAA,oBACIC,KAAA,CAAAC,aAAA,CAACC,kBAAY,CAACC,QAAQ,EAAA;AAACC,IAAAA,KAAK,EAAEC,qCAAAA;AAAmB,GAAA,EAC5CT,QAAQ,eACTI,KAAA,CAAAC,aAAA,CAACK,uCAAmB,EAAA;AAACR,IAAAA,KAAK,EAAEA,KAAM;AAACC,IAAAA,SAAS,EAAEA,SAAU;AAACF,IAAAA,MAAM,EAAEA,MAAAA;AAAO,GAAE,CACvD,CAAC,CAAA;AAEhC;;;;"}
@@ -19,9 +19,9 @@ var updateDescendants = require('./utils/updateDescendants.js');
19
19
  var updateAncestors = require('./utils/updateAncestors.js');
20
20
  var updateSingleAncestors = require('./utils/updateSingleAncestors.js');
21
21
  var getView = require('./utils/getView.js');
22
- var getPopoverPlacement = require('../../utils/getPopoverPlacement.js');
23
22
  var Target = require('./ui/Target/Target.js');
24
23
  var Inner = require('./ui/Inner/Inner.js');
24
+ var getPopoverPlacement = require('../../utils/getPopoverPlacement.js');
25
25
 
26
26
  var _excluded = ["value", "onChange", "target", "items", "placement", "label", "labelPlacement", "placeholder", "helperText", "disabled", "view", "size", "listOverflow", "listHeight", "listWidth", "contentLeft", "onScrollBottom", "chipView", "variant", "portal", "renderValue", "renderItem", "status", "onItemSelect", "separator", "closeAfterSelect"];
27
27
  var Context = /*#__PURE__*/React.createContext({});
@@ -1 +1 @@
1
- {"version":3,"file":"getCorrectHeight.js","sources":["../../../../src/components/Select/utils/getCorrectHeight.ts"],"sourcesContent":["import type { CSSProperties } from 'react';\n\nexport const getCorrectHeight = (listHeight: NonNullable<CSSProperties['height']>): string => {\n if (Number.isNaN(Number(listHeight))) {\n return listHeight.toString();\n }\n return `${listHeight}rem`;\n};\n"],"names":["getCorrectHeight","listHeight","Number","isNaN","toString","concat"],"mappings":";;;;IAEaA,gBAAgB,GAAG,SAAnBA,gBAAgBA,CAAIC,UAAgD,EAAa;EAC1F,IAAIC,MAAM,CAACC,KAAK,CAACD,MAAM,CAACD,UAAU,CAAC,CAAC,EAAE;AAClC,IAAA,OAAOA,UAAU,CAACG,QAAQ,EAAE,CAAA;AAChC,GAAA;EACA,OAAAC,EAAAA,CAAAA,MAAA,CAAUJ,UAAU,EAAA,KAAA,CAAA,CAAA;AACxB;;;;"}
1
+ {"version":3,"file":"getCorrectHeight.js","sources":["../../../../src/components/Select/utils/getCorrectHeight.ts"],"sourcesContent":["import type { DropdownProps } from '../../Dropdown';\n\nexport const getCorrectHeight = (listHeight: Required<DropdownProps>['listHeight']): string => {\n if (Number.isNaN(Number(listHeight))) {\n return listHeight.toString();\n }\n return `${listHeight}rem`;\n};\n"],"names":["getCorrectHeight","listHeight","Number","isNaN","toString","concat"],"mappings":";;;;IAEaA,gBAAgB,GAAG,SAAnBA,gBAAgBA,CAAIC,UAAiD,EAAa;EAC3F,IAAIC,MAAM,CAACC,KAAK,CAACD,MAAM,CAACD,UAAU,CAAC,CAAC,EAAE;AAClC,IAAA,OAAOA,UAAU,CAACG,QAAQ,EAAE,CAAA;AAChC,GAAA;EACA,OAAAC,EAAAA,CAAAA,MAAA,CAAUJ,UAAU,EAAA,KAAA,CAAA,CAAA;AACxB;;;;"}
@@ -10,7 +10,7 @@ var useOutsideClick = function useOutsideClick(callback, secondaryRef) {
10
10
  var handleClickOutside = function handleClickOutside(event) {
11
11
  if (ref.current && !ref.current.contains(event.target)) {
12
12
  if (!(secondaryRef !== null && secondaryRef !== void 0 && secondaryRef.current) || secondaryRef.current && !secondaryRef.current.contains(event.target)) {
13
- callback(event);
13
+ callback();
14
14
  }
15
15
  }
16
16
  };
@@ -1 +1 @@
1
- {"version":3,"file":"useOutsideClick.js","sources":["../../src/hooks/useOutsideClick.ts"],"sourcesContent":["import { useEffect, useRef } from 'react';\nimport type { RefObject } from 'react';\n\nexport const useOutsideClick = <T extends HTMLElement = HTMLElement>(\n callback: (event: MouseEvent | TouchEvent) => void,\n secondaryRef?: RefObject<HTMLElement | null> | null,\n) => {\n const ref = useRef<T | null>(null);\n\n useEffect(() => {\n const handleClickOutside = (event: MouseEvent | TouchEvent) => {\n if (ref.current && !ref.current.contains(event.target as Node)) {\n if (\n !secondaryRef?.current ||\n (secondaryRef.current && !secondaryRef.current.contains(event.target as Node))\n ) {\n callback(event);\n }\n }\n };\n\n document.addEventListener('mouseup', handleClickOutside);\n document.addEventListener('touchend', handleClickOutside);\n\n return () => {\n document.removeEventListener('mouseup', handleClickOutside);\n document.removeEventListener('touchend', handleClickOutside);\n };\n }, [callback]);\n\n return ref;\n};\n"],"names":["useOutsideClick","callback","secondaryRef","ref","useRef","useEffect","handleClickOutside","event","current","contains","target","document","addEventListener","removeEventListener"],"mappings":";;;;;;AAGO,IAAMA,eAAe,GAAG,SAAlBA,eAAeA,CACxBC,QAAkD,EAClDC,YAAmD,EAClD;AACD,EAAA,IAAMC,GAAG,GAAGC,YAAM,CAAW,IAAI,CAAC,CAAA;AAElCC,EAAAA,eAAS,CAAC,YAAM;AACZ,IAAA,IAAMC,kBAAkB,GAAG,SAArBA,kBAAkBA,CAAIC,KAA8B,EAAK;AAC3D,MAAA,IAAIJ,GAAG,CAACK,OAAO,IAAI,CAACL,GAAG,CAACK,OAAO,CAACC,QAAQ,CAACF,KAAK,CAACG,MAAc,CAAC,EAAE;QAC5D,IACI,EAACR,YAAY,KAAA,IAAA,IAAZA,YAAY,KAAA,KAAA,CAAA,IAAZA,YAAY,CAAEM,OAAO,CACrBN,IAAAA,YAAY,CAACM,OAAO,IAAI,CAACN,YAAY,CAACM,OAAO,CAACC,QAAQ,CAACF,KAAK,CAACG,MAAc,CAAE,EAChF;UACET,QAAQ,CAACM,KAAK,CAAC,CAAA;AACnB,SAAA;AACJ,OAAA;KACH,CAAA;AAEDI,IAAAA,QAAQ,CAACC,gBAAgB,CAAC,SAAS,EAAEN,kBAAkB,CAAC,CAAA;AACxDK,IAAAA,QAAQ,CAACC,gBAAgB,CAAC,UAAU,EAAEN,kBAAkB,CAAC,CAAA;AAEzD,IAAA,OAAO,YAAM;AACTK,MAAAA,QAAQ,CAACE,mBAAmB,CAAC,SAAS,EAAEP,kBAAkB,CAAC,CAAA;AAC3DK,MAAAA,QAAQ,CAACE,mBAAmB,CAAC,UAAU,EAAEP,kBAAkB,CAAC,CAAA;KAC/D,CAAA;AACL,GAAC,EAAE,CAACL,QAAQ,CAAC,CAAC,CAAA;AAEd,EAAA,OAAOE,GAAG,CAAA;AACd;;;;"}
1
+ {"version":3,"file":"useOutsideClick.js","sources":["../../src/hooks/useOutsideClick.ts"],"sourcesContent":["import { useEffect, useRef } from 'react';\nimport type { RefObject } from 'react';\n\nexport const useOutsideClick = <T extends HTMLElement = HTMLElement>(\n callback: () => void,\n secondaryRef?: RefObject<HTMLElement | null> | null,\n) => {\n const ref = useRef<T | null>(null);\n useEffect(() => {\n const handleClickOutside = (event: MouseEvent | TouchEvent) => {\n if (ref.current && !ref.current.contains(event.target as Node)) {\n if (\n !secondaryRef?.current ||\n (secondaryRef.current && !secondaryRef.current.contains(event.target as Node))\n ) {\n callback();\n }\n }\n };\n\n document.addEventListener('mouseup', handleClickOutside);\n document.addEventListener('touchend', handleClickOutside);\n\n return () => {\n document.removeEventListener('mouseup', handleClickOutside);\n document.removeEventListener('touchend', handleClickOutside);\n };\n }, [callback]);\n\n return ref;\n};\n"],"names":["useOutsideClick","callback","secondaryRef","ref","useRef","useEffect","handleClickOutside","event","current","contains","target","document","addEventListener","removeEventListener"],"mappings":";;;;;;AAGO,IAAMA,eAAe,GAAG,SAAlBA,eAAeA,CACxBC,QAAoB,EACpBC,YAAmD,EAClD;AACD,EAAA,IAAMC,GAAG,GAAGC,YAAM,CAAW,IAAI,CAAC,CAAA;AAClCC,EAAAA,eAAS,CAAC,YAAM;AACZ,IAAA,IAAMC,kBAAkB,GAAG,SAArBA,kBAAkBA,CAAIC,KAA8B,EAAK;AAC3D,MAAA,IAAIJ,GAAG,CAACK,OAAO,IAAI,CAACL,GAAG,CAACK,OAAO,CAACC,QAAQ,CAACF,KAAK,CAACG,MAAc,CAAC,EAAE;QAC5D,IACI,EAACR,YAAY,KAAA,IAAA,IAAZA,YAAY,KAAA,KAAA,CAAA,IAAZA,YAAY,CAAEM,OAAO,CACrBN,IAAAA,YAAY,CAACM,OAAO,IAAI,CAACN,YAAY,CAACM,OAAO,CAACC,QAAQ,CAACF,KAAK,CAACG,MAAc,CAAE,EAChF;AACET,UAAAA,QAAQ,EAAE,CAAA;AACd,SAAA;AACJ,OAAA;KACH,CAAA;AAEDU,IAAAA,QAAQ,CAACC,gBAAgB,CAAC,SAAS,EAAEN,kBAAkB,CAAC,CAAA;AACxDK,IAAAA,QAAQ,CAACC,gBAAgB,CAAC,UAAU,EAAEN,kBAAkB,CAAC,CAAA;AAEzD,IAAA,OAAO,YAAM;AACTK,MAAAA,QAAQ,CAACE,mBAAmB,CAAC,SAAS,EAAEP,kBAAkB,CAAC,CAAA;AAC3DK,MAAAA,QAAQ,CAACE,mBAAmB,CAAC,UAAU,EAAEP,kBAAkB,CAAC,CAAA;KAC/D,CAAA;AACL,GAAC,EAAE,CAACL,QAAQ,CAAC,CAAC,CAAA;AAEd,EAAA,OAAOE,GAAG,CAAA;AACd;;;;"}