@hh.ru/magritte-ui-bottom-sheet 9.4.25 → 9.4.27

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 CHANGED
@@ -15,6 +15,7 @@ import { isActionBarComponent } from '@hh.ru/magritte-ui-action-bar';
15
15
  import { BottomSheetContext } from './BottomSheetContext.js';
16
16
  import { BottomSheetMedia } from './BottomSheetMedia.js';
17
17
  import { ClickInterceptor } from './ClickInterceptor.js';
18
+ import { BOTTOM_SHEET_ACTION_BAR_DEFAULTS } from './actionBarDefaults.js';
18
19
  import { useBreakpoint } from '@hh.ru/magritte-ui-breakpoint';
19
20
  import { ContentOverlayRoot } from '@hh.ru/magritte-ui-content-overlay';
20
21
  import { Divider } from '@hh.ru/magritte-ui-divider';
@@ -22,14 +23,13 @@ import { Layer } from '@hh.ru/magritte-ui-layer';
22
23
  import { TextAreaGrowLimiter } from '@hh.ru/magritte-ui-textarea';
23
24
  import { ThemeWrapper } from '@hh.ru/magritte-ui-theme-wrapper';
24
25
  import { isValidTreeSelectorWrapper } from '@hh.ru/magritte-ui-tree-selector';
25
- import { s as styles } from './bottom-sheet-CCIz7agd.js';
26
+ import { s as styles } from './bottom-sheet-Dmsk4YVB.js';
26
27
 
27
28
  const CSS_VAR_ENTER_ANIMATION_DURATION = '--enter-animation-duration';
28
29
  const CSS_VAR_EXIT_ANIMATION_DURATION = '--exit-animation-duration';
29
30
  const CSS_VAR_HEIGHT_ANIMATION_DURATION = '--height-transition-duration';
30
31
  const CSS_VAR_VIRTUAL_KEYBOARD_TOP_OFFSET = '--virtual-keyboard-top-offset';
31
32
  const CSS_VAR_VIRTUAL_KEYBOARD_BOTTOM_OFFSET = '--virtual-keyboard-bottom-offset';
32
- const DEFAULT_ACTION_BAR_PADDING = 16;
33
33
  const checkSafari = () => /^((?!chrome|android).)*safari/i.test(navigator.userAgent);
34
34
  const hasSelectedText = () => {
35
35
  const selection = document.getSelection();
@@ -917,9 +917,9 @@ const BottomSheetRenderFunc = ({ allowScrollWhileFocused, children, footer, head
917
917
  }), onFocus: handleFocus, onScroll: recalcScrollFlags, ref: scrollContainerRef, children: jsxs(GrowLimitWrapper, { ...growLimiterProps, children: [jsx("div", { className: styles.headerWrapper, ref: headerWrapperRef, children: header }), content] }) }));
918
918
  const clonedFooter = footer && isActionBarComponent(footer)
919
919
  ? cloneElement(footer, {
920
- type: footer.props.type || 'vertical',
921
- padding: footer.props.padding || DEFAULT_ACTION_BAR_PADDING,
922
- showDivider: false,
920
+ type: footer.props.type || BOTTOM_SHEET_ACTION_BAR_DEFAULTS.type,
921
+ padding: footer.props.padding || BOTTOM_SHEET_ACTION_BAR_DEFAULTS.padding,
922
+ showDivider: BOTTOM_SHEET_ACTION_BAR_DEFAULTS.showDivider,
923
923
  })
924
924
  : footer;
925
925
  return (jsx(Layer, { layer: "bottom-sheet", children: jsxs("div", { ...eventHandlers, className: styles.overlay, children: [jsx("div", { className: classnames(styles.overlayBackground, {
@@ -1 +1 @@
1
- {"version":3,"file":"BottomSheet.js","sources":["src/BottomSheet.tsx"],"sourcesContent":["import {\n type FC,\n type HTMLAttributes,\n type Ref,\n FocusEventHandler,\n ForwardRefRenderFunction,\n forwardRef,\n useCallback,\n useEffect,\n useMemo,\n useRef,\n useState,\n cloneElement,\n isValidElement,\n Fragment,\n Children,\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, TimeoutCallback } 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 AccessibleRegionProvider,\n useAccessibleRegionProps,\n type ExplicitRegionProps,\n} from '@hh.ru/magritte-internal-accessible-region';\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 { BottomSheetMedia } from '@hh.ru/magritte-ui-bottom-sheet/BottomSheetMedia';\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 { ContentOverlayRoot } from '@hh.ru/magritte-ui-content-overlay';\nimport { Divider } from '@hh.ru/magritte-ui-divider';\nimport { Layer } from '@hh.ru/magritte-ui-layer';\nimport { TextAreaGrowLimiter } from '@hh.ru/magritte-ui-textarea';\nimport { ThemeWrapper } from '@hh.ru/magritte-ui-theme-wrapper';\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 DEFAULT_ACTION_BAR_PADDING = 16;\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 Children.toArray(children).some(isValidTreeSelectorWrapper);\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.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 heightAnimationValue: number | null;\n /** колбек, который будет выполнен после анимации изменения высоты */\n heightAnimationCallback?: VoidFunction | null;\n skipHeightAnimation?: boolean;\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 heightAnimationValue: null,\n});\n\ninterface BottomSheetDialogProps extends HTMLAttributes<HTMLDivElement> {\n explicitAria: ExplicitRegionProps;\n dialogRef: Ref<HTMLDivElement>;\n}\n\n/**\n * Внутренний `role=\"dialog\"`-узел. Вынесен в отдельный компонент, потому что обязан жить **под**\n * `AccessibleRegionProvider`: только так `useAccessibleRegionProps` видит метки/описания,\n * зарегистрированные потомками (например, заголовком в `header`), и выставляет\n * `aria-labelledby` / `aria-describedby`. Явные `aria-*` пропы при этом всё перекрывают.\n */\nconst BottomSheetDialog: FC<BottomSheetDialogProps> = ({ explicitAria, dialogRef, children, ...rest }) => {\n const aria = useAccessibleRegionProps(explicitAria);\n\n return (\n <div {...rest} {...aria} role=\"dialog\" ref={dialogRef}>\n {children}\n </div>\n );\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 withTopPadding = true,\n 'data-qa': dataQA,\n interceptTouchHandlers = true,\n id,\n 'aria-label': ariaLabel,\n 'aria-labelledby': ariaLabelledby,\n 'aria-describedby': ariaDescribedby,\n 'aria-description': ariaDescription,\n },\n ref\n) => {\n const DOCUMENT_HEIGHT = useRef(0);\n const SWIPE_THRESHOLD = useRef({ max: Infinity });\n const VIEWPORT_HEIGHT = useRef(0);\n\n const contentRef = useRef<HTMLDivElement>(null);\n const headerWrapperRef = 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 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 const GrowLimitWrapper = isContentSizedFullHeight(children) ? Fragment : TextAreaGrowLimiter;\n\n const growLimiterRef = useRef<HTMLDivElement>(null);\n\n const growLimiterContextValue = useState(() => {\n let height = 'auto';\n let limiterFlex = '1 0';\n return {\n containerRef: scrollContainerRef,\n preMeasurement: () => {\n if (!visualContainerRef.current || !growLimiterRef.current) {\n return;\n }\n height = visualContainerRef.current.style.height;\n limiterFlex = growLimiterRef.current.style.flex;\n visualContainerRef.current.style.height = 'auto';\n },\n postMeasurement: () => {\n visualContainerRef.current && (visualContainerRef.current.style.height = height);\n growLimiterRef.current && (growLimiterRef.current.style.flex = limiterFlex);\n },\n };\n })[0];\n\n const growLimiterProps = useMemo(\n () =>\n GrowLimitWrapper === TextAreaGrowLimiter\n ? {\n ...growLimiterContextValue,\n ref: growLimiterRef,\n debounce: true,\n className: styles.growLimiter,\n }\n : {},\n [GrowLimitWrapper, growLimiterContextValue]\n );\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(() => {\n let keyboardResizeHandlers: Array<VoidFunction> = [];\n return {\n keyboardResizeHandlers,\n value: {\n height,\n subscribeToKeyboardResize: (handler: VoidFunction) => {\n keyboardResizeHandlers.push(handler);\n },\n unsubscribeFromKeyboardResize: (handlerToRemove: VoidFunction) => {\n keyboardResizeHandlers = keyboardResizeHandlers.filter((handler) => handler !== handlerToRemove);\n },\n },\n };\n }, [height]);\n const virtualKeyboardOffsetsRef = useRef<{ top: number; bottom: number }>({ top: 0, bottom: 0 });\n const animationTimeoutExitRef = useRef(animationTimeout?.appear.exit || 0);\n animationTimeoutExitRef.current = animationTimeout?.appear.exit || 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 && onCloseRef.current(null));\n useEffect(() => {\n bindEscapeToClose(document.body);\n return () => bindEscapeToClose(null);\n }, [bindEscapeToClose]);\n\n // TODO: replace by useInitOnce\n const LayoutMetrics = useState(() => {\n let cache: Record<string, number> = {};\n return {\n get scrollTop() {\n return Math.max(-stateRef.current.scrollOffset, 0);\n },\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\n return cache.contentHeight;\n },\n /**\n * Высота видимой части контента\n */\n get visibleContentHeight() {\n if (!('visibleContentHeight' in cache) && scrollContainerRef.current !== null) {\n cache.visibleContentHeight = scrollContainerRef.current.clientHeight - LayoutMetrics.headerHeight;\n }\n return cache.visibleContentHeight ?? 0;\n },\n /**\n * Положение верхнего края видимой части контента относительно вьюпорта\n */\n get contentTop() {\n if (!('contentTop' in cache) && visualContainerRef.current !== null && contentRef.current !== null) {\n cache.contentTop =\n contentRef.current.offsetTop - LayoutMetrics.scrollTop + visualContainerRef.current.offsetTop;\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 * Фактическая высота, которую header занимает в боттомшите\n * Может отличаться от видимой высоты header\n */\n get headerHeight() {\n if (!('headerHeight' in cache) && headerWrapperRef.current !== null) {\n cache.headerHeight = headerWrapperRef.current.offsetHeight;\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 = 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.contentHeight - LayoutMetrics.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 })[0];\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 VIEWPORT_HEIGHT.current = visualViewport.height;\n }\n\n if (!showOverlay) {\n const enableOverscroll = disableOverscroll();\n return enableOverscroll;\n }\n\n let enableScroll: TimeoutCallback | undefined = disableScroll();\n return () => {\n enableScroll?.(animationTimeoutExitRef.current);\n enableScroll = undefined;\n };\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 // включаем настройку interactive-widget=resizes-content,\n // чтобы браузеры с поддержкой Virtual Keyboard API ресайзили Visual Viewport при появлении клавиатуры\n // в остальных браузерах (Safari и Chrome < 108) это поведение по умолчанию\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'] = 'resizes-content';\n const attributesStrUpdated = Object.entries(attributes)\n .map((keyValuePair) => keyValuePair.join('='))\n .join(',');\n meta.setAttribute('content', attributesStrUpdated);\n }, [currentVisible, isSafari]);\n\n const fixOverscroll = useCallback(() => {\n if (hasTouchSupport) {\n const isOverscrolled =\n LayoutMetrics.contentHeight + stateRef.current.scrollOffset < LayoutMetrics.visibleContentHeight;\n if (isOverscrolled) {\n stateRef.current.scrollOffset = LayoutMetrics.visibleContentHeight - LayoutMetrics.contentHeight;\n if (contentRef.current !== null) {\n contentRef.current.style.transform = translateY(stateRef.current.scrollOffset);\n }\n scrollContextProviderRef.current?.notifyScroll({\n scrollTop: -stateRef.current.scrollOffset,\n maxScrollTop: LayoutMetrics.maxScrollTop,\n });\n }\n }\n }, [hasTouchSupport, LayoutMetrics]);\n\n const resetScrollPosition = useCallback(() => {\n if (hasTouchSupport) {\n stateRef.current.scrollOffset = LayoutMetrics.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.initialOffset);\n }\n } else {\n scrollContainerRef.current?.scrollTo({ top: 0 });\n }\n }, [hasTouchSupport, LayoutMetrics]);\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 = LayoutMetrics.contentHeight + scrollOffset > LayoutMetrics.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 && stateRef.current.touchAction === null) {\n const prevGrabberUnsafe = stateRef.current.grabberUnsafe;\n stateRef.current.grabberUnsafe =\n Math.round(Math.max(scrollOffset, 0) + stateRef.current.swipeOffset) ===\n LayoutMetrics.remainingAvailableHeight;\n if (stateRef.current.grabberUnsafe !== prevGrabberUnsafe) {\n grabberRef.current.classList.toggle(styles.grabberEnsureSafe, stateRef.current.grabberUnsafe);\n }\n }\n }, [hasTouchSupport, showDivider, LayoutMetrics]);\n\n // терминология: https://developer.chrome.com/blog/viewport-resize-behavior/\n //\n // при открытии виртуальной клавиатуры браузеры двигают Visual Viewport и Layout Viewport\n // с помощью двух отступов делаем так, чтобы overlay боттомшита совпадал с видимой частью экрана\n const recalcKeyboardOffsets = useCallback(() => {\n if (\n !hasTouchSupport ||\n !contentRef.current ||\n !overlayRef.current ||\n !swipeContainerRef.current ||\n !visualViewport\n ) {\n return;\n }\n\n // разворачиваем боттомшит с height=half-screen на всю доступную высоту\n if (LayoutMetrics.initialOffset > 0 && stateRef.current.scrollOffset > 0) {\n stateRef.current.scrollOffset = 0;\n contentRef.current.style.transform = translateY(0);\n swipeContainerRef.current.style.transform = translateY(0);\n if (footerRef.current !== null) {\n footerRef.current.style.transform = translateY(0);\n }\n }\n\n LayoutMetrics.invalidateCache();\n\n const isKeyboardVisible = visualViewport.height !== VIEWPORT_HEIGHT.current;\n if (stateRef.current.hasFocus && focusedElementRef.current !== null && isKeyboardVisible) {\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.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(Math.max(focusedElementOffset - 10, 0), LayoutMetrics.maxScrollTop);\n if (stateRef.current.scrollOffset !== newScrollOffset) {\n stateRef.current.scrollOffset = newScrollOffset;\n contentRef.current.style.transform = translateY(stateRef.current.scrollOffset);\n\n scrollContextProviderRef.current?.notifyScroll({\n scrollTop: -stateRef.current.scrollOffset,\n maxScrollTop: LayoutMetrics.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.invalidateCache();\n fixOverscroll();\n recalcScrollFlags();\n\n virtualKeyboardOffsetsRef.current.top = 0;\n virtualKeyboardOffsetsRef.current.bottom = 0;\n }\n\n stateRef.current.skipHeightAnimation = true;\n setTimeout(() => (stateRef.current.skipHeightAnimation = false), 100);\n bottomSheetContext.keyboardResizeHandlers.forEach((handler) => handler());\n }, [\n fixOverscroll,\n hasTouchSupport,\n isSafari,\n keyboardOverlaysFooter,\n recalcScrollFlags,\n bottomSheetContext,\n LayoutMetrics,\n ]);\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.contentTop}px`;\n contentOverlayRef.current.style.height = `${LayoutMetrics.visibleContentHeight}px`;\n }\n }, [LayoutMetrics]);\n\n // помещает боттомшит в позицию вне экрана снизу, которая может быть начальной либо конечной точкой анимации\n const setTransformToInvisible = useCallback(() => {\n LayoutMetrics.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.bottomSheetHeight);\n }\n\n requestAnimationFrame(recalcContentOverlayPosition);\n requestAnimationFrame(recalcScrollFlags);\n }, [recalcContentOverlayPosition, recalcScrollFlags, LayoutMetrics]);\n\n // помещает боттомшит в дефолтную позицию на экране, которая может быть начальной либо конечной точкой анимации\n const setTransformToVisible = useCallback(() => {\n LayoutMetrics.invalidateCache();\n\n stateRef.current.scrollOffset = LayoutMetrics.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.initialOffset + stateRef.current.swipeOffset\n );\n }\n if (footerRef.current !== null) {\n footerRef.current.style.transform = translateY(-LayoutMetrics.initialOffset);\n }\n\n requestAnimationFrame(recalcContentOverlayPosition);\n requestAnimationFrame(recalcScrollFlags);\n }, [recalcContentOverlayPosition, recalcScrollFlags, LayoutMetrics]);\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.exitHandlers.forEach((handler) => handler());\n stateRef.current = makeInitialState();\n\n onAfterExit?.();\n }, [onAfterExit]);\n\n const handleHeightAnimationStart = useCallback(() => {\n LayoutMetrics.invalidateCache();\n\n if (stateRef.current.heightAnimationValue !== null && visualContainerRef.current !== null) {\n visualContainerRef.current.style.height = `${stateRef.current.heightAnimationValue}px`;\n }\n }, [LayoutMetrics]);\n\n const handleHeightAnimationEnd = useCallback(() => {\n LayoutMetrics.invalidateCache();\n\n if (visualContainerRef.current !== null) {\n visualContainerRef.current.style.height = `${LayoutMetrics.bottomSheetHeight}px`;\n }\n\n stateRef.current.heightAnimationValue = 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?.notifyScroll({\n scrollTop: 0,\n maxScrollTop: LayoutMetrics.maxScrollTop,\n });\n }, [setHeightAnimationRunning, recalcContentOverlayPosition, recalcScrollFlags, LayoutMetrics]);\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: VoidFunction = 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: VoidFunction = useCallback(() => {\n if (stateRef.current.touchAction === 'swipe') {\n let onCloseCancelled = false;\n const cancelCloseFunc = () => {\n if (!onCloseCancelled) {\n handleSwipeCancel();\n onCloseCancelled = true;\n }\n };\n onCloseRef.current(cancelCloseFunc);\n }\n }, [handleSwipeCancel]);\n\n const swipeHandlers = useSwipeHandlers({\n thresholdYRef: SWIPE_THRESHOLD,\n onSwipeMove: handleSwipeMove,\n onSwipeEnd: handleSwipeEnd,\n onSwipeCancel: handleSwipeCancel,\n });\n\n const handleScroll = useCallback(\n (delta: number) => {\n if (LayoutMetrics.initialOffset !== 0 || LayoutMetrics.contentHeight > LayoutMetrics.visibleContentHeight) {\n // храним неокругленное значение для translateY, чтобы анимация была плавнее\n let newScrollOffset = stateRef.current.scrollOffset + delta;\n const roundedNewScrollOffset = Math.round(newScrollOffset);\n\n if (roundedNewScrollOffset >= LayoutMetrics.initialOffset) {\n // скролла нет (touchAction is null)\n // либо контент проскроллен в начало, тогда не даем скроллить дальше\n newScrollOffset = LayoutMetrics.initialOffset;\n if (stateRef.current.touchAction === 'scroll') {\n stateRef.current.touchAction = 'complete';\n }\n } else if (LayoutMetrics.contentHeight + roundedNewScrollOffset <= LayoutMetrics.visibleContentHeight) {\n // скролла нет (touchAction is null)\n // либо контент проскроллен до конца, тогда не даем скроллить дальше\n newScrollOffset = LayoutMetrics.visibleContentHeight - LayoutMetrics.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?.notifyScroll({\n scrollTop: Math.max(-stateRef.current.scrollOffset, 0),\n maxScrollTop: LayoutMetrics.maxScrollTop,\n });\n }\n }\n },\n [LayoutMetrics, recalcScrollFlags]\n );\n\n const scrollContextProps = useState(() => ({\n getMaxScrollTop: () => LayoutMetrics.maxScrollTop,\n getScrollTop: () => LayoutMetrics.scrollTop,\n setScrollTop: (pos: number) => handleScroll(-(pos - LayoutMetrics.scrollTop)),\n }))[0];\n\n const initTransformHandlers = useCallback(() => {\n const visualContainer = visualContainerRef.current;\n if (!visualContainer) {\n return void 0;\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 scrollContextProviderRef.current?.notifyTouchEnd();\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 scrollContextProviderRef.current?.notifyTouchStart();\n };\n\n const handleTouchMove = (event: TouchEvent) => {\n if (interceptTouchHandlers) {\n event.preventDefault();\n event.stopPropagation();\n }\n\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, swipeHandlers, interceptTouchHandlers, handleScroll]);\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 resetAnimationOnNextResize = false;\n\n const handleHeightChange = () => {\n LayoutMetrics.invalidateCache();\n\n if (skipFirstResizeCallback || stateRef.current.skipHeightAnimation) {\n // записываем в инлайн-стили visualContainer собственную высоту\n // чтобы ее можно было анимировать изменением одного инлайн значения на другое\n visualContainer.style.height = skipFirstResizeCallback ? `${LayoutMetrics.bottomSheetHeight}px` : '';\n\n prevHeaderHeight = LayoutMetrics.headerHeight;\n prevContentHeight = LayoutMetrics.contentHeight;\n prevFooterHeight = LayoutMetrics.footerHeight;\n prevVisibleContentHeight = LayoutMetrics.visibleContentHeight;\n\n skipFirstResizeCallback = false;\n stateRef.current.skipHeightAnimation = false;\n return;\n }\n\n // без анимации сбрасываем высоту на вычисленную браузером\n if (resetAnimationOnNextResize) {\n visualContainer.style.height = ``;\n } else {\n const contentHeightDiff = LayoutMetrics.contentHeight - prevContentHeight;\n const containersHeightDiff =\n LayoutMetrics.headerHeight - prevHeaderHeight + LayoutMetrics.footerHeight - 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.contentHeight\n );\n const minVisibleContentHeightDiff = newMinVisibleContentHeight - _prevVisibleContentHeight;\n\n // предположим, что scrollContainer станет больше\n // тогда контент не может увеличиться больше, чем на расстояние между боттомшитом и верхним краем экрана\n const maxVisibleContentHeightDiff = LayoutMetrics.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 // если предыдущая анимация не завершилась, добавляем вычисленное изменение к значению высоты\n // но делаем это только один раз, иначе алгоритм ломается\n if (stateRef.current.heightAnimationValue !== null) {\n stateRef.current.heightAnimationValue += heightAnimationDiff;\n visualContainer.style.height = `${stateRef.current.heightAnimationValue}px`;\n resetAnimationOnNextResize = true;\n } else {\n stateRef.current.heightAnimationValue = LayoutMetrics.bottomSheetHeight + heightAnimationDiff;\n }\n\n stateRef.current.heightAnimationCallback = () => {\n // запоминаем высоту visibleContentHeight после завершения анимации\n // до этого значение некорректно, т.к. новый контент уже был отрендерен,\n // но в инлайн-стилях боттомшита остается старая высота\n prevVisibleContentHeight = LayoutMetrics.visibleContentHeight;\n resetAnimationOnNextResize = false;\n };\n\n setHeightAnimationRunning(true);\n } else {\n prevVisibleContentHeight = LayoutMetrics.visibleContentHeight;\n recalcContentOverlayPosition();\n recalcScrollFlags();\n }\n }\n\n prevHeaderHeight = LayoutMetrics.headerHeight;\n prevContentHeight = LayoutMetrics.contentHeight;\n prevFooterHeight = LayoutMetrics.footerHeight;\n };\n\n const resizeObserver = new ResizeObserver(handleHeightChange);\n const content = contentRef.current;\n const footer = footerRef.current;\n const header = headerWrapperRef.current;\n\n content !== null && resizeObserver.observe(content);\n footer !== null && resizeObserver.observe(footer);\n header !== null && resizeObserver.observe(header);\n\n return () => resizeObserver.disconnect();\n }, [\n fixOverscroll,\n recalcContentOverlayPosition,\n recalcScrollFlags,\n resetScrollPosition,\n setHeightAnimationRunning,\n LayoutMetrics,\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, ...eventHandlersRaw } = useNoBubbling();\n\n const eventHandlers = interceptTouchHandlers\n ? eventHandlersRaw\n : { ...eventHandlersRaw, onTouchMove: undefined, onTouchStart: undefined, onTouchEnd: undefined };\n\n if (!animationTimeout) {\n return null;\n }\n\n const containerDataQa = `bottom-sheet-container${dataQA ? ` ${dataQA}` : ''}`;\n\n const explicitAria: ExplicitRegionProps = {\n 'aria-label': ariaLabel,\n 'aria-labelledby': ariaLabelledby,\n 'aria-describedby': ariaDescribedby,\n 'aria-description': ariaDescription,\n };\n\n const renderFunc = (appearTransition: TransitionStatus, heightTransition: TransitionStatus) => {\n const content = (\n <div\n className={classnames(styles.content, {\n [styles.contentFullScreen]: height === 'full-screen',\n [styles.contentWithPaddings]: withContentPaddings === true,\n [styles.contentWithTopPadding]: !header && withContentPaddings === 'top',\n [styles.contentSizedFullScreen]: isContentSizedFullHeight(children),\n })}\n ref={contentRef}\n >\n <BottomSheetContext.Provider value={bottomSheetContext.value}>{children}</BottomSheetContext.Provider>\n </div>\n );\n\n const scrollContainer = hasTouchSupport ? (\n <CustomScrollContextProvider\n ref={scrollContextProviderRef}\n wrapperRef={scrollContainerRef}\n {...scrollContextProps}\n >\n <div\n className={classnames(styles.scrollContainer, {\n [styles.scrollContainerWithTopPadding]: withTopPadding,\n })}\n onFocus={handleFocus}\n ref={scrollContainerRef}\n >\n <GrowLimitWrapper {...growLimiterProps}>\n <div className={styles.headerWrapper} ref={headerWrapperRef}>\n {header}\n </div>\n {content}\n </GrowLimitWrapper>\n </div>\n </CustomScrollContextProvider>\n ) : (\n <div\n className={classnames(styles.scrollContainer, styles.nativeScrollContainer, {\n [styles.scrollContainerWithTopPadding]: withTopPadding,\n })}\n onFocus={handleFocus}\n onScroll={recalcScrollFlags}\n ref={scrollContainerRef}\n >\n <GrowLimitWrapper {...growLimiterProps}>\n <div className={styles.headerWrapper} ref={headerWrapperRef}>\n {header}\n </div>\n {content}\n </GrowLimitWrapper>\n </div>\n );\n\n const clonedFooter =\n footer && isActionBarComponent(footer)\n ? cloneElement(footer, {\n type: footer.props.type || 'vertical',\n padding: footer.props.padding || DEFAULT_ACTION_BAR_PADDING,\n showDivider: false,\n })\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(null) }\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 <ContentOverlayRoot ref={contentOverlayRef}>\n <AccessibleRegionProvider>\n <BottomSheetDialog\n explicitAria={explicitAria}\n dialogRef={bottomSheetRef}\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 id={id}\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 </BottomSheetDialog>\n </AccessibleRegionProvider>\n </ContentOverlayRoot>\n </div>\n </div>\n </Layer>\n );\n };\n\n return createPortal(\n <ThemeWrapper>\n {(themeClass) => (\n <div\n className={classnames(styles.cssVariablesContainer, themeClass)}\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 onEntering={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 )}\n </ThemeWrapper>,\n document.body\n );\n};\n\nconst BottomSheetComponent = forwardRef(BottomSheetRenderFunc);\nBottomSheetComponent.displayName = 'BottomSheet';\n\nexport const BottomSheet = BottomSheetComponent as typeof BottomSheetComponent & { Media: typeof BottomSheetMedia };\nBottomSheet.Media = BottomSheetMedia;\n"],"names":["_jsx","_jsxs"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AAoDA,MAAM,gCAAgC,GAAG,4BAA4B,CAAC;AACtE,MAAM,+BAA+B,GAAG,2BAA2B,CAAC;AACpE,MAAM,iCAAiC,GAAG,8BAA8B,CAAC;AACzE,MAAM,mCAAmC,GAAG,+BAA+B,CAAC;AAC5E,MAAM,sCAAsC,GAAG,kCAAkC,CAAC;AAElF,MAAM,0BAA0B,GAAG,EAAE,CAAC;AAEtC,MAAM,WAAW,GAAG,MAAM,gCAAgC,CAAC,IAAI,CAAC,SAAS,CAAC,SAAS,CAAC,CAAC;AAErF,MAAM,eAAe,GAAG,MAAK;AACzB,IAAA,MAAM,SAAS,GAAG,QAAQ,CAAC,YAAY,EAAE,CAAC;IAC1C,OAAO,CAAC,CAAC,SAAS,IAAI,CAAC,SAAS,CAAC,WAAW,CAAC;AACjD,CAAC,CAAC;AAEF,MAAM,wBAAwB,GAAG,CAAC,QAAyB,KACvD,CAAC,cAAc,CAAC,QAAQ,CAAC;AACrB,IAAA,OAAO,QAAQ,CAAC,IAAI,KAAK,UAAU;IACnC,gCAAgC,IAAI,QAAQ,CAAC,IAAI;AAChD,IAAA,QAAQ,CAAC,KAAmC,CAAC,WAAW,KAAK,IAAI;IACtE,QAAQ,CAAC,OAAO,CAAC,QAAQ,CAAC,CAAC,IAAI,CAAC,0BAA0B,CAAC,CAAC;AAEhE,MAAM,QAAQ,GAAG,CAAC,KAAa,KAAI;IAC/B,MAAM,MAAM,GAAG,QAAQ,CAAC,KAAK,EAAE,EA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n FocusEventHandler,\n ForwardRefRenderFunction,\n forwardRef,\n useCallback,\n useEffect,\n useMemo,\n useRef,\n useState,\n cloneElement,\n isValidElement,\n Fragment,\n Children,\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, TimeoutCallback } 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 AccessibleRegionProvider,\n useAccessibleRegionProps,\n type ExplicitRegionProps,\n} from '@hh.ru/magritte-internal-accessible-region';\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 { BottomSheetMedia } from '@hh.ru/magritte-ui-bottom-sheet/BottomSheetMedia';\nimport { ClickInterceptor } from '@hh.ru/magritte-ui-bottom-sheet/ClickInterceptor';\nimport { BOTTOM_SHEET_ACTION_BAR_DEFAULTS } from '@hh.ru/magritte-ui-bottom-sheet/actionBarDefaults';\nimport { BottomSheetProps } from '@hh.ru/magritte-ui-bottom-sheet/types';\nimport { useBreakpoint } from '@hh.ru/magritte-ui-breakpoint';\nimport { ContentOverlayRoot } from '@hh.ru/magritte-ui-content-overlay';\nimport { Divider } from '@hh.ru/magritte-ui-divider';\nimport { Layer } from '@hh.ru/magritte-ui-layer';\nimport { TextAreaGrowLimiter } from '@hh.ru/magritte-ui-textarea';\nimport { ThemeWrapper } from '@hh.ru/magritte-ui-theme-wrapper';\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 Children.toArray(children).some(isValidTreeSelectorWrapper);\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.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 heightAnimationValue: number | null;\n /** колбек, который будет выполнен после анимации изменения высоты */\n heightAnimationCallback?: VoidFunction | null;\n skipHeightAnimation?: boolean;\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 heightAnimationValue: null,\n});\n\ninterface BottomSheetDialogProps extends HTMLAttributes<HTMLDivElement> {\n explicitAria: ExplicitRegionProps;\n dialogRef: Ref<HTMLDivElement>;\n}\n\n/**\n * Внутренний `role=\"dialog\"`-узел. Вынесен в отдельный компонент, потому что обязан жить **под**\n * `AccessibleRegionProvider`: только так `useAccessibleRegionProps` видит метки/описания,\n * зарегистрированные потомками (например, заголовком в `header`), и выставляет\n * `aria-labelledby` / `aria-describedby`. Явные `aria-*` пропы при этом всё перекрывают.\n */\nconst BottomSheetDialog: FC<BottomSheetDialogProps> = ({ explicitAria, dialogRef, children, ...rest }) => {\n const aria = useAccessibleRegionProps(explicitAria);\n\n return (\n <div {...rest} {...aria} role=\"dialog\" ref={dialogRef}>\n {children}\n </div>\n );\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 withTopPadding = true,\n 'data-qa': dataQA,\n interceptTouchHandlers = true,\n id,\n 'aria-label': ariaLabel,\n 'aria-labelledby': ariaLabelledby,\n 'aria-describedby': ariaDescribedby,\n 'aria-description': ariaDescription,\n },\n ref\n) => {\n const DOCUMENT_HEIGHT = useRef(0);\n const SWIPE_THRESHOLD = useRef({ max: Infinity });\n const VIEWPORT_HEIGHT = useRef(0);\n\n const contentRef = useRef<HTMLDivElement>(null);\n const headerWrapperRef = 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 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 const GrowLimitWrapper = isContentSizedFullHeight(children) ? Fragment : TextAreaGrowLimiter;\n\n const growLimiterRef = useRef<HTMLDivElement>(null);\n\n const growLimiterContextValue = useState(() => {\n let height = 'auto';\n let limiterFlex = '1 0';\n return {\n containerRef: scrollContainerRef,\n preMeasurement: () => {\n if (!visualContainerRef.current || !growLimiterRef.current) {\n return;\n }\n height = visualContainerRef.current.style.height;\n limiterFlex = growLimiterRef.current.style.flex;\n visualContainerRef.current.style.height = 'auto';\n },\n postMeasurement: () => {\n visualContainerRef.current && (visualContainerRef.current.style.height = height);\n growLimiterRef.current && (growLimiterRef.current.style.flex = limiterFlex);\n },\n };\n })[0];\n\n const growLimiterProps = useMemo(\n () =>\n GrowLimitWrapper === TextAreaGrowLimiter\n ? {\n ...growLimiterContextValue,\n ref: growLimiterRef,\n debounce: true,\n className: styles.growLimiter,\n }\n : {},\n [GrowLimitWrapper, growLimiterContextValue]\n );\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(() => {\n let keyboardResizeHandlers: Array<VoidFunction> = [];\n return {\n keyboardResizeHandlers,\n value: {\n height,\n subscribeToKeyboardResize: (handler: VoidFunction) => {\n keyboardResizeHandlers.push(handler);\n },\n unsubscribeFromKeyboardResize: (handlerToRemove: VoidFunction) => {\n keyboardResizeHandlers = keyboardResizeHandlers.filter((handler) => handler !== handlerToRemove);\n },\n },\n };\n }, [height]);\n const virtualKeyboardOffsetsRef = useRef<{ top: number; bottom: number }>({ top: 0, bottom: 0 });\n const animationTimeoutExitRef = useRef(animationTimeout?.appear.exit || 0);\n animationTimeoutExitRef.current = animationTimeout?.appear.exit || 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 && onCloseRef.current(null));\n useEffect(() => {\n bindEscapeToClose(document.body);\n return () => bindEscapeToClose(null);\n }, [bindEscapeToClose]);\n\n // TODO: replace by useInitOnce\n const LayoutMetrics = useState(() => {\n let cache: Record<string, number> = {};\n return {\n get scrollTop() {\n return Math.max(-stateRef.current.scrollOffset, 0);\n },\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\n return cache.contentHeight;\n },\n /**\n * Высота видимой части контента\n */\n get visibleContentHeight() {\n if (!('visibleContentHeight' in cache) && scrollContainerRef.current !== null) {\n cache.visibleContentHeight = scrollContainerRef.current.clientHeight - LayoutMetrics.headerHeight;\n }\n return cache.visibleContentHeight ?? 0;\n },\n /**\n * Положение верхнего края видимой части контента относительно вьюпорта\n */\n get contentTop() {\n if (!('contentTop' in cache) && visualContainerRef.current !== null && contentRef.current !== null) {\n cache.contentTop =\n contentRef.current.offsetTop - LayoutMetrics.scrollTop + visualContainerRef.current.offsetTop;\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 * Фактическая высота, которую header занимает в боттомшите\n * Может отличаться от видимой высоты header\n */\n get headerHeight() {\n if (!('headerHeight' in cache) && headerWrapperRef.current !== null) {\n cache.headerHeight = headerWrapperRef.current.offsetHeight;\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 = 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.contentHeight - LayoutMetrics.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 })[0];\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 VIEWPORT_HEIGHT.current = visualViewport.height;\n }\n\n if (!showOverlay) {\n const enableOverscroll = disableOverscroll();\n return enableOverscroll;\n }\n\n let enableScroll: TimeoutCallback | undefined = disableScroll();\n return () => {\n enableScroll?.(animationTimeoutExitRef.current);\n enableScroll = undefined;\n };\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 // включаем настройку interactive-widget=resizes-content,\n // чтобы браузеры с поддержкой Virtual Keyboard API ресайзили Visual Viewport при появлении клавиатуры\n // в остальных браузерах (Safari и Chrome < 108) это поведение по умолчанию\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'] = 'resizes-content';\n const attributesStrUpdated = Object.entries(attributes)\n .map((keyValuePair) => keyValuePair.join('='))\n .join(',');\n meta.setAttribute('content', attributesStrUpdated);\n }, [currentVisible, isSafari]);\n\n const fixOverscroll = useCallback(() => {\n if (hasTouchSupport) {\n const isOverscrolled =\n LayoutMetrics.contentHeight + stateRef.current.scrollOffset < LayoutMetrics.visibleContentHeight;\n if (isOverscrolled) {\n stateRef.current.scrollOffset = LayoutMetrics.visibleContentHeight - LayoutMetrics.contentHeight;\n if (contentRef.current !== null) {\n contentRef.current.style.transform = translateY(stateRef.current.scrollOffset);\n }\n scrollContextProviderRef.current?.notifyScroll({\n scrollTop: -stateRef.current.scrollOffset,\n maxScrollTop: LayoutMetrics.maxScrollTop,\n });\n }\n }\n }, [hasTouchSupport, LayoutMetrics]);\n\n const resetScrollPosition = useCallback(() => {\n if (hasTouchSupport) {\n stateRef.current.scrollOffset = LayoutMetrics.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.initialOffset);\n }\n } else {\n scrollContainerRef.current?.scrollTo({ top: 0 });\n }\n }, [hasTouchSupport, LayoutMetrics]);\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 = LayoutMetrics.contentHeight + scrollOffset > LayoutMetrics.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 && stateRef.current.touchAction === null) {\n const prevGrabberUnsafe = stateRef.current.grabberUnsafe;\n stateRef.current.grabberUnsafe =\n Math.round(Math.max(scrollOffset, 0) + stateRef.current.swipeOffset) ===\n LayoutMetrics.remainingAvailableHeight;\n if (stateRef.current.grabberUnsafe !== prevGrabberUnsafe) {\n grabberRef.current.classList.toggle(styles.grabberEnsureSafe, stateRef.current.grabberUnsafe);\n }\n }\n }, [hasTouchSupport, showDivider, LayoutMetrics]);\n\n // терминология: https://developer.chrome.com/blog/viewport-resize-behavior/\n //\n // при открытии виртуальной клавиатуры браузеры двигают Visual Viewport и Layout Viewport\n // с помощью двух отступов делаем так, чтобы overlay боттомшита совпадал с видимой частью экрана\n const recalcKeyboardOffsets = useCallback(() => {\n if (\n !hasTouchSupport ||\n !contentRef.current ||\n !overlayRef.current ||\n !swipeContainerRef.current ||\n !visualViewport\n ) {\n return;\n }\n\n // разворачиваем боттомшит с height=half-screen на всю доступную высоту\n if (LayoutMetrics.initialOffset > 0 && stateRef.current.scrollOffset > 0) {\n stateRef.current.scrollOffset = 0;\n contentRef.current.style.transform = translateY(0);\n swipeContainerRef.current.style.transform = translateY(0);\n if (footerRef.current !== null) {\n footerRef.current.style.transform = translateY(0);\n }\n }\n\n LayoutMetrics.invalidateCache();\n\n const isKeyboardVisible = visualViewport.height !== VIEWPORT_HEIGHT.current;\n if (stateRef.current.hasFocus && focusedElementRef.current !== null && isKeyboardVisible) {\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.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(Math.max(focusedElementOffset - 10, 0), LayoutMetrics.maxScrollTop);\n if (stateRef.current.scrollOffset !== newScrollOffset) {\n stateRef.current.scrollOffset = newScrollOffset;\n contentRef.current.style.transform = translateY(stateRef.current.scrollOffset);\n\n scrollContextProviderRef.current?.notifyScroll({\n scrollTop: -stateRef.current.scrollOffset,\n maxScrollTop: LayoutMetrics.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.invalidateCache();\n fixOverscroll();\n recalcScrollFlags();\n\n virtualKeyboardOffsetsRef.current.top = 0;\n virtualKeyboardOffsetsRef.current.bottom = 0;\n }\n\n stateRef.current.skipHeightAnimation = true;\n setTimeout(() => (stateRef.current.skipHeightAnimation = false), 100);\n bottomSheetContext.keyboardResizeHandlers.forEach((handler) => handler());\n }, [\n fixOverscroll,\n hasTouchSupport,\n isSafari,\n keyboardOverlaysFooter,\n recalcScrollFlags,\n bottomSheetContext,\n LayoutMetrics,\n ]);\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.contentTop}px`;\n contentOverlayRef.current.style.height = `${LayoutMetrics.visibleContentHeight}px`;\n }\n }, [LayoutMetrics]);\n\n // помещает боттомшит в позицию вне экрана снизу, которая может быть начальной либо конечной точкой анимации\n const setTransformToInvisible = useCallback(() => {\n LayoutMetrics.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.bottomSheetHeight);\n }\n\n requestAnimationFrame(recalcContentOverlayPosition);\n requestAnimationFrame(recalcScrollFlags);\n }, [recalcContentOverlayPosition, recalcScrollFlags, LayoutMetrics]);\n\n // помещает боттомшит в дефолтную позицию на экране, которая может быть начальной либо конечной точкой анимации\n const setTransformToVisible = useCallback(() => {\n LayoutMetrics.invalidateCache();\n\n stateRef.current.scrollOffset = LayoutMetrics.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.initialOffset + stateRef.current.swipeOffset\n );\n }\n if (footerRef.current !== null) {\n footerRef.current.style.transform = translateY(-LayoutMetrics.initialOffset);\n }\n\n requestAnimationFrame(recalcContentOverlayPosition);\n requestAnimationFrame(recalcScrollFlags);\n }, [recalcContentOverlayPosition, recalcScrollFlags, LayoutMetrics]);\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.exitHandlers.forEach((handler) => handler());\n stateRef.current = makeInitialState();\n\n onAfterExit?.();\n }, [onAfterExit]);\n\n const handleHeightAnimationStart = useCallback(() => {\n LayoutMetrics.invalidateCache();\n\n if (stateRef.current.heightAnimationValue !== null && visualContainerRef.current !== null) {\n visualContainerRef.current.style.height = `${stateRef.current.heightAnimationValue}px`;\n }\n }, [LayoutMetrics]);\n\n const handleHeightAnimationEnd = useCallback(() => {\n LayoutMetrics.invalidateCache();\n\n if (visualContainerRef.current !== null) {\n visualContainerRef.current.style.height = `${LayoutMetrics.bottomSheetHeight}px`;\n }\n\n stateRef.current.heightAnimationValue = 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?.notifyScroll({\n scrollTop: 0,\n maxScrollTop: LayoutMetrics.maxScrollTop,\n });\n }, [setHeightAnimationRunning, recalcContentOverlayPosition, recalcScrollFlags, LayoutMetrics]);\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: VoidFunction = 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: VoidFunction = useCallback(() => {\n if (stateRef.current.touchAction === 'swipe') {\n let onCloseCancelled = false;\n const cancelCloseFunc = () => {\n if (!onCloseCancelled) {\n handleSwipeCancel();\n onCloseCancelled = true;\n }\n };\n onCloseRef.current(cancelCloseFunc);\n }\n }, [handleSwipeCancel]);\n\n const swipeHandlers = useSwipeHandlers({\n thresholdYRef: SWIPE_THRESHOLD,\n onSwipeMove: handleSwipeMove,\n onSwipeEnd: handleSwipeEnd,\n onSwipeCancel: handleSwipeCancel,\n });\n\n const handleScroll = useCallback(\n (delta: number) => {\n if (LayoutMetrics.initialOffset !== 0 || LayoutMetrics.contentHeight > LayoutMetrics.visibleContentHeight) {\n // храним неокругленное значение для translateY, чтобы анимация была плавнее\n let newScrollOffset = stateRef.current.scrollOffset + delta;\n const roundedNewScrollOffset = Math.round(newScrollOffset);\n\n if (roundedNewScrollOffset >= LayoutMetrics.initialOffset) {\n // скролла нет (touchAction is null)\n // либо контент проскроллен в начало, тогда не даем скроллить дальше\n newScrollOffset = LayoutMetrics.initialOffset;\n if (stateRef.current.touchAction === 'scroll') {\n stateRef.current.touchAction = 'complete';\n }\n } else if (LayoutMetrics.contentHeight + roundedNewScrollOffset <= LayoutMetrics.visibleContentHeight) {\n // скролла нет (touchAction is null)\n // либо контент проскроллен до конца, тогда не даем скроллить дальше\n newScrollOffset = LayoutMetrics.visibleContentHeight - LayoutMetrics.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?.notifyScroll({\n scrollTop: Math.max(-stateRef.current.scrollOffset, 0),\n maxScrollTop: LayoutMetrics.maxScrollTop,\n });\n }\n }\n },\n [LayoutMetrics, recalcScrollFlags]\n );\n\n const scrollContextProps = useState(() => ({\n getMaxScrollTop: () => LayoutMetrics.maxScrollTop,\n getScrollTop: () => LayoutMetrics.scrollTop,\n setScrollTop: (pos: number) => handleScroll(-(pos - LayoutMetrics.scrollTop)),\n }))[0];\n\n const initTransformHandlers = useCallback(() => {\n const visualContainer = visualContainerRef.current;\n if (!visualContainer) {\n return void 0;\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 scrollContextProviderRef.current?.notifyTouchEnd();\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 scrollContextProviderRef.current?.notifyTouchStart();\n };\n\n const handleTouchMove = (event: TouchEvent) => {\n if (interceptTouchHandlers) {\n event.preventDefault();\n event.stopPropagation();\n }\n\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, swipeHandlers, interceptTouchHandlers, handleScroll]);\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 resetAnimationOnNextResize = false;\n\n const handleHeightChange = () => {\n LayoutMetrics.invalidateCache();\n\n if (skipFirstResizeCallback || stateRef.current.skipHeightAnimation) {\n // записываем в инлайн-стили visualContainer собственную высоту\n // чтобы ее можно было анимировать изменением одного инлайн значения на другое\n visualContainer.style.height = skipFirstResizeCallback ? `${LayoutMetrics.bottomSheetHeight}px` : '';\n\n prevHeaderHeight = LayoutMetrics.headerHeight;\n prevContentHeight = LayoutMetrics.contentHeight;\n prevFooterHeight = LayoutMetrics.footerHeight;\n prevVisibleContentHeight = LayoutMetrics.visibleContentHeight;\n\n skipFirstResizeCallback = false;\n stateRef.current.skipHeightAnimation = false;\n return;\n }\n\n // без анимации сбрасываем высоту на вычисленную браузером\n if (resetAnimationOnNextResize) {\n visualContainer.style.height = ``;\n } else {\n const contentHeightDiff = LayoutMetrics.contentHeight - prevContentHeight;\n const containersHeightDiff =\n LayoutMetrics.headerHeight - prevHeaderHeight + LayoutMetrics.footerHeight - 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.contentHeight\n );\n const minVisibleContentHeightDiff = newMinVisibleContentHeight - _prevVisibleContentHeight;\n\n // предположим, что scrollContainer станет больше\n // тогда контент не может увеличиться больше, чем на расстояние между боттомшитом и верхним краем экрана\n const maxVisibleContentHeightDiff = LayoutMetrics.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 // если предыдущая анимация не завершилась, добавляем вычисленное изменение к значению высоты\n // но делаем это только один раз, иначе алгоритм ломается\n if (stateRef.current.heightAnimationValue !== null) {\n stateRef.current.heightAnimationValue += heightAnimationDiff;\n visualContainer.style.height = `${stateRef.current.heightAnimationValue}px`;\n resetAnimationOnNextResize = true;\n } else {\n stateRef.current.heightAnimationValue = LayoutMetrics.bottomSheetHeight + heightAnimationDiff;\n }\n\n stateRef.current.heightAnimationCallback = () => {\n // запоминаем высоту visibleContentHeight после завершения анимации\n // до этого значение некорректно, т.к. новый контент уже был отрендерен,\n // но в инлайн-стилях боттомшита остается старая высота\n prevVisibleContentHeight = LayoutMetrics.visibleContentHeight;\n resetAnimationOnNextResize = false;\n };\n\n setHeightAnimationRunning(true);\n } else {\n prevVisibleContentHeight = LayoutMetrics.visibleContentHeight;\n recalcContentOverlayPosition();\n recalcScrollFlags();\n }\n }\n\n prevHeaderHeight = LayoutMetrics.headerHeight;\n prevContentHeight = LayoutMetrics.contentHeight;\n prevFooterHeight = LayoutMetrics.footerHeight;\n };\n\n const resizeObserver = new ResizeObserver(handleHeightChange);\n const content = contentRef.current;\n const footer = footerRef.current;\n const header = headerWrapperRef.current;\n\n content !== null && resizeObserver.observe(content);\n footer !== null && resizeObserver.observe(footer);\n header !== null && resizeObserver.observe(header);\n\n return () => resizeObserver.disconnect();\n }, [\n fixOverscroll,\n recalcContentOverlayPosition,\n recalcScrollFlags,\n resetScrollPosition,\n setHeightAnimationRunning,\n LayoutMetrics,\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, ...eventHandlersRaw } = useNoBubbling();\n\n const eventHandlers = interceptTouchHandlers\n ? eventHandlersRaw\n : { ...eventHandlersRaw, onTouchMove: undefined, onTouchStart: undefined, onTouchEnd: undefined };\n\n if (!animationTimeout) {\n return null;\n }\n\n const containerDataQa = `bottom-sheet-container${dataQA ? ` ${dataQA}` : ''}`;\n\n const explicitAria: ExplicitRegionProps = {\n 'aria-label': ariaLabel,\n 'aria-labelledby': ariaLabelledby,\n 'aria-describedby': ariaDescribedby,\n 'aria-description': ariaDescription,\n };\n\n const renderFunc = (appearTransition: TransitionStatus, heightTransition: TransitionStatus) => {\n const content = (\n <div\n className={classnames(styles.content, {\n [styles.contentFullScreen]: height === 'full-screen',\n [styles.contentWithPaddings]: withContentPaddings === true,\n [styles.contentWithTopPadding]: !header && withContentPaddings === 'top',\n [styles.contentSizedFullScreen]: isContentSizedFullHeight(children),\n })}\n ref={contentRef}\n >\n <BottomSheetContext.Provider value={bottomSheetContext.value}>{children}</BottomSheetContext.Provider>\n </div>\n );\n\n const scrollContainer = hasTouchSupport ? (\n <CustomScrollContextProvider\n ref={scrollContextProviderRef}\n wrapperRef={scrollContainerRef}\n {...scrollContextProps}\n >\n <div\n className={classnames(styles.scrollContainer, {\n [styles.scrollContainerWithTopPadding]: withTopPadding,\n })}\n onFocus={handleFocus}\n ref={scrollContainerRef}\n >\n <GrowLimitWrapper {...growLimiterProps}>\n <div className={styles.headerWrapper} ref={headerWrapperRef}>\n {header}\n </div>\n {content}\n </GrowLimitWrapper>\n </div>\n </CustomScrollContextProvider>\n ) : (\n <div\n className={classnames(styles.scrollContainer, styles.nativeScrollContainer, {\n [styles.scrollContainerWithTopPadding]: withTopPadding,\n })}\n onFocus={handleFocus}\n onScroll={recalcScrollFlags}\n ref={scrollContainerRef}\n >\n <GrowLimitWrapper {...growLimiterProps}>\n <div className={styles.headerWrapper} ref={headerWrapperRef}>\n {header}\n </div>\n {content}\n </GrowLimitWrapper>\n </div>\n );\n\n const clonedFooter =\n footer && isActionBarComponent(footer)\n ? cloneElement(footer, {\n type: footer.props.type || BOTTOM_SHEET_ACTION_BAR_DEFAULTS.type,\n padding: footer.props.padding || BOTTOM_SHEET_ACTION_BAR_DEFAULTS.padding,\n showDivider: BOTTOM_SHEET_ACTION_BAR_DEFAULTS.showDivider,\n })\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(null) }\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 <ContentOverlayRoot ref={contentOverlayRef}>\n <AccessibleRegionProvider>\n <BottomSheetDialog\n explicitAria={explicitAria}\n dialogRef={bottomSheetRef}\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 id={id}\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 </BottomSheetDialog>\n </AccessibleRegionProvider>\n </ContentOverlayRoot>\n </div>\n </div>\n </Layer>\n );\n };\n\n return createPortal(\n <ThemeWrapper>\n {(themeClass) => (\n <div\n className={classnames(styles.cssVariablesContainer, themeClass)}\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 onEntering={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 )}\n </ThemeWrapper>,\n document.body\n );\n};\n\nconst BottomSheetComponent = forwardRef(BottomSheetRenderFunc);\nBottomSheetComponent.displayName = 'BottomSheet';\n\nexport const BottomSheet = BottomSheetComponent as typeof BottomSheetComponent & { Media: typeof BottomSheetMedia };\nBottomSheet.Media = BottomSheetMedia;\n"],"names":["_jsx","_jsxs"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAqDA,MAAM,gCAAgC,GAAG,4BAA4B,CAAC;AACtE,MAAM,+BAA+B,GAAG,2BAA2B,CAAC;AACpE,MAAM,iCAAiC,GAAG,8BAA8B,CAAC;AACzE,MAAM,mCAAmC,GAAG,+BAA+B,CAAC;AAC5E,MAAM,sCAAsC,GAAG,kCAAkC,CAAC;AAElF,MAAM,WAAW,GAAG,MAAM,gCAAgC,CAAC,IAAI,CAAC,SAAS,CAAC,SAAS,C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AU,EAAE,0BAA0B,EACtC,SAAS,EAAE,wBAAwB,EACnC,OAAO,EAAE,gBAAgB,CAAC,MAAM,EAChC,OAAO,EAAE,UAAU,EAElB,QAAA,EAAA,CAAC,gBAAgB,KAAK,UAAU,CAAC,gBAAgB,EAAE,gBAAgB,CAAC,EAAA,CAC5D,CAChB,EAAA,EAZI,CAAmB,gBAAA,EAAA,eAAe,EAAE,CAahC,EAAA,CACX,CACT,EAAA,CACU,EACf,QAAQ,CAAC,IAAI,CAChB,CAAC;AACN,CAAC,CAAC;AAEF,MAAM,oBAAoB,GAAG,UAAU,CAAC,qBAAqB,CAAC,CAAC;AAC/D,oBAAoB,CAAC,WAAW,GAAG,aAAa,CAAC;AAE1C,MAAM,WAAW,GAAG,qBAAyF;AACpH,WAAW,CAAC,KAAK,GAAG,gBAAgB;;;;"}
@@ -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-CCIz7agd.js';
3
+ import { s as styles } from './bottom-sheet-Dmsk4YVB.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-CCIz7agd.js';
4
+ import { s as styles } from './bottom-sheet-Dmsk4YVB.js';
5
5
 
6
6
  const BottomSheetIFrameAdapter = ({ children }) => {
7
7
  const touchEventsInterceptorRef = useRef(null);
@@ -3,7 +3,7 @@ import { jsx } from 'react/jsx-runtime';
3
3
  import { forwardRef } from 'react';
4
4
  import classnames from 'classnames';
5
5
 
6
- var styles = {"media":"magritte-media___fzaJa_9-4-25","contain":"magritte-contain___Hu7Gu_9-4-25","cover":"magritte-cover___sueew_9-4-25"};
6
+ var styles = {"media":"magritte-media___fzaJa_9-4-27","contain":"magritte-contain___Hu7Gu_9-4-27","cover":"magritte-cover___sueew_9-4-27"};
7
7
 
8
8
  const BottomSheetMedia = forwardRef(({ backgroundUrl, children, className, height, imageSize, ratio, style, ...props }, ref) => {
9
9
  const defaultRatio = children ? 'auto' : 1.9;
@@ -1,9 +1,8 @@
1
1
  import { type BottomSheetProps } from '@hh.ru/magritte-ui-bottom-sheet/types';
2
- interface BottomSheetWithImageProps {
2
+ export interface BottomSheetWithImageProps {
3
3
  /** Картинка/иконка/видео/кастомный контент, обернутые в `<BottomSheet.Media />` */
4
4
  image: React.ReactNode;
5
5
  /** <Title /> */
6
6
  title?: React.ReactNode;
7
7
  }
8
8
  export declare const BottomSheetWithImage: React.FC<BottomSheetProps & BottomSheetWithImageProps>;
9
- export {};
@@ -1,6 +1,7 @@
1
1
  import './index.css';
2
2
  import { jsx, jsxs } from 'react/jsx-runtime';
3
3
  import { BottomSheet } from './BottomSheet.js';
4
+ import { BOTTOM_SHEET_WITH_IMAGE_NAV_BAR_DEFAULTS, BOTTOM_SHEET_WITH_IMAGE_NAV_BAR_ICON_DEFAULTS, BOTTOM_SHEET_WITH_IMAGE_TITLE_DEFAULTS } from './withImageDefaults.js';
4
5
  import { NavBar, NavBarDefaultPropsContext } from '@hh.ru/magritte-ui-nav-bar';
5
6
  import { TitleDefaultPropsContext } from '@hh.ru/magritte-ui-title';
6
7
  import 'react';
@@ -18,6 +19,7 @@ import '@hh.ru/magritte-ui-action-bar';
18
19
  import './BottomSheetContext.js';
19
20
  import './BottomSheetMedia.js';
20
21
  import './ClickInterceptor.js';
22
+ import './actionBarDefaults.js';
21
23
  import '@hh.ru/magritte-ui-breakpoint';
22
24
  import '@hh.ru/magritte-ui-content-overlay';
23
25
  import '@hh.ru/magritte-ui-divider';
@@ -25,21 +27,16 @@ import '@hh.ru/magritte-ui-layer';
25
27
  import '@hh.ru/magritte-ui-textarea';
26
28
  import '@hh.ru/magritte-ui-theme-wrapper';
27
29
  import '@hh.ru/magritte-ui-tree-selector';
28
- import './bottom-sheet-CCIz7agd.js';
30
+ import './bottom-sheet-Dmsk4YVB.js';
29
31
 
30
- var styles = {"top-padding":"magritte-top-padding___SfKyV_9-4-25","topPadding":"magritte-top-padding___SfKyV_9-4-25","title-wrapper":"magritte-title-wrapper___EqVH0_9-4-25","titleWrapper":"magritte-title-wrapper___EqVH0_9-4-25","content-wrapper":"magritte-content-wrapper___Y-au-_9-4-25","contentWrapper":"magritte-content-wrapper___Y-au-_9-4-25"};
32
+ var styles = {"top-padding":"magritte-top-padding___SfKyV_9-4-27","topPadding":"magritte-top-padding___SfKyV_9-4-27","title-wrapper":"magritte-title-wrapper___EqVH0_9-4-27","titleWrapper":"magritte-title-wrapper___EqVH0_9-4-27","content-wrapper":"magritte-content-wrapper___Y-au-_9-4-27","contentWrapper":"magritte-content-wrapper___Y-au-_9-4-27"};
31
33
 
32
- const NAV_BAR_DEFAULT_PROPS = {
33
- overlay: true,
34
- snapScroll: false,
35
- transparent: 'start',
36
- };
37
- const NAV_BAR_ACTIONS_ICONS_DEFAULT_PROPS = {
38
- borderRadius: 12,
39
- };
40
- const TITLE_DEFAULT_PROPS = {
41
- size: 'medium',
42
- };
34
+ // The values live in `withImageDefaults` because the Code Connect template reads them too (a nested snippet
35
+ // must not repeat what this wrapper already supplies). They are re-declared here with their context types so
36
+ // the plain-data module stays compile-checked against the props it is meant to fill.
37
+ const NAV_BAR_DEFAULT_PROPS = BOTTOM_SHEET_WITH_IMAGE_NAV_BAR_DEFAULTS;
38
+ const NAV_BAR_ACTIONS_ICONS_DEFAULT_PROPS = BOTTOM_SHEET_WITH_IMAGE_NAV_BAR_ICON_DEFAULTS;
39
+ const TITLE_DEFAULT_PROPS = BOTTOM_SHEET_WITH_IMAGE_TITLE_DEFAULTS;
43
40
  const BottomSheetWithImage = ({ children, image, title, header, ...props }) => {
44
41
  return (jsx(NavBar.TriggerProvider, { children: jsxs(BottomSheet, { ...props, header: jsxs(NavBarDefaultPropsContext, { rootProps: NAV_BAR_DEFAULT_PROPS, actionsIconsProps: NAV_BAR_ACTIONS_ICONS_DEFAULT_PROPS, children: [jsx("div", { className: styles.topPadding }), header] }), children: [image, title && (jsx(TitleDefaultPropsContext, { props: TITLE_DEFAULT_PROPS, children: jsx("div", { className: styles.titleWrapper, children: title }) })), children && jsx("div", { className: styles.contentWrapper, children: children })] }) }));
45
42
  };
@@ -1 +1 @@
1
- {"version":3,"file":"BottomSheetWithImage.js","sources":["src/BottomSheetWithImage.tsx"],"sourcesContent":["import { BottomSheet } from '@hh.ru/magritte-ui-bottom-sheet/BottomSheet';\nimport { type BottomSheetProps } from '@hh.ru/magritte-ui-bottom-sheet/types';\nimport { type NavBarDefaultPropsContextProps, NavBar, NavBarDefaultPropsContext } from '@hh.ru/magritte-ui-nav-bar';\nimport { type TitleProps, TitleDefaultPropsContext } from '@hh.ru/magritte-ui-title';\n\nimport styles from './bottom-sheet-with-image.less';\n\nconst NAV_BAR_DEFAULT_PROPS: NavBarDefaultPropsContextProps['rootProps'] = {\n overlay: true,\n snapScroll: false,\n transparent: 'start',\n};\n\nconst NAV_BAR_ACTIONS_ICONS_DEFAULT_PROPS: NavBarDefaultPropsContextProps['actionsIconsProps'] = {\n borderRadius: 12,\n};\n\nconst TITLE_DEFAULT_PROPS: Partial<TitleProps> = {\n size: 'medium',\n};\n\ninterface BottomSheetWithImageProps {\n /** Картинка/иконка/видео/кастомный контент, обернутые в `<BottomSheet.Media />` */\n image: React.ReactNode;\n /** <Title /> */\n title?: React.ReactNode;\n}\n\nexport const BottomSheetWithImage: React.FC<BottomSheetProps & BottomSheetWithImageProps> = ({\n children,\n image,\n title,\n header,\n ...props\n}) => {\n return (\n <NavBar.TriggerProvider>\n <BottomSheet\n {...props}\n header={\n <NavBarDefaultPropsContext\n rootProps={NAV_BAR_DEFAULT_PROPS}\n actionsIconsProps={NAV_BAR_ACTIONS_ICONS_DEFAULT_PROPS}\n >\n <div className={styles.topPadding} />\n {header}\n </NavBarDefaultPropsContext>\n }\n >\n {image}\n {title && (\n <TitleDefaultPropsContext props={TITLE_DEFAULT_PROPS}>\n <div className={styles.titleWrapper}>{title}</div>\n </TitleDefaultPropsContext>\n )}\n {children && <div className={styles.contentWrapper}>{children}</div>}\n </BottomSheet>\n </NavBar.TriggerProvider>\n );\n};\n"],"names":["_jsx","_jsxs"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAOA,MAAM,qBAAqB,GAAgD;AACvE,IAAA,OAAO,EAAE,IAAI;AACb,IAAA,UAAU,EAAE,KAAK;AACjB,IAAA,WAAW,EAAE,OAAO;CACvB,CAAC;AAEF,MAAM,mCAAmC,GAAwD;AAC7F,IAAA,YAAY,EAAE,EAAE;CACnB,CAAC;AAEF,MAAM,mBAAmB,GAAwB;AAC7C,IAAA,IAAI,EAAE,QAAQ;CACjB,CAAC;AASW,MAAA,oBAAoB,GAA2D,CAAC,EACzF,QAAQ,EACR,KAAK,EACL,KAAK,EACL,MAAM,EACN,GAAG,KAAK,EACX,KAAI;AACD,IAAA,QACIA,GAAA,CAAC,MAAM,CAAC,eAAe,EACnB,EAAA,QAAA,EAAAC,IAAA,CAAC,WAAW,EAAA,EAAA,GACJ,KAAK,EACT,MAAM,EACFA,IAAA,CAAC,yBAAyB,EACtB,EAAA,SAAS,EAAE,qBAAqB,EAChC,iBAAiB,EAAE,mCAAmC,aAEtDD,GAAK,CAAA,KAAA,EAAA,EAAA,SAAS,EAAE,MAAM,CAAC,UAAU,EAAA,CAAI,EACpC,MAAM,IACiB,EAG/B,QAAA,EAAA,CAAA,KAAK,EACL,KAAK,KACFA,GAAC,CAAA,wBAAwB,IAAC,KAAK,EAAE,mBAAmB,EAAA,QAAA,EAChDA,aAAK,SAAS,EAAE,MAAM,CAAC,YAAY,EAAG,QAAA,EAAA,KAAK,EAAO,CAAA,EAAA,CAC3B,CAC9B,EACA,QAAQ,IAAIA,GAAA,CAAA,KAAA,EAAA,EAAK,SAAS,EAAE,MAAM,CAAC,cAAc,YAAG,QAAQ,EAAA,CAAO,CAC1D,EAAA,CAAA,EAAA,CACO,EAC3B;AACN;;;;"}
1
+ {"version":3,"file":"BottomSheetWithImage.js","sources":["src/BottomSheetWithImage.tsx"],"sourcesContent":["import { BottomSheet } from '@hh.ru/magritte-ui-bottom-sheet/BottomSheet';\nimport { type BottomSheetProps } from '@hh.ru/magritte-ui-bottom-sheet/types';\nimport {\n BOTTOM_SHEET_WITH_IMAGE_NAV_BAR_DEFAULTS,\n BOTTOM_SHEET_WITH_IMAGE_NAV_BAR_ICON_DEFAULTS,\n BOTTOM_SHEET_WITH_IMAGE_TITLE_DEFAULTS,\n} from '@hh.ru/magritte-ui-bottom-sheet/withImageDefaults';\nimport { type NavBarDefaultPropsContextProps, NavBar, NavBarDefaultPropsContext } from '@hh.ru/magritte-ui-nav-bar';\nimport { type TitleProps, TitleDefaultPropsContext } from '@hh.ru/magritte-ui-title';\n\nimport styles from './bottom-sheet-with-image.less';\n\n// The values live in `withImageDefaults` because the Code Connect template reads them too (a nested snippet\n// must not repeat what this wrapper already supplies). They are re-declared here with their context types so\n// the plain-data module stays compile-checked against the props it is meant to fill.\nconst NAV_BAR_DEFAULT_PROPS: NavBarDefaultPropsContextProps['rootProps'] = BOTTOM_SHEET_WITH_IMAGE_NAV_BAR_DEFAULTS;\n\nconst NAV_BAR_ACTIONS_ICONS_DEFAULT_PROPS: NavBarDefaultPropsContextProps['actionsIconsProps'] =\n BOTTOM_SHEET_WITH_IMAGE_NAV_BAR_ICON_DEFAULTS;\n\nconst TITLE_DEFAULT_PROPS: Partial<TitleProps> = BOTTOM_SHEET_WITH_IMAGE_TITLE_DEFAULTS;\n\nexport interface BottomSheetWithImageProps {\n /** Картинка/иконка/видео/кастомный контент, обернутые в `<BottomSheet.Media />` */\n image: React.ReactNode;\n /** <Title /> */\n title?: React.ReactNode;\n}\n\nexport const BottomSheetWithImage: React.FC<BottomSheetProps & BottomSheetWithImageProps> = ({\n children,\n image,\n title,\n header,\n ...props\n}) => {\n return (\n <NavBar.TriggerProvider>\n <BottomSheet\n {...props}\n header={\n <NavBarDefaultPropsContext\n rootProps={NAV_BAR_DEFAULT_PROPS}\n actionsIconsProps={NAV_BAR_ACTIONS_ICONS_DEFAULT_PROPS}\n >\n <div className={styles.topPadding} />\n {header}\n </NavBarDefaultPropsContext>\n }\n >\n {image}\n {title && (\n <TitleDefaultPropsContext props={TITLE_DEFAULT_PROPS}>\n <div className={styles.titleWrapper}>{title}</div>\n </TitleDefaultPropsContext>\n )}\n {children && <div className={styles.contentWrapper}>{children}</div>}\n </BottomSheet>\n </NavBar.TriggerProvider>\n );\n};\n"],"names":["_jsx","_jsxs"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAYA;AACA;AACA;AACA,MAAM,qBAAqB,GAAgD,wCAAwC,CAAC;AAEpH,MAAM,mCAAmC,GACrC,6CAA6C,CAAC;AAElD,MAAM,mBAAmB,GAAwB,sCAAsC,CAAC;AAS3E,MAAA,oBAAoB,GAA2D,CAAC,EACzF,QAAQ,EACR,KAAK,EACL,KAAK,EACL,MAAM,EACN,GAAG,KAAK,EACX,KAAI;AACD,IAAA,QACIA,GAAA,CAAC,MAAM,CAAC,eAAe,EACnB,EAAA,QAAA,EAAAC,IAAA,CAAC,WAAW,EAAA,EAAA,GACJ,KAAK,EACT,MAAM,EACFA,IAAA,CAAC,yBAAyB,EACtB,EAAA,SAAS,EAAE,qBAAqB,EAChC,iBAAiB,EAAE,mCAAmC,aAEtDD,GAAK,CAAA,KAAA,EAAA,EAAA,SAAS,EAAE,MAAM,CAAC,UAAU,EAAA,CAAI,EACpC,MAAM,IACiB,EAG/B,QAAA,EAAA,CAAA,KAAK,EACL,KAAK,KACFA,GAAC,CAAA,wBAAwB,IAAC,KAAK,EAAE,mBAAmB,EAAA,QAAA,EAChDA,aAAK,SAAS,EAAE,MAAM,CAAC,YAAY,EAAG,QAAA,EAAA,KAAK,EAAO,CAAA,EAAA,CAC3B,CAC9B,EACA,QAAQ,IAAIA,GAAA,CAAA,KAAA,EAAA,EAAK,SAAS,EAAE,MAAM,CAAC,cAAc,YAAG,QAAQ,EAAA,CAAO,CAC1D,EAAA,CAAA,EAAA,CACO,EAC3B;AACN;;;;"}
@@ -0,0 +1,20 @@
1
+ /**
2
+ * The ActionBar props a BottomSheet supplies to whatever sits in its `footer` slot, at runtime by cloning the
3
+ * element (see `BottomSheet.tsx`).
4
+ *
5
+ * They live in their own module, as plain data with no imports, because they are read from TWO sides: the
6
+ * component applies them, and the Code Connect template declares them as contextual defaults so a footer
7
+ * snippet stops repeating what the bottom sheet already provides. A literal copied into the template would
8
+ * drift silently — change a value here and the published snippet would keep asserting the old one, with no
9
+ * build error and no render error. The bundler inlines this file into every template that imports it, which is
10
+ * the other reason it must stay free of runtime imports.
11
+ *
12
+ * `type` and `padding` are defaults in the ordinary sense — an explicit prop on the footer element wins.
13
+ * `showDivider` is not: the bottom sheet draws the divider itself (`styles.divider` above the footer) and
14
+ * always overrides the bar's own, so `false` is what an action bar in this position invariably gets.
15
+ */
16
+ export declare const BOTTOM_SHEET_ACTION_BAR_DEFAULTS: {
17
+ readonly type: "vertical";
18
+ readonly padding: 16;
19
+ readonly showDivider: false;
20
+ };
@@ -0,0 +1,24 @@
1
+ import './index.css';
2
+ /**
3
+ * The ActionBar props a BottomSheet supplies to whatever sits in its `footer` slot, at runtime by cloning the
4
+ * element (see `BottomSheet.tsx`).
5
+ *
6
+ * They live in their own module, as plain data with no imports, because they are read from TWO sides: the
7
+ * component applies them, and the Code Connect template declares them as contextual defaults so a footer
8
+ * snippet stops repeating what the bottom sheet already provides. A literal copied into the template would
9
+ * drift silently — change a value here and the published snippet would keep asserting the old one, with no
10
+ * build error and no render error. The bundler inlines this file into every template that imports it, which is
11
+ * the other reason it must stay free of runtime imports.
12
+ *
13
+ * `type` and `padding` are defaults in the ordinary sense — an explicit prop on the footer element wins.
14
+ * `showDivider` is not: the bottom sheet draws the divider itself (`styles.divider` above the footer) and
15
+ * always overrides the bar's own, so `false` is what an action bar in this position invariably gets.
16
+ */
17
+ const BOTTOM_SHEET_ACTION_BAR_DEFAULTS = {
18
+ type: 'vertical',
19
+ padding: 16,
20
+ showDivider: false,
21
+ };
22
+
23
+ export { BOTTOM_SHEET_ACTION_BAR_DEFAULTS };
24
+ //# sourceMappingURL=actionBarDefaults.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"actionBarDefaults.js","sources":["src/actionBarDefaults.ts"],"sourcesContent":["/**\n * The ActionBar props a BottomSheet supplies to whatever sits in its `footer` slot, at runtime by cloning the\n * element (see `BottomSheet.tsx`).\n *\n * They live in their own module, as plain data with no imports, because they are read from TWO sides: the\n * component applies them, and the Code Connect template declares them as contextual defaults so a footer\n * snippet stops repeating what the bottom sheet already provides. A literal copied into the template would\n * drift silently — change a value here and the published snippet would keep asserting the old one, with no\n * build error and no render error. The bundler inlines this file into every template that imports it, which is\n * the other reason it must stay free of runtime imports.\n *\n * `type` and `padding` are defaults in the ordinary sense — an explicit prop on the footer element wins.\n * `showDivider` is not: the bottom sheet draws the divider itself (`styles.divider` above the footer) and\n * always overrides the bar's own, so `false` is what an action bar in this position invariably gets.\n */\nexport const BOTTOM_SHEET_ACTION_BAR_DEFAULTS = {\n type: 'vertical',\n padding: 16,\n showDivider: false,\n} as const;\n"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;AAcG;AACU,MAAA,gCAAgC,GAAG;AAC5C,IAAA,IAAI,EAAE,UAAU;AAChB,IAAA,OAAO,EAAE,EAAE;AACX,IAAA,WAAW,EAAE,KAAK;;;;;"}
@@ -0,0 +1,5 @@
1
+ import './index.css';
2
+ var styles = {"flex-container":"magritte-flex-container___muHAx_9-4-27","flexContainer":"magritte-flex-container___muHAx_9-4-27","animation-timeout":"magritte-animation-timeout___yd-SZ_9-4-27","animationTimeout":"magritte-animation-timeout___yd-SZ_9-4-27","css-variables-container":"magritte-css-variables-container___jBCr9_9-4-27","cssVariablesContainer":"magritte-css-variables-container___jBCr9_9-4-27","appear-animation":"magritte-appear-animation___P84Ln_9-4-27","appearAnimation":"magritte-appear-animation___P84Ln_9-4-27","disappear-animation":"magritte-disappear-animation___Putks_9-4-27","disappearAnimation":"magritte-disappear-animation___Putks_9-4-27","grabber-transition-animation":"magritte-grabber-transition-animation___s3Oh4_9-4-27","grabberTransitionAnimation":"magritte-grabber-transition-animation___s3Oh4_9-4-27","height-transition-animation":"magritte-height-transition-animation___xNprr_9-4-27","heightTransitionAnimation":"magritte-height-transition-animation___xNprr_9-4-27","close-by-swipe-animation":"magritte-close-by-swipe-animation___wdezY_9-4-27","closeBySwipeAnimation":"magritte-close-by-swipe-animation___wdezY_9-4-27","swipe-cancel-animation":"magritte-swipe-cancel-animation___AhYj5_9-4-27","swipeCancelAnimation":"magritte-swipe-cancel-animation___AhYj5_9-4-27","overlay":"magritte-overlay___5a2U-_9-4-27","overlay-background":"magritte-overlay-background___8Sd4V_9-4-27","overlayBackground":"magritte-overlay-background___8Sd4V_9-4-27","overlay-background_visible":"magritte-overlay-background_visible___FOJgj_9-4-27","overlayBackgroundVisible":"magritte-overlay-background_visible___FOJgj_9-4-27","swipe-container":"magritte-swipe-container___sZ2n5_9-4-27","swipeContainer":"magritte-swipe-container___sZ2n5_9-4-27","grabber":"magritte-grabber___A7SB-_9-4-27","grabber_ensure-safe":"magritte-grabber_ensure-safe___DR-dV_9-4-27","grabberEnsureSafe":"magritte-grabber_ensure-safe___DR-dV_9-4-27","visual-container":"magritte-visual-container___-VSuY_9-4-27","visualContainer":"magritte-visual-container___-VSuY_9-4-27","visual-container_full-screen":"magritte-visual-container_full-screen___jCCBb_9-4-27","visualContainerFullScreen":"magritte-visual-container_full-screen___jCCBb_9-4-27","scroll-container":"magritte-scroll-container___4ngNY_9-4-27","scrollContainer":"magritte-scroll-container___4ngNY_9-4-27","scroll-container_with-top-padding":"magritte-scroll-container_with-top-padding___o60Dl_9-4-27","scrollContainerWithTopPadding":"magritte-scroll-container_with-top-padding___o60Dl_9-4-27","native-scroll-container":"magritte-native-scroll-container___JOlxE_9-4-27","nativeScrollContainer":"magritte-native-scroll-container___JOlxE_9-4-27","content":"magritte-content___1gAwP_9-4-27","content_full-screen":"magritte-content_full-screen___2SFaO_9-4-27","contentFullScreen":"magritte-content_full-screen___2SFaO_9-4-27","content_sized-full-screen":"magritte-content_sized-full-screen___45pa6_9-4-27","contentSizedFullScreen":"magritte-content_sized-full-screen___45pa6_9-4-27","content_with-paddings":"magritte-content_with-paddings___gIiAv_9-4-27","contentWithPaddings":"magritte-content_with-paddings___gIiAv_9-4-27","content_with-top-padding":"magritte-content_with-top-padding___2e8N1_9-4-27","contentWithTopPadding":"magritte-content_with-top-padding___2e8N1_9-4-27","footer":"magritte-footer___RWslT_9-4-27","footer-with-padding":"magritte-footer-with-padding___KwkhC_9-4-27","footerWithPadding":"magritte-footer-with-padding___KwkhC_9-4-27","divider":"magritte-divider___0F8hh_9-4-27","divider_visible":"magritte-divider_visible___pAWZM_9-4-27","dividerVisible":"magritte-divider_visible___pAWZM_9-4-27","content-overlay":"magritte-content-overlay___HAyzL_9-4-27","contentOverlay":"magritte-content-overlay___HAyzL_9-4-27","no-caret":"magritte-no-caret___ewcMD_9-4-27","noCaret":"magritte-no-caret___ewcMD_9-4-27","iframe-wrapper":"magritte-iframe-wrapper___gBCL5_9-4-27","iframeWrapper":"magritte-iframe-wrapper___gBCL5_9-4-27","iframe-events-interceptor":"magritte-iframe-events-interceptor___FTW-8_9-4-27","iframeEventsInterceptor":"magritte-iframe-events-interceptor___FTW-8_9-4-27","grow-limiter":"magritte-grow-limiter___ANaBL_9-4-27","growLimiter":"magritte-grow-limiter___ANaBL_9-4-27","header-wrapper":"magritte-header-wrapper___LdLOU_9-4-27","headerWrapper":"magritte-header-wrapper___LdLOU_9-4-27"};
3
+
4
+ export { styles as s };
5
+ //# sourceMappingURL=bottom-sheet-Dmsk4YVB.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"bottom-sheet-Dmsk4YVB.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;"}
package/index.css CHANGED
@@ -1,4 +1,4 @@
1
- .magritte-media___fzaJa_9-4-25{
1
+ .magritte-media___fzaJa_9-4-27{
2
2
  display:flex;
3
3
  position:relative;
4
4
  overflow:hidden;
@@ -7,20 +7,20 @@
7
7
  background-repeat:no-repeat;
8
8
  margin:-4px;
9
9
  }
10
- .magritte-media___fzaJa_9-4-25 img{
10
+ .magritte-media___fzaJa_9-4-27 img{
11
11
  max-width:100%;
12
12
  max-height:100%;
13
13
  }
14
- .magritte-contain___Hu7Gu_9-4-25{
14
+ .magritte-contain___Hu7Gu_9-4-27{
15
15
  background-size:contain;
16
16
  }
17
- .magritte-contain___Hu7Gu_9-4-25 img{
17
+ .magritte-contain___Hu7Gu_9-4-27 img{
18
18
  object-fit:contain;
19
19
  }
20
- .magritte-cover___sueew_9-4-25{
20
+ .magritte-cover___sueew_9-4-27{
21
21
  background-size:cover;
22
22
  }
23
- .magritte-cover___sueew_9-4-25 img{
23
+ .magritte-cover___sueew_9-4-27 img{
24
24
  object-fit:cover;
25
25
  }
26
26
 
@@ -45,13 +45,13 @@
45
45
  --magritte-color-component-bottom-sheet-grabber-content-v25-0-0:#c6c6c68f;
46
46
  --magritte-color-component-_overlay-background-content-v25-0-0:#262626ad;
47
47
  }
48
- .magritte-flex-container___muHAx_9-4-25{
48
+ .magritte-flex-container___muHAx_9-4-27{
49
49
  display:flex;
50
50
  flex-direction:column;
51
51
  align-items:stretch;
52
52
  }
53
- .magritte-animation-timeout___yd-SZ_9-4-25,
54
- .magritte-css-variables-container___jBCr9_9-4-25{
53
+ .magritte-animation-timeout___yd-SZ_9-4-27,
54
+ .magritte-css-variables-container___jBCr9_9-4-27{
55
55
  --virtual-keyboard-top-offset:0px;
56
56
  --virtual-keyboard-bottom-offset:0px;
57
57
  --enter-animation-duration:0ms;
@@ -61,8 +61,8 @@
61
61
  --swipe-cancel-transition-duration:0ms;
62
62
  }
63
63
  @media (prefers-reduced-motion: no-preference){
64
- .magritte-animation-timeout___yd-SZ_9-4-25,
65
- .magritte-css-variables-container___jBCr9_9-4-25{
64
+ .magritte-animation-timeout___yd-SZ_9-4-27,
65
+ .magritte-css-variables-container___jBCr9_9-4-27{
66
66
  --enter-animation-duration:var(--magritte-semantic-animation-ease-in-out-300-duration-v25-0-0);
67
67
  --exit-animation-duration:var(--magritte-semantic-animation-ease-in-out-200-duration-v25-0-0);
68
68
  --grabber-animation-duration:var(--magritte-semantic-animation-ease-in-out-200-duration-v25-0-0);
@@ -70,52 +70,52 @@
70
70
  --swipe-cancel-transition-duration:var(--magritte-semantic-animation-ease-in-out-100-duration-v25-0-0);
71
71
  }
72
72
  }
73
- .magritte-appear-animation___P84Ln_9-4-25{
73
+ .magritte-appear-animation___P84Ln_9-4-27{
74
74
  transition-property:transform opacity;
75
75
  transition-duration:var(--enter-animation-duration);
76
76
  transition-timing-function:var(--magritte-semantic-animation-ease-in-out-300-timing-function-v25-0-0);
77
77
  }
78
- .magritte-disappear-animation___Putks_9-4-25{
78
+ .magritte-disappear-animation___Putks_9-4-27{
79
79
  transition-property:transform opacity;
80
80
  transition-duration:var(--exit-animation-duration);
81
81
  transition-timing-function:var(--magritte-semantic-animation-ease-in-out-200-timing-function-v25-0-0);
82
82
  }
83
- .magritte-grabber-transition-animation___s3Oh4_9-4-25::after{
83
+ .magritte-grabber-transition-animation___s3Oh4_9-4-27::after{
84
84
  transition-property:transform;
85
85
  transition-duration:var(--grabber-animation-duration);
86
86
  transition-timing-function:var(--magritte-semantic-animation-ease-in-out-200-timing-function-v25-0-0);
87
87
  }
88
- .magritte-height-transition-animation___xNprr_9-4-25{
88
+ .magritte-height-transition-animation___xNprr_9-4-27{
89
89
  transition-property:height;
90
90
  transition-duration:var(--height-transition-duration);
91
91
  transition-timing-function:var(--magritte-semantic-animation-ease-in-out-400-timing-function-v25-0-0);
92
92
  }
93
- .magritte-close-by-swipe-animation___wdezY_9-4-25{
93
+ .magritte-close-by-swipe-animation___wdezY_9-4-27{
94
94
  transition-property:transform;
95
95
  transition-duration:var(--exit-animation-duration);
96
96
  transition-timing-function:linear;
97
97
  }
98
- .magritte-swipe-cancel-animation___AhYj5_9-4-25{
98
+ .magritte-swipe-cancel-animation___AhYj5_9-4-27{
99
99
  transition-property:transform;
100
100
  transition-duration:var(--swipe-cancel-transition-duration);
101
101
  transition-timing-function:var(--magritte-semantic-animation-ease-in-out-100-duration-v25-0-0);
102
102
  }
103
- .magritte-overlay___5a2U-_9-4-25{
103
+ .magritte-overlay___5a2U-_9-4-27{
104
104
  pointer-events:none;
105
105
  position:fixed;
106
106
  inset:0;
107
107
  }
108
- .magritte-overlay-background___8Sd4V_9-4-25{
108
+ .magritte-overlay-background___8Sd4V_9-4-27{
109
109
  position:absolute;
110
110
  inset:0;
111
111
  will-change:opacity;
112
112
  transform:translate3d(0, 0, 0);
113
113
  }
114
- .magritte-overlay-background_visible___FOJgj_9-4-25{
114
+ .magritte-overlay-background_visible___FOJgj_9-4-27{
115
115
  pointer-events:initial;
116
116
  background-color:var(--magritte-color-component-_overlay-background-content-v25-0-0);
117
117
  }
118
- .magritte-swipe-container___sZ2n5_9-4-25{
118
+ .magritte-swipe-container___sZ2n5_9-4-27{
119
119
  display:flex;
120
120
  flex-direction:column;
121
121
  align-items:stretch;
@@ -125,11 +125,11 @@
125
125
  will-change:transform;
126
126
  transform:translate3d(0, 0, 0);
127
127
  }
128
- .magritte-grabber___A7SB-_9-4-25{
128
+ .magritte-grabber___A7SB-_9-4-27{
129
129
  flex:0 0 20px;
130
130
  position:relative;
131
131
  }
132
- .magritte-grabber___A7SB-_9-4-25::after{
132
+ .magritte-grabber___A7SB-_9-4-27::after{
133
133
  content:'';
134
134
  position:absolute;
135
135
  top:8px;
@@ -140,10 +140,10 @@
140
140
  border-radius:2px;
141
141
  z-index:3;
142
142
  }
143
- .magritte-grabber_ensure-safe___DR-dV_9-4-25::after{
143
+ .magritte-grabber_ensure-safe___DR-dV_9-4-27::after{
144
144
  transform:translateY(calc(20px - 2px));
145
145
  }
146
- .magritte-visual-container___-VSuY_9-4-25{
146
+ .magritte-visual-container___-VSuY_9-4-27{
147
147
  display:flex;
148
148
  flex-direction:column;
149
149
  align-items:stretch;
@@ -157,11 +157,11 @@
157
157
  user-select:text;
158
158
  --magritte-ui-container-background-color-override:var(--magritte-color-component-bottom-sheet-background-content-v25-0-0);
159
159
  }
160
- .magritte-visual-container_full-screen___jCCBb_9-4-25{
160
+ .magritte-visual-container_full-screen___jCCBb_9-4-27{
161
161
  flex:1 1 auto;
162
162
  min-height:1px;
163
163
  }
164
- .magritte-scroll-container___4ngNY_9-4-25{
164
+ .magritte-scroll-container___4ngNY_9-4-27{
165
165
  --magritte-ui-navigation-bar-background-override:var(--magritte-color-component-bottom-sheet-background-content-v25-0-0);
166
166
  --magritte-ui-nav-bar-background-color-override:var(--magritte-color-component-bottom-sheet-background-content-v25-0-0);
167
167
  --magritte-ui-nav-bar-padding-top-override:8px;
@@ -172,17 +172,17 @@
172
172
  min-height:1px;
173
173
  z-index:1;
174
174
  }
175
- .magritte-scroll-container_with-top-padding___o60Dl_9-4-25{
175
+ .magritte-scroll-container_with-top-padding___o60Dl_9-4-27{
176
176
  --magritte-ui-navigation-bar-top-padding-override:16px;
177
177
  }
178
- .magritte-native-scroll-container___JOlxE_9-4-25{
178
+ .magritte-native-scroll-container___JOlxE_9-4-27{
179
179
  overflow:scroll;
180
180
  scrollbar-width:none;
181
181
  }
182
- .magritte-native-scroll-container___JOlxE_9-4-25::-webkit-scrollbar{
182
+ .magritte-native-scroll-container___JOlxE_9-4-27::-webkit-scrollbar{
183
183
  display:none;
184
184
  }
185
- .magritte-content___1gAwP_9-4-25{
185
+ .magritte-content___1gAwP_9-4-27{
186
186
  display:flex;
187
187
  flex-direction:column;
188
188
  align-items:stretch;
@@ -191,20 +191,20 @@
191
191
  will-change:transform;
192
192
  transform:translate3d(0, 0, 0);
193
193
  }
194
- .magritte-content_full-screen___2SFaO_9-4-25{
194
+ .magritte-content_full-screen___2SFaO_9-4-27{
195
195
  flex:1 0 auto;
196
196
  }
197
- .magritte-content_sized-full-screen___45pa6_9-4-25{
197
+ .magritte-content_sized-full-screen___45pa6_9-4-27{
198
198
  flex:1 1 auto;
199
199
  min-height:1px;
200
200
  }
201
- .magritte-content_with-paddings___gIiAv_9-4-25{
201
+ .magritte-content_with-paddings___gIiAv_9-4-27{
202
202
  padding:16px 16px 0;
203
203
  }
204
- .magritte-content_with-top-padding___2e8N1_9-4-25{
204
+ .magritte-content_with-top-padding___2e8N1_9-4-27{
205
205
  padding:16px 0 0;
206
206
  }
207
- .magritte-footer___RWslT_9-4-25{
207
+ .magritte-footer___RWslT_9-4-27{
208
208
  flex:0 0 auto;
209
209
  background-color:var(--magritte-color-component-bottom-sheet-background-content-v25-0-0);
210
210
  z-index:2;
@@ -212,55 +212,55 @@
212
212
  transform:translate3d(0, 0, 0);
213
213
  --magritte-ui-container-background-color-override:var(--magritte-color-component-bottom-sheet-background-content-v25-0-0);
214
214
  }
215
- .magritte-footer-with-padding___KwkhC_9-4-25{
215
+ .magritte-footer-with-padding___KwkhC_9-4-27{
216
216
  display:flex;
217
217
  flex-direction:column;
218
218
  gap:12px;
219
219
  padding:16px;
220
220
  }
221
- .magritte-divider___0F8hh_9-4-25{
221
+ .magritte-divider___0F8hh_9-4-27{
222
222
  visibility:hidden;
223
223
  }
224
- .magritte-divider_visible___pAWZM_9-4-25{
224
+ .magritte-divider_visible___pAWZM_9-4-27{
225
225
  visibility:visible;
226
226
  }
227
- .magritte-content-overlay___HAyzL_9-4-25{
227
+ .magritte-content-overlay___HAyzL_9-4-27{
228
228
  pointer-events:none;
229
229
  position:absolute;
230
230
  inset:0;
231
231
  }
232
- .magritte-no-caret___ewcMD_9-4-25{
232
+ .magritte-no-caret___ewcMD_9-4-27{
233
233
  --magritte-ui-input-caret-color-override:transparent;
234
234
  --magritte-ui-textarea-caret-color-override:transparent;
235
235
  }
236
- .magritte-iframe-wrapper___gBCL5_9-4-25{
236
+ .magritte-iframe-wrapper___gBCL5_9-4-27{
237
237
  position:relative;
238
238
  width:100%;
239
239
  }
240
- .magritte-iframe-events-interceptor___FTW-8_9-4-25{
240
+ .magritte-iframe-events-interceptor___FTW-8_9-4-27{
241
241
  position:absolute;
242
242
  inset:0;
243
243
  }
244
- .magritte-grow-limiter___ANaBL_9-4-25{
244
+ .magritte-grow-limiter___ANaBL_9-4-27{
245
245
  display:flex;
246
246
  flex-direction:column;
247
247
  flex:1 0;
248
248
  }
249
- .magritte-header-wrapper___LdLOU_9-4-25{
249
+ .magritte-header-wrapper___LdLOU_9-4-27{
250
250
  position:sticky;
251
251
  z-index:1;
252
252
  top:0;
253
253
  }
254
254
 
255
- .magritte-top-padding___SfKyV_9-4-25{
255
+ .magritte-top-padding___SfKyV_9-4-27{
256
256
  position:absolute;
257
257
  height:12px;
258
258
  inset:0 0 auto;
259
259
  background-color:var(--magritte-ui-container-background-color-override);
260
260
  }
261
- .magritte-title-wrapper___EqVH0_9-4-25{
261
+ .magritte-title-wrapper___EqVH0_9-4-27{
262
262
  padding-top:24px;
263
263
  }
264
- .magritte-content-wrapper___Y-au-_9-4-25{
264
+ .magritte-content-wrapper___Y-au-_9-4-27{
265
265
  padding-top:16px;
266
266
  }
package/index.js CHANGED
@@ -19,6 +19,7 @@ import '@hh.ru/magritte-internal-custom-scroll';
19
19
  import '@hh.ru/magritte-ui-action-bar';
20
20
  import './BottomSheetMedia.js';
21
21
  import './ClickInterceptor.js';
22
+ import './actionBarDefaults.js';
22
23
  import '@hh.ru/magritte-ui-breakpoint';
23
24
  import '@hh.ru/magritte-ui-content-overlay';
24
25
  import '@hh.ru/magritte-ui-divider';
@@ -26,7 +27,8 @@ import '@hh.ru/magritte-ui-layer';
26
27
  import '@hh.ru/magritte-ui-textarea';
27
28
  import '@hh.ru/magritte-ui-theme-wrapper';
28
29
  import '@hh.ru/magritte-ui-tree-selector';
29
- import './bottom-sheet-CCIz7agd.js';
30
+ import './bottom-sheet-Dmsk4YVB.js';
31
+ import './withImageDefaults.js';
30
32
  import '@hh.ru/magritte-ui-nav-bar';
31
33
  import '@hh.ru/magritte-ui-title';
32
34
  //# sourceMappingURL=index.js.map
package/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hh.ru/magritte-ui-bottom-sheet",
3
- "version": "9.4.25",
3
+ "version": "9.4.27",
4
4
  "main": "index.js",
5
5
  "types": "index.d.ts",
6
6
  "sideEffects": [
@@ -16,7 +16,11 @@
16
16
  "ts-config": "yarn root:ts-config $(pwd)",
17
17
  "ts-check": "yarn root:ts-check $(pwd)",
18
18
  "test": "yarn root:test $(pwd)",
19
- "watch": "yarn root:watch $(pwd)"
19
+ "watch": "yarn root:watch $(pwd)",
20
+ "figma-publish": "yarn root:figma-publish $(pwd)",
21
+ "figma-unpublish": "yarn root:figma-unpublish $(pwd)",
22
+ "figma-snapshot-check": "yarn root:figma-snapshot $(pwd)",
23
+ "figma-snapshot-update": "yarn root:figma-snapshot $(pwd) --update"
20
24
  },
21
25
  "dependencies": {
22
26
  "@hh.ru/magritte-common-func-utils": "1.3.15",
@@ -29,17 +33,17 @@
29
33
  "@hh.ru/magritte-internal-accessible-region": "1.0.3",
30
34
  "@hh.ru/magritte-internal-custom-scroll": "2.1.1",
31
35
  "@hh.ru/magritte-internal-layer-name": "3.4.1",
32
- "@hh.ru/magritte-ui-action-bar": "5.4.13",
36
+ "@hh.ru/magritte-ui-action-bar": "5.4.15",
33
37
  "@hh.ru/magritte-ui-breakpoint": "6.1.1",
34
38
  "@hh.ru/magritte-ui-content-overlay": "1.2.1",
35
39
  "@hh.ru/magritte-ui-divider": "3.2.7",
36
- "@hh.ru/magritte-ui-layer": "3.2.6",
40
+ "@hh.ru/magritte-ui-layer": "3.2.7",
37
41
  "@hh.ru/magritte-ui-mock-component": "1.1.7",
38
- "@hh.ru/magritte-ui-nav-bar": "2.0.10",
39
- "@hh.ru/magritte-ui-textarea": "3.3.41",
42
+ "@hh.ru/magritte-ui-nav-bar": "2.0.12",
43
+ "@hh.ru/magritte-ui-textarea": "3.3.42",
40
44
  "@hh.ru/magritte-ui-theme-wrapper": "1.1.24",
41
- "@hh.ru/magritte-ui-title": "8.3.8",
42
- "@hh.ru/magritte-ui-tree-selector": "5.5.61"
45
+ "@hh.ru/magritte-ui-title": "8.3.9",
46
+ "@hh.ru/magritte-ui-tree-selector": "5.5.62"
43
47
  },
44
48
  "peerDependencies": {
45
49
  "classnames": ">=2.3.2",
@@ -50,5 +54,5 @@
50
54
  "publishConfig": {
51
55
  "access": "public"
52
56
  },
53
- "gitHead": "673159d3e2d52fa7608da8042b16148b9fed7fb4"
57
+ "gitHead": "8bd183b41ef06524e721f0add554ff715f42b5a1"
54
58
  }
@@ -0,0 +1,25 @@
1
+ /**
2
+ * The props `BottomSheetWithImage` supplies to the two components it composes, at runtime through their
3
+ * `DefaultPropsContext` providers (see `BottomSheetWithImage.tsx`).
4
+ *
5
+ * They live in their own module, as plain data with no imports, because they are read from TWO sides: the
6
+ * component applies them, and the Code Connect template declares them as contextual defaults so a nested
7
+ * snippet stops repeating — or worse, overriding — what the wrapper already provides. A literal copied into
8
+ * the template would drift silently: change a value here and the published snippet would keep asserting the
9
+ * old one, with no build error and no render error. The bundler inlines this file into every template that
10
+ * imports it, which is the other reason it must stay free of runtime imports.
11
+ */
12
+ /** Applied to every NavBar in the subtree — the header lies over the image, transparent until it scrolls. */
13
+ export declare const BOTTOM_SHEET_WITH_IMAGE_NAV_BAR_DEFAULTS: {
14
+ readonly overlay: true;
15
+ readonly snapScroll: false;
16
+ readonly transparent: "start";
17
+ };
18
+ /** Applied to the icons of every NavBar action group in the subtree. */
19
+ export declare const BOTTOM_SHEET_WITH_IMAGE_NAV_BAR_ICON_DEFAULTS: {
20
+ readonly borderRadius: 12;
21
+ };
22
+ /** Applied to whatever goes into the `title` prop. */
23
+ export declare const BOTTOM_SHEET_WITH_IMAGE_TITLE_DEFAULTS: {
24
+ readonly size: "medium";
25
+ };
@@ -0,0 +1,29 @@
1
+ import './index.css';
2
+ /**
3
+ * The props `BottomSheetWithImage` supplies to the two components it composes, at runtime through their
4
+ * `DefaultPropsContext` providers (see `BottomSheetWithImage.tsx`).
5
+ *
6
+ * They live in their own module, as plain data with no imports, because they are read from TWO sides: the
7
+ * component applies them, and the Code Connect template declares them as contextual defaults so a nested
8
+ * snippet stops repeating — or worse, overriding — what the wrapper already provides. A literal copied into
9
+ * the template would drift silently: change a value here and the published snippet would keep asserting the
10
+ * old one, with no build error and no render error. The bundler inlines this file into every template that
11
+ * imports it, which is the other reason it must stay free of runtime imports.
12
+ */
13
+ /** Applied to every NavBar in the subtree — the header lies over the image, transparent until it scrolls. */
14
+ const BOTTOM_SHEET_WITH_IMAGE_NAV_BAR_DEFAULTS = {
15
+ overlay: true,
16
+ snapScroll: false,
17
+ transparent: 'start',
18
+ };
19
+ /** Applied to the icons of every NavBar action group in the subtree. */
20
+ const BOTTOM_SHEET_WITH_IMAGE_NAV_BAR_ICON_DEFAULTS = {
21
+ borderRadius: 12,
22
+ };
23
+ /** Applied to whatever goes into the `title` prop. */
24
+ const BOTTOM_SHEET_WITH_IMAGE_TITLE_DEFAULTS = {
25
+ size: 'medium',
26
+ };
27
+
28
+ export { BOTTOM_SHEET_WITH_IMAGE_NAV_BAR_DEFAULTS, BOTTOM_SHEET_WITH_IMAGE_NAV_BAR_ICON_DEFAULTS, BOTTOM_SHEET_WITH_IMAGE_TITLE_DEFAULTS };
29
+ //# sourceMappingURL=withImageDefaults.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"withImageDefaults.js","sources":["src/withImageDefaults.ts"],"sourcesContent":["/**\n * The props `BottomSheetWithImage` supplies to the two components it composes, at runtime through their\n * `DefaultPropsContext` providers (see `BottomSheetWithImage.tsx`).\n *\n * They live in their own module, as plain data with no imports, because they are read from TWO sides: the\n * component applies them, and the Code Connect template declares them as contextual defaults so a nested\n * snippet stops repeating — or worse, overriding — what the wrapper already provides. A literal copied into\n * the template would drift silently: change a value here and the published snippet would keep asserting the\n * old one, with no build error and no render error. The bundler inlines this file into every template that\n * imports it, which is the other reason it must stay free of runtime imports.\n */\n\n/** Applied to every NavBar in the subtree — the header lies over the image, transparent until it scrolls. */\nexport const BOTTOM_SHEET_WITH_IMAGE_NAV_BAR_DEFAULTS = {\n overlay: true,\n snapScroll: false,\n transparent: 'start',\n} as const;\n\n/** Applied to the icons of every NavBar action group in the subtree. */\nexport const BOTTOM_SHEET_WITH_IMAGE_NAV_BAR_ICON_DEFAULTS = {\n borderRadius: 12,\n} as const;\n\n/** Applied to whatever goes into the `title` prop. */\nexport const BOTTOM_SHEET_WITH_IMAGE_TITLE_DEFAULTS = {\n size: 'medium',\n} as const;\n"],"names":[],"mappings":"AAAA;;;;;;;;;;AAUG;AAEH;AACa,MAAA,wCAAwC,GAAG;AACpD,IAAA,OAAO,EAAE,IAAI;AACb,IAAA,UAAU,EAAE,KAAK;AACjB,IAAA,WAAW,EAAE,OAAO;EACb;AAEX;AACa,MAAA,6CAA6C,GAAG;AACzD,IAAA,YAAY,EAAE,EAAE;EACT;AAEX;AACa,MAAA,sCAAsC,GAAG;AAClD,IAAA,IAAI,EAAE,QAAQ;;;;;"}
@@ -1,5 +0,0 @@
1
- import './index.css';
2
- var styles = {"flex-container":"magritte-flex-container___muHAx_9-4-25","flexContainer":"magritte-flex-container___muHAx_9-4-25","animation-timeout":"magritte-animation-timeout___yd-SZ_9-4-25","animationTimeout":"magritte-animation-timeout___yd-SZ_9-4-25","css-variables-container":"magritte-css-variables-container___jBCr9_9-4-25","cssVariablesContainer":"magritte-css-variables-container___jBCr9_9-4-25","appear-animation":"magritte-appear-animation___P84Ln_9-4-25","appearAnimation":"magritte-appear-animation___P84Ln_9-4-25","disappear-animation":"magritte-disappear-animation___Putks_9-4-25","disappearAnimation":"magritte-disappear-animation___Putks_9-4-25","grabber-transition-animation":"magritte-grabber-transition-animation___s3Oh4_9-4-25","grabberTransitionAnimation":"magritte-grabber-transition-animation___s3Oh4_9-4-25","height-transition-animation":"magritte-height-transition-animation___xNprr_9-4-25","heightTransitionAnimation":"magritte-height-transition-animation___xNprr_9-4-25","close-by-swipe-animation":"magritte-close-by-swipe-animation___wdezY_9-4-25","closeBySwipeAnimation":"magritte-close-by-swipe-animation___wdezY_9-4-25","swipe-cancel-animation":"magritte-swipe-cancel-animation___AhYj5_9-4-25","swipeCancelAnimation":"magritte-swipe-cancel-animation___AhYj5_9-4-25","overlay":"magritte-overlay___5a2U-_9-4-25","overlay-background":"magritte-overlay-background___8Sd4V_9-4-25","overlayBackground":"magritte-overlay-background___8Sd4V_9-4-25","overlay-background_visible":"magritte-overlay-background_visible___FOJgj_9-4-25","overlayBackgroundVisible":"magritte-overlay-background_visible___FOJgj_9-4-25","swipe-container":"magritte-swipe-container___sZ2n5_9-4-25","swipeContainer":"magritte-swipe-container___sZ2n5_9-4-25","grabber":"magritte-grabber___A7SB-_9-4-25","grabber_ensure-safe":"magritte-grabber_ensure-safe___DR-dV_9-4-25","grabberEnsureSafe":"magritte-grabber_ensure-safe___DR-dV_9-4-25","visual-container":"magritte-visual-container___-VSuY_9-4-25","visualContainer":"magritte-visual-container___-VSuY_9-4-25","visual-container_full-screen":"magritte-visual-container_full-screen___jCCBb_9-4-25","visualContainerFullScreen":"magritte-visual-container_full-screen___jCCBb_9-4-25","scroll-container":"magritte-scroll-container___4ngNY_9-4-25","scrollContainer":"magritte-scroll-container___4ngNY_9-4-25","scroll-container_with-top-padding":"magritte-scroll-container_with-top-padding___o60Dl_9-4-25","scrollContainerWithTopPadding":"magritte-scroll-container_with-top-padding___o60Dl_9-4-25","native-scroll-container":"magritte-native-scroll-container___JOlxE_9-4-25","nativeScrollContainer":"magritte-native-scroll-container___JOlxE_9-4-25","content":"magritte-content___1gAwP_9-4-25","content_full-screen":"magritte-content_full-screen___2SFaO_9-4-25","contentFullScreen":"magritte-content_full-screen___2SFaO_9-4-25","content_sized-full-screen":"magritte-content_sized-full-screen___45pa6_9-4-25","contentSizedFullScreen":"magritte-content_sized-full-screen___45pa6_9-4-25","content_with-paddings":"magritte-content_with-paddings___gIiAv_9-4-25","contentWithPaddings":"magritte-content_with-paddings___gIiAv_9-4-25","content_with-top-padding":"magritte-content_with-top-padding___2e8N1_9-4-25","contentWithTopPadding":"magritte-content_with-top-padding___2e8N1_9-4-25","footer":"magritte-footer___RWslT_9-4-25","footer-with-padding":"magritte-footer-with-padding___KwkhC_9-4-25","footerWithPadding":"magritte-footer-with-padding___KwkhC_9-4-25","divider":"magritte-divider___0F8hh_9-4-25","divider_visible":"magritte-divider_visible___pAWZM_9-4-25","dividerVisible":"magritte-divider_visible___pAWZM_9-4-25","content-overlay":"magritte-content-overlay___HAyzL_9-4-25","contentOverlay":"magritte-content-overlay___HAyzL_9-4-25","no-caret":"magritte-no-caret___ewcMD_9-4-25","noCaret":"magritte-no-caret___ewcMD_9-4-25","iframe-wrapper":"magritte-iframe-wrapper___gBCL5_9-4-25","iframeWrapper":"magritte-iframe-wrapper___gBCL5_9-4-25","iframe-events-interceptor":"magritte-iframe-events-interceptor___FTW-8_9-4-25","iframeEventsInterceptor":"magritte-iframe-events-interceptor___FTW-8_9-4-25","grow-limiter":"magritte-grow-limiter___ANaBL_9-4-25","growLimiter":"magritte-grow-limiter___ANaBL_9-4-25","header-wrapper":"magritte-header-wrapper___LdLOU_9-4-25","headerWrapper":"magritte-header-wrapper___LdLOU_9-4-25"};
3
-
4
- export { styles as s };
5
- //# sourceMappingURL=bottom-sheet-CCIz7agd.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"bottom-sheet-CCIz7agd.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;"}