@hh.ru/magritte-ui-bottom-sheet 7.0.6 → 7.0.8

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
@@ -18,7 +18,7 @@ import { Divider } from '@hh.ru/magritte-ui-divider';
18
18
  import { Layer } from '@hh.ru/magritte-ui-layer';
19
19
  import { isNavigationBarComponent, NavigationBarComponent } from '@hh.ru/magritte-ui-navigation-bar';
20
20
  import { isValidTreeSelectorWrapper } from '@hh.ru/magritte-ui-tree-selector';
21
- import { s as styles } from './bottom-sheet-DMQ_Aram.js';
21
+ import { s as styles } from './bottom-sheet-DhxXZpMB.js';
22
22
 
23
23
  const CSS_VAR_ENTER_ANIMATION_DURATION = '--enter-animation-duration';
24
24
  const CSS_VAR_EXIT_ANIMATION_DURATION = '--exit-animation-duration';
@@ -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-DMQ_Aram.js';
3
+ import { s as styles } from './bottom-sheet-DhxXZpMB.js';
4
4
 
5
5
  const BottomSheetFooter = ({ children }) => (jsx("div", { className: styles.footerWithPadding, children: children }));
6
6
 
@@ -0,0 +1 @@
1
+ export declare const BottomSheetIFrameAdapter: React.FC<React.PropsWithChildren>;
@@ -0,0 +1,24 @@
1
+ import './index.css';
2
+ import { jsxs, jsx } from 'react/jsx-runtime';
3
+ import { useRef, useEffect } from 'react';
4
+ import { s as styles } from './bottom-sheet-DhxXZpMB.js';
5
+
6
+ const BottomSheetIFrameAdapter = ({ children }) => {
7
+ const touchEventsInterceptorRef = useRef(null);
8
+ useEffect(() => {
9
+ const touchEventsInterceptor = touchEventsInterceptorRef.current;
10
+ const handleTouchStart = (event) => {
11
+ const target = event.target;
12
+ target.style.pointerEvents = 'none';
13
+ setTimeout(() => {
14
+ target.style.pointerEvents = 'auto';
15
+ }, 300);
16
+ };
17
+ touchEventsInterceptor?.addEventListener('touchstart', handleTouchStart);
18
+ return () => touchEventsInterceptor?.removeEventListener('touchstart', handleTouchStart);
19
+ }, []);
20
+ return (jsxs("div", { className: styles.iframeWrapper, children: [children, jsx("div", { className: styles.iframeEventsInterceptor, ref: touchEventsInterceptorRef })] }));
21
+ };
22
+
23
+ export { BottomSheetIFrameAdapter };
24
+ //# sourceMappingURL=BottomSheetIFrameAdapter.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"BottomSheetIFrameAdapter.js","sources":["../src/BottomSheetIFrameAdapter.tsx"],"sourcesContent":["import { useEffect, useRef } from 'react';\n\nimport styles from './bottom-sheet.less';\n\nexport const BottomSheetIFrameAdapter: React.FC<React.PropsWithChildren> = ({ children }) => {\n const touchEventsInterceptorRef = useRef<HTMLDivElement>(null);\n\n useEffect(() => {\n const touchEventsInterceptor = touchEventsInterceptorRef.current;\n\n const handleTouchStart = (event: TouchEvent) => {\n const target = event.target as HTMLElement;\n target.style.pointerEvents = 'none';\n setTimeout(() => {\n target.style.pointerEvents = 'auto';\n }, 300);\n };\n\n touchEventsInterceptor?.addEventListener('touchstart', handleTouchStart);\n return () => touchEventsInterceptor?.removeEventListener('touchstart', handleTouchStart);\n }, []);\n\n return (\n <div className={styles.iframeWrapper}>\n {children}\n <div className={styles.iframeEventsInterceptor} ref={touchEventsInterceptorRef} />\n </div>\n );\n};\n"],"names":["_jsxs","_jsx"],"mappings":";;;;MAIa,wBAAwB,GAAsC,CAAC,EAAE,QAAQ,EAAE,KAAI;AACxF,IAAA,MAAM,yBAAyB,GAAG,MAAM,CAAiB,IAAI,CAAC,CAAC;IAE/D,SAAS,CAAC,MAAK;AACX,QAAA,MAAM,sBAAsB,GAAG,yBAAyB,CAAC,OAAO,CAAC;AAEjE,QAAA,MAAM,gBAAgB,GAAG,CAAC,KAAiB,KAAI;AAC3C,YAAA,MAAM,MAAM,GAAG,KAAK,CAAC,MAAqB,CAAC;AAC3C,YAAA,MAAM,CAAC,KAAK,CAAC,aAAa,GAAG,MAAM,CAAC;YACpC,UAAU,CAAC,MAAK;AACZ,gBAAA,MAAM,CAAC,KAAK,CAAC,aAAa,GAAG,MAAM,CAAC;aACvC,EAAE,GAAG,CAAC,CAAC;AACZ,SAAC,CAAC;AAEF,QAAA,sBAAsB,EAAE,gBAAgB,CAAC,YAAY,EAAE,gBAAgB,CAAC,CAAC;QACzE,OAAO,MAAM,sBAAsB,EAAE,mBAAmB,CAAC,YAAY,EAAE,gBAAgB,CAAC,CAAC;KAC5F,EAAE,EAAE,CAAC,CAAC;IAEP,QACIA,cAAK,SAAS,EAAE,MAAM,CAAC,aAAa,EAC/B,QAAA,EAAA,CAAA,QAAQ,EACTC,GAAA,CAAA,KAAA,EAAA,EAAK,SAAS,EAAE,MAAM,CAAC,uBAAuB,EAAE,GAAG,EAAE,yBAAyB,EAAA,CAAI,CAChF,EAAA,CAAA,EACR;AACN;;;;"}
@@ -44,10 +44,11 @@ const applyInterceptor = (node, func) => {
44
44
  let children;
45
45
  ((props) => {
46
46
  if (props.children) {
47
+ const childrenArr = Children.toArray(props.children);
47
48
  children =
48
- props.children.length === 1
49
- ? applyInterceptor(Children.only(props.children), func)
50
- : Children.map(props.children, (child) => applyInterceptor(child, func));
49
+ childrenArr.length === 1
50
+ ? applyInterceptor(childrenArr[0], func)
51
+ : childrenArr.map((child) => applyInterceptor(child, func));
51
52
  }
52
53
  })(node.props);
53
54
  return cloneElement(func(node), {}, children);
@@ -1 +1 @@
1
- {"version":3,"file":"ClickInterceptor.js","sources":["../src/ClickInterceptor.tsx"],"sourcesContent":["import {\n Children,\n DOMAttributes,\n FC,\n Fragment,\n MouseEvent,\n ReactElement,\n ReactNode,\n cloneElement,\n isValidElement,\n memo,\n} from 'react';\n\ntype InterceptedProps = Pick<\n DOMAttributes<HTMLElement>,\n 'onClick' | 'onPointerDown' | 'onPointerCancel' | 'onPointerLeave' | 'onPointerUp'\n>;\n\nconst CLICK_DISTANCE_THRESHOLD_PX = 24;\n\nconst interceptClick = (node: ReactElement<InterceptedProps>) => {\n const props: InterceptedProps = {};\n\n if (node.props.onClick) {\n let click = false;\n let coordinates: { x: number; y: number } | null = null;\n props.onClick = () => {}; // eslint-disable-line @typescript-eslint/no-empty-function\n props.onPointerDown = (event) => {\n click = true;\n coordinates = { x: event.pageX, y: event.pageY };\n node.props.onPointerDown?.(event);\n };\n props.onPointerCancel = (event) => {\n click = false;\n node.props.onPointerCancel?.(event);\n };\n props.onPointerLeave = (event) => {\n click = false;\n node.props.onPointerLeave?.(event);\n };\n props.onPointerUp = (event) => {\n if (click) {\n if (\n coordinates !== null &&\n Math.pow(event.pageX - coordinates.x, 2) + Math.pow(event.pageY - coordinates.y, 2) <=\n Math.pow(CLICK_DISTANCE_THRESHOLD_PX, 2)\n ) {\n node.props.onClick?.(event as MouseEvent<HTMLElement>);\n }\n click = false;\n coordinates = null;\n }\n node.props.onPointerUp?.(event);\n };\n }\n\n return cloneElement(node, props);\n};\n\nconst applyInterceptor = (node: ReactNode, func: (node: ReactElement) => ReactElement): ReactElement => {\n if (!isValidElement(node)) {\n return <Fragment>{node}</Fragment>;\n }\n\n let children;\n ((props) => {\n if (props.children) {\n children =\n props.children.length === 1\n ? applyInterceptor(Children.only(props.children), func)\n : Children.map(props.children, (child) => applyInterceptor(child, func));\n }\n })(node.props as { children: ReactNode[] });\n\n return cloneElement(func(node), {}, children);\n};\n\nexport interface ClickInterceptorProps {\n children: ReactNode;\n}\n\nexport const ClickInterceptor: FC<ClickInterceptorProps> = memo(({ children }) => {\n return applyInterceptor(children, interceptClick);\n});\n\nClickInterceptor.displayName = 'ClickInterceptor';\n"],"names":["_jsx"],"mappings":";;;AAkBA,MAAM,2BAA2B,GAAG,EAAE,CAAC;AAEvC,MAAM,cAAc,GAAG,CAAC,IAAoC,KAAI;IAC5D,MAAM,KAAK,GAAqB,EAAE,CAAC;AAEnC,IAAA,IAAI,IAAI,CAAC,KAAK,CAAC,OAAO,EAAE;QACpB,IAAI,KAAK,GAAG,KAAK,CAAC;QAClB,IAAI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AC;KACL;AAED,IAAA,OAAO,YAAY,CAAC,IAAI,EAAE,KAAK,CAAC,CAAC;AACrC,CAAC,CAAC;AAEF,MAAM,gBAAgB,GAAG,CAAC,IAAe,EAAE,IAA0C,KAAkB;AACnG,IAAA,IAAI,CAAC,cAAc,CAAC,IAAI,CAAC,EAAE;AACvB,QAAA,OAAOA,GAAC,CAAA,QAAQ,EAAE,EAAA,QAAA,EAAA,IAAI,GAAY,CAAC;KACtC;AAED,IAAA,IAAI,QAAQ,CAAC;IACb,CAAC,CAAC,KAAK,KAAI;AACP,QAAA,IAAI,KAAK,CAAC,QAAQ,EAAE;YAChB,QAAQ;AACJ,gBAAA,KAAK,CAAC,QAAQ,CAAC,MAAM,KAAK,CAAC;AACvB,sBAAE,gBAAgB,CAAC,QAAQ,CAAC,IAAI,CAAC,KAAK,CAAC,QAAQ,CAAC,EAAE,IAAI,CAAC;sBACrD,QAAQ,CAAC,GAAG,CAAC,KAAK,CAAC,QAAQ,EAAE,CAAC,KAAK,KAAK,gBAAgB,CAAC,KAAK,EAAE,IAAI,CAAC,CAAC,CAAC;SACpF;AACL,KAAC,EAAE,IAAI,CAAC,KAAkC,CAAC,CAAC;IAE5C,OAAO,YAAY,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,EAAE,EAAE,QAAQ,CAAC,CAAC;AAClD,CAAC,CAAC;AAMW,MAAA,gBAAgB,GAA8B,IAAI,CAAC,CAAC,EAAE,QAAQ,EAAE,KAAI;AAC7E,IAAA,OAAO,gBAAgB,CAAC,QAAQ,EAAE,cAAc,CAAC,CAAC;AACtD,CAAC,EAAE;AAEH,gBAAgB,CAAC,WAAW,GAAG,kBAAkB;;;;"}
1
+ {"version":3,"file":"ClickInterceptor.js","sources":["../src/ClickInterceptor.tsx"],"sourcesContent":["import {\n Children,\n DOMAttributes,\n FC,\n Fragment,\n MouseEvent,\n ReactElement,\n ReactNode,\n cloneElement,\n isValidElement,\n memo,\n} from 'react';\n\ntype InterceptedProps = Pick<\n DOMAttributes<HTMLElement>,\n 'onClick' | 'onPointerDown' | 'onPointerCancel' | 'onPointerLeave' | 'onPointerUp'\n>;\n\nconst CLICK_DISTANCE_THRESHOLD_PX = 24;\n\nconst interceptClick = (node: ReactElement<InterceptedProps>) => {\n const props: InterceptedProps = {};\n\n if (node.props.onClick) {\n let click = false;\n let coordinates: { x: number; y: number } | null = null;\n props.onClick = () => {}; // eslint-disable-line @typescript-eslint/no-empty-function\n props.onPointerDown = (event) => {\n click = true;\n coordinates = { x: event.pageX, y: event.pageY };\n node.props.onPointerDown?.(event);\n };\n props.onPointerCancel = (event) => {\n click = false;\n node.props.onPointerCancel?.(event);\n };\n props.onPointerLeave = (event) => {\n click = false;\n node.props.onPointerLeave?.(event);\n };\n props.onPointerUp = (event) => {\n if (click) {\n if (\n coordinates !== null &&\n Math.pow(event.pageX - coordinates.x, 2) + Math.pow(event.pageY - coordinates.y, 2) <=\n Math.pow(CLICK_DISTANCE_THRESHOLD_PX, 2)\n ) {\n node.props.onClick?.(event as MouseEvent<HTMLElement>);\n }\n click = false;\n coordinates = null;\n }\n node.props.onPointerUp?.(event);\n };\n }\n\n return cloneElement(node, props);\n};\n\nconst applyInterceptor = (node: ReactNode, func: (node: ReactElement) => ReactElement): ReactElement => {\n if (!isValidElement(node)) {\n return <Fragment>{node}</Fragment>;\n }\n\n let children;\n ((props) => {\n if (props.children) {\n const childrenArr = Children.toArray(props.children);\n children =\n childrenArr.length === 1\n ? applyInterceptor(childrenArr[0], func)\n : childrenArr.map((child) => applyInterceptor(child, func));\n }\n })(node.props as { children: ReactNode[] });\n\n return cloneElement(func(node), {}, children);\n};\n\nexport interface ClickInterceptorProps {\n children: ReactNode;\n}\n\nexport const ClickInterceptor: FC<ClickInterceptorProps> = memo(({ children }) => {\n return applyInterceptor(children, interceptClick);\n});\n\nClickInterceptor.displayName = 'ClickInterceptor';\n"],"names":["_jsx"],"mappings":";;;AAkBA,MAAM,2BAA2B,GAAG,EAAE,CAAC;AAEvC,MAAM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1,5 @@
1
+ import './index.css';
2
+ var styles = {"flex-container":"magritte-flex-container___muHAx_7-0-8","flexContainer":"magritte-flex-container___muHAx_7-0-8","animation-timeout":"magritte-animation-timeout___yd-SZ_7-0-8","animationTimeout":"magritte-animation-timeout___yd-SZ_7-0-8","css-variables-container":"magritte-css-variables-container___jBCr9_7-0-8","cssVariablesContainer":"magritte-css-variables-container___jBCr9_7-0-8","appear-animation":"magritte-appear-animation___P84Ln_7-0-8","appearAnimation":"magritte-appear-animation___P84Ln_7-0-8","disappear-animation":"magritte-disappear-animation___Putks_7-0-8","disappearAnimation":"magritte-disappear-animation___Putks_7-0-8","grabber-transition-animation":"magritte-grabber-transition-animation___s3Oh4_7-0-8","grabberTransitionAnimation":"magritte-grabber-transition-animation___s3Oh4_7-0-8","height-transition-animation":"magritte-height-transition-animation___xNprr_7-0-8","heightTransitionAnimation":"magritte-height-transition-animation___xNprr_7-0-8","close-by-swipe-animation":"magritte-close-by-swipe-animation___wdezY_7-0-8","closeBySwipeAnimation":"magritte-close-by-swipe-animation___wdezY_7-0-8","swipe-cancel-animation":"magritte-swipe-cancel-animation___AhYj5_7-0-8","swipeCancelAnimation":"magritte-swipe-cancel-animation___AhYj5_7-0-8","overlay":"magritte-overlay___5a2U-_7-0-8","overlay-background":"magritte-overlay-background___8Sd4V_7-0-8","overlayBackground":"magritte-overlay-background___8Sd4V_7-0-8","overlay-background_visible":"magritte-overlay-background_visible___FOJgj_7-0-8","overlayBackgroundVisible":"magritte-overlay-background_visible___FOJgj_7-0-8","swipe-container":"magritte-swipe-container___sZ2n5_7-0-8","swipeContainer":"magritte-swipe-container___sZ2n5_7-0-8","grabber":"magritte-grabber___A7SB-_7-0-8","grabber_ensure-safe":"magritte-grabber_ensure-safe___DR-dV_7-0-8","grabberEnsureSafe":"magritte-grabber_ensure-safe___DR-dV_7-0-8","visual-container":"magritte-visual-container___-VSuY_7-0-8","visualContainer":"magritte-visual-container___-VSuY_7-0-8","visual-container_full-screen":"magritte-visual-container_full-screen___jCCBb_7-0-8","visualContainerFullScreen":"magritte-visual-container_full-screen___jCCBb_7-0-8","scroll-container":"magritte-scroll-container___4ngNY_7-0-8","scrollContainer":"magritte-scroll-container___4ngNY_7-0-8","native-scroll-container":"magritte-native-scroll-container___JOlxE_7-0-8","nativeScrollContainer":"magritte-native-scroll-container___JOlxE_7-0-8","content":"magritte-content___1gAwP_7-0-8","content_full-screen":"magritte-content_full-screen___2SFaO_7-0-8","contentFullScreen":"magritte-content_full-screen___2SFaO_7-0-8","content_sized-full-screen":"magritte-content_sized-full-screen___45pa6_7-0-8","contentSizedFullScreen":"magritte-content_sized-full-screen___45pa6_7-0-8","content_with-paddings":"magritte-content_with-paddings___gIiAv_7-0-8","contentWithPaddings":"magritte-content_with-paddings___gIiAv_7-0-8","footer":"magritte-footer___RWslT_7-0-8","footer-with-padding":"magritte-footer-with-padding___KwkhC_7-0-8","footerWithPadding":"magritte-footer-with-padding___KwkhC_7-0-8","divider":"magritte-divider___0F8hh_7-0-8","divider_visible":"magritte-divider_visible___pAWZM_7-0-8","dividerVisible":"magritte-divider_visible___pAWZM_7-0-8","content-overlay":"magritte-content-overlay___HAyzL_7-0-8","contentOverlay":"magritte-content-overlay___HAyzL_7-0-8","no-caret":"magritte-no-caret___ewcMD_7-0-8","noCaret":"magritte-no-caret___ewcMD_7-0-8","iframe-wrapper":"magritte-iframe-wrapper___gBCL5_7-0-8","iframeWrapper":"magritte-iframe-wrapper___gBCL5_7-0-8","iframe-events-interceptor":"magritte-iframe-events-interceptor___FTW-8_7-0-8","iframeEventsInterceptor":"magritte-iframe-events-interceptor___FTW-8_7-0-8"};
3
+
4
+ export { styles as s };
5
+ //# sourceMappingURL=bottom-sheet-DhxXZpMB.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"bottom-sheet-DhxXZpMB.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;"}
package/index.css CHANGED
@@ -19,13 +19,13 @@
19
19
  --magritte-color-component-bottom-sheet-grabber-content-v21-3-2:#c6c6c68f;
20
20
  --magritte-color-component-_overlay-background-content-v21-3-2:#26262699;
21
21
  }
22
- .magritte-flex-container___muHAx_7-0-6{
22
+ .magritte-flex-container___muHAx_7-0-8{
23
23
  display:flex;
24
24
  flex-direction:column;
25
25
  align-items:stretch;
26
26
  }
27
- .magritte-animation-timeout___yd-SZ_7-0-6,
28
- .magritte-css-variables-container___jBCr9_7-0-6{
27
+ .magritte-animation-timeout___yd-SZ_7-0-8,
28
+ .magritte-css-variables-container___jBCr9_7-0-8{
29
29
  --virtual-keyboard-top-offset:0px;
30
30
  --virtual-keyboard-bottom-offset:0px;
31
31
  --enter-animation-duration:0ms;
@@ -35,8 +35,8 @@
35
35
  --swipe-cancel-transition-duration:0ms;
36
36
  }
37
37
  @media (prefers-reduced-motion: no-preference){
38
- .magritte-animation-timeout___yd-SZ_7-0-6,
39
- .magritte-css-variables-container___jBCr9_7-0-6{
38
+ .magritte-animation-timeout___yd-SZ_7-0-8,
39
+ .magritte-css-variables-container___jBCr9_7-0-8{
40
40
  --enter-animation-duration:var(--magritte-semantic-animation-ease-in-out-300-duration-v21-3-2);
41
41
  --exit-animation-duration:var(--magritte-semantic-animation-ease-in-out-200-duration-v21-3-2);
42
42
  --grabber-animation-duration:var(--magritte-semantic-animation-ease-in-out-200-duration-v21-3-2);
@@ -44,52 +44,52 @@
44
44
  --swipe-cancel-transition-duration:var(--magritte-semantic-animation-ease-in-out-100-duration-v21-3-2);
45
45
  }
46
46
  }
47
- .magritte-appear-animation___P84Ln_7-0-6{
47
+ .magritte-appear-animation___P84Ln_7-0-8{
48
48
  transition-property:transform opacity;
49
49
  transition-duration:var(--enter-animation-duration);
50
50
  transition-timing-function:var(--magritte-semantic-animation-ease-in-out-300-timing-function-v21-3-2);
51
51
  }
52
- .magritte-disappear-animation___Putks_7-0-6{
52
+ .magritte-disappear-animation___Putks_7-0-8{
53
53
  transition-property:transform opacity;
54
54
  transition-duration:var(--exit-animation-duration);
55
55
  transition-timing-function:var(--magritte-semantic-animation-ease-in-out-200-timing-function-v21-3-2);
56
56
  }
57
- .magritte-grabber-transition-animation___s3Oh4_7-0-6::after{
57
+ .magritte-grabber-transition-animation___s3Oh4_7-0-8::after{
58
58
  transition-property:transform;
59
59
  transition-duration:var(--grabber-animation-duration);
60
60
  transition-timing-function:var(--magritte-semantic-animation-ease-in-out-200-timing-function-v21-3-2);
61
61
  }
62
- .magritte-height-transition-animation___xNprr_7-0-6{
62
+ .magritte-height-transition-animation___xNprr_7-0-8{
63
63
  transition-property:height;
64
64
  transition-duration:var(--height-transition-duration);
65
65
  transition-timing-function:var(--magritte-semantic-animation-ease-in-out-400-timing-function-v21-3-2);
66
66
  }
67
- .magritte-close-by-swipe-animation___wdezY_7-0-6{
67
+ .magritte-close-by-swipe-animation___wdezY_7-0-8{
68
68
  transition-property:transform;
69
69
  transition-duration:var(--exit-animation-duration);
70
70
  transition-timing-function:linear;
71
71
  }
72
- .magritte-swipe-cancel-animation___AhYj5_7-0-6{
72
+ .magritte-swipe-cancel-animation___AhYj5_7-0-8{
73
73
  transition-property:transform;
74
74
  transition-duration:var(--swipe-cancel-transition-duration);
75
75
  transition-timing-function:var(--magritte-semantic-animation-ease-in-out-100-duration-v21-3-2);
76
76
  }
77
- .magritte-overlay___5a2U-_7-0-6{
77
+ .magritte-overlay___5a2U-_7-0-8{
78
78
  pointer-events:none;
79
79
  position:fixed;
80
80
  inset:0;
81
81
  }
82
- .magritte-overlay-background___8Sd4V_7-0-6{
82
+ .magritte-overlay-background___8Sd4V_7-0-8{
83
83
  position:absolute;
84
84
  inset:0;
85
85
  will-change:opacity;
86
86
  transform:translate3d(0, 0, 0);
87
87
  }
88
- .magritte-overlay-background_visible___FOJgj_7-0-6{
88
+ .magritte-overlay-background_visible___FOJgj_7-0-8{
89
89
  pointer-events:initial;
90
90
  background-color:var(--magritte-color-component-_overlay-background-content-v21-3-2);
91
91
  }
92
- .magritte-swipe-container___sZ2n5_7-0-6{
92
+ .magritte-swipe-container___sZ2n5_7-0-8{
93
93
  display:flex;
94
94
  flex-direction:column;
95
95
  align-items:stretch;
@@ -99,11 +99,11 @@
99
99
  will-change:transform;
100
100
  transform:translate3d(0, 0, 0);
101
101
  }
102
- .magritte-grabber___A7SB-_7-0-6{
102
+ .magritte-grabber___A7SB-_7-0-8{
103
103
  flex:0 0 20px;
104
104
  position:relative;
105
105
  }
106
- .magritte-grabber___A7SB-_7-0-6::after{
106
+ .magritte-grabber___A7SB-_7-0-8::after{
107
107
  content:'';
108
108
  position:absolute;
109
109
  top:8px;
@@ -114,10 +114,10 @@
114
114
  border-radius:var(--magritte-static-border-radius-50-v21-3-2);
115
115
  z-index:3;
116
116
  }
117
- .magritte-grabber_ensure-safe___DR-dV_7-0-6::after{
117
+ .magritte-grabber_ensure-safe___DR-dV_7-0-8::after{
118
118
  transform:translateY(20px);
119
119
  }
120
- .magritte-visual-container___-VSuY_7-0-6{
120
+ .magritte-visual-container___-VSuY_7-0-8{
121
121
  display:flex;
122
122
  flex-direction:column;
123
123
  align-items:stretch;
@@ -130,11 +130,11 @@
130
130
  overflow:clip;
131
131
  user-select:text;
132
132
  }
133
- .magritte-visual-container_full-screen___jCCBb_7-0-6{
133
+ .magritte-visual-container_full-screen___jCCBb_7-0-8{
134
134
  flex:1 1 auto;
135
135
  min-height:1px;
136
136
  }
137
- .magritte-scroll-container___4ngNY_7-0-6{
137
+ .magritte-scroll-container___4ngNY_7-0-8{
138
138
  --magritte-ui-navigation-bar-background-override:var(--magritte-color-component-bottom-sheet-background-content-v21-3-2);
139
139
  --magritte-ui-navigation-bar-top-padding-override:16px;
140
140
  display:flex;
@@ -144,14 +144,14 @@
144
144
  min-height:1px;
145
145
  z-index:1;
146
146
  }
147
- .magritte-native-scroll-container___JOlxE_7-0-6{
147
+ .magritte-native-scroll-container___JOlxE_7-0-8{
148
148
  overflow:scroll;
149
149
  scrollbar-width:none;
150
150
  }
151
- .magritte-native-scroll-container___JOlxE_7-0-6::-webkit-scrollbar{
151
+ .magritte-native-scroll-container___JOlxE_7-0-8::-webkit-scrollbar{
152
152
  display:none;
153
153
  }
154
- .magritte-content___1gAwP_7-0-6{
154
+ .magritte-content___1gAwP_7-0-8{
155
155
  display:flex;
156
156
  flex-direction:column;
157
157
  align-items:stretch;
@@ -160,41 +160,48 @@
160
160
  will-change:transform;
161
161
  transform:translate3d(0, 0, 0);
162
162
  }
163
- .magritte-content_full-screen___2SFaO_7-0-6{
163
+ .magritte-content_full-screen___2SFaO_7-0-8{
164
164
  flex:1 0 auto;
165
165
  }
166
- .magritte-content_sized-full-screen___45pa6_7-0-6{
166
+ .magritte-content_sized-full-screen___45pa6_7-0-8{
167
167
  flex:1 1 auto;
168
168
  min-height:1px;
169
169
  }
170
- .magritte-content_with-paddings___gIiAv_7-0-6{
170
+ .magritte-content_with-paddings___gIiAv_7-0-8{
171
171
  padding:16px 16px 0;
172
172
  }
173
- .magritte-footer___RWslT_7-0-6{
173
+ .magritte-footer___RWslT_7-0-8{
174
174
  flex:0 0 auto;
175
175
  background-color:var(--magritte-color-component-bottom-sheet-background-content-v21-3-2);
176
176
  z-index:2;
177
177
  will-change:transform;
178
178
  transform:translate3d(0, 0, 0);
179
179
  }
180
- .magritte-footer-with-padding___KwkhC_7-0-6{
180
+ .magritte-footer-with-padding___KwkhC_7-0-8{
181
181
  display:flex;
182
182
  flex-direction:column;
183
183
  gap:12px;
184
184
  padding:16px;
185
185
  }
186
- .magritte-divider___0F8hh_7-0-6{
186
+ .magritte-divider___0F8hh_7-0-8{
187
187
  visibility:hidden;
188
188
  }
189
- .magritte-divider_visible___pAWZM_7-0-6{
189
+ .magritte-divider_visible___pAWZM_7-0-8{
190
190
  visibility:visible;
191
191
  }
192
- .magritte-content-overlay___HAyzL_7-0-6{
192
+ .magritte-content-overlay___HAyzL_7-0-8{
193
193
  pointer-events:none;
194
194
  position:absolute;
195
195
  inset:0;
196
196
  }
197
- .magritte-no-caret___ewcMD_7-0-6{
197
+ .magritte-no-caret___ewcMD_7-0-8{
198
198
  --magritte-ui-input-caret-color-override:transparent;
199
199
  --magritte-ui-textarea-caret-color-override:transparent;
200
200
  }
201
+ .magritte-iframe-wrapper___gBCL5_7-0-8{
202
+ position:relative;
203
+ }
204
+ .magritte-iframe-events-interceptor___FTW-8_7-0-8{
205
+ position:absolute;
206
+ inset:0;
207
+ }
package/index.d.ts CHANGED
@@ -1,5 +1,6 @@
1
1
  export { BottomSheet } from '@hh.ru/magritte-ui-bottom-sheet/BottomSheet';
2
2
  export { BottomSheetContentOverlay } from '@hh.ru/magritte-ui-bottom-sheet/BottomSheetContentOverlay';
3
3
  export { BottomSheetFooter } from '@hh.ru/magritte-ui-bottom-sheet/BottomSheetFooter';
4
+ export { BottomSheetIFrameAdapter } from '@hh.ru/magritte-ui-bottom-sheet/BottomSheetIFrameAdapter';
4
5
  export * from '@hh.ru/magritte-ui-bottom-sheet/types';
5
6
  export * from '@hh.ru/magritte-ui-theme-provider';
package/index.js CHANGED
@@ -2,6 +2,7 @@ import './index.css';
2
2
  export { BottomSheet } from './BottomSheet.js';
3
3
  export { BottomSheetContentOverlay } from './BottomSheetContentOverlay.js';
4
4
  export { BottomSheetFooter } from './BottomSheetFooter.js';
5
+ export { BottomSheetIFrameAdapter } from './BottomSheetIFrameAdapter.js';
5
6
  export * from '@hh.ru/magritte-ui-theme-provider';
6
7
  import 'react/jsx-runtime';
7
8
  import 'react';
@@ -22,5 +23,5 @@ import '@hh.ru/magritte-ui-divider';
22
23
  import '@hh.ru/magritte-ui-layer';
23
24
  import '@hh.ru/magritte-ui-navigation-bar';
24
25
  import '@hh.ru/magritte-ui-tree-selector';
25
- import './bottom-sheet-DMQ_Aram.js';
26
+ import './bottom-sheet-DhxXZpMB.js';
26
27
  //# 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": "7.0.6",
3
+ "version": "7.0.8",
4
4
  "main": "index.js",
5
5
  "types": "index.d.ts",
6
6
  "sideEffects": [
@@ -47,5 +47,5 @@
47
47
  "publishConfig": {
48
48
  "access": "public"
49
49
  },
50
- "gitHead": "d77d66dde37efbf4f169985c1ed243ba9bbdc67e"
50
+ "gitHead": "327d1626220753aa98056b4b14719e454ba8d983"
51
51
  }
@@ -1,5 +0,0 @@
1
- import './index.css';
2
- var styles = {"flex-container":"magritte-flex-container___muHAx_7-0-6","flexContainer":"magritte-flex-container___muHAx_7-0-6","animation-timeout":"magritte-animation-timeout___yd-SZ_7-0-6","animationTimeout":"magritte-animation-timeout___yd-SZ_7-0-6","css-variables-container":"magritte-css-variables-container___jBCr9_7-0-6","cssVariablesContainer":"magritte-css-variables-container___jBCr9_7-0-6","appear-animation":"magritte-appear-animation___P84Ln_7-0-6","appearAnimation":"magritte-appear-animation___P84Ln_7-0-6","disappear-animation":"magritte-disappear-animation___Putks_7-0-6","disappearAnimation":"magritte-disappear-animation___Putks_7-0-6","grabber-transition-animation":"magritte-grabber-transition-animation___s3Oh4_7-0-6","grabberTransitionAnimation":"magritte-grabber-transition-animation___s3Oh4_7-0-6","height-transition-animation":"magritte-height-transition-animation___xNprr_7-0-6","heightTransitionAnimation":"magritte-height-transition-animation___xNprr_7-0-6","close-by-swipe-animation":"magritte-close-by-swipe-animation___wdezY_7-0-6","closeBySwipeAnimation":"magritte-close-by-swipe-animation___wdezY_7-0-6","swipe-cancel-animation":"magritte-swipe-cancel-animation___AhYj5_7-0-6","swipeCancelAnimation":"magritte-swipe-cancel-animation___AhYj5_7-0-6","overlay":"magritte-overlay___5a2U-_7-0-6","overlay-background":"magritte-overlay-background___8Sd4V_7-0-6","overlayBackground":"magritte-overlay-background___8Sd4V_7-0-6","overlay-background_visible":"magritte-overlay-background_visible___FOJgj_7-0-6","overlayBackgroundVisible":"magritte-overlay-background_visible___FOJgj_7-0-6","swipe-container":"magritte-swipe-container___sZ2n5_7-0-6","swipeContainer":"magritte-swipe-container___sZ2n5_7-0-6","grabber":"magritte-grabber___A7SB-_7-0-6","grabber_ensure-safe":"magritte-grabber_ensure-safe___DR-dV_7-0-6","grabberEnsureSafe":"magritte-grabber_ensure-safe___DR-dV_7-0-6","visual-container":"magritte-visual-container___-VSuY_7-0-6","visualContainer":"magritte-visual-container___-VSuY_7-0-6","visual-container_full-screen":"magritte-visual-container_full-screen___jCCBb_7-0-6","visualContainerFullScreen":"magritte-visual-container_full-screen___jCCBb_7-0-6","scroll-container":"magritte-scroll-container___4ngNY_7-0-6","scrollContainer":"magritte-scroll-container___4ngNY_7-0-6","native-scroll-container":"magritte-native-scroll-container___JOlxE_7-0-6","nativeScrollContainer":"magritte-native-scroll-container___JOlxE_7-0-6","content":"magritte-content___1gAwP_7-0-6","content_full-screen":"magritte-content_full-screen___2SFaO_7-0-6","contentFullScreen":"magritte-content_full-screen___2SFaO_7-0-6","content_sized-full-screen":"magritte-content_sized-full-screen___45pa6_7-0-6","contentSizedFullScreen":"magritte-content_sized-full-screen___45pa6_7-0-6","content_with-paddings":"magritte-content_with-paddings___gIiAv_7-0-6","contentWithPaddings":"magritte-content_with-paddings___gIiAv_7-0-6","footer":"magritte-footer___RWslT_7-0-6","footer-with-padding":"magritte-footer-with-padding___KwkhC_7-0-6","footerWithPadding":"magritte-footer-with-padding___KwkhC_7-0-6","divider":"magritte-divider___0F8hh_7-0-6","divider_visible":"magritte-divider_visible___pAWZM_7-0-6","dividerVisible":"magritte-divider_visible___pAWZM_7-0-6","content-overlay":"magritte-content-overlay___HAyzL_7-0-6","contentOverlay":"magritte-content-overlay___HAyzL_7-0-6","no-caret":"magritte-no-caret___ewcMD_7-0-6","noCaret":"magritte-no-caret___ewcMD_7-0-6"};
3
-
4
- export { styles as s };
5
- //# sourceMappingURL=bottom-sheet-DMQ_Aram.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"bottom-sheet-DMQ_Aram.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;"}