@salutejs/plasma-new-hope 0.94.0-dev.0 → 0.94.1-canary.1273.9715265388.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -1 +1 @@
1
- {"version":3,"file":"Sheet.js","sources":["../../../src/components/Sheet/Sheet.tsx"],"sourcesContent":["import React, { forwardRef } from 'react';\n\nimport { RootProps } from '../../engines';\nimport { Overlay } from '../Overlay';\nimport { cx } from '../../utils';\n\nimport { SheetProps } from './Sheet.types';\nimport { useOverflow, useSheetSwipe } from './hooks';\nimport { classes, tokens } from './Sheet.tokens';\nimport {\n StyledContentWrapper,\n StyledSheetBody,\n StyledSheetContent,\n StyledSheetFooter,\n StyledSheetHandle,\n StyledSheetHeader,\n} from './Sheet.styles';\nimport { base as viewCSS } from './variations/_view/base';\nimport { DEFAULT_Z_INDEX } from './utils';\n\n/**\n * Открывает окно-шторку поверх основного экрана.\n */\n\nexport const sheetRoot = (Root: RootProps<HTMLDivElement, SheetProps>) =>\n forwardRef<HTMLDivElement, SheetProps>(\n (\n {\n opened,\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 useOverflow({ opened });\n useSheetSwipe({ contentWrapperRef, contentRef, handleRef, throttleMs, onClose });\n\n const hasHeader = Boolean(contentHeader);\n const hasFooter = Boolean(contentFooter);\n\n const closedClass = opened ? undefined : `${classes.closed}`;\n\n const overlayBackgroundToken = withBlur\n ? `var(${tokens.sheetOverlayWithBlurColor})`\n : `var(${tokens.sheetOverlayColor})`;\n\n return (\n <Root opened={opened} onClose={onClose} view={view} ref={rootRef}>\n <StyledContentWrapper\n opened={opened}\n withTransition={withTransition}\n className={cx(closedClass, className)}\n ref={contentWrapperRef}\n {...restProps}\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 && opened && (\n <Overlay\n zIndex={DEFAULT_Z_INDEX}\n backgroundColorProperty={overlayBackgroundToken}\n withBlur={withBlur}\n isClickable\n onOverlayClick={onClose}\n />\n )}\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","opened","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","useOverflow","useSheetSwipe","hasHeader","Boolean","hasFooter","closedClass","undefined","concat","classes","closed","overlayBackgroundToken","tokens","sheetOverlayWithBlurColor","sheetOverlayColor","createElement","ref","StyledContentWrapper","_extends","cx","StyledSheetHandle","StyledSheetContent","StyledSheetHeader","StyledSheetBody","StyledSheetFooter","Overlay","zIndex","DEFAULT_Z_INDEX","backgroundColorProperty","isClickable","onOverlayClick","sheetConfig","name","tag","layout","base","variations","css","viewCSS","defaults"],"mappings":";;;;;;;;;;;;;;;;;AAoBA;AACA;AACA;;IAEaA,SAAS,GAAG,SAAZA,SAASA,CAAIC,IAA2C,EAAA;AAAA,EAAA,oB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AAE,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;;;;;"}
1
+ {"version":3,"file":"Sheet.js","sources":["../../../src/components/Sheet/Sheet.tsx"],"sourcesContent":["import React, { forwardRef, useRef } from 'react';\n\nimport { RootProps } from '../../engines';\nimport { Overlay } from '../Overlay';\nimport { cx } from '../../utils';\n\nimport { SheetProps } from './Sheet.types';\nimport { useOverflow, useSheetSwipe } from './hooks';\nimport { classes, tokens } from './Sheet.tokens';\nimport {\n StyledContentWrapper,\n StyledSheetBody,\n StyledSheetContent,\n StyledSheetFooter,\n StyledSheetHandle,\n StyledSheetHeader,\n} from './Sheet.styles';\nimport { base as viewCSS } from './variations/_view/base';\nimport { DEFAULT_Z_INDEX } from './utils';\n\n/**\n * Открывает окно-шторку поверх основного экрана.\n */\n\nexport const sheetRoot = (Root: RootProps<HTMLDivElement, SheetProps>) =>\n forwardRef<HTMLDivElement, SheetProps>(\n (\n {\n opened,\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 = useRef<HTMLDivElement>(null);\n const contentRef = useRef<HTMLDivElement>(null);\n const handleRef = useRef<HTMLDivElement>(null);\n\n useOverflow({ opened });\n useSheetSwipe({ contentWrapperRef, contentRef, handleRef, throttleMs, onClose });\n\n const hasHeader = Boolean(contentHeader);\n const hasFooter = Boolean(contentFooter);\n\n const closedClass = opened ? undefined : `${classes.closed}`;\n\n const overlayBackgroundToken = withBlur\n ? `var(${tokens.sheetOverlayWithBlurColor})`\n : `var(${tokens.sheetOverlayColor})`;\n\n return (\n <Root opened={opened} onClose={onClose} view={view} ref={rootRef}>\n <StyledContentWrapper\n opened={opened}\n withTransition={withTransition}\n className={cx(closedClass, className)}\n ref={contentWrapperRef}\n {...restProps}\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 && opened && (\n <Overlay\n zIndex={DEFAULT_Z_INDEX}\n backgroundColorProperty={overlayBackgroundToken}\n withBlur={withBlur}\n isClickable\n onOverlayClick={onClose}\n />\n )}\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","opened","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","useRef","contentRef","handleRef","useOverflow","useSheetSwipe","hasHeader","Boolean","hasFooter","closedClass","undefined","concat","classes","closed","overlayBackgroundToken","tokens","sheetOverlayWithBlurColor","sheetOverlayColor","React","createElement","ref","StyledContentWrapper","_extends","cx","StyledSheetHandle","StyledSheetContent","StyledSheetHeader","StyledSheetBody","StyledSheetFooter","Overlay","zIndex","DEFAULT_Z_INDEX","backgroundColorProperty","isClickable","onOverlayClick","sheetConfig","name","tag","layout","base","variations","css","viewCSS","defaults"],"mappings":";;;;;;;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A,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;;;;;"}
@@ -1,5 +1,5 @@
1
1
  import { objectWithoutProperties as _objectWithoutProperties, extends as _extends } from '../../_virtual/_rollupPluginBabelHelpers.js';
2
- import React, { forwardRef } from 'react';
2
+ import React, { forwardRef, useRef } from 'react';
3
3
  import { Overlay } from '../Overlay/Overlay.js';
4
4
  import { cx } from '../../utils/index.js';
5
5
  import { useSheetSwipe } from './hooks/useSheetSwipe.js';
@@ -38,9 +38,9 @@ var sheetRoot = function sheetRoot(Root) {
38
38
  className = _ref.className,
39
39
  view = _ref.view,
40
40
  restProps = _objectWithoutProperties(_ref, _excluded);
41
- var contentWrapperRef = React.useRef(null);
42
- var contentRef = React.useRef(null);
43
- var handleRef = React.useRef(null);
41
+ var contentWrapperRef = useRef(null);
42
+ var contentRef = useRef(null);
43
+ var handleRef = useRef(null);
44
44
  useOverflow({
45
45
  opened: opened
46
46
  });
@@ -1 +1 @@
1
- {"version":3,"file":"Sheet.js","sources":["../../../src/components/Sheet/Sheet.tsx"],"sourcesContent":["import React, { forwardRef } from 'react';\n\nimport { RootProps } from '../../engines';\nimport { Overlay } from '../Overlay';\nimport { cx } from '../../utils';\n\nimport { SheetProps } from './Sheet.types';\nimport { useOverflow, useSheetSwipe } from './hooks';\nimport { classes, tokens } from './Sheet.tokens';\nimport {\n StyledContentWrapper,\n StyledSheetBody,\n StyledSheetContent,\n StyledSheetFooter,\n StyledSheetHandle,\n StyledSheetHeader,\n} from './Sheet.styles';\nimport { base as viewCSS } from './variations/_view/base';\nimport { DEFAULT_Z_INDEX } from './utils';\n\n/**\n * Открывает окно-шторку поверх основного экрана.\n */\n\nexport const sheetRoot = (Root: RootProps<HTMLDivElement, SheetProps>) =>\n forwardRef<HTMLDivElement, SheetProps>(\n (\n {\n opened,\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 useOverflow({ opened });\n useSheetSwipe({ contentWrapperRef, contentRef, handleRef, throttleMs, onClose });\n\n const hasHeader = Boolean(contentHeader);\n const hasFooter = Boolean(contentFooter);\n\n const closedClass = opened ? undefined : `${classes.closed}`;\n\n const overlayBackgroundToken = withBlur\n ? `var(${tokens.sheetOverlayWithBlurColor})`\n : `var(${tokens.sheetOverlayColor})`;\n\n return (\n <Root opened={opened} onClose={onClose} view={view} ref={rootRef}>\n <StyledContentWrapper\n opened={opened}\n withTransition={withTransition}\n className={cx(closedClass, className)}\n ref={contentWrapperRef}\n {...restProps}\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 && opened && (\n <Overlay\n zIndex={DEFAULT_Z_INDEX}\n backgroundColorProperty={overlayBackgroundToken}\n withBlur={withBlur}\n isClickable\n onOverlayClick={onClose}\n />\n )}\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","opened","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","useOverflow","useSheetSwipe","hasHeader","Boolean","hasFooter","closedClass","undefined","concat","classes","closed","overlayBackgroundToken","tokens","sheetOverlayWithBlurColor","sheetOverlayColor","createElement","ref","StyledContentWrapper","_extends","cx","StyledSheetHandle","StyledSheetContent","StyledSheetHeader","StyledSheetBody","StyledSheetFooter","Overlay","zIndex","DEFAULT_Z_INDEX","backgroundColorProperty","isClickable","onOverlayClick","sheetConfig","name","tag","layout","base","variations","css","viewCSS","defaults"],"mappings":";;;;;;;;;;;;;AAoBA;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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mB,KAAA,CAAAkB,aAAA,CAACQ,eAAe,EAAA,IAAA,EAAEjD,QAA0B,CAAC,EAC5C+B,SAAS,iBACNR,KAAA,CAAAkB,aAAA,CAACS,iBAAiB,EAAA;AAACzC,MAAAA,aAAa,EAAEA,aAAAA;AAAc,KAAA,EAAEF,aAAiC,CAEvE,CACF,CAAC,EACtBI,WAAW,IAAIZ,MAAM,iBAClBwB,KAAA,CAAAkB,aAAA,CAACU,OAAO,EAAA;AACJC,MAAAA,MAAM,EAAEC,eAAgB;AACxBC,MAAAA,uBAAuB,EAAEjB,sBAAuB;AAChDxB,MAAAA,QAAQ,EAAEA,QAAS;MACnB0C,WAAW,EAAA,IAAA;AACXC,MAAAA,cAAc,EAAEvD,OAAAA;AAAQ,KAC3B,CAEH,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;;;;"}
1
+ {"version":3,"file":"Sheet.js","sources":["../../../src/components/Sheet/Sheet.tsx"],"sourcesContent":["import React, { forwardRef, useRef } from 'react';\n\nimport { RootProps } from '../../engines';\nimport { Overlay } from '../Overlay';\nimport { cx } from '../../utils';\n\nimport { SheetProps } from './Sheet.types';\nimport { useOverflow, useSheetSwipe } from './hooks';\nimport { classes, tokens } from './Sheet.tokens';\nimport {\n StyledContentWrapper,\n StyledSheetBody,\n StyledSheetContent,\n StyledSheetFooter,\n StyledSheetHandle,\n StyledSheetHeader,\n} from './Sheet.styles';\nimport { base as viewCSS } from './variations/_view/base';\nimport { DEFAULT_Z_INDEX } from './utils';\n\n/**\n * Открывает окно-шторку поверх основного экрана.\n */\n\nexport const sheetRoot = (Root: RootProps<HTMLDivElement, SheetProps>) =>\n forwardRef<HTMLDivElement, SheetProps>(\n (\n {\n opened,\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 = useRef<HTMLDivElement>(null);\n const contentRef = useRef<HTMLDivElement>(null);\n const handleRef = useRef<HTMLDivElement>(null);\n\n useOverflow({ opened });\n useSheetSwipe({ contentWrapperRef, contentRef, handleRef, throttleMs, onClose });\n\n const hasHeader = Boolean(contentHeader);\n const hasFooter = Boolean(contentFooter);\n\n const closedClass = opened ? undefined : `${classes.closed}`;\n\n const overlayBackgroundToken = withBlur\n ? `var(${tokens.sheetOverlayWithBlurColor})`\n : `var(${tokens.sheetOverlayColor})`;\n\n return (\n <Root opened={opened} onClose={onClose} view={view} ref={rootRef}>\n <StyledContentWrapper\n opened={opened}\n withTransition={withTransition}\n className={cx(closedClass, className)}\n ref={contentWrapperRef}\n {...restProps}\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 && opened && (\n <Overlay\n zIndex={DEFAULT_Z_INDEX}\n backgroundColorProperty={overlayBackgroundToken}\n withBlur={withBlur}\n isClickable\n onOverlayClick={onClose}\n />\n )}\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","opened","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","useRef","contentRef","handleRef","useOverflow","useSheetSwipe","hasHeader","Boolean","hasFooter","closedClass","undefined","concat","classes","closed","overlayBackgroundToken","tokens","sheetOverlayWithBlurColor","sheetOverlayColor","React","createElement","ref","StyledContentWrapper","_extends","cx","StyledSheetHandle","StyledSheetContent","StyledSheetHeader","StyledSheetBody","StyledSheetFooter","Overlay","zIndex","DEFAULT_Z_INDEX","backgroundColorProperty","isClickable","onOverlayClick","sheetConfig","name","tag","layout","base","variations","css","viewCSS","defaults"],"mappings":";;;;;;;;;;;;;AAoBA;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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Ac,KAAA,EAAEF,aAAiC,CACtF,eACDoC,KAAA,CAAAC,aAAA,CAACQ,eAAe,EAAA,IAAA,EAAEjD,QAA0B,CAAC,EAC5C8B,SAAS,iBACNU,KAAA,CAAAC,aAAA,CAACS,iBAAiB,EAAA;AAACzC,MAAAA,aAAa,EAAEA,aAAAA;AAAc,KAAA,EAAEF,aAAiC,CAEvE,CACF,CAAC,EACtBI,WAAW,IAAIZ,MAAM,iBAClByC,KAAA,CAAAC,aAAA,CAACU,OAAO,EAAA;AACJC,MAAAA,MAAM,EAAEC,eAAgB;AACxBC,MAAAA,uBAAuB,EAAElB,sBAAuB;AAChDvB,MAAAA,QAAQ,EAAEA,QAAS;MACnB0C,WAAW,EAAA,IAAA;AACXC,MAAAA,cAAc,EAAEvD,OAAAA;AAAQ,KAC3B,CAEH,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.94.0-dev.0",
3
+ "version": "0.94.1-canary.1273.9715265388.0",
4
4
  "description": "Salute Design System blueprint",
5
5
  "main": "cjs/index.js",
6
6
  "module": "es/index.js",
@@ -106,5 +106,5 @@
106
106
  "react-popper": "2.3.0",
107
107
  "storeon": "3.1.5"
108
108
  },
109
- "gitHead": "6de5e7630f7a9683471701c55d3146cd655dace1"
109
+ "gitHead": "7fea656733a26ee2d1d233895287c15d4c8bb982"
110
110
  }
@@ -46,9 +46,9 @@ var sheetRoot = exports.sheetRoot = function sheetRoot(Root) {
46
46
  className = _ref.className,
47
47
  view = _ref.view,
48
48
  restProps = _objectWithoutProperties(_ref, _excluded);
49
- var contentWrapperRef = _react["default"].useRef(null);
50
- var contentRef = _react["default"].useRef(null);
51
- var handleRef = _react["default"].useRef(null);
49
+ var contentWrapperRef = (0, _react.useRef)(null);
50
+ var contentRef = (0, _react.useRef)(null);
51
+ var handleRef = (0, _react.useRef)(null);
52
52
  (0, _hooks.useOverflow)({
53
53
  opened: opened
54
54
  });
@@ -222,7 +222,7 @@ const StoryWithInsideScroll = ({
222
222
  <div
223
223
  style={{
224
224
  height: '150px',
225
- overflow: 'scroll',
225
+ overflowY: 'scroll',
226
226
  display: 'flex',
227
227
  flexDirection: 'column',
228
228
  gap: '1rem',
@@ -296,7 +296,7 @@ const StoryWithDoubleScroll = ({
296
296
  <div
297
297
  style={{
298
298
  height: '150px',
299
- overflow: 'scroll',
299
+ overflowY: 'scroll',
300
300
  display: 'flex',
301
301
  flexDirection: 'column',
302
302
  gap: '1rem',
@@ -222,7 +222,7 @@ const StoryWithInsideScroll = ({
222
222
  <div
223
223
  style={{
224
224
  height: '150px',
225
- overflow: 'scroll',
225
+ overflowY: 'scroll',
226
226
  display: 'flex',
227
227
  flexDirection: 'column',
228
228
  gap: '1rem',
@@ -296,7 +296,7 @@ const StoryWithDoubleScroll = ({
296
296
  <div
297
297
  style={{
298
298
  height: '150px',
299
- overflow: 'scroll',
299
+ overflowY: 'scroll',
300
300
  display: 'flex',
301
301
  flexDirection: 'column',
302
302
  gap: '1rem',
@@ -2,7 +2,7 @@ var _excluded = ["opened", "children", "onClose", "hasHandle", "contentHeader",
2
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
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
- import React, { forwardRef } from 'react';
5
+ import React, { forwardRef, useRef } from 'react';
6
6
  import { Overlay } from '../Overlay';
7
7
  import { cx } from '../../utils';
8
8
  import { useOverflow, useSheetSwipe } from './hooks';
@@ -38,9 +38,9 @@ export var sheetRoot = function sheetRoot(Root) {
38
38
  className = _ref.className,
39
39
  view = _ref.view,
40
40
  restProps = _objectWithoutProperties(_ref, _excluded);
41
- var contentWrapperRef = React.useRef(null);
42
- var contentRef = React.useRef(null);
43
- var handleRef = React.useRef(null);
41
+ var contentWrapperRef = useRef(null);
42
+ var contentRef = useRef(null);
43
+ var handleRef = useRef(null);
44
44
  useOverflow({
45
45
  opened: opened
46
46
  });
@@ -222,7 +222,7 @@ const StoryWithInsideScroll = ({
222
222
  <div
223
223
  style={{
224
224
  height: '150px',
225
- overflow: 'scroll',
225
+ overflowY: 'scroll',
226
226
  display: 'flex',
227
227
  flexDirection: 'column',
228
228
  gap: '1rem',
@@ -296,7 +296,7 @@ const StoryWithDoubleScroll = ({
296
296
  <div
297
297
  style={{
298
298
  height: '150px',
299
- overflow: 'scroll',
299
+ overflowY: 'scroll',
300
300
  display: 'flex',
301
301
  flexDirection: 'column',
302
302
  gap: '1rem',
@@ -222,7 +222,7 @@ const StoryWithInsideScroll = ({
222
222
  <div
223
223
  style={{
224
224
  height: '150px',
225
- overflow: 'scroll',
225
+ overflowY: 'scroll',
226
226
  display: 'flex',
227
227
  flexDirection: 'column',
228
228
  gap: '1rem',
@@ -296,7 +296,7 @@ const StoryWithDoubleScroll = ({
296
296
  <div
297
297
  style={{
298
298
  height: '150px',
299
- overflow: 'scroll',
299
+ overflowY: 'scroll',
300
300
  display: 'flex',
301
301
  flexDirection: 'column',
302
302
  gap: '1rem',
@@ -1 +1 @@
1
- {"version":3,"file":"Sheet.d.ts","sourceRoot":"","sources":["../../../src/components/Sheet/Sheet.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAqB,MAAM,OAAO,CAAC;AAE1C,OAAO,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAI1C,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAc3C;;GAEG;AAEH,eAAO,MAAM,SAAS,SAAU,UAAU,cAAc,EAAE,UAAU,CAAC,sFAsEhE,CAAC;AAEN,eAAO,MAAM,WAAW;;;mBAxEQ,UAAU,cAAc,EAAE,UAAU,CAAC;;;;;;;;;;CAqFpE,CAAC"}
1
+ {"version":3,"file":"Sheet.d.ts","sourceRoot":"","sources":["../../../src/components/Sheet/Sheet.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA6B,MAAM,OAAO,CAAC;AAElD,OAAO,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAI1C,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAc3C;;GAEG;AAEH,eAAO,MAAM,SAAS,SAAU,UAAU,cAAc,EAAE,UAAU,CAAC,sFAsEhE,CAAC;AAEN,eAAO,MAAM,WAAW;;;mBAxEQ,UAAU,cAAc,EAAE,UAAU,CAAC;;;;;;;;;;CAqFpE,CAAC"}
@@ -1,4 +1,4 @@
1
- import { ReactNode, HTMLAttributes } from 'react';
1
+ import type { ReactNode, HTMLAttributes } from 'react';
2
2
  export interface SheetProps extends HTMLAttributes<HTMLDivElement> {
3
3
  /**
4
4
  * Состояние шторки, открыта или скрыта
@@ -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,cAAc,EAAE,MAAM,OAAO,CAAC;AAElD,MAAM,WAAW,UAAW,SAAQ,cAAc,CAAC,cAAc,CAAC;IAC9D;;OAEG;IACH,MAAM,EAAE,OAAO,CAAC;IAEhB;;OAEG;IACH,OAAO,EAAE,MAAM,IAAI,CAAC;IAEpB;;OAEG;IACH,aAAa,CAAC,EAAE,SAAS,CAAC;IAE1B;;;;OAIG;IACH,aAAa,CAAC,EAAE,OAAO,CAAC;IAExB;;OAEG;IACH,aAAa,CAAC,EAAE,SAAS,CAAC;IAE1B;;;;OAIG;IACH,aAAa,CAAC,EAAE,OAAO,CAAC;IAExB;;;;OAIG;IACH,SAAS,CAAC,EAAE,OAAO,CAAC;IAEpB;;;;;OAKG;IACH,WAAW,CAAC,EAAE,OAAO,CAAC;IAEtB;;;;OAIG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;IAEnB,QAAQ,CAAC,EAAE,SAAS,CAAC;IAErB;;;;OAIG;IACH,cAAc,CAAC,EAAE,OAAO,CAAC;IAEzB;;OAEG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,IAAI,CAAC,EAAE,MAAM,CAAC;CACjB;AAED,oBAAY,WAAW,GAAG,IAAI,CAAC,UAAU,EAAE,gBAAgB,GAAG,QAAQ,CAAC,CAAC;AAExE,oBAAY,aAAa,GAAG,IAAI,CAAC,UAAU,EAAE,QAAQ,CAAC,CAAC"}
1
+ {"version":3,"file":"Sheet.types.d.ts","sourceRoot":"","sources":["../../../src/components/Sheet/Sheet.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,cAAc,EAAE,MAAM,OAAO,CAAC;AAEvD,MAAM,WAAW,UAAW,SAAQ,cAAc,CA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