@amateescu/portal-ui-components 0.0.34 → 0.0.37-beta0

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