@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,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,40 @@
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 _styledComponents = /*#__PURE__*/require("styled-components");
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
+ var base = /*#__PURE__*/(0, _styledComponents.css)(["position:relative;"]);
18
+ var viewContainerRoot = exports.viewContainerRoot = function viewContainerRoot(Root) {
19
+ return /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {
20
+ var children = props.children,
21
+ rest = _objectWithoutProperties(props, _excluded);
22
+ return /*#__PURE__*/_react["default"].createElement(Root, _extends({
23
+ ref: ref
24
+ }, rest), children);
25
+ });
26
+ };
27
+ var viewContainerConfig = exports.viewContainerConfig = {
28
+ name: 'ViewContainer',
29
+ tag: 'div',
30
+ layout: viewContainerRoot,
31
+ base: base,
32
+ variations: {
33
+ view: {
34
+ css: _base.base
35
+ }
36
+ },
37
+ defaults: {
38
+ view: undefined
39
+ }
40
+ };
@@ -0,0 +1,82 @@
1
+ ---
2
+ id: viewContainer
3
+ title: ViewContainer
4
+ ---
5
+
6
+ import { PropsTable, Description } from '@site/src/components';
7
+
8
+ # ViewContainer
9
+ <Description name="ViewContainer" />
10
+ <PropsTable name="ViewContainer" exclude={['css']} />
11
+
12
+ # Описание
13
+
14
+ Данный компонент представляет собой обёртку, которая инвертирует токены компонент, которые в неё помещены, в зависимости от выбранного значения свойства view - `onDark` или `onLight`.
15
+
16
+ При этом, независимо от режима темы (тёмный или светлый) для всего приложения, токены внутри не будут меняться.
17
+
18
+ Этот механизм необходим для случаев, когда требуется отобразить компонент на специфичном бэкграунде, чтобы избежать наложение цветов.
19
+
20
+ # Пример использования
21
+
22
+ ```tsx live
23
+ import React from 'react';
24
+ import { ViewContainer, Button, Checkbox, TextField } from '@salutejs/{{ package }}';
25
+
26
+ export function App() {
27
+ return (
28
+ <div>
29
+ <ViewContainer
30
+ style=\{{
31
+ padding: '1rem',
32
+ borderRadius: '1rem',
33
+ display: 'flex',
34
+ flexDirection: 'column',
35
+ gap: '1rem',
36
+ }}
37
+ >
38
+ <h3 style=\{{ margin: 0 }}>Inside default ViewContainer</h3>
39
+ <Button text="default Button" />
40
+ <Checkbox checked label="Label" />
41
+ <TextField value="Example Value" label="Label" labelPlacement="inner" />
42
+ </ViewContainer>
43
+ <br />
44
+ <ViewContainer
45
+ view="onDark"
46
+ style=\{{
47
+ background: '#1a1a1a',
48
+ color: 'white',
49
+ padding: '1rem',
50
+ borderRadius: '1rem',
51
+ display: 'flex',
52
+ flexDirection: 'column',
53
+ gap: '1rem',
54
+ }}
55
+ >
56
+ <h3 style=\{{ margin: 0 }}>Inside onDark ViewContainer</h3>
57
+ <Button text="default Button" />
58
+ <Checkbox checked label="Label" />
59
+ <TextField value="Example Value" label="Label" labelPlacement="inner" />
60
+ </ViewContainer>
61
+ <br />
62
+ <ViewContainer
63
+ view="onLight"
64
+ style=\{{
65
+ background: '#ededed',
66
+ color: 'black',
67
+ padding: '1rem',
68
+ borderRadius: '1rem',
69
+ display: 'flex',
70
+ flexDirection: 'column',
71
+ gap: '1rem',
72
+ }}
73
+ >
74
+ <h3 style=\{{ margin: 0 }}>Inside onLight ViewContainer</h3>
75
+ <Button text="default Button" />
76
+ <Checkbox checked label="Label" />
77
+ <TextField value="Example Value" label="Label" labelPlacement="inner" />
78
+ </ViewContainer>
79
+ </div>
80
+ );
81
+ }
82
+ ```
@@ -5,4 +5,4 @@ Object.defineProperty(exports, "__esModule", {
5
5
  });
6
6
  exports.base = void 0;
7
7
  var _styledComponents = /*#__PURE__*/require("styled-components");
8
- var base = exports.base = /*#__PURE__*/(0, _styledComponents.css)(["display:flex;align-items:center;"]);
8
+ var base = exports.base = /*#__PURE__*/(0, _styledComponents.css)([""]);
@@ -0,0 +1,18 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ Object.defineProperty(exports, "viewContainerConfig", {
7
+ enumerable: true,
8
+ get: function get() {
9
+ return _ViewContainer.viewContainerConfig;
10
+ }
11
+ });
12
+ Object.defineProperty(exports, "viewContainerRoot", {
13
+ enumerable: true,
14
+ get: function get() {
15
+ return _ViewContainer.viewContainerRoot;
16
+ }
17
+ });
18
+ var _ViewContainer = /*#__PURE__*/require("./ViewContainer");
@@ -6,7 +6,6 @@ Object.defineProperty(exports, "__esModule", {
6
6
  exports.WithTheme = void 0;
7
7
  exports.argTypesFromConfig = argTypesFromConfig;
8
8
  var _react = /*#__PURE__*/_interopRequireDefault( /*#__PURE__*/require("react"));
9
- var _themes = /*#__PURE__*/require("./themes");
10
9
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
11
10
  function _createForOfIteratorHelper(o, allowArrayLike) { var it = typeof Symbol !== "undefined" && o[Symbol.iterator] || o["@@iterator"]; if (!it) { if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") { if (it) o = it; var i = 0; var F = function F() {}; return { s: F, n: function n() { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }, e: function e(_e) { throw _e; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var normalCompletion = true, didErr = false, err; return { s: function s() { it = it.call(o); }, n: function n() { var step = it.next(); normalCompletion = step.done; return step; }, e: function e(_e2) { didErr = true; err = _e2; }, f: function f() { try { if (!normalCompletion && it["return"] != null) it["return"](); } finally { if (didErr) throw err; } } }; }
12
11
  function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
@@ -15,19 +14,9 @@ function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o =
15
14
  function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
16
15
  function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t["return"] && (u = t["return"](), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }
17
16
  function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
18
- var WithTheme = exports.WithTheme = function WithTheme(Story, context) {
19
- var _themes$themeName;
20
- var themeType = context.globals.theme;
21
- var themeName = context.title.split('/')[0];
22
- return /*#__PURE__*/_react["default"].createElement("div", {
23
- id: "theme-root",
24
- className: _themes.themes === null || _themes.themes === void 0 || (_themes$themeName = _themes.themes[themeName]) === null || _themes$themeName === void 0 ? void 0 : _themes$themeName[themeType],
25
- style: {
26
- padding: '1rem',
27
- minHeight: '100vh',
28
- boxSizing: 'border-box'
29
- }
30
- }, /*#__PURE__*/_react["default"].createElement(Story, null));
17
+ // TODO: Удалить в отдельном пр из всех компонент
18
+ var WithTheme = exports.WithTheme = function WithTheme(Story) {
19
+ return /*#__PURE__*/_react["default"].createElement(Story, null);
31
20
  };
32
21
  function argTypesFromConfig(config) {
33
22
  var exclude = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : [];
@@ -0,0 +1,16 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.config = void 0;
7
+ var _styledComponents = /*#__PURE__*/require("styled-components");
8
+ var _plasma_b2c = /*#__PURE__*/require("@salutejs/plasma-themes/tokens/plasma_b2c");
9
+ var config = exports.config = {
10
+ variations: {
11
+ view: {
12
+ onDark: /*#__PURE__*/(0, _styledComponents.css)(["", ""], _plasma_b2c.viewContainer.dark),
13
+ onLight: /*#__PURE__*/(0, _styledComponents.css)(["", ""], _plasma_b2c.viewContainer.light)
14
+ }
15
+ }
16
+ };
@@ -0,0 +1,11 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.ViewContainer = void 0;
7
+ var _ViewContainer = /*#__PURE__*/require("../../../../components/ViewContainer");
8
+ var _engines = /*#__PURE__*/require("../../../../engines");
9
+ var _ViewContainer2 = /*#__PURE__*/require("./ViewContainer.config");
10
+ var mergedConfig = /*#__PURE__*/(0, _engines.mergeConfig)(_ViewContainer.viewContainerConfig, _ViewContainer2.config);
11
+ var ViewContainer = exports.ViewContainer = /*#__PURE__*/(0, _engines.component)(mergedConfig);
@@ -0,0 +1,65 @@
1
+ import React, { ComponentProps } from 'react';
2
+ import type { StoryObj, Meta } from '@storybook/react';
3
+
4
+ import { Button } from '../Button/Button';
5
+ import { TextField } from '../TextField/TextField';
6
+ import { Checkbox } from '../Checkbox/Checkbox';
7
+
8
+ import { ViewContainer } from './ViewContainer';
9
+
10
+ type StoryViewProps = ComponentProps<typeof ViewContainer>;
11
+
12
+ const meta: Meta<StoryViewProps> = {
13
+ title: 'plasma_b2c/ViewContainer',
14
+ };
15
+
16
+ export default meta;
17
+
18
+ type Story = StoryObj<StoryViewProps>;
19
+
20
+ const ViewExample = ({ view }: StoryViewProps) => {
21
+ const style = view
22
+ ? {
23
+ background: view === 'onDark' ? '#1a1a1a' : '#ededed',
24
+ color: view === 'onDark' ? 'white' : 'black',
25
+ }
26
+ : undefined;
27
+
28
+ return (
29
+ <>
30
+ <h4>view: {view ?? 'default'}</h4>
31
+ <div>
32
+ <ViewContainer
33
+ view={view}
34
+ style={{
35
+ ...style,
36
+ padding: '1rem',
37
+ borderRadius: '1rem',
38
+ display: 'flex',
39
+ flexDirection: 'column',
40
+ gap: '1rem',
41
+ }}
42
+ >
43
+ <h3 style={{ margin: 0 }}>Inside ViewContainer</h3>
44
+ <Button text="default Button" />
45
+ <Checkbox checked label="Label" />
46
+ <TextField value="Example Value" label="Label" labelPlacement="inner" />
47
+ </ViewContainer>
48
+ </div>
49
+ </>
50
+ );
51
+ };
52
+
53
+ export const Default: Story = {
54
+ render: () => {
55
+ return (
56
+ <>
57
+ <ViewExample />
58
+ <br />
59
+ <ViewExample view="onDark" />
60
+ <br />
61
+ <ViewExample view="onLight" />
62
+ </>
63
+ );
64
+ },
65
+ };
@@ -0,0 +1,16 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.config = void 0;
7
+ var _styledComponents = /*#__PURE__*/require("styled-components");
8
+ var _plasma_b2c = /*#__PURE__*/require("@salutejs/plasma-themes/tokens/plasma_b2c");
9
+ var config = exports.config = {
10
+ variations: {
11
+ view: {
12
+ onDark: /*#__PURE__*/(0, _styledComponents.css)(["", ""], _plasma_b2c.viewContainer.dark),
13
+ onLight: /*#__PURE__*/(0, _styledComponents.css)(["", ""], _plasma_b2c.viewContainer.light)
14
+ }
15
+ }
16
+ };
@@ -0,0 +1,11 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.ViewContainer = void 0;
7
+ var _ViewContainer = /*#__PURE__*/require("../../../../components/ViewContainer");
8
+ var _engines = /*#__PURE__*/require("../../../../engines");
9
+ var _ViewContainer2 = /*#__PURE__*/require("./ViewContainer.config");
10
+ var mergedConfig = /*#__PURE__*/(0, _engines.mergeConfig)(_ViewContainer.viewContainerConfig, _ViewContainer2.config);
11
+ var ViewContainer = exports.ViewContainer = /*#__PURE__*/(0, _engines.component)(mergedConfig);
@@ -0,0 +1,65 @@
1
+ import React, { ComponentProps } from 'react';
2
+ import type { StoryObj, Meta } from '@storybook/react';
3
+
4
+ import { Button } from '../Button/Button';
5
+ import { TextField } from '../TextField/TextField';
6
+ import { Checkbox } from '../Checkbox/Checkbox';
7
+
8
+ import { ViewContainer } from './ViewContainer';
9
+
10
+ type StoryViewProps = ComponentProps<typeof ViewContainer>;
11
+
12
+ const meta: Meta<StoryViewProps> = {
13
+ title: 'plasma_web/ViewContainer',
14
+ };
15
+
16
+ export default meta;
17
+
18
+ type Story = StoryObj<StoryViewProps>;
19
+
20
+ const ViewExample = ({ view }: StoryViewProps) => {
21
+ const style = view
22
+ ? {
23
+ background: view === 'onDark' ? '#1a1a1a' : '#ededed',
24
+ color: view === 'onDark' ? 'white' : 'black',
25
+ }
26
+ : undefined;
27
+
28
+ return (
29
+ <>
30
+ <h4>view: {view ?? 'default'}</h4>
31
+ <div>
32
+ <ViewContainer
33
+ view={view}
34
+ style={{
35
+ ...style,
36
+ padding: '1rem',
37
+ borderRadius: '1rem',
38
+ display: 'flex',
39
+ flexDirection: 'column',
40
+ gap: '1rem',
41
+ }}
42
+ >
43
+ <h3 style={{ margin: 0 }}>Inside ViewContainer</h3>
44
+ <Button text="default Button" />
45
+ <Checkbox checked label="Label" />
46
+ <TextField value="Example Value" label="Label" labelPlacement="inner" />
47
+ </ViewContainer>
48
+ </div>
49
+ </>
50
+ );
51
+ };
52
+
53
+ export const Default: Story = {
54
+ render: () => {
55
+ return (
56
+ <>
57
+ <ViewExample />
58
+ <br />
59
+ <ViewExample view="onDark" />
60
+ <br />
61
+ <ViewExample view="onLight" />
62
+ </>
63
+ );
64
+ },
65
+ };
@@ -674,14 +674,14 @@ Object.keys(_Attach).forEach(function (key) {
674
674
  }
675
675
  });
676
676
  });
677
- var _NumberInput = /*#__PURE__*/require("./components/NumberInput");
678
- Object.keys(_NumberInput).forEach(function (key) {
677
+ var _ViewContainer = /*#__PURE__*/require("./components/ViewContainer");
678
+ Object.keys(_ViewContainer).forEach(function (key) {
679
679
  if (key === "default" || key === "__esModule") return;
680
- if (key in exports && exports[key] === _NumberInput[key]) return;
680
+ if (key in exports && exports[key] === _ViewContainer[key]) return;
681
681
  Object.defineProperty(exports, key, {
682
682
  enumerable: true,
683
683
  get: function get() {
684
- return _NumberInput[key];
684
+ return _ViewContainer[key];
685
685
  }
686
686
  });
687
687
  });
@@ -3,13 +3,14 @@ function _extends() { _extends = Object.assign ? Object.assign.bind() : function
3
3
  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; }
4
4
  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; }
5
5
  import React, { forwardRef, useMemo } from 'react';
6
- import { useFocusTrap, useForkRef, safeUseId } from '@salutejs/plasma-core';
6
+ import { useForkRef, safeUseId } from '@salutejs/plasma-core';
7
7
  import { component, mergeConfig } from '../../engines';
8
8
  import { usePopupContext } from '../Popup';
9
9
  import { Overlay } from '../Overlay';
10
10
  import { DEFAULT_Z_INDEX } from '../Popup/utils';
11
11
  import { panelConfig } from '../Panel';
12
12
  import { cx, getSizeValueFromProp } from '../../utils';
13
+ import { useFocusTrap } from '../../hooks';
13
14
  import { classes, tokens } from './Drawer.tokens';
14
15
  import { base as viewCSS } from './variations/_view/base';
15
16
  import { base as sizeCSS } from './variations/_size/base';
@@ -3,7 +3,8 @@ function _extends() { _extends = Object.assign ? Object.assign.bind() : function
3
3
  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; }
4
4
  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; }
5
5
  import React, { forwardRef, useRef } from 'react';
6
- import { useFocusTrap, useForkRef, useUniqId } from '@salutejs/plasma-core';
6
+ import { useForkRef, useUniqId } from '@salutejs/plasma-core';
7
+ import { useFocusTrap } from '../../../../hooks';
7
8
  import { base as viewCSS } from './variations/_view/base';
8
9
  import { base as sizeCSS } from './variations/_size/base';
9
10
  import { StyledDropdown, StyledPopover } from './Dropdown.styles';
@@ -16,7 +16,8 @@ function _objectWithoutProperties(source, excluded) { if (source == null) return
16
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
17
  import React, { useRef, useCallback, useEffect, useState, forwardRef } from 'react';
18
18
  import { usePopper } from 'react-popper';
19
- import { useFocusTrap, useForkRef } from '@salutejs/plasma-core';
19
+ import { useForkRef } from '@salutejs/plasma-core';
20
+ import { useFocusTrap } from '../../hooks';
20
21
  import { cx } from '../../utils';
21
22
  import { Portal } from '../Portal';
22
23
  import { base as viewCSS } from './variations/_view/base';
@@ -0,0 +1,31 @@
1
+ var _excluded = ["children"];
2
+ 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); }
3
+ 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; }
4
+ 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; }
5
+ import React, { forwardRef } from 'react';
6
+ import { css } from 'styled-components';
7
+ import { base as viewCSS } from './_view/base';
8
+ var base = /*#__PURE__*/css(["position:relative;"]);
9
+ export var viewContainerRoot = function viewContainerRoot(Root) {
10
+ return /*#__PURE__*/forwardRef(function (props, ref) {
11
+ var children = props.children,
12
+ rest = _objectWithoutProperties(props, _excluded);
13
+ return /*#__PURE__*/React.createElement(Root, _extends({
14
+ ref: ref
15
+ }, rest), children);
16
+ });
17
+ };
18
+ export var viewContainerConfig = {
19
+ name: 'ViewContainer',
20
+ tag: 'div',
21
+ layout: viewContainerRoot,
22
+ base: base,
23
+ variations: {
24
+ view: {
25
+ css: viewCSS
26
+ }
27
+ },
28
+ defaults: {
29
+ view: undefined
30
+ }
31
+ };
@@ -0,0 +1,82 @@
1
+ ---
2
+ id: viewContainer
3
+ title: ViewContainer
4
+ ---
5
+
6
+ import { PropsTable, Description } from '@site/src/components';
7
+
8
+ # ViewContainer
9
+ <Description name="ViewContainer" />
10
+ <PropsTable name="ViewContainer" exclude={['css']} />
11
+
12
+ # Описание
13
+
14
+ Данный компонент представляет собой обёртку, которая инвертирует токены компонент, которые в неё помещены, в зависимости от выбранного значения свойства view - `onDark` или `onLight`.
15
+
16
+ При этом, независимо от режима темы (тёмный или светлый) для всего приложения, токены внутри не будут меняться.
17
+
18
+ Этот механизм необходим для случаев, когда требуется отобразить компонент на специфичном бэкграунде, чтобы избежать наложение цветов.
19
+
20
+ # Пример использования
21
+
22
+ ```tsx live
23
+ import React from 'react';
24
+ import { ViewContainer, Button, Checkbox, TextField } from '@salutejs/{{ package }}';
25
+
26
+ export function App() {
27
+ return (
28
+ <div>
29
+ <ViewContainer
30
+ style=\{{
31
+ padding: '1rem',
32
+ borderRadius: '1rem',
33
+ display: 'flex',
34
+ flexDirection: 'column',
35
+ gap: '1rem',
36
+ }}
37
+ >
38
+ <h3 style=\{{ margin: 0 }}>Inside default ViewContainer</h3>
39
+ <Button text="default Button" />
40
+ <Checkbox checked label="Label" />
41
+ <TextField value="Example Value" label="Label" labelPlacement="inner" />
42
+ </ViewContainer>
43
+ <br />
44
+ <ViewContainer
45
+ view="onDark"
46
+ style=\{{
47
+ background: '#1a1a1a',
48
+ color: 'white',
49
+ padding: '1rem',
50
+ borderRadius: '1rem',
51
+ display: 'flex',
52
+ flexDirection: 'column',
53
+ gap: '1rem',
54
+ }}
55
+ >
56
+ <h3 style=\{{ margin: 0 }}>Inside onDark ViewContainer</h3>
57
+ <Button text="default Button" />
58
+ <Checkbox checked label="Label" />
59
+ <TextField value="Example Value" label="Label" labelPlacement="inner" />
60
+ </ViewContainer>
61
+ <br />
62
+ <ViewContainer
63
+ view="onLight"
64
+ style=\{{
65
+ background: '#ededed',
66
+ color: 'black',
67
+ padding: '1rem',
68
+ borderRadius: '1rem',
69
+ display: 'flex',
70
+ flexDirection: 'column',
71
+ gap: '1rem',
72
+ }}
73
+ >
74
+ <h3 style=\{{ margin: 0 }}>Inside onLight ViewContainer</h3>
75
+ <Button text="default Button" />
76
+ <Checkbox checked label="Label" />
77
+ <TextField value="Example Value" label="Label" labelPlacement="inner" />
78
+ </ViewContainer>
79
+ </div>
80
+ );
81
+ }
82
+ ```
@@ -0,0 +1,2 @@
1
+ import { css } from 'styled-components';
2
+ export var base = /*#__PURE__*/css([""]);
@@ -0,0 +1 @@
1
+ export { viewContainerRoot, viewContainerConfig } from './ViewContainer';