@rc-component/dialog 1.7.0 → 1.8.1
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/dist/00feb83c-async.b2b13c3a.js +2 -0
- package/dist/00feb83c-async.b2b13c3a.js.map +1 -0
- package/dist/12e34244-async.042e069f.js +2 -0
- package/dist/12e34244-async.042e069f.js.map +1 -0
- package/dist/1476aea7-async.5924d48b.js +2 -0
- package/dist/1476aea7-async.5924d48b.js.map +1 -0
- package/dist/267f1112-async.b1c4e09d.js +2 -0
- package/dist/267f1112-async.b1c4e09d.js.map +1 -0
- package/dist/3daea961-async.dfa8a2b7.js +2 -0
- package/dist/3daea961-async.dfa8a2b7.js.map +1 -0
- package/dist/404.html +15 -0
- package/dist/42e76558-async.f2db19d4.js +2 -0
- package/dist/42e76558-async.f2db19d4.js.map +1 -0
- package/dist/58f5abb1-async.f36f6f5a.js +2 -0
- package/dist/58f5abb1-async.f36f6f5a.js.map +1 -0
- package/dist/779f92e1-async.d95373de.js +124 -0
- package/dist/779f92e1-async.d95373de.js.map +1 -0
- package/dist/9e8e2db3-async.7488f9f0.css +2 -0
- package/dist/9e8e2db3-async.7488f9f0.css.map +1 -0
- package/dist/9e8e2db3-async.82b5afee.js +8 -0
- package/dist/9e8e2db3-async.82b5afee.js.map +1 -0
- package/dist/9f7aa744-async.3e863897.js +2 -0
- package/dist/{nm__dumi__dist__client__pages__Demo__index-async.js.map → 9f7aa744-async.3e863897.js.map} +1 -1
- package/dist/bd24602e-async.050c580d.js +2 -0
- package/dist/bd24602e-async.050c580d.js.map +1 -0
- package/dist/cd8d7381-async.a336cd94.js +2 -0
- package/dist/cd8d7381-async.a336cd94.js.map +1 -0
- package/dist/changelog/index.html +15 -0
- package/dist/common-async.d12bbb31.js +2 -0
- package/dist/common-async.d12bbb31.js.map +1 -0
- package/dist/demo/ant-design/index.html +15 -0
- package/dist/demo/bootstrap/index.html +15 -0
- package/dist/demo/draggable/index.html +15 -0
- package/dist/demo/multiple--portal/index.html +15 -0
- package/dist/demo/pure/index.html +15 -0
- package/dist/f2210531-async.0ea798a7.js +2 -0
- package/dist/f2210531-async.0ea798a7.js.map +1 -0
- package/dist/f410dd15-async.4aeedec3.js +2 -0
- package/dist/{node_modules_react-dom_server_browser_js-async.js.map → f410dd15-async.4aeedec3.js.map} +1 -1
- package/dist/fff33d9f-async.4061bf6f.js +2 -0
- package/dist/fff33d9f-async.4061bf6f.js.map +1 -0
- package/dist/fff33d9f-async.f200d0df.css +2 -0
- package/dist/fff33d9f-async.f200d0df.css.map +1 -0
- package/dist/index.html +15 -0
- package/dist/preload_helper.fdfc8d07.js +1 -0
- package/dist/umi.ebc6765d.js +9 -0
- package/dist/umi.ebc6765d.js.map +1 -0
- package/dist/umi.ed582539.css +2 -0
- package/dist/umi.ed582539.css.map +1 -0
- package/dist/vendors-async.53ad541e.css +2 -0
- package/dist/vendors-async.53ad541e.css.map +1 -0
- package/dist/vendors-async.af87bf96.js +44 -0
- package/dist/vendors-async.af87bf96.js.map +1 -0
- package/dist/~demos/:id/index.html +15 -0
- package/dist/~demos/docs-demo-ant-design-demo-ant-design/index.html +15 -0
- package/dist/~demos/docs-demo-bootstrap-demo-bootstrap/index.html +15 -0
- package/dist/~demos/docs-demo-draggable-demo-draggable/index.html +15 -0
- package/dist/~demos/docs-demo-multiple-portal-demo-multiple-portal/index.html +15 -0
- package/dist/~demos/docs-demo-pure-demo-pure/index.html +15 -0
- package/es/Dialog/Content/Panel.js +3 -2
- package/es/IDialogPropTypes.d.ts +1 -0
- package/lib/Dialog/Content/Panel.js +3 -2
- package/lib/IDialogPropTypes.d.ts +1 -0
- package/package.json +3 -3
- package/dist/common-async.js +0 -2518
- package/dist/common-async.js.map +0 -1
- package/dist/demos-async.css +0 -396
- package/dist/demos-async.css.map +0 -1
- package/dist/demos-async.js +0 -1242
- package/dist/demos-async.js.map +0 -1
- package/dist/docs_changelog_md-async.js +0 -2141
- package/dist/docs_changelog_md-async.js.map +0 -1
- package/dist/docs_demo_ant-design_md-async.js +0 -101
- package/dist/docs_demo_ant-design_md-async.js.map +0 -1
- package/dist/docs_demo_bootstrap_md-async.js +0 -101
- package/dist/docs_demo_bootstrap_md-async.js.map +0 -1
- package/dist/docs_demo_draggable_md-async.js +0 -101
- package/dist/docs_demo_draggable_md-async.js.map +0 -1
- package/dist/docs_demo_multiple-Portal_md-async.js +0 -147
- package/dist/docs_demo_multiple-Portal_md-async.js.map +0 -1
- package/dist/docs_demo_pure_md-async.js +0 -101
- package/dist/docs_demo_pure_md-async.js.map +0 -1
- package/dist/docs_index_md-async.js +0 -1754
- package/dist/docs_index_md-async.js.map +0 -1
- package/dist/dumi__tmp__dumi__theme__ContextWrapper-async.js +0 -201
- package/dist/dumi__tmp__dumi__theme__ContextWrapper-async.js.map +0 -1
- package/dist/meta__docs-async.css +0 -396
- package/dist/meta__docs-async.css.map +0 -1
- package/dist/meta__docs-async.js +0 -1048
- package/dist/meta__docs-async.js.map +0 -1
- package/dist/nm__dumi__dist__client__pages__404-async.js +0 -69
- package/dist/nm__dumi__dist__client__pages__404-async.js.map +0 -1
- package/dist/nm__dumi__dist__client__pages__Demo__index-async.js +0 -63
- package/dist/node_modules_dumi_dist_client_misc_reactDemoCompiler_js-async.js +0 -368
- package/dist/node_modules_dumi_dist_client_misc_reactDemoCompiler_js-async.js.map +0 -1
- package/dist/node_modules_dumi_theme-default_layouts_DocLayout_index_js-async.js +0 -1077
- package/dist/node_modules_dumi_theme-default_layouts_DocLayout_index_js-async.js.map +0 -1
- package/dist/node_modules_react-dom_server_browser_js-async.js +0 -18
- package/dist/umi.css +0 -1317
- package/dist/umi.css.map +0 -1
- package/dist/umi.js +0 -83003
- package/dist/umi.js.map +0 -1
- package/dist/vendors-async.css +0 -26259
- package/dist/vendors-async.css.map +0 -1
- package/dist/vendors-async.js +0 -56792
- package/dist/vendors-async.js.map +0 -1
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
<!DOCTYPE html>
|
|
2
|
+
<html>
|
|
3
|
+
<head>
|
|
4
|
+
<meta charset="utf-8">
|
|
5
|
+
<meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
|
|
6
|
+
<meta http-equiv="X-UA-Compatible" content="ie=edge">
|
|
7
|
+
<link rel="shortcut icon" href="https://avatars0.githubusercontent.com/u/9441414?s=200&v=4">
|
|
8
|
+
<link rel="stylesheet" href="/umi.ed582539.css">
|
|
9
|
+
<script src="/preload_helper.fdfc8d07.js"></script>
|
|
10
|
+
</head>
|
|
11
|
+
<body>
|
|
12
|
+
<div id="root"></div>
|
|
13
|
+
<script src="/umi.ebc6765d.js"></script>
|
|
14
|
+
</body>
|
|
15
|
+
</html>
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
<!DOCTYPE html>
|
|
2
|
+
<html>
|
|
3
|
+
<head>
|
|
4
|
+
<meta charset="utf-8">
|
|
5
|
+
<meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
|
|
6
|
+
<meta http-equiv="X-UA-Compatible" content="ie=edge">
|
|
7
|
+
<link rel="shortcut icon" href="https://avatars0.githubusercontent.com/u/9441414?s=200&v=4">
|
|
8
|
+
<link rel="stylesheet" href="/umi.ed582539.css">
|
|
9
|
+
<script src="/preload_helper.fdfc8d07.js"></script>
|
|
10
|
+
</head>
|
|
11
|
+
<body>
|
|
12
|
+
<div id="root"></div>
|
|
13
|
+
<script src="/umi.ebc6765d.js"></script>
|
|
14
|
+
</body>
|
|
15
|
+
</html>
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
<!DOCTYPE html>
|
|
2
|
+
<html>
|
|
3
|
+
<head>
|
|
4
|
+
<meta charset="utf-8">
|
|
5
|
+
<meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
|
|
6
|
+
<meta http-equiv="X-UA-Compatible" content="ie=edge">
|
|
7
|
+
<link rel="shortcut icon" href="https://avatars0.githubusercontent.com/u/9441414?s=200&v=4">
|
|
8
|
+
<link rel="stylesheet" href="/umi.ed582539.css">
|
|
9
|
+
<script src="/preload_helper.fdfc8d07.js"></script>
|
|
10
|
+
</head>
|
|
11
|
+
<body>
|
|
12
|
+
<div id="root"></div>
|
|
13
|
+
<script src="/umi.ebc6765d.js"></script>
|
|
14
|
+
</body>
|
|
15
|
+
</html>
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
<!DOCTYPE html>
|
|
2
|
+
<html>
|
|
3
|
+
<head>
|
|
4
|
+
<meta charset="utf-8">
|
|
5
|
+
<meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
|
|
6
|
+
<meta http-equiv="X-UA-Compatible" content="ie=edge">
|
|
7
|
+
<link rel="shortcut icon" href="https://avatars0.githubusercontent.com/u/9441414?s=200&v=4">
|
|
8
|
+
<link rel="stylesheet" href="/umi.ed582539.css">
|
|
9
|
+
<script src="/preload_helper.fdfc8d07.js"></script>
|
|
10
|
+
</head>
|
|
11
|
+
<body>
|
|
12
|
+
<div id="root"></div>
|
|
13
|
+
<script src="/umi.ebc6765d.js"></script>
|
|
14
|
+
</body>
|
|
15
|
+
</html>
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
<!DOCTYPE html>
|
|
2
|
+
<html>
|
|
3
|
+
<head>
|
|
4
|
+
<meta charset="utf-8">
|
|
5
|
+
<meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
|
|
6
|
+
<meta http-equiv="X-UA-Compatible" content="ie=edge">
|
|
7
|
+
<link rel="shortcut icon" href="https://avatars0.githubusercontent.com/u/9441414?s=200&v=4">
|
|
8
|
+
<link rel="stylesheet" href="/umi.ed582539.css">
|
|
9
|
+
<script src="/preload_helper.fdfc8d07.js"></script>
|
|
10
|
+
</head>
|
|
11
|
+
<body>
|
|
12
|
+
<div id="root"></div>
|
|
13
|
+
<script src="/umi.ebc6765d.js"></script>
|
|
14
|
+
</body>
|
|
15
|
+
</html>
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
<!DOCTYPE html>
|
|
2
|
+
<html>
|
|
3
|
+
<head>
|
|
4
|
+
<meta charset="utf-8">
|
|
5
|
+
<meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
|
|
6
|
+
<meta http-equiv="X-UA-Compatible" content="ie=edge">
|
|
7
|
+
<link rel="shortcut icon" href="https://avatars0.githubusercontent.com/u/9441414?s=200&v=4">
|
|
8
|
+
<link rel="stylesheet" href="/umi.ed582539.css">
|
|
9
|
+
<script src="/preload_helper.fdfc8d07.js"></script>
|
|
10
|
+
</head>
|
|
11
|
+
<body>
|
|
12
|
+
<div id="root"></div>
|
|
13
|
+
<script src="/umi.ebc6765d.js"></script>
|
|
14
|
+
</body>
|
|
15
|
+
</html>
|
|
@@ -30,7 +30,8 @@ const Panel = /*#__PURE__*/React.forwardRef((props, ref) => {
|
|
|
30
30
|
height,
|
|
31
31
|
classNames: modalClassNames,
|
|
32
32
|
styles: modalStyles,
|
|
33
|
-
isFixedPos
|
|
33
|
+
isFixedPos,
|
|
34
|
+
focusTrap
|
|
34
35
|
} = props;
|
|
35
36
|
|
|
36
37
|
// ================================= Refs =================================
|
|
@@ -39,7 +40,7 @@ const Panel = /*#__PURE__*/React.forwardRef((props, ref) => {
|
|
|
39
40
|
} = React.useContext(RefContext);
|
|
40
41
|
const internalRef = useRef(null);
|
|
41
42
|
const mergedRef = useComposeRef(holderRef, panelRef, internalRef);
|
|
42
|
-
useLockFocus(visible && isFixedPos, () => internalRef.current);
|
|
43
|
+
useLockFocus(visible && isFixedPos && focusTrap !== false, () => internalRef.current);
|
|
43
44
|
React.useImperativeHandle(ref, () => ({
|
|
44
45
|
focus: () => {
|
|
45
46
|
internalRef.current?.focus({
|
package/es/IDialogPropTypes.d.ts
CHANGED
|
@@ -39,7 +39,8 @@ const Panel = /*#__PURE__*/_react.default.forwardRef((props, ref) => {
|
|
|
39
39
|
height,
|
|
40
40
|
classNames: modalClassNames,
|
|
41
41
|
styles: modalStyles,
|
|
42
|
-
isFixedPos
|
|
42
|
+
isFixedPos,
|
|
43
|
+
focusTrap
|
|
43
44
|
} = props;
|
|
44
45
|
|
|
45
46
|
// ================================= Refs =================================
|
|
@@ -48,7 +49,7 @@ const Panel = /*#__PURE__*/_react.default.forwardRef((props, ref) => {
|
|
|
48
49
|
} = _react.default.useContext(_context.RefContext);
|
|
49
50
|
const internalRef = (0, _react.useRef)(null);
|
|
50
51
|
const mergedRef = (0, _ref.useComposeRef)(holderRef, panelRef, internalRef);
|
|
51
|
-
(0, _focus.useLockFocus)(visible && isFixedPos, () => internalRef.current);
|
|
52
|
+
(0, _focus.useLockFocus)(visible && isFixedPos && focusTrap !== false, () => internalRef.current);
|
|
52
53
|
_react.default.useImperativeHandle(ref, () => ({
|
|
53
54
|
focus: () => {
|
|
54
55
|
internalRef.current?.focus({
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rc-component/dialog",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.8.1",
|
|
4
4
|
"description": "dialog ui component for react",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"react",
|
|
@@ -52,7 +52,7 @@
|
|
|
52
52
|
"dependencies": {
|
|
53
53
|
"@rc-component/motion": "^1.1.3",
|
|
54
54
|
"@rc-component/portal": "^2.1.0",
|
|
55
|
-
"@rc-component/util": "^1.
|
|
55
|
+
"@rc-component/util": "^1.7.0",
|
|
56
56
|
"clsx": "^2.1.1"
|
|
57
57
|
},
|
|
58
58
|
"devDependencies": {
|
|
@@ -88,4 +88,4 @@
|
|
|
88
88
|
"react": ">=18.0.0",
|
|
89
89
|
"react-dom": ">=18.0.0"
|
|
90
90
|
}
|
|
91
|
-
}
|
|
91
|
+
}
|