@salutejs/plasma-new-hope 0.94.0-canary.1272.9712079341.0 → 0.94.0-canary.1272.9717304400.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -17,7 +17,6 @@ var portalRoot = function portalRoot(Root) {
17
17
  disabled = _ref$disabled === void 0 ? false : _ref$disabled;
18
18
  var portalContainer = typeof container === 'function' ? container() : container;
19
19
  return /*#__PURE__*/React.createElement(Root, {
20
- container: container,
21
20
  disabled: disabled,
22
21
  ref: outerRootRef
23
22
  }, disabled && children, !disabled && /*#__PURE__*/ReactDOM.createPortal(children, portalContainer));
@@ -1 +1 @@
1
- {"version":3,"file":"Portal.js","sources":["../../../src/components/Portal/Portal.tsx"],"sourcesContent":["import React, { forwardRef } from 'react';\nimport ReactDOM from 'react-dom';\n\nimport type { RootProps } from '../../engines/types';\n\nimport { PortalProps } from './Portal.types';\n\n/*\n * Вспомогательный компонент. Используется в Popup, Popover.\n * Представляет собой ReactDOM.createPortal() в форме компонента.\n */\nexport const portalRoot = (Root: RootProps<HTMLDivElement, PortalProps>) =>\n forwardRef<HTMLDivElement, PortalProps>(({ children, container, disabled = false }, outerRootRef) => {\n const portalContainer = typeof container === 'function' ? container() : container;\n\n return (\n <Root container={container} disabled={disabled} ref={outerRootRef}>\n {disabled && children}\n {!disabled && ReactDOM.createPortal(children, portalContainer)}\n </Root>\n );\n });\n\nexport const portalConfig = {\n name: 'Portal',\n tag: 'div',\n layout: portalRoot,\n base: '',\n variations: {},\n defaults: {},\n};\n"],"names":["portalRoot","Root","forwardRef","_ref","outerRootRef","children","container","_ref$disabled","disabled","portalContainer","React","createElement","ref","ReactDOM","createPortal","portalConfig","name","tag","layout","base","variations","defaults"],"mappings":";;;;;;;AAOA;AACA;AACA;AACA;IACaA,UAAU,GAAG,SAAbA,UAAUA,CAAIC,IAA4C,EAAA;AAAA,EAAA,oBACnEC,gBAAU,CAA8B,UAAAC,IAAA,EAA4CC,YAAY,EAAK;AAAA,IAAA,IAA1DC,QAAQ,GAAAF,IAAA,CAARE,QAAQ;MAAEC,SAAS,GAAAH,IAAA,CAATG,SAAS;MAAAC,aAAA,GAAAJ,IAAA,CAAEK,QAAQ;AAARA,MAAAA,QAAQ,GAAAD,aAAA,KAAG,KAAA,CAAA,GAAA,KAAK,GAAAA,aAAA,CAAA;IAC5E,IAAME,eAAe,GAAG,OAAOH,SAAS,KAAK,UAAU,GAAGA,SAAS,EAAE,GAAGA,SAAS,CAAA;AAEjF,IAAA,oBACII,KAAA,CAAAC,aAAA,CAACV,IAAI,EAAA;AAACK,MAAAA,SAAS,EAAEA,SAAU;AAACE,MAAAA,QAAQ,EAAEA,QAAS;AAACI,MAAAA,GAAG,EAAER,YAAAA;AAAa,KAAA,EAC7DI,QAAQ,IAAIH,QAAQ,EACpB,CAACG,QAAQ,iBAAIK,QAAQ,CAACC,YAAY,CAACT,QAAQ,EAAEI,eAAe,CAC3D,CAAC,CAAA;AAEf,GAAC,CAAC,CAAA;AAAA,EAAA;AAEC,IAAMM,YAAY,GAAG;AACxBC,EAAAA,IAAI,EAAE,QAAQ;AACdC,EAAAA,GAAG,EAAE,KAAK;AACVC,EAAAA,MAAM,EAAElB,UAAU;AAClBmB,EAAAA,IAAI,EAAE,EAAE;EACRC,UAAU,EAAE,EAAE;AACdC,EAAAA,QAAQ,EAAE,EAAC;AACf;;;;;"}
1
+ {"version":3,"file":"Portal.js","sources":["../../../src/components/Portal/Portal.tsx"],"sourcesContent":["import React, { forwardRef } from 'react';\nimport ReactDOM from 'react-dom';\n\nimport type { RootProps } from '../../engines/types';\n\nimport { PortalProps } from './Portal.types';\n\n/*\n * Вспомогательный компонент. Используется в Popup, Popover.\n * Представляет собой ReactDOM.createPortal() в форме компонента.\n */\nexport const portalRoot = (Root: RootProps<HTMLDivElement, Omit<PortalProps, 'container'>>) =>\n forwardRef<HTMLDivElement, PortalProps>(({ children, container, disabled = false }, outerRootRef) => {\n const portalContainer = typeof container === 'function' ? container() : container;\n\n return (\n <Root disabled={disabled} ref={outerRootRef}>\n {disabled && children}\n {!disabled && ReactDOM.createPortal(children, portalContainer)}\n </Root>\n );\n });\n\nexport const portalConfig = {\n name: 'Portal',\n tag: 'div',\n layout: portalRoot,\n base: '',\n variations: {},\n defaults: {},\n};\n"],"names":["portalRoot","Root","forwardRef","_ref","outerRootRef","children","container","_ref$disabled","disabled","portalContainer","React","createElement","ref","ReactDOM","createPortal","portalConfig","name","tag","layout","base","variations","defaults"],"mappings":";;;;;;;AAOA;AACA;AACA;AACA;IACaA,UAAU,GAAG,SAAbA,UAAUA,CAAIC,IAA+D,EAAA;AAAA,EAAA,oBACtFC,gBAAU,CAA8B,UAAAC,IAAA,EAA4CC,YAAY,EAAK;AAAA,IAAA,IAA1DC,QAAQ,GAAAF,IAAA,CAARE,QAAQ;MAAEC,SAAS,GAAAH,IAAA,CAATG,SAAS;MAAAC,aAAA,GAAAJ,IAAA,CAAEK,QAAQ;AAARA,MAAAA,QAAQ,GAAAD,aAAA,KAAG,KAAA,CAAA,GAAA,KAAK,GAAAA,aAAA,CAAA;IAC5E,IAAME,eAAe,GAAG,OAAOH,SAAS,KAAK,UAAU,GAAGA,SAAS,EAAE,GAAGA,SAAS,CAAA;AAEjF,IAAA,oBACII,KAAA,CAAAC,aAAA,CAACV,IAAI,EAAA;AAACO,MAAAA,QAAQ,EAAEA,QAAS;AAACI,MAAAA,GAAG,EAAER,YAAAA;AAAa,KAAA,EACvCI,QAAQ,IAAIH,QAAQ,EACpB,CAACG,QAAQ,iBAAIK,QAAQ,CAACC,YAAY,CAACT,QAAQ,EAAEI,eAAe,CAC3D,CAAC,CAAA;AAEf,GAAC,CAAC,CAAA;AAAA,EAAA;AAEC,IAAMM,YAAY,GAAG;AACxBC,EAAAA,IAAI,EAAE,QAAQ;AACdC,EAAAA,GAAG,EAAE,KAAK;AACVC,EAAAA,MAAM,EAAElB,UAAU;AAClBmB,EAAAA,IAAI,EAAE,EAAE;EACRC,UAAU,EAAE,EAAE;AACdC,EAAAA,QAAQ,EAAE,EAAC;AACf;;;;;"}
@@ -13,7 +13,6 @@ var portalRoot = function portalRoot(Root) {
13
13
  disabled = _ref$disabled === void 0 ? false : _ref$disabled;
14
14
  var portalContainer = typeof container === 'function' ? container() : container;
15
15
  return /*#__PURE__*/React.createElement(Root, {
16
- container: container,
17
16
  disabled: disabled,
18
17
  ref: outerRootRef
19
18
  }, disabled && children, !disabled && /*#__PURE__*/ReactDOM.createPortal(children, portalContainer));
@@ -1 +1 @@
1
- {"version":3,"file":"Portal.js","sources":["../../../src/components/Portal/Portal.tsx"],"sourcesContent":["import React, { forwardRef } from 'react';\nimport ReactDOM from 'react-dom';\n\nimport type { RootProps } from '../../engines/types';\n\nimport { PortalProps } from './Portal.types';\n\n/*\n * Вспомогательный компонент. Используется в Popup, Popover.\n * Представляет собой ReactDOM.createPortal() в форме компонента.\n */\nexport const portalRoot = (Root: RootProps<HTMLDivElement, PortalProps>) =>\n forwardRef<HTMLDivElement, PortalProps>(({ children, container, disabled = false }, outerRootRef) => {\n const portalContainer = typeof container === 'function' ? container() : container;\n\n return (\n <Root container={container} disabled={disabled} ref={outerRootRef}>\n {disabled && children}\n {!disabled && ReactDOM.createPortal(children, portalContainer)}\n </Root>\n );\n });\n\nexport const portalConfig = {\n name: 'Portal',\n tag: 'div',\n layout: portalRoot,\n base: '',\n variations: {},\n defaults: {},\n};\n"],"names":["portalRoot","Root","forwardRef","_ref","outerRootRef","children","container","_ref$disabled","disabled","portalContainer","React","createElement","ref","ReactDOM","createPortal","portalConfig","name","tag","layout","base","variations","defaults"],"mappings":";;;AAOA;AACA;AACA;AACA;IACaA,UAAU,GAAG,SAAbA,UAAUA,CAAIC,IAA4C,EAAA;AAAA,EAAA,oBACnEC,UAAU,CAA8B,UAAAC,IAAA,EAA4CC,YAAY,EAAK;AAAA,IAAA,IAA1DC,QAAQ,GAAAF,IAAA,CAARE,QAAQ;MAAEC,SAAS,GAAAH,IAAA,CAATG,SAAS;MAAAC,aAAA,GAAAJ,IAAA,CAAEK,QAAQ;AAARA,MAAAA,QAAQ,GAAAD,aAAA,KAAG,KAAA,CAAA,GAAA,KAAK,GAAAA,aAAA,CAAA;IAC5E,IAAME,eAAe,GAAG,OAAOH,SAAS,KAAK,UAAU,GAAGA,SAAS,EAAE,GAAGA,SAAS,CAAA;AAEjF,IAAA,oBACII,KAAA,CAAAC,aAAA,CAACV,IAAI,EAAA;AAACK,MAAAA,SAAS,EAAEA,SAAU;AAACE,MAAAA,QAAQ,EAAEA,QAAS;AAACI,MAAAA,GAAG,EAAER,YAAAA;AAAa,KAAA,EAC7DI,QAAQ,IAAIH,QAAQ,EACpB,CAACG,QAAQ,iBAAIK,QAAQ,CAACC,YAAY,CAACT,QAAQ,EAAEI,eAAe,CAC3D,CAAC,CAAA;AAEf,GAAC,CAAC,CAAA;AAAA,EAAA;AAEC,IAAMM,YAAY,GAAG;AACxBC,EAAAA,IAAI,EAAE,QAAQ;AACdC,EAAAA,GAAG,EAAE,KAAK;AACVC,EAAAA,MAAM,EAAElB,UAAU;AAClBmB,EAAAA,IAAI,EAAE,EAAE;EACRC,UAAU,EAAE,EAAE;AACdC,EAAAA,QAAQ,EAAE,EAAC;AACf;;;;"}
1
+ {"version":3,"file":"Portal.js","sources":["../../../src/components/Portal/Portal.tsx"],"sourcesContent":["import React, { forwardRef } from 'react';\nimport ReactDOM from 'react-dom';\n\nimport type { RootProps } from '../../engines/types';\n\nimport { PortalProps } from './Portal.types';\n\n/*\n * Вспомогательный компонент. Используется в Popup, Popover.\n * Представляет собой ReactDOM.createPortal() в форме компонента.\n */\nexport const portalRoot = (Root: RootProps<HTMLDivElement, Omit<PortalProps, 'container'>>) =>\n forwardRef<HTMLDivElement, PortalProps>(({ children, container, disabled = false }, outerRootRef) => {\n const portalContainer = typeof container === 'function' ? container() : container;\n\n return (\n <Root disabled={disabled} ref={outerRootRef}>\n {disabled && children}\n {!disabled && ReactDOM.createPortal(children, portalContainer)}\n </Root>\n );\n });\n\nexport const portalConfig = {\n name: 'Portal',\n tag: 'div',\n layout: portalRoot,\n base: '',\n variations: {},\n defaults: {},\n};\n"],"names":["portalRoot","Root","forwardRef","_ref","outerRootRef","children","container","_ref$disabled","disabled","portalContainer","React","createElement","ref","ReactDOM","createPortal","portalConfig","name","tag","layout","base","variations","defaults"],"mappings":";;;AAOA;AACA;AACA;AACA;IACaA,UAAU,GAAG,SAAbA,UAAUA,CAAIC,IAA+D,EAAA;AAAA,EAAA,oBACtFC,UAAU,CAA8B,UAAAC,IAAA,EAA4CC,YAAY,EAAK;AAAA,IAAA,IAA1DC,QAAQ,GAAAF,IAAA,CAARE,QAAQ;MAAEC,SAAS,GAAAH,IAAA,CAATG,SAAS;MAAAC,aAAA,GAAAJ,IAAA,CAAEK,QAAQ;AAARA,MAAAA,QAAQ,GAAAD,aAAA,KAAG,KAAA,CAAA,GAAA,KAAK,GAAAA,aAAA,CAAA;IAC5E,IAAME,eAAe,GAAG,OAAOH,SAAS,KAAK,UAAU,GAAGA,SAAS,EAAE,GAAGA,SAAS,CAAA;AAEjF,IAAA,oBACII,KAAA,CAAAC,aAAA,CAACV,IAAI,EAAA;AAACO,MAAAA,QAAQ,EAAEA,QAAS;AAACI,MAAAA,GAAG,EAAER,YAAAA;AAAa,KAAA,EACvCI,QAAQ,IAAIH,QAAQ,EACpB,CAACG,QAAQ,iBAAIK,QAAQ,CAACC,YAAY,CAACT,QAAQ,EAAEI,eAAe,CAC3D,CAAC,CAAA;AAEf,GAAC,CAAC,CAAA;AAAA,EAAA;AAEC,IAAMM,YAAY,GAAG;AACxBC,EAAAA,IAAI,EAAE,QAAQ;AACdC,EAAAA,GAAG,EAAE,KAAK;AACVC,EAAAA,MAAM,EAAElB,UAAU;AAClBmB,EAAAA,IAAI,EAAE,EAAE;EACRC,UAAU,EAAE,EAAE;AACdC,EAAAA,QAAQ,EAAE,EAAC;AACf;;;;"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@salutejs/plasma-new-hope",
3
- "version": "0.94.0-canary.1272.9712079341.0",
3
+ "version": "0.94.0-canary.1272.9717304400.0",
4
4
  "description": "Salute Design System blueprint",
5
5
  "main": "cjs/index.js",
6
6
  "module": "es/index.js",
@@ -105,5 +105,5 @@
105
105
  "react-popper": "2.3.0",
106
106
  "storeon": "3.1.5"
107
107
  },
108
- "gitHead": "63012186c6d60b76d4124c79587e7f5872f1e60c"
108
+ "gitHead": "957a8312daa56f61a71bae6bbf62554c6b00b62f"
109
109
  }
@@ -22,7 +22,6 @@ var portalRoot = exports.portalRoot = function portalRoot(Root) {
22
22
  disabled = _ref$disabled === void 0 ? false : _ref$disabled;
23
23
  var portalContainer = typeof container === 'function' ? container() : container;
24
24
  return /*#__PURE__*/_react["default"].createElement(Root, {
25
- container: container,
26
25
  disabled: disabled,
27
26
  ref: outerRootRef
28
27
  }, disabled && children, !disabled && /*#__PURE__*/_reactDom["default"].createPortal(children, portalContainer));
@@ -22,15 +22,15 @@ export function App() {
22
22
  return (
23
23
  <>
24
24
  <Button onClick={() => setShow(!show)}>{show ? 'Скрыть' : 'Показать'}</Button>
25
- <div style=\{{padding: '20px', marginBottom: '10px', marginTop: '10px', border: '1px solid'}}>
26
- <BodyM style=\{{ marginBottom: '20px' }}>Содержимое портала появится в нижнем блоке.</BodyM>
25
+ <div style=\{{padding: '1.25rem', marginBottom: '0.625rem', marginTop: '0.625rem', border: '1px solid'}}>
26
+ <BodyM style=\{{ marginBottom: '1.25rem' }}>Содержимое портала появится в нижнем блоке.</BodyM>
27
27
  {show && containerRef.current && (
28
28
  <Portal container={containerRef.current}>
29
29
  <BodyM bold>Содержимое портала</BodyM>
30
30
  </Portal>
31
31
  )}
32
32
  </div>
33
- <div style=\{{padding: '20px', marginBottom: '10px', marginTop: '10px', border: '1px solid'}} ref={containerRef} />
33
+ <div style=\{{padding: '1.25rem', marginBottom: '0.625rem', marginTop: '0.625rem', border: '1px solid'}} ref={containerRef} />
34
34
  </>
35
35
  );
36
36
  }
@@ -51,15 +51,15 @@ export function App() {
51
51
  return (
52
52
  <>
53
53
  <Button onClick={() => setShow(!show)}>{show ? 'Скрыть' : 'Показать'}</Button>
54
- <div style=\{{padding: '20px', marginBottom: '10px', marginTop: '10px', border: '1px solid'}}>
55
- <BodyM style=\{{ marginBottom: '20px' }}>Содержимое портала появится в данном блоке.</BodyM>
54
+ <div style=\{{padding: '1.25rem', marginBottom: '0.625rem', marginTop: '0.625rem', border: '1px solid'}}>
55
+ <BodyM style=\{{ marginBottom: '1.25rem' }}>Содержимое портала появится в данном блоке.</BodyM>
56
56
  {show && containerRef.current && (
57
57
  <Portal disabled container={containerRef.current}>
58
58
  <BodyM bold>Содержимое портала</BodyM>
59
59
  </Portal>
60
60
  )}
61
61
  </div>
62
- <div style=\{{padding: '20px', marginBottom: '10px', marginTop: '10px', border: '1px solid'}} ref={containerRef} />
62
+ <div style=\{{padding: '1.25rem', marginBottom: '0.625rem', marginTop: '0.625rem', border: '1px solid'}} ref={containerRef} />
63
63
  </>
64
64
  );
65
65
  }
@@ -22,9 +22,9 @@ export default meta;
22
22
  type StoryPortalProps = ComponentProps<typeof Portal>;
23
23
 
24
24
  const StyledWrapper = styled.div`
25
- padding: 20px;
26
- margin-bottom: 10px;
27
- margin-top: 10px;
25
+ padding: 1.25rem;
26
+ margin-bottom: 0.625rem;
27
+ margin-top: 0.625rem;
28
28
 
29
29
  border: 1px solid;
30
30
  `;
@@ -37,8 +37,8 @@ const StoryDefault = ({ disabled }: StoryPortalProps) => {
37
37
  <>
38
38
  <Button onClick={() => setShow(!show)}>{show ? 'Скрыть' : 'Показать'}</Button>
39
39
  <StyledWrapper>
40
- <Body style={{ marginBottom: '20px' }}>Содержимое портала появится в нижнем блоке.</Body>
41
- <Body style={{ marginBottom: '20px' }}>
40
+ <Body style={{ marginBottom: '1.25rem' }}>Содержимое портала появится в нижнем блоке.</Body>
41
+ <Body style={{ marginBottom: '1.25rem' }}>
42
42
  Если портал выключен (disabled), то содержимое появится в данном блоке.
43
43
  </Body>
44
44
  {show && containerRef.current && (
@@ -22,9 +22,9 @@ export default meta;
22
22
  type StoryPortalProps = ComponentProps<typeof Portal>;
23
23
 
24
24
  const StyledWrapper = styled.div`
25
- padding: 20px;
26
- margin-bottom: 10px;
27
- margin-top: 10px;
25
+ padding: 1.25rem;
26
+ margin-bottom: 0.625rem;
27
+ margin-top: 0.625rem;
28
28
 
29
29
  border: 1px solid;
30
30
  `;
@@ -37,8 +37,8 @@ const StoryDefault = ({ disabled }: StoryPortalProps) => {
37
37
  <>
38
38
  <Button onClick={() => setShow(!show)}>{show ? 'Скрыть' : 'Показать'}</Button>
39
39
  <StyledWrapper>
40
- <Body style={{ marginBottom: '20px' }}>Содержимое портала появится в нижнем блоке.</Body>
41
- <Body style={{ marginBottom: '20px' }}>
40
+ <Body style={{ marginBottom: '1.25rem' }}>Содержимое портала появится в нижнем блоке.</Body>
41
+ <Body style={{ marginBottom: '1.25rem' }}>
42
42
  Если портал выключен (disabled), то содержимое появится в данном блоке.
43
43
  </Body>
44
44
  {show && containerRef.current && (
@@ -12,7 +12,6 @@ export var portalRoot = function portalRoot(Root) {
12
12
  disabled = _ref$disabled === void 0 ? false : _ref$disabled;
13
13
  var portalContainer = typeof container === 'function' ? container() : container;
14
14
  return /*#__PURE__*/React.createElement(Root, {
15
- container: container,
16
15
  disabled: disabled,
17
16
  ref: outerRootRef
18
17
  }, disabled && children, !disabled && /*#__PURE__*/ReactDOM.createPortal(children, portalContainer));
@@ -22,15 +22,15 @@ export function App() {
22
22
  return (
23
23
  <>
24
24
  <Button onClick={() => setShow(!show)}>{show ? 'Скрыть' : 'Показать'}</Button>
25
- <div style=\{{padding: '20px', marginBottom: '10px', marginTop: '10px', border: '1px solid'}}>
26
- <BodyM style=\{{ marginBottom: '20px' }}>Содержимое портала появится в нижнем блоке.</BodyM>
25
+ <div style=\{{padding: '1.25rem', marginBottom: '0.625rem', marginTop: '0.625rem', border: '1px solid'}}>
26
+ <BodyM style=\{{ marginBottom: '1.25rem' }}>Содержимое портала появится в нижнем блоке.</BodyM>
27
27
  {show && containerRef.current && (
28
28
  <Portal container={containerRef.current}>
29
29
  <BodyM bold>Содержимое портала</BodyM>
30
30
  </Portal>
31
31
  )}
32
32
  </div>
33
- <div style=\{{padding: '20px', marginBottom: '10px', marginTop: '10px', border: '1px solid'}} ref={containerRef} />
33
+ <div style=\{{padding: '1.25rem', marginBottom: '0.625rem', marginTop: '0.625rem', border: '1px solid'}} ref={containerRef} />
34
34
  </>
35
35
  );
36
36
  }
@@ -51,15 +51,15 @@ export function App() {
51
51
  return (
52
52
  <>
53
53
  <Button onClick={() => setShow(!show)}>{show ? 'Скрыть' : 'Показать'}</Button>
54
- <div style=\{{padding: '20px', marginBottom: '10px', marginTop: '10px', border: '1px solid'}}>
55
- <BodyM style=\{{ marginBottom: '20px' }}>Содержимое портала появится в данном блоке.</BodyM>
54
+ <div style=\{{padding: '1.25rem', marginBottom: '0.625rem', marginTop: '0.625rem', border: '1px solid'}}>
55
+ <BodyM style=\{{ marginBottom: '1.25rem' }}>Содержимое портала появится в данном блоке.</BodyM>
56
56
  {show && containerRef.current && (
57
57
  <Portal disabled container={containerRef.current}>
58
58
  <BodyM bold>Содержимое портала</BodyM>
59
59
  </Portal>
60
60
  )}
61
61
  </div>
62
- <div style=\{{padding: '20px', marginBottom: '10px', marginTop: '10px', border: '1px solid'}} ref={containerRef} />
62
+ <div style=\{{padding: '1.25rem', marginBottom: '0.625rem', marginTop: '0.625rem', border: '1px solid'}} ref={containerRef} />
63
63
  </>
64
64
  );
65
65
  }
@@ -22,9 +22,9 @@ export default meta;
22
22
  type StoryPortalProps = ComponentProps<typeof Portal>;
23
23
 
24
24
  const StyledWrapper = styled.div`
25
- padding: 20px;
26
- margin-bottom: 10px;
27
- margin-top: 10px;
25
+ padding: 1.25rem;
26
+ margin-bottom: 0.625rem;
27
+ margin-top: 0.625rem;
28
28
 
29
29
  border: 1px solid;
30
30
  `;
@@ -37,8 +37,8 @@ const StoryDefault = ({ disabled }: StoryPortalProps) => {
37
37
  <>
38
38
  <Button onClick={() => setShow(!show)}>{show ? 'Скрыть' : 'Показать'}</Button>
39
39
  <StyledWrapper>
40
- <Body style={{ marginBottom: '20px' }}>Содержимое портала появится в нижнем блоке.</Body>
41
- <Body style={{ marginBottom: '20px' }}>
40
+ <Body style={{ marginBottom: '1.25rem' }}>Содержимое портала появится в нижнем блоке.</Body>
41
+ <Body style={{ marginBottom: '1.25rem' }}>
42
42
  Если портал выключен (disabled), то содержимое появится в данном блоке.
43
43
  </Body>
44
44
  {show && containerRef.current && (
@@ -22,9 +22,9 @@ export default meta;
22
22
  type StoryPortalProps = ComponentProps<typeof Portal>;
23
23
 
24
24
  const StyledWrapper = styled.div`
25
- padding: 20px;
26
- margin-bottom: 10px;
27
- margin-top: 10px;
25
+ padding: 1.25rem;
26
+ margin-bottom: 0.625rem;
27
+ margin-top: 0.625rem;
28
28
 
29
29
  border: 1px solid;
30
30
  `;
@@ -37,8 +37,8 @@ const StoryDefault = ({ disabled }: StoryPortalProps) => {
37
37
  <>
38
38
  <Button onClick={() => setShow(!show)}>{show ? 'Скрыть' : 'Показать'}</Button>
39
39
  <StyledWrapper>
40
- <Body style={{ marginBottom: '20px' }}>Содержимое портала появится в нижнем блоке.</Body>
41
- <Body style={{ marginBottom: '20px' }}>
40
+ <Body style={{ marginBottom: '1.25rem' }}>Содержимое портала появится в нижнем блоке.</Body>
41
+ <Body style={{ marginBottom: '1.25rem' }}>
42
42
  Если портал выключен (disabled), то содержимое появится в данном блоке.
43
43
  </Body>
44
44
  {show && containerRef.current && (
@@ -1,11 +1,11 @@
1
1
  import React from 'react';
2
2
  import type { RootProps } from '../../engines/types';
3
3
  import { PortalProps } from './Portal.types';
4
- export declare const portalRoot: (Root: RootProps<HTMLDivElement, PortalProps>) => React.ForwardRefExoticComponent<PortalProps & React.RefAttributes<HTMLDivElement>>;
4
+ export declare const portalRoot: (Root: RootProps<HTMLDivElement, Omit<PortalProps, 'container'>>) => React.ForwardRefExoticComponent<PortalProps & React.RefAttributes<HTMLDivElement>>;
5
5
  export declare const portalConfig: {
6
6
  name: string;
7
7
  tag: string;
8
- layout: (Root: RootProps<HTMLDivElement, PortalProps>) => React.ForwardRefExoticComponent<PortalProps & React.RefAttributes<HTMLDivElement>>;
8
+ layout: (Root: RootProps<HTMLDivElement, Omit<PortalProps, 'container'>>) => React.ForwardRefExoticComponent<PortalProps & React.RefAttributes<HTMLDivElement>>;
9
9
  base: string;
10
10
  variations: {};
11
11
  defaults: {};
@@ -1 +1 @@
1
- {"version":3,"file":"Portal.d.ts","sourceRoot":"","sources":["../../../src/components/Portal/Portal.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAqB,MAAM,OAAO,CAAC;AAG1C,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,qBAAqB,CAAC;AAErD,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAM7C,eAAO,MAAM,UAAU,SAAU,UAAU,cAAc,EAAE,WAAW,CAAC,uFAUjE,CAAC;AAEP,eAAO,MAAM,YAAY;;;mBAZQ,UAAU,cAAc,EAAE,WAAW,CAAC;;;;CAmBtE,CAAC"}
1
+ {"version":3,"file":"Portal.d.ts","sourceRoot":"","sources":["../../../src/components/Portal/Portal.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAqB,MAAM,OAAO,CAAC;AAG1C,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,qBAAqB,CAAC;AAErD,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAM7C,eAAO,MAAM,UAAU,SAAU,UAAU,cAAc,EAAE,KAAK,WAAW,EAAE,WAAW,CAAC,CAAC,uFAUpF,CAAC;AAEP,eAAO,MAAM,YAAY;;;mBAZQ,UAAU,cAAc,EAAE,KAAK,WAAW,EAAE,WAAW,CAAC,CAAC;;;;CAmBzF,CAAC"}