@salutejs/plasma-new-hope 0.88.0-canary.1225.9444844145.0 → 0.88.0-canary.1225.9449327035.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -60,18 +60,19 @@ var sheetRoot = function sheetRoot(Root) {
60
60
  var hasFooter = !!contentFooter;
61
61
  var isClosedClass = isOpen ? undefined : "".concat(Sheet_tokens.classes.isClosed);
62
62
  var overlayBackgroundToken = withBlur ? "var(".concat(Sheet_tokens.tokens.sheetOverlayWithBlurColor, ")") : "var(".concat(Sheet_tokens.tokens.sheetOverlayColor, ")");
63
- return /*#__PURE__*/React.createElement(Sheet_styles.StyledWrapper, _rollupPluginBabelHelpers.extends({
64
- isOpen: isOpen,
65
- withTransition: withTransition,
66
- className: index.cx(isClosedClass, className)
67
- }, restProps), /*#__PURE__*/React.createElement(Root, {
63
+ return /*#__PURE__*/React.createElement(Root, {
68
64
  isOpen: isOpen,
69
65
  onClose: onClose,
70
66
  view: view,
71
67
  ref: rootRef
72
- }, /*#__PURE__*/React.createElement(Sheet_styles.StyledContentWrapper, {
68
+ }, /*#__PURE__*/React.createElement(Sheet_styles.StyledWrapper, _rollupPluginBabelHelpers.extends({
69
+ isOpen: isOpen,
70
+ withTransition: withTransition,
71
+ className: index.cx(isClosedClass, className)
72
+ }, restProps), /*#__PURE__*/React.createElement(Sheet_styles.StyledContentWrapper, {
73
73
  isOpen: isOpen,
74
74
  withTransition: withTransition,
75
+ className: isClosedClass,
75
76
  ref: contentWrapperRef
76
77
  }, hasHandle && /*#__PURE__*/React.createElement(Sheet_styles.StyledSheetHandle, {
77
78
  ref: handleRef
@@ -1 +1 @@
1
- {"version":3,"file":"Sheet.js","sources":["../../../src/components/Sheet/Sheet.tsx"],"sourcesContent":["import React, { forwardRef } from 'react';\n\nimport { cx } from '../../utils';\nimport { RootProps } from '../../engines';\nimport { Overlay } from '../Overlay';\n\nimport { SheetProps } from './Sheet.types';\nimport { useSheet, useSheetSwipe } from './hooks';\nimport { classes, tokens } from './Sheet.tokens';\nimport {\n StyledContentWrapper,\n StyledSheetBody,\n StyledSheetContent,\n StyledSheetFooter,\n StyledSheetHandle,\n StyledSheetHeader,\n StyledWrapper,\n} from './Sheet.styles';\nimport { base as viewCSS } from './variations/_view/base';\nimport { DEFAULT_Z_INDEX } from './utils';\n\n/**\n * Sheet\n * Открывает окно-шторку поверх основного экрана.\n */\n\nexport const sheetRoot = (Root: RootProps<HTMLDivElement, SheetProps>) =>\n forwardRef<HTMLDivElement, SheetProps>(\n (\n {\n isOpen,\n children,\n onClose,\n hasHandle = true,\n contentHeader,\n isHeaderFixed = false,\n contentFooter,\n isFooterFixed = false,\n withOverlay = true,\n withBlur = false,\n withTransition = true,\n throttleMs,\n className,\n view,\n ...restProps\n },\n rootRef,\n ) => {\n const contentWrapperRef = React.useRef<HTMLDivElement>(null);\n const contentRef = React.useRef<HTMLDivElement>(null);\n const handleRef = React.useRef<HTMLDivElement>(null);\n\n useSheet({ isOpen });\n useSheetSwipe({ contentWrapperRef, contentRef, handleRef, throttleMs, onClose });\n\n const hasHeader = !!contentHeader;\n const hasFooter = !!contentFooter;\n\n const isClosedClass = isOpen ? undefined : `${classes.isClosed}`;\n\n const overlayBackgroundToken = withBlur\n ? `var(${tokens.sheetOverlayWithBlurColor})`\n : `var(${tokens.sheetOverlayColor})`;\n\n return (\n <StyledWrapper\n isOpen={isOpen}\n withTransition={withTransition}\n className={cx(isClosedClass, className)}\n {...restProps}\n >\n <Root isOpen={isOpen} onClose={onClose} view={view} ref={rootRef}>\n <StyledContentWrapper isOpen={isOpen} withTransition={withTransition} ref={contentWrapperRef}>\n {hasHandle && <StyledSheetHandle ref={handleRef} />}\n <StyledSheetContent hasHeader={hasHeader} hasFooter={hasFooter} ref={contentRef}>\n {hasHeader && (\n <StyledSheetHeader isHeaderFixed={isHeaderFixed}>{contentHeader}</StyledSheetHeader>\n )}\n <StyledSheetBody>{children}</StyledSheetBody>\n {hasFooter && (\n <StyledSheetFooter isFooterFixed={isFooterFixed}>{contentFooter}</StyledSheetFooter>\n )}\n </StyledSheetContent>\n </StyledContentWrapper>\n {withOverlay && (\n <Overlay\n zIndex={DEFAULT_Z_INDEX}\n backgroundColorProperty={overlayBackgroundToken}\n withBlur={withBlur}\n isClickable\n onOverlayClick={onClose}\n />\n )}\n </Root>\n </StyledWrapper>\n );\n },\n );\n\nexport const sheetConfig = {\n name: 'Sheet',\n tag: 'div',\n layout: sheetRoot,\n base: '',\n variations: {\n view: {\n css: viewCSS,\n },\n },\n defaults: {\n view: 'default',\n },\n};\n"],"names":["sheetRoot","Root","forwardRef","_ref","rootRef","isOpen","children","onClose","_ref$hasHandle","hasHandle","contentHeader","_ref$isHeaderFixed","isHeaderFixed","contentFooter","_ref$isFooterFixed","isFooterFixed","_ref$withOverlay","withOverlay","_ref$withBlur","withBlur","_ref$withTransition","withTransition","throttleMs","className","view","restProps","_objectWithoutProperties","_excluded","contentWrapperRef","React","useRef","contentRef","handleRef","useSheet","useSheetSwipe","hasHeader","hasFooter","isClosedClass","undefined","concat","classes","isClosed","overlayBackgroundToken","tokens","sheetOverlayWithBlurColor","sheetOverlayColor","createElement","StyledWrapper","_extends","cx","ref","StyledContentWrapper","StyledSheetHandle","StyledSheetContent","StyledSheetHeader","StyledSheetBody","StyledSheetFooter","Overlay","zIndex","DEFAULT_Z_INDEX","backgroundColorProperty","isClickable","onOverlayClick","sheetConfig","name","tag","layout","base","variations","css","viewCSS","defaults"],"mappings":";;;;;;;;;;;;;;;;;AAqBA;AACA;AACA;AACA;;IAEaA,SAAS,GAAG,SAAZA,SAASA,CAAIC,IAA2C,EAAA;AAAA,EAAA,oBACjEC,gBAAU,CACN,UAAAC,IAAA,EAkBIC,OAAO,EACN;AAAA,IAAA,IAjBGC,MAAM,GAAAF,IAAA,CAANE,MAAM;MACNC,QAAQ,GAAAH,IAAA,CAARG,QAAQ;MACRC,OAAO,GAAAJ,IAAA,CAAPI,OAAO;MAAAC,cAAA,GAAAL,IAAA,CACPM,SAAS;AAATA,MAAAA,SAAS,GAAAD,c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C,IAAAA,IAAI,EAAE,SAAA;AACV,GAAA;AACJ;;;;;"}
1
+ {"version":3,"file":"Sheet.js","sources":["../../../src/components/Sheet/Sheet.tsx"],"sourcesContent":["import React, { forwardRef } from 'react';\n\nimport { cx } from '../../utils';\nimport { RootProps } from '../../engines';\nimport { Overlay } from '../Overlay';\n\nimport { SheetProps } from './Sheet.types';\nimport { useSheet, useSheetSwipe } from './hooks';\nimport { classes, tokens } from './Sheet.tokens';\nimport {\n StyledContentWrapper,\n StyledSheetBody,\n StyledSheetContent,\n StyledSheetFooter,\n StyledSheetHandle,\n StyledSheetHeader,\n StyledWrapper,\n} from './Sheet.styles';\nimport { base as viewCSS } from './variations/_view/base';\nimport { DEFAULT_Z_INDEX } from './utils';\n\n/**\n * Sheet\n * Открывает окно-шторку поверх основного экрана.\n */\n\nexport const sheetRoot = (Root: RootProps<HTMLDivElement, SheetProps>) =>\n forwardRef<HTMLDivElement, SheetProps>(\n (\n {\n isOpen,\n children,\n onClose,\n hasHandle = true,\n contentHeader,\n isHeaderFixed = false,\n contentFooter,\n isFooterFixed = false,\n withOverlay = true,\n withBlur = false,\n withTransition = true,\n throttleMs,\n className,\n view,\n ...restProps\n },\n rootRef,\n ) => {\n const contentWrapperRef = React.useRef<HTMLDivElement>(null);\n const contentRef = React.useRef<HTMLDivElement>(null);\n const handleRef = React.useRef<HTMLDivElement>(null);\n\n useSheet({ isOpen });\n useSheetSwipe({ contentWrapperRef, contentRef, handleRef, throttleMs, onClose });\n\n const hasHeader = !!contentHeader;\n const hasFooter = !!contentFooter;\n\n const isClosedClass = isOpen ? undefined : `${classes.isClosed}`;\n\n const overlayBackgroundToken = withBlur\n ? `var(${tokens.sheetOverlayWithBlurColor})`\n : `var(${tokens.sheetOverlayColor})`;\n\n return (\n <Root isOpen={isOpen} onClose={onClose} view={view} ref={rootRef}>\n <StyledWrapper\n isOpen={isOpen}\n withTransition={withTransition}\n className={cx(isClosedClass, className)}\n {...restProps}\n >\n <StyledContentWrapper\n isOpen={isOpen}\n withTransition={withTransition}\n className={isClosedClass}\n ref={contentWrapperRef}\n >\n {hasHandle && <StyledSheetHandle ref={handleRef} />}\n <StyledSheetContent hasHeader={hasHeader} hasFooter={hasFooter} ref={contentRef}>\n {hasHeader && (\n <StyledSheetHeader isHeaderFixed={isHeaderFixed}>{contentHeader}</StyledSheetHeader>\n )}\n <StyledSheetBody>{children}</StyledSheetBody>\n {hasFooter && (\n <StyledSheetFooter isFooterFixed={isFooterFixed}>{contentFooter}</StyledSheetFooter>\n )}\n </StyledSheetContent>\n </StyledContentWrapper>\n {withOverlay && (\n <Overlay\n zIndex={DEFAULT_Z_INDEX}\n backgroundColorProperty={overlayBackgroundToken}\n withBlur={withBlur}\n isClickable\n onOverlayClick={onClose}\n />\n )}\n </StyledWrapper>\n </Root>\n );\n },\n );\n\nexport const sheetConfig = {\n name: 'Sheet',\n tag: 'div',\n layout: sheetRoot,\n base: '',\n variations: {\n view: {\n css: viewCSS,\n },\n },\n defaults: {\n view: 'default',\n },\n};\n"],"names":["sheetRoot","Root","forwardRef","_ref","rootRef","isOpen","children","onClose","_ref$hasHandle","hasHandle","contentHeader","_ref$isHeaderFixed","isHeaderFixed","contentFooter","_ref$isFooterFixed","isFooterFixed","_ref$withOverlay","withOverlay","_ref$withBlur","withBlur","_ref$withTransition","withTransition","throttleMs","className","view","restProps","_objectWithoutProperties","_excluded","contentWrapperRef","React","useRef","contentRef","handleRef","useSheet","useSheetSwipe","hasHeader","hasFooter","isClosedClass","undefined","concat","classes","isClosed","overlayBackgroundToken","tokens","sheetOverlayWithBlurColor","sheetOverlayColor","createElement","ref","StyledWrapper","_extends","cx","StyledContentWrapper","StyledSheetHandle","StyledSheetContent","StyledSheetHeader","StyledSheetBody","StyledSheetFooter","Overlay","zIndex","DEFAULT_Z_INDEX","backgroundColorProperty","isClickable","onOverlayClick","sheetConfig","name","tag","layout","base","variations","css","viewCSS","defaults"],"mappings":";;;;;;;;;;;;;;;;;AAqBA;AACA;AACA;A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nB,CAEM,CACb,CAAC,CAAA;AAEf,GACJ,CAAC,CAAA;AAAA,EAAA;AAEE,IAAMwD,WAAW,GAAG;AACvBC,EAAAA,IAAI,EAAE,OAAO;AACbC,EAAAA,GAAG,EAAE,KAAK;AACVC,EAAAA,MAAM,EAAElE,SAAS;AACjBmE,EAAAA,IAAI,EAAE,EAAE;AACRC,EAAAA,UAAU,EAAE;AACR5C,IAAAA,IAAI,EAAE;AACF6C,MAAAA,GAAG,EAAEC,SAAAA;AACT,KAAA;GACH;AACDC,EAAAA,QAAQ,EAAE;AACN/C,IAAAA,IAAI,EAAE,SAAA;AACV,GAAA;AACJ;;;;;"}
@@ -56,18 +56,19 @@ var sheetRoot = function sheetRoot(Root) {
56
56
  var hasFooter = !!contentFooter;
57
57
  var isClosedClass = isOpen ? undefined : "".concat(classes.isClosed);
58
58
  var overlayBackgroundToken = withBlur ? "var(".concat(tokens.sheetOverlayWithBlurColor, ")") : "var(".concat(tokens.sheetOverlayColor, ")");
59
- return /*#__PURE__*/React.createElement(StyledWrapper, _extends({
60
- isOpen: isOpen,
61
- withTransition: withTransition,
62
- className: cx(isClosedClass, className)
63
- }, restProps), /*#__PURE__*/React.createElement(Root, {
59
+ return /*#__PURE__*/React.createElement(Root, {
64
60
  isOpen: isOpen,
65
61
  onClose: onClose,
66
62
  view: view,
67
63
  ref: rootRef
68
- }, /*#__PURE__*/React.createElement(StyledContentWrapper, {
64
+ }, /*#__PURE__*/React.createElement(StyledWrapper, _extends({
65
+ isOpen: isOpen,
66
+ withTransition: withTransition,
67
+ className: cx(isClosedClass, className)
68
+ }, restProps), /*#__PURE__*/React.createElement(StyledContentWrapper, {
69
69
  isOpen: isOpen,
70
70
  withTransition: withTransition,
71
+ className: isClosedClass,
71
72
  ref: contentWrapperRef
72
73
  }, hasHandle && /*#__PURE__*/React.createElement(StyledSheetHandle, {
73
74
  ref: handleRef
@@ -1 +1 @@
1
- {"version":3,"file":"Sheet.js","sources":["../../../src/components/Sheet/Sheet.tsx"],"sourcesContent":["import React, { forwardRef } from 'react';\n\nimport { cx } from '../../utils';\nimport { RootProps } from '../../engines';\nimport { Overlay } from '../Overlay';\n\nimport { SheetProps } from './Sheet.types';\nimport { useSheet, useSheetSwipe } from './hooks';\nimport { classes, tokens } from './Sheet.tokens';\nimport {\n StyledContentWrapper,\n StyledSheetBody,\n StyledSheetContent,\n StyledSheetFooter,\n StyledSheetHandle,\n StyledSheetHeader,\n StyledWrapper,\n} from './Sheet.styles';\nimport { base as viewCSS } from './variations/_view/base';\nimport { DEFAULT_Z_INDEX } from './utils';\n\n/**\n * Sheet\n * Открывает окно-шторку поверх основного экрана.\n */\n\nexport const sheetRoot = (Root: RootProps<HTMLDivElement, SheetProps>) =>\n forwardRef<HTMLDivElement, SheetProps>(\n (\n {\n isOpen,\n children,\n onClose,\n hasHandle = true,\n contentHeader,\n isHeaderFixed = false,\n contentFooter,\n isFooterFixed = false,\n withOverlay = true,\n withBlur = false,\n withTransition = true,\n throttleMs,\n className,\n view,\n ...restProps\n },\n rootRef,\n ) => {\n const contentWrapperRef = React.useRef<HTMLDivElement>(null);\n const contentRef = React.useRef<HTMLDivElement>(null);\n const handleRef = React.useRef<HTMLDivElement>(null);\n\n useSheet({ isOpen });\n useSheetSwipe({ contentWrapperRef, contentRef, handleRef, throttleMs, onClose });\n\n const hasHeader = !!contentHeader;\n const hasFooter = !!contentFooter;\n\n const isClosedClass = isOpen ? undefined : `${classes.isClosed}`;\n\n const overlayBackgroundToken = withBlur\n ? `var(${tokens.sheetOverlayWithBlurColor})`\n : `var(${tokens.sheetOverlayColor})`;\n\n return (\n <StyledWrapper\n isOpen={isOpen}\n withTransition={withTransition}\n className={cx(isClosedClass, className)}\n {...restProps}\n >\n <Root isOpen={isOpen} onClose={onClose} view={view} ref={rootRef}>\n <StyledContentWrapper isOpen={isOpen} withTransition={withTransition} ref={contentWrapperRef}>\n {hasHandle && <StyledSheetHandle ref={handleRef} />}\n <StyledSheetContent hasHeader={hasHeader} hasFooter={hasFooter} ref={contentRef}>\n {hasHeader && (\n <StyledSheetHeader isHeaderFixed={isHeaderFixed}>{contentHeader}</StyledSheetHeader>\n )}\n <StyledSheetBody>{children}</StyledSheetBody>\n {hasFooter && (\n <StyledSheetFooter isFooterFixed={isFooterFixed}>{contentFooter}</StyledSheetFooter>\n )}\n </StyledSheetContent>\n </StyledContentWrapper>\n {withOverlay && (\n <Overlay\n zIndex={DEFAULT_Z_INDEX}\n backgroundColorProperty={overlayBackgroundToken}\n withBlur={withBlur}\n isClickable\n onOverlayClick={onClose}\n />\n )}\n </Root>\n </StyledWrapper>\n );\n },\n );\n\nexport const sheetConfig = {\n name: 'Sheet',\n tag: 'div',\n layout: sheetRoot,\n base: '',\n variations: {\n view: {\n css: viewCSS,\n },\n },\n defaults: {\n view: 'default',\n },\n};\n"],"names":["sheetRoot","Root","forwardRef","_ref","rootRef","isOpen","children","onClose","_ref$hasHandle","hasHandle","contentHeader","_ref$isHeaderFixed","isHeaderFixed","contentFooter","_ref$isFooterFixed","isFooterFixed","_ref$withOverlay","withOverlay","_ref$withBlur","withBlur","_ref$withTransition","withTransition","throttleMs","className","view","restProps","_objectWithoutProperties","_excluded","contentWrapperRef","React","useRef","contentRef","handleRef","useSheet","useSheetSwipe","hasHeader","hasFooter","isClosedClass","undefined","concat","classes","isClosed","overlayBackgroundToken","tokens","sheetOverlayWithBlurColor","sheetOverlayColor","createElement","StyledWrapper","_extends","cx","ref","StyledContentWrapper","StyledSheetHandle","StyledSheetContent","StyledSheetHeader","StyledSheetBody","StyledSheetFooter","Overlay","zIndex","DEFAULT_Z_INDEX","backgroundColorProperty","isClickable","onOverlayClick","sheetConfig","name","tag","layout","base","variations","css","viewCSS","defaults"],"mappings":";;;;;;;;;;;;;AAqBA;AACA;AACA;AACA;;IAEaA,SAAS,GAAG,SAAZA,SAASA,CAAIC,IAA2C,EAAA;AAAA,EAAA,oBACjEC,UAAU,CACN,UAAAC,IAAA,EAkBIC,OAAO,EACN;AAAA,IAAA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E,SAAS;AACjBmE,EAAAA,IAAI,EAAE,EAAE;AACRC,EAAAA,UAAU,EAAE;AACR5C,IAAAA,IAAI,EAAE;AACF6C,MAAAA,GAAG,EAAEC,IAAAA;AACT,KAAA;GACH;AACDC,EAAAA,QAAQ,EAAE;AACN/C,IAAAA,IAAI,EAAE,SAAA;AACV,GAAA;AACJ;;;;"}
1
+ {"version":3,"file":"Sheet.js","sources":["../../../src/components/Sheet/Sheet.tsx"],"sourcesContent":["import React, { forwardRef } from 'react';\n\nimport { cx } from '../../utils';\nimport { RootProps } from '../../engines';\nimport { Overlay } from '../Overlay';\n\nimport { SheetProps } from './Sheet.types';\nimport { useSheet, useSheetSwipe } from './hooks';\nimport { classes, tokens } from './Sheet.tokens';\nimport {\n StyledContentWrapper,\n StyledSheetBody,\n StyledSheetContent,\n StyledSheetFooter,\n StyledSheetHandle,\n StyledSheetHeader,\n StyledWrapper,\n} from './Sheet.styles';\nimport { base as viewCSS } from './variations/_view/base';\nimport { DEFAULT_Z_INDEX } from './utils';\n\n/**\n * Sheet\n * Открывает окно-шторку поверх основного экрана.\n */\n\nexport const sheetRoot = (Root: RootProps<HTMLDivElement, SheetProps>) =>\n forwardRef<HTMLDivElement, SheetProps>(\n (\n {\n isOpen,\n children,\n onClose,\n hasHandle = true,\n contentHeader,\n isHeaderFixed = false,\n contentFooter,\n isFooterFixed = false,\n withOverlay = true,\n withBlur = false,\n withTransition = true,\n throttleMs,\n className,\n view,\n ...restProps\n },\n rootRef,\n ) => {\n const contentWrapperRef = React.useRef<HTMLDivElement>(null);\n const contentRef = React.useRef<HTMLDivElement>(null);\n const handleRef = React.useRef<HTMLDivElement>(null);\n\n useSheet({ isOpen });\n useSheetSwipe({ contentWrapperRef, contentRef, handleRef, throttleMs, onClose });\n\n const hasHeader = !!contentHeader;\n const hasFooter = !!contentFooter;\n\n const isClosedClass = isOpen ? undefined : `${classes.isClosed}`;\n\n const overlayBackgroundToken = withBlur\n ? `var(${tokens.sheetOverlayWithBlurColor})`\n : `var(${tokens.sheetOverlayColor})`;\n\n return (\n <Root isOpen={isOpen} onClose={onClose} view={view} ref={rootRef}>\n <StyledWrapper\n isOpen={isOpen}\n withTransition={withTransition}\n className={cx(isClosedClass, className)}\n {...restProps}\n >\n <StyledContentWrapper\n isOpen={isOpen}\n withTransition={withTransition}\n className={isClosedClass}\n ref={contentWrapperRef}\n >\n {hasHandle && <StyledSheetHandle ref={handleRef} />}\n <StyledSheetContent hasHeader={hasHeader} hasFooter={hasFooter} ref={contentRef}>\n {hasHeader && (\n <StyledSheetHeader isHeaderFixed={isHeaderFixed}>{contentHeader}</StyledSheetHeader>\n )}\n <StyledSheetBody>{children}</StyledSheetBody>\n {hasFooter && (\n <StyledSheetFooter isFooterFixed={isFooterFixed}>{contentFooter}</StyledSheetFooter>\n )}\n </StyledSheetContent>\n </StyledContentWrapper>\n {withOverlay && (\n <Overlay\n zIndex={DEFAULT_Z_INDEX}\n backgroundColorProperty={overlayBackgroundToken}\n withBlur={withBlur}\n isClickable\n onOverlayClick={onClose}\n />\n )}\n </StyledWrapper>\n </Root>\n );\n },\n );\n\nexport const sheetConfig = {\n name: 'Sheet',\n tag: 'div',\n layout: sheetRoot,\n base: '',\n variations: {\n view: {\n css: viewCSS,\n },\n },\n defaults: {\n view: 'default',\n },\n};\n"],"names":["sheetRoot","Root","forwardRef","_ref","rootRef","isOpen","children","onClose","_ref$hasHandle","hasHandle","contentHeader","_ref$isHeaderFixed","isHeaderFixed","contentFooter","_ref$isFooterFixed","isFooterFixed","_ref$withOverlay","withOverlay","_ref$withBlur","withBlur","_ref$withTransition","withTransition","throttleMs","className","view","restProps","_objectWithoutProperties","_excluded","contentWrapperRef","React","useRef","contentRef","handleRef","useSheet","useSheetSwipe","hasHeader","hasFooter","isClosedClass","undefined","concat","classes","isClosed","overlayBackgroundToken","tokens","sheetOverlayWithBlurColor","sheetOverlayColor","createElement","ref","StyledWrapper","_extends","cx","StyledContentWrapper","StyledSheetHandle","StyledSheetContent","StyledSheetHeader","StyledSheetBody","StyledSheetFooter","Overlay","zIndex","DEFAULT_Z_INDEX","backgroundColorProperty","isClickable","onOverlayClick","sheetConfig","name","tag","layout","base","variations","css","viewCSS","defaults"],"mappings":";;;;;;;;;;;;;AAqBA;AACA;AACA;AACA;;IAEaA,SAAS,GAAG,SAAZA,SAASA,CAAIC,IAA2C,EAAA;AAAA,EAAA,oBACjEC,UAAU,CACN,UAAAC,IAAA,EAkBIC,OAAO,EACN;AAAA,IAAA,IAjBGC,MAAM,GAAAF,IAAA,CAANE,MAAM;MACNC,QAAQ,GAAAH,IAAA,CAARG,QAAQ;MACRC,OAAO,GAAAJ,IAAA,CAAPI,OAAO;MAAAC,cAAA,GAAAL,IAAA,CACPM,SAAS;AAATA,MAAAA,SAAS,GAAAD,cAAA,KAAG,KAAA,CAAA,GAAA,IAAI,GAAAA,cAAA;MAChBE,aAAa,GAAAP,IAAA,CAAbO,aAAa;MAAAC,kBAAA,GAAAR,IAAA,CACbS,aAAa;AAAbA,MAAAA,aAAa,GAAAD,kBAAA,KAAG,KAAA,CAAA,GAAA,KAAK,GAAAA,kBAAA;MACrBE,aAAa,GAAAV,IAAA,CAAbU,aAAa;MAAAC,kBAAA,GAAAX,IAAA,CACbY,aAAa;AAAbA,MAAAA,aAAa,GAAAD,kBAAA,KAAG,KAAA,CAAA,GAAA,KAAK,GAAAA,kBAAA;MAAAE,gBAAA,GAAAb,IAAA,CACrBc,WAAW;AAAXA,MAAAA,WAAW,GAAAD,gBAAA,KAAG,KAAA,CAAA,GAAA,IAAI,GAAAA,gBAAA;MAAAE,aAAA,GAAAf,IAAA,CAClBgB,QAAQ;AAARA,MAAAA,QAAQ,GAAAD,aAAA,KAAG,KAAA,CAAA,GAAA,KAAK,GAAAA,aAAA;MAAAE,mBAAA,GAAAjB,IAAA,CAChBkB,cAAc;AAAdA,MAAAA,cAAc,GAAAD,mBAAA,KAAG,KAAA,CAAA,GAAA,IAAI,GAAAA,mBAAA;MACrBE,UAAU,GA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AAM,EAAEC,eAAgB;AACxBC,MAAAA,uBAAuB,EAAElB,sBAAuB;AAChDvB,MAAAA,QAAQ,EAAEA,QAAS;MACnB0C,WAAW,EAAA,IAAA;AACXC,MAAAA,cAAc,EAAEvD,OAAAA;KACnB,CAEM,CACb,CAAC,CAAA;AAEf,GACJ,CAAC,CAAA;AAAA,EAAA;AAEE,IAAMwD,WAAW,GAAG;AACvBC,EAAAA,IAAI,EAAE,OAAO;AACbC,EAAAA,GAAG,EAAE,KAAK;AACVC,EAAAA,MAAM,EAAElE,SAAS;AACjBmE,EAAAA,IAAI,EAAE,EAAE;AACRC,EAAAA,UAAU,EAAE;AACR5C,IAAAA,IAAI,EAAE;AACF6C,MAAAA,GAAG,EAAEC,IAAAA;AACT,KAAA;GACH;AACDC,EAAAA,QAAQ,EAAE;AACN/C,IAAAA,IAAI,EAAE,SAAA;AACV,GAAA;AACJ;;;;"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@salutejs/plasma-new-hope",
3
- "version": "0.88.0-canary.1225.9444844145.0",
3
+ "version": "0.88.0-canary.1225.9449327035.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": "ab53359df9c8b0f90549165e728b080f97e73cae"
108
+ "gitHead": "691129bb8f3f89d139ff9385a1f2600d6ab6c1f5"
109
109
  }
@@ -64,18 +64,19 @@ var sheetRoot = exports.sheetRoot = function sheetRoot(Root) {
64
64
  var hasFooter = !!contentFooter;
65
65
  var isClosedClass = isOpen ? undefined : "".concat(_Sheet.classes.isClosed);
66
66
  var overlayBackgroundToken = withBlur ? "var(".concat(_Sheet.tokens.sheetOverlayWithBlurColor, ")") : "var(".concat(_Sheet.tokens.sheetOverlayColor, ")");
67
- return /*#__PURE__*/_react["default"].createElement(_Sheet2.StyledWrapper, _extends({
68
- isOpen: isOpen,
69
- withTransition: withTransition,
70
- className: (0, _utils.cx)(isClosedClass, className)
71
- }, restProps), /*#__PURE__*/_react["default"].createElement(Root, {
67
+ return /*#__PURE__*/_react["default"].createElement(Root, {
72
68
  isOpen: isOpen,
73
69
  onClose: onClose,
74
70
  view: view,
75
71
  ref: rootRef
76
- }, /*#__PURE__*/_react["default"].createElement(_Sheet2.StyledContentWrapper, {
72
+ }, /*#__PURE__*/_react["default"].createElement(_Sheet2.StyledWrapper, _extends({
73
+ isOpen: isOpen,
74
+ withTransition: withTransition,
75
+ className: (0, _utils.cx)(isClosedClass, className)
76
+ }, restProps), /*#__PURE__*/_react["default"].createElement(_Sheet2.StyledContentWrapper, {
77
77
  isOpen: isOpen,
78
78
  withTransition: withTransition,
79
+ className: isClosedClass,
79
80
  ref: contentWrapperRef
80
81
  }, hasHandle && /*#__PURE__*/_react["default"].createElement(_Sheet2.StyledSheetHandle, {
81
82
  ref: handleRef
@@ -56,18 +56,19 @@ export var sheetRoot = function sheetRoot(Root) {
56
56
  var hasFooter = !!contentFooter;
57
57
  var isClosedClass = isOpen ? undefined : "".concat(classes.isClosed);
58
58
  var overlayBackgroundToken = withBlur ? "var(".concat(tokens.sheetOverlayWithBlurColor, ")") : "var(".concat(tokens.sheetOverlayColor, ")");
59
- return /*#__PURE__*/React.createElement(StyledWrapper, _extends({
60
- isOpen: isOpen,
61
- withTransition: withTransition,
62
- className: cx(isClosedClass, className)
63
- }, restProps), /*#__PURE__*/React.createElement(Root, {
59
+ return /*#__PURE__*/React.createElement(Root, {
64
60
  isOpen: isOpen,
65
61
  onClose: onClose,
66
62
  view: view,
67
63
  ref: rootRef
68
- }, /*#__PURE__*/React.createElement(StyledContentWrapper, {
64
+ }, /*#__PURE__*/React.createElement(StyledWrapper, _extends({
65
+ isOpen: isOpen,
66
+ withTransition: withTransition,
67
+ className: cx(isClosedClass, className)
68
+ }, restProps), /*#__PURE__*/React.createElement(StyledContentWrapper, {
69
69
  isOpen: isOpen,
70
70
  withTransition: withTransition,
71
+ className: isClosedClass,
71
72
  ref: contentWrapperRef
72
73
  }, hasHandle && /*#__PURE__*/React.createElement(StyledSheetHandle, {
73
74
  ref: handleRef
@@ -1 +1 @@
1
- {"version":3,"file":"Sheet.d.ts","sourceRoot":"","sources":["../../../src/components/Sheet/Sheet.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAqB,MAAM,OAAO,CAAC;AAG1C,OAAO,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAG1C,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAe3C;;;GAGG;AAEH,eAAO,MAAM,SAAS,SAAU,UAAU,cAAc,EAAE,UAAU,CAAC,sFAuEhE,CAAC;AAEN,eAAO,MAAM,WAAW;;;mBAzEQ,UAAU,cAAc,EAAE,UAAU,CAAC;;;;;;;;;;CAsFpE,CAAC"}
1
+ {"version":3,"file":"Sheet.d.ts","sourceRoot":"","sources":["../../../src/components/Sheet/Sheet.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAqB,MAAM,OAAO,CAAC;AAG1C,OAAO,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAG1C,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAe3C;;;GAGG;AAEH,eAAO,MAAM,SAAS,SAAU,UAAU,cAAc,EAAE,UAAU,CAAC,sFA4EhE,CAAC;AAEN,eAAO,MAAM,WAAW;;;mBA9EQ,UAAU,cAAc,EAAE,UAAU,CAAC;;;;;;;;;;CA2FpE,CAAC"}
@@ -1,5 +1,5 @@
1
- import { ReactNode } from 'react';
2
- export interface SheetProps extends React.HTMLAttributes<HTMLDivElement> {
1
+ import { ReactNode, HTMLAttributes } from 'react';
2
+ export interface SheetProps extends HTMLAttributes<HTMLDivElement> {
3
3
  /**
4
4
  * Состояние шторки, открыта или скрыта
5
5
  */
@@ -14,6 +14,8 @@ export interface SheetProps extends React.HTMLAttributes<HTMLDivElement> {
14
14
  contentHeader?: ReactNode;
15
15
  /**
16
16
  * Является ли заголовок фиксированным
17
+ * @default
18
+ * false
17
19
  */
18
20
  isHeaderFixed?: boolean;
19
21
  /**
@@ -22,24 +24,34 @@ export interface SheetProps extends React.HTMLAttributes<HTMLDivElement> {
22
24
  contentFooter?: ReactNode;
23
25
  /**
24
26
  * Является ли нижняя часть фиксированной
27
+ * @default
28
+ * false
25
29
  */
26
30
  isFooterFixed?: boolean;
27
31
  /**
28
32
  * Наличие ручки у шторки
33
+ * @default
34
+ * true
29
35
  */
30
36
  hasHandle?: boolean;
31
37
  /**
32
38
  * Наличие оверлея шторки. Если включен, то контент под шторкой перекрывается оверлеем, при нажатии на
33
39
  * который шторка закрывается.
40
+ * @default
41
+ * true
34
42
  */
35
43
  withOverlay?: boolean;
36
44
  /**
37
45
  * Нужно ли применять blur для подложки.
46
+ * @default
47
+ * false
38
48
  */
39
49
  withBlur?: boolean;
40
50
  children?: ReactNode;
41
51
  /**
42
- * Наличие состояния анимации/перехода, по-умолчанию true.
52
+ * Наличие состояния анимации/перехода
53
+ * @default
54
+ * true
43
55
  */
44
56
  withTransition?: boolean;
45
57
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"Sheet.types.d.ts","sourceRoot":"","sources":["../../../src/components/Sheet/Sheet.types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAElC,MAAM,WAAW,UAAW,SAAQ,KAAK,CAAC,cAAc,CAAC,cAAc,CAAC;IACpE;;OAEG;IACH,MAAM,EAAE,OAAO,CAAC;IAEhB;;OAEG;IACH,OAAO,EAAE,MAAM,IAAI,CAAC;IAEpB;;OAEG;IACH,aAAa,CAAC,EAAE,SAAS,CAAC;IAE1B;;OAEG;IACH,aAAa,CAAC,EAAE,OAAO,CAAC;IAExB;;OAEG;IACH,aAAa,CAAC,EAAE,SAAS,CAAC;IAE1B;;OAEG;IACH,aAAa,CAAC,EAAE,OAAO,CAAC;IAExB;;OAEG;IACH,SAAS,CAAC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