@salutejs/plasma-new-hope 0.174.0-canary.1511.11518967304.0 → 0.174.1-canary.1512.11549467998.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (391) hide show
  1. package/cjs/components/Drawer/Drawer.js +2 -1
  2. package/cjs/components/Drawer/Drawer.js.map +1 -1
  3. package/cjs/components/Dropdown/ui/DropdownOld/DropdownOld.js +2 -1
  4. package/cjs/components/Dropdown/ui/DropdownOld/DropdownOld.js.map +1 -1
  5. package/cjs/components/Popover/Popover.js +2 -1
  6. package/cjs/components/Popover/Popover.js.map +1 -1
  7. package/cjs/components/ViewContainer/ViewContainer.js +38 -0
  8. package/cjs/components/ViewContainer/ViewContainer.js.map +1 -0
  9. package/cjs/components/ViewContainer/ViewContainer_yiqfcb.css +1 -0
  10. package/cjs/components/{NumberInput/variations → ViewContainer}/_view/base.js +2 -2
  11. package/cjs/components/ViewContainer/_view/base.js.map +1 -0
  12. package/cjs/index.css +1 -24
  13. package/cjs/index.js +3 -6
  14. package/cjs/index.js.map +1 -1
  15. package/emotion/cjs/components/Drawer/Drawer.js +4 -3
  16. package/emotion/cjs/components/Dropdown/ui/DropdownOld/DropdownOld.js +2 -1
  17. package/emotion/cjs/components/Popover/Popover.js +2 -1
  18. package/emotion/cjs/components/ViewContainer/ViewContainer.js +49 -0
  19. package/emotion/cjs/components/ViewContainer/ViewContainer.template-doc.mdx +82 -0
  20. package/emotion/cjs/components/ViewContainer/_view/base.js +8 -0
  21. package/emotion/cjs/components/ViewContainer/_view/tokens.json +1 -0
  22. package/emotion/cjs/components/ViewContainer/index.js +18 -0
  23. package/emotion/cjs/examples/_helpers.js +3 -14
  24. package/emotion/cjs/examples/plasma_b2c/components/ViewContainer/ViewContainer.config.js +16 -0
  25. package/emotion/cjs/examples/plasma_b2c/components/ViewContainer/ViewContainer.js +11 -0
  26. package/emotion/cjs/examples/plasma_b2c/components/ViewContainer/ViewContainer.stories.tsx +65 -0
  27. package/emotion/cjs/examples/plasma_web/components/ViewContainer/ViewContainer.config.js +16 -0
  28. package/emotion/cjs/examples/plasma_web/components/ViewContainer/ViewContainer.js +11 -0
  29. package/emotion/cjs/examples/plasma_web/components/ViewContainer/ViewContainer.stories.tsx +65 -0
  30. package/emotion/cjs/index.js +4 -4
  31. package/emotion/es/components/Drawer/Drawer.js +2 -1
  32. package/emotion/es/components/Dropdown/ui/DropdownOld/DropdownOld.js +2 -1
  33. package/emotion/es/components/Popover/Popover.js +2 -1
  34. package/emotion/es/components/ViewContainer/ViewContainer.js +40 -0
  35. package/emotion/es/components/ViewContainer/ViewContainer.template-doc.mdx +82 -0
  36. package/emotion/es/components/ViewContainer/_view/base.js +2 -0
  37. package/emotion/es/components/ViewContainer/_view/tokens.json +1 -0
  38. package/emotion/es/components/ViewContainer/index.js +1 -0
  39. package/emotion/es/examples/_helpers.js +3 -14
  40. package/emotion/es/examples/plasma_b2c/components/ViewContainer/ViewContainer.config.js +10 -0
  41. package/emotion/es/examples/plasma_b2c/components/ViewContainer/ViewContainer.js +5 -0
  42. package/emotion/es/examples/plasma_b2c/components/ViewContainer/ViewContainer.stories.tsx +65 -0
  43. package/emotion/es/examples/plasma_web/components/ViewContainer/ViewContainer.config.js +10 -0
  44. package/emotion/es/examples/plasma_web/components/ViewContainer/ViewContainer.js +5 -0
  45. package/emotion/es/examples/plasma_web/components/ViewContainer/ViewContainer.stories.tsx +65 -0
  46. package/emotion/es/index.js +1 -1
  47. package/es/components/Drawer/Drawer.js +2 -1
  48. package/es/components/Drawer/Drawer.js.map +1 -1
  49. package/es/components/Dropdown/ui/DropdownOld/DropdownOld.js +2 -1
  50. package/es/components/Dropdown/ui/DropdownOld/DropdownOld.js.map +1 -1
  51. package/es/components/Popover/Popover.js +2 -1
  52. package/es/components/Popover/Popover.js.map +1 -1
  53. package/es/components/ViewContainer/ViewContainer.js +33 -0
  54. package/es/components/ViewContainer/ViewContainer.js.map +1 -0
  55. package/es/components/ViewContainer/ViewContainer_yiqfcb.css +1 -0
  56. package/es/components/{NumberInput/variations/_segmentation → ViewContainer/_view}/base.js +2 -2
  57. package/es/components/ViewContainer/_view/base.js.map +1 -0
  58. package/es/index.css +1 -24
  59. package/es/index.js +1 -2
  60. package/es/index.js.map +1 -1
  61. package/package.json +3 -2
  62. package/styled-components/cjs/components/Drawer/Drawer.js +4 -3
  63. package/styled-components/cjs/components/Dropdown/ui/DropdownOld/DropdownOld.js +2 -1
  64. package/styled-components/cjs/components/Popover/Popover.js +2 -1
  65. package/styled-components/cjs/components/ViewContainer/ViewContainer.js +40 -0
  66. package/styled-components/cjs/components/ViewContainer/ViewContainer.template-doc.mdx +82 -0
  67. package/styled-components/cjs/components/{NumberInput/NumberInput.styles.js → ViewContainer/_view/base.js} +1 -1
  68. package/styled-components/cjs/components/ViewContainer/_view/tokens.json +1 -0
  69. package/styled-components/cjs/components/ViewContainer/index.js +18 -0
  70. package/styled-components/cjs/examples/_helpers.js +3 -14
  71. package/styled-components/cjs/examples/plasma_b2c/components/ViewContainer/ViewContainer.config.js +16 -0
  72. package/styled-components/cjs/examples/plasma_b2c/components/ViewContainer/ViewContainer.js +11 -0
  73. package/styled-components/cjs/examples/plasma_b2c/components/ViewContainer/ViewContainer.stories.tsx +65 -0
  74. package/styled-components/cjs/examples/plasma_web/components/ViewContainer/ViewContainer.config.js +16 -0
  75. package/styled-components/cjs/examples/plasma_web/components/ViewContainer/ViewContainer.js +11 -0
  76. package/styled-components/cjs/examples/plasma_web/components/ViewContainer/ViewContainer.stories.tsx +65 -0
  77. package/styled-components/cjs/index.js +4 -4
  78. package/styled-components/es/components/Drawer/Drawer.js +2 -1
  79. package/styled-components/es/components/Dropdown/ui/DropdownOld/DropdownOld.js +2 -1
  80. package/styled-components/es/components/Popover/Popover.js +2 -1
  81. package/styled-components/es/components/ViewContainer/ViewContainer.js +31 -0
  82. package/styled-components/es/components/ViewContainer/ViewContainer.template-doc.mdx +82 -0
  83. package/styled-components/es/components/ViewContainer/_view/base.js +2 -0
  84. package/styled-components/es/components/ViewContainer/_view/tokens.json +1 -0
  85. package/styled-components/es/components/ViewContainer/index.js +1 -0
  86. package/styled-components/es/examples/_helpers.js +3 -14
  87. package/styled-components/es/examples/plasma_b2c/components/ViewContainer/ViewContainer.config.js +10 -0
  88. package/styled-components/es/examples/plasma_b2c/components/ViewContainer/ViewContainer.js +5 -0
  89. package/styled-components/es/examples/plasma_b2c/components/ViewContainer/ViewContainer.stories.tsx +65 -0
  90. package/styled-components/es/examples/plasma_web/components/ViewContainer/ViewContainer.config.js +10 -0
  91. package/styled-components/es/examples/plasma_web/components/ViewContainer/ViewContainer.js +5 -0
  92. package/styled-components/es/examples/plasma_web/components/ViewContainer/ViewContainer.stories.tsx +65 -0
  93. package/styled-components/es/index.js +1 -1
  94. package/types/components/Drawer/Drawer.d.ts.map +1 -1
  95. package/types/components/Dropdown/ui/DropdownOld/DropdownOld.d.ts.map +1 -1
  96. package/types/components/Popover/Popover.d.ts.map +1 -1
  97. package/types/components/ViewContainer/ViewContainer.d.ts +26 -0
  98. package/types/components/ViewContainer/ViewContainer.d.ts.map +1 -0
  99. package/types/components/ViewContainer/_view/base.d.ts.map +1 -0
  100. package/types/components/ViewContainer/index.d.ts +2 -0
  101. package/types/components/ViewContainer/index.d.ts.map +1 -0
  102. package/types/examples/_helpers.d.ts.map +1 -1
  103. package/types/examples/plasma_b2c/components/ViewContainer/ViewContainer.config.d.ts +9 -0
  104. package/types/examples/plasma_b2c/components/ViewContainer/ViewContainer.config.d.ts.map +1 -0
  105. package/types/examples/plasma_b2c/components/ViewContainer/ViewContainer.d.ts +8 -0
  106. package/types/examples/plasma_b2c/components/ViewContainer/ViewContainer.d.ts.map +1 -0
  107. package/types/examples/plasma_web/components/ViewContainer/ViewContainer.config.d.ts +9 -0
  108. package/types/examples/plasma_web/components/ViewContainer/ViewContainer.config.d.ts.map +1 -0
  109. package/types/examples/plasma_web/components/ViewContainer/ViewContainer.d.ts +8 -0
  110. package/types/examples/plasma_web/components/ViewContainer/ViewContainer.d.ts.map +1 -0
  111. package/types/index.d.ts +1 -1
  112. package/types/index.d.ts.map +1 -1
  113. package/cjs/components/NumberInput/NumberInput.css +0 -54
  114. package/cjs/components/NumberInput/NumberInput.js +0 -188
  115. package/cjs/components/NumberInput/NumberInput.js.map +0 -1
  116. package/cjs/components/NumberInput/NumberInput.styles.js +0 -9
  117. package/cjs/components/NumberInput/NumberInput.styles.js.map +0 -1
  118. package/cjs/components/NumberInput/NumberInput.styles_jeawjl.css +0 -1
  119. package/cjs/components/NumberInput/NumberInput.tokens.js +0 -90
  120. package/cjs/components/NumberInput/NumberInput.tokens.js.map +0 -1
  121. package/cjs/components/NumberInput/ui/ActionButton/ActionButton.js +0 -19
  122. package/cjs/components/NumberInput/ui/ActionButton/ActionButton.js.map +0 -1
  123. package/cjs/components/NumberInput/ui/ActionButton/ActionButton.styles.js +0 -22
  124. package/cjs/components/NumberInput/ui/ActionButton/ActionButton.styles.js.map +0 -1
  125. package/cjs/components/NumberInput/ui/Input/Input.css +0 -15
  126. package/cjs/components/NumberInput/ui/Input/Input.js +0 -190
  127. package/cjs/components/NumberInput/ui/Input/Input.js.map +0 -1
  128. package/cjs/components/NumberInput/ui/Input/Input.styles.js +0 -96
  129. package/cjs/components/NumberInput/ui/Input/Input.styles.js.map +0 -1
  130. package/cjs/components/NumberInput/ui/Input/Input.styles_jszc0c.css +0 -8
  131. package/cjs/components/NumberInput/utils/index.js +0 -8
  132. package/cjs/components/NumberInput/utils/index.js.map +0 -1
  133. package/cjs/components/NumberInput/variations/_background-type/base.js +0 -9
  134. package/cjs/components/NumberInput/variations/_background-type/base.js.map +0 -1
  135. package/cjs/components/NumberInput/variations/_background-type/base_1jmdljr.css +0 -1
  136. package/cjs/components/NumberInput/variations/_clear/base.js +0 -9
  137. package/cjs/components/NumberInput/variations/_clear/base.js.map +0 -1
  138. package/cjs/components/NumberInput/variations/_clear/base_3l8dqb.css +0 -1
  139. package/cjs/components/NumberInput/variations/_disabled/base.js +0 -9
  140. package/cjs/components/NumberInput/variations/_disabled/base.js.map +0 -1
  141. package/cjs/components/NumberInput/variations/_disabled/base_1sl0mh8.css +0 -1
  142. package/cjs/components/NumberInput/variations/_segmentation/base.js +0 -9
  143. package/cjs/components/NumberInput/variations/_segmentation/base.js.map +0 -1
  144. package/cjs/components/NumberInput/variations/_segmentation/base_nl8ve.css +0 -1
  145. package/cjs/components/NumberInput/variations/_shape/base.js +0 -9
  146. package/cjs/components/NumberInput/variations/_shape/base.js.map +0 -1
  147. package/cjs/components/NumberInput/variations/_shape/base_k05biw.css +0 -1
  148. package/cjs/components/NumberInput/variations/_size/base.js +0 -9
  149. package/cjs/components/NumberInput/variations/_size/base.js.map +0 -1
  150. package/cjs/components/NumberInput/variations/_size/base_1pju5qf.css +0 -1
  151. package/cjs/components/NumberInput/variations/_view/base.js.map +0 -1
  152. package/cjs/components/NumberInput/variations/_view/base_cghr9q.css +0 -1
  153. package/emotion/cjs/components/NumberInput/NumberInput.js +0 -198
  154. package/emotion/cjs/components/NumberInput/NumberInput.styles.js +0 -17
  155. package/emotion/cjs/components/NumberInput/NumberInput.tokens.js +0 -87
  156. package/emotion/cjs/components/NumberInput/NumberInput.types.js +0 -5
  157. package/emotion/cjs/components/NumberInput/index.js +0 -31
  158. package/emotion/cjs/components/NumberInput/ui/ActionButton/ActionButton.js +0 -18
  159. package/emotion/cjs/components/NumberInput/ui/ActionButton/ActionButton.styles.js +0 -16
  160. package/emotion/cjs/components/NumberInput/ui/ActionButton/ActionButton.types.js +0 -5
  161. package/emotion/cjs/components/NumberInput/ui/Input/Input.js +0 -198
  162. package/emotion/cjs/components/NumberInput/ui/Input/Input.styles.js +0 -82
  163. package/emotion/cjs/components/NumberInput/ui/Input/Input.types.js +0 -5
  164. package/emotion/cjs/components/NumberInput/ui/index.js +0 -19
  165. package/emotion/cjs/components/NumberInput/utils/index.js +0 -7
  166. package/emotion/cjs/components/NumberInput/variations/_background-type/base.js +0 -10
  167. package/emotion/cjs/components/NumberInput/variations/_background-type/tokens.json +0 -6
  168. package/emotion/cjs/components/NumberInput/variations/_clear/base.js +0 -12
  169. package/emotion/cjs/components/NumberInput/variations/_clear/tokens.json +0 -5
  170. package/emotion/cjs/components/NumberInput/variations/_disabled/base.js +0 -9
  171. package/emotion/cjs/components/NumberInput/variations/_disabled/tokens.json +0 -4
  172. package/emotion/cjs/components/NumberInput/variations/_segmentation/base.js +0 -12
  173. package/emotion/cjs/components/NumberInput/variations/_segmentation/tokens.json +0 -1
  174. package/emotion/cjs/components/NumberInput/variations/_shape/base.js +0 -11
  175. package/emotion/cjs/components/NumberInput/variations/_shape/tokens.json +0 -1
  176. package/emotion/cjs/components/NumberInput/variations/_size/base.js +0 -13
  177. package/emotion/cjs/components/NumberInput/variations/_size/tokens.json +0 -22
  178. package/emotion/cjs/components/NumberInput/variations/_view/base.js +0 -13
  179. package/emotion/cjs/components/NumberInput/variations/_view/tokens.json +0 -14
  180. package/emotion/cjs/examples/plasma_b2c/components/NumberInput/NumberInput.config.js +0 -48
  181. package/emotion/cjs/examples/plasma_b2c/components/NumberInput/NumberInput.js +0 -11
  182. package/emotion/cjs/examples/plasma_b2c/components/NumberInput/NumberInput.stories.tsx +0 -109
  183. package/emotion/cjs/examples/plasma_web/components/NumberInput/NumberInput.config.js +0 -48
  184. package/emotion/cjs/examples/plasma_web/components/NumberInput/NumberInput.js +0 -11
  185. package/emotion/cjs/examples/plasma_web/components/NumberInput/NumberInput.stories.tsx +0 -109
  186. package/emotion/cjs/examples/themes/declaration.d.ts +0 -4
  187. package/emotion/cjs/examples/themes/index.js +0 -15
  188. package/emotion/cjs/examples/themes/plasma_b2c.module.css +0 -984
  189. package/emotion/cjs/examples/themes/plasma_web.module.css +0 -984
  190. package/emotion/es/components/NumberInput/NumberInput.js +0 -190
  191. package/emotion/es/components/NumberInput/NumberInput.styles.js +0 -11
  192. package/emotion/es/components/NumberInput/NumberInput.tokens.js +0 -81
  193. package/emotion/es/components/NumberInput/NumberInput.types.js +0 -1
  194. package/emotion/es/components/NumberInput/index.js +0 -2
  195. package/emotion/es/components/NumberInput/ui/ActionButton/ActionButton.js +0 -11
  196. package/emotion/es/components/NumberInput/ui/ActionButton/ActionButton.styles.js +0 -9
  197. package/emotion/es/components/NumberInput/ui/ActionButton/ActionButton.types.js +0 -1
  198. package/emotion/es/components/NumberInput/ui/Input/Input.js +0 -189
  199. package/emotion/es/components/NumberInput/ui/Input/Input.styles.js +0 -75
  200. package/emotion/es/components/NumberInput/ui/Input/Input.types.js +0 -1
  201. package/emotion/es/components/NumberInput/ui/index.js +0 -2
  202. package/emotion/es/components/NumberInput/utils/index.js +0 -1
  203. package/emotion/es/components/NumberInput/variations/_background-type/base.js +0 -4
  204. package/emotion/es/components/NumberInput/variations/_background-type/tokens.json +0 -6
  205. package/emotion/es/components/NumberInput/variations/_clear/base.js +0 -6
  206. package/emotion/es/components/NumberInput/variations/_clear/tokens.json +0 -5
  207. package/emotion/es/components/NumberInput/variations/_disabled/base.js +0 -3
  208. package/emotion/es/components/NumberInput/variations/_disabled/tokens.json +0 -4
  209. package/emotion/es/components/NumberInput/variations/_segmentation/base.js +0 -6
  210. package/emotion/es/components/NumberInput/variations/_segmentation/tokens.json +0 -1
  211. package/emotion/es/components/NumberInput/variations/_shape/base.js +0 -5
  212. package/emotion/es/components/NumberInput/variations/_shape/tokens.json +0 -1
  213. package/emotion/es/components/NumberInput/variations/_size/base.js +0 -7
  214. package/emotion/es/components/NumberInput/variations/_size/tokens.json +0 -22
  215. package/emotion/es/components/NumberInput/variations/_view/base.js +0 -7
  216. package/emotion/es/components/NumberInput/variations/_view/tokens.json +0 -14
  217. package/emotion/es/examples/plasma_b2c/components/NumberInput/NumberInput.config.js +0 -42
  218. package/emotion/es/examples/plasma_b2c/components/NumberInput/NumberInput.js +0 -5
  219. package/emotion/es/examples/plasma_b2c/components/NumberInput/NumberInput.stories.tsx +0 -109
  220. package/emotion/es/examples/plasma_web/components/NumberInput/NumberInput.config.js +0 -42
  221. package/emotion/es/examples/plasma_web/components/NumberInput/NumberInput.js +0 -5
  222. package/emotion/es/examples/plasma_web/components/NumberInput/NumberInput.stories.tsx +0 -109
  223. package/emotion/es/examples/themes/declaration.d.ts +0 -4
  224. package/emotion/es/examples/themes/index.js +0 -7
  225. package/emotion/es/examples/themes/plasma_b2c.module.css +0 -984
  226. package/emotion/es/examples/themes/plasma_web.module.css +0 -984
  227. package/es/components/NumberInput/NumberInput.css +0 -54
  228. package/es/components/NumberInput/NumberInput.js +0 -183
  229. package/es/components/NumberInput/NumberInput.js.map +0 -1
  230. package/es/components/NumberInput/NumberInput.styles.js +0 -5
  231. package/es/components/NumberInput/NumberInput.styles.js.map +0 -1
  232. package/es/components/NumberInput/NumberInput.styles_jeawjl.css +0 -1
  233. package/es/components/NumberInput/NumberInput.tokens.js +0 -84
  234. package/es/components/NumberInput/NumberInput.tokens.js.map +0 -1
  235. package/es/components/NumberInput/ui/ActionButton/ActionButton.js +0 -15
  236. package/es/components/NumberInput/ui/ActionButton/ActionButton.js.map +0 -1
  237. package/es/components/NumberInput/ui/ActionButton/ActionButton.styles.js +0 -18
  238. package/es/components/NumberInput/ui/ActionButton/ActionButton.styles.js.map +0 -1
  239. package/es/components/NumberInput/ui/Input/Input.css +0 -15
  240. package/es/components/NumberInput/ui/Input/Input.js +0 -186
  241. package/es/components/NumberInput/ui/Input/Input.js.map +0 -1
  242. package/es/components/NumberInput/ui/Input/Input.styles.js +0 -85
  243. package/es/components/NumberInput/ui/Input/Input.styles.js.map +0 -1
  244. package/es/components/NumberInput/ui/Input/Input.styles_jszc0c.css +0 -8
  245. package/es/components/NumberInput/utils/index.js +0 -4
  246. package/es/components/NumberInput/utils/index.js.map +0 -1
  247. package/es/components/NumberInput/variations/_background-type/base.js +0 -5
  248. package/es/components/NumberInput/variations/_background-type/base.js.map +0 -1
  249. package/es/components/NumberInput/variations/_background-type/base_1jmdljr.css +0 -1
  250. package/es/components/NumberInput/variations/_clear/base.js +0 -5
  251. package/es/components/NumberInput/variations/_clear/base.js.map +0 -1
  252. package/es/components/NumberInput/variations/_clear/base_3l8dqb.css +0 -1
  253. package/es/components/NumberInput/variations/_disabled/base.js +0 -5
  254. package/es/components/NumberInput/variations/_disabled/base.js.map +0 -1
  255. package/es/components/NumberInput/variations/_disabled/base_1sl0mh8.css +0 -1
  256. package/es/components/NumberInput/variations/_segmentation/base.js.map +0 -1
  257. package/es/components/NumberInput/variations/_segmentation/base_nl8ve.css +0 -1
  258. package/es/components/NumberInput/variations/_shape/base.js +0 -5
  259. package/es/components/NumberInput/variations/_shape/base.js.map +0 -1
  260. package/es/components/NumberInput/variations/_shape/base_k05biw.css +0 -1
  261. package/es/components/NumberInput/variations/_size/base.js +0 -5
  262. package/es/components/NumberInput/variations/_size/base.js.map +0 -1
  263. package/es/components/NumberInput/variations/_size/base_1pju5qf.css +0 -1
  264. package/es/components/NumberInput/variations/_view/base.js +0 -5
  265. package/es/components/NumberInput/variations/_view/base.js.map +0 -1
  266. package/es/components/NumberInput/variations/_view/base_cghr9q.css +0 -1
  267. package/styled-components/cjs/components/NumberInput/NumberInput.js +0 -198
  268. package/styled-components/cjs/components/NumberInput/NumberInput.tokens.js +0 -87
  269. package/styled-components/cjs/components/NumberInput/NumberInput.types.js +0 -5
  270. package/styled-components/cjs/components/NumberInput/index.js +0 -31
  271. package/styled-components/cjs/components/NumberInput/ui/ActionButton/ActionButton.js +0 -18
  272. package/styled-components/cjs/components/NumberInput/ui/ActionButton/ActionButton.styles.js +0 -15
  273. package/styled-components/cjs/components/NumberInput/ui/ActionButton/ActionButton.types.js +0 -5
  274. package/styled-components/cjs/components/NumberInput/ui/Input/Input.js +0 -198
  275. package/styled-components/cjs/components/NumberInput/ui/Input/Input.styles.js +0 -49
  276. package/styled-components/cjs/components/NumberInput/ui/Input/Input.types.js +0 -5
  277. package/styled-components/cjs/components/NumberInput/ui/index.js +0 -19
  278. package/styled-components/cjs/components/NumberInput/utils/index.js +0 -7
  279. package/styled-components/cjs/components/NumberInput/variations/_background-type/base.js +0 -10
  280. package/styled-components/cjs/components/NumberInput/variations/_background-type/tokens.json +0 -6
  281. package/styled-components/cjs/components/NumberInput/variations/_clear/base.js +0 -12
  282. package/styled-components/cjs/components/NumberInput/variations/_clear/tokens.json +0 -5
  283. package/styled-components/cjs/components/NumberInput/variations/_disabled/base.js +0 -9
  284. package/styled-components/cjs/components/NumberInput/variations/_disabled/tokens.json +0 -4
  285. package/styled-components/cjs/components/NumberInput/variations/_segmentation/base.js +0 -12
  286. package/styled-components/cjs/components/NumberInput/variations/_segmentation/tokens.json +0 -1
  287. package/styled-components/cjs/components/NumberInput/variations/_shape/base.js +0 -11
  288. package/styled-components/cjs/components/NumberInput/variations/_shape/tokens.json +0 -1
  289. package/styled-components/cjs/components/NumberInput/variations/_size/base.js +0 -13
  290. package/styled-components/cjs/components/NumberInput/variations/_size/tokens.json +0 -22
  291. package/styled-components/cjs/components/NumberInput/variations/_view/base.js +0 -13
  292. package/styled-components/cjs/components/NumberInput/variations/_view/tokens.json +0 -14
  293. package/styled-components/cjs/examples/plasma_b2c/components/NumberInput/NumberInput.config.js +0 -48
  294. package/styled-components/cjs/examples/plasma_b2c/components/NumberInput/NumberInput.js +0 -11
  295. package/styled-components/cjs/examples/plasma_b2c/components/NumberInput/NumberInput.stories.tsx +0 -109
  296. package/styled-components/cjs/examples/plasma_web/components/NumberInput/NumberInput.config.js +0 -48
  297. package/styled-components/cjs/examples/plasma_web/components/NumberInput/NumberInput.js +0 -11
  298. package/styled-components/cjs/examples/plasma_web/components/NumberInput/NumberInput.stories.tsx +0 -109
  299. package/styled-components/cjs/examples/themes/declaration.d.ts +0 -4
  300. package/styled-components/cjs/examples/themes/index.js +0 -15
  301. package/styled-components/cjs/examples/themes/plasma_b2c.module.css +0 -984
  302. package/styled-components/cjs/examples/themes/plasma_web.module.css +0 -984
  303. package/styled-components/es/components/NumberInput/NumberInput.js +0 -190
  304. package/styled-components/es/components/NumberInput/NumberInput.styles.js +0 -2
  305. package/styled-components/es/components/NumberInput/NumberInput.tokens.js +0 -81
  306. package/styled-components/es/components/NumberInput/NumberInput.types.js +0 -1
  307. package/styled-components/es/components/NumberInput/index.js +0 -2
  308. package/styled-components/es/components/NumberInput/ui/ActionButton/ActionButton.js +0 -11
  309. package/styled-components/es/components/NumberInput/ui/ActionButton/ActionButton.styles.js +0 -8
  310. package/styled-components/es/components/NumberInput/ui/ActionButton/ActionButton.types.js +0 -1
  311. package/styled-components/es/components/NumberInput/ui/Input/Input.js +0 -189
  312. package/styled-components/es/components/NumberInput/ui/Input/Input.styles.js +0 -42
  313. package/styled-components/es/components/NumberInput/ui/Input/Input.types.js +0 -1
  314. package/styled-components/es/components/NumberInput/ui/index.js +0 -2
  315. package/styled-components/es/components/NumberInput/utils/index.js +0 -1
  316. package/styled-components/es/components/NumberInput/variations/_background-type/base.js +0 -4
  317. package/styled-components/es/components/NumberInput/variations/_background-type/tokens.json +0 -6
  318. package/styled-components/es/components/NumberInput/variations/_clear/base.js +0 -6
  319. package/styled-components/es/components/NumberInput/variations/_clear/tokens.json +0 -5
  320. package/styled-components/es/components/NumberInput/variations/_disabled/base.js +0 -3
  321. package/styled-components/es/components/NumberInput/variations/_disabled/tokens.json +0 -4
  322. package/styled-components/es/components/NumberInput/variations/_segmentation/base.js +0 -6
  323. package/styled-components/es/components/NumberInput/variations/_segmentation/tokens.json +0 -1
  324. package/styled-components/es/components/NumberInput/variations/_shape/base.js +0 -5
  325. package/styled-components/es/components/NumberInput/variations/_shape/tokens.json +0 -1
  326. package/styled-components/es/components/NumberInput/variations/_size/base.js +0 -7
  327. package/styled-components/es/components/NumberInput/variations/_size/tokens.json +0 -22
  328. package/styled-components/es/components/NumberInput/variations/_view/base.js +0 -7
  329. package/styled-components/es/components/NumberInput/variations/_view/tokens.json +0 -14
  330. package/styled-components/es/examples/plasma_b2c/components/NumberInput/NumberInput.config.js +0 -42
  331. package/styled-components/es/examples/plasma_b2c/components/NumberInput/NumberInput.js +0 -5
  332. package/styled-components/es/examples/plasma_b2c/components/NumberInput/NumberInput.stories.tsx +0 -109
  333. package/styled-components/es/examples/plasma_web/components/NumberInput/NumberInput.config.js +0 -42
  334. package/styled-components/es/examples/plasma_web/components/NumberInput/NumberInput.js +0 -5
  335. package/styled-components/es/examples/plasma_web/components/NumberInput/NumberInput.stories.tsx +0 -109
  336. package/styled-components/es/examples/themes/declaration.d.ts +0 -4
  337. package/styled-components/es/examples/themes/index.js +0 -7
  338. package/styled-components/es/examples/themes/plasma_b2c.module.css +0 -984
  339. package/styled-components/es/examples/themes/plasma_web.module.css +0 -984
  340. package/types/components/NumberInput/NumberInput.d.ts +0 -42
  341. package/types/components/NumberInput/NumberInput.d.ts.map +0 -1
  342. package/types/components/NumberInput/NumberInput.styles.d.ts +0 -2
  343. package/types/components/NumberInput/NumberInput.styles.d.ts.map +0 -1
  344. package/types/components/NumberInput/NumberInput.tokens.d.ts +0 -76
  345. package/types/components/NumberInput/NumberInput.tokens.d.ts.map +0 -1
  346. package/types/components/NumberInput/NumberInput.types.d.ts +0 -112
  347. package/types/components/NumberInput/NumberInput.types.d.ts.map +0 -1
  348. package/types/components/NumberInput/index.d.ts +0 -3
  349. package/types/components/NumberInput/index.d.ts.map +0 -1
  350. package/types/components/NumberInput/ui/ActionButton/ActionButton.d.ts +0 -4
  351. package/types/components/NumberInput/ui/ActionButton/ActionButton.d.ts.map +0 -1
  352. package/types/components/NumberInput/ui/ActionButton/ActionButton.styles.d.ts +0 -45
  353. package/types/components/NumberInput/ui/ActionButton/ActionButton.styles.d.ts.map +0 -1
  354. package/types/components/NumberInput/ui/ActionButton/ActionButton.types.d.ts +0 -7
  355. package/types/components/NumberInput/ui/ActionButton/ActionButton.types.d.ts.map +0 -1
  356. package/types/components/NumberInput/ui/Input/Input.d.ts +0 -16
  357. package/types/components/NumberInput/ui/Input/Input.d.ts.map +0 -1
  358. package/types/components/NumberInput/ui/Input/Input.styles.d.ts +0 -30
  359. package/types/components/NumberInput/ui/Input/Input.styles.d.ts.map +0 -1
  360. package/types/components/NumberInput/ui/Input/Input.types.d.ts +0 -16
  361. package/types/components/NumberInput/ui/Input/Input.types.d.ts.map +0 -1
  362. package/types/components/NumberInput/ui/index.d.ts +0 -3
  363. package/types/components/NumberInput/ui/index.d.ts.map +0 -1
  364. package/types/components/NumberInput/utils/index.d.ts +0 -2
  365. package/types/components/NumberInput/utils/index.d.ts.map +0 -1
  366. package/types/components/NumberInput/variations/_background-type/base.d.ts.map +0 -1
  367. package/types/components/NumberInput/variations/_clear/base.d.ts +0 -2
  368. package/types/components/NumberInput/variations/_clear/base.d.ts.map +0 -1
  369. package/types/components/NumberInput/variations/_disabled/base.d.ts +0 -2
  370. package/types/components/NumberInput/variations/_disabled/base.d.ts.map +0 -1
  371. package/types/components/NumberInput/variations/_segmentation/base.d.ts +0 -2
  372. package/types/components/NumberInput/variations/_segmentation/base.d.ts.map +0 -1
  373. package/types/components/NumberInput/variations/_shape/base.d.ts +0 -2
  374. package/types/components/NumberInput/variations/_shape/base.d.ts.map +0 -1
  375. package/types/components/NumberInput/variations/_size/base.d.ts +0 -2
  376. package/types/components/NumberInput/variations/_size/base.d.ts.map +0 -1
  377. package/types/components/NumberInput/variations/_view/base.d.ts +0 -2
  378. package/types/components/NumberInput/variations/_view/base.d.ts.map +0 -1
  379. package/types/examples/plasma_b2c/components/NumberInput/NumberInput.config.d.ts +0 -41
  380. package/types/examples/plasma_b2c/components/NumberInput/NumberInput.config.d.ts.map +0 -1
  381. package/types/examples/plasma_b2c/components/NumberInput/NumberInput.d.ts +0 -84
  382. package/types/examples/plasma_b2c/components/NumberInput/NumberInput.d.ts.map +0 -1
  383. package/types/examples/plasma_web/components/NumberInput/NumberInput.config.d.ts +0 -41
  384. package/types/examples/plasma_web/components/NumberInput/NumberInput.config.d.ts.map +0 -1
  385. package/types/examples/plasma_web/components/NumberInput/NumberInput.d.ts +0 -84
  386. package/types/examples/plasma_web/components/NumberInput/NumberInput.d.ts.map +0 -1
  387. package/types/examples/themes/index.d.ts +0 -6
  388. package/types/examples/themes/index.d.ts.map +0 -1
  389. /package/cjs/components/{NumberInput/ui/ActionButton/ActionButton.styles_x642ct.css → ViewContainer/_view/base_x642ct.css} +0 -0
  390. /package/es/components/{NumberInput/ui/ActionButton/ActionButton.styles_x642ct.css → ViewContainer/_view/base_x642ct.css} +0 -0
  391. /package/types/components/{NumberInput/variations/_background-type → ViewContainer/_view}/base.d.ts +0 -0
@@ -13,6 +13,7 @@ var base$1 = require('./variations/_size/base.js');
13
13
  var base$2 = require('./variations/_borderRadius/base.js');
14
14
  var Drawer_styles = require('./Drawer.styles.js');
15
15
  var DrawerContext = require('./DrawerContext.js');
16
+ var useFocusTrap = require('../../hooks/useFocusTrap.js');
16
17
  var PopupContext = require('../Popup/PopupContext.js');
17
18
  var useDrawer = require('./hooks/useDrawer.js');
18
19
  var Overlay = require('../Overlay/Overlay.js');
@@ -58,7 +59,7 @@ var drawerRoot = function drawerRoot(Root) {
58
59
  asModal = _ref$asModal === void 0 ? true : _ref$asModal,
59
60
  rest = _rollupPluginBabelHelpers.objectWithoutProperties(_ref, _excluded);
60
61
  var innerIsOpen = Boolean(isOpen || opened);
61
- var trapRef = plasmaCore.useFocusTrap(true, initialFocusRef, focusAfterRef);
62
+ var trapRef = useFocusTrap.useFocusTrap(true, initialFocusRef, focusAfterRef);
62
63
  var popupController = PopupContext.usePopupContext();
63
64
  var innerRef = plasmaCore.useForkRef(trapRef, outerRef);
64
65
  var uniqId = plasmaCore.safeUseId();
@@ -1 +1 @@
1
- {"version":3,"file":"Drawer.js","sources":["../../../src/components/Drawer/Drawer.tsx"],"sourcesContent":["import React, { forwardRef, useMemo } from 'react';\nimport { useFocusTrap, useForkRef, safeUseId } from '@salutejs/plasma-core';\n\nimport { component, mergeConfig } from '../../engines';\nimport type { RootProps } from '../../engines';\nimport { usePopupContext } from '../Popup';\nimport { Overlay } from '../Overlay';\nimport { DEFAULT_Z_INDEX } from '../Popup/utils';\nimport { panelConfig } from '../Panel';\nimport { cx, getSizeValueFromProp } from '../../utils';\n\nimport { classes, tokens } from './Drawer.tokens';\nimport type { DrawerProps } from './Drawer.types';\nimport { base as viewCSS } from './variations/_view/base';\nimport { base as sizeCSS } from './variations/_size/base';\nimport { base as borderRadiusCSS } from './variations/_borderRadius/base';\nimport { StyledPopup } from './Drawer.styles';\nimport { getIdLastDrawer } from './DrawerContext';\nimport { useDrawer } from './hooks';\n\n// issue #823\nconst mergedPanelConfig = mergeConfig(panelConfig);\nconst Panel = component(mergedPanelConfig);\n\nexport const drawerRoot = (Root: RootProps<HTMLDivElement, DrawerProps>) =>\n forwardRef<HTMLDivElement, DrawerProps>(\n (\n {\n id,\n zIndex,\n popupInfo,\n withBlur,\n children,\n view,\n size,\n width,\n height,\n isOpen,\n opened,\n initialFocusRef,\n focusAfterRef,\n className,\n onClose,\n onOverlayClick,\n onEscKeyDown,\n offset,\n frame,\n borderRadius = 'none',\n placement = 'right',\n closeOnEsc = true,\n closeOnOverlayClick = true,\n asModal = true,\n ...rest\n },\n outerRef,\n ) => {\n const innerIsOpen = Boolean(isOpen || opened);\n\n const trapRef = useFocusTrap(true, initialFocusRef, focusAfterRef);\n const popupController = usePopupContext();\n\n const innerRef = useForkRef<HTMLDivElement>(trapRef, outerRef);\n\n const uniqId = safeUseId();\n const innerId = id || uniqId;\n const overlayBackgroundToken = withBlur\n ? `var(${tokens.drawerOverlayWithBlurColor})`\n : `var(${tokens.drawerOverlayColor})`;\n const innerWidth = width ? getSizeValueFromProp(width) : '100%';\n const innerHeight = height ? getSizeValueFromProp(height) : '100%';\n\n const placementClass = placement ? classes[`${placement}Placement` as keyof typeof classes] : undefined;\n\n const { drawerInfo } = useDrawer({\n id: innerId,\n isOpen: innerIsOpen,\n closeOnEsc,\n onEscKeyDown,\n onClose,\n popupInfo,\n disableScroll: asModal,\n });\n const transparent = useMemo(() => getIdLastDrawer(popupController.items) !== innerId, [\n innerId,\n popupController.items,\n ]);\n\n const onDrawerOverlayKeyDown = (event: React.MouseEvent<HTMLDivElement>) => {\n if (onOverlayClick) {\n onOverlayClick(event);\n return;\n }\n\n if (onClose) {\n onClose();\n }\n };\n\n return (\n <StyledPopup\n id={innerId}\n ref={asModal ? innerRef : outerRef}\n className={cx(placementClass)}\n opened={innerIsOpen}\n zIndex={zIndex}\n placement={placement}\n popupInfo={drawerInfo}\n frame={frame}\n width={innerWidth}\n height={innerHeight}\n offset={offset}\n withAnimation\n overlay={\n asModal && (\n <Root view={view}>\n <Overlay\n className={classes.overlay}\n zIndex={zIndex || DEFAULT_Z_INDEX}\n backgroundColorProperty={overlayBackgroundToken}\n withBlur={withBlur}\n transparent={transparent}\n isClickable={closeOnOverlayClick}\n onOverlayClick={onDrawerOverlayKeyDown}\n />\n </Root>\n )\n }\n {...rest}\n >\n <Root\n view={view}\n size={size}\n style={{ width: innerWidth, height: innerHeight }}\n borderRadius={borderRadius}\n >\n <Panel width={innerWidth} height={innerHeight} className={className}>\n {children}\n </Panel>\n </Root>\n </StyledPopup>\n );\n },\n );\n\nexport const drawerConfig = {\n name: 'Drawer',\n tag: 'div',\n layout: drawerRoot,\n base: '',\n variations: {\n view: {\n css: viewCSS,\n },\n size: {\n css: sizeCSS,\n },\n borderRadius: {\n css: borderRadiusCSS,\n },\n },\n defaults: {\n view: 'default',\n size: 'm',\n borderRadius: 'none',\n },\n};\n"],"names":["mergedPanelConfig","mergeConfig","panelConfig","Panel","component","drawerRoot","Root","forwardRef","_ref","outerRef","id","zIndex","popupInfo","withBlur","children","view","size","width","height","isOpen","opened","initialFocusRef","focusAfterRef","className","onClose","onOverlayClick","onEscKeyDown","offset","frame","_ref$borderRadius","borderRadius","_ref$placement","placement","_ref$closeOnEsc","closeOnEsc","_ref$closeOnOverlayCl","closeOnOverlayClick","_ref$asModal","asModal","rest","_objectWithoutProperties","_excluded","innerIsOpen","Boolean","trapRef","useFocusTrap","popupController","usePopupContext","innerRef","useForkRef","uniqId","safeUseId","innerId","overlayBackgroundToken","concat","tokens","drawerOverlayWithBlurColor","drawerOverlayColor","innerWidth","getSizeValueFromProp","innerHeight","placementClass","classes","undefined","_useDrawer","useDrawer","disableScroll","drawerInfo","transparent","useMemo","getIdLastDrawer","items","onDrawerOverlayKeyDown","event","React","createElement","StyledPopup","_extends","ref","cx","withAnimation","overlay","Overlay","DEFAULT_Z_INDEX","backgroundColorProperty","isClickable","style","drawerConfig","name","tag","layout","base","variations","css","viewCSS","sizeCSS","borderRadiusCSS","defaults"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;AAoBA;AACA,IAAMA,iBAAiB,gBAAGC,kBAAW,CAACC,mBAAW,CAAC,CAAA;AAClD,IAAMC,KAAK,gBAAGC,gBAAS,CAACJ,iBAAiB,CAAC,CAAA;IAE7BK,UAAU,GAAG,SAAbA,UAAUA,CAAIC,IAA4C,EAAA;AAAA,EAAA,oBACnEC,gBAAU,CACN,UAAAC,IAAA,EA4BIC,QAAQ,EACP;AAAA,IAAA,IA3BGC,EAAE,GAAAF,IAAA,CAAFE,EAAE;MACFC,MAAM,GAAAH,IAAA,CAANG,MAAM;MACNC,SAAS,GAAAJ,IAAA,CAATI,SAAS;MACTC,QAAQ,GAAAL,IAAA,CAARK,QAAQ;MACRC,QAAQ,GAAAN,IAAA,CAARM,QAAQ;MACRC,IAAI,GAAAP,IAAA,CAAJO,IAAI;MACJC,IAAI,GAAAR,IAAA,CAAJQ,IAAI;MACJC,KAAK,GAAAT,IAAA,CAALS,KAAK;MACLC,MAAM,GAAAV,IAAA,CAANU,MAAM;MACNC,MAAM,GAAAX,IAAA,CAANW,MAAM;MACNC,MAAM,GAAAZ,IAAA,CAANY,MAAM;MACNC,eAAe,GAAAb,IAAA,CAAfa,eAAe;MACfC,aAAa,GAAAd,IAAA,CAAbc,aAAa;MACbC,SAAS,GAAAf,IAAA,CAATe,SAAS;MACTC,OAAO,GAAAhB,IAAA,CAAPgB,OAAO;MACPC,cAAc,GAAAjB,IAAA,CAAdiB,cAAc;MACdC,YAAY,GAAAlB,IAAA,CAAZkB,YAAY;MACZC,MAAM,GAAAnB,IAAA,CAANmB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,YAAY,EAAEA,YAAAA;AAAa,KAAA,eAE3B4C,KAAA,CAAAC,aAAA,CAACxE,KAAK,EAAA;AAACc,MAAAA,KAAK,EAAEyC,UAAW;AAACxC,MAAAA,MAAM,EAAE0C,WAAY;AAACrC,MAAAA,SAAS,EAAEA,SAAAA;KACrDT,EAAAA,QACE,CACL,CACG,CAAC,CAAA;AAEtB,GACJ,CAAC,CAAA;AAAA,EAAA;AAEE,IAAMyE,YAAY,GAAG;AACxBC,EAAAA,IAAI,EAAE,QAAQ;AACdC,EAAAA,GAAG,EAAE,KAAK;AACVC,EAAAA,MAAM,EAAErF,UAAU;AAClBsF,EAAAA,IAAI,EAAE,EAAE;AACRC,EAAAA,UAAU,EAAE;AACR7E,IAAAA,IAAI,EAAE;AACF8E,MAAAA,GAAG,EAAEC,SAAAA;KACR;AACD9E,IAAAA,IAAI,EAAE;AACF6E,MAAAA,GAAG,EAAEE,WAAAA;KACR;AACDjE,IAAAA,YAAY,EAAE;AACV+D,MAAAA,GAAG,EAAEG,WAAAA;AACT,KAAA;GACH;AACDC,EAAAA,QAAQ,EAAE;AACNlF,IAAAA,IAAI,EAAE,SAAS;AACfC,IAAAA,IAAI,EAAE,GAAG;AACTc,IAAAA,YAAY,EAAE,MAAA;AAClB,GAAA;AACJ;;;;;"}
1
+ {"version":3,"file":"Drawer.js","sources":["../../../src/components/Drawer/Drawer.tsx"],"sourcesContent":["import React, { forwardRef, useMemo } from 'react';\nimport { useForkRef, safeUseId } from '@salutejs/plasma-core';\n\nimport { component, mergeConfig } from '../../engines';\nimport type { RootProps } from '../../engines';\nimport { usePopupContext } from '../Popup';\nimport { Overlay } from '../Overlay';\nimport { DEFAULT_Z_INDEX } from '../Popup/utils';\nimport { panelConfig } from '../Panel';\nimport { cx, getSizeValueFromProp } from '../../utils';\nimport { useFocusTrap } from '../../hooks';\n\nimport { classes, tokens } from './Drawer.tokens';\nimport type { DrawerProps } from './Drawer.types';\nimport { base as viewCSS } from './variations/_view/base';\nimport { base as sizeCSS } from './variations/_size/base';\nimport { base as borderRadiusCSS } from './variations/_borderRadius/base';\nimport { StyledPopup } from './Drawer.styles';\nimport { getIdLastDrawer } from './DrawerContext';\nimport { useDrawer } from './hooks';\n\n// issue #823\nconst mergedPanelConfig = mergeConfig(panelConfig);\nconst Panel = component(mergedPanelConfig);\n\nexport const drawerRoot = (Root: RootProps<HTMLDivElement, DrawerProps>) =>\n forwardRef<HTMLDivElement, DrawerProps>(\n (\n {\n id,\n zIndex,\n popupInfo,\n withBlur,\n children,\n view,\n size,\n width,\n height,\n isOpen,\n opened,\n initialFocusRef,\n focusAfterRef,\n className,\n onClose,\n onOverlayClick,\n onEscKeyDown,\n offset,\n frame,\n borderRadius = 'none',\n placement = 'right',\n closeOnEsc = true,\n closeOnOverlayClick = true,\n asModal = true,\n ...rest\n },\n outerRef,\n ) => {\n const innerIsOpen = Boolean(isOpen || opened);\n\n const trapRef = useFocusTrap(true, initialFocusRef, focusAfterRef);\n const popupController = usePopupContext();\n\n const innerRef = useForkRef<HTMLDivElement>(trapRef, outerRef);\n\n const uniqId = safeUseId();\n const innerId = id || uniqId;\n const overlayBackgroundToken = withBlur\n ? `var(${tokens.drawerOverlayWithBlurColor})`\n : `var(${tokens.drawerOverlayColor})`;\n const innerWidth = width ? getSizeValueFromProp(width) : '100%';\n const innerHeight = height ? getSizeValueFromProp(height) : '100%';\n\n const placementClass = placement ? classes[`${placement}Placement` as keyof typeof classes] : undefined;\n\n const { drawerInfo } = useDrawer({\n id: innerId,\n isOpen: innerIsOpen,\n closeOnEsc,\n onEscKeyDown,\n onClose,\n popupInfo,\n disableScroll: asModal,\n });\n const transparent = useMemo(() => getIdLastDrawer(popupController.items) !== innerId, [\n innerId,\n popupController.items,\n ]);\n\n const onDrawerOverlayKeyDown = (event: React.MouseEvent<HTMLDivElement>) => {\n if (onOverlayClick) {\n onOverlayClick(event);\n return;\n }\n\n if (onClose) {\n onClose();\n }\n };\n\n return (\n <StyledPopup\n id={innerId}\n ref={asModal ? innerRef : outerRef}\n className={cx(placementClass)}\n opened={innerIsOpen}\n zIndex={zIndex}\n placement={placement}\n popupInfo={drawerInfo}\n frame={frame}\n width={innerWidth}\n height={innerHeight}\n offset={offset}\n withAnimation\n overlay={\n asModal && (\n <Root view={view}>\n <Overlay\n className={classes.overlay}\n zIndex={zIndex || DEFAULT_Z_INDEX}\n backgroundColorProperty={overlayBackgroundToken}\n withBlur={withBlur}\n transparent={transparent}\n isClickable={closeOnOverlayClick}\n onOverlayClick={onDrawerOverlayKeyDown}\n />\n </Root>\n )\n }\n {...rest}\n >\n <Root\n view={view}\n size={size}\n style={{ width: innerWidth, height: innerHeight }}\n borderRadius={borderRadius}\n >\n <Panel width={innerWidth} height={innerHeight} className={className}>\n {children}\n </Panel>\n </Root>\n </StyledPopup>\n );\n },\n );\n\nexport const drawerConfig = {\n name: 'Drawer',\n tag: 'div',\n layout: drawerRoot,\n base: '',\n variations: {\n view: {\n css: viewCSS,\n },\n size: {\n css: sizeCSS,\n },\n borderRadius: {\n css: borderRadiusCSS,\n },\n },\n defaults: {\n view: 'default',\n size: 'm',\n borderRadius: 'none',\n },\n};\n"],"names":["mergedPanelConfig","mergeConfig","panelConfig","Panel","component","drawerRoot","Root","forwardRef","_ref","outerRef","id","zIndex","popupInfo","withBlur","children","view","size","width","height","isOpen","opened","initialFocusRef","focusAfterRef","className","onClose","onOverlayClick","onEscKeyDown","offset","frame","_ref$borderRadius","borderRadius","_ref$placement","placement","_ref$closeOnEsc","closeOnEsc","_ref$closeOnOverlayCl","closeOnOverlayClick","_ref$asModal","asModal","rest","_objectWithoutProperties","_excluded","innerIsOpen","Boolean","trapRef","useFocusTrap","popupController","usePopupContext","innerRef","useForkRef","uniqId","safeUseId","innerId","overlayBackgroundToken","concat","tokens","drawerOverlayWithBlurColor","drawerOverlayColor","innerWidth","getSizeValueFromProp","innerHeight","placementClass","classes","undefined","_useDrawer","useDrawer","disableScroll","drawerInfo","transparent","useMemo","getIdLastDrawer","items","onDrawerOverlayKeyDown","event","React","createElement","StyledPopup","_extends","ref","cx","withAnimation","overlay","Overlay","DEFAULT_Z_INDEX","backgroundColorProperty","isClickable","style","drawerConfig","name","tag","layout","base","variations","css","viewCSS","sizeCSS","borderRadiusCSS","defaults"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AAqBA;AACA,IAAMA,iBAAiB,gBAAGC,kBAAW,CAACC,mBAAW,CAAC,CAAA;AAClD,IAAMC,KAAK,gBAAGC,gBAAS,CAACJ,iBAAiB,CAAC,CAAA;IAE7BK,UAAU,GAAG,SAAbA,UAAUA,CAAIC,IAA4C,EAAA;AAAA,EAAA,oBACnEC,gBAAU,CACN,UAAAC,IAAA,EA4BIC,QAAQ,EACP;AAAA,IAAA,IA3BGC,EAAE,GAAAF,IAAA,CAAFE,EAAE;MACFC,MAAM,GAAAH,IAAA,CAANG,MAAM;MACNC,SAAS,GAAAJ,IAAA,CAATI,SAAS;MACTC,QAAQ,GAAAL,IAAA,CAARK,QAAQ;MACRC,QAAQ,GAAAN,IAAA,CAARM,QAAQ;MACRC,IAAI,GAAAP,IAAA,CAAJO,IAAI;MACJC,IAAI,GAAAR,IAAA,CAAJQ,IAAI;MACJC,KAAK,GAAAT,IAAA,CAALS,KAAK;MACLC,MAAM,GAAAV,IAAA,CAANU,MAAM;MACNC,MAAM,GAAAX,IAAA,CAANW,MAAM;MACNC,MAAM,GAAAZ,IAAA,CAANY,MAAM;MACNC,eAAe,GAAAb,IAAA,CAAfa,eAAe;MACfC,aAAa,GAAAd,IAAA,CAAbc,aAAa;MACbC,SAAS,GAAAf,IAAA,CAATe,SAAS;MACTC,OAAO,GAAAhB,IAAA,CAAPgB,OAAO;MACPC,cAAc,GAAAjB,IAAA,CAAdiB,cAAc;MACdC,YAAY,GAAAlB,IAAA,CAAZkB,YAAY;MACZC,MAAM,GAAAnB,IAAA,CAANmB,MAAM;MACNC,KAAK,GAAApB,IAAA,CAALoB,KAAK;MAAAC,iBAAA,GAAArB,IAAA,CAC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EAAA;AAACc,MAAAA,KAAK,EAAEyC,UAAW;AAACxC,MAAAA,MAAM,EAAE0C,WAAY;AAACrC,MAAAA,SAAS,EAAEA,SAAAA;KACrDT,EAAAA,QACE,CACL,CACG,CAAC,CAAA;AAEtB,GACJ,CAAC,CAAA;AAAA,EAAA;AAEE,IAAMyE,YAAY,GAAG;AACxBC,EAAAA,IAAI,EAAE,QAAQ;AACdC,EAAAA,GAAG,EAAE,KAAK;AACVC,EAAAA,MAAM,EAAErF,UAAU;AAClBsF,EAAAA,IAAI,EAAE,EAAE;AACRC,EAAAA,UAAU,EAAE;AACR7E,IAAAA,IAAI,EAAE;AACF8E,MAAAA,GAAG,EAAEC,SAAAA;KACR;AACD9E,IAAAA,IAAI,EAAE;AACF6E,MAAAA,GAAG,EAAEE,WAAAA;KACR;AACDjE,IAAAA,YAAY,EAAE;AACV+D,MAAAA,GAAG,EAAEG,WAAAA;AACT,KAAA;GACH;AACDC,EAAAA,QAAQ,EAAE;AACNlF,IAAAA,IAAI,EAAE,SAAS;AACfC,IAAAA,IAAI,EAAE,GAAG;AACTc,IAAAA,YAAY,EAAE,MAAA;AAClB,GAAA;AACJ;;;;;"}
@@ -9,6 +9,7 @@ var base = require('./variations/_view/base.js');
9
9
  var base$1 = require('./variations/_size/base.js');
10
10
  var Dropdown_styles = require('./Dropdown.styles.js');
11
11
  var index = require('./utils/index.js');
12
+ var useFocusTrap = require('../../../../hooks/useFocusTrap.js');
12
13
 
13
14
  var _excluded = ["id", "target", "children", "hasArrow", "role", "view", "size", "frame", "onToggle", "isFocusTrapped", "isOpen", "opened", "placement", "trigger", "offset", "preventOverflow", "closeOnOverlayClick", "closeOnEsc"];
14
15
  /**
@@ -50,7 +51,7 @@ var dropdownOldRoot = function dropdownOldRoot(Root) {
50
51
  var rootRef = React.useRef(null);
51
52
  var dropdownRef = React.useRef(null);
52
53
  var handleRef = plasmaCore.useForkRef(rootRef, outerRootRef);
53
- var trapRef = plasmaCore.useFocusTrap(innerIsOpen && isFocusTrapped);
54
+ var trapRef = useFocusTrap.useFocusTrap(innerIsOpen && isFocusTrapped);
54
55
  var dropdownForkRef = plasmaCore.useForkRef(dropdownRef, trapRef);
55
56
  return /*#__PURE__*/React.createElement(Dropdown_styles.StyledPopover, {
56
57
  role: role,
@@ -1 +1 @@
1
- {"version":3,"file":"DropdownOld.js","sources":["../../../../../src/components/Dropdown/ui/DropdownOld/DropdownOld.tsx"],"sourcesContent":["import React, { forwardRef, useRef } from 'react';\nimport { useFocusTrap, useForkRef, useUniqId } from '@salutejs/plasma-core';\n\nimport { RootProps } from '../../../../engines';\n\nimport { base as viewCSS } from './variations/_view/base';\nimport { base as sizeCSS } from './variations/_size/base';\nimport { StyledDropdown, StyledPopover } from './Dropdown.styles';\nimport { getPlacements } from './utils';\nimport type { DropdownProps } from './Dropdown.types';\n\n/**\n * Выпадающий список без внешнего контроля видимости.\n */\nexport const dropdownOldRoot = (Root: RootProps<HTMLDivElement, DropdownProps>) =>\n forwardRef<HTMLDivElement, DropdownProps>(\n (\n {\n id,\n target,\n children,\n hasArrow,\n role,\n view,\n size,\n frame,\n onToggle,\n isFocusTrapped = true,\n isOpen = false,\n opened = false,\n placement = 'auto',\n trigger = 'click',\n offset = [0, 6],\n preventOverflow = false,\n closeOnOverlayClick = false,\n closeOnEsc = false,\n ...rest\n },\n outerRootRef,\n ) => {\n const innerIsOpen = Boolean(isOpen || opened);\n\n const uniqId = useUniqId();\n const innerId = id || uniqId;\n\n const rootRef = useRef<HTMLDivElement | null>(null);\n const dropdownRef = useRef<HTMLDivElement | null>(null);\n const handleRef = useForkRef<HTMLDivElement>(rootRef, outerRootRef);\n\n const trapRef = useFocusTrap(innerIsOpen && isFocusTrapped);\n\n const dropdownForkRef = useForkRef<HTMLDivElement>(dropdownRef, trapRef);\n\n return (\n <StyledPopover\n role={role}\n opened={innerIsOpen}\n usePortal={false}\n onToggle={(is, event) => onToggle?.(is, event)}\n id={innerId}\n ref={dropdownForkRef}\n target={target}\n offset={offset}\n preventOverflow={preventOverflow}\n hasArrow={hasArrow}\n placement={getPlacements(placement)}\n trigger={trigger}\n closeOnOverlayClick={closeOnOverlayClick}\n closeOnEsc={closeOnEsc}\n isFocusTrapped={isFocusTrapped}\n frame={frame}\n >\n <Root ref={handleRef} view={view} size={size} {...rest}>\n <StyledDropdown>{children}</StyledDropdown>\n </Root>\n </StyledPopover>\n );\n },\n );\n\nexport const dropdownOldConfig = {\n name: 'Dropdown',\n tag: 'div',\n layout: dropdownOldRoot,\n base: '',\n variations: {\n view: {\n css: viewCSS,\n },\n size: {\n css: sizeCSS,\n },\n },\n defaults: {\n view: 'default',\n size: 'm',\n },\n};\n"],"names":["dropdownOldRoot","Root","forwardRef","_ref","outerRootRef","id","target","children","hasArrow","role","view","size","frame","onToggle","_ref$isFocusTrapped","isFocusTrapped","_ref$isOpen","isOpen","_ref$opened","opened","_ref$placement","placement","_ref$trigger","trigger","_ref$offset","offset","_ref$preventOverflow","preventOverflow","_ref$closeOnOverlayCl","closeOnOverlayClick","_ref$closeOnEsc","closeOnEsc","rest","_objectWithoutProperties","_excluded","innerIsOpen","Boolean","uniqId","useUniqId","innerId","rootRef","useRef","dropdownRef","handleRef","useForkRef","trapRef","useFocusTrap","dropdownForkRef","React","createElement","StyledPopover","usePortal","is","event","ref","getPlacements","_extends","StyledDropdown","dropdownOldConfig","name","tag","layout","base","variations","css","viewCSS","sizeCSS","defaults"],"mappings":";;;;;;;;;;;;;AAWA;AACA;AACA;IACaA,eAAe,GAAG,SAAlBA,eAAeA,CAAIC,IAA8C,EAAA;AAAA,EAAA,oBAC1EC,gBAAU,CACN,UAAAC,IAAA,EAsBIC,YAAY,EACX;AAAA,IAAA,IArBGC,EAAE,GAAAF,IAAA,CAAFE,EAAE;MACFC,MAAM,GAAAH,IAAA,CAANG,MAAM;MACNC,QAAQ,GAAAJ,IAAA,CAARI,QAAQ;MACRC,QAAQ,GAAAL,IAAA,CAARK,QAAQ;MACRC,IAAI,GAAAN,IAAA,CAA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AAS;AACnBa,MAAAA,SAAS,EAAEkC,mBAAa,CAAClC,SAAS,CAAE;AACpCE,MAAAA,OAAO,EAAEA,OAAQ;AACjBM,MAAAA,mBAAmB,EAAEA,mBAAoB;AACzCE,MAAAA,UAAU,EAAEA,UAAW;AACvBhB,MAAAA,cAAc,EAAEA,cAAe;AAC/BH,MAAAA,KAAK,EAAEA,KAAAA;AAAM,KAAA,eAEboC,KAAA,CAAAC,aAAA,CAAChD,IAAI,EAAAuD,iCAAA,CAAA;AAACF,MAAAA,GAAG,EAAEX,SAAU;AAACjC,MAAAA,IAAI,EAAEA,IAAK;AAACC,MAAAA,IAAI,EAAEA,IAAAA;KAAUqB,EAAAA,IAAI,CAClDgB,eAAAA,KAAA,CAAAC,aAAA,CAACQ,8BAAc,EAAElD,IAAAA,EAAAA,QAAyB,CACxC,CACK,CAAC,CAAA;AAExB,GACJ,CAAC,CAAA;AAAA,EAAA;AAEE,IAAMmD,iBAAiB,GAAG;AAC7BC,EAAAA,IAAI,EAAE,UAAU;AAChBC,EAAAA,GAAG,EAAE,KAAK;AACVC,EAAAA,MAAM,EAAE7D,eAAe;AACvB8D,EAAAA,IAAI,EAAE,EAAE;AACRC,EAAAA,UAAU,EAAE;AACRrD,IAAAA,IAAI,EAAE;AACFsD,MAAAA,GAAG,EAAEC,SAAAA;KACR;AACDtD,IAAAA,IAAI,EAAE;AACFqD,MAAAA,GAAG,EAAEE,WAAAA;AACT,KAAA;GACH;AACDC,EAAAA,QAAQ,EAAE;AACNzD,IAAAA,IAAI,EAAE,SAAS;AACfC,IAAAA,IAAI,EAAE,GAAA;AACV,GAAA;AACJ;;;;;"}
1
+ {"version":3,"file":"DropdownOld.js","sources":["../../../../../src/components/Dropdown/ui/DropdownOld/DropdownOld.tsx"],"sourcesContent":["import React, { forwardRef, useRef } from 'react';\nimport { useForkRef, useUniqId } from '@salutejs/plasma-core';\n\nimport { RootProps } from '../../../../engines';\nimport { useFocusTrap } from '../../../../hooks';\n\nimport { base as viewCSS } from './variations/_view/base';\nimport { base as sizeCSS } from './variations/_size/base';\nimport { StyledDropdown, StyledPopover } from './Dropdown.styles';\nimport { getPlacements } from './utils';\nimport type { DropdownProps } from './Dropdown.types';\n\n/**\n * Выпадающий список без внешнего контроля видимости.\n */\nexport const dropdownOldRoot = (Root: RootProps<HTMLDivElement, DropdownProps>) =>\n forwardRef<HTMLDivElement, DropdownProps>(\n (\n {\n id,\n target,\n children,\n hasArrow,\n role,\n view,\n size,\n frame,\n onToggle,\n isFocusTrapped = true,\n isOpen = false,\n opened = false,\n placement = 'auto',\n trigger = 'click',\n offset = [0, 6],\n preventOverflow = false,\n closeOnOverlayClick = false,\n closeOnEsc = false,\n ...rest\n },\n outerRootRef,\n ) => {\n const innerIsOpen = Boolean(isOpen || opened);\n\n const uniqId = useUniqId();\n const innerId = id || uniqId;\n\n const rootRef = useRef<HTMLDivElement | null>(null);\n const dropdownRef = useRef<HTMLDivElement | null>(null);\n const handleRef = useForkRef<HTMLDivElement>(rootRef, outerRootRef);\n\n const trapRef = useFocusTrap(innerIsOpen && isFocusTrapped);\n\n const dropdownForkRef = useForkRef<HTMLDivElement>(dropdownRef, trapRef);\n\n return (\n <StyledPopover\n role={role}\n opened={innerIsOpen}\n usePortal={false}\n onToggle={(is, event) => onToggle?.(is, event)}\n id={innerId}\n ref={dropdownForkRef}\n target={target}\n offset={offset}\n preventOverflow={preventOverflow}\n hasArrow={hasArrow}\n placement={getPlacements(placement)}\n trigger={trigger}\n closeOnOverlayClick={closeOnOverlayClick}\n closeOnEsc={closeOnEsc}\n isFocusTrapped={isFocusTrapped}\n frame={frame}\n >\n <Root ref={handleRef} view={view} size={size} {...rest}>\n <StyledDropdown>{children}</StyledDropdown>\n </Root>\n </StyledPopover>\n );\n },\n );\n\nexport const dropdownOldConfig = {\n name: 'Dropdown',\n tag: 'div',\n layout: dropdownOldRoot,\n base: '',\n variations: {\n view: {\n css: viewCSS,\n },\n size: {\n css: sizeCSS,\n },\n },\n defaults: {\n view: 'default',\n size: 'm',\n },\n};\n"],"names":["dropdownOldRoot","Root","forwardRef","_ref","outerRootRef","id","target","children","hasArrow","role","view","size","frame","onToggle","_ref$isFocusTrapped","isFocusTrapped","_ref$isOpen","isOpen","_ref$opened","opened","_ref$placement","placement","_ref$trigger","trigger","_ref$offset","offset","_ref$preventOverflow","preventOverflow","_ref$closeOnOverlayCl","closeOnOverlayClick","_ref$closeOnEsc","closeOnEsc","rest","_objectWithoutProperties","_excluded","innerIsOpen","Boolean","uniqId","useUniqId","innerId","rootRef","useRef","dropdownRef","handleRef","useForkRef","trapRef","useFocusTrap","dropdownForkRef","React","createElement","StyledPopover","usePortal","is","event","ref","getPlacements","_extends","StyledDropdown","dropdownOldConfig","name","tag","layout","base","variations","css","viewCSS","sizeCSS","defaults"],"mappings":";;;;;;;;;;;;;;AAYA;AACA;AACA;IACaA,eAAe,GAAG,SAAlBA,eAAeA,CAAIC,IAA8C,EAAA;AAAA,EAAA,oBAC1EC,gBAAU,CACN,UAAAC,IAAA,EAsBIC,YAAY,EACX;AAAA,IAAA,IArBGC,EAAE,GAAAF,IAAA,CAAFE,EAAE;MACFC,MAAM,GAAAH,IAAA,CAANG,MAAM;MACNC,QAAQ,GAAAJ,IAAA,CAARI,QAAQ;MACRC,QAAQ,GAAAL,IAAA,CAARK,QAAQ;MACRC,IAAI,GAAAN,IAAA,CAAJM,IAAI;MACJC,IAAI,GAAAP,IAAA,CAAJO,IAAI;MACJC,IAAI,GAAAR,IAAA,CAAJQ,IAAI;MACJC,KAAK,GAAAT,IAAA,CAALS,KAAK;MACLC,SAAQ,GAAAV,IAAA,CAARU,QAAQ;MAAAC,mBAAA,GAAAX,IAAA,CACRY,cAAc;AAAdA,MAAAA,cAAc,GAAAD,mBAAA,KAAG,KAAA,CAAA,GAAA,IAAI,GAAAA,mBAAA;MAAAE,WAAA,GAAAb,IAAA,CACrBc,MAAM;AAANA,MAAAA,MAAM,GAAAD,WAAA,KAAG,KAAA,CAAA,GAAA,KAAK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AAAA,IAAI,EAAEA,IAAAA;KAAUqB,EAAAA,IAAI,CAClDgB,eAAAA,KAAA,CAAAC,aAAA,CAACQ,8BAAc,EAAElD,IAAAA,EAAAA,QAAyB,CACxC,CACK,CAAC,CAAA;AAExB,GACJ,CAAC,CAAA;AAAA,EAAA;AAEE,IAAMmD,iBAAiB,GAAG;AAC7BC,EAAAA,IAAI,EAAE,UAAU;AAChBC,EAAAA,GAAG,EAAE,KAAK;AACVC,EAAAA,MAAM,EAAE7D,eAAe;AACvB8D,EAAAA,IAAI,EAAE,EAAE;AACRC,EAAAA,UAAU,EAAE;AACRrD,IAAAA,IAAI,EAAE;AACFsD,MAAAA,GAAG,EAAEC,SAAAA;KACR;AACDtD,IAAAA,IAAI,EAAE;AACFqD,MAAAA,GAAG,EAAEE,WAAAA;AACT,KAAA;GACH;AACDC,EAAAA,QAAQ,EAAE;AACNzD,IAAAA,IAAI,EAAE,SAAS;AACfC,IAAAA,IAAI,EAAE,GAAA;AACV,GAAA;AACJ;;;;;"}
@@ -10,6 +10,7 @@ var index = require('../../utils/index.js');
10
10
  var base = require('./variations/_view/base.js');
11
11
  var Popover_styles = require('./Popover.styles.js');
12
12
  var Popover_tokens = require('./Popover.tokens.js');
13
+ var useFocusTrap = require('../../hooks/useFocusTrap.js');
13
14
  var Portal = require('../Portal/Portal.js');
14
15
 
15
16
  var _excluded = ["target", "children", "isOpen", "opened", "trigger", "hasArrow", "frame", "className", "placement", "offset", "zIndex", "isFocusTrapped", "closeOnEsc", "preventOverflow", "usePortal", "view", "onToggle", "closeOnOverlayClick"];
@@ -55,7 +56,7 @@ var popoverRoot = function popoverRoot(Root) {
55
56
  var popoverRef = React.useRef(null);
56
57
  var handleRef = plasmaCore.useForkRef(rootRef, outerRootRef);
57
58
  var portalRef = React.useRef(null);
58
- var trapRef = plasmaCore.useFocusTrap(innerIsOpen && isFocusTrapped);
59
+ var trapRef = useFocusTrap.useFocusTrap(innerIsOpen && isFocusTrapped);
59
60
  var popoverForkRef = plasmaCore.useForkRef(popoverRef, trapRef);
60
61
  var _useState = React.useState(null),
61
62
  _useState2 = _rollupPluginBabelHelpers.slicedToArray(_useState, 2),
@@ -1 +1 @@
1
- {"version":3,"file":"Popover.js","sources":["../../../src/components/Popover/Popover.tsx"],"sourcesContent":["import React, { useRef, useCallback, useEffect, useState, forwardRef } from 'react';\nimport type { CSSProperties } from 'react';\nimport { usePopper } from 'react-popper';\nimport { useFocusTrap, useForkRef } from '@salutejs/plasma-core';\n\nimport type { RootProps } from '../../engines/types';\nimport { cx } from '../../utils';\nimport { Portal } from '../Portal';\n\nimport { base as viewCSS } from './variations/_view/base';\nimport type { PopoverPlacement, PopoverProps } from './Popover.types';\nimport { StyledArrow, StyledPopover, StyledRoot, StyledWrapper } from './Popover.styles';\nimport { classes } from './Popover.tokens';\n\nexport const ESCAPE_KEYCODE = 27;\nexport const POPOVER_PORTAL_ID = 'plasma-popover-root';\n\n/**\n * Всплывающее окно с возможностью позиционирования\n * и вызова по клику либо ховеру.\n */\nexport const popoverRoot = (Root: RootProps<HTMLDivElement, PopoverProps>) =>\n forwardRef<HTMLDivElement, PopoverProps>(\n (\n {\n target,\n children,\n isOpen,\n opened,\n trigger = 'click',\n hasArrow,\n frame = 'document',\n className,\n placement = 'auto',\n offset = [0, 0],\n zIndex,\n isFocusTrapped = true,\n closeOnEsc = true,\n preventOverflow = true,\n usePortal = false,\n view,\n onToggle,\n closeOnOverlayClick,\n ...rest\n },\n outerRootRef,\n ) => {\n const innerIsOpen = Boolean(isOpen || opened);\n\n const rootRef = useRef<HTMLDivElement | null>(null);\n const popoverRef = useRef<HTMLDivElement | null>(null);\n const handleRef = useForkRef<HTMLDivElement>(rootRef, outerRootRef);\n const portalRef = useRef<HTMLElement | null>(null);\n\n const trapRef = useFocusTrap(innerIsOpen && isFocusTrapped);\n\n const popoverForkRef = useForkRef<HTMLDivElement>(popoverRef, trapRef);\n\n const [arrowElement, setArrowElement] = useState<HTMLSpanElement | null>(null);\n\n const [, forceRender] = useState(false);\n\n const isAutoArray = Array.isArray(placement);\n const isAuto = isAutoArray || (placement as PopoverPlacement).startsWith('auto');\n\n const initialStyles = {\n visibility: innerIsOpen ? 'visible' : 'hidden',\n opacity: innerIsOpen ? 1 : 0,\n } as CSSProperties;\n\n const { styles, attributes, forceUpdate } = usePopper(rootRef.current, popoverRef.current, {\n // TODO: #1121\n // eslint-disable-next-line no-nested-ternary\n placement: isAutoArray\n ? placement[0]?.endsWith('start')\n ? 'auto-start'\n : 'auto'\n : (placement as PopoverPlacement),\n modifiers: [\n {\n name: 'preventOverflow',\n options: {\n mainAxis: preventOverflow,\n },\n },\n { name: 'offset', options: { offset: [offset[0], offset[1]] } },\n {\n name: 'flip',\n enabled: isAuto,\n options: {\n allowedAutoPlacements: isAutoArray ? (placement as PopoverPlacement[]) : [],\n },\n },\n {\n name: 'arrow',\n options: {\n element: arrowElement,\n },\n },\n ],\n });\n\n const onEscape = useCallback(\n (event: KeyboardEvent) => {\n if (innerIsOpen && closeOnEsc && event.keyCode === ESCAPE_KEYCODE) {\n onToggle?.(false, event);\n }\n },\n [closeOnEsc, innerIsOpen, onToggle],\n );\n\n const onDocumentClick = useCallback(\n (event: MouseEvent) => {\n if (innerIsOpen && closeOnOverlayClick && onToggle) {\n const targetIsRoot = event.target === rootRef.current;\n const rootHasTarget = rootRef.current?.contains(event.target as Element);\n const popoverRootHasTarget = popoverRef.current?.contains(event.target as Element);\n\n if (!targetIsRoot && !rootHasTarget && !popoverRootHasTarget) {\n onToggle(false, event);\n }\n }\n },\n [closeOnOverlayClick, innerIsOpen, onToggle],\n );\n\n const onClick = useCallback<React.MouseEventHandler>(\n (event) => {\n if (trigger === 'click') {\n const targetIsPopover = event.target === popoverRef.current;\n const rootHasTarget = popoverRef.current?.contains(event.target as Element);\n\n if (!targetIsPopover && !rootHasTarget) {\n onToggle?.(!innerIsOpen, event);\n }\n }\n },\n [trigger, innerIsOpen, onToggle],\n );\n\n const onMouseEnter = useCallback<React.MouseEventHandler>(\n (event) => {\n if (trigger === 'hover') {\n onToggle?.(true, event);\n }\n },\n [trigger, onToggle],\n );\n\n const onMouseLeave = useCallback<React.MouseEventHandler>(\n (event) => {\n if (trigger === 'hover') {\n onToggle?.(false, event);\n }\n },\n [trigger, onToggle],\n );\n\n const onFocus = useCallback<React.FocusEventHandler>(\n (event) => {\n if (trigger === 'hover') {\n onToggle?.(true, event);\n }\n },\n [trigger, onToggle],\n );\n\n const onBlur = useCallback<React.FocusEventHandler>(\n (event) => {\n if (trigger === 'hover') {\n onToggle?.(false, event);\n }\n },\n [trigger, onToggle],\n );\n\n useEffect(() => {\n document.addEventListener('click', onDocumentClick);\n return () => document.removeEventListener('click', onDocumentClick);\n }, [innerIsOpen, onToggle]);\n\n useEffect(() => {\n window.addEventListener('keydown', onEscape);\n return () => window.removeEventListener('keydown', onEscape);\n }, [closeOnEsc, innerIsOpen, onToggle]);\n\n useEffect(() => {\n let portal = document.getElementById(POPOVER_PORTAL_ID);\n\n if (typeof frame !== 'string' && frame && frame.current) {\n portal = frame.current;\n }\n\n if (!usePortal) {\n portal = rootRef.current;\n }\n\n if (!portal) {\n portal = document.createElement('div');\n portal.setAttribute('id', POPOVER_PORTAL_ID);\n\n if (typeof frame === 'string' && frame !== 'document') {\n document.getElementById(frame)?.appendChild(portal);\n } else {\n document.body.appendChild(portal);\n }\n }\n\n portalRef.current = portal;\n\n /**\n * Изменение стейта нужно для того, чтобы Popup\n * отобразился после записи DOM элемента в portalRef.current\n */\n forceRender(true);\n }, []);\n\n useEffect(() => {\n if (!innerIsOpen || !forceUpdate) {\n return;\n }\n\n /*\n * INFO: Метод forceUpdate содержит в себе flushSync и приводит\n * к повторному рендеру компонента, который уже находится в процессе рендера.\n * Данный хак, нужен для того, чтобы это поведение избежать и перенаправить\n * вызов метода в очередь микрозадач.\n */\n Promise.resolve().then(forceUpdate);\n }, [innerIsOpen, children, forceUpdate]);\n\n return (\n <StyledWrapper className={classes.wrapper} onMouseEnter={onMouseEnter} onMouseLeave={onMouseLeave}>\n <StyledRoot\n ref={handleRef}\n onClick={onClick}\n onFocus={onFocus}\n onBlur={onBlur}\n className={cx(className, classes.target)}\n >\n {target}\n </StyledRoot>\n {children && portalRef.current && (\n <Portal container={portalRef.current}>\n <Root view={view} className={className} {...rest}>\n <StyledPopover\n {...attributes.popper}\n className={classes.root}\n ref={popoverForkRef}\n style={{\n ...styles.popper,\n ...{ display: innerIsOpen ? 'block' : 'none' },\n ...initialStyles,\n }}\n zIndex={zIndex}\n >\n {hasArrow && (\n <StyledArrow\n className={classes.arrow}\n ref={setArrowElement}\n style={styles.arrow}\n {...attributes.arrow}\n />\n )}\n {children}\n </StyledPopover>\n </Root>\n </Portal>\n )}\n </StyledWrapper>\n );\n },\n );\n\nexport const popoverConfig = {\n name: 'Popover',\n tag: 'div',\n layout: popoverRoot,\n base: '',\n variations: {\n view: {\n css: viewCSS,\n },\n },\n defaults: {\n view: 'default',\n },\n};\n"],"names":["ESCAPE_KEYCODE","POPOVER_PORTAL_ID","popoverRoot","Root","forwardRef","_ref","outerRootRef","_placement$","target","children","isOpen","opened","_ref$trigger","trigger","hasArrow","_ref$frame","frame","className","_ref$placement","placement","_ref$offset","offset","zIndex","_ref$isFocusTrapped","isFocusTrapped","_ref$closeOnEsc","closeOnEsc","_ref$preventOverflow","preventOverflow","_ref$usePortal","usePortal","view","onToggle","closeOnOverlayClick","rest","_objectWithoutProperties","_excluded","innerIsOpen","Boolean","rootRef","useRef","popoverRef","handleRef","useForkRef","portalRef","trapRef","useFocusTrap","popoverForkRef","_useState","useState","_useState2","_slicedToArray","arrowElement","setArrowElement","_useState3","_useState4","forceRender","isAutoArray","Array","isArray","isAuto","startsWith","initialStyles","visibility","opacity","_usePopper","usePopper","current","endsWith","modifiers","name","options","mainAxis","enabled","allowedAutoPlacements","element","styles","attributes","forceUpdate","onEscape","useCallback","event","keyCode","onDocumentClick","_rootRef$current","_popoverRef$current","targetIsRoot","rootHasTarget","contains","popoverRootHasTarget","onClick","_popoverRef$current2","targetIsPopover","onMouseEnter","onMouseLeave","onFocus","onBlur","useEffect","document","addEventListener","removeEventListener","window","portal","getElementById","createElement","setAttribute","_document$getElementB","appendChild","body","Promise","resolve","then","React","StyledWrapper","classes","wrapper","StyledRoot","ref","cx","Portal","container","_extends","StyledPopover","popper","root","style","_objectSpread","display","StyledArrow","arrow","popoverConfig","tag","layout","base","variations","css","viewCSS","defaults"],"mappings":";;;;;;;;;;;;;;;AAcO,IAAMA,cAAc,GAAG,GAAE;AACzB,IAAMC,iBAAiB,GAAG,sBAAqB;;AAEtD;AACA;AACA;AACA;IACaC,WAAW,GAAG,SAAdA,WAAWA,CAAIC,IAA6C,EAAA;AAAA,EAAA,oBACrEC,gBAAU,CACN,UAAAC,IAAA,EAsBIC,YAAY,EACX;AAAA,IAAA,IAAAC,WAAA,CAAA;AAAA,IAAA,IArBGC,MAAM,GAAAH,IAAA,CAANG,MAAM;MACNC,QAAQ,GAAAJ,IAAA,CAARI,QAAQ;MACRC,MAAM,GAAAL,IAAA,CAANK,MAAM;MACNC,MAAM,GAAAN,IAAA,CAANM,MAAM;MAAAC,YAAA,GAAAP,IAAA,CACNQ,OAAO;AAAPA,MAAAA,OAAO,GAAAD,YAAA,KAAG,KAAA,CAAA,GAAA,OAAO,GAAAA,YAAA;MACjBE,QAAQ,GAAAT,IAAA,CAARS,QAAQ;MAAAC,UAAA,GAAAV,IAAA,CACRW,KAAK;AAALA,MAAAA,KAAK,GAAAD,UAAA,KAAG,KAAA,CAAA,GAAA,UAAU,GAAAA,UAAA;MAClBE,SAAS,GAAAZ,IAAA,CAATY,SAAS;MAAAC,cAAA,GAAAb,IAAA,CACTc,SAAS;AAATA,MAAAA,SAAS,GAAAD,cAAA,KAAG,KAAA,CAAA,GAAA,MAAM,GAAAA,cAAA;MAAAE,WAAA,GAAAf,IAAA,CAClBgB,MAAM;MAANA,MAAM,GAAAD,WAAA,KAAG,KAAA,CAAA,GAAA,CAAC,CAAC,EAAE,CAAC,C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vG,IAAAA,IAAI,EAAE;AACFwG,MAAAA,GAAG,EAAEC,SAAAA;AACT,KAAA;GACH;AACDC,EAAAA,QAAQ,EAAE;AACN1G,IAAAA,IAAI,EAAE,SAAA;AACV,GAAA;AACJ;;;;;;;"}
1
+ {"version":3,"file":"Popover.js","sources":["../../../src/components/Popover/Popover.tsx"],"sourcesContent":["import React, { useRef, useCallback, useEffect, useState, forwardRef } from 'react';\nimport type { CSSProperties } from 'react';\nimport { usePopper } from 'react-popper';\nimport { useForkRef } from '@salutejs/plasma-core';\n\nimport type { RootProps } from '../../engines/types';\nimport { useFocusTrap } from '../../hooks';\nimport { cx } from '../../utils';\nimport { Portal } from '../Portal';\n\nimport { base as viewCSS } from './variations/_view/base';\nimport type { PopoverPlacement, PopoverProps } from './Popover.types';\nimport { StyledArrow, StyledPopover, StyledRoot, StyledWrapper } from './Popover.styles';\nimport { classes } from './Popover.tokens';\n\nexport const ESCAPE_KEYCODE = 27;\nexport const POPOVER_PORTAL_ID = 'plasma-popover-root';\n\n/**\n * Всплывающее окно с возможностью позиционирования\n * и вызова по клику либо ховеру.\n */\nexport const popoverRoot = (Root: RootProps<HTMLDivElement, PopoverProps>) =>\n forwardRef<HTMLDivElement, PopoverProps>(\n (\n {\n target,\n children,\n isOpen,\n opened,\n trigger = 'click',\n hasArrow,\n frame = 'document',\n className,\n placement = 'auto',\n offset = [0, 0],\n zIndex,\n isFocusTrapped = true,\n closeOnEsc = true,\n preventOverflow = true,\n usePortal = false,\n view,\n onToggle,\n closeOnOverlayClick,\n ...rest\n },\n outerRootRef,\n ) => {\n const innerIsOpen = Boolean(isOpen || opened);\n\n const rootRef = useRef<HTMLDivElement | null>(null);\n const popoverRef = useRef<HTMLDivElement | null>(null);\n const handleRef = useForkRef<HTMLDivElement>(rootRef, outerRootRef);\n const portalRef = useRef<HTMLElement | null>(null);\n\n const trapRef = useFocusTrap(innerIsOpen && isFocusTrapped);\n\n const popoverForkRef = useForkRef<HTMLDivElement>(popoverRef, trapRef);\n\n const [arrowElement, setArrowElement] = useState<HTMLSpanElement | null>(null);\n\n const [, forceRender] = useState(false);\n\n const isAutoArray = Array.isArray(placement);\n const isAuto = isAutoArray || (placement as PopoverPlacement).startsWith('auto');\n\n const initialStyles = {\n visibility: innerIsOpen ? 'visible' : 'hidden',\n opacity: innerIsOpen ? 1 : 0,\n } as CSSProperties;\n\n const { styles, attributes, forceUpdate } = usePopper(rootRef.current, popoverRef.current, {\n // TODO: #1121\n // eslint-disable-next-line no-nested-ternary\n placement: isAutoArray\n ? placement[0]?.endsWith('start')\n ? 'auto-start'\n : 'auto'\n : (placement as PopoverPlacement),\n modifiers: [\n {\n name: 'preventOverflow',\n options: {\n mainAxis: preventOverflow,\n },\n },\n { name: 'offset', options: { offset: [offset[0], offset[1]] } },\n {\n name: 'flip',\n enabled: isAuto,\n options: {\n allowedAutoPlacements: isAutoArray ? (placement as PopoverPlacement[]) : [],\n },\n },\n {\n name: 'arrow',\n options: {\n element: arrowElement,\n },\n },\n ],\n });\n\n const onEscape = useCallback(\n (event: KeyboardEvent) => {\n if (innerIsOpen && closeOnEsc && event.keyCode === ESCAPE_KEYCODE) {\n onToggle?.(false, event);\n }\n },\n [closeOnEsc, innerIsOpen, onToggle],\n );\n\n const onDocumentClick = useCallback(\n (event: MouseEvent) => {\n if (innerIsOpen && closeOnOverlayClick && onToggle) {\n const targetIsRoot = event.target === rootRef.current;\n const rootHasTarget = rootRef.current?.contains(event.target as Element);\n const popoverRootHasTarget = popoverRef.current?.contains(event.target as Element);\n\n if (!targetIsRoot && !rootHasTarget && !popoverRootHasTarget) {\n onToggle(false, event);\n }\n }\n },\n [closeOnOverlayClick, innerIsOpen, onToggle],\n );\n\n const onClick = useCallback<React.MouseEventHandler>(\n (event) => {\n if (trigger === 'click') {\n const targetIsPopover = event.target === popoverRef.current;\n const rootHasTarget = popoverRef.current?.contains(event.target as Element);\n\n if (!targetIsPopover && !rootHasTarget) {\n onToggle?.(!innerIsOpen, event);\n }\n }\n },\n [trigger, innerIsOpen, onToggle],\n );\n\n const onMouseEnter = useCallback<React.MouseEventHandler>(\n (event) => {\n if (trigger === 'hover') {\n onToggle?.(true, event);\n }\n },\n [trigger, onToggle],\n );\n\n const onMouseLeave = useCallback<React.MouseEventHandler>(\n (event) => {\n if (trigger === 'hover') {\n onToggle?.(false, event);\n }\n },\n [trigger, onToggle],\n );\n\n const onFocus = useCallback<React.FocusEventHandler>(\n (event) => {\n if (trigger === 'hover') {\n onToggle?.(true, event);\n }\n },\n [trigger, onToggle],\n );\n\n const onBlur = useCallback<React.FocusEventHandler>(\n (event) => {\n if (trigger === 'hover') {\n onToggle?.(false, event);\n }\n },\n [trigger, onToggle],\n );\n\n useEffect(() => {\n document.addEventListener('click', onDocumentClick);\n return () => document.removeEventListener('click', onDocumentClick);\n }, [innerIsOpen, onToggle]);\n\n useEffect(() => {\n window.addEventListener('keydown', onEscape);\n return () => window.removeEventListener('keydown', onEscape);\n }, [closeOnEsc, innerIsOpen, onToggle]);\n\n useEffect(() => {\n let portal = document.getElementById(POPOVER_PORTAL_ID);\n\n if (typeof frame !== 'string' && frame && frame.current) {\n portal = frame.current;\n }\n\n if (!usePortal) {\n portal = rootRef.current;\n }\n\n if (!portal) {\n portal = document.createElement('div');\n portal.setAttribute('id', POPOVER_PORTAL_ID);\n\n if (typeof frame === 'string' && frame !== 'document') {\n document.getElementById(frame)?.appendChild(portal);\n } else {\n document.body.appendChild(portal);\n }\n }\n\n portalRef.current = portal;\n\n /**\n * Изменение стейта нужно для того, чтобы Popup\n * отобразился после записи DOM элемента в portalRef.current\n */\n forceRender(true);\n }, []);\n\n useEffect(() => {\n if (!innerIsOpen || !forceUpdate) {\n return;\n }\n\n /*\n * INFO: Метод forceUpdate содержит в себе flushSync и приводит\n * к повторному рендеру компонента, который уже находится в процессе рендера.\n * Данный хак, нужен для того, чтобы это поведение избежать и перенаправить\n * вызов метода в очередь микрозадач.\n */\n Promise.resolve().then(forceUpdate);\n }, [innerIsOpen, children, forceUpdate]);\n\n return (\n <StyledWrapper className={classes.wrapper} onMouseEnter={onMouseEnter} onMouseLeave={onMouseLeave}>\n <StyledRoot\n ref={handleRef}\n onClick={onClick}\n onFocus={onFocus}\n onBlur={onBlur}\n className={cx(className, classes.target)}\n >\n {target}\n </StyledRoot>\n {children && portalRef.current && (\n <Portal container={portalRef.current}>\n <Root view={view} className={className} {...rest}>\n <StyledPopover\n {...attributes.popper}\n className={classes.root}\n ref={popoverForkRef}\n style={{\n ...styles.popper,\n ...{ display: innerIsOpen ? 'block' : 'none' },\n ...initialStyles,\n }}\n zIndex={zIndex}\n >\n {hasArrow && (\n <StyledArrow\n className={classes.arrow}\n ref={setArrowElement}\n style={styles.arrow}\n {...attributes.arrow}\n />\n )}\n {children}\n </StyledPopover>\n </Root>\n </Portal>\n )}\n </StyledWrapper>\n );\n },\n );\n\nexport const popoverConfig = {\n name: 'Popover',\n tag: 'div',\n layout: popoverRoot,\n base: '',\n variations: {\n view: {\n css: viewCSS,\n },\n },\n defaults: {\n view: 'default',\n },\n};\n"],"names":["ESCAPE_KEYCODE","POPOVER_PORTAL_ID","popoverRoot","Root","forwardRef","_ref","outerRootRef","_placement$","target","children","isOpen","opened","_ref$trigger","trigger","hasArrow","_ref$frame","frame","className","_ref$placement","placement","_ref$offset","offset","zIndex","_ref$isFocusTrapped","isFocusTrapped","_ref$closeOnEsc","closeOnEsc","_ref$preventOverflow","preventOverflow","_ref$usePortal","usePortal","view","onToggle","closeOnOverlayClick","rest","_objectWithoutProperties","_excluded","innerIsOpen","Boolean","rootRef","useRef","popoverRef","handleRef","useForkRef","portalRef","trapRef","useFocusTrap","popoverForkRef","_useState","useState","_useState2","_slicedToArray","arrowElement","setArrowElement","_useState3","_useState4","forceRender","isAutoArray","Array","isArray","isAuto","startsWith","initialStyles","visibility","opacity","_usePopper","usePopper","current","endsWith","modifiers","name","options","mainAxis","enabled","allowedAutoPlacements","element","styles","attributes","forceUpdate","onEscape","useCallback","event","keyCode","onDocumentClick","_rootRef$current","_popoverRef$current","targetIsRoot","rootHasTarget","contains","popoverRootHasTarget","onClick","_popoverRef$current2","targetIsPopover","onMouseEnter","onMouseLeave","onFocus","onBlur","useEffect","document","addEventListener","removeEventListener","window","portal","getElementById","createElement","setAttribute","_document$getElementB","appendChild","body","Promise","resolve","then","React","StyledWrapper","classes","wrapper","StyledRoot","ref","cx","Portal","container","_extends","StyledPopover","popper","root","style","_objectSpread","display","StyledArrow","arrow","popoverConfig","tag","layout","base","variations","css","viewCSS","defaults"],"mappings":";;;;;;;;;;;;;;;;AAeO,IAAMA,cAAc,GAAG,GAAE;AACzB,IAAMC,iBAAiB,GAAG,sBAAqB;;AAEtD;AACA;AACA;AACA;IACaC,WAAW,GAAG,SAAdA,WAAWA,CAAIC,IAA6C,EAAA;AAAA,EAAA,oBACrEC,gBAAU,CACN,UAAAC,IAAA,EAsBIC,YAAY,EACX;AAAA,IAAA,IAAAC,WAAA,CAAA;AAAA,IAAA,IArBGC,MAAM,GAAAH,IAAA,CAANG,MAAM;MACNC,QAAQ,GAAAJ,IAAA,CAARI,QAAQ;MACRC,MAAM,GAAAL,IAAA,CAANK,MAAM;MACNC,MAAM,GAAAN,IAAA,CAANM,MAAM;MAAAC,YAAA,GAAAP,IAAA,CACNQ,OAAO;AAAPA,MAAAA,OAAO,GAAAD,YAAA,KAAG,KAAA,CAAA,GAAA,OAAO,GAAAA,YAAA;MACjBE,QAAQ,GAAAT,IAAA,CAARS,QAAQ;MAAAC,UAAA,GAAAV,IAAA,CACRW,KAAK;AAALA,MAAAA,KAAK,GAAAD,UAAA,KAAG,KAAA,CAAA,GAAA,UAAU,GAAAA,UAAA;MAClBE,SAAS,GAAAZ,IAAA,CAATY,SAAS;MAAAC,cAAA,GAAAb,IAAA,CACTc,SAAS;AAATA,MAAAA,SAAS,GAAAD,cAAA,KAAG,KAAA,CAAA,GAAA,MAAM,GAAAA,cAAA;MAAAE,WAAA,GAAAf,IAAA,CAClBgB,MAAM;MAANA,MAAM,GA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nBmI,EAAAA,IAAI,EAAE,EAAE;AACRC,EAAAA,UAAU,EAAE;AACRvG,IAAAA,IAAI,EAAE;AACFwG,MAAAA,GAAG,EAAEC,SAAAA;AACT,KAAA;GACH;AACDC,EAAAA,QAAQ,EAAE;AACN1G,IAAAA,IAAI,EAAE,SAAA;AACV,GAAA;AACJ;;;;;;;"}
@@ -0,0 +1,38 @@
1
+ import './ViewContainer_yiqfcb.css';
2
+ 'use strict';
3
+
4
+ Object.defineProperty(exports, '__esModule', { value: true });
5
+
6
+ var _rollupPluginBabelHelpers = require('../../_virtual/_rollupPluginBabelHelpers.js');
7
+ var React = require('react');
8
+ var base$1 = require('./_view/base.js');
9
+
10
+ var _excluded = ["children"];
11
+ var base = "bemjbnt";
12
+ var viewContainerRoot = function viewContainerRoot(Root) {
13
+ return /*#__PURE__*/React.forwardRef(function (props, ref) {
14
+ var children = props.children,
15
+ rest = _rollupPluginBabelHelpers.objectWithoutProperties(props, _excluded);
16
+ return /*#__PURE__*/React.createElement(Root, _rollupPluginBabelHelpers.extends({
17
+ ref: ref
18
+ }, rest), children);
19
+ });
20
+ };
21
+ var viewContainerConfig = {
22
+ name: 'ViewContainer',
23
+ tag: 'div',
24
+ layout: viewContainerRoot,
25
+ base: base,
26
+ variations: {
27
+ view: {
28
+ css: base$1.base
29
+ }
30
+ },
31
+ defaults: {
32
+ view: undefined
33
+ }
34
+ };
35
+
36
+ exports.viewContainerConfig = viewContainerConfig;
37
+ exports.viewContainerRoot = viewContainerRoot;
38
+ //# sourceMappingURL=ViewContainer.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ViewContainer.js","sources":["../../../src/components/ViewContainer/ViewContainer.tsx"],"sourcesContent":["import React, { forwardRef } from 'react';\nimport { css } from '@linaria/core';\n\nimport type { RootProps } from '../../engines/types';\n\nimport { base as viewCSS } from './_view/base';\n\nconst base = css`\n position: relative;\n`;\n\nexport type ViewContainerCustomProps = {\n /**\n * Вид компонента\n */\n view?: string;\n};\n\ntype ViewContainerProps = React.HTMLAttributes<HTMLDivElement> & ViewContainerCustomProps;\n\nexport const viewContainerRoot = (Root: RootProps<HTMLAnchorElement, ViewContainerProps>) =>\n forwardRef<HTMLAnchorElement, ViewContainerProps>((props, ref) => {\n const { children, ...rest } = props;\n\n return (\n <Root ref={ref} {...rest}>\n {children}\n </Root>\n );\n });\n\nexport const viewContainerConfig = {\n name: 'ViewContainer',\n tag: 'div',\n layout: viewContainerRoot,\n base,\n variations: {\n view: {\n css: viewCSS,\n },\n },\n defaults: {\n view: undefined,\n },\n};\n"],"names":["base","viewContainerRoot","Root","forwardRef","props","ref","children","rest","_excluded","React","createElement","_extends","viewContainerConfig","name","tag","layout","variations","view","css","viewCSS","defaults","undefined"],"mappings":";;;;;;;;;AAOA,IAAMA,IAAI,GAET,SAAA,CAAA;IAWYC,iBAAiB,GAAGA,SAApBA,iBAAiBA,CAAIC,IAAsD,EAAA;AAAA,EAAA,oBACpFC,gBAAU,CAAwC,UAACC,KAAK,EAAEC,GAAG,EAAK;AAC9D,IAAA,IAAQC,QAAQ,GAAcF,KAAK,CAA3BE,QAAQ;AAAKC,MAAAA,IAAAA,GAAAA,iDAAAA,CAASH,KAAK,EAAAI,SAAA,CAAA,CAAA;AAEnC,IAAA,oBACIC,KAAA,CAAAC,aAAA,CAACR,IAAI,EAAAS,iCAAA,CAAA;AAACN,MAAAA,GAAG,EAAEA,GAAAA;KAASE,EAAAA,IAAI,CACnBD,EAAAA,QACC,CAAC,CAAA;AAEf,GAAC,CAAC,CAAA;AAAA,EAAA;AAEC,IAAMM,mBAAmB,GAAG;AAC/BC,EAAAA,IAAI,EAAE,eAAe;AACrBC,EAAAA,GAAG,EAAE,KAAK;AACVC,EAAAA,MAAM,EAAEd,iBAAiB;AACzBD,EAAAA,IAAI,EAAJA,IAAI;AACJgB,EAAAA,UAAU,EAAE;AACRC,IAAAA,IAAI,EAAE;AACFC,MAAAA,GAAG,EAAEC,WAAAA;AACT,KAAA;GACH;AACDC,EAAAA,QAAQ,EAAE;AACNH,IAAAA,IAAI,EAAEI,SAAAA;AACV,GAAA;AACJ;;;;;"}
@@ -0,0 +1 @@
1
+ .bemjbnt{position:relative;}
@@ -1,9 +1,9 @@
1
- import './base_cghr9q.css';
1
+ import './base_x642ct.css';
2
2
  'use strict';
3
3
 
4
4
  Object.defineProperty(exports, '__esModule', { value: true });
5
5
 
6
- var base = "bhi37xj";
6
+ var base = "bhhdltp";
7
7
 
8
8
  exports.base = base;
9
9
  //# sourceMappingURL=base.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"base.js","sources":["../../../../src/components/ViewContainer/_view/base.ts"],"sourcesContent":["import { css } from '@linaria/core';\n\nexport const base = css``;\n"],"names":["base"],"mappings":";;;;AAEO,IAAMA,IAAI,GAAQ;;;;"}
package/cjs/index.css CHANGED
@@ -805,27 +805,4 @@
805
805
  .IconButton_styles_1q2jfs2_s15ptif0__7aea03a6{--plasma-icon-button-color:var(--plasma-attach-icon-button-color);--plasma-icon-button-background-color:var(--plasma-attach-icon-button-background-color);--plasma-icon-button-loading-background-color:var(--plasma-attach-icon-button-loading-background-color);--plasma-icon-button-color-hover:var(--plasma-attach-icon-button-color-hover);--plasma-icon-button-background-color-hover:var(--plasma-attach-icon-button-background-color-hover);--plasma-icon-button-color-active:var(--plasma-attach-icon-button-color-active);--plasma-icon-button-background-color-active:var(--plasma-attach-icon-button-background-color-active);--plasma-icon-button-scale-hover:var(--plasma-attach-icon-button-scale-hover);---plasma-icon-button-scale-active:var(---plasma-attach-icon-button-scale-active);--plasma-icon-button-height:var(--plasma-attach-icon-button-height);--plasma-icon-button-width:var(--plasma-attach-icon-button-width);--plasma-icon-button-padding:var(--plasma-attach-icon-button-padding);--plasma-icon-button-radius:var(--plasma-attach-icon-button-radius);--plasma-icon-button-radius-circle:var(--plasma-attach-icon-button-radius-circle);--plasma-icon-button-font-family:var(--plasma-attach-icon-button-font-family);--plasma-icon-button-font-size:var(--plasma-attach-icon-button-font-size);--plasma-icon-button-font-style:var(--plasma-attach-icon-button-font-style);--plasma-icon-button-font-weight:var(--plasma-attach-icon-button-font-weight);--plasma-icon-button-letter-spacing:var(--plasma-attach-icon-button-letter-spacing);--plasma-icon-button-line-height:var(--plasma-attach-icon-button-line-height);--plasma-icon-button-disabled-opacity:var(--plasma-attach-icon-button-disabled-opacity);--plasma-icon-button-focus-color:var(--plasma-attach-icon-button-focus-color);--plasma-icon-button-spinner-color:var(--plasma-attach-icon-button-spinner-color);--plasma-icon-button-spinner-size:var(--plasma-attach-icon-button-spinner-size);-webkit-flex-shrink:0;-ms-flex-negative:0;flex-shrink:0;}
806
806
  .IconButton_styles_1q2jfs2_shuaj1a__7aea03a6{--plasma-icon-button-color:var(--plasma-attach-icon-button-cancel-color);--plasma-icon-button-background-color:var(--plasma-attach-icon-button-cancel-background-color);--plasma-icon-button-loading-background-color:var(--plasma-attach-icon-button-cancel-loading-background-color);--plasma-icon-button-color-hover:var(--plasma-attach-icon-button-cancel-color-hover);--plasma-icon-button-background-color-hover:var(--plasma-attach-icon-button-cancel-background-color-hover);--plasma-icon-button-color-active:var(--plasma-attach-icon-button-cancel-color-active);--plasma-icon-button-background-color-active:var(--plasma-attach-icon-button-cancel-background-color-active);--plasma-icon-button-scale-hover:var(--plasma-attach-icon-button-cancel-scale-hover);---plasma-icon-button-scale-active:var(---plasma-attach-icon-button-cancel-scale-active);--plasma-icon-button-height:var(--plasma-attach-icon-button-cancel-height);--plasma-icon-button-width:var(--plasma-attach-icon-button-cancel-width);--plasma-icon-button-padding:var(--plasma-attach-icon-button-cancel-padding);--plasma-icon-button-radius:var(--plasma-attach-icon-button-cancel-radius);--plasma-icon-button-radius-circle:var(--plasma-attach-icon-button-cancel-radius-circle);--plasma-icon-button-font-family:var(--plasma-attach-icon-button-cancel-font-family);--plasma-icon-button-font-size:var(--plasma-attach-icon-button-cancel-font-size);--plasma-icon-button-font-style:var(--plasma-attach-icon-button-cancel-font-style);--plasma-icon-button-font-weight:var(--plasma-attach-icon-button-cancel-font-weight);--plasma-icon-button-letter-spacing:var(--plasma-attach-icon-button-cancel-letter-spacing);--plasma-icon-button-line-height:var(--plasma-attach-icon-button-cancel-line-height);--plasma-icon-button-disabled-opacity:var(--plasma-attach-icon-button-cancel-disabled-opacity);--plasma-icon-button-focus-color:var(--plasma-attach-icon-button-cancel-focus-color);--plasma-icon-button-spinner-color:var(--plasma-attach-icon-button-cancel-spinner-color);--plasma-icon-button-spinner-size:var(--plasma-attach-icon-button-cancel-spinner-size);}
807
807
 
808
- .Input_styles_jszc0c_i1s8bsh6__6eb57599{overflow-x:auto;overflow-y:hidden;-webkit-flex:1;-ms-flex:1;flex:1;cursor:var(--i1s8bsh6-0);-webkit-scrollbar-width:none;-moz-scrollbar-width:none;-ms-scrollbar-width:none;scrollbar-width:none;overscroll-behavior:contain;}.Input_styles_jszc0c_i1s8bsh6__6eb57599::-webkit-scrollbar{display:none;}
809
- .Input_styles_jszc0c_t6wb9c__6eb57599{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-align-items:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:center;-webkit-justify-content:center;-ms-flex-pack:center;justify-content:center;width:-webkit-fit-content;width:-moz-fit-content;width:fit-content;margin:0 auto;box-sizing:border-box;}
810
-
811
-
812
-
813
- .Input_styles_jszc0c_d1n4jo6t__6eb57599{position:relative;}
814
- .Input_styles_jszc0c_i1tgbhg7__6eb57599{box-sizing:border-box;-webkit-appearance:none;-moz-appearance:none;appearance:none;border:0;padding:0;background-color:transparent;outline:none;width:var(--i1tgbhg7-0);box-sizing:border-box;cursor:var(--i1tgbhg7-1);pointer-events:var(--i1tgbhg7-2);-webkit-transition:width 0.1s;transition:width 0.1s;}.Input_styles_jszc0c_i1tgbhg7__6eb57599.Input_styles_jszc0c_i1tgbhg7__6eb57599.Input_styles_jszc0c_errorAnimation__6eb57599{color:var(--plasma-number-input_error-color);-webkit-animation:Input_styles_jszc0c_shakingErrorI1tgbhg7__6eb57599 0.5s forwards;animation:Input_styles_jszc0c_shakingErrorI1tgbhg7__6eb57599 0.5s forwards;}@-webkit-keyframes Input_styles_jszc0c_shakingErrorI1tgbhg7__6eb57599{0%{opacity:1;}12.5%{-webkit-transform:translateX(0.188rem);-ms-transform:translateX(0.188rem);transform:translateX(0.188rem);}25%{-webkit-transform:translateX(-0.188rem);-ms-transform:translateX(-0.188rem);transform:translateX(-0.188rem);}37.5%{-webkit-transform:translateX(0.188rem);-ms-transform:translateX(0.188rem);transform:translateX(0.188rem);}50%{opacity:1;-webkit-transform:translateX(-0.188rem);-ms-transform:translateX(-0.188rem);transform:translateX(-0.188rem);}62.5%{-webkit-transform:translateX(0.188rem);-ms-transform:translateX(0.188rem);transform:translateX(0.188rem);}75%{-webkit-transform:translateX(-0.188rem);-ms-transform:translateX(-0.188rem);transform:translateX(-0.188rem);}87.5%{-webkit-transform:translateX(0.188rem);-ms-transform:translateX(0.188rem);transform:translateX(0.188rem);}100%{opacity:0;-webkit-transform:translateX(-0.188rem);-ms-transform:translateX(-0.188rem);transform:translateX(-0.188rem);}}@keyframes Input_styles_jszc0c_shakingErrorI1tgbhg7__6eb57599{0%{opacity:1;}12.5%{-webkit-transform:translateX(0.188rem);-ms-transform:translateX(0.188rem);transform:translateX(0.188rem);}25%{-webkit-transform:translateX(-0.188rem);-ms-transform:translateX(-0.188rem);transform:translateX(-0.188rem);}37.5%{-webkit-transform:translateX(0.188rem);-ms-transform:translateX(0.188rem);transform:translateX(0.188rem);}50%{opacity:1;-webkit-transform:translateX(-0.188rem);-ms-transform:translateX(-0.188rem);transform:translateX(-0.188rem);}62.5%{-webkit-transform:translateX(0.188rem);-ms-transform:translateX(0.188rem);transform:translateX(0.188rem);}75%{-webkit-transform:translateX(-0.188rem);-ms-transform:translateX(-0.188rem);transform:translateX(-0.188rem);}87.5%{-webkit-transform:translateX(0.188rem);-ms-transform:translateX(0.188rem);transform:translateX(0.188rem);}100%{opacity:0;-webkit-transform:translateX(-0.188rem);-ms-transform:translateX(-0.188rem);transform:translateX(-0.188rem);}}
815
- .Input_styles_jszc0c_i1il5xze__6eb57599{position:absolute;z-index:-999;visibility:hidden;top:0;left:0;opacity:0;height:0;white-space:pre;}
816
-
817
- .NumberInput_styles_jeawjl_bwds6g__9a871afb{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;}
818
-
819
- .base_cghr9q_bhi37xj__10de7ad9 .base_cghr9q_sj0ab1b__10de7ad9{--plasma-icon-button-color:var(--plasma-number-input_icon-button_color);--plasma-icon-button-background-color:var(--plasma-number-input_icon-button_background-color);--plasma-icon-button-color-hover:var(--plasma-number-input_icon-button_color-hover);--plasma-icon-button-background-color-hover:var(--plasma-number-input_icon-button_background-color-hover);--plasma-icon-button-color-active:var(--plasma-number-input_icon-button_color-active);--plasma-icon-button-background-color-active:var(--plasma-number-input_icon-button_background-color-active);}.base_cghr9q_bhi37xj__10de7ad9 .base_cghr9q_sj0ab1b__10de7ad9.base_cghr9q_actionButtonDecrementDisabled__10de7ad9,.base_cghr9q_bhi37xj__10de7ad9 .base_cghr9q_sj0ab1b__10de7ad9.base_cghr9q_actionButtonIncrementDisabled__10de7ad9{opacity:var(--plasma-number-input_action-button_disabled-opacity);cursor:not-allowed;}.base_cghr9q_bhi37xj__10de7ad9 .base_cghr9q_sj0ab1b__10de7ad9.base_cghr9q_actionButtonDecrementDisabled__10de7ad9:hover,.base_cghr9q_bhi37xj__10de7ad9 .base_cghr9q_sj0ab1b__10de7ad9.base_cghr9q_actionButtonIncrementDisabled__10de7ad9:hover,.base_cghr9q_bhi37xj__10de7ad9 .base_cghr9q_sj0ab1b__10de7ad9.base_cghr9q_actionButtonDecrementDisabled__10de7ad9:active,.base_cghr9q_bhi37xj__10de7ad9 .base_cghr9q_sj0ab1b__10de7ad9.base_cghr9q_actionButtonIncrementDisabled__10de7ad9:active{scale:none;color:var(--plasma-number-input_icon-button_color);background-color:var(--plasma-number-input_icon-button_background-color);}.base_cghr9q_bhi37xj__10de7ad9.base_cghr9q_bhi37xj__10de7ad9 .base_cghr9q_i1s8bsh6__10de7ad9:focus-within{background-color:var(--plasma-number-input_background-color-focus);box-shadow:inset 0 0 0 var(--plasma-number-input_input-wrapper_border-width) var(--plasma-number-input_border-color-focus);}.base_cghr9q_bhi37xj__10de7ad9 .base_cghr9q_s1ft73sv__10de7ad9{--plasma-spinner-color:var(--plasma-number-input_loader-spinner_color);}.base_cghr9q_bhi37xj__10de7ad9 .base_cghr9q_i1tgbhg7__10de7ad9{color:var(--plasma-number-input_color);caret-color:var(--plasma-number-input_caret_color);}.base_cghr9q_bhi37xj__10de7ad9 .base_cghr9q_az36kha__10de7ad9{color:var(--plasma-number-input_additional-text_color);}
820
-
821
- .base_1pju5qf_b13wjeky__eb7ed667{width:var(--plasma_private-number-input_width);min-width:var(--plasma-number-input_min-width);}.base_1pju5qf_b13wjeky__eb7ed667 .base_1pju5qf_sj0ab1b__eb7ed667{--plasma-icon-button-height:var(--plasma-number-input_icon-button_height);--plasma-icon-button-width:var(--plasma-number-input_icon-button_width);--plasma-icon-button-padding:var(--plasma-number-input_icon-button_padding);--plasma-icon-button-font-family:var(--plasma-number-input_icon-button_font-family);--plasma-icon-button-font-size:var(--plasma-number-input_icon-button_font-size);--plasma-icon-button-font-style:var(--plasma-number-input_icon-button_font-style);--plasma-icon-button-font-weight:var(--plasma-number-input_icon-button_font-weight);--plasma-icon-button-letter-spacing:var(--plasma-number-input_icon-button_letter-spacing);--plasma-icon-button-line-height:var(--plasma-number-input_icon-button_line-height);}.base_1pju5qf_b13wjeky__eb7ed667 .base_1pju5qf_i1s8bsh6__eb7ed667{margin:var(--plasma-number-input_input-wrapper_margin);border-radius:var(--plasma-number-input_input-wrapper_border-radius);}.base_1pju5qf_b13wjeky__eb7ed667 .base_1pju5qf_t6wb9c__eb7ed667{height:var(--plasma-number-input_text-wrapper_height);padding:var(--plasma-number-input_text-wrapper_padding);}.base_1pju5qf_b13wjeky__eb7ed667 .base_1pju5qf_d1n4jo6t__eb7ed667,.base_1pju5qf_b13wjeky__eb7ed667 .base_1pju5qf_i1tgbhg7__eb7ed667,.base_1pju5qf_b13wjeky__eb7ed667 .base_1pju5qf_az36kha__eb7ed667{font-family:var(--plasma-number-input_font-family);font-size:var(--plasma-number-input_font-size);font-style:var(--plasma-number-input_font-style);font-weight:var(--plasma-number-input_font-weight);-webkit-letter-spacing:var(--plasma-number-input_letter-spacing);-moz-letter-spacing:var(--plasma-number-input_letter-spacing);-ms-letter-spacing:var(--plasma-number-input_letter-spacing);letter-spacing:var(--plasma-number-input_letter-spacing);line-height:var(--plasma-number-input_line-height);}.base_1pju5qf_b13wjeky__eb7ed667 .base_1pju5qf_az36kha__eb7ed667.base_1pju5qf_textBefore__eb7ed667{margin-right:var(--plasma-number-input_text-before_margin-right);}.base_1pju5qf_b13wjeky__eb7ed667 .base_1pju5qf_az36kha__eb7ed667.base_1pju5qf_textAfter__eb7ed667{margin-left:var(--plasma-number-input_text-after_margin-left);}.base_1pju5qf_b13wjeky__eb7ed667 .base_1pju5qf_s1ft73sv__eb7ed667{--plasma-spinner-size:var(--plasma-number-input_loader-spinner_size);}
822
-
823
- .base_k05biw_b1l31q8y__7da7a6d0 .base_k05biw_sj0ab1b__7da7a6d0{--plasma-icon-button-radius:var(--plasma-number-input_icon-button_radius);}
824
-
825
- .base_1jmdljr_b15uqx38__1838da29 .base_1jmdljr_i1s8bsh6__1838da29{background-color:var(--plasma-number-input_background-color);box-shadow:inset 0 0 0 var(--plasma-number-input_input-wrapper_border-width) var(--plasma-number-input_border-color);}.base_1jmdljr_b15uqx38__1838da29 .base_1jmdljr_i1s8bsh6__1838da29:hover{background-color:var(--plasma-number-input_background-color-hover);box-shadow:inset 0 0 0 var(--plasma-number-input_input-wrapper_border-width) var(--plasma-number-input_border-color-hover);}
826
-
827
- .base_nl8ve_bpps6rw__1f8a3627 .base_nl8ve_sj0ab1b__1f8a3627{--plasma_private-segemntation-border-radius:var(--plasma-number-input_icon-button_radius);}.base_nl8ve_bpps6rw__1f8a3627 .base_nl8ve_sj0ab1b__1f8a3627.base_nl8ve_segmentedView__1f8a3627,.base_nl8ve_bpps6rw__1f8a3627 .base_nl8ve_sj0ab1b__1f8a3627.base_nl8ve_solidView__1f8a3627{--plasma_private-segemntation-border-radius:var(--plasma-number-input_icon-button_segmentation_radius,var(--plasma-number-input_icon-button_radius));}.base_nl8ve_bpps6rw__1f8a3627 .base_nl8ve_sj0ab1b__1f8a3627.base_nl8ve_actionButtonDecrement__1f8a3627{border-radius:var(--plasma-number-input_icon-button_radius) var(--plasma_private-segemntation-border-radius) var(--plasma_private-segemntation-border-radius) var(--plasma-number-input_icon-button_radius);}.base_nl8ve_bpps6rw__1f8a3627 .base_nl8ve_sj0ab1b__1f8a3627.base_nl8ve_actionButtonIncrement__1f8a3627{border-radius:var(--plasma_private-segemntation-border-radius) var(--plasma-number-input_icon-button_radius) var(--plasma-number-input_icon-button_radius) var(--plasma_private-segemntation-border-radius);}.base_nl8ve_bpps6rw__1f8a3627 .base_nl8ve_sj0ab1b__1f8a3627.base_nl8ve_solidView__1f8a3627{background:transparent;}.base_nl8ve_bpps6rw__1f8a3627 .base_nl8ve_sj0ab1b__1f8a3627.base_nl8ve_solidView__1f8a3627:hover{background-color:var(--plasma-number-input_icon-button_background-color-hover);}.base_nl8ve_bpps6rw__1f8a3627 .base_nl8ve_sj0ab1b__1f8a3627.base_nl8ve_solidView__1f8a3627:active{background-color:var(--plasma-number-input_icon-button_background-color-active);}.base_nl8ve_bpps6rw__1f8a3627 .base_nl8ve_sj0ab1b__1f8a3627.base_nl8ve_solidView__1f8a3627.base_nl8ve_actionButtonDecrementDisabled__1f8a3627:hover,.base_nl8ve_bpps6rw__1f8a3627 .base_nl8ve_sj0ab1b__1f8a3627.base_nl8ve_solidView__1f8a3627.base_nl8ve_actionButtonIncrementDisabled__1f8a3627:hover,.base_nl8ve_bpps6rw__1f8a3627 .base_nl8ve_sj0ab1b__1f8a3627.base_nl8ve_solidView__1f8a3627.base_nl8ve_actionButtonDecrementDisabled__1f8a3627:active,.base_nl8ve_bpps6rw__1f8a3627 .base_nl8ve_sj0ab1b__1f8a3627.base_nl8ve_solidView__1f8a3627.base_nl8ve_actionButtonIncrementDisabled__1f8a3627:active{background-color:transparent;}.base_nl8ve_bpps6rw__1f8a3627 .base_nl8ve_sj0ab1b__1f8a3627.base_nl8ve_solidView__1f8a3627.base_nl8ve_actionButtonDecrementDisabled__1f8a3627,.base_nl8ve_bpps6rw__1f8a3627 .base_nl8ve_sj0ab1b__1f8a3627.base_nl8ve_solidView__1f8a3627.base_nl8ve_actionButtonIncrementDisabled__1f8a3627{opacity:1;}.base_nl8ve_bpps6rw__1f8a3627 .base_nl8ve_sj0ab1b__1f8a3627.base_nl8ve_solidView__1f8a3627.base_nl8ve_actionButtonDecrementDisabled__1f8a3627 svg,.base_nl8ve_bpps6rw__1f8a3627 .base_nl8ve_sj0ab1b__1f8a3627.base_nl8ve_solidView__1f8a3627.base_nl8ve_actionButtonIncrementDisabled__1f8a3627 svg{opacity:var(--plasma-number-input_action-button_disabled-opacity);}.base_nl8ve_bpps6rw__1f8a3627 .base_nl8ve_sj0ab1b__1f8a3627.base_nl8ve_solidView__1f8a3627.base_nl8ve_actionButtonDecrementDisabled__1f8a3627:hover svg,.base_nl8ve_bpps6rw__1f8a3627 .base_nl8ve_sj0ab1b__1f8a3627.base_nl8ve_solidView__1f8a3627.base_nl8ve_actionButtonIncrementDisabled__1f8a3627:hover svg,.base_nl8ve_bpps6rw__1f8a3627 .base_nl8ve_sj0ab1b__1f8a3627.base_nl8ve_solidView__1f8a3627.base_nl8ve_actionButtonDecrementDisabled__1f8a3627:active svg,.base_nl8ve_bpps6rw__1f8a3627 .base_nl8ve_sj0ab1b__1f8a3627.base_nl8ve_solidView__1f8a3627.base_nl8ve_actionButtonIncrementDisabled__1f8a3627:active svg{opacity:var(--plasma-number-input_action-button_disabled-opacity);}.base_nl8ve_bpps6rw__1f8a3627.base_nl8ve_solidView__1f8a3627{background:var(--plasma-number-input_background-color-solid);border-radius:var(--plasma-number-input_icon-button_radius);}.base_nl8ve_bpps6rw__1f8a3627.base_nl8ve_solidView__1f8a3627 .base_nl8ve_i1s8bsh6__1f8a3627{position:relative;color:var(--plasma-number-input_color-solid);}.base_nl8ve_bpps6rw__1f8a3627.base_nl8ve_solidView__1f8a3627 .base_nl8ve_i1s8bsh6__1f8a3627:focus-within{background-color:var(--plasma-number-input_background-color-solid-focus);box-shadow:inset 0 0 0 var(--plasma-number-input_input-wrapper_border-width) var(--plasma-number-input_border-color-solid-focus);}.base_nl8ve_bpps6rw__1f8a3627.base_nl8ve_solidView__1f8a3627 .base_nl8ve_s1ft73sv__1f8a3627{--plasma-spinner-color:var(--plasma-number-input_loader-spinner_color-solid);}.base_nl8ve_bpps6rw__1f8a3627.base_nl8ve_solidView__1f8a3627 .base_nl8ve_i1tgbhg7__1f8a3627{caret-color:var(--plasma-number-input_caret_color-solid,var(--plasma-number-input_caret_color));}.base_nl8ve_bpps6rw__1f8a3627.base_nl8ve_solidView__1f8a3627 .base_nl8ve_i1tgbhg7__1f8a3627:not(.base_nl8ve_errorAnimation__1f8a3627){color:var(--plasma-number-input_color-solid);}.base_nl8ve_bpps6rw__1f8a3627.base_nl8ve_solidView__1f8a3627 .base_nl8ve_az36kha__1f8a3627{color:var(--plasma-number-input_additional-text_color-solid);}
828
-
829
- .base_3l8dqb_b750ywr__50c564e0.base_3l8dqb_clearView__50c564e0{background:transparent;}.base_3l8dqb_b750ywr__50c564e0.base_3l8dqb_clearView__50c564e0 .base_3l8dqb_sj0ab1b__50c564e0{--plasma-icon-button-color:var(--plasma-number-input_icon-button_color-clear);--plasma-icon-button-background-color:transparent;--plasma-icon-button-color-hover:var(--plasma-number-input_icon-button_color-clear);--plasma-icon-button-background-color-hover:transparent;--plasma-icon-button-color-active:var(--plasma-number-input_icon-button_color-clear);--plasma-icon-button-background-color-active:transparent;}.base_3l8dqb_b750ywr__50c564e0.base_3l8dqb_clearView__50c564e0 .base_3l8dqb_sj0ab1b__50c564e0:hover,.base_3l8dqb_b750ywr__50c564e0.base_3l8dqb_clearView__50c564e0 .base_3l8dqb_sj0ab1b__50c564e0:active{color:var(--plasma-number-input_icon-button_color-clear);background-color:transparent;}.base_3l8dqb_b750ywr__50c564e0.base_3l8dqb_clearView__50c564e0 .base_3l8dqb_sj0ab1b__50c564e0.base_3l8dqb_actionButtonDecrementDisabled__50c564e0:hover,.base_3l8dqb_b750ywr__50c564e0.base_3l8dqb_clearView__50c564e0 .base_3l8dqb_sj0ab1b__50c564e0.base_3l8dqb_actionButtonIncrementDisabled__50c564e0:hover,.base_3l8dqb_b750ywr__50c564e0.base_3l8dqb_clearView__50c564e0 .base_3l8dqb_sj0ab1b__50c564e0.base_3l8dqb_actionButtonDecrementDisabled__50c564e0:active,.base_3l8dqb_b750ywr__50c564e0.base_3l8dqb_clearView__50c564e0 .base_3l8dqb_sj0ab1b__50c564e0.base_3l8dqb_actionButtonIncrementDisabled__50c564e0:active{color:var(--plasma-number-input_icon-button_color-clear);background-color:transparent;}.base_3l8dqb_b750ywr__50c564e0.base_3l8dqb_clearView__50c564e0.base_3l8dqb_b750ywr__50c564e0.base_3l8dqb_clearView__50c564e0 .base_3l8dqb_i1s8bsh6__50c564e0{background-color:transparent;box-shadow:transparent;}.base_3l8dqb_b750ywr__50c564e0.base_3l8dqb_clearView__50c564e0.base_3l8dqb_b750ywr__50c564e0.base_3l8dqb_clearView__50c564e0 .base_3l8dqb_i1s8bsh6__50c564e0:focus-within{background-color:var(--plasma-number-input_background-color-focus);box-shadow:inset 0 0 0 var(--plasma-number-input_input-wrapper_border-width) var(--plasma-number-input_border-color-focus);}.base_3l8dqb_b750ywr__50c564e0.base_3l8dqb_clearView__50c564e0 .base_3l8dqb_i1tgbhg7__50c564e0{caret-color:var(--plasma-number-input_caret_color);}.base_3l8dqb_b750ywr__50c564e0.base_3l8dqb_clearView__50c564e0 .base_3l8dqb_i1tgbhg7__50c564e0:not(.base_3l8dqb_errorAnimation__50c564e0){color:var(--plasma-number-input_color-clear);}.base_3l8dqb_b750ywr__50c564e0.base_3l8dqb_clearView__50c564e0 .base_3l8dqb_az36kha__50c564e0{color:var(--plasma-number-input_additional-text_color-clear);}
830
-
831
- .base_1sl0mh8_bmqk5v5__e93ebd2b.base_1sl0mh8_bmqk5v5__e93ebd2b.base_1sl0mh8_numberInputDisabled__e93ebd2b{pointer-events:none;opacity:var(--plasma-number-input_disabled-opacity);cursor:not-allowed;}
808
+ .ViewContainer_yiqfcb_bemjbnt__5b2a6776{position:relative;}
package/cjs/index.js CHANGED
@@ -205,8 +205,7 @@ var Editable_tokens = require('./components/Editable/Editable.tokens.js');
205
205
  var Mask = require('./components/Mask/Mask.js');
206
206
  var Attach = require('./components/Attach/Attach.js');
207
207
  var Attach_tokens = require('./components/Attach/Attach.tokens.js');
208
- var NumberInput = require('./components/NumberInput/NumberInput.js');
209
- var NumberInput_tokens = require('./components/NumberInput/NumberInput.tokens.js');
208
+ var ViewContainer = require('./components/ViewContainer/ViewContainer.js');
210
209
 
211
210
 
212
211
 
@@ -598,8 +597,6 @@ exports.composeMask = Mask.composeMask;
598
597
  exports.attachConfig = Attach.attachConfig;
599
598
  exports.attachRoot = Attach.attachRoot;
600
599
  exports.attachTokens = Attach_tokens.tokens;
601
- exports.numberInputConfig = NumberInput.numberInputConfig;
602
- exports.numberInputRoot = NumberInput.numberInputRoot;
603
- exports.numberInputClasses = NumberInput_tokens.classes;
604
- exports.numberInputTokens = NumberInput_tokens.tokens;
600
+ exports.viewContainerConfig = ViewContainer.viewContainerConfig;
601
+ exports.viewContainerRoot = ViewContainer.viewContainerRoot;
605
602
  //# sourceMappingURL=index.js.map
package/cjs/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
@@ -13,13 +13,14 @@ var _Overlay = /*#__PURE__*/require("../Overlay");
13
13
  var _utils = /*#__PURE__*/require("../Popup/utils");
14
14
  var _Panel = /*#__PURE__*/require("../Panel");
15
15
  var _utils2 = /*#__PURE__*/require("../../utils");
16
+ var _hooks = /*#__PURE__*/require("../../hooks");
16
17
  var _Drawer = /*#__PURE__*/require("./Drawer.tokens");
17
18
  var _base = /*#__PURE__*/require("./variations/_view/base");
18
19
  var _base2 = /*#__PURE__*/require("./variations/_size/base");
19
20
  var _base3 = /*#__PURE__*/require("./variations/_borderRadius/base");
20
21
  var _Drawer2 = /*#__PURE__*/require("./Drawer.styles");
21
22
  var _DrawerContext = /*#__PURE__*/require("./DrawerContext");
22
- var _hooks = /*#__PURE__*/require("./hooks");
23
+ var _hooks2 = /*#__PURE__*/require("./hooks");
23
24
  var _excluded = ["id", "zIndex", "popupInfo", "withBlur", "children", "view", "size", "width", "height", "isOpen", "opened", "initialFocusRef", "focusAfterRef", "className", "onClose", "onOverlayClick", "onEscKeyDown", "offset", "frame", "borderRadius", "placement", "closeOnEsc", "closeOnOverlayClick", "asModal"];
24
25
  function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
25
26
  function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { "default": e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n["default"] = e, t && t.set(e, n), n; }
@@ -62,7 +63,7 @@ var drawerRoot = exports.drawerRoot = function drawerRoot(Root) {
62
63
  asModal = _ref$asModal === void 0 ? true : _ref$asModal,
63
64
  rest = _objectWithoutProperties(_ref, _excluded);
64
65
  var innerIsOpen = Boolean(isOpen || opened);
65
- var trapRef = (0, _plasmaCore.useFocusTrap)(true, initialFocusRef, focusAfterRef);
66
+ var trapRef = (0, _hooks.useFocusTrap)(true, initialFocusRef, focusAfterRef);
66
67
  var popupController = (0, _Popup.usePopupContext)();
67
68
  var innerRef = (0, _plasmaCore.useForkRef)(trapRef, outerRef);
68
69
  var uniqId = (0, _plasmaCore.safeUseId)();
@@ -71,7 +72,7 @@ var drawerRoot = exports.drawerRoot = function drawerRoot(Root) {
71
72
  var innerWidth = width ? (0, _utils2.getSizeValueFromProp)(width) : '100%';
72
73
  var innerHeight = height ? (0, _utils2.getSizeValueFromProp)(height) : '100%';
73
74
  var placementClass = placement ? _Drawer.classes["".concat(placement, "Placement")] : undefined;
74
- var _useDrawer = (0, _hooks.useDrawer)({
75
+ var _useDrawer = (0, _hooks2.useDrawer)({
75
76
  id: innerId,
76
77
  isOpen: innerIsOpen,
77
78
  closeOnEsc: closeOnEsc,
@@ -7,6 +7,7 @@ Object.defineProperty(exports, "__esModule", {
7
7
  exports.dropdownOldRoot = exports.dropdownOldConfig = void 0;
8
8
  var _react = /*#__PURE__*/_interopRequireWildcard( /*#__PURE__*/require("react"));
9
9
  var _plasmaCore = /*#__PURE__*/require("@salutejs/plasma-core");
10
+ var _hooks = /*#__PURE__*/require("../../../../hooks");
10
11
  var _base = /*#__PURE__*/require("./variations/_view/base");
11
12
  var _base2 = /*#__PURE__*/require("./variations/_size/base");
12
13
  var _Dropdown = /*#__PURE__*/require("./Dropdown.styles");
@@ -56,7 +57,7 @@ var dropdownOldRoot = exports.dropdownOldRoot = function dropdownOldRoot(Root) {
56
57
  var rootRef = (0, _react.useRef)(null);
57
58
  var dropdownRef = (0, _react.useRef)(null);
58
59
  var handleRef = (0, _plasmaCore.useForkRef)(rootRef, outerRootRef);
59
- var trapRef = (0, _plasmaCore.useFocusTrap)(innerIsOpen && isFocusTrapped);
60
+ var trapRef = (0, _hooks.useFocusTrap)(innerIsOpen && isFocusTrapped);
60
61
  var dropdownForkRef = (0, _plasmaCore.useForkRef)(dropdownRef, trapRef);
61
62
  return /*#__PURE__*/_react["default"].createElement(_Dropdown.StyledPopover, {
62
63
  role: role,
@@ -8,6 +8,7 @@ exports.popoverRoot = exports.popoverConfig = exports.POPOVER_PORTAL_ID = export
8
8
  var _react = /*#__PURE__*/_interopRequireWildcard( /*#__PURE__*/require("react"));
9
9
  var _reactPopper = /*#__PURE__*/require("react-popper");
10
10
  var _plasmaCore = /*#__PURE__*/require("@salutejs/plasma-core");
11
+ var _hooks = /*#__PURE__*/require("../../hooks");
11
12
  var _utils = /*#__PURE__*/require("../../utils");
12
13
  var _Portal = /*#__PURE__*/require("../Portal");
13
14
  var _base = /*#__PURE__*/require("./variations/_view/base");
@@ -72,7 +73,7 @@ var popoverRoot = exports.popoverRoot = function popoverRoot(Root) {
72
73
  var popoverRef = (0, _react.useRef)(null);
73
74
  var handleRef = (0, _plasmaCore.useForkRef)(rootRef, outerRootRef);
74
75
  var portalRef = (0, _react.useRef)(null);
75
- var trapRef = (0, _plasmaCore.useFocusTrap)(innerIsOpen && isFocusTrapped);
76
+ var trapRef = (0, _hooks.useFocusTrap)(innerIsOpen && isFocusTrapped);
76
77
  var popoverForkRef = (0, _plasmaCore.useForkRef)(popoverRef, trapRef);
77
78
  var _useState = (0, _react.useState)(null),
78
79
  _useState2 = _slicedToArray(_useState, 2),
@@ -0,0 +1,49 @@
1
+ "use strict";
2
+
3
+ function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
4
+ Object.defineProperty(exports, "__esModule", {
5
+ value: true
6
+ });
7
+ exports.viewContainerRoot = exports.viewContainerConfig = void 0;
8
+ var _react = /*#__PURE__*/_interopRequireWildcard( /*#__PURE__*/require("react"));
9
+ var _react2 = /*#__PURE__*/require("@emotion/react");
10
+ var _base = /*#__PURE__*/require("./_view/base");
11
+ var _excluded = ["children"];
12
+ function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
13
+ function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { "default": e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n["default"] = e, t && t.set(e, n), n; }
14
+ function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
15
+ function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
16
+ function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
17
+ function _EMOTION_STRINGIFIED_CSS_ERROR__() { return "You have tried to stringify object returned from `css` function. It isn't supposed to be used directly (e.g. as value of the `className` prop), but rather handed to emotion so it can handle it (e.g. as value of `css` prop)."; }
18
+ var base = process.env.NODE_ENV === "production" ? {
19
+ name: "y6axm9-plasma-new-hope__base",
20
+ styles: "position:relative;label:plasma-new-hope__base;"
21
+ } : {
22
+ name: "y6axm9-plasma-new-hope__base",
23
+ styles: "position:relative;label:plasma-new-hope__base;",
24
+ map: "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uL3NyYy1lbW90aW9uL2NvbXBvbmVudHMvVmlld0NvbnRhaW5lci9WaWV3Q29udGFpbmVyLnRzeCJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFPZ0IiLCJmaWxlIjoiLi4vLi4vLi4vLi4vc3JjLWVtb3Rpb24vY29tcG9uZW50cy9WaWV3Q29udGFpbmVyL1ZpZXdDb250YWluZXIudHN4Iiwic291cmNlc0NvbnRlbnQiOlsiaW1wb3J0IFJlYWN0LCB7IGZvcndhcmRSZWYgfSBmcm9tICdyZWFjdCc7XG5pbXBvcnQgeyBjc3MgfSBmcm9tICdAZW1vdGlvbi9yZWFjdCc7XG5cbmltcG9ydCB0eXBlIHsgUm9vdFByb3BzIH0gZnJvbSAnLi4vLi4vZW5naW5lcy90eXBlcyc7XG5cbmltcG9ydCB7IGJhc2UgYXMgdmlld0NTUyB9IGZyb20gJy4vX3ZpZXcvYmFzZSc7XG5cbmNvbnN0IGJhc2UgPSBjc3NgXG4gICAgcG9zaXRpb246IHJlbGF0aXZlO1xuYDtcblxuZXhwb3J0IHR5cGUgVmlld0NvbnRhaW5lckN1c3RvbVByb3BzID0ge1xuICAgIC8qKlxuICAgICAqINCS0LjQtCDQutC+0LzQv9C+0L3QtdC90YLQsFxuICAgICAqL1xuICAgIHZpZXc/OiBzdHJpbmc7XG59O1xuXG50eXBlIFZpZXdDb250YWluZXJQcm9wcyA9IFJlYWN0LkhUTUxBdHRyaWJ1dGVzPEhUTUxEaXZFbGVtZW50PiAmIFZpZXdDb250YWluZXJDdXN0b21Qcm9wcztcblxuZXhwb3J0IGNvbnN0IHZpZXdDb250YWluZXJSb290ID0gKFJvb3Q6IFJvb3RQcm9wczxIVE1MQW5jaG9yRWxlbWVudCwgVmlld0NvbnRhaW5lclByb3BzPikgPT5cbiAgICBmb3J3YXJkUmVmPEhUTUxBbmNob3JFbGVtZW50LCBWaWV3Q29udGFpbmVyUHJvcHM+KChwcm9wcywgcmVmKSA9PiB7XG4gICAgICAgIGNvbnN0IHsgY2hpbGRyZW4sIC4uLnJlc3QgfSA9IHByb3BzO1xuXG4gICAgICAgIHJldHVybiAoXG4gICAgICAgICAgICA8Um9vdCByZWY9e3JlZn0gey4uLnJlc3R9PlxuICAgICAgICAgICAgICAgIHtjaGlsZHJlbn1cbiAgICAgICAgICAgIDwvUm9vdD5cbiAgICAgICAgKTtcbiAgICB9KTtcblxuZXhwb3J0IGNvbnN0IHZpZXdDb250YWluZXJDb25maWcgPSB7XG4gICAgbmFtZTogJ1ZpZXdDb250YWluZXInLFxuICAgIHRhZzogJ2RpdicsXG4gICAgbGF5b3V0OiB2aWV3Q29udGFpbmVyUm9vdCxcbiAgICBiYXNlLFxuICAgIHZhcmlhdGlvbnM6IHtcbiAgICAgICAgdmlldzoge1xuICAgICAgICAgICAgY3NzOiB2aWV3Q1NTLFxuICAgICAgICB9LFxuICAgIH0sXG4gICAgZGVmYXVsdHM6IHtcbiAgICAgICAgdmlldzogdW5kZWZpbmVkLFxuICAgIH0sXG59O1xuIl19 */",
25
+ toString: _EMOTION_STRINGIFIED_CSS_ERROR__
26
+ };
27
+ var viewContainerRoot = exports.viewContainerRoot = function viewContainerRoot(Root) {
28
+ return /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {
29
+ var children = props.children,
30
+ rest = _objectWithoutProperties(props, _excluded);
31
+ return /*#__PURE__*/_react["default"].createElement(Root, _extends({
32
+ ref: ref
33
+ }, rest), children);
34
+ });
35
+ };
36
+ var viewContainerConfig = exports.viewContainerConfig = {
37
+ name: 'ViewContainer',
38
+ tag: 'div',
39
+ layout: viewContainerRoot,
40
+ base: base,
41
+ variations: {
42
+ view: {
43
+ css: _base.base
44
+ }
45
+ },
46
+ defaults: {
47
+ view: undefined
48
+ }
49
+ };