@oceanbase/ui 1.0.0-alpha.8 → 1.0.0

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 (461) 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 +292 -120
  4. package/es/Action/Item.js +1 -0
  5. package/es/Action/index.js +1 -0
  6. package/es/BackgroundTaskManager/RefreshMan.js +1 -0
  7. package/es/BackgroundTaskManager/index.d.ts +2 -0
  8. package/es/BackgroundTaskManager/index.js +26 -4
  9. package/es/BasicLayout/Header.js +1 -0
  10. package/es/BasicLayout/index.d.ts +3 -1
  11. package/es/BasicLayout/index.js +63 -24
  12. package/es/BasicLayout/locale/en-US.d.ts +3 -0
  13. package/es/BasicLayout/locale/en-US.js +4 -1
  14. package/es/BasicLayout/locale/ja-JP.d.ts +3 -0
  15. package/es/BasicLayout/locale/ja-JP.js +4 -1
  16. package/es/BasicLayout/locale/zh-CN.d.ts +3 -0
  17. package/es/BasicLayout/locale/zh-CN.js +4 -1
  18. package/es/BasicLayout/locale/zh-TW.d.ts +3 -0
  19. package/es/BasicLayout/locale/zh-TW.js +4 -1
  20. package/es/BasicLayout/style/index.js +11 -3
  21. package/es/BatchOperationBar/index.js +16 -4
  22. package/es/BatchOperationBar/locale/en-US.d.ts +1 -0
  23. package/es/BatchOperationBar/locale/en-US.js +2 -1
  24. package/es/BatchOperationBar/locale/ja-JP.d.ts +1 -0
  25. package/es/BatchOperationBar/locale/ja-JP.js +2 -1
  26. package/es/BatchOperationBar/locale/zh-CN.d.ts +1 -0
  27. package/es/BatchOperationBar/locale/zh-CN.js +2 -1
  28. package/es/BatchOperationBar/locale/zh-TW.d.ts +1 -0
  29. package/es/BatchOperationBar/locale/zh-TW.js +2 -1
  30. package/es/BatchOperationBar/style/index.js +6 -1
  31. package/es/Boundary/Components/Code.js +2 -1
  32. package/es/Boundary/Components/Exception.js +3 -2
  33. package/es/Boundary/Components/Function.js +2 -1
  34. package/es/Boundary/index.js +1 -0
  35. package/es/Boundary/style/index.js +5 -3
  36. package/es/ContentWithIcon/index.js +1 -0
  37. package/es/ContentWithQuestion/index.js +1 -0
  38. package/es/DateRanger/EditableDateTimeInput.d.ts +23 -0
  39. package/es/DateRanger/EditableDateTimeInput.js +129 -0
  40. package/es/DateRanger/PickerPanel.js +32 -16
  41. package/es/DateRanger/Ranger.d.ts +4 -1
  42. package/es/DateRanger/Ranger.js +59 -42
  43. package/es/DateRanger/hooks/index.d.ts +4 -0
  44. package/es/DateRanger/hooks/index.js +2 -0
  45. package/es/DateRanger/hooks/useAutoWidthInput.d.ts +13 -0
  46. package/es/DateRanger/hooks/useAutoWidthInput.js +44 -0
  47. package/es/DateRanger/hooks/useSegmentedInput.d.ts +31 -0
  48. package/es/DateRanger/hooks/useSegmentedInput.js +304 -0
  49. package/es/DateRanger/index.js +1 -0
  50. package/es/DateRanger/locale/en-US.d.ts +2 -0
  51. package/es/DateRanger/locale/en-US.js +3 -1
  52. package/es/DateRanger/locale/ja-JP.d.ts +2 -0
  53. package/es/DateRanger/locale/ja-JP.js +3 -1
  54. package/es/DateRanger/locale/zh-CN.d.ts +2 -0
  55. package/es/DateRanger/locale/zh-CN.js +3 -1
  56. package/es/DateRanger/locale/zh-TW.d.ts +2 -0
  57. package/es/DateRanger/locale/zh-TW.js +3 -1
  58. package/es/DateRanger/style/index.js +52 -14
  59. package/es/Dialog/Anchor.js +1 -0
  60. package/es/Dialog/EventProxy.js +1 -0
  61. package/es/Dialog/index.d.ts +5 -0
  62. package/es/Dialog/index.js +78 -14
  63. package/es/Dialog/locale/en-US.d.ts +5 -0
  64. package/es/Dialog/locale/en-US.js +6 -1
  65. package/es/Dialog/locale/ja-JP.d.ts +5 -0
  66. package/es/Dialog/locale/ja-JP.js +6 -1
  67. package/es/Dialog/locale/zh-CN.d.ts +5 -0
  68. package/es/Dialog/locale/zh-CN.js +6 -1
  69. package/es/Dialog/locale/zh-TW.d.ts +5 -0
  70. package/es/Dialog/locale/zh-TW.js +6 -1
  71. package/es/Dialog/style/index.js +25 -6
  72. package/es/DocDialog/index.js +29 -9
  73. package/es/DocDialog/locale/en-US.d.ts +3 -1
  74. package/es/DocDialog/locale/en-US.js +3 -1
  75. package/es/DocDialog/locale/ja-JP.d.ts +3 -1
  76. package/es/DocDialog/locale/ja-JP.js +3 -1
  77. package/es/DocDialog/locale/zh-CN.d.ts +3 -1
  78. package/es/DocDialog/locale/zh-CN.js +3 -1
  79. package/es/DocDialog/locale/zh-TW.d.ts +3 -1
  80. package/es/DocDialog/locale/zh-TW.js +3 -1
  81. package/es/FooterToolbar/index.d.ts +7 -4
  82. package/es/FooterToolbar/index.js +28 -11
  83. package/es/FooterToolbar/locale/en-US.d.ts +4 -0
  84. package/es/FooterToolbar/locale/en-US.js +3 -0
  85. package/es/FooterToolbar/locale/ja-JP.d.ts +4 -0
  86. package/es/FooterToolbar/locale/ja-JP.js +3 -0
  87. package/es/FooterToolbar/locale/zh-CN.d.ts +4 -0
  88. package/es/FooterToolbar/locale/zh-CN.js +3 -0
  89. package/es/FooterToolbar/locale/zh-TW.d.ts +4 -0
  90. package/es/FooterToolbar/locale/zh-TW.js +3 -0
  91. package/es/FooterToolbar/style/index.js +3 -6
  92. package/es/FullscreenBox/index.js +19 -10
  93. package/es/FullscreenBox/locale/en-US.d.ts +4 -1
  94. package/es/FullscreenBox/locale/en-US.js +4 -1
  95. package/es/FullscreenBox/locale/ja-JP.d.ts +4 -1
  96. package/es/FullscreenBox/locale/ja-JP.js +4 -1
  97. package/es/FullscreenBox/locale/zh-CN.d.ts +4 -1
  98. package/es/FullscreenBox/locale/zh-CN.js +4 -1
  99. package/es/FullscreenBox/locale/zh-TW.d.ts +4 -1
  100. package/es/FullscreenBox/locale/zh-TW.js +4 -1
  101. package/es/FullscreenBox/style/index.js +32 -11
  102. package/es/Highlight/DiffView/DiffCells.js +1 -0
  103. package/es/Highlight/DiffView/index.js +1 -0
  104. package/es/Highlight/HighlightCell.js +1 -0
  105. package/es/Highlight/JsonView.js +1 -0
  106. package/es/Highlight/index.js +10 -2
  107. package/es/Highlight/locale/en-US.d.ts +2 -0
  108. package/es/Highlight/locale/en-US.js +3 -1
  109. package/es/Highlight/locale/ja-JP.d.ts +2 -0
  110. package/es/Highlight/locale/ja-JP.js +3 -1
  111. package/es/Highlight/locale/zh-CN.d.ts +2 -0
  112. package/es/Highlight/locale/zh-CN.js +3 -1
  113. package/es/Highlight/locale/zh-TW.d.ts +2 -0
  114. package/es/Highlight/locale/zh-TW.js +3 -1
  115. package/es/Highlight/style/index.js +1 -1
  116. package/es/Highlight/useKeyDownCopyEvent.js +1 -0
  117. package/es/IconFont/index.js +1 -0
  118. package/es/LightFilter/index.d.ts +6 -2
  119. package/es/LightFilter/index.js +25 -8
  120. package/es/LightFilter/locale/en-US.d.ts +4 -0
  121. package/es/LightFilter/locale/en-US.js +3 -0
  122. package/es/LightFilter/locale/ja-JP.d.ts +4 -0
  123. package/es/LightFilter/locale/ja-JP.js +3 -0
  124. package/es/LightFilter/locale/zh-CN.d.ts +4 -0
  125. package/es/LightFilter/locale/zh-CN.js +3 -0
  126. package/es/LightFilter/locale/zh-TW.d.ts +4 -0
  127. package/es/LightFilter/locale/zh-TW.js +3 -0
  128. package/es/LocaleDropdown/index.js +1 -0
  129. package/es/Login/ActivateForm.js +1 -0
  130. package/es/Login/LoginForm.js +1 -0
  131. package/es/Login/RegisterForm.js +1 -0
  132. package/es/Login/index.js +1 -0
  133. package/es/Login/style/index.js +1 -1
  134. package/es/Lottie/index.js +1 -0
  135. package/es/NavMenu/index.d.ts +5 -2
  136. package/es/NavMenu/index.js +28 -5
  137. package/es/NavMenu/locale/en-US.d.ts +4 -0
  138. package/es/NavMenu/locale/en-US.js +3 -0
  139. package/es/NavMenu/locale/ja-JP.d.ts +4 -0
  140. package/es/NavMenu/locale/ja-JP.js +3 -0
  141. package/es/NavMenu/locale/zh-CN.d.ts +4 -0
  142. package/es/NavMenu/locale/zh-CN.js +3 -0
  143. package/es/NavMenu/locale/zh-TW.d.ts +4 -0
  144. package/es/NavMenu/locale/zh-TW.js +3 -0
  145. package/es/PageContainer/ItemRender.js +1 -0
  146. package/es/PageContainer/index.js +62 -19
  147. package/es/PageContainer/style/index.js +26 -11
  148. package/es/PageLoading/index.js +1 -0
  149. package/es/Password/Content.d.ts +2 -0
  150. package/es/Password/Content.js +12 -3
  151. package/es/Password/index.d.ts +1 -0
  152. package/es/Password/index.js +18 -13
  153. package/es/Password/locale/en-US.d.ts +1 -0
  154. package/es/Password/locale/en-US.js +2 -1
  155. package/es/Password/locale/ja-JP.d.ts +1 -0
  156. package/es/Password/locale/ja-JP.js +1 -0
  157. package/es/Password/locale/zh-CN.d.ts +1 -0
  158. package/es/Password/locale/zh-CN.js +1 -0
  159. package/es/Password/locale/zh-TW.d.ts +1 -0
  160. package/es/Password/locale/zh-TW.js +2 -1
  161. package/es/ProCard/index.js +1 -0
  162. package/es/ProCard/style/index.js +9 -4
  163. package/es/ProTable/index.js +10 -2
  164. package/es/Ranger/QuickPicker.js +1 -0
  165. package/es/Ranger/Ranger.js +1 -0
  166. package/es/Ranger/index.js +1 -0
  167. package/es/Ranger/style/index.js +1 -1
  168. package/es/SideTip/Dragger.js +3 -1
  169. package/es/SideTip/IconLoading.js +1 -0
  170. package/es/SideTip/index.js +39 -8
  171. package/es/SideTip/locale/en-US.d.ts +4 -1
  172. package/es/SideTip/locale/en-US.js +4 -1
  173. package/es/SideTip/locale/ja-JP.d.ts +4 -1
  174. package/es/SideTip/locale/ja-JP.js +4 -1
  175. package/es/SideTip/locale/zh-CN.d.ts +4 -1
  176. package/es/SideTip/locale/zh-CN.js +4 -1
  177. package/es/SideTip/locale/zh-TW.d.ts +4 -1
  178. package/es/SideTip/locale/zh-TW.js +4 -1
  179. package/es/SideTip/style/index.js +10 -1
  180. package/es/TagSelect/Group.js +7 -2
  181. package/es/TagSelect/Item.js +3 -1
  182. package/es/TagSelect/index.js +1 -0
  183. package/es/TreeSearch/index.js +1 -0
  184. package/es/Welcome/index.js +1 -0
  185. package/es/Welcome/step.js +1 -0
  186. package/es/_util/genComponentStyleHook.d.ts +2 -1
  187. package/es/_util/index.js +6 -0
  188. package/es/assets/logo/oceanbase_logo.svg +45 -29
  189. package/es/assets/logo/oceanbase_logo_dark.svg +45 -29
  190. package/es/assets/logo/oceanbase_watermark.svg +45 -31
  191. package/es/constant/index.js +1 -0
  192. package/es/index.js +1 -0
  193. package/es/locale/LocaleWrapper.js +1 -0
  194. package/es/locale/en-US.js +6 -0
  195. package/es/locale/index.js +1 -0
  196. package/es/locale/ja-JP.js +6 -0
  197. package/es/locale/zh-CN.js +6 -0
  198. package/es/locale/zh-TW.js +6 -0
  199. package/lib/Action/Group.d.ts +1 -2
  200. package/lib/Action/Group.js +333 -176
  201. package/lib/Action/Item.js +47 -66
  202. package/lib/Action/index.js +13 -36
  203. package/lib/Action/style/index.js +25 -43
  204. package/lib/BackgroundTaskManager/RefreshMan.js +34 -51
  205. package/lib/BackgroundTaskManager/constants.js +10 -32
  206. package/lib/BackgroundTaskManager/index.d.ts +2 -0
  207. package/lib/BackgroundTaskManager/index.js +137 -126
  208. package/lib/BasicLayout/Header.js +242 -200
  209. package/lib/BasicLayout/index.d.ts +3 -1
  210. package/lib/BasicLayout/index.js +308 -317
  211. package/lib/BasicLayout/locale/en-US.d.ts +3 -0
  212. package/lib/BasicLayout/locale/en-US.js +19 -34
  213. package/lib/BasicLayout/locale/ja-JP.d.ts +3 -0
  214. package/lib/BasicLayout/locale/ja-JP.js +19 -34
  215. package/lib/BasicLayout/locale/zh-CN.d.ts +3 -0
  216. package/lib/BasicLayout/locale/zh-CN.js +19 -34
  217. package/lib/BasicLayout/locale/zh-TW.d.ts +3 -0
  218. package/lib/BasicLayout/locale/zh-TW.js +19 -34
  219. package/lib/BasicLayout/style/Header.js +41 -60
  220. package/lib/BasicLayout/style/index.js +186 -198
  221. package/lib/BatchOperationBar/index.js +120 -152
  222. package/lib/BatchOperationBar/locale/en-US.d.ts +1 -0
  223. package/lib/BatchOperationBar/locale/en-US.js +11 -28
  224. package/lib/BatchOperationBar/locale/ja-JP.d.ts +1 -0
  225. package/lib/BatchOperationBar/locale/ja-JP.js +11 -28
  226. package/lib/BatchOperationBar/locale/zh-CN.d.ts +1 -0
  227. package/lib/BatchOperationBar/locale/zh-CN.js +11 -28
  228. package/lib/BatchOperationBar/locale/zh-TW.d.ts +1 -0
  229. package/lib/BatchOperationBar/locale/zh-TW.js +11 -28
  230. package/lib/BatchOperationBar/style/index.js +35 -46
  231. package/lib/Boundary/Components/Code.js +57 -76
  232. package/lib/Boundary/Components/Exception.js +103 -124
  233. package/lib/Boundary/Components/Function.js +47 -63
  234. package/lib/Boundary/Components/index.js +36 -25
  235. package/lib/Boundary/IBoundary.js +4 -16
  236. package/lib/Boundary/constant.js +16 -38
  237. package/lib/Boundary/index.js +11 -25
  238. package/lib/Boundary/locale/en-US.js +14 -32
  239. package/lib/Boundary/locale/ja-JP.js +14 -32
  240. package/lib/Boundary/locale/zh-CN.js +14 -32
  241. package/lib/Boundary/locale/zh-TW.js +14 -32
  242. package/lib/Boundary/style/index.js +32 -49
  243. package/lib/Boundary/utils.js +9 -31
  244. package/lib/ContentWithIcon/index.js +101 -115
  245. package/lib/ContentWithIcon/style/index.js +17 -36
  246. package/lib/ContentWithQuestion/index.js +40 -53
  247. package/lib/ContentWithQuestion/style/index.js +16 -35
  248. package/lib/DateRanger/EditableDateTimeInput.d.ts +23 -0
  249. package/lib/DateRanger/EditableDateTimeInput.js +131 -0
  250. package/lib/DateRanger/PickerPanel.js +358 -329
  251. package/lib/DateRanger/Ranger.d.ts +4 -1
  252. package/lib/DateRanger/Ranger.js +446 -516
  253. package/lib/DateRanger/constant/index.js +188 -376
  254. package/lib/DateRanger/hooks/index.d.ts +4 -0
  255. package/lib/DateRanger/hooks/index.js +19 -0
  256. package/lib/DateRanger/hooks/useAutoWidthInput.d.ts +13 -0
  257. package/lib/DateRanger/hooks/useAutoWidthInput.js +37 -0
  258. package/lib/DateRanger/hooks/useSegmentedInput.d.ts +31 -0
  259. package/lib/DateRanger/hooks/useSegmentedInput.js +233 -0
  260. package/lib/DateRanger/index.js +45 -65
  261. package/lib/DateRanger/locale/en-US.d.ts +2 -0
  262. package/lib/DateRanger/locale/en-US.js +22 -47
  263. package/lib/DateRanger/locale/ja-JP.d.ts +2 -0
  264. package/lib/DateRanger/locale/ja-JP.js +22 -47
  265. package/lib/DateRanger/locale/zh-CN.d.ts +2 -0
  266. package/lib/DateRanger/locale/zh-CN.js +22 -47
  267. package/lib/DateRanger/locale/zh-TW.d.ts +2 -0
  268. package/lib/DateRanger/locale/zh-TW.js +22 -47
  269. package/lib/DateRanger/style/index.js +101 -72
  270. package/lib/DateRanger/typing.js +4 -16
  271. package/lib/Dialog/Anchor.js +70 -96
  272. package/lib/Dialog/Dock.js +14 -36
  273. package/lib/Dialog/EventProxy.js +21 -40
  274. package/lib/Dialog/index.d.ts +5 -0
  275. package/lib/Dialog/index.js +385 -371
  276. package/lib/Dialog/locale/en-US.d.ts +5 -0
  277. package/lib/Dialog/locale/en-US.js +13 -26
  278. package/lib/Dialog/locale/ja-JP.d.ts +5 -0
  279. package/lib/Dialog/locale/ja-JP.js +13 -26
  280. package/lib/Dialog/locale/zh-CN.d.ts +5 -0
  281. package/lib/Dialog/locale/zh-CN.js +13 -26
  282. package/lib/Dialog/locale/zh-TW.d.ts +5 -0
  283. package/lib/Dialog/locale/zh-TW.js +13 -26
  284. package/lib/Dialog/style/index.js +81 -79
  285. package/lib/DocDialog/index.js +69 -82
  286. package/lib/DocDialog/locale/en-US.d.ts +3 -1
  287. package/lib/DocDialog/locale/en-US.js +7 -23
  288. package/lib/DocDialog/locale/ja-JP.d.ts +3 -1
  289. package/lib/DocDialog/locale/ja-JP.js +7 -23
  290. package/lib/DocDialog/locale/zh-CN.d.ts +3 -1
  291. package/lib/DocDialog/locale/zh-CN.js +7 -23
  292. package/lib/DocDialog/locale/zh-TW.d.ts +3 -1
  293. package/lib/DocDialog/locale/zh-TW.js +7 -23
  294. package/lib/FooterToolbar/index.d.ts +7 -4
  295. package/lib/FooterToolbar/index.js +48 -51
  296. package/lib/FooterToolbar/locale/en-US.d.ts +4 -0
  297. package/lib/FooterToolbar/locale/en-US.js +9 -0
  298. package/lib/FooterToolbar/locale/ja-JP.d.ts +4 -0
  299. package/lib/FooterToolbar/locale/ja-JP.js +9 -0
  300. package/lib/FooterToolbar/locale/zh-CN.d.ts +4 -0
  301. package/lib/FooterToolbar/locale/zh-CN.js +9 -0
  302. package/lib/FooterToolbar/locale/zh-TW.d.ts +4 -0
  303. package/lib/FooterToolbar/locale/zh-TW.js +9 -0
  304. package/lib/FooterToolbar/style/index.js +22 -40
  305. package/lib/FullscreenBox/index.js +159 -139
  306. package/lib/FullscreenBox/locale/en-US.d.ts +4 -1
  307. package/lib/FullscreenBox/locale/en-US.js +8 -23
  308. package/lib/FullscreenBox/locale/ja-JP.d.ts +4 -1
  309. package/lib/FullscreenBox/locale/ja-JP.js +8 -23
  310. package/lib/FullscreenBox/locale/zh-CN.d.ts +4 -1
  311. package/lib/FullscreenBox/locale/zh-CN.js +8 -23
  312. package/lib/FullscreenBox/locale/zh-TW.d.ts +4 -1
  313. package/lib/FullscreenBox/locale/zh-TW.js +8 -23
  314. package/lib/FullscreenBox/style/index.js +52 -48
  315. package/lib/Highlight/DiffView/DiffCells.js +34 -55
  316. package/lib/Highlight/DiffView/index.js +165 -164
  317. package/lib/Highlight/HighlightCell.js +28 -48
  318. package/lib/Highlight/JsonView.js +45 -75
  319. package/lib/Highlight/index.js +206 -214
  320. package/lib/Highlight/languages/bash.js +7 -34
  321. package/lib/Highlight/languages/cpp.js +7 -34
  322. package/lib/Highlight/languages/css.js +7 -34
  323. package/lib/Highlight/languages/dockerfile.js +7 -34
  324. package/lib/Highlight/languages/go.js +7 -34
  325. package/lib/Highlight/languages/groovy.js +7 -34
  326. package/lib/Highlight/languages/http.js +7 -34
  327. package/lib/Highlight/languages/java.js +7 -34
  328. package/lib/Highlight/languages/javascript.js +7 -34
  329. package/lib/Highlight/languages/json.js +7 -34
  330. package/lib/Highlight/languages/markdown.js +7 -34
  331. package/lib/Highlight/languages/nginx.js +7 -34
  332. package/lib/Highlight/languages/python.js +7 -34
  333. package/lib/Highlight/languages/ruby.js +7 -34
  334. package/lib/Highlight/languages/solidity.js +7 -34
  335. package/lib/Highlight/languages/sql.js +7 -34
  336. package/lib/Highlight/languages/typescript.js +7 -34
  337. package/lib/Highlight/languages/xml.js +7 -34
  338. package/lib/Highlight/languages/yaml.js +7 -34
  339. package/lib/Highlight/locale/en-US.d.ts +2 -0
  340. package/lib/Highlight/locale/en-US.js +9 -25
  341. package/lib/Highlight/locale/ja-JP.d.ts +2 -0
  342. package/lib/Highlight/locale/ja-JP.js +9 -25
  343. package/lib/Highlight/locale/zh-CN.d.ts +2 -0
  344. package/lib/Highlight/locale/zh-CN.js +9 -25
  345. package/lib/Highlight/locale/zh-TW.d.ts +2 -0
  346. package/lib/Highlight/locale/zh-TW.js +9 -25
  347. package/lib/Highlight/style/index.js +129 -145
  348. package/lib/Highlight/useKeyDownCopyEvent.js +40 -65
  349. package/lib/IconFont/index.js +23 -29
  350. package/lib/LightFilter/index.d.ts +6 -2
  351. package/lib/LightFilter/index.js +46 -44
  352. package/lib/LightFilter/locale/en-US.d.ts +4 -0
  353. package/lib/LightFilter/locale/en-US.js +9 -0
  354. package/lib/LightFilter/locale/ja-JP.d.ts +4 -0
  355. package/lib/LightFilter/locale/ja-JP.js +9 -0
  356. package/lib/LightFilter/locale/zh-CN.d.ts +4 -0
  357. package/lib/LightFilter/locale/zh-CN.js +9 -0
  358. package/lib/LightFilter/locale/zh-TW.d.ts +4 -0
  359. package/lib/LightFilter/locale/zh-TW.js +9 -0
  360. package/lib/LightFilter/style/index.js +15 -33
  361. package/lib/LocaleDropdown/index.js +43 -54
  362. package/lib/Login/ActivateForm.js +93 -120
  363. package/lib/Login/LoginForm.js +149 -185
  364. package/lib/Login/RegisterForm.js +122 -164
  365. package/lib/Login/index.js +157 -163
  366. package/lib/Login/locale/en-US.js +31 -49
  367. package/lib/Login/locale/ja-JP.js +31 -49
  368. package/lib/Login/locale/zh-CN.js +31 -49
  369. package/lib/Login/locale/zh-TW.js +30 -48
  370. package/lib/Login/style/index.js +78 -99
  371. package/lib/Lottie/index.js +7 -25
  372. package/lib/NavMenu/index.d.ts +5 -2
  373. package/lib/NavMenu/index.js +121 -110
  374. package/lib/NavMenu/locale/en-US.d.ts +4 -0
  375. package/lib/NavMenu/locale/en-US.js +9 -0
  376. package/lib/NavMenu/locale/ja-JP.d.ts +4 -0
  377. package/lib/NavMenu/locale/ja-JP.js +9 -0
  378. package/lib/NavMenu/locale/zh-CN.d.ts +4 -0
  379. package/lib/NavMenu/locale/zh-CN.js +9 -0
  380. package/lib/NavMenu/locale/zh-TW.d.ts +4 -0
  381. package/lib/NavMenu/locale/zh-TW.js +9 -0
  382. package/lib/NavMenu/style/index.js +31 -49
  383. package/lib/PageContainer/ItemRender.js +28 -47
  384. package/lib/PageContainer/index.js +161 -142
  385. package/lib/PageContainer/locale/en-US.js +8 -26
  386. package/lib/PageContainer/locale/ja-JP.js +8 -26
  387. package/lib/PageContainer/locale/zh-CN.js +8 -26
  388. package/lib/PageContainer/locale/zh-TW.js +8 -26
  389. package/lib/PageContainer/style/index.js +55 -47
  390. package/lib/PageLoading/index.js +33 -55
  391. package/lib/Password/Content.d.ts +2 -0
  392. package/lib/Password/Content.js +100 -81
  393. package/lib/Password/index.d.ts +1 -0
  394. package/lib/Password/index.js +132 -161
  395. package/lib/Password/locale/en-US.d.ts +1 -0
  396. package/lib/Password/locale/en-US.js +15 -32
  397. package/lib/Password/locale/ja-JP.d.ts +1 -0
  398. package/lib/Password/locale/ja-JP.js +17 -34
  399. package/lib/Password/locale/zh-CN.d.ts +1 -0
  400. package/lib/Password/locale/zh-CN.js +16 -33
  401. package/lib/Password/locale/zh-TW.d.ts +1 -0
  402. package/lib/Password/locale/zh-TW.js +15 -32
  403. package/lib/ProCard/index.js +77 -99
  404. package/lib/ProCard/style/index.js +31 -38
  405. package/lib/ProTable/index.js +102 -123
  406. package/lib/ProTable/style/index.js +21 -38
  407. package/lib/Ranger/QuickPicker.js +92 -95
  408. package/lib/Ranger/Ranger.js +98 -134
  409. package/lib/Ranger/constant/index.js +115 -266
  410. package/lib/Ranger/index.js +61 -70
  411. package/lib/Ranger/locale/en-US.js +31 -49
  412. package/lib/Ranger/locale/ja-JP.js +31 -49
  413. package/lib/Ranger/locale/zh-CN.js +7 -25
  414. package/lib/Ranger/locale/zh-TW.js +7 -25
  415. package/lib/Ranger/style/index.js +22 -40
  416. package/lib/Ranger/typing.js +4 -16
  417. package/lib/SideTip/Dragger.js +259 -220
  418. package/lib/SideTip/IconLoading.js +43 -75
  419. package/lib/SideTip/index.js +155 -128
  420. package/lib/SideTip/locale/en-US.d.ts +4 -1
  421. package/lib/SideTip/locale/en-US.js +8 -23
  422. package/lib/SideTip/locale/ja-JP.d.ts +4 -1
  423. package/lib/SideTip/locale/ja-JP.js +8 -23
  424. package/lib/SideTip/locale/zh-CN.d.ts +4 -1
  425. package/lib/SideTip/locale/zh-CN.js +8 -23
  426. package/lib/SideTip/locale/zh-TW.d.ts +4 -1
  427. package/lib/SideTip/locale/zh-TW.js +8 -23
  428. package/lib/SideTip/style/index.js +85 -92
  429. package/lib/SideTip/utils.js +40 -61
  430. package/lib/TagSelect/Group.js +68 -84
  431. package/lib/TagSelect/Item.js +68 -92
  432. package/lib/TagSelect/TagSelectContext.js +7 -25
  433. package/lib/TagSelect/index.js +12 -36
  434. package/lib/TagSelect/style/index.js +41 -64
  435. package/lib/TreeSearch/index.js +133 -127
  436. package/lib/TreeSearch/util.js +52 -70
  437. package/lib/Welcome/index.js +142 -118
  438. package/lib/Welcome/locale/en-US.js +8 -26
  439. package/lib/Welcome/locale/ja-JP.js +8 -26
  440. package/lib/Welcome/locale/zh-CN.js +8 -26
  441. package/lib/Welcome/locale/zh-TW.js +8 -26
  442. package/lib/Welcome/step/style/index.js +24 -40
  443. package/lib/Welcome/step.js +63 -60
  444. package/lib/Welcome/style/index.js +58 -70
  445. package/lib/_util/genComponentStyleHook.d.ts +2 -1
  446. package/lib/_util/genComponentStyleHook.js +15 -43
  447. package/lib/_util/index.js +43 -44
  448. package/lib/_util/useNavigate.js +11 -26
  449. package/lib/assets/logo/oceanbase_logo.svg +45 -29
  450. package/lib/assets/logo/oceanbase_logo_dark.svg +45 -29
  451. package/lib/assets/logo/oceanbase_watermark.svg +45 -31
  452. package/lib/constant/index.js +23 -50
  453. package/lib/index.js +282 -129
  454. package/lib/interface.js +4 -16
  455. package/lib/locale/LocaleWrapper.js +50 -61
  456. package/lib/locale/en-US.js +43 -64
  457. package/lib/locale/index.js +5 -17
  458. package/lib/locale/ja-JP.js +43 -64
  459. package/lib/locale/zh-CN.js +42 -63
  460. package/lib/locale/zh-TW.js +38 -59
  461. package/package.json +6 -6
@@ -1,66 +1,43 @@
1
- var __create = Object.create;
2
- var __defProp = Object.defineProperty;
3
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
- var __getOwnPropNames = Object.getOwnPropertyNames;
5
- var __getProtoOf = Object.getPrototypeOf;
6
- var __hasOwnProp = Object.prototype.hasOwnProperty;
7
- var __export = (target, all) => {
8
- for (var name in all)
9
- __defProp(target, name, { get: all[name], enumerable: true });
10
- };
11
- var __copyProps = (to, from, except, desc) => {
12
- if (from && typeof from === "object" || typeof from === "function") {
13
- for (let key of __getOwnPropNames(from))
14
- if (!__hasOwnProp.call(to, key) && key !== except)
15
- __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
16
- }
17
- return to;
18
- };
19
- var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
20
- // If the importer is in node compatibility mode or this is not an ESM
21
- // file that has been converted to a CommonJS file using a Babel-
22
- // compatible transform (i.e. "__esModule" has not been set), then set
23
- // "default" to the CommonJS "module.exports" for node compatibility.
24
- isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
25
- mod
26
- ));
27
- var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
28
-
29
- // src/Dialog/index.tsx
30
- var Dialog_exports = {};
31
- __export(Dialog_exports, {
32
- default: () => Dialog_default
1
+ "use strict";
2
+ "use client";
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
33
5
  });
34
- module.exports = __toCommonJS(Dialog_exports);
35
- var import_icons = require("@oceanbase/icons");
36
- var import_react = __toESM(require("react"));
37
- var import_design = require("@oceanbase/design");
38
- var import_react_dom = require("react-dom");
39
- var import_LocaleWrapper = __toESM(require("../locale/LocaleWrapper"));
40
- var import_Anchor = require("./Anchor");
41
- var import_Dock = require("./Dock");
42
- var import_EventProxy = require("./EventProxy");
43
- var import_zh_CN = __toESM(require("./locale/zh-CN"));
44
- var import_style = __toESM(require("./style"));
45
- var import_jsx_runtime = require("react/jsx-runtime");
46
- var DEFAULT_LEFT = 0.1;
47
- var DEFAULT_TOP = 0.1;
48
- var MINIMIZE_HEIGHT = 36;
49
- var MINIMIZE_WIDTH = 320;
50
- var DEFAULT_MIN = [320, 256];
51
- var DEFAULT_WIDTH_MEMBER = 520;
52
- var DEFAULT_HEIGHT_MEMBER = 600;
53
- var DEFAULT_BORDER_WIDTH = 24;
54
- var SCROLL_BAR_WIDTH = 1;
55
- var _container = null;
56
- var getContainer = () => {
6
+ exports.default = void 0;
7
+ var _icons = require("@oceanbase/icons");
8
+ var _react = _interopRequireWildcard(require("react"));
9
+ var _design = require("@oceanbase/design");
10
+ var _reactDom = require("react-dom");
11
+ var _LocaleWrapper = _interopRequireDefault(require("../locale/LocaleWrapper"));
12
+ var _Anchor = require("./Anchor");
13
+ var _Dock = require("./Dock");
14
+ var _EventProxy = require("./EventProxy");
15
+ var _zhCN = _interopRequireDefault(require("./locale/zh-CN"));
16
+ var _style = _interopRequireDefault(require("./style"));
17
+ var _jsxRuntime = require("react/jsx-runtime");
18
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
19
+ 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); }
20
+ 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; }
21
+ const DEFAULT_LEFT = 0.1;
22
+ const DEFAULT_TOP = 0.1;
23
+ const MINIMIZE_HEIGHT = 36;
24
+ const MINIMIZE_WIDTH = 320;
25
+ const DEFAULT_MIN = [320, 256];
26
+ const DEFAULT_WIDTH_MEMBER = 520;
27
+ const DEFAULT_HEIGHT_MEMBER = 600;
28
+ const DEFAULT_BORDER_WIDTH = 24;
29
+ // 预留滚动条宽度
30
+ const SCROLL_BAR_WIDTH = 1;
31
+ // Static container for portal
32
+ let _container = null;
33
+ const getContainer = () => {
57
34
  if (!_container) {
58
- _container = document.createElement("div");
35
+ _container = document.createElement('div');
59
36
  document.body.appendChild(_container);
60
37
  }
61
38
  return _container;
62
39
  };
63
- var DialogComp = (props) => {
40
+ const DialogComp = props => {
64
41
  const {
65
42
  className,
66
43
  visible,
@@ -83,35 +60,42 @@ var DialogComp = (props) => {
83
60
  setRootWidth,
84
61
  isEmbed = false
85
62
  } = props;
86
- const { getPrefixCls } = (0, import_react.useContext)(import_design.ConfigProvider.ConfigContext);
87
- const prefixCls = getPrefixCls("dialog");
88
- const { wrapSSR } = (0, import_style.default)(prefixCls);
89
- const hostRef = (0, import_react.useRef)(null);
90
- const clientXRef = (0, import_react.useRef)(0);
91
- const clientYRef = (0, import_react.useRef)(0);
92
- const isPointDownRef = (0, import_react.useRef)(false);
93
- const originInfoRef = (0, import_react.useRef)({});
94
- const [mask, setMask] = (0, import_react.useState)(true);
95
- const [dialogWidth, setDialogWidth] = (0, import_react.useState)(width ?? DEFAULT_WIDTH_MEMBER);
96
- const [dialogHeight, setDialogHeight] = (0, import_react.useState)(height ?? DEFAULT_HEIGHT_MEMBER);
97
- const [dialogLeft, setDialogLeft] = (0, import_react.useState)(
98
- left ?? clientWidth - (width ?? DEFAULT_WIDTH_MEMBER) - DEFAULT_BORDER_WIDTH
99
- );
100
- const [dialogTop, setDialogTop] = (0, import_react.useState)(
101
- top ?? clientHeight - (height ?? DEFAULT_HEIGHT_MEMBER) - DEFAULT_BORDER_WIDTH
102
- );
103
- const [moveX, setMoveX] = (0, import_react.useState)(0);
104
- const [moveY, setMoveY] = (0, import_react.useState)(0);
105
- const [maximization, setMaximization] = (0, import_react.useState)(isEmbed);
106
- const [minimize, setMinimize] = (0, import_react.useState)(false);
107
- const [headerStyle, setHeaderStyle] = (0, import_react.useState)({});
108
- const maxSize = (0, import_react.useMemo)(() => {
109
- if (max)
110
- return max;
63
+ const titleId = _react.default.useId();
64
+ const dialogRootRef = (0, _react.useRef)(null);
65
+ const {
66
+ getPrefixCls
67
+ } = (0, _react.useContext)(_design.ConfigProvider.ConfigContext);
68
+ const prefixCls = getPrefixCls('dialog');
69
+ const {
70
+ wrapSSR
71
+ } = (0, _style.default)(prefixCls);
72
+
73
+ // Refs for instance properties
74
+ const hostRef = (0, _react.useRef)(null);
75
+ const clientXRef = (0, _react.useRef)(0);
76
+ const clientYRef = (0, _react.useRef)(0);
77
+ const isPointDownRef = (0, _react.useRef)(false);
78
+ const originInfoRef = (0, _react.useRef)({});
79
+
80
+ // State
81
+ const [mask, setMask] = (0, _react.useState)(true);
82
+ const [dialogWidth, setDialogWidth] = (0, _react.useState)(width ?? DEFAULT_WIDTH_MEMBER);
83
+ const [dialogHeight, setDialogHeight] = (0, _react.useState)(height ?? DEFAULT_HEIGHT_MEMBER);
84
+ const [dialogLeft, setDialogLeft] = (0, _react.useState)(left ?? clientWidth - (width ?? DEFAULT_WIDTH_MEMBER) - DEFAULT_BORDER_WIDTH);
85
+ const [dialogTop, setDialogTop] = (0, _react.useState)(top ?? clientHeight - (height ?? DEFAULT_HEIGHT_MEMBER) - DEFAULT_BORDER_WIDTH);
86
+ const [moveX, setMoveX] = (0, _react.useState)(0);
87
+ const [moveY, setMoveY] = (0, _react.useState)(0);
88
+ const [maximization, setMaximization] = (0, _react.useState)(isEmbed);
89
+ const [minimize, setMinimize] = (0, _react.useState)(false);
90
+ const [headerStyle, setHeaderStyle] = (0, _react.useState)({});
91
+
92
+ // Computed values
93
+ const maxSize = (0, _react.useMemo)(() => {
94
+ if (max) return max;
111
95
  return [clientWidth, clientHeight];
112
96
  }, [max, clientWidth, clientHeight]);
113
- const minSize = (0, import_react.useMemo)(() => min, [min]);
114
- const getDefaultEmbedState = (0, import_react.useCallback)(() => {
97
+ const minSize = (0, _react.useMemo)(() => min, [min]);
98
+ const getDefaultEmbedState = (0, _react.useCallback)(() => {
115
99
  return {
116
100
  width: width ?? DEFAULT_WIDTH_MEMBER,
117
101
  height: height ?? DEFAULT_HEIGHT_MEMBER,
@@ -119,28 +103,22 @@ var DialogComp = (props) => {
119
103
  top: top ?? clientHeight - (height ?? DEFAULT_HEIGHT_MEMBER) - DEFAULT_BORDER_WIDTH
120
104
  };
121
105
  }, [width, height, left, top, clientWidth, clientHeight]);
122
- const setRootWidthInEmbedMode = (0, import_react.useCallback)(
123
- (newWidth) => {
124
- const restWidth = !!newWidth ? newWidth + SCROLL_BAR_WIDTH : 0;
125
- const rootWidth = (clientWidth - restWidth) / clientWidth;
126
- setRootWidth == null ? void 0 : setRootWidth(`${rootWidth * 100}%`);
127
- },
128
- [clientWidth, setRootWidth]
129
- );
130
- const compatClonedModel = (0, import_react.useCallback)(
131
- (model) => {
132
- return {
133
- left: DEFAULT_LEFT,
134
- top: DEFAULT_TOP,
135
- width: DEFAULT_WIDTH_MEMBER / clientWidth,
136
- height: DEFAULT_HEIGHT_MEMBER / clientHeight,
137
- minimize: false,
138
- maximization: false,
139
- ...model
140
- };
141
- },
142
- [clientWidth, clientHeight]
143
- );
106
+ const setRootWidthInEmbedMode = (0, _react.useCallback)(newWidth => {
107
+ const restWidth = !!newWidth ? newWidth + SCROLL_BAR_WIDTH : 0;
108
+ const rootWidth = (clientWidth - restWidth) / clientWidth;
109
+ setRootWidth?.(`${rootWidth * 100}%`);
110
+ }, [clientWidth, setRootWidth]);
111
+ const compatClonedModel = (0, _react.useCallback)(model => {
112
+ return {
113
+ left: DEFAULT_LEFT,
114
+ top: DEFAULT_TOP,
115
+ width: DEFAULT_WIDTH_MEMBER / clientWidth,
116
+ height: DEFAULT_HEIGHT_MEMBER / clientHeight,
117
+ minimize: false,
118
+ maximization: false,
119
+ ...model
120
+ };
121
+ }, [clientWidth, clientHeight]);
144
122
  const checkSize = (w, h) => {
145
123
  const newModel = {};
146
124
  const result = {
@@ -165,8 +143,10 @@ var DialogComp = (props) => {
165
143
  }
166
144
  return result;
167
145
  };
168
- (0, import_react.useEffect)(() => {
169
- const host = document.createElement("div");
146
+
147
+ // componentDidMount
148
+ (0, _react.useEffect)(() => {
149
+ const host = document.createElement('div');
170
150
  hostRef.current = host;
171
151
  getContainer().appendChild(host);
172
152
  return () => {
@@ -175,7 +155,9 @@ var DialogComp = (props) => {
175
155
  }
176
156
  };
177
157
  }, []);
178
- (0, import_react.useEffect)(() => {
158
+
159
+ // componentDidUpdate
160
+ (0, _react.useEffect)(() => {
179
161
  if (!visible) {
180
162
  setRootWidthInEmbedMode(0);
181
163
  return;
@@ -187,64 +169,81 @@ var DialogComp = (props) => {
187
169
  setDialogTop(tempState.top);
188
170
  setRootWidthInEmbedMode(tempState.width);
189
171
  }, [visible, clientWidth, clientHeight, getDefaultEmbedState, setRootWidthInEmbedMode]);
190
- (0, import_react.useEffect)(() => {
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]);
195
+ (0, _react.useEffect)(() => {
191
196
  if (isEmbed) {
192
197
  setMinimize(false);
193
198
  setMaximization(true);
194
199
  } else {
195
200
  setMinimize(false);
196
201
  setMaximization(false);
197
- if (height)
198
- setDialogHeight(height);
199
- if (width)
200
- setDialogWidth(width);
201
- if (top !== void 0)
202
- setDialogTop(top);
203
- if (left !== void 0)
204
- setDialogLeft(left);
202
+ if (height) setDialogHeight(height);
203
+ if (width) setDialogWidth(width);
204
+ if (top !== undefined) setDialogTop(top);
205
+ if (left !== undefined) setDialogLeft(left);
205
206
  }
206
207
  }, [isEmbed, height, width, top, left]);
207
- const onDragStart = (event) => {
208
- if (!draggable)
209
- return;
210
- if (maximization)
211
- return;
208
+
209
+ // Drag handlers
210
+ const onDragStart = event => {
211
+ if (!draggable) return;
212
+ if (maximization) return;
212
213
  setMask(true);
213
- if (dialogLeft === void 0) {
214
+ if (dialogLeft === undefined) {
214
215
  setDialogLeft(DEFAULT_LEFT);
215
216
  }
216
- if (dialogTop === void 0) {
217
+ if (dialogTop === undefined) {
217
218
  setDialogTop(DEFAULT_TOP);
218
219
  }
219
220
  clientXRef.current = event.clientX;
220
221
  clientYRef.current = event.clientY;
221
222
  isPointDownRef.current = true;
222
223
  };
223
- const onDragMove = (event) => {
224
- if (!draggable || !isPointDownRef.current)
225
- return;
224
+ const onDragMove = event => {
225
+ if (!draggable || !isPointDownRef.current) return;
226
226
  event.preventDefault();
227
227
  setMoveX(event.clientX - clientXRef.current);
228
228
  setMoveY(event.clientY - clientYRef.current);
229
229
  };
230
230
  const onDragEnd = () => {
231
- if (!draggable)
232
- return;
231
+ if (!draggable) return;
233
232
  isPointDownRef.current = false;
234
- if (moveX === 0 && moveY === 0)
235
- return;
233
+ if (moveX === 0 && moveY === 0) return;
236
234
  setMask(false);
237
- setDialogLeft((prev) => (prev ?? 0) + moveX);
238
- setDialogTop((prev) => (prev ?? 0) + moveY);
235
+ setDialogLeft(prev => (prev ?? 0) + moveX);
236
+ setDialogTop(prev => (prev ?? 0) + moveY);
239
237
  setMoveX(0);
240
238
  setMoveY(0);
241
239
  };
242
240
  const detectPointUp = () => {
243
241
  setMask(false);
244
242
  };
243
+
244
+ // Resize handlers
245
245
  const onResizeStart = () => {
246
- if (minimize || !resizable)
247
- return;
246
+ if (minimize || !resizable) return;
248
247
  originInfoRef.current = compatClonedModel({
249
248
  width: dialogWidth,
250
249
  height: dialogHeight,
@@ -255,92 +254,101 @@ var DialogComp = (props) => {
255
254
  });
256
255
  setMask(true);
257
256
  };
258
- const onResizeMove = (event) => {
257
+ const onResizeMove = event => {
259
258
  event.preventDefault();
260
- if (minimize || !resizable)
261
- return;
259
+ if (minimize || !resizable) return;
260
+ // @ts-ignore
262
261
  const newWidth = originInfoRef.current.width + event.moveRight;
262
+ // @ts-ignore
263
263
  const newHeight = originInfoRef.current.height + event.moveBottom;
264
264
  const checkResult = checkSize(newWidth, newHeight);
265
265
  if (checkResult.widthShouldChange) {
266
266
  setRootWidthInEmbedMode(newWidth);
267
267
  }
268
268
  if (checkResult.widthShouldChange) {
269
+ // @ts-ignore
269
270
  setDialogLeft(originInfoRef.current.left + event.moveLeft);
270
271
  setDialogWidth(newWidth);
271
272
  }
272
273
  if (checkResult.heightShouldChange) {
274
+ // @ts-ignore
273
275
  setDialogTop(originInfoRef.current.top + event.moveTop);
274
276
  setDialogHeight(newHeight);
275
277
  }
276
278
  };
277
279
  const onResizeEnd = () => {
278
- if (!mask || !resizable)
279
- return;
280
+ if (!mask || !resizable) return;
280
281
  setMask(false);
281
282
  };
283
+
284
+ // Toggle handlers
282
285
  const toggleMinimize = () => {
283
286
  setMaximization(false);
284
- setMinimize((prev) => !prev);
287
+ setMinimize(prev => !prev);
285
288
  };
286
289
  const toggleMaximization = () => {
287
290
  const enable = resizable && enableMaximization && !isEmbed;
288
- if (!enable)
289
- return;
290
- setMaximization((prev) => !prev);
291
+ if (!enable) return;
292
+ setMaximization(prev => !prev);
291
293
  setMinimize(false);
292
294
  };
293
- const handleClose = (event) => {
295
+ const handleClose = event => {
294
296
  event.stopPropagation();
295
- onClose == null ? void 0 : onClose();
297
+ onClose?.();
296
298
  };
297
- const getBaseStyle = (0, import_react.useCallback)(() => {
299
+
300
+ // Style calculations
301
+ const getBaseStyle = (0, _react.useCallback)(() => {
298
302
  return {
299
- visibility: visible ? "visible" : "hidden",
303
+ visibility: visible ? 'visible' : 'hidden',
300
304
  opacity: visible ? 1 : 0
301
305
  };
302
306
  }, [visible]);
303
- const getCompatAbsPostion = (0, import_react.useCallback)(
304
- (info) => {
305
- const compatInfo = compatClonedModel(info);
306
- const { minimize: isMinimize } = compatInfo;
307
- const ret = {};
308
- ["left", "width", "top", "height"].forEach((key) => {
309
- ret[key] = compatInfo[key];
310
- });
311
- if (maxSize && ret.width > maxSize[0]) {
312
- ret.width = maxSize[0];
313
- }
314
- if (maxSize && ret.height > maxSize[1]) {
315
- ret.height = maxSize[1];
316
- }
317
- if (minSize && ret.width < minSize[0]) {
318
- ret.width = minSize[0];
319
- }
320
- if (minSize && ret.height < minSize[1]) {
321
- ret.height = minSize[1];
322
- }
323
- ret.width = isMinimize ? MINIMIZE_WIDTH : ret.width;
324
- ret.height = isMinimize ? MINIMIZE_HEIGHT : ret.height;
325
- if (ret.left + ret.width > clientWidth) {
326
- ret.left = clientWidth - ret.width;
327
- }
328
- if (ret.left < 0) {
329
- ret.left = 0;
330
- }
331
- if (ret.top < 0) {
332
- ret.top = 0;
333
- }
334
- if (ret.top + ret.height > clientHeight) {
335
- ret.top = clientHeight - ret.height;
336
- }
337
- return ret;
338
- },
339
- [maxSize, minSize, clientWidth, clientHeight, compatClonedModel]
340
- );
341
- (0, import_react.useEffect)(() => {
342
- if (!visible)
343
- return;
307
+ const getCompatAbsPostion = (0, _react.useCallback)(info => {
308
+ const compatInfo = compatClonedModel(info);
309
+ const {
310
+ minimize: isMinimize
311
+ } = compatInfo;
312
+ const ret = {};
313
+ ['left', 'width', 'top', 'height'].forEach(key => {
314
+ ret[key] = compatInfo[key];
315
+ });
316
+
317
+ // Apply min/max constraints
318
+ if (maxSize && ret.width > maxSize[0]) {
319
+ ret.width = maxSize[0];
320
+ }
321
+ if (maxSize && ret.height > maxSize[1]) {
322
+ ret.height = maxSize[1];
323
+ }
324
+ if (minSize && ret.width < minSize[0]) {
325
+ ret.width = minSize[0];
326
+ }
327
+ if (minSize && ret.height < minSize[1]) {
328
+ ret.height = minSize[1];
329
+ }
330
+ ret.width = isMinimize ? MINIMIZE_WIDTH : ret.width;
331
+ ret.height = isMinimize ? MINIMIZE_HEIGHT : ret.height;
332
+
333
+ // Adjust position if out of bounds (calculate but don't setState here)
334
+ if (ret.left + ret.width > clientWidth) {
335
+ ret.left = clientWidth - ret.width;
336
+ }
337
+ if (ret.left < 0) {
338
+ ret.left = 0;
339
+ }
340
+ if (ret.top < 0) {
341
+ ret.top = 0;
342
+ }
343
+ if (ret.top + ret.height > clientHeight) {
344
+ ret.top = clientHeight - ret.height;
345
+ }
346
+ return ret;
347
+ }, [maxSize, minSize, clientWidth, clientHeight, compatClonedModel]);
348
+
349
+ // Adjust position if out of bounds
350
+ (0, _react.useEffect)(() => {
351
+ if (!visible) return;
344
352
  const adjusted = getCompatAbsPostion({
345
353
  width: dialogWidth,
346
354
  height: dialogHeight,
@@ -355,7 +363,7 @@ var DialogComp = (props) => {
355
363
  setDialogTop(adjusted.top);
356
364
  }
357
365
  }, [dialogWidth, dialogHeight, dialogLeft, dialogTop, minimize, visible, getCompatAbsPostion]);
358
- const getStyle = (0, import_react.useMemo)(() => {
366
+ const getStyle = (0, _react.useMemo)(() => {
359
367
  const transform = `translate(${moveX}px, ${moveY}px)`;
360
368
  const baseStyle = getBaseStyle();
361
369
  if (maximization && !isEmbed) {
@@ -365,11 +373,13 @@ var DialogComp = (props) => {
365
373
  bottom: 0,
366
374
  right: 0,
367
375
  width: width || DEFAULT_WIDTH_MEMBER,
368
- height: "auto",
376
+ height: 'auto',
369
377
  borderRadius: 0
370
378
  };
371
379
  } else if (minimize) {
372
- const { height: headerHeight } = headerStyle;
380
+ const {
381
+ height: headerHeight
382
+ } = headerStyle;
373
383
  const position = getCompatAbsPostion({
374
384
  width: dialogWidth,
375
385
  height: dialogHeight,
@@ -397,210 +407,214 @@ var DialogComp = (props) => {
397
407
  transform
398
408
  };
399
409
  }
400
- }, [
401
- maximization,
402
- isEmbed,
403
- minimize,
404
- moveX,
405
- moveY,
406
- width,
407
- headerStyle,
408
- dialogWidth,
409
- dialogHeight,
410
- dialogLeft,
411
- dialogTop,
412
- getCompatAbsPostion,
413
- getBaseStyle
414
- ]);
410
+ }, [maximization, isEmbed, minimize, moveX, moveY, width, headerStyle, dialogWidth, dialogHeight, dialogLeft, dialogTop, getCompatAbsPostion, getBaseStyle]);
411
+
412
+ // Render methods
415
413
  const renderControlLink = () => {
416
- return /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { className: `${prefixCls}-item`, children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
417
- "a",
418
- {
414
+ if (!extLink?.link) {
415
+ return null;
416
+ }
417
+ const linkText = extLink.text || locale?.openHelpCenter;
418
+ return /*#__PURE__*/(0, _jsxRuntime.jsx)("span", {
419
+ className: `${prefixCls}-item`,
420
+ children: /*#__PURE__*/(0, _jsxRuntime.jsxs)("a", {
419
421
  className: `${prefixCls}-item-link`,
420
- href: extLink == null ? void 0 : extLink.link,
422
+ href: extLink.link,
421
423
  target: "_blank",
422
424
  rel: "noopener noreferrer",
423
- children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
424
- "svg",
425
- {
426
- className: "icon",
427
- viewBox: "0 0 1024 1024",
428
- version: "1.1",
429
- xmlns: "http://www.w3.org/2000/svg",
430
- width: "16",
431
- height: "16",
432
- children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("path", { 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" })
433
- }
434
- )
435
- }
436
- ) });
425
+ children: [/*#__PURE__*/(0, _jsxRuntime.jsx)("span", {
426
+ className: `${prefixCls}-item-link-text`,
427
+ children: linkText
428
+ }), /*#__PURE__*/(0, _jsxRuntime.jsx)("svg", {
429
+ className: "icon",
430
+ viewBox: "0 0 1024 1024",
431
+ version: "1.1",
432
+ xmlns: "http://www.w3.org/2000/svg",
433
+ width: "16",
434
+ height: "16",
435
+ "aria-hidden": true,
436
+ children: /*#__PURE__*/(0, _jsxRuntime.jsx)("path", {
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"
438
+ })
439
+ })]
440
+ })
441
+ });
437
442
  };
438
443
  const renderControls = () => {
439
444
  if (isEmbed) {
440
- return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("span", { className: `${prefixCls}-controls`, children: [
441
- renderControlLink(),
442
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { className: `${prefixCls}-item`, onClick: handleClose, children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_icons.CloseOutlined, {}) })
443
- ] });
445
+ return /*#__PURE__*/(0, _jsxRuntime.jsxs)("span", {
446
+ className: `${prefixCls}-controls`,
447
+ children: [renderControlLink(), /*#__PURE__*/(0, _jsxRuntime.jsx)("button", {
448
+ type: "button",
449
+ className: `${prefixCls}-item`,
450
+ "aria-label": locale?.closeDialog,
451
+ onClick: handleClose,
452
+ children: /*#__PURE__*/(0, _jsxRuntime.jsx)("span", {
453
+ "aria-hidden": true,
454
+ children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_icons.CloseOutlined, {})
455
+ })
456
+ })]
457
+ });
444
458
  }
445
- return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("span", { className: `${prefixCls}-controls`, children: [
446
- renderControlLink(),
447
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { className: `${prefixCls}-item`, onClick: toggleMinimize, children: minimize ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_icons.ExpandAltOutlined, {}) : /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_icons.MinusOutlined, {}) }),
448
- enableMaximization && /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { className: `${prefixCls}-item`, onClick: toggleMaximization, children: maximization ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_icons.FullscreenExitOutlined, {}) : /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_icons.FullscreenOutlined, {}) }),
449
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { className: `${prefixCls}-item`, onClick: handleClose, children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_icons.CloseOutlined, {}) })
450
- ] });
459
+ return /*#__PURE__*/(0, _jsxRuntime.jsxs)("span", {
460
+ className: `${prefixCls}-controls`,
461
+ children: [renderControlLink(), /*#__PURE__*/(0, _jsxRuntime.jsx)("button", {
462
+ type: "button",
463
+ className: `${prefixCls}-item`,
464
+ "aria-label": minimize ? locale?.restoreWindow : locale?.minimize,
465
+ onClick: toggleMinimize,
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",
472
+ className: `${prefixCls}-item`,
473
+ "aria-label": maximization ? locale?.exitFullscreen : locale?.maximize,
474
+ onClick: toggleMaximization,
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",
481
+ className: `${prefixCls}-item`,
482
+ "aria-label": locale?.closeDialog,
483
+ onClick: handleClose,
484
+ children: /*#__PURE__*/(0, _jsxRuntime.jsx)("span", {
485
+ "aria-hidden": true,
486
+ children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_icons.CloseOutlined, {})
487
+ })
488
+ })]
489
+ });
451
490
  };
452
491
  const renderHeader = () => {
453
492
  const headerStyleObj = {
454
493
  ...headerStyle,
455
- ...minimize ? { boxShadow: "0 2px 20px 0 rgba(4, 1, 30, 0.07)" } : {},
456
- ...isEmbed ? { cursor: "initial" } : {}
494
+ ...(minimize ? {
495
+ boxShadow: '0 2px 20px 0 rgba(4, 1, 30, 0.07)'
496
+ } : {}),
497
+ ...(isEmbed ? {
498
+ cursor: 'initial'
499
+ } : {})
457
500
  };
458
- return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
459
- "header",
460
- {
461
- className: `${prefixCls}-header`,
462
- style: headerStyleObj,
463
- onPointerDown: onDragStart,
464
- onDoubleClick: toggleMaximization,
465
- children: [
466
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { className: `${prefixCls}-title`, children: title || (locale == null ? void 0 : locale.helpDocument) }),
467
- renderControls()
468
- ]
469
- }
470
- );
501
+ return /*#__PURE__*/(0, _jsxRuntime.jsxs)("header", {
502
+ className: `${prefixCls}-header`,
503
+ style: headerStyleObj,
504
+ onPointerDown: onDragStart,
505
+ onDoubleClick: toggleMaximization,
506
+ children: [/*#__PURE__*/(0, _jsxRuntime.jsx)("span", {
507
+ className: `${prefixCls}-title`,
508
+ id: titleId,
509
+ children: title || locale?.helpDocument
510
+ }), renderControls()]
511
+ });
471
512
  };
472
513
  const renderMask = () => {
473
- if (!mask)
474
- return null;
475
- return /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: `${prefixCls}-mask` });
514
+ if (!mask) return null;
515
+ return /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
516
+ className: `${prefixCls}-mask`
517
+ });
476
518
  };
477
519
  const renderContent = () => {
478
- return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("main", { className: `${prefixCls}-main`, style: minimize ? { visibility: "hidden" } : {}, children: [
479
- renderMask(),
480
- children
481
- ] });
520
+ return /*#__PURE__*/(0, _jsxRuntime.jsxs)("main", {
521
+ className: `${prefixCls}-main`,
522
+ style: minimize ? {
523
+ visibility: 'hidden'
524
+ } : {},
525
+ children: [renderMask(), children]
526
+ });
482
527
  };
483
528
  const renderEmbedBorders = () => {
484
- return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_react.default.Fragment, { children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
485
- import_Anchor.Anchor,
486
- {
487
- prefixCls,
488
- dock: import_Dock.Dock.left,
529
+ return /*#__PURE__*/(0, _jsxRuntime.jsx)(_react.default.Fragment, {
530
+ children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_Anchor.Anchor, {
531
+ prefixCls: prefixCls,
532
+ dock: _Dock.Dock.left,
489
533
  onStart: onResizeStart,
490
534
  onMove: onResizeMove,
491
535
  onEnd: onResizeEnd
492
- }
493
- ) });
536
+ })
537
+ });
494
538
  };
495
539
  const renderBorders = () => {
496
- return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_react.default.Fragment, { children: [
497
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
498
- import_Anchor.Anchor,
499
- {
500
- prefixCls,
501
- dock: import_Dock.Dock.top,
502
- onStart: onResizeStart,
503
- onMove: onResizeMove,
504
- onEnd: onResizeEnd
505
- }
506
- ),
507
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
508
- import_Anchor.Anchor,
509
- {
510
- prefixCls,
511
- dock: import_Dock.Dock.right,
512
- onStart: onResizeStart,
513
- onMove: onResizeMove,
514
- onEnd: onResizeEnd
515
- }
516
- ),
517
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
518
- import_Anchor.Anchor,
519
- {
520
- prefixCls,
521
- dock: import_Dock.Dock.bottom,
522
- onStart: onResizeStart,
523
- onMove: onResizeMove,
524
- onEnd: onResizeEnd
525
- }
526
- ),
527
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
528
- import_Anchor.Anchor,
529
- {
530
- prefixCls,
531
- dock: import_Dock.Dock.left,
532
- onStart: onResizeStart,
533
- onMove: onResizeMove,
534
- onEnd: onResizeEnd
535
- }
536
- ),
537
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
538
- import_Anchor.Anchor,
539
- {
540
- prefixCls,
541
- dock: import_Dock.Dock.topLeft,
542
- onStart: onResizeStart,
543
- onMove: onResizeMove,
544
- onEnd: onResizeEnd
545
- }
546
- ),
547
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
548
- import_Anchor.Anchor,
549
- {
550
- prefixCls,
551
- dock: import_Dock.Dock.topRight,
552
- onStart: onResizeStart,
553
- onMove: onResizeMove,
554
- onEnd: onResizeEnd
555
- }
556
- ),
557
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
558
- import_Anchor.Anchor,
559
- {
560
- prefixCls,
561
- dock: import_Dock.Dock.bottomLeft,
562
- onStart: onResizeStart,
563
- onMove: onResizeMove,
564
- onEnd: onResizeEnd
565
- }
566
- ),
567
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
568
- import_Anchor.Anchor,
569
- {
570
- prefixCls,
571
- dock: import_Dock.Dock.bottomRight,
572
- onStart: onResizeStart,
573
- onMove: onResizeMove,
574
- onEnd: onResizeEnd
575
- }
576
- )
577
- ] });
540
+ return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_react.default.Fragment, {
541
+ children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_Anchor.Anchor, {
542
+ prefixCls: prefixCls,
543
+ dock: _Dock.Dock.top,
544
+ onStart: onResizeStart,
545
+ onMove: onResizeMove,
546
+ onEnd: onResizeEnd
547
+ }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_Anchor.Anchor, {
548
+ prefixCls: prefixCls,
549
+ dock: _Dock.Dock.right,
550
+ onStart: onResizeStart,
551
+ onMove: onResizeMove,
552
+ onEnd: onResizeEnd
553
+ }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_Anchor.Anchor, {
554
+ prefixCls: prefixCls,
555
+ dock: _Dock.Dock.bottom,
556
+ onStart: onResizeStart,
557
+ onMove: onResizeMove,
558
+ onEnd: onResizeEnd
559
+ }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_Anchor.Anchor, {
560
+ prefixCls: prefixCls,
561
+ dock: _Dock.Dock.left,
562
+ onStart: onResizeStart,
563
+ onMove: onResizeMove,
564
+ onEnd: onResizeEnd
565
+ }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_Anchor.Anchor, {
566
+ prefixCls: prefixCls,
567
+ dock: _Dock.Dock.topLeft,
568
+ onStart: onResizeStart,
569
+ onMove: onResizeMove,
570
+ onEnd: onResizeEnd
571
+ }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_Anchor.Anchor, {
572
+ prefixCls: prefixCls,
573
+ dock: _Dock.Dock.topRight,
574
+ onStart: onResizeStart,
575
+ onMove: onResizeMove,
576
+ onEnd: onResizeEnd
577
+ }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_Anchor.Anchor, {
578
+ prefixCls: prefixCls,
579
+ dock: _Dock.Dock.bottomLeft,
580
+ onStart: onResizeStart,
581
+ onMove: onResizeMove,
582
+ onEnd: onResizeEnd
583
+ }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_Anchor.Anchor, {
584
+ prefixCls: prefixCls,
585
+ dock: _Dock.Dock.bottomRight,
586
+ onStart: onResizeStart,
587
+ onMove: onResizeMove,
588
+ onEnd: onResizeEnd
589
+ })]
590
+ });
578
591
  };
579
592
  const renderDialog = () => {
580
593
  const style = getStyle;
581
- return wrapSSR(
582
- /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
583
- "div",
584
- {
585
- className: `${prefixCls}-container ${className || ""} ${isEmbed ? `${prefixCls}-container-embed` : ""}`,
586
- style,
587
- ...minimize ? {} : { tabIndex: 0 },
588
- children: [
589
- renderHeader(),
590
- renderContent(),
591
- isEmbed ? renderEmbedBorders() : renderBorders(),
592
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_EventProxy.EventProxy, { onPointerMove: onDragMove, onPointerUp: onDragEnd }),
593
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_EventProxy.EventProxy, { onPointerUp: detectPointUp })
594
- ]
595
- }
596
- )
597
- );
594
+ return wrapSSR( /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
595
+ ref: dialogRootRef,
596
+ className: `${prefixCls}-container ${className || ''} ${isEmbed ? `${prefixCls}-container-embed` : ''}`,
597
+ style: style,
598
+ role: "dialog",
599
+ "aria-modal": "true",
600
+ "aria-labelledby": titleId,
601
+ ...(minimize ? {} : {
602
+ tabIndex: -1
603
+ }),
604
+ children: [renderHeader(), renderContent(), isEmbed ? renderEmbedBorders() : renderBorders(), /*#__PURE__*/(0, _jsxRuntime.jsx)(_EventProxy.EventProxy, {
605
+ onPointerMove: onDragMove,
606
+ onPointerUp: onDragEnd
607
+ }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_EventProxy.EventProxy, {
608
+ onPointerUp: detectPointUp
609
+ })]
610
+ }));
598
611
  };
599
- if (!visible && !isEmbed)
600
- return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_react.default.Fragment, {});
601
- return (0, import_react_dom.createPortal)(renderDialog(), getContainer());
612
+
613
+ // 嵌入模式通过style控制显隐
614
+ if (!visible && !isEmbed) return /*#__PURE__*/(0, _jsxRuntime.jsx)(_react.default.Fragment, {});
615
+ return /*#__PURE__*/(0, _reactDom.createPortal)(renderDialog(), getContainer());
602
616
  };
603
- var Dialog_default = (0, import_LocaleWrapper.default)({
604
- componentName: "Dialog",
605
- defaultLocale: import_zh_CN.default
606
- })(DialogComp);
617
+ var _default = exports.default = (0, _LocaleWrapper.default)({
618
+ componentName: 'Dialog',
619
+ defaultLocale: _zhCN.default
620
+ })(DialogComp);