@pushwoosh/dumb-components 1.1.129 → 1.1.131

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.
@@ -1,57 +1,13 @@
1
1
  import { Color, ShapeRadius } from '@pushwoosh/kit-constants';
2
- export declare const RootBox: import("styled-components").StyledComponent<"div", any, {
3
- $alignContent?: "end" | "start" | "center" | "space-between" | "space-around" | "space-evenly" | "stretch" | undefined;
4
- $alignItems?: "end" | "start" | "center" | "stretch" | "baseline" | undefined;
5
- $bgColor?: string | undefined;
6
- $border?: string | ({
7
- top?: string | undefined;
8
- right?: string | undefined;
9
- bottom?: string | undefined;
10
- left?: string | undefined;
11
- } | {
12
- horizontal: string;
13
- top?: string | undefined;
14
- bottom?: string | undefined;
15
- } | {
16
- vertical: string;
17
- right?: string | undefined;
18
- left?: string | undefined;
19
- }) | undefined;
20
- $borderRadius?: (string | number) | undefined;
21
- $boxShadow?: string | undefined;
22
- $gap?: (string | number) | undefined;
2
+ export declare const RootBox: import("styled-components").StyledComponent<"div", any, import("@pushwoosh/kit-helpers/styled-helpers").CommonBoxProps & {
3
+ $alignContent?: import("@pushwoosh/kit-helpers/styled-helpers").AlignContentValue | undefined;
4
+ $alignItems?: import("@pushwoosh/kit-helpers/styled-helpers").ItemAlignmentValue | undefined;
5
+ $gap?: import("@pushwoosh/kit-helpers/styled-helpers").StrNum | undefined;
6
+ $justifyContent?: import("@pushwoosh/kit-helpers/styled-helpers").JustifyContentValue | undefined;
7
+ } & {
23
8
  $gridAutoFlow?: "row" | "column" | "dense" | "row dense" | "column dense" | undefined;
24
- $justifyContent?: "end" | "start" | "center" | "space-between" | "space-around" | "space-evenly" | "stretch" | undefined;
25
- $justifyItems?: "end" | "start" | "center" | "stretch" | "baseline" | undefined;
26
- $margin?: (string | number) | ({
27
- top?: (string | number) | undefined;
28
- right?: (string | number) | undefined;
29
- bottom?: (string | number) | undefined;
30
- left?: (string | number) | undefined;
31
- } | {
32
- horizontal: string | number;
33
- top?: (string | number) | undefined;
34
- bottom?: (string | number) | undefined;
35
- } | {
36
- vertical: string | number;
37
- right?: (string | number) | undefined;
38
- left?: (string | number) | undefined;
39
- }) | undefined;
40
- $padding?: (string | number) | ({
41
- top?: (string | number) | undefined;
42
- right?: (string | number) | undefined;
43
- bottom?: (string | number) | undefined;
44
- left?: (string | number) | undefined;
45
- } | {
46
- horizontal: string | number;
47
- top?: (string | number) | undefined;
48
- bottom?: (string | number) | undefined;
49
- } | {
50
- vertical: string | number;
51
- right?: (string | number) | undefined;
52
- left?: (string | number) | undefined;
53
- }) | undefined;
54
- $placeItems?: "end" | "start" | "center" | "stretch" | undefined;
9
+ $justifyItems?: import("@pushwoosh/kit-helpers/styled-helpers").ItemAlignmentValue | undefined;
10
+ $placeItems?: import("@pushwoosh/kit-helpers/styled-helpers").ItemAlignmentValue | undefined;
55
11
  } & {
56
12
  $gridAutoFlow: string;
57
13
  } & {
@@ -63,4 +19,4 @@ export declare const RootBox: import("styled-components").StyledComponent<"div",
63
19
  } & {
64
20
  isActive?: boolean;
65
21
  $width: string | number;
66
- }, "$gridAutoFlow" | "$alignItems" | "$bgColor" | "$borderRadius" | "$gap" | "$padding">;
22
+ }, "$gridAutoFlow" | "$bgColor" | "$borderRadius" | "$padding" | "$alignItems" | "$gap">;
@@ -2,59 +2,15 @@ import { type ArrowDirection } from './RichMessageEditor.types';
2
2
  export declare const ImSpan: import("styled-components").StyledComponent<"span", any, {}, never>;
3
3
  export declare const DropArea: import("styled-components").StyledComponent<"div", any, {}, never>;
4
4
  export declare const DropContent: import("styled-components").StyledComponent<"div", any, {}, never>;
5
- export declare const Arrow: import("styled-components").StyledComponent<"div", any, {
6
- $alignContent?: "end" | "start" | "center" | "space-between" | "space-around" | "space-evenly" | "stretch" | undefined;
7
- $alignItems?: "end" | "start" | "center" | "stretch" | "baseline" | undefined;
8
- $bgColor?: string | undefined;
9
- $border?: string | ({
10
- top?: string | undefined;
11
- right?: string | undefined;
12
- bottom?: string | undefined;
13
- left?: string | undefined;
14
- } | {
15
- horizontal: string;
16
- top?: string | undefined;
17
- bottom?: string | undefined;
18
- } | {
19
- vertical: string;
20
- right?: string | undefined;
21
- left?: string | undefined;
22
- }) | undefined;
23
- $borderRadius?: (string | number) | undefined;
24
- $boxShadow?: string | undefined;
25
- $gap?: (string | number) | undefined;
5
+ export declare const Arrow: import("styled-components").StyledComponent<"div", any, import("@pushwoosh/kit-helpers/styled-helpers").CommonBoxProps & {
6
+ $alignContent?: import("@pushwoosh/kit-helpers/styled-helpers").AlignContentValue | undefined;
7
+ $alignItems?: import("@pushwoosh/kit-helpers/styled-helpers").ItemAlignmentValue | undefined;
8
+ $gap?: import("@pushwoosh/kit-helpers/styled-helpers").StrNum | undefined;
9
+ $justifyContent?: import("@pushwoosh/kit-helpers/styled-helpers").JustifyContentValue | undefined;
10
+ } & {
26
11
  $gridAutoFlow?: "row" | "column" | "dense" | "row dense" | "column dense" | undefined;
27
- $justifyContent?: "end" | "start" | "center" | "space-between" | "space-around" | "space-evenly" | "stretch" | undefined;
28
- $justifyItems?: "end" | "start" | "center" | "stretch" | "baseline" | undefined;
29
- $margin?: (string | number) | ({
30
- top?: (string | number) | undefined;
31
- right?: (string | number) | undefined;
32
- bottom?: (string | number) | undefined;
33
- left?: (string | number) | undefined;
34
- } | {
35
- horizontal: string | number;
36
- top?: (string | number) | undefined;
37
- bottom?: (string | number) | undefined;
38
- } | {
39
- vertical: string | number;
40
- right?: (string | number) | undefined;
41
- left?: (string | number) | undefined;
42
- }) | undefined;
43
- $padding?: (string | number) | ({
44
- top?: (string | number) | undefined;
45
- right?: (string | number) | undefined;
46
- bottom?: (string | number) | undefined;
47
- left?: (string | number) | undefined;
48
- } | {
49
- horizontal: string | number;
50
- top?: (string | number) | undefined;
51
- bottom?: (string | number) | undefined;
52
- } | {
53
- vertical: string | number;
54
- right?: (string | number) | undefined;
55
- left?: (string | number) | undefined;
56
- }) | undefined;
57
- $placeItems?: "end" | "start" | "center" | "stretch" | undefined;
12
+ $justifyItems?: import("@pushwoosh/kit-helpers/styled-helpers").ItemAlignmentValue | undefined;
13
+ $placeItems?: import("@pushwoosh/kit-helpers/styled-helpers").ItemAlignmentValue | undefined;
58
14
  } & {
59
15
  $gridAutoFlow: string;
60
16
  } & {
@@ -1,56 +1,12 @@
1
- export declare const RichMediaPreviewContainer: import("styled-components").StyledComponent<"div", any, {
2
- $alignContent?: "end" | "start" | "center" | "space-between" | "space-around" | "space-evenly" | "stretch" | undefined;
3
- $alignItems?: "end" | "start" | "center" | "stretch" | "baseline" | undefined;
4
- $bgColor?: string | undefined;
5
- $border?: string | ({
6
- top?: string | undefined;
7
- right?: string | undefined;
8
- bottom?: string | undefined;
9
- left?: string | undefined;
10
- } | {
11
- horizontal: string;
12
- top?: string | undefined;
13
- bottom?: string | undefined;
14
- } | {
15
- vertical: string;
16
- right?: string | undefined;
17
- left?: string | undefined;
18
- }) | undefined;
19
- $borderRadius?: (string | number) | undefined;
20
- $boxShadow?: string | undefined;
21
- $gap?: (string | number) | undefined;
1
+ export declare const RichMediaPreviewContainer: import("styled-components").StyledComponent<"div", any, import("@pushwoosh/kit-helpers/styled-helpers").CommonBoxProps & {
2
+ $alignContent?: import("@pushwoosh/kit-helpers/styled-helpers").AlignContentValue | undefined;
3
+ $alignItems?: import("@pushwoosh/kit-helpers/styled-helpers").ItemAlignmentValue | undefined;
4
+ $gap?: import("@pushwoosh/kit-helpers/styled-helpers").StrNum | undefined;
5
+ $justifyContent?: import("@pushwoosh/kit-helpers/styled-helpers").JustifyContentValue | undefined;
6
+ } & {
22
7
  $gridAutoFlow?: "row" | "column" | "dense" | "row dense" | "column dense" | undefined;
23
- $justifyContent?: "end" | "start" | "center" | "space-between" | "space-around" | "space-evenly" | "stretch" | undefined;
24
- $justifyItems?: "end" | "start" | "center" | "stretch" | "baseline" | undefined;
25
- $margin?: (string | number) | ({
26
- top?: (string | number) | undefined;
27
- right?: (string | number) | undefined;
28
- bottom?: (string | number) | undefined;
29
- left?: (string | number) | undefined;
30
- } | {
31
- horizontal: string | number;
32
- top?: (string | number) | undefined;
33
- bottom?: (string | number) | undefined;
34
- } | {
35
- vertical: string | number;
36
- right?: (string | number) | undefined;
37
- left?: (string | number) | undefined;
38
- }) | undefined;
39
- $padding?: (string | number) | ({
40
- top?: (string | number) | undefined;
41
- right?: (string | number) | undefined;
42
- bottom?: (string | number) | undefined;
43
- left?: (string | number) | undefined;
44
- } | {
45
- horizontal: string | number;
46
- top?: (string | number) | undefined;
47
- bottom?: (string | number) | undefined;
48
- } | {
49
- vertical: string | number;
50
- right?: (string | number) | undefined;
51
- left?: (string | number) | undefined;
52
- }) | undefined;
53
- $placeItems?: "end" | "start" | "center" | "stretch" | undefined;
8
+ $justifyItems?: import("@pushwoosh/kit-helpers/styled-helpers").ItemAlignmentValue | undefined;
9
+ $placeItems?: import("@pushwoosh/kit-helpers/styled-helpers").ItemAlignmentValue | undefined;
54
10
  } & {
55
11
  $gridAutoFlow: string;
56
12
  } & {
@@ -1,112 +1,24 @@
1
- export declare const Container: import("styled-components").StyledComponent<"div", any, {
2
- $alignContent?: "end" | "start" | "center" | "space-between" | "space-around" | "space-evenly" | "stretch" | undefined;
3
- $alignItems?: "end" | "start" | "center" | "stretch" | "baseline" | undefined;
4
- $bgColor?: string | undefined;
5
- $border?: string | ({
6
- top?: string | undefined;
7
- right?: string | undefined;
8
- bottom?: string | undefined;
9
- left?: string | undefined;
10
- } | {
11
- horizontal: string;
12
- top?: string | undefined;
13
- bottom?: string | undefined;
14
- } | {
15
- vertical: string;
16
- right?: string | undefined;
17
- left?: string | undefined;
18
- }) | undefined;
19
- $borderRadius?: (string | number) | undefined;
20
- $boxShadow?: string | undefined;
21
- $gap?: (string | number) | undefined;
1
+ export declare const Container: import("styled-components").StyledComponent<"div", any, import("@pushwoosh/kit-helpers/styled-helpers").CommonBoxProps & {
2
+ $alignContent?: import("@pushwoosh/kit-helpers/styled-helpers").AlignContentValue | undefined;
3
+ $alignItems?: import("@pushwoosh/kit-helpers/styled-helpers").ItemAlignmentValue | undefined;
4
+ $gap?: import("@pushwoosh/kit-helpers/styled-helpers").StrNum | undefined;
5
+ $justifyContent?: import("@pushwoosh/kit-helpers/styled-helpers").JustifyContentValue | undefined;
6
+ } & {
22
7
  $gridAutoFlow?: "row" | "column" | "dense" | "row dense" | "column dense" | undefined;
23
- $justifyContent?: "end" | "start" | "center" | "space-between" | "space-around" | "space-evenly" | "stretch" | undefined;
24
- $justifyItems?: "end" | "start" | "center" | "stretch" | "baseline" | undefined;
25
- $margin?: (string | number) | ({
26
- top?: (string | number) | undefined;
27
- right?: (string | number) | undefined;
28
- bottom?: (string | number) | undefined;
29
- left?: (string | number) | undefined;
30
- } | {
31
- horizontal: string | number;
32
- top?: (string | number) | undefined;
33
- bottom?: (string | number) | undefined;
34
- } | {
35
- vertical: string | number;
36
- right?: (string | number) | undefined;
37
- left?: (string | number) | undefined;
38
- }) | undefined;
39
- $padding?: (string | number) | ({
40
- top?: (string | number) | undefined;
41
- right?: (string | number) | undefined;
42
- bottom?: (string | number) | undefined;
43
- left?: (string | number) | undefined;
44
- } | {
45
- horizontal: string | number;
46
- top?: (string | number) | undefined;
47
- bottom?: (string | number) | undefined;
48
- } | {
49
- vertical: string | number;
50
- right?: (string | number) | undefined;
51
- left?: (string | number) | undefined;
52
- }) | undefined;
53
- $placeItems?: "end" | "start" | "center" | "stretch" | undefined;
8
+ $justifyItems?: import("@pushwoosh/kit-helpers/styled-helpers").ItemAlignmentValue | undefined;
9
+ $placeItems?: import("@pushwoosh/kit-helpers/styled-helpers").ItemAlignmentValue | undefined;
54
10
  } & {
55
11
  $gridAutoFlow: string;
56
12
  }, "$gridAutoFlow">;
57
- export declare const IconWrapper: import("styled-components").StyledComponent<"div", any, {
58
- $alignContent?: "end" | "start" | "center" | "space-between" | "space-around" | "space-evenly" | "stretch" | undefined;
59
- $alignItems?: "end" | "start" | "center" | "stretch" | "baseline" | undefined;
60
- $bgColor?: string | undefined;
61
- $border?: string | ({
62
- top?: string | undefined;
63
- right?: string | undefined;
64
- bottom?: string | undefined;
65
- left?: string | undefined;
66
- } | {
67
- horizontal: string;
68
- top?: string | undefined;
69
- bottom?: string | undefined;
70
- } | {
71
- vertical: string;
72
- right?: string | undefined;
73
- left?: string | undefined;
74
- }) | undefined;
75
- $borderRadius?: (string | number) | undefined;
76
- $boxShadow?: string | undefined;
77
- $gap?: (string | number) | undefined;
13
+ export declare const IconWrapper: import("styled-components").StyledComponent<"div", any, import("@pushwoosh/kit-helpers/styled-helpers").CommonBoxProps & {
14
+ $alignContent?: import("@pushwoosh/kit-helpers/styled-helpers").AlignContentValue | undefined;
15
+ $alignItems?: import("@pushwoosh/kit-helpers/styled-helpers").ItemAlignmentValue | undefined;
16
+ $gap?: import("@pushwoosh/kit-helpers/styled-helpers").StrNum | undefined;
17
+ $justifyContent?: import("@pushwoosh/kit-helpers/styled-helpers").JustifyContentValue | undefined;
18
+ } & {
78
19
  $gridAutoFlow?: "row" | "column" | "dense" | "row dense" | "column dense" | undefined;
79
- $justifyContent?: "end" | "start" | "center" | "space-between" | "space-around" | "space-evenly" | "stretch" | undefined;
80
- $justifyItems?: "end" | "start" | "center" | "stretch" | "baseline" | undefined;
81
- $margin?: (string | number) | ({
82
- top?: (string | number) | undefined;
83
- right?: (string | number) | undefined;
84
- bottom?: (string | number) | undefined;
85
- left?: (string | number) | undefined;
86
- } | {
87
- horizontal: string | number;
88
- top?: (string | number) | undefined;
89
- bottom?: (string | number) | undefined;
90
- } | {
91
- vertical: string | number;
92
- right?: (string | number) | undefined;
93
- left?: (string | number) | undefined;
94
- }) | undefined;
95
- $padding?: (string | number) | ({
96
- top?: (string | number) | undefined;
97
- right?: (string | number) | undefined;
98
- bottom?: (string | number) | undefined;
99
- left?: (string | number) | undefined;
100
- } | {
101
- horizontal: string | number;
102
- top?: (string | number) | undefined;
103
- bottom?: (string | number) | undefined;
104
- } | {
105
- vertical: string | number;
106
- right?: (string | number) | undefined;
107
- left?: (string | number) | undefined;
108
- }) | undefined;
109
- $placeItems?: "end" | "start" | "center" | "stretch" | undefined;
20
+ $justifyItems?: import("@pushwoosh/kit-helpers/styled-helpers").ItemAlignmentValue | undefined;
21
+ $placeItems?: import("@pushwoosh/kit-helpers/styled-helpers").ItemAlignmentValue | undefined;
110
22
  } & {
111
23
  $gridAutoFlow: string;
112
24
  }, "$gridAutoFlow">;
@@ -4,59 +4,15 @@ export declare const TooltipBox: import("styled-components").StyledComponent<imp
4
4
  $arrowOffset: string;
5
5
  $position: TooltipPosition;
6
6
  }, never>;
7
- export declare const HelpIconWrapper: import("styled-components").StyledComponent<"div", any, {
8
- $alignContent?: "end" | "start" | "center" | "space-between" | "space-around" | "space-evenly" | "stretch" | undefined;
9
- $alignItems?: "end" | "start" | "center" | "stretch" | "baseline" | undefined;
10
- $bgColor?: string | undefined;
11
- $border?: string | ({
12
- top?: string | undefined;
13
- right?: string | undefined;
14
- bottom?: string | undefined;
15
- left?: string | undefined;
16
- } | {
17
- horizontal: string;
18
- top?: string | undefined;
19
- bottom?: string | undefined;
20
- } | {
21
- vertical: string;
22
- right?: string | undefined;
23
- left?: string | undefined;
24
- }) | undefined;
25
- $borderRadius?: (string | number) | undefined;
26
- $boxShadow?: string | undefined;
27
- $gap?: (string | number) | undefined;
7
+ export declare const HelpIconWrapper: import("styled-components").StyledComponent<"div", any, import("@pushwoosh/kit-helpers/styled-helpers").CommonBoxProps & {
8
+ $alignContent?: import("@pushwoosh/kit-helpers/styled-helpers").AlignContentValue | undefined;
9
+ $alignItems?: import("@pushwoosh/kit-helpers/styled-helpers").ItemAlignmentValue | undefined;
10
+ $gap?: import("@pushwoosh/kit-helpers/styled-helpers").StrNum | undefined;
11
+ $justifyContent?: import("@pushwoosh/kit-helpers/styled-helpers").JustifyContentValue | undefined;
12
+ } & {
28
13
  $gridAutoFlow?: "row" | "column" | "dense" | "row dense" | "column dense" | undefined;
29
- $justifyContent?: "end" | "start" | "center" | "space-between" | "space-around" | "space-evenly" | "stretch" | undefined;
30
- $justifyItems?: "end" | "start" | "center" | "stretch" | "baseline" | undefined;
31
- $margin?: (string | number) | ({
32
- top?: (string | number) | undefined;
33
- right?: (string | number) | undefined;
34
- bottom?: (string | number) | undefined;
35
- left?: (string | number) | undefined;
36
- } | {
37
- horizontal: string | number;
38
- top?: (string | number) | undefined;
39
- bottom?: (string | number) | undefined;
40
- } | {
41
- vertical: string | number;
42
- right?: (string | number) | undefined;
43
- left?: (string | number) | undefined;
44
- }) | undefined;
45
- $padding?: (string | number) | ({
46
- top?: (string | number) | undefined;
47
- right?: (string | number) | undefined;
48
- bottom?: (string | number) | undefined;
49
- left?: (string | number) | undefined;
50
- } | {
51
- horizontal: string | number;
52
- top?: (string | number) | undefined;
53
- bottom?: (string | number) | undefined;
54
- } | {
55
- vertical: string | number;
56
- right?: (string | number) | undefined;
57
- left?: (string | number) | undefined;
58
- }) | undefined;
59
- $placeItems?: "end" | "start" | "center" | "stretch" | undefined;
14
+ $justifyItems?: import("@pushwoosh/kit-helpers/styled-helpers").ItemAlignmentValue | undefined;
15
+ $placeItems?: import("@pushwoosh/kit-helpers/styled-helpers").ItemAlignmentValue | undefined;
60
16
  } & {
61
17
  $gridAutoFlow: string;
62
18
  } & {
package/hooks/index.d.ts CHANGED
@@ -1,2 +1,3 @@
1
1
  export * from './useOnClickOutside';
2
2
  export * from './useElementWidth';
3
+ export * from './useLayer';
package/hooks/index.js CHANGED
@@ -1,2 +1,3 @@
1
1
  export * from './useOnClickOutside';
2
- export * from './useElementWidth';
2
+ export * from './useElementWidth';
3
+ export * from './useLayer';
@@ -0,0 +1,10 @@
1
+ type UseLayerParams = {
2
+ isOpen: boolean;
3
+ onClose?: () => void;
4
+ zIndex?: number;
5
+ };
6
+ type UseLayerResult = {
7
+ zIndex: number;
8
+ };
9
+ export declare function useLayer({ isOpen, onClose, zIndex }: UseLayerParams): UseLayerResult;
10
+ export {};
@@ -0,0 +1,81 @@
1
+ import { useEffect, useId, useLayoutEffect, useRef, useState } from 'react';
2
+ const BASE_Z_INDEX = 10000;
3
+ const Z_INDEX_STEP = 100;
4
+ const stack = [];
5
+ const subscribers = new Set();
6
+ let keydownAttached = false;
7
+ function notify() {
8
+ subscribers.forEach(subscriber => subscriber());
9
+ }
10
+ function handleKeydown(event) {
11
+ var _top$close;
12
+ if (event.key !== 'Escape') {
13
+ return;
14
+ }
15
+ const top = stack[stack.length - 1];
16
+ top === null || top === void 0 || (_top$close = top.close) === null || _top$close === void 0 || _top$close.call(top);
17
+ }
18
+ function ensureKeydownListener() {
19
+ if (!keydownAttached && stack.length > 0) {
20
+ window.addEventListener('keydown', handleKeydown);
21
+ keydownAttached = true;
22
+ }
23
+ }
24
+ function teardownKeydownListener() {
25
+ if (keydownAttached && stack.length === 0) {
26
+ window.removeEventListener('keydown', handleKeydown);
27
+ keydownAttached = false;
28
+ }
29
+ }
30
+ function registerLayer(entry) {
31
+ stack.push(entry);
32
+ ensureKeydownListener();
33
+ notify();
34
+ }
35
+ function unregisterLayer(id) {
36
+ const index = stack.findIndex(entry => entry.id === id);
37
+ if (index !== -1) {
38
+ stack.splice(index, 1);
39
+ }
40
+ teardownKeydownListener();
41
+ notify();
42
+ }
43
+ function getDepth(id) {
44
+ return stack.findIndex(entry => entry.id === id);
45
+ }
46
+ export function useLayer({
47
+ isOpen,
48
+ onClose,
49
+ zIndex
50
+ }) {
51
+ const id = useId();
52
+ const onCloseRef = useRef(onClose);
53
+ onCloseRef.current = onClose;
54
+ const [, forceRender] = useState(0);
55
+ useEffect(() => {
56
+ const subscriber = () => forceRender(value => value + 1);
57
+ subscribers.add(subscriber);
58
+ return () => {
59
+ subscribers.delete(subscriber);
60
+ };
61
+ }, []);
62
+ useLayoutEffect(() => {
63
+ if (!isOpen) {
64
+ return undefined;
65
+ }
66
+ registerLayer({
67
+ id,
68
+ close: () => {
69
+ var _onCloseRef$current;
70
+ return (_onCloseRef$current = onCloseRef.current) === null || _onCloseRef$current === void 0 ? void 0 : _onCloseRef$current.call(onCloseRef);
71
+ }
72
+ });
73
+ forceRender(value => value + 1);
74
+ return () => unregisterLayer(id);
75
+ }, [isOpen, id]);
76
+ const depth = getDepth(id);
77
+ const resolvedZIndex = zIndex ?? BASE_Z_INDEX + Math.max(depth, 0) * Z_INDEX_STEP;
78
+ return {
79
+ zIndex: resolvedZIndex
80
+ };
81
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pushwoosh/dumb-components",
3
- "version": "1.1.129",
3
+ "version": "1.1.131",
4
4
  "description": "React components to build Pushwoosh products",
5
5
  "main": "index.js",
6
6
  "module": "index.js",
@@ -48,7 +48,7 @@
48
48
  "@floating-ui/react-dom": "^2.1.2",
49
49
  "@lezer/highlight": "^1.2.1",
50
50
  "@pushwoosh/kit-constants": "^1.6.14",
51
- "@pushwoosh/kit-helpers": "^4.8.6",
51
+ "@pushwoosh/kit-helpers": "^4.11.0",
52
52
  "@pushwoosh/kit-icons": "^2.1.9",
53
53
  "@pushwoosh/kit-typography": "^1.7.5",
54
54
  "@tippyjs/react": "^4.2.6",