@salutejs/plasma-new-hope 0.88.1-canary.1232.9543804742.0 → 0.89.0-canary.1225.9545827287.0
Sign up to get free protection for your applications and to get access to all the features.
- package/cjs/components/Sheet/Sheet.css +8 -0
- package/cjs/components/Sheet/Sheet.js +108 -0
- package/cjs/components/Sheet/Sheet.js.map +1 -0
- package/cjs/components/Sheet/Sheet.styles.js +115 -0
- package/cjs/components/Sheet/Sheet.styles.js.map +1 -0
- package/cjs/components/Sheet/Sheet.styles_o73i75.css +6 -0
- package/cjs/components/Sheet/Sheet.tokens.js +17 -0
- package/cjs/components/Sheet/Sheet.tokens.js.map +1 -0
- package/cjs/components/Sheet/hooks/useOverflow.js +23 -0
- package/cjs/components/Sheet/hooks/useOverflow.js.map +1 -0
- package/cjs/components/Sheet/hooks/useSheetSwipe.js +98 -0
- package/cjs/components/Sheet/hooks/useSheetSwipe.js.map +1 -0
- package/cjs/components/Sheet/utils/handleTransition.js +13 -0
- package/cjs/components/Sheet/utils/handleTransition.js.map +1 -0
- package/cjs/components/Sheet/utils/index.js +8 -0
- package/cjs/components/Sheet/utils/index.js.map +1 -0
- package/cjs/components/Sheet/variations/_view/base.js +9 -0
- package/cjs/components/Sheet/variations/_view/base.js.map +1 -0
- package/cjs/components/Sheet/variations/_view/base_x642ct.css +1 -0
- package/cjs/index.css +7 -0
- package/cjs/index.js +6 -0
- package/cjs/index.js.map +1 -1
- package/es/components/Sheet/Sheet.css +8 -0
- package/es/components/Sheet/Sheet.js +103 -0
- package/es/components/Sheet/Sheet.js.map +1 -0
- package/es/components/Sheet/Sheet.styles.js +106 -0
- package/es/components/Sheet/Sheet.styles.js.map +1 -0
- package/es/components/Sheet/Sheet.styles_o73i75.css +6 -0
- package/es/components/Sheet/Sheet.tokens.js +12 -0
- package/es/components/Sheet/Sheet.tokens.js.map +1 -0
- package/es/components/Sheet/hooks/useOverflow.js +19 -0
- package/es/components/Sheet/hooks/useOverflow.js.map +1 -0
- package/es/components/Sheet/hooks/useSheetSwipe.js +94 -0
- package/es/components/Sheet/hooks/useSheetSwipe.js.map +1 -0
- package/es/components/Sheet/utils/handleTransition.js +9 -0
- package/es/components/Sheet/utils/handleTransition.js.map +1 -0
- package/es/components/Sheet/utils/index.js +4 -0
- package/es/components/Sheet/utils/index.js.map +1 -0
- package/es/components/Sheet/variations/_view/base.js +5 -0
- package/es/components/Sheet/variations/_view/base.js.map +1 -0
- package/es/components/Sheet/variations/_view/base_x642ct.css +1 -0
- package/es/index.css +7 -0
- package/es/index.js +2 -0
- package/es/index.js.map +1 -1
- package/package.json +4 -2
- package/styled-components/cjs/components/Sheet/Sheet.js +108 -0
- package/styled-components/cjs/components/Sheet/Sheet.styles.js +52 -0
- package/styled-components/cjs/components/Sheet/Sheet.template-doc.mdx +143 -0
- package/styled-components/cjs/components/Sheet/Sheet.tokens.js +15 -0
- package/styled-components/cjs/components/Sheet/Sheet.types.js +5 -0
- package/styled-components/cjs/components/Sheet/hooks/index.js +19 -0
- package/styled-components/cjs/components/Sheet/hooks/useOverflow.js +21 -0
- package/styled-components/cjs/components/Sheet/hooks/useSheetSwipe.js +102 -0
- package/styled-components/cjs/components/Sheet/index.js +31 -0
- package/styled-components/cjs/components/Sheet/utils/handleTransition.js +12 -0
- package/styled-components/cjs/components/Sheet/utils/index.js +14 -0
- package/styled-components/cjs/components/Sheet/variations/_view/base.js +8 -0
- package/styled-components/cjs/components/Sheet/variations/_view/tokens.json +6 -0
- package/styled-components/cjs/examples/plasma_b2c/components/Sheet/Sheet.config.js +18 -0
- package/styled-components/cjs/examples/plasma_b2c/components/Sheet/Sheet.js +17 -0
- package/styled-components/cjs/examples/plasma_b2c/components/Sheet/Sheet.stories.tsx +341 -0
- package/styled-components/cjs/examples/plasma_web/components/Sheet/Sheet.config.js +18 -0
- package/styled-components/cjs/examples/plasma_web/components/Sheet/Sheet.js +17 -0
- package/styled-components/cjs/examples/plasma_web/components/Sheet/Sheet.stories.tsx +341 -0
- package/styled-components/cjs/index.js +11 -0
- package/styled-components/es/components/Sheet/Sheet.js +100 -0
- package/styled-components/es/components/Sheet/Sheet.styles.js +45 -0
- package/styled-components/es/components/Sheet/Sheet.template-doc.mdx +143 -0
- package/styled-components/es/components/Sheet/Sheet.tokens.js +9 -0
- package/styled-components/es/components/Sheet/Sheet.types.js +1 -0
- package/styled-components/es/components/Sheet/hooks/index.js +2 -0
- package/styled-components/es/components/Sheet/hooks/useOverflow.js +15 -0
- package/styled-components/es/components/Sheet/hooks/useSheetSwipe.js +95 -0
- package/styled-components/es/components/Sheet/index.js +2 -0
- package/styled-components/es/components/Sheet/utils/handleTransition.js +6 -0
- package/styled-components/es/components/Sheet/utils/index.js +2 -0
- package/styled-components/es/components/Sheet/variations/_view/base.js +2 -0
- package/styled-components/es/components/Sheet/variations/_view/tokens.json +6 -0
- package/styled-components/es/examples/plasma_b2c/components/Sheet/Sheet.config.js +12 -0
- package/styled-components/es/examples/plasma_b2c/components/Sheet/Sheet.js +6 -0
- package/styled-components/es/examples/plasma_b2c/components/Sheet/Sheet.stories.tsx +341 -0
- package/styled-components/es/examples/plasma_web/components/Sheet/Sheet.config.js +12 -0
- package/styled-components/es/examples/plasma_web/components/Sheet/Sheet.js +6 -0
- package/styled-components/es/examples/plasma_web/components/Sheet/Sheet.stories.tsx +341 -0
- package/styled-components/es/index.js +1 -0
- package/types/components/Sheet/Sheet.d.ts +22 -0
- package/types/components/Sheet/Sheet.d.ts.map +1 -0
- package/types/components/Sheet/Sheet.styles.d.ts +16 -0
- package/types/components/Sheet/Sheet.styles.d.ts.map +1 -0
- package/types/components/Sheet/Sheet.tokens.d.ts +10 -0
- package/types/components/Sheet/Sheet.tokens.d.ts.map +1 -0
- package/types/components/Sheet/Sheet.types.d.ts +65 -0
- package/types/components/Sheet/Sheet.types.d.ts.map +1 -0
- package/types/components/Sheet/hooks/index.d.ts +3 -0
- package/types/components/Sheet/hooks/index.d.ts.map +1 -0
- package/types/components/Sheet/hooks/useOverflow.d.ts +3 -0
- package/types/components/Sheet/hooks/useOverflow.d.ts.map +1 -0
- package/types/components/Sheet/hooks/useSheetSwipe.d.ts +9 -0
- package/types/components/Sheet/hooks/useSheetSwipe.d.ts.map +1 -0
- package/types/components/Sheet/index.d.ts +4 -0
- package/types/components/Sheet/index.d.ts.map +1 -0
- package/types/components/Sheet/utils/handleTransition.d.ts +5 -0
- package/types/components/Sheet/utils/handleTransition.d.ts.map +1 -0
- package/types/components/Sheet/utils/index.d.ts +3 -0
- package/types/components/Sheet/utils/index.d.ts.map +1 -0
- package/types/components/Sheet/variations/_view/base.d.ts +2 -0
- package/types/components/Sheet/variations/_view/base.d.ts.map +1 -0
- package/types/examples/plasma_b2c/components/Sheet/Sheet.config.d.ts +11 -0
- package/types/examples/plasma_b2c/components/Sheet/Sheet.config.d.ts.map +1 -0
- package/types/examples/plasma_b2c/components/Sheet/Sheet.d.ts +8 -0
- package/types/examples/plasma_b2c/components/Sheet/Sheet.d.ts.map +1 -0
- package/types/examples/plasma_web/components/Sheet/Sheet.config.d.ts +11 -0
- package/types/examples/plasma_web/components/Sheet/Sheet.config.d.ts.map +1 -0
- package/types/examples/plasma_web/components/Sheet/Sheet.d.ts +8 -0
- package/types/examples/plasma_web/components/Sheet/Sheet.d.ts.map +1 -0
- package/types/index.d.ts +1 -0
- package/types/index.d.ts.map +1 -1
@@ -0,0 +1,8 @@
|
|
1
|
+
.Overlay_styles_cxej3y_s1afr8la__70d4dd9a{position:fixed;inset:0;z-index:var(--s1afr8la-0);--plasma_private-overlay-background-color:var(--s1afr8la-1);--plasma_private-overlay-backdrop-filter:var(--s1afr8la-2);background:var(--s1afr8la-3);-webkit-backdrop-filter:var(--s1afr8la-4);backdrop-filter:var(--s1afr8la-4);cursor:var(--s1afr8la-5);}
|
2
|
+
|
3
|
+
.Sheet_styles_o73i75_sah7qw3__24445093{position:fixed;left:0;bottom:0;width:100%;max-height:100%;z-index:1000;opacity:1;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-flex-direction:column;-ms-flex-direction:column;flex-direction:column;-webkit-box-pack:end;-webkit-justify-content:flex-end;-ms-flex-pack:end;justify-content:flex-end;-webkit-transition:var(--sah7qw3-0);transition:var(--sah7qw3-0);}.Sheet_styles_o73i75_sah7qw3__24445093.Sheet_styles_o73i75_closed__24445093{opacity:0;visibility:hidden;-webkit-transform:translateY(100%);-ms-transform:translateY(100%);transform:translateY(100%);}
|
4
|
+
.Sheet_styles_o73i75_shg69gz__24445093{width:3rem;padding:1.75rem 0;margin:-1.375rem 0;opacity:0.65;-webkit-align-self:center;-ms-flex-item-align:center;align-self:center;}.Sheet_styles_o73i75_shg69gz__24445093::before{content:'';display:block;border-radius:0.625rem;background-color:var(--plasma-sheet-handle-background-color);height:0.25rem;}
|
5
|
+
.Sheet_styles_o73i75_s1cdpbaw__24445093{border-radius:1.25rem 1.25rem 0 0;background-color:var(--plasma-sheet-content-background-color);padding-left:1rem;padding-right:1rem;padding-top:var(--s1cdpbaw-0);padding-bottom:var(--s1cdpbaw-1);max-height:100%;overflow:auto;overscroll-behavior:contain;}.Sheet_styles_o73i75_s1cdpbaw__24445093::-webkit-scrollbar{display:none;}
|
6
|
+
.Sheet_styles_o73i75_sjx120m__24445093{width:100%;z-index:1;padding-top:1rem;position:var(--sjx120m-0);top:var(--sjx120m-1);background-color:var(--sjx120m-2);}
|
7
|
+
|
8
|
+
.Sheet_styles_o73i75_sqp1ccu__24445093{width:100%;z-index:1;padding-bottom:1rem;position:var(--sqp1ccu-0);bottom:var(--sqp1ccu-1);background-color:var(--sqp1ccu-2);}
|
@@ -0,0 +1,108 @@
|
|
1
|
+
'use strict';
|
2
|
+
|
3
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
4
|
+
|
5
|
+
var _rollupPluginBabelHelpers = require('../../_virtual/_rollupPluginBabelHelpers.js');
|
6
|
+
var React = require('react');
|
7
|
+
var Overlay = require('../Overlay/Overlay.js');
|
8
|
+
var index = require('../../utils/index.js');
|
9
|
+
var useSheetSwipe = require('./hooks/useSheetSwipe.js');
|
10
|
+
var useOverflow = require('./hooks/useOverflow.js');
|
11
|
+
var Sheet_tokens = require('./Sheet.tokens.js');
|
12
|
+
var Sheet_styles = require('./Sheet.styles.js');
|
13
|
+
var base = require('./variations/_view/base.js');
|
14
|
+
var index$1 = require('./utils/index.js');
|
15
|
+
|
16
|
+
var _excluded = ["opened", "children", "onClose", "hasHandle", "contentHeader", "isHeaderFixed", "contentFooter", "isFooterFixed", "withOverlay", "withBlur", "withTransition", "throttleMs", "className", "view"];
|
17
|
+
|
18
|
+
/**
|
19
|
+
* Открывает окно-шторку поверх основного экрана.
|
20
|
+
*/
|
21
|
+
|
22
|
+
var sheetRoot = function sheetRoot(Root) {
|
23
|
+
return /*#__PURE__*/React.forwardRef(function (_ref, rootRef) {
|
24
|
+
var opened = _ref.opened,
|
25
|
+
children = _ref.children,
|
26
|
+
onClose = _ref.onClose,
|
27
|
+
_ref$hasHandle = _ref.hasHandle,
|
28
|
+
hasHandle = _ref$hasHandle === void 0 ? true : _ref$hasHandle,
|
29
|
+
contentHeader = _ref.contentHeader,
|
30
|
+
_ref$isHeaderFixed = _ref.isHeaderFixed,
|
31
|
+
isHeaderFixed = _ref$isHeaderFixed === void 0 ? false : _ref$isHeaderFixed,
|
32
|
+
contentFooter = _ref.contentFooter,
|
33
|
+
_ref$isFooterFixed = _ref.isFooterFixed,
|
34
|
+
isFooterFixed = _ref$isFooterFixed === void 0 ? false : _ref$isFooterFixed,
|
35
|
+
_ref$withOverlay = _ref.withOverlay,
|
36
|
+
withOverlay = _ref$withOverlay === void 0 ? true : _ref$withOverlay,
|
37
|
+
_ref$withBlur = _ref.withBlur,
|
38
|
+
withBlur = _ref$withBlur === void 0 ? false : _ref$withBlur,
|
39
|
+
_ref$withTransition = _ref.withTransition,
|
40
|
+
withTransition = _ref$withTransition === void 0 ? true : _ref$withTransition,
|
41
|
+
throttleMs = _ref.throttleMs,
|
42
|
+
className = _ref.className,
|
43
|
+
view = _ref.view,
|
44
|
+
restProps = _rollupPluginBabelHelpers.objectWithoutProperties(_ref, _excluded);
|
45
|
+
var contentWrapperRef = React.useRef(null);
|
46
|
+
var contentRef = React.useRef(null);
|
47
|
+
var handleRef = React.useRef(null);
|
48
|
+
useOverflow.useOverflow({
|
49
|
+
opened: opened
|
50
|
+
});
|
51
|
+
useSheetSwipe.useSheetSwipe({
|
52
|
+
contentWrapperRef: contentWrapperRef,
|
53
|
+
contentRef: contentRef,
|
54
|
+
handleRef: handleRef,
|
55
|
+
throttleMs: throttleMs,
|
56
|
+
onClose: onClose
|
57
|
+
});
|
58
|
+
var hasHeader = Boolean(contentHeader);
|
59
|
+
var hasFooter = Boolean(contentFooter);
|
60
|
+
var closedClass = opened ? undefined : "".concat(Sheet_tokens.classes.closed);
|
61
|
+
var overlayBackgroundToken = withBlur ? "var(".concat(Sheet_tokens.tokens.sheetOverlayWithBlurColor, ")") : "var(".concat(Sheet_tokens.tokens.sheetOverlayColor, ")");
|
62
|
+
return /*#__PURE__*/React.createElement(Root, {
|
63
|
+
opened: opened,
|
64
|
+
onClose: onClose,
|
65
|
+
view: view,
|
66
|
+
ref: rootRef
|
67
|
+
}, /*#__PURE__*/React.createElement(Sheet_styles.StyledContentWrapper, _rollupPluginBabelHelpers.extends({
|
68
|
+
opened: opened,
|
69
|
+
withTransition: withTransition,
|
70
|
+
className: index.cx(closedClass, className),
|
71
|
+
ref: contentWrapperRef
|
72
|
+
}, restProps), hasHandle && /*#__PURE__*/React.createElement(Sheet_styles.StyledSheetHandle, {
|
73
|
+
ref: handleRef
|
74
|
+
}), /*#__PURE__*/React.createElement(Sheet_styles.StyledSheetContent, {
|
75
|
+
hasHeader: hasHeader,
|
76
|
+
hasFooter: hasFooter,
|
77
|
+
ref: contentRef
|
78
|
+
}, hasHeader && /*#__PURE__*/React.createElement(Sheet_styles.StyledSheetHeader, {
|
79
|
+
isHeaderFixed: isHeaderFixed
|
80
|
+
}, contentHeader), /*#__PURE__*/React.createElement(Sheet_styles.StyledSheetBody, null, children), hasFooter && /*#__PURE__*/React.createElement(Sheet_styles.StyledSheetFooter, {
|
81
|
+
isFooterFixed: isFooterFixed
|
82
|
+
}, contentFooter))), withOverlay && opened && /*#__PURE__*/React.createElement(Overlay.Overlay, {
|
83
|
+
zIndex: index$1.DEFAULT_Z_INDEX,
|
84
|
+
backgroundColorProperty: overlayBackgroundToken,
|
85
|
+
withBlur: withBlur,
|
86
|
+
isClickable: true,
|
87
|
+
onOverlayClick: onClose
|
88
|
+
}));
|
89
|
+
});
|
90
|
+
};
|
91
|
+
var sheetConfig = {
|
92
|
+
name: 'Sheet',
|
93
|
+
tag: 'div',
|
94
|
+
layout: sheetRoot,
|
95
|
+
base: '',
|
96
|
+
variations: {
|
97
|
+
view: {
|
98
|
+
css: base.base
|
99
|
+
}
|
100
|
+
},
|
101
|
+
defaults: {
|
102
|
+
view: 'default'
|
103
|
+
}
|
104
|
+
};
|
105
|
+
|
106
|
+
exports.sheetConfig = sheetConfig;
|
107
|
+
exports.sheetRoot = sheetRoot;
|
108
|
+
//# sourceMappingURL=Sheet.js.map
|
@@ -0,0 +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,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,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;AA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AAAkB,aAAA,CAACS,8BAAiB,EAAA;AAACzC,MAAAA,aAAa,EAAEA,aAAAA;AAAc,KAAA,EAAEF,aAAiC,CAEvE,CACF,CAAC,EACtBI,WAAW,IAAIZ,MAAM,iBAClBwB,KAAA,CAAAkB,aAAA,CAACU,eAAO,EAAA;AACJC,MAAAA,MAAM,EAAEC,uBAAgB;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,SAAAA;AACT,KAAA;GACH;AACDC,EAAAA,QAAQ,EAAE;AACN/C,IAAAA,IAAI,EAAE,SAAA;AACV,GAAA;AACJ;;;;;"}
|
@@ -0,0 +1,115 @@
|
|
1
|
+
import './Sheet.styles_o73i75.css';
|
2
|
+
'use strict';
|
3
|
+
|
4
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
5
|
+
|
6
|
+
var react = require('@linaria/react');
|
7
|
+
var Sheet_tokens = require('./Sheet.tokens.js');
|
8
|
+
var handleTransition = require('./utils/handleTransition.js');
|
9
|
+
|
10
|
+
var _exp = function _exp() {
|
11
|
+
return handleTransition.handleTransition('all 0.5s 0.1s');
|
12
|
+
};
|
13
|
+
var StyledContentWrapper = /*#__PURE__*/react.styled('div')({
|
14
|
+
name: "StyledContentWrapper",
|
15
|
+
"class": "sah7qw3",
|
16
|
+
propsAsIs: false,
|
17
|
+
vars: {
|
18
|
+
"sah7qw3-0": [/*#__PURE__*/_exp()]
|
19
|
+
}
|
20
|
+
});
|
21
|
+
var StyledSheetHandle = /*#__PURE__*/react.styled('div')({
|
22
|
+
name: "StyledSheetHandle",
|
23
|
+
"class": "shg69gz",
|
24
|
+
propsAsIs: false
|
25
|
+
});
|
26
|
+
var _exp5 = function _exp5() {
|
27
|
+
return function (_ref) {
|
28
|
+
var hasHeader = _ref.hasHeader;
|
29
|
+
return hasHeader ? 'unset' : '1rem';
|
30
|
+
};
|
31
|
+
};
|
32
|
+
var _exp6 = function _exp6() {
|
33
|
+
return function (_ref2) {
|
34
|
+
var hasFooter = _ref2.hasFooter;
|
35
|
+
return hasFooter ? 'unset' : '1rem';
|
36
|
+
};
|
37
|
+
};
|
38
|
+
var StyledSheetContent = /*#__PURE__*/react.styled('div')({
|
39
|
+
name: "StyledSheetContent",
|
40
|
+
"class": "s1cdpbaw",
|
41
|
+
propsAsIs: false,
|
42
|
+
vars: {
|
43
|
+
"s1cdpbaw-0": [/*#__PURE__*/_exp5()],
|
44
|
+
"s1cdpbaw-1": [/*#__PURE__*/_exp6()]
|
45
|
+
}
|
46
|
+
});
|
47
|
+
var _exp7 = function _exp7() {
|
48
|
+
return function (_ref3) {
|
49
|
+
var isHeaderFixed = _ref3.isHeaderFixed;
|
50
|
+
return isHeaderFixed ? 'sticky' : 'static';
|
51
|
+
};
|
52
|
+
};
|
53
|
+
var _exp8 = function _exp8() {
|
54
|
+
return function (_ref4) {
|
55
|
+
var isHeaderFixed = _ref4.isHeaderFixed;
|
56
|
+
return isHeaderFixed ? '0' : 'unset';
|
57
|
+
};
|
58
|
+
};
|
59
|
+
var _exp9 = function _exp9() {
|
60
|
+
return function (_ref5) {
|
61
|
+
var isHeaderFixed = _ref5.isHeaderFixed;
|
62
|
+
return isHeaderFixed ? "var(".concat(Sheet_tokens.tokens.contentBackgroundColor, ")") : 'transparent';
|
63
|
+
};
|
64
|
+
};
|
65
|
+
var StyledSheetHeader = /*#__PURE__*/react.styled('div')({
|
66
|
+
name: "StyledSheetHeader",
|
67
|
+
"class": "sjx120m",
|
68
|
+
propsAsIs: false,
|
69
|
+
vars: {
|
70
|
+
"sjx120m-0": [/*#__PURE__*/_exp7()],
|
71
|
+
"sjx120m-1": [/*#__PURE__*/_exp8()],
|
72
|
+
"sjx120m-2": [/*#__PURE__*/_exp9()]
|
73
|
+
}
|
74
|
+
});
|
75
|
+
var StyledSheetBody = /*#__PURE__*/react.styled('div')({
|
76
|
+
name: "StyledSheetBody",
|
77
|
+
"class": "s1f8rwx6",
|
78
|
+
propsAsIs: false
|
79
|
+
});
|
80
|
+
var _exp10 = function _exp10() {
|
81
|
+
return function (_ref6) {
|
82
|
+
var isFooterFixed = _ref6.isFooterFixed;
|
83
|
+
return isFooterFixed ? 'sticky' : 'static';
|
84
|
+
};
|
85
|
+
};
|
86
|
+
var _exp11 = function _exp11() {
|
87
|
+
return function (_ref7) {
|
88
|
+
var isFooterFixed = _ref7.isFooterFixed;
|
89
|
+
return isFooterFixed ? '0' : 'unset';
|
90
|
+
};
|
91
|
+
};
|
92
|
+
var _exp12 = function _exp12() {
|
93
|
+
return function (_ref8) {
|
94
|
+
var isFooterFixed = _ref8.isFooterFixed;
|
95
|
+
return isFooterFixed ? "var(".concat(Sheet_tokens.tokens.contentBackgroundColor, ")") : 'transparent';
|
96
|
+
};
|
97
|
+
};
|
98
|
+
var StyledSheetFooter = /*#__PURE__*/react.styled('div')({
|
99
|
+
name: "StyledSheetFooter",
|
100
|
+
"class": "sqp1ccu",
|
101
|
+
propsAsIs: false,
|
102
|
+
vars: {
|
103
|
+
"sqp1ccu-0": [/*#__PURE__*/_exp10()],
|
104
|
+
"sqp1ccu-1": [/*#__PURE__*/_exp11()],
|
105
|
+
"sqp1ccu-2": [/*#__PURE__*/_exp12()]
|
106
|
+
}
|
107
|
+
});
|
108
|
+
|
109
|
+
exports.StyledContentWrapper = StyledContentWrapper;
|
110
|
+
exports.StyledSheetBody = StyledSheetBody;
|
111
|
+
exports.StyledSheetContent = StyledSheetContent;
|
112
|
+
exports.StyledSheetFooter = StyledSheetFooter;
|
113
|
+
exports.StyledSheetHandle = StyledSheetHandle;
|
114
|
+
exports.StyledSheetHeader = StyledSheetHeader;
|
115
|
+
//# sourceMappingURL=Sheet.styles.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"Sheet.styles.js","sources":["../../../src/components/Sheet/Sheet.styles.ts"],"sourcesContent":["import { styled } from '@linaria/react';\n\nimport { tokens, classes } from './Sheet.tokens';\nimport { CommonProps } from './Sheet.types';\nimport { handleTransition } from './utils/handleTransition';\n\nexport const StyledContentWrapper = styled.div<CommonProps>`\n position: fixed;\n left: 0;\n bottom: 0;\n width: 100%;\n max-height: 100%;\n z-index: 1000;\n opacity: 1;\n\n display: flex;\n flex-direction: column;\n justify-content: flex-end;\n\n transition: ${handleTransition('all 0.5s 0.1s')};\n\n &.${String(classes.closed)} {\n opacity: 0;\n visibility: hidden;\n transform: translateY(100%);\n }\n`;\n\nexport const StyledSheetHandle = styled.div`\n width: 3rem;\n padding: 1.75rem 0;\n margin: -1.375rem 0;\n opacity: 0.65;\n align-self: center;\n\n &::before {\n content: '';\n display: block;\n border-radius: 0.625rem;\n background-color: var(${tokens.handleBackgroundColor});\n height: 0.25rem;\n }\n`;\n\nexport const StyledSheetContent = styled.div<{ hasHeader?: boolean; hasFooter?: boolean }>`\n border-radius: 1.25rem 1.25rem 0 0;\n background-color: var(${tokens.contentBackgroundColor});\n padding-left: 1rem;\n padding-right: 1rem;\n padding-top: ${({ hasHeader }) => (hasHeader ? 'unset' : '1rem')};\n padding-bottom: ${({ hasFooter }) => (hasFooter ? 'unset' : '1rem')};\n\n max-height: 100%;\n overflow: auto;\n overscroll-behavior: contain;\n\n &::-webkit-scrollbar {\n display: none;\n }\n`;\n\nexport const StyledSheetHeader = styled.div<{ isHeaderFixed?: boolean }>`\n width: 100%;\n z-index: 1;\n padding-top: 1rem;\n position: ${({ isHeaderFixed }) => (isHeaderFixed ? 'sticky' : 'static')};\n top: ${({ isHeaderFixed }) => (isHeaderFixed ? '0' : 'unset')};\n background-color: ${({ isHeaderFixed }) =>\n isHeaderFixed ? `var(${tokens.contentBackgroundColor})` : 'transparent'};\n`;\n\nexport const StyledSheetBody = styled.div``;\n\nexport const StyledSheetFooter = styled.div<{ isFooterFixed?: boolean }>`\n width: 100%;\n z-index: 1;\n padding-bottom: 1rem;\n position: ${({ isFooterFixed }) => (isFooterFixed ? 'sticky' : 'static')};\n bottom: ${({ isFooterFixed }) => (isFooterFixed ? '0' : 'unset')};\n background-color: ${({ isFooterFixed }) =>\n isFooterFixed ? `var(${tokens.contentBackgroundColor})` : 'transparent'};\n`;\n"],"names":["_exp","handleTransition","StyledContentWrapper","styled","name","class","propsAsIs","vars","StyledSheetHandle","_exp5","_ref","hasHeader","_exp6","_ref2","hasFooter","StyledSheetContent","_exp7","_ref3","isHeaderFixed","_exp8","_ref4","_exp9","_ref5","concat","tokens","contentBackgroundColor","StyledSheetHeader","StyledSheetBody","_exp10","_ref6","isFooterFixed","_exp11","_ref7","_exp12","_ref8","StyledSheetFooter"],"mappings":";;;;;;;;AAI4D,IAAAA,IAAA,GAH1CA,SAG0CA,IAAAA,GAAA;EAAA,OAe1CC,iCAAgB,CAAC,eAAe,CAAC,CAAA;AAAA,CAAA,CAAA;AAb5C,IAAMC,oBAAoB,gBAAGC,YAAM,CAAA,KAAA,CAAA,CAAA;AAAAC,EAAAA,IAAA,EAAA,sBAAA;AAAAC,EAAAA,OAAAA,EAAA,SAAA;AAAAC,EAAAA,SAAA,EAAA,KAAA;AAAAC,EAAAA,IAAA,EAAA;AAAA,IAAA,WAAA,EAAA,cAaxBP,IAAiC,EAAA,CAAA;AAAA,GAAA;AAAA,CAOlD,EAAA;AAEM,IAAMQ,iBAAiB,gBAAGL,YAAM,CAAA,KAAA,CAAA,CAAA;AAAAC,EAAAA,IAAA,EAAA,mBAAA;AAAAC,EAAAA,OAAAA,EAAA,SAAA;AAA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MAAAA,GAAA;AAAA,EAAA,OAC9D,UAAAC,KAAA,EAAA;AAAA,IAAA,IAAGF,aAAAA,GAAAA,KAAAA,CAAAA,aAAAA,CAAAA;AAAAA,IAAAA,OAAqBA,aAAa,GAAG,GAAG,GAAG,OAAQ,CAAA;AAAA,GAAA,CAAA;AAAA,CAAA,CAAA;AAAA,IAAAG,MAAA,GA7ElDA,SA6EkDA,MAAAA,GAAA;AAAA,EAAA,OAC5C,UAAAC,KAAA,EAAA;AAAA,IAAA,IAAGJ,aAAAA,GAAAA,KAAAA,CAAAA,aAAAA,CAAAA;IAAAA,OACnBA,aAAa,UAAAP,MAAA,CAAUC,mBAAM,CAACC,sBAAuB,SAAK,aAAa,CAAA;AAAA,GAAA,CAAA;AAAA,CAAA,CAAA;AAPxE,IAAMU,iBAAiB,gBAAGhC,YAAM,CAAA,KAAA,CAAA,CAAA;AAAAC,EAAAA,IAAA,EAAA,mBAAA;AAAAC,EAAAA,OAAAA,EAAA,SAAA;AAAAC,EAAAA,SAAA,EAAA,KAAA;AAAAC,EAAAA,IAAA,EAAA;AAAA,IAAA,WAAA,EAAA,cAIvBqB,MAA4D,EAAA,CAAA;AAAA,IAAA,WAAA,EAAA,cAC9DG,MAAsD,EAAA,CAAA;AAAA,IAAA,WAAA,EAAA,cAC5CE,MACuD,EAAA,CAAA;AAAA,GAAA;AAAA,CAC9E;;;;;;;;;"}
|
@@ -0,0 +1,6 @@
|
|
1
|
+
.sah7qw3{position:fixed;left:0;bottom:0;width:100%;max-height:100%;z-index:1000;opacity:1;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-flex-direction:column;-ms-flex-direction:column;flex-direction:column;-webkit-box-pack:end;-webkit-justify-content:flex-end;-ms-flex-pack:end;justify-content:flex-end;-webkit-transition:var(--sah7qw3-0);transition:var(--sah7qw3-0);}.sah7qw3.closed{opacity:0;visibility:hidden;-webkit-transform:translateY(100%);-ms-transform:translateY(100%);transform:translateY(100%);}
|
2
|
+
.shg69gz{width:3rem;padding:1.75rem 0;margin:-1.375rem 0;opacity:0.65;-webkit-align-self:center;-ms-flex-item-align:center;align-self:center;}.shg69gz::before{content:'';display:block;border-radius:0.625rem;background-color:var(--plasma-sheet-handle-background-color);height:0.25rem;}
|
3
|
+
.s1cdpbaw{border-radius:1.25rem 1.25rem 0 0;background-color:var(--plasma-sheet-content-background-color);padding-left:1rem;padding-right:1rem;padding-top:var(--s1cdpbaw-0);padding-bottom:var(--s1cdpbaw-1);max-height:100%;overflow:auto;overscroll-behavior:contain;}.s1cdpbaw::-webkit-scrollbar{display:none;}
|
4
|
+
.sjx120m{width:100%;z-index:1;padding-top:1rem;position:var(--sjx120m-0);top:var(--sjx120m-1);background-color:var(--sjx120m-2);}
|
5
|
+
|
6
|
+
.sqp1ccu{width:100%;z-index:1;padding-bottom:1rem;position:var(--sqp1ccu-0);bottom:var(--sqp1ccu-1);background-color:var(--sqp1ccu-2);}
|
@@ -0,0 +1,17 @@
|
|
1
|
+
'use strict';
|
2
|
+
|
3
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
4
|
+
|
5
|
+
var classes = {
|
6
|
+
closed: 'closed'
|
7
|
+
};
|
8
|
+
var tokens = {
|
9
|
+
sheetOverlayColor: '--plasma-sheet-overlay-color',
|
10
|
+
sheetOverlayWithBlurColor: '--plasma-sheet-overlay-with-blur-color',
|
11
|
+
contentBackgroundColor: '--plasma-sheet-content-background-color',
|
12
|
+
handleBackgroundColor: '--plasma-sheet-handle-background-color'
|
13
|
+
};
|
14
|
+
|
15
|
+
exports.classes = classes;
|
16
|
+
exports.tokens = tokens;
|
17
|
+
//# sourceMappingURL=Sheet.tokens.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"Sheet.tokens.js","sources":["../../../src/components/Sheet/Sheet.tokens.ts"],"sourcesContent":["export const classes = {\n closed: 'closed',\n};\n\nexport const tokens = {\n sheetOverlayColor: '--plasma-sheet-overlay-color',\n sheetOverlayWithBlurColor: '--plasma-sheet-overlay-with-blur-color',\n contentBackgroundColor: '--plasma-sheet-content-background-color',\n handleBackgroundColor: '--plasma-sheet-handle-background-color',\n};\n"],"names":["classes","closed","tokens","sheetOverlayColor","sheetOverlayWithBlurColor","contentBackgroundColor","handleBackgroundColor"],"mappings":";;;;AAAO,IAAMA,OAAO,GAAG;AACnBC,EAAAA,MAAM,EAAE,QAAA;AACZ,EAAC;AAEM,IAAMC,MAAM,GAAG;AAClBC,EAAAA,iBAAiB,EAAE,8BAA8B;AACjDC,EAAAA,yBAAyB,EAAE,wCAAwC;AACnEC,EAAAA,sBAAsB,EAAE,yCAAyC;AACjEC,EAAAA,qBAAqB,EAAE,wCAAA;AAC3B;;;;;"}
|
@@ -0,0 +1,23 @@
|
|
1
|
+
'use strict';
|
2
|
+
|
3
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
4
|
+
|
5
|
+
var React = require('react');
|
6
|
+
|
7
|
+
var useOverflow = function useOverflow(_ref) {
|
8
|
+
var opened = _ref.opened;
|
9
|
+
var overflow = React.useRef(document.body.style.overflowY);
|
10
|
+
|
11
|
+
// linaria не поддерживает динамический global
|
12
|
+
React.useEffect(function () {
|
13
|
+
if (opened) {
|
14
|
+
overflow.current = document.body.style.overflowY;
|
15
|
+
document.body.style.overflowY = 'hidden';
|
16
|
+
return;
|
17
|
+
}
|
18
|
+
document.body.style.overflowY = overflow.current;
|
19
|
+
}, [opened]);
|
20
|
+
};
|
21
|
+
|
22
|
+
exports.useOverflow = useOverflow;
|
23
|
+
//# sourceMappingURL=useOverflow.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"useOverflow.js","sources":["../../../../src/components/Sheet/hooks/useOverflow.ts"],"sourcesContent":["import { useEffect, useRef } from 'react';\n\nimport { SheetHookArgs } from '../Sheet.types';\n\nexport const useOverflow = ({ opened }: SheetHookArgs) => {\n const overflow = useRef<string>(document.body.style.overflowY);\n\n // linaria не поддерживает динамический global\n useEffect(() => {\n if (opened) {\n overflow.current = document.body.style.overflowY;\n document.body.style.overflowY = 'hidden';\n return;\n }\n\n document.body.style.overflowY = overflow.current;\n }, [opened]);\n};\n"],"names":["useOverflow","_ref","opened","overflow","useRef","document","body","style","overflowY","useEffect","current"],"mappings":";;;;;;IAIaA,WAAW,GAAG,SAAdA,WAAWA,CAAAC,IAAA,EAAkC;AAAA,EAAA,IAA5BC,MAAM,GAAAD,IAAA,CAANC,MAAM,CAAA;EAChC,IAAMC,QAAQ,GAAGC,YAAM,CAASC,QAAQ,CAACC,IAAI,CAACC,KAAK,CAACC,SAAS,CAAC,CAAA;;AAE9D;AACAC,EAAAA,eAAS,CAAC,YAAM;AACZ,IAAA,IAAIP,MAAM,EAAE;MACRC,QAAQ,CAACO,OAAO,GAAGL,QAAQ,CAACC,IAAI,CAACC,KAAK,CAACC,SAAS,CAAA;AAChDH,MAAAA,QAAQ,CAACC,IAAI,CAACC,KAAK,CAACC,SAAS,GAAG,QAAQ,CAAA;AACxC,MAAA,OAAA;AACJ,KAAA;IAEAH,QAAQ,CAACC,IAAI,CAACC,KAAK,CAACC,SAAS,GAAGL,QAAQ,CAACO,OAAO,CAAA;AACpD,GAAC,EAAE,CAACR,MAAM,CAAC,CAAC,CAAA;AAChB;;;;"}
|
@@ -0,0 +1,98 @@
|
|
1
|
+
'use strict';
|
2
|
+
|
3
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
4
|
+
|
5
|
+
var _rollupPluginBabelHelpers = require('../../../_virtual/_rollupPluginBabelHelpers.js');
|
6
|
+
var throttle = require('lodash.throttle');
|
7
|
+
var React = require('react');
|
8
|
+
|
9
|
+
var SWIPE_THRESHOLD = 0.2;
|
10
|
+
var THROTTLE_DEFAULT_MS = 0;
|
11
|
+
var isScrollable = function isScrollable(element) {
|
12
|
+
if (!element) {
|
13
|
+
return false;
|
14
|
+
}
|
15
|
+
var style = getComputedStyle(element);
|
16
|
+
return style.overflow === 'scroll' || style.overflow === 'auto' || style.overflowY === 'scroll' || style.overflowY === 'auto';
|
17
|
+
};
|
18
|
+
var useSheetSwipe = function useSheetSwipe(args) {
|
19
|
+
var contentWrapperRef = args.contentWrapperRef,
|
20
|
+
contentRef = args.contentRef,
|
21
|
+
handleRef = args.handleRef,
|
22
|
+
onClose = args.onClose,
|
23
|
+
_args$throttleMs = args.throttleMs,
|
24
|
+
throttleMs = _args$throttleMs === void 0 ? THROTTLE_DEFAULT_MS : _args$throttleMs;
|
25
|
+
var _useState = React.useState(true),
|
26
|
+
_useState2 = _rollupPluginBabelHelpers.slicedToArray(_useState, 2),
|
27
|
+
isTopScroll = _useState2[0],
|
28
|
+
setIsTopScroll = _useState2[1];
|
29
|
+
var isOverscroll = React.useRef(false);
|
30
|
+
var startY = React.useRef(0);
|
31
|
+
var currentY = React.useRef(0);
|
32
|
+
React.useEffect(function () {
|
33
|
+
var contentWrapperEl = contentWrapperRef.current;
|
34
|
+
var handleEl = handleRef.current;
|
35
|
+
var contentEl = contentRef.current;
|
36
|
+
var triggerElement = !isTopScroll ? handleEl : contentWrapperEl;
|
37
|
+
if (!triggerElement || !contentEl || !contentWrapperEl) {
|
38
|
+
return;
|
39
|
+
}
|
40
|
+
var nodes = Array.from(contentWrapperEl.querySelectorAll('*'));
|
41
|
+
var scrollableElements = nodes.filter(isScrollable);
|
42
|
+
contentWrapperEl.style.willChange = 'transform';
|
43
|
+
var onTouchStart = function onTouchStart(event) {
|
44
|
+
isOverscroll.current = false;
|
45
|
+
startY.current = event.changedTouches[0].clientY;
|
46
|
+
currentY.current = startY.current;
|
47
|
+
contentWrapperEl.style.transition = 'none';
|
48
|
+
};
|
49
|
+
var onTouchMove = function onTouchMove(event) {
|
50
|
+
var clientY = event.changedTouches[0].clientY;
|
51
|
+
currentY.current = Math.max(startY.current, clientY);
|
52
|
+
var offsetY = currentY.current - startY.current;
|
53
|
+
if (isOverscroll.current) {
|
54
|
+
startY.current = Infinity;
|
55
|
+
return;
|
56
|
+
}
|
57
|
+
if (offsetY !== 0 && event.cancelable) {
|
58
|
+
event.preventDefault();
|
59
|
+
}
|
60
|
+
contentWrapperEl.style.transform = "translateY(".concat(offsetY, "px)");
|
61
|
+
};
|
62
|
+
var onTouchEnd = function onTouchEnd(event) {
|
63
|
+
isOverscroll.current = false;
|
64
|
+
var curtainHeight = contentWrapperEl.offsetHeight;
|
65
|
+
var endY = event.changedTouches[0].clientY;
|
66
|
+
var offsetY = endY - startY.current;
|
67
|
+
contentWrapperEl.style.transform = '';
|
68
|
+
contentWrapperEl.style.transition = '';
|
69
|
+
if (offsetY / curtainHeight > SWIPE_THRESHOLD) {
|
70
|
+
onClose();
|
71
|
+
}
|
72
|
+
};
|
73
|
+
var onScroll = throttle(function (event) {
|
74
|
+
var onTop = event.target.scrollTop <= 0;
|
75
|
+
if (!onTop) {
|
76
|
+
isOverscroll.current = true;
|
77
|
+
}
|
78
|
+
setIsTopScroll(onTop);
|
79
|
+
}, throttleMs);
|
80
|
+
triggerElement.addEventListener('touchstart', onTouchStart);
|
81
|
+
triggerElement.addEventListener('touchmove', onTouchMove);
|
82
|
+
triggerElement.addEventListener('touchend', onTouchEnd);
|
83
|
+
scrollableElements.forEach(function (element) {
|
84
|
+
element.addEventListener('scroll', onScroll);
|
85
|
+
});
|
86
|
+
return function () {
|
87
|
+
triggerElement.removeEventListener('touchstart', onTouchStart);
|
88
|
+
triggerElement.removeEventListener('touchmove', onTouchMove);
|
89
|
+
triggerElement.removeEventListener('touchend', onTouchEnd);
|
90
|
+
scrollableElements.forEach(function (element) {
|
91
|
+
element.removeEventListener('scroll', onScroll);
|
92
|
+
});
|
93
|
+
};
|
94
|
+
}, [isTopScroll]);
|
95
|
+
};
|
96
|
+
|
97
|
+
exports.useSheetSwipe = useSheetSwipe;
|
98
|
+
//# sourceMappingURL=useSheetSwipe.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"useSheetSwipe.js","sources":["../../../../src/components/Sheet/hooks/useSheetSwipe.ts"],"sourcesContent":["import throttle from 'lodash.throttle';\nimport { useEffect, useRef, useState, RefObject } from 'react';\n\nconst SWIPE_THRESHOLD = 0.2;\nconst THROTTLE_DEFAULT_MS = 0;\n\nconst isScrollable = (element: HTMLElement | null) => {\n if (!element) {\n return false;\n }\n\n const style = getComputedStyle(element);\n\n return (\n style.overflow === 'scroll' ||\n style.overflow === 'auto' ||\n style.overflowY === 'scroll' ||\n style.overflowY === 'auto'\n );\n};\n\nexport const useSheetSwipe = (args: {\n contentWrapperRef: RefObject<HTMLDivElement>;\n contentRef: RefObject<HTMLDivElement>;\n handleRef: RefObject<HTMLDivElement>;\n throttleMs?: number;\n onClose: () => void;\n}) => {\n const { contentWrapperRef, contentRef, handleRef, onClose, throttleMs = THROTTLE_DEFAULT_MS } = args;\n const [isTopScroll, setIsTopScroll] = useState(true);\n const isOverscroll = useRef(false);\n const startY = useRef(0);\n const currentY = useRef(0);\n\n useEffect(() => {\n const contentWrapperEl = contentWrapperRef.current;\n const handleEl = handleRef.current;\n const contentEl = contentRef.current;\n\n const triggerElement = !isTopScroll ? handleEl : contentWrapperEl;\n\n if (!triggerElement || !contentEl || !contentWrapperEl) {\n return;\n }\n\n const nodes = Array.from<HTMLElement>(contentWrapperEl.querySelectorAll('*'));\n const scrollableElements = nodes.filter(isScrollable);\n\n contentWrapperEl.style.willChange = 'transform';\n\n const onTouchStart = (event: TouchEvent) => {\n isOverscroll.current = false;\n\n startY.current = event.changedTouches[0].clientY;\n currentY.current = startY.current;\n\n contentWrapperEl.style.transition = 'none';\n };\n\n const onTouchMove = (event: TouchEvent) => {\n const { clientY } = event.changedTouches[0];\n currentY.current = Math.max(startY.current, clientY);\n const offsetY = currentY.current - startY.current;\n\n if (isOverscroll.current) {\n startY.current = Infinity;\n return;\n }\n\n if (offsetY !== 0 && event.cancelable) {\n event.preventDefault();\n }\n\n contentWrapperEl.style.transform = `translateY(${offsetY}px)`;\n };\n\n const onTouchEnd = (event: TouchEvent) => {\n isOverscroll.current = false;\n\n const curtainHeight = contentWrapperEl.offsetHeight;\n const endY = event.changedTouches[0].clientY;\n const offsetY = endY - startY.current;\n\n contentWrapperEl.style.transform = '';\n contentWrapperEl.style.transition = '';\n\n if (offsetY / curtainHeight > SWIPE_THRESHOLD) {\n onClose();\n }\n };\n\n const onScroll = throttle((event: Event) => {\n const onTop = (event.target as HTMLElement).scrollTop <= 0;\n\n if (!onTop) {\n isOverscroll.current = true;\n }\n\n setIsTopScroll(onTop);\n }, throttleMs);\n\n triggerElement.addEventListener('touchstart', onTouchStart);\n triggerElement.addEventListener('touchmove', onTouchMove);\n triggerElement.addEventListener('touchend', onTouchEnd);\n\n scrollableElements.forEach((element) => {\n element.addEventListener('scroll', onScroll);\n });\n\n return () => {\n triggerElement.removeEventListener('touchstart', onTouchStart);\n triggerElement.removeEventListener('touchmove', onTouchMove);\n triggerElement.removeEventListener('touchend', onTouchEnd);\n\n scrollableElements.forEach((element) => {\n element.removeEventListener('scroll', onScroll);\n });\n };\n }, [isTopScroll]);\n};\n"],"names":["SWIPE_THRESHOLD","THROTTLE_DEFAULT_MS","isScrollable","element","style","getComputedStyle","overflow","overflowY","useSheetSwipe","args","contentWrapperRef","contentRef","handleRef","onClose","_args$throttleMs","throttleMs","_useState","useState","_useState2","_slicedToArray","isTopScroll","setIsTopScroll","isOverscroll","useRef","startY","currentY","useEffect","contentWrapperEl","current","handleEl","contentEl","triggerElement","nodes","Array","from","querySelectorAll","scrollableElements","filter","willChange","onTouchStart","event","changedTouches","clientY","transition","onTouchMove","Math","max","offsetY","Infinity","cancelable","preventDefault","transform","concat","onTouchEnd","curtainHeight","offsetHeight","endY","onScroll","throttle","onTop","target","scrollTop","addEventListener","forEach","removeEventListener"],"mappings":";;;;;;;;AAGA,IAAMA,eAAe,GAAG,GAAG,CAAA;AAC3B,IAAMC,mBAAmB,GAAG,CAAC,CAAA;AAE7B,IAAMC,YAAY,GAAG,SAAfA,YAAYA,CAAIC,OAA2B,EAAK;EAClD,IAAI,CAACA,OAAO,EAAE;AACV,IAAA,OAAO,KAAK,CAAA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CAAC,CAAA;AAC3DR,IAAAA,cAAc,CAAC+B,gBAAgB,CAAC,WAAW,EAAElB,WAAW,CAAC,CAAA;AACzDb,IAAAA,cAAc,CAAC+B,gBAAgB,CAAC,UAAU,EAAET,UAAU,CAAC,CAAA;AAEvDjB,IAAAA,kBAAkB,CAAC2B,OAAO,CAAC,UAAC5D,OAAO,EAAK;AACpCA,MAAAA,OAAO,CAAC2D,gBAAgB,CAAC,QAAQ,EAAEL,QAAQ,CAAC,CAAA;AAChD,KAAC,CAAC,CAAA;AAEF,IAAA,OAAO,YAAM;AACT1B,MAAAA,cAAc,CAACiC,mBAAmB,CAAC,YAAY,EAAEzB,YAAY,CAAC,CAAA;AAC9DR,MAAAA,cAAc,CAACiC,mBAAmB,CAAC,WAAW,EAAEpB,WAAW,CAAC,CAAA;AAC5Db,MAAAA,cAAc,CAACiC,mBAAmB,CAAC,UAAU,EAAEX,UAAU,CAAC,CAAA;AAE1DjB,MAAAA,kBAAkB,CAAC2B,OAAO,CAAC,UAAC5D,OAAO,EAAK;AACpCA,QAAAA,OAAO,CAAC6D,mBAAmB,CAAC,QAAQ,EAAEP,QAAQ,CAAC,CAAA;AACnD,OAAC,CAAC,CAAA;KACL,CAAA;AACL,GAAC,EAAE,CAACrC,WAAW,CAAC,CAAC,CAAA;AACrB;;;;"}
|
@@ -0,0 +1,13 @@
|
|
1
|
+
'use strict';
|
2
|
+
|
3
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
4
|
+
|
5
|
+
var handleTransition = function handleTransition(transition) {
|
6
|
+
return function (props) {
|
7
|
+
var withTransition = props.withTransition;
|
8
|
+
return !withTransition ? 'unset' : transition;
|
9
|
+
};
|
10
|
+
};
|
11
|
+
|
12
|
+
exports.handleTransition = handleTransition;
|
13
|
+
//# sourceMappingURL=handleTransition.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"handleTransition.js","sources":["../../../../src/components/Sheet/utils/handleTransition.ts"],"sourcesContent":["import { CommonProps } from '../Sheet.types';\n\ntype HandleTransitionProps = Omit<CommonProps, 'opened'>;\n\nexport const handleTransition = (transition: string) => (props: HandleTransitionProps): string => {\n const { withTransition } = props;\n\n return !withTransition ? 'unset' : transition;\n};\n"],"names":["handleTransition","transition","props","withTransition"],"mappings":";;;;IAIaA,gBAAgB,GAAG,SAAnBA,gBAAgBA,CAAIC,UAAkB,EAAA;EAAA,OAAK,UAACC,KAA4B,EAAa;AAC9F,IAAA,IAAQC,cAAc,GAAKD,KAAK,CAAxBC,cAAc,CAAA;AAEtB,IAAA,OAAO,CAACA,cAAc,GAAG,OAAO,GAAGF,UAAU,CAAA;GAChD,CAAA;AAAA;;;;"}
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../../../src/components/Sheet/utils/index.ts"],"sourcesContent":["export { handleTransition } from './handleTransition';\n\nexport const DEFAULT_Z_INDEX = '0';\n"],"names":["DEFAULT_Z_INDEX"],"mappings":";;;;AAEO,IAAMA,eAAe,GAAG;;;;"}
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"base.js","sources":["../../../../../src/components/Sheet/variations/_view/base.ts"],"sourcesContent":["import { css } from '@linaria/core';\n\nexport const base = css``;\n"],"names":["base"],"mappings":";;;;AAEO,IAAMA,IAAI,GAAQ;;;;"}
|
@@ -0,0 +1 @@
|
|
1
|
+
|
package/cjs/index.css
CHANGED
@@ -538,6 +538,13 @@
|
|
538
538
|
|
539
539
|
.ToolbarDivider_styles_1ypqhb1_mcdkovg__81732880{-webkit-align-self:center;-ms-flex-item-align:center;align-self:center;--plasma-divider-background:var(--plasma-toolbar-divider-color);--plasma-divider-border-radius:var(--plasma-toolbar-divider-border-radius);}
|
540
540
|
|
541
|
+
.Sheet_styles_o73i75_sah7qw3__24445093{position:fixed;left:0;bottom:0;width:100%;max-height:100%;z-index:1000;opacity:1;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-flex-direction:column;-ms-flex-direction:column;flex-direction:column;-webkit-box-pack:end;-webkit-justify-content:flex-end;-ms-flex-pack:end;justify-content:flex-end;-webkit-transition:var(--sah7qw3-0);transition:var(--sah7qw3-0);}.Sheet_styles_o73i75_sah7qw3__24445093.Sheet_styles_o73i75_closed__24445093{opacity:0;visibility:hidden;-webkit-transform:translateY(100%);-ms-transform:translateY(100%);transform:translateY(100%);}
|
542
|
+
.Sheet_styles_o73i75_shg69gz__24445093{width:3rem;padding:1.75rem 0;margin:-1.375rem 0;opacity:0.65;-webkit-align-self:center;-ms-flex-item-align:center;align-self:center;}.Sheet_styles_o73i75_shg69gz__24445093::before{content:'';display:block;border-radius:0.625rem;background-color:var(--plasma-sheet-handle-background-color);height:0.25rem;}
|
543
|
+
.Sheet_styles_o73i75_s1cdpbaw__24445093{border-radius:1.25rem 1.25rem 0 0;background-color:var(--plasma-sheet-content-background-color);padding-left:1rem;padding-right:1rem;padding-top:var(--s1cdpbaw-0);padding-bottom:var(--s1cdpbaw-1);max-height:100%;overflow:auto;overscroll-behavior:contain;}.Sheet_styles_o73i75_s1cdpbaw__24445093::-webkit-scrollbar{display:none;}
|
544
|
+
.Sheet_styles_o73i75_sjx120m__24445093{width:100%;z-index:1;padding-top:1rem;position:var(--sjx120m-0);top:var(--sjx120m-1);background-color:var(--sjx120m-2);}
|
545
|
+
|
546
|
+
.Sheet_styles_o73i75_sqp1ccu__24445093{width:100%;z-index:1;padding-bottom:1rem;position:var(--sqp1ccu-0);bottom:var(--sqp1ccu-1);background-color:var(--sqp1ccu-2);}
|
547
|
+
|
541
548
|
.SliderBase_styles_7is2ll_s33crq1__0c0959e2{-webkit-flex:1;-ms-flex:1;flex:1;position:relative;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;height:var(--plasma-slider-height);}
|
542
549
|
.SliderBase_styles_7is2ll_rnaoqfb__0c0959e2{height:100%;}
|
543
550
|
.SliderBase_styles_7is2ll_r1bro5xo__0c0959e2{position:relative;top:50%;height:var(--plasma-slider-rail-height);border-radius:var(--plasma-slider-rail-border-radius);background-color:var(--plasma-slider-rail-background-color);overflow:hidden;-webkit-transform:translateY(-50%);-ms-transform:translateY(-50%);transform:translateY(-50%);}
|
package/cjs/index.js
CHANGED
@@ -171,6 +171,8 @@ var Divider_tokens = require('./components/Divider/Divider.tokens.js');
|
|
171
171
|
var Toolbar = require('./components/Toolbar/Toolbar.js');
|
172
172
|
var Toolbar_tokens = require('./components/Toolbar/Toolbar.tokens.js');
|
173
173
|
var ToolbarDivider = require('./components/Toolbar/ui/ToolbarDivider/ToolbarDivider.js');
|
174
|
+
var Sheet = require('./components/Sheet/Sheet.js');
|
175
|
+
var Sheet_tokens = require('./components/Sheet/Sheet.tokens.js');
|
174
176
|
var Slider = require('./components/Slider/Slider.js');
|
175
177
|
var Slider_tokens = require('./components/Slider/Slider.tokens.js');
|
176
178
|
require('react');
|
@@ -522,6 +524,10 @@ exports.toolbarRoot = Toolbar.toolbarRoot;
|
|
522
524
|
exports.toolbarTokens = Toolbar_tokens.tokens;
|
523
525
|
exports.toolbarDividerConfig = ToolbarDivider.toolbarDividerConfig;
|
524
526
|
exports.toolbarDividerRoot = ToolbarDivider.toolbarDividerRoot;
|
527
|
+
exports.sheetConfig = Sheet.sheetConfig;
|
528
|
+
exports.sheetRoot = Sheet.sheetRoot;
|
529
|
+
exports.sheetClasses = Sheet_tokens.classes;
|
530
|
+
exports.sheetTokens = Sheet_tokens.tokens;
|
525
531
|
exports.sliderConfig = Slider.sliderConfig;
|
526
532
|
exports.sliderRoot = Slider.sliderRoot;
|
527
533
|
exports.sliderTokens = Slider_tokens.tokens;
|
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,8 @@
|
|
1
|
+
.Overlay_styles_cxej3y_s1afr8la__70d4dd9a{position:fixed;inset:0;z-index:var(--s1afr8la-0);--plasma_private-overlay-background-color:var(--s1afr8la-1);--plasma_private-overlay-backdrop-filter:var(--s1afr8la-2);background:var(--s1afr8la-3);-webkit-backdrop-filter:var(--s1afr8la-4);backdrop-filter:var(--s1afr8la-4);cursor:var(--s1afr8la-5);}
|
2
|
+
|
3
|
+
.Sheet_styles_o73i75_sah7qw3__24445093{position:fixed;left:0;bottom:0;width:100%;max-height:100%;z-index:1000;opacity:1;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-flex-direction:column;-ms-flex-direction:column;flex-direction:column;-webkit-box-pack:end;-webkit-justify-content:flex-end;-ms-flex-pack:end;justify-content:flex-end;-webkit-transition:var(--sah7qw3-0);transition:var(--sah7qw3-0);}.Sheet_styles_o73i75_sah7qw3__24445093.Sheet_styles_o73i75_closed__24445093{opacity:0;visibility:hidden;-webkit-transform:translateY(100%);-ms-transform:translateY(100%);transform:translateY(100%);}
|
4
|
+
.Sheet_styles_o73i75_shg69gz__24445093{width:3rem;padding:1.75rem 0;margin:-1.375rem 0;opacity:0.65;-webkit-align-self:center;-ms-flex-item-align:center;align-self:center;}.Sheet_styles_o73i75_shg69gz__24445093::before{content:'';display:block;border-radius:0.625rem;background-color:var(--plasma-sheet-handle-background-color);height:0.25rem;}
|
5
|
+
.Sheet_styles_o73i75_s1cdpbaw__24445093{border-radius:1.25rem 1.25rem 0 0;background-color:var(--plasma-sheet-content-background-color);padding-left:1rem;padding-right:1rem;padding-top:var(--s1cdpbaw-0);padding-bottom:var(--s1cdpbaw-1);max-height:100%;overflow:auto;overscroll-behavior:contain;}.Sheet_styles_o73i75_s1cdpbaw__24445093::-webkit-scrollbar{display:none;}
|
6
|
+
.Sheet_styles_o73i75_sjx120m__24445093{width:100%;z-index:1;padding-top:1rem;position:var(--sjx120m-0);top:var(--sjx120m-1);background-color:var(--sjx120m-2);}
|
7
|
+
|
8
|
+
.Sheet_styles_o73i75_sqp1ccu__24445093{width:100%;z-index:1;padding-bottom:1rem;position:var(--sqp1ccu-0);bottom:var(--sqp1ccu-1);background-color:var(--sqp1ccu-2);}
|