@amateescu/portal-ui-components 0.0.35-beta0 → 0.0.37-beta1

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 (270) hide show
  1. package/README.md +113 -0
  2. package/dist/{Button-DG4uye8X.js → Button-BM72-1G6.js} +107 -106
  3. package/dist/ButtonBase-D6nf3ymf.js +990 -0
  4. package/dist/{CircularProgress-DpvktFBW.js → CircularProgress-BlQFR6DW.js} +107 -80
  5. package/dist/Clear-BauR3cPE.js +8 -0
  6. package/dist/DefaultPropsProvider-BtPfTrMq.js +3449 -0
  7. package/dist/UserInfoDropdown-D9EyQloN.js +65 -0
  8. package/dist/assets/PassportConfirmationModal.css +1 -0
  9. package/dist/assets/PassportErrorModal.css +1 -0
  10. package/dist/assets/PassportInactivityModal.css +1 -0
  11. package/dist/assets/PassportInfoModal.css +1 -0
  12. package/dist/assets/PassportKpiCard.css +1 -0
  13. package/dist/assets/PassportTabHeader.css +1 -0
  14. package/dist/assets/UserInfoDropdown.css +1 -1
  15. package/dist/assets/index.css +1 -0
  16. package/dist/components/DebouncedPassportInput/DebouncedPassportInput.d.ts +3 -0
  17. package/dist/components/DebouncedPassportInput/DebouncedPassportInput.d.ts.map +1 -0
  18. package/dist/components/DebouncedPassportInput/DebouncedPassportInput.js +31 -0
  19. package/dist/components/DebouncedPassportInput/DebouncedPassportInput.stories.d.ts +23 -0
  20. package/dist/components/DebouncedPassportInput/DebouncedPassportInput.stories.d.ts.map +1 -0
  21. package/dist/components/DebouncedPassportInput/DebouncedPassportInput.types.d.ts +8 -0
  22. package/dist/components/DebouncedPassportInput/DebouncedPassportInput.types.d.ts.map +1 -0
  23. package/dist/components/LoadingAnimation/LoadingAnimation.d.ts +1 -0
  24. package/dist/components/LoadingAnimation/LoadingAnimation.d.ts.map +1 -0
  25. package/dist/components/LoadingAnimation/LoadingAnimation.js +66 -6
  26. package/dist/components/LoadingAnimation/LoadingAnimation.stories.d.ts +1 -0
  27. package/dist/components/LoadingAnimation/LoadingAnimation.stories.d.ts.map +1 -0
  28. package/dist/components/Login/Login.d.ts +2 -1
  29. package/dist/components/Login/Login.d.ts.map +1 -0
  30. package/dist/components/Login/Login.js +43 -8885
  31. package/dist/components/Login/Login.stories.d.ts +3 -2
  32. package/dist/components/Login/Login.stories.d.ts.map +1 -0
  33. package/dist/components/Login/Login.types.d.ts +1 -0
  34. package/dist/components/Login/Login.types.d.ts.map +1 -0
  35. package/dist/components/PassportAutocomplete/PassportAutocomplete.d.ts +3 -0
  36. package/dist/components/PassportAutocomplete/PassportAutocomplete.d.ts.map +1 -0
  37. package/dist/components/PassportAutocomplete/PassportAutocomplete.js +41 -0
  38. package/dist/components/{InfoModal/InfoModal.stories.d.ts → PassportAutocomplete/PassportAutocomplete.stories.d.ts} +4 -0
  39. package/dist/components/PassportAutocomplete/PassportAutocomplete.stories.d.ts.map +1 -0
  40. package/dist/components/PassportAutocomplete/PassportAutocomplete.types.d.ts +14 -0
  41. package/dist/components/PassportAutocomplete/PassportAutocomplete.types.d.ts.map +1 -0
  42. package/dist/components/PassportButton/PassportButton.d.ts +4 -0
  43. package/dist/components/PassportButton/PassportButton.d.ts.map +1 -0
  44. package/dist/components/{CustomButton/CustomButton.js → PassportButton/PassportButton.js} +10 -6
  45. package/dist/components/{CustomButton/CustomButton.stories.d.ts → PassportButton/PassportButton.stories.d.ts} +2 -1
  46. package/dist/components/PassportButton/PassportButton.stories.d.ts.map +1 -0
  47. package/dist/components/PassportButton/PassportButton.types.d.ts +9 -0
  48. package/dist/components/PassportButton/PassportButton.types.d.ts.map +1 -0
  49. package/dist/components/PassportConfirmationModal/PassportConfirmationModal.d.ts +9 -0
  50. package/dist/components/PassportConfirmationModal/PassportConfirmationModal.d.ts.map +1 -0
  51. package/dist/components/PassportConfirmationModal/PassportConfirmationModal.js +108 -0
  52. package/dist/components/{ErrorModal/ErrorModal.stories.d.ts → PassportConfirmationModal/PassportConfirmationModal.stories.d.ts} +1 -0
  53. package/dist/components/PassportConfirmationModal/PassportConfirmationModal.stories.d.ts.map +1 -0
  54. package/dist/components/PassportDatePicker/PassportDatePicker.d.ts +3 -0
  55. package/dist/components/PassportDatePicker/PassportDatePicker.d.ts.map +1 -0
  56. package/dist/components/PassportDatePicker/PassportDatePicker.js +1514 -0
  57. package/dist/components/PassportDatePicker/PassportDatePicker.stories.d.ts +25 -0
  58. package/dist/components/PassportDatePicker/PassportDatePicker.stories.d.ts.map +1 -0
  59. package/dist/components/PassportDatePicker/PassportDatePicker.types.d.ts +15 -0
  60. package/dist/components/PassportDatePicker/PassportDatePicker.types.d.ts.map +1 -0
  61. package/dist/components/PassportDateTimePicker/PassportDateTimePicker.d.ts +3 -0
  62. package/dist/components/PassportDateTimePicker/PassportDateTimePicker.d.ts.map +1 -0
  63. package/dist/components/PassportDateTimePicker/PassportDateTimePicker.js +5419 -0
  64. package/dist/components/PassportDateTimePicker/PassportDateTimePicker.stories.d.ts +30 -0
  65. package/dist/components/PassportDateTimePicker/PassportDateTimePicker.stories.d.ts.map +1 -0
  66. package/dist/components/PassportDateTimePicker/PassportDateTimePicker.types.d.ts +16 -0
  67. package/dist/components/PassportDateTimePicker/PassportDateTimePicker.types.d.ts.map +1 -0
  68. package/dist/components/PassportDropdown/PassportDropdown.d.ts +3 -0
  69. package/dist/components/PassportDropdown/PassportDropdown.d.ts.map +1 -0
  70. package/dist/components/PassportDropdown/PassportDropdown.js +37 -0
  71. package/dist/components/PassportDropdown/PassportDropdown.stories.d.ts +25 -0
  72. package/dist/components/PassportDropdown/PassportDropdown.stories.d.ts.map +1 -0
  73. package/dist/components/PassportDropdown/PassportDropdown.types.d.ts +14 -0
  74. package/dist/components/PassportDropdown/PassportDropdown.types.d.ts.map +1 -0
  75. package/dist/components/PassportErrorModal/PassportErrorModal.d.ts +8 -0
  76. package/dist/components/PassportErrorModal/PassportErrorModal.d.ts.map +1 -0
  77. package/dist/components/PassportErrorModal/PassportErrorModal.js +68 -0
  78. package/dist/components/{ConfirmationModal/ConfirmationModal.stories.d.ts → PassportErrorModal/PassportErrorModal.stories.d.ts} +1 -0
  79. package/dist/components/PassportErrorModal/PassportErrorModal.stories.d.ts.map +1 -0
  80. package/dist/components/PassportFooter/PassportFooter.d.ts +3 -0
  81. package/dist/components/PassportFooter/PassportFooter.d.ts.map +1 -0
  82. package/dist/components/PassportFooter/PassportFooter.js +56 -0
  83. package/dist/components/{CustomFooter/CustomFooter.stories.d.ts → PassportFooter/PassportFooter.stories.d.ts} +1 -0
  84. package/dist/components/PassportFooter/PassportFooter.stories.d.ts.map +1 -0
  85. package/dist/components/{CustomFooter/CustomFooter.types.d.ts → PassportFooter/PassportFooter.types.d.ts} +3 -2
  86. package/dist/components/PassportFooter/PassportFooter.types.d.ts.map +1 -0
  87. package/dist/components/PassportInactivityModal/PassportInactivityModal.d.ts +12 -0
  88. package/dist/components/PassportInactivityModal/PassportInactivityModal.d.ts.map +1 -0
  89. package/dist/components/PassportInactivityModal/PassportInactivityModal.js +53 -0
  90. package/dist/components/PassportInactivityModal/PassportInactivityModal.stories.d.ts +41 -0
  91. package/dist/components/PassportInactivityModal/PassportInactivityModal.stories.d.ts.map +1 -0
  92. package/dist/components/PassportInfoModal/PassportInfoModal.d.ts +3 -0
  93. package/dist/components/PassportInfoModal/PassportInfoModal.d.ts.map +1 -0
  94. package/dist/components/PassportInfoModal/PassportInfoModal.js +68 -0
  95. package/dist/components/PassportInfoModal/PassportInfoModal.stories.d.ts +29 -0
  96. package/dist/components/PassportInfoModal/PassportInfoModal.stories.d.ts.map +1 -0
  97. package/dist/components/PassportInfoModal/PassportInfoModal.types.d.ts +7 -0
  98. package/dist/components/PassportInfoModal/PassportInfoModal.types.d.ts.map +1 -0
  99. package/dist/components/PassportInput/PassportInput.d.ts +3 -0
  100. package/dist/components/PassportInput/PassportInput.d.ts.map +1 -0
  101. package/dist/components/PassportInput/PassportInput.js +51 -0
  102. package/dist/components/PassportInput/PassportInput.stories.d.ts +24 -0
  103. package/dist/components/PassportInput/PassportInput.stories.d.ts.map +1 -0
  104. package/dist/components/PassportInput/PassportInput.types.d.ts +9 -0
  105. package/dist/components/PassportInput/PassportInput.types.d.ts.map +1 -0
  106. package/dist/components/PassportInput/PassportInput.types.js +1 -0
  107. package/dist/components/PassportKpiCard/PassportKpiCard.d.ts +3 -0
  108. package/dist/components/PassportKpiCard/PassportKpiCard.d.ts.map +1 -0
  109. package/dist/components/PassportKpiCard/PassportKpiCard.js +44 -0
  110. package/dist/components/{KpiCard/KpiCard.stories.d.ts → PassportKpiCard/PassportKpiCard.stories.d.ts} +3 -2
  111. package/dist/components/PassportKpiCard/PassportKpiCard.stories.d.ts.map +1 -0
  112. package/dist/components/PassportKpiCard/PassportKpiCard.types.d.ts +11 -0
  113. package/dist/components/PassportKpiCard/PassportKpiCard.types.d.ts.map +1 -0
  114. package/dist/components/PassportKpiCard/PassportKpiCard.types.js +1 -0
  115. package/dist/components/PassportKpiWrapper/PassportKpiWrapper.d.ts +3 -0
  116. package/dist/components/PassportKpiWrapper/PassportKpiWrapper.d.ts.map +1 -0
  117. package/dist/components/PassportKpiWrapper/PassportKpiWrapper.js +22 -0
  118. package/dist/components/{KpiWrapper/KpiWrapper.stories.d.ts → PassportKpiWrapper/PassportKpiWrapper.stories.d.ts} +6 -5
  119. package/dist/components/PassportKpiWrapper/PassportKpiWrapper.stories.d.ts.map +1 -0
  120. package/dist/components/{KpiWrapper/KpiWrapper.types.d.ts → PassportKpiWrapper/PassportKpiWrapper.types.d.ts} +2 -1
  121. package/dist/components/PassportKpiWrapper/PassportKpiWrapper.types.d.ts.map +1 -0
  122. package/dist/components/PassportKpiWrapper/PassportKpiWrapper.types.js +1 -0
  123. package/dist/components/PassportMultiSelect/PassportMultiSelect.d.ts +3 -0
  124. package/dist/components/PassportMultiSelect/PassportMultiSelect.d.ts.map +1 -0
  125. package/dist/components/PassportMultiSelect/PassportMultiSelect.js +72 -0
  126. package/dist/components/PassportMultiSelect/PassportMultiSelect.stories.d.ts +24 -0
  127. package/dist/components/PassportMultiSelect/PassportMultiSelect.stories.d.ts.map +1 -0
  128. package/dist/components/PassportMultiSelect/PassportMultiSelect.types.d.ts +12 -0
  129. package/dist/components/PassportMultiSelect/PassportMultiSelect.types.d.ts.map +1 -0
  130. package/dist/components/PassportMultiSelect/PassportMultiSelect.types.js +1 -0
  131. package/dist/components/PassportPagination/PassportPagination.d.ts +3 -0
  132. package/dist/components/PassportPagination/PassportPagination.d.ts.map +1 -0
  133. package/dist/components/{CustomPagination/CustomPagination.js → PassportPagination/PassportPagination.js} +215 -218
  134. package/dist/components/{CustomPagination/CustomPagination.stories.d.ts → PassportPagination/PassportPagination.stories.d.ts} +3 -2
  135. package/dist/components/PassportPagination/PassportPagination.stories.d.ts.map +1 -0
  136. package/dist/components/{CustomPagination/CustomPagination.types.d.ts → PassportPagination/PassportPagination.types.d.ts} +2 -1
  137. package/dist/components/PassportPagination/PassportPagination.types.d.ts.map +1 -0
  138. package/dist/components/PassportPagination/PassportPagination.types.js +1 -0
  139. package/dist/components/PassportTabHeader/PassportTabHeader.d.ts +7 -0
  140. package/dist/components/PassportTabHeader/PassportTabHeader.d.ts.map +1 -0
  141. package/dist/components/PassportTabHeader/PassportTabHeader.js +14 -0
  142. package/dist/components/PassportTabHeader/PassportTabHeader.stories.d.ts +21 -0
  143. package/dist/components/PassportTabHeader/PassportTabHeader.stories.d.ts.map +1 -0
  144. package/dist/components/PassportTextField/PassportTextField.d.ts +3 -0
  145. package/dist/components/PassportTextField/PassportTextField.d.ts.map +1 -0
  146. package/dist/components/PassportTextField/PassportTextField.js +23 -0
  147. package/dist/components/PassportTextField/PassportTextField.stories.d.ts +22 -0
  148. package/dist/components/PassportTextField/PassportTextField.stories.d.ts.map +1 -0
  149. package/dist/components/SideMenu/SideMenu.d.ts +1 -0
  150. package/dist/components/SideMenu/SideMenu.d.ts.map +1 -0
  151. package/dist/components/SideMenu/SideMenu.js +89 -41
  152. package/dist/components/SideMenu/SideMenu.stories.d.ts +1 -0
  153. package/dist/components/SideMenu/SideMenu.stories.d.ts.map +1 -0
  154. package/dist/components/SideMenu/SideMenu.types.d.ts +3 -1
  155. package/dist/components/SideMenu/SideMenu.types.d.ts.map +1 -0
  156. package/dist/components/TotalDataGrid/TotalDataGrid.d.ts +1 -0
  157. package/dist/components/TotalDataGrid/TotalDataGrid.d.ts.map +1 -0
  158. package/dist/components/TotalDataGrid/TotalDataGrid.js +3 -3
  159. package/dist/components/TotalDataGrid/TotalDataGrid.stories.d.ts +1 -0
  160. package/dist/components/TotalDataGrid/TotalDataGrid.stories.d.ts.map +1 -0
  161. package/dist/components/TotalDataGrid/TotalDataGrid.types.d.ts +1 -0
  162. package/dist/components/TotalDataGrid/TotalDataGrid.types.d.ts.map +1 -0
  163. package/dist/components/UserInfoDropdown/UserInfoDropdown.d.ts +1 -0
  164. package/dist/components/UserInfoDropdown/UserInfoDropdown.d.ts.map +1 -0
  165. package/dist/components/UserInfoDropdown/UserInfoDropdown.js +3 -2
  166. package/dist/components/UserInfoDropdown/UserInfoDropdown.stories.d.ts +6 -5
  167. package/dist/components/UserInfoDropdown/UserInfoDropdown.stories.d.ts.map +1 -0
  168. package/dist/components/UserInfoDropdown/UserInfoDropdown.types.d.ts +9 -3
  169. package/dist/components/UserInfoDropdown/UserInfoDropdown.types.d.ts.map +1 -0
  170. package/dist/components/index.d.ts +19 -8
  171. package/dist/components/index.d.ts.map +1 -0
  172. package/dist/components/index.js +47 -28
  173. package/dist/createSimplePaletteValueFilter-Bz8RuRaa.js +23 -0
  174. package/dist/{createSvgIcon-DNSRtm3a.js → createSvgIcon-B-eIQ7rU.js} +118 -124
  175. package/dist/extendSxProp-QNe1Nf_s.js +51 -0
  176. package/dist/main.d.ts +1 -0
  177. package/dist/main.d.ts.map +1 -0
  178. package/dist/main.js +65 -46
  179. package/dist/mock.d.ts +1 -0
  180. package/dist/mock.d.ts.map +1 -0
  181. package/dist/portal-utils/chunkArray.d.ts +1 -0
  182. package/dist/portal-utils/chunkArray.d.ts.map +1 -0
  183. package/dist/portal-utils/cn.d.ts +4 -1
  184. package/dist/portal-utils/cn.d.ts.map +1 -0
  185. package/dist/portal-utils/cn.js +1 -1
  186. package/dist/portal-utils/formatters.d.ts +1 -0
  187. package/dist/portal-utils/formatters.d.ts.map +1 -0
  188. package/dist/portal-utils/formatters.js +291 -334
  189. package/dist/portal-utils/index.d.ts +2 -1
  190. package/dist/portal-utils/index.d.ts.map +1 -0
  191. package/dist/portal-utils/loggerService.d.ts +1 -0
  192. package/dist/portal-utils/loggerService.d.ts.map +1 -0
  193. package/dist/portal-utils/pageCount.d.ts +1 -0
  194. package/dist/portal-utils/pageCount.d.ts.map +1 -0
  195. package/dist/types/BusinessDayRange.d.ts +1 -0
  196. package/dist/types/BusinessDayRange.d.ts.map +1 -0
  197. package/dist/types/Column.d.ts +1 -0
  198. package/dist/types/Column.d.ts.map +1 -0
  199. package/dist/types/CultureStore.d.ts +1 -0
  200. package/dist/types/CultureStore.d.ts.map +1 -0
  201. package/dist/types/CustomSvg.d.ts +1 -0
  202. package/dist/types/CustomSvg.d.ts.map +1 -0
  203. package/dist/types/LoginRequest.d.ts +1 -0
  204. package/dist/types/LoginRequest.d.ts.map +1 -0
  205. package/dist/types/index.d.ts +1 -0
  206. package/dist/types/index.d.ts.map +1 -0
  207. package/dist/useMobilePicker-hk2kq6ev.js +19662 -0
  208. package/dist/useSlot-CXnK24LX.js +189 -0
  209. package/package.json +39 -38
  210. package/dist/Box-C-zPAMZN.js +0 -102
  211. package/dist/ButtonBase-DrxMtoTW.js +0 -966
  212. package/dist/EllipsisOutlined-DfCu6q_b.js +0 -2467
  213. package/dist/InvencoGVR-qnTq-d6S.js +0 -5
  214. package/dist/PurePanel-DvQTygSo.js +0 -2209
  215. package/dist/Skeleton-Bh0A9xju.js +0 -565
  216. package/dist/UserInfoDropdown-CWTcdnqL.js +0 -3755
  217. package/dist/VModalIcon-D7L4bQLO.js +0 -5
  218. package/dist/_commonjsHelpers-C6fGbg64.js +0 -6
  219. package/dist/assets/ConfirmationModal.css +0 -1
  220. package/dist/assets/ErrorModal.css +0 -1
  221. package/dist/assets/KpiCard.css +0 -1
  222. package/dist/assets/globals.css +0 -1
  223. package/dist/components/ConfirmationModal/ConfirmationModal.d.ts +0 -2
  224. package/dist/components/ConfirmationModal/ConfirmationModal.js +0 -51
  225. package/dist/components/ConfirmationModal/ConfirmationModal.stories.js +0 -36
  226. package/dist/components/ConfirmationModal/ConfirmationModal.types.d.ts +0 -11
  227. package/dist/components/CustomButton/CustomButton.d.ts +0 -3
  228. package/dist/components/CustomButton/CustomButton.stories.js +0 -42
  229. package/dist/components/CustomButton/CustomeButton.types.d.ts +0 -8
  230. package/dist/components/CustomFooter/CustomFooter.d.ts +0 -2
  231. package/dist/components/CustomFooter/CustomFooter.js +0 -32
  232. package/dist/components/CustomFooter/CustomFooter.stories.js +0 -40
  233. package/dist/components/CustomPagination/CustomPagination.d.ts +0 -3
  234. package/dist/components/CustomPagination/CustomPagination.stories.js +0 -25
  235. package/dist/components/ErrorModal/ErrorModal.d.ts +0 -2
  236. package/dist/components/ErrorModal/ErrorModal.js +0 -40
  237. package/dist/components/ErrorModal/ErrorModal.stories.js +0 -33
  238. package/dist/components/ErrorModal/ErrorModal.types.d.ts +0 -8
  239. package/dist/components/InfoModal/InfoModal.d.ts +0 -2
  240. package/dist/components/InfoModal/InfoModal.js +0 -44
  241. package/dist/components/InfoModal/InfoModal.stories.js +0 -33
  242. package/dist/components/InfoModal/InfoModal.types.d.ts +0 -8
  243. package/dist/components/KpiCard/KpiCard.d.ts +0 -2
  244. package/dist/components/KpiCard/KpiCard.js +0 -2439
  245. package/dist/components/KpiCard/KpiCard.stories.js +0 -26
  246. package/dist/components/KpiCard/KpiCard.types.d.ts +0 -8
  247. package/dist/components/KpiWrapper/KpiWrapper.d.ts +0 -2
  248. package/dist/components/KpiWrapper/KpiWrapper.js +0 -11
  249. package/dist/components/KpiWrapper/KpiWrapper.stories.js +0 -56
  250. package/dist/components/LoadingAnimation/LoadingAnimation.stories.js +0 -14
  251. package/dist/components/Login/Login.stories.js +0 -24212
  252. package/dist/components/SideMenu/SideMenu.stories.js +0 -81
  253. package/dist/components/TotalDataGrid/TotalDataGrid.stories.js +0 -23
  254. package/dist/components/UserInfoDropdown/UserInfoDropdown.stories.js +0 -36
  255. package/dist/context-dCWAMvX5.js +0 -7320
  256. package/dist/createSimplePaletteValueFilter-CwLqlaaZ.js +0 -3457
  257. package/dist/index-B00P9-H3.js +0 -1681
  258. package/dist/index-BBBjHj3B.js +0 -411
  259. package/dist/objectWithoutPropertiesLoose-BTau6TOn.js +0 -33
  260. package/dist/useSlot-B4sbbhYz.js +0 -188
  261. /package/dist/assets/{CustomFooter.css → PassportFooter.css} +0 -0
  262. /package/dist/assets/{KpiWrapper.css → PassportKpiWrapper.css} +0 -0
  263. /package/dist/components/{ConfirmationModal/ConfirmationModal.types.js → DebouncedPassportInput/DebouncedPassportInput.types.js} +0 -0
  264. /package/dist/components/{CustomButton/CustomeButton.types.js → PassportAutocomplete/PassportAutocomplete.types.js} +0 -0
  265. /package/dist/components/{CustomFooter/CustomFooter.types.js → PassportButton/PassportButton.types.js} +0 -0
  266. /package/dist/components/{CustomPagination/CustomPagination.types.js → PassportDatePicker/PassportDatePicker.types.js} +0 -0
  267. /package/dist/components/{ErrorModal/ErrorModal.types.js → PassportDateTimePicker/PassportDateTimePicker.types.js} +0 -0
  268. /package/dist/components/{InfoModal/InfoModal.types.js → PassportDropdown/PassportDropdown.types.js} +0 -0
  269. /package/dist/components/{KpiCard/KpiCard.types.js → PassportFooter/PassportFooter.types.js} +0 -0
  270. /package/dist/components/{KpiWrapper/KpiWrapper.types.js → PassportInfoModal/PassportInfoModal.types.js} +0 -0
@@ -1,3755 +0,0 @@
1
- import { jsx as we, jsxs as no } from "react/jsx-runtime";
2
- import * as l from "react";
3
- import Ct, { useRef as ze, forwardRef as We, useImperativeHandle as wt, isValidElement as ro, useContext as nt, useState as rt, useEffect as Le, createContext as io } from "react";
4
- import { cn as ao } from "./portal-utils/cn.js";
5
- import { _ as je } from "./objectWithoutPropertiesLoose-BTau6TOn.js";
6
- import { I as Xe, K as ae, H as lo, U as Fe, ah as so, g as de, m as ce, y as be, u as I, a2 as co, a as re, E as uo, v as he, D as Te, c as _, p as mo, N as po, e as se, l as it, b as Ge, s as Ye, t as xt, j as go, x as Ue, o as $e, an as fo, n as vo, a4 as bo, A as ho, z as $o, F as at, aa as lt, ad as yo, k as St, ao as Co, B as st } from "./context-dCWAMvX5.js";
7
- import { R as wo, T as xo, c as So, M as Oo, a as Oe, u as Io, S as Po, E as Eo, b as Ot, d as No, s as Bo, e as zo, f as jo, g as To, D as _o } from "./EllipsisOutlined-DfCu6q_b.js";
8
- import { P as ve, i as _e, C as It, d as Ro, u as qe, e as ue, z as Pt, g as Mo, f as Ho, h as Do, j as Ao, B as ct } from "./PurePanel-DvQTygSo.js";
9
- import './assets/UserInfoDropdown.css';function Lo(e, t) {
10
- return ve.reduce((o, n) => {
11
- const r = e[`${n}1`], a = e[`${n}3`], i = e[`${n}6`], s = e[`${n}7`];
12
- return Object.assign(Object.assign({}, o), t(n, {
13
- lightColor: r,
14
- lightBorderColor: a,
15
- darkColor: i,
16
- textColor: s
17
- }));
18
- }, {});
19
- }
20
- var ko = { icon: { tag: "svg", attrs: { viewBox: "64 64 896 896", focusable: "false" }, children: [{ tag: "path", attrs: { d: "M765.7 486.8L314.9 134.7A7.97 7.97 0 00302 141v77.3c0 4.9 2.3 9.6 6.1 12.6l360 281.1-360 281.1c-3.9 3-6.1 7.7-6.1 12.6V883c0 6.7 7.7 10.4 12.9 6.3l450.8-352.1a31.96 31.96 0 000-50.4z" } }] }, name: "right", theme: "outlined" }, Vo = function(t, o) {
21
- return /* @__PURE__ */ l.createElement(Xe, je({}, t, {
22
- ref: o,
23
- icon: ko
24
- }));
25
- }, Ie = /* @__PURE__ */ l.forwardRef(Vo);
26
- process.env.NODE_ENV !== "production" && (Ie.displayName = "RightOutlined");
27
- const Wo = (e) => ({
28
- [e.componentCls]: {
29
- // For common/openAnimation
30
- [`${e.antCls}-motion-collapse-legacy`]: {
31
- overflow: "hidden",
32
- "&-active": {
33
- transition: `height ${e.motionDurationMid} ${e.motionEaseInOut},
34
- opacity ${e.motionDurationMid} ${e.motionEaseInOut} !important`
35
- }
36
- },
37
- [`${e.antCls}-motion-collapse`]: {
38
- overflow: "hidden",
39
- transition: `height ${e.motionDurationMid} ${e.motionEaseInOut},
40
- opacity ${e.motionDurationMid} ${e.motionEaseInOut} !important`
41
- }
42
- }
43
- }), Xo = new ae("antMoveDownIn", {
44
- "0%": {
45
- transform: "translate3d(0, 100%, 0)",
46
- transformOrigin: "0 0",
47
- opacity: 0
48
- },
49
- "100%": {
50
- transform: "translate3d(0, 0, 0)",
51
- transformOrigin: "0 0",
52
- opacity: 1
53
- }
54
- }), Fo = new ae("antMoveDownOut", {
55
- "0%": {
56
- transform: "translate3d(0, 0, 0)",
57
- transformOrigin: "0 0",
58
- opacity: 1
59
- },
60
- "100%": {
61
- transform: "translate3d(0, 100%, 0)",
62
- transformOrigin: "0 0",
63
- opacity: 0
64
- }
65
- }), Go = new ae("antMoveLeftIn", {
66
- "0%": {
67
- transform: "translate3d(-100%, 0, 0)",
68
- transformOrigin: "0 0",
69
- opacity: 0
70
- },
71
- "100%": {
72
- transform: "translate3d(0, 0, 0)",
73
- transformOrigin: "0 0",
74
- opacity: 1
75
- }
76
- }), Yo = new ae("antMoveLeftOut", {
77
- "0%": {
78
- transform: "translate3d(0, 0, 0)",
79
- transformOrigin: "0 0",
80
- opacity: 1
81
- },
82
- "100%": {
83
- transform: "translate3d(-100%, 0, 0)",
84
- transformOrigin: "0 0",
85
- opacity: 0
86
- }
87
- }), Uo = new ae("antMoveRightIn", {
88
- "0%": {
89
- transform: "translate3d(100%, 0, 0)",
90
- transformOrigin: "0 0",
91
- opacity: 0
92
- },
93
- "100%": {
94
- transform: "translate3d(0, 0, 0)",
95
- transformOrigin: "0 0",
96
- opacity: 1
97
- }
98
- }), qo = new ae("antMoveRightOut", {
99
- "0%": {
100
- transform: "translate3d(0, 0, 0)",
101
- transformOrigin: "0 0",
102
- opacity: 1
103
- },
104
- "100%": {
105
- transform: "translate3d(100%, 0, 0)",
106
- transformOrigin: "0 0",
107
- opacity: 0
108
- }
109
- }), Ko = new ae("antMoveUpIn", {
110
- "0%": {
111
- transform: "translate3d(0, -100%, 0)",
112
- transformOrigin: "0 0",
113
- opacity: 0
114
- },
115
- "100%": {
116
- transform: "translate3d(0, 0, 0)",
117
- transformOrigin: "0 0",
118
- opacity: 1
119
- }
120
- }), Zo = new ae("antMoveUpOut", {
121
- "0%": {
122
- transform: "translate3d(0, 0, 0)",
123
- transformOrigin: "0 0",
124
- opacity: 1
125
- },
126
- "100%": {
127
- transform: "translate3d(0, -100%, 0)",
128
- transformOrigin: "0 0",
129
- opacity: 0
130
- }
131
- }), Qo = {
132
- "move-up": {
133
- inKeyframes: Ko,
134
- outKeyframes: Zo
135
- },
136
- "move-down": {
137
- inKeyframes: Xo,
138
- outKeyframes: Fo
139
- },
140
- "move-left": {
141
- inKeyframes: Go,
142
- outKeyframes: Yo
143
- },
144
- "move-right": {
145
- inKeyframes: Uo,
146
- outKeyframes: qo
147
- }
148
- }, dt = (e, t) => {
149
- const {
150
- antCls: o
151
- } = e, n = `${o}-${t}`, {
152
- inKeyframes: r,
153
- outKeyframes: a
154
- } = Qo[t];
155
- return [lo(n, r, a, e.motionDurationMid), {
156
- [`
157
- ${n}-enter,
158
- ${n}-appear
159
- `]: {
160
- opacity: 0,
161
- animationTimingFunction: e.motionEaseOutCirc
162
- },
163
- [`${n}-leave`]: {
164
- animationTimingFunction: e.motionEaseInOutCirc
165
- }
166
- }];
167
- }, Et = (e, t) => {
168
- typeof (e == null ? void 0 : e.addEventListener) < "u" ? e.addEventListener("change", t) : typeof (e == null ? void 0 : e.addListener) < "u" && e.addListener(t);
169
- }, Nt = (e, t) => {
170
- typeof (e == null ? void 0 : e.removeEventListener) < "u" ? e.removeEventListener("change", t) : typeof (e == null ? void 0 : e.removeListener) < "u" && e.removeListener(t);
171
- }, Bt = ["xxl", "xl", "lg", "md", "sm", "xs"], Jo = (e) => ({
172
- xs: `(max-width: ${e.screenXSMax}px)`,
173
- sm: `(min-width: ${e.screenSM}px)`,
174
- md: `(min-width: ${e.screenMD}px)`,
175
- lg: `(min-width: ${e.screenLG}px)`,
176
- xl: `(min-width: ${e.screenXL}px)`,
177
- xxl: `(min-width: ${e.screenXXL}px)`
178
- }), en = (e) => {
179
- const t = e, o = [].concat(Bt).reverse();
180
- return o.forEach((n, r) => {
181
- const a = n.toUpperCase(), i = `screen${a}Min`, s = `screen${a}`;
182
- if (!(t[i] <= t[s]))
183
- throw new Error(`${i}<=${s} fails : !(${t[i]}<=${t[s]})`);
184
- if (r < o.length - 1) {
185
- const c = `screen${a}Max`;
186
- if (!(t[s] <= t[c]))
187
- throw new Error(`${s}<=${c} fails : !(${t[s]}<=${t[c]})`);
188
- const d = `screen${o[r + 1].toUpperCase()}Min`;
189
- if (!(t[c] <= t[d]))
190
- throw new Error(`${c}<=${d} fails : !(${t[c]}<=${t[d]})`);
191
- }
192
- }), e;
193
- }, tn = () => {
194
- const [, e] = Fe(), t = Jo(en(e));
195
- return Ct.useMemo(() => {
196
- const o = /* @__PURE__ */ new Map();
197
- let n = -1, r = {};
198
- return {
199
- responsiveMap: t,
200
- matchHandlers: {},
201
- dispatch(a) {
202
- return r = a, o.forEach((i) => i(r)), o.size >= 1;
203
- },
204
- subscribe(a) {
205
- return o.size || this.register(), n += 1, o.set(n, a), a(r), n;
206
- },
207
- unsubscribe(a) {
208
- o.delete(a), o.size || this.unregister();
209
- },
210
- register() {
211
- Object.entries(t).forEach(([a, i]) => {
212
- const s = ({
213
- matches: m
214
- }) => {
215
- this.dispatch(Object.assign(Object.assign({}, r), {
216
- [a]: m
217
- }));
218
- }, c = window.matchMedia(i);
219
- Et(c, s), this.matchHandlers[i] = {
220
- mql: c,
221
- listener: s
222
- }, s(c);
223
- });
224
- },
225
- unregister() {
226
- Object.values(t).forEach((a) => {
227
- const i = this.matchHandlers[a];
228
- Nt(i == null ? void 0 : i.mql, i == null ? void 0 : i.listener);
229
- }), o.clear();
230
- }
231
- };
232
- }, [e]);
233
- };
234
- function on() {
235
- const [, e] = l.useReducer((t) => t + 1, 0);
236
- return e;
237
- }
238
- function nn(e = !0, t = {}) {
239
- const o = ze(t), n = on(), r = tn();
240
- return so(() => {
241
- const a = r.subscribe((i) => {
242
- o.current = i, e && n();
243
- });
244
- return () => r.unsubscribe(a);
245
- }, []), o.current;
246
- }
247
- const Ve = /* @__PURE__ */ l.createContext({}), rn = (e) => {
248
- const {
249
- antCls: t,
250
- componentCls: o,
251
- iconCls: n,
252
- avatarBg: r,
253
- avatarColor: a,
254
- containerSize: i,
255
- containerSizeLG: s,
256
- containerSizeSM: c,
257
- textFontSize: m,
258
- textFontSizeLG: d,
259
- textFontSizeSM: f,
260
- borderRadius: p,
261
- borderRadiusLG: v,
262
- borderRadiusSM: g,
263
- lineWidth: u,
264
- lineType: h
265
- } = e, $ = (b, S, N) => ({
266
- width: b,
267
- height: b,
268
- borderRadius: "50%",
269
- [`&${o}-square`]: {
270
- borderRadius: N
271
- },
272
- [`&${o}-icon`]: {
273
- fontSize: S,
274
- [`> ${n}`]: {
275
- margin: 0
276
- }
277
- }
278
- });
279
- return {
280
- [o]: Object.assign(Object.assign(Object.assign(Object.assign({}, be(e)), {
281
- position: "relative",
282
- display: "inline-flex",
283
- justifyContent: "center",
284
- alignItems: "center",
285
- overflow: "hidden",
286
- color: a,
287
- whiteSpace: "nowrap",
288
- textAlign: "center",
289
- verticalAlign: "middle",
290
- background: r,
291
- border: `${I(u)} ${h} transparent`,
292
- "&-image": {
293
- background: "transparent"
294
- },
295
- [`${t}-image-img`]: {
296
- display: "block"
297
- }
298
- }), $(i, m, p)), {
299
- "&-lg": Object.assign({}, $(s, d, v)),
300
- "&-sm": Object.assign({}, $(c, f, g)),
301
- "> img": {
302
- display: "block",
303
- width: "100%",
304
- height: "100%",
305
- objectFit: "cover"
306
- }
307
- })
308
- };
309
- }, an = (e) => {
310
- const {
311
- componentCls: t,
312
- groupBorderColor: o,
313
- groupOverlapping: n,
314
- groupSpace: r
315
- } = e;
316
- return {
317
- [`${t}-group`]: {
318
- display: "inline-flex",
319
- [t]: {
320
- borderColor: o
321
- },
322
- "> *:not(:first-child)": {
323
- marginInlineStart: n
324
- }
325
- },
326
- [`${t}-group-popover`]: {
327
- [`${t} + ${t}`]: {
328
- marginInlineStart: r
329
- }
330
- }
331
- };
332
- }, ln = (e) => {
333
- const {
334
- controlHeight: t,
335
- controlHeightLG: o,
336
- controlHeightSM: n,
337
- fontSize: r,
338
- fontSizeLG: a,
339
- fontSizeXL: i,
340
- fontSizeHeading3: s,
341
- marginXS: c,
342
- marginXXS: m,
343
- colorBorderBg: d
344
- } = e;
345
- return {
346
- containerSize: t,
347
- containerSizeLG: o,
348
- containerSizeSM: n,
349
- textFontSize: Math.round((a + i) / 2),
350
- textFontSizeLG: s,
351
- textFontSizeSM: r,
352
- groupSpace: m,
353
- groupOverlapping: -c,
354
- groupBorderColor: d
355
- };
356
- }, zt = de("Avatar", (e) => {
357
- const {
358
- colorTextLightSolid: t,
359
- colorTextPlaceholder: o
360
- } = e, n = ce(e, {
361
- avatarBg: o,
362
- avatarColor: t
363
- });
364
- return [rn(n), an(n)];
365
- }, ln);
366
- var sn = function(e, t) {
367
- var o = {};
368
- for (var n in e) Object.prototype.hasOwnProperty.call(e, n) && t.indexOf(n) < 0 && (o[n] = e[n]);
369
- if (e != null && typeof Object.getOwnPropertySymbols == "function") for (var r = 0, n = Object.getOwnPropertySymbols(e); r < n.length; r++)
370
- t.indexOf(n[r]) < 0 && Object.prototype.propertyIsEnumerable.call(e, n[r]) && (o[n[r]] = e[n[r]]);
371
- return o;
372
- };
373
- const Ke = /* @__PURE__ */ l.forwardRef((e, t) => {
374
- const {
375
- prefixCls: o,
376
- shape: n,
377
- size: r,
378
- src: a,
379
- srcSet: i,
380
- icon: s,
381
- className: c,
382
- rootClassName: m,
383
- style: d,
384
- alt: f,
385
- draggable: p,
386
- children: v,
387
- crossOrigin: g,
388
- gap: u = 4,
389
- onError: h
390
- } = e, $ = sn(e, ["prefixCls", "shape", "size", "src", "srcSet", "icon", "className", "rootClassName", "style", "alt", "draggable", "children", "crossOrigin", "gap", "onError"]), [b, S] = l.useState(1), [N, y] = l.useState(!1), [M, j] = l.useState(!0), T = l.useRef(null), O = l.useRef(null), E = co(t, T), {
391
- getPrefixCls: H,
392
- avatar: x
393
- } = l.useContext(re), C = l.useContext(Ve), w = () => {
394
- if (!O.current || !T.current)
395
- return;
396
- const V = O.current.offsetWidth, Y = T.current.offsetWidth;
397
- V !== 0 && Y !== 0 && u * 2 < Y && S(Y - u * 2 < V ? (Y - u * 2) / V : 1);
398
- };
399
- l.useEffect(() => {
400
- y(!0);
401
- }, []), l.useEffect(() => {
402
- j(!0), S(1);
403
- }, [a]), l.useEffect(w, [u]);
404
- const B = () => {
405
- (h == null ? void 0 : h()) !== !1 && j(!1);
406
- }, P = uo((V) => {
407
- var Y, ne;
408
- return (ne = (Y = r ?? (C == null ? void 0 : C.size)) !== null && Y !== void 0 ? Y : V) !== null && ne !== void 0 ? ne : "default";
409
- }), L = Object.keys(typeof P == "object" ? P || {} : {}).some((V) => ["xs", "sm", "md", "lg", "xl", "xxl"].includes(V)), z = nn(L), F = l.useMemo(() => {
410
- if (typeof P != "object")
411
- return {};
412
- const V = Bt.find((ne) => z[ne]), Y = P[V];
413
- return Y ? {
414
- width: Y,
415
- height: Y,
416
- fontSize: Y && (s || v) ? Y / 2 : 18
417
- } : {};
418
- }, [z, P]);
419
- if (process.env.NODE_ENV !== "production") {
420
- const V = he("Avatar");
421
- process.env.NODE_ENV !== "production" && V(!(typeof s == "string" && s.length > 2), "breaking", `\`icon\` is using ReactNode instead of string naming in v4. Please check \`${s}\` at https://ant.design/components/icon`);
422
- }
423
- const D = H("avatar", o), A = Te(D), [k, R, W] = zt(D, A), G = _({
424
- [`${D}-lg`]: P === "large",
425
- [`${D}-sm`]: P === "small"
426
- }), q = /* @__PURE__ */ l.isValidElement(a), Q = n || (C == null ? void 0 : C.shape) || "circle", X = _(D, G, x == null ? void 0 : x.className, `${D}-${Q}`, {
427
- [`${D}-image`]: q || a && M,
428
- [`${D}-icon`]: !!s
429
- }, W, A, c, m, R), Z = typeof P == "number" ? {
430
- width: P,
431
- height: P,
432
- fontSize: s ? P / 2 : 18
433
- } : {};
434
- let J;
435
- if (typeof a == "string" && M)
436
- J = /* @__PURE__ */ l.createElement("img", {
437
- src: a,
438
- draggable: p,
439
- srcSet: i,
440
- onError: B,
441
- alt: f,
442
- crossOrigin: g
443
- });
444
- else if (q)
445
- J = a;
446
- else if (s)
447
- J = s;
448
- else if (N || b !== 1) {
449
- const V = `scale(${b})`, Y = {
450
- msTransform: V,
451
- WebkitTransform: V,
452
- transform: V
453
- };
454
- J = /* @__PURE__ */ l.createElement(wo, {
455
- onResize: w
456
- }, /* @__PURE__ */ l.createElement("span", {
457
- className: `${D}-string`,
458
- ref: O,
459
- style: Object.assign({}, Y)
460
- }, v));
461
- } else
462
- J = /* @__PURE__ */ l.createElement("span", {
463
- className: `${D}-string`,
464
- style: {
465
- opacity: 0
466
- },
467
- ref: O
468
- }, v);
469
- return k(/* @__PURE__ */ l.createElement("span", Object.assign({}, $, {
470
- style: Object.assign(Object.assign(Object.assign(Object.assign({}, Z), F), x == null ? void 0 : x.style), d),
471
- className: X,
472
- ref: E
473
- }), J));
474
- });
475
- process.env.NODE_ENV !== "production" && (Ke.displayName = "Avatar");
476
- const Pe = (e) => e ? typeof e == "function" ? e() : e : null;
477
- function Ze(e) {
478
- var t = e.children, o = e.prefixCls, n = e.id, r = e.overlayInnerStyle, a = e.bodyClassName, i = e.className, s = e.style;
479
- return /* @__PURE__ */ l.createElement("div", {
480
- className: _("".concat(o, "-content"), i),
481
- style: s
482
- }, /* @__PURE__ */ l.createElement("div", {
483
- className: _("".concat(o, "-inner"), a),
484
- id: n,
485
- role: "tooltip",
486
- style: r
487
- }, typeof t == "function" ? t() : t));
488
- }
489
- var pe = {
490
- shiftX: 64,
491
- adjustY: 1
492
- }, ge = {
493
- adjustX: 1,
494
- shiftY: !0
495
- }, te = [0, 0], cn = {
496
- left: {
497
- points: ["cr", "cl"],
498
- overflow: ge,
499
- offset: [-4, 0],
500
- targetOffset: te
501
- },
502
- right: {
503
- points: ["cl", "cr"],
504
- overflow: ge,
505
- offset: [4, 0],
506
- targetOffset: te
507
- },
508
- top: {
509
- points: ["bc", "tc"],
510
- overflow: pe,
511
- offset: [0, -4],
512
- targetOffset: te
513
- },
514
- bottom: {
515
- points: ["tc", "bc"],
516
- overflow: pe,
517
- offset: [0, 4],
518
- targetOffset: te
519
- },
520
- topLeft: {
521
- points: ["bl", "tl"],
522
- overflow: pe,
523
- offset: [0, -4],
524
- targetOffset: te
525
- },
526
- leftTop: {
527
- points: ["tr", "tl"],
528
- overflow: ge,
529
- offset: [-4, 0],
530
- targetOffset: te
531
- },
532
- topRight: {
533
- points: ["br", "tr"],
534
- overflow: pe,
535
- offset: [0, -4],
536
- targetOffset: te
537
- },
538
- rightTop: {
539
- points: ["tl", "tr"],
540
- overflow: ge,
541
- offset: [4, 0],
542
- targetOffset: te
543
- },
544
- bottomRight: {
545
- points: ["tr", "br"],
546
- overflow: pe,
547
- offset: [0, 4],
548
- targetOffset: te
549
- },
550
- rightBottom: {
551
- points: ["bl", "br"],
552
- overflow: ge,
553
- offset: [4, 0],
554
- targetOffset: te
555
- },
556
- bottomLeft: {
557
- points: ["tl", "bl"],
558
- overflow: pe,
559
- offset: [0, 4],
560
- targetOffset: te
561
- },
562
- leftBottom: {
563
- points: ["br", "bl"],
564
- overflow: ge,
565
- offset: [-4, 0],
566
- targetOffset: te
567
- }
568
- }, dn = ["overlayClassName", "trigger", "mouseEnterDelay", "mouseLeaveDelay", "overlayStyle", "prefixCls", "children", "onVisibleChange", "afterVisibleChange", "transitionName", "animation", "motion", "placement", "align", "destroyTooltipOnHide", "defaultVisible", "getTooltipContainer", "overlayInnerStyle", "arrowContent", "overlay", "id", "showArrow", "classNames", "styles"], un = function(t, o) {
569
- var n = t.overlayClassName, r = t.trigger, a = r === void 0 ? ["hover"] : r, i = t.mouseEnterDelay, s = i === void 0 ? 0 : i, c = t.mouseLeaveDelay, m = c === void 0 ? 0.1 : c, d = t.overlayStyle, f = t.prefixCls, p = f === void 0 ? "rc-tooltip" : f, v = t.children, g = t.onVisibleChange, u = t.afterVisibleChange, h = t.transitionName, $ = t.animation, b = t.motion, S = t.placement, N = S === void 0 ? "right" : S, y = t.align, M = y === void 0 ? {} : y, j = t.destroyTooltipOnHide, T = j === void 0 ? !1 : j, O = t.defaultVisible, E = t.getTooltipContainer, H = t.overlayInnerStyle;
570
- t.arrowContent;
571
- var x = t.overlay, C = t.id, w = t.showArrow, B = w === void 0 ? !0 : w, P = t.classNames, L = t.styles, z = mo(t, dn), F = po(C), D = ze(null);
572
- wt(o, function() {
573
- return D.current;
574
- });
575
- var A = se({}, z);
576
- "visible" in t && (A.popupVisible = t.visible);
577
- var k = function() {
578
- return /* @__PURE__ */ l.createElement(Ze, {
579
- key: "content",
580
- prefixCls: p,
581
- id: F,
582
- bodyClassName: P == null ? void 0 : P.body,
583
- overlayInnerStyle: se(se({}, H), L == null ? void 0 : L.body)
584
- }, x);
585
- }, R = function() {
586
- var G = l.Children.only(v), q = (G == null ? void 0 : G.props) || {}, Q = se(se({}, q), {}, {
587
- "aria-describedby": x ? F : null
588
- });
589
- return /* @__PURE__ */ l.cloneElement(v, Q);
590
- };
591
- return /* @__PURE__ */ l.createElement(xo, je({
592
- popupClassName: _(n, P == null ? void 0 : P.root),
593
- prefixCls: p,
594
- popup: k,
595
- action: a,
596
- builtinPlacements: cn,
597
- popupPlacement: N,
598
- ref: D,
599
- popupAlign: M,
600
- getPopupContainer: E,
601
- onPopupVisibleChange: g,
602
- afterPopupVisibleChange: u,
603
- popupTransitionName: h,
604
- popupAnimation: $,
605
- popupMotion: b,
606
- defaultPopupVisible: O,
607
- autoDestroy: T,
608
- mouseLeaveDelay: m,
609
- popupStyle: se(se({}, d), L == null ? void 0 : L.root),
610
- mouseEnterDelay: s,
611
- arrow: B
612
- }, A), R());
613
- };
614
- const mn = /* @__PURE__ */ We(un);
615
- function Qe(e) {
616
- const {
617
- sizePopupArrow: t,
618
- borderRadiusXS: o,
619
- borderRadiusOuter: n
620
- } = e, r = t / 2, a = 0, i = r, s = n * 1 / Math.sqrt(2), c = r - n * (1 - 1 / Math.sqrt(2)), m = r - o * (1 / Math.sqrt(2)), d = n * (Math.sqrt(2) - 1) + o * (1 / Math.sqrt(2)), f = 2 * r - m, p = d, v = 2 * r - s, g = c, u = 2 * r - a, h = i, $ = r * Math.sqrt(2) + n * (Math.sqrt(2) - 2), b = n * (Math.sqrt(2) - 1), S = `polygon(${b}px 100%, 50% ${b}px, ${2 * r - b}px 100%, ${b}px 100%)`, N = `path('M ${a} ${i} A ${n} ${n} 0 0 0 ${s} ${c} L ${m} ${d} A ${o} ${o} 0 0 1 ${f} ${p} L ${v} ${g} A ${n} ${n} 0 0 0 ${u} ${h} Z')`;
621
- return {
622
- arrowShadowWidth: $,
623
- arrowPath: N,
624
- arrowPolygon: S
625
- };
626
- }
627
- const pn = (e, t, o) => {
628
- const {
629
- sizePopupArrow: n,
630
- arrowPolygon: r,
631
- arrowPath: a,
632
- arrowShadowWidth: i,
633
- borderRadiusXS: s,
634
- calc: c
635
- } = e;
636
- return {
637
- pointerEvents: "none",
638
- width: n,
639
- height: n,
640
- overflow: "hidden",
641
- "&::before": {
642
- position: "absolute",
643
- bottom: 0,
644
- insetInlineStart: 0,
645
- width: n,
646
- height: c(n).div(2).equal(),
647
- background: t,
648
- clipPath: {
649
- _multi_value_: !0,
650
- value: [r, a]
651
- },
652
- content: '""'
653
- },
654
- "&::after": {
655
- content: '""',
656
- position: "absolute",
657
- width: i,
658
- height: i,
659
- bottom: 0,
660
- insetInline: 0,
661
- margin: "auto",
662
- borderRadius: {
663
- _skip_check_: !0,
664
- value: `0 0 ${I(s)} 0`
665
- },
666
- transform: "translateY(50%) rotate(-135deg)",
667
- boxShadow: o,
668
- zIndex: 0,
669
- background: "transparent"
670
- }
671
- };
672
- }, jt = 8;
673
- function Re(e) {
674
- const {
675
- contentRadius: t,
676
- limitVerticalRadius: o
677
- } = e, n = t > 12 ? t + 2 : 12;
678
- return {
679
- arrowOffsetHorizontal: n,
680
- arrowOffsetVertical: o ? jt : n
681
- };
682
- }
683
- function xe(e, t) {
684
- return e ? t : {};
685
- }
686
- function Je(e, t, o) {
687
- const {
688
- componentCls: n,
689
- boxShadowPopoverArrow: r,
690
- arrowOffsetVertical: a,
691
- arrowOffsetHorizontal: i
692
- } = e, {
693
- arrowDistance: s = 0,
694
- arrowPlacement: c = {
695
- left: !0,
696
- right: !0,
697
- top: !0,
698
- bottom: !0
699
- }
700
- } = o || {};
701
- return {
702
- [n]: Object.assign(Object.assign(Object.assign(Object.assign({
703
- // ============================ Basic ============================
704
- [`${n}-arrow`]: [Object.assign(Object.assign({
705
- position: "absolute",
706
- zIndex: 1,
707
- display: "block"
708
- }, pn(e, t, r)), {
709
- "&:before": {
710
- background: t
711
- }
712
- })]
713
- }, xe(!!c.top, {
714
- [[`&-placement-top > ${n}-arrow`, `&-placement-topLeft > ${n}-arrow`, `&-placement-topRight > ${n}-arrow`].join(",")]: {
715
- bottom: s,
716
- transform: "translateY(100%) rotate(180deg)"
717
- },
718
- [`&-placement-top > ${n}-arrow`]: {
719
- left: {
720
- _skip_check_: !0,
721
- value: "50%"
722
- },
723
- transform: "translateX(-50%) translateY(100%) rotate(180deg)"
724
- },
725
- "&-placement-topLeft": {
726
- "--arrow-offset-horizontal": i,
727
- [`> ${n}-arrow`]: {
728
- left: {
729
- _skip_check_: !0,
730
- value: i
731
- }
732
- }
733
- },
734
- "&-placement-topRight": {
735
- "--arrow-offset-horizontal": `calc(100% - ${I(i)})`,
736
- [`> ${n}-arrow`]: {
737
- right: {
738
- _skip_check_: !0,
739
- value: i
740
- }
741
- }
742
- }
743
- })), xe(!!c.bottom, {
744
- [[`&-placement-bottom > ${n}-arrow`, `&-placement-bottomLeft > ${n}-arrow`, `&-placement-bottomRight > ${n}-arrow`].join(",")]: {
745
- top: s,
746
- transform: "translateY(-100%)"
747
- },
748
- [`&-placement-bottom > ${n}-arrow`]: {
749
- left: {
750
- _skip_check_: !0,
751
- value: "50%"
752
- },
753
- transform: "translateX(-50%) translateY(-100%)"
754
- },
755
- "&-placement-bottomLeft": {
756
- "--arrow-offset-horizontal": i,
757
- [`> ${n}-arrow`]: {
758
- left: {
759
- _skip_check_: !0,
760
- value: i
761
- }
762
- }
763
- },
764
- "&-placement-bottomRight": {
765
- "--arrow-offset-horizontal": `calc(100% - ${I(i)})`,
766
- [`> ${n}-arrow`]: {
767
- right: {
768
- _skip_check_: !0,
769
- value: i
770
- }
771
- }
772
- }
773
- })), xe(!!c.left, {
774
- [[`&-placement-left > ${n}-arrow`, `&-placement-leftTop > ${n}-arrow`, `&-placement-leftBottom > ${n}-arrow`].join(",")]: {
775
- right: {
776
- _skip_check_: !0,
777
- value: s
778
- },
779
- transform: "translateX(100%) rotate(90deg)"
780
- },
781
- [`&-placement-left > ${n}-arrow`]: {
782
- top: {
783
- _skip_check_: !0,
784
- value: "50%"
785
- },
786
- transform: "translateY(-50%) translateX(100%) rotate(90deg)"
787
- },
788
- [`&-placement-leftTop > ${n}-arrow`]: {
789
- top: a
790
- },
791
- [`&-placement-leftBottom > ${n}-arrow`]: {
792
- bottom: a
793
- }
794
- })), xe(!!c.right, {
795
- [[`&-placement-right > ${n}-arrow`, `&-placement-rightTop > ${n}-arrow`, `&-placement-rightBottom > ${n}-arrow`].join(",")]: {
796
- left: {
797
- _skip_check_: !0,
798
- value: s
799
- },
800
- transform: "translateX(-100%) rotate(-90deg)"
801
- },
802
- [`&-placement-right > ${n}-arrow`]: {
803
- top: {
804
- _skip_check_: !0,
805
- value: "50%"
806
- },
807
- transform: "translateY(-50%) translateX(-100%) rotate(-90deg)"
808
- },
809
- [`&-placement-rightTop > ${n}-arrow`]: {
810
- top: a
811
- },
812
- [`&-placement-rightBottom > ${n}-arrow`]: {
813
- bottom: a
814
- }
815
- }))
816
- };
817
- }
818
- function gn(e, t, o, n) {
819
- if (n === !1)
820
- return {
821
- adjustX: !1,
822
- adjustY: !1
823
- };
824
- const r = n && typeof n == "object" ? n : {}, a = {};
825
- switch (e) {
826
- case "top":
827
- case "bottom":
828
- a.shiftX = t.arrowOffsetHorizontal * 2 + o, a.shiftY = !0, a.adjustY = !0;
829
- break;
830
- case "left":
831
- case "right":
832
- a.shiftY = t.arrowOffsetVertical * 2 + o, a.shiftX = !0, a.adjustX = !0;
833
- break;
834
- }
835
- const i = Object.assign(Object.assign({}, a), r);
836
- return i.shiftX || (i.adjustX = !0), i.shiftY || (i.adjustY = !0), i;
837
- }
838
- const ut = {
839
- left: {
840
- points: ["cr", "cl"]
841
- },
842
- right: {
843
- points: ["cl", "cr"]
844
- },
845
- top: {
846
- points: ["bc", "tc"]
847
- },
848
- bottom: {
849
- points: ["tc", "bc"]
850
- },
851
- topLeft: {
852
- points: ["bl", "tl"]
853
- },
854
- leftTop: {
855
- points: ["tr", "tl"]
856
- },
857
- topRight: {
858
- points: ["br", "tr"]
859
- },
860
- rightTop: {
861
- points: ["tl", "tr"]
862
- },
863
- bottomRight: {
864
- points: ["tr", "br"]
865
- },
866
- rightBottom: {
867
- points: ["bl", "br"]
868
- },
869
- bottomLeft: {
870
- points: ["tl", "bl"]
871
- },
872
- leftBottom: {
873
- points: ["br", "bl"]
874
- }
875
- }, fn = {
876
- topLeft: {
877
- points: ["bl", "tc"]
878
- },
879
- leftTop: {
880
- points: ["tr", "cl"]
881
- },
882
- topRight: {
883
- points: ["br", "tc"]
884
- },
885
- rightTop: {
886
- points: ["tl", "cr"]
887
- },
888
- bottomRight: {
889
- points: ["tr", "bc"]
890
- },
891
- rightBottom: {
892
- points: ["bl", "cr"]
893
- },
894
- bottomLeft: {
895
- points: ["tl", "bc"]
896
- },
897
- leftBottom: {
898
- points: ["br", "cl"]
899
- }
900
- }, vn = /* @__PURE__ */ new Set(["topLeft", "topRight", "bottomLeft", "bottomRight", "leftTop", "leftBottom", "rightTop", "rightBottom"]);
901
- function Tt(e) {
902
- const {
903
- arrowWidth: t,
904
- autoAdjustOverflow: o,
905
- arrowPointAtCenter: n,
906
- offset: r,
907
- borderRadius: a,
908
- visibleFirst: i
909
- } = e, s = t / 2, c = {};
910
- return Object.keys(ut).forEach((m) => {
911
- const d = n && fn[m] || ut[m], f = Object.assign(Object.assign({}, d), {
912
- offset: [0, 0],
913
- dynamicInset: !0
914
- });
915
- switch (c[m] = f, vn.has(m) && (f.autoArrow = !1), m) {
916
- case "top":
917
- case "topLeft":
918
- case "topRight":
919
- f.offset[1] = -s - r;
920
- break;
921
- case "bottom":
922
- case "bottomLeft":
923
- case "bottomRight":
924
- f.offset[1] = s + r;
925
- break;
926
- case "left":
927
- case "leftTop":
928
- case "leftBottom":
929
- f.offset[0] = -s - r;
930
- break;
931
- case "right":
932
- case "rightTop":
933
- case "rightBottom":
934
- f.offset[0] = s + r;
935
- break;
936
- }
937
- const p = Re({
938
- contentRadius: a,
939
- limitVerticalRadius: !0
940
- });
941
- if (n)
942
- switch (m) {
943
- case "topLeft":
944
- case "bottomLeft":
945
- f.offset[0] = -p.arrowOffsetHorizontal - s;
946
- break;
947
- case "topRight":
948
- case "bottomRight":
949
- f.offset[0] = p.arrowOffsetHorizontal + s;
950
- break;
951
- case "leftTop":
952
- case "rightTop":
953
- f.offset[1] = -p.arrowOffsetHorizontal * 2 + s;
954
- break;
955
- case "leftBottom":
956
- case "rightBottom":
957
- f.offset[1] = p.arrowOffsetHorizontal * 2 - s;
958
- break;
959
- }
960
- f.overflow = gn(m, p, t, o), i && (f.htmlRegion = "visibleFirst");
961
- }), c;
962
- }
963
- const bn = (e) => {
964
- const {
965
- calc: t,
966
- componentCls: o,
967
- // ant-tooltip
968
- tooltipMaxWidth: n,
969
- tooltipColor: r,
970
- tooltipBg: a,
971
- tooltipBorderRadius: i,
972
- zIndexPopup: s,
973
- controlHeight: c,
974
- boxShadowSecondary: m,
975
- paddingSM: d,
976
- paddingXS: f,
977
- arrowOffsetHorizontal: p,
978
- sizePopupArrow: v
979
- } = e, g = t(i).add(v).add(p).equal(), u = t(i).mul(2).add(v).equal();
980
- return [
981
- {
982
- [o]: Object.assign(Object.assign(Object.assign(Object.assign({}, be(e)), {
983
- position: "absolute",
984
- zIndex: s,
985
- display: "block",
986
- width: "max-content",
987
- maxWidth: n,
988
- visibility: "visible",
989
- // When use `autoArrow`, origin will follow the arrow position
990
- "--valid-offset-x": "var(--arrow-offset-horizontal, var(--arrow-x))",
991
- transformOrigin: ["var(--valid-offset-x, 50%)", "var(--arrow-y, 50%)"].join(" "),
992
- "&-hidden": {
993
- display: "none"
994
- },
995
- "--antd-arrow-background-color": a,
996
- // Wrapper for the tooltip content
997
- [`${o}-inner`]: {
998
- minWidth: u,
999
- minHeight: c,
1000
- padding: `${I(e.calc(d).div(2).equal())} ${I(f)}`,
1001
- color: r,
1002
- textAlign: "start",
1003
- textDecoration: "none",
1004
- wordWrap: "break-word",
1005
- backgroundColor: a,
1006
- borderRadius: i,
1007
- boxShadow: m,
1008
- boxSizing: "border-box"
1009
- },
1010
- // Align placement should have another min width
1011
- [["&-placement-topLeft", "&-placement-topRight", "&-placement-bottomLeft", "&-placement-bottomRight"].join(",")]: {
1012
- minWidth: g
1013
- },
1014
- // Limit left and right placement radius
1015
- [["&-placement-left", "&-placement-leftTop", "&-placement-leftBottom", "&-placement-right", "&-placement-rightTop", "&-placement-rightBottom"].join(",")]: {
1016
- [`${o}-inner`]: {
1017
- borderRadius: e.min(i, jt)
1018
- }
1019
- },
1020
- [`${o}-content`]: {
1021
- position: "relative"
1022
- }
1023
- }), Lo(e, (h, {
1024
- darkColor: $
1025
- }) => ({
1026
- [`&${o}-${h}`]: {
1027
- [`${o}-inner`]: {
1028
- backgroundColor: $
1029
- },
1030
- [`${o}-arrow`]: {
1031
- "--antd-arrow-background-color": $
1032
- }
1033
- }
1034
- }))), {
1035
- // RTL
1036
- "&-rtl": {
1037
- direction: "rtl"
1038
- }
1039
- })
1040
- },
1041
- // Arrow Style
1042
- Je(e, "var(--antd-arrow-background-color)"),
1043
- // Pure Render
1044
- {
1045
- [`${o}-pure`]: {
1046
- position: "relative",
1047
- maxWidth: "none",
1048
- margin: e.sizePopupArrow
1049
- }
1050
- }
1051
- ];
1052
- }, hn = (e) => Object.assign(Object.assign({
1053
- zIndexPopup: e.zIndexPopupBase + 70
1054
- }, Re({
1055
- contentRadius: e.borderRadius,
1056
- limitVerticalRadius: !0
1057
- })), Qe(ce(e, {
1058
- borderRadiusOuter: Math.min(e.borderRadiusOuter, 4)
1059
- }))), _t = (e, t = !0) => de("Tooltip", (n) => {
1060
- const {
1061
- borderRadius: r,
1062
- colorTextLightSolid: a,
1063
- colorBgSpotlight: i
1064
- } = n, s = ce(n, {
1065
- // default variables
1066
- tooltipMaxWidth: 250,
1067
- tooltipColor: a,
1068
- tooltipBorderRadius: r,
1069
- tooltipBg: i
1070
- });
1071
- return [bn(s), _e(n, "zoom-big-fast")];
1072
- }, hn, {
1073
- resetStyle: !1,
1074
- // Popover use Tooltip as internal component. We do not need to handle this.
1075
- injectStyle: t
1076
- })(e), $n = ve.map((e) => `${e}-inverse`);
1077
- function yn(e, t = !0) {
1078
- return t ? [].concat(it($n), it(ve)).includes(e) : ve.includes(e);
1079
- }
1080
- function Rt(e, t) {
1081
- const o = yn(t), n = _({
1082
- [`${e}-${t}`]: t && o
1083
- }), r = {}, a = {};
1084
- return t && !o && (r.background = t, a["--antd-arrow-background-color"] = t), {
1085
- className: n,
1086
- overlayStyle: r,
1087
- arrowStyle: a
1088
- };
1089
- }
1090
- const Cn = (e) => {
1091
- const {
1092
- prefixCls: t,
1093
- className: o,
1094
- placement: n = "top",
1095
- title: r,
1096
- color: a,
1097
- overlayInnerStyle: i
1098
- } = e, {
1099
- getPrefixCls: s
1100
- } = l.useContext(re), c = s("tooltip", t), [m, d, f] = _t(c), p = Rt(c, a), v = p.arrowStyle, g = Object.assign(Object.assign({}, i), p.overlayStyle), u = _(d, f, c, `${c}-pure`, `${c}-placement-${n}`, o, p.className);
1101
- return m(/* @__PURE__ */ l.createElement("div", {
1102
- className: u,
1103
- style: v
1104
- }, /* @__PURE__ */ l.createElement("div", {
1105
- className: `${c}-arrow`
1106
- }), /* @__PURE__ */ l.createElement(Ze, Object.assign({}, e, {
1107
- className: d,
1108
- prefixCls: c,
1109
- overlayInnerStyle: g
1110
- }), r)));
1111
- };
1112
- var wn = function(e, t) {
1113
- var o = {};
1114
- for (var n in e) Object.prototype.hasOwnProperty.call(e, n) && t.indexOf(n) < 0 && (o[n] = e[n]);
1115
- if (e != null && typeof Object.getOwnPropertySymbols == "function") for (var r = 0, n = Object.getOwnPropertySymbols(e); r < n.length; r++)
1116
- t.indexOf(n[r]) < 0 && Object.prototype.propertyIsEnumerable.call(e, n[r]) && (o[n[r]] = e[n[r]]);
1117
- return o;
1118
- };
1119
- const xn = /* @__PURE__ */ l.forwardRef((e, t) => {
1120
- var o, n;
1121
- const {
1122
- prefixCls: r,
1123
- openClassName: a,
1124
- getTooltipContainer: i,
1125
- color: s,
1126
- overlayInnerStyle: c,
1127
- children: m,
1128
- afterOpenChange: d,
1129
- afterVisibleChange: f,
1130
- destroyTooltipOnHide: p,
1131
- destroyOnHidden: v,
1132
- arrow: g = !0,
1133
- title: u,
1134
- overlay: h,
1135
- builtinPlacements: $,
1136
- arrowPointAtCenter: b = !1,
1137
- autoAdjustOverflow: S = !0,
1138
- motion: N,
1139
- getPopupContainer: y,
1140
- placement: M = "top",
1141
- mouseEnterDelay: j = 0.1,
1142
- mouseLeaveDelay: T = 0.1,
1143
- overlayStyle: O,
1144
- rootClassName: E,
1145
- overlayClassName: H,
1146
- styles: x,
1147
- classNames: C
1148
- } = e, w = wn(e, ["prefixCls", "openClassName", "getTooltipContainer", "color", "overlayInnerStyle", "children", "afterOpenChange", "afterVisibleChange", "destroyTooltipOnHide", "destroyOnHidden", "arrow", "title", "overlay", "builtinPlacements", "arrowPointAtCenter", "autoAdjustOverflow", "motion", "getPopupContainer", "placement", "mouseEnterDelay", "mouseLeaveDelay", "overlayStyle", "rootClassName", "overlayClassName", "styles", "classNames"]), B = !!g, [, P] = Fe(), {
1149
- getPopupContainer: L,
1150
- getPrefixCls: z,
1151
- direction: F,
1152
- className: D,
1153
- style: A,
1154
- classNames: k,
1155
- styles: R
1156
- } = Ge("tooltip"), W = he("Tooltip"), G = l.useRef(null), q = () => {
1157
- var K;
1158
- (K = G.current) === null || K === void 0 || K.forceAlign();
1159
- };
1160
- l.useImperativeHandle(t, () => {
1161
- var K, ee;
1162
- return {
1163
- forceAlign: q,
1164
- forcePopupAlign: () => {
1165
- W.deprecated(!1, "forcePopupAlign", "forceAlign"), q();
1166
- },
1167
- nativeElement: (K = G.current) === null || K === void 0 ? void 0 : K.nativeElement,
1168
- popupElement: (ee = G.current) === null || ee === void 0 ? void 0 : ee.popupElement
1169
- };
1170
- }), process.env.NODE_ENV !== "production" && ([["visible", "open"], ["defaultVisible", "defaultOpen"], ["onVisibleChange", "onOpenChange"], ["afterVisibleChange", "afterOpenChange"], ["destroyTooltipOnHide", "destroyOnHidden"], ["arrowPointAtCenter", "arrow={{ pointAtCenter: true }}"], ["overlayStyle", "styles={{ root: {} }}"], ["overlayInnerStyle", "styles={{ body: {} }}"], ["overlayClassName", 'classNames={{ root: "" }}']].forEach(([K, ee]) => {
1171
- W.deprecated(!(K in e), K, ee);
1172
- }), process.env.NODE_ENV !== "production" && W(!p || typeof p == "boolean", "usage", "`destroyTooltipOnHide` no need config `keepParent` anymore. Please use `boolean` value directly."), process.env.NODE_ENV !== "production" && W(!g || typeof g == "boolean" || !("arrowPointAtCenter" in g), "deprecated", "`arrowPointAtCenter` in `arrow` is deprecated. Please use `pointAtCenter` instead."));
1173
- const [Q, X] = Ye(!1, {
1174
- value: (o = e.open) !== null && o !== void 0 ? o : e.visible,
1175
- defaultValue: (n = e.defaultOpen) !== null && n !== void 0 ? n : e.defaultVisible
1176
- }), Z = !u && !h && u !== 0, J = (K) => {
1177
- var ee, me;
1178
- X(Z ? !1 : K), Z || ((ee = e.onOpenChange) === null || ee === void 0 || ee.call(e, K), (me = e.onVisibleChange) === null || me === void 0 || me.call(e, K));
1179
- }, V = l.useMemo(() => {
1180
- var K, ee;
1181
- let me = b;
1182
- return typeof g == "object" && (me = (ee = (K = g.pointAtCenter) !== null && K !== void 0 ? K : g.arrowPointAtCenter) !== null && ee !== void 0 ? ee : b), $ || Tt({
1183
- arrowPointAtCenter: me,
1184
- autoAdjustOverflow: S,
1185
- arrowWidth: B ? P.sizePopupArrow : 0,
1186
- borderRadius: P.borderRadius,
1187
- offset: P.marginXXS,
1188
- visibleFirst: !0
1189
- });
1190
- }, [b, g, $, P]), Y = l.useMemo(() => u === 0 ? u : h || u || "", [h, u]), ne = /* @__PURE__ */ l.createElement(It, {
1191
- space: !0
1192
- }, typeof Y == "function" ? Y() : Y), ie = z("tooltip", r), Ce = z(), He = e["data-popover-inject"];
1193
- let le = Q;
1194
- !("open" in e) && !("visible" in e) && Z && (le = !1);
1195
- const U = /* @__PURE__ */ l.isValidElement(m) && !Ro(m) ? m : /* @__PURE__ */ l.createElement("span", null, m), oe = U.props, De = !oe.className || typeof oe.className == "string" ? _(oe.className, a || `${ie}-open`) : oe.className, [Ut, qt, Kt] = _t(ie, !He), Ae = Rt(ie, s), Zt = Ae.arrowStyle, Qt = _(H, {
1196
- [`${ie}-rtl`]: F === "rtl"
1197
- }, Ae.className, E, qt, Kt, D, k.root, C == null ? void 0 : C.root), Jt = _(k.body, C == null ? void 0 : C.body), [eo, to] = qe("Tooltip", w.zIndex), oo = /* @__PURE__ */ l.createElement(mn, Object.assign({}, w, {
1198
- zIndex: eo,
1199
- showArrow: B,
1200
- placement: M,
1201
- mouseEnterDelay: j,
1202
- mouseLeaveDelay: T,
1203
- prefixCls: ie,
1204
- classNames: {
1205
- root: Qt,
1206
- body: Jt
1207
- },
1208
- styles: {
1209
- root: Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({}, Zt), R.root), A), O), x == null ? void 0 : x.root),
1210
- body: Object.assign(Object.assign(Object.assign(Object.assign({}, R.body), c), x == null ? void 0 : x.body), Ae.overlayStyle)
1211
- },
1212
- getTooltipContainer: y || i || L,
1213
- ref: G,
1214
- builtinPlacements: V,
1215
- overlay: ne,
1216
- visible: le,
1217
- onVisibleChange: J,
1218
- afterVisibleChange: d ?? f,
1219
- arrowContent: /* @__PURE__ */ l.createElement("span", {
1220
- className: `${ie}-arrow-content`
1221
- }),
1222
- motion: {
1223
- motionName: xt(Ce, "zoom-big-fast", e.transitionName),
1224
- motionDeadline: 1e3
1225
- },
1226
- // TODO: In the future, destroyTooltipOnHide in rc-tooltip needs to be upgrade to destroyOnHidden
1227
- destroyTooltipOnHide: v ?? !!p
1228
- }), le ? ue(U, {
1229
- className: De
1230
- }) : U);
1231
- return Ut(/* @__PURE__ */ l.createElement(Pt.Provider, {
1232
- value: to
1233
- }, oo));
1234
- }), Me = xn;
1235
- process.env.NODE_ENV !== "production" && (Me.displayName = "Tooltip");
1236
- Me._InternalPanelDoNotUseOrYouWillBeFired = Cn;
1237
- const Sn = (e) => {
1238
- const {
1239
- componentCls: t,
1240
- popoverColor: o,
1241
- titleMinWidth: n,
1242
- fontWeightStrong: r,
1243
- innerPadding: a,
1244
- boxShadowSecondary: i,
1245
- colorTextHeading: s,
1246
- borderRadiusLG: c,
1247
- zIndexPopup: m,
1248
- titleMarginBottom: d,
1249
- colorBgElevated: f,
1250
- popoverBg: p,
1251
- titleBorderBottom: v,
1252
- innerContentPadding: g,
1253
- titlePadding: u
1254
- } = e;
1255
- return [
1256
- {
1257
- [t]: Object.assign(Object.assign({}, be(e)), {
1258
- position: "absolute",
1259
- top: 0,
1260
- // use `left` to fix https://github.com/ant-design/ant-design/issues/39195
1261
- left: {
1262
- _skip_check_: !0,
1263
- value: 0
1264
- },
1265
- zIndex: m,
1266
- fontWeight: "normal",
1267
- whiteSpace: "normal",
1268
- textAlign: "start",
1269
- cursor: "auto",
1270
- userSelect: "text",
1271
- // When use `autoArrow`, origin will follow the arrow position
1272
- "--valid-offset-x": "var(--arrow-offset-horizontal, var(--arrow-x))",
1273
- transformOrigin: ["var(--valid-offset-x, 50%)", "var(--arrow-y, 50%)"].join(" "),
1274
- "--antd-arrow-background-color": f,
1275
- width: "max-content",
1276
- maxWidth: "100vw",
1277
- "&-rtl": {
1278
- direction: "rtl"
1279
- },
1280
- "&-hidden": {
1281
- display: "none"
1282
- },
1283
- [`${t}-content`]: {
1284
- position: "relative"
1285
- },
1286
- [`${t}-inner`]: {
1287
- backgroundColor: p,
1288
- backgroundClip: "padding-box",
1289
- borderRadius: c,
1290
- boxShadow: i,
1291
- padding: a
1292
- },
1293
- [`${t}-title`]: {
1294
- minWidth: n,
1295
- marginBottom: d,
1296
- color: s,
1297
- fontWeight: r,
1298
- borderBottom: v,
1299
- padding: u
1300
- },
1301
- [`${t}-inner-content`]: {
1302
- color: o,
1303
- padding: g
1304
- }
1305
- })
1306
- },
1307
- // Arrow Style
1308
- Je(e, "var(--antd-arrow-background-color)"),
1309
- // Pure Render
1310
- {
1311
- [`${t}-pure`]: {
1312
- position: "relative",
1313
- maxWidth: "none",
1314
- margin: e.sizePopupArrow,
1315
- display: "inline-block",
1316
- [`${t}-content`]: {
1317
- display: "inline-block"
1318
- }
1319
- }
1320
- }
1321
- ];
1322
- }, On = (e) => {
1323
- const {
1324
- componentCls: t
1325
- } = e;
1326
- return {
1327
- [t]: ve.map((o) => {
1328
- const n = e[`${o}6`];
1329
- return {
1330
- [`&${t}-${o}`]: {
1331
- "--antd-arrow-background-color": n,
1332
- [`${t}-inner`]: {
1333
- backgroundColor: n
1334
- },
1335
- [`${t}-arrow`]: {
1336
- background: "transparent"
1337
- }
1338
- }
1339
- };
1340
- })
1341
- };
1342
- }, In = (e) => {
1343
- const {
1344
- lineWidth: t,
1345
- controlHeight: o,
1346
- fontHeight: n,
1347
- padding: r,
1348
- wireframe: a,
1349
- zIndexPopupBase: i,
1350
- borderRadiusLG: s,
1351
- marginXS: c,
1352
- lineType: m,
1353
- colorSplit: d,
1354
- paddingSM: f
1355
- } = e, p = o - n, v = p / 2, g = p / 2 - t, u = r;
1356
- return Object.assign(Object.assign(Object.assign({
1357
- titleMinWidth: 177,
1358
- zIndexPopup: i + 30
1359
- }, Qe(e)), Re({
1360
- contentRadius: s,
1361
- limitVerticalRadius: !0
1362
- })), {
1363
- // internal
1364
- innerPadding: a ? 0 : 12,
1365
- titleMarginBottom: a ? 0 : c,
1366
- titlePadding: a ? `${v}px ${u}px ${g}px` : 0,
1367
- titleBorderBottom: a ? `${t}px ${m} ${d}` : "none",
1368
- innerContentPadding: a ? `${f}px ${u}px` : 0
1369
- });
1370
- }, Mt = de("Popover", (e) => {
1371
- const {
1372
- colorBgElevated: t,
1373
- colorText: o
1374
- } = e, n = ce(e, {
1375
- popoverBg: t,
1376
- popoverColor: o
1377
- });
1378
- return [Sn(n), On(n), _e(n, "zoom-big")];
1379
- }, In, {
1380
- resetStyle: !1,
1381
- deprecatedTokens: [["width", "titleMinWidth"], ["minWidth", "titleMinWidth"]]
1382
- });
1383
- var Pn = function(e, t) {
1384
- var o = {};
1385
- for (var n in e) Object.prototype.hasOwnProperty.call(e, n) && t.indexOf(n) < 0 && (o[n] = e[n]);
1386
- if (e != null && typeof Object.getOwnPropertySymbols == "function") for (var r = 0, n = Object.getOwnPropertySymbols(e); r < n.length; r++)
1387
- t.indexOf(n[r]) < 0 && Object.prototype.propertyIsEnumerable.call(e, n[r]) && (o[n[r]] = e[n[r]]);
1388
- return o;
1389
- };
1390
- const Ht = ({
1391
- title: e,
1392
- content: t,
1393
- prefixCls: o
1394
- }) => !e && !t ? null : /* @__PURE__ */ l.createElement(l.Fragment, null, e && /* @__PURE__ */ l.createElement("div", {
1395
- className: `${o}-title`
1396
- }, e), t && /* @__PURE__ */ l.createElement("div", {
1397
- className: `${o}-inner-content`
1398
- }, t)), En = (e) => {
1399
- const {
1400
- hashId: t,
1401
- prefixCls: o,
1402
- className: n,
1403
- style: r,
1404
- placement: a = "top",
1405
- title: i,
1406
- content: s,
1407
- children: c
1408
- } = e, m = Pe(i), d = Pe(s), f = _(t, o, `${o}-pure`, `${o}-placement-${a}`, n);
1409
- return /* @__PURE__ */ l.createElement("div", {
1410
- className: f,
1411
- style: r
1412
- }, /* @__PURE__ */ l.createElement("div", {
1413
- className: `${o}-arrow`
1414
- }), /* @__PURE__ */ l.createElement(Ze, Object.assign({}, e, {
1415
- className: t,
1416
- prefixCls: o
1417
- }), c || /* @__PURE__ */ l.createElement(Ht, {
1418
- prefixCls: o,
1419
- title: m,
1420
- content: d
1421
- })));
1422
- }, Nn = (e) => {
1423
- const {
1424
- prefixCls: t,
1425
- className: o
1426
- } = e, n = Pn(e, ["prefixCls", "className"]), {
1427
- getPrefixCls: r
1428
- } = l.useContext(re), a = r("popover", t), [i, s, c] = Mt(a);
1429
- return i(/* @__PURE__ */ l.createElement(En, Object.assign({}, n, {
1430
- prefixCls: a,
1431
- hashId: s,
1432
- className: _(o, c)
1433
- })));
1434
- };
1435
- var Bn = function(e, t) {
1436
- var o = {};
1437
- for (var n in e) Object.prototype.hasOwnProperty.call(e, n) && t.indexOf(n) < 0 && (o[n] = e[n]);
1438
- if (e != null && typeof Object.getOwnPropertySymbols == "function") for (var r = 0, n = Object.getOwnPropertySymbols(e); r < n.length; r++)
1439
- t.indexOf(n[r]) < 0 && Object.prototype.propertyIsEnumerable.call(e, n[r]) && (o[n[r]] = e[n[r]]);
1440
- return o;
1441
- };
1442
- const zn = /* @__PURE__ */ l.forwardRef((e, t) => {
1443
- var o, n;
1444
- const {
1445
- prefixCls: r,
1446
- title: a,
1447
- content: i,
1448
- overlayClassName: s,
1449
- placement: c = "top",
1450
- trigger: m = "hover",
1451
- children: d,
1452
- mouseEnterDelay: f = 0.1,
1453
- mouseLeaveDelay: p = 0.1,
1454
- onOpenChange: v,
1455
- overlayStyle: g = {},
1456
- styles: u,
1457
- classNames: h
1458
- } = e, $ = Bn(e, ["prefixCls", "title", "content", "overlayClassName", "placement", "trigger", "children", "mouseEnterDelay", "mouseLeaveDelay", "onOpenChange", "overlayStyle", "styles", "classNames"]), {
1459
- getPrefixCls: b,
1460
- className: S,
1461
- style: N,
1462
- classNames: y,
1463
- styles: M
1464
- } = Ge("popover"), j = b("popover", r), [T, O, E] = Mt(j), H = b(), x = _(s, O, E, S, y.root, h == null ? void 0 : h.root), C = _(y.body, h == null ? void 0 : h.body), [w, B] = Ye(!1, {
1465
- value: (o = e.open) !== null && o !== void 0 ? o : e.visible,
1466
- defaultValue: (n = e.defaultOpen) !== null && n !== void 0 ? n : e.defaultVisible
1467
- }), P = (A, k) => {
1468
- B(A, !0), v == null || v(A, k);
1469
- }, L = (A) => {
1470
- A.keyCode === go.ESC && P(!1, A);
1471
- }, z = (A) => {
1472
- P(A);
1473
- }, F = Pe(a), D = Pe(i);
1474
- return T(/* @__PURE__ */ l.createElement(Me, Object.assign({
1475
- placement: c,
1476
- trigger: m,
1477
- mouseEnterDelay: f,
1478
- mouseLeaveDelay: p
1479
- }, $, {
1480
- prefixCls: j,
1481
- classNames: {
1482
- root: x,
1483
- body: C
1484
- },
1485
- styles: {
1486
- root: Object.assign(Object.assign(Object.assign(Object.assign({}, M.root), N), g), u == null ? void 0 : u.root),
1487
- body: Object.assign(Object.assign({}, M.body), u == null ? void 0 : u.body)
1488
- },
1489
- ref: t,
1490
- open: w,
1491
- onOpenChange: z,
1492
- overlay: F || D ? /* @__PURE__ */ l.createElement(Ht, {
1493
- prefixCls: j,
1494
- title: F,
1495
- content: D
1496
- }) : null,
1497
- transitionName: xt(H, "zoom-big", $.transitionName),
1498
- "data-popover-inject": !0
1499
- }), ue(d, {
1500
- onKeyDown: (A) => {
1501
- var k, R;
1502
- /* @__PURE__ */ ro(d) && ((R = d == null ? void 0 : (k = d.props).onKeyDown) === null || R === void 0 || R.call(k, A)), L(A);
1503
- }
1504
- })));
1505
- }), et = zn;
1506
- et._InternalPanelDoNotUseOrYouWillBeFired = Nn;
1507
- process.env.NODE_ENV !== "production" && (et.displayName = "Popover");
1508
- const mt = (e) => {
1509
- const {
1510
- size: t,
1511
- shape: o
1512
- } = l.useContext(Ve), n = l.useMemo(() => ({
1513
- size: e.size || t,
1514
- shape: e.shape || o
1515
- }), [e.size, e.shape, t, o]);
1516
- return /* @__PURE__ */ l.createElement(Ve.Provider, {
1517
- value: n
1518
- }, e.children);
1519
- }, jn = (e) => {
1520
- var t, o, n, r;
1521
- const {
1522
- getPrefixCls: a,
1523
- direction: i
1524
- } = l.useContext(re), {
1525
- prefixCls: s,
1526
- className: c,
1527
- rootClassName: m,
1528
- style: d,
1529
- maxCount: f,
1530
- maxStyle: p,
1531
- size: v,
1532
- shape: g,
1533
- maxPopoverPlacement: u,
1534
- maxPopoverTrigger: h,
1535
- children: $,
1536
- max: b
1537
- } = e;
1538
- if (process.env.NODE_ENV !== "production") {
1539
- const C = he("Avatar.Group");
1540
- [["maxCount", "max={{ count: number }}"], ["maxStyle", "max={{ style: CSSProperties }}"], ["maxPopoverPlacement", "max={{ popover: PopoverProps }}"], ["maxPopoverTrigger", "max={{ popover: PopoverProps }}"]].forEach(([w, B]) => {
1541
- C.deprecated(!(w in e), w, B);
1542
- });
1543
- }
1544
- const S = a("avatar", s), N = `${S}-group`, y = Te(S), [M, j, T] = zt(S, y), O = _(N, {
1545
- [`${N}-rtl`]: i === "rtl"
1546
- }, T, y, c, m, j), E = Ue($).map((C, w) => ue(C, {
1547
- // eslint-disable-next-line react/no-array-index-key
1548
- key: `avatar-key-${w}`
1549
- })), H = (b == null ? void 0 : b.count) || f, x = E.length;
1550
- if (H && H < x) {
1551
- const C = E.slice(0, H), w = E.slice(H, x), B = (b == null ? void 0 : b.style) || p, P = ((t = b == null ? void 0 : b.popover) === null || t === void 0 ? void 0 : t.trigger) || h || "hover", L = ((o = b == null ? void 0 : b.popover) === null || o === void 0 ? void 0 : o.placement) || u || "top", z = Object.assign(Object.assign({
1552
- content: w
1553
- }, b == null ? void 0 : b.popover), {
1554
- classNames: {
1555
- root: _(`${N}-popover`, (r = (n = b == null ? void 0 : b.popover) === null || n === void 0 ? void 0 : n.classNames) === null || r === void 0 ? void 0 : r.root)
1556
- },
1557
- placement: L,
1558
- trigger: P
1559
- });
1560
- return C.push(/* @__PURE__ */ l.createElement(et, Object.assign({
1561
- key: "avatar-popover-key",
1562
- destroyOnHidden: !0
1563
- }, z), /* @__PURE__ */ l.createElement(Ke, {
1564
- style: B
1565
- }, `+${x - H}`))), M(/* @__PURE__ */ l.createElement(mt, {
1566
- shape: g,
1567
- size: v
1568
- }, /* @__PURE__ */ l.createElement("div", {
1569
- className: O,
1570
- style: d
1571
- }, C)));
1572
- }
1573
- return M(/* @__PURE__ */ l.createElement(mt, {
1574
- shape: g,
1575
- size: v
1576
- }, /* @__PURE__ */ l.createElement("div", {
1577
- className: O,
1578
- style: d
1579
- }, E)));
1580
- }, Dt = Ke;
1581
- Dt.Group = jn;
1582
- var Tn = { icon: { tag: "svg", attrs: { viewBox: "64 64 896 896", focusable: "false" }, children: [{ tag: "path", attrs: { d: "M724 218.3V141c0-6.7-7.7-10.4-12.9-6.3L260.3 486.8a31.86 31.86 0 000 50.3l450.8 352.1c5.3 4.1 12.9.4 12.9-6.3v-77.3c0-4.9-2.3-9.6-6.1-12.6l-360-281 360-281.1c3.8-3 6.1-7.7 6.1-12.6z" } }] }, name: "left", theme: "outlined" }, _n = function(t, o) {
1583
- return /* @__PURE__ */ l.createElement(Xe, je({}, t, {
1584
- ref: o,
1585
- icon: Tn
1586
- }));
1587
- }, Ee = /* @__PURE__ */ l.forwardRef(_n);
1588
- process.env.NODE_ENV !== "production" && (Ee.displayName = "LeftOutlined");
1589
- const Rn = (e) => typeof e != "object" && typeof e != "function" || e === null;
1590
- var Mn = { icon: { tag: "svg", attrs: { viewBox: "0 0 1024 1024", focusable: "false" }, children: [{ tag: "path", attrs: { d: "M912 192H328c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h584c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm0 284H328c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h584c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm0 284H328c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h584c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zM104 228a56 56 0 10112 0 56 56 0 10-112 0zm0 284a56 56 0 10112 0 56 56 0 10-112 0zm0 284a56 56 0 10112 0 56 56 0 10-112 0z" } }] }, name: "bars", theme: "outlined" }, Hn = function(t, o) {
1591
- return /* @__PURE__ */ l.createElement(Xe, je({}, t, {
1592
- ref: o,
1593
- icon: Mn
1594
- }));
1595
- }, At = /* @__PURE__ */ l.forwardRef(Hn);
1596
- process.env.NODE_ENV !== "production" && (At.displayName = "BarsOutlined");
1597
- const Dn = /* @__PURE__ */ l.createContext({
1598
- siderHook: {
1599
- addSider: () => null,
1600
- removeSider: () => null
1601
- }
1602
- }), An = (e) => {
1603
- const {
1604
- antCls: t,
1605
- // .ant
1606
- componentCls: o,
1607
- // .ant-layout
1608
- colorText: n,
1609
- footerBg: r,
1610
- headerHeight: a,
1611
- headerPadding: i,
1612
- headerColor: s,
1613
- footerPadding: c,
1614
- fontSize: m,
1615
- bodyBg: d,
1616
- headerBg: f
1617
- } = e;
1618
- return {
1619
- [o]: {
1620
- display: "flex",
1621
- flex: "auto",
1622
- flexDirection: "column",
1623
- /* fix firefox can't set height smaller than content on flex item */
1624
- minHeight: 0,
1625
- background: d,
1626
- "&, *": {
1627
- boxSizing: "border-box"
1628
- },
1629
- [`&${o}-has-sider`]: {
1630
- flexDirection: "row",
1631
- [`> ${o}, > ${o}-content`]: {
1632
- // https://segmentfault.com/a/1190000019498300
1633
- width: 0
1634
- }
1635
- },
1636
- [`${o}-header, &${o}-footer`]: {
1637
- flex: "0 0 auto"
1638
- },
1639
- // RTL
1640
- "&-rtl": {
1641
- direction: "rtl"
1642
- }
1643
- },
1644
- // ==================== Header ====================
1645
- [`${o}-header`]: {
1646
- height: a,
1647
- padding: i,
1648
- color: s,
1649
- lineHeight: I(a),
1650
- background: f,
1651
- // Other components/menu/style/index.less line:686
1652
- // Integration with header element so menu items have the same height
1653
- [`${t}-menu`]: {
1654
- lineHeight: "inherit"
1655
- }
1656
- },
1657
- // ==================== Footer ====================
1658
- [`${o}-footer`]: {
1659
- padding: c,
1660
- color: n,
1661
- fontSize: m,
1662
- background: r
1663
- },
1664
- // =================== Content ====================
1665
- [`${o}-content`]: {
1666
- flex: "auto",
1667
- color: n,
1668
- // fix firefox can't set height smaller than content on flex item
1669
- minHeight: 0
1670
- }
1671
- };
1672
- }, Lt = (e) => {
1673
- const {
1674
- colorBgLayout: t,
1675
- controlHeight: o,
1676
- controlHeightLG: n,
1677
- colorText: r,
1678
- controlHeightSM: a,
1679
- marginXXS: i,
1680
- colorTextLightSolid: s,
1681
- colorBgContainer: c
1682
- } = e, m = n * 1.25;
1683
- return {
1684
- // Deprecated
1685
- colorBgHeader: "#001529",
1686
- colorBgBody: t,
1687
- colorBgTrigger: "#002140",
1688
- bodyBg: t,
1689
- headerBg: "#001529",
1690
- headerHeight: o * 2,
1691
- headerPadding: `0 ${m}px`,
1692
- headerColor: r,
1693
- footerPadding: `${a}px ${m}px`,
1694
- footerBg: t,
1695
- siderBg: "#001529",
1696
- triggerHeight: n + i * 2,
1697
- triggerBg: "#002140",
1698
- triggerColor: s,
1699
- zeroTriggerWidth: n,
1700
- zeroTriggerHeight: n,
1701
- lightSiderBg: c,
1702
- lightTriggerBg: c,
1703
- lightTriggerColor: r
1704
- };
1705
- }, kt = [["colorBgBody", "bodyBg"], ["colorBgHeader", "headerBg"], ["colorBgTrigger", "triggerBg"]];
1706
- de("Layout", (e) => [An(e)], Lt, {
1707
- deprecatedTokens: kt
1708
- });
1709
- const Ln = (e) => {
1710
- const {
1711
- componentCls: t,
1712
- siderBg: o,
1713
- motionDurationMid: n,
1714
- motionDurationSlow: r,
1715
- antCls: a,
1716
- triggerHeight: i,
1717
- triggerColor: s,
1718
- triggerBg: c,
1719
- headerHeight: m,
1720
- zeroTriggerWidth: d,
1721
- zeroTriggerHeight: f,
1722
- borderRadiusLG: p,
1723
- lightSiderBg: v,
1724
- lightTriggerColor: g,
1725
- lightTriggerBg: u,
1726
- bodyBg: h
1727
- } = e;
1728
- return {
1729
- [t]: {
1730
- position: "relative",
1731
- // fix firefox can't set width smaller than content on flex item
1732
- minWidth: 0,
1733
- background: o,
1734
- transition: `all ${n}, background 0s`,
1735
- "&-has-trigger": {
1736
- paddingBottom: i
1737
- },
1738
- "&-right": {
1739
- order: 1
1740
- },
1741
- [`${t}-children`]: {
1742
- height: "100%",
1743
- // Hack for fixing margin collapse bug
1744
- // https://github.com/ant-design/ant-design/issues/7967
1745
- // solution from https://stackoverflow.com/a/33132624/3040605
1746
- marginTop: -0.1,
1747
- paddingTop: 0.1,
1748
- [`${a}-menu${a}-menu-inline-collapsed`]: {
1749
- width: "auto"
1750
- }
1751
- },
1752
- [`&-zero-width ${t}-children`]: {
1753
- overflow: "hidden"
1754
- },
1755
- [`${t}-trigger`]: {
1756
- position: "fixed",
1757
- bottom: 0,
1758
- zIndex: 1,
1759
- height: i,
1760
- color: s,
1761
- lineHeight: I(i),
1762
- textAlign: "center",
1763
- background: c,
1764
- cursor: "pointer",
1765
- transition: `all ${n}`
1766
- },
1767
- [`${t}-zero-width-trigger`]: {
1768
- position: "absolute",
1769
- top: m,
1770
- insetInlineEnd: e.calc(d).mul(-1).equal(),
1771
- zIndex: 1,
1772
- width: d,
1773
- height: f,
1774
- color: s,
1775
- fontSize: e.fontSizeXL,
1776
- display: "flex",
1777
- alignItems: "center",
1778
- justifyContent: "center",
1779
- background: o,
1780
- borderRadius: `0 ${I(p)} ${I(p)} 0`,
1781
- cursor: "pointer",
1782
- transition: `background ${r} ease`,
1783
- "&::after": {
1784
- position: "absolute",
1785
- inset: 0,
1786
- background: "transparent",
1787
- transition: `all ${r}`,
1788
- content: '""'
1789
- },
1790
- "&:hover::after": {
1791
- background: "rgba(255, 255, 255, 0.2)"
1792
- },
1793
- "&-right": {
1794
- insetInlineStart: e.calc(d).mul(-1).equal(),
1795
- borderRadius: `${I(p)} 0 0 ${I(p)}`
1796
- }
1797
- },
1798
- // Light
1799
- "&-light": {
1800
- background: v,
1801
- [`${t}-trigger`]: {
1802
- color: g,
1803
- background: u
1804
- },
1805
- [`${t}-zero-width-trigger`]: {
1806
- color: g,
1807
- background: u,
1808
- border: `1px solid ${h}`,
1809
- // Safe to modify to any other color
1810
- borderInlineStart: 0
1811
- }
1812
- }
1813
- }
1814
- };
1815
- }, kn = de(["Layout", "Sider"], (e) => [Ln(e)], Lt, {
1816
- deprecatedTokens: kt
1817
- });
1818
- var Vn = function(e, t) {
1819
- var o = {};
1820
- for (var n in e) Object.prototype.hasOwnProperty.call(e, n) && t.indexOf(n) < 0 && (o[n] = e[n]);
1821
- if (e != null && typeof Object.getOwnPropertySymbols == "function") for (var r = 0, n = Object.getOwnPropertySymbols(e); r < n.length; r++)
1822
- t.indexOf(n[r]) < 0 && Object.prototype.propertyIsEnumerable.call(e, n[r]) && (o[n[r]] = e[n[r]]);
1823
- return o;
1824
- };
1825
- const pt = {
1826
- xs: "479.98px",
1827
- sm: "575.98px",
1828
- md: "767.98px",
1829
- lg: "991.98px",
1830
- xl: "1199.98px",
1831
- xxl: "1599.98px"
1832
- }, Wn = (e) => !Number.isNaN(Number.parseFloat(e)) && isFinite(e), tt = /* @__PURE__ */ l.createContext({}), Xn = /* @__PURE__ */ (() => {
1833
- let e = 0;
1834
- return (t = "") => (e += 1, `${t}${e}`);
1835
- })(), Fn = /* @__PURE__ */ l.forwardRef((e, t) => {
1836
- const {
1837
- prefixCls: o,
1838
- className: n,
1839
- trigger: r,
1840
- children: a,
1841
- defaultCollapsed: i = !1,
1842
- theme: s = "dark",
1843
- style: c = {},
1844
- collapsible: m = !1,
1845
- reverseArrow: d = !1,
1846
- width: f = 200,
1847
- collapsedWidth: p = 80,
1848
- zeroWidthTriggerStyle: v,
1849
- breakpoint: g,
1850
- onCollapse: u,
1851
- onBreakpoint: h
1852
- } = e, $ = Vn(e, ["prefixCls", "className", "trigger", "children", "defaultCollapsed", "theme", "style", "collapsible", "reverseArrow", "width", "collapsedWidth", "zeroWidthTriggerStyle", "breakpoint", "onCollapse", "onBreakpoint"]), {
1853
- siderHook: b
1854
- } = nt(Dn), [S, N] = rt("collapsed" in e ? e.collapsed : i), [y, M] = rt(!1);
1855
- Le(() => {
1856
- "collapsed" in e && N(e.collapsed);
1857
- }, [e.collapsed]);
1858
- const j = (X, Z) => {
1859
- "collapsed" in e || N(X), u == null || u(X, Z);
1860
- }, {
1861
- getPrefixCls: T,
1862
- direction: O
1863
- } = nt(re), E = T("layout-sider", o), [H, x, C] = kn(E), w = ze(null);
1864
- w.current = (X) => {
1865
- M(X.matches), h == null || h(X.matches), S !== X.matches && j(X.matches, "responsive");
1866
- }, Le(() => {
1867
- function X(J) {
1868
- var V;
1869
- return (V = w.current) === null || V === void 0 ? void 0 : V.call(w, J);
1870
- }
1871
- let Z;
1872
- return typeof (window == null ? void 0 : window.matchMedia) < "u" && g && g in pt && (Z = window.matchMedia(`screen and (max-width: ${pt[g]})`), Et(Z, X), X(Z)), () => {
1873
- Nt(Z, X);
1874
- };
1875
- }, [g]), Le(() => {
1876
- const X = Xn("ant-sider-");
1877
- return b.addSider(X), () => b.removeSider(X);
1878
- }, []);
1879
- const B = () => {
1880
- j(!S, "clickTrigger");
1881
- }, P = $e($, ["collapsed"]), L = S ? p : f, z = Wn(L) ? `${L}px` : String(L), F = parseFloat(String(p || 0)) === 0 ? /* @__PURE__ */ l.createElement("span", {
1882
- onClick: B,
1883
- className: _(`${E}-zero-width-trigger`, `${E}-zero-width-trigger-${d ? "right" : "left"}`),
1884
- style: v
1885
- }, r || /* @__PURE__ */ l.createElement(At, null)) : null, D = O === "rtl" == !d, R = {
1886
- expanded: D ? /* @__PURE__ */ l.createElement(Ie, null) : /* @__PURE__ */ l.createElement(Ee, null),
1887
- collapsed: D ? /* @__PURE__ */ l.createElement(Ee, null) : /* @__PURE__ */ l.createElement(Ie, null)
1888
- }[S ? "collapsed" : "expanded"], W = r !== null ? F || /* @__PURE__ */ l.createElement("div", {
1889
- className: `${E}-trigger`,
1890
- onClick: B,
1891
- style: {
1892
- width: z
1893
- }
1894
- }, r || R) : null, G = Object.assign(Object.assign({}, c), {
1895
- flex: `0 0 ${z}`,
1896
- maxWidth: z,
1897
- minWidth: z,
1898
- width: z
1899
- }), q = _(E, `${E}-${s}`, {
1900
- [`${E}-collapsed`]: !!S,
1901
- [`${E}-has-trigger`]: m && r !== null && !F,
1902
- [`${E}-below`]: !!y,
1903
- [`${E}-zero-width`]: parseFloat(z) === 0
1904
- }, n, x, C), Q = l.useMemo(() => ({
1905
- siderCollapsed: S
1906
- }), [S]);
1907
- return H(/* @__PURE__ */ l.createElement(tt.Provider, {
1908
- value: Q
1909
- }, /* @__PURE__ */ l.createElement("aside", Object.assign({
1910
- className: q
1911
- }, P, {
1912
- style: G,
1913
- ref: t
1914
- }), /* @__PURE__ */ l.createElement("div", {
1915
- className: `${E}-children`
1916
- }, a), m || y && F ? W : null)));
1917
- });
1918
- process.env.NODE_ENV !== "production" && (Fn.displayName = "Sider");
1919
- const Ne = /* @__PURE__ */ io({
1920
- prefixCls: "",
1921
- firstLevel: !0,
1922
- inlineCollapsed: !1
1923
- });
1924
- var Gn = function(e, t) {
1925
- var o = {};
1926
- for (var n in e) Object.prototype.hasOwnProperty.call(e, n) && t.indexOf(n) < 0 && (o[n] = e[n]);
1927
- if (e != null && typeof Object.getOwnPropertySymbols == "function") for (var r = 0, n = Object.getOwnPropertySymbols(e); r < n.length; r++)
1928
- t.indexOf(n[r]) < 0 && Object.prototype.propertyIsEnumerable.call(e, n[r]) && (o[n[r]] = e[n[r]]);
1929
- return o;
1930
- };
1931
- const Vt = (e) => {
1932
- const {
1933
- prefixCls: t,
1934
- className: o,
1935
- dashed: n
1936
- } = e, r = Gn(e, ["prefixCls", "className", "dashed"]), {
1937
- getPrefixCls: a
1938
- } = l.useContext(re), i = a("menu", t), s = _({
1939
- [`${i}-item-divider-dashed`]: !!n
1940
- }, o);
1941
- return /* @__PURE__ */ l.createElement(So, Object.assign({
1942
- className: s
1943
- }, r));
1944
- }, Wt = (e) => {
1945
- var t;
1946
- const {
1947
- className: o,
1948
- children: n,
1949
- icon: r,
1950
- title: a,
1951
- danger: i,
1952
- extra: s
1953
- } = e, {
1954
- prefixCls: c,
1955
- firstLevel: m,
1956
- direction: d,
1957
- disableMenuItemTitleTooltip: f,
1958
- inlineCollapsed: p
1959
- } = l.useContext(Ne), v = (S) => {
1960
- const N = n == null ? void 0 : n[0], y = /* @__PURE__ */ l.createElement("span", {
1961
- className: _(`${c}-title-content`, {
1962
- [`${c}-title-content-with-extra`]: !!s || s === 0
1963
- })
1964
- }, n);
1965
- return (!r || /* @__PURE__ */ l.isValidElement(n) && n.type === "span") && n && S && m && typeof N == "string" ? /* @__PURE__ */ l.createElement("div", {
1966
- className: `${c}-inline-collapsed-noicon`
1967
- }, N.charAt(0)) : y;
1968
- }, {
1969
- siderCollapsed: g
1970
- } = l.useContext(tt);
1971
- let u = a;
1972
- typeof a > "u" ? u = m ? n : "" : a === !1 && (u = "");
1973
- const h = {
1974
- title: u
1975
- };
1976
- !g && !p && (h.title = null, h.open = !1);
1977
- const $ = Ue(n).length;
1978
- let b = /* @__PURE__ */ l.createElement(Oo, Object.assign({}, $e(e, ["title", "icon", "danger"]), {
1979
- className: _({
1980
- [`${c}-item-danger`]: i,
1981
- [`${c}-item-only-child`]: (r ? $ + 1 : $) === 1
1982
- }, o),
1983
- title: typeof a == "string" ? a : void 0
1984
- }), ue(r, {
1985
- className: _(/* @__PURE__ */ l.isValidElement(r) ? (t = r.props) === null || t === void 0 ? void 0 : t.className : void 0, `${c}-item-icon`)
1986
- }), v(p));
1987
- return f || (b = /* @__PURE__ */ l.createElement(Me, Object.assign({}, h, {
1988
- placement: d === "rtl" ? "left" : "right",
1989
- classNames: {
1990
- root: `${c}-inline-collapsed-tooltip`
1991
- }
1992
- }), b)), b;
1993
- };
1994
- var Yn = function(e, t) {
1995
- var o = {};
1996
- for (var n in e) Object.prototype.hasOwnProperty.call(e, n) && t.indexOf(n) < 0 && (o[n] = e[n]);
1997
- if (e != null && typeof Object.getOwnPropertySymbols == "function") for (var r = 0, n = Object.getOwnPropertySymbols(e); r < n.length; r++)
1998
- t.indexOf(n[r]) < 0 && Object.prototype.propertyIsEnumerable.call(e, n[r]) && (o[n[r]] = e[n[r]]);
1999
- return o;
2000
- };
2001
- const Be = /* @__PURE__ */ l.createContext(null), Un = /* @__PURE__ */ l.forwardRef((e, t) => {
2002
- const {
2003
- children: o
2004
- } = e, n = Yn(e, ["children"]), r = l.useContext(Be), a = l.useMemo(() => Object.assign(Object.assign({}, r), n), [
2005
- r,
2006
- n.prefixCls,
2007
- // restProps.expandIcon, Not mark as deps since this is a ReactNode
2008
- n.mode,
2009
- n.selectable,
2010
- n.rootClassName
2011
- // restProps.validator, Not mark as deps since this is a function
2012
- ]), i = fo(o), s = vo(t, i ? bo(o) : null);
2013
- return /* @__PURE__ */ l.createElement(Be.Provider, {
2014
- value: a
2015
- }, /* @__PURE__ */ l.createElement(It, {
2016
- space: !0
2017
- }, i ? /* @__PURE__ */ l.cloneElement(o, {
2018
- ref: s
2019
- }) : o));
2020
- }), qn = (e) => {
2021
- const {
2022
- componentCls: t,
2023
- motionDurationSlow: o,
2024
- horizontalLineHeight: n,
2025
- colorSplit: r,
2026
- lineWidth: a,
2027
- lineType: i,
2028
- itemPaddingInline: s
2029
- } = e;
2030
- return {
2031
- [`${t}-horizontal`]: {
2032
- lineHeight: n,
2033
- border: 0,
2034
- borderBottom: `${I(a)} ${i} ${r}`,
2035
- boxShadow: "none",
2036
- "&::after": {
2037
- display: "block",
2038
- clear: "both",
2039
- height: 0,
2040
- content: '"\\20"'
2041
- },
2042
- // ======================= Item =======================
2043
- [`${t}-item, ${t}-submenu`]: {
2044
- position: "relative",
2045
- display: "inline-block",
2046
- verticalAlign: "bottom",
2047
- paddingInline: s
2048
- },
2049
- [`> ${t}-item:hover,
2050
- > ${t}-item-active,
2051
- > ${t}-submenu ${t}-submenu-title:hover`]: {
2052
- backgroundColor: "transparent"
2053
- },
2054
- [`${t}-item, ${t}-submenu-title`]: {
2055
- transition: [`border-color ${o}`, `background ${o}`].join(",")
2056
- },
2057
- // ===================== Sub Menu =====================
2058
- [`${t}-submenu-arrow`]: {
2059
- display: "none"
2060
- }
2061
- }
2062
- };
2063
- }, Kn = ({
2064
- componentCls: e,
2065
- menuArrowOffset: t,
2066
- calc: o
2067
- }) => ({
2068
- [`${e}-rtl`]: {
2069
- direction: "rtl"
2070
- },
2071
- [`${e}-submenu-rtl`]: {
2072
- transformOrigin: "100% 0"
2073
- },
2074
- // Vertical Arrow
2075
- [`${e}-rtl${e}-vertical,
2076
- ${e}-submenu-rtl ${e}-vertical`]: {
2077
- [`${e}-submenu-arrow`]: {
2078
- "&::before": {
2079
- transform: `rotate(-45deg) translateY(${I(o(t).mul(-1).equal())})`
2080
- },
2081
- "&::after": {
2082
- transform: `rotate(45deg) translateY(${I(t)})`
2083
- }
2084
- }
2085
- }
2086
- }), gt = (e) => Object.assign({}, ho(e)), ft = (e, t) => {
2087
- const {
2088
- componentCls: o,
2089
- itemColor: n,
2090
- itemSelectedColor: r,
2091
- subMenuItemSelectedColor: a,
2092
- groupTitleColor: i,
2093
- itemBg: s,
2094
- subMenuItemBg: c,
2095
- itemSelectedBg: m,
2096
- activeBarHeight: d,
2097
- activeBarWidth: f,
2098
- activeBarBorderWidth: p,
2099
- motionDurationSlow: v,
2100
- motionEaseInOut: g,
2101
- motionEaseOut: u,
2102
- itemPaddingInline: h,
2103
- motionDurationMid: $,
2104
- itemHoverColor: b,
2105
- lineType: S,
2106
- colorSplit: N,
2107
- // Disabled
2108
- itemDisabledColor: y,
2109
- // Danger
2110
- dangerItemColor: M,
2111
- dangerItemHoverColor: j,
2112
- dangerItemSelectedColor: T,
2113
- dangerItemActiveBg: O,
2114
- dangerItemSelectedBg: E,
2115
- // Bg
2116
- popupBg: H,
2117
- itemHoverBg: x,
2118
- itemActiveBg: C,
2119
- menuSubMenuBg: w,
2120
- // Horizontal
2121
- horizontalItemSelectedColor: B,
2122
- horizontalItemSelectedBg: P,
2123
- horizontalItemBorderRadius: L,
2124
- horizontalItemHoverBg: z
2125
- } = e;
2126
- return {
2127
- [`${o}-${t}, ${o}-${t} > ${o}`]: {
2128
- color: n,
2129
- background: s,
2130
- [`&${o}-root:focus-visible`]: Object.assign({}, gt(e)),
2131
- // ======================== Item ========================
2132
- [`${o}-item`]: {
2133
- "&-group-title, &-extra": {
2134
- color: i
2135
- }
2136
- },
2137
- [`${o}-submenu-selected > ${o}-submenu-title`]: {
2138
- color: a
2139
- },
2140
- [`${o}-item, ${o}-submenu-title`]: {
2141
- color: n,
2142
- [`&:not(${o}-item-disabled):focus-visible`]: Object.assign({}, gt(e))
2143
- },
2144
- // Disabled
2145
- [`${o}-item-disabled, ${o}-submenu-disabled`]: {
2146
- color: `${y} !important`
2147
- },
2148
- // Hover
2149
- [`${o}-item:not(${o}-item-selected):not(${o}-submenu-selected)`]: {
2150
- [`&:hover, > ${o}-submenu-title:hover`]: {
2151
- color: b
2152
- }
2153
- },
2154
- [`&:not(${o}-horizontal)`]: {
2155
- [`${o}-item:not(${o}-item-selected)`]: {
2156
- "&:hover": {
2157
- backgroundColor: x
2158
- },
2159
- "&:active": {
2160
- backgroundColor: C
2161
- }
2162
- },
2163
- [`${o}-submenu-title`]: {
2164
- "&:hover": {
2165
- backgroundColor: x
2166
- },
2167
- "&:active": {
2168
- backgroundColor: C
2169
- }
2170
- }
2171
- },
2172
- // Danger - only Item has
2173
- [`${o}-item-danger`]: {
2174
- color: M,
2175
- [`&${o}-item:hover`]: {
2176
- [`&:not(${o}-item-selected):not(${o}-submenu-selected)`]: {
2177
- color: j
2178
- }
2179
- },
2180
- [`&${o}-item:active`]: {
2181
- background: O
2182
- }
2183
- },
2184
- [`${o}-item a`]: {
2185
- "&, &:hover": {
2186
- color: "inherit"
2187
- }
2188
- },
2189
- [`${o}-item-selected`]: {
2190
- color: r,
2191
- // Danger
2192
- [`&${o}-item-danger`]: {
2193
- color: T
2194
- },
2195
- "a, a:hover": {
2196
- color: "inherit"
2197
- }
2198
- },
2199
- [`& ${o}-item-selected`]: {
2200
- backgroundColor: m,
2201
- // Danger
2202
- [`&${o}-item-danger`]: {
2203
- backgroundColor: E
2204
- }
2205
- },
2206
- [`&${o}-submenu > ${o}`]: {
2207
- backgroundColor: w
2208
- },
2209
- // ===== 设置浮层的颜色 =======
2210
- // !dark 模式会被popupBg 会被rest 为 darkPopupBg
2211
- [`&${o}-popup > ${o}`]: {
2212
- backgroundColor: H
2213
- },
2214
- [`&${o}-submenu-popup > ${o}`]: {
2215
- backgroundColor: H
2216
- },
2217
- // ===== 设置浮层的颜色 end =======
2218
- // ====================== Horizontal ======================
2219
- [`&${o}-horizontal`]: Object.assign(Object.assign({}, t === "dark" ? {
2220
- borderBottom: 0
2221
- } : {}), {
2222
- [`> ${o}-item, > ${o}-submenu`]: {
2223
- top: p,
2224
- marginTop: e.calc(p).mul(-1).equal(),
2225
- marginBottom: 0,
2226
- borderRadius: L,
2227
- "&::after": {
2228
- position: "absolute",
2229
- insetInline: h,
2230
- bottom: 0,
2231
- borderBottom: `${I(d)} solid transparent`,
2232
- transition: `border-color ${v} ${g}`,
2233
- content: '""'
2234
- },
2235
- "&:hover, &-active, &-open": {
2236
- background: z,
2237
- "&::after": {
2238
- borderBottomWidth: d,
2239
- borderBottomColor: B
2240
- }
2241
- },
2242
- "&-selected": {
2243
- color: B,
2244
- backgroundColor: P,
2245
- "&:hover": {
2246
- backgroundColor: P
2247
- },
2248
- "&::after": {
2249
- borderBottomWidth: d,
2250
- borderBottomColor: B
2251
- }
2252
- }
2253
- }
2254
- }),
2255
- // ================== Inline & Vertical ===================
2256
- //
2257
- [`&${o}-root`]: {
2258
- [`&${o}-inline, &${o}-vertical`]: {
2259
- borderInlineEnd: `${I(p)} ${S} ${N}`
2260
- }
2261
- },
2262
- // ======================== Inline ========================
2263
- [`&${o}-inline`]: {
2264
- // Sub
2265
- [`${o}-sub${o}-inline`]: {
2266
- background: c
2267
- },
2268
- [`${o}-item`]: {
2269
- position: "relative",
2270
- "&::after": {
2271
- position: "absolute",
2272
- insetBlock: 0,
2273
- insetInlineEnd: 0,
2274
- borderInlineEnd: `${I(f)} solid ${r}`,
2275
- transform: "scaleY(0.0001)",
2276
- opacity: 0,
2277
- transition: [`transform ${$} ${u}`, `opacity ${$} ${u}`].join(","),
2278
- content: '""'
2279
- },
2280
- // Danger
2281
- [`&${o}-item-danger`]: {
2282
- "&::after": {
2283
- borderInlineEndColor: T
2284
- }
2285
- }
2286
- },
2287
- [`${o}-selected, ${o}-item-selected`]: {
2288
- "&::after": {
2289
- transform: "scaleY(1)",
2290
- opacity: 1,
2291
- transition: [`transform ${$} ${g}`, `opacity ${$} ${g}`].join(",")
2292
- }
2293
- }
2294
- }
2295
- }
2296
- };
2297
- }, vt = (e) => {
2298
- const {
2299
- componentCls: t,
2300
- itemHeight: o,
2301
- itemMarginInline: n,
2302
- padding: r,
2303
- menuArrowSize: a,
2304
- marginXS: i,
2305
- itemMarginBlock: s,
2306
- itemWidth: c,
2307
- itemPaddingInline: m
2308
- } = e, d = e.calc(a).add(r).add(i).equal();
2309
- return {
2310
- [`${t}-item`]: {
2311
- position: "relative",
2312
- overflow: "hidden"
2313
- },
2314
- [`${t}-item, ${t}-submenu-title`]: {
2315
- height: o,
2316
- lineHeight: I(o),
2317
- paddingInline: m,
2318
- overflow: "hidden",
2319
- textOverflow: "ellipsis",
2320
- marginInline: n,
2321
- marginBlock: s,
2322
- width: c
2323
- },
2324
- [`> ${t}-item,
2325
- > ${t}-submenu > ${t}-submenu-title`]: {
2326
- height: o,
2327
- lineHeight: I(o)
2328
- },
2329
- [`${t}-item-group-list ${t}-submenu-title,
2330
- ${t}-submenu-title`]: {
2331
- paddingInlineEnd: d
2332
- }
2333
- };
2334
- }, Zn = (e) => {
2335
- const {
2336
- componentCls: t,
2337
- iconCls: o,
2338
- itemHeight: n,
2339
- colorTextLightSolid: r,
2340
- dropdownWidth: a,
2341
- controlHeightLG: i,
2342
- motionEaseOut: s,
2343
- paddingXL: c,
2344
- itemMarginInline: m,
2345
- fontSizeLG: d,
2346
- motionDurationFast: f,
2347
- motionDurationSlow: p,
2348
- paddingXS: v,
2349
- boxShadowSecondary: g,
2350
- collapsedWidth: u,
2351
- collapsedIconSize: h
2352
- } = e, $ = {
2353
- height: n,
2354
- lineHeight: I(n),
2355
- listStylePosition: "inside",
2356
- listStyleType: "disc"
2357
- };
2358
- return [
2359
- {
2360
- [t]: {
2361
- "&-inline, &-vertical": Object.assign({
2362
- [`&${t}-root`]: {
2363
- boxShadow: "none"
2364
- }
2365
- }, vt(e))
2366
- },
2367
- [`${t}-submenu-popup`]: {
2368
- [`${t}-vertical`]: Object.assign(Object.assign({}, vt(e)), {
2369
- boxShadow: g
2370
- })
2371
- }
2372
- },
2373
- // Vertical only
2374
- {
2375
- [`${t}-submenu-popup ${t}-vertical${t}-sub`]: {
2376
- minWidth: a,
2377
- maxHeight: `calc(100vh - ${I(e.calc(i).mul(2.5).equal())})`,
2378
- padding: "0",
2379
- overflow: "hidden",
2380
- borderInlineEnd: 0,
2381
- // https://github.com/ant-design/ant-design/issues/22244
2382
- // https://github.com/ant-design/ant-design/issues/26812
2383
- "&:not([class*='-active'])": {
2384
- overflowX: "hidden",
2385
- overflowY: "auto"
2386
- }
2387
- }
2388
- },
2389
- // Inline Only
2390
- {
2391
- [`${t}-inline`]: {
2392
- width: "100%",
2393
- // Motion enhance for first level
2394
- [`&${t}-root`]: {
2395
- [`${t}-item, ${t}-submenu-title`]: {
2396
- display: "flex",
2397
- alignItems: "center",
2398
- transition: [`border-color ${p}`, `background ${p}`, `padding ${f} ${s}`].join(","),
2399
- [`> ${t}-title-content`]: {
2400
- flex: "auto",
2401
- minWidth: 0,
2402
- overflow: "hidden",
2403
- textOverflow: "ellipsis"
2404
- },
2405
- "> *": {
2406
- flex: "none"
2407
- }
2408
- }
2409
- },
2410
- // >>>>> Sub
2411
- [`${t}-sub${t}-inline`]: {
2412
- padding: 0,
2413
- border: 0,
2414
- borderRadius: 0,
2415
- boxShadow: "none",
2416
- [`& > ${t}-submenu > ${t}-submenu-title`]: $,
2417
- [`& ${t}-item-group-title`]: {
2418
- paddingInlineStart: c
2419
- }
2420
- },
2421
- // >>>>> Item
2422
- [`${t}-item`]: $
2423
- }
2424
- },
2425
- // Inline Collapse Only
2426
- {
2427
- [`${t}-inline-collapsed`]: {
2428
- width: u,
2429
- [`&${t}-root`]: {
2430
- [`${t}-item, ${t}-submenu ${t}-submenu-title`]: {
2431
- [`> ${t}-inline-collapsed-noicon`]: {
2432
- fontSize: d,
2433
- textAlign: "center"
2434
- }
2435
- }
2436
- },
2437
- [`> ${t}-item,
2438
- > ${t}-item-group > ${t}-item-group-list > ${t}-item,
2439
- > ${t}-item-group > ${t}-item-group-list > ${t}-submenu > ${t}-submenu-title,
2440
- > ${t}-submenu > ${t}-submenu-title`]: {
2441
- insetInlineStart: 0,
2442
- paddingInline: `calc(50% - ${I(e.calc(h).div(2).equal())} - ${I(m)})`,
2443
- textOverflow: "clip",
2444
- [`
2445
- ${t}-submenu-arrow,
2446
- ${t}-submenu-expand-icon
2447
- `]: {
2448
- opacity: 0
2449
- },
2450
- [`${t}-item-icon, ${o}`]: {
2451
- margin: 0,
2452
- fontSize: h,
2453
- lineHeight: I(n),
2454
- "+ span": {
2455
- display: "inline-block",
2456
- opacity: 0
2457
- }
2458
- }
2459
- },
2460
- [`${t}-item-icon, ${o}`]: {
2461
- display: "inline-block"
2462
- },
2463
- "&-tooltip": {
2464
- pointerEvents: "none",
2465
- [`${t}-item-icon, ${o}`]: {
2466
- display: "none"
2467
- },
2468
- "a, a:hover": {
2469
- color: r
2470
- }
2471
- },
2472
- [`${t}-item-group-title`]: Object.assign(Object.assign({}, $o), {
2473
- paddingInline: v
2474
- })
2475
- }
2476
- }
2477
- ];
2478
- }, bt = (e) => {
2479
- const {
2480
- componentCls: t,
2481
- motionDurationSlow: o,
2482
- motionDurationMid: n,
2483
- motionEaseInOut: r,
2484
- motionEaseOut: a,
2485
- iconCls: i,
2486
- iconSize: s,
2487
- iconMarginInlineEnd: c
2488
- } = e;
2489
- return {
2490
- // >>>>> Item
2491
- [`${t}-item, ${t}-submenu-title`]: {
2492
- position: "relative",
2493
- display: "block",
2494
- margin: 0,
2495
- whiteSpace: "nowrap",
2496
- cursor: "pointer",
2497
- transition: [`border-color ${o}`, `background ${o}`, `padding calc(${o} + 0.1s) ${r}`].join(","),
2498
- [`${t}-item-icon, ${i}`]: {
2499
- minWidth: s,
2500
- fontSize: s,
2501
- transition: [`font-size ${n} ${a}`, `margin ${o} ${r}`, `color ${o}`].join(","),
2502
- "+ span": {
2503
- marginInlineStart: c,
2504
- opacity: 1,
2505
- transition: [`opacity ${o} ${r}`, `margin ${o}`, `color ${o}`].join(",")
2506
- }
2507
- },
2508
- [`${t}-item-icon`]: Object.assign({}, yo()),
2509
- [`&${t}-item-only-child`]: {
2510
- [`> ${i}, > ${t}-item-icon`]: {
2511
- marginInlineEnd: 0
2512
- }
2513
- }
2514
- },
2515
- // Disabled state sets text to gray and nukes hover/tab effects
2516
- [`${t}-item-disabled, ${t}-submenu-disabled`]: {
2517
- background: "none !important",
2518
- cursor: "not-allowed",
2519
- "&::after": {
2520
- borderColor: "transparent !important"
2521
- },
2522
- a: {
2523
- color: "inherit !important",
2524
- cursor: "not-allowed",
2525
- pointerEvents: "none"
2526
- },
2527
- [`> ${t}-submenu-title`]: {
2528
- color: "inherit !important",
2529
- cursor: "not-allowed"
2530
- }
2531
- }
2532
- };
2533
- }, ht = (e) => {
2534
- const {
2535
- componentCls: t,
2536
- motionDurationSlow: o,
2537
- motionEaseInOut: n,
2538
- borderRadius: r,
2539
- menuArrowSize: a,
2540
- menuArrowOffset: i
2541
- } = e;
2542
- return {
2543
- [`${t}-submenu`]: {
2544
- "&-expand-icon, &-arrow": {
2545
- position: "absolute",
2546
- top: "50%",
2547
- insetInlineEnd: e.margin,
2548
- width: a,
2549
- color: "currentcolor",
2550
- transform: "translateY(-50%)",
2551
- transition: `transform ${o} ${n}, opacity ${o}`
2552
- },
2553
- "&-arrow": {
2554
- // →
2555
- "&::before, &::after": {
2556
- position: "absolute",
2557
- width: e.calc(a).mul(0.6).equal(),
2558
- height: e.calc(a).mul(0.15).equal(),
2559
- backgroundColor: "currentcolor",
2560
- borderRadius: r,
2561
- transition: [`background ${o} ${n}`, `transform ${o} ${n}`, `top ${o} ${n}`, `color ${o} ${n}`].join(","),
2562
- content: '""'
2563
- },
2564
- "&::before": {
2565
- transform: `rotate(45deg) translateY(${I(e.calc(i).mul(-1).equal())})`
2566
- },
2567
- "&::after": {
2568
- transform: `rotate(-45deg) translateY(${I(i)})`
2569
- }
2570
- }
2571
- }
2572
- };
2573
- }, Qn = (e) => {
2574
- const {
2575
- antCls: t,
2576
- componentCls: o,
2577
- fontSize: n,
2578
- motionDurationSlow: r,
2579
- motionDurationMid: a,
2580
- motionEaseInOut: i,
2581
- paddingXS: s,
2582
- padding: c,
2583
- colorSplit: m,
2584
- lineWidth: d,
2585
- zIndexPopup: f,
2586
- borderRadiusLG: p,
2587
- subMenuItemBorderRadius: v,
2588
- menuArrowSize: g,
2589
- menuArrowOffset: u,
2590
- lineType: h,
2591
- groupTitleLineHeight: $,
2592
- groupTitleFontSize: b
2593
- } = e;
2594
- return [
2595
- // Misc
2596
- {
2597
- "": {
2598
- [o]: Object.assign(Object.assign({}, at()), {
2599
- // Hidden
2600
- "&-hidden": {
2601
- display: "none"
2602
- }
2603
- })
2604
- },
2605
- [`${o}-submenu-hidden`]: {
2606
- display: "none"
2607
- }
2608
- },
2609
- {
2610
- [o]: Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({}, be(e)), at()), {
2611
- marginBottom: 0,
2612
- paddingInlineStart: 0,
2613
- // Override default ul/ol
2614
- fontSize: n,
2615
- lineHeight: 0,
2616
- listStyle: "none",
2617
- outline: "none",
2618
- // Magic cubic here but smooth transition
2619
- transition: `width ${r} cubic-bezier(0.2, 0, 0, 1) 0s`,
2620
- "ul, ol": {
2621
- margin: 0,
2622
- padding: 0,
2623
- listStyle: "none"
2624
- },
2625
- // Overflow ellipsis
2626
- "&-overflow": {
2627
- display: "flex",
2628
- [`${o}-item`]: {
2629
- flex: "none"
2630
- }
2631
- },
2632
- [`${o}-item, ${o}-submenu, ${o}-submenu-title`]: {
2633
- borderRadius: e.itemBorderRadius
2634
- },
2635
- [`${o}-item-group-title`]: {
2636
- padding: `${I(s)} ${I(c)}`,
2637
- fontSize: b,
2638
- lineHeight: $,
2639
- transition: `all ${r}`
2640
- },
2641
- [`&-horizontal ${o}-submenu`]: {
2642
- transition: [`border-color ${r} ${i}`, `background ${r} ${i}`].join(",")
2643
- },
2644
- [`${o}-submenu, ${o}-submenu-inline`]: {
2645
- transition: [`border-color ${r} ${i}`, `background ${r} ${i}`, `padding ${a} ${i}`].join(",")
2646
- },
2647
- [`${o}-submenu ${o}-sub`]: {
2648
- cursor: "initial",
2649
- transition: [`background ${r} ${i}`, `padding ${r} ${i}`].join(",")
2650
- },
2651
- [`${o}-title-content`]: {
2652
- transition: `color ${r}`,
2653
- "&-with-extra": {
2654
- display: "inline-flex",
2655
- alignItems: "center",
2656
- width: "100%"
2657
- },
2658
- // https://github.com/ant-design/ant-design/issues/41143
2659
- [`> ${t}-typography-ellipsis-single-line`]: {
2660
- display: "inline",
2661
- verticalAlign: "unset"
2662
- },
2663
- [`${o}-item-extra`]: {
2664
- marginInlineStart: "auto",
2665
- paddingInlineStart: e.padding
2666
- }
2667
- },
2668
- [`${o}-item a`]: {
2669
- "&::before": {
2670
- position: "absolute",
2671
- inset: 0,
2672
- backgroundColor: "transparent",
2673
- content: '""'
2674
- }
2675
- },
2676
- // Removed a Badge related style seems it's safe
2677
- // https://github.com/ant-design/ant-design/issues/19809
2678
- // >>>>> Divider
2679
- [`${o}-item-divider`]: {
2680
- overflow: "hidden",
2681
- lineHeight: 0,
2682
- borderColor: m,
2683
- borderStyle: h,
2684
- borderWidth: 0,
2685
- borderTopWidth: d,
2686
- marginBlock: d,
2687
- padding: 0,
2688
- "&-dashed": {
2689
- borderStyle: "dashed"
2690
- }
2691
- }
2692
- }), bt(e)), {
2693
- [`${o}-item-group`]: {
2694
- [`${o}-item-group-list`]: {
2695
- margin: 0,
2696
- padding: 0,
2697
- [`${o}-item, ${o}-submenu-title`]: {
2698
- paddingInline: `${I(e.calc(n).mul(2).equal())} ${I(c)}`
2699
- }
2700
- }
2701
- },
2702
- // ======================= Sub Menu =======================
2703
- "&-submenu": {
2704
- "&-popup": {
2705
- position: "absolute",
2706
- zIndex: f,
2707
- borderRadius: p,
2708
- boxShadow: "none",
2709
- transformOrigin: "0 0",
2710
- [`&${o}-submenu`]: {
2711
- background: "transparent"
2712
- },
2713
- // https://github.com/ant-design/ant-design/issues/13955
2714
- "&::before": {
2715
- position: "absolute",
2716
- inset: 0,
2717
- zIndex: -1,
2718
- width: "100%",
2719
- height: "100%",
2720
- opacity: 0,
2721
- content: '""'
2722
- },
2723
- [`> ${o}`]: Object.assign(Object.assign(Object.assign({
2724
- borderRadius: p
2725
- }, bt(e)), ht(e)), {
2726
- [`${o}-item, ${o}-submenu > ${o}-submenu-title`]: {
2727
- borderRadius: v
2728
- },
2729
- [`${o}-submenu-title::after`]: {
2730
- transition: `transform ${r} ${i}`
2731
- }
2732
- })
2733
- },
2734
- "\n &-placement-leftTop,\n &-placement-bottomRight,\n ": {
2735
- transformOrigin: "100% 0"
2736
- },
2737
- "\n &-placement-leftBottom,\n &-placement-topRight,\n ": {
2738
- transformOrigin: "100% 100%"
2739
- },
2740
- "\n &-placement-rightBottom,\n &-placement-topLeft,\n ": {
2741
- transformOrigin: "0 100%"
2742
- },
2743
- "\n &-placement-bottomLeft,\n &-placement-rightTop,\n ": {
2744
- transformOrigin: "0 0"
2745
- },
2746
- "\n &-placement-leftTop,\n &-placement-leftBottom\n ": {
2747
- paddingInlineEnd: e.paddingXS
2748
- },
2749
- "\n &-placement-rightTop,\n &-placement-rightBottom\n ": {
2750
- paddingInlineStart: e.paddingXS
2751
- },
2752
- "\n &-placement-topRight,\n &-placement-topLeft\n ": {
2753
- paddingBottom: e.paddingXS
2754
- },
2755
- "\n &-placement-bottomRight,\n &-placement-bottomLeft\n ": {
2756
- paddingTop: e.paddingXS
2757
- }
2758
- }
2759
- }), ht(e)), {
2760
- [`&-inline-collapsed ${o}-submenu-arrow,
2761
- &-inline ${o}-submenu-arrow`]: {
2762
- // ↓
2763
- "&::before": {
2764
- transform: `rotate(-45deg) translateX(${I(u)})`
2765
- },
2766
- "&::after": {
2767
- transform: `rotate(45deg) translateX(${I(e.calc(u).mul(-1).equal())})`
2768
- }
2769
- },
2770
- [`${o}-submenu-open${o}-submenu-inline > ${o}-submenu-title > ${o}-submenu-arrow`]: {
2771
- // ↑
2772
- transform: `translateY(${I(e.calc(g).mul(0.2).mul(-1).equal())})`,
2773
- "&::after": {
2774
- transform: `rotate(-45deg) translateX(${I(e.calc(u).mul(-1).equal())})`
2775
- },
2776
- "&::before": {
2777
- transform: `rotate(45deg) translateX(${I(u)})`
2778
- }
2779
- }
2780
- })
2781
- },
2782
- // Integration with header element so menu items have the same height
2783
- {
2784
- [`${t}-layout-header`]: {
2785
- [o]: {
2786
- lineHeight: "inherit"
2787
- }
2788
- }
2789
- }
2790
- ];
2791
- }, Jn = (e) => {
2792
- var t, o, n;
2793
- const {
2794
- colorPrimary: r,
2795
- colorError: a,
2796
- colorTextDisabled: i,
2797
- colorErrorBg: s,
2798
- colorText: c,
2799
- colorTextDescription: m,
2800
- colorBgContainer: d,
2801
- colorFillAlter: f,
2802
- colorFillContent: p,
2803
- lineWidth: v,
2804
- lineWidthBold: g,
2805
- controlItemBgActive: u,
2806
- colorBgTextHover: h,
2807
- controlHeightLG: $,
2808
- lineHeight: b,
2809
- colorBgElevated: S,
2810
- marginXXS: N,
2811
- padding: y,
2812
- fontSize: M,
2813
- controlHeightSM: j,
2814
- fontSizeLG: T,
2815
- colorTextLightSolid: O,
2816
- colorErrorHover: E
2817
- } = e, H = (t = e.activeBarWidth) !== null && t !== void 0 ? t : 0, x = (o = e.activeBarBorderWidth) !== null && o !== void 0 ? o : v, C = (n = e.itemMarginInline) !== null && n !== void 0 ? n : e.marginXXS, w = new lt(O).setA(0.65).toRgbString();
2818
- return {
2819
- dropdownWidth: 160,
2820
- zIndexPopup: e.zIndexPopupBase + 50,
2821
- radiusItem: e.borderRadiusLG,
2822
- itemBorderRadius: e.borderRadiusLG,
2823
- radiusSubMenuItem: e.borderRadiusSM,
2824
- subMenuItemBorderRadius: e.borderRadiusSM,
2825
- colorItemText: c,
2826
- itemColor: c,
2827
- colorItemTextHover: c,
2828
- itemHoverColor: c,
2829
- colorItemTextHoverHorizontal: r,
2830
- horizontalItemHoverColor: r,
2831
- colorGroupTitle: m,
2832
- groupTitleColor: m,
2833
- colorItemTextSelected: r,
2834
- itemSelectedColor: r,
2835
- subMenuItemSelectedColor: r,
2836
- colorItemTextSelectedHorizontal: r,
2837
- horizontalItemSelectedColor: r,
2838
- colorItemBg: d,
2839
- itemBg: d,
2840
- colorItemBgHover: h,
2841
- itemHoverBg: h,
2842
- colorItemBgActive: p,
2843
- itemActiveBg: u,
2844
- colorSubItemBg: f,
2845
- subMenuItemBg: f,
2846
- colorItemBgSelected: u,
2847
- itemSelectedBg: u,
2848
- colorItemBgSelectedHorizontal: "transparent",
2849
- horizontalItemSelectedBg: "transparent",
2850
- colorActiveBarWidth: 0,
2851
- activeBarWidth: H,
2852
- colorActiveBarHeight: g,
2853
- activeBarHeight: g,
2854
- colorActiveBarBorderSize: v,
2855
- activeBarBorderWidth: x,
2856
- // Disabled
2857
- colorItemTextDisabled: i,
2858
- itemDisabledColor: i,
2859
- // Danger
2860
- colorDangerItemText: a,
2861
- dangerItemColor: a,
2862
- colorDangerItemTextHover: a,
2863
- dangerItemHoverColor: a,
2864
- colorDangerItemTextSelected: a,
2865
- dangerItemSelectedColor: a,
2866
- colorDangerItemBgActive: s,
2867
- dangerItemActiveBg: s,
2868
- colorDangerItemBgSelected: s,
2869
- dangerItemSelectedBg: s,
2870
- itemMarginInline: C,
2871
- horizontalItemBorderRadius: 0,
2872
- horizontalItemHoverBg: "transparent",
2873
- itemHeight: $,
2874
- groupTitleLineHeight: b,
2875
- collapsedWidth: $ * 2,
2876
- popupBg: S,
2877
- itemMarginBlock: N,
2878
- itemPaddingInline: y,
2879
- horizontalLineHeight: `${$ * 1.15}px`,
2880
- iconSize: M,
2881
- iconMarginInlineEnd: j - M,
2882
- collapsedIconSize: T,
2883
- groupTitleFontSize: M,
2884
- // Disabled
2885
- darkItemDisabledColor: new lt(O).setA(0.25).toRgbString(),
2886
- // Dark
2887
- darkItemColor: w,
2888
- darkDangerItemColor: a,
2889
- darkItemBg: "#001529",
2890
- darkPopupBg: "#001529",
2891
- darkSubMenuItemBg: "#000c17",
2892
- darkItemSelectedColor: O,
2893
- darkItemSelectedBg: r,
2894
- darkDangerItemSelectedBg: a,
2895
- darkItemHoverBg: "transparent",
2896
- darkGroupTitleColor: w,
2897
- darkItemHoverColor: O,
2898
- darkDangerItemHoverColor: E,
2899
- darkDangerItemSelectedColor: O,
2900
- darkDangerItemActiveBg: a,
2901
- // internal
2902
- itemWidth: H ? `calc(100% + ${x}px)` : `calc(100% - ${C * 2}px)`
2903
- };
2904
- }, er = (e, t = e, o = !0) => de("Menu", (r) => {
2905
- const {
2906
- colorBgElevated: a,
2907
- controlHeightLG: i,
2908
- fontSize: s,
2909
- darkItemColor: c,
2910
- darkDangerItemColor: m,
2911
- darkItemBg: d,
2912
- darkSubMenuItemBg: f,
2913
- darkItemSelectedColor: p,
2914
- darkItemSelectedBg: v,
2915
- darkDangerItemSelectedBg: g,
2916
- darkItemHoverBg: u,
2917
- darkGroupTitleColor: h,
2918
- darkItemHoverColor: $,
2919
- darkItemDisabledColor: b,
2920
- darkDangerItemHoverColor: S,
2921
- darkDangerItemSelectedColor: N,
2922
- darkDangerItemActiveBg: y,
2923
- popupBg: M,
2924
- darkPopupBg: j
2925
- } = r, T = r.calc(s).div(7).mul(5).equal(), O = ce(r, {
2926
- menuArrowSize: T,
2927
- menuHorizontalHeight: r.calc(i).mul(1.15).equal(),
2928
- menuArrowOffset: r.calc(T).mul(0.25).equal(),
2929
- menuSubMenuBg: a,
2930
- calc: r.calc,
2931
- popupBg: M
2932
- }), E = ce(O, {
2933
- itemColor: c,
2934
- itemHoverColor: $,
2935
- groupTitleColor: h,
2936
- itemSelectedColor: p,
2937
- subMenuItemSelectedColor: p,
2938
- itemBg: d,
2939
- popupBg: j,
2940
- subMenuItemBg: f,
2941
- itemActiveBg: "transparent",
2942
- itemSelectedBg: v,
2943
- activeBarHeight: 0,
2944
- activeBarBorderWidth: 0,
2945
- itemHoverBg: u,
2946
- // Disabled
2947
- itemDisabledColor: b,
2948
- // Danger
2949
- dangerItemColor: m,
2950
- dangerItemHoverColor: S,
2951
- dangerItemSelectedColor: N,
2952
- dangerItemActiveBg: y,
2953
- dangerItemSelectedBg: g,
2954
- menuSubMenuBg: f,
2955
- // Horizontal
2956
- horizontalItemSelectedColor: p,
2957
- horizontalItemSelectedBg: v
2958
- });
2959
- return [
2960
- // Basic
2961
- Qn(O),
2962
- // Horizontal
2963
- qn(O),
2964
- // Hard code for some light style
2965
- // Vertical
2966
- Zn(O),
2967
- // Hard code for some light style
2968
- // Theme
2969
- ft(O, "light"),
2970
- ft(E, "dark"),
2971
- // RTL
2972
- Kn(O),
2973
- // Motion
2974
- Wo(O),
2975
- Oe(O, "slide-up"),
2976
- Oe(O, "slide-down"),
2977
- _e(O, "zoom-big")
2978
- ];
2979
- }, Jn, {
2980
- deprecatedTokens: [["colorGroupTitle", "groupTitleColor"], ["radiusItem", "itemBorderRadius"], ["radiusSubMenuItem", "subMenuItemBorderRadius"], ["colorItemText", "itemColor"], ["colorItemTextHover", "itemHoverColor"], ["colorItemTextHoverHorizontal", "horizontalItemHoverColor"], ["colorItemTextSelected", "itemSelectedColor"], ["colorItemTextSelectedHorizontal", "horizontalItemSelectedColor"], ["colorItemTextDisabled", "itemDisabledColor"], ["colorDangerItemText", "dangerItemColor"], ["colorDangerItemTextHover", "dangerItemHoverColor"], ["colorDangerItemTextSelected", "dangerItemSelectedColor"], ["colorDangerItemBgActive", "dangerItemActiveBg"], ["colorDangerItemBgSelected", "dangerItemSelectedBg"], ["colorItemBg", "itemBg"], ["colorItemBgHover", "itemHoverBg"], ["colorSubItemBg", "subMenuItemBg"], ["colorItemBgActive", "itemActiveBg"], ["colorItemBgSelectedHorizontal", "horizontalItemSelectedBg"], ["colorActiveBarWidth", "activeBarWidth"], ["colorActiveBarHeight", "activeBarHeight"], ["colorActiveBarBorderSize", "activeBarBorderWidth"], ["colorItemBgSelected", "itemSelectedBg"]],
2981
- // Dropdown will handle menu style self. We do not need to handle this.
2982
- injectStyle: o,
2983
- unitless: {
2984
- groupTitleLineHeight: !0
2985
- }
2986
- })(e, t), Xt = (e) => {
2987
- var t;
2988
- const {
2989
- popupClassName: o,
2990
- icon: n,
2991
- title: r,
2992
- theme: a
2993
- } = e, i = l.useContext(Ne), {
2994
- prefixCls: s,
2995
- inlineCollapsed: c,
2996
- theme: m
2997
- } = i, d = Io();
2998
- let f;
2999
- if (!n)
3000
- f = c && !d.length && r && typeof r == "string" ? /* @__PURE__ */ l.createElement("div", {
3001
- className: `${s}-inline-collapsed-noicon`
3002
- }, r.charAt(0)) : /* @__PURE__ */ l.createElement("span", {
3003
- className: `${s}-title-content`
3004
- }, r);
3005
- else {
3006
- const g = /* @__PURE__ */ l.isValidElement(r) && r.type === "span";
3007
- f = /* @__PURE__ */ l.createElement(l.Fragment, null, ue(n, {
3008
- className: _(/* @__PURE__ */ l.isValidElement(n) ? (t = n.props) === null || t === void 0 ? void 0 : t.className : void 0, `${s}-item-icon`)
3009
- }), g ? r : /* @__PURE__ */ l.createElement("span", {
3010
- className: `${s}-title-content`
3011
- }, r));
3012
- }
3013
- const p = l.useMemo(() => Object.assign(Object.assign({}, i), {
3014
- firstLevel: !1
3015
- }), [i]), [v] = qe("Menu");
3016
- return /* @__PURE__ */ l.createElement(Ne.Provider, {
3017
- value: p
3018
- }, /* @__PURE__ */ l.createElement(Po, Object.assign({}, $e(e, ["icon"]), {
3019
- title: f,
3020
- popupClassName: _(s, o, `${s}-${a || m}`),
3021
- popupStyle: Object.assign({
3022
- zIndex: v
3023
- }, e.popupStyle)
3024
- })));
3025
- };
3026
- var tr = function(e, t) {
3027
- var o = {};
3028
- for (var n in e) Object.prototype.hasOwnProperty.call(e, n) && t.indexOf(n) < 0 && (o[n] = e[n]);
3029
- if (e != null && typeof Object.getOwnPropertySymbols == "function") for (var r = 0, n = Object.getOwnPropertySymbols(e); r < n.length; r++)
3030
- t.indexOf(n[r]) < 0 && Object.prototype.propertyIsEnumerable.call(e, n[r]) && (o[n[r]] = e[n[r]]);
3031
- return o;
3032
- };
3033
- function ke(e) {
3034
- return e === null || e === !1;
3035
- }
3036
- const or = {
3037
- item: Wt,
3038
- submenu: Xt,
3039
- divider: Vt
3040
- }, nr = /* @__PURE__ */ We((e, t) => {
3041
- var o;
3042
- const n = l.useContext(Be), r = n || {}, {
3043
- getPrefixCls: a,
3044
- getPopupContainer: i,
3045
- direction: s,
3046
- menu: c
3047
- } = l.useContext(re), m = a(), {
3048
- prefixCls: d,
3049
- className: f,
3050
- style: p,
3051
- theme: v = "light",
3052
- expandIcon: g,
3053
- _internalDisableMenuItemTitleTooltip: u,
3054
- inlineCollapsed: h,
3055
- siderCollapsed: $,
3056
- rootClassName: b,
3057
- mode: S,
3058
- selectable: N,
3059
- onClick: y,
3060
- overflowedIndicatorPopupClassName: M
3061
- } = e, j = tr(e, ["prefixCls", "className", "style", "theme", "expandIcon", "_internalDisableMenuItemTitleTooltip", "inlineCollapsed", "siderCollapsed", "rootClassName", "mode", "selectable", "onClick", "overflowedIndicatorPopupClassName"]), T = $e(j, ["collapsedWidth"]);
3062
- if (process.env.NODE_ENV !== "production") {
3063
- const k = he("Menu");
3064
- process.env.NODE_ENV !== "production" && k(!("inlineCollapsed" in e && S !== "inline"), "usage", "`inlineCollapsed` should only be used when `mode` is inline."), k.deprecated("items" in e && !e.children, "children", "items");
3065
- }
3066
- (o = r.validator) === null || o === void 0 || o.call(r, {
3067
- mode: S
3068
- });
3069
- const O = St((...k) => {
3070
- var R;
3071
- y == null || y.apply(void 0, k), (R = r.onClick) === null || R === void 0 || R.call(r);
3072
- }), E = r.mode || S, H = N ?? r.selectable, x = h ?? $, C = {
3073
- horizontal: {
3074
- motionName: `${m}-slide-up`
3075
- },
3076
- inline: Co(m),
3077
- other: {
3078
- motionName: `${m}-zoom-big`
3079
- }
3080
- }, w = a("menu", d || r.prefixCls), B = Te(w), [P, L, z] = er(w, B, !n), F = _(`${w}-${v}`, c == null ? void 0 : c.className, f), D = l.useMemo(() => {
3081
- var k, R;
3082
- if (typeof g == "function" || ke(g))
3083
- return g || null;
3084
- if (typeof r.expandIcon == "function" || ke(r.expandIcon))
3085
- return r.expandIcon || null;
3086
- if (typeof (c == null ? void 0 : c.expandIcon) == "function" || ke(c == null ? void 0 : c.expandIcon))
3087
- return (c == null ? void 0 : c.expandIcon) || null;
3088
- const W = (k = g ?? (r == null ? void 0 : r.expandIcon)) !== null && k !== void 0 ? k : c == null ? void 0 : c.expandIcon;
3089
- return ue(W, {
3090
- className: _(`${w}-submenu-expand-icon`, /* @__PURE__ */ l.isValidElement(W) ? (R = W.props) === null || R === void 0 ? void 0 : R.className : void 0)
3091
- });
3092
- }, [g, r == null ? void 0 : r.expandIcon, c == null ? void 0 : c.expandIcon, w]), A = l.useMemo(() => ({
3093
- prefixCls: w,
3094
- inlineCollapsed: x || !1,
3095
- direction: s,
3096
- firstLevel: !0,
3097
- theme: v,
3098
- mode: E,
3099
- disableMenuItemTitleTooltip: u
3100
- }), [w, x, s, u, v]);
3101
- return P(/* @__PURE__ */ l.createElement(Be.Provider, {
3102
- value: null
3103
- }, /* @__PURE__ */ l.createElement(Ne.Provider, {
3104
- value: A
3105
- }, /* @__PURE__ */ l.createElement(Eo, Object.assign({
3106
- getPopupContainer: i,
3107
- overflowedIndicator: /* @__PURE__ */ l.createElement(Ot, null),
3108
- overflowedIndicatorPopupClassName: _(w, `${w}-${v}`, M),
3109
- mode: E,
3110
- selectable: H,
3111
- onClick: O
3112
- }, T, {
3113
- inlineCollapsed: x,
3114
- style: Object.assign(Object.assign({}, c == null ? void 0 : c.style), p),
3115
- className: F,
3116
- prefixCls: w,
3117
- direction: s,
3118
- defaultMotions: C,
3119
- expandIcon: D,
3120
- ref: t,
3121
- rootClassName: _(b, L, r.rootClassName, z, B),
3122
- _internalComponents: or
3123
- })))));
3124
- }), fe = /* @__PURE__ */ We((e, t) => {
3125
- const o = ze(null), n = l.useContext(tt);
3126
- return wt(t, () => ({
3127
- menu: o.current,
3128
- focus: (r) => {
3129
- var a;
3130
- (a = o.current) === null || a === void 0 || a.focus(r);
3131
- }
3132
- })), /* @__PURE__ */ l.createElement(nr, Object.assign({
3133
- ref: o
3134
- }, e, n));
3135
- });
3136
- fe.Item = Wt;
3137
- fe.SubMenu = Xt;
3138
- fe.Divider = Vt;
3139
- fe.ItemGroup = No;
3140
- process.env.NODE_ENV !== "production" && (fe.displayName = "Menu");
3141
- const rr = (e) => {
3142
- const {
3143
- componentCls: t,
3144
- menuCls: o,
3145
- colorError: n,
3146
- colorTextLightSolid: r
3147
- } = e, a = `${o}-item`;
3148
- return {
3149
- [`${t}, ${t}-menu-submenu`]: {
3150
- [`${o} ${a}`]: {
3151
- [`&${a}-danger:not(${a}-disabled)`]: {
3152
- color: n,
3153
- "&:hover": {
3154
- color: r,
3155
- backgroundColor: n
3156
- }
3157
- }
3158
- }
3159
- }
3160
- };
3161
- }, ir = (e) => {
3162
- const {
3163
- componentCls: t,
3164
- menuCls: o,
3165
- zIndexPopup: n,
3166
- dropdownArrowDistance: r,
3167
- sizePopupArrow: a,
3168
- antCls: i,
3169
- iconCls: s,
3170
- motionDurationMid: c,
3171
- paddingBlock: m,
3172
- fontSize: d,
3173
- dropdownEdgeChildPadding: f,
3174
- colorTextDisabled: p,
3175
- fontSizeIcon: v,
3176
- controlPaddingHorizontal: g,
3177
- colorBgElevated: u
3178
- } = e;
3179
- return [
3180
- {
3181
- [t]: {
3182
- position: "absolute",
3183
- top: -9999,
3184
- left: {
3185
- _skip_check_: !0,
3186
- value: -9999
3187
- },
3188
- zIndex: n,
3189
- display: "block",
3190
- // A placeholder out of dropdown visible range to avoid close when user moving
3191
- "&::before": {
3192
- position: "absolute",
3193
- insetBlock: e.calc(a).div(2).sub(r).equal(),
3194
- // insetInlineStart: -7, // FIXME: Seems not work for hidden element
3195
- zIndex: -9999,
3196
- opacity: 1e-4,
3197
- content: '""'
3198
- },
3199
- // Makes vertical dropdowns have a scrollbar once they become taller than the viewport.
3200
- "&-menu-vertical": {
3201
- maxHeight: "100vh",
3202
- overflowY: "auto"
3203
- },
3204
- [`&-trigger${i}-btn`]: {
3205
- [`& > ${s}-down, & > ${i}-btn-icon > ${s}-down`]: {
3206
- fontSize: v
3207
- }
3208
- },
3209
- [`${t}-wrap`]: {
3210
- position: "relative",
3211
- [`${i}-btn > ${s}-down`]: {
3212
- fontSize: v
3213
- },
3214
- [`${s}-down::before`]: {
3215
- transition: `transform ${c}`
3216
- }
3217
- },
3218
- [`${t}-wrap-open`]: {
3219
- [`${s}-down::before`]: {
3220
- transform: "rotate(180deg)"
3221
- }
3222
- },
3223
- "\n &-hidden,\n &-menu-hidden,\n &-menu-submenu-hidden\n ": {
3224
- display: "none"
3225
- },
3226
- // =============================================================
3227
- // == Motion ==
3228
- // =============================================================
3229
- // When position is not enough for dropdown, the placement will revert.
3230
- // We will handle this with revert motion name.
3231
- [`&${i}-slide-down-enter${i}-slide-down-enter-active${t}-placement-bottomLeft,
3232
- &${i}-slide-down-appear${i}-slide-down-appear-active${t}-placement-bottomLeft,
3233
- &${i}-slide-down-enter${i}-slide-down-enter-active${t}-placement-bottom,
3234
- &${i}-slide-down-appear${i}-slide-down-appear-active${t}-placement-bottom,
3235
- &${i}-slide-down-enter${i}-slide-down-enter-active${t}-placement-bottomRight,
3236
- &${i}-slide-down-appear${i}-slide-down-appear-active${t}-placement-bottomRight`]: {
3237
- animationName: To
3238
- },
3239
- [`&${i}-slide-up-enter${i}-slide-up-enter-active${t}-placement-topLeft,
3240
- &${i}-slide-up-appear${i}-slide-up-appear-active${t}-placement-topLeft,
3241
- &${i}-slide-up-enter${i}-slide-up-enter-active${t}-placement-top,
3242
- &${i}-slide-up-appear${i}-slide-up-appear-active${t}-placement-top,
3243
- &${i}-slide-up-enter${i}-slide-up-enter-active${t}-placement-topRight,
3244
- &${i}-slide-up-appear${i}-slide-up-appear-active${t}-placement-topRight`]: {
3245
- animationName: jo
3246
- },
3247
- [`&${i}-slide-down-leave${i}-slide-down-leave-active${t}-placement-bottomLeft,
3248
- &${i}-slide-down-leave${i}-slide-down-leave-active${t}-placement-bottom,
3249
- &${i}-slide-down-leave${i}-slide-down-leave-active${t}-placement-bottomRight`]: {
3250
- animationName: zo
3251
- },
3252
- [`&${i}-slide-up-leave${i}-slide-up-leave-active${t}-placement-topLeft,
3253
- &${i}-slide-up-leave${i}-slide-up-leave-active${t}-placement-top,
3254
- &${i}-slide-up-leave${i}-slide-up-leave-active${t}-placement-topRight`]: {
3255
- animationName: Bo
3256
- }
3257
- }
3258
- },
3259
- // =============================================================
3260
- // == Arrow style ==
3261
- // =============================================================
3262
- Je(e, u, {
3263
- arrowPlacement: {
3264
- top: !0,
3265
- bottom: !0
3266
- }
3267
- }),
3268
- {
3269
- // =============================================================
3270
- // == Menu ==
3271
- // =============================================================
3272
- [`${t} ${o}`]: {
3273
- position: "relative",
3274
- margin: 0
3275
- },
3276
- [`${o}-submenu-popup`]: {
3277
- position: "absolute",
3278
- zIndex: n,
3279
- background: "transparent",
3280
- boxShadow: "none",
3281
- transformOrigin: "0 0",
3282
- "ul, li": {
3283
- listStyle: "none",
3284
- margin: 0
3285
- }
3286
- },
3287
- [`${t}, ${t}-menu-submenu`]: Object.assign(Object.assign({}, be(e)), {
3288
- [o]: Object.assign(Object.assign({
3289
- padding: f,
3290
- listStyleType: "none",
3291
- backgroundColor: u,
3292
- backgroundClip: "padding-box",
3293
- borderRadius: e.borderRadiusLG,
3294
- outline: "none",
3295
- boxShadow: e.boxShadowSecondary
3296
- }, st(e)), {
3297
- "&:empty": {
3298
- padding: 0,
3299
- boxShadow: "none"
3300
- },
3301
- [`${o}-item-group-title`]: {
3302
- padding: `${I(m)} ${I(g)}`,
3303
- color: e.colorTextDescription,
3304
- transition: `all ${c}`
3305
- },
3306
- // ======================= Item Content =======================
3307
- [`${o}-item`]: {
3308
- position: "relative",
3309
- display: "flex",
3310
- alignItems: "center"
3311
- },
3312
- [`${o}-item-icon`]: {
3313
- minWidth: d,
3314
- marginInlineEnd: e.marginXS,
3315
- fontSize: e.fontSizeSM
3316
- },
3317
- [`${o}-title-content`]: {
3318
- flex: "auto",
3319
- "&-with-extra": {
3320
- display: "inline-flex",
3321
- alignItems: "center",
3322
- width: "100%"
3323
- },
3324
- "> a": {
3325
- color: "inherit",
3326
- transition: `all ${c}`,
3327
- "&:hover": {
3328
- color: "inherit"
3329
- },
3330
- "&::after": {
3331
- position: "absolute",
3332
- inset: 0,
3333
- content: '""'
3334
- }
3335
- },
3336
- [`${o}-item-extra`]: {
3337
- paddingInlineStart: e.padding,
3338
- marginInlineStart: "auto",
3339
- fontSize: e.fontSizeSM,
3340
- color: e.colorTextDescription
3341
- }
3342
- },
3343
- // =========================== Item ===========================
3344
- [`${o}-item, ${o}-submenu-title`]: Object.assign(Object.assign({
3345
- display: "flex",
3346
- margin: 0,
3347
- padding: `${I(m)} ${I(g)}`,
3348
- color: e.colorText,
3349
- fontWeight: "normal",
3350
- fontSize: d,
3351
- lineHeight: e.lineHeight,
3352
- cursor: "pointer",
3353
- transition: `all ${c}`,
3354
- borderRadius: e.borderRadiusSM,
3355
- "&:hover, &-active": {
3356
- backgroundColor: e.controlItemBgHover
3357
- }
3358
- }, st(e)), {
3359
- "&-selected": {
3360
- color: e.colorPrimary,
3361
- backgroundColor: e.controlItemBgActive,
3362
- "&:hover, &-active": {
3363
- backgroundColor: e.controlItemBgActiveHover
3364
- }
3365
- },
3366
- "&-disabled": {
3367
- color: p,
3368
- cursor: "not-allowed",
3369
- "&:hover": {
3370
- color: p,
3371
- backgroundColor: u,
3372
- cursor: "not-allowed"
3373
- },
3374
- a: {
3375
- pointerEvents: "none"
3376
- }
3377
- },
3378
- "&-divider": {
3379
- height: 1,
3380
- // By design
3381
- margin: `${I(e.marginXXS)} 0`,
3382
- overflow: "hidden",
3383
- lineHeight: 0,
3384
- backgroundColor: e.colorSplit
3385
- },
3386
- [`${t}-menu-submenu-expand-icon`]: {
3387
- position: "absolute",
3388
- insetInlineEnd: e.paddingXS,
3389
- [`${t}-menu-submenu-arrow-icon`]: {
3390
- marginInlineEnd: "0 !important",
3391
- color: e.colorIcon,
3392
- fontSize: v,
3393
- fontStyle: "normal"
3394
- }
3395
- }
3396
- }),
3397
- [`${o}-item-group-list`]: {
3398
- margin: `0 ${I(e.marginXS)}`,
3399
- padding: 0,
3400
- listStyle: "none"
3401
- },
3402
- [`${o}-submenu-title`]: {
3403
- paddingInlineEnd: e.calc(g).add(e.fontSizeSM).equal()
3404
- },
3405
- [`${o}-submenu-vertical`]: {
3406
- position: "relative"
3407
- },
3408
- [`${o}-submenu${o}-submenu-disabled ${t}-menu-submenu-title`]: {
3409
- [`&, ${t}-menu-submenu-arrow-icon`]: {
3410
- color: p,
3411
- backgroundColor: u,
3412
- cursor: "not-allowed"
3413
- }
3414
- },
3415
- // https://github.com/ant-design/ant-design/issues/19264
3416
- [`${o}-submenu-selected ${t}-menu-submenu-title`]: {
3417
- color: e.colorPrimary
3418
- }
3419
- })
3420
- })
3421
- },
3422
- // Follow code may reuse in other components
3423
- [Oe(e, "slide-up"), Oe(e, "slide-down"), dt(e, "move-up"), dt(e, "move-down"), _e(e, "zoom-big")]
3424
- ];
3425
- }, ar = (e) => Object.assign(Object.assign({
3426
- zIndexPopup: e.zIndexPopupBase + 50,
3427
- paddingBlock: (e.controlHeight - e.fontSize * e.lineHeight) / 2
3428
- }, Re({
3429
- contentRadius: e.borderRadiusLG,
3430
- limitVerticalRadius: !0
3431
- })), Qe(e)), lr = de("Dropdown", (e) => {
3432
- const {
3433
- marginXXS: t,
3434
- sizePopupArrow: o,
3435
- paddingXXS: n,
3436
- componentCls: r
3437
- } = e, a = ce(e, {
3438
- menuCls: `${r}-menu`,
3439
- dropdownArrowDistance: e.calc(o).div(2).add(t).equal(),
3440
- dropdownEdgeChildPadding: n
3441
- });
3442
- return [ir(a), rr(a)];
3443
- }, ar, {
3444
- resetStyle: !1
3445
- }), ye = (e) => {
3446
- var t;
3447
- const {
3448
- menu: o,
3449
- arrow: n,
3450
- prefixCls: r,
3451
- children: a,
3452
- trigger: i,
3453
- disabled: s,
3454
- dropdownRender: c,
3455
- popupRender: m,
3456
- getPopupContainer: d,
3457
- overlayClassName: f,
3458
- rootClassName: p,
3459
- overlayStyle: v,
3460
- open: g,
3461
- onOpenChange: u,
3462
- // Deprecated
3463
- visible: h,
3464
- onVisibleChange: $,
3465
- mouseEnterDelay: b = 0.15,
3466
- mouseLeaveDelay: S = 0.1,
3467
- autoAdjustOverflow: N = !0,
3468
- placement: y = "",
3469
- overlay: M,
3470
- transitionName: j,
3471
- destroyOnHidden: T,
3472
- destroyPopupOnHide: O
3473
- } = e, {
3474
- getPopupContainer: E,
3475
- getPrefixCls: H,
3476
- direction: x,
3477
- dropdown: C
3478
- } = l.useContext(re), w = m || c, B = he("Dropdown");
3479
- process.env.NODE_ENV !== "production" && (Object.entries({
3480
- visible: "open",
3481
- onVisibleChange: "onOpenChange",
3482
- overlay: "menu",
3483
- dropdownRender: "popupRender",
3484
- destroyPopupOnHide: "destroyOnHidden"
3485
- }).forEach(([oe, De]) => {
3486
- B.deprecated(!(oe in e), oe, De);
3487
- }), y.includes("Center") && B.deprecated(!y.includes("Center"), `placement: ${y}`, `placement: ${y.slice(0, y.indexOf("Center"))}`));
3488
- const P = l.useMemo(() => {
3489
- const U = H();
3490
- return j !== void 0 ? j : y.includes("top") ? `${U}-slide-down` : `${U}-slide-up`;
3491
- }, [H, y, j]), L = l.useMemo(() => y ? y.includes("Center") ? y.slice(0, y.indexOf("Center")) : y : x === "rtl" ? "bottomRight" : "bottomLeft", [y, x]), z = H("dropdown", r), F = Te(z), [D, A, k] = lr(z, F), [, R] = Fe(), W = l.Children.only(Rn(a) ? /* @__PURE__ */ l.createElement("span", null, a) : a), G = ue(W, {
3492
- className: _(`${z}-trigger`, {
3493
- [`${z}-rtl`]: x === "rtl"
3494
- }, W.props.className),
3495
- disabled: (t = W.props.disabled) !== null && t !== void 0 ? t : s
3496
- }), q = s ? [] : i, Q = !!(q != null && q.includes("contextMenu")), [X, Z] = Ye(!1, {
3497
- value: g ?? h
3498
- }), J = St((U) => {
3499
- u == null || u(U, {
3500
- source: "trigger"
3501
- }), $ == null || $(U), Z(U);
3502
- }), V = _(f, p, A, k, F, C == null ? void 0 : C.className, {
3503
- [`${z}-rtl`]: x === "rtl"
3504
- }), Y = Tt({
3505
- arrowPointAtCenter: typeof n == "object" && n.pointAtCenter,
3506
- autoAdjustOverflow: N,
3507
- offset: R.marginXXS,
3508
- arrowWidth: n ? R.sizePopupArrow : 0,
3509
- borderRadius: R.borderRadius
3510
- }), ne = l.useCallback(() => {
3511
- o != null && o.selectable && (o != null && o.multiple) || (u == null || u(!1, {
3512
- source: "menu"
3513
- }), Z(!1));
3514
- }, [o == null ? void 0 : o.selectable, o == null ? void 0 : o.multiple]), ie = () => {
3515
- let U;
3516
- return o != null && o.items ? U = /* @__PURE__ */ l.createElement(fe, Object.assign({}, o)) : typeof M == "function" ? U = M() : U = M, w && (U = w(U)), U = l.Children.only(typeof U == "string" ? /* @__PURE__ */ l.createElement("span", null, U) : U), /* @__PURE__ */ l.createElement(Un, {
3517
- prefixCls: `${z}-menu`,
3518
- rootClassName: _(k, F),
3519
- expandIcon: /* @__PURE__ */ l.createElement("span", {
3520
- className: `${z}-menu-submenu-arrow`
3521
- }, x === "rtl" ? /* @__PURE__ */ l.createElement(Ee, {
3522
- className: `${z}-menu-submenu-arrow-icon`
3523
- }) : /* @__PURE__ */ l.createElement(Ie, {
3524
- className: `${z}-menu-submenu-arrow-icon`
3525
- })),
3526
- mode: "vertical",
3527
- selectable: !1,
3528
- onClick: ne,
3529
- validator: ({
3530
- mode: oe
3531
- }) => {
3532
- process.env.NODE_ENV !== "production" && B(!oe || oe === "vertical", "usage", `mode="${oe}" is not supported for Dropdown's Menu.`);
3533
- }
3534
- }, U);
3535
- }, [Ce, He] = qe("Dropdown", v == null ? void 0 : v.zIndex);
3536
- let le = /* @__PURE__ */ l.createElement(_o, Object.assign({
3537
- alignPoint: Q
3538
- }, $e(e, ["rootClassName"]), {
3539
- mouseEnterDelay: b,
3540
- mouseLeaveDelay: S,
3541
- visible: X,
3542
- builtinPlacements: Y,
3543
- arrow: !!n,
3544
- overlayClassName: V,
3545
- prefixCls: z,
3546
- getPopupContainer: d || E,
3547
- transitionName: P,
3548
- trigger: q,
3549
- overlay: ie,
3550
- placement: L,
3551
- onVisibleChange: J,
3552
- overlayStyle: Object.assign(Object.assign(Object.assign({}, C == null ? void 0 : C.style), v), {
3553
- zIndex: Ce
3554
- }),
3555
- autoDestroy: T ?? O
3556
- }), G);
3557
- return Ce && (le = /* @__PURE__ */ l.createElement(Pt.Provider, {
3558
- value: He
3559
- }, le)), D(le);
3560
- }, sr = Mo(ye, "align", void 0, "dropdown", (e) => e), cr = (e) => /* @__PURE__ */ l.createElement(sr, Object.assign({}, e), /* @__PURE__ */ l.createElement("span", null));
3561
- ye._InternalPanelDoNotUseOrYouWillBeFired = cr;
3562
- process.env.NODE_ENV !== "production" && (ye.displayName = "Dropdown");
3563
- function $t(e) {
3564
- return ["small", "middle", "large"].includes(e);
3565
- }
3566
- function yt(e) {
3567
- return e ? typeof e == "number" && !Number.isNaN(e) : !1;
3568
- }
3569
- const Ft = /* @__PURE__ */ Ct.createContext({
3570
- latestIndex: 0
3571
- }), dr = Ft.Provider, ur = ({
3572
- className: e,
3573
- index: t,
3574
- children: o,
3575
- split: n,
3576
- style: r
3577
- }) => {
3578
- const {
3579
- latestIndex: a
3580
- } = l.useContext(Ft);
3581
- return o == null ? null : /* @__PURE__ */ l.createElement(l.Fragment, null, /* @__PURE__ */ l.createElement("div", {
3582
- className: e,
3583
- style: r
3584
- }, o), t < a && n && /* @__PURE__ */ l.createElement("span", {
3585
- className: `${e}-split`
3586
- }, n));
3587
- };
3588
- var mr = function(e, t) {
3589
- var o = {};
3590
- for (var n in e) Object.prototype.hasOwnProperty.call(e, n) && t.indexOf(n) < 0 && (o[n] = e[n]);
3591
- if (e != null && typeof Object.getOwnPropertySymbols == "function") for (var r = 0, n = Object.getOwnPropertySymbols(e); r < n.length; r++)
3592
- t.indexOf(n[r]) < 0 && Object.prototype.propertyIsEnumerable.call(e, n[r]) && (o[n[r]] = e[n[r]]);
3593
- return o;
3594
- };
3595
- const pr = /* @__PURE__ */ l.forwardRef((e, t) => {
3596
- var o;
3597
- const {
3598
- getPrefixCls: n,
3599
- direction: r,
3600
- size: a,
3601
- className: i,
3602
- style: s,
3603
- classNames: c,
3604
- styles: m
3605
- } = Ge("space"), {
3606
- size: d = a ?? "small",
3607
- align: f,
3608
- className: p,
3609
- rootClassName: v,
3610
- children: g,
3611
- direction: u = "horizontal",
3612
- prefixCls: h,
3613
- split: $,
3614
- style: b,
3615
- wrap: S = !1,
3616
- classNames: N,
3617
- styles: y
3618
- } = e, M = mr(e, ["size", "align", "className", "rootClassName", "children", "direction", "prefixCls", "split", "style", "wrap", "classNames", "styles"]), [j, T] = Array.isArray(d) ? d : [d, d], O = $t(T), E = $t(j), H = yt(T), x = yt(j), C = Ue(g, {
3619
- keepEmpty: !0
3620
- }), w = f === void 0 && u === "horizontal" ? "center" : f, B = n("space", h), [P, L, z] = Ho(B), F = _(B, i, L, `${B}-${u}`, {
3621
- [`${B}-rtl`]: r === "rtl",
3622
- [`${B}-align-${w}`]: w,
3623
- [`${B}-gap-row-${T}`]: O,
3624
- [`${B}-gap-col-${j}`]: E
3625
- }, p, v, z), D = _(`${B}-item`, (o = N == null ? void 0 : N.item) !== null && o !== void 0 ? o : c.item);
3626
- let A = 0;
3627
- const k = C.map((G, q) => {
3628
- var Q;
3629
- G != null && (A = q);
3630
- const X = (G == null ? void 0 : G.key) || `${D}-${q}`;
3631
- return /* @__PURE__ */ l.createElement(ur, {
3632
- className: D,
3633
- key: X,
3634
- index: q,
3635
- split: $,
3636
- style: (Q = y == null ? void 0 : y.item) !== null && Q !== void 0 ? Q : m.item
3637
- }, G);
3638
- }), R = l.useMemo(() => ({
3639
- latestIndex: A
3640
- }), [A]);
3641
- if (C.length === 0)
3642
- return null;
3643
- const W = {};
3644
- return S && (W.flexWrap = "wrap"), !E && x && (W.columnGap = j), !O && H && (W.rowGap = T), P(/* @__PURE__ */ l.createElement("div", Object.assign({
3645
- ref: t,
3646
- className: F,
3647
- style: Object.assign(Object.assign(Object.assign({}, W), s), b)
3648
- }, M), /* @__PURE__ */ l.createElement(dr, {
3649
- value: R
3650
- }, k)));
3651
- }), ot = pr;
3652
- ot.Compact = Do;
3653
- process.env.NODE_ENV !== "production" && (ot.displayName = "Space");
3654
- var gr = function(e, t) {
3655
- var o = {};
3656
- for (var n in e) Object.prototype.hasOwnProperty.call(e, n) && t.indexOf(n) < 0 && (o[n] = e[n]);
3657
- if (e != null && typeof Object.getOwnPropertySymbols == "function") for (var r = 0, n = Object.getOwnPropertySymbols(e); r < n.length; r++)
3658
- t.indexOf(n[r]) < 0 && Object.prototype.propertyIsEnumerable.call(e, n[r]) && (o[n[r]] = e[n[r]]);
3659
- return o;
3660
- };
3661
- const Gt = (e) => {
3662
- const {
3663
- getPopupContainer: t,
3664
- getPrefixCls: o,
3665
- direction: n
3666
- } = l.useContext(re), {
3667
- prefixCls: r,
3668
- type: a = "default",
3669
- danger: i,
3670
- disabled: s,
3671
- loading: c,
3672
- onClick: m,
3673
- htmlType: d,
3674
- children: f,
3675
- className: p,
3676
- menu: v,
3677
- arrow: g,
3678
- autoFocus: u,
3679
- overlay: h,
3680
- trigger: $,
3681
- align: b,
3682
- open: S,
3683
- onOpenChange: N,
3684
- placement: y,
3685
- getPopupContainer: M,
3686
- href: j,
3687
- icon: T = /* @__PURE__ */ l.createElement(Ot, null),
3688
- title: O,
3689
- buttonsRender: E = (V) => V,
3690
- mouseEnterDelay: H,
3691
- mouseLeaveDelay: x,
3692
- overlayClassName: C,
3693
- overlayStyle: w,
3694
- destroyOnHidden: B,
3695
- destroyPopupOnHide: P,
3696
- dropdownRender: L,
3697
- popupRender: z
3698
- } = e, F = gr(e, ["prefixCls", "type", "danger", "disabled", "loading", "onClick", "htmlType", "children", "className", "menu", "arrow", "autoFocus", "overlay", "trigger", "align", "open", "onOpenChange", "placement", "getPopupContainer", "href", "icon", "title", "buttonsRender", "mouseEnterDelay", "mouseLeaveDelay", "overlayClassName", "overlayStyle", "destroyOnHidden", "destroyPopupOnHide", "dropdownRender", "popupRender"]), D = o("dropdown", r), A = `${D}-button`, R = {
3699
- menu: v,
3700
- arrow: g,
3701
- autoFocus: u,
3702
- align: b,
3703
- disabled: s,
3704
- trigger: s ? [] : $,
3705
- onOpenChange: N,
3706
- getPopupContainer: M || t,
3707
- mouseEnterDelay: H,
3708
- mouseLeaveDelay: x,
3709
- overlayClassName: C,
3710
- overlayStyle: w,
3711
- destroyOnHidden: B,
3712
- popupRender: z || L
3713
- }, {
3714
- compactSize: W,
3715
- compactItemClassnames: G
3716
- } = Ao(D, n), q = _(A, G, p);
3717
- "destroyPopupOnHide" in e && (R.destroyPopupOnHide = P), "overlay" in e && (R.overlay = h), "open" in e && (R.open = S), "placement" in e ? R.placement = y : R.placement = n === "rtl" ? "bottomLeft" : "bottomRight";
3718
- const Q = /* @__PURE__ */ l.createElement(ct, {
3719
- type: a,
3720
- danger: i,
3721
- disabled: s,
3722
- loading: c,
3723
- onClick: m,
3724
- htmlType: d,
3725
- href: j,
3726
- title: O
3727
- }, f), X = /* @__PURE__ */ l.createElement(ct, {
3728
- type: a,
3729
- danger: i,
3730
- icon: T
3731
- }), [Z, J] = E([Q, X]);
3732
- return /* @__PURE__ */ l.createElement(ot.Compact, Object.assign({
3733
- className: q,
3734
- size: W,
3735
- block: !0
3736
- }, F), Z, /* @__PURE__ */ l.createElement(ye, Object.assign({}, R), J));
3737
- };
3738
- Gt.__ANT_BUTTON = !0;
3739
- const Yt = ye;
3740
- Yt.Button = Gt;
3741
- const fr = (e) => /* @__PURE__ */ l.createElement("svg", { width: 24, height: 24, viewBox: "0 0 24 24", fill: "none", xmlns: "http://www.w3.org/2000/svg", ...e }, /* @__PURE__ */ l.createElement("path", { d: "M19 9L12 16L5 9", color: "currentColor", strokeWidth: 1.5, strokeLinecap: "round", strokeLinejoin: "round" })), vr = "_avatar_1f4cc_1", br = "_pointer_1f4cc_7", hr = "_flexRowCenter_1f4cc_11", $r = "_userTitle_1f4cc_18", Se = {
3742
- avatar: vr,
3743
- pointer: br,
3744
- flexRowCenter: hr,
3745
- userTitle: $r
3746
- }, Pr = ({ items: e, user: t, collapsed: o, handleMenuClick: n }) => /* @__PURE__ */ we(Yt, { menu: { items: e, onClick: n }, trigger: ["click"], children: /* @__PURE__ */ no("a", { onClick: (r) => r.preventDefault(), className: Se.flexRowCenter, children: [
3747
- /* @__PURE__ */ we(Dt, { className: ao(Se.avatar, Se.pointer), size: "large", children: t[0] }),
3748
- !o && /* @__PURE__ */ we("span", { className: Se.userTitle, children: t }),
3749
- !o && /* @__PURE__ */ we(fr, { color: "var(--color-primary)" })
3750
- ] }) });
3751
- export {
3752
- fe as M,
3753
- fr as S,
3754
- Pr as U
3755
- };