@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.
Files changed (106) hide show
  1. package/dist/00feb83c-async.b2b13c3a.js +2 -0
  2. package/dist/00feb83c-async.b2b13c3a.js.map +1 -0
  3. package/dist/12e34244-async.042e069f.js +2 -0
  4. package/dist/12e34244-async.042e069f.js.map +1 -0
  5. package/dist/1476aea7-async.5924d48b.js +2 -0
  6. package/dist/1476aea7-async.5924d48b.js.map +1 -0
  7. package/dist/267f1112-async.b1c4e09d.js +2 -0
  8. package/dist/267f1112-async.b1c4e09d.js.map +1 -0
  9. package/dist/3daea961-async.dfa8a2b7.js +2 -0
  10. package/dist/3daea961-async.dfa8a2b7.js.map +1 -0
  11. package/dist/404.html +15 -0
  12. package/dist/42e76558-async.f2db19d4.js +2 -0
  13. package/dist/42e76558-async.f2db19d4.js.map +1 -0
  14. package/dist/58f5abb1-async.f36f6f5a.js +2 -0
  15. package/dist/58f5abb1-async.f36f6f5a.js.map +1 -0
  16. package/dist/779f92e1-async.d95373de.js +124 -0
  17. package/dist/779f92e1-async.d95373de.js.map +1 -0
  18. package/dist/9e8e2db3-async.7488f9f0.css +2 -0
  19. package/dist/9e8e2db3-async.7488f9f0.css.map +1 -0
  20. package/dist/9e8e2db3-async.82b5afee.js +8 -0
  21. package/dist/9e8e2db3-async.82b5afee.js.map +1 -0
  22. package/dist/9f7aa744-async.3e863897.js +2 -0
  23. package/dist/{nm__dumi__dist__client__pages__Demo__index-async.js.map → 9f7aa744-async.3e863897.js.map} +1 -1
  24. package/dist/bd24602e-async.050c580d.js +2 -0
  25. package/dist/bd24602e-async.050c580d.js.map +1 -0
  26. package/dist/cd8d7381-async.a336cd94.js +2 -0
  27. package/dist/cd8d7381-async.a336cd94.js.map +1 -0
  28. package/dist/changelog/index.html +15 -0
  29. package/dist/common-async.d12bbb31.js +2 -0
  30. package/dist/common-async.d12bbb31.js.map +1 -0
  31. package/dist/demo/ant-design/index.html +15 -0
  32. package/dist/demo/bootstrap/index.html +15 -0
  33. package/dist/demo/draggable/index.html +15 -0
  34. package/dist/demo/multiple--portal/index.html +15 -0
  35. package/dist/demo/pure/index.html +15 -0
  36. package/dist/f2210531-async.0ea798a7.js +2 -0
  37. package/dist/f2210531-async.0ea798a7.js.map +1 -0
  38. package/dist/f410dd15-async.4aeedec3.js +2 -0
  39. package/dist/{node_modules_react-dom_server_browser_js-async.js.map → f410dd15-async.4aeedec3.js.map} +1 -1
  40. package/dist/fff33d9f-async.4061bf6f.js +2 -0
  41. package/dist/fff33d9f-async.4061bf6f.js.map +1 -0
  42. package/dist/fff33d9f-async.f200d0df.css +2 -0
  43. package/dist/fff33d9f-async.f200d0df.css.map +1 -0
  44. package/dist/index.html +15 -0
  45. package/dist/preload_helper.fdfc8d07.js +1 -0
  46. package/dist/umi.ebc6765d.js +9 -0
  47. package/dist/umi.ebc6765d.js.map +1 -0
  48. package/dist/umi.ed582539.css +2 -0
  49. package/dist/umi.ed582539.css.map +1 -0
  50. package/dist/vendors-async.53ad541e.css +2 -0
  51. package/dist/vendors-async.53ad541e.css.map +1 -0
  52. package/dist/vendors-async.af87bf96.js +44 -0
  53. package/dist/vendors-async.af87bf96.js.map +1 -0
  54. package/dist/~demos/:id/index.html +15 -0
  55. package/dist/~demos/docs-demo-ant-design-demo-ant-design/index.html +15 -0
  56. package/dist/~demos/docs-demo-bootstrap-demo-bootstrap/index.html +15 -0
  57. package/dist/~demos/docs-demo-draggable-demo-draggable/index.html +15 -0
  58. package/dist/~demos/docs-demo-multiple-portal-demo-multiple-portal/index.html +15 -0
  59. package/dist/~demos/docs-demo-pure-demo-pure/index.html +15 -0
  60. package/es/Dialog/Content/Panel.js +3 -2
  61. package/es/IDialogPropTypes.d.ts +1 -0
  62. package/lib/Dialog/Content/Panel.js +3 -2
  63. package/lib/IDialogPropTypes.d.ts +1 -0
  64. package/package.json +3 -3
  65. package/dist/common-async.js +0 -2518
  66. package/dist/common-async.js.map +0 -1
  67. package/dist/demos-async.css +0 -396
  68. package/dist/demos-async.css.map +0 -1
  69. package/dist/demos-async.js +0 -1242
  70. package/dist/demos-async.js.map +0 -1
  71. package/dist/docs_changelog_md-async.js +0 -2141
  72. package/dist/docs_changelog_md-async.js.map +0 -1
  73. package/dist/docs_demo_ant-design_md-async.js +0 -101
  74. package/dist/docs_demo_ant-design_md-async.js.map +0 -1
  75. package/dist/docs_demo_bootstrap_md-async.js +0 -101
  76. package/dist/docs_demo_bootstrap_md-async.js.map +0 -1
  77. package/dist/docs_demo_draggable_md-async.js +0 -101
  78. package/dist/docs_demo_draggable_md-async.js.map +0 -1
  79. package/dist/docs_demo_multiple-Portal_md-async.js +0 -147
  80. package/dist/docs_demo_multiple-Portal_md-async.js.map +0 -1
  81. package/dist/docs_demo_pure_md-async.js +0 -101
  82. package/dist/docs_demo_pure_md-async.js.map +0 -1
  83. package/dist/docs_index_md-async.js +0 -1754
  84. package/dist/docs_index_md-async.js.map +0 -1
  85. package/dist/dumi__tmp__dumi__theme__ContextWrapper-async.js +0 -201
  86. package/dist/dumi__tmp__dumi__theme__ContextWrapper-async.js.map +0 -1
  87. package/dist/meta__docs-async.css +0 -396
  88. package/dist/meta__docs-async.css.map +0 -1
  89. package/dist/meta__docs-async.js +0 -1048
  90. package/dist/meta__docs-async.js.map +0 -1
  91. package/dist/nm__dumi__dist__client__pages__404-async.js +0 -69
  92. package/dist/nm__dumi__dist__client__pages__404-async.js.map +0 -1
  93. package/dist/nm__dumi__dist__client__pages__Demo__index-async.js +0 -63
  94. package/dist/node_modules_dumi_dist_client_misc_reactDemoCompiler_js-async.js +0 -368
  95. package/dist/node_modules_dumi_dist_client_misc_reactDemoCompiler_js-async.js.map +0 -1
  96. package/dist/node_modules_dumi_theme-default_layouts_DocLayout_index_js-async.js +0 -1077
  97. package/dist/node_modules_dumi_theme-default_layouts_DocLayout_index_js-async.js.map +0 -1
  98. package/dist/node_modules_react-dom_server_browser_js-async.js +0 -18
  99. package/dist/umi.css +0 -1317
  100. package/dist/umi.css.map +0 -1
  101. package/dist/umi.js +0 -83003
  102. package/dist/umi.js.map +0 -1
  103. package/dist/vendors-async.css +0 -26259
  104. package/dist/vendors-async.css.map +0 -1
  105. package/dist/vendors-async.js +0 -56792
  106. 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({
@@ -51,5 +51,6 @@ export type IDialogPropTypes = {
51
51
  modalRender?: (node: ReactNode) => ReactNode;
52
52
  forceRender?: boolean;
53
53
  focusTriggerAfterClose?: boolean;
54
+ focusTrap?: boolean;
54
55
  panelRef?: React.Ref<HTMLDivElement>;
55
56
  };
@@ -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({
@@ -51,5 +51,6 @@ export type IDialogPropTypes = {
51
51
  modalRender?: (node: ReactNode) => ReactNode;
52
52
  forceRender?: boolean;
53
53
  focusTriggerAfterClose?: boolean;
54
+ focusTrap?: boolean;
54
55
  panelRef?: React.Ref<HTMLDivElement>;
55
56
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rc-component/dialog",
3
- "version": "1.7.0",
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.5.0",
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
+ }