@hh.ru/magritte-ui-bottom-sheet 5.3.25 → 5.3.26
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/BottomSheet.js +5 -3
- package/BottomSheet.js.map +1 -1
- package/BottomSheetFooter.js +1 -1
- package/bottom-sheet-DDCdnuHN.js +5 -0
- package/bottom-sheet-DDCdnuHN.js.map +1 -0
- package/index.css +32 -32
- package/index.js +2 -1
- package/index.js.map +1 -1
- package/package.json +4 -3
- package/bottom-sheet-XlbtgiFK.js +0 -5
- package/bottom-sheet-XlbtgiFK.js.map +0 -1
package/BottomSheet.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import './index.css';
|
|
2
2
|
import { jsx, jsxs } from 'react/jsx-runtime';
|
|
3
|
-
import { forwardRef, useRef, useState, useMemo, useEffect, useCallback } from 'react';
|
|
3
|
+
import { forwardRef, useRef, useState, useMemo, useEffect, useCallback, cloneElement } from 'react';
|
|
4
4
|
import { createPortal } from 'react-dom';
|
|
5
5
|
import { Transition } from 'react-transition-group';
|
|
6
6
|
import classnames from 'classnames';
|
|
@@ -10,6 +10,7 @@ import { useNoBubbling } from '@hh.ru/magritte-common-use-no-bubbling';
|
|
|
10
10
|
import { useSwipeHandlers } from '@hh.ru/magritte-common-use-swipe';
|
|
11
11
|
import { initScrollHandlers, CustomScrollContextProvider } from '@hh.ru/magritte-internal-custom-scroll';
|
|
12
12
|
import { InternalLayerName } from '@hh.ru/magritte-internal-layer-name';
|
|
13
|
+
import { isActionBarComponent } from '@hh.ru/magritte-ui-action-bar';
|
|
13
14
|
import { BottomSheetContext } from './BottomSheetContext.js';
|
|
14
15
|
import { ClickInterceptor } from './ClickInterceptor.js';
|
|
15
16
|
import { useBreakpoint } from '@hh.ru/magritte-ui-breakpoint';
|
|
@@ -17,7 +18,7 @@ import { Divider } from '@hh.ru/magritte-ui-divider';
|
|
|
17
18
|
import { Layer } from '@hh.ru/magritte-ui-layer';
|
|
18
19
|
import { NavigationBarContext } from '@hh.ru/magritte-ui-navigation-bar';
|
|
19
20
|
import { isValidTreeSelectorWrapper } from '@hh.ru/magritte-ui-tree-selector';
|
|
20
|
-
import { s as styles } from './bottom-sheet-
|
|
21
|
+
import { s as styles } from './bottom-sheet-DDCdnuHN.js';
|
|
21
22
|
|
|
22
23
|
const NAVIGATION_BAR_CONTEXT_PROPS = { insideBottomSheet: true };
|
|
23
24
|
const CSS_VAR_ENTER_ANIMATION_DURATION = '--enter-animation-duration';
|
|
@@ -640,6 +641,7 @@ const BottomSheetRenderFunc = ({ allowScrollWhileFocused, children, footer, head
|
|
|
640
641
|
if (!animationTimeout) {
|
|
641
642
|
return null;
|
|
642
643
|
}
|
|
644
|
+
const clonedFooter = footer && isActionBarComponent(footer) ? cloneElement(footer, { type: footer.props.type || 'mobile' }) : footer;
|
|
643
645
|
const renderFunc = (appearTransition, heightTransition) => (jsx(Layer, { layer: InternalLayerName.BottomSheet, children: jsxs("div", { ...eventHandlers, className: styles.overlay, children: [jsx("div", { className: classnames(styles.overlayBackground, {
|
|
644
646
|
[styles.overlayBackgroundVisible]: showOverlay,
|
|
645
647
|
[styles.appearAnimation]: appearTransition === 'entering',
|
|
@@ -662,7 +664,7 @@ const BottomSheetRenderFunc = ({ allowScrollWhileFocused, children, footer, head
|
|
|
662
664
|
[styles.contentSizedFullScreen]: isContentSizedFullHeight,
|
|
663
665
|
}), ref: contentRef, children: jsx(BottomSheetContext.Provider, { value: contextValue, children: children }) }) }), jsxs("div", { className: styles.footer, ref: footerRef, children: [footer && (jsx("div", { className: classnames(styles.divider, {
|
|
664
666
|
[styles.dividerVisible]: stateRef.current.dividerVisible,
|
|
665
|
-
}), ref: dividerRef, children: jsx(Divider, {}) })), interceptClickHandlers ? jsx(ClickInterceptor, { children:
|
|
667
|
+
}), ref: dividerRef, children: jsx(Divider, {}) })), interceptClickHandlers ? (jsx(ClickInterceptor, { children: clonedFooter })) : (clonedFooter)] })] }) }), jsx("div", { className: styles.contentOverlay, ref: contentOverlayRef })] })] }) }));
|
|
666
668
|
return createPortal(jsx("div", { className: styles.cssVariablesContainer, "data-qa": "bottom-sheet-css-variables", ref: cssVariablesContainerRef, children: jsx(Transition, { appear: true, in: currentVisible, mountOnEnter: true, onEnter: setTransformToInvisible, onEntering: setTransformToVisible, onEntered: handleAppearAnimationEnd, onExit: handleExitAnimationStart, onExiting: setTransformToInvisible, onExited: handleExitAnimationEnd, timeout: animationTimeout.appear, unmountOnExit: true, nodeRef: contentRef, children: (appearTransition) => (jsx(Transition, { in: heightAnimationRunning, onEnter: handleHeightAnimationStart, onEntered: handleHeightAnimationEnd, timeout: animationTimeout.height, nodeRef: contentRef, children: (heightTransition) => renderFunc(appearTransition, heightTransition) })) }) }), document.body);
|
|
667
669
|
};
|
|
668
670
|
const BottomSheet = forwardRef(BottomSheetRenderFunc);
|
package/BottomSheet.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BottomSheet.js","sources":["../src/BottomSheet.tsx"],"sourcesContent":["import {\n FocusEventHandler,\n ForwardRefRenderFunction,\n forwardRef,\n useCallback,\n useEffect,\n useMemo,\n useRef,\n useState,\n} from 'react';\nimport { createPortal } from 'react-dom';\nimport { Transition, TransitionStatus } from 'react-transition-group';\nimport classnames from 'classnames';\n\nimport { disableOverscroll, disableScroll } from '@hh.ru/magritte-common-modal-helper';\nimport { useMultipleRefs } from '@hh.ru/magritte-common-use-multiple-refs';\nimport { useNoBubbling } from '@hh.ru/magritte-common-use-no-bubbling';\nimport { useSwipeHandlers, SwipeEventHandler } from '@hh.ru/magritte-common-use-swipe';\nimport {\n ScrollGestureEvent,\n CustomScrollContextNotifier,\n CustomScrollContextProvider,\n initScrollHandlers,\n} from '@hh.ru/magritte-internal-custom-scroll';\nimport { InternalLayerName } from '@hh.ru/magritte-internal-layer-name';\nimport { BottomSheetContext } from '@hh.ru/magritte-ui-bottom-sheet/BottomSheetContext';\nimport { ClickInterceptor } from '@hh.ru/magritte-ui-bottom-sheet/ClickInterceptor';\nimport { BottomSheetProps } from '@hh.ru/magritte-ui-bottom-sheet/types';\nimport { useBreakpoint } from '@hh.ru/magritte-ui-breakpoint';\nimport { Divider } from '@hh.ru/magritte-ui-divider';\nimport { Layer } from '@hh.ru/magritte-ui-layer';\nimport { NavigationBarContext, NavigationBarContextProps } from '@hh.ru/magritte-ui-navigation-bar';\nimport { isValidTreeSelectorWrapper } from '@hh.ru/magritte-ui-tree-selector';\n\nimport styles from './bottom-sheet.less';\n\nconst NAVIGATION_BAR_CONTEXT_PROPS: NavigationBarContextProps = { insideBottomSheet: true };\n\nconst CSS_VAR_ENTER_ANIMATION_DURATION = '--enter-animation-duration';\nconst CSS_VAR_EXIT_ANIMATION_DURATION = '--exit-animation-duration';\nconst CSS_VAR_HEIGHT_ANIMATION_DURATION = '--height-transition-duration';\nconst CSS_VAR_VIRTUAL_KEYBOARD_TOP_OFFSET = '--virtual-keyboard-top-offset';\nconst CSS_VAR_VIRTUAL_KEYBOARD_BOTTOM_OFFSET = '--virtual-keyboard-bottom-offset';\n\nconst hasSelectedText = () => {\n const selection = document.getSelection();\n return !!selection && !selection.isCollapsed;\n};\n\nconst isSafariFunc = () => {\n let lazyValue: boolean | null = null;\n return () => {\n if (lazyValue === null) {\n lazyValue = /^((?!chrome|android).)*safari/i.test(navigator.userAgent);\n }\n return lazyValue;\n };\n};\n\nconst toNumber = (value: string) => {\n const result = parseInt(value, 10);\n return Number.isInteger(result) ? result : 0;\n};\n\nconst translateY = (value: number) => `translate3d(0, ${value}px, 0)`;\n\ntype AnimationTimeout = { [AnimationType in 'appear' | 'height']: { [AnimationStage in 'enter' | 'exit']: number } };\n\ntype State = {\n dividerVisible: boolean;\n // если боттомшит упирается в верхний край экрана, челка может перекрыть граббер и его нужно переместить в safe area\n grabberUnsafe: boolean;\n hasFocus: boolean;\n resizeRAFHandle: ReturnType<typeof requestAnimationFrame> | null;\n // translateY для эмуляции скролла, отрицательный либо меньше LayoutMetrics.current.initialOffset\n scrollOffset: number;\n // translateY для эмуляции свайпа, всегда положительный либо 0\n swipeOffset: number;\n // текущее действие, инициированное пользователем\n touchAction:\n | null // может быть начато любое действие\n | 'complete' // палец приложен, но действие завершено — не реагируем на тач, пока пользователь не отпустит палец\n | 'scroll' // палец приложен, скроллим контент внутри боттомшита\n | 'swipe'; // палец приложен, свайпаем весь боттомшит вниз, чтобы закрыть его, или вверх, чтобы отменить свайп\n // число, на которое нужно анимировать изменение высоты контента боттомшита\n heightAnimationDiff: number | null;\n heightAnimationCallback?: VoidFunction | null;\n};\n\nconst INITIAL_STATE: State = {\n dividerVisible: false,\n grabberUnsafe: false,\n hasFocus: false,\n resizeRAFHandle: null,\n scrollOffset: 0,\n swipeOffset: 0,\n touchAction: null,\n heightAnimationDiff: null,\n};\n\nconst BottomSheetRenderFunc: ForwardRefRenderFunction<HTMLElement, BottomSheetProps> = (\n {\n allowScrollWhileFocused,\n children,\n footer,\n header,\n height = 'content',\n interceptClickHandlers = true,\n keyboardOverlaysContent = true,\n onAppear,\n onBeforeExit,\n onAfterExit,\n onClose,\n showDivider = 'with-scroll',\n showOverlay = true,\n visible = false,\n withContentPaddings = true,\n },\n ref\n) => {\n const DOCUMENT_HEIGHT = useRef(0);\n const SWIPE_THRESHOLD = useRef({ max: Infinity });\n\n const contentRef = useRef<HTMLDivElement>(null);\n const contentOverlayRef = useRef<HTMLDivElement>(null);\n const cssVariablesContainerRef = useRef<HTMLDivElement>(null);\n const dividerRef = useRef<HTMLDivElement>(null);\n const footerRef = useRef<HTMLDivElement>(null);\n const grabberRef = useRef<HTMLDivElement>(null);\n const headerRef = useRef<HTMLDivElement>(null);\n const overlayRef = useRef<HTMLDivElement>(null);\n const scrollContainerRef = useRef<HTMLDivElement>(null);\n const swipeContainerRef = useRef<HTMLDivElement>(null);\n const visualContainerRef = useRef<HTMLDivElement>(null);\n const bottomSheetRef = useMultipleRefs(ref, visualContainerRef);\n\n const { isMobile } = useBreakpoint();\n const currentVisible = isMobile && visible;\n const onAppearRef = useRef(onAppear);\n onAppearRef.current = onAppear;\n const onCloseRef = useRef(onClose);\n onCloseRef.current = onClose;\n const stateRef = useRef<State>({ ...INITIAL_STATE });\n const [animationTimeout, setAnimationTimeout] = useState<AnimationTimeout | null>(null);\n const [heightAnimationRunning, setHeightAnimationRunning] = useState(false);\n const contextValue = useMemo(() => ({ contentOverlayRef }), [contentOverlayRef]);\n const isSafari = useRef(isSafariFunc()).current;\n const scrollContextProviderRef = useRef<CustomScrollContextNotifier>(null);\n const exitHandlersRef = useRef<Array<VoidFunction>>([]);\n const isContentSizedFullHeight = isValidTreeSelectorWrapper(children);\n\n const LayoutMetrics = useRef(\n (() => {\n let cachedBottomSheetHeight: number | null = null;\n let cachedContentHeight: number | null = null;\n let cachedFooterHeight: number | null = null;\n let cachedHeaderHeight: number | null = null;\n let cachedInitialOffset: number | null = null;\n let cachedRemainingAvailableHeight: number | null = null;\n let cachedScrollContainerHeight: number | null = null;\n return {\n get bottomSheetHeight() {\n if (cachedBottomSheetHeight === null && visualContainerRef.current !== null) {\n cachedBottomSheetHeight = visualContainerRef.current.clientHeight;\n }\n return cachedBottomSheetHeight ?? 0;\n },\n get contentHeight() {\n if (cachedContentHeight === null && contentRef.current !== null) {\n cachedContentHeight = contentRef.current.clientHeight;\n }\n return cachedContentHeight ?? 0;\n },\n get footerHeight() {\n if (cachedFooterHeight === null && footerRef.current !== null) {\n cachedFooterHeight = footerRef.current.clientHeight;\n }\n return cachedFooterHeight ?? 0;\n },\n get headerHeight() {\n if (cachedHeaderHeight === null && headerRef.current !== null) {\n cachedHeaderHeight = headerRef.current.clientHeight;\n }\n return cachedHeaderHeight ?? 0;\n },\n get initialOffset() {\n if (\n cachedInitialOffset === null &&\n visualContainerRef.current !== null &&\n visualViewport !== null\n ) {\n cachedInitialOffset =\n height === 'half-screen'\n ? Math.max(\n Math.round(visualContainerRef.current.clientHeight - visualViewport.height / 2),\n 0\n )\n : 0;\n }\n return cachedInitialOffset ?? 0;\n },\n get remainingAvailableHeight() {\n if (cachedRemainingAvailableHeight === null && grabberRef.current !== null) {\n cachedRemainingAvailableHeight = grabberRef.current.offsetTop;\n }\n return cachedRemainingAvailableHeight ?? 0;\n },\n get scrollContainerHeight() {\n if (cachedScrollContainerHeight === null && scrollContainerRef.current !== null) {\n cachedScrollContainerHeight = scrollContainerRef.current.clientHeight;\n }\n return cachedScrollContainerHeight ?? 0;\n },\n invalidateCache() {\n cachedBottomSheetHeight = null;\n cachedContentHeight = null;\n cachedFooterHeight = null;\n cachedHeaderHeight = null;\n cachedInitialOffset = null;\n cachedRemainingAvailableHeight = null;\n cachedScrollContainerHeight = null;\n },\n };\n })()\n );\n\n const setCSSVariable = (name: string, value: string) =>\n cssVariablesContainerRef.current !== null && cssVariablesContainerRef.current.style.setProperty(name, value);\n\n useEffect(() => {\n if (!currentVisible) {\n return void 0;\n }\n\n DOCUMENT_HEIGHT.current = document.documentElement.clientHeight;\n if (visualViewport !== null) {\n SWIPE_THRESHOLD.current = { max: Math.round(visualViewport.height * 0.8) };\n }\n\n if (!showOverlay) {\n const enableOverscroll = disableOverscroll();\n return enableOverscroll;\n }\n\n const enableScroll = disableScroll();\n return enableScroll;\n }, [currentVisible, showOverlay]);\n\n useEffect(() => {\n const animationTimeoutElement = document.createElement('div');\n animationTimeoutElement.classList.add(styles.animationTimeout);\n document.body.appendChild(animationTimeoutElement);\n const style = window.getComputedStyle(animationTimeoutElement);\n const enter = toNumber(style.getPropertyValue(CSS_VAR_ENTER_ANIMATION_DURATION));\n const exit = toNumber(style.getPropertyValue(CSS_VAR_EXIT_ANIMATION_DURATION));\n const height = toNumber(style.getPropertyValue(CSS_VAR_HEIGHT_ANIMATION_DURATION));\n document.body.removeChild(animationTimeoutElement);\n setAnimationTimeout({ appear: { enter, exit }, height: { enter: height, exit } });\n }, [setAnimationTimeout]);\n\n // при изменении высоты контента анимируем ее\n // задаем боттомшиту фиксированную высоту и пересчитываем ее самостоятельно,\n // чтобы не было мерцания, когда новый контент отрисовался до срабатывания колбека ResizeObserver\n const initHeightObserver = useCallback(() => {\n if (!contentRef.current || !footerRef.current || !headerRef.current || !visualContainerRef.current) {\n return void 0;\n }\n\n const visualContainer = visualContainerRef.current;\n let prevContentHeight = 0;\n let prevHeaderHeight = 0;\n let prevFooterHeight = 0;\n let prevScrollContainerHeight = 0;\n let skipFirst = true;\n\n const observer = new ResizeObserver(() => {\n LayoutMetrics.current.invalidateCache();\n\n if (skipFirst) {\n visualContainer.style.height = `${LayoutMetrics.current.bottomSheetHeight}px`;\n prevHeaderHeight = LayoutMetrics.current.headerHeight;\n prevContentHeight = LayoutMetrics.current.contentHeight;\n prevFooterHeight = LayoutMetrics.current.footerHeight;\n prevScrollContainerHeight = LayoutMetrics.current.scrollContainerHeight;\n\n skipFirst = false;\n return;\n }\n\n if (stateRef.current.heightAnimationDiff !== null) {\n // если предыдущая анимация не завершилась, без анимации сбрасываем высоту на вычисленную браузером\n visualContainer.style.height = ``;\n } else {\n const contentHeightDiff = LayoutMetrics.current.contentHeight - prevContentHeight;\n const containersHeightDiff =\n LayoutMetrics.current.headerHeight -\n prevHeaderHeight +\n LayoutMetrics.current.footerHeight -\n prevFooterHeight;\n\n // предположим, что scrollContainer останется таким же или станет меньше\n // тогда можем рассчитать минимальную видимую высоту контента как min(scrollContainer.height, contentHeight)\n const prevVisibleContentHeight = Math.min(prevScrollContainerHeight, prevContentHeight);\n const newMinVisibleContentHeight = Math.min(\n prevScrollContainerHeight - containersHeightDiff,\n LayoutMetrics.current.contentHeight\n );\n const minVisibleContentHeightDiff = newMinVisibleContentHeight - prevVisibleContentHeight;\n\n // предположим, что scrollContainer станет больше\n // тогда контент не может увеличиться больше, чем на расстояние между боттомшитом и верхним краем экрана\n const maxVisibleContentHeightDiff =\n LayoutMetrics.current.remainingAvailableHeight - containersHeightDiff;\n\n const visibleContentHeightDiff = Math.min(\n Math.max(contentHeightDiff, minVisibleContentHeightDiff),\n maxVisibleContentHeightDiff\n );\n if (visibleContentHeightDiff !== 0) {\n scrollContextProviderRef.current?.notify({ scrollTop: 0 });\n }\n\n const heightAnimationDiff = visibleContentHeightDiff + containersHeightDiff;\n if (heightAnimationDiff !== 0) {\n // запоминаем высоту scrollContainer после того, как боттомшиту будет присвоена новая высота.\n // до этого значение некорректно, т.к. новый контент уже был отрендерен,\n // но в инлайн-стилях боттомшита остается старая высота\n stateRef.current.heightAnimationDiff = heightAnimationDiff;\n stateRef.current.heightAnimationCallback = () => {\n prevScrollContainerHeight = LayoutMetrics.current.scrollContainerHeight;\n };\n\n setHeightAnimationRunning(true);\n }\n }\n\n prevHeaderHeight = LayoutMetrics.current.headerHeight;\n prevContentHeight = LayoutMetrics.current.contentHeight;\n prevFooterHeight = LayoutMetrics.current.footerHeight;\n });\n\n observer.observe(headerRef.current);\n observer.observe(contentRef.current);\n observer.observe(footerRef.current);\n return () => observer.disconnect();\n }, [setHeightAnimationRunning]);\n\n useEffect(() => {\n if (!currentVisible || isSafari()) {\n return;\n }\n\n // используем Virtual Keyboard API через meta-тег вместо navigator.virtualKeyboard,\n // потому что второй способ работает только на страницах, открытых через HTTPS, что мешает тестированию\n let meta = document.querySelector('meta[name=\"viewport\"]');\n if (!meta) {\n meta = document.createElement('meta');\n meta.setAttribute('name', 'viewport');\n document.head.appendChild(meta);\n }\n const attributesStr = meta.getAttribute('content');\n const attributes = (\n attributesStr !== null\n ? Object.fromEntries(attributesStr.split(',').map((keyValuePairStr) => keyValuePairStr.split('=')))\n : {}\n ) as Record<string, string>;\n attributes['interactive-widget'] = keyboardOverlaysContent ? 'resizes-visual' : 'resizes-content';\n const attributesStrUpdated = Object.entries(attributes)\n .map((keyValuePair) => keyValuePair.join('='))\n .join(',');\n meta.setAttribute('content', attributesStrUpdated);\n }, [currentVisible, isSafari, keyboardOverlaysContent]);\n\n const recalcKeyboardOffsets = useCallback(() => {\n if (!headerRef.current || !overlayRef.current || !visualViewport) {\n return;\n }\n\n if (stateRef.current.hasFocus) {\n // терминология: https://developer.chrome.com/blog/viewport-resize-behavior/\n //\n // делим браузеры на три группы в зависимости от поведения при открытии виртуальной клавиатуры:\n // 1. Safari — ресайзит Visual Viewport, не меняет Layout Viewport.\n // В нем не нужно ничего корректировать при keyboardOverlaysContent=true,\n // а при keyboardOverlaysContent=false нужно сдвинуть НИЖНИЙ край контейнера ВВЕРХ,\n // чтобы он совпал с границей Visual Viewport\n // 2. Chrome < 108 & Chromium-based — ресайзит и Visual Viewport, и Layout Viewport.\n // В нем не нужно ничего корректировать при keyboardOverlaysContent=false,\n // а при keyboardOverlaysContent=true нужно сдвинуть НИЖНИЙ край контейнера ВНИЗ,\n // чтобы футер уехал под клавиатуру\n // 3. Chrome >= 108 — поддерживает Virtual Keyboard API и meta-тег interactive-widget.\n // Используем поведение `resizes-visual` (как в Safari) в случае keyboardOverlaysContent=true\n // и `resizes-content` (как в Chrome < 108 & Chromium-based) в случае keyboardOverlaysContent=false\n // Таким образом в нем ничего не нужно корректировать\n\n const overlayDOMRect = overlayRef.current.getBoundingClientRect();\n\n // любой браузер может сдвинуть Visual Viewport вверх, если фокусируемый инпут находится близко к нижней границе\n // из-за этого может возникнуть проблема, что ВЕРХНИЙ край контента уехал за границу Visual Viewport\n // сдвигаем ВЕРХНИЙ край контейнера ВНИЗ, чтобы он совпал с границей Visual Viewport\n const visualViewportShift = Math.round(-overlayDOMRect.top);\n\n // keyboardOverlaysContent=true, клавиатура ПОВЕРХ контента\n // этот кейс нужно корректировать только в Chrome < 108 & Chromium-based\n if (keyboardOverlaysContent) {\n // браузеры из этой группы меняют Layout Viewport\n const layoutViewportDiff = Math.round(DOCUMENT_HEIGHT.current - document.documentElement.clientHeight);\n if (layoutViewportDiff > 0) {\n setCSSVariable(CSS_VAR_VIRTUAL_KEYBOARD_TOP_OFFSET, `${visualViewportShift}px`);\n // сдвигаем НИЖНИЙ край контейнера ВНИЗ, чтобы футер уехал под клавиатуру\n setCSSVariable(CSS_VAR_VIRTUAL_KEYBOARD_BOTTOM_OFFSET, `${-layoutViewportDiff}px`);\n\n // при этом может возникнуть проблема, что клавиатура перекрыла хедер\n // проверяем это и компенсируем величину перекрытия при необходимости\n const headerDOMRect = headerRef.current.getBoundingClientRect();\n const headerOutOfViewportHeight = Math.round(\n headerDOMRect.bottom + layoutViewportDiff - DOCUMENT_HEIGHT.current\n );\n if (headerOutOfViewportHeight > 0) {\n setCSSVariable(\n CSS_VAR_VIRTUAL_KEYBOARD_BOTTOM_OFFSET,\n `${headerOutOfViewportHeight - layoutViewportDiff}px`\n );\n }\n }\n }\n\n // keyboardOverlaysContent=false, клавиатура ПОД контентом\n // этот кейс нужно корректировать только в Safari\n if (!keyboardOverlaysContent && isSafari()) {\n const visualViewportDiff = Math.round(overlayDOMRect.bottom - visualViewport.height);\n if (visualViewportDiff > 0) {\n setCSSVariable(CSS_VAR_VIRTUAL_KEYBOARD_TOP_OFFSET, `${visualViewportShift}px`);\n // сдвигаем НИЖНИЙ край контейнера ВВЕРХ, чтобы он совпал с границей Visual Viewport\n setCSSVariable(CSS_VAR_VIRTUAL_KEYBOARD_BOTTOM_OFFSET, `${visualViewportDiff}px`);\n }\n }\n } else {\n setCSSVariable(CSS_VAR_VIRTUAL_KEYBOARD_TOP_OFFSET, `0px`);\n setCSSVariable(CSS_VAR_VIRTUAL_KEYBOARD_BOTTOM_OFFSET, `0px`);\n }\n }, [isSafari, keyboardOverlaysContent]);\n\n const handleFocus: FocusEventHandler = useCallback(\n (event) => {\n const focusedElement = event.target;\n const initialViewportHeight = visualViewport?.height;\n const resizeRAFStart = performance.now();\n\n if (!(focusedElement instanceof HTMLInputElement) || stateRef.current.resizeRAFHandle !== null) {\n return;\n }\n\n const handleResize = () => {\n if (stateRef.current.resizeRAFHandle !== null) {\n cancelAnimationFrame(stateRef.current.resizeRAFHandle);\n stateRef.current.resizeRAFHandle = null;\n }\n\n recalcKeyboardOffsets();\n\n if (!stateRef.current.hasFocus) {\n visualViewport?.removeEventListener('resize', handleResize);\n }\n };\n\n // если спамить фокус/блюр инпута, ивент visualViewport.resize может не долететь\n // поэтому проверяем изменение высоты в рекурсивном RAF\n const waitForResize = () => {\n if (performance.now() - resizeRAFStart > 1000 || visualViewport?.height !== initialViewportHeight) {\n visualViewport?.removeEventListener('resize', handleResize);\n stateRef.current.resizeRAFHandle = null;\n recalcKeyboardOffsets();\n } else {\n stateRef.current.resizeRAFHandle = requestAnimationFrame(waitForResize);\n }\n };\n\n const handleBlur = () => {\n if (isSafari()) {\n setCSSVariable(CSS_VAR_VIRTUAL_KEYBOARD_TOP_OFFSET, `0px`);\n setCSSVariable(CSS_VAR_VIRTUAL_KEYBOARD_BOTTOM_OFFSET, `0px`);\n }\n\n stateRef.current.hasFocus = false;\n if (stateRef.current.resizeRAFHandle !== null) {\n cancelAnimationFrame(stateRef.current.resizeRAFHandle);\n stateRef.current.resizeRAFHandle = null;\n }\n focusedElement.removeEventListener('blur', handleBlur);\n };\n\n stateRef.current.hasFocus = true;\n stateRef.current.resizeRAFHandle = requestAnimationFrame(waitForResize);\n visualViewport?.addEventListener('resize', handleResize);\n focusedElement.addEventListener('blur', handleBlur);\n },\n [isSafari, recalcKeyboardOffsets]\n );\n\n // contentOverlay совпадает по границам с контентом боттомшита, но лежит вне боттомшита,\n // чтобы чайлды contentOverlay не обрезались границами боттомшита\n // например, снекбар, лежащий внутри contentOverlay, при смахивании может оказаться в любом месте экрана\n // поэтому позицию contentOverlay нужно синхронизировать\n const recalcContentOverlayPosition = useCallback(() => {\n if (\n contentOverlayRef.current !== null &&\n scrollContainerRef.current !== null &&\n visualContainerRef.current !== null\n ) {\n contentOverlayRef.current.style.top = `${\n scrollContainerRef.current.offsetTop + visualContainerRef.current.offsetTop\n }px`;\n contentOverlayRef.current.style.height = `${scrollContainerRef.current.clientHeight}px`;\n }\n }, []);\n\n const recalcScrollFlags = useCallback(() => {\n if (dividerRef.current !== null) {\n const prevDividerVisible = stateRef.current.dividerVisible;\n const isNotScrolledToEnd =\n LayoutMetrics.current.contentHeight + stateRef.current.scrollOffset >\n LayoutMetrics.current.scrollContainerHeight;\n stateRef.current.dividerVisible =\n showDivider === 'always' || (showDivider === 'with-scroll' && isNotScrolledToEnd);\n if (stateRef.current.dividerVisible !== prevDividerVisible) {\n dividerRef.current.classList.toggle(styles.dividerVisible, stateRef.current.dividerVisible);\n }\n }\n\n if (grabberRef.current !== null) {\n const prevGrabberUnsafe = stateRef.current.grabberUnsafe;\n stateRef.current.grabberUnsafe =\n Math.round(Math.max(stateRef.current.scrollOffset, 0) + stateRef.current.swipeOffset) ===\n LayoutMetrics.current.remainingAvailableHeight;\n if (stateRef.current.grabberUnsafe !== prevGrabberUnsafe) {\n grabberRef.current.classList.toggle(styles.grabberEnsureSafe, stateRef.current.grabberUnsafe);\n }\n }\n }, [showDivider]);\n\n // помещает боттомшит в позицию вне экрана снизу, которая может быть начальной либо конечной точкой анимации\n const setTransformToInvisible = useCallback(() => {\n LayoutMetrics.current.invalidateCache();\n\n if (overlayRef.current !== null) {\n overlayRef.current.style.opacity = `0`;\n }\n if (swipeContainerRef.current !== null) {\n swipeContainerRef.current.style.transform = translateY(LayoutMetrics.current.bottomSheetHeight);\n }\n\n requestAnimationFrame(recalcContentOverlayPosition);\n requestAnimationFrame(recalcScrollFlags);\n }, [recalcContentOverlayPosition, recalcScrollFlags]);\n\n // помещает боттомшит в дефолтную позицию на экране, которая может быть начальной либо конечной точкой анимации\n const setTransformToVisible = useCallback(() => {\n LayoutMetrics.current.invalidateCache();\n\n stateRef.current.scrollOffset = LayoutMetrics.current.initialOffset;\n\n if (overlayRef.current !== null) {\n overlayRef.current.style.opacity = `1`;\n }\n if (swipeContainerRef.current !== null) {\n swipeContainerRef.current.style.transform = translateY(\n LayoutMetrics.current.initialOffset + stateRef.current.swipeOffset\n );\n }\n if (footerRef.current !== null) {\n footerRef.current.style.transform = translateY(-LayoutMetrics.current.initialOffset);\n }\n\n requestAnimationFrame(recalcContentOverlayPosition);\n requestAnimationFrame(recalcScrollFlags);\n scrollContextProviderRef.current?.notify({ scrollTop: 0 });\n }, [recalcContentOverlayPosition, recalcScrollFlags]);\n\n const handleExitAnimationStart = useCallback(() => {\n setTransformToVisible();\n onBeforeExit?.();\n }, [setTransformToVisible, onBeforeExit]);\n\n const handleExitAnimationEnd = useCallback(() => {\n setCSSVariable(CSS_VAR_VIRTUAL_KEYBOARD_TOP_OFFSET, `0px`);\n setCSSVariable(CSS_VAR_VIRTUAL_KEYBOARD_BOTTOM_OFFSET, `0px`);\n\n stateRef.current.resizeRAFHandle !== null && cancelAnimationFrame(stateRef.current.resizeRAFHandle);\n stateRef.current = { ...INITIAL_STATE };\n\n exitHandlersRef.current.forEach((handler) => handler());\n exitHandlersRef.current = [];\n onAfterExit?.();\n }, [onAfterExit]);\n\n const handleHeightAnimationStart = useCallback(() => {\n LayoutMetrics.current.invalidateCache();\n\n stateRef.current.scrollOffset = LayoutMetrics.current.initialOffset;\n stateRef.current.swipeOffset = 0;\n\n if (contentRef.current !== null) {\n contentRef.current.style.transform = translateY(0);\n }\n if (swipeContainerRef.current !== null) {\n swipeContainerRef.current.style.transform = translateY(LayoutMetrics.current.initialOffset);\n }\n if (stateRef.current.heightAnimationDiff !== null && visualContainerRef.current !== null) {\n visualContainerRef.current.style.height = `${\n LayoutMetrics.current.bottomSheetHeight + stateRef.current.heightAnimationDiff\n }px`;\n }\n }, []);\n\n const handleHeightAnimationEnd = useCallback(() => {\n LayoutMetrics.current.invalidateCache();\n\n if (visualContainerRef.current !== null) {\n visualContainerRef.current.style.height = `${LayoutMetrics.current.bottomSheetHeight}px`;\n }\n\n stateRef.current.heightAnimationDiff = null;\n stateRef.current.heightAnimationCallback && requestAnimationFrame(stateRef.current.heightAnimationCallback);\n stateRef.current.heightAnimationCallback = null;\n setHeightAnimationRunning(false);\n\n requestAnimationFrame(recalcContentOverlayPosition);\n requestAnimationFrame(recalcScrollFlags);\n }, [setHeightAnimationRunning, recalcContentOverlayPosition, recalcScrollFlags]);\n\n const handleSwipeMove: SwipeEventHandler = useCallback(\n (event) => {\n if (\n (stateRef.current.touchAction !== null && stateRef.current.touchAction !== 'swipe') ||\n hasSelectedText()\n ) {\n return;\n }\n\n // храним неокругленное значение для translateY, чтобы анимация была плавнее\n let newSwipeOffset = stateRef.current.swipeOffset + event.deltaY;\n if (Math.round(newSwipeOffset) <= 0) {\n // боттомшит уперся в верхний край экрана, не даем свайпать дальше\n newSwipeOffset = 0;\n if (stateRef.current.touchAction === 'swipe') {\n stateRef.current.touchAction = 'complete';\n }\n } else {\n // свайп в процессе\n stateRef.current.touchAction = 'swipe';\n }\n\n if (stateRef.current.swipeOffset !== newSwipeOffset) {\n stateRef.current.swipeOffset = newSwipeOffset;\n\n if (swipeContainerRef.current !== null) {\n swipeContainerRef.current.style.transform = translateY(\n Math.max(stateRef.current.scrollOffset, 0) + newSwipeOffset\n );\n }\n\n recalcScrollFlags();\n }\n },\n [recalcScrollFlags]\n );\n\n const handleSwipeCancel: SwipeEventHandler = useCallback(() => {\n if (stateRef.current.touchAction === 'swipe') {\n stateRef.current.swipeOffset = 0;\n stateRef.current.touchAction = null;\n\n if (swipeContainerRef.current !== null) {\n swipeContainerRef.current.classList.add(styles.swipeCancelAnimation);\n const swipeContainer = swipeContainerRef.current;\n setTimeout(() => swipeContainer.classList.remove(styles.swipeCancelAnimation), 100);\n swipeContainerRef.current.style.transform = translateY(Math.max(stateRef.current.scrollOffset, 0));\n }\n\n recalcScrollFlags();\n }\n }, [recalcScrollFlags]);\n\n const handleSwipeEnd: SwipeEventHandler = useCallback(() => {\n if (stateRef.current.touchAction === 'swipe') {\n onCloseRef.current();\n }\n }, []);\n\n const swipeHandlers = useSwipeHandlers({\n thresholdYRef: SWIPE_THRESHOLD,\n onSwipeMove: handleSwipeMove,\n onSwipeEnd: handleSwipeEnd,\n onSwipeCancel: handleSwipeCancel,\n });\n\n const initTransformHandlers = useCallback(() => {\n if (!visualContainerRef.current) {\n return void 0;\n }\n\n const handleScroll = (delta: number) => {\n if (\n LayoutMetrics.current.initialOffset !== 0 ||\n LayoutMetrics.current.contentHeight > LayoutMetrics.current.scrollContainerHeight\n ) {\n // храним неокругленное значение для translateY, чтобы анимация была плавнее\n let newScrollOffset = stateRef.current.scrollOffset + delta;\n const roundedNewScrollOffset = Math.round(newScrollOffset);\n\n if (roundedNewScrollOffset >= LayoutMetrics.current.initialOffset) {\n // скролла нет (touchAction is null)\n // либо контент проскроллен в начало, тогда не даем скроллить дальше\n newScrollOffset = LayoutMetrics.current.initialOffset;\n if (stateRef.current.touchAction === 'scroll') {\n stateRef.current.touchAction = 'complete';\n }\n } else if (\n LayoutMetrics.current.contentHeight + roundedNewScrollOffset <=\n LayoutMetrics.current.scrollContainerHeight\n ) {\n // скролла нет (touchAction is null)\n // либо контент проскроллен до конца, тогда не даем скроллить дальше\n newScrollOffset = LayoutMetrics.current.scrollContainerHeight - LayoutMetrics.current.contentHeight;\n if (stateRef.current.touchAction === 'scroll') {\n stateRef.current.touchAction = 'complete';\n }\n } else {\n // скролл в процессе\n stateRef.current.touchAction = 'scroll';\n }\n\n if (stateRef.current.scrollOffset !== newScrollOffset) {\n const offsetWasPositive = stateRef.current.scrollOffset > 0;\n stateRef.current.scrollOffset = newScrollOffset;\n\n if (contentRef.current !== null && swipeContainerRef.current !== null) {\n if (newScrollOffset > 0) {\n if (!offsetWasPositive) {\n contentRef.current.style.transform = translateY(0);\n }\n swipeContainerRef.current.style.transform = translateY(newScrollOffset);\n if (footerRef.current !== null) {\n footerRef.current.style.transform = translateY(-newScrollOffset);\n }\n } else {\n contentRef.current.style.transform = translateY(newScrollOffset);\n if (offsetWasPositive) {\n swipeContainerRef.current.style.transform = translateY(0);\n if (footerRef.current !== null) {\n footerRef.current.style.transform = translateY(0);\n }\n }\n }\n }\n\n recalcScrollFlags();\n scrollContextProviderRef.current?.notify({\n scrollTop: Math.max(-stateRef.current.scrollOffset, 0),\n });\n }\n }\n };\n\n const onTouchMove = (event: ScrollGestureEvent) => {\n if (\n (!allowScrollWhileFocused && stateRef.current.hasFocus) ||\n (stateRef.current.touchAction !== null && stateRef.current.touchAction !== 'scroll') ||\n hasSelectedText()\n ) {\n return;\n }\n handleScroll(event.delta);\n };\n\n const onWheelMove = (event: ScrollGestureEvent) => {\n if (!allowScrollWhileFocused && stateRef.current.hasFocus) {\n return;\n }\n handleScroll(event.delta);\n };\n\n const onTouchEnd = () => {\n if (stateRef.current.touchAction === 'scroll') {\n stateRef.current.touchAction = null;\n }\n };\n\n const handleTouchStart = (event: TouchEvent) => {\n if (stateRef.current.touchAction === 'complete') {\n stateRef.current.touchAction = null;\n }\n swipeHandlers.onTouchStart(event);\n };\n\n const handleTouchMove = (event: TouchEvent) => {\n event.preventDefault();\n event.stopPropagation();\n swipeHandlers.onTouchMove(event);\n };\n\n const removeScrollHandlers = initScrollHandlers({\n axis: 'vertical',\n wrapperRef: visualContainerRef,\n onTouchMove,\n onTouchEnd,\n onWheelMove,\n });\n const visualContainer = visualContainerRef.current;\n visualContainer.addEventListener('touchstart', handleTouchStart);\n visualContainer.addEventListener('touchmove', handleTouchMove);\n visualContainer.addEventListener('touchend', swipeHandlers.onTouchEnd);\n visualContainer.addEventListener('touchcancel', swipeHandlers.onTouchCancel);\n\n return () => {\n removeScrollHandlers();\n visualContainer.removeEventListener('touchstart', handleTouchStart);\n visualContainer.removeEventListener('touchmove', handleTouchMove);\n visualContainer.removeEventListener('touchend', swipeHandlers.onTouchEnd);\n visualContainer.removeEventListener('touchcancel', swipeHandlers.onTouchCancel);\n };\n }, [allowScrollWhileFocused, recalcScrollFlags, swipeHandlers]);\n\n const handleAppearAnimationEnd = useCallback(() => {\n exitHandlersRef.current.push(\n ...([initHeightObserver(), initTransformHandlers()].filter(Boolean) as VoidFunction[])\n );\n onAppearRef.current?.();\n }, [initHeightObserver, initTransformHandlers]);\n\n const { onTouchEnd, ...eventHandlers } = useNoBubbling();\n\n if (!animationTimeout) {\n return null;\n }\n\n const renderFunc = (appearTransition: TransitionStatus, heightTransition: TransitionStatus) => (\n <Layer layer={InternalLayerName.BottomSheet}>\n <div {...eventHandlers} className={styles.overlay}>\n <div\n className={classnames(styles.overlayBackground, {\n [styles.overlayBackgroundVisible]: showOverlay,\n [styles.appearAnimation]: appearTransition === 'entering',\n [styles.disappearAnimation]: appearTransition === 'exiting',\n })}\n {...(appearTransition === 'entered'\n ? { 'data-qa': 'bottom-sheet-overlay', onClick: onCloseRef.current }\n : {})}\n ref={overlayRef}\n />\n <div\n className={classnames(styles.swipeContainer, {\n [styles.appearAnimation]: appearTransition === 'entering',\n [styles.closeBySwipeAnimation]:\n appearTransition === 'exiting' && stateRef.current.touchAction === 'swipe',\n [styles.disappearAnimation]: appearTransition === 'exiting',\n })}\n data-qa={appearTransition === 'entered' ? 'bottom-sheet-container' : undefined}\n ref={swipeContainerRef}\n >\n <div\n className={classnames(styles.grabber, styles.grabberTransitionAnimation, {\n [styles.grabberEnsureSafe]: stateRef.current.grabberUnsafe,\n })}\n ref={grabberRef}\n />\n <div\n className={classnames(styles.visualContainer, {\n [styles.visualContainerFullScreen]: height === 'full-screen',\n [styles.heightTransitionAnimation]: heightTransition === 'entering',\n })}\n data-qa={appearTransition === 'entered' ? 'bottom-sheet-content' : undefined}\n ref={bottomSheetRef}\n >\n <CustomScrollContextProvider ref={scrollContextProviderRef}>\n <div className={styles.header} onFocus={handleFocus} ref={headerRef}>\n <NavigationBarContext.Provider value={NAVIGATION_BAR_CONTEXT_PROPS}>\n {header}\n </NavigationBarContext.Provider>\n </div>\n <div className={styles.scrollContainer} ref={scrollContainerRef}>\n <div\n className={classnames(styles.content, {\n [styles.contentFullScreen]: height === 'full-screen',\n [styles.contentWithPaddings]: withContentPaddings,\n [styles.contentWithoutHeader]: !header,\n [styles.contentSizedFullScreen]: isContentSizedFullHeight,\n })}\n ref={contentRef}\n >\n <BottomSheetContext.Provider value={contextValue}>\n {children}\n </BottomSheetContext.Provider>\n </div>\n </div>\n <div className={styles.footer} ref={footerRef}>\n {footer && (\n <div\n className={classnames(styles.divider, {\n [styles.dividerVisible]: stateRef.current.dividerVisible,\n })}\n ref={dividerRef}\n >\n <Divider />\n </div>\n )}\n {interceptClickHandlers ? <ClickInterceptor>{footer}</ClickInterceptor> : footer}\n </div>\n </CustomScrollContextProvider>\n </div>\n <div className={styles.contentOverlay} ref={contentOverlayRef} />\n </div>\n </div>\n </Layer>\n );\n\n return createPortal(\n <div\n className={styles.cssVariablesContainer}\n data-qa=\"bottom-sheet-css-variables\"\n ref={cssVariablesContainerRef}\n >\n <Transition\n appear\n in={currentVisible}\n mountOnEnter\n onEnter={setTransformToInvisible}\n onEntering={setTransformToVisible}\n onEntered={handleAppearAnimationEnd}\n onExit={handleExitAnimationStart}\n onExiting={setTransformToInvisible}\n onExited={handleExitAnimationEnd}\n timeout={animationTimeout.appear}\n unmountOnExit\n nodeRef={contentRef}\n >\n {(appearTransition) => (\n <Transition\n in={heightAnimationRunning}\n onEnter={handleHeightAnimationStart}\n onEntered={handleHeightAnimationEnd}\n timeout={animationTimeout.height}\n nodeRef={contentRef}\n >\n {(heightTransition) => renderFunc(appearTransition, heightTransition)}\n </Transition>\n )}\n </Transition>\n </div>,\n document.body\n );\n};\n\nexport const BottomSheet = forwardRef(BottomSheetRenderFunc);\n"],"names":["_jsx","_jsxs"],"mappings":";;;;;;;;;;;;;;;;;;;;AAoCA,MAAM,4BAA4B,GAA8B,EAAE,iBAAiB,EAAE,IAAI,EAAE,CAAC;AAE5F,MAAM,gCAAgC,GAAG,4BAA4B,CAAC;AACtE,MAAM,+BAA+B,GAAG,2BAA2B,CAAC;AACpE,MAAM,iCAAiC,GAAG,8BAA8B,CAAC;AACzE,MAAM,mCAAmC,GAAG,+BAA+B,CAAC;AAC5E,MAAM,sCAAsC,GAAG,kCAAkC,CAAC;AAElF,MAAM,eAAe,GAAG,MAAK;AACzB,IAAA,MAAM,SAAS,GAAG,QAAQ,CAAC,YAAY,EAAE,CAAC;IAC1C,OAAO,CAAC,CAAC,SAAS,IAAI,CAAC,SAAS,CAAC,WAAW,CAA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,MAAM,EACN,IAAA,EAAA,EAAE,EAAE,cAAc,EAClB,YAAY,EACZ,IAAA,EAAA,OAAO,EAAE,uBAAuB,EAChC,UAAU,EAAE,qBAAqB,EACjC,SAAS,EAAE,wBAAwB,EACnC,MAAM,EAAE,wBAAwB,EAChC,SAAS,EAAE,uBAAuB,EAClC,QAAQ,EAAE,sBAAsB,EAChC,OAAO,EAAE,gBAAgB,CAAC,MAAM,EAChC,aAAa,EACb,IAAA,EAAA,OAAO,EAAE,UAAU,EAElB,QAAA,EAAA,CAAC,gBAAgB,MACdA,GAAC,CAAA,UAAU,IACP,EAAE,EAAE,sBAAsB,EAC1B,OAAO,EAAE,0BAA0B,EACnC,SAAS,EAAE,wBAAwB,EACnC,OAAO,EAAE,gBAAgB,CAAC,MAAM,EAChC,OAAO,EAAE,UAAU,EAElB,QAAA,EAAA,CAAC,gBAAgB,KAAK,UAAU,CAAC,gBAAgB,EAAE,gBAAgB,CAAC,EAAA,CAC5D,CAChB,EAAA,CACQ,EACX,CAAA,EACN,QAAQ,CAAC,IAAI,CAChB,CAAC;AACN,CAAC,CAAC;MAEW,WAAW,GAAG,UAAU,CAAC,qBAAqB;;;;"}
|
|
1
|
+
{"version":3,"file":"BottomSheet.js","sources":["../src/BottomSheet.tsx"],"sourcesContent":["import {\n FocusEventHandler,\n ForwardRefRenderFunction,\n forwardRef,\n useCallback,\n useEffect,\n useMemo,\n useRef,\n useState,\n cloneElement,\n} from 'react';\nimport { createPortal } from 'react-dom';\nimport { Transition, TransitionStatus } from 'react-transition-group';\nimport classnames from 'classnames';\n\nimport { disableOverscroll, disableScroll } from '@hh.ru/magritte-common-modal-helper';\nimport { useMultipleRefs } from '@hh.ru/magritte-common-use-multiple-refs';\nimport { useNoBubbling } from '@hh.ru/magritte-common-use-no-bubbling';\nimport { useSwipeHandlers, SwipeEventHandler } from '@hh.ru/magritte-common-use-swipe';\nimport {\n ScrollGestureEvent,\n CustomScrollContextNotifier,\n CustomScrollContextProvider,\n initScrollHandlers,\n} from '@hh.ru/magritte-internal-custom-scroll';\nimport { InternalLayerName } from '@hh.ru/magritte-internal-layer-name';\nimport { isActionBarComponent } from '@hh.ru/magritte-ui-action-bar';\nimport { BottomSheetContext } from '@hh.ru/magritte-ui-bottom-sheet/BottomSheetContext';\nimport { ClickInterceptor } from '@hh.ru/magritte-ui-bottom-sheet/ClickInterceptor';\nimport { BottomSheetProps } from '@hh.ru/magritte-ui-bottom-sheet/types';\nimport { useBreakpoint } from '@hh.ru/magritte-ui-breakpoint';\nimport { Divider } from '@hh.ru/magritte-ui-divider';\nimport { Layer } from '@hh.ru/magritte-ui-layer';\nimport { NavigationBarContext, NavigationBarContextProps } from '@hh.ru/magritte-ui-navigation-bar';\nimport { isValidTreeSelectorWrapper } from '@hh.ru/magritte-ui-tree-selector';\n\nimport styles from './bottom-sheet.less';\n\nconst NAVIGATION_BAR_CONTEXT_PROPS: NavigationBarContextProps = { insideBottomSheet: true };\n\nconst CSS_VAR_ENTER_ANIMATION_DURATION = '--enter-animation-duration';\nconst CSS_VAR_EXIT_ANIMATION_DURATION = '--exit-animation-duration';\nconst CSS_VAR_HEIGHT_ANIMATION_DURATION = '--height-transition-duration';\nconst CSS_VAR_VIRTUAL_KEYBOARD_TOP_OFFSET = '--virtual-keyboard-top-offset';\nconst CSS_VAR_VIRTUAL_KEYBOARD_BOTTOM_OFFSET = '--virtual-keyboard-bottom-offset';\n\nconst hasSelectedText = () => {\n const selection = document.getSelection();\n return !!selection && !selection.isCollapsed;\n};\n\nconst isSafariFunc = () => {\n let lazyValue: boolean | null = null;\n return () => {\n if (lazyValue === null) {\n lazyValue = /^((?!chrome|android).)*safari/i.test(navigator.userAgent);\n }\n return lazyValue;\n };\n};\n\nconst toNumber = (value: string) => {\n const result = parseInt(value, 10);\n return Number.isInteger(result) ? result : 0;\n};\n\nconst translateY = (value: number) => `translate3d(0, ${value}px, 0)`;\n\ntype AnimationTimeout = { [AnimationType in 'appear' | 'height']: { [AnimationStage in 'enter' | 'exit']: number } };\n\ntype State = {\n dividerVisible: boolean;\n // если боттомшит упирается в верхний край экрана, челка может перекрыть граббер и его нужно переместить в safe area\n grabberUnsafe: boolean;\n hasFocus: boolean;\n resizeRAFHandle: ReturnType<typeof requestAnimationFrame> | null;\n // translateY для эмуляции скролла, отрицательный либо меньше LayoutMetrics.current.initialOffset\n scrollOffset: number;\n // translateY для эмуляции свайпа, всегда положительный либо 0\n swipeOffset: number;\n // текущее действие, инициированное пользователем\n touchAction:\n | null // может быть начато любое действие\n | 'complete' // палец приложен, но действие завершено — не реагируем на тач, пока пользователь не отпустит палец\n | 'scroll' // палец приложен, скроллим контент внутри боттомшита\n | 'swipe'; // палец приложен, свайпаем весь боттомшит вниз, чтобы закрыть его, или вверх, чтобы отменить свайп\n // число, на которое нужно анимировать изменение высоты контента боттомшита\n heightAnimationDiff: number | null;\n heightAnimationCallback?: VoidFunction | null;\n};\n\nconst INITIAL_STATE: State = {\n dividerVisible: false,\n grabberUnsafe: false,\n hasFocus: false,\n resizeRAFHandle: null,\n scrollOffset: 0,\n swipeOffset: 0,\n touchAction: null,\n heightAnimationDiff: null,\n};\n\nconst BottomSheetRenderFunc: ForwardRefRenderFunction<HTMLElement, BottomSheetProps> = (\n {\n allowScrollWhileFocused,\n children,\n footer,\n header,\n height = 'content',\n interceptClickHandlers = true,\n keyboardOverlaysContent = true,\n onAppear,\n onBeforeExit,\n onAfterExit,\n onClose,\n showDivider = 'with-scroll',\n showOverlay = true,\n visible = false,\n withContentPaddings = true,\n },\n ref\n) => {\n const DOCUMENT_HEIGHT = useRef(0);\n const SWIPE_THRESHOLD = useRef({ max: Infinity });\n\n const contentRef = useRef<HTMLDivElement>(null);\n const contentOverlayRef = useRef<HTMLDivElement>(null);\n const cssVariablesContainerRef = useRef<HTMLDivElement>(null);\n const dividerRef = useRef<HTMLDivElement>(null);\n const footerRef = useRef<HTMLDivElement>(null);\n const grabberRef = useRef<HTMLDivElement>(null);\n const headerRef = useRef<HTMLDivElement>(null);\n const overlayRef = useRef<HTMLDivElement>(null);\n const scrollContainerRef = useRef<HTMLDivElement>(null);\n const swipeContainerRef = useRef<HTMLDivElement>(null);\n const visualContainerRef = useRef<HTMLDivElement>(null);\n const bottomSheetRef = useMultipleRefs(ref, visualContainerRef);\n\n const { isMobile } = useBreakpoint();\n const currentVisible = isMobile && visible;\n const onAppearRef = useRef(onAppear);\n onAppearRef.current = onAppear;\n const onCloseRef = useRef(onClose);\n onCloseRef.current = onClose;\n const stateRef = useRef<State>({ ...INITIAL_STATE });\n const [animationTimeout, setAnimationTimeout] = useState<AnimationTimeout | null>(null);\n const [heightAnimationRunning, setHeightAnimationRunning] = useState(false);\n const contextValue = useMemo(() => ({ contentOverlayRef }), [contentOverlayRef]);\n const isSafari = useRef(isSafariFunc()).current;\n const scrollContextProviderRef = useRef<CustomScrollContextNotifier>(null);\n const exitHandlersRef = useRef<Array<VoidFunction>>([]);\n const isContentSizedFullHeight = isValidTreeSelectorWrapper(children);\n\n const LayoutMetrics = useRef(\n (() => {\n let cachedBottomSheetHeight: number | null = null;\n let cachedContentHeight: number | null = null;\n let cachedFooterHeight: number | null = null;\n let cachedHeaderHeight: number | null = null;\n let cachedInitialOffset: number | null = null;\n let cachedRemainingAvailableHeight: number | null = null;\n let cachedScrollContainerHeight: number | null = null;\n return {\n get bottomSheetHeight() {\n if (cachedBottomSheetHeight === null && visualContainerRef.current !== null) {\n cachedBottomSheetHeight = visualContainerRef.current.clientHeight;\n }\n return cachedBottomSheetHeight ?? 0;\n },\n get contentHeight() {\n if (cachedContentHeight === null && contentRef.current !== null) {\n cachedContentHeight = contentRef.current.clientHeight;\n }\n return cachedContentHeight ?? 0;\n },\n get footerHeight() {\n if (cachedFooterHeight === null && footerRef.current !== null) {\n cachedFooterHeight = footerRef.current.clientHeight;\n }\n return cachedFooterHeight ?? 0;\n },\n get headerHeight() {\n if (cachedHeaderHeight === null && headerRef.current !== null) {\n cachedHeaderHeight = headerRef.current.clientHeight;\n }\n return cachedHeaderHeight ?? 0;\n },\n get initialOffset() {\n if (\n cachedInitialOffset === null &&\n visualContainerRef.current !== null &&\n visualViewport !== null\n ) {\n cachedInitialOffset =\n height === 'half-screen'\n ? Math.max(\n Math.round(visualContainerRef.current.clientHeight - visualViewport.height / 2),\n 0\n )\n : 0;\n }\n return cachedInitialOffset ?? 0;\n },\n get remainingAvailableHeight() {\n if (cachedRemainingAvailableHeight === null && grabberRef.current !== null) {\n cachedRemainingAvailableHeight = grabberRef.current.offsetTop;\n }\n return cachedRemainingAvailableHeight ?? 0;\n },\n get scrollContainerHeight() {\n if (cachedScrollContainerHeight === null && scrollContainerRef.current !== null) {\n cachedScrollContainerHeight = scrollContainerRef.current.clientHeight;\n }\n return cachedScrollContainerHeight ?? 0;\n },\n invalidateCache() {\n cachedBottomSheetHeight = null;\n cachedContentHeight = null;\n cachedFooterHeight = null;\n cachedHeaderHeight = null;\n cachedInitialOffset = null;\n cachedRemainingAvailableHeight = null;\n cachedScrollContainerHeight = null;\n },\n };\n })()\n );\n\n const setCSSVariable = (name: string, value: string) =>\n cssVariablesContainerRef.current !== null && cssVariablesContainerRef.current.style.setProperty(name, value);\n\n useEffect(() => {\n if (!currentVisible) {\n return void 0;\n }\n\n DOCUMENT_HEIGHT.current = document.documentElement.clientHeight;\n if (visualViewport !== null) {\n SWIPE_THRESHOLD.current = { max: Math.round(visualViewport.height * 0.8) };\n }\n\n if (!showOverlay) {\n const enableOverscroll = disableOverscroll();\n return enableOverscroll;\n }\n\n const enableScroll = disableScroll();\n return enableScroll;\n }, [currentVisible, showOverlay]);\n\n useEffect(() => {\n const animationTimeoutElement = document.createElement('div');\n animationTimeoutElement.classList.add(styles.animationTimeout);\n document.body.appendChild(animationTimeoutElement);\n const style = window.getComputedStyle(animationTimeoutElement);\n const enter = toNumber(style.getPropertyValue(CSS_VAR_ENTER_ANIMATION_DURATION));\n const exit = toNumber(style.getPropertyValue(CSS_VAR_EXIT_ANIMATION_DURATION));\n const height = toNumber(style.getPropertyValue(CSS_VAR_HEIGHT_ANIMATION_DURATION));\n document.body.removeChild(animationTimeoutElement);\n setAnimationTimeout({ appear: { enter, exit }, height: { enter: height, exit } });\n }, [setAnimationTimeout]);\n\n // при изменении высоты контента анимируем ее\n // задаем боттомшиту фиксированную высоту и пересчитываем ее самостоятельно,\n // чтобы не было мерцания, когда новый контент отрисовался до срабатывания колбека ResizeObserver\n const initHeightObserver = useCallback(() => {\n if (!contentRef.current || !footerRef.current || !headerRef.current || !visualContainerRef.current) {\n return void 0;\n }\n\n const visualContainer = visualContainerRef.current;\n let prevContentHeight = 0;\n let prevHeaderHeight = 0;\n let prevFooterHeight = 0;\n let prevScrollContainerHeight = 0;\n let skipFirst = true;\n\n const observer = new ResizeObserver(() => {\n LayoutMetrics.current.invalidateCache();\n\n if (skipFirst) {\n visualContainer.style.height = `${LayoutMetrics.current.bottomSheetHeight}px`;\n prevHeaderHeight = LayoutMetrics.current.headerHeight;\n prevContentHeight = LayoutMetrics.current.contentHeight;\n prevFooterHeight = LayoutMetrics.current.footerHeight;\n prevScrollContainerHeight = LayoutMetrics.current.scrollContainerHeight;\n\n skipFirst = false;\n return;\n }\n\n if (stateRef.current.heightAnimationDiff !== null) {\n // если предыдущая анимация не завершилась, без анимации сбрасываем высоту на вычисленную браузером\n visualContainer.style.height = ``;\n } else {\n const contentHeightDiff = LayoutMetrics.current.contentHeight - prevContentHeight;\n const containersHeightDiff =\n LayoutMetrics.current.headerHeight -\n prevHeaderHeight +\n LayoutMetrics.current.footerHeight -\n prevFooterHeight;\n\n // предположим, что scrollContainer останется таким же или станет меньше\n // тогда можем рассчитать минимальную видимую высоту контента как min(scrollContainer.height, contentHeight)\n const prevVisibleContentHeight = Math.min(prevScrollContainerHeight, prevContentHeight);\n const newMinVisibleContentHeight = Math.min(\n prevScrollContainerHeight - containersHeightDiff,\n LayoutMetrics.current.contentHeight\n );\n const minVisibleContentHeightDiff = newMinVisibleContentHeight - prevVisibleContentHeight;\n\n // предположим, что scrollContainer станет больше\n // тогда контент не может увеличиться больше, чем на расстояние между боттомшитом и верхним краем экрана\n const maxVisibleContentHeightDiff =\n LayoutMetrics.current.remainingAvailableHeight - containersHeightDiff;\n\n const visibleContentHeightDiff = Math.min(\n Math.max(contentHeightDiff, minVisibleContentHeightDiff),\n maxVisibleContentHeightDiff\n );\n if (visibleContentHeightDiff !== 0) {\n scrollContextProviderRef.current?.notify({ scrollTop: 0 });\n }\n\n const heightAnimationDiff = visibleContentHeightDiff + containersHeightDiff;\n if (heightAnimationDiff !== 0) {\n // запоминаем высоту scrollContainer после того, как боттомшиту будет присвоена новая высота.\n // до этого значение некорректно, т.к. новый контент уже был отрендерен,\n // но в инлайн-стилях боттомшита остается старая высота\n stateRef.current.heightAnimationDiff = heightAnimationDiff;\n stateRef.current.heightAnimationCallback = () => {\n prevScrollContainerHeight = LayoutMetrics.current.scrollContainerHeight;\n };\n\n setHeightAnimationRunning(true);\n }\n }\n\n prevHeaderHeight = LayoutMetrics.current.headerHeight;\n prevContentHeight = LayoutMetrics.current.contentHeight;\n prevFooterHeight = LayoutMetrics.current.footerHeight;\n });\n\n observer.observe(headerRef.current);\n observer.observe(contentRef.current);\n observer.observe(footerRef.current);\n return () => observer.disconnect();\n }, [setHeightAnimationRunning]);\n\n useEffect(() => {\n if (!currentVisible || isSafari()) {\n return;\n }\n\n // используем Virtual Keyboard API через meta-тег вместо navigator.virtualKeyboard,\n // потому что второй способ работает только на страницах, открытых через HTTPS, что мешает тестированию\n let meta = document.querySelector('meta[name=\"viewport\"]');\n if (!meta) {\n meta = document.createElement('meta');\n meta.setAttribute('name', 'viewport');\n document.head.appendChild(meta);\n }\n const attributesStr = meta.getAttribute('content');\n const attributes = (\n attributesStr !== null\n ? Object.fromEntries(attributesStr.split(',').map((keyValuePairStr) => keyValuePairStr.split('=')))\n : {}\n ) as Record<string, string>;\n attributes['interactive-widget'] = keyboardOverlaysContent ? 'resizes-visual' : 'resizes-content';\n const attributesStrUpdated = Object.entries(attributes)\n .map((keyValuePair) => keyValuePair.join('='))\n .join(',');\n meta.setAttribute('content', attributesStrUpdated);\n }, [currentVisible, isSafari, keyboardOverlaysContent]);\n\n const recalcKeyboardOffsets = useCallback(() => {\n if (!headerRef.current || !overlayRef.current || !visualViewport) {\n return;\n }\n\n if (stateRef.current.hasFocus) {\n // терминология: https://developer.chrome.com/blog/viewport-resize-behavior/\n //\n // делим браузеры на три группы в зависимости от поведения при открытии виртуальной клавиатуры:\n // 1. Safari — ресайзит Visual Viewport, не меняет Layout Viewport.\n // В нем не нужно ничего корректировать при keyboardOverlaysContent=true,\n // а при keyboardOverlaysContent=false нужно сдвинуть НИЖНИЙ край контейнера ВВЕРХ,\n // чтобы он совпал с границей Visual Viewport\n // 2. Chrome < 108 & Chromium-based — ресайзит и Visual Viewport, и Layout Viewport.\n // В нем не нужно ничего корректировать при keyboardOverlaysContent=false,\n // а при keyboardOverlaysContent=true нужно сдвинуть НИЖНИЙ край контейнера ВНИЗ,\n // чтобы футер уехал под клавиатуру\n // 3. Chrome >= 108 — поддерживает Virtual Keyboard API и meta-тег interactive-widget.\n // Используем поведение `resizes-visual` (как в Safari) в случае keyboardOverlaysContent=true\n // и `resizes-content` (как в Chrome < 108 & Chromium-based) в случае keyboardOverlaysContent=false\n // Таким образом в нем ничего не нужно корректировать\n\n const overlayDOMRect = overlayRef.current.getBoundingClientRect();\n\n // любой браузер может сдвинуть Visual Viewport вверх, если фокусируемый инпут находится близко к нижней границе\n // из-за этого может возникнуть проблема, что ВЕРХНИЙ край контента уехал за границу Visual Viewport\n // сдвигаем ВЕРХНИЙ край контейнера ВНИЗ, чтобы он совпал с границей Visual Viewport\n const visualViewportShift = Math.round(-overlayDOMRect.top);\n\n // keyboardOverlaysContent=true, клавиатура ПОВЕРХ контента\n // этот кейс нужно корректировать только в Chrome < 108 & Chromium-based\n if (keyboardOverlaysContent) {\n // браузеры из этой группы меняют Layout Viewport\n const layoutViewportDiff = Math.round(DOCUMENT_HEIGHT.current - document.documentElement.clientHeight);\n if (layoutViewportDiff > 0) {\n setCSSVariable(CSS_VAR_VIRTUAL_KEYBOARD_TOP_OFFSET, `${visualViewportShift}px`);\n // сдвигаем НИЖНИЙ край контейнера ВНИЗ, чтобы футер уехал под клавиатуру\n setCSSVariable(CSS_VAR_VIRTUAL_KEYBOARD_BOTTOM_OFFSET, `${-layoutViewportDiff}px`);\n\n // при этом может возникнуть проблема, что клавиатура перекрыла хедер\n // проверяем это и компенсируем величину перекрытия при необходимости\n const headerDOMRect = headerRef.current.getBoundingClientRect();\n const headerOutOfViewportHeight = Math.round(\n headerDOMRect.bottom + layoutViewportDiff - DOCUMENT_HEIGHT.current\n );\n if (headerOutOfViewportHeight > 0) {\n setCSSVariable(\n CSS_VAR_VIRTUAL_KEYBOARD_BOTTOM_OFFSET,\n `${headerOutOfViewportHeight - layoutViewportDiff}px`\n );\n }\n }\n }\n\n // keyboardOverlaysContent=false, клавиатура ПОД контентом\n // этот кейс нужно корректировать только в Safari\n if (!keyboardOverlaysContent && isSafari()) {\n const visualViewportDiff = Math.round(overlayDOMRect.bottom - visualViewport.height);\n if (visualViewportDiff > 0) {\n setCSSVariable(CSS_VAR_VIRTUAL_KEYBOARD_TOP_OFFSET, `${visualViewportShift}px`);\n // сдвигаем НИЖНИЙ край контейнера ВВЕРХ, чтобы он совпал с границей Visual Viewport\n setCSSVariable(CSS_VAR_VIRTUAL_KEYBOARD_BOTTOM_OFFSET, `${visualViewportDiff}px`);\n }\n }\n } else {\n setCSSVariable(CSS_VAR_VIRTUAL_KEYBOARD_TOP_OFFSET, `0px`);\n setCSSVariable(CSS_VAR_VIRTUAL_KEYBOARD_BOTTOM_OFFSET, `0px`);\n }\n }, [isSafari, keyboardOverlaysContent]);\n\n const handleFocus: FocusEventHandler = useCallback(\n (event) => {\n const focusedElement = event.target;\n const initialViewportHeight = visualViewport?.height;\n const resizeRAFStart = performance.now();\n\n if (!(focusedElement instanceof HTMLInputElement) || stateRef.current.resizeRAFHandle !== null) {\n return;\n }\n\n const handleResize = () => {\n if (stateRef.current.resizeRAFHandle !== null) {\n cancelAnimationFrame(stateRef.current.resizeRAFHandle);\n stateRef.current.resizeRAFHandle = null;\n }\n\n recalcKeyboardOffsets();\n\n if (!stateRef.current.hasFocus) {\n visualViewport?.removeEventListener('resize', handleResize);\n }\n };\n\n // если спамить фокус/блюр инпута, ивент visualViewport.resize может не долететь\n // поэтому проверяем изменение высоты в рекурсивном RAF\n const waitForResize = () => {\n if (performance.now() - resizeRAFStart > 1000 || visualViewport?.height !== initialViewportHeight) {\n visualViewport?.removeEventListener('resize', handleResize);\n stateRef.current.resizeRAFHandle = null;\n recalcKeyboardOffsets();\n } else {\n stateRef.current.resizeRAFHandle = requestAnimationFrame(waitForResize);\n }\n };\n\n const handleBlur = () => {\n if (isSafari()) {\n setCSSVariable(CSS_VAR_VIRTUAL_KEYBOARD_TOP_OFFSET, `0px`);\n setCSSVariable(CSS_VAR_VIRTUAL_KEYBOARD_BOTTOM_OFFSET, `0px`);\n }\n\n stateRef.current.hasFocus = false;\n if (stateRef.current.resizeRAFHandle !== null) {\n cancelAnimationFrame(stateRef.current.resizeRAFHandle);\n stateRef.current.resizeRAFHandle = null;\n }\n focusedElement.removeEventListener('blur', handleBlur);\n };\n\n stateRef.current.hasFocus = true;\n stateRef.current.resizeRAFHandle = requestAnimationFrame(waitForResize);\n visualViewport?.addEventListener('resize', handleResize);\n focusedElement.addEventListener('blur', handleBlur);\n },\n [isSafari, recalcKeyboardOffsets]\n );\n\n // contentOverlay совпадает по границам с контентом боттомшита, но лежит вне боттомшита,\n // чтобы чайлды contentOverlay не обрезались границами боттомшита\n // например, снекбар, лежащий внутри contentOverlay, при смахивании может оказаться в любом месте экрана\n // поэтому позицию contentOverlay нужно синхронизировать\n const recalcContentOverlayPosition = useCallback(() => {\n if (\n contentOverlayRef.current !== null &&\n scrollContainerRef.current !== null &&\n visualContainerRef.current !== null\n ) {\n contentOverlayRef.current.style.top = `${\n scrollContainerRef.current.offsetTop + visualContainerRef.current.offsetTop\n }px`;\n contentOverlayRef.current.style.height = `${scrollContainerRef.current.clientHeight}px`;\n }\n }, []);\n\n const recalcScrollFlags = useCallback(() => {\n if (dividerRef.current !== null) {\n const prevDividerVisible = stateRef.current.dividerVisible;\n const isNotScrolledToEnd =\n LayoutMetrics.current.contentHeight + stateRef.current.scrollOffset >\n LayoutMetrics.current.scrollContainerHeight;\n stateRef.current.dividerVisible =\n showDivider === 'always' || (showDivider === 'with-scroll' && isNotScrolledToEnd);\n if (stateRef.current.dividerVisible !== prevDividerVisible) {\n dividerRef.current.classList.toggle(styles.dividerVisible, stateRef.current.dividerVisible);\n }\n }\n\n if (grabberRef.current !== null) {\n const prevGrabberUnsafe = stateRef.current.grabberUnsafe;\n stateRef.current.grabberUnsafe =\n Math.round(Math.max(stateRef.current.scrollOffset, 0) + stateRef.current.swipeOffset) ===\n LayoutMetrics.current.remainingAvailableHeight;\n if (stateRef.current.grabberUnsafe !== prevGrabberUnsafe) {\n grabberRef.current.classList.toggle(styles.grabberEnsureSafe, stateRef.current.grabberUnsafe);\n }\n }\n }, [showDivider]);\n\n // помещает боттомшит в позицию вне экрана снизу, которая может быть начальной либо конечной точкой анимации\n const setTransformToInvisible = useCallback(() => {\n LayoutMetrics.current.invalidateCache();\n\n if (overlayRef.current !== null) {\n overlayRef.current.style.opacity = `0`;\n }\n if (swipeContainerRef.current !== null) {\n swipeContainerRef.current.style.transform = translateY(LayoutMetrics.current.bottomSheetHeight);\n }\n\n requestAnimationFrame(recalcContentOverlayPosition);\n requestAnimationFrame(recalcScrollFlags);\n }, [recalcContentOverlayPosition, recalcScrollFlags]);\n\n // помещает боттомшит в дефолтную позицию на экране, которая может быть начальной либо конечной точкой анимации\n const setTransformToVisible = useCallback(() => {\n LayoutMetrics.current.invalidateCache();\n\n stateRef.current.scrollOffset = LayoutMetrics.current.initialOffset;\n\n if (overlayRef.current !== null) {\n overlayRef.current.style.opacity = `1`;\n }\n if (swipeContainerRef.current !== null) {\n swipeContainerRef.current.style.transform = translateY(\n LayoutMetrics.current.initialOffset + stateRef.current.swipeOffset\n );\n }\n if (footerRef.current !== null) {\n footerRef.current.style.transform = translateY(-LayoutMetrics.current.initialOffset);\n }\n\n requestAnimationFrame(recalcContentOverlayPosition);\n requestAnimationFrame(recalcScrollFlags);\n scrollContextProviderRef.current?.notify({ scrollTop: 0 });\n }, [recalcContentOverlayPosition, recalcScrollFlags]);\n\n const handleExitAnimationStart = useCallback(() => {\n setTransformToVisible();\n onBeforeExit?.();\n }, [setTransformToVisible, onBeforeExit]);\n\n const handleExitAnimationEnd = useCallback(() => {\n setCSSVariable(CSS_VAR_VIRTUAL_KEYBOARD_TOP_OFFSET, `0px`);\n setCSSVariable(CSS_VAR_VIRTUAL_KEYBOARD_BOTTOM_OFFSET, `0px`);\n\n stateRef.current.resizeRAFHandle !== null && cancelAnimationFrame(stateRef.current.resizeRAFHandle);\n stateRef.current = { ...INITIAL_STATE };\n\n exitHandlersRef.current.forEach((handler) => handler());\n exitHandlersRef.current = [];\n onAfterExit?.();\n }, [onAfterExit]);\n\n const handleHeightAnimationStart = useCallback(() => {\n LayoutMetrics.current.invalidateCache();\n\n stateRef.current.scrollOffset = LayoutMetrics.current.initialOffset;\n stateRef.current.swipeOffset = 0;\n\n if (contentRef.current !== null) {\n contentRef.current.style.transform = translateY(0);\n }\n if (swipeContainerRef.current !== null) {\n swipeContainerRef.current.style.transform = translateY(LayoutMetrics.current.initialOffset);\n }\n if (stateRef.current.heightAnimationDiff !== null && visualContainerRef.current !== null) {\n visualContainerRef.current.style.height = `${\n LayoutMetrics.current.bottomSheetHeight + stateRef.current.heightAnimationDiff\n }px`;\n }\n }, []);\n\n const handleHeightAnimationEnd = useCallback(() => {\n LayoutMetrics.current.invalidateCache();\n\n if (visualContainerRef.current !== null) {\n visualContainerRef.current.style.height = `${LayoutMetrics.current.bottomSheetHeight}px`;\n }\n\n stateRef.current.heightAnimationDiff = null;\n stateRef.current.heightAnimationCallback && requestAnimationFrame(stateRef.current.heightAnimationCallback);\n stateRef.current.heightAnimationCallback = null;\n setHeightAnimationRunning(false);\n\n requestAnimationFrame(recalcContentOverlayPosition);\n requestAnimationFrame(recalcScrollFlags);\n }, [setHeightAnimationRunning, recalcContentOverlayPosition, recalcScrollFlags]);\n\n const handleSwipeMove: SwipeEventHandler = useCallback(\n (event) => {\n if (\n (stateRef.current.touchAction !== null && stateRef.current.touchAction !== 'swipe') ||\n hasSelectedText()\n ) {\n return;\n }\n\n // храним неокругленное значение для translateY, чтобы анимация была плавнее\n let newSwipeOffset = stateRef.current.swipeOffset + event.deltaY;\n if (Math.round(newSwipeOffset) <= 0) {\n // боттомшит уперся в верхний край экрана, не даем свайпать дальше\n newSwipeOffset = 0;\n if (stateRef.current.touchAction === 'swipe') {\n stateRef.current.touchAction = 'complete';\n }\n } else {\n // свайп в процессе\n stateRef.current.touchAction = 'swipe';\n }\n\n if (stateRef.current.swipeOffset !== newSwipeOffset) {\n stateRef.current.swipeOffset = newSwipeOffset;\n\n if (swipeContainerRef.current !== null) {\n swipeContainerRef.current.style.transform = translateY(\n Math.max(stateRef.current.scrollOffset, 0) + newSwipeOffset\n );\n }\n\n recalcScrollFlags();\n }\n },\n [recalcScrollFlags]\n );\n\n const handleSwipeCancel: SwipeEventHandler = useCallback(() => {\n if (stateRef.current.touchAction === 'swipe') {\n stateRef.current.swipeOffset = 0;\n stateRef.current.touchAction = null;\n\n if (swipeContainerRef.current !== null) {\n swipeContainerRef.current.classList.add(styles.swipeCancelAnimation);\n const swipeContainer = swipeContainerRef.current;\n setTimeout(() => swipeContainer.classList.remove(styles.swipeCancelAnimation), 100);\n swipeContainerRef.current.style.transform = translateY(Math.max(stateRef.current.scrollOffset, 0));\n }\n\n recalcScrollFlags();\n }\n }, [recalcScrollFlags]);\n\n const handleSwipeEnd: SwipeEventHandler = useCallback(() => {\n if (stateRef.current.touchAction === 'swipe') {\n onCloseRef.current();\n }\n }, []);\n\n const swipeHandlers = useSwipeHandlers({\n thresholdYRef: SWIPE_THRESHOLD,\n onSwipeMove: handleSwipeMove,\n onSwipeEnd: handleSwipeEnd,\n onSwipeCancel: handleSwipeCancel,\n });\n\n const initTransformHandlers = useCallback(() => {\n if (!visualContainerRef.current) {\n return void 0;\n }\n\n const handleScroll = (delta: number) => {\n if (\n LayoutMetrics.current.initialOffset !== 0 ||\n LayoutMetrics.current.contentHeight > LayoutMetrics.current.scrollContainerHeight\n ) {\n // храним неокругленное значение для translateY, чтобы анимация была плавнее\n let newScrollOffset = stateRef.current.scrollOffset + delta;\n const roundedNewScrollOffset = Math.round(newScrollOffset);\n\n if (roundedNewScrollOffset >= LayoutMetrics.current.initialOffset) {\n // скролла нет (touchAction is null)\n // либо контент проскроллен в начало, тогда не даем скроллить дальше\n newScrollOffset = LayoutMetrics.current.initialOffset;\n if (stateRef.current.touchAction === 'scroll') {\n stateRef.current.touchAction = 'complete';\n }\n } else if (\n LayoutMetrics.current.contentHeight + roundedNewScrollOffset <=\n LayoutMetrics.current.scrollContainerHeight\n ) {\n // скролла нет (touchAction is null)\n // либо контент проскроллен до конца, тогда не даем скроллить дальше\n newScrollOffset = LayoutMetrics.current.scrollContainerHeight - LayoutMetrics.current.contentHeight;\n if (stateRef.current.touchAction === 'scroll') {\n stateRef.current.touchAction = 'complete';\n }\n } else {\n // скролл в процессе\n stateRef.current.touchAction = 'scroll';\n }\n\n if (stateRef.current.scrollOffset !== newScrollOffset) {\n const offsetWasPositive = stateRef.current.scrollOffset > 0;\n stateRef.current.scrollOffset = newScrollOffset;\n\n if (contentRef.current !== null && swipeContainerRef.current !== null) {\n if (newScrollOffset > 0) {\n if (!offsetWasPositive) {\n contentRef.current.style.transform = translateY(0);\n }\n swipeContainerRef.current.style.transform = translateY(newScrollOffset);\n if (footerRef.current !== null) {\n footerRef.current.style.transform = translateY(-newScrollOffset);\n }\n } else {\n contentRef.current.style.transform = translateY(newScrollOffset);\n if (offsetWasPositive) {\n swipeContainerRef.current.style.transform = translateY(0);\n if (footerRef.current !== null) {\n footerRef.current.style.transform = translateY(0);\n }\n }\n }\n }\n\n recalcScrollFlags();\n scrollContextProviderRef.current?.notify({\n scrollTop: Math.max(-stateRef.current.scrollOffset, 0),\n });\n }\n }\n };\n\n const onTouchMove = (event: ScrollGestureEvent) => {\n if (\n (!allowScrollWhileFocused && stateRef.current.hasFocus) ||\n (stateRef.current.touchAction !== null && stateRef.current.touchAction !== 'scroll') ||\n hasSelectedText()\n ) {\n return;\n }\n handleScroll(event.delta);\n };\n\n const onWheelMove = (event: ScrollGestureEvent) => {\n if (!allowScrollWhileFocused && stateRef.current.hasFocus) {\n return;\n }\n handleScroll(event.delta);\n };\n\n const onTouchEnd = () => {\n if (stateRef.current.touchAction === 'scroll') {\n stateRef.current.touchAction = null;\n }\n };\n\n const handleTouchStart = (event: TouchEvent) => {\n if (stateRef.current.touchAction === 'complete') {\n stateRef.current.touchAction = null;\n }\n swipeHandlers.onTouchStart(event);\n };\n\n const handleTouchMove = (event: TouchEvent) => {\n event.preventDefault();\n event.stopPropagation();\n swipeHandlers.onTouchMove(event);\n };\n\n const removeScrollHandlers = initScrollHandlers({\n axis: 'vertical',\n wrapperRef: visualContainerRef,\n onTouchMove,\n onTouchEnd,\n onWheelMove,\n });\n const visualContainer = visualContainerRef.current;\n visualContainer.addEventListener('touchstart', handleTouchStart);\n visualContainer.addEventListener('touchmove', handleTouchMove);\n visualContainer.addEventListener('touchend', swipeHandlers.onTouchEnd);\n visualContainer.addEventListener('touchcancel', swipeHandlers.onTouchCancel);\n\n return () => {\n removeScrollHandlers();\n visualContainer.removeEventListener('touchstart', handleTouchStart);\n visualContainer.removeEventListener('touchmove', handleTouchMove);\n visualContainer.removeEventListener('touchend', swipeHandlers.onTouchEnd);\n visualContainer.removeEventListener('touchcancel', swipeHandlers.onTouchCancel);\n };\n }, [allowScrollWhileFocused, recalcScrollFlags, swipeHandlers]);\n\n const handleAppearAnimationEnd = useCallback(() => {\n exitHandlersRef.current.push(\n ...([initHeightObserver(), initTransformHandlers()].filter(Boolean) as VoidFunction[])\n );\n onAppearRef.current?.();\n }, [initHeightObserver, initTransformHandlers]);\n\n const { onTouchEnd, ...eventHandlers } = useNoBubbling();\n\n if (!animationTimeout) {\n return null;\n }\n\n const clonedFooter =\n footer && isActionBarComponent(footer) ? cloneElement(footer, { type: footer.props.type || 'mobile' }) : footer;\n\n const renderFunc = (appearTransition: TransitionStatus, heightTransition: TransitionStatus) => (\n <Layer layer={InternalLayerName.BottomSheet}>\n <div {...eventHandlers} className={styles.overlay}>\n <div\n className={classnames(styles.overlayBackground, {\n [styles.overlayBackgroundVisible]: showOverlay,\n [styles.appearAnimation]: appearTransition === 'entering',\n [styles.disappearAnimation]: appearTransition === 'exiting',\n })}\n {...(appearTransition === 'entered'\n ? { 'data-qa': 'bottom-sheet-overlay', onClick: onCloseRef.current }\n : {})}\n ref={overlayRef}\n />\n <div\n className={classnames(styles.swipeContainer, {\n [styles.appearAnimation]: appearTransition === 'entering',\n [styles.closeBySwipeAnimation]:\n appearTransition === 'exiting' && stateRef.current.touchAction === 'swipe',\n [styles.disappearAnimation]: appearTransition === 'exiting',\n })}\n data-qa={appearTransition === 'entered' ? 'bottom-sheet-container' : undefined}\n ref={swipeContainerRef}\n >\n <div\n className={classnames(styles.grabber, styles.grabberTransitionAnimation, {\n [styles.grabberEnsureSafe]: stateRef.current.grabberUnsafe,\n })}\n ref={grabberRef}\n />\n <div\n className={classnames(styles.visualContainer, {\n [styles.visualContainerFullScreen]: height === 'full-screen',\n [styles.heightTransitionAnimation]: heightTransition === 'entering',\n })}\n data-qa={appearTransition === 'entered' ? 'bottom-sheet-content' : undefined}\n ref={bottomSheetRef}\n >\n <CustomScrollContextProvider ref={scrollContextProviderRef}>\n <div className={styles.header} onFocus={handleFocus} ref={headerRef}>\n <NavigationBarContext.Provider value={NAVIGATION_BAR_CONTEXT_PROPS}>\n {header}\n </NavigationBarContext.Provider>\n </div>\n <div className={styles.scrollContainer} ref={scrollContainerRef}>\n <div\n className={classnames(styles.content, {\n [styles.contentFullScreen]: height === 'full-screen',\n [styles.contentWithPaddings]: withContentPaddings,\n [styles.contentWithoutHeader]: !header,\n [styles.contentSizedFullScreen]: isContentSizedFullHeight,\n })}\n ref={contentRef}\n >\n <BottomSheetContext.Provider value={contextValue}>\n {children}\n </BottomSheetContext.Provider>\n </div>\n </div>\n <div className={styles.footer} ref={footerRef}>\n {footer && (\n <div\n className={classnames(styles.divider, {\n [styles.dividerVisible]: stateRef.current.dividerVisible,\n })}\n ref={dividerRef}\n >\n <Divider />\n </div>\n )}\n {interceptClickHandlers ? (\n <ClickInterceptor>{clonedFooter}</ClickInterceptor>\n ) : (\n clonedFooter\n )}\n </div>\n </CustomScrollContextProvider>\n </div>\n <div className={styles.contentOverlay} ref={contentOverlayRef} />\n </div>\n </div>\n </Layer>\n );\n\n return createPortal(\n <div\n className={styles.cssVariablesContainer}\n data-qa=\"bottom-sheet-css-variables\"\n ref={cssVariablesContainerRef}\n >\n <Transition\n appear\n in={currentVisible}\n mountOnEnter\n onEnter={setTransformToInvisible}\n onEntering={setTransformToVisible}\n onEntered={handleAppearAnimationEnd}\n onExit={handleExitAnimationStart}\n onExiting={setTransformToInvisible}\n onExited={handleExitAnimationEnd}\n timeout={animationTimeout.appear}\n unmountOnExit\n nodeRef={contentRef}\n >\n {(appearTransition) => (\n <Transition\n in={heightAnimationRunning}\n onEnter={handleHeightAnimationStart}\n onEntered={handleHeightAnimationEnd}\n timeout={animationTimeout.height}\n nodeRef={contentRef}\n >\n {(heightTransition) => renderFunc(appearTransition, heightTransition)}\n </Transition>\n )}\n </Transition>\n </div>,\n document.body\n );\n};\n\nexport const BottomSheet = forwardRef(BottomSheetRenderFunc);\n"],"names":["_jsx","_jsxs"],"mappings":";;;;;;;;;;;;;;;;;;;;;AAsCA,MAAM,4BAA4B,GAA8B,EAAE,iBAAiB,EAAE,IAAI,EAAE,CAAC;AAE5F,MAAM,gCAAgC,GAAG,4BAA4B,CAAC;AACtE,MAAM,+BAA+B,GA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1,6 +1,6 @@
|
|
|
1
1
|
import './index.css';
|
|
2
2
|
import { jsx } from 'react/jsx-runtime';
|
|
3
|
-
import { s as styles } from './bottom-sheet-
|
|
3
|
+
import { s as styles } from './bottom-sheet-DDCdnuHN.js';
|
|
4
4
|
|
|
5
5
|
const BottomSheetFooter = ({ children }) => (jsx("div", { className: styles.footerWithPadding, children: children }));
|
|
6
6
|
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import './index.css';
|
|
2
|
+
var styles = {"flex-container":"magritte-flex-container___muHAx_5-3-26","flexContainer":"magritte-flex-container___muHAx_5-3-26","animation-timeout":"magritte-animation-timeout___yd-SZ_5-3-26","animationTimeout":"magritte-animation-timeout___yd-SZ_5-3-26","css-variables-container":"magritte-css-variables-container___jBCr9_5-3-26","cssVariablesContainer":"magritte-css-variables-container___jBCr9_5-3-26","appear-animation":"magritte-appear-animation___P84Ln_5-3-26","appearAnimation":"magritte-appear-animation___P84Ln_5-3-26","disappear-animation":"magritte-disappear-animation___Putks_5-3-26","disappearAnimation":"magritte-disappear-animation___Putks_5-3-26","grabber-transition-animation":"magritte-grabber-transition-animation___s3Oh4_5-3-26","grabberTransitionAnimation":"magritte-grabber-transition-animation___s3Oh4_5-3-26","height-transition-animation":"magritte-height-transition-animation___xNprr_5-3-26","heightTransitionAnimation":"magritte-height-transition-animation___xNprr_5-3-26","close-by-swipe-animation":"magritte-close-by-swipe-animation___wdezY_5-3-26","closeBySwipeAnimation":"magritte-close-by-swipe-animation___wdezY_5-3-26","swipe-cancel-animation":"magritte-swipe-cancel-animation___AhYj5_5-3-26","swipeCancelAnimation":"magritte-swipe-cancel-animation___AhYj5_5-3-26","overlay":"magritte-overlay___5a2U-_5-3-26","overlay-background":"magritte-overlay-background___8Sd4V_5-3-26","overlayBackground":"magritte-overlay-background___8Sd4V_5-3-26","overlay-background_visible":"magritte-overlay-background_visible___FOJgj_5-3-26","overlayBackgroundVisible":"magritte-overlay-background_visible___FOJgj_5-3-26","swipe-container":"magritte-swipe-container___sZ2n5_5-3-26","swipeContainer":"magritte-swipe-container___sZ2n5_5-3-26","grabber":"magritte-grabber___A7SB-_5-3-26","grabber_ensure-safe":"magritte-grabber_ensure-safe___DR-dV_5-3-26","grabberEnsureSafe":"magritte-grabber_ensure-safe___DR-dV_5-3-26","visual-container":"magritte-visual-container___-VSuY_5-3-26","visualContainer":"magritte-visual-container___-VSuY_5-3-26","visual-container_full-screen":"magritte-visual-container_full-screen___jCCBb_5-3-26","visualContainerFullScreen":"magritte-visual-container_full-screen___jCCBb_5-3-26","header":"magritte-header___5mMtj_5-3-26","scroll-container":"magritte-scroll-container___4ngNY_5-3-26","scrollContainer":"magritte-scroll-container___4ngNY_5-3-26","content":"magritte-content___1gAwP_5-3-26","content_full-screen":"magritte-content_full-screen___2SFaO_5-3-26","contentFullScreen":"magritte-content_full-screen___2SFaO_5-3-26","content_sized-full-screen":"magritte-content_sized-full-screen___45pa6_5-3-26","contentSizedFullScreen":"magritte-content_sized-full-screen___45pa6_5-3-26","content_with-paddings":"magritte-content_with-paddings___gIiAv_5-3-26","contentWithPaddings":"magritte-content_with-paddings___gIiAv_5-3-26","content_without-header":"magritte-content_without-header___YZR38_5-3-26","contentWithoutHeader":"magritte-content_without-header___YZR38_5-3-26","footer":"magritte-footer___RWslT_5-3-26","footer-with-padding":"magritte-footer-with-padding___KwkhC_5-3-26","footerWithPadding":"magritte-footer-with-padding___KwkhC_5-3-26","divider":"magritte-divider___0F8hh_5-3-26","divider_visible":"magritte-divider_visible___pAWZM_5-3-26","dividerVisible":"magritte-divider_visible___pAWZM_5-3-26","content-overlay":"magritte-content-overlay___HAyzL_5-3-26","contentOverlay":"magritte-content-overlay___HAyzL_5-3-26"};
|
|
3
|
+
|
|
4
|
+
export { styles as s };
|
|
5
|
+
//# sourceMappingURL=bottom-sheet-DDCdnuHN.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"bottom-sheet-DDCdnuHN.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;"}
|
package/index.css
CHANGED
|
@@ -19,13 +19,13 @@
|
|
|
19
19
|
--magritte-color-component-bottom-sheet-grabber-content-v19-0-0:#c6c6c68f;
|
|
20
20
|
--magritte-color-component-_overlay-background-content-v19-0-0:#26262699;
|
|
21
21
|
}
|
|
22
|
-
.magritte-flex-container___muHAx_5-3-
|
|
22
|
+
.magritte-flex-container___muHAx_5-3-26{
|
|
23
23
|
display:flex;
|
|
24
24
|
flex-direction:column;
|
|
25
25
|
align-items:stretch;
|
|
26
26
|
}
|
|
27
|
-
.magritte-animation-timeout___yd-SZ_5-3-
|
|
28
|
-
.magritte-css-variables-container___jBCr9_5-3-
|
|
27
|
+
.magritte-animation-timeout___yd-SZ_5-3-26,
|
|
28
|
+
.magritte-css-variables-container___jBCr9_5-3-26{
|
|
29
29
|
--virtual-keyboard-top-offset:0px;
|
|
30
30
|
--virtual-keyboard-bottom-offset:0px;
|
|
31
31
|
--enter-animation-duration:0ms;
|
|
@@ -35,8 +35,8 @@
|
|
|
35
35
|
--swipe-cancel-transition-duration:0ms;
|
|
36
36
|
}
|
|
37
37
|
@media (prefers-reduced-motion: no-preference){
|
|
38
|
-
.magritte-animation-timeout___yd-SZ_5-3-
|
|
39
|
-
.magritte-css-variables-container___jBCr9_5-3-
|
|
38
|
+
.magritte-animation-timeout___yd-SZ_5-3-26,
|
|
39
|
+
.magritte-css-variables-container___jBCr9_5-3-26{
|
|
40
40
|
--enter-animation-duration:var(--magritte-semantic-animation-ease-in-out-300-duration-v19-0-0);
|
|
41
41
|
--exit-animation-duration:var(--magritte-semantic-animation-ease-in-out-200-duration-v19-0-0);
|
|
42
42
|
--grabber-animation-duration:var(--magritte-semantic-animation-ease-in-out-200-duration-v19-0-0);
|
|
@@ -44,52 +44,52 @@
|
|
|
44
44
|
--swipe-cancel-transition-duration:var(--magritte-semantic-animation-ease-in-out-100-duration-v19-0-0);
|
|
45
45
|
}
|
|
46
46
|
}
|
|
47
|
-
.magritte-appear-animation___P84Ln_5-3-
|
|
47
|
+
.magritte-appear-animation___P84Ln_5-3-26{
|
|
48
48
|
transition-property:transform opacity;
|
|
49
49
|
transition-duration:var(--enter-animation-duration);
|
|
50
50
|
transition-timing-function:var(--magritte-semantic-animation-ease-in-out-300-timing-function-v19-0-0);
|
|
51
51
|
}
|
|
52
|
-
.magritte-disappear-animation___Putks_5-3-
|
|
52
|
+
.magritte-disappear-animation___Putks_5-3-26{
|
|
53
53
|
transition-property:transform opacity;
|
|
54
54
|
transition-duration:var(--exit-animation-duration);
|
|
55
55
|
transition-timing-function:var(--magritte-semantic-animation-ease-in-out-200-timing-function-v19-0-0);
|
|
56
56
|
}
|
|
57
|
-
.magritte-grabber-transition-animation___s3Oh4_5-3-
|
|
57
|
+
.magritte-grabber-transition-animation___s3Oh4_5-3-26::after{
|
|
58
58
|
transition-property:transform;
|
|
59
59
|
transition-duration:var(--grabber-animation-duration);
|
|
60
60
|
transition-timing-function:var(--magritte-semantic-animation-ease-in-out-200-timing-function-v19-0-0);
|
|
61
61
|
}
|
|
62
|
-
.magritte-height-transition-animation___xNprr_5-3-
|
|
62
|
+
.magritte-height-transition-animation___xNprr_5-3-26{
|
|
63
63
|
transition-property:height;
|
|
64
64
|
transition-duration:var(--height-transition-duration);
|
|
65
65
|
transition-timing-function:var(--magritte-semantic-animation-ease-in-out-400-timing-function-v19-0-0);
|
|
66
66
|
}
|
|
67
|
-
.magritte-close-by-swipe-animation___wdezY_5-3-
|
|
67
|
+
.magritte-close-by-swipe-animation___wdezY_5-3-26{
|
|
68
68
|
transition-property:transform;
|
|
69
69
|
transition-duration:var(--exit-animation-duration);
|
|
70
70
|
transition-timing-function:linear;
|
|
71
71
|
}
|
|
72
|
-
.magritte-swipe-cancel-animation___AhYj5_5-3-
|
|
72
|
+
.magritte-swipe-cancel-animation___AhYj5_5-3-26{
|
|
73
73
|
transition-property:transform;
|
|
74
74
|
transition-duration:var(--swipe-cancel-transition-duration);
|
|
75
75
|
transition-timing-function:var(--magritte-semantic-animation-ease-in-out-100-duration-v19-0-0);
|
|
76
76
|
}
|
|
77
|
-
.magritte-overlay___5a2U-_5-3-
|
|
77
|
+
.magritte-overlay___5a2U-_5-3-26{
|
|
78
78
|
pointer-events:none;
|
|
79
79
|
position:fixed;
|
|
80
80
|
inset:0;
|
|
81
81
|
}
|
|
82
|
-
.magritte-overlay-background___8Sd4V_5-3-
|
|
82
|
+
.magritte-overlay-background___8Sd4V_5-3-26{
|
|
83
83
|
position:absolute;
|
|
84
84
|
inset:0;
|
|
85
85
|
will-change:opacity;
|
|
86
86
|
transform:translate3d(0, 0, 0);
|
|
87
87
|
}
|
|
88
|
-
.magritte-overlay-background_visible___FOJgj_5-3-
|
|
88
|
+
.magritte-overlay-background_visible___FOJgj_5-3-26{
|
|
89
89
|
pointer-events:initial;
|
|
90
90
|
background-color:var(--magritte-color-component-_overlay-background-content-v19-0-0);
|
|
91
91
|
}
|
|
92
|
-
.magritte-swipe-container___sZ2n5_5-3-
|
|
92
|
+
.magritte-swipe-container___sZ2n5_5-3-26{
|
|
93
93
|
display:flex;
|
|
94
94
|
flex-direction:column;
|
|
95
95
|
align-items:stretch;
|
|
@@ -99,11 +99,11 @@
|
|
|
99
99
|
will-change:transform;
|
|
100
100
|
transform:translate3d(0, 0, 0);
|
|
101
101
|
}
|
|
102
|
-
.magritte-grabber___A7SB-_5-3-
|
|
102
|
+
.magritte-grabber___A7SB-_5-3-26{
|
|
103
103
|
flex:0 0 20px;
|
|
104
104
|
position:relative;
|
|
105
105
|
}
|
|
106
|
-
.magritte-grabber___A7SB-_5-3-
|
|
106
|
+
.magritte-grabber___A7SB-_5-3-26::after{
|
|
107
107
|
content:'';
|
|
108
108
|
position:absolute;
|
|
109
109
|
top:8px;
|
|
@@ -114,10 +114,10 @@
|
|
|
114
114
|
border-radius:var(--magritte-static-border-radius-50-v19-0-0);
|
|
115
115
|
z-index:3;
|
|
116
116
|
}
|
|
117
|
-
.magritte-grabber_ensure-safe___DR-dV_5-3-
|
|
117
|
+
.magritte-grabber_ensure-safe___DR-dV_5-3-26::after{
|
|
118
118
|
transform:translateY(20px);
|
|
119
119
|
}
|
|
120
|
-
.magritte-visual-container___-VSuY_5-3-
|
|
120
|
+
.magritte-visual-container___-VSuY_5-3-26{
|
|
121
121
|
display:flex;
|
|
122
122
|
flex-direction:column;
|
|
123
123
|
align-items:stretch;
|
|
@@ -130,18 +130,18 @@
|
|
|
130
130
|
overflow:clip;
|
|
131
131
|
user-select:text;
|
|
132
132
|
}
|
|
133
|
-
.magritte-visual-container_full-screen___jCCBb_5-3-
|
|
133
|
+
.magritte-visual-container_full-screen___jCCBb_5-3-26{
|
|
134
134
|
flex:1 1 auto;
|
|
135
135
|
min-height:1px;
|
|
136
136
|
}
|
|
137
|
-
.magritte-header___5mMtj_5-3-
|
|
137
|
+
.magritte-header___5mMtj_5-3-26{
|
|
138
138
|
--magritte-ui-navigation-bar-background-override:var(--magritte-color-component-bottom-sheet-background-content-v19-0-0);
|
|
139
139
|
background-color:var(--magritte-color-component-bottom-sheet-background-content-v19-0-0);
|
|
140
140
|
flex:0 0 auto;
|
|
141
141
|
padding-top:16px;
|
|
142
142
|
z-index:2;
|
|
143
143
|
}
|
|
144
|
-
.magritte-scroll-container___4ngNY_5-3-
|
|
144
|
+
.magritte-scroll-container___4ngNY_5-3-26{
|
|
145
145
|
display:flex;
|
|
146
146
|
flex-direction:column;
|
|
147
147
|
align-items:stretch;
|
|
@@ -149,7 +149,7 @@
|
|
|
149
149
|
min-height:1px;
|
|
150
150
|
z-index:1;
|
|
151
151
|
}
|
|
152
|
-
.magritte-content___1gAwP_5-3-
|
|
152
|
+
.magritte-content___1gAwP_5-3-26{
|
|
153
153
|
display:flex;
|
|
154
154
|
flex-direction:column;
|
|
155
155
|
align-items:stretch;
|
|
@@ -158,39 +158,39 @@
|
|
|
158
158
|
will-change:transform;
|
|
159
159
|
transform:translate3d(0, 0, 0);
|
|
160
160
|
}
|
|
161
|
-
.magritte-content_full-screen___2SFaO_5-3-
|
|
161
|
+
.magritte-content_full-screen___2SFaO_5-3-26{
|
|
162
162
|
flex:1 0 auto;
|
|
163
163
|
}
|
|
164
|
-
.magritte-content_sized-full-screen___45pa6_5-3-
|
|
164
|
+
.magritte-content_sized-full-screen___45pa6_5-3-26{
|
|
165
165
|
flex:1 1 auto;
|
|
166
166
|
min-height:1px;
|
|
167
167
|
}
|
|
168
|
-
.magritte-content_with-paddings___gIiAv_5-3-
|
|
168
|
+
.magritte-content_with-paddings___gIiAv_5-3-26{
|
|
169
169
|
padding:16px 16px 0;
|
|
170
170
|
}
|
|
171
|
-
.magritte-content_with-paddings___gIiAv_5-3-
|
|
171
|
+
.magritte-content_with-paddings___gIiAv_5-3-26.magritte-content_without-header___YZR38_5-3-26{
|
|
172
172
|
padding:0 16px;
|
|
173
173
|
}
|
|
174
|
-
.magritte-footer___RWslT_5-3-
|
|
174
|
+
.magritte-footer___RWslT_5-3-26{
|
|
175
175
|
flex:0 0 auto;
|
|
176
176
|
background-color:var(--magritte-color-component-bottom-sheet-background-content-v19-0-0);
|
|
177
177
|
z-index:2;
|
|
178
178
|
will-change:transform;
|
|
179
179
|
transform:translate3d(0, 0, 0);
|
|
180
180
|
}
|
|
181
|
-
.magritte-footer-with-padding___KwkhC_5-3-
|
|
181
|
+
.magritte-footer-with-padding___KwkhC_5-3-26{
|
|
182
182
|
display:flex;
|
|
183
183
|
flex-direction:column;
|
|
184
184
|
gap:12px;
|
|
185
185
|
padding:16px;
|
|
186
186
|
}
|
|
187
|
-
.magritte-divider___0F8hh_5-3-
|
|
187
|
+
.magritte-divider___0F8hh_5-3-26{
|
|
188
188
|
visibility:hidden;
|
|
189
189
|
}
|
|
190
|
-
.magritte-divider_visible___pAWZM_5-3-
|
|
190
|
+
.magritte-divider_visible___pAWZM_5-3-26{
|
|
191
191
|
visibility:visible;
|
|
192
192
|
}
|
|
193
|
-
.magritte-content-overlay___HAyzL_5-3-
|
|
193
|
+
.magritte-content-overlay___HAyzL_5-3-26{
|
|
194
194
|
pointer-events:none;
|
|
195
195
|
position:absolute;
|
|
196
196
|
inset:0;
|
package/index.js
CHANGED
|
@@ -14,6 +14,7 @@ import '@hh.ru/magritte-common-use-no-bubbling';
|
|
|
14
14
|
import '@hh.ru/magritte-common-use-swipe';
|
|
15
15
|
import '@hh.ru/magritte-internal-custom-scroll';
|
|
16
16
|
import '@hh.ru/magritte-internal-layer-name';
|
|
17
|
+
import '@hh.ru/magritte-ui-action-bar';
|
|
17
18
|
import './BottomSheetContext.js';
|
|
18
19
|
import './ClickInterceptor.js';
|
|
19
20
|
import '@hh.ru/magritte-ui-breakpoint';
|
|
@@ -21,5 +22,5 @@ import '@hh.ru/magritte-ui-divider';
|
|
|
21
22
|
import '@hh.ru/magritte-ui-layer';
|
|
22
23
|
import '@hh.ru/magritte-ui-navigation-bar';
|
|
23
24
|
import '@hh.ru/magritte-ui-tree-selector';
|
|
24
|
-
import './bottom-sheet-
|
|
25
|
+
import './bottom-sheet-DDCdnuHN.js';
|
|
25
26
|
//# sourceMappingURL=index.js.map
|
package/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":";;;;;;;;;;;;;;;;;;;;;;;"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@hh.ru/magritte-ui-bottom-sheet",
|
|
3
|
-
"version": "5.3.
|
|
3
|
+
"version": "5.3.26",
|
|
4
4
|
"main": "index.js",
|
|
5
5
|
"types": "index.d.ts",
|
|
6
6
|
"sideEffects": [
|
|
@@ -28,13 +28,14 @@
|
|
|
28
28
|
"@hh.ru/magritte-design-tokens": "19.0.0",
|
|
29
29
|
"@hh.ru/magritte-internal-custom-scroll": "1.3.0",
|
|
30
30
|
"@hh.ru/magritte-internal-layer-name": "2.2.0",
|
|
31
|
+
"@hh.ru/magritte-ui-action-bar": "2.2.0",
|
|
31
32
|
"@hh.ru/magritte-ui-breakpoint": "4.0.3",
|
|
32
33
|
"@hh.ru/magritte-ui-divider": "1.1.32",
|
|
33
34
|
"@hh.ru/magritte-ui-layer": "2.0.6",
|
|
34
35
|
"@hh.ru/magritte-ui-mock-component": "1.0.11",
|
|
35
36
|
"@hh.ru/magritte-ui-navigation-bar": "6.0.11",
|
|
36
37
|
"@hh.ru/magritte-ui-theme-provider": "1.1.28",
|
|
37
|
-
"@hh.ru/magritte-ui-tree-selector": "4.4.
|
|
38
|
+
"@hh.ru/magritte-ui-tree-selector": "4.4.7"
|
|
38
39
|
},
|
|
39
40
|
"peerDependencies": {
|
|
40
41
|
"classnames": ">=2.3.2",
|
|
@@ -45,5 +46,5 @@
|
|
|
45
46
|
"publishConfig": {
|
|
46
47
|
"access": "public"
|
|
47
48
|
},
|
|
48
|
-
"gitHead": "
|
|
49
|
+
"gitHead": "2366e6aabcfc1050b4cc1ae8bd16a3851db008db"
|
|
49
50
|
}
|
package/bottom-sheet-XlbtgiFK.js
DELETED
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
import './index.css';
|
|
2
|
-
var styles = {"flex-container":"magritte-flex-container___muHAx_5-3-25","flexContainer":"magritte-flex-container___muHAx_5-3-25","animation-timeout":"magritte-animation-timeout___yd-SZ_5-3-25","animationTimeout":"magritte-animation-timeout___yd-SZ_5-3-25","css-variables-container":"magritte-css-variables-container___jBCr9_5-3-25","cssVariablesContainer":"magritte-css-variables-container___jBCr9_5-3-25","appear-animation":"magritte-appear-animation___P84Ln_5-3-25","appearAnimation":"magritte-appear-animation___P84Ln_5-3-25","disappear-animation":"magritte-disappear-animation___Putks_5-3-25","disappearAnimation":"magritte-disappear-animation___Putks_5-3-25","grabber-transition-animation":"magritte-grabber-transition-animation___s3Oh4_5-3-25","grabberTransitionAnimation":"magritte-grabber-transition-animation___s3Oh4_5-3-25","height-transition-animation":"magritte-height-transition-animation___xNprr_5-3-25","heightTransitionAnimation":"magritte-height-transition-animation___xNprr_5-3-25","close-by-swipe-animation":"magritte-close-by-swipe-animation___wdezY_5-3-25","closeBySwipeAnimation":"magritte-close-by-swipe-animation___wdezY_5-3-25","swipe-cancel-animation":"magritte-swipe-cancel-animation___AhYj5_5-3-25","swipeCancelAnimation":"magritte-swipe-cancel-animation___AhYj5_5-3-25","overlay":"magritte-overlay___5a2U-_5-3-25","overlay-background":"magritte-overlay-background___8Sd4V_5-3-25","overlayBackground":"magritte-overlay-background___8Sd4V_5-3-25","overlay-background_visible":"magritte-overlay-background_visible___FOJgj_5-3-25","overlayBackgroundVisible":"magritte-overlay-background_visible___FOJgj_5-3-25","swipe-container":"magritte-swipe-container___sZ2n5_5-3-25","swipeContainer":"magritte-swipe-container___sZ2n5_5-3-25","grabber":"magritte-grabber___A7SB-_5-3-25","grabber_ensure-safe":"magritte-grabber_ensure-safe___DR-dV_5-3-25","grabberEnsureSafe":"magritte-grabber_ensure-safe___DR-dV_5-3-25","visual-container":"magritte-visual-container___-VSuY_5-3-25","visualContainer":"magritte-visual-container___-VSuY_5-3-25","visual-container_full-screen":"magritte-visual-container_full-screen___jCCBb_5-3-25","visualContainerFullScreen":"magritte-visual-container_full-screen___jCCBb_5-3-25","header":"magritte-header___5mMtj_5-3-25","scroll-container":"magritte-scroll-container___4ngNY_5-3-25","scrollContainer":"magritte-scroll-container___4ngNY_5-3-25","content":"magritte-content___1gAwP_5-3-25","content_full-screen":"magritte-content_full-screen___2SFaO_5-3-25","contentFullScreen":"magritte-content_full-screen___2SFaO_5-3-25","content_sized-full-screen":"magritte-content_sized-full-screen___45pa6_5-3-25","contentSizedFullScreen":"magritte-content_sized-full-screen___45pa6_5-3-25","content_with-paddings":"magritte-content_with-paddings___gIiAv_5-3-25","contentWithPaddings":"magritte-content_with-paddings___gIiAv_5-3-25","content_without-header":"magritte-content_without-header___YZR38_5-3-25","contentWithoutHeader":"magritte-content_without-header___YZR38_5-3-25","footer":"magritte-footer___RWslT_5-3-25","footer-with-padding":"magritte-footer-with-padding___KwkhC_5-3-25","footerWithPadding":"magritte-footer-with-padding___KwkhC_5-3-25","divider":"magritte-divider___0F8hh_5-3-25","divider_visible":"magritte-divider_visible___pAWZM_5-3-25","dividerVisible":"magritte-divider_visible___pAWZM_5-3-25","content-overlay":"magritte-content-overlay___HAyzL_5-3-25","contentOverlay":"magritte-content-overlay___HAyzL_5-3-25"};
|
|
3
|
-
|
|
4
|
-
export { styles as s };
|
|
5
|
-
//# sourceMappingURL=bottom-sheet-XlbtgiFK.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"bottom-sheet-XlbtgiFK.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;"}
|