@dr.pogodin/react-utils 1.41.10 → 1.41.11
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/build/development/shared/components/Modal/index.js +4 -3
- package/build/development/shared/components/Modal/index.js.map +1 -1
- package/build/development/web.bundle.js +1 -1
- package/build/production/shared/components/Modal/index.js +4 -3
- package/build/production/shared/components/Modal/index.js.map +1 -1
- package/build/production/web.bundle.js +1 -1
- package/build/production/web.bundle.js.map +1 -1
- package/build/types-code/shared/components/Modal/index.d.ts +5 -4
- package/package.json +10 -10
- package/src/shared/components/Modal/index.tsx +9 -7
|
@@ -1,16 +1,17 @@
|
|
|
1
|
-
import { type ReactNode } from 'react';
|
|
1
|
+
import { type CSSProperties, type FunctionComponent, type ReactNode } from 'react';
|
|
2
2
|
import { type Theme } from '@dr.pogodin/react-themes';
|
|
3
3
|
type PropsT = {
|
|
4
4
|
cancelOnScrolling?: boolean;
|
|
5
5
|
children?: ReactNode;
|
|
6
6
|
dontDisableScrolling?: boolean;
|
|
7
7
|
onCancel?: () => void;
|
|
8
|
-
|
|
8
|
+
overlayStyle?: CSSProperties;
|
|
9
|
+
style?: CSSProperties;
|
|
9
10
|
testId?: string;
|
|
10
11
|
testIdForOverlay?: string;
|
|
11
12
|
theme: Theme<'container' | 'overlay'>;
|
|
12
13
|
/** @deprecated */
|
|
13
|
-
containerStyle?:
|
|
14
|
+
containerStyle?: CSSProperties;
|
|
14
15
|
};
|
|
15
16
|
/**
|
|
16
17
|
* The `<Modal>` component implements a simple themeable modal window, wrapped
|
|
@@ -23,7 +24,7 @@ type PropsT = {
|
|
|
23
24
|
* modal.
|
|
24
25
|
* @param {ModalTheme} [props.theme] _Ad hoc_ theme.
|
|
25
26
|
*/
|
|
26
|
-
declare const BaseModal:
|
|
27
|
+
declare const BaseModal: FunctionComponent<PropsT>;
|
|
27
28
|
declare const _default: import("@dr.pogodin/react-themes").ThemedComponent<PropsT>;
|
|
28
29
|
export default _default;
|
|
29
30
|
export { BaseModal };
|
package/package.json
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
{
|
|
2
|
-
"version": "1.41.
|
|
2
|
+
"version": "1.41.11",
|
|
3
3
|
"bin": {
|
|
4
4
|
"react-utils-build": "bin/build.js",
|
|
5
5
|
"react-utils-setup": "bin/setup.js"
|
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
"@jest/environment": "^29.7.0",
|
|
18
18
|
"axios": "^1.7.9",
|
|
19
19
|
"commander": "^13.1.0",
|
|
20
|
-
"compression": "^1.
|
|
20
|
+
"compression": "^1.8.0",
|
|
21
21
|
"config": "^3.3.12",
|
|
22
22
|
"cookie": "^1.0.2",
|
|
23
23
|
"cookie-parser": "^1.4.7",
|
|
@@ -35,7 +35,7 @@
|
|
|
35
35
|
"react": "^19.0.0",
|
|
36
36
|
"react-dom": "^19.0.0",
|
|
37
37
|
"react-helmet-async": "^2.0.5",
|
|
38
|
-
"react-router": "^7.1.
|
|
38
|
+
"react-router": "^7.1.5",
|
|
39
39
|
"request-ip": "^3.3.0",
|
|
40
40
|
"rimraf": "^6.0.0",
|
|
41
41
|
"serialize-javascript": "^6.0.2",
|
|
@@ -47,12 +47,12 @@
|
|
|
47
47
|
"description": "Collection of generic ReactJS components and utils",
|
|
48
48
|
"devDependencies": {
|
|
49
49
|
"@babel/cli": "^7.26.4",
|
|
50
|
-
"@babel/core": "^7.26.
|
|
51
|
-
"@babel/eslint-parser": "^7.26.
|
|
50
|
+
"@babel/core": "^7.26.8",
|
|
51
|
+
"@babel/eslint-parser": "^7.26.8",
|
|
52
52
|
"@babel/eslint-plugin": "^7.25.9",
|
|
53
53
|
"@babel/node": "^7.26.0",
|
|
54
|
-
"@babel/plugin-transform-runtime": "^7.
|
|
55
|
-
"@babel/preset-env": "^7.26.
|
|
54
|
+
"@babel/plugin-transform-runtime": "^7.26.8",
|
|
55
|
+
"@babel/preset-env": "^7.26.8",
|
|
56
56
|
"@babel/preset-react": "^7.26.3",
|
|
57
57
|
"@babel/preset-typescript": "^7.26.0",
|
|
58
58
|
"@babel/register": "^7.25.9",
|
|
@@ -104,14 +104,14 @@
|
|
|
104
104
|
"mini-css-extract-plugin": "^2.9.2",
|
|
105
105
|
"mockdate": "^3.0.5",
|
|
106
106
|
"nodelist-foreach-polyfill": "^1.2.0",
|
|
107
|
-
"postcss": "^8.5.
|
|
107
|
+
"postcss": "^8.5.2",
|
|
108
108
|
"postcss-loader": "^8.1.1",
|
|
109
109
|
"postcss-scss": "^4.0.9",
|
|
110
110
|
"pretty": "^2.0.0",
|
|
111
111
|
"react-refresh": "^0.16.0",
|
|
112
112
|
"regenerator-runtime": "^0.14.1",
|
|
113
113
|
"resolve-url-loader": "^5.0.0",
|
|
114
|
-
"sass": "^1.
|
|
114
|
+
"sass": "^1.84.0",
|
|
115
115
|
"sass-loader": "^16.0.4",
|
|
116
116
|
"sitemap": "^8.0.0",
|
|
117
117
|
"source-map-loader": "^5.0.0",
|
|
@@ -122,7 +122,7 @@
|
|
|
122
122
|
"tstyche": "^3.5.0",
|
|
123
123
|
"typed-scss-modules": "^8.1.1",
|
|
124
124
|
"typescript": "^5.7.3",
|
|
125
|
-
"typescript-eslint": "^8.
|
|
125
|
+
"typescript-eslint": "^8.24.0",
|
|
126
126
|
"webpack": "^5.97.1",
|
|
127
127
|
"webpack-dev-middleware": "^7.4.2",
|
|
128
128
|
"webpack-hot-middleware": "^2.26.1",
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
/* global document */
|
|
2
|
-
|
|
3
1
|
import {
|
|
2
|
+
type CSSProperties,
|
|
3
|
+
type FunctionComponent,
|
|
4
4
|
type ReactNode,
|
|
5
5
|
useEffect,
|
|
6
6
|
useMemo,
|
|
@@ -19,13 +19,14 @@ type PropsT = {
|
|
|
19
19
|
children?: ReactNode;
|
|
20
20
|
dontDisableScrolling?: boolean;
|
|
21
21
|
onCancel?: () => void;
|
|
22
|
-
|
|
22
|
+
overlayStyle?: CSSProperties;
|
|
23
|
+
style?: CSSProperties;
|
|
23
24
|
testId?: string;
|
|
24
25
|
testIdForOverlay?: string;
|
|
25
26
|
theme: Theme<'container' | 'overlay'>;
|
|
26
27
|
|
|
27
28
|
/** @deprecated */
|
|
28
|
-
containerStyle?:
|
|
29
|
+
containerStyle?: CSSProperties;
|
|
29
30
|
};
|
|
30
31
|
|
|
31
32
|
/**
|
|
@@ -39,12 +40,13 @@ type PropsT = {
|
|
|
39
40
|
* modal.
|
|
40
41
|
* @param {ModalTheme} [props.theme] _Ad hoc_ theme.
|
|
41
42
|
*/
|
|
42
|
-
const BaseModal:
|
|
43
|
+
const BaseModal: FunctionComponent<PropsT> = ({
|
|
43
44
|
cancelOnScrolling,
|
|
44
45
|
children,
|
|
45
46
|
containerStyle,
|
|
46
47
|
dontDisableScrolling,
|
|
47
48
|
onCancel,
|
|
49
|
+
overlayStyle,
|
|
48
50
|
style,
|
|
49
51
|
testId,
|
|
50
52
|
testIdForOverlay,
|
|
@@ -99,9 +101,8 @@ const BaseModal: React.FunctionComponent<PropsT> = ({
|
|
|
99
101
|
}
|
|
100
102
|
overlayRef.current?.focus();
|
|
101
103
|
}}
|
|
102
|
-
|
|
104
|
+
// eslint-disable-next-line jsx-a11y/no-noninteractive-tabindex
|
|
103
105
|
tabIndex={0}
|
|
104
|
-
/* eslint-enable jsx-a11y/no-noninteractive-tabindex */
|
|
105
106
|
/>
|
|
106
107
|
), []);
|
|
107
108
|
|
|
@@ -135,6 +136,7 @@ const BaseModal: React.FunctionComponent<PropsT> = ({
|
|
|
135
136
|
}
|
|
136
137
|
}}
|
|
137
138
|
role="button"
|
|
139
|
+
style={overlayStyle}
|
|
138
140
|
tabIndex={0}
|
|
139
141
|
/>
|
|
140
142
|
{
|