@salutejs/plasma-new-hope 0.170.0-canary.1489.11387153757.0 → 0.170.0-canary.1490.11387458591.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (214) hide show
  1. package/cjs/components/ViewContainer/ViewContainer.js +38 -0
  2. package/cjs/components/ViewContainer/ViewContainer.js.map +1 -0
  3. package/cjs/components/ViewContainer/ViewContainer_yiqfcb.css +1 -0
  4. package/cjs/components/ViewContainer/_view/base.js +9 -0
  5. package/cjs/components/ViewContainer/_view/base.js.map +1 -0
  6. package/cjs/components/ViewContainer/_view/base_x642ct.css +1 -0
  7. package/cjs/index.css +2 -0
  8. package/cjs/index.js +3 -0
  9. package/cjs/index.js.map +1 -1
  10. package/emotion/cjs/components/ViewContainer/ViewContainer.js +49 -0
  11. package/emotion/cjs/components/ViewContainer/ViewContainer.template-doc.mdx +82 -0
  12. package/emotion/cjs/components/ViewContainer/_view/base.js +8 -0
  13. package/emotion/cjs/components/ViewContainer/_view/tokens.json +1 -0
  14. package/emotion/cjs/components/ViewContainer/index.js +18 -0
  15. package/emotion/cjs/examples/_helpers.js +3 -14
  16. package/emotion/cjs/examples/plasma_b2c/components/Autocomplete/Autocomplete.config.js +12 -12
  17. package/emotion/cjs/examples/plasma_b2c/components/Combobox/Combobox.config.js +12 -12
  18. package/emotion/cjs/examples/plasma_b2c/components/Combobox/Legacy/Combobox.config.js +5 -5
  19. package/emotion/cjs/examples/plasma_b2c/components/Drawer/Drawer.stories.tsx +1 -6
  20. package/emotion/cjs/examples/plasma_b2c/components/IconButton/IconButton.stories.tsx +1 -1
  21. package/emotion/cjs/examples/plasma_b2c/components/Modal/Modal.stories.tsx +24 -22
  22. package/emotion/cjs/examples/plasma_b2c/components/Notification/Notification.stories.tsx +15 -6
  23. package/emotion/cjs/examples/plasma_b2c/components/Popover/Popover.stories.tsx +1 -1
  24. package/emotion/cjs/examples/plasma_b2c/components/Popup/Popup.stories.tsx +3 -3
  25. package/emotion/cjs/examples/plasma_b2c/components/Segment/SegmentGroup.config.js +11 -11
  26. package/emotion/cjs/examples/plasma_b2c/components/Segment/SegmentItem.config.js +9 -9
  27. package/emotion/cjs/examples/plasma_b2c/components/TextField/TextField.config.js +13 -13
  28. package/emotion/cjs/examples/plasma_b2c/components/Toast/Toast.stories.tsx +11 -5
  29. package/emotion/cjs/examples/plasma_b2c/components/ViewContainer/ViewContainer.config.js +16 -0
  30. package/emotion/cjs/examples/plasma_b2c/components/ViewContainer/ViewContainer.js +11 -0
  31. package/emotion/cjs/examples/plasma_b2c/components/ViewContainer/ViewContainer.stories.tsx +65 -0
  32. package/emotion/cjs/examples/plasma_web/components/Autocomplete/Autocomplete.config.js +12 -12
  33. package/emotion/cjs/examples/plasma_web/components/Combobox/Combobox.config.js +12 -12
  34. package/emotion/cjs/examples/plasma_web/components/Combobox/Legacy/Combobox.config.js +5 -5
  35. package/emotion/cjs/examples/plasma_web/components/DatePicker/DatePicker.config.js +7 -7
  36. package/emotion/cjs/examples/plasma_web/components/Drawer/Drawer.stories.tsx +1 -6
  37. package/emotion/cjs/examples/plasma_web/components/IconButton/IconButton.stories.tsx +1 -1
  38. package/emotion/cjs/examples/plasma_web/components/Modal/Modal.stories.tsx +24 -22
  39. package/emotion/cjs/examples/plasma_web/components/Notification/Notification.stories.tsx +15 -6
  40. package/emotion/cjs/examples/plasma_web/components/Popover/Popover.stories.tsx +1 -1
  41. package/emotion/cjs/examples/plasma_web/components/Popup/Popup.stories.tsx +3 -3
  42. package/emotion/cjs/examples/plasma_web/components/Segment/SegmentGroup.config.js +11 -11
  43. package/emotion/cjs/examples/plasma_web/components/Segment/SegmentItem.config.js +9 -9
  44. package/emotion/cjs/examples/plasma_web/components/TextField/TextField.config.js +13 -13
  45. package/emotion/cjs/examples/plasma_web/components/Toast/Toast.stories.tsx +11 -5
  46. package/emotion/cjs/examples/plasma_web/components/ViewContainer/ViewContainer.config.js +16 -0
  47. package/emotion/cjs/examples/plasma_web/components/ViewContainer/ViewContainer.js +11 -0
  48. package/emotion/cjs/examples/plasma_web/components/ViewContainer/ViewContainer.stories.tsx +65 -0
  49. package/emotion/cjs/index.js +11 -0
  50. package/emotion/es/components/ViewContainer/ViewContainer.js +40 -0
  51. package/emotion/es/components/ViewContainer/ViewContainer.template-doc.mdx +82 -0
  52. package/emotion/es/components/ViewContainer/_view/base.js +2 -0
  53. package/emotion/es/components/ViewContainer/_view/tokens.json +1 -0
  54. package/emotion/es/components/ViewContainer/index.js +1 -0
  55. package/emotion/es/examples/_helpers.js +3 -14
  56. package/emotion/es/examples/plasma_b2c/components/Autocomplete/Autocomplete.config.js +12 -12
  57. package/emotion/es/examples/plasma_b2c/components/Combobox/Combobox.config.js +12 -12
  58. package/emotion/es/examples/plasma_b2c/components/Combobox/Legacy/Combobox.config.js +5 -5
  59. package/emotion/es/examples/plasma_b2c/components/Drawer/Drawer.stories.tsx +1 -6
  60. package/emotion/es/examples/plasma_b2c/components/IconButton/IconButton.stories.tsx +1 -1
  61. package/emotion/es/examples/plasma_b2c/components/Modal/Modal.stories.tsx +24 -22
  62. package/emotion/es/examples/plasma_b2c/components/Notification/Notification.stories.tsx +15 -6
  63. package/emotion/es/examples/plasma_b2c/components/Popover/Popover.stories.tsx +1 -1
  64. package/emotion/es/examples/plasma_b2c/components/Popup/Popup.stories.tsx +3 -3
  65. package/emotion/es/examples/plasma_b2c/components/Segment/SegmentGroup.config.js +11 -11
  66. package/emotion/es/examples/plasma_b2c/components/Segment/SegmentItem.config.js +9 -9
  67. package/emotion/es/examples/plasma_b2c/components/TextField/TextField.config.js +13 -13
  68. package/emotion/es/examples/plasma_b2c/components/Toast/Toast.stories.tsx +11 -5
  69. package/emotion/es/examples/plasma_b2c/components/ViewContainer/ViewContainer.config.js +10 -0
  70. package/emotion/es/examples/plasma_b2c/components/ViewContainer/ViewContainer.js +5 -0
  71. package/emotion/es/examples/plasma_b2c/components/ViewContainer/ViewContainer.stories.tsx +65 -0
  72. package/emotion/es/examples/plasma_web/components/Autocomplete/Autocomplete.config.js +12 -12
  73. package/emotion/es/examples/plasma_web/components/Combobox/Combobox.config.js +12 -12
  74. package/emotion/es/examples/plasma_web/components/Combobox/Legacy/Combobox.config.js +5 -5
  75. package/emotion/es/examples/plasma_web/components/DatePicker/DatePicker.config.js +7 -7
  76. package/emotion/es/examples/plasma_web/components/Drawer/Drawer.stories.tsx +1 -6
  77. package/emotion/es/examples/plasma_web/components/IconButton/IconButton.stories.tsx +1 -1
  78. package/emotion/es/examples/plasma_web/components/Modal/Modal.stories.tsx +24 -22
  79. package/emotion/es/examples/plasma_web/components/Notification/Notification.stories.tsx +15 -6
  80. package/emotion/es/examples/plasma_web/components/Popover/Popover.stories.tsx +1 -1
  81. package/emotion/es/examples/plasma_web/components/Popup/Popup.stories.tsx +3 -3
  82. package/emotion/es/examples/plasma_web/components/Segment/SegmentGroup.config.js +11 -11
  83. package/emotion/es/examples/plasma_web/components/Segment/SegmentItem.config.js +9 -9
  84. package/emotion/es/examples/plasma_web/components/TextField/TextField.config.js +13 -13
  85. package/emotion/es/examples/plasma_web/components/Toast/Toast.stories.tsx +11 -5
  86. package/emotion/es/examples/plasma_web/components/ViewContainer/ViewContainer.config.js +10 -0
  87. package/emotion/es/examples/plasma_web/components/ViewContainer/ViewContainer.js +5 -0
  88. package/emotion/es/examples/plasma_web/components/ViewContainer/ViewContainer.stories.tsx +65 -0
  89. package/emotion/es/index.js +2 -1
  90. package/es/components/ViewContainer/ViewContainer.js +33 -0
  91. package/es/components/ViewContainer/ViewContainer.js.map +1 -0
  92. package/es/components/ViewContainer/ViewContainer_yiqfcb.css +1 -0
  93. package/es/components/ViewContainer/_view/base.js +5 -0
  94. package/es/components/ViewContainer/_view/base.js.map +1 -0
  95. package/es/components/ViewContainer/_view/base_x642ct.css +1 -0
  96. package/es/index.css +2 -0
  97. package/es/index.js +1 -0
  98. package/es/index.js.map +1 -1
  99. package/package.json +5 -4
  100. package/styled-components/cjs/components/ViewContainer/ViewContainer.js +40 -0
  101. package/styled-components/cjs/components/ViewContainer/ViewContainer.template-doc.mdx +82 -0
  102. package/styled-components/cjs/components/ViewContainer/_view/base.js +8 -0
  103. package/styled-components/cjs/components/ViewContainer/_view/tokens.json +1 -0
  104. package/styled-components/cjs/components/ViewContainer/index.js +18 -0
  105. package/styled-components/cjs/examples/_helpers.js +3 -14
  106. package/styled-components/cjs/examples/plasma_b2c/components/Autocomplete/Autocomplete.config.js +5 -5
  107. package/styled-components/cjs/examples/plasma_b2c/components/Combobox/Combobox.config.js +4 -4
  108. package/styled-components/cjs/examples/plasma_b2c/components/Combobox/Legacy/Combobox.config.js +1 -1
  109. package/styled-components/cjs/examples/plasma_b2c/components/Drawer/Drawer.stories.tsx +1 -6
  110. package/styled-components/cjs/examples/plasma_b2c/components/IconButton/IconButton.stories.tsx +1 -1
  111. package/styled-components/cjs/examples/plasma_b2c/components/Modal/Modal.stories.tsx +24 -22
  112. package/styled-components/cjs/examples/plasma_b2c/components/Notification/Notification.stories.tsx +15 -6
  113. package/styled-components/cjs/examples/plasma_b2c/components/Popover/Popover.stories.tsx +1 -1
  114. package/styled-components/cjs/examples/plasma_b2c/components/Popup/Popup.stories.tsx +3 -3
  115. package/styled-components/cjs/examples/plasma_b2c/components/Segment/SegmentGroup.config.js +2 -2
  116. package/styled-components/cjs/examples/plasma_b2c/components/Segment/SegmentItem.config.js +3 -3
  117. package/styled-components/cjs/examples/plasma_b2c/components/TextField/TextField.config.js +1 -1
  118. package/styled-components/cjs/examples/plasma_b2c/components/Toast/Toast.stories.tsx +11 -5
  119. package/styled-components/cjs/examples/plasma_b2c/components/ViewContainer/ViewContainer.config.js +16 -0
  120. package/styled-components/cjs/examples/plasma_b2c/components/ViewContainer/ViewContainer.js +11 -0
  121. package/styled-components/cjs/examples/plasma_b2c/components/ViewContainer/ViewContainer.stories.tsx +65 -0
  122. package/styled-components/cjs/examples/plasma_web/components/Autocomplete/Autocomplete.config.js +5 -5
  123. package/styled-components/cjs/examples/plasma_web/components/Combobox/Combobox.config.js +4 -4
  124. package/styled-components/cjs/examples/plasma_web/components/Combobox/Legacy/Combobox.config.js +1 -1
  125. package/styled-components/cjs/examples/plasma_web/components/DatePicker/DatePicker.config.js +1 -1
  126. package/styled-components/cjs/examples/plasma_web/components/Drawer/Drawer.stories.tsx +1 -6
  127. package/styled-components/cjs/examples/plasma_web/components/IconButton/IconButton.stories.tsx +1 -1
  128. package/styled-components/cjs/examples/plasma_web/components/Modal/Modal.stories.tsx +24 -22
  129. package/styled-components/cjs/examples/plasma_web/components/Notification/Notification.stories.tsx +15 -6
  130. package/styled-components/cjs/examples/plasma_web/components/Popover/Popover.stories.tsx +1 -1
  131. package/styled-components/cjs/examples/plasma_web/components/Popup/Popup.stories.tsx +3 -3
  132. package/styled-components/cjs/examples/plasma_web/components/Segment/SegmentGroup.config.js +2 -2
  133. package/styled-components/cjs/examples/plasma_web/components/Segment/SegmentItem.config.js +3 -3
  134. package/styled-components/cjs/examples/plasma_web/components/TextField/TextField.config.js +1 -1
  135. package/styled-components/cjs/examples/plasma_web/components/Toast/Toast.stories.tsx +11 -5
  136. package/styled-components/cjs/examples/plasma_web/components/ViewContainer/ViewContainer.config.js +16 -0
  137. package/styled-components/cjs/examples/plasma_web/components/ViewContainer/ViewContainer.js +11 -0
  138. package/styled-components/cjs/examples/plasma_web/components/ViewContainer/ViewContainer.stories.tsx +65 -0
  139. package/styled-components/cjs/index.js +11 -0
  140. package/styled-components/es/components/ViewContainer/ViewContainer.js +31 -0
  141. package/styled-components/es/components/ViewContainer/ViewContainer.template-doc.mdx +82 -0
  142. package/styled-components/es/components/ViewContainer/_view/base.js +2 -0
  143. package/styled-components/es/components/ViewContainer/_view/tokens.json +1 -0
  144. package/styled-components/es/components/ViewContainer/index.js +1 -0
  145. package/styled-components/es/examples/_helpers.js +3 -14
  146. package/styled-components/es/examples/plasma_b2c/components/Autocomplete/Autocomplete.config.js +5 -5
  147. package/styled-components/es/examples/plasma_b2c/components/Combobox/Combobox.config.js +4 -4
  148. package/styled-components/es/examples/plasma_b2c/components/Combobox/Legacy/Combobox.config.js +1 -1
  149. package/styled-components/es/examples/plasma_b2c/components/Drawer/Drawer.stories.tsx +1 -6
  150. package/styled-components/es/examples/plasma_b2c/components/IconButton/IconButton.stories.tsx +1 -1
  151. package/styled-components/es/examples/plasma_b2c/components/Modal/Modal.stories.tsx +24 -22
  152. package/styled-components/es/examples/plasma_b2c/components/Notification/Notification.stories.tsx +15 -6
  153. package/styled-components/es/examples/plasma_b2c/components/Popover/Popover.stories.tsx +1 -1
  154. package/styled-components/es/examples/plasma_b2c/components/Popup/Popup.stories.tsx +3 -3
  155. package/styled-components/es/examples/plasma_b2c/components/Segment/SegmentGroup.config.js +2 -2
  156. package/styled-components/es/examples/plasma_b2c/components/Segment/SegmentItem.config.js +3 -3
  157. package/styled-components/es/examples/plasma_b2c/components/TextField/TextField.config.js +1 -1
  158. package/styled-components/es/examples/plasma_b2c/components/Toast/Toast.stories.tsx +11 -5
  159. package/styled-components/es/examples/plasma_b2c/components/ViewContainer/ViewContainer.config.js +10 -0
  160. package/styled-components/es/examples/plasma_b2c/components/ViewContainer/ViewContainer.js +5 -0
  161. package/styled-components/es/examples/plasma_b2c/components/ViewContainer/ViewContainer.stories.tsx +65 -0
  162. package/styled-components/es/examples/plasma_web/components/Autocomplete/Autocomplete.config.js +5 -5
  163. package/styled-components/es/examples/plasma_web/components/Combobox/Combobox.config.js +4 -4
  164. package/styled-components/es/examples/plasma_web/components/Combobox/Legacy/Combobox.config.js +1 -1
  165. package/styled-components/es/examples/plasma_web/components/DatePicker/DatePicker.config.js +1 -1
  166. package/styled-components/es/examples/plasma_web/components/Drawer/Drawer.stories.tsx +1 -6
  167. package/styled-components/es/examples/plasma_web/components/IconButton/IconButton.stories.tsx +1 -1
  168. package/styled-components/es/examples/plasma_web/components/Modal/Modal.stories.tsx +24 -22
  169. package/styled-components/es/examples/plasma_web/components/Notification/Notification.stories.tsx +15 -6
  170. package/styled-components/es/examples/plasma_web/components/Popover/Popover.stories.tsx +1 -1
  171. package/styled-components/es/examples/plasma_web/components/Popup/Popup.stories.tsx +3 -3
  172. package/styled-components/es/examples/plasma_web/components/Segment/SegmentGroup.config.js +2 -2
  173. package/styled-components/es/examples/plasma_web/components/Segment/SegmentItem.config.js +3 -3
  174. package/styled-components/es/examples/plasma_web/components/TextField/TextField.config.js +1 -1
  175. package/styled-components/es/examples/plasma_web/components/Toast/Toast.stories.tsx +11 -5
  176. package/styled-components/es/examples/plasma_web/components/ViewContainer/ViewContainer.config.js +10 -0
  177. package/styled-components/es/examples/plasma_web/components/ViewContainer/ViewContainer.js +5 -0
  178. package/styled-components/es/examples/plasma_web/components/ViewContainer/ViewContainer.stories.tsx +65 -0
  179. package/styled-components/es/index.js +2 -1
  180. package/types/components/ViewContainer/ViewContainer.d.ts +26 -0
  181. package/types/components/ViewContainer/ViewContainer.d.ts.map +1 -0
  182. package/types/components/ViewContainer/_view/base.d.ts +2 -0
  183. package/types/components/ViewContainer/_view/base.d.ts.map +1 -0
  184. package/types/components/ViewContainer/index.d.ts +2 -0
  185. package/types/components/ViewContainer/index.d.ts.map +1 -0
  186. package/types/examples/_helpers.d.ts.map +1 -1
  187. package/types/examples/plasma_b2c/components/ViewContainer/ViewContainer.config.d.ts +9 -0
  188. package/types/examples/plasma_b2c/components/ViewContainer/ViewContainer.config.d.ts.map +1 -0
  189. package/types/examples/plasma_b2c/components/ViewContainer/ViewContainer.d.ts +8 -0
  190. package/types/examples/plasma_b2c/components/ViewContainer/ViewContainer.d.ts.map +1 -0
  191. package/types/examples/plasma_web/components/ViewContainer/ViewContainer.config.d.ts +9 -0
  192. package/types/examples/plasma_web/components/ViewContainer/ViewContainer.config.d.ts.map +1 -0
  193. package/types/examples/plasma_web/components/ViewContainer/ViewContainer.d.ts +8 -0
  194. package/types/examples/plasma_web/components/ViewContainer/ViewContainer.d.ts.map +1 -0
  195. package/types/index.d.ts +1 -0
  196. package/types/index.d.ts.map +1 -1
  197. package/emotion/cjs/examples/themes/declaration.d.ts +0 -4
  198. package/emotion/cjs/examples/themes/index.js +0 -15
  199. package/emotion/cjs/examples/themes/plasma_b2c.module.css +0 -984
  200. package/emotion/cjs/examples/themes/plasma_web.module.css +0 -984
  201. package/emotion/es/examples/themes/declaration.d.ts +0 -4
  202. package/emotion/es/examples/themes/index.js +0 -7
  203. package/emotion/es/examples/themes/plasma_b2c.module.css +0 -984
  204. package/emotion/es/examples/themes/plasma_web.module.css +0 -984
  205. package/styled-components/cjs/examples/themes/declaration.d.ts +0 -4
  206. package/styled-components/cjs/examples/themes/index.js +0 -15
  207. package/styled-components/cjs/examples/themes/plasma_b2c.module.css +0 -984
  208. package/styled-components/cjs/examples/themes/plasma_web.module.css +0 -984
  209. package/styled-components/es/examples/themes/declaration.d.ts +0 -4
  210. package/styled-components/es/examples/themes/index.js +0 -7
  211. package/styled-components/es/examples/themes/plasma_b2c.module.css +0 -984
  212. package/styled-components/es/examples/themes/plasma_web.module.css +0 -984
  213. package/types/examples/themes/index.d.ts +0 -6
  214. package/types/examples/themes/index.d.ts.map +0 -1
@@ -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;}
@@ -0,0 +1,9 @@
1
+ import './base_x642ct.css';
2
+ 'use strict';
3
+
4
+ Object.defineProperty(exports, '__esModule', { value: true });
5
+
6
+ var base = "bhhdltp";
7
+
8
+ exports.base = base;
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
@@ -782,3 +782,5 @@
782
782
 
783
783
  .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;}
784
784
  .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);}
785
+
786
+ .ViewContainer_yiqfcb_bemjbnt__5b2a6776{position:relative;}
package/cjs/index.js CHANGED
@@ -197,6 +197,7 @@ var Editable_tokens = require('./components/Editable/Editable.tokens.js');
197
197
  var Mask = require('./components/Mask/Mask.js');
198
198
  var Attach = require('./components/Attach/Attach.js');
199
199
  var Attach_tokens = require('./components/Attach/Attach.tokens.js');
200
+ var ViewContainer = require('./components/ViewContainer/ViewContainer.js');
200
201
  var common = require('./engines/common.js');
201
202
  var canUseDOM = require('./utils/canUseDOM.js');
202
203
  var extractTextFrom = require('./utils/extractTextFrom.js');
@@ -584,6 +585,8 @@ exports.composeMask = Mask.composeMask;
584
585
  exports.attachConfig = Attach.attachConfig;
585
586
  exports.attachRoot = Attach.attachRoot;
586
587
  exports.attachTokens = Attach_tokens.tokens;
588
+ exports.viewContainerConfig = ViewContainer.viewContainerConfig;
589
+ exports.viewContainerRoot = ViewContainer.viewContainerRoot;
587
590
  exports.component = common.component;
588
591
  exports.mergeConfig = common.mergeConfig;
589
592
  exports.canUseDOM = canUseDOM.canUseDOM;
package/cjs/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
@@ -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
+ };
@@ -0,0 +1,82 @@
1
+ ---
2
+ id: link
3
+ title: Link
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,8 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.base = void 0;
7
+ var _react = /*#__PURE__*/require("@emotion/react");
8
+ var base = exports.base = /*#__PURE__*/(0, _react.css)(";label:plasma-new-hope__base;" + (process.env.NODE_ENV === "production" ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uL3NyYy1lbW90aW9uL2NvbXBvbmVudHMvVmlld0NvbnRhaW5lci9fdmlldy9iYXNlLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUV1QiIsImZpbGUiOiIuLi8uLi8uLi8uLi8uLi9zcmMtZW1vdGlvbi9jb21wb25lbnRzL1ZpZXdDb250YWluZXIvX3ZpZXcvYmFzZS50cyIsInNvdXJjZXNDb250ZW50IjpbImltcG9ydCB7IGNzcyB9IGZyb20gJ0BlbW90aW9uL3JlYWN0JztcblxuZXhwb3J0IGNvbnN0IGJhc2UgPSBjc3NgYDtcbiJdfQ== */"));
@@ -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] : [];