@oceanbase/ui 1.0.0-alpha.19 → 1.0.0-alpha.20

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 (272) hide show
  1. package/dist/ui.min.js +1 -1
  2. package/es/Action/Group.d.ts +1 -2
  3. package/es/Action/Group.js +253 -90
  4. package/es/BackgroundTaskManager/index.d.ts +2 -0
  5. package/es/BackgroundTaskManager/index.js +25 -4
  6. package/es/BasicLayout/index.d.ts +3 -1
  7. package/es/BasicLayout/index.js +62 -24
  8. package/es/BasicLayout/locale/en-US.d.ts +3 -0
  9. package/es/BasicLayout/locale/en-US.js +4 -1
  10. package/es/BasicLayout/locale/ja-JP.d.ts +3 -0
  11. package/es/BasicLayout/locale/ja-JP.js +4 -1
  12. package/es/BasicLayout/locale/zh-CN.d.ts +3 -0
  13. package/es/BasicLayout/locale/zh-CN.js +4 -1
  14. package/es/BasicLayout/locale/zh-TW.d.ts +3 -0
  15. package/es/BasicLayout/locale/zh-TW.js +4 -1
  16. package/es/BasicLayout/style/index.js +10 -2
  17. package/es/BatchOperationBar/index.js +15 -4
  18. package/es/BatchOperationBar/locale/en-US.d.ts +1 -0
  19. package/es/BatchOperationBar/locale/en-US.js +2 -1
  20. package/es/BatchOperationBar/locale/ja-JP.d.ts +1 -0
  21. package/es/BatchOperationBar/locale/ja-JP.js +2 -1
  22. package/es/BatchOperationBar/locale/zh-CN.d.ts +1 -0
  23. package/es/BatchOperationBar/locale/zh-CN.js +2 -1
  24. package/es/BatchOperationBar/locale/zh-TW.d.ts +1 -0
  25. package/es/BatchOperationBar/locale/zh-TW.js +2 -1
  26. package/es/BatchOperationBar/style/index.js +6 -1
  27. package/es/DateRanger/Ranger.js +17 -5
  28. package/es/DateRanger/locale/en-US.d.ts +2 -0
  29. package/es/DateRanger/locale/en-US.js +3 -1
  30. package/es/DateRanger/locale/ja-JP.d.ts +2 -0
  31. package/es/DateRanger/locale/ja-JP.js +3 -1
  32. package/es/DateRanger/locale/zh-CN.d.ts +2 -0
  33. package/es/DateRanger/locale/zh-CN.js +3 -1
  34. package/es/DateRanger/locale/zh-TW.d.ts +2 -0
  35. package/es/DateRanger/locale/zh-TW.js +3 -1
  36. package/es/Dialog/index.d.ts +5 -0
  37. package/es/Dialog/index.js +77 -14
  38. package/es/Dialog/locale/en-US.d.ts +5 -0
  39. package/es/Dialog/locale/en-US.js +6 -1
  40. package/es/Dialog/locale/ja-JP.d.ts +5 -0
  41. package/es/Dialog/locale/ja-JP.js +6 -1
  42. package/es/Dialog/locale/zh-CN.d.ts +5 -0
  43. package/es/Dialog/locale/zh-CN.js +6 -1
  44. package/es/Dialog/locale/zh-TW.d.ts +5 -0
  45. package/es/Dialog/locale/zh-TW.js +6 -1
  46. package/es/Dialog/style/index.js +24 -5
  47. package/es/DocDialog/index.js +4 -2
  48. package/es/DocDialog/locale/en-US.d.ts +3 -1
  49. package/es/DocDialog/locale/en-US.js +3 -1
  50. package/es/DocDialog/locale/ja-JP.d.ts +3 -1
  51. package/es/DocDialog/locale/ja-JP.js +3 -1
  52. package/es/DocDialog/locale/zh-CN.d.ts +3 -1
  53. package/es/DocDialog/locale/zh-CN.js +3 -1
  54. package/es/DocDialog/locale/zh-TW.d.ts +3 -1
  55. package/es/DocDialog/locale/zh-TW.js +3 -1
  56. package/es/FooterToolbar/index.d.ts +7 -4
  57. package/es/FooterToolbar/index.js +27 -11
  58. package/es/FooterToolbar/locale/en-US.d.ts +4 -0
  59. package/es/FooterToolbar/locale/en-US.js +3 -0
  60. package/es/FooterToolbar/locale/ja-JP.d.ts +4 -0
  61. package/es/FooterToolbar/locale/ja-JP.js +3 -0
  62. package/es/FooterToolbar/locale/zh-CN.d.ts +4 -0
  63. package/es/FooterToolbar/locale/zh-CN.js +3 -0
  64. package/es/FooterToolbar/locale/zh-TW.d.ts +4 -0
  65. package/es/FooterToolbar/locale/zh-TW.js +3 -0
  66. package/es/FullscreenBox/index.js +18 -10
  67. package/es/FullscreenBox/locale/en-US.d.ts +4 -1
  68. package/es/FullscreenBox/locale/en-US.js +4 -1
  69. package/es/FullscreenBox/locale/ja-JP.d.ts +4 -1
  70. package/es/FullscreenBox/locale/ja-JP.js +4 -1
  71. package/es/FullscreenBox/locale/zh-CN.d.ts +4 -1
  72. package/es/FullscreenBox/locale/zh-CN.js +4 -1
  73. package/es/FullscreenBox/locale/zh-TW.d.ts +4 -1
  74. package/es/FullscreenBox/locale/zh-TW.js +4 -1
  75. package/es/FullscreenBox/style/index.js +32 -11
  76. package/es/Highlight/index.js +9 -2
  77. package/es/Highlight/locale/en-US.d.ts +2 -0
  78. package/es/Highlight/locale/en-US.js +3 -1
  79. package/es/Highlight/locale/ja-JP.d.ts +2 -0
  80. package/es/Highlight/locale/ja-JP.js +3 -1
  81. package/es/Highlight/locale/zh-CN.d.ts +2 -0
  82. package/es/Highlight/locale/zh-CN.js +3 -1
  83. package/es/Highlight/locale/zh-TW.d.ts +2 -0
  84. package/es/Highlight/locale/zh-TW.js +3 -1
  85. package/es/LightFilter/index.d.ts +6 -2
  86. package/es/LightFilter/index.js +24 -8
  87. package/es/LightFilter/locale/en-US.d.ts +4 -0
  88. package/es/LightFilter/locale/en-US.js +3 -0
  89. package/es/LightFilter/locale/ja-JP.d.ts +4 -0
  90. package/es/LightFilter/locale/ja-JP.js +3 -0
  91. package/es/LightFilter/locale/zh-CN.d.ts +4 -0
  92. package/es/LightFilter/locale/zh-CN.js +3 -0
  93. package/es/LightFilter/locale/zh-TW.d.ts +4 -0
  94. package/es/LightFilter/locale/zh-TW.js +3 -0
  95. package/es/NavMenu/index.d.ts +5 -2
  96. package/es/NavMenu/index.js +13 -3
  97. package/es/NavMenu/locale/en-US.d.ts +4 -0
  98. package/es/NavMenu/locale/en-US.js +3 -0
  99. package/es/NavMenu/locale/ja-JP.d.ts +4 -0
  100. package/es/NavMenu/locale/ja-JP.js +3 -0
  101. package/es/NavMenu/locale/zh-CN.d.ts +4 -0
  102. package/es/NavMenu/locale/zh-CN.js +3 -0
  103. package/es/NavMenu/locale/zh-TW.d.ts +4 -0
  104. package/es/NavMenu/locale/zh-TW.js +3 -0
  105. package/es/Password/Content.d.ts +2 -0
  106. package/es/Password/Content.js +11 -3
  107. package/es/Password/index.d.ts +1 -0
  108. package/es/Password/index.js +14 -9
  109. package/es/Password/locale/en-US.d.ts +1 -0
  110. package/es/Password/locale/en-US.js +2 -1
  111. package/es/Password/locale/ja-JP.d.ts +1 -0
  112. package/es/Password/locale/ja-JP.js +1 -0
  113. package/es/Password/locale/zh-CN.d.ts +1 -0
  114. package/es/Password/locale/zh-CN.js +1 -0
  115. package/es/Password/locale/zh-TW.d.ts +1 -0
  116. package/es/Password/locale/zh-TW.js +2 -1
  117. package/es/SideTip/Dragger.js +2 -1
  118. package/es/SideTip/index.js +28 -7
  119. package/es/SideTip/locale/en-US.d.ts +4 -1
  120. package/es/SideTip/locale/en-US.js +4 -1
  121. package/es/SideTip/locale/ja-JP.d.ts +4 -1
  122. package/es/SideTip/locale/ja-JP.js +4 -1
  123. package/es/SideTip/locale/zh-CN.d.ts +4 -1
  124. package/es/SideTip/locale/zh-CN.js +4 -1
  125. package/es/SideTip/locale/zh-TW.d.ts +4 -1
  126. package/es/SideTip/locale/zh-TW.js +4 -1
  127. package/es/SideTip/style/index.js +10 -1
  128. package/es/TagSelect/Group.js +6 -2
  129. package/es/TagSelect/Item.js +2 -1
  130. package/es/assets/logo/oceanbase_logo.svg +45 -29
  131. package/es/assets/logo/oceanbase_logo_dark.svg +45 -29
  132. package/es/assets/logo/oceanbase_watermark.svg +45 -31
  133. package/es/locale/en-US.js +6 -0
  134. package/es/locale/ja-JP.js +6 -0
  135. package/es/locale/zh-CN.js +6 -0
  136. package/es/locale/zh-TW.js +6 -0
  137. package/lib/Action/Group.d.ts +1 -2
  138. package/lib/Action/Group.js +217 -92
  139. package/lib/BackgroundTaskManager/index.d.ts +2 -0
  140. package/lib/BackgroundTaskManager/index.js +23 -4
  141. package/lib/BasicLayout/index.d.ts +3 -1
  142. package/lib/BasicLayout/index.js +51 -17
  143. package/lib/BasicLayout/locale/en-US.d.ts +3 -0
  144. package/lib/BasicLayout/locale/en-US.js +4 -1
  145. package/lib/BasicLayout/locale/ja-JP.d.ts +3 -0
  146. package/lib/BasicLayout/locale/ja-JP.js +4 -1
  147. package/lib/BasicLayout/locale/zh-CN.d.ts +3 -0
  148. package/lib/BasicLayout/locale/zh-CN.js +4 -1
  149. package/lib/BasicLayout/locale/zh-TW.d.ts +3 -0
  150. package/lib/BasicLayout/locale/zh-TW.js +4 -1
  151. package/lib/BasicLayout/style/index.js +9 -0
  152. package/lib/BatchOperationBar/index.js +15 -4
  153. package/lib/BatchOperationBar/locale/en-US.d.ts +1 -0
  154. package/lib/BatchOperationBar/locale/en-US.js +2 -1
  155. package/lib/BatchOperationBar/locale/ja-JP.d.ts +1 -0
  156. package/lib/BatchOperationBar/locale/ja-JP.js +2 -1
  157. package/lib/BatchOperationBar/locale/zh-CN.d.ts +1 -0
  158. package/lib/BatchOperationBar/locale/zh-CN.js +2 -1
  159. package/lib/BatchOperationBar/locale/zh-TW.d.ts +1 -0
  160. package/lib/BatchOperationBar/locale/zh-TW.js +2 -1
  161. package/lib/BatchOperationBar/style/index.js +6 -1
  162. package/lib/DateRanger/Ranger.js +17 -5
  163. package/lib/DateRanger/locale/en-US.d.ts +2 -0
  164. package/lib/DateRanger/locale/en-US.js +2 -0
  165. package/lib/DateRanger/locale/ja-JP.d.ts +2 -0
  166. package/lib/DateRanger/locale/ja-JP.js +2 -0
  167. package/lib/DateRanger/locale/zh-CN.d.ts +2 -0
  168. package/lib/DateRanger/locale/zh-CN.js +2 -0
  169. package/lib/DateRanger/locale/zh-TW.d.ts +2 -0
  170. package/lib/DateRanger/locale/zh-TW.js +2 -0
  171. package/lib/Dialog/index.d.ts +5 -0
  172. package/lib/Dialog/index.js +71 -13
  173. package/lib/Dialog/locale/en-US.d.ts +5 -0
  174. package/lib/Dialog/locale/en-US.js +6 -1
  175. package/lib/Dialog/locale/ja-JP.d.ts +5 -0
  176. package/lib/Dialog/locale/ja-JP.js +6 -1
  177. package/lib/Dialog/locale/zh-CN.d.ts +5 -0
  178. package/lib/Dialog/locale/zh-CN.js +6 -1
  179. package/lib/Dialog/locale/zh-TW.d.ts +5 -0
  180. package/lib/Dialog/locale/zh-TW.js +6 -1
  181. package/lib/Dialog/style/index.js +23 -3
  182. package/lib/DocDialog/index.js +4 -2
  183. package/lib/DocDialog/locale/en-US.d.ts +3 -1
  184. package/lib/DocDialog/locale/en-US.js +3 -1
  185. package/lib/DocDialog/locale/ja-JP.d.ts +3 -1
  186. package/lib/DocDialog/locale/ja-JP.js +3 -1
  187. package/lib/DocDialog/locale/zh-CN.d.ts +3 -1
  188. package/lib/DocDialog/locale/zh-CN.js +3 -1
  189. package/lib/DocDialog/locale/zh-TW.d.ts +3 -1
  190. package/lib/DocDialog/locale/zh-TW.js +3 -1
  191. package/lib/FooterToolbar/index.d.ts +7 -4
  192. package/lib/FooterToolbar/index.js +27 -11
  193. package/lib/FooterToolbar/locale/en-US.d.ts +4 -0
  194. package/lib/FooterToolbar/locale/en-US.js +9 -0
  195. package/lib/FooterToolbar/locale/ja-JP.d.ts +4 -0
  196. package/lib/FooterToolbar/locale/ja-JP.js +9 -0
  197. package/lib/FooterToolbar/locale/zh-CN.d.ts +4 -0
  198. package/lib/FooterToolbar/locale/zh-CN.js +9 -0
  199. package/lib/FooterToolbar/locale/zh-TW.d.ts +4 -0
  200. package/lib/FooterToolbar/locale/zh-TW.js +9 -0
  201. package/lib/FullscreenBox/index.js +19 -11
  202. package/lib/FullscreenBox/locale/en-US.d.ts +4 -1
  203. package/lib/FullscreenBox/locale/en-US.js +4 -1
  204. package/lib/FullscreenBox/locale/ja-JP.d.ts +4 -1
  205. package/lib/FullscreenBox/locale/ja-JP.js +4 -1
  206. package/lib/FullscreenBox/locale/zh-CN.d.ts +4 -1
  207. package/lib/FullscreenBox/locale/zh-CN.js +4 -1
  208. package/lib/FullscreenBox/locale/zh-TW.d.ts +4 -1
  209. package/lib/FullscreenBox/locale/zh-TW.js +4 -1
  210. package/lib/FullscreenBox/style/index.js +33 -11
  211. package/lib/Highlight/index.js +9 -2
  212. package/lib/Highlight/locale/en-US.d.ts +2 -0
  213. package/lib/Highlight/locale/en-US.js +3 -1
  214. package/lib/Highlight/locale/ja-JP.d.ts +2 -0
  215. package/lib/Highlight/locale/ja-JP.js +3 -1
  216. package/lib/Highlight/locale/zh-CN.d.ts +2 -0
  217. package/lib/Highlight/locale/zh-CN.js +3 -1
  218. package/lib/Highlight/locale/zh-TW.d.ts +2 -0
  219. package/lib/Highlight/locale/zh-TW.js +3 -1
  220. package/lib/LightFilter/index.d.ts +6 -2
  221. package/lib/LightFilter/index.js +25 -8
  222. package/lib/LightFilter/locale/en-US.d.ts +4 -0
  223. package/lib/LightFilter/locale/en-US.js +9 -0
  224. package/lib/LightFilter/locale/ja-JP.d.ts +4 -0
  225. package/lib/LightFilter/locale/ja-JP.js +9 -0
  226. package/lib/LightFilter/locale/zh-CN.d.ts +4 -0
  227. package/lib/LightFilter/locale/zh-CN.js +9 -0
  228. package/lib/LightFilter/locale/zh-TW.d.ts +4 -0
  229. package/lib/LightFilter/locale/zh-TW.js +9 -0
  230. package/lib/NavMenu/index.d.ts +5 -2
  231. package/lib/NavMenu/index.js +12 -3
  232. package/lib/NavMenu/locale/en-US.d.ts +4 -0
  233. package/lib/NavMenu/locale/en-US.js +9 -0
  234. package/lib/NavMenu/locale/ja-JP.d.ts +4 -0
  235. package/lib/NavMenu/locale/ja-JP.js +9 -0
  236. package/lib/NavMenu/locale/zh-CN.d.ts +4 -0
  237. package/lib/NavMenu/locale/zh-CN.js +9 -0
  238. package/lib/NavMenu/locale/zh-TW.d.ts +4 -0
  239. package/lib/NavMenu/locale/zh-TW.js +9 -0
  240. package/lib/Password/Content.d.ts +2 -0
  241. package/lib/Password/Content.js +11 -3
  242. package/lib/Password/index.d.ts +1 -0
  243. package/lib/Password/index.js +13 -5
  244. package/lib/Password/locale/en-US.d.ts +1 -0
  245. package/lib/Password/locale/en-US.js +2 -1
  246. package/lib/Password/locale/ja-JP.d.ts +1 -0
  247. package/lib/Password/locale/ja-JP.js +1 -0
  248. package/lib/Password/locale/zh-CN.d.ts +1 -0
  249. package/lib/Password/locale/zh-CN.js +1 -0
  250. package/lib/Password/locale/zh-TW.d.ts +1 -0
  251. package/lib/Password/locale/zh-TW.js +2 -1
  252. package/lib/SideTip/Dragger.js +1 -1
  253. package/lib/SideTip/index.js +28 -7
  254. package/lib/SideTip/locale/en-US.d.ts +4 -1
  255. package/lib/SideTip/locale/en-US.js +4 -1
  256. package/lib/SideTip/locale/ja-JP.d.ts +4 -1
  257. package/lib/SideTip/locale/ja-JP.js +4 -1
  258. package/lib/SideTip/locale/zh-CN.d.ts +4 -1
  259. package/lib/SideTip/locale/zh-CN.js +4 -1
  260. package/lib/SideTip/locale/zh-TW.d.ts +4 -1
  261. package/lib/SideTip/locale/zh-TW.js +4 -1
  262. package/lib/SideTip/style/index.js +9 -0
  263. package/lib/TagSelect/Group.js +5 -1
  264. package/lib/TagSelect/Item.js +1 -1
  265. package/lib/assets/logo/oceanbase_logo.svg +45 -29
  266. package/lib/assets/logo/oceanbase_logo_dark.svg +45 -29
  267. package/lib/assets/logo/oceanbase_watermark.svg +45 -31
  268. package/lib/locale/en-US.js +24 -18
  269. package/lib/locale/ja-JP.js +24 -18
  270. package/lib/locale/zh-CN.js +25 -19
  271. package/lib/locale/zh-TW.js +21 -15
  272. package/package.json +4 -4
@@ -60,6 +60,8 @@ const DialogComp = props => {
60
60
  setRootWidth,
61
61
  isEmbed = false
62
62
  } = props;
63
+ const titleId = _react.default.useId();
64
+ const dialogRootRef = (0, _react.useRef)(null);
63
65
  const {
64
66
  getPrefixCls
65
67
  } = (0, _react.useContext)(_design.ConfigProvider.ConfigContext);
@@ -167,6 +169,29 @@ const DialogComp = props => {
167
169
  setDialogTop(tempState.top);
168
170
  setRootWidthInEmbedMode(tempState.width);
169
171
  }, [visible, clientWidth, clientHeight, getDefaultEmbedState, setRootWidthInEmbedMode]);
172
+ (0, _react.useEffect)(() => {
173
+ if (!visible) return;
174
+ const frame = requestAnimationFrame(() => {
175
+ if (!minimize) {
176
+ dialogRootRef.current?.focus({
177
+ preventScroll: true
178
+ });
179
+ }
180
+ });
181
+ return () => cancelAnimationFrame(frame);
182
+ }, [visible, minimize]);
183
+ (0, _react.useEffect)(() => {
184
+ if (!visible) return;
185
+ const onDocKeyDown = e => {
186
+ if (e.key !== 'Escape') return;
187
+ const root = dialogRootRef.current;
188
+ const target = e.target;
189
+ if (root && target && !root.contains(target)) return;
190
+ onClose?.();
191
+ };
192
+ document.addEventListener('keydown', onDocKeyDown);
193
+ return () => document.removeEventListener('keydown', onDocKeyDown);
194
+ }, [visible, onClose]);
170
195
  (0, _react.useEffect)(() => {
171
196
  if (isEmbed) {
172
197
  setMinimize(false);
@@ -386,24 +411,32 @@ const DialogComp = props => {
386
411
 
387
412
  // Render methods
388
413
  const renderControlLink = () => {
414
+ if (!extLink?.link) {
415
+ return null;
416
+ }
417
+ const linkText = extLink.text || locale?.openHelpCenter;
389
418
  return /*#__PURE__*/(0, _jsxRuntime.jsx)("span", {
390
419
  className: `${prefixCls}-item`,
391
- children: /*#__PURE__*/(0, _jsxRuntime.jsx)("a", {
420
+ children: /*#__PURE__*/(0, _jsxRuntime.jsxs)("a", {
392
421
  className: `${prefixCls}-item-link`,
393
- href: extLink?.link,
422
+ href: extLink.link,
394
423
  target: "_blank",
395
424
  rel: "noopener noreferrer",
396
- children: /*#__PURE__*/(0, _jsxRuntime.jsx)("svg", {
425
+ children: [/*#__PURE__*/(0, _jsxRuntime.jsx)("span", {
426
+ className: `${prefixCls}-item-link-text`,
427
+ children: linkText
428
+ }), /*#__PURE__*/(0, _jsxRuntime.jsx)("svg", {
397
429
  className: "icon",
398
430
  viewBox: "0 0 1024 1024",
399
431
  version: "1.1",
400
432
  xmlns: "http://www.w3.org/2000/svg",
401
433
  width: "16",
402
434
  height: "16",
435
+ "aria-hidden": true,
403
436
  children: /*#__PURE__*/(0, _jsxRuntime.jsx)("path", {
404
437
  d: "M880.0256 912.0256H144.0256a31.9488 31.9488 0 0 1-32.0512-32V144.0256c0-17.7152 14.336-32.0512 32.0512-32.0512h359.936c4.4544 0 8.0384 3.584 8.0384 8.0384v56.0128c0 4.352-3.584 7.9872-7.9872 7.9872h-320v655.9744h655.9744v-320c0-4.4032 3.584-7.9872 8.0384-7.9872h55.9616c4.4032 0 8.0384 3.584 8.0384 7.9872v359.9872c0 17.7152-14.336 32-32 32zM770.8672 199.1168l-52.224-52.224a8.0384 8.0384 0 0 1 4.7104-13.568l179.4048-20.992c5.12-0.6144 9.5232 3.6864 8.9088 8.9088l-20.992 179.4048a8.0384 8.0384 0 0 1-13.6192 4.6592L824.6784 252.928l-256.2048 256.2048c-3.072 3.072-8.192 3.072-11.264 0l-42.4448-42.3936a8.0384 8.0384 0 0 1 0-11.264l256.1024-256.3584z"
405
438
  })
406
- })
439
+ })]
407
440
  })
408
441
  });
409
442
  };
@@ -411,27 +444,47 @@ const DialogComp = props => {
411
444
  if (isEmbed) {
412
445
  return /*#__PURE__*/(0, _jsxRuntime.jsxs)("span", {
413
446
  className: `${prefixCls}-controls`,
414
- children: [renderControlLink(), /*#__PURE__*/(0, _jsxRuntime.jsx)("span", {
447
+ children: [renderControlLink(), /*#__PURE__*/(0, _jsxRuntime.jsx)("button", {
448
+ type: "button",
415
449
  className: `${prefixCls}-item`,
450
+ "aria-label": locale?.closeDialog,
416
451
  onClick: handleClose,
417
- children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_icons.CloseOutlined, {})
452
+ children: /*#__PURE__*/(0, _jsxRuntime.jsx)("span", {
453
+ "aria-hidden": true,
454
+ children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_icons.CloseOutlined, {})
455
+ })
418
456
  })]
419
457
  });
420
458
  }
421
459
  return /*#__PURE__*/(0, _jsxRuntime.jsxs)("span", {
422
460
  className: `${prefixCls}-controls`,
423
- children: [renderControlLink(), /*#__PURE__*/(0, _jsxRuntime.jsx)("span", {
461
+ children: [renderControlLink(), /*#__PURE__*/(0, _jsxRuntime.jsx)("button", {
462
+ type: "button",
424
463
  className: `${prefixCls}-item`,
464
+ "aria-label": minimize ? locale?.restoreWindow : locale?.minimize,
425
465
  onClick: toggleMinimize,
426
- children: minimize ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_icons.ExpandAltOutlined, {}) : /*#__PURE__*/(0, _jsxRuntime.jsx)(_icons.MinusOutlined, {})
427
- }), enableMaximization && /*#__PURE__*/(0, _jsxRuntime.jsx)("span", {
466
+ children: /*#__PURE__*/(0, _jsxRuntime.jsx)("span", {
467
+ "aria-hidden": true,
468
+ children: minimize ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_icons.ExpandAltOutlined, {}) : /*#__PURE__*/(0, _jsxRuntime.jsx)(_icons.MinusOutlined, {})
469
+ })
470
+ }), enableMaximization && /*#__PURE__*/(0, _jsxRuntime.jsx)("button", {
471
+ type: "button",
428
472
  className: `${prefixCls}-item`,
473
+ "aria-label": maximization ? locale?.exitFullscreen : locale?.maximize,
429
474
  onClick: toggleMaximization,
430
- children: maximization ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_icons.FullscreenExitOutlined, {}) : /*#__PURE__*/(0, _jsxRuntime.jsx)(_icons.FullscreenOutlined, {})
431
- }), /*#__PURE__*/(0, _jsxRuntime.jsx)("span", {
475
+ children: /*#__PURE__*/(0, _jsxRuntime.jsx)("span", {
476
+ "aria-hidden": true,
477
+ children: maximization ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_icons.FullscreenExitOutlined, {}) : /*#__PURE__*/(0, _jsxRuntime.jsx)(_icons.FullscreenOutlined, {})
478
+ })
479
+ }), /*#__PURE__*/(0, _jsxRuntime.jsx)("button", {
480
+ type: "button",
432
481
  className: `${prefixCls}-item`,
482
+ "aria-label": locale?.closeDialog,
433
483
  onClick: handleClose,
434
- children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_icons.CloseOutlined, {})
484
+ children: /*#__PURE__*/(0, _jsxRuntime.jsx)("span", {
485
+ "aria-hidden": true,
486
+ children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_icons.CloseOutlined, {})
487
+ })
435
488
  })]
436
489
  });
437
490
  };
@@ -452,6 +505,7 @@ const DialogComp = props => {
452
505
  onDoubleClick: toggleMaximization,
453
506
  children: [/*#__PURE__*/(0, _jsxRuntime.jsx)("span", {
454
507
  className: `${prefixCls}-title`,
508
+ id: titleId,
455
509
  children: title || locale?.helpDocument
456
510
  }), renderControls()]
457
511
  });
@@ -538,10 +592,14 @@ const DialogComp = props => {
538
592
  const renderDialog = () => {
539
593
  const style = getStyle;
540
594
  return wrapSSR( /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
595
+ ref: dialogRootRef,
541
596
  className: `${prefixCls}-container ${className || ''} ${isEmbed ? `${prefixCls}-container-embed` : ''}`,
542
597
  style: style,
598
+ role: "dialog",
599
+ "aria-modal": "true",
600
+ "aria-labelledby": titleId,
543
601
  ...(minimize ? {} : {
544
- tabIndex: 0
602
+ tabIndex: -1
545
603
  }),
546
604
  children: [renderHeader(), renderContent(), isEmbed ? renderEmbedBorders() : renderBorders(), /*#__PURE__*/(0, _jsxRuntime.jsx)(_EventProxy.EventProxy, {
547
605
  onPointerMove: onDragMove,
@@ -1,5 +1,10 @@
1
1
  declare const _default: {
2
2
  helpDocument: string;
3
3
  openHelpCenter: string;
4
+ closeDialog: string;
5
+ minimize: string;
6
+ restoreWindow: string;
7
+ maximize: string;
8
+ exitFullscreen: string;
4
9
  };
5
10
  export default _default;
@@ -6,5 +6,10 @@ Object.defineProperty(exports, "__esModule", {
6
6
  exports.default = void 0;
7
7
  var _default = exports.default = {
8
8
  helpDocument: 'Documentation',
9
- openHelpCenter: 'Document Center'
9
+ openHelpCenter: 'Document Center',
10
+ closeDialog: 'Close dialog',
11
+ minimize: 'Minimize',
12
+ restoreWindow: 'Restore window',
13
+ maximize: 'Maximize',
14
+ exitFullscreen: 'Exit fullscreen'
10
15
  };
@@ -1,5 +1,10 @@
1
1
  declare const _default: {
2
2
  helpDocument: string;
3
3
  openHelpCenter: string;
4
+ closeDialog: string;
5
+ minimize: string;
6
+ restoreWindow: string;
7
+ maximize: string;
8
+ exitFullscreen: string;
4
9
  };
5
10
  export default _default;
@@ -6,5 +6,10 @@ Object.defineProperty(exports, "__esModule", {
6
6
  exports.default = void 0;
7
7
  var _default = exports.default = {
8
8
  helpDocument: 'ヘルプ',
9
- openHelpCenter: 'ドキュメントセンターで開く'
9
+ openHelpCenter: 'ドキュメントセンターで開く',
10
+ closeDialog: 'ダイアログを閉じる',
11
+ minimize: '最小化',
12
+ restoreWindow: 'ウィンドウを復元',
13
+ maximize: '最大化',
14
+ exitFullscreen: '全画面を終了'
10
15
  };
@@ -1,5 +1,10 @@
1
1
  declare const _default: {
2
2
  helpDocument: string;
3
3
  openHelpCenter: string;
4
+ closeDialog: string;
5
+ minimize: string;
6
+ restoreWindow: string;
7
+ maximize: string;
8
+ exitFullscreen: string;
4
9
  };
5
10
  export default _default;
@@ -6,5 +6,10 @@ Object.defineProperty(exports, "__esModule", {
6
6
  exports.default = void 0;
7
7
  var _default = exports.default = {
8
8
  helpDocument: '帮助文档',
9
- openHelpCenter: '打开文档中心'
9
+ openHelpCenter: '打开文档中心',
10
+ closeDialog: '关闭对话框',
11
+ minimize: '最小化',
12
+ restoreWindow: '还原窗口',
13
+ maximize: '最大化',
14
+ exitFullscreen: '退出全屏'
10
15
  };
@@ -1,5 +1,10 @@
1
1
  declare const _default: {
2
2
  helpDocument: string;
3
3
  openHelpCenter: string;
4
+ closeDialog: string;
5
+ minimize: string;
6
+ restoreWindow: string;
7
+ maximize: string;
8
+ exitFullscreen: string;
4
9
  };
5
10
  export default _default;
@@ -6,5 +6,10 @@ Object.defineProperty(exports, "__esModule", {
6
6
  exports.default = void 0;
7
7
  var _default = exports.default = {
8
8
  helpDocument: '幫助文檔',
9
- openHelpCenter: '打開文檔中心'
9
+ openHelpCenter: '打開文檔中心',
10
+ closeDialog: '關閉對話框',
11
+ minimize: '最小化',
12
+ restoreWindow: '還原視窗',
13
+ maximize: '最大化',
14
+ exitFullscreen: '結束全螢幕'
10
15
  };
@@ -59,18 +59,38 @@ const genDialogStyle = token => {
59
59
  height: '100%',
60
60
  textAlign: 'center',
61
61
  [`${componentCls}-item`]: {
62
- display: 'inline-block',
63
- width: 15,
62
+ display: 'inline-flex',
63
+ alignItems: 'center',
64
+ justifyContent: 'center',
65
+ minWidth: 24,
66
+ minHeight: 24,
67
+ width: 24,
64
68
  marginLeft: 16,
65
69
  color: fontColor,
66
70
  fontSize: 15,
67
- lineHeight: 15,
71
+ lineHeight: 1,
68
72
  textAlign: 'center',
69
73
  cursor: 'pointer',
70
74
  transitionDuration: '0.3s',
75
+ border: 'none',
76
+ background: 'transparent',
77
+ padding: 0,
78
+ font: 'inherit',
79
+ verticalAlign: 'middle',
71
80
  [`${componentCls}-item-link`]: {
72
81
  paddingTop: 2,
73
82
  color: fontColor
83
+ },
84
+ [`${componentCls}-item-link-text`]: {
85
+ position: 'absolute',
86
+ width: 1,
87
+ height: 1,
88
+ padding: 0,
89
+ margin: -1,
90
+ overflow: 'hidden',
91
+ clip: 'rect(0, 0, 0, 0)',
92
+ whiteSpace: 'nowrap',
93
+ border: 0
74
94
  }
75
95
  }
76
96
  }
@@ -30,7 +30,8 @@ const DocDialogComp = props => {
30
30
  className,
31
31
  normalModeWidth = DEFAULT_MOBILE_CLIENT_WIDTH,
32
32
  embedConfig = {},
33
- normalConfig = {}
33
+ normalConfig = {},
34
+ locale
34
35
  } = props;
35
36
  // Avoid SSR issue: only read document/window on client (e.g. Next.js)
36
37
  const [clientHeight, setClientHeight] = (0, _react.useState)(0);
@@ -109,7 +110,8 @@ const DocDialogComp = props => {
109
110
  children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_Dialog.default, {
110
111
  ...DialogProps,
111
112
  children: /*#__PURE__*/(0, _jsxRuntime.jsx)("iframe", {
112
- src: currentLink
113
+ src: currentLink,
114
+ title: title || locale?.docIframeTitle
113
115
  })
114
116
  })
115
117
  });
@@ -1,2 +1,4 @@
1
- declare const _default: {};
1
+ declare const _default: {
2
+ docIframeTitle: string;
3
+ };
2
4
  export default _default;
@@ -4,4 +4,6 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
6
  exports.default = void 0;
7
- var _default = exports.default = {};
7
+ var _default = exports.default = {
8
+ docIframeTitle: 'Help documentation'
9
+ };
@@ -1,2 +1,4 @@
1
- declare const _default: {};
1
+ declare const _default: {
2
+ docIframeTitle: string;
3
+ };
2
4
  export default _default;
@@ -4,4 +4,6 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
6
  exports.default = void 0;
7
- var _default = exports.default = {};
7
+ var _default = exports.default = {
8
+ docIframeTitle: 'ヘルプドキュメント'
9
+ };
@@ -1,2 +1,4 @@
1
- declare const _default: {};
1
+ declare const _default: {
2
+ docIframeTitle: string;
3
+ };
2
4
  export default _default;
@@ -4,4 +4,6 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
6
  exports.default = void 0;
7
- var _default = exports.default = {};
7
+ var _default = exports.default = {
8
+ docIframeTitle: '帮助文档'
9
+ };
@@ -1,2 +1,4 @@
1
- declare const _default: {};
1
+ declare const _default: {
2
+ docIframeTitle: string;
3
+ };
2
4
  export default _default;
@@ -4,4 +4,6 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
6
  exports.default = void 0;
7
- var _default = exports.default = {};
7
+ var _default = exports.default = {
8
+ docIframeTitle: '說明文件'
9
+ };
@@ -1,5 +1,8 @@
1
- import React from 'react';
2
1
  import type { FooterToolbarProps as AntFooterToolbarProps } from '@ant-design/pro-layout/es/components/FooterToolbar';
3
- export type FooterToolbarProps = AntFooterToolbarProps;
4
- declare const FooterToolbar: React.FC<FooterToolbarProps>;
5
- export default FooterToolbar;
2
+ import type { LocaleWrapperProps } from '../locale/LocaleWrapper';
3
+ export interface FooterToolbarProps extends AntFooterToolbarProps, LocaleWrapperProps {
4
+ /** 覆盖 locale 中的 toolbar 可访问名称 */
5
+ toolbarAriaLabel?: string;
6
+ }
7
+ declare const _default: any;
8
+ export default _default;
@@ -7,17 +7,25 @@ exports.default = void 0;
7
7
  var _react = _interopRequireWildcard(require("react"));
8
8
  var _proComponents = require("@ant-design/pro-components");
9
9
  var _design = require("@oceanbase/design");
10
+ var _LocaleWrapper = _interopRequireDefault(require("../locale/LocaleWrapper"));
10
11
  var _style = _interopRequireDefault(require("./style"));
12
+ var _zhCN = _interopRequireDefault(require("./locale/zh-CN"));
11
13
  var _jsxRuntime = require("react/jsx-runtime");
12
14
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
13
15
  function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); }
14
16
  function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && Object.prototype.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
15
- const FooterToolbar = ({
16
- // render footer under parent instead of body by default
17
- portalDom = false,
18
- prefixCls: customizePrefixCls,
19
- ...restProps
20
- }) => {
17
+ const FooterToolbar = props => {
18
+ const {
19
+ portalDom = false,
20
+ prefixCls: customizePrefixCls,
21
+ toolbarAriaLabel,
22
+ locale,
23
+ ...rest
24
+ } = props;
25
+ const {
26
+ theme: _injectedTheme,
27
+ ...restProps
28
+ } = rest;
21
29
  const {
22
30
  getPrefixCls
23
31
  } = (0, _react.useContext)(_design.ConfigProvider.ConfigContext);
@@ -25,10 +33,18 @@ const FooterToolbar = ({
25
33
  const {
26
34
  wrapSSR
27
35
  } = (0, _style.default)(prefixCls);
28
- return wrapSSR( /*#__PURE__*/(0, _jsxRuntime.jsx)(_proComponents.FooterToolbar, {
29
- portalDom: portalDom,
30
- prefixCls: customizePrefixCls,
31
- ...restProps
36
+ const label = toolbarAriaLabel ?? locale?.toolbarLabel;
37
+ return wrapSSR( /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
38
+ role: "toolbar",
39
+ "aria-label": label,
40
+ children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_proComponents.FooterToolbar, {
41
+ portalDom: portalDom,
42
+ prefixCls: customizePrefixCls,
43
+ ...restProps
44
+ })
32
45
  }));
33
46
  };
34
- var _default = exports.default = FooterToolbar;
47
+ var _default = exports.default = (0, _LocaleWrapper.default)({
48
+ componentName: 'FooterToolbar',
49
+ defaultLocale: _zhCN.default
50
+ })(FooterToolbar);
@@ -0,0 +1,4 @@
1
+ declare const _default: {
2
+ toolbarLabel: string;
3
+ };
4
+ export default _default;
@@ -0,0 +1,9 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.default = void 0;
7
+ var _default = exports.default = {
8
+ toolbarLabel: 'Footer actions'
9
+ };
@@ -0,0 +1,4 @@
1
+ declare const _default: {
2
+ toolbarLabel: string;
3
+ };
4
+ export default _default;
@@ -0,0 +1,9 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.default = void 0;
7
+ var _default = exports.default = {
8
+ toolbarLabel: 'フッター操作'
9
+ };
@@ -0,0 +1,4 @@
1
+ declare const _default: {
2
+ toolbarLabel: string;
3
+ };
4
+ export default _default;
@@ -0,0 +1,9 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.default = void 0;
7
+ var _default = exports.default = {
8
+ toolbarLabel: '底部操作栏'
9
+ };
@@ -0,0 +1,4 @@
1
+ declare const _default: {
2
+ toolbarLabel: string;
3
+ };
4
+ export default _default;
@@ -0,0 +1,9 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.default = void 0;
7
+ var _default = exports.default = {
8
+ toolbarLabel: '底部操作列'
9
+ };
@@ -22,7 +22,8 @@ const FullscreenBox = /*#__PURE__*/_react.default.forwardRef(({
22
22
  className,
23
23
  defaultMode,
24
24
  children,
25
- onChange
25
+ onChange,
26
+ locale
26
27
  }, ref) => {
27
28
  const {
28
29
  getPrefixCls
@@ -99,13 +100,8 @@ const FullscreenBox = /*#__PURE__*/_react.default.forwardRef(({
99
100
  changeFullscreen(fullscreen);
100
101
  }
101
102
  }));
102
- const icon = innerFullscreen ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_icons.FullscreenExitOutlined, {
103
- className: `${prefixCls}-header-icon`,
104
- onClick: toggleFullscreen
105
- }) : /*#__PURE__*/(0, _jsxRuntime.jsx)(_icons.FullscreenOutlined, {
106
- className: `${prefixCls}-header-icon`,
107
- onClick: toggleFullscreen
108
- });
103
+ const fullscreenLabel = innerFullscreen ? locale?.exitFullscreen : locale?.enterFullscreen;
104
+ const fullscreenIcon = innerFullscreen ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_icons.FullscreenExitOutlined, {}) : /*#__PURE__*/(0, _jsxRuntime.jsx)(_icons.FullscreenOutlined, {});
109
105
  (0, _react.useEffect)(() => {
110
106
  if (innerFullscreen) {
111
107
  document.body.classList.add(`${prefixCls}-body-overflow-hidden`);
@@ -133,7 +129,18 @@ const FullscreenBox = /*#__PURE__*/_react.default.forwardRef(({
133
129
  "data-testid": "header",
134
130
  children: [/*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
135
131
  className: `${prefixCls}-header-left`,
136
- children: [icon, title && /*#__PURE__*/(0, _jsxRuntime.jsx)("span", {
132
+ children: [/*#__PURE__*/(0, _jsxRuntime.jsx)("button", {
133
+ type: "button",
134
+ className: `${prefixCls}-header-icon-btn`,
135
+ "aria-label": fullscreenLabel,
136
+ "aria-pressed": innerFullscreen,
137
+ onClick: toggleFullscreen,
138
+ children: /*#__PURE__*/(0, _jsxRuntime.jsx)("span", {
139
+ className: `${prefixCls}-header-icon`,
140
+ "aria-hidden": true,
141
+ children: fullscreenIcon
142
+ })
143
+ }), title && /*#__PURE__*/(0, _jsxRuntime.jsx)("span", {
137
144
  className: `${prefixCls}-header-title`,
138
145
  children: title
139
146
  })]
@@ -146,9 +153,10 @@ const FullscreenBox = /*#__PURE__*/_react.default.forwardRef(({
146
153
  return wrapSSR( /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
147
154
  ref: containerRef,
148
155
  style: style,
149
- className: (0, _classnames.default)(`${prefixCls}-box`, className, {
150
- [`${prefixCls}-box-fullscreen`]: innerFullscreen
156
+ className: (0, _classnames.default)(prefixCls, className, {
157
+ [`${prefixCls}-fullscreen`]: innerFullscreen
151
158
  }),
159
+ "aria-live": "polite",
152
160
  children: [headerContent, children]
153
161
  }));
154
162
  });
@@ -1,2 +1,5 @@
1
- declare const _default: {};
1
+ declare const _default: {
2
+ enterFullscreen: string;
3
+ exitFullscreen: string;
4
+ };
2
5
  export default _default;
@@ -4,4 +4,7 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
6
  exports.default = void 0;
7
- var _default = exports.default = {};
7
+ var _default = exports.default = {
8
+ enterFullscreen: 'Enter fullscreen',
9
+ exitFullscreen: 'Exit fullscreen'
10
+ };
@@ -1,2 +1,5 @@
1
- declare const _default: {};
1
+ declare const _default: {
2
+ enterFullscreen: string;
3
+ exitFullscreen: string;
4
+ };
2
5
  export default _default;
@@ -4,4 +4,7 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
6
  exports.default = void 0;
7
- var _default = exports.default = {};
7
+ var _default = exports.default = {
8
+ enterFullscreen: '全画面表示',
9
+ exitFullscreen: '全画面表示を終了'
10
+ };
@@ -1,2 +1,5 @@
1
- declare const _default: {};
1
+ declare const _default: {
2
+ enterFullscreen: string;
3
+ exitFullscreen: string;
4
+ };
2
5
  export default _default;
@@ -4,4 +4,7 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
6
  exports.default = void 0;
7
- var _default = exports.default = {};
7
+ var _default = exports.default = {
8
+ enterFullscreen: '进入全屏',
9
+ exitFullscreen: '退出全屏'
10
+ };
@@ -1,2 +1,5 @@
1
- declare const _default: {};
1
+ declare const _default: {
2
+ enterFullscreen: string;
3
+ exitFullscreen: string;
4
+ };
2
5
  export default _default;
@@ -4,4 +4,7 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
6
  exports.default = void 0;
7
- var _default = exports.default = {};
7
+ var _default = exports.default = {
8
+ enterFullscreen: '進入全螢幕',
9
+ exitFullscreen: '退出全螢幕'
10
+ };