everest-npm-features 0.0.61 → 0.0.63

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 (247) hide show
  1. package/dist/ArrowBack-DEJjwfp0.js +8 -0
  2. package/dist/{Cancel-4lT7GZUA.js → Cancel-pHQsCjtK.js} +1 -1
  3. package/dist/{Close-CNwiMz_O.js → Close-DSxLLo08.js} +1 -1
  4. package/dist/{ContentCopy-coPwrEuz.js → ContentCopy-D0C0zbQj.js} +1 -1
  5. package/dist/{Delete-jpMstGIF.js → Delete-Bj8zmXnh.js} +1 -1
  6. package/dist/{ErrorOutline-CPQcnl2b.js → ErrorOutline-Bt7P4ChN.js} +1 -1
  7. package/dist/{FileDownload-Bt3R_NBr.js → FileDownload-DqREXR3D.js} +1 -1
  8. package/dist/{Info-BVeUSPyk.js → Info-DOoRR7sR.js} +1 -1
  9. package/dist/PlayArrow-71FP5PzJ.js +13 -0
  10. package/dist/Portal-BeS9yJCZ.js +968 -0
  11. package/dist/assets/styles.css +1 -1
  12. package/dist/{auth-Cwq6nfwY.js → auth-BBeOw4mt.js} +11 -11
  13. package/dist/{bank-C4pmTe--.js → bank-HVb0GFsa.js} +1 -1
  14. package/dist/components/RocketRamp/MinimalKyc/form.js +46 -51
  15. package/dist/components/RocketRamp/MinimalKyc/index.js +6 -6
  16. package/dist/components/RocketRamp/Player/Buy/cardPayment.js +6 -8
  17. package/dist/components/RocketRamp/Player/Buy/confirmTransaction.js +5 -8
  18. package/dist/components/RocketRamp/Player/Buy/form.js +8 -17
  19. package/dist/components/RocketRamp/Player/Buy/index.js +6 -6
  20. package/dist/components/RocketRamp/Player/Dashboard/balance.js +20 -26
  21. package/dist/components/RocketRamp/Player/Dashboard/index.js +4 -4
  22. package/dist/components/RocketRamp/Player/Dashboard/transaction.js +13 -16
  23. package/dist/components/RocketRamp/Player/Sell/confirmTransaction.js +6 -11
  24. package/dist/components/RocketRamp/Player/Sell/form.js +8 -17
  25. package/dist/components/RocketRamp/Player/Sell/index.js +14 -13
  26. package/dist/components/RocketRamp/Player/SignIn/index.js +23 -25
  27. package/dist/components/RocketRamp/Player/SignIn/loginForm.js +33 -35
  28. package/dist/components/RocketRamp/Player/SignIn/otpForm.js +31 -33
  29. package/dist/components/RocketRamp/Player/SignUp/email.js +21 -23
  30. package/dist/components/RocketRamp/Player/SignUp/index.js +49 -52
  31. package/dist/components/RocketRamp/Player/SignUp/personalInfo.js +68 -74
  32. package/dist/components/RocketRamp/Player/SignUp/summary.js +23 -25
  33. package/dist/components/RocketRamp/Player/SignUp/validateEmail.js +23 -25
  34. package/dist/components/RocketRamp/ResetPassword/index.js +23 -25
  35. package/dist/components/RocketRamp/Shared/Button/index.js +16 -17
  36. package/dist/components/RocketRamp/Shared/Input/index.js +27 -30
  37. package/dist/components/RocketRamp/Shared/backBtn.js +10 -11
  38. package/dist/components/RocketRamp/Shared/transactionItem.js +40 -45
  39. package/dist/components/RocketRamp/Store/Dashboard/balance.js +12 -17
  40. package/dist/components/RocketRamp/Store/Dashboard/index.js +11 -12
  41. package/dist/components/RocketRamp/Store/Dashboard/stats.js +12 -17
  42. package/dist/components/RocketRamp/Store/Dashboard/transaction.js +13 -16
  43. package/dist/components/RocketRamp/Store/SignUp/index.js +53 -56
  44. package/dist/components/RocketRamp/Store/SignUp/personalInfo.js +48 -54
  45. package/dist/components/RocketRamp/Store/SignUp/storeInfo.js +33 -37
  46. package/dist/components/RocketRamp/Store/SignUp/summary.js +21 -23
  47. package/dist/components/RocketRamp/Store/SignUp/validateEmail.js +23 -25
  48. package/dist/components/RocketRamp/Transactions/index.js +23 -24
  49. package/dist/components/Shared/FullKyc/countryList.js +15 -17
  50. package/dist/components/Shared/FullKyc/edd.js +51 -53
  51. package/dist/components/Shared/FullKyc/index.js +13 -11
  52. package/dist/components/Shared/FullKyc/pep.js +35 -43
  53. package/dist/components/Shared/FullKyc/personalDetails.js +6 -6
  54. package/dist/components/Shared/FullKyc/userInfo.js +8 -13
  55. package/dist/components/Shared/HistoryItem/index.js +43 -48
  56. package/dist/components/Shared/Incode/index.js +31 -35
  57. package/dist/components/Shared/MinimalKyc/index.js +60 -65
  58. package/dist/components/Shared/Sumsub/index.js +75 -62
  59. package/dist/components/Shared/loader.js +4 -5
  60. package/dist/components/Shared/tooltip.js +2 -2
  61. package/dist/components/Shared/transition.js +4 -4
  62. package/dist/components/Wallet/Account/createIban.d.ts +1 -2
  63. package/dist/components/Wallet/Account/createIban.js +324 -102
  64. package/dist/components/Wallet/Account/eWallet.js +37 -43
  65. package/dist/components/Wallet/Account/iban.d.ts +1 -0
  66. package/dist/components/Wallet/Account/iban.js +41 -45
  67. package/dist/components/Wallet/Account/ibanItem.js +70 -75
  68. package/dist/components/Wallet/Account/index.d.ts +1 -0
  69. package/dist/components/Wallet/Account/index.js +113 -118
  70. package/dist/components/Wallet/Account/sendIban.js +79 -88
  71. package/dist/components/Wallet/Buy/confirmTransaction.js +9 -11
  72. package/dist/components/Wallet/Buy/form.js +8 -18
  73. package/dist/components/Wallet/Buy/index.js +6 -6
  74. package/dist/components/Wallet/Deposit/index.js +16 -18
  75. package/dist/components/Wallet/EnterpriseKyc/edd.js +32 -33
  76. package/dist/components/Wallet/EnterpriseKyc/index.js +73 -77
  77. package/dist/components/Wallet/EnterpriseKyc/individualKyc.js +23 -26
  78. package/dist/components/Wallet/EnterpriseKyc/kybIntro.js +5 -7
  79. package/dist/components/Wallet/EnterpriseKyc/kybTerms.js +1 -1
  80. package/dist/components/Wallet/EnterpriseKyc/kycType.js +23 -26
  81. package/dist/components/Wallet/EnterpriseKyc/orgDetails.js +33 -34
  82. package/dist/components/Wallet/EnterpriseKyc/orgInfo.js +3591 -1482
  83. package/dist/components/Wallet/EnterpriseKyc/success.js +3 -4
  84. package/dist/components/Wallet/EnterpriseKyc/verify.js +22 -22
  85. package/dist/components/Wallet/History/index.js +23 -797
  86. package/dist/components/Wallet/Home/index.js +13 -14
  87. package/dist/components/Wallet/MoveToEthereumOrEverChain/index.js +122 -126
  88. package/dist/components/Wallet/Portfolio/dropdown.js +25 -30
  89. package/dist/components/Wallet/Portfolio/index.js +48 -51
  90. package/dist/components/Wallet/Portfolio/tokenRow.js +3 -4
  91. package/dist/components/Wallet/Profile/documents.js +164 -176
  92. package/dist/components/Wallet/Profile/index.js +39 -44
  93. package/dist/components/Wallet/Profile/storage.js +39 -47
  94. package/dist/components/Wallet/Receive/index.js +32 -37
  95. package/dist/components/Wallet/Sell/confirmTransaction.js +8 -10
  96. package/dist/components/Wallet/Sell/form.js +8 -18
  97. package/dist/components/Wallet/Sell/index.js +6 -6
  98. package/dist/components/Wallet/Send/index.js +98 -107
  99. package/dist/components/Wallet/Shared/Auth/emailForm.js +13 -15
  100. package/dist/components/Wallet/Shared/Auth/otpForm.js +9 -356
  101. package/dist/components/Wallet/Shared/BankSelect/index.js +45 -49
  102. package/dist/components/Wallet/Shared/CardCorp/index.js +18 -19
  103. package/dist/components/Wallet/Shared/CardPayment/index.js +14 -16
  104. package/dist/components/Wallet/Shared/ConnectWallet/index.js +22 -28
  105. package/dist/components/Wallet/Shared/Container/index.d.ts +2 -1
  106. package/dist/components/Wallet/Shared/Container/index.js +11 -11
  107. package/dist/components/Wallet/Shared/Input/index.js +3 -3
  108. package/dist/components/Wallet/Shared/Keyboard/keyboard.js +29 -30
  109. package/dist/components/Wallet/Shared/Order/paymentButton.js +13 -14
  110. package/dist/components/Wallet/Shared/TokenModal/index.js +55 -63
  111. package/dist/components/Wallet/Shared/TokenModal/tokenGrid.js +11 -13
  112. package/dist/components/Wallet/Shared/addBank.js +41 -45
  113. package/dist/components/Wallet/Shared/appButton.js +11 -15
  114. package/dist/components/Wallet/Shared/backBtn.js +8 -9
  115. package/dist/components/Wallet/Shared/button.js +7 -7
  116. package/dist/components/Wallet/Shared/connectPlaidBank.js +16 -17
  117. package/dist/components/Wallet/Shared/inputField.js +5 -5
  118. package/dist/components/Wallet/Shared/manualSend.js +9 -13
  119. package/dist/components/Wallet/Shared/noData.js +4 -5
  120. package/dist/components/Wallet/Shared/pin.js +25 -27
  121. package/dist/components/Wallet/Shared/radioButton.js +39 -5
  122. package/dist/components/Wallet/Shared/step.js +12 -13
  123. package/dist/components/Wallet/Shared/timer.js +1 -1
  124. package/dist/components/Wallet/SignIn/index.js +17 -17
  125. package/dist/components/Wallet/SignUp/index.js +63 -153
  126. package/dist/components/Wallet/SignUp/terms.js +1 -1
  127. package/dist/components/Wallet/Stake/gems/index.js +71 -69
  128. package/dist/components/Wallet/Stake/id/index.js +77 -84
  129. package/dist/components/Wallet/Stake/index.js +65 -68
  130. package/dist/components/Wallet/Swap/form.js +11 -20
  131. package/dist/components/Wallet/Swap/index.js +5 -5
  132. package/dist/components/Wallet/SwapAndUniSwap/index.js +3 -5
  133. package/dist/components/Wallet/Withdraw/bankSelect.js +41 -45
  134. package/dist/components/Wallet/Withdraw/confirmTransaction.js +5 -8
  135. package/dist/components/Wallet/Withdraw/form.js +6 -17
  136. package/dist/components/Wallet/Withdraw/index.js +5 -5
  137. package/dist/{constants-DrmtdI1J.js → constants-DX0YBtP2.js} +19 -19
  138. package/dist/{createSvgIcon-Cuzqm90l.js → createSvgIcon-B28GrUxG.js} +41 -45
  139. package/dist/{cryptoAssets-DyGDknvq.js → cryptoAssets-B8rAI7pp.js} +1 -1
  140. package/dist/hoc/withThemeProvider.js +5 -732
  141. package/dist/hooks/useDialog/index.js +22 -23
  142. package/dist/hooks/useRrDialog/index.js +43 -46
  143. package/dist/hooks/useSnackBar.js +24 -696
  144. package/dist/icons/buyIcon.js +1 -1
  145. package/dist/icons/canceledBuyIcon.js +1 -1
  146. package/dist/icons/canceledRedeemIcon.js +1 -1
  147. package/dist/icons/failedBuyIcon.js +2 -2
  148. package/dist/icons/failedRedeemIcon.js +2 -2
  149. package/dist/icons/pendingBuyIcon.js +1 -1
  150. package/dist/icons/pendingRedeemIcon.js +1 -1
  151. package/dist/icons/redeemIcon.js +1 -1
  152. package/dist/{index-BbVpeed7.js → index-B4XvACQN.js} +89 -98
  153. package/dist/{index-BHG1bT4t.js → index-CTPMPwYK.js} +173 -182
  154. package/dist/{index-Dh_ahu-u.js → index-DkiQ8pRO.js} +95 -106
  155. package/dist/{index-C7Td5yoW.js → index-DuWW5roi.js} +175 -184
  156. package/dist/{index-eEBuSKOo.js → index-JY6-UKlX.js} +127 -137
  157. package/dist/{index-D2JWUPz8.js → index-_fiTunwZ.js} +154 -163
  158. package/dist/{index-B9oucF3r.js → index-bK14vCZw.js} +189 -198
  159. package/dist/{kyc-ksV3vBP_.js → kyc-BNMPoeHt.js} +1 -1
  160. package/dist/main.js +7 -7
  161. package/dist/memoTheme-DnE8lj0t.js +3481 -0
  162. package/dist/{order-DEp_Lmar.js → order-BXeCIvqC.js} +1 -1
  163. package/dist/otpForm-DeeegaX2.js +7378 -0
  164. package/dist/{stake-Ct7-_aWW.js → stake-BO2TYVJ7.js} +1 -1
  165. package/dist/styles.module-DFoezEqS.js +28 -0
  166. package/dist/{tokenRow-C-iMHhPj.js → tokenRow-BiNtHOKV.js} +20 -21
  167. package/dist/tooltip-BW0UyWw7.js +2129 -0
  168. package/dist/util/constants.d.ts +1 -0
  169. package/dist/util/constants.js +72 -71
  170. package/dist/{wallet-CauUBXou.js → wallet-BPXOp8UG.js} +1 -1
  171. package/package.json +6 -6
  172. package/dist/Alert-DzsbFW3-.js +0 -369
  173. package/dist/Autocomplete-CE-OI2t8.js +0 -2429
  174. package/dist/Avatar-1XklXr4O.js +0 -281
  175. package/dist/Backdrop-CioURPVG.js +0 -359
  176. package/dist/Box-B0YSYLco.js +0 -59
  177. package/dist/Button-Df4vgU24.js +0 -663
  178. package/dist/ButtonBase-DLF5c6wi.js +0 -870
  179. package/dist/CardContent-D9wTdpu-.js +0 -141
  180. package/dist/CircularProgress-xZA3lvba.js +0 -252
  181. package/dist/Close-CxzDL3J-.js +0 -9
  182. package/dist/Container-urNKV7hm.js +0 -181
  183. package/dist/DefaultPropsProvider-CeF7UYM9.js +0 -92
  184. package/dist/DefaultPropsProvider-oAu9El-f.js +0 -226
  185. package/dist/DialogContent-BMwlOnbW.js +0 -567
  186. package/dist/DialogTitle-CfS0bb2K.js +0 -70
  187. package/dist/Divider-BShhMFf4.js +0 -297
  188. package/dist/FilledInput-DuNqnPjc.js +0 -1292
  189. package/dist/FormControl-RtZDQMdA.js +0 -258
  190. package/dist/FormControlLabel-BliKW48y.js +0 -519
  191. package/dist/GlobalStyles-ChMhDfTS.js +0 -59
  192. package/dist/Grid-CFe3amXO.js +0 -410
  193. package/dist/Grow-CnGtel3u.js +0 -196
  194. package/dist/HTMLElementType-BrQSV2FE.js +0 -13
  195. package/dist/IconButton-DHm-hucF.js +0 -297
  196. package/dist/InputAdornment-DMiED3JH.js +0 -173
  197. package/dist/Link-DBA9Yifs.js +0 -266
  198. package/dist/ListItemIcon-CUcyTEEm.js +0 -84
  199. package/dist/Menu-DLYFFrEk.js +0 -1239
  200. package/dist/MenuItem-DUdYOJr4.js +0 -271
  201. package/dist/Modal-CFIQ_s3T.js +0 -743
  202. package/dist/Paper-Bgt2WXI6.js +0 -186
  203. package/dist/PlayArrow-Bjz9LxhD.js +0 -13
  204. package/dist/Popper-BBAoiZKn.js +0 -1409
  205. package/dist/Portal-BMAxiQwe.js +0 -69
  206. package/dist/RadioGroup-nvoSN0JN.js +0 -189
  207. package/dist/Select-CB5yWmyn.js +0 -1886
  208. package/dist/Slide-B9Nw0LZ4.js +0 -235
  209. package/dist/Stack-k55YTxET.js +0 -172
  210. package/dist/SwitchBase-C8zFyg_x.js +0 -318
  211. package/dist/TextField-DPpRUQe3.js +0 -978
  212. package/dist/TransitionGroupContext-CYRQkQ6k.js +0 -49
  213. package/dist/Typography-pAaje37G.js +0 -260
  214. package/dist/chainPropTypes-D9lkm76m.js +0 -8
  215. package/dist/clsx-BTaloaeC.js +0 -264
  216. package/dist/createChainedFunction-C0nujS3O.js +0 -9
  217. package/dist/createSimplePaletteValueFilter-B7--0ryQ.js +0 -17
  218. package/dist/createTheme-CD19zQB7.js +0 -3825
  219. package/dist/debounce-46wSf_lW.js +0 -15
  220. package/dist/defaultTheme-C35y5cLB.js +0 -5
  221. package/dist/dividerClasses-BDxa2gAa.js +0 -10
  222. package/dist/elementAcceptingRef-CqLvP78G.js +0 -391
  223. package/dist/elementTypeAcceptingRef-BdsMpCbS.js +0 -23
  224. package/dist/emotion-react.browser.esm-BIrDfk-B.js +0 -246
  225. package/dist/exactProp-C1Lmtwf_.js +0 -13
  226. package/dist/extendSxProp-B8UjbJ56.js +0 -37
  227. package/dist/generateUtilityClasses-BRiE4Guh.js +0 -10
  228. package/dist/index-B0Z-Gjno.js +0 -22
  229. package/dist/index-DUcLo3x5.js +0 -43
  230. package/dist/isFocusVisible-CPZqtjv2.js +0 -12
  231. package/dist/isHostComponent-kiaBvYVo.js +0 -6
  232. package/dist/isMuiElement-DnSE4qG4.js +0 -13
  233. package/dist/memoTheme-yHaPezod.js +0 -15
  234. package/dist/ownerWindow-CRgpWY6I.js +0 -7
  235. package/dist/radioButton-CzlYB0Lh.js +0 -402
  236. package/dist/refType-BsTH3qnM.js +0 -56
  237. package/dist/styles.module-CHPRGltL.js +0 -28
  238. package/dist/tooltip-3UvETWtS.js +0 -740
  239. package/dist/useControlled-nm4pBabJ.js +0 -31
  240. package/dist/useEnhancedEffect-CJGo-L3B.js +0 -5
  241. package/dist/useFormControl-CatNKXAi.js +0 -10
  242. package/dist/useId-CK6Kn3Tn.js +0 -21
  243. package/dist/useSlot-CW7SOYlh.js +0 -125
  244. package/dist/useSlotProps-BfEOwJvJ.js +0 -25
  245. package/dist/useTheme-BQJ5lp0i.js +0 -11
  246. package/dist/useTheme-S5_DHFsQ.js +0 -17
  247. package/dist/useThemeProps-DN9MjdTl.js +0 -29
@@ -1,2429 +0,0 @@
1
- import * as h from "react";
2
- import { g as Ct, b as y, P as t, a as _ } from "./createTheme-CD19zQB7.js";
3
- import { c as de } from "./clsx-BTaloaeC.js";
4
- import { i as xt, o as At, A as Gt } from "./Select-CB5yWmyn.js";
5
- import { i as Oe, f as Me } from "./FilledInput-DuNqnPjc.js";
6
- import { C as Kt } from "./Close-CxzDL3J-.js";
7
- import { m as fe } from "./memoTheme-yHaPezod.js";
8
- import { g as $t } from "./generateUtilityClasses-BRiE4Guh.js";
9
- import { u as Ye } from "./useSlot-CW7SOYlh.js";
10
- import { jsx as D, jsxs as Xe } from "react/jsx-runtime";
11
- import { s as W, u as Ot, c as Pt } from "./DefaultPropsProvider-oAu9El-f.js";
12
- import { I as jt } from "./IconButton-DHm-hucF.js";
13
- import { P as Ht } from "./Popper-BBAoiZKn.js";
14
- import { P as Ut, i as _t } from "./Paper-Bgt2WXI6.js";
15
- import { u as qt } from "./useId-CK6Kn3Tn.js";
16
- import { u as It } from "./useControlled-nm4pBabJ.js";
17
- import { a as ct } from "./refType-BsTH3qnM.js";
18
- import { s as Jt } from "./Portal-BMAxiQwe.js";
19
- import { c as Xt } from "./createSvgIcon-Cuzqm90l.js";
20
- import { c as pt } from "./createSimplePaletteValueFilter-B7--0ryQ.js";
21
- import { u as Yt } from "./TransitionGroupContext-CYRQkQ6k.js";
22
- import { B as Rt } from "./ButtonBase-DLF5c6wi.js";
23
- import { c as Dt } from "./chainPropTypes-D9lkm76m.js";
24
- function Qt(e, r, l, s, b) {
25
- if (process.env.NODE_ENV === "production")
26
- return null;
27
- const P = b || r;
28
- return typeof e[r] < "u" ? new Error(`The prop \`${P}\` is not supported. Please remove it.`) : null;
29
- }
30
- const Zt = (e) => {
31
- const r = h.useRef({});
32
- return h.useEffect(() => {
33
- r.current = e;
34
- }), r.current;
35
- };
36
- function Nt(e) {
37
- return e.normalize("NFD").replace(/[\u0300-\u036f]/g, "");
38
- }
39
- function eo(e = {}) {
40
- const {
41
- ignoreAccents: r = !0,
42
- ignoreCase: l = !0,
43
- limit: s,
44
- matchFrom: b = "any",
45
- stringify: P,
46
- trim: $ = !1
47
- } = e;
48
- return (I, {
49
- inputValue: k,
50
- getOptionLabel: C
51
- }) => {
52
- let T = $ ? k.trim() : k;
53
- l && (T = T.toLowerCase()), r && (T = Nt(T));
54
- const N = T ? I.filter((le) => {
55
- let L = (P || C)(le);
56
- return l && (L = L.toLowerCase()), r && (L = Nt(L)), b === "start" ? L.startsWith(T) : L.includes(T);
57
- }) : I;
58
- return typeof s == "number" ? N.slice(0, s) : N;
59
- };
60
- }
61
- const to = eo(), Et = 5, oo = (e) => {
62
- var r;
63
- return e.current !== null && ((r = e.current.parentElement) == null ? void 0 : r.contains(document.activeElement));
64
- }, no = [];
65
- function Mt(e, r, l, s) {
66
- if (r || e == null || s)
67
- return "";
68
- const b = l(e);
69
- return typeof b == "string" ? b : "";
70
- }
71
- function ro(e) {
72
- const {
73
- // eslint-disable-next-line @typescript-eslint/naming-convention
74
- unstable_isActiveElementInListbox: r = oo,
75
- // eslint-disable-next-line @typescript-eslint/naming-convention
76
- unstable_classNamePrefix: l = "Mui",
77
- autoComplete: s = !1,
78
- autoHighlight: b = !1,
79
- autoSelect: P = !1,
80
- blurOnSelect: $ = !1,
81
- clearOnBlur: I = !e.freeSolo,
82
- clearOnEscape: k = !1,
83
- componentName: C = "useAutocomplete",
84
- defaultValue: T = e.multiple ? no : null,
85
- disableClearable: N = !1,
86
- disableCloseOnSelect: le = !1,
87
- disabled: L,
88
- disabledItemsFocusable: G = !1,
89
- disableListWrap: ge = !1,
90
- filterOptions: Ve = to,
91
- filterSelectedOptions: Pe = !1,
92
- freeSolo: ie = !1,
93
- getOptionDisabled: q,
94
- getOptionKey: Se,
95
- getOptionLabel: ze = (n) => n.label ?? n,
96
- groupBy: oe,
97
- handleHomeEndKeys: Fe = !e.freeSolo,
98
- id: Qe,
99
- includeInputInList: be = !1,
100
- inputValue: me,
101
- isOptionEqualToValue: J = (n, o) => n === o,
102
- multiple: g = !1,
103
- onChange: ye,
104
- onClose: he,
105
- onHighlightChange: se,
106
- onInputChange: M,
107
- onOpen: ke,
108
- open: je,
109
- openOnFocus: Te = !1,
110
- options: we,
111
- readOnly: X = !1,
112
- renderValue: V,
113
- selectOnFocus: He = !e.freeSolo,
114
- value: Le
115
- } = e, z = qt(Qe);
116
- let p = ze;
117
- p = (n) => {
118
- const o = ze(n);
119
- if (typeof o != "string") {
120
- if (process.env.NODE_ENV !== "production") {
121
- const a = o === void 0 ? "undefined" : `${typeof o} (${o})`;
122
- console.error(`MUI: The \`getOptionLabel\` method of ${C} returned ${a} instead of a string for ${JSON.stringify(n)}.`);
123
- }
124
- return String(o);
125
- }
126
- return o;
127
- };
128
- const j = h.useRef(!1), H = h.useRef(!0), S = h.useRef(null), Y = h.useRef(null), [Ue, St] = h.useState(null), [K, Ze] = h.useState(-1), dt = b ? 0 : -1, E = h.useRef(dt), kt = h.useRef(Mt(T ?? Le, g, p)).current, [c, Be] = It({
129
- controlled: Le,
130
- default: T,
131
- name: C
132
- }), [x, ve] = It({
133
- controlled: me,
134
- default: kt,
135
- name: C,
136
- state: "inputValue"
137
- }), [Ae, et] = h.useState(!1), Re = h.useCallback((n, o, a) => {
138
- if (!(g ? c.length < o.length : o !== null) && !I)
139
- return;
140
- const i = Mt(o, g, p, V);
141
- x !== i && (ve(i), M && M(n, i, a));
142
- }, [p, x, g, M, ve, I, c, V]), [ne, xe] = It({
143
- controlled: je,
144
- default: !1,
145
- name: C,
146
- state: "open"
147
- }), [Tt, De] = h.useState(!0), tt = !g && c != null && x === p(c), U = ne && !X, O = U ? Ve(
148
- we.filter((n) => !(Pe && (g ? c : [c]).some((o) => o !== null && J(n, o)))),
149
- // we use the empty string to manipulate `filterOptions` to not filter any options
150
- // i.e. the filter predicate always returns true
151
- {
152
- inputValue: tt && Tt ? "" : x,
153
- getOptionLabel: p
154
- }
155
- ) : [], Q = Zt({
156
- filteredOptions: O,
157
- value: c,
158
- inputValue: x
159
- });
160
- h.useEffect(() => {
161
- const n = c !== Q.value;
162
- Ae && !n || ie && !n || Re(null, c, "reset");
163
- }, [c, Re, Ae, Q.value, ie]);
164
- const ot = ne && O.length > 0 && !X, Z = ct((n) => {
165
- if (n === -1)
166
- S.current.focus();
167
- else {
168
- const o = V ? "data-item-index" : "data-tag-index";
169
- Ue.querySelector(`[${o}="${n}"]`).focus();
170
- }
171
- });
172
- h.useEffect(() => {
173
- g && K > c.length - 1 && (Ze(-1), Z(-1));
174
- }, [c, g, K, Z]);
175
- function ft(n, o) {
176
- if (!Y.current || n < 0 || n >= O.length)
177
- return -1;
178
- let a = n;
179
- for (; ; ) {
180
- const d = Y.current.querySelector(`[data-option-index="${a}"]`), i = G ? !1 : !d || d.disabled || d.getAttribute("aria-disabled") === "true";
181
- if (d && d.hasAttribute("tabindex") && !i)
182
- return a;
183
- if (o === "next" ? a = (a + 1) % O.length : a = (a - 1 + O.length) % O.length, a === n)
184
- return -1;
185
- }
186
- }
187
- const re = ct(({
188
- event: n,
189
- index: o,
190
- reason: a
191
- }) => {
192
- if (E.current = o, o === -1 ? S.current.removeAttribute("aria-activedescendant") : S.current.setAttribute("aria-activedescendant", `${z}-option-${o}`), se && ["mouse", "keyboard", "touch"].includes(a) && se(n, o === -1 ? null : O[o], a), !Y.current)
193
- return;
194
- const d = Y.current.querySelector(`[role="option"].${l}-focused`);
195
- d && (d.classList.remove(`${l}-focused`), d.classList.remove(`${l}-focusVisible`));
196
- let i = Y.current;
197
- if (Y.current.getAttribute("role") !== "listbox" && (i = Y.current.parentElement.querySelector('[role="listbox"]')), !i)
198
- return;
199
- if (o === -1) {
200
- i.scrollTop = 0;
201
- return;
202
- }
203
- const v = Y.current.querySelector(`[data-option-index="${o}"]`);
204
- if (v && (v.classList.add(`${l}-focused`), a === "keyboard" && v.classList.add(`${l}-focusVisible`), i.scrollHeight > i.clientHeight && a !== "mouse" && a !== "touch")) {
205
- const w = v, F = i.clientHeight + i.scrollTop, qe = w.offsetTop + w.offsetHeight;
206
- qe > F ? i.scrollTop = qe - i.clientHeight : w.offsetTop - w.offsetHeight * (oe ? 1.3 : 0) < i.scrollTop && (i.scrollTop = w.offsetTop - w.offsetHeight * (oe ? 1.3 : 0));
207
- }
208
- }), ee = ct(({
209
- event: n,
210
- diff: o,
211
- direction: a = "next",
212
- reason: d
213
- }) => {
214
- if (!U)
215
- return;
216
- const v = ft((() => {
217
- const w = O.length - 1;
218
- if (o === "reset")
219
- return dt;
220
- if (o === "start")
221
- return 0;
222
- if (o === "end")
223
- return w;
224
- const F = E.current + o;
225
- return F < 0 ? F === -1 && be ? -1 : ge && E.current !== -1 || Math.abs(o) > 1 ? 0 : w : F > w ? F === w + 1 && be ? -1 : ge || Math.abs(o) > 1 ? w : 0 : F;
226
- })(), a);
227
- if (re({
228
- index: v,
229
- reason: d,
230
- event: n
231
- }), s && o !== "reset")
232
- if (v === -1)
233
- S.current.value = x;
234
- else {
235
- const w = p(O[v]);
236
- S.current.value = w, w.toLowerCase().indexOf(x.toLowerCase()) === 0 && x.length > 0 && S.current.setSelectionRange(x.length, w.length);
237
- }
238
- }), gt = () => {
239
- const n = (o, a) => {
240
- const d = o ? p(o) : "", i = a ? p(a) : "";
241
- return d === i;
242
- };
243
- if (E.current !== -1 && Q.filteredOptions && Q.filteredOptions.length !== O.length && Q.inputValue === x && (g ? c.length === Q.value.length && Q.value.every((o, a) => p(c[a]) === p(o)) : n(Q.value, c))) {
244
- const o = Q.filteredOptions[E.current];
245
- if (o)
246
- return O.findIndex((a) => p(a) === p(o));
247
- }
248
- return -1;
249
- }, We = h.useCallback(() => {
250
- if (!U)
251
- return;
252
- const n = gt();
253
- if (n !== -1) {
254
- E.current = n;
255
- return;
256
- }
257
- const o = g ? c[0] : c;
258
- if (O.length === 0 || o == null) {
259
- ee({
260
- diff: "reset"
261
- });
262
- return;
263
- }
264
- if (Y.current) {
265
- if (o != null) {
266
- const a = O[E.current];
267
- if (g && a && c.findIndex((i) => J(a, i)) !== -1)
268
- return;
269
- const d = O.findIndex((i) => J(i, o));
270
- d === -1 ? ee({
271
- diff: "reset"
272
- }) : re({
273
- index: d
274
- });
275
- return;
276
- }
277
- if (E.current >= O.length - 1) {
278
- re({
279
- index: O.length - 1
280
- });
281
- return;
282
- }
283
- re({
284
- index: E.current
285
- });
286
- }
287
- }, [
288
- // Only sync the highlighted index when the option switch between empty and not
289
- O.length,
290
- // Don't sync the highlighted index with the value when multiple
291
- // eslint-disable-next-line react-hooks/exhaustive-deps
292
- g ? !1 : c,
293
- Pe,
294
- ee,
295
- re,
296
- U,
297
- x,
298
- g
299
- ]), bt = ct((n) => {
300
- Jt(Y, n), n && We();
301
- });
302
- process.env.NODE_ENV !== "production" && h.useEffect(() => {
303
- (!S.current || S.current.nodeName !== "INPUT") && (S.current && S.current.nodeName === "TEXTAREA" ? console.warn([`A textarea element was provided to ${C} where input was expected.`, "This is not a supported scenario but it may work under certain conditions.", "A textarea keyboard navigation may conflict with Autocomplete controls (for example enter and arrow keys).", "Make sure to test keyboard navigation and add custom event handlers if necessary."].join(`
304
- `)) : console.error([`MUI: Unable to find the input element. It was resolved to ${S.current} while an HTMLInputElement was expected.`, `Instead, ${C} expects an input element.`, "", C === "useAutocomplete" ? "Make sure you have bound getInputProps correctly and that the normal ref/effect resolutions order is guaranteed." : "Make sure you have customized the input component correctly."].join(`
305
- `)));
306
- }, [C]), h.useEffect(() => {
307
- We();
308
- }, [We]);
309
- const B = (n) => {
310
- ne || (xe(!0), De(!0), ke && ke(n));
311
- }, Ie = (n, o) => {
312
- ne && (xe(!1), he && he(n, o));
313
- }, ae = (n, o, a, d) => {
314
- if (g) {
315
- if (c.length === o.length && c.every((i, v) => i === o[v]))
316
- return;
317
- } else if (c === o)
318
- return;
319
- ye && ye(n, o, a, d), Be(o);
320
- }, Ne = h.useRef(!1), te = (n, o, a = "selectOption", d = "options") => {
321
- let i = a, v = o;
322
- if (g) {
323
- if (v = Array.isArray(c) ? c.slice() : [], process.env.NODE_ENV !== "production") {
324
- const F = v.filter((qe) => J(o, qe));
325
- F.length > 1 && console.error([`MUI: The \`isOptionEqualToValue\` method of ${C} does not handle the arguments correctly.`, `The component expects a single value to match a given option but found ${F.length} matches.`].join(`
326
- `));
327
- }
328
- const w = v.findIndex((F) => J(o, F));
329
- w === -1 ? v.push(o) : d !== "freeSolo" && (v.splice(w, 1), i = "removeOption");
330
- }
331
- Re(n, v, i), ae(n, v, i, {
332
- option: o
333
- }), !le && (!n || !n.ctrlKey && !n.metaKey) && Ie(n, i), ($ === !0 || $ === "touch" && Ne.current || $ === "mouse" && !Ne.current) && S.current.blur();
334
- };
335
- function nt(n, o) {
336
- if (n === -1)
337
- return -1;
338
- let a = n;
339
- for (; ; ) {
340
- if (o === "next" && a === c.length || o === "previous" && a === -1)
341
- return -1;
342
- const d = V ? "data-item-index" : "data-tag-index", i = Ue.querySelector(`[${d}="${a}"]`);
343
- if (!i || !i.hasAttribute("tabindex") || i.disabled || i.getAttribute("aria-disabled") === "true")
344
- a += o === "next" ? 1 : -1;
345
- else
346
- return a;
347
- }
348
- }
349
- const rt = (n, o) => {
350
- if (!g)
351
- return;
352
- x === "" && Ie(n, "toggleInput");
353
- let a = K;
354
- K === -1 ? x === "" && o === "previous" && (a = c.length - 1) : (a += o === "next" ? 1 : -1, a < 0 && (a = 0), a === c.length && (a = -1)), a = nt(a, o), Ze(a), Z(a);
355
- }, Ce = (n) => {
356
- j.current = !0, ve(""), M && M(n, "", "clear"), ae(n, g ? [] : null, "clear");
357
- }, mt = (n) => (o) => {
358
- if (n.onKeyDown && n.onKeyDown(o), !o.defaultMuiPrevented && (K !== -1 && !["ArrowLeft", "ArrowRight"].includes(o.key) && (Ze(-1), Z(-1)), o.which !== 229))
359
- switch (o.key) {
360
- case "Home":
361
- U && Fe && (o.preventDefault(), ee({
362
- diff: "start",
363
- direction: "next",
364
- reason: "keyboard",
365
- event: o
366
- }));
367
- break;
368
- case "End":
369
- U && Fe && (o.preventDefault(), ee({
370
- diff: "end",
371
- direction: "previous",
372
- reason: "keyboard",
373
- event: o
374
- }));
375
- break;
376
- case "PageUp":
377
- o.preventDefault(), ee({
378
- diff: -Et,
379
- direction: "previous",
380
- reason: "keyboard",
381
- event: o
382
- }), B(o);
383
- break;
384
- case "PageDown":
385
- o.preventDefault(), ee({
386
- diff: Et,
387
- direction: "next",
388
- reason: "keyboard",
389
- event: o
390
- }), B(o);
391
- break;
392
- case "ArrowDown":
393
- o.preventDefault(), ee({
394
- diff: 1,
395
- direction: "next",
396
- reason: "keyboard",
397
- event: o
398
- }), B(o);
399
- break;
400
- case "ArrowUp":
401
- o.preventDefault(), ee({
402
- diff: -1,
403
- direction: "previous",
404
- reason: "keyboard",
405
- event: o
406
- }), B(o);
407
- break;
408
- case "ArrowLeft":
409
- !g && V ? Z(0) : rt(o, "previous");
410
- break;
411
- case "ArrowRight":
412
- !g && V ? Z(-1) : rt(o, "next");
413
- break;
414
- case "Enter":
415
- if (E.current !== -1 && U) {
416
- const a = O[E.current], d = q ? q(a) : !1;
417
- if (o.preventDefault(), d)
418
- return;
419
- te(o, a, "selectOption"), s && S.current.setSelectionRange(S.current.value.length, S.current.value.length);
420
- } else ie && x !== "" && tt === !1 && (g && o.preventDefault(), te(o, x, "createOption", "freeSolo"));
421
- break;
422
- case "Escape":
423
- U ? (o.preventDefault(), o.stopPropagation(), Ie(o, "escape")) : k && (x !== "" || g && c.length > 0 || V) && (o.preventDefault(), o.stopPropagation(), Ce(o));
424
- break;
425
- case "Backspace":
426
- if (g && !X && x === "" && c.length > 0) {
427
- const a = K === -1 ? c.length - 1 : K, d = c.slice();
428
- d.splice(a, 1), ae(o, d, "removeOption", {
429
- option: c[a]
430
- });
431
- }
432
- !g && V && !X && (Be(null), Z(-1));
433
- break;
434
- case "Delete":
435
- if (g && !X && x === "" && c.length > 0 && K !== -1) {
436
- const a = K, d = c.slice();
437
- d.splice(a, 1), ae(o, d, "removeOption", {
438
- option: c[a]
439
- });
440
- }
441
- !g && V && !X && (Be(null), Z(-1));
442
- break;
443
- }
444
- }, yt = (n) => {
445
- et(!0), Te && !j.current && B(n);
446
- }, $e = (n) => {
447
- if (r(Y)) {
448
- S.current.focus();
449
- return;
450
- }
451
- et(!1), H.current = !0, j.current = !1, P && E.current !== -1 && U ? te(n, O[E.current], "blur") : P && ie && x !== "" ? te(n, x, "blur", "freeSolo") : I && Re(n, c, "blur"), Ie(n, "blur");
452
- }, Ge = (n) => {
453
- const o = n.target.value;
454
- x !== o && (ve(o), De(!1), M && M(n, o, "input")), o === "" ? !N && !g && ae(n, null, "clear") : B(n);
455
- }, Ke = (n) => {
456
- const o = Number(n.currentTarget.getAttribute("data-option-index"));
457
- E.current !== o && re({
458
- event: n,
459
- index: o,
460
- reason: "mouse"
461
- });
462
- }, ht = (n) => {
463
- re({
464
- event: n,
465
- index: Number(n.currentTarget.getAttribute("data-option-index")),
466
- reason: "touch"
467
- }), Ne.current = !0;
468
- }, vt = (n) => {
469
- const o = Number(n.currentTarget.getAttribute("data-option-index"));
470
- te(n, O[o], "selectOption"), Ne.current = !1;
471
- }, at = (n) => (o) => {
472
- const a = c.slice();
473
- a.splice(n, 1), ae(o, a, "removeOption", {
474
- option: c[n]
475
- });
476
- }, wt = (n) => {
477
- ae(n, null, "removeOption", {
478
- option: c
479
- });
480
- }, Ee = (n) => {
481
- ne ? Ie(n, "toggleInput") : B(n);
482
- }, A = (n) => {
483
- n.currentTarget.contains(n.target) && n.target.getAttribute("id") !== z && n.preventDefault();
484
- }, R = (n) => {
485
- n.currentTarget.contains(n.target) && (S.current.focus(), He && H.current && S.current.selectionEnd - S.current.selectionStart === 0 && S.current.select(), H.current = !1);
486
- }, ce = (n) => {
487
- !L && (x === "" || !ne) && Ee(n);
488
- };
489
- let _e = ie && x.length > 0;
490
- _e = _e || (g ? c.length > 0 : c !== null);
491
- let lt = O;
492
- if (oe) {
493
- const n = /* @__PURE__ */ new Map();
494
- let o = !1;
495
- lt = O.reduce((a, d, i) => {
496
- const v = oe(d);
497
- return a.length > 0 && a[a.length - 1].group === v ? a[a.length - 1].options.push(d) : (process.env.NODE_ENV !== "production" && (n.get(v) && !o && (console.warn(`MUI: The options provided combined with the \`groupBy\` method of ${C} returns duplicated headers.`, "You can solve the issue by sorting the options with the output of `groupBy`."), o = !0), n.set(v, !0)), a.push({
498
- key: i,
499
- index: i,
500
- group: v,
501
- options: [d]
502
- })), a;
503
- }, []);
504
- }
505
- return L && Ae && $e(), {
506
- getRootProps: (n = {}) => ({
507
- ...n,
508
- onKeyDown: mt(n),
509
- onMouseDown: A,
510
- onClick: R
511
- }),
512
- getInputLabelProps: () => ({
513
- id: `${z}-label`,
514
- htmlFor: z
515
- }),
516
- getInputProps: () => ({
517
- id: z,
518
- value: x,
519
- onBlur: $e,
520
- onFocus: yt,
521
- onChange: Ge,
522
- onMouseDown: ce,
523
- // if open then this is handled imperatively so don't let react override
524
- // only have an opinion about this when closed
525
- "aria-activedescendant": U ? "" : null,
526
- "aria-autocomplete": s ? "both" : "list",
527
- "aria-controls": ot ? `${z}-listbox` : void 0,
528
- "aria-expanded": ot,
529
- // Disable browser's suggestion that might overlap with the popup.
530
- // Handle autocomplete but not autofill.
531
- autoComplete: "off",
532
- ref: S,
533
- autoCapitalize: "none",
534
- spellCheck: "false",
535
- role: "combobox",
536
- disabled: L
537
- }),
538
- getClearProps: () => ({
539
- tabIndex: -1,
540
- type: "button",
541
- onClick: Ce
542
- }),
543
- getItemProps: ({
544
- index: n = 0
545
- } = {}) => ({
546
- ...g && {
547
- key: n
548
- },
549
- ...V ? {
550
- "data-item-index": n
551
- } : {
552
- "data-tag-index": n
553
- },
554
- tabIndex: -1,
555
- ...!X && {
556
- onDelete: g ? at(n) : wt
557
- }
558
- }),
559
- getPopupIndicatorProps: () => ({
560
- tabIndex: -1,
561
- type: "button",
562
- onClick: Ee
563
- }),
564
- // deprecated
565
- getTagProps: ({
566
- index: n
567
- }) => ({
568
- key: n,
569
- "data-tag-index": n,
570
- tabIndex: -1,
571
- ...!X && {
572
- onDelete: at(n)
573
- }
574
- }),
575
- getListboxProps: () => ({
576
- role: "listbox",
577
- id: `${z}-listbox`,
578
- "aria-labelledby": `${z}-label`,
579
- ref: bt,
580
- onMouseDown: (n) => {
581
- n.preventDefault();
582
- }
583
- }),
584
- getOptionProps: ({
585
- index: n,
586
- option: o
587
- }) => {
588
- const a = (g ? c : [c]).some((i) => i != null && J(o, i)), d = q ? q(o) : !1;
589
- return {
590
- key: (Se == null ? void 0 : Se(o)) ?? p(o),
591
- tabIndex: -1,
592
- role: "option",
593
- id: `${z}-option-${n}`,
594
- onMouseMove: Ke,
595
- onClick: vt,
596
- onTouchStart: ht,
597
- "data-option-index": n,
598
- "aria-disabled": d,
599
- "aria-selected": a
600
- };
601
- },
602
- id: z,
603
- inputValue: x,
604
- value: c,
605
- dirty: _e,
606
- expanded: U && Ue,
607
- popupOpen: U,
608
- focused: Ae || K !== -1,
609
- anchorEl: Ue,
610
- setAnchorEl: St,
611
- focusedItem: K,
612
- // deprecated
613
- focusedTag: K,
614
- groupedOptions: lt
615
- };
616
- }
617
- function ao(e) {
618
- return Ct("MuiListSubheader", e);
619
- }
620
- $t("MuiListSubheader", ["root", "colorPrimary", "colorInherit", "gutters", "inset", "sticky"]);
621
- const lo = (e) => {
622
- const {
623
- classes: r,
624
- color: l,
625
- disableGutters: s,
626
- inset: b,
627
- disableSticky: P
628
- } = e, $ = {
629
- root: ["root", l !== "default" && `color${y(l)}`, !s && "gutters", b && "inset", !P && "sticky"]
630
- };
631
- return Pt($, ao, r);
632
- }, io = W("li", {
633
- name: "MuiListSubheader",
634
- slot: "Root",
635
- overridesResolver: (e, r) => {
636
- const {
637
- ownerState: l
638
- } = e;
639
- return [r.root, l.color !== "default" && r[`color${y(l.color)}`], !l.disableGutters && r.gutters, l.inset && r.inset, !l.disableSticky && r.sticky];
640
- }
641
- })(fe(({
642
- theme: e
643
- }) => ({
644
- boxSizing: "border-box",
645
- lineHeight: "48px",
646
- listStyle: "none",
647
- color: (e.vars || e).palette.text.secondary,
648
- fontFamily: e.typography.fontFamily,
649
- fontWeight: e.typography.fontWeightMedium,
650
- fontSize: e.typography.pxToRem(14),
651
- variants: [{
652
- props: {
653
- color: "primary"
654
- },
655
- style: {
656
- color: (e.vars || e).palette.primary.main
657
- }
658
- }, {
659
- props: {
660
- color: "inherit"
661
- },
662
- style: {
663
- color: "inherit"
664
- }
665
- }, {
666
- props: ({
667
- ownerState: r
668
- }) => !r.disableGutters,
669
- style: {
670
- paddingLeft: 16,
671
- paddingRight: 16
672
- }
673
- }, {
674
- props: ({
675
- ownerState: r
676
- }) => r.inset,
677
- style: {
678
- paddingLeft: 72
679
- }
680
- }, {
681
- props: ({
682
- ownerState: r
683
- }) => !r.disableSticky,
684
- style: {
685
- position: "sticky",
686
- top: 0,
687
- zIndex: 1,
688
- backgroundColor: (e.vars || e).palette.background.paper
689
- }
690
- }]
691
- }))), ut = /* @__PURE__ */ h.forwardRef(function(r, l) {
692
- const s = Ot({
693
- props: r,
694
- name: "MuiListSubheader"
695
- }), {
696
- className: b,
697
- color: P = "default",
698
- component: $ = "li",
699
- disableGutters: I = !1,
700
- disableSticky: k = !1,
701
- inset: C = !1,
702
- ...T
703
- } = s, N = {
704
- ...s,
705
- color: P,
706
- component: $,
707
- disableGutters: I,
708
- disableSticky: k,
709
- inset: C
710
- }, le = lo(N);
711
- return /* @__PURE__ */ D(io, {
712
- as: $,
713
- className: de(le.root, b),
714
- ref: l,
715
- ownerState: N,
716
- ...T
717
- });
718
- });
719
- ut && (ut.muiSkipListHighlight = !0);
720
- process.env.NODE_ENV !== "production" && (ut.propTypes = {
721
- // ┌────────────────────────────── Warning ──────────────────────────────┐
722
- // │ These PropTypes are generated from the TypeScript type definitions. │
723
- // │ To update them, edit the d.ts file and run `pnpm proptypes`. │
724
- // └─────────────────────────────────────────────────────────────────────┘
725
- /**
726
- * The content of the component.
727
- */
728
- children: t.node,
729
- /**
730
- * Override or extend the styles applied to the component.
731
- */
732
- classes: t.object,
733
- /**
734
- * @ignore
735
- */
736
- className: t.string,
737
- /**
738
- * The color of the component. It supports those theme colors that make sense for this component.
739
- * @default 'default'
740
- */
741
- color: t.oneOf(["default", "inherit", "primary"]),
742
- /**
743
- * The component used for the root node.
744
- * Either a string to use a HTML element or a component.
745
- */
746
- component: t.elementType,
747
- /**
748
- * If `true`, the List Subheader will not have gutters.
749
- * @default false
750
- */
751
- disableGutters: t.bool,
752
- /**
753
- * If `true`, the List Subheader will not stick to the top during scroll.
754
- * @default false
755
- */
756
- disableSticky: t.bool,
757
- /**
758
- * If `true`, the List Subheader is indented.
759
- * @default false
760
- */
761
- inset: t.bool,
762
- /**
763
- * The system prop that allows defining system overrides as well as additional CSS styles.
764
- */
765
- sx: t.oneOfType([t.arrayOf(t.oneOfType([t.func, t.object, t.bool])), t.func, t.object])
766
- });
767
- const so = Xt(/* @__PURE__ */ D("path", {
768
- d: "M12 2C6.47 2 2 6.47 2 12s4.47 10 10 10 10-4.47 10-10S17.53 2 12 2zm5 13.59L15.59 17 12 13.41 8.41 17 7 15.59 10.59 12 7 8.41 8.41 7 12 10.59 15.59 7 17 8.41 13.41 12 17 15.59z"
769
- }), "Cancel");
770
- function co(e) {
771
- return Ct("MuiChip", e);
772
- }
773
- const f = $t("MuiChip", ["root", "sizeSmall", "sizeMedium", "colorDefault", "colorError", "colorInfo", "colorPrimary", "colorSecondary", "colorSuccess", "colorWarning", "disabled", "clickable", "clickableColorPrimary", "clickableColorSecondary", "deletable", "deletableColorPrimary", "deletableColorSecondary", "outlined", "filled", "outlinedPrimary", "outlinedSecondary", "filledPrimary", "filledSecondary", "avatar", "avatarSmall", "avatarMedium", "avatarColorPrimary", "avatarColorSecondary", "icon", "iconSmall", "iconMedium", "iconColorPrimary", "iconColorSecondary", "label", "labelSmall", "labelMedium", "deleteIcon", "deleteIconSmall", "deleteIconMedium", "deleteIconColorPrimary", "deleteIconColorSecondary", "deleteIconOutlinedColorPrimary", "deleteIconOutlinedColorSecondary", "deleteIconFilledColorPrimary", "deleteIconFilledColorSecondary", "focusVisible"]), po = (e) => {
774
- const {
775
- classes: r,
776
- disabled: l,
777
- size: s,
778
- color: b,
779
- iconColor: P,
780
- onDelete: $,
781
- clickable: I,
782
- variant: k
783
- } = e, C = {
784
- root: ["root", k, l && "disabled", `size${y(s)}`, `color${y(b)}`, I && "clickable", I && `clickableColor${y(b)}`, $ && "deletable", $ && `deletableColor${y(b)}`, `${k}${y(b)}`],
785
- label: ["label", `label${y(s)}`],
786
- avatar: ["avatar", `avatar${y(s)}`, `avatarColor${y(b)}`],
787
- icon: ["icon", `icon${y(s)}`, `iconColor${y(P)}`],
788
- deleteIcon: ["deleteIcon", `deleteIcon${y(s)}`, `deleteIconColor${y(b)}`, `deleteIcon${y(k)}Color${y(b)}`]
789
- };
790
- return Pt(C, co, r);
791
- }, uo = W("div", {
792
- name: "MuiChip",
793
- slot: "Root",
794
- overridesResolver: (e, r) => {
795
- const {
796
- ownerState: l
797
- } = e, {
798
- color: s,
799
- iconColor: b,
800
- clickable: P,
801
- onDelete: $,
802
- size: I,
803
- variant: k
804
- } = l;
805
- return [{
806
- [`& .${f.avatar}`]: r.avatar
807
- }, {
808
- [`& .${f.avatar}`]: r[`avatar${y(I)}`]
809
- }, {
810
- [`& .${f.avatar}`]: r[`avatarColor${y(s)}`]
811
- }, {
812
- [`& .${f.icon}`]: r.icon
813
- }, {
814
- [`& .${f.icon}`]: r[`icon${y(I)}`]
815
- }, {
816
- [`& .${f.icon}`]: r[`iconColor${y(b)}`]
817
- }, {
818
- [`& .${f.deleteIcon}`]: r.deleteIcon
819
- }, {
820
- [`& .${f.deleteIcon}`]: r[`deleteIcon${y(I)}`]
821
- }, {
822
- [`& .${f.deleteIcon}`]: r[`deleteIconColor${y(s)}`]
823
- }, {
824
- [`& .${f.deleteIcon}`]: r[`deleteIcon${y(k)}Color${y(s)}`]
825
- }, r.root, r[`size${y(I)}`], r[`color${y(s)}`], P && r.clickable, P && s !== "default" && r[`clickableColor${y(s)})`], $ && r.deletable, $ && s !== "default" && r[`deletableColor${y(s)}`], r[k], r[`${k}${y(s)}`]];
826
- }
827
- })(fe(({
828
- theme: e
829
- }) => {
830
- const r = e.palette.mode === "light" ? e.palette.grey[700] : e.palette.grey[300];
831
- return {
832
- maxWidth: "100%",
833
- fontFamily: e.typography.fontFamily,
834
- fontSize: e.typography.pxToRem(13),
835
- display: "inline-flex",
836
- alignItems: "center",
837
- justifyContent: "center",
838
- height: 32,
839
- lineHeight: 1.5,
840
- color: (e.vars || e).palette.text.primary,
841
- backgroundColor: (e.vars || e).palette.action.selected,
842
- borderRadius: 32 / 2,
843
- whiteSpace: "nowrap",
844
- transition: e.transitions.create(["background-color", "box-shadow"]),
845
- // reset cursor explicitly in case ButtonBase is used
846
- cursor: "unset",
847
- // We disable the focus ring for mouse, touch and keyboard users.
848
- outline: 0,
849
- textDecoration: "none",
850
- border: 0,
851
- // Remove `button` border
852
- padding: 0,
853
- // Remove `button` padding
854
- verticalAlign: "middle",
855
- boxSizing: "border-box",
856
- [`&.${f.disabled}`]: {
857
- opacity: (e.vars || e).palette.action.disabledOpacity,
858
- pointerEvents: "none"
859
- },
860
- [`& .${f.avatar}`]: {
861
- marginLeft: 5,
862
- marginRight: -6,
863
- width: 24,
864
- height: 24,
865
- color: e.vars ? e.vars.palette.Chip.defaultAvatarColor : r,
866
- fontSize: e.typography.pxToRem(12)
867
- },
868
- [`& .${f.avatarColorPrimary}`]: {
869
- color: (e.vars || e).palette.primary.contrastText,
870
- backgroundColor: (e.vars || e).palette.primary.dark
871
- },
872
- [`& .${f.avatarColorSecondary}`]: {
873
- color: (e.vars || e).palette.secondary.contrastText,
874
- backgroundColor: (e.vars || e).palette.secondary.dark
875
- },
876
- [`& .${f.avatarSmall}`]: {
877
- marginLeft: 4,
878
- marginRight: -4,
879
- width: 18,
880
- height: 18,
881
- fontSize: e.typography.pxToRem(10)
882
- },
883
- [`& .${f.icon}`]: {
884
- marginLeft: 5,
885
- marginRight: -6
886
- },
887
- [`& .${f.deleteIcon}`]: {
888
- WebkitTapHighlightColor: "transparent",
889
- color: e.vars ? `rgba(${e.vars.palette.text.primaryChannel} / 0.26)` : _(e.palette.text.primary, 0.26),
890
- fontSize: 22,
891
- cursor: "pointer",
892
- margin: "0 5px 0 -6px",
893
- "&:hover": {
894
- color: e.vars ? `rgba(${e.vars.palette.text.primaryChannel} / 0.4)` : _(e.palette.text.primary, 0.4)
895
- }
896
- },
897
- variants: [{
898
- props: {
899
- size: "small"
900
- },
901
- style: {
902
- height: 24,
903
- [`& .${f.icon}`]: {
904
- fontSize: 18,
905
- marginLeft: 4,
906
- marginRight: -4
907
- },
908
- [`& .${f.deleteIcon}`]: {
909
- fontSize: 16,
910
- marginRight: 4,
911
- marginLeft: -4
912
- }
913
- }
914
- }, ...Object.entries(e.palette).filter(pt(["contrastText"])).map(([l]) => ({
915
- props: {
916
- color: l
917
- },
918
- style: {
919
- backgroundColor: (e.vars || e).palette[l].main,
920
- color: (e.vars || e).palette[l].contrastText,
921
- [`& .${f.deleteIcon}`]: {
922
- color: e.vars ? `rgba(${e.vars.palette[l].contrastTextChannel} / 0.7)` : _(e.palette[l].contrastText, 0.7),
923
- "&:hover, &:active": {
924
- color: (e.vars || e).palette[l].contrastText
925
- }
926
- }
927
- }
928
- })), {
929
- props: (l) => l.iconColor === l.color,
930
- style: {
931
- [`& .${f.icon}`]: {
932
- color: e.vars ? e.vars.palette.Chip.defaultIconColor : r
933
- }
934
- }
935
- }, {
936
- props: (l) => l.iconColor === l.color && l.color !== "default",
937
- style: {
938
- [`& .${f.icon}`]: {
939
- color: "inherit"
940
- }
941
- }
942
- }, {
943
- props: {
944
- onDelete: !0
945
- },
946
- style: {
947
- [`&.${f.focusVisible}`]: {
948
- backgroundColor: e.vars ? `rgba(${e.vars.palette.action.selectedChannel} / calc(${e.vars.palette.action.selectedOpacity} + ${e.vars.palette.action.focusOpacity}))` : _(e.palette.action.selected, e.palette.action.selectedOpacity + e.palette.action.focusOpacity)
949
- }
950
- }
951
- }, ...Object.entries(e.palette).filter(pt(["dark"])).map(([l]) => ({
952
- props: {
953
- color: l,
954
- onDelete: !0
955
- },
956
- style: {
957
- [`&.${f.focusVisible}`]: {
958
- background: (e.vars || e).palette[l].dark
959
- }
960
- }
961
- })), {
962
- props: {
963
- clickable: !0
964
- },
965
- style: {
966
- userSelect: "none",
967
- WebkitTapHighlightColor: "transparent",
968
- cursor: "pointer",
969
- "&:hover": {
970
- backgroundColor: e.vars ? `rgba(${e.vars.palette.action.selectedChannel} / calc(${e.vars.palette.action.selectedOpacity} + ${e.vars.palette.action.hoverOpacity}))` : _(e.palette.action.selected, e.palette.action.selectedOpacity + e.palette.action.hoverOpacity)
971
- },
972
- [`&.${f.focusVisible}`]: {
973
- backgroundColor: e.vars ? `rgba(${e.vars.palette.action.selectedChannel} / calc(${e.vars.palette.action.selectedOpacity} + ${e.vars.palette.action.focusOpacity}))` : _(e.palette.action.selected, e.palette.action.selectedOpacity + e.palette.action.focusOpacity)
974
- },
975
- "&:active": {
976
- boxShadow: (e.vars || e).shadows[1]
977
- }
978
- }
979
- }, ...Object.entries(e.palette).filter(pt(["dark"])).map(([l]) => ({
980
- props: {
981
- color: l,
982
- clickable: !0
983
- },
984
- style: {
985
- [`&:hover, &.${f.focusVisible}`]: {
986
- backgroundColor: (e.vars || e).palette[l].dark
987
- }
988
- }
989
- })), {
990
- props: {
991
- variant: "outlined"
992
- },
993
- style: {
994
- backgroundColor: "transparent",
995
- border: e.vars ? `1px solid ${e.vars.palette.Chip.defaultBorder}` : `1px solid ${e.palette.mode === "light" ? e.palette.grey[400] : e.palette.grey[700]}`,
996
- [`&.${f.clickable}:hover`]: {
997
- backgroundColor: (e.vars || e).palette.action.hover
998
- },
999
- [`&.${f.focusVisible}`]: {
1000
- backgroundColor: (e.vars || e).palette.action.focus
1001
- },
1002
- [`& .${f.avatar}`]: {
1003
- marginLeft: 4
1004
- },
1005
- [`& .${f.avatarSmall}`]: {
1006
- marginLeft: 2
1007
- },
1008
- [`& .${f.icon}`]: {
1009
- marginLeft: 4
1010
- },
1011
- [`& .${f.iconSmall}`]: {
1012
- marginLeft: 2
1013
- },
1014
- [`& .${f.deleteIcon}`]: {
1015
- marginRight: 5
1016
- },
1017
- [`& .${f.deleteIconSmall}`]: {
1018
- marginRight: 3
1019
- }
1020
- }
1021
- }, ...Object.entries(e.palette).filter(pt()).map(([l]) => ({
1022
- props: {
1023
- variant: "outlined",
1024
- color: l
1025
- },
1026
- style: {
1027
- color: (e.vars || e).palette[l].main,
1028
- border: `1px solid ${e.vars ? `rgba(${e.vars.palette[l].mainChannel} / 0.7)` : _(e.palette[l].main, 0.7)}`,
1029
- [`&.${f.clickable}:hover`]: {
1030
- backgroundColor: e.vars ? `rgba(${e.vars.palette[l].mainChannel} / ${e.vars.palette.action.hoverOpacity})` : _(e.palette[l].main, e.palette.action.hoverOpacity)
1031
- },
1032
- [`&.${f.focusVisible}`]: {
1033
- backgroundColor: e.vars ? `rgba(${e.vars.palette[l].mainChannel} / ${e.vars.palette.action.focusOpacity})` : _(e.palette[l].main, e.palette.action.focusOpacity)
1034
- },
1035
- [`& .${f.deleteIcon}`]: {
1036
- color: e.vars ? `rgba(${e.vars.palette[l].mainChannel} / 0.7)` : _(e.palette[l].main, 0.7),
1037
- "&:hover, &:active": {
1038
- color: (e.vars || e).palette[l].main
1039
- }
1040
- }
1041
- }
1042
- }))]
1043
- };
1044
- })), fo = W("span", {
1045
- name: "MuiChip",
1046
- slot: "Label",
1047
- overridesResolver: (e, r) => {
1048
- const {
1049
- ownerState: l
1050
- } = e, {
1051
- size: s
1052
- } = l;
1053
- return [r.label, r[`label${y(s)}`]];
1054
- }
1055
- })({
1056
- overflow: "hidden",
1057
- textOverflow: "ellipsis",
1058
- paddingLeft: 12,
1059
- paddingRight: 12,
1060
- whiteSpace: "nowrap",
1061
- variants: [{
1062
- props: {
1063
- variant: "outlined"
1064
- },
1065
- style: {
1066
- paddingLeft: 11,
1067
- paddingRight: 11
1068
- }
1069
- }, {
1070
- props: {
1071
- size: "small"
1072
- },
1073
- style: {
1074
- paddingLeft: 8,
1075
- paddingRight: 8
1076
- }
1077
- }, {
1078
- props: {
1079
- size: "small",
1080
- variant: "outlined"
1081
- },
1082
- style: {
1083
- paddingLeft: 7,
1084
- paddingRight: 7
1085
- }
1086
- }]
1087
- });
1088
- function Vt(e) {
1089
- return e.key === "Backspace" || e.key === "Delete";
1090
- }
1091
- const Bt = /* @__PURE__ */ h.forwardRef(function(r, l) {
1092
- const s = Ot({
1093
- props: r,
1094
- name: "MuiChip"
1095
- }), {
1096
- avatar: b,
1097
- className: P,
1098
- clickable: $,
1099
- color: I = "default",
1100
- component: k,
1101
- deleteIcon: C,
1102
- disabled: T = !1,
1103
- icon: N,
1104
- label: le,
1105
- onClick: L,
1106
- onDelete: G,
1107
- onKeyDown: ge,
1108
- onKeyUp: Ve,
1109
- size: Pe = "medium",
1110
- variant: ie = "filled",
1111
- tabIndex: q,
1112
- skipFocusWhenDisabled: Se = !1,
1113
- // TODO v6: Rename to `focusableWhenDisabled`.
1114
- slots: ze = {},
1115
- slotProps: oe = {},
1116
- ...Fe
1117
- } = s, Qe = h.useRef(null), be = Yt(Qe, l), me = (p) => {
1118
- p.stopPropagation(), G && G(p);
1119
- }, J = (p) => {
1120
- p.currentTarget === p.target && Vt(p) && p.preventDefault(), ge && ge(p);
1121
- }, g = (p) => {
1122
- p.currentTarget === p.target && G && Vt(p) && G(p), Ve && Ve(p);
1123
- }, ye = $ !== !1 && L ? !0 : $, he = ye || G ? Rt : k || "div", se = {
1124
- ...s,
1125
- component: he,
1126
- disabled: T,
1127
- size: Pe,
1128
- color: I,
1129
- iconColor: /* @__PURE__ */ h.isValidElement(N) && N.props.color || I,
1130
- onDelete: !!G,
1131
- clickable: ye,
1132
- variant: ie
1133
- }, M = po(se), ke = he === Rt ? {
1134
- component: k || "div",
1135
- focusVisibleClassName: M.focusVisible,
1136
- ...G && {
1137
- disableRipple: !0
1138
- }
1139
- } : {};
1140
- let je = null;
1141
- G && (je = C && /* @__PURE__ */ h.isValidElement(C) ? /* @__PURE__ */ h.cloneElement(C, {
1142
- className: de(C.props.className, M.deleteIcon),
1143
- onClick: me
1144
- }) : /* @__PURE__ */ D(so, {
1145
- className: M.deleteIcon,
1146
- onClick: me
1147
- }));
1148
- let Te = null;
1149
- b && /* @__PURE__ */ h.isValidElement(b) && (Te = /* @__PURE__ */ h.cloneElement(b, {
1150
- className: de(M.avatar, b.props.className)
1151
- }));
1152
- let we = null;
1153
- N && /* @__PURE__ */ h.isValidElement(N) && (we = /* @__PURE__ */ h.cloneElement(N, {
1154
- className: de(M.icon, N.props.className)
1155
- })), process.env.NODE_ENV !== "production" && Te && we && console.error("MUI: The Chip component can not handle the avatar and the icon prop at the same time. Pick one.");
1156
- const X = {
1157
- slots: ze,
1158
- slotProps: oe
1159
- }, [V, He] = Ye("root", {
1160
- elementType: uo,
1161
- externalForwardedProps: {
1162
- ...X,
1163
- ...Fe
1164
- },
1165
- ownerState: se,
1166
- // The `component` prop is preserved because `Chip` relies on it for internal logic. If `shouldForwardComponentProp` were `false`, `useSlot` would remove the `component` prop, potentially breaking the component's behavior.
1167
- shouldForwardComponentProp: !0,
1168
- ref: be,
1169
- className: de(M.root, P),
1170
- additionalProps: {
1171
- disabled: ye && T ? !0 : void 0,
1172
- tabIndex: Se && T ? -1 : q,
1173
- ...ke
1174
- },
1175
- getSlotProps: (p) => ({
1176
- ...p,
1177
- onClick: (j) => {
1178
- var H;
1179
- (H = p.onClick) == null || H.call(p, j), L == null || L(j);
1180
- },
1181
- onKeyDown: (j) => {
1182
- var H;
1183
- (H = p.onKeyDown) == null || H.call(p, j), J == null || J(j);
1184
- },
1185
- onKeyUp: (j) => {
1186
- var H;
1187
- (H = p.onKeyUp) == null || H.call(p, j), g == null || g(j);
1188
- }
1189
- })
1190
- }), [Le, z] = Ye("label", {
1191
- elementType: fo,
1192
- externalForwardedProps: X,
1193
- ownerState: se,
1194
- className: M.label
1195
- });
1196
- return /* @__PURE__ */ Xe(V, {
1197
- as: he,
1198
- ...He,
1199
- children: [Te || we, /* @__PURE__ */ D(Le, {
1200
- ...z,
1201
- children: le
1202
- }), je]
1203
- });
1204
- });
1205
- process.env.NODE_ENV !== "production" && (Bt.propTypes = {
1206
- // ┌────────────────────────────── Warning ──────────────────────────────┐
1207
- // │ These PropTypes are generated from the TypeScript type definitions. │
1208
- // │ To update them, edit the d.ts file and run `pnpm proptypes`. │
1209
- // └─────────────────────────────────────────────────────────────────────┘
1210
- /**
1211
- * The Avatar element to display.
1212
- */
1213
- avatar: t.element,
1214
- /**
1215
- * This prop isn't supported.
1216
- * Use the `component` prop if you need to change the children structure.
1217
- */
1218
- children: Qt,
1219
- /**
1220
- * Override or extend the styles applied to the component.
1221
- */
1222
- classes: t.object,
1223
- /**
1224
- * @ignore
1225
- */
1226
- className: t.string,
1227
- /**
1228
- * If `true`, the chip will appear clickable, and will raise when pressed,
1229
- * even if the onClick prop is not defined.
1230
- * If `false`, the chip will not appear clickable, even if onClick prop is defined.
1231
- * This can be used, for example,
1232
- * along with the component prop to indicate an anchor Chip is clickable.
1233
- * Note: this controls the UI and does not affect the onClick event.
1234
- */
1235
- clickable: t.bool,
1236
- /**
1237
- * The color of the component.
1238
- * It supports both default and custom theme colors, which can be added as shown in the
1239
- * [palette customization guide](https://mui.com/material-ui/customization/palette/#custom-colors).
1240
- * @default 'default'
1241
- */
1242
- color: t.oneOfType([t.oneOf(["default", "primary", "secondary", "error", "info", "success", "warning"]), t.string]),
1243
- /**
1244
- * The component used for the root node.
1245
- * Either a string to use a HTML element or a component.
1246
- */
1247
- component: t.elementType,
1248
- /**
1249
- * Override the default delete icon element. Shown only if `onDelete` is set.
1250
- */
1251
- deleteIcon: t.element,
1252
- /**
1253
- * If `true`, the component is disabled.
1254
- * @default false
1255
- */
1256
- disabled: t.bool,
1257
- /**
1258
- * Icon element.
1259
- */
1260
- icon: t.element,
1261
- /**
1262
- * The content of the component.
1263
- */
1264
- label: t.node,
1265
- /**
1266
- * @ignore
1267
- */
1268
- onClick: t.func,
1269
- /**
1270
- * Callback fired when the delete icon is clicked.
1271
- * If set, the delete icon will be shown.
1272
- */
1273
- onDelete: t.func,
1274
- /**
1275
- * @ignore
1276
- */
1277
- onKeyDown: t.func,
1278
- /**
1279
- * @ignore
1280
- */
1281
- onKeyUp: t.func,
1282
- /**
1283
- * The size of the component.
1284
- * @default 'medium'
1285
- */
1286
- size: t.oneOfType([t.oneOf(["medium", "small"]), t.string]),
1287
- /**
1288
- * If `true`, allows the disabled chip to escape focus.
1289
- * If `false`, allows the disabled chip to receive focus.
1290
- * @default false
1291
- */
1292
- skipFocusWhenDisabled: t.bool,
1293
- /**
1294
- * The props used for each slot inside.
1295
- * @default {}
1296
- */
1297
- slotProps: t.shape({
1298
- label: t.oneOfType([t.func, t.object]),
1299
- root: t.oneOfType([t.func, t.object])
1300
- }),
1301
- /**
1302
- * The components used for each slot inside.
1303
- * @default {}
1304
- */
1305
- slots: t.shape({
1306
- label: t.elementType,
1307
- root: t.elementType
1308
- }),
1309
- /**
1310
- * The system prop that allows defining system overrides as well as additional CSS styles.
1311
- */
1312
- sx: t.oneOfType([t.arrayOf(t.oneOfType([t.func, t.object, t.bool])), t.func, t.object]),
1313
- /**
1314
- * @ignore
1315
- */
1316
- tabIndex: t.number,
1317
- /**
1318
- * The variant to use.
1319
- * @default 'filled'
1320
- */
1321
- variant: t.oneOfType([t.oneOf(["filled", "outlined"]), t.string])
1322
- });
1323
- function go(e) {
1324
- return Ct("MuiAutocomplete", e);
1325
- }
1326
- const u = $t("MuiAutocomplete", ["root", "expanded", "fullWidth", "focused", "focusVisible", "tag", "tagSizeSmall", "tagSizeMedium", "hasPopupIcon", "hasClearIcon", "inputRoot", "input", "inputFocused", "endAdornment", "clearIndicator", "popupIndicator", "popupIndicatorOpen", "popper", "popperDisablePortal", "paper", "listbox", "loading", "noOptions", "option", "groupLabel", "groupUl"]);
1327
- var zt, Ft;
1328
- const bo = (e) => {
1329
- const {
1330
- classes: r,
1331
- disablePortal: l,
1332
- expanded: s,
1333
- focused: b,
1334
- fullWidth: P,
1335
- hasClearIcon: $,
1336
- hasPopupIcon: I,
1337
- inputFocused: k,
1338
- popupOpen: C,
1339
- size: T
1340
- } = e, N = {
1341
- root: ["root", s && "expanded", b && "focused", P && "fullWidth", $ && "hasClearIcon", I && "hasPopupIcon"],
1342
- inputRoot: ["inputRoot"],
1343
- input: ["input", k && "inputFocused"],
1344
- tag: ["tag", `tagSize${y(T)}`],
1345
- endAdornment: ["endAdornment"],
1346
- clearIndicator: ["clearIndicator"],
1347
- popupIndicator: ["popupIndicator", C && "popupIndicatorOpen"],
1348
- popper: ["popper", l && "popperDisablePortal"],
1349
- paper: ["paper"],
1350
- listbox: ["listbox"],
1351
- loading: ["loading"],
1352
- noOptions: ["noOptions"],
1353
- option: ["option"],
1354
- groupLabel: ["groupLabel"],
1355
- groupUl: ["groupUl"]
1356
- };
1357
- return Pt(N, go, r);
1358
- }, mo = W("div", {
1359
- name: "MuiAutocomplete",
1360
- slot: "Root",
1361
- overridesResolver: (e, r) => {
1362
- const {
1363
- ownerState: l
1364
- } = e, {
1365
- fullWidth: s,
1366
- hasClearIcon: b,
1367
- hasPopupIcon: P,
1368
- inputFocused: $,
1369
- size: I
1370
- } = l;
1371
- return [{
1372
- [`& .${u.tag}`]: r.tag
1373
- }, {
1374
- [`& .${u.tag}`]: r[`tagSize${y(I)}`]
1375
- }, {
1376
- [`& .${u.inputRoot}`]: r.inputRoot
1377
- }, {
1378
- [`& .${u.input}`]: r.input
1379
- }, {
1380
- [`& .${u.input}`]: $ && r.inputFocused
1381
- }, r.root, s && r.fullWidth, P && r.hasPopupIcon, b && r.hasClearIcon];
1382
- }
1383
- })({
1384
- [`&.${u.focused} .${u.clearIndicator}`]: {
1385
- visibility: "visible"
1386
- },
1387
- /* Avoid double tap issue on iOS */
1388
- "@media (pointer: fine)": {
1389
- [`&:hover .${u.clearIndicator}`]: {
1390
- visibility: "visible"
1391
- }
1392
- },
1393
- [`& .${u.tag}`]: {
1394
- margin: 3,
1395
- maxWidth: "calc(100% - 6px)"
1396
- },
1397
- [`& .${u.inputRoot}`]: {
1398
- [`.${u.hasPopupIcon}&, .${u.hasClearIcon}&`]: {
1399
- paddingRight: 30
1400
- },
1401
- [`.${u.hasPopupIcon}.${u.hasClearIcon}&`]: {
1402
- paddingRight: 56
1403
- },
1404
- [`& .${u.input}`]: {
1405
- width: 0,
1406
- minWidth: 30
1407
- }
1408
- },
1409
- [`& .${xt.root}`]: {
1410
- paddingBottom: 1,
1411
- "& .MuiInput-input": {
1412
- padding: "4px 4px 4px 0px"
1413
- }
1414
- },
1415
- [`& .${xt.root}.${Oe.sizeSmall}`]: {
1416
- [`& .${xt.input}`]: {
1417
- padding: "2px 4px 3px 0"
1418
- }
1419
- },
1420
- [`& .${At.root}`]: {
1421
- padding: 9,
1422
- [`.${u.hasPopupIcon}&, .${u.hasClearIcon}&`]: {
1423
- paddingRight: 39
1424
- },
1425
- [`.${u.hasPopupIcon}.${u.hasClearIcon}&`]: {
1426
- paddingRight: 65
1427
- },
1428
- [`& .${u.input}`]: {
1429
- padding: "7.5px 4px 7.5px 5px"
1430
- },
1431
- [`& .${u.endAdornment}`]: {
1432
- right: 9
1433
- }
1434
- },
1435
- [`& .${At.root}.${Oe.sizeSmall}`]: {
1436
- // Don't specify paddingRight, as it overrides the default value set when there is only
1437
- // one of the popup or clear icon as the specificity is equal so the latter one wins
1438
- paddingTop: 6,
1439
- paddingBottom: 6,
1440
- paddingLeft: 6,
1441
- [`& .${u.input}`]: {
1442
- padding: "2.5px 4px 2.5px 8px"
1443
- }
1444
- },
1445
- [`& .${Me.root}`]: {
1446
- paddingTop: 19,
1447
- paddingLeft: 8,
1448
- [`.${u.hasPopupIcon}&, .${u.hasClearIcon}&`]: {
1449
- paddingRight: 39
1450
- },
1451
- [`.${u.hasPopupIcon}.${u.hasClearIcon}&`]: {
1452
- paddingRight: 65
1453
- },
1454
- [`& .${Me.input}`]: {
1455
- padding: "7px 4px"
1456
- },
1457
- [`& .${u.endAdornment}`]: {
1458
- right: 9
1459
- }
1460
- },
1461
- [`& .${Me.root}.${Oe.sizeSmall}`]: {
1462
- paddingBottom: 1,
1463
- [`& .${Me.input}`]: {
1464
- padding: "2.5px 4px"
1465
- }
1466
- },
1467
- [`& .${Oe.hiddenLabel}`]: {
1468
- paddingTop: 8
1469
- },
1470
- [`& .${Me.root}.${Oe.hiddenLabel}`]: {
1471
- paddingTop: 0,
1472
- paddingBottom: 0,
1473
- [`& .${u.input}`]: {
1474
- paddingTop: 16,
1475
- paddingBottom: 17
1476
- }
1477
- },
1478
- [`& .${Me.root}.${Oe.hiddenLabel}.${Oe.sizeSmall}`]: {
1479
- [`& .${u.input}`]: {
1480
- paddingTop: 8,
1481
- paddingBottom: 9
1482
- }
1483
- },
1484
- [`& .${u.input}`]: {
1485
- flexGrow: 1,
1486
- textOverflow: "ellipsis",
1487
- opacity: 0
1488
- },
1489
- variants: [{
1490
- props: {
1491
- fullWidth: !0
1492
- },
1493
- style: {
1494
- width: "100%"
1495
- }
1496
- }, {
1497
- props: {
1498
- size: "small"
1499
- },
1500
- style: {
1501
- [`& .${u.tag}`]: {
1502
- margin: 2,
1503
- maxWidth: "calc(100% - 4px)"
1504
- }
1505
- }
1506
- }, {
1507
- props: {
1508
- inputFocused: !0
1509
- },
1510
- style: {
1511
- [`& .${u.input}`]: {
1512
- opacity: 1
1513
- }
1514
- }
1515
- }, {
1516
- props: {
1517
- multiple: !0
1518
- },
1519
- style: {
1520
- [`& .${u.inputRoot}`]: {
1521
- flexWrap: "wrap"
1522
- }
1523
- }
1524
- }]
1525
- }), yo = W("div", {
1526
- name: "MuiAutocomplete",
1527
- slot: "EndAdornment"
1528
- })({
1529
- // We use a position absolute to support wrapping tags.
1530
- position: "absolute",
1531
- right: 0,
1532
- top: "50%",
1533
- transform: "translate(0, -50%)"
1534
- }), ho = W(jt, {
1535
- name: "MuiAutocomplete",
1536
- slot: "ClearIndicator"
1537
- })({
1538
- marginRight: -2,
1539
- padding: 4,
1540
- visibility: "hidden"
1541
- }), vo = W(jt, {
1542
- name: "MuiAutocomplete",
1543
- slot: "PopupIndicator",
1544
- overridesResolver: (e, r) => {
1545
- const {
1546
- ownerState: l
1547
- } = e;
1548
- return [r.popupIndicator, l.popupOpen && r.popupIndicatorOpen];
1549
- }
1550
- })({
1551
- padding: 2,
1552
- marginRight: -2,
1553
- variants: [{
1554
- props: {
1555
- popupOpen: !0
1556
- },
1557
- style: {
1558
- transform: "rotate(180deg)"
1559
- }
1560
- }]
1561
- }), xo = W(Ht, {
1562
- name: "MuiAutocomplete",
1563
- slot: "Popper",
1564
- overridesResolver: (e, r) => {
1565
- const {
1566
- ownerState: l
1567
- } = e;
1568
- return [{
1569
- [`& .${u.option}`]: r.option
1570
- }, r.popper, l.disablePortal && r.popperDisablePortal];
1571
- }
1572
- })(fe(({
1573
- theme: e
1574
- }) => ({
1575
- zIndex: (e.vars || e).zIndex.modal,
1576
- variants: [{
1577
- props: {
1578
- disablePortal: !0
1579
- },
1580
- style: {
1581
- position: "absolute"
1582
- }
1583
- }]
1584
- }))), Io = W(Ut, {
1585
- name: "MuiAutocomplete",
1586
- slot: "Paper"
1587
- })(fe(({
1588
- theme: e
1589
- }) => ({
1590
- ...e.typography.body1,
1591
- overflow: "auto"
1592
- }))), Co = W("div", {
1593
- name: "MuiAutocomplete",
1594
- slot: "Loading"
1595
- })(fe(({
1596
- theme: e
1597
- }) => ({
1598
- color: (e.vars || e).palette.text.secondary,
1599
- padding: "14px 16px"
1600
- }))), $o = W("div", {
1601
- name: "MuiAutocomplete",
1602
- slot: "NoOptions"
1603
- })(fe(({
1604
- theme: e
1605
- }) => ({
1606
- color: (e.vars || e).palette.text.secondary,
1607
- padding: "14px 16px"
1608
- }))), Oo = W("ul", {
1609
- name: "MuiAutocomplete",
1610
- slot: "Listbox"
1611
- })(fe(({
1612
- theme: e
1613
- }) => ({
1614
- listStyle: "none",
1615
- margin: 0,
1616
- padding: "8px 0",
1617
- maxHeight: "40vh",
1618
- overflow: "auto",
1619
- position: "relative",
1620
- [`& .${u.option}`]: {
1621
- minHeight: 48,
1622
- display: "flex",
1623
- overflow: "hidden",
1624
- justifyContent: "flex-start",
1625
- alignItems: "center",
1626
- cursor: "pointer",
1627
- paddingTop: 6,
1628
- boxSizing: "border-box",
1629
- outline: "0",
1630
- WebkitTapHighlightColor: "transparent",
1631
- paddingBottom: 6,
1632
- paddingLeft: 16,
1633
- paddingRight: 16,
1634
- [e.breakpoints.up("sm")]: {
1635
- minHeight: "auto"
1636
- },
1637
- [`&.${u.focused}`]: {
1638
- backgroundColor: (e.vars || e).palette.action.hover,
1639
- // Reset on touch devices, it doesn't add specificity
1640
- "@media (hover: none)": {
1641
- backgroundColor: "transparent"
1642
- }
1643
- },
1644
- '&[aria-disabled="true"]': {
1645
- opacity: (e.vars || e).palette.action.disabledOpacity,
1646
- pointerEvents: "none"
1647
- },
1648
- [`&.${u.focusVisible}`]: {
1649
- backgroundColor: (e.vars || e).palette.action.focus
1650
- },
1651
- '&[aria-selected="true"]': {
1652
- backgroundColor: e.vars ? `rgba(${e.vars.palette.primary.mainChannel} / ${e.vars.palette.action.selectedOpacity})` : _(e.palette.primary.main, e.palette.action.selectedOpacity),
1653
- [`&.${u.focused}`]: {
1654
- backgroundColor: e.vars ? `rgba(${e.vars.palette.primary.mainChannel} / calc(${e.vars.palette.action.selectedOpacity} + ${e.vars.palette.action.hoverOpacity}))` : _(e.palette.primary.main, e.palette.action.selectedOpacity + e.palette.action.hoverOpacity),
1655
- // Reset on touch devices, it doesn't add specificity
1656
- "@media (hover: none)": {
1657
- backgroundColor: (e.vars || e).palette.action.selected
1658
- }
1659
- },
1660
- [`&.${u.focusVisible}`]: {
1661
- backgroundColor: e.vars ? `rgba(${e.vars.palette.primary.mainChannel} / calc(${e.vars.palette.action.selectedOpacity} + ${e.vars.palette.action.focusOpacity}))` : _(e.palette.primary.main, e.palette.action.selectedOpacity + e.palette.action.focusOpacity)
1662
- }
1663
- }
1664
- }
1665
- }))), Po = W(ut, {
1666
- name: "MuiAutocomplete",
1667
- slot: "GroupLabel"
1668
- })(fe(({
1669
- theme: e
1670
- }) => ({
1671
- backgroundColor: (e.vars || e).palette.background.paper,
1672
- top: -8
1673
- }))), So = W("ul", {
1674
- name: "MuiAutocomplete",
1675
- slot: "GroupUl"
1676
- })({
1677
- padding: 0,
1678
- [`& .${u.option}`]: {
1679
- paddingLeft: 24
1680
- }
1681
- }), ko = /* @__PURE__ */ h.forwardRef(function(r, l) {
1682
- const s = Ot({
1683
- props: r,
1684
- name: "MuiAutocomplete"
1685
- }), {
1686
- autoComplete: b = !1,
1687
- autoHighlight: P = !1,
1688
- autoSelect: $ = !1,
1689
- blurOnSelect: I = !1,
1690
- ChipProps: k,
1691
- className: C,
1692
- clearIcon: T = zt || (zt = /* @__PURE__ */ D(Kt, {
1693
- fontSize: "small"
1694
- })),
1695
- clearOnBlur: N = !s.freeSolo,
1696
- clearOnEscape: le = !1,
1697
- clearText: L = "Clear",
1698
- closeText: G = "Close",
1699
- componentsProps: ge,
1700
- defaultValue: Ve = s.multiple ? [] : null,
1701
- disableClearable: Pe = !1,
1702
- disableCloseOnSelect: ie = !1,
1703
- disabled: q = !1,
1704
- disabledItemsFocusable: Se = !1,
1705
- disableListWrap: ze = !1,
1706
- disablePortal: oe = !1,
1707
- filterOptions: Fe,
1708
- filterSelectedOptions: Qe = !1,
1709
- forcePopupIcon: be = "auto",
1710
- freeSolo: me = !1,
1711
- fullWidth: J = !1,
1712
- getLimitTagsText: g = (m) => `+${m}`,
1713
- getOptionDisabled: ye,
1714
- getOptionKey: he,
1715
- getOptionLabel: se,
1716
- isOptionEqualToValue: M,
1717
- groupBy: ke,
1718
- handleHomeEndKeys: je = !s.freeSolo,
1719
- id: Te,
1720
- includeInputInList: we = !1,
1721
- inputValue: X,
1722
- limitTags: V = -1,
1723
- ListboxComponent: He,
1724
- ListboxProps: Le,
1725
- loading: z = !1,
1726
- loadingText: p = "Loading…",
1727
- multiple: j = !1,
1728
- noOptionsText: H = "No options",
1729
- onChange: S,
1730
- onClose: Y,
1731
- onHighlightChange: Ue,
1732
- onInputChange: St,
1733
- onOpen: K,
1734
- open: Ze,
1735
- openOnFocus: dt = !1,
1736
- openText: E = "Open",
1737
- options: kt,
1738
- PaperComponent: c,
1739
- PopperComponent: Be,
1740
- popupIcon: x = Ft || (Ft = /* @__PURE__ */ D(Gt, {})),
1741
- readOnly: ve = !1,
1742
- renderGroup: Ae,
1743
- renderInput: et,
1744
- renderOption: Re,
1745
- renderTags: ne,
1746
- renderValue: xe,
1747
- selectOnFocus: Tt = !s.freeSolo,
1748
- size: De = "medium",
1749
- slots: tt = {},
1750
- slotProps: U = {},
1751
- value: O,
1752
- ...Q
1753
- } = s, {
1754
- getRootProps: ot,
1755
- getInputProps: Z,
1756
- getInputLabelProps: ft,
1757
- getPopupIndicatorProps: re,
1758
- getClearProps: ee,
1759
- getItemProps: gt,
1760
- getListboxProps: We,
1761
- getOptionProps: bt,
1762
- value: B,
1763
- dirty: Ie,
1764
- expanded: ae,
1765
- id: Ne,
1766
- popupOpen: te,
1767
- focused: nt,
1768
- focusedItem: rt,
1769
- anchorEl: Ce,
1770
- setAnchorEl: mt,
1771
- inputValue: yt,
1772
- groupedOptions: $e
1773
- } = ro({
1774
- ...s,
1775
- componentName: "Autocomplete"
1776
- }), Ge = !Pe && !q && Ie && !ve, Ke = (!me || be === !0) && be !== !1, {
1777
- onMouseDown: ht
1778
- } = Z(), {
1779
- ref: vt,
1780
- ...at
1781
- } = We(), Ee = se || ((m) => m.label ?? m), A = {
1782
- ...s,
1783
- disablePortal: oe,
1784
- expanded: ae,
1785
- focused: nt,
1786
- fullWidth: J,
1787
- getOptionLabel: Ee,
1788
- hasClearIcon: Ge,
1789
- hasPopupIcon: Ke,
1790
- inputFocused: rt === -1,
1791
- popupOpen: te,
1792
- size: De
1793
- }, R = bo(A), ce = {
1794
- slots: {
1795
- paper: c,
1796
- popper: Be,
1797
- ...tt
1798
- },
1799
- slotProps: {
1800
- chip: k,
1801
- listbox: Le,
1802
- ...ge,
1803
- ...U
1804
- }
1805
- }, [_e, lt] = Ye("listbox", {
1806
- elementType: Oo,
1807
- externalForwardedProps: ce,
1808
- ownerState: A,
1809
- className: R.listbox,
1810
- additionalProps: at,
1811
- ref: vt
1812
- }), [n, o] = Ye("paper", {
1813
- elementType: Ut,
1814
- externalForwardedProps: ce,
1815
- ownerState: A,
1816
- className: R.paper
1817
- }), [a, d] = Ye("popper", {
1818
- elementType: Ht,
1819
- externalForwardedProps: ce,
1820
- ownerState: A,
1821
- className: R.popper,
1822
- additionalProps: {
1823
- disablePortal: oe,
1824
- style: {
1825
- width: Ce ? Ce.clientWidth : null
1826
- },
1827
- role: "presentation",
1828
- anchorEl: Ce,
1829
- open: te
1830
- }
1831
- });
1832
- let i;
1833
- const v = (m) => ({
1834
- className: R.tag,
1835
- disabled: q,
1836
- ...gt(m)
1837
- });
1838
- if (j ? B.length > 0 && (ne ? i = ne(B, v, A) : xe ? i = xe(B, v, A) : i = B.map((m, pe) => {
1839
- const {
1840
- key: ue,
1841
- ...Je
1842
- } = v({
1843
- index: pe
1844
- });
1845
- return /* @__PURE__ */ D(Bt, {
1846
- label: Ee(m),
1847
- size: De,
1848
- ...Je,
1849
- ...ce.slotProps.chip
1850
- }, ue);
1851
- })) : xe && B != null && (i = xe(B, v, A)), V > -1 && Array.isArray(i)) {
1852
- const m = i.length - V;
1853
- !nt && m > 0 && (i = i.splice(0, V), i.push(/* @__PURE__ */ D("span", {
1854
- className: R.tag,
1855
- children: g(m)
1856
- }, i.length)));
1857
- }
1858
- const F = Ae || ((m) => /* @__PURE__ */ Xe("li", {
1859
- children: [/* @__PURE__ */ D(Po, {
1860
- className: R.groupLabel,
1861
- ownerState: A,
1862
- component: "div",
1863
- children: m.group
1864
- }), /* @__PURE__ */ D(So, {
1865
- className: R.groupUl,
1866
- ownerState: A,
1867
- children: m.children
1868
- })]
1869
- }, m.key)), Wt = Re || ((m, pe) => {
1870
- const {
1871
- key: ue,
1872
- ...Je
1873
- } = m;
1874
- return /* @__PURE__ */ D("li", {
1875
- ...Je,
1876
- children: Ee(pe)
1877
- }, ue);
1878
- }), Lt = (m, pe) => {
1879
- const ue = bt({
1880
- option: m,
1881
- index: pe
1882
- });
1883
- return Wt({
1884
- ...ue,
1885
- className: R.option
1886
- }, m, {
1887
- selected: ue["aria-selected"],
1888
- index: pe,
1889
- inputValue: yt
1890
- }, A);
1891
- }, it = ce.slotProps.clearIndicator, st = ce.slotProps.popupIndicator;
1892
- return /* @__PURE__ */ Xe(h.Fragment, {
1893
- children: [/* @__PURE__ */ D(mo, {
1894
- ref: l,
1895
- className: de(R.root, C),
1896
- ownerState: A,
1897
- ...ot(Q),
1898
- children: et({
1899
- id: Ne,
1900
- disabled: q,
1901
- fullWidth: !0,
1902
- size: De === "small" ? "small" : void 0,
1903
- InputLabelProps: ft(),
1904
- InputProps: {
1905
- ref: mt,
1906
- className: R.inputRoot,
1907
- startAdornment: i,
1908
- onMouseDown: (m) => {
1909
- m.target === m.currentTarget && ht(m);
1910
- },
1911
- ...(Ge || Ke) && {
1912
- endAdornment: /* @__PURE__ */ Xe(yo, {
1913
- className: R.endAdornment,
1914
- ownerState: A,
1915
- children: [Ge ? /* @__PURE__ */ D(ho, {
1916
- ...ee(),
1917
- "aria-label": L,
1918
- title: L,
1919
- ownerState: A,
1920
- ...it,
1921
- className: de(R.clearIndicator, it == null ? void 0 : it.className),
1922
- children: T
1923
- }) : null, Ke ? /* @__PURE__ */ D(vo, {
1924
- ...re(),
1925
- disabled: q,
1926
- "aria-label": te ? G : E,
1927
- title: te ? G : E,
1928
- ownerState: A,
1929
- ...st,
1930
- className: de(R.popupIndicator, st == null ? void 0 : st.className),
1931
- children: x
1932
- }) : null]
1933
- })
1934
- }
1935
- },
1936
- inputProps: {
1937
- className: R.input,
1938
- disabled: q,
1939
- readOnly: ve,
1940
- ...Z()
1941
- }
1942
- })
1943
- }), Ce ? /* @__PURE__ */ D(xo, {
1944
- as: a,
1945
- ...d,
1946
- children: /* @__PURE__ */ Xe(Io, {
1947
- as: n,
1948
- ...o,
1949
- children: [z && $e.length === 0 ? /* @__PURE__ */ D(Co, {
1950
- className: R.loading,
1951
- ownerState: A,
1952
- children: p
1953
- }) : null, $e.length === 0 && !me && !z ? /* @__PURE__ */ D($o, {
1954
- className: R.noOptions,
1955
- ownerState: A,
1956
- role: "presentation",
1957
- onMouseDown: (m) => {
1958
- m.preventDefault();
1959
- },
1960
- children: H
1961
- }) : null, $e.length > 0 ? /* @__PURE__ */ D(_e, {
1962
- as: He,
1963
- ...lt,
1964
- children: $e.map((m, pe) => ke ? F({
1965
- key: m.key,
1966
- group: m.group,
1967
- children: m.options.map((ue, Je) => Lt(ue, m.index + Je))
1968
- }) : Lt(m, pe))
1969
- }) : null]
1970
- })
1971
- }) : null]
1972
- });
1973
- });
1974
- process.env.NODE_ENV !== "production" && (ko.propTypes = {
1975
- // ┌────────────────────────────── Warning ──────────────────────────────┐
1976
- // │ These PropTypes are generated from the TypeScript type definitions. │
1977
- // │ To update them, edit the d.ts file and run `pnpm proptypes`. │
1978
- // └─────────────────────────────────────────────────────────────────────┘
1979
- /**
1980
- * If `true`, the portion of the selected suggestion that the user hasn't typed,
1981
- * known as the completion string, appears inline after the input cursor in the textbox.
1982
- * The inline completion string is visually highlighted and has a selected state.
1983
- * @default false
1984
- */
1985
- autoComplete: t.bool,
1986
- /**
1987
- * If `true`, the first option is automatically highlighted.
1988
- * @default false
1989
- */
1990
- autoHighlight: t.bool,
1991
- /**
1992
- * If `true`, the selected option becomes the value of the input
1993
- * when the Autocomplete loses focus unless the user chooses
1994
- * a different option or changes the character string in the input.
1995
- *
1996
- * When using the `freeSolo` mode, the typed value will be the input value
1997
- * if the Autocomplete loses focus without highlighting an option.
1998
- * @default false
1999
- */
2000
- autoSelect: t.bool,
2001
- /**
2002
- * Control if the input should be blurred when an option is selected:
2003
- *
2004
- * - `false` the input is not blurred.
2005
- * - `true` the input is always blurred.
2006
- * - `touch` the input is blurred after a touch event.
2007
- * - `mouse` the input is blurred after a mouse event.
2008
- * @default false
2009
- */
2010
- blurOnSelect: t.oneOfType([t.oneOf(["mouse", "touch"]), t.bool]),
2011
- /**
2012
- * Props applied to the [`Chip`](https://mui.com/material-ui/api/chip/) element.
2013
- * @deprecated Use `slotProps.chip` instead. This prop will be removed in a future major release. See [Migrating from deprecated APIs](/material-ui/migration/migrating-from-deprecated-apis/) for more details.
2014
- */
2015
- ChipProps: t.object,
2016
- /**
2017
- * Override or extend the styles applied to the component.
2018
- */
2019
- classes: t.object,
2020
- /**
2021
- * @ignore
2022
- */
2023
- className: t.string,
2024
- /**
2025
- * The icon to display in place of the default clear icon.
2026
- * @default <ClearIcon fontSize="small" />
2027
- */
2028
- clearIcon: t.node,
2029
- /**
2030
- * If `true`, the input's text is cleared on blur if no value is selected.
2031
- *
2032
- * Set it to `true` if you want to help the user enter a new value.
2033
- * Set it to `false` if you want to help the user resume their search.
2034
- * @default !props.freeSolo
2035
- */
2036
- clearOnBlur: t.bool,
2037
- /**
2038
- * If `true`, clear all values when the user presses escape and the popup is closed.
2039
- * @default false
2040
- */
2041
- clearOnEscape: t.bool,
2042
- /**
2043
- * Override the default text for the *clear* icon button.
2044
- *
2045
- * For localization purposes, you can use the provided [translations](https://mui.com/material-ui/guides/localization/).
2046
- * @default 'Clear'
2047
- */
2048
- clearText: t.string,
2049
- /**
2050
- * Override the default text for the *close popup* icon button.
2051
- *
2052
- * For localization purposes, you can use the provided [translations](https://mui.com/material-ui/guides/localization/).
2053
- * @default 'Close'
2054
- */
2055
- closeText: t.string,
2056
- /**
2057
- * The props used for each slot inside.
2058
- * @deprecated Use the `slotProps` prop instead. This prop will be removed in a future major release. See [Migrating from deprecated APIs](https://mui.com/material-ui/migration/migrating-from-deprecated-apis/) for more details.
2059
- */
2060
- componentsProps: t.shape({
2061
- clearIndicator: t.object,
2062
- paper: t.object,
2063
- popper: t.object,
2064
- popupIndicator: t.object
2065
- }),
2066
- /**
2067
- * The default value. Use when the component is not controlled.
2068
- * @default props.multiple ? [] : null
2069
- */
2070
- defaultValue: Dt(t.any, (e) => e.multiple && e.defaultValue !== void 0 && !Array.isArray(e.defaultValue) ? new Error(["MUI: The Autocomplete expects the `defaultValue` prop to be an array when `multiple={true}` or undefined.", `However, ${e.defaultValue} was provided.`].join(`
2071
- `)) : null),
2072
- /**
2073
- * If `true`, the input can't be cleared.
2074
- * @default false
2075
- */
2076
- disableClearable: t.bool,
2077
- /**
2078
- * If `true`, the popup won't close when a value is selected.
2079
- * @default false
2080
- */
2081
- disableCloseOnSelect: t.bool,
2082
- /**
2083
- * If `true`, the component is disabled.
2084
- * @default false
2085
- */
2086
- disabled: t.bool,
2087
- /**
2088
- * If `true`, will allow focus on disabled items.
2089
- * @default false
2090
- */
2091
- disabledItemsFocusable: t.bool,
2092
- /**
2093
- * If `true`, the list box in the popup will not wrap focus.
2094
- * @default false
2095
- */
2096
- disableListWrap: t.bool,
2097
- /**
2098
- * If `true`, the `Popper` content will be under the DOM hierarchy of the parent component.
2099
- * @default false
2100
- */
2101
- disablePortal: t.bool,
2102
- /**
2103
- * A function that determines the filtered options to be rendered on search.
2104
- *
2105
- * @default createFilterOptions()
2106
- * @param {Value[]} options The options to render.
2107
- * @param {object} state The state of the component.
2108
- * @returns {Value[]}
2109
- */
2110
- filterOptions: t.func,
2111
- /**
2112
- * If `true`, hide the selected options from the list box.
2113
- * @default false
2114
- */
2115
- filterSelectedOptions: t.bool,
2116
- /**
2117
- * Force the visibility display of the popup icon.
2118
- * @default 'auto'
2119
- */
2120
- forcePopupIcon: t.oneOfType([t.oneOf(["auto"]), t.bool]),
2121
- /**
2122
- * If `true`, the Autocomplete is free solo, meaning that the user input is not bound to provided options.
2123
- * @default false
2124
- */
2125
- freeSolo: t.bool,
2126
- /**
2127
- * If `true`, the input will take up the full width of its container.
2128
- * @default false
2129
- */
2130
- fullWidth: t.bool,
2131
- /**
2132
- * The label to display when the tags are truncated (`limitTags`).
2133
- *
2134
- * @param {number} more The number of truncated tags.
2135
- * @returns {ReactNode}
2136
- * @default (more) => `+${more}`
2137
- */
2138
- getLimitTagsText: t.func,
2139
- /**
2140
- * Used to determine the disabled state for a given option.
2141
- *
2142
- * @param {Value} option The option to test.
2143
- * @returns {boolean}
2144
- */
2145
- getOptionDisabled: t.func,
2146
- /**
2147
- * Used to determine the key for a given option.
2148
- * This can be useful when the labels of options are not unique (since labels are used as keys by default).
2149
- *
2150
- * @param {Value} option The option to get the key for.
2151
- * @returns {string | number}
2152
- */
2153
- getOptionKey: t.func,
2154
- /**
2155
- * Used to determine the string value for a given option.
2156
- * It's used to fill the input (and the list box options if `renderOption` is not provided).
2157
- *
2158
- * If used in free solo mode, it must accept both the type of the options and a string.
2159
- *
2160
- * @param {Value} option
2161
- * @returns {string}
2162
- * @default (option) => option.label ?? option
2163
- */
2164
- getOptionLabel: t.func,
2165
- /**
2166
- * If provided, the options will be grouped under the returned string.
2167
- * The groupBy value is also used as the text for group headings when `renderGroup` is not provided.
2168
- *
2169
- * @param {Value} option The Autocomplete option.
2170
- * @returns {string}
2171
- */
2172
- groupBy: t.func,
2173
- /**
2174
- * If `true`, the component handles the "Home" and "End" keys when the popup is open.
2175
- * It should move focus to the first option and last option, respectively.
2176
- * @default !props.freeSolo
2177
- */
2178
- handleHomeEndKeys: t.bool,
2179
- /**
2180
- * This prop is used to help implement the accessibility logic.
2181
- * If you don't provide an id it will fall back to a randomly generated one.
2182
- */
2183
- id: t.string,
2184
- /**
2185
- * If `true`, the highlight can move to the input.
2186
- * @default false
2187
- */
2188
- includeInputInList: t.bool,
2189
- /**
2190
- * The input value.
2191
- */
2192
- inputValue: t.string,
2193
- /**
2194
- * Used to determine if the option represents the given value.
2195
- * Uses strict equality by default.
2196
- * ⚠️ Both arguments need to be handled, an option can only match with one value.
2197
- *
2198
- * @param {Value} option The option to test.
2199
- * @param {Value} value The value to test against.
2200
- * @returns {boolean}
2201
- */
2202
- isOptionEqualToValue: t.func,
2203
- /**
2204
- * The maximum number of tags that will be visible when not focused.
2205
- * Set `-1` to disable the limit.
2206
- * @default -1
2207
- */
2208
- limitTags: _t,
2209
- /**
2210
- * The component used to render the listbox.
2211
- * @default 'ul'
2212
- * @deprecated Use `slotProps.listbox.component` instead. This prop will be removed in a future major release. See [Migrating from deprecated APIs](/material-ui/migration/migrating-from-deprecated-apis/) for more details.
2213
- */
2214
- ListboxComponent: t.elementType,
2215
- /**
2216
- * Props applied to the Listbox element.
2217
- * @deprecated Use `slotProps.listbox` instead. This prop will be removed in a future major release. See [Migrating from deprecated APIs](/material-ui/migration/migrating-from-deprecated-apis/) for more details.
2218
- */
2219
- ListboxProps: t.object,
2220
- /**
2221
- * If `true`, the component is in a loading state.
2222
- * This shows the `loadingText` in place of suggestions (only if there are no suggestions to show, for example `options` are empty).
2223
- * @default false
2224
- */
2225
- loading: t.bool,
2226
- /**
2227
- * Text to display when in a loading state.
2228
- *
2229
- * For localization purposes, you can use the provided [translations](https://mui.com/material-ui/guides/localization/).
2230
- * @default 'Loading…'
2231
- */
2232
- loadingText: t.node,
2233
- /**
2234
- * If `true`, `value` must be an array and the menu will support multiple selections.
2235
- * @default false
2236
- */
2237
- multiple: t.bool,
2238
- /**
2239
- * Text to display when there are no options.
2240
- *
2241
- * For localization purposes, you can use the provided [translations](https://mui.com/material-ui/guides/localization/).
2242
- * @default 'No options'
2243
- */
2244
- noOptionsText: t.node,
2245
- /**
2246
- * Callback fired when the value changes.
2247
- *
2248
- * @param {React.SyntheticEvent} event The event source of the callback.
2249
- * @param {Value|Value[]} value The new value of the component.
2250
- * @param {string} reason One of "createOption", "selectOption", "removeOption", "blur" or "clear".
2251
- * @param {string} [details]
2252
- */
2253
- onChange: t.func,
2254
- /**
2255
- * Callback fired when the popup requests to be closed.
2256
- * Use in controlled mode (see open).
2257
- *
2258
- * @param {React.SyntheticEvent} event The event source of the callback.
2259
- * @param {string} reason Can be: `"toggleInput"`, `"escape"`, `"selectOption"`, `"removeOption"`, `"blur"`.
2260
- */
2261
- onClose: t.func,
2262
- /**
2263
- * Callback fired when the highlight option changes.
2264
- *
2265
- * @param {React.SyntheticEvent} event The event source of the callback.
2266
- * @param {Value} option The highlighted option.
2267
- * @param {string} reason Can be: `"keyboard"`, `"mouse"`, `"touch"`.
2268
- */
2269
- onHighlightChange: t.func,
2270
- /**
2271
- * Callback fired when the input value changes.
2272
- *
2273
- * @param {React.SyntheticEvent} event The event source of the callback.
2274
- * @param {string} value The new value of the text input.
2275
- * @param {string} reason Can be: `"input"` (user input), `"reset"` (programmatic change), `"clear"`, `"blur"`, `"selectOption"`, `"removeOption"`
2276
- */
2277
- onInputChange: t.func,
2278
- /**
2279
- * @ignore
2280
- */
2281
- onKeyDown: t.func,
2282
- /**
2283
- * Callback fired when the popup requests to be opened.
2284
- * Use in controlled mode (see open).
2285
- *
2286
- * @param {React.SyntheticEvent} event The event source of the callback.
2287
- */
2288
- onOpen: t.func,
2289
- /**
2290
- * If `true`, the component is shown.
2291
- */
2292
- open: t.bool,
2293
- /**
2294
- * If `true`, the popup will open on input focus.
2295
- * @default false
2296
- */
2297
- openOnFocus: t.bool,
2298
- /**
2299
- * Override the default text for the *open popup* icon button.
2300
- *
2301
- * For localization purposes, you can use the provided [translations](https://mui.com/material-ui/guides/localization/).
2302
- * @default 'Open'
2303
- */
2304
- openText: t.string,
2305
- /**
2306
- * A list of options that will be shown in the Autocomplete.
2307
- */
2308
- options: t.array.isRequired,
2309
- /**
2310
- * The component used to render the body of the popup.
2311
- * @default Paper
2312
- * @deprecated Use `slots.paper` instead. This prop will be removed in a future major release. See [Migrating from deprecated APIs](/material-ui/migration/migrating-from-deprecated-apis/) for more details.
2313
- */
2314
- PaperComponent: t.elementType,
2315
- /**
2316
- * The component used to position the popup.
2317
- * @default Popper
2318
- * @deprecated Use `slots.popper` instead. This prop will be removed in a future major release. See [Migrating from deprecated APIs](/material-ui/migration/migrating-from-deprecated-apis/) for more details.
2319
- */
2320
- PopperComponent: t.elementType,
2321
- /**
2322
- * The icon to display in place of the default popup icon.
2323
- * @default <ArrowDropDownIcon />
2324
- */
2325
- popupIcon: t.node,
2326
- /**
2327
- * If `true`, the component becomes readonly. It is also supported for multiple tags where the tag cannot be deleted.
2328
- * @default false
2329
- */
2330
- readOnly: t.bool,
2331
- /**
2332
- * Render the group.
2333
- *
2334
- * @param {AutocompleteRenderGroupParams} params The group to render.
2335
- * @returns {ReactNode}
2336
- */
2337
- renderGroup: t.func,
2338
- /**
2339
- * Render the input.
2340
- *
2341
- * **Note:** The `renderInput` prop must return a `TextField` component or a compatible custom component
2342
- * that correctly forwards `InputProps.ref` and spreads `inputProps`. This ensures proper integration
2343
- * with the Autocomplete's internal logic (e.g., focus management and keyboard navigation).
2344
- *
2345
- * Avoid using components like `DatePicker` or `Select` directly, as they may not forward the required props,
2346
- * leading to runtime errors or unexpected behavior.
2347
- *
2348
- * @param {object} params
2349
- * @returns {ReactNode}
2350
- */
2351
- renderInput: t.func.isRequired,
2352
- /**
2353
- * Render the option, use `getOptionLabel` by default.
2354
- *
2355
- * @param {object} props The props to apply on the li element.
2356
- * @param {Value} option The option to render.
2357
- * @param {object} state The state of each option.
2358
- * @param {object} ownerState The state of the Autocomplete component.
2359
- * @returns {ReactNode}
2360
- */
2361
- renderOption: t.func,
2362
- /**
2363
- * Render the selected value when doing multiple selections.
2364
- *
2365
- * @deprecated Use `renderValue` prop instead
2366
- *
2367
- * @param {Value[]} value The `value` provided to the component.
2368
- * @param {function} getTagProps A tag props getter.
2369
- * @param {object} ownerState The state of the Autocomplete component.
2370
- * @returns {ReactNode}
2371
- */
2372
- renderTags: t.func,
2373
- /**
2374
- * Renders the selected value(s) as rich content in the input for both single and multiple selections.
2375
- *
2376
- * @param {AutocompleteRenderValue<Value, Multiple, FreeSolo>} value The `value` provided to the component.
2377
- * @param {function} getItemProps The value item props.
2378
- * @param {object} ownerState The state of the Autocomplete component.
2379
- * @returns {ReactNode}
2380
- */
2381
- renderValue: t.func,
2382
- /**
2383
- * If `true`, the input's text is selected on focus.
2384
- * It helps the user clear the selected value.
2385
- * @default !props.freeSolo
2386
- */
2387
- selectOnFocus: t.bool,
2388
- /**
2389
- * The size of the component.
2390
- * @default 'medium'
2391
- */
2392
- size: t.oneOfType([t.oneOf(["small", "medium"]), t.string]),
2393
- /**
2394
- * The props used for each slot inside.
2395
- * @default {}
2396
- */
2397
- slotProps: t.shape({
2398
- chip: t.oneOfType([t.func, t.object]),
2399
- clearIndicator: t.oneOfType([t.func, t.object]),
2400
- listbox: t.oneOfType([t.func, t.object]),
2401
- paper: t.oneOfType([t.func, t.object]),
2402
- popper: t.oneOfType([t.func, t.object]),
2403
- popupIndicator: t.oneOfType([t.func, t.object])
2404
- }),
2405
- /**
2406
- * The components used for each slot inside.
2407
- * @default {}
2408
- */
2409
- slots: t.shape({
2410
- listbox: t.elementType,
2411
- paper: t.elementType,
2412
- popper: t.elementType
2413
- }),
2414
- /**
2415
- * The system prop that allows defining system overrides as well as additional CSS styles.
2416
- */
2417
- sx: t.oneOfType([t.arrayOf(t.oneOfType([t.func, t.object, t.bool])), t.func, t.object]),
2418
- /**
2419
- * The value of the autocomplete.
2420
- *
2421
- * The value must have reference equality with the option in order to be selected.
2422
- * You can customize the equality behavior with the `isOptionEqualToValue` prop.
2423
- */
2424
- value: Dt(t.any, (e) => e.multiple && e.value !== void 0 && !Array.isArray(e.value) ? new Error(["MUI: The Autocomplete expects the `value` prop to be an array when `multiple={true}` or undefined.", `However, ${e.value} was provided.`].join(`
2425
- `)) : null)
2426
- });
2427
- export {
2428
- ko as A
2429
- };