@hh.ru/magritte-ui-bottom-sheet 7.1.0 → 7.1.2
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 +10 -6
- package/BottomSheet.js.map +1 -1
- package/BottomSheetContext.d.ts +2 -0
- package/BottomSheetContext.js +4 -1
- package/BottomSheetContext.js.map +1 -1
- package/BottomSheetFooter.js +1 -1
- package/BottomSheetIFrameAdapter.js +1 -1
- package/bottom-sheet-1YgEly-x.js +5 -0
- package/bottom-sheet-1YgEly-x.js.map +1 -0
- package/index.css +35 -35
- package/index.d.ts +1 -0
- package/index.js +2 -2
- package/package.json +5 -5
- package/bottom-sheet-3gMjDLi3.js +0 -5
- package/bottom-sheet-3gMjDLi3.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, cloneElement } from 'react';
|
|
3
|
+
import { forwardRef, useRef, useState, useMemo, useEffect, useCallback, cloneElement, isValidElement } from 'react';
|
|
4
4
|
import { createPortal } from 'react-dom';
|
|
5
5
|
import { Transition } from 'react-transition-group';
|
|
6
6
|
import classnames from 'classnames';
|
|
@@ -18,7 +18,7 @@ import { Divider } from '@hh.ru/magritte-ui-divider';
|
|
|
18
18
|
import { Layer } from '@hh.ru/magritte-ui-layer';
|
|
19
19
|
import { isNavigationBarComponent, NavigationBarComponent } from '@hh.ru/magritte-ui-navigation-bar';
|
|
20
20
|
import { isValidTreeSelectorWrapper } from '@hh.ru/magritte-ui-tree-selector';
|
|
21
|
-
import { s as styles } from './bottom-sheet-
|
|
21
|
+
import { s as styles } from './bottom-sheet-1YgEly-x.js';
|
|
22
22
|
|
|
23
23
|
const CSS_VAR_ENTER_ANIMATION_DURATION = '--enter-animation-duration';
|
|
24
24
|
const CSS_VAR_EXIT_ANIMATION_DURATION = '--exit-animation-duration';
|
|
@@ -30,6 +30,11 @@ const hasSelectedText = () => {
|
|
|
30
30
|
const selection = document.getSelection();
|
|
31
31
|
return !!selection && !selection.isCollapsed;
|
|
32
32
|
};
|
|
33
|
+
const isContentSizedFullHeight = (children) => (isValidElement(children) &&
|
|
34
|
+
typeof children.type === 'function' &&
|
|
35
|
+
'isFullHeightBottomSheetContent' in children.type &&
|
|
36
|
+
children.props.fixedHeight !== true) ||
|
|
37
|
+
isValidTreeSelectorWrapper(children);
|
|
33
38
|
const toNumber = (value) => {
|
|
34
39
|
const result = parseInt(value, 10);
|
|
35
40
|
return Number.isInteger(result) ? result : 0;
|
|
@@ -81,8 +86,7 @@ const BottomSheetRenderFunc = ({ allowScrollWhileFocused, children, footer, head
|
|
|
81
86
|
const stateRef = useRef(makeInitialState());
|
|
82
87
|
const [animationTimeout, setAnimationTimeout] = useState(null);
|
|
83
88
|
const [heightAnimationRunning, setHeightAnimationRunning] = useState(false);
|
|
84
|
-
const
|
|
85
|
-
const isContentSizedFullHeight = isValidTreeSelectorWrapper(children);
|
|
89
|
+
const bottomSheetContextValue = useMemo(() => ({ contentOverlayRef, height }), [contentOverlayRef, height]);
|
|
86
90
|
const virtualKeyboardOffsetsRef = useRef({ top: 0, bottom: 0 });
|
|
87
91
|
const [isSafari, setIsSafari] = useState(null);
|
|
88
92
|
useEffect(() => setIsSafari(checkSafari()), [setIsSafari]);
|
|
@@ -785,8 +789,8 @@ const BottomSheetRenderFunc = ({ allowScrollWhileFocused, children, footer, head
|
|
|
785
789
|
[styles.contentFullScreen]: height === 'full-screen',
|
|
786
790
|
[styles.contentWithPaddings]: withContentPaddings,
|
|
787
791
|
[styles.contentWithoutHeader]: !header,
|
|
788
|
-
[styles.contentSizedFullScreen]: isContentSizedFullHeight,
|
|
789
|
-
}), ref: contentRef, children: jsx(BottomSheetContext.Provider, { value:
|
|
792
|
+
[styles.contentSizedFullScreen]: isContentSizedFullHeight(children),
|
|
793
|
+
}), ref: contentRef, children: jsx(BottomSheetContext.Provider, { value: bottomSheetContextValue, children: children }) }));
|
|
790
794
|
const scrollContainer = hasTouchSupport ? (jsx(CustomScrollContextProvider, { ref: scrollContextProviderRef, children: jsxs("div", { className: styles.scrollContainer, onFocus: handleFocus, ref: scrollContainerRef, children: [navigationBar, content] }) })) : (jsxs("div", { className: classnames(styles.scrollContainer, styles.nativeScrollContainer), onFocus: handleFocus, onScroll: recalcScrollFlags, ref: scrollContainerRef, children: [navigationBar, content] }));
|
|
791
795
|
const clonedFooter = footer && isActionBarComponent(footer)
|
|
792
796
|
? cloneElement(footer, { type: footer.props.type || 'mobile', showDivider: false })
|
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 cloneElement,\n} from 'react';\nimport { createPortal } from 'react-dom';\nimport { Transition, TransitionStatus } from 'react-transition-group';\nimport classnames from 'classnames';\n\nimport { useEscapeToClose } from '@hh.ru/magritte-common-keyboard';\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 { 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 {\n NavigationBarComponent,\n NavigationBarComponentRef,\n isNavigationBarComponent,\n} 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 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 checkSafari = () => /^((?!chrome|android).)*safari/i.test(navigator.userAgent);\n\nconst hasSelectedText = () => {\n const selection = document.getSelection();\n return !!selection && !selection.isCollapsed;\n};\n\nconst toNumber = (value: string) => {\n const result = parseInt(value, 10);\n return Number.isInteger(result) ? result : 0;\n};\n\nconst textInputTypes = ['text', 'password', 'email', 'search', 'tel', 'url', 'number'];\nconst isTextInputElement = (element: Element): element is HTMLInputElement => {\n if (element instanceof HTMLInputElement) {\n return textInputTypes.includes(element.type);\n } else if (element instanceof HTMLTextAreaElement) {\n return true;\n }\n\n return false;\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 exitHandlers: Array<VoidFunction>;\n // число, на которое нужно анимировать изменение высоты контента боттомшита\n heightAnimationDiff: number | null;\n heightAnimationCallback?: VoidFunction | null;\n};\n\nconst makeInitialState = (): State => ({\n dividerVisible: false,\n grabberUnsafe: false,\n hasFocus: false,\n resizeRAFHandle: null,\n scrollOffset: 0,\n swipeOffset: 0,\n touchAction: null,\n exitHandlers: [],\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 keyboardOverlaysFooter = true,\n onAppear,\n onBeforeExit,\n onAfterExit,\n onClose,\n showDivider = 'with-scroll',\n showOverlay = true,\n visible = false,\n withContentPaddings = true,\n 'data-qa': dataQA,\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 focusedElementRef = useRef<HTMLInputElement | HTMLTextAreaElement | null>(null);\n const footerRef = useRef<HTMLDivElement>(null);\n const grabberRef = useRef<HTMLDivElement>(null);\n const headerRef = useRef<NavigationBarComponentRef>(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 const scrollContextProviderRef = useRef<CustomScrollContextNotifier>(null);\n\n const currentVisible = useBreakpoint().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>(makeInitialState());\n const [animationTimeout, setAnimationTimeout] = useState<AnimationTimeout | null>(null);\n const [heightAnimationRunning, setHeightAnimationRunning] = useState(false);\n const bottomSheetContext = useMemo(() => ({ contentOverlayRef }), [contentOverlayRef]);\n const isContentSizedFullHeight = isValidTreeSelectorWrapper(children);\n const virtualKeyboardOffsetsRef = useRef<{ top: number; bottom: number }>({ top: 0, bottom: 0 });\n\n const [isSafari, setIsSafari] = useState<boolean | null>(null);\n useEffect(() => setIsSafari(checkSafari()), [setIsSafari]);\n\n const [hasTouchSupport, setHasTouchSupport] = useState<boolean | null>(null);\n const hasTouchSupportRef = useRef<boolean | null>(null);\n useEffect(() => {\n if (!('matchMedia' in window)) {\n return void 0;\n }\n const mediaQuery = window.matchMedia('(pointer:coarse)');\n const handleMediaQueryChange = () => {\n hasTouchSupportRef.current = mediaQuery.matches;\n setHasTouchSupport(hasTouchSupportRef.current);\n };\n mediaQuery.addEventListener('change', handleMediaQueryChange);\n hasTouchSupportRef.current = mediaQuery.matches;\n setHasTouchSupport(hasTouchSupportRef.current);\n return () => mediaQuery.removeEventListener('change', handleMediaQueryChange);\n }, [setHasTouchSupport]);\n\n const bindEscapeToClose = useEscapeToClose(() => currentVisible && onClose?.());\n useEffect(() => bindEscapeToClose(document.body), [bindEscapeToClose]);\n\n const LayoutMetrics = useRef(\n (() => {\n let cache: Record<string, number> = {};\n return {\n get bottomSheetHeight() {\n if (!('bottomSheetHeight' in cache) && visualContainerRef.current !== null) {\n cache.bottomSheetHeight = visualContainerRef.current.clientHeight;\n }\n return cache.bottomSheetHeight ?? 0;\n },\n /**\n * Высота контента\n * Может превышать высоту контейнера из-за скролла\n */\n get contentHeight() {\n if (!('contentHeight' in cache) && contentRef.current !== null) {\n cache.contentHeight = contentRef.current.clientHeight;\n }\n return cache.contentHeight ?? 0;\n },\n /**\n * Высота видимой части контента\n */\n get visibleContentHeight() {\n if (!('visibleContentHeight' in cache) && scrollContainerRef.current !== null) {\n const layoutHeaderHeight = headerRef.current?.layoutHeight ?? 0;\n cache.visibleContentHeight = scrollContainerRef.current.clientHeight - layoutHeaderHeight;\n }\n return cache.visibleContentHeight ?? 0;\n },\n /**\n * Положение верхнего края видимой части контента относительно вьюпорта\n */\n get contentTop() {\n if (!('contentTop' in cache) && visualContainerRef.current !== null) {\n const visibleHeaderHeight = headerRef.current?.visibleHeight ?? 0;\n cache.contentTop = visualContainerRef.current.offsetTop + visibleHeaderHeight;\n }\n return cache.contentTop ?? 0;\n },\n get footerHeight() {\n if (!('footerHeight' in cache) && footerRef.current !== null) {\n cache.footerHeight = footerRef.current.clientHeight;\n }\n return cache.footerHeight ?? 0;\n },\n /**\n * Фактическая высота, которую NavigationBar занимает в боттомшите\n * Может отличаться от видимой высоты NavigationBar\n */\n get headerHeight() {\n if (!('headerHeight' in cache) && headerRef.current !== null) {\n cache.headerHeight = headerRef.current.layoutHeight;\n }\n return cache.headerHeight ?? 0;\n },\n get initialOffset() {\n if (!('initialOffset' in cache)) {\n if (\n height === 'half-screen' &&\n hasTouchSupportRef.current &&\n visualContainerRef.current !== null &&\n visualViewport !== null\n ) {\n const halfScreenOffset =\n visualContainerRef.current.clientHeight - visualViewport.height / 2;\n cache.initialOffset = Math.max(Math.round(halfScreenOffset), 0);\n } else {\n cache.initialOffset = 0;\n }\n }\n return cache.initialOffset ?? 0;\n },\n get maxScrollTop() {\n return LayoutMetrics.current.contentHeight - LayoutMetrics.current.visibleContentHeight;\n },\n /**\n * Расстояние между верхним краем боттомшита и границей вьюпорта\n */\n get remainingAvailableHeight() {\n if (!('remainingAvailableHeight' in cache) && grabberRef.current !== null) {\n cache.remainingAvailableHeight = grabberRef.current.offsetTop;\n }\n return cache.remainingAvailableHeight ?? 0;\n },\n invalidateCache() {\n cache = {};\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 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'] = keyboardOverlaysFooter ? '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, keyboardOverlaysFooter]);\n\n const fixOverscroll = useCallback(() => {\n if (hasTouchSupport) {\n const isOverscrolled =\n LayoutMetrics.current.contentHeight + stateRef.current.scrollOffset <\n LayoutMetrics.current.visibleContentHeight;\n if (isOverscrolled) {\n stateRef.current.scrollOffset =\n LayoutMetrics.current.visibleContentHeight - LayoutMetrics.current.contentHeight;\n if (contentRef.current !== null) {\n contentRef.current.style.transform = translateY(stateRef.current.scrollOffset);\n }\n scrollContextProviderRef.current?.notify({\n scrollTop: -stateRef.current.scrollOffset,\n maxScrollTop: LayoutMetrics.current.maxScrollTop,\n });\n }\n }\n }, [hasTouchSupport]);\n\n const resetScrollPosition = useCallback(() => {\n if (hasTouchSupport) {\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 } else {\n scrollContainerRef.current?.scrollTo({ top: 0 });\n }\n }, [hasTouchSupport]);\n\n const recalcScrollFlags = useCallback(() => {\n const scrollOffset = hasTouchSupport\n ? stateRef.current.scrollOffset\n : -(scrollContainerRef.current?.scrollTop ?? 0);\n\n if (dividerRef.current !== null) {\n const prevDividerVisible = stateRef.current.dividerVisible;\n const isNotScrolledToEnd =\n LayoutMetrics.current.contentHeight + scrollOffset > LayoutMetrics.current.visibleContentHeight;\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(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 }, [hasTouchSupport, showDivider]);\n\n // терминология: https://developer.chrome.com/blog/viewport-resize-behavior/\n //\n // при открытии виртуальной клавиатуры браузеры двигают Visual Viewport и Layout Viewport\n // с помощью двух отступов делаем так, чтобы overlay боттомшита совпадал с видимой частью экрана\n const recalcKeyboardOffsets = useCallback(() => {\n if (!hasTouchSupport || !contentRef.current || !overlayRef.current || !visualViewport) {\n return;\n }\n\n LayoutMetrics.current.invalidateCache();\n\n if (stateRef.current.hasFocus && focusedElementRef.current !== null) {\n const overlayDOMRect = overlayRef.current.getBoundingClientRect();\n\n // любой браузер может сдвинуть Visual Viewport вверх, если фокусируемый инпут находится близко к нижней границе\n // из-за этого может возникнуть проблема, что ВЕРХНИЙ край контента уехал за границу Visual Viewport\n // сдвигаем ВЕРХНИЙ край контейнера ВНИЗ, чтобы он совпал с границей Visual Viewport\n const topOffset = Math.round(-overlayDOMRect.top);\n\n let bottomOffset = 0;\n if (isSafari) {\n const visualViewportDiff = Math.round(overlayDOMRect.bottom - visualViewport.height);\n if (visualViewportDiff > 0) {\n // сдвигаем НИЖНИЙ край контейнера ВВЕРХ, чтобы он совпал с границей Visual Viewport\n bottomOffset = visualViewportDiff;\n }\n }\n\n if (keyboardOverlaysFooter && footerRef.current !== null) {\n bottomOffset -= footerRef.current.clientHeight;\n }\n\n if (\n topOffset !== virtualKeyboardOffsetsRef.current.top ||\n bottomOffset !== virtualKeyboardOffsetsRef.current.bottom\n ) {\n setCSSVariable(CSS_VAR_VIRTUAL_KEYBOARD_TOP_OFFSET, `${topOffset}px`);\n setCSSVariable(CSS_VAR_VIRTUAL_KEYBOARD_BOTTOM_OFFSET, `${bottomOffset}px`);\n }\n\n LayoutMetrics.current.invalidateCache();\n\n // если фокусируемый элемент лежит внутри скроллящегося контейнера и не виден, скроллим к нему\n if (contentRef.current.contains(focusedElementRef.current)) {\n let focusedElementOffset = 0;\n for (\n let offsetElement: HTMLElement | null =\n focusedElementRef.current.closest('[data-interactive]') ?? focusedElementRef.current;\n offsetElement !== contentRef.current && offsetElement !== null;\n offsetElement = offsetElement.offsetParent as HTMLElement | null\n ) {\n focusedElementOffset += offsetElement.offsetTop;\n }\n const newScrollOffset = -Math.min(\n Math.max(focusedElementOffset - 10, 0),\n LayoutMetrics.current.maxScrollTop\n );\n if (stateRef.current.scrollOffset !== newScrollOffset) {\n stateRef.current.scrollOffset = newScrollOffset;\n contentRef.current.style.transform = translateY(stateRef.current.scrollOffset);\n\n scrollContextProviderRef.current?.notify({\n scrollTop: -stateRef.current.scrollOffset,\n maxScrollTop: LayoutMetrics.current.maxScrollTop,\n });\n }\n }\n\n recalcScrollFlags();\n\n virtualKeyboardOffsetsRef.current.top = topOffset;\n virtualKeyboardOffsetsRef.current.bottom = bottomOffset;\n } else {\n setCSSVariable(CSS_VAR_VIRTUAL_KEYBOARD_TOP_OFFSET, `0px`);\n setCSSVariable(CSS_VAR_VIRTUAL_KEYBOARD_BOTTOM_OFFSET, `0px`);\n\n LayoutMetrics.current.invalidateCache();\n fixOverscroll();\n recalcScrollFlags();\n\n virtualKeyboardOffsetsRef.current.top = 0;\n virtualKeyboardOffsetsRef.current.bottom = 0;\n }\n }, [fixOverscroll, hasTouchSupport, isSafari, keyboardOverlaysFooter, recalcScrollFlags]);\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 (!isTextInputElement(focusedElement) || 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 visualViewport?.removeEventListener('scroll', 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 visualViewport?.removeEventListener('scroll', handleResize);\n stateRef.current.resizeRAFHandle = null;\n recalcKeyboardOffsets();\n } else {\n stateRef.current.resizeRAFHandle = requestAnimationFrame(waitForResize);\n }\n };\n\n const handleBlur = () => {\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 focusedElementRef.current = null;\n\n if (isSafari) {\n recalcKeyboardOffsets();\n }\n };\n\n stateRef.current.hasFocus = true;\n stateRef.current.resizeRAFHandle = requestAnimationFrame(waitForResize);\n visualViewport?.addEventListener('resize', handleResize);\n // событие scroll может прилететь, только если браузер сдвинул вьюпорт из-за появления виртуальной клавиатуры\n // пользовательский скролл не вызывает событие scroll, т.к. нативный скролл отключен\n // в Safari событие resize может прилететь до того как браузер сдвинул вьюпорт, поэтому слушаем scroll\n if (isSafari) {\n visualViewport?.addEventListener('scroll', handleResize);\n }\n focusedElement.addEventListener('blur', handleBlur);\n focusedElementRef.current = focusedElement;\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 = `${LayoutMetrics.current.contentTop}px`;\n contentOverlayRef.current.style.height = `${LayoutMetrics.current.visibleContentHeight}px`;\n }\n }, []);\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 }, [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 = makeInitialState();\n\n stateRef.current.exitHandlers.forEach((handler) => handler());\n stateRef.current.exitHandlers = [];\n onAfterExit?.();\n }, [onAfterExit]);\n\n const handleHeightAnimationStart = useCallback(() => {\n LayoutMetrics.current.invalidateCache();\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 scrollContextProviderRef.current?.notify({\n scrollTop: 0,\n maxScrollTop: LayoutMetrics.current.maxScrollTop,\n });\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 const visualContainer = visualContainerRef.current;\n if (!visualContainer) {\n return void 0;\n }\n\n const handleScroll = (delta: number) => {\n if (\n LayoutMetrics.current.initialOffset !== 0 ||\n LayoutMetrics.current.contentHeight > LayoutMetrics.current.visibleContentHeight\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.visibleContentHeight\n ) {\n // скролла нет (touchAction is null)\n // либо контент проскроллен до конца, тогда не даем скроллить дальше\n newScrollOffset = LayoutMetrics.current.visibleContentHeight - 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 maxScrollTop: LayoutMetrics.current.maxScrollTop,\n });\n }\n }\n };\n\n let focusedElementTouchY: number | null = null;\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 (focusedElementRef.current !== null &&\n focusedElementTouchY !== null &&\n focusedElementRef.current.clientHeight !== focusedElementRef.current.scrollHeight)\n ) {\n return;\n }\n handleScroll(event.delta);\n };\n\n const onTouchEnd = () => {\n if (focusedElementTouchY !== null) {\n focusedElementTouchY = null;\n }\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 if (event.target === focusedElementRef.current && focusedElementRef.current !== null) {\n focusedElementTouchY = event.changedTouches[0].pageY;\n } else {\n focusedElementTouchY = null;\n swipeHandlers.onTouchStart(event);\n }\n visualContainer.classList.add(styles.noCaret);\n };\n\n const handleTouchMove = (event: TouchEvent) => {\n event.preventDefault();\n event.stopPropagation();\n if (focusedElementRef.current !== null && focusedElementTouchY !== null) {\n focusedElementRef.current.scrollTop += focusedElementTouchY - event.changedTouches[0].pageY;\n focusedElementTouchY = event.changedTouches[0].pageY;\n } else {\n swipeHandlers.onTouchMove(event);\n }\n };\n\n const handleTouchEnd = (event: TouchEvent) => {\n swipeHandlers.onTouchEnd(event);\n visualContainer.classList.remove(styles.noCaret);\n };\n\n const handleTouchCancel = (event: TouchEvent) => {\n swipeHandlers.onTouchCancel(event);\n visualContainer.classList.remove(styles.noCaret);\n };\n\n const removeScrollHandlers = initScrollHandlers({\n axis: 'vertical',\n wrapperRef: visualContainerRef,\n onTouchMove,\n onTouchEnd,\n });\n visualContainer.addEventListener('touchstart', handleTouchStart);\n visualContainer.addEventListener('touchmove', handleTouchMove);\n visualContainer.addEventListener('touchend', handleTouchEnd);\n visualContainer.addEventListener('touchcancel', handleTouchCancel);\n\n return () => {\n removeScrollHandlers();\n visualContainer.removeEventListener('touchstart', handleTouchStart);\n visualContainer.removeEventListener('touchmove', handleTouchMove);\n visualContainer.removeEventListener('touchend', handleTouchEnd);\n visualContainer.removeEventListener('touchcancel', handleTouchCancel);\n };\n }, [allowScrollWhileFocused, recalcScrollFlags, swipeHandlers]);\n\n // при изменении высоты контента анимируем ее\n // задаем боттомшиту фиксированную высоту и пересчитываем ее самостоятельно,\n // чтобы не было мерцания, когда новый контент отрисовался до срабатывания колбека ResizeObserver\n const initHeightObserver = useCallback(() => {\n const visualContainer = visualContainerRef.current;\n if (!visualContainer) {\n return void 0;\n }\n\n let prevContentHeight = 0;\n let prevHeaderHeight = 0;\n let prevFooterHeight = 0;\n let prevVisibleContentHeight = 0;\n let skipFirstResizeCallback = true;\n let collapseResizeCallbacks = false;\n\n const handleHeightChange = () => {\n LayoutMetrics.current.invalidateCache();\n\n if (skipFirstResizeCallback) {\n visualContainer.style.height = `${LayoutMetrics.current.bottomSheetHeight}px`;\n prevHeaderHeight = LayoutMetrics.current.headerHeight;\n prevContentHeight = LayoutMetrics.current.contentHeight;\n prevFooterHeight = LayoutMetrics.current.footerHeight;\n prevVisibleContentHeight = LayoutMetrics.current.visibleContentHeight;\n\n skipFirstResizeCallback = false;\n return;\n }\n\n if (stateRef.current.heightAnimationDiff !== null) {\n if (!collapseResizeCallbacks) {\n // если предыдущая анимация не завершилась, без анимации сбрасываем высоту на вычисленную браузером\n visualContainer.style.height = ``;\n }\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(prevVisibleContentHeight, prevContentHeight);\n const newMinVisibleContentHeight = Math.min(\n prevVisibleContentHeight - 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 resetScrollPosition();\n } else {\n // если высота видимой части контента не изменилась,\n // но позиция скролла превысила максимально допустимую из-за уменьшения высоты контента,\n // сбрасываем позицию скролла на максимально допустимую\n fixOverscroll();\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 prevVisibleContentHeight = LayoutMetrics.current.visibleContentHeight;\n };\n\n setHeightAnimationRunning(true);\n\n collapseResizeCallbacks = true;\n requestAnimationFrame(() => {\n collapseResizeCallbacks = false;\n });\n } else {\n recalcContentOverlayPosition();\n recalcScrollFlags();\n }\n }\n\n prevHeaderHeight = LayoutMetrics.current.headerHeight;\n prevContentHeight = LayoutMetrics.current.contentHeight;\n prevFooterHeight = LayoutMetrics.current.footerHeight;\n };\n\n const resizeObserver = new ResizeObserver(handleHeightChange);\n const content = contentRef.current;\n const footer = footerRef.current;\n const header = headerRef.current;\n\n content !== null && resizeObserver.observe(content);\n footer !== null && resizeObserver.observe(footer);\n header !== null && header.addHeightObserver(handleHeightChange);\n\n return () => {\n resizeObserver.disconnect();\n header !== null && header.removeHeightObserver(handleHeightChange);\n };\n }, [\n fixOverscroll,\n recalcContentOverlayPosition,\n recalcScrollFlags,\n resetScrollPosition,\n setHeightAnimationRunning,\n ]);\n\n const handleAppearAnimationEnd = useCallback(() => {\n const removeHeightObserver = initHeightObserver();\n removeHeightObserver && stateRef.current.exitHandlers.push(removeHeightObserver);\n\n const removeTransformHandlers = hasTouchSupport && initTransformHandlers();\n removeTransformHandlers && stateRef.current.exitHandlers.push(removeTransformHandlers);\n\n onAppearRef.current?.();\n }, [hasTouchSupport, initHeightObserver, initTransformHandlers]);\n\n const { onTouchEnd, ...eventHandlers } = useNoBubbling();\n\n if (!animationTimeout) {\n return null;\n }\n\n const containerDataQa = `bottom-sheet-container${dataQA ? ` ${dataQA}` : ''}`;\n\n const renderFunc = (appearTransition: TransitionStatus, heightTransition: TransitionStatus) => {\n const navigationBar =\n header && isNavigationBarComponent(header) ? (\n <NavigationBarComponent {...header.props} forwardedRef={headerRef} />\n ) : null;\n\n const content = (\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={bottomSheetContext}>{children}</BottomSheetContext.Provider>\n </div>\n );\n\n const scrollContainer = hasTouchSupport ? (\n <CustomScrollContextProvider ref={scrollContextProviderRef}>\n <div className={styles.scrollContainer} onFocus={handleFocus} ref={scrollContainerRef}>\n {navigationBar}\n {content}\n </div>\n </CustomScrollContextProvider>\n ) : (\n <div\n className={classnames(styles.scrollContainer, styles.nativeScrollContainer)}\n onFocus={handleFocus}\n onScroll={recalcScrollFlags}\n ref={scrollContainerRef}\n >\n {navigationBar}\n {content}\n </div>\n );\n\n const clonedFooter =\n footer && isActionBarComponent(footer)\n ? cloneElement(footer, { type: footer.props.type || 'mobile', showDivider: false })\n : footer;\n\n return (\n <Layer layer=\"bottom-sheet\">\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' ? containerDataQa : 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 {scrollContainer}\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 && hasTouchSupport ? (\n <ClickInterceptor>{clonedFooter}</ClickInterceptor>\n ) : (\n clonedFooter\n )}\n </div>\n </div>\n <div className={styles.contentOverlay} ref={contentOverlayRef} />\n </div>\n </div>\n </Layer>\n );\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 key={`hasTouchSupport:${hasTouchSupport}`}\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":";;;;;;;;;;;;;;;;;;;;;AA0CA,MAAM,gCAAgC,GAAG,4BAA4B,CAAC;AACtE,MAAM,+BAA+B,GAAG,2BAA2B,CAAC;AACpE,M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AC,gBAAgB,EAAE,gBAAgB,CAAC,EAAA,CAC5D,CAChB,EAAA,EAZI,CAAmB,gBAAA,EAAA,eAAe,CAAE,CAAA,CAahC,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 isValidElement,\n} from 'react';\nimport { createPortal } from 'react-dom';\nimport { Transition, TransitionStatus } from 'react-transition-group';\nimport classnames from 'classnames';\n\nimport { useEscapeToClose } from '@hh.ru/magritte-common-keyboard';\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 { 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 {\n NavigationBarComponent,\n NavigationBarComponentRef,\n isNavigationBarComponent,\n} 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 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 checkSafari = () => /^((?!chrome|android).)*safari/i.test(navigator.userAgent);\n\nconst hasSelectedText = () => {\n const selection = document.getSelection();\n return !!selection && !selection.isCollapsed;\n};\n\nconst isContentSizedFullHeight = (children: React.ReactNode) =>\n (isValidElement(children) &&\n typeof children.type === 'function' &&\n 'isFullHeightBottomSheetContent' in children.type &&\n (children.props as { fixedHeight?: boolean }).fixedHeight !== true) ||\n isValidTreeSelectorWrapper(children);\n\nconst toNumber = (value: string) => {\n const result = parseInt(value, 10);\n return Number.isInteger(result) ? result : 0;\n};\n\nconst textInputTypes = ['text', 'password', 'email', 'search', 'tel', 'url', 'number'];\nconst isTextInputElement = (element: Element): element is HTMLInputElement => {\n if (element instanceof HTMLInputElement) {\n return textInputTypes.includes(element.type);\n } else if (element instanceof HTMLTextAreaElement) {\n return true;\n }\n\n return false;\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 exitHandlers: Array<VoidFunction>;\n // число, на которое нужно анимировать изменение высоты контента боттомшита\n heightAnimationDiff: number | null;\n heightAnimationCallback?: VoidFunction | null;\n};\n\nconst makeInitialState = (): State => ({\n dividerVisible: false,\n grabberUnsafe: false,\n hasFocus: false,\n resizeRAFHandle: null,\n scrollOffset: 0,\n swipeOffset: 0,\n touchAction: null,\n exitHandlers: [],\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 keyboardOverlaysFooter = true,\n onAppear,\n onBeforeExit,\n onAfterExit,\n onClose,\n showDivider = 'with-scroll',\n showOverlay = true,\n visible = false,\n withContentPaddings = true,\n 'data-qa': dataQA,\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 focusedElementRef = useRef<HTMLInputElement | HTMLTextAreaElement | null>(null);\n const footerRef = useRef<HTMLDivElement>(null);\n const grabberRef = useRef<HTMLDivElement>(null);\n const headerRef = useRef<NavigationBarComponentRef>(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 const scrollContextProviderRef = useRef<CustomScrollContextNotifier>(null);\n\n const currentVisible = useBreakpoint().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>(makeInitialState());\n const [animationTimeout, setAnimationTimeout] = useState<AnimationTimeout | null>(null);\n const [heightAnimationRunning, setHeightAnimationRunning] = useState(false);\n const bottomSheetContextValue = useMemo(() => ({ contentOverlayRef, height }), [contentOverlayRef, height]);\n const virtualKeyboardOffsetsRef = useRef<{ top: number; bottom: number }>({ top: 0, bottom: 0 });\n\n const [isSafari, setIsSafari] = useState<boolean | null>(null);\n useEffect(() => setIsSafari(checkSafari()), [setIsSafari]);\n\n const [hasTouchSupport, setHasTouchSupport] = useState<boolean | null>(null);\n const hasTouchSupportRef = useRef<boolean | null>(null);\n useEffect(() => {\n if (!('matchMedia' in window)) {\n return void 0;\n }\n const mediaQuery = window.matchMedia('(pointer:coarse)');\n const handleMediaQueryChange = () => {\n hasTouchSupportRef.current = mediaQuery.matches;\n setHasTouchSupport(hasTouchSupportRef.current);\n };\n mediaQuery.addEventListener('change', handleMediaQueryChange);\n hasTouchSupportRef.current = mediaQuery.matches;\n setHasTouchSupport(hasTouchSupportRef.current);\n return () => mediaQuery.removeEventListener('change', handleMediaQueryChange);\n }, [setHasTouchSupport]);\n\n const bindEscapeToClose = useEscapeToClose(() => currentVisible && onClose?.());\n useEffect(() => bindEscapeToClose(document.body), [bindEscapeToClose]);\n\n const LayoutMetrics = useRef(\n (() => {\n let cache: Record<string, number> = {};\n return {\n get bottomSheetHeight() {\n if (!('bottomSheetHeight' in cache) && visualContainerRef.current !== null) {\n cache.bottomSheetHeight = visualContainerRef.current.clientHeight;\n }\n return cache.bottomSheetHeight ?? 0;\n },\n /**\n * Высота контента\n * Может превышать высоту контейнера из-за скролла\n */\n get contentHeight() {\n if (!('contentHeight' in cache) && contentRef.current !== null) {\n cache.contentHeight = contentRef.current.clientHeight;\n }\n return cache.contentHeight ?? 0;\n },\n /**\n * Высота видимой части контента\n */\n get visibleContentHeight() {\n if (!('visibleContentHeight' in cache) && scrollContainerRef.current !== null) {\n const layoutHeaderHeight = headerRef.current?.layoutHeight ?? 0;\n cache.visibleContentHeight = scrollContainerRef.current.clientHeight - layoutHeaderHeight;\n }\n return cache.visibleContentHeight ?? 0;\n },\n /**\n * Положение верхнего края видимой части контента относительно вьюпорта\n */\n get contentTop() {\n if (!('contentTop' in cache) && visualContainerRef.current !== null) {\n const visibleHeaderHeight = headerRef.current?.visibleHeight ?? 0;\n cache.contentTop = visualContainerRef.current.offsetTop + visibleHeaderHeight;\n }\n return cache.contentTop ?? 0;\n },\n get footerHeight() {\n if (!('footerHeight' in cache) && footerRef.current !== null) {\n cache.footerHeight = footerRef.current.clientHeight;\n }\n return cache.footerHeight ?? 0;\n },\n /**\n * Фактическая высота, которую NavigationBar занимает в боттомшите\n * Может отличаться от видимой высоты NavigationBar\n */\n get headerHeight() {\n if (!('headerHeight' in cache) && headerRef.current !== null) {\n cache.headerHeight = headerRef.current.layoutHeight;\n }\n return cache.headerHeight ?? 0;\n },\n get initialOffset() {\n if (!('initialOffset' in cache)) {\n if (\n height === 'half-screen' &&\n hasTouchSupportRef.current &&\n visualContainerRef.current !== null &&\n visualViewport !== null\n ) {\n const halfScreenOffset =\n visualContainerRef.current.clientHeight - visualViewport.height / 2;\n cache.initialOffset = Math.max(Math.round(halfScreenOffset), 0);\n } else {\n cache.initialOffset = 0;\n }\n }\n return cache.initialOffset ?? 0;\n },\n get maxScrollTop() {\n return LayoutMetrics.current.contentHeight - LayoutMetrics.current.visibleContentHeight;\n },\n /**\n * Расстояние между верхним краем боттомшита и границей вьюпорта\n */\n get remainingAvailableHeight() {\n if (!('remainingAvailableHeight' in cache) && grabberRef.current !== null) {\n cache.remainingAvailableHeight = grabberRef.current.offsetTop;\n }\n return cache.remainingAvailableHeight ?? 0;\n },\n invalidateCache() {\n cache = {};\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 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'] = keyboardOverlaysFooter ? '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, keyboardOverlaysFooter]);\n\n const fixOverscroll = useCallback(() => {\n if (hasTouchSupport) {\n const isOverscrolled =\n LayoutMetrics.current.contentHeight + stateRef.current.scrollOffset <\n LayoutMetrics.current.visibleContentHeight;\n if (isOverscrolled) {\n stateRef.current.scrollOffset =\n LayoutMetrics.current.visibleContentHeight - LayoutMetrics.current.contentHeight;\n if (contentRef.current !== null) {\n contentRef.current.style.transform = translateY(stateRef.current.scrollOffset);\n }\n scrollContextProviderRef.current?.notify({\n scrollTop: -stateRef.current.scrollOffset,\n maxScrollTop: LayoutMetrics.current.maxScrollTop,\n });\n }\n }\n }, [hasTouchSupport]);\n\n const resetScrollPosition = useCallback(() => {\n if (hasTouchSupport) {\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 } else {\n scrollContainerRef.current?.scrollTo({ top: 0 });\n }\n }, [hasTouchSupport]);\n\n const recalcScrollFlags = useCallback(() => {\n const scrollOffset = hasTouchSupport\n ? stateRef.current.scrollOffset\n : -(scrollContainerRef.current?.scrollTop ?? 0);\n\n if (dividerRef.current !== null) {\n const prevDividerVisible = stateRef.current.dividerVisible;\n const isNotScrolledToEnd =\n LayoutMetrics.current.contentHeight + scrollOffset > LayoutMetrics.current.visibleContentHeight;\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(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 }, [hasTouchSupport, showDivider]);\n\n // терминология: https://developer.chrome.com/blog/viewport-resize-behavior/\n //\n // при открытии виртуальной клавиатуры браузеры двигают Visual Viewport и Layout Viewport\n // с помощью двух отступов делаем так, чтобы overlay боттомшита совпадал с видимой частью экрана\n const recalcKeyboardOffsets = useCallback(() => {\n if (!hasTouchSupport || !contentRef.current || !overlayRef.current || !visualViewport) {\n return;\n }\n\n LayoutMetrics.current.invalidateCache();\n\n if (stateRef.current.hasFocus && focusedElementRef.current !== null) {\n const overlayDOMRect = overlayRef.current.getBoundingClientRect();\n\n // любой браузер может сдвинуть Visual Viewport вверх, если фокусируемый инпут находится близко к нижней границе\n // из-за этого может возникнуть проблема, что ВЕРХНИЙ край контента уехал за границу Visual Viewport\n // сдвигаем ВЕРХНИЙ край контейнера ВНИЗ, чтобы он совпал с границей Visual Viewport\n const topOffset = Math.round(-overlayDOMRect.top);\n\n let bottomOffset = 0;\n if (isSafari) {\n const visualViewportDiff = Math.round(overlayDOMRect.bottom - visualViewport.height);\n if (visualViewportDiff > 0) {\n // сдвигаем НИЖНИЙ край контейнера ВВЕРХ, чтобы он совпал с границей Visual Viewport\n bottomOffset = visualViewportDiff;\n }\n }\n\n if (keyboardOverlaysFooter && footerRef.current !== null) {\n bottomOffset -= footerRef.current.clientHeight;\n }\n\n if (\n topOffset !== virtualKeyboardOffsetsRef.current.top ||\n bottomOffset !== virtualKeyboardOffsetsRef.current.bottom\n ) {\n setCSSVariable(CSS_VAR_VIRTUAL_KEYBOARD_TOP_OFFSET, `${topOffset}px`);\n setCSSVariable(CSS_VAR_VIRTUAL_KEYBOARD_BOTTOM_OFFSET, `${bottomOffset}px`);\n }\n\n LayoutMetrics.current.invalidateCache();\n\n // если фокусируемый элемент лежит внутри скроллящегося контейнера и не виден, скроллим к нему\n if (contentRef.current.contains(focusedElementRef.current)) {\n let focusedElementOffset = 0;\n for (\n let offsetElement: HTMLElement | null =\n focusedElementRef.current.closest('[data-interactive]') ?? focusedElementRef.current;\n offsetElement !== contentRef.current && offsetElement !== null;\n offsetElement = offsetElement.offsetParent as HTMLElement | null\n ) {\n focusedElementOffset += offsetElement.offsetTop;\n }\n const newScrollOffset = -Math.min(\n Math.max(focusedElementOffset - 10, 0),\n LayoutMetrics.current.maxScrollTop\n );\n if (stateRef.current.scrollOffset !== newScrollOffset) {\n stateRef.current.scrollOffset = newScrollOffset;\n contentRef.current.style.transform = translateY(stateRef.current.scrollOffset);\n\n scrollContextProviderRef.current?.notify({\n scrollTop: -stateRef.current.scrollOffset,\n maxScrollTop: LayoutMetrics.current.maxScrollTop,\n });\n }\n }\n\n recalcScrollFlags();\n\n virtualKeyboardOffsetsRef.current.top = topOffset;\n virtualKeyboardOffsetsRef.current.bottom = bottomOffset;\n } else {\n setCSSVariable(CSS_VAR_VIRTUAL_KEYBOARD_TOP_OFFSET, `0px`);\n setCSSVariable(CSS_VAR_VIRTUAL_KEYBOARD_BOTTOM_OFFSET, `0px`);\n\n LayoutMetrics.current.invalidateCache();\n fixOverscroll();\n recalcScrollFlags();\n\n virtualKeyboardOffsetsRef.current.top = 0;\n virtualKeyboardOffsetsRef.current.bottom = 0;\n }\n }, [fixOverscroll, hasTouchSupport, isSafari, keyboardOverlaysFooter, recalcScrollFlags]);\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 (!isTextInputElement(focusedElement) || 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 visualViewport?.removeEventListener('scroll', 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 visualViewport?.removeEventListener('scroll', handleResize);\n stateRef.current.resizeRAFHandle = null;\n recalcKeyboardOffsets();\n } else {\n stateRef.current.resizeRAFHandle = requestAnimationFrame(waitForResize);\n }\n };\n\n const handleBlur = () => {\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 focusedElementRef.current = null;\n\n if (isSafari) {\n recalcKeyboardOffsets();\n }\n };\n\n stateRef.current.hasFocus = true;\n stateRef.current.resizeRAFHandle = requestAnimationFrame(waitForResize);\n visualViewport?.addEventListener('resize', handleResize);\n // событие scroll может прилететь, только если браузер сдвинул вьюпорт из-за появления виртуальной клавиатуры\n // пользовательский скролл не вызывает событие scroll, т.к. нативный скролл отключен\n // в Safari событие resize может прилететь до того как браузер сдвинул вьюпорт, поэтому слушаем scroll\n if (isSafari) {\n visualViewport?.addEventListener('scroll', handleResize);\n }\n focusedElement.addEventListener('blur', handleBlur);\n focusedElementRef.current = focusedElement;\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 = `${LayoutMetrics.current.contentTop}px`;\n contentOverlayRef.current.style.height = `${LayoutMetrics.current.visibleContentHeight}px`;\n }\n }, []);\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 }, [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 = makeInitialState();\n\n stateRef.current.exitHandlers.forEach((handler) => handler());\n stateRef.current.exitHandlers = [];\n onAfterExit?.();\n }, [onAfterExit]);\n\n const handleHeightAnimationStart = useCallback(() => {\n LayoutMetrics.current.invalidateCache();\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 scrollContextProviderRef.current?.notify({\n scrollTop: 0,\n maxScrollTop: LayoutMetrics.current.maxScrollTop,\n });\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 const visualContainer = visualContainerRef.current;\n if (!visualContainer) {\n return void 0;\n }\n\n const handleScroll = (delta: number) => {\n if (\n LayoutMetrics.current.initialOffset !== 0 ||\n LayoutMetrics.current.contentHeight > LayoutMetrics.current.visibleContentHeight\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.visibleContentHeight\n ) {\n // скролла нет (touchAction is null)\n // либо контент проскроллен до конца, тогда не даем скроллить дальше\n newScrollOffset = LayoutMetrics.current.visibleContentHeight - 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 maxScrollTop: LayoutMetrics.current.maxScrollTop,\n });\n }\n }\n };\n\n let focusedElementTouchY: number | null = null;\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 (focusedElementRef.current !== null &&\n focusedElementTouchY !== null &&\n focusedElementRef.current.clientHeight !== focusedElementRef.current.scrollHeight)\n ) {\n return;\n }\n handleScroll(event.delta);\n };\n\n const onTouchEnd = () => {\n if (focusedElementTouchY !== null) {\n focusedElementTouchY = null;\n }\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 if (event.target === focusedElementRef.current && focusedElementRef.current !== null) {\n focusedElementTouchY = event.changedTouches[0].pageY;\n } else {\n focusedElementTouchY = null;\n swipeHandlers.onTouchStart(event);\n }\n visualContainer.classList.add(styles.noCaret);\n };\n\n const handleTouchMove = (event: TouchEvent) => {\n event.preventDefault();\n event.stopPropagation();\n if (focusedElementRef.current !== null && focusedElementTouchY !== null) {\n focusedElementRef.current.scrollTop += focusedElementTouchY - event.changedTouches[0].pageY;\n focusedElementTouchY = event.changedTouches[0].pageY;\n } else {\n swipeHandlers.onTouchMove(event);\n }\n };\n\n const handleTouchEnd = (event: TouchEvent) => {\n swipeHandlers.onTouchEnd(event);\n visualContainer.classList.remove(styles.noCaret);\n };\n\n const handleTouchCancel = (event: TouchEvent) => {\n swipeHandlers.onTouchCancel(event);\n visualContainer.classList.remove(styles.noCaret);\n };\n\n const removeScrollHandlers = initScrollHandlers({\n axis: 'vertical',\n wrapperRef: visualContainerRef,\n onTouchMove,\n onTouchEnd,\n });\n visualContainer.addEventListener('touchstart', handleTouchStart);\n visualContainer.addEventListener('touchmove', handleTouchMove);\n visualContainer.addEventListener('touchend', handleTouchEnd);\n visualContainer.addEventListener('touchcancel', handleTouchCancel);\n\n return () => {\n removeScrollHandlers();\n visualContainer.removeEventListener('touchstart', handleTouchStart);\n visualContainer.removeEventListener('touchmove', handleTouchMove);\n visualContainer.removeEventListener('touchend', handleTouchEnd);\n visualContainer.removeEventListener('touchcancel', handleTouchCancel);\n };\n }, [allowScrollWhileFocused, recalcScrollFlags, swipeHandlers]);\n\n // при изменении высоты контента анимируем ее\n // задаем боттомшиту фиксированную высоту и пересчитываем ее самостоятельно,\n // чтобы не было мерцания, когда новый контент отрисовался до срабатывания колбека ResizeObserver\n const initHeightObserver = useCallback(() => {\n const visualContainer = visualContainerRef.current;\n if (!visualContainer) {\n return void 0;\n }\n\n let prevContentHeight = 0;\n let prevHeaderHeight = 0;\n let prevFooterHeight = 0;\n let prevVisibleContentHeight = 0;\n let skipFirstResizeCallback = true;\n let collapseResizeCallbacks = false;\n\n const handleHeightChange = () => {\n LayoutMetrics.current.invalidateCache();\n\n if (skipFirstResizeCallback) {\n visualContainer.style.height = `${LayoutMetrics.current.bottomSheetHeight}px`;\n prevHeaderHeight = LayoutMetrics.current.headerHeight;\n prevContentHeight = LayoutMetrics.current.contentHeight;\n prevFooterHeight = LayoutMetrics.current.footerHeight;\n prevVisibleContentHeight = LayoutMetrics.current.visibleContentHeight;\n\n skipFirstResizeCallback = false;\n return;\n }\n\n if (stateRef.current.heightAnimationDiff !== null) {\n if (!collapseResizeCallbacks) {\n // если предыдущая анимация не завершилась, без анимации сбрасываем высоту на вычисленную браузером\n visualContainer.style.height = ``;\n }\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(prevVisibleContentHeight, prevContentHeight);\n const newMinVisibleContentHeight = Math.min(\n prevVisibleContentHeight - 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 resetScrollPosition();\n } else {\n // если высота видимой части контента не изменилась,\n // но позиция скролла превысила максимально допустимую из-за уменьшения высоты контента,\n // сбрасываем позицию скролла на максимально допустимую\n fixOverscroll();\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 prevVisibleContentHeight = LayoutMetrics.current.visibleContentHeight;\n };\n\n setHeightAnimationRunning(true);\n\n collapseResizeCallbacks = true;\n requestAnimationFrame(() => {\n collapseResizeCallbacks = false;\n });\n } else {\n recalcContentOverlayPosition();\n recalcScrollFlags();\n }\n }\n\n prevHeaderHeight = LayoutMetrics.current.headerHeight;\n prevContentHeight = LayoutMetrics.current.contentHeight;\n prevFooterHeight = LayoutMetrics.current.footerHeight;\n };\n\n const resizeObserver = new ResizeObserver(handleHeightChange);\n const content = contentRef.current;\n const footer = footerRef.current;\n const header = headerRef.current;\n\n content !== null && resizeObserver.observe(content);\n footer !== null && resizeObserver.observe(footer);\n header !== null && header.addHeightObserver(handleHeightChange);\n\n return () => {\n resizeObserver.disconnect();\n header !== null && header.removeHeightObserver(handleHeightChange);\n };\n }, [\n fixOverscroll,\n recalcContentOverlayPosition,\n recalcScrollFlags,\n resetScrollPosition,\n setHeightAnimationRunning,\n ]);\n\n const handleAppearAnimationEnd = useCallback(() => {\n const removeHeightObserver = initHeightObserver();\n removeHeightObserver && stateRef.current.exitHandlers.push(removeHeightObserver);\n\n const removeTransformHandlers = hasTouchSupport && initTransformHandlers();\n removeTransformHandlers && stateRef.current.exitHandlers.push(removeTransformHandlers);\n\n onAppearRef.current?.();\n }, [hasTouchSupport, initHeightObserver, initTransformHandlers]);\n\n const { onTouchEnd, ...eventHandlers } = useNoBubbling();\n\n if (!animationTimeout) {\n return null;\n }\n\n const containerDataQa = `bottom-sheet-container${dataQA ? ` ${dataQA}` : ''}`;\n\n const renderFunc = (appearTransition: TransitionStatus, heightTransition: TransitionStatus) => {\n const navigationBar =\n header && isNavigationBarComponent(header) ? (\n <NavigationBarComponent {...header.props} forwardedRef={headerRef} />\n ) : null;\n\n const content = (\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(children),\n })}\n ref={contentRef}\n >\n <BottomSheetContext.Provider value={bottomSheetContextValue}>{children}</BottomSheetContext.Provider>\n </div>\n );\n\n const scrollContainer = hasTouchSupport ? (\n <CustomScrollContextProvider ref={scrollContextProviderRef}>\n <div className={styles.scrollContainer} onFocus={handleFocus} ref={scrollContainerRef}>\n {navigationBar}\n {content}\n </div>\n </CustomScrollContextProvider>\n ) : (\n <div\n className={classnames(styles.scrollContainer, styles.nativeScrollContainer)}\n onFocus={handleFocus}\n onScroll={recalcScrollFlags}\n ref={scrollContainerRef}\n >\n {navigationBar}\n {content}\n </div>\n );\n\n const clonedFooter =\n footer && isActionBarComponent(footer)\n ? cloneElement(footer, { type: footer.props.type || 'mobile', showDivider: false })\n : footer;\n\n return (\n <Layer layer=\"bottom-sheet\">\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' ? containerDataQa : 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 {scrollContainer}\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 && hasTouchSupport ? (\n <ClickInterceptor>{clonedFooter}</ClickInterceptor>\n ) : (\n clonedFooter\n )}\n </div>\n </div>\n <div className={styles.contentOverlay} ref={contentOverlayRef} />\n </div>\n </div>\n </Layer>\n );\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 key={`hasTouchSupport:${hasTouchSupport}`}\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":";;;;;;;;;;;;;;;;;;;;;AA2CA,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,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0B,EACnC,SAAS,EAAE,wBAAwB,EACnC,OAAO,EAAE,gBAAgB,CAAC,MAAM,EAChC,OAAO,EAAE,UAAU,EAAA,QAAA,EAElB,CAAC,gBAAgB,KAAK,UAAU,CAAC,gBAAgB,EAAE,gBAAgB,CAAC,EAAA,CAC5D,CAChB,EAAA,EAZI,CAAmB,gBAAA,EAAA,eAAe,CAAE,CAAA,CAahC,EACX,CAAA,EACN,QAAQ,CAAC,IAAI,CAChB,CAAC;AACN,CAAC,CAAC;MAEW,WAAW,GAAG,UAAU,CAAC,qBAAqB;;;;"}
|
package/BottomSheetContext.d.ts
CHANGED
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
import { RefObject } from 'react';
|
|
2
|
+
import { BottomSheetHeight } from '@hh.ru/magritte-ui-bottom-sheet/types';
|
|
2
3
|
export interface BottomSheetContextProps {
|
|
3
4
|
contentOverlayRef: RefObject<HTMLDivElement | null>;
|
|
5
|
+
height: BottomSheetHeight;
|
|
4
6
|
}
|
|
5
7
|
export declare const BottomSheetContext: import("react").Context<BottomSheetContextProps>;
|
package/BottomSheetContext.js
CHANGED
|
@@ -1,7 +1,10 @@
|
|
|
1
1
|
import './index.css';
|
|
2
2
|
import { createContext } from 'react';
|
|
3
3
|
|
|
4
|
-
const BottomSheetContext = createContext({
|
|
4
|
+
const BottomSheetContext = createContext({
|
|
5
|
+
contentOverlayRef: { current: null },
|
|
6
|
+
height: 'content',
|
|
7
|
+
});
|
|
5
8
|
|
|
6
9
|
export { BottomSheetContext };
|
|
7
10
|
//# sourceMappingURL=BottomSheetContext.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BottomSheetContext.js","sources":["../src/BottomSheetContext.ts"],"sourcesContent":["import { RefObject, createContext } from 'react';\n\nexport interface BottomSheetContextProps {\n contentOverlayRef: RefObject<HTMLDivElement | null>;\n}\n\nexport const BottomSheetContext = createContext<BottomSheetContextProps>({
|
|
1
|
+
{"version":3,"file":"BottomSheetContext.js","sources":["../src/BottomSheetContext.ts"],"sourcesContent":["import { RefObject, createContext } from 'react';\n\nimport { BottomSheetHeight } from '@hh.ru/magritte-ui-bottom-sheet/types';\n\nexport interface BottomSheetContextProps {\n contentOverlayRef: RefObject<HTMLDivElement | null>;\n height: BottomSheetHeight;\n}\n\nexport const BottomSheetContext = createContext<BottomSheetContextProps>({\n contentOverlayRef: { current: null },\n height: 'content',\n});\n"],"names":[],"mappings":";;AASO,MAAM,kBAAkB,GAAG,aAAa,CAA0B;AACrE,IAAA,iBAAiB,EAAE,EAAE,OAAO,EAAE,IAAI,EAAE;AACpC,IAAA,MAAM,EAAE,SAAS;AACpB,CAAA;;;;"}
|
package/BottomSheetFooter.js
CHANGED
|
@@ -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-1YgEly-x.js';
|
|
4
4
|
|
|
5
5
|
const BottomSheetFooter = ({ children }) => (jsx("div", { className: styles.footerWithPadding, children: children }));
|
|
6
6
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import './index.css';
|
|
2
2
|
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
3
3
|
import { useRef, useEffect } from 'react';
|
|
4
|
-
import { s as styles } from './bottom-sheet-
|
|
4
|
+
import { s as styles } from './bottom-sheet-1YgEly-x.js';
|
|
5
5
|
|
|
6
6
|
const BottomSheetIFrameAdapter = ({ children }) => {
|
|
7
7
|
const touchEventsInterceptorRef = useRef(null);
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import './index.css';
|
|
2
|
+
var styles = {"flex-container":"magritte-flex-container___muHAx_7-1-2","flexContainer":"magritte-flex-container___muHAx_7-1-2","animation-timeout":"magritte-animation-timeout___yd-SZ_7-1-2","animationTimeout":"magritte-animation-timeout___yd-SZ_7-1-2","css-variables-container":"magritte-css-variables-container___jBCr9_7-1-2","cssVariablesContainer":"magritte-css-variables-container___jBCr9_7-1-2","appear-animation":"magritte-appear-animation___P84Ln_7-1-2","appearAnimation":"magritte-appear-animation___P84Ln_7-1-2","disappear-animation":"magritte-disappear-animation___Putks_7-1-2","disappearAnimation":"magritte-disappear-animation___Putks_7-1-2","grabber-transition-animation":"magritte-grabber-transition-animation___s3Oh4_7-1-2","grabberTransitionAnimation":"magritte-grabber-transition-animation___s3Oh4_7-1-2","height-transition-animation":"magritte-height-transition-animation___xNprr_7-1-2","heightTransitionAnimation":"magritte-height-transition-animation___xNprr_7-1-2","close-by-swipe-animation":"magritte-close-by-swipe-animation___wdezY_7-1-2","closeBySwipeAnimation":"magritte-close-by-swipe-animation___wdezY_7-1-2","swipe-cancel-animation":"magritte-swipe-cancel-animation___AhYj5_7-1-2","swipeCancelAnimation":"magritte-swipe-cancel-animation___AhYj5_7-1-2","overlay":"magritte-overlay___5a2U-_7-1-2","overlay-background":"magritte-overlay-background___8Sd4V_7-1-2","overlayBackground":"magritte-overlay-background___8Sd4V_7-1-2","overlay-background_visible":"magritte-overlay-background_visible___FOJgj_7-1-2","overlayBackgroundVisible":"magritte-overlay-background_visible___FOJgj_7-1-2","swipe-container":"magritte-swipe-container___sZ2n5_7-1-2","swipeContainer":"magritte-swipe-container___sZ2n5_7-1-2","grabber":"magritte-grabber___A7SB-_7-1-2","grabber_ensure-safe":"magritte-grabber_ensure-safe___DR-dV_7-1-2","grabberEnsureSafe":"magritte-grabber_ensure-safe___DR-dV_7-1-2","visual-container":"magritte-visual-container___-VSuY_7-1-2","visualContainer":"magritte-visual-container___-VSuY_7-1-2","visual-container_full-screen":"magritte-visual-container_full-screen___jCCBb_7-1-2","visualContainerFullScreen":"magritte-visual-container_full-screen___jCCBb_7-1-2","scroll-container":"magritte-scroll-container___4ngNY_7-1-2","scrollContainer":"magritte-scroll-container___4ngNY_7-1-2","native-scroll-container":"magritte-native-scroll-container___JOlxE_7-1-2","nativeScrollContainer":"magritte-native-scroll-container___JOlxE_7-1-2","content":"magritte-content___1gAwP_7-1-2","content_full-screen":"magritte-content_full-screen___2SFaO_7-1-2","contentFullScreen":"magritte-content_full-screen___2SFaO_7-1-2","content_sized-full-screen":"magritte-content_sized-full-screen___45pa6_7-1-2","contentSizedFullScreen":"magritte-content_sized-full-screen___45pa6_7-1-2","content_with-paddings":"magritte-content_with-paddings___gIiAv_7-1-2","contentWithPaddings":"magritte-content_with-paddings___gIiAv_7-1-2","footer":"magritte-footer___RWslT_7-1-2","footer-with-padding":"magritte-footer-with-padding___KwkhC_7-1-2","footerWithPadding":"magritte-footer-with-padding___KwkhC_7-1-2","divider":"magritte-divider___0F8hh_7-1-2","divider_visible":"magritte-divider_visible___pAWZM_7-1-2","dividerVisible":"magritte-divider_visible___pAWZM_7-1-2","content-overlay":"magritte-content-overlay___HAyzL_7-1-2","contentOverlay":"magritte-content-overlay___HAyzL_7-1-2","no-caret":"magritte-no-caret___ewcMD_7-1-2","noCaret":"magritte-no-caret___ewcMD_7-1-2","iframe-wrapper":"magritte-iframe-wrapper___gBCL5_7-1-2","iframeWrapper":"magritte-iframe-wrapper___gBCL5_7-1-2","iframe-events-interceptor":"magritte-iframe-events-interceptor___FTW-8_7-1-2","iframeEventsInterceptor":"magritte-iframe-events-interceptor___FTW-8_7-1-2"};
|
|
3
|
+
|
|
4
|
+
export { styles as s };
|
|
5
|
+
//# sourceMappingURL=bottom-sheet-1YgEly-x.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"bottom-sheet-1YgEly-x.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;"}
|
package/index.css
CHANGED
|
@@ -19,13 +19,13 @@
|
|
|
19
19
|
--magritte-color-component-bottom-sheet-grabber-content-v21-3-2:#c6c6c68f;
|
|
20
20
|
--magritte-color-component-_overlay-background-content-v21-3-2:#26262699;
|
|
21
21
|
}
|
|
22
|
-
.magritte-flex-container___muHAx_7-1-
|
|
22
|
+
.magritte-flex-container___muHAx_7-1-2{
|
|
23
23
|
display:flex;
|
|
24
24
|
flex-direction:column;
|
|
25
25
|
align-items:stretch;
|
|
26
26
|
}
|
|
27
|
-
.magritte-animation-timeout___yd-SZ_7-1-
|
|
28
|
-
.magritte-css-variables-container___jBCr9_7-1-
|
|
27
|
+
.magritte-animation-timeout___yd-SZ_7-1-2,
|
|
28
|
+
.magritte-css-variables-container___jBCr9_7-1-2{
|
|
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_7-1-
|
|
39
|
-
.magritte-css-variables-container___jBCr9_7-1-
|
|
38
|
+
.magritte-animation-timeout___yd-SZ_7-1-2,
|
|
39
|
+
.magritte-css-variables-container___jBCr9_7-1-2{
|
|
40
40
|
--enter-animation-duration:var(--magritte-semantic-animation-ease-in-out-300-duration-v21-3-2);
|
|
41
41
|
--exit-animation-duration:var(--magritte-semantic-animation-ease-in-out-200-duration-v21-3-2);
|
|
42
42
|
--grabber-animation-duration:var(--magritte-semantic-animation-ease-in-out-200-duration-v21-3-2);
|
|
@@ -44,52 +44,52 @@
|
|
|
44
44
|
--swipe-cancel-transition-duration:var(--magritte-semantic-animation-ease-in-out-100-duration-v21-3-2);
|
|
45
45
|
}
|
|
46
46
|
}
|
|
47
|
-
.magritte-appear-animation___P84Ln_7-1-
|
|
47
|
+
.magritte-appear-animation___P84Ln_7-1-2{
|
|
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-v21-3-2);
|
|
51
51
|
}
|
|
52
|
-
.magritte-disappear-animation___Putks_7-1-
|
|
52
|
+
.magritte-disappear-animation___Putks_7-1-2{
|
|
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-v21-3-2);
|
|
56
56
|
}
|
|
57
|
-
.magritte-grabber-transition-animation___s3Oh4_7-1-
|
|
57
|
+
.magritte-grabber-transition-animation___s3Oh4_7-1-2::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-v21-3-2);
|
|
61
61
|
}
|
|
62
|
-
.magritte-height-transition-animation___xNprr_7-1-
|
|
62
|
+
.magritte-height-transition-animation___xNprr_7-1-2{
|
|
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-v21-3-2);
|
|
66
66
|
}
|
|
67
|
-
.magritte-close-by-swipe-animation___wdezY_7-1-
|
|
67
|
+
.magritte-close-by-swipe-animation___wdezY_7-1-2{
|
|
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_7-1-
|
|
72
|
+
.magritte-swipe-cancel-animation___AhYj5_7-1-2{
|
|
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-v21-3-2);
|
|
76
76
|
}
|
|
77
|
-
.magritte-overlay___5a2U-_7-1-
|
|
77
|
+
.magritte-overlay___5a2U-_7-1-2{
|
|
78
78
|
pointer-events:none;
|
|
79
79
|
position:fixed;
|
|
80
80
|
inset:0;
|
|
81
81
|
}
|
|
82
|
-
.magritte-overlay-background___8Sd4V_7-1-
|
|
82
|
+
.magritte-overlay-background___8Sd4V_7-1-2{
|
|
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_7-1-
|
|
88
|
+
.magritte-overlay-background_visible___FOJgj_7-1-2{
|
|
89
89
|
pointer-events:initial;
|
|
90
90
|
background-color:var(--magritte-color-component-_overlay-background-content-v21-3-2);
|
|
91
91
|
}
|
|
92
|
-
.magritte-swipe-container___sZ2n5_7-1-
|
|
92
|
+
.magritte-swipe-container___sZ2n5_7-1-2{
|
|
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-_7-1-
|
|
102
|
+
.magritte-grabber___A7SB-_7-1-2{
|
|
103
103
|
flex:0 0 20px;
|
|
104
104
|
position:relative;
|
|
105
105
|
}
|
|
106
|
-
.magritte-grabber___A7SB-_7-1-
|
|
106
|
+
.magritte-grabber___A7SB-_7-1-2::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-v21-3-2);
|
|
115
115
|
z-index:3;
|
|
116
116
|
}
|
|
117
|
-
.magritte-grabber_ensure-safe___DR-dV_7-1-
|
|
117
|
+
.magritte-grabber_ensure-safe___DR-dV_7-1-2::after{
|
|
118
118
|
transform:translateY(20px);
|
|
119
119
|
}
|
|
120
|
-
.magritte-visual-container___-VSuY_7-1-
|
|
120
|
+
.magritte-visual-container___-VSuY_7-1-2{
|
|
121
121
|
display:flex;
|
|
122
122
|
flex-direction:column;
|
|
123
123
|
align-items:stretch;
|
|
@@ -130,11 +130,11 @@
|
|
|
130
130
|
overflow:clip;
|
|
131
131
|
user-select:text;
|
|
132
132
|
}
|
|
133
|
-
.magritte-visual-container_full-screen___jCCBb_7-1-
|
|
133
|
+
.magritte-visual-container_full-screen___jCCBb_7-1-2{
|
|
134
134
|
flex:1 1 auto;
|
|
135
135
|
min-height:1px;
|
|
136
136
|
}
|
|
137
|
-
.magritte-scroll-container___4ngNY_7-1-
|
|
137
|
+
.magritte-scroll-container___4ngNY_7-1-2{
|
|
138
138
|
--magritte-ui-navigation-bar-background-override:var(--magritte-color-component-bottom-sheet-background-content-v21-3-2);
|
|
139
139
|
--magritte-ui-navigation-bar-top-padding-override:16px;
|
|
140
140
|
display:flex;
|
|
@@ -144,14 +144,14 @@
|
|
|
144
144
|
min-height:1px;
|
|
145
145
|
z-index:1;
|
|
146
146
|
}
|
|
147
|
-
.magritte-native-scroll-container___JOlxE_7-1-
|
|
147
|
+
.magritte-native-scroll-container___JOlxE_7-1-2{
|
|
148
148
|
overflow:scroll;
|
|
149
149
|
scrollbar-width:none;
|
|
150
150
|
}
|
|
151
|
-
.magritte-native-scroll-container___JOlxE_7-1-
|
|
151
|
+
.magritte-native-scroll-container___JOlxE_7-1-2::-webkit-scrollbar{
|
|
152
152
|
display:none;
|
|
153
153
|
}
|
|
154
|
-
.magritte-content___1gAwP_7-1-
|
|
154
|
+
.magritte-content___1gAwP_7-1-2{
|
|
155
155
|
display:flex;
|
|
156
156
|
flex-direction:column;
|
|
157
157
|
align-items:stretch;
|
|
@@ -160,48 +160,48 @@
|
|
|
160
160
|
will-change:transform;
|
|
161
161
|
transform:translate3d(0, 0, 0);
|
|
162
162
|
}
|
|
163
|
-
.magritte-content_full-screen___2SFaO_7-1-
|
|
163
|
+
.magritte-content_full-screen___2SFaO_7-1-2{
|
|
164
164
|
flex:1 0 auto;
|
|
165
165
|
}
|
|
166
|
-
.magritte-content_sized-full-screen___45pa6_7-1-
|
|
166
|
+
.magritte-content_sized-full-screen___45pa6_7-1-2{
|
|
167
167
|
flex:1 1 auto;
|
|
168
168
|
min-height:1px;
|
|
169
169
|
}
|
|
170
|
-
.magritte-content_with-paddings___gIiAv_7-1-
|
|
170
|
+
.magritte-content_with-paddings___gIiAv_7-1-2{
|
|
171
171
|
padding:16px 16px 0;
|
|
172
172
|
}
|
|
173
|
-
.magritte-footer___RWslT_7-1-
|
|
173
|
+
.magritte-footer___RWslT_7-1-2{
|
|
174
174
|
flex:0 0 auto;
|
|
175
175
|
background-color:var(--magritte-color-component-bottom-sheet-background-content-v21-3-2);
|
|
176
176
|
z-index:2;
|
|
177
177
|
will-change:transform;
|
|
178
178
|
transform:translate3d(0, 0, 0);
|
|
179
179
|
}
|
|
180
|
-
.magritte-footer-with-padding___KwkhC_7-1-
|
|
180
|
+
.magritte-footer-with-padding___KwkhC_7-1-2{
|
|
181
181
|
display:flex;
|
|
182
182
|
flex-direction:column;
|
|
183
183
|
gap:12px;
|
|
184
184
|
padding:16px;
|
|
185
185
|
}
|
|
186
|
-
.magritte-divider___0F8hh_7-1-
|
|
186
|
+
.magritte-divider___0F8hh_7-1-2{
|
|
187
187
|
visibility:hidden;
|
|
188
188
|
}
|
|
189
|
-
.magritte-divider_visible___pAWZM_7-1-
|
|
189
|
+
.magritte-divider_visible___pAWZM_7-1-2{
|
|
190
190
|
visibility:visible;
|
|
191
191
|
}
|
|
192
|
-
.magritte-content-overlay___HAyzL_7-1-
|
|
192
|
+
.magritte-content-overlay___HAyzL_7-1-2{
|
|
193
193
|
pointer-events:none;
|
|
194
194
|
position:absolute;
|
|
195
195
|
inset:0;
|
|
196
196
|
}
|
|
197
|
-
.magritte-no-caret___ewcMD_7-1-
|
|
197
|
+
.magritte-no-caret___ewcMD_7-1-2{
|
|
198
198
|
--magritte-ui-input-caret-color-override:transparent;
|
|
199
199
|
--magritte-ui-textarea-caret-color-override:transparent;
|
|
200
200
|
}
|
|
201
|
-
.magritte-iframe-wrapper___gBCL5_7-1-
|
|
201
|
+
.magritte-iframe-wrapper___gBCL5_7-1-2{
|
|
202
202
|
position:relative;
|
|
203
203
|
}
|
|
204
|
-
.magritte-iframe-events-interceptor___FTW-8_7-1-
|
|
204
|
+
.magritte-iframe-events-interceptor___FTW-8_7-1-2{
|
|
205
205
|
position:absolute;
|
|
206
206
|
inset:0;
|
|
207
207
|
}
|
package/index.d.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
export { BottomSheet } from '@hh.ru/magritte-ui-bottom-sheet/BottomSheet';
|
|
2
2
|
export { BottomSheetContentOverlay } from '@hh.ru/magritte-ui-bottom-sheet/BottomSheetContentOverlay';
|
|
3
|
+
export { BottomSheetContext } from '@hh.ru/magritte-ui-bottom-sheet/BottomSheetContext';
|
|
3
4
|
export { BottomSheetFooter } from '@hh.ru/magritte-ui-bottom-sheet/BottomSheetFooter';
|
|
4
5
|
export { BottomSheetIFrameAdapter } from '@hh.ru/magritte-ui-bottom-sheet/BottomSheetIFrameAdapter';
|
|
5
6
|
export * from '@hh.ru/magritte-ui-bottom-sheet/types';
|
package/index.js
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import './index.css';
|
|
2
2
|
export { BottomSheet } from './BottomSheet.js';
|
|
3
3
|
export { BottomSheetContentOverlay } from './BottomSheetContentOverlay.js';
|
|
4
|
+
export { BottomSheetContext } from './BottomSheetContext.js';
|
|
4
5
|
export { BottomSheetFooter } from './BottomSheetFooter.js';
|
|
5
6
|
export { BottomSheetIFrameAdapter } from './BottomSheetIFrameAdapter.js';
|
|
6
7
|
export * from '@hh.ru/magritte-ui-theme-provider';
|
|
@@ -16,12 +17,11 @@ import '@hh.ru/magritte-common-use-no-bubbling';
|
|
|
16
17
|
import '@hh.ru/magritte-common-use-swipe';
|
|
17
18
|
import '@hh.ru/magritte-internal-custom-scroll';
|
|
18
19
|
import '@hh.ru/magritte-ui-action-bar';
|
|
19
|
-
import './BottomSheetContext.js';
|
|
20
20
|
import './ClickInterceptor.js';
|
|
21
21
|
import '@hh.ru/magritte-ui-breakpoint';
|
|
22
22
|
import '@hh.ru/magritte-ui-divider';
|
|
23
23
|
import '@hh.ru/magritte-ui-layer';
|
|
24
24
|
import '@hh.ru/magritte-ui-navigation-bar';
|
|
25
25
|
import '@hh.ru/magritte-ui-tree-selector';
|
|
26
|
-
import './bottom-sheet-
|
|
26
|
+
import './bottom-sheet-1YgEly-x.js';
|
|
27
27
|
//# sourceMappingURL=index.js.map
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@hh.ru/magritte-ui-bottom-sheet",
|
|
3
|
-
"version": "7.1.
|
|
3
|
+
"version": "7.1.2",
|
|
4
4
|
"main": "index.js",
|
|
5
5
|
"types": "index.d.ts",
|
|
6
6
|
"sideEffects": [
|
|
@@ -29,14 +29,14 @@
|
|
|
29
29
|
"@hh.ru/magritte-design-tokens": "21.3.2",
|
|
30
30
|
"@hh.ru/magritte-internal-custom-scroll": "1.4.0",
|
|
31
31
|
"@hh.ru/magritte-internal-layer-name": "3.0.0",
|
|
32
|
-
"@hh.ru/magritte-ui-action-bar": "3.0.
|
|
32
|
+
"@hh.ru/magritte-ui-action-bar": "3.0.8",
|
|
33
33
|
"@hh.ru/magritte-ui-breakpoint": "5.0.0",
|
|
34
34
|
"@hh.ru/magritte-ui-divider": "1.1.45",
|
|
35
35
|
"@hh.ru/magritte-ui-layer": "3.0.0",
|
|
36
36
|
"@hh.ru/magritte-ui-mock-component": "1.0.12",
|
|
37
|
-
"@hh.ru/magritte-ui-navigation-bar": "8.0.
|
|
37
|
+
"@hh.ru/magritte-ui-navigation-bar": "8.0.1",
|
|
38
38
|
"@hh.ru/magritte-ui-theme-provider": "1.1.41",
|
|
39
|
-
"@hh.ru/magritte-ui-tree-selector": "4.6.
|
|
39
|
+
"@hh.ru/magritte-ui-tree-selector": "4.6.28"
|
|
40
40
|
},
|
|
41
41
|
"peerDependencies": {
|
|
42
42
|
"classnames": ">=2.3.2",
|
|
@@ -47,5 +47,5 @@
|
|
|
47
47
|
"publishConfig": {
|
|
48
48
|
"access": "public"
|
|
49
49
|
},
|
|
50
|
-
"gitHead": "
|
|
50
|
+
"gitHead": "20f33b3e2dcb9c74daecd73cfc489a5ea93beed4"
|
|
51
51
|
}
|
package/bottom-sheet-3gMjDLi3.js
DELETED
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
import './index.css';
|
|
2
|
-
var styles = {"flex-container":"magritte-flex-container___muHAx_7-1-0","flexContainer":"magritte-flex-container___muHAx_7-1-0","animation-timeout":"magritte-animation-timeout___yd-SZ_7-1-0","animationTimeout":"magritte-animation-timeout___yd-SZ_7-1-0","css-variables-container":"magritte-css-variables-container___jBCr9_7-1-0","cssVariablesContainer":"magritte-css-variables-container___jBCr9_7-1-0","appear-animation":"magritte-appear-animation___P84Ln_7-1-0","appearAnimation":"magritte-appear-animation___P84Ln_7-1-0","disappear-animation":"magritte-disappear-animation___Putks_7-1-0","disappearAnimation":"magritte-disappear-animation___Putks_7-1-0","grabber-transition-animation":"magritte-grabber-transition-animation___s3Oh4_7-1-0","grabberTransitionAnimation":"magritte-grabber-transition-animation___s3Oh4_7-1-0","height-transition-animation":"magritte-height-transition-animation___xNprr_7-1-0","heightTransitionAnimation":"magritte-height-transition-animation___xNprr_7-1-0","close-by-swipe-animation":"magritte-close-by-swipe-animation___wdezY_7-1-0","closeBySwipeAnimation":"magritte-close-by-swipe-animation___wdezY_7-1-0","swipe-cancel-animation":"magritte-swipe-cancel-animation___AhYj5_7-1-0","swipeCancelAnimation":"magritte-swipe-cancel-animation___AhYj5_7-1-0","overlay":"magritte-overlay___5a2U-_7-1-0","overlay-background":"magritte-overlay-background___8Sd4V_7-1-0","overlayBackground":"magritte-overlay-background___8Sd4V_7-1-0","overlay-background_visible":"magritte-overlay-background_visible___FOJgj_7-1-0","overlayBackgroundVisible":"magritte-overlay-background_visible___FOJgj_7-1-0","swipe-container":"magritte-swipe-container___sZ2n5_7-1-0","swipeContainer":"magritte-swipe-container___sZ2n5_7-1-0","grabber":"magritte-grabber___A7SB-_7-1-0","grabber_ensure-safe":"magritte-grabber_ensure-safe___DR-dV_7-1-0","grabberEnsureSafe":"magritte-grabber_ensure-safe___DR-dV_7-1-0","visual-container":"magritte-visual-container___-VSuY_7-1-0","visualContainer":"magritte-visual-container___-VSuY_7-1-0","visual-container_full-screen":"magritte-visual-container_full-screen___jCCBb_7-1-0","visualContainerFullScreen":"magritte-visual-container_full-screen___jCCBb_7-1-0","scroll-container":"magritte-scroll-container___4ngNY_7-1-0","scrollContainer":"magritte-scroll-container___4ngNY_7-1-0","native-scroll-container":"magritte-native-scroll-container___JOlxE_7-1-0","nativeScrollContainer":"magritte-native-scroll-container___JOlxE_7-1-0","content":"magritte-content___1gAwP_7-1-0","content_full-screen":"magritte-content_full-screen___2SFaO_7-1-0","contentFullScreen":"magritte-content_full-screen___2SFaO_7-1-0","content_sized-full-screen":"magritte-content_sized-full-screen___45pa6_7-1-0","contentSizedFullScreen":"magritte-content_sized-full-screen___45pa6_7-1-0","content_with-paddings":"magritte-content_with-paddings___gIiAv_7-1-0","contentWithPaddings":"magritte-content_with-paddings___gIiAv_7-1-0","footer":"magritte-footer___RWslT_7-1-0","footer-with-padding":"magritte-footer-with-padding___KwkhC_7-1-0","footerWithPadding":"magritte-footer-with-padding___KwkhC_7-1-0","divider":"magritte-divider___0F8hh_7-1-0","divider_visible":"magritte-divider_visible___pAWZM_7-1-0","dividerVisible":"magritte-divider_visible___pAWZM_7-1-0","content-overlay":"magritte-content-overlay___HAyzL_7-1-0","contentOverlay":"magritte-content-overlay___HAyzL_7-1-0","no-caret":"magritte-no-caret___ewcMD_7-1-0","noCaret":"magritte-no-caret___ewcMD_7-1-0","iframe-wrapper":"magritte-iframe-wrapper___gBCL5_7-1-0","iframeWrapper":"magritte-iframe-wrapper___gBCL5_7-1-0","iframe-events-interceptor":"magritte-iframe-events-interceptor___FTW-8_7-1-0","iframeEventsInterceptor":"magritte-iframe-events-interceptor___FTW-8_7-1-0"};
|
|
3
|
-
|
|
4
|
-
export { styles as s };
|
|
5
|
-
//# sourceMappingURL=bottom-sheet-3gMjDLi3.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"bottom-sheet-3gMjDLi3.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;"}
|