@salutejs/plasma-new-hope 0.342.0-canary.2342.19537901143.0 → 0.342.0-canary.2346.19561454234.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/cjs/components/Sheet/Sheet.js +1 -4
- package/cjs/components/Sheet/Sheet.js.map +1 -1
- package/cjs/components/Sheet/hooks/useSheetSwipe.js +1 -2
- package/cjs/components/Sheet/hooks/useSheetSwipe.js.map +1 -1
- package/emotion/cjs/components/Sheet/Sheet.js +1 -3
- package/emotion/cjs/components/Sheet/hooks/useSheetSwipe.js +2 -2
- package/emotion/es/components/Sheet/Sheet.js +1 -3
- package/emotion/es/components/Sheet/hooks/useSheetSwipe.js +2 -2
- package/es/components/Sheet/Sheet.js +1 -4
- package/es/components/Sheet/Sheet.js.map +1 -1
- package/es/components/Sheet/hooks/useSheetSwipe.js +1 -2
- package/es/components/Sheet/hooks/useSheetSwipe.js.map +1 -1
- package/package.json +4 -4
- package/styled-components/cjs/components/Sheet/Sheet.js +1 -3
- package/styled-components/cjs/components/Sheet/hooks/useSheetSwipe.js +2 -2
- package/styled-components/cjs/examples/components/Combobox/Combobox.js +15 -0
- package/styled-components/es/components/Sheet/Sheet.js +1 -3
- package/styled-components/es/components/Sheet/hooks/useSheetSwipe.js +2 -2
- package/types/components/Sheet/Sheet.d.ts.map +1 -1
- package/types/components/Sheet/Sheet.types.d.ts +0 -6
- package/types/components/Sheet/Sheet.types.d.ts.map +1 -1
- package/types/components/Sheet/hooks/useSheetSwipe.d.ts +0 -1
- package/types/components/Sheet/hooks/useSheetSwipe.d.ts.map +1 -1
|
@@ -18,7 +18,7 @@ function _interopDefault (e) { return e && e.__esModule ? e : { default: e }; }
|
|
|
18
18
|
|
|
19
19
|
var React__default = /*#__PURE__*/_interopDefault(React);
|
|
20
20
|
|
|
21
|
-
var _excluded = ["opened", "children", "onClose", "hasHandle", "handlePlacement", "contentHeader", "isHeaderFixed", "contentFooter", "isFooterFixed", "withOverlay", "withBlur", "withTransition", "
|
|
21
|
+
var _excluded = ["opened", "children", "onClose", "hasHandle", "handlePlacement", "contentHeader", "isHeaderFixed", "contentFooter", "isFooterFixed", "withOverlay", "withBlur", "withTransition", "throttleMs", "className", "view"];
|
|
22
22
|
|
|
23
23
|
/**
|
|
24
24
|
* Открывает окно-шторку поверх основного экрана.
|
|
@@ -44,8 +44,6 @@ var sheetRoot = function sheetRoot(Root) {
|
|
|
44
44
|
withBlur = _ref$withBlur === void 0 ? false : _ref$withBlur,
|
|
45
45
|
_ref$withTransition = _ref.withTransition,
|
|
46
46
|
withTransition = _ref$withTransition === void 0 ? true : _ref$withTransition,
|
|
47
|
-
_ref$hasScrollEvents = _ref.hasScrollEvents,
|
|
48
|
-
hasScrollEvents = _ref$hasScrollEvents === void 0 ? true : _ref$hasScrollEvents,
|
|
49
47
|
throttleMs = _ref.throttleMs,
|
|
50
48
|
className = _ref.className,
|
|
51
49
|
view = _ref.view,
|
|
@@ -61,7 +59,6 @@ var sheetRoot = function sheetRoot(Root) {
|
|
|
61
59
|
contentRef: contentRef,
|
|
62
60
|
handleRef: handleRef,
|
|
63
61
|
throttleMs: throttleMs,
|
|
64
|
-
hasScrollEvents: hasScrollEvents,
|
|
65
62
|
onClose: onClose
|
|
66
63
|
});
|
|
67
64
|
var hasHeader = Boolean(contentHeader);
|
|
@@ -1 +1 @@
|
|
|
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 { base as handlePlacementCSS } from './variations/_handlePlacement/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 handlePlacement,\n contentHeader,\n isHeaderFixed = false,\n contentFooter,\n isFooterFixed = false,\n withOverlay = true,\n withBlur = false,\n withTransition = true,\n
|
|
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 { base as handlePlacementCSS } from './variations/_handlePlacement/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 handlePlacement,\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} handlePlacement={handlePlacement} 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 handlePlacement: {\n css: handlePlacementCSS,\n },\n },\n defaults: {\n view: 'default',\n handlePlacement: 'outer',\n },\n};\n"],"names":["sheetRoot","Root","forwardRef","_ref","rootRef","opened","children","onClose","_ref$hasHandle","hasHandle","handlePlacement","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","handlePlacementCSS","defaults"],"mappings":";;;;;;;;;;;;;;;;;;;;;;AAqBA;AACA;AACA;;IAEaA,SAAS,GAAG,SAAZA,SAASA,CAAIC,IAA2C,EAAA;AAAA,EAAA,oBACjEC,gBAAU,CACN,UAAAC,IAAA,EAmBIC,OAAO,EACN;AAAA,IAAA,IAlBGC,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,eAAe,GAAAP,IAAA,CAAfO,eAAe;MACfC,aAAa,GAAAR,IAAA,CAAbQ,aAAa;MAAAC,kBAAA,GAAAT,IAAA,CACbU,aAAa;AAAbA,MAAAA,aAAa,GAAAD,kBAAA,KAAG,KAAA,CAAA,GAAA,KAAK,GAAAA,kBAAA;MACrBE,aAAa,GAAAX,IAAA,CAAbW,aAAa;MAAAC,kBAAA,GAAAZ,IAAA,CACba,aAAa;AAAbA,MAAAA,aAAa,GAAAD,kBAAA,KAAG,KAAA,CAAA,GAAA,KAAK,GAAAA,kBAAA;MAAAE,gBAAA,GAAAd,IAAA,CACrBe,WAAW;AAAXA,MAAAA,WAAW,GAAAD,gBAAA,KAAG,KAAA,CAAA,GAAA,IAAI,GAAAA,gBAAA;MAAAE,aAAA,GAAAhB,IAAA,CAClBiB,QAAQ;AAARA,MAAAA,QAAQ,GAAAD,aAAA,KAAG,KAAA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AACU,eAAO,EAAA;AACJC,MAAAA,MAAM,EAAEC,uBAAgB;AACxBC,MAAAA,uBAAuB,EAAElB,sBAAuB;AAChDvB,MAAAA,QAAQ,EAAEA,QAAS;MACnB0C,WAAW,EAAA,IAAA;AACXC,MAAAA,cAAc,EAAExD,OAAAA;AAAQ,KAC3B,CAEH,CAAC,CAAA;AAEf,GACJ,CAAC,CAAA;AAAA,EAAA;AAEE,IAAMyD,WAAW,GAAG;AACvBC,EAAAA,IAAI,EAAE,OAAO;AACbC,EAAAA,GAAG,EAAE,KAAK;AACVC,EAAAA,MAAM,EAAEnE,SAAS;AACjBoE,EAAAA,IAAI,EAAE,EAAE;AACRC,EAAAA,UAAU,EAAE;AACR5C,IAAAA,IAAI,EAAE;AACF6C,MAAAA,GAAG,EAAEC,SAAAA;KACR;AACD7D,IAAAA,eAAe,EAAE;AACb4D,MAAAA,GAAG,EAAEE,WAAAA;AACT,KAAA;GACH;AACDC,EAAAA,QAAQ,EAAE;AACNhD,IAAAA,IAAI,EAAE,SAAS;AACff,IAAAA,eAAe,EAAE,OAAA;AACrB,GAAA;AACJ;;;;;"}
|
|
@@ -23,7 +23,6 @@ var useSheetSwipe = function useSheetSwipe(args) {
|
|
|
23
23
|
var contentWrapperRef = args.contentWrapperRef,
|
|
24
24
|
contentRef = args.contentRef,
|
|
25
25
|
handleRef = args.handleRef,
|
|
26
|
-
hasScrollEvents = args.hasScrollEvents,
|
|
27
26
|
onClose = args.onClose,
|
|
28
27
|
_args$throttleMs = args.throttleMs,
|
|
29
28
|
throttleMs = _args$throttleMs === void 0 ? THROTTLE_DEFAULT_MS : _args$throttleMs;
|
|
@@ -39,7 +38,7 @@ var useSheetSwipe = function useSheetSwipe(args) {
|
|
|
39
38
|
var handleEl = handleRef.current;
|
|
40
39
|
var contentEl = contentRef.current;
|
|
41
40
|
var triggerElement = !isTopScroll ? handleEl : contentWrapperEl;
|
|
42
|
-
if (!triggerElement || !contentEl || !contentWrapperEl
|
|
41
|
+
if (!triggerElement || !contentEl || !contentWrapperEl) {
|
|
43
42
|
return;
|
|
44
43
|
}
|
|
45
44
|
var nodes = Array.from(contentWrapperEl.querySelectorAll('*'));
|
|
@@ -1 +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
|
|
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;AAChB,GAAA;AAEA,EAAA,IAAMC,KAAK,GAAGC,gBAAgB,CAACF,OAAO,CAAC,CAAA;EAEvC,OACIC,KAAK,CAACE,QAAQ,KAAK,QAAQ,IAC3BF,KAAK,CAACE,QAAQ,KAAK,MAAM,IACzBF,KAAK,CAACG,SAAS,KAAK,QAAQ,IAC5BH,KAAK,CAACG,SAAS,KAAK,MAAM,CAAA;AAElC,CAAC,CAAA;IAEYC,aAAa,GAAG,SAAhBA,aAAaA,CAAIC,IAM7B,EAAK;AACF,EAAA,IAAQC,iBAAiB,GAAuED,IAAI,CAA5FC,iBAAiB;IAAEC,UAAU,GAA2DF,IAAI,CAAzEE,UAAU;IAAEC,SAAS,GAAgDH,IAAI,CAA7DG,SAAS;IAAEC,OAAO,GAAuCJ,IAAI,CAAlDI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,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;;;;"}
|
|
@@ -123,7 +123,7 @@ function _object_without_properties_loose(source, excluded) {
|
|
|
123
123
|
}
|
|
124
124
|
var sheetRoot = function(Root) {
|
|
125
125
|
return /*#__PURE__*/ (0, _react.forwardRef)(function(_param, rootRef) {
|
|
126
|
-
var opened = _param.opened, children = _param.children, onClose = _param.onClose, _param_hasHandle = _param.hasHandle, hasHandle = _param_hasHandle === void 0 ? true : _param_hasHandle, handlePlacement = _param.handlePlacement, contentHeader = _param.contentHeader, _param_isHeaderFixed = _param.isHeaderFixed, isHeaderFixed = _param_isHeaderFixed === void 0 ? false : _param_isHeaderFixed, contentFooter = _param.contentFooter, _param_isFooterFixed = _param.isFooterFixed, isFooterFixed = _param_isFooterFixed === void 0 ? false : _param_isFooterFixed, _param_withOverlay = _param.withOverlay, withOverlay = _param_withOverlay === void 0 ? true : _param_withOverlay, _param_withBlur = _param.withBlur, withBlur = _param_withBlur === void 0 ? false : _param_withBlur, _param_withTransition = _param.withTransition, withTransition = _param_withTransition === void 0 ? true : _param_withTransition,
|
|
126
|
+
var opened = _param.opened, children = _param.children, onClose = _param.onClose, _param_hasHandle = _param.hasHandle, hasHandle = _param_hasHandle === void 0 ? true : _param_hasHandle, handlePlacement = _param.handlePlacement, contentHeader = _param.contentHeader, _param_isHeaderFixed = _param.isHeaderFixed, isHeaderFixed = _param_isHeaderFixed === void 0 ? false : _param_isHeaderFixed, contentFooter = _param.contentFooter, _param_isFooterFixed = _param.isFooterFixed, isFooterFixed = _param_isFooterFixed === void 0 ? false : _param_isFooterFixed, _param_withOverlay = _param.withOverlay, withOverlay = _param_withOverlay === void 0 ? true : _param_withOverlay, _param_withBlur = _param.withBlur, withBlur = _param_withBlur === void 0 ? false : _param_withBlur, _param_withTransition = _param.withTransition, withTransition = _param_withTransition === void 0 ? true : _param_withTransition, throttleMs = _param.throttleMs, className = _param.className, view = _param.view, restProps = _object_without_properties(_param, [
|
|
127
127
|
"opened",
|
|
128
128
|
"children",
|
|
129
129
|
"onClose",
|
|
@@ -136,7 +136,6 @@ var sheetRoot = function(Root) {
|
|
|
136
136
|
"withOverlay",
|
|
137
137
|
"withBlur",
|
|
138
138
|
"withTransition",
|
|
139
|
-
"hasScrollEvents",
|
|
140
139
|
"throttleMs",
|
|
141
140
|
"className",
|
|
142
141
|
"view"
|
|
@@ -152,7 +151,6 @@ var sheetRoot = function(Root) {
|
|
|
152
151
|
contentRef: contentRef,
|
|
153
152
|
handleRef: handleRef,
|
|
154
153
|
throttleMs: throttleMs,
|
|
155
|
-
hasScrollEvents: hasScrollEvents,
|
|
156
154
|
onClose: onClose
|
|
157
155
|
});
|
|
158
156
|
var hasHeader = Boolean(contentHeader);
|
|
@@ -71,7 +71,7 @@ var isScrollable = function(element) {
|
|
|
71
71
|
return style.overflow === 'scroll' || style.overflow === 'auto' || style.overflowY === 'scroll' || style.overflowY === 'auto';
|
|
72
72
|
};
|
|
73
73
|
var useSheetSwipe = function(args) {
|
|
74
|
-
var contentWrapperRef = args.contentWrapperRef, contentRef = args.contentRef, handleRef = args.handleRef,
|
|
74
|
+
var contentWrapperRef = args.contentWrapperRef, contentRef = args.contentRef, handleRef = args.handleRef, onClose = args.onClose, _args_throttleMs = args.throttleMs, throttleMs = _args_throttleMs === void 0 ? THROTTLE_DEFAULT_MS : _args_throttleMs;
|
|
75
75
|
var _useState = _sliced_to_array((0, _react.useState)(true), 2), isTopScroll = _useState[0], setIsTopScroll = _useState[1];
|
|
76
76
|
var isOverscroll = (0, _react.useRef)(false);
|
|
77
77
|
var startY = (0, _react.useRef)(0);
|
|
@@ -81,7 +81,7 @@ var useSheetSwipe = function(args) {
|
|
|
81
81
|
var handleEl = handleRef.current;
|
|
82
82
|
var contentEl = contentRef.current;
|
|
83
83
|
var triggerElement = !isTopScroll ? handleEl : contentWrapperEl;
|
|
84
|
-
if (!triggerElement || !contentEl || !contentWrapperEl
|
|
84
|
+
if (!triggerElement || !contentEl || !contentWrapperEl) {
|
|
85
85
|
return;
|
|
86
86
|
}
|
|
87
87
|
var nodes = Array.from(contentWrapperEl.querySelectorAll('*'));
|
|
@@ -66,7 +66,7 @@ import { DEFAULT_Z_INDEX } from "./utils";
|
|
|
66
66
|
* Открывает окно-шторку поверх основного экрана.
|
|
67
67
|
*/ export var sheetRoot = function(Root) {
|
|
68
68
|
return /*#__PURE__*/ forwardRef(function(_param, rootRef) {
|
|
69
|
-
var opened = _param.opened, children = _param.children, onClose = _param.onClose, _param_hasHandle = _param.hasHandle, hasHandle = _param_hasHandle === void 0 ? true : _param_hasHandle, handlePlacement = _param.handlePlacement, contentHeader = _param.contentHeader, _param_isHeaderFixed = _param.isHeaderFixed, isHeaderFixed = _param_isHeaderFixed === void 0 ? false : _param_isHeaderFixed, contentFooter = _param.contentFooter, _param_isFooterFixed = _param.isFooterFixed, isFooterFixed = _param_isFooterFixed === void 0 ? false : _param_isFooterFixed, _param_withOverlay = _param.withOverlay, withOverlay = _param_withOverlay === void 0 ? true : _param_withOverlay, _param_withBlur = _param.withBlur, withBlur = _param_withBlur === void 0 ? false : _param_withBlur, _param_withTransition = _param.withTransition, withTransition = _param_withTransition === void 0 ? true : _param_withTransition,
|
|
69
|
+
var opened = _param.opened, children = _param.children, onClose = _param.onClose, _param_hasHandle = _param.hasHandle, hasHandle = _param_hasHandle === void 0 ? true : _param_hasHandle, handlePlacement = _param.handlePlacement, contentHeader = _param.contentHeader, _param_isHeaderFixed = _param.isHeaderFixed, isHeaderFixed = _param_isHeaderFixed === void 0 ? false : _param_isHeaderFixed, contentFooter = _param.contentFooter, _param_isFooterFixed = _param.isFooterFixed, isFooterFixed = _param_isFooterFixed === void 0 ? false : _param_isFooterFixed, _param_withOverlay = _param.withOverlay, withOverlay = _param_withOverlay === void 0 ? true : _param_withOverlay, _param_withBlur = _param.withBlur, withBlur = _param_withBlur === void 0 ? false : _param_withBlur, _param_withTransition = _param.withTransition, withTransition = _param_withTransition === void 0 ? true : _param_withTransition, throttleMs = _param.throttleMs, className = _param.className, view = _param.view, restProps = _object_without_properties(_param, [
|
|
70
70
|
"opened",
|
|
71
71
|
"children",
|
|
72
72
|
"onClose",
|
|
@@ -79,7 +79,6 @@ import { DEFAULT_Z_INDEX } from "./utils";
|
|
|
79
79
|
"withOverlay",
|
|
80
80
|
"withBlur",
|
|
81
81
|
"withTransition",
|
|
82
|
-
"hasScrollEvents",
|
|
83
82
|
"throttleMs",
|
|
84
83
|
"className",
|
|
85
84
|
"view"
|
|
@@ -95,7 +94,6 @@ import { DEFAULT_Z_INDEX } from "./utils";
|
|
|
95
94
|
contentRef: contentRef,
|
|
96
95
|
handleRef: handleRef,
|
|
97
96
|
throttleMs: throttleMs,
|
|
98
|
-
hasScrollEvents: hasScrollEvents,
|
|
99
97
|
onClose: onClose
|
|
100
98
|
});
|
|
101
99
|
var hasHeader = Boolean(contentHeader);
|
|
@@ -56,7 +56,7 @@ var isScrollable = function(element) {
|
|
|
56
56
|
return style.overflow === 'scroll' || style.overflow === 'auto' || style.overflowY === 'scroll' || style.overflowY === 'auto';
|
|
57
57
|
};
|
|
58
58
|
export var useSheetSwipe = function(args) {
|
|
59
|
-
var contentWrapperRef = args.contentWrapperRef, contentRef = args.contentRef, handleRef = args.handleRef,
|
|
59
|
+
var contentWrapperRef = args.contentWrapperRef, contentRef = args.contentRef, handleRef = args.handleRef, onClose = args.onClose, _args_throttleMs = args.throttleMs, throttleMs = _args_throttleMs === void 0 ? THROTTLE_DEFAULT_MS : _args_throttleMs;
|
|
60
60
|
var _useState = _sliced_to_array(useState(true), 2), isTopScroll = _useState[0], setIsTopScroll = _useState[1];
|
|
61
61
|
var isOverscroll = useRef(false);
|
|
62
62
|
var startY = useRef(0);
|
|
@@ -66,7 +66,7 @@ export var useSheetSwipe = function(args) {
|
|
|
66
66
|
var handleEl = handleRef.current;
|
|
67
67
|
var contentEl = contentRef.current;
|
|
68
68
|
var triggerElement = !isTopScroll ? handleEl : contentWrapperEl;
|
|
69
|
-
if (!triggerElement || !contentEl || !contentWrapperEl
|
|
69
|
+
if (!triggerElement || !contentEl || !contentWrapperEl) {
|
|
70
70
|
return;
|
|
71
71
|
}
|
|
72
72
|
var nodes = Array.from(contentWrapperEl.querySelectorAll('*'));
|
|
@@ -10,7 +10,7 @@ import { useOverflow } from './hooks/useOverflow.js';
|
|
|
10
10
|
import { useSheetSwipe } from './hooks/useSheetSwipe.js';
|
|
11
11
|
import { Overlay } from '../Overlay/Overlay.js';
|
|
12
12
|
|
|
13
|
-
var _excluded = ["opened", "children", "onClose", "hasHandle", "handlePlacement", "contentHeader", "isHeaderFixed", "contentFooter", "isFooterFixed", "withOverlay", "withBlur", "withTransition", "
|
|
13
|
+
var _excluded = ["opened", "children", "onClose", "hasHandle", "handlePlacement", "contentHeader", "isHeaderFixed", "contentFooter", "isFooterFixed", "withOverlay", "withBlur", "withTransition", "throttleMs", "className", "view"];
|
|
14
14
|
|
|
15
15
|
/**
|
|
16
16
|
* Открывает окно-шторку поверх основного экрана.
|
|
@@ -36,8 +36,6 @@ var sheetRoot = function sheetRoot(Root) {
|
|
|
36
36
|
withBlur = _ref$withBlur === void 0 ? false : _ref$withBlur,
|
|
37
37
|
_ref$withTransition = _ref.withTransition,
|
|
38
38
|
withTransition = _ref$withTransition === void 0 ? true : _ref$withTransition,
|
|
39
|
-
_ref$hasScrollEvents = _ref.hasScrollEvents,
|
|
40
|
-
hasScrollEvents = _ref$hasScrollEvents === void 0 ? true : _ref$hasScrollEvents,
|
|
41
39
|
throttleMs = _ref.throttleMs,
|
|
42
40
|
className = _ref.className,
|
|
43
41
|
view = _ref.view,
|
|
@@ -53,7 +51,6 @@ var sheetRoot = function sheetRoot(Root) {
|
|
|
53
51
|
contentRef: contentRef,
|
|
54
52
|
handleRef: handleRef,
|
|
55
53
|
throttleMs: throttleMs,
|
|
56
|
-
hasScrollEvents: hasScrollEvents,
|
|
57
54
|
onClose: onClose
|
|
58
55
|
});
|
|
59
56
|
var hasHeader = Boolean(contentHeader);
|
|
@@ -1 +1 @@
|
|
|
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 { base as handlePlacementCSS } from './variations/_handlePlacement/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 handlePlacement,\n contentHeader,\n isHeaderFixed = false,\n contentFooter,\n isFooterFixed = false,\n withOverlay = true,\n withBlur = false,\n withTransition = true,\n
|
|
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 { base as handlePlacementCSS } from './variations/_handlePlacement/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 handlePlacement,\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} handlePlacement={handlePlacement} 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 handlePlacement: {\n css: handlePlacementCSS,\n },\n },\n defaults: {\n view: 'default',\n handlePlacement: 'outer',\n },\n};\n"],"names":["sheetRoot","Root","forwardRef","_ref","rootRef","opened","children","onClose","_ref$hasHandle","hasHandle","handlePlacement","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","handlePlacementCSS","defaults"],"mappings":";;;;;;;;;;;;;;AAqBA;AACA;AACA;;IAEaA,SAAS,GAAG,SAAZA,SAASA,CAAIC,IAA2C,EAAA;AAAA,EAAA,oBACjEC,UAAU,CACN,UAAAC,IAAA,EAmBIC,OAAO,EACN;AAAA,IAAA,IAlBGC,MAAM,GAAAF,IAAA,CAANE,MAAM;MACNC,QAAQ,GAAAH,IAAA,CAARG,QAAQ;MACRC,OAAO,GAAAJ,IAAA,CAAPI,OAAO;MAAAC,cAAA,GAAAL,IAAA,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Q,EAAE;AACNhD,IAAAA,IAAI,EAAE,SAAS;AACff,IAAAA,eAAe,EAAE,OAAA;AACrB,GAAA;AACJ;;;;"}
|
|
@@ -15,7 +15,6 @@ var useSheetSwipe = function useSheetSwipe(args) {
|
|
|
15
15
|
var contentWrapperRef = args.contentWrapperRef,
|
|
16
16
|
contentRef = args.contentRef,
|
|
17
17
|
handleRef = args.handleRef,
|
|
18
|
-
hasScrollEvents = args.hasScrollEvents,
|
|
19
18
|
onClose = args.onClose,
|
|
20
19
|
_args$throttleMs = args.throttleMs,
|
|
21
20
|
throttleMs = _args$throttleMs === void 0 ? THROTTLE_DEFAULT_MS : _args$throttleMs;
|
|
@@ -31,7 +30,7 @@ var useSheetSwipe = function useSheetSwipe(args) {
|
|
|
31
30
|
var handleEl = handleRef.current;
|
|
32
31
|
var contentEl = contentRef.current;
|
|
33
32
|
var triggerElement = !isTopScroll ? handleEl : contentWrapperEl;
|
|
34
|
-
if (!triggerElement || !contentEl || !contentWrapperEl
|
|
33
|
+
if (!triggerElement || !contentEl || !contentWrapperEl) {
|
|
35
34
|
return;
|
|
36
35
|
}
|
|
37
36
|
var nodes = Array.from(contentWrapperEl.querySelectorAll('*'));
|
|
@@ -1 +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
|
|
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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c,CAACsC,KAAK,CAAC,CAAA;KACxB,EAAE5C,UAAU,CAAC,CAAA;AAEdgB,IAAAA,cAAc,CAAC+B,gBAAgB,CAAC,YAAY,EAAEvB,YAAY,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;;;;"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@salutejs/plasma-new-hope",
|
|
3
|
-
"version": "0.342.0-canary.
|
|
3
|
+
"version": "0.342.0-canary.2346.19561454234.0",
|
|
4
4
|
"description": "Salute Design System blueprint",
|
|
5
5
|
"main": "cjs/index.js",
|
|
6
6
|
"module": "es/index.js",
|
|
@@ -79,7 +79,7 @@
|
|
|
79
79
|
"@rollup/plugin-babel": "^6.0.4",
|
|
80
80
|
"@rollup/plugin-commonjs": "^25.0.4",
|
|
81
81
|
"@rollup/plugin-node-resolve": "^15.1.0",
|
|
82
|
-
"@salutejs/plasma-sb-utils": "0.210.0-canary.
|
|
82
|
+
"@salutejs/plasma-sb-utils": "0.210.0-canary.2346.19561454234.0",
|
|
83
83
|
"@salutejs/plasma-themes": "0.38.0",
|
|
84
84
|
"@storybook/addon-docs": "8.6.12",
|
|
85
85
|
"@storybook/addon-essentials": "8.6.12",
|
|
@@ -117,7 +117,7 @@
|
|
|
117
117
|
"@linaria/react": "5.0.3",
|
|
118
118
|
"@popperjs/core": "2.11.8",
|
|
119
119
|
"@salutejs/input-core": "2.1.2",
|
|
120
|
-
"@salutejs/plasma-core": "1.210.0-canary.
|
|
120
|
+
"@salutejs/plasma-core": "1.210.0-canary.2346.19561454234.0",
|
|
121
121
|
"@salutejs/react-maskinput": "3.3.0",
|
|
122
122
|
"@tanstack/react-table": "8.21.2",
|
|
123
123
|
"@tanstack/react-virtual": "3.13.2",
|
|
@@ -137,5 +137,5 @@
|
|
|
137
137
|
"sideEffects": [
|
|
138
138
|
"*.css"
|
|
139
139
|
],
|
|
140
|
-
"gitHead": "
|
|
140
|
+
"gitHead": "047a7000b1f1e95c1ab360be405100db309684b2"
|
|
141
141
|
}
|
|
@@ -123,7 +123,7 @@ function _object_without_properties_loose(source, excluded) {
|
|
|
123
123
|
}
|
|
124
124
|
var sheetRoot = function(Root) {
|
|
125
125
|
return /*#__PURE__*/ (0, _react.forwardRef)(function(_param, rootRef) {
|
|
126
|
-
var opened = _param.opened, children = _param.children, onClose = _param.onClose, _param_hasHandle = _param.hasHandle, hasHandle = _param_hasHandle === void 0 ? true : _param_hasHandle, handlePlacement = _param.handlePlacement, contentHeader = _param.contentHeader, _param_isHeaderFixed = _param.isHeaderFixed, isHeaderFixed = _param_isHeaderFixed === void 0 ? false : _param_isHeaderFixed, contentFooter = _param.contentFooter, _param_isFooterFixed = _param.isFooterFixed, isFooterFixed = _param_isFooterFixed === void 0 ? false : _param_isFooterFixed, _param_withOverlay = _param.withOverlay, withOverlay = _param_withOverlay === void 0 ? true : _param_withOverlay, _param_withBlur = _param.withBlur, withBlur = _param_withBlur === void 0 ? false : _param_withBlur, _param_withTransition = _param.withTransition, withTransition = _param_withTransition === void 0 ? true : _param_withTransition,
|
|
126
|
+
var opened = _param.opened, children = _param.children, onClose = _param.onClose, _param_hasHandle = _param.hasHandle, hasHandle = _param_hasHandle === void 0 ? true : _param_hasHandle, handlePlacement = _param.handlePlacement, contentHeader = _param.contentHeader, _param_isHeaderFixed = _param.isHeaderFixed, isHeaderFixed = _param_isHeaderFixed === void 0 ? false : _param_isHeaderFixed, contentFooter = _param.contentFooter, _param_isFooterFixed = _param.isFooterFixed, isFooterFixed = _param_isFooterFixed === void 0 ? false : _param_isFooterFixed, _param_withOverlay = _param.withOverlay, withOverlay = _param_withOverlay === void 0 ? true : _param_withOverlay, _param_withBlur = _param.withBlur, withBlur = _param_withBlur === void 0 ? false : _param_withBlur, _param_withTransition = _param.withTransition, withTransition = _param_withTransition === void 0 ? true : _param_withTransition, throttleMs = _param.throttleMs, className = _param.className, view = _param.view, restProps = _object_without_properties(_param, [
|
|
127
127
|
"opened",
|
|
128
128
|
"children",
|
|
129
129
|
"onClose",
|
|
@@ -136,7 +136,6 @@ var sheetRoot = function(Root) {
|
|
|
136
136
|
"withOverlay",
|
|
137
137
|
"withBlur",
|
|
138
138
|
"withTransition",
|
|
139
|
-
"hasScrollEvents",
|
|
140
139
|
"throttleMs",
|
|
141
140
|
"className",
|
|
142
141
|
"view"
|
|
@@ -152,7 +151,6 @@ var sheetRoot = function(Root) {
|
|
|
152
151
|
contentRef: contentRef,
|
|
153
152
|
handleRef: handleRef,
|
|
154
153
|
throttleMs: throttleMs,
|
|
155
|
-
hasScrollEvents: hasScrollEvents,
|
|
156
154
|
onClose: onClose
|
|
157
155
|
});
|
|
158
156
|
var hasHeader = Boolean(contentHeader);
|
|
@@ -71,7 +71,7 @@ var isScrollable = function(element) {
|
|
|
71
71
|
return style.overflow === 'scroll' || style.overflow === 'auto' || style.overflowY === 'scroll' || style.overflowY === 'auto';
|
|
72
72
|
};
|
|
73
73
|
var useSheetSwipe = function(args) {
|
|
74
|
-
var contentWrapperRef = args.contentWrapperRef, contentRef = args.contentRef, handleRef = args.handleRef,
|
|
74
|
+
var contentWrapperRef = args.contentWrapperRef, contentRef = args.contentRef, handleRef = args.handleRef, onClose = args.onClose, _args_throttleMs = args.throttleMs, throttleMs = _args_throttleMs === void 0 ? THROTTLE_DEFAULT_MS : _args_throttleMs;
|
|
75
75
|
var _useState = _sliced_to_array((0, _react.useState)(true), 2), isTopScroll = _useState[0], setIsTopScroll = _useState[1];
|
|
76
76
|
var isOverscroll = (0, _react.useRef)(false);
|
|
77
77
|
var startY = (0, _react.useRef)(0);
|
|
@@ -81,7 +81,7 @@ var useSheetSwipe = function(args) {
|
|
|
81
81
|
var handleEl = handleRef.current;
|
|
82
82
|
var contentEl = contentRef.current;
|
|
83
83
|
var triggerElement = !isTopScroll ? handleEl : contentWrapperEl;
|
|
84
|
-
if (!triggerElement || !contentEl || !contentWrapperEl
|
|
84
|
+
if (!triggerElement || !contentEl || !contentWrapperEl) {
|
|
85
85
|
return;
|
|
86
86
|
}
|
|
87
87
|
var nodes = Array.from(contentWrapperEl.querySelectorAll('*'));
|
|
@@ -1 +1,16 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", {
|
|
3
|
+
value: true
|
|
4
|
+
});
|
|
5
|
+
Object.defineProperty(exports, "Combobox", {
|
|
6
|
+
enumerable: true,
|
|
7
|
+
get: function() {
|
|
8
|
+
return Combobox;
|
|
9
|
+
}
|
|
10
|
+
});
|
|
11
|
+
var _engines = require("../../../engines");
|
|
12
|
+
var _ = require("../../..");
|
|
13
|
+
var _Comboboxconfig = require("./Combobox.config");
|
|
14
|
+
var mergedConfig = (0, _engines.mergeConfig)(_.comboboxNewConfig, _Comboboxconfig.config);
|
|
15
|
+
var ComboboxComponent = (0, _engines.component)(mergedConfig);
|
|
16
|
+
var Combobox = ComboboxComponent;
|
|
@@ -66,7 +66,7 @@ import { DEFAULT_Z_INDEX } from "./utils";
|
|
|
66
66
|
* Открывает окно-шторку поверх основного экрана.
|
|
67
67
|
*/ export var sheetRoot = function(Root) {
|
|
68
68
|
return /*#__PURE__*/ forwardRef(function(_param, rootRef) {
|
|
69
|
-
var opened = _param.opened, children = _param.children, onClose = _param.onClose, _param_hasHandle = _param.hasHandle, hasHandle = _param_hasHandle === void 0 ? true : _param_hasHandle, handlePlacement = _param.handlePlacement, contentHeader = _param.contentHeader, _param_isHeaderFixed = _param.isHeaderFixed, isHeaderFixed = _param_isHeaderFixed === void 0 ? false : _param_isHeaderFixed, contentFooter = _param.contentFooter, _param_isFooterFixed = _param.isFooterFixed, isFooterFixed = _param_isFooterFixed === void 0 ? false : _param_isFooterFixed, _param_withOverlay = _param.withOverlay, withOverlay = _param_withOverlay === void 0 ? true : _param_withOverlay, _param_withBlur = _param.withBlur, withBlur = _param_withBlur === void 0 ? false : _param_withBlur, _param_withTransition = _param.withTransition, withTransition = _param_withTransition === void 0 ? true : _param_withTransition,
|
|
69
|
+
var opened = _param.opened, children = _param.children, onClose = _param.onClose, _param_hasHandle = _param.hasHandle, hasHandle = _param_hasHandle === void 0 ? true : _param_hasHandle, handlePlacement = _param.handlePlacement, contentHeader = _param.contentHeader, _param_isHeaderFixed = _param.isHeaderFixed, isHeaderFixed = _param_isHeaderFixed === void 0 ? false : _param_isHeaderFixed, contentFooter = _param.contentFooter, _param_isFooterFixed = _param.isFooterFixed, isFooterFixed = _param_isFooterFixed === void 0 ? false : _param_isFooterFixed, _param_withOverlay = _param.withOverlay, withOverlay = _param_withOverlay === void 0 ? true : _param_withOverlay, _param_withBlur = _param.withBlur, withBlur = _param_withBlur === void 0 ? false : _param_withBlur, _param_withTransition = _param.withTransition, withTransition = _param_withTransition === void 0 ? true : _param_withTransition, throttleMs = _param.throttleMs, className = _param.className, view = _param.view, restProps = _object_without_properties(_param, [
|
|
70
70
|
"opened",
|
|
71
71
|
"children",
|
|
72
72
|
"onClose",
|
|
@@ -79,7 +79,6 @@ import { DEFAULT_Z_INDEX } from "./utils";
|
|
|
79
79
|
"withOverlay",
|
|
80
80
|
"withBlur",
|
|
81
81
|
"withTransition",
|
|
82
|
-
"hasScrollEvents",
|
|
83
82
|
"throttleMs",
|
|
84
83
|
"className",
|
|
85
84
|
"view"
|
|
@@ -95,7 +94,6 @@ import { DEFAULT_Z_INDEX } from "./utils";
|
|
|
95
94
|
contentRef: contentRef,
|
|
96
95
|
handleRef: handleRef,
|
|
97
96
|
throttleMs: throttleMs,
|
|
98
|
-
hasScrollEvents: hasScrollEvents,
|
|
99
97
|
onClose: onClose
|
|
100
98
|
});
|
|
101
99
|
var hasHeader = Boolean(contentHeader);
|
|
@@ -56,7 +56,7 @@ var isScrollable = function(element) {
|
|
|
56
56
|
return style.overflow === 'scroll' || style.overflow === 'auto' || style.overflowY === 'scroll' || style.overflowY === 'auto';
|
|
57
57
|
};
|
|
58
58
|
export var useSheetSwipe = function(args) {
|
|
59
|
-
var contentWrapperRef = args.contentWrapperRef, contentRef = args.contentRef, handleRef = args.handleRef,
|
|
59
|
+
var contentWrapperRef = args.contentWrapperRef, contentRef = args.contentRef, handleRef = args.handleRef, onClose = args.onClose, _args_throttleMs = args.throttleMs, throttleMs = _args_throttleMs === void 0 ? THROTTLE_DEFAULT_MS : _args_throttleMs;
|
|
60
60
|
var _useState = _sliced_to_array(useState(true), 2), isTopScroll = _useState[0], setIsTopScroll = _useState[1];
|
|
61
61
|
var isOverscroll = useRef(false);
|
|
62
62
|
var startY = useRef(0);
|
|
@@ -66,7 +66,7 @@ export var useSheetSwipe = function(args) {
|
|
|
66
66
|
var handleEl = handleRef.current;
|
|
67
67
|
var contentEl = contentRef.current;
|
|
68
68
|
var triggerElement = !isTopScroll ? handleEl : contentWrapperEl;
|
|
69
|
-
if (!triggerElement || !contentEl || !contentWrapperEl
|
|
69
|
+
if (!triggerElement || !contentEl || !contentWrapperEl) {
|
|
70
70
|
return;
|
|
71
71
|
}
|
|
72
72
|
var nodes = Array.from(contentWrapperEl.querySelectorAll('*'));
|
|
@@ -1 +1 @@
|
|
|
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;AAe3C;;GAEG;AAEH,eAAO,MAAM,SAAS,SAAU,SAAS,CAAC,cAAc,EAAE,UAAU,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;AAe3C;;GAEG;AAEH,eAAO,MAAM,SAAS,SAAU,SAAS,CAAC,cAAc,EAAE,UAAU,CAAC,sFAuEhE,CAAC;AAEN,eAAO,MAAM,WAAW;;;mBAzEQ,SAAS,CAAC,cAAc,EAAE,UAAU,CAAC;;;;;;;;;;;;;;CA0FpE,CAAC"}
|
|
@@ -62,12 +62,6 @@ export interface SheetProps extends HTMLAttributes<HTMLDivElement> {
|
|
|
62
62
|
* Throttling внутренних обработчиков события onScroll
|
|
63
63
|
*/
|
|
64
64
|
throttleMs?: number;
|
|
65
|
-
/**
|
|
66
|
-
* Наличие событий скролла
|
|
67
|
-
* @default
|
|
68
|
-
* true
|
|
69
|
-
*/
|
|
70
|
-
hasScrollEvents?: boolean;
|
|
71
65
|
view?: string;
|
|
72
66
|
}
|
|
73
67
|
export type CommonProps = Pick<SheetProps, 'withTransition' | 'opened'>;
|
|
@@ -1 +1 @@
|
|
|
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,CAAC,cAAc,CAAC;IAC9D;;OAEG;IACH,MAAM,CAAC,EAAE,OAAO,CAAC;IAEjB;;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;;OAEG;IACH,eAAe,CAAC,EAAE,MAAM,CAAC;IAEzB;;;;;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
|
|
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,CAAC,cAAc,CAAC;IAC9D;;OAEG;IACH,MAAM,CAAC,EAAE,OAAO,CAAC;IAEjB;;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;;OAEG;IACH,eAAe,CAAC,EAAE,MAAM,CAAC;IAEzB;;;;;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,MAAM,MAAM,WAAW,GAAG,IAAI,CAAC,UAAU,EAAE,gBAAgB,GAAG,QAAQ,CAAC,CAAC;AAExE,MAAM,MAAM,aAAa,GAAG,IAAI,CAAC,UAAU,EAAE,QAAQ,CAAC,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useSheetSwipe.d.ts","sourceRoot":"","sources":["../../../../src/components/Sheet/hooks/useSheetSwipe.ts"],"names":[],"mappings":"AACA,OAAO,EAA+B,SAAS,EAAE,MAAM,OAAO,CAAC;AAoB/D,eAAO,MAAM,aAAa,SAAU;IAChC,iBAAiB,EAAE,SAAS,CAAC,cAAc,CAAC,CAAC;IAC7C,UAAU,EAAE,SAAS,CAAC,cAAc,CAAC,CAAC;IACtC,SAAS,EAAE,SAAS,CAAC,cAAc,CAAC,CAAC;IACrC,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,
|
|
1
|
+
{"version":3,"file":"useSheetSwipe.d.ts","sourceRoot":"","sources":["../../../../src/components/Sheet/hooks/useSheetSwipe.ts"],"names":[],"mappings":"AACA,OAAO,EAA+B,SAAS,EAAE,MAAM,OAAO,CAAC;AAoB/D,eAAO,MAAM,aAAa,SAAU;IAChC,iBAAiB,EAAE,SAAS,CAAC,cAAc,CAAC,CAAC;IAC7C,UAAU,EAAE,SAAS,CAAC,cAAc,CAAC,CAAC;IACtC,SAAS,EAAE,SAAS,CAAC,cAAc,CAAC,CAAC;IACrC,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,OAAO,EAAE,MAAM,IAAI,CAAC;CACvB,SA4FA,CAAC"}
|