@hybridcore/ui 1.6.0 → 1.6.2

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 (291) hide show
  1. package/CATALOG.md +179 -0
  2. package/README.md +1 -2
  3. package/dist/AccordionSummary-CJppWeqF.js +781 -0
  4. package/dist/Add-CqcD1PWb.js +403 -0
  5. package/dist/Box-DqUMmZjL.js +31 -0
  6. package/dist/{Button-CvE2gnly.js → Button-C5yquWAB.js} +120 -133
  7. package/dist/ButtonBase-BEF7oTOe.js +887 -0
  8. package/dist/{Delete-CW0UZv1m.js → Delete-BdyYpINH.js} +9 -8
  9. package/dist/{DialogContent-B3nbEbuv.js → DialogContent-BvVjD9z3.js} +127 -124
  10. package/dist/FormGroup-CpBsIyYR.js +89 -0
  11. package/dist/{IconButton-CHwRQF-g.js → IconButton-BoGwbvrP.js} +41 -43
  12. package/dist/InputLabel-Dd8RrneV.js +341 -0
  13. package/dist/{MenuItem-xZx_w7zA.js → MenuItem-DwqJqzuM.js} +51 -53
  14. package/dist/Modal-MUZygjmQ.js +1158 -0
  15. package/dist/Paper-BkQLdsCI.js +582 -0
  16. package/dist/Select-DHUl_uG3.js +3916 -0
  17. package/dist/SwitchBase-DTndTqI8.js +235 -0
  18. package/dist/TextField-e2oKaUN1.js +669 -0
  19. package/dist/TransitionGroupContext-BDAp2T0O.js +96 -0
  20. package/dist/{Typography-CxbneZy_.js → Typography-DgsSLCFC.js} +53 -53
  21. package/dist/assertThisInitialized-C1dAyb4j.js +7 -0
  22. package/dist/assets/index4.css +1 -0
  23. package/dist/clsx-OuTLNxxd.js +16 -0
  24. package/dist/components/access/helpers.js +1 -1
  25. package/dist/components/access/index.js +8 -15
  26. package/dist/components/access/logic.js +25 -0
  27. package/dist/components/button/index.js +10 -0
  28. package/dist/components/button/logic.js +26 -0
  29. package/dist/components/button/styled.js +9 -0
  30. package/dist/components/card/index.js +158 -498
  31. package/dist/components/card/logic.js +24 -0
  32. package/dist/components/card/styled.js +226 -51
  33. package/dist/components/card-alternate/index.js +111 -139
  34. package/dist/components/card-alternate/logic.js +17 -0
  35. package/dist/components/card-alternate/styled.js +113 -19
  36. package/dist/components/charts/_common/chart-error.js +19 -0
  37. package/dist/components/charts/candlestick/index.js +3 -3
  38. package/dist/components/charts/candlestick/logic.js +123 -113
  39. package/dist/components/charts/chart-wrapper/index.js +5 -5
  40. package/dist/components/charts/column-line-mix/index.js +9 -8
  41. package/dist/components/charts/column-line-mix/logic.js +68 -71
  42. package/dist/components/charts/drill-down-treemap/index.js +8 -7
  43. package/dist/components/charts/drill-down-treemap/logic.js +138 -144
  44. package/dist/components/charts/drill-down-voronoi-treemap/index.js +9 -8
  45. package/dist/components/charts/drill-down-voronoi-treemap/logic.js +222 -228
  46. package/dist/components/charts/heatmap/index.js +9 -8
  47. package/dist/components/charts/heatmap/logic.js +167 -173
  48. package/dist/components/charts/highlighting-line-data/index.js +3 -3
  49. package/dist/components/charts/line/index.js +9 -8
  50. package/dist/components/charts/line/logic.js +74 -79
  51. package/dist/components/charts/logaritmic-scale/index.js +9 -8
  52. package/dist/components/charts/logaritmic-scale/logic.js +63 -69
  53. package/dist/components/charts/multiple-value-axes/index.js +9 -8
  54. package/dist/components/charts/multiple-value-axes/logic.js +101 -107
  55. package/dist/components/charts/nested-pie/index.js +9 -8
  56. package/dist/components/charts/nested-pie/logic.js +62 -68
  57. package/dist/components/charts/packed-circles/index.js +7 -6
  58. package/dist/components/charts/packed-circles/logic.js +50 -56
  59. package/dist/components/charts/pie-chart/index.js +9 -8
  60. package/dist/components/charts/pie-chart/logic.js +49 -54
  61. package/dist/components/charts/stacked-area-radar/index.js +8 -7
  62. package/dist/components/charts/stacked-area-radar/logic.js +113 -118
  63. package/dist/components/charts/stacked-column-chart/index.js +9 -8
  64. package/dist/components/charts/stacked-column-chart/logic.js +78 -84
  65. package/dist/components/charts/xy-chart/index.js +9 -8
  66. package/dist/components/charts/xy-chart/logic.js +56 -60
  67. package/dist/components/collapsible-card/index.js +11 -10
  68. package/dist/components/collapsible-card/styled.js +1 -1
  69. package/dist/components/color-picker/index.js +7120 -0
  70. package/dist/components/color-picker/logic.js +18 -0
  71. package/dist/components/color-picker/styled.js +7 -0
  72. package/dist/components/confirm/dialog.js +3 -3
  73. package/dist/components/confirm/index.js +1 -1
  74. package/dist/components/container/index.js +28 -269
  75. package/dist/components/container/logic.js +12 -0
  76. package/dist/components/container/styled.js +29 -0
  77. package/dist/components/context-menu/index.js +25 -457
  78. package/dist/components/context-menu/logic.js +14 -0
  79. package/dist/components/context-menu/styled.js +40 -0
  80. package/dist/components/data-grid/index.js +22 -0
  81. package/dist/components/data-grid/logic.js +15 -0
  82. package/dist/components/data-grid/styled.js +20 -0
  83. package/dist/components/data-map/components/controls/index.js +4 -6
  84. package/dist/components/data-map/index.js +11 -11
  85. package/dist/components/data-security-selectors/dissemination-list/index.js +192 -191
  86. package/dist/components/data-security-selectors/dissemination-list/styled.js +12 -12
  87. package/dist/components/data-security-selectors/security-level/index.js +39 -91
  88. package/dist/components/data-security-selectors/security-level/logic.js +28 -0
  89. package/dist/components/data-security-selectors/security-level/styled.js +53 -0
  90. package/dist/components/date-picker-with-custom-range/index.js +1 -1
  91. package/dist/components/date-range-picker/index.js +2748 -0
  92. package/dist/components/date-range-picker/styled.js +14 -0
  93. package/dist/components/date-time-picker/index.js +45 -46
  94. package/dist/components/divider/index.js +11 -11
  95. package/dist/components/document-viewer/components/action-buttons/index.js +15 -15
  96. package/dist/components/document-viewer/components/navigation/index.js +9 -9
  97. package/dist/components/document-viewer/components/viewer/index.js +31 -35
  98. package/dist/components/document-viewer/index.js +31 -39
  99. package/dist/components/document-viewer/logic.js +41 -34
  100. package/dist/components/document-viewer/styled.js +115 -27
  101. package/dist/components/duration-select/index.js +27 -0
  102. package/dist/components/duration-select/logic.js +21 -0
  103. package/dist/components/duration-select/styled.js +26 -0
  104. package/dist/components/editable-text/index.js +20 -0
  105. package/dist/components/editable-text/logic.js +18 -0
  106. package/dist/components/editable-text/styled.js +22 -0
  107. package/dist/components/geometry-picker/coordinate/index.js +29 -29
  108. package/dist/components/geometry-picker/edit/index.js +18 -18
  109. package/dist/components/geometry-picker/geometry/index.js +67 -67
  110. package/dist/components/geometry-picker/geometry/map-overlay.js +6 -6
  111. package/dist/components/geometry-picker/index.js +69 -85
  112. package/dist/components/geometry-picker/kml/index.js +16 -16
  113. package/dist/components/geometry-picker/logic.js +50 -57
  114. package/dist/components/geometry-picker/map/index.js +8 -8
  115. package/dist/components/geometry-picker/parser/coordinate-input/index.js +4 -4
  116. package/dist/components/geometry-picker/parser/index.js +46 -50
  117. package/dist/components/geometry-picker/parser/styled.js +22 -4
  118. package/dist/components/geometry-picker/styled.js +97 -37
  119. package/dist/components/geometry-picker/wkt/index.js +13 -13
  120. package/dist/components/heat-map/components/controls/index.js +4 -6
  121. package/dist/components/heat-map/components/legend/index.js +15 -17
  122. package/dist/components/heat-map/index.js +7 -7
  123. package/dist/components/instance-form/components/TopLabelWrapper.js +8 -48
  124. package/dist/components/instance-form/components/composite-list/index.js +5 -3
  125. package/dist/components/instance-form/components/composite-matrix/components/editable-table/index.js +83 -74
  126. package/dist/components/instance-form/components/composite-matrix/components/editor/index.js +45 -66
  127. package/dist/components/instance-form/components/composite-matrix/components/form/index.js +60 -75
  128. package/dist/components/instance-form/components/composite-matrix/components/json-editor/index.js +2425 -2422
  129. package/dist/components/instance-form/components/composite-matrix/components/table/index.js +33 -52
  130. package/dist/components/instance-form/components/composite-matrix/index.js +30 -36
  131. package/dist/components/instance-form/components/policy-list/index.js +47 -81
  132. package/dist/components/instance-form/components/variable/index.js +6 -11
  133. package/dist/components/instance-form/components/variables/index.js +48 -55
  134. package/dist/components/instance-form/helpers.js +9 -0
  135. package/dist/components/instance-form/index.js +402 -518
  136. package/dist/components/instance-form/logic.js +115 -0
  137. package/dist/components/instance-form/styled.js +487 -0
  138. package/dist/components/instance-hierarchy-table/index.js +32 -37
  139. package/dist/components/instance-hierarchy-table/logic.js +16 -0
  140. package/dist/components/instance-hierarchy-table/styled.js +53 -12
  141. package/dist/components/instance-table/index.js +30 -135
  142. package/dist/components/instance-table/logic.js +122 -0
  143. package/dist/components/instance-table/styled.js +53 -11
  144. package/dist/components/instance-variable-list/index.js +11 -11
  145. package/dist/components/loading/index.js +15 -9
  146. package/dist/components/loading/logic.js +15 -0
  147. package/dist/components/loading/styled.js +26 -19
  148. package/dist/components/map/index.js +28 -6
  149. package/dist/components/map/styled.js +1 -1
  150. package/dist/components/notification/index.js +67 -0
  151. package/dist/components/notification/logic.js +30 -0
  152. package/dist/components/notification/store.js +23 -0
  153. package/dist/components/notification/styled.js +52 -0
  154. package/dist/components/object-profile-card/components/avatar/index.js +9 -10
  155. package/dist/components/object-profile-card/index.js +19 -20
  156. package/dist/components/paginated-list/index.js +2 -3
  157. package/dist/components/phone-input/index.js +18 -22
  158. package/dist/components/phone-input/logic.js +14 -0
  159. package/dist/components/phone-input/styled.js +12 -4
  160. package/dist/components/placeholder/index.js +10 -0
  161. package/dist/components/placeholder/logic.js +12 -0
  162. package/dist/components/placeholder/styled.js +32 -0
  163. package/dist/components/positional-tooltip/index.js +24 -0
  164. package/dist/components/positional-tooltip/styled.js +17 -0
  165. package/dist/components/property-mapping/index.js +204 -423
  166. package/dist/components/property-mapping/logic.js +156 -0
  167. package/dist/components/property-mapping/styled.js +199 -0
  168. package/dist/components/prr-map/components/controls/index.js +4 -6
  169. package/dist/components/prr-map/components/legend/index.js +26 -28
  170. package/dist/components/prr-map/index.js +5 -5
  171. package/dist/components/range-selector/components/composite-list-range/index.js +42 -50
  172. package/dist/components/range-selector/components/date-range/index.js +87 -4221
  173. package/dist/components/range-selector/components/geometry-range/index.js +11 -17
  174. package/dist/components/range-selector/components/number-range/index.js +48 -53
  175. package/dist/components/range-selector/components/string-range/index.js +15 -17
  176. package/dist/components/range-selector/index.js +63 -57
  177. package/dist/components/range-selector/logic.js +12 -0
  178. package/dist/components/range-selector/styled.js +4294 -0
  179. package/dist/components/raster-grid-map/components/controls/index.js +4 -6
  180. package/dist/components/raster-grid-map/components/legend/index.js +4 -6
  181. package/dist/components/raster-grid-map/index.js +5 -5
  182. package/dist/components/scroll-drag/index.js +22 -0
  183. package/dist/components/scroll-drag/logic.js +39 -0
  184. package/dist/components/scroll-drag/styled.js +17 -0
  185. package/dist/components/search-input/logic.js +35 -33
  186. package/dist/components/simple-pivot-table/index.js +12 -12
  187. package/dist/components/sortable-list/index.js +599 -0
  188. package/dist/components/sortable-list/logic.js +18 -0
  189. package/dist/components/sortable-list/styled.js +38 -0
  190. package/dist/components/static-text/index.js +6 -6
  191. package/dist/components/stats-box/index.js +12 -0
  192. package/dist/components/stats-box/styled.js +36 -0
  193. package/dist/components/template-filters/components/filter/index.js +13 -18
  194. package/dist/components/template-filters/components/tab-panel/index.js +8 -16
  195. package/dist/components/template-filters/index.js +21 -29
  196. package/dist/components/template-filters/logic.js +18 -0
  197. package/dist/components/template-filters/styled.js +44 -1
  198. package/dist/components/template-form/components/property-list/index.js +27 -26
  199. package/dist/components/template-form/components/property-list/property-list-columns.js +3 -3
  200. package/dist/components/template-form/components/property-list/property-list-form.js +758 -14
  201. package/dist/components/template-form/components/recognition-property-list/index.js +11 -11
  202. package/dist/components/template-form/components/recognition-property-list/recognition-property-list-columns.js +2 -2
  203. package/dist/components/template-form/components/recognition-property-list/recognition-property-list-form.js +24 -23
  204. package/dist/components/template-form/components/select-icon/index.js +24 -24
  205. package/dist/components/template-form/helpers.js +17 -0
  206. package/dist/components/template-form/index.js +270 -309
  207. package/dist/components/template-form/logic.js +69 -0
  208. package/dist/components/template-form/styled.js +84 -0
  209. package/dist/components/template-property-filters/index.js +45 -95
  210. package/dist/components/template-property-filters/logic.js +27 -0
  211. package/dist/components/template-property-filters/property.js +105 -165
  212. package/dist/components/template-property-filters/styled.js +121 -20
  213. package/dist/components/text-overflow/index.js +6 -0
  214. package/dist/components/text-overflow/styled.js +13 -0
  215. package/dist/components/timeline/index.js +12 -12
  216. package/dist/components/toggle-view-button/index.js +35 -0
  217. package/dist/components/toggle-view-button/logic.js +22 -0
  218. package/dist/components/toggle-view-button/styled.js +11 -0
  219. package/dist/components/tree-select/index.js +52 -67
  220. package/dist/components/tree-select/logic.js +59 -0
  221. package/dist/components/tree-select/styled.js +45 -62
  222. package/dist/components/treeview-filter/index.js +43 -65
  223. package/dist/components/treeview-filter/item/index.js +43 -42
  224. package/dist/components/treeview-filter/item-label/index.js +17 -37
  225. package/dist/components/treeview-filter/logic.js +28 -0
  226. package/dist/components/treeview-filter/styled.js +86 -0
  227. package/dist/components/uploader/index.js +532 -567
  228. package/dist/components/uploader/logic.js +74 -0
  229. package/dist/components/uploader/styled.js +93 -46
  230. package/dist/components/visually-hidden-input/index.js +4 -0
  231. package/dist/components/visually-hidden-input/styled.js +18 -0
  232. package/dist/createChainedFunction-C0nujS3O.js +9 -0
  233. package/dist/{createSvgIcon-DrtgaibK.js → createSvgIcon-Ch_cT8az.js} +69 -68
  234. package/dist/createSvgIcon-DuDuASu1.js +62 -0
  235. package/dist/{dialog-DcwXug9J.js → dialog-BYRnCztH.js} +18 -18
  236. package/dist/formControlState-vgaj2ksH.js +10 -0
  237. package/dist/generateUtilityClasses-C3ivN9Ie.js +2973 -0
  238. package/dist/{helpers-B4UL9NMD.js → helpers-D4uXfBfO.js} +2 -2
  239. package/dist/index-BtlzPygz.js +470 -0
  240. package/dist/index-DH6qsPBn.js +153 -0
  241. package/dist/{index-syTc6m_V.js → index-e9xTIYWt.js} +87 -87
  242. package/dist/main.d.ts +1722 -562
  243. package/dist/main.js +161 -128
  244. package/dist/ownerWindow-wg6foiOE.js +10 -0
  245. package/dist/setPrototypeOf-NPgp4cYc.js +8 -0
  246. package/dist/styled-Db1RdcPA.js +323 -0
  247. package/dist/unsupportedProp-DuqR2hj9.js +36 -0
  248. package/dist/useId-BW-oWmul.js +19 -0
  249. package/dist/useMobilePicker-CY8ndYRL.js +8279 -0
  250. package/dist/useSlot-B_Q4vnX5.js +42 -0
  251. package/package.json +15 -7
  252. package/dist/AccordionSummary-DgAwVTk8.js +0 -742
  253. package/dist/Add-DJLrrVHm.js +0 -382
  254. package/dist/Box-p6OtTUEo.js +0 -30
  255. package/dist/ButtonBase-2bPw77UP.js +0 -961
  256. package/dist/CardContent-CSHh-ZlM.js +0 -74
  257. package/dist/Checkbox-CWRMFTBp.js +0 -421
  258. package/dist/FormControl-BLbrq4C7.js +0 -1636
  259. package/dist/FormControlLabel-C8SPv14J.js +0 -195
  260. package/dist/InputAdornment-DLxWUE6H.js +0 -157
  261. package/dist/List-tqElle9C.js +0 -121
  262. package/dist/ListItem-CfjsIg4B.js +0 -430
  263. package/dist/Modal-DhPpOoGB.js +0 -1299
  264. package/dist/Paper-2B03OBmZ.js +0 -169
  265. package/dist/Select-BgYwkZgI.js +0 -2613
  266. package/dist/TextField-1yCesIbH.js +0 -457
  267. package/dist/assertThisInitialized-BUtkG-md.js +0 -13
  268. package/dist/capitalize-ciszXJ7R.js +0 -9
  269. package/dist/components/instance-form/components/composite-list/styled.js +0 -73
  270. package/dist/components/instance-form/components/composite-matrix/components/editor/styled.js +0 -1
  271. package/dist/components/instance-form/components/composite-matrix/styled.js +0 -69
  272. package/dist/components/key-protection/index.js +0 -4
  273. package/dist/components/key-protection/menu.js +0 -85
  274. package/dist/components/key-protection/utils.js +0 -10
  275. package/dist/components/treeview-filter/item/styled.js +0 -39
  276. package/dist/createSvgIcon-BjpIhJ30.js +0 -71
  277. package/dist/createTheme-DYxDnE9u.js +0 -612
  278. package/dist/index-BMS1Otro.js +0 -183
  279. package/dist/index-CcdvNlgr.js +0 -503
  280. package/dist/index-kCJ_Zvl8.js +0 -34
  281. package/dist/isHostComponent-kiaBvYVo.js +0 -6
  282. package/dist/isMuiElement-CxT3_ACP.js +0 -13
  283. package/dist/listItemTextClasses-C3lndiXO.js +0 -16
  284. package/dist/property-list-form-zZQfpR0X.js +0 -386
  285. package/dist/styled-eZwjUruw.js +0 -12
  286. package/dist/unsupportedProp-BND8AB6O.js +0 -25
  287. package/dist/useId-B4-oF9Mq.js +0 -34
  288. package/dist/useMobilePicker-BLg3Blg8.js +0 -7589
  289. package/dist/useThemeProps-BzzHcQyd.js +0 -58
  290. package/dist/utils-BDNynJcd.js +0 -365
  291. package/dist/utils-Bq0ye5vf.js +0 -115
@@ -1,2613 +0,0 @@
1
- import { _ as z, a as s } from "./objectWithoutPropertiesLoose-DJteAcBH.js";
2
- import * as r from "react";
3
- import { P as e } from "./index-C__OZmYy.js";
4
- import { g as ie, u as pe, a as se, c as re, b as wn } from "./useThemeProps-BzzHcQyd.js";
5
- import { r as Fe } from "./index-BMS1Otro.js";
6
- import { s as j, r as fe, a as Mn } from "./styled-eZwjUruw.js";
7
- import { u as nn, P as tn, i as Nn } from "./Paper-2B03OBmZ.js";
8
- import { g as ae, a as on, f as Fn } from "./createTheme-DYxDnE9u.js";
9
- import { jsx as w, jsxs as De } from "react/jsx-runtime";
10
- import { e as Dn, g as $n, M as kn, H as Me } from "./Modal-DhPpOoGB.js";
11
- import { a as me, r as be, u as jn, e as Ln } from "./ButtonBase-2bPw77UP.js";
12
- import { o as de, a as Ue } from "./useId-B4-oF9Mq.js";
13
- import { d as _n } from "./debounce-46wSf_lW.js";
14
- import { T as An, r as Wn, g as ze } from "./utils-BDNynJcd.js";
15
- import { a as Bn } from "./List-tqElle9C.js";
16
- import { c as Te } from "./capitalize-ciszXJ7R.js";
17
- import { i as rn, c as sn, r as an, d as ln, e as un, g as cn, f as dn, h as Vn, b as Un } from "./FormControl-BLbrq4C7.js";
18
- import { u as He } from "./useControlled-BYdyS7Pn.js";
19
- import { u as pn } from "./useFormControl-CatNKXAi.js";
20
- import { c as zn } from "./createSvgIcon-DrtgaibK.js";
21
- const Hn = ["addEndListener", "appear", "children", "easing", "in", "onEnter", "onEntered", "onEntering", "onExit", "onExited", "onExiting", "style", "timeout", "TransitionComponent"];
22
- function Ne(n) {
23
- return `scale(${n}, ${n ** 2})`;
24
- }
25
- const Kn = {
26
- entering: {
27
- opacity: 1,
28
- transform: Ne(1)
29
- },
30
- entered: {
31
- opacity: 1,
32
- transform: "none"
33
- }
34
- }, Se = typeof navigator < "u" && /^((?!chrome|android).)*(safari|mobile)/i.test(navigator.userAgent) && /(os |version\/)15(.|_)4/i.test(navigator.userAgent), $e = /* @__PURE__ */ r.forwardRef(function(t, o) {
35
- const {
36
- addEndListener: a,
37
- appear: f = !0,
38
- children: u,
39
- easing: c,
40
- in: p,
41
- onEnter: b,
42
- onEntered: P,
43
- onEntering: F,
44
- onExit: $,
45
- onExited: M,
46
- onExiting: m,
47
- style: I,
48
- timeout: v = "auto",
49
- // eslint-disable-next-line react/prop-types
50
- TransitionComponent: N = An
51
- } = t, y = z(t, Hn), R = r.useRef(), d = r.useRef(), l = nn(), T = r.useRef(null), S = me(T, u.ref, o), h = (O) => (g) => {
52
- if (O) {
53
- const B = T.current;
54
- g === void 0 ? O(B) : O(B, g);
55
- }
56
- }, L = h(F), A = h((O, g) => {
57
- Wn(O);
58
- const {
59
- duration: B,
60
- delay: q,
61
- easing: V
62
- } = ze({
63
- style: I,
64
- timeout: v,
65
- easing: c
66
- }, {
67
- mode: "enter"
68
- });
69
- let E;
70
- v === "auto" ? (E = l.transitions.getAutoHeightDuration(O.clientHeight), d.current = E) : E = B, O.style.transition = [l.transitions.create("opacity", {
71
- duration: E,
72
- delay: q
73
- }), l.transitions.create("transform", {
74
- duration: Se ? E : E * 0.666,
75
- delay: q,
76
- easing: V
77
- })].join(","), b && b(O, g);
78
- }), D = h(P), W = h(m), J = h((O) => {
79
- const {
80
- duration: g,
81
- delay: B,
82
- easing: q
83
- } = ze({
84
- style: I,
85
- timeout: v,
86
- easing: c
87
- }, {
88
- mode: "exit"
89
- });
90
- let V;
91
- v === "auto" ? (V = l.transitions.getAutoHeightDuration(O.clientHeight), d.current = V) : V = g, O.style.transition = [l.transitions.create("opacity", {
92
- duration: V,
93
- delay: B
94
- }), l.transitions.create("transform", {
95
- duration: Se ? V : V * 0.666,
96
- delay: Se ? B : B || V * 0.333,
97
- easing: q
98
- })].join(","), O.style.opacity = 0, O.style.transform = Ne(0.75), $ && $(O);
99
- }), H = h(M), K = (O) => {
100
- v === "auto" && (R.current = setTimeout(O, d.current || 0)), a && a(T.current, O);
101
- };
102
- return r.useEffect(() => () => {
103
- clearTimeout(R.current);
104
- }, []), /* @__PURE__ */ w(N, s({
105
- appear: f,
106
- in: p,
107
- nodeRef: T,
108
- onEnter: A,
109
- onEntered: D,
110
- onEntering: L,
111
- onExit: J,
112
- onExited: H,
113
- onExiting: W,
114
- addEndListener: K,
115
- timeout: v === "auto" ? null : v
116
- }, y, {
117
- children: (O, g) => /* @__PURE__ */ r.cloneElement(u, s({
118
- style: s({
119
- opacity: 0,
120
- transform: Ne(0.75),
121
- visibility: O === "exited" && !p ? "hidden" : void 0
122
- }, Kn[O], I, u.props.style),
123
- ref: S
124
- }, g))
125
- }));
126
- });
127
- process.env.NODE_ENV !== "production" && ($e.propTypes = {
128
- // ----------------------------- Warning --------------------------------
129
- // | These PropTypes are generated from the TypeScript type definitions |
130
- // | To update them edit the d.ts file and run "yarn proptypes" |
131
- // ----------------------------------------------------------------------
132
- /**
133
- * Add a custom transition end trigger. Called with the transitioning DOM
134
- * node and a done callback. Allows for more fine grained transition end
135
- * logic. Note: Timeouts are still used as a fallback if provided.
136
- */
137
- addEndListener: e.func,
138
- /**
139
- * Perform the enter transition when it first mounts if `in` is also `true`.
140
- * Set this to `false` to disable this behavior.
141
- * @default true
142
- */
143
- appear: e.bool,
144
- /**
145
- * A single child content element.
146
- */
147
- children: Dn.isRequired,
148
- /**
149
- * The transition timing function.
150
- * You may specify a single easing or a object containing enter and exit values.
151
- */
152
- easing: e.oneOfType([e.shape({
153
- enter: e.string,
154
- exit: e.string
155
- }), e.string]),
156
- /**
157
- * If `true`, the component will transition in.
158
- */
159
- in: e.bool,
160
- /**
161
- * @ignore
162
- */
163
- onEnter: e.func,
164
- /**
165
- * @ignore
166
- */
167
- onEntered: e.func,
168
- /**
169
- * @ignore
170
- */
171
- onEntering: e.func,
172
- /**
173
- * @ignore
174
- */
175
- onExit: e.func,
176
- /**
177
- * @ignore
178
- */
179
- onExited: e.func,
180
- /**
181
- * @ignore
182
- */
183
- onExiting: e.func,
184
- /**
185
- * @ignore
186
- */
187
- style: e.object,
188
- /**
189
- * The duration for the transition, in milliseconds.
190
- * You may specify a single timeout for all transitions, or individually with an object.
191
- *
192
- * Set to 'auto' to automatically calculate transition time based on height.
193
- * @default 'auto'
194
- */
195
- timeout: e.oneOfType([e.oneOf(["auto"]), e.number, e.shape({
196
- appear: e.number,
197
- enter: e.number,
198
- exit: e.number
199
- })])
200
- });
201
- $e.muiSupportAuto = !0;
202
- function qn(n) {
203
- return ae("MuiFilledInput", n);
204
- }
205
- const te = s({}, rn, ie("MuiFilledInput", ["root", "underline", "input"])), Gn = ["disableUnderline", "components", "componentsProps", "fullWidth", "hiddenLabel", "inputComponent", "multiline", "slotProps", "slots", "type"], Xn = (n) => {
206
- const {
207
- classes: t,
208
- disableUnderline: o
209
- } = n, f = se({
210
- root: ["root", !o && "underline"],
211
- input: ["input"]
212
- }, qn, t);
213
- return s({}, t, f);
214
- }, Yn = j(sn, {
215
- shouldForwardProp: (n) => fe(n) || n === "classes",
216
- name: "MuiFilledInput",
217
- slot: "Root",
218
- overridesResolver: (n, t) => {
219
- const {
220
- ownerState: o
221
- } = n;
222
- return [...an(n, t), !o.disableUnderline && t.underline];
223
- }
224
- })(({
225
- theme: n,
226
- ownerState: t
227
- }) => {
228
- var o;
229
- const a = n.palette.mode === "light", f = a ? "rgba(0, 0, 0, 0.42)" : "rgba(255, 255, 255, 0.7)", u = a ? "rgba(0, 0, 0, 0.06)" : "rgba(255, 255, 255, 0.09)", c = a ? "rgba(0, 0, 0, 0.09)" : "rgba(255, 255, 255, 0.13)", p = a ? "rgba(0, 0, 0, 0.12)" : "rgba(255, 255, 255, 0.12)";
230
- return s({
231
- position: "relative",
232
- backgroundColor: n.vars ? n.vars.palette.FilledInput.bg : u,
233
- borderTopLeftRadius: (n.vars || n).shape.borderRadius,
234
- borderTopRightRadius: (n.vars || n).shape.borderRadius,
235
- transition: n.transitions.create("background-color", {
236
- duration: n.transitions.duration.shorter,
237
- easing: n.transitions.easing.easeOut
238
- }),
239
- "&:hover": {
240
- backgroundColor: n.vars ? n.vars.palette.FilledInput.hoverBg : c,
241
- // Reset on touch devices, it doesn't add specificity
242
- "@media (hover: none)": {
243
- backgroundColor: n.vars ? n.vars.palette.FilledInput.bg : u
244
- }
245
- },
246
- [`&.${te.focused}`]: {
247
- backgroundColor: n.vars ? n.vars.palette.FilledInput.bg : u
248
- },
249
- [`&.${te.disabled}`]: {
250
- backgroundColor: n.vars ? n.vars.palette.FilledInput.disabledBg : p
251
- }
252
- }, !t.disableUnderline && {
253
- "&:after": {
254
- borderBottom: `2px solid ${(o = (n.vars || n).palette[t.color || "primary"]) == null ? void 0 : o.main}`,
255
- left: 0,
256
- bottom: 0,
257
- // Doing the other way around crash on IE11 "''" https://github.com/cssinjs/jss/issues/242
258
- content: '""',
259
- position: "absolute",
260
- right: 0,
261
- transform: "scaleX(0)",
262
- transition: n.transitions.create("transform", {
263
- duration: n.transitions.duration.shorter,
264
- easing: n.transitions.easing.easeOut
265
- }),
266
- pointerEvents: "none"
267
- // Transparent to the hover style.
268
- },
269
- [`&.${te.focused}:after`]: {
270
- // translateX(0) is a workaround for Safari transform scale bug
271
- // See https://github.com/mui/material-ui/issues/31766
272
- transform: "scaleX(1) translateX(0)"
273
- },
274
- [`&.${te.error}`]: {
275
- "&:before, &:after": {
276
- borderBottomColor: (n.vars || n).palette.error.main
277
- }
278
- },
279
- "&:before": {
280
- borderBottom: `1px solid ${n.vars ? `rgba(${n.vars.palette.common.onBackgroundChannel} / ${n.vars.opacity.inputUnderline})` : f}`,
281
- left: 0,
282
- bottom: 0,
283
- // Doing the other way around crash on IE11 "''" https://github.com/cssinjs/jss/issues/242
284
- content: '"\\00a0"',
285
- position: "absolute",
286
- right: 0,
287
- transition: n.transitions.create("border-bottom-color", {
288
- duration: n.transitions.duration.shorter
289
- }),
290
- pointerEvents: "none"
291
- // Transparent to the hover style.
292
- },
293
- [`&:hover:not(.${te.disabled}, .${te.error}):before`]: {
294
- borderBottom: `1px solid ${(n.vars || n).palette.text.primary}`
295
- },
296
- [`&.${te.disabled}:before`]: {
297
- borderBottomStyle: "dotted"
298
- }
299
- }, t.startAdornment && {
300
- paddingLeft: 12
301
- }, t.endAdornment && {
302
- paddingRight: 12
303
- }, t.multiline && s({
304
- padding: "25px 12px 8px"
305
- }, t.size === "small" && {
306
- paddingTop: 21,
307
- paddingBottom: 4
308
- }, t.hiddenLabel && {
309
- paddingTop: 16,
310
- paddingBottom: 17
311
- }));
312
- }), Jn = j(ln, {
313
- name: "MuiFilledInput",
314
- slot: "Input",
315
- overridesResolver: un
316
- })(({
317
- theme: n,
318
- ownerState: t
319
- }) => s({
320
- paddingTop: 25,
321
- paddingRight: 12,
322
- paddingBottom: 8,
323
- paddingLeft: 12
324
- }, !n.vars && {
325
- "&:-webkit-autofill": {
326
- WebkitBoxShadow: n.palette.mode === "light" ? null : "0 0 0 100px #266798 inset",
327
- WebkitTextFillColor: n.palette.mode === "light" ? null : "#fff",
328
- caretColor: n.palette.mode === "light" ? null : "#fff",
329
- borderTopLeftRadius: "inherit",
330
- borderTopRightRadius: "inherit"
331
- }
332
- }, n.vars && {
333
- "&:-webkit-autofill": {
334
- borderTopLeftRadius: "inherit",
335
- borderTopRightRadius: "inherit"
336
- },
337
- [n.getColorSchemeSelector("dark")]: {
338
- "&:-webkit-autofill": {
339
- WebkitBoxShadow: "0 0 0 100px #266798 inset",
340
- WebkitTextFillColor: "#fff",
341
- caretColor: "#fff"
342
- }
343
- }
344
- }, t.size === "small" && {
345
- paddingTop: 21,
346
- paddingBottom: 4
347
- }, t.hiddenLabel && {
348
- paddingTop: 16,
349
- paddingBottom: 17
350
- }, t.multiline && {
351
- paddingTop: 0,
352
- paddingBottom: 0,
353
- paddingLeft: 0,
354
- paddingRight: 0
355
- }, t.startAdornment && {
356
- paddingLeft: 0
357
- }, t.endAdornment && {
358
- paddingRight: 0
359
- }, t.hiddenLabel && t.size === "small" && {
360
- paddingTop: 8,
361
- paddingBottom: 9
362
- })), ke = /* @__PURE__ */ r.forwardRef(function(t, o) {
363
- var a, f, u, c;
364
- const p = pe({
365
- props: t,
366
- name: "MuiFilledInput"
367
- }), {
368
- components: b = {},
369
- componentsProps: P,
370
- fullWidth: F = !1,
371
- // declare here to prevent spreading to DOM
372
- inputComponent: $ = "input",
373
- multiline: M = !1,
374
- slotProps: m,
375
- slots: I = {},
376
- type: v = "text"
377
- } = p, N = z(p, Gn), y = s({}, p, {
378
- fullWidth: F,
379
- inputComponent: $,
380
- multiline: M,
381
- type: v
382
- }), R = Xn(p), d = {
383
- root: {
384
- ownerState: y
385
- },
386
- input: {
387
- ownerState: y
388
- }
389
- }, l = m ?? P ? on(m ?? P, d) : d, T = (a = (f = I.root) != null ? f : b.Root) != null ? a : Yn, S = (u = (c = I.input) != null ? c : b.Input) != null ? u : Jn;
390
- return /* @__PURE__ */ w(cn, s({
391
- slots: {
392
- root: T,
393
- input: S
394
- },
395
- componentsProps: l,
396
- fullWidth: F,
397
- inputComponent: $,
398
- multiline: M,
399
- ref: o,
400
- type: v
401
- }, N, {
402
- classes: R
403
- }));
404
- });
405
- process.env.NODE_ENV !== "production" && (ke.propTypes = {
406
- // ----------------------------- Warning --------------------------------
407
- // | These PropTypes are generated from the TypeScript type definitions |
408
- // | To update them edit the d.ts file and run "yarn proptypes" |
409
- // ----------------------------------------------------------------------
410
- /**
411
- * This prop helps users to fill forms faster, especially on mobile devices.
412
- * The name can be confusing, as it's more like an autofill.
413
- * You can learn more about it [following the specification](https://html.spec.whatwg.org/multipage/form-control-infrastructure.html#autofill).
414
- */
415
- autoComplete: e.string,
416
- /**
417
- * If `true`, the `input` element is focused during the first mount.
418
- */
419
- autoFocus: e.bool,
420
- /**
421
- * Override or extend the styles applied to the component.
422
- */
423
- classes: e.object,
424
- /**
425
- * The color of the component.
426
- * It supports both default and custom theme colors, which can be added as shown in the
427
- * [palette customization guide](https://mui.com/material-ui/customization/palette/#adding-new-colors).
428
- * The prop defaults to the value (`'primary'`) inherited from the parent FormControl component.
429
- */
430
- color: e.oneOfType([e.oneOf(["primary", "secondary"]), e.string]),
431
- /**
432
- * The components used for each slot inside.
433
- *
434
- * This prop is an alias for the `slots` prop.
435
- * It's recommended to use the `slots` prop instead.
436
- *
437
- * @default {}
438
- */
439
- components: e.shape({
440
- Input: e.elementType,
441
- Root: e.elementType
442
- }),
443
- /**
444
- * The extra props for the slot components.
445
- * You can override the existing props or add new ones.
446
- *
447
- * This prop is an alias for the `slotProps` prop.
448
- * It's recommended to use the `slotProps` prop instead, as `componentsProps` will be deprecated in the future.
449
- *
450
- * @default {}
451
- */
452
- componentsProps: e.shape({
453
- input: e.object,
454
- root: e.object
455
- }),
456
- /**
457
- * The default value. Use when the component is not controlled.
458
- */
459
- defaultValue: e.any,
460
- /**
461
- * If `true`, the component is disabled.
462
- * The prop defaults to the value (`false`) inherited from the parent FormControl component.
463
- */
464
- disabled: e.bool,
465
- /**
466
- * If `true`, the input will not have an underline.
467
- */
468
- disableUnderline: e.bool,
469
- /**
470
- * End `InputAdornment` for this component.
471
- */
472
- endAdornment: e.node,
473
- /**
474
- * If `true`, the `input` will indicate an error.
475
- * The prop defaults to the value (`false`) inherited from the parent FormControl component.
476
- */
477
- error: e.bool,
478
- /**
479
- * If `true`, the `input` will take up the full width of its container.
480
- * @default false
481
- */
482
- fullWidth: e.bool,
483
- /**
484
- * If `true`, the label is hidden.
485
- * This is used to increase density for a `FilledInput`.
486
- * Be sure to add `aria-label` to the `input` element.
487
- * @default false
488
- */
489
- hiddenLabel: e.bool,
490
- /**
491
- * The id of the `input` element.
492
- */
493
- id: e.string,
494
- /**
495
- * The component used for the `input` element.
496
- * Either a string to use a HTML element or a component.
497
- * @default 'input'
498
- */
499
- inputComponent: e.elementType,
500
- /**
501
- * [Attributes](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#Attributes) applied to the `input` element.
502
- * @default {}
503
- */
504
- inputProps: e.object,
505
- /**
506
- * Pass a ref to the `input` element.
507
- */
508
- inputRef: be,
509
- /**
510
- * If `dense`, will adjust vertical spacing. This is normally obtained via context from
511
- * FormControl.
512
- * The prop defaults to the value (`'none'`) inherited from the parent FormControl component.
513
- */
514
- margin: e.oneOf(["dense", "none"]),
515
- /**
516
- * Maximum number of rows to display when multiline option is set to true.
517
- */
518
- maxRows: e.oneOfType([e.number, e.string]),
519
- /**
520
- * Minimum number of rows to display when multiline option is set to true.
521
- */
522
- minRows: e.oneOfType([e.number, e.string]),
523
- /**
524
- * If `true`, a [TextareaAutosize](/material-ui/react-textarea-autosize/) element is rendered.
525
- * @default false
526
- */
527
- multiline: e.bool,
528
- /**
529
- * Name attribute of the `input` element.
530
- */
531
- name: e.string,
532
- /**
533
- * Callback fired when the value is changed.
534
- *
535
- * @param {React.ChangeEvent<HTMLTextAreaElement | HTMLInputElement>} event The event source of the callback.
536
- * You can pull out the new value by accessing `event.target.value` (string).
537
- */
538
- onChange: e.func,
539
- /**
540
- * The short hint displayed in the `input` before the user enters a value.
541
- */
542
- placeholder: e.string,
543
- /**
544
- * It prevents the user from changing the value of the field
545
- * (not from interacting with the field).
546
- */
547
- readOnly: e.bool,
548
- /**
549
- * If `true`, the `input` element is required.
550
- * The prop defaults to the value (`false`) inherited from the parent FormControl component.
551
- */
552
- required: e.bool,
553
- /**
554
- * Number of rows to display when multiline option is set to true.
555
- */
556
- rows: e.oneOfType([e.number, e.string]),
557
- /**
558
- * The extra props for the slot components.
559
- * You can override the existing props or add new ones.
560
- *
561
- * This prop is an alias for the `componentsProps` prop, which will be deprecated in the future.
562
- *
563
- * @default {}
564
- */
565
- slotProps: e.shape({
566
- input: e.object,
567
- root: e.object
568
- }),
569
- /**
570
- * The components used for each slot inside.
571
- *
572
- * This prop is an alias for the `components` prop, which will be deprecated in the future.
573
- *
574
- * @default {}
575
- */
576
- slots: e.shape({
577
- input: e.elementType,
578
- root: e.elementType
579
- }),
580
- /**
581
- * Start `InputAdornment` for this component.
582
- */
583
- startAdornment: e.node,
584
- /**
585
- * The system prop that allows defining system overrides as well as additional CSS styles.
586
- */
587
- sx: e.oneOfType([e.arrayOf(e.oneOfType([e.func, e.object, e.bool])), e.func, e.object]),
588
- /**
589
- * Type of the `input` element. It should be [a valid HTML5 input type](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#Form_%3Cinput%3E_types).
590
- * @default 'text'
591
- */
592
- type: e.string,
593
- /**
594
- * The value of the `input` element, required for a controlled component.
595
- */
596
- value: e.any
597
- });
598
- ke.muiName = "Input";
599
- var Ke;
600
- const Qn = ["children", "classes", "className", "label", "notched"], Zn = j("fieldset")({
601
- textAlign: "left",
602
- position: "absolute",
603
- bottom: 0,
604
- right: 0,
605
- top: -5,
606
- left: 0,
607
- margin: 0,
608
- padding: "0 8px",
609
- pointerEvents: "none",
610
- borderRadius: "inherit",
611
- borderStyle: "solid",
612
- borderWidth: 1,
613
- overflow: "hidden",
614
- minWidth: "0%"
615
- }), et = j("legend")(({
616
- ownerState: n,
617
- theme: t
618
- }) => s({
619
- float: "unset",
620
- // Fix conflict with bootstrap
621
- width: "auto",
622
- // Fix conflict with bootstrap
623
- overflow: "hidden"
624
- }, !n.withLabel && {
625
- padding: 0,
626
- lineHeight: "11px",
627
- // sync with `height` in `legend` styles
628
- transition: t.transitions.create("width", {
629
- duration: 150,
630
- easing: t.transitions.easing.easeOut
631
- })
632
- }, n.withLabel && s({
633
- display: "block",
634
- // Fix conflict with normalize.css and sanitize.css
635
- padding: 0,
636
- height: 11,
637
- // sync with `lineHeight` in `legend` styles
638
- fontSize: "0.75em",
639
- visibility: "hidden",
640
- maxWidth: 0.01,
641
- transition: t.transitions.create("max-width", {
642
- duration: 50,
643
- easing: t.transitions.easing.easeOut
644
- }),
645
- whiteSpace: "nowrap",
646
- "& > span": {
647
- paddingLeft: 5,
648
- paddingRight: 5,
649
- display: "inline-block",
650
- opacity: 0,
651
- visibility: "visible"
652
- }
653
- }, n.notched && {
654
- maxWidth: "100%",
655
- transition: t.transitions.create("max-width", {
656
- duration: 100,
657
- easing: t.transitions.easing.easeOut,
658
- delay: 50
659
- })
660
- })));
661
- function fn(n) {
662
- const {
663
- className: t,
664
- label: o,
665
- notched: a
666
- } = n, f = z(n, Qn), u = o != null && o !== "", c = s({}, n, {
667
- notched: a,
668
- withLabel: u
669
- });
670
- return /* @__PURE__ */ w(Zn, s({
671
- "aria-hidden": !0,
672
- className: t,
673
- ownerState: c
674
- }, f, {
675
- children: /* @__PURE__ */ w(et, {
676
- ownerState: c,
677
- children: u ? /* @__PURE__ */ w("span", {
678
- children: o
679
- }) : (
680
- // notranslate needed while Google Translate will not fix zero-width space issue
681
- Ke || (Ke = /* @__PURE__ */ w("span", {
682
- className: "notranslate",
683
- children: "​"
684
- }))
685
- )
686
- })
687
- }));
688
- }
689
- process.env.NODE_ENV !== "production" && (fn.propTypes = {
690
- /**
691
- * The content of the component.
692
- */
693
- children: e.node,
694
- /**
695
- * Override or extend the styles applied to the component.
696
- * See [CSS API](#css) below for more details.
697
- */
698
- classes: e.object,
699
- /**
700
- * @ignore
701
- */
702
- className: e.string,
703
- /**
704
- * The label.
705
- */
706
- label: e.node,
707
- /**
708
- * If `true`, the outline is notched to accommodate the label.
709
- */
710
- notched: e.bool.isRequired,
711
- /**
712
- * @ignore
713
- */
714
- style: e.object
715
- });
716
- function nt(n) {
717
- return ae("MuiOutlinedInput", n);
718
- }
719
- const ee = s({}, rn, ie("MuiOutlinedInput", ["root", "notchedOutline", "input"])), tt = ["components", "fullWidth", "inputComponent", "label", "multiline", "notched", "slots", "type"], ot = (n) => {
720
- const {
721
- classes: t
722
- } = n, a = se({
723
- root: ["root"],
724
- notchedOutline: ["notchedOutline"],
725
- input: ["input"]
726
- }, nt, t);
727
- return s({}, t, a);
728
- }, rt = j(sn, {
729
- shouldForwardProp: (n) => fe(n) || n === "classes",
730
- name: "MuiOutlinedInput",
731
- slot: "Root",
732
- overridesResolver: an
733
- })(({
734
- theme: n,
735
- ownerState: t
736
- }) => {
737
- const o = n.palette.mode === "light" ? "rgba(0, 0, 0, 0.23)" : "rgba(255, 255, 255, 0.23)";
738
- return s({
739
- position: "relative",
740
- borderRadius: (n.vars || n).shape.borderRadius,
741
- [`&:hover .${ee.notchedOutline}`]: {
742
- borderColor: (n.vars || n).palette.text.primary
743
- },
744
- // Reset on touch devices, it doesn't add specificity
745
- "@media (hover: none)": {
746
- [`&:hover .${ee.notchedOutline}`]: {
747
- borderColor: n.vars ? `rgba(${n.vars.palette.common.onBackgroundChannel} / 0.23)` : o
748
- }
749
- },
750
- [`&.${ee.focused} .${ee.notchedOutline}`]: {
751
- borderColor: (n.vars || n).palette[t.color].main,
752
- borderWidth: 2
753
- },
754
- [`&.${ee.error} .${ee.notchedOutline}`]: {
755
- borderColor: (n.vars || n).palette.error.main
756
- },
757
- [`&.${ee.disabled} .${ee.notchedOutline}`]: {
758
- borderColor: (n.vars || n).palette.action.disabled
759
- }
760
- }, t.startAdornment && {
761
- paddingLeft: 14
762
- }, t.endAdornment && {
763
- paddingRight: 14
764
- }, t.multiline && s({
765
- padding: "16.5px 14px"
766
- }, t.size === "small" && {
767
- padding: "8.5px 14px"
768
- }));
769
- }), it = j(fn, {
770
- name: "MuiOutlinedInput",
771
- slot: "NotchedOutline",
772
- overridesResolver: (n, t) => t.notchedOutline
773
- })(({
774
- theme: n
775
- }) => {
776
- const t = n.palette.mode === "light" ? "rgba(0, 0, 0, 0.23)" : "rgba(255, 255, 255, 0.23)";
777
- return {
778
- borderColor: n.vars ? `rgba(${n.vars.palette.common.onBackgroundChannel} / 0.23)` : t
779
- };
780
- }), st = j(ln, {
781
- name: "MuiOutlinedInput",
782
- slot: "Input",
783
- overridesResolver: un
784
- })(({
785
- theme: n,
786
- ownerState: t
787
- }) => s({
788
- padding: "16.5px 14px"
789
- }, !n.vars && {
790
- "&:-webkit-autofill": {
791
- WebkitBoxShadow: n.palette.mode === "light" ? null : "0 0 0 100px #266798 inset",
792
- WebkitTextFillColor: n.palette.mode === "light" ? null : "#fff",
793
- caretColor: n.palette.mode === "light" ? null : "#fff",
794
- borderRadius: "inherit"
795
- }
796
- }, n.vars && {
797
- "&:-webkit-autofill": {
798
- borderRadius: "inherit"
799
- },
800
- [n.getColorSchemeSelector("dark")]: {
801
- "&:-webkit-autofill": {
802
- WebkitBoxShadow: "0 0 0 100px #266798 inset",
803
- WebkitTextFillColor: "#fff",
804
- caretColor: "#fff"
805
- }
806
- }
807
- }, t.size === "small" && {
808
- padding: "8.5px 14px"
809
- }, t.multiline && {
810
- padding: 0
811
- }, t.startAdornment && {
812
- paddingLeft: 0
813
- }, t.endAdornment && {
814
- paddingRight: 0
815
- })), je = /* @__PURE__ */ r.forwardRef(function(t, o) {
816
- var a, f, u, c, p;
817
- const b = pe({
818
- props: t,
819
- name: "MuiOutlinedInput"
820
- }), {
821
- components: P = {},
822
- fullWidth: F = !1,
823
- inputComponent: $ = "input",
824
- label: M,
825
- multiline: m = !1,
826
- notched: I,
827
- slots: v = {},
828
- type: N = "text"
829
- } = b, y = z(b, tt), R = ot(b), d = pn(), l = dn({
830
- props: b,
831
- muiFormControl: d,
832
- states: ["required"]
833
- }), T = s({}, b, {
834
- color: l.color || "primary",
835
- disabled: l.disabled,
836
- error: l.error,
837
- focused: l.focused,
838
- formControl: d,
839
- fullWidth: F,
840
- hiddenLabel: l.hiddenLabel,
841
- multiline: m,
842
- size: l.size,
843
- type: N
844
- }), S = (a = (f = v.root) != null ? f : P.Root) != null ? a : rt, h = (u = (c = v.input) != null ? c : P.Input) != null ? u : st;
845
- return /* @__PURE__ */ w(cn, s({
846
- slots: {
847
- root: S,
848
- input: h
849
- },
850
- renderSuffix: (L) => /* @__PURE__ */ w(it, {
851
- ownerState: T,
852
- className: R.notchedOutline,
853
- label: M != null && M !== "" && l.required ? p || (p = /* @__PURE__ */ De(r.Fragment, {
854
- children: [M, " ", "*"]
855
- })) : M,
856
- notched: typeof I < "u" ? I : !!(L.startAdornment || L.filled || L.focused)
857
- }),
858
- fullWidth: F,
859
- inputComponent: $,
860
- multiline: m,
861
- ref: o,
862
- type: N
863
- }, y, {
864
- classes: s({}, R, {
865
- notchedOutline: null
866
- })
867
- }));
868
- });
869
- process.env.NODE_ENV !== "production" && (je.propTypes = {
870
- // ----------------------------- Warning --------------------------------
871
- // | These PropTypes are generated from the TypeScript type definitions |
872
- // | To update them edit the d.ts file and run "yarn proptypes" |
873
- // ----------------------------------------------------------------------
874
- /**
875
- * This prop helps users to fill forms faster, especially on mobile devices.
876
- * The name can be confusing, as it's more like an autofill.
877
- * You can learn more about it [following the specification](https://html.spec.whatwg.org/multipage/form-control-infrastructure.html#autofill).
878
- */
879
- autoComplete: e.string,
880
- /**
881
- * If `true`, the `input` element is focused during the first mount.
882
- */
883
- autoFocus: e.bool,
884
- /**
885
- * Override or extend the styles applied to the component.
886
- */
887
- classes: e.object,
888
- /**
889
- * The color of the component.
890
- * It supports both default and custom theme colors, which can be added as shown in the
891
- * [palette customization guide](https://mui.com/material-ui/customization/palette/#adding-new-colors).
892
- * The prop defaults to the value (`'primary'`) inherited from the parent FormControl component.
893
- */
894
- color: e.oneOfType([e.oneOf(["primary", "secondary"]), e.string]),
895
- /**
896
- * The components used for each slot inside.
897
- *
898
- * This prop is an alias for the `slots` prop.
899
- * It's recommended to use the `slots` prop instead.
900
- *
901
- * @default {}
902
- */
903
- components: e.shape({
904
- Input: e.elementType,
905
- Root: e.elementType
906
- }),
907
- /**
908
- * The default value. Use when the component is not controlled.
909
- */
910
- defaultValue: e.any,
911
- /**
912
- * If `true`, the component is disabled.
913
- * The prop defaults to the value (`false`) inherited from the parent FormControl component.
914
- */
915
- disabled: e.bool,
916
- /**
917
- * End `InputAdornment` for this component.
918
- */
919
- endAdornment: e.node,
920
- /**
921
- * If `true`, the `input` will indicate an error.
922
- * The prop defaults to the value (`false`) inherited from the parent FormControl component.
923
- */
924
- error: e.bool,
925
- /**
926
- * If `true`, the `input` will take up the full width of its container.
927
- * @default false
928
- */
929
- fullWidth: e.bool,
930
- /**
931
- * The id of the `input` element.
932
- */
933
- id: e.string,
934
- /**
935
- * The component used for the `input` element.
936
- * Either a string to use a HTML element or a component.
937
- * @default 'input'
938
- */
939
- inputComponent: e.elementType,
940
- /**
941
- * [Attributes](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#Attributes) applied to the `input` element.
942
- * @default {}
943
- */
944
- inputProps: e.object,
945
- /**
946
- * Pass a ref to the `input` element.
947
- */
948
- inputRef: be,
949
- /**
950
- * The label of the `input`. It is only used for layout. The actual labelling
951
- * is handled by `InputLabel`.
952
- */
953
- label: e.node,
954
- /**
955
- * If `dense`, will adjust vertical spacing. This is normally obtained via context from
956
- * FormControl.
957
- * The prop defaults to the value (`'none'`) inherited from the parent FormControl component.
958
- */
959
- margin: e.oneOf(["dense", "none"]),
960
- /**
961
- * Maximum number of rows to display when multiline option is set to true.
962
- */
963
- maxRows: e.oneOfType([e.number, e.string]),
964
- /**
965
- * Minimum number of rows to display when multiline option is set to true.
966
- */
967
- minRows: e.oneOfType([e.number, e.string]),
968
- /**
969
- * If `true`, a [TextareaAutosize](/material-ui/react-textarea-autosize/) element is rendered.
970
- * @default false
971
- */
972
- multiline: e.bool,
973
- /**
974
- * Name attribute of the `input` element.
975
- */
976
- name: e.string,
977
- /**
978
- * If `true`, the outline is notched to accommodate the label.
979
- */
980
- notched: e.bool,
981
- /**
982
- * Callback fired when the value is changed.
983
- *
984
- * @param {React.ChangeEvent<HTMLTextAreaElement | HTMLInputElement>} event The event source of the callback.
985
- * You can pull out the new value by accessing `event.target.value` (string).
986
- */
987
- onChange: e.func,
988
- /**
989
- * The short hint displayed in the `input` before the user enters a value.
990
- */
991
- placeholder: e.string,
992
- /**
993
- * It prevents the user from changing the value of the field
994
- * (not from interacting with the field).
995
- */
996
- readOnly: e.bool,
997
- /**
998
- * If `true`, the `input` element is required.
999
- * The prop defaults to the value (`false`) inherited from the parent FormControl component.
1000
- */
1001
- required: e.bool,
1002
- /**
1003
- * Number of rows to display when multiline option is set to true.
1004
- */
1005
- rows: e.oneOfType([e.number, e.string]),
1006
- /**
1007
- * The components used for each slot inside.
1008
- *
1009
- * This prop is an alias for the `components` prop, which will be deprecated in the future.
1010
- *
1011
- * @default {}
1012
- */
1013
- slots: e.shape({
1014
- input: e.elementType,
1015
- root: e.elementType
1016
- }),
1017
- /**
1018
- * Start `InputAdornment` for this component.
1019
- */
1020
- startAdornment: e.node,
1021
- /**
1022
- * The system prop that allows defining system overrides as well as additional CSS styles.
1023
- */
1024
- sx: e.oneOfType([e.arrayOf(e.oneOfType([e.func, e.object, e.bool])), e.func, e.object]),
1025
- /**
1026
- * Type of the `input` element. It should be [a valid HTML5 input type](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#Form_%3Cinput%3E_types).
1027
- * @default 'text'
1028
- */
1029
- type: e.string,
1030
- /**
1031
- * The value of the `input` element, required for a controlled component.
1032
- */
1033
- value: e.any
1034
- });
1035
- je.muiName = "Input";
1036
- const at = ["actions", "autoFocus", "autoFocusItem", "children", "className", "disabledItemsFocusable", "disableListWrap", "onKeyDown", "variant"];
1037
- function we(n, t, o) {
1038
- return n === t ? n.firstChild : t && t.nextElementSibling ? t.nextElementSibling : o ? null : n.firstChild;
1039
- }
1040
- function qe(n, t, o) {
1041
- return n === t ? o ? n.firstChild : n.lastChild : t && t.previousElementSibling ? t.previousElementSibling : o ? null : n.lastChild;
1042
- }
1043
- function mn(n, t) {
1044
- if (t === void 0)
1045
- return !0;
1046
- let o = n.innerText;
1047
- return o === void 0 && (o = n.textContent), o = o.trim().toLowerCase(), o.length === 0 ? !1 : t.repeating ? o[0] === t.keys[0] : o.indexOf(t.keys.join("")) === 0;
1048
- }
1049
- function ce(n, t, o, a, f, u) {
1050
- let c = !1, p = f(n, t, t ? o : !1);
1051
- for (; p; ) {
1052
- if (p === n.firstChild) {
1053
- if (c)
1054
- return !1;
1055
- c = !0;
1056
- }
1057
- const b = a ? !1 : p.disabled || p.getAttribute("aria-disabled") === "true";
1058
- if (!p.hasAttribute("tabindex") || !mn(p, u) || b)
1059
- p = f(n, p, o);
1060
- else
1061
- return p.focus(), !0;
1062
- }
1063
- return !1;
1064
- }
1065
- const bn = /* @__PURE__ */ r.forwardRef(function(t, o) {
1066
- const {
1067
- // private
1068
- // eslint-disable-next-line react/prop-types
1069
- actions: a,
1070
- autoFocus: f = !1,
1071
- autoFocusItem: u = !1,
1072
- children: c,
1073
- className: p,
1074
- disabledItemsFocusable: b = !1,
1075
- disableListWrap: P = !1,
1076
- onKeyDown: F,
1077
- variant: $ = "selectedMenu"
1078
- } = t, M = z(t, at), m = r.useRef(null), I = r.useRef({
1079
- keys: [],
1080
- repeating: !0,
1081
- previousKeyMatched: !0,
1082
- lastTime: null
1083
- });
1084
- jn(() => {
1085
- f && m.current.focus();
1086
- }, [f]), r.useImperativeHandle(a, () => ({
1087
- adjustStyleForScrollbar: (d, l) => {
1088
- const T = !m.current.style.width;
1089
- if (d.clientHeight < m.current.clientHeight && T) {
1090
- const S = `${$n(de(d))}px`;
1091
- m.current.style[l.direction === "rtl" ? "paddingLeft" : "paddingRight"] = S, m.current.style.width = `calc(100% + ${S})`;
1092
- }
1093
- return m.current;
1094
- }
1095
- }), []);
1096
- const v = (d) => {
1097
- const l = m.current, T = d.key, S = de(l).activeElement;
1098
- if (T === "ArrowDown")
1099
- d.preventDefault(), ce(l, S, P, b, we);
1100
- else if (T === "ArrowUp")
1101
- d.preventDefault(), ce(l, S, P, b, qe);
1102
- else if (T === "Home")
1103
- d.preventDefault(), ce(l, null, P, b, we);
1104
- else if (T === "End")
1105
- d.preventDefault(), ce(l, null, P, b, qe);
1106
- else if (T.length === 1) {
1107
- const h = I.current, L = T.toLowerCase(), A = performance.now();
1108
- h.keys.length > 0 && (A - h.lastTime > 500 ? (h.keys = [], h.repeating = !0, h.previousKeyMatched = !0) : h.repeating && L !== h.keys[0] && (h.repeating = !1)), h.lastTime = A, h.keys.push(L);
1109
- const D = S && !h.repeating && mn(S, h);
1110
- h.previousKeyMatched && (D || ce(l, S, !1, b, we, h)) ? d.preventDefault() : h.previousKeyMatched = !1;
1111
- }
1112
- F && F(d);
1113
- }, N = me(m, o);
1114
- let y = -1;
1115
- r.Children.forEach(c, (d, l) => {
1116
- /* @__PURE__ */ r.isValidElement(d) && (process.env.NODE_ENV !== "production" && Fe.isFragment(d) && console.error(["MUI: The Menu component doesn't accept a Fragment as a child.", "Consider providing an array instead."].join(`
1117
- `)), d.props.disabled || ($ === "selectedMenu" && d.props.selected || y === -1) && (y = l), y === l && (d.props.disabled || d.props.muiSkipListHighlight || d.type.muiSkipListHighlight) && (y += 1, y >= c.length && (y = -1)));
1118
- });
1119
- const R = r.Children.map(c, (d, l) => {
1120
- if (l === y) {
1121
- const T = {};
1122
- return u && (T.autoFocus = !0), d.props.tabIndex === void 0 && $ === "selectedMenu" && (T.tabIndex = 0), /* @__PURE__ */ r.cloneElement(d, T);
1123
- }
1124
- return d;
1125
- });
1126
- return /* @__PURE__ */ w(Bn, s({
1127
- role: "menu",
1128
- ref: N,
1129
- className: p,
1130
- onKeyDown: v,
1131
- tabIndex: f ? 0 : -1
1132
- }, M, {
1133
- children: R
1134
- }));
1135
- });
1136
- process.env.NODE_ENV !== "production" && (bn.propTypes = {
1137
- // ----------------------------- Warning --------------------------------
1138
- // | These PropTypes are generated from the TypeScript type definitions |
1139
- // | To update them edit the d.ts file and run "yarn proptypes" |
1140
- // ----------------------------------------------------------------------
1141
- /**
1142
- * If `true`, will focus the `[role="menu"]` container and move into tab order.
1143
- * @default false
1144
- */
1145
- autoFocus: e.bool,
1146
- /**
1147
- * If `true`, will focus the first menuitem if `variant="menu"` or selected item
1148
- * if `variant="selectedMenu"`.
1149
- * @default false
1150
- */
1151
- autoFocusItem: e.bool,
1152
- /**
1153
- * MenuList contents, normally `MenuItem`s.
1154
- */
1155
- children: e.node,
1156
- /**
1157
- * @ignore
1158
- */
1159
- className: e.string,
1160
- /**
1161
- * If `true`, will allow focus on disabled items.
1162
- * @default false
1163
- */
1164
- disabledItemsFocusable: e.bool,
1165
- /**
1166
- * If `true`, the menu items will not wrap focus.
1167
- * @default false
1168
- */
1169
- disableListWrap: e.bool,
1170
- /**
1171
- * @ignore
1172
- */
1173
- onKeyDown: e.func,
1174
- /**
1175
- * The variant to use. Use `menu` to prevent selected items from impacting the initial focus
1176
- * and the vertical alignment relative to the anchor element.
1177
- * @default 'selectedMenu'
1178
- */
1179
- variant: e.oneOf(["menu", "selectedMenu"])
1180
- });
1181
- function lt(n) {
1182
- return ae("MuiPopover", n);
1183
- }
1184
- ie("MuiPopover", ["root", "paper"]);
1185
- const ut = ["onEntering"], ct = ["action", "anchorEl", "anchorOrigin", "anchorPosition", "anchorReference", "children", "className", "container", "elevation", "marginThreshold", "open", "PaperProps", "transformOrigin", "TransitionComponent", "transitionDuration", "TransitionProps"];
1186
- function Ge(n, t) {
1187
- let o = 0;
1188
- return typeof t == "number" ? o = t : t === "center" ? o = n.height / 2 : t === "bottom" && (o = n.height), o;
1189
- }
1190
- function Xe(n, t) {
1191
- let o = 0;
1192
- return typeof t == "number" ? o = t : t === "center" ? o = n.width / 2 : t === "right" && (o = n.width), o;
1193
- }
1194
- function Ye(n) {
1195
- return [n.horizontal, n.vertical].map((t) => typeof t == "number" ? `${t}px` : t).join(" ");
1196
- }
1197
- function Re(n) {
1198
- return typeof n == "function" ? n() : n;
1199
- }
1200
- const dt = (n) => {
1201
- const {
1202
- classes: t
1203
- } = n;
1204
- return se({
1205
- root: ["root"],
1206
- paper: ["paper"]
1207
- }, lt, t);
1208
- }, pt = j(kn, {
1209
- name: "MuiPopover",
1210
- slot: "Root",
1211
- overridesResolver: (n, t) => t.root
1212
- })({}), ft = j(tn, {
1213
- name: "MuiPopover",
1214
- slot: "Paper",
1215
- overridesResolver: (n, t) => t.paper
1216
- })({
1217
- position: "absolute",
1218
- overflowY: "auto",
1219
- overflowX: "hidden",
1220
- // So we see the popover when it's empty.
1221
- // It's most likely on issue on userland.
1222
- minWidth: 16,
1223
- minHeight: 16,
1224
- maxWidth: "calc(100% - 32px)",
1225
- maxHeight: "calc(100% - 32px)",
1226
- // We disable the focus ring for mouse, touch and keyboard users.
1227
- outline: 0
1228
- }), hn = /* @__PURE__ */ r.forwardRef(function(t, o) {
1229
- const a = pe({
1230
- props: t,
1231
- name: "MuiPopover"
1232
- }), {
1233
- action: f,
1234
- anchorEl: u,
1235
- anchorOrigin: c = {
1236
- vertical: "top",
1237
- horizontal: "left"
1238
- },
1239
- anchorPosition: p,
1240
- anchorReference: b = "anchorEl",
1241
- children: P,
1242
- className: F,
1243
- container: $,
1244
- elevation: M = 8,
1245
- marginThreshold: m = 16,
1246
- open: I,
1247
- PaperProps: v = {},
1248
- transformOrigin: N = {
1249
- vertical: "top",
1250
- horizontal: "left"
1251
- },
1252
- TransitionComponent: y = $e,
1253
- transitionDuration: R = "auto",
1254
- TransitionProps: {
1255
- onEntering: d
1256
- } = {}
1257
- } = a, l = z(a.TransitionProps, ut), T = z(a, ct), S = r.useRef(), h = me(S, v.ref), L = s({}, a, {
1258
- anchorOrigin: c,
1259
- anchorReference: b,
1260
- elevation: M,
1261
- marginThreshold: m,
1262
- PaperProps: v,
1263
- transformOrigin: N,
1264
- TransitionComponent: y,
1265
- transitionDuration: R,
1266
- TransitionProps: l
1267
- }), A = dt(L), D = r.useCallback(() => {
1268
- if (b === "anchorPosition")
1269
- return process.env.NODE_ENV !== "production" && (p || console.error('MUI: You need to provide a `anchorPosition` prop when using <Popover anchorReference="anchorPosition" />.')), p;
1270
- const E = Re(u), x = E && E.nodeType === 1 ? E : de(S.current).body, k = x.getBoundingClientRect();
1271
- if (process.env.NODE_ENV !== "production") {
1272
- const Y = x.getBoundingClientRect();
1273
- process.env.NODE_ENV !== "test" && Y.top === 0 && Y.left === 0 && Y.right === 0 && Y.bottom === 0 && console.warn(["MUI: The `anchorEl` prop provided to the component is invalid.", "The anchor element should be part of the document layout.", "Make sure the element is present in the document or that it's not display none."].join(`
1274
- `));
1275
- }
1276
- return {
1277
- top: k.top + Ge(k, c.vertical),
1278
- left: k.left + Xe(k, c.horizontal)
1279
- };
1280
- }, [u, c.horizontal, c.vertical, p, b]), W = r.useCallback((E) => ({
1281
- vertical: Ge(E, N.vertical),
1282
- horizontal: Xe(E, N.horizontal)
1283
- }), [N.horizontal, N.vertical]), J = r.useCallback((E) => {
1284
- const x = {
1285
- width: E.offsetWidth,
1286
- height: E.offsetHeight
1287
- }, k = W(x);
1288
- if (b === "none")
1289
- return {
1290
- top: null,
1291
- left: null,
1292
- transformOrigin: Ye(k)
1293
- };
1294
- const Y = D();
1295
- let G = Y.top - k.vertical, Q = Y.left - k.horizontal;
1296
- const le = G + x.height, he = Q + x.width, ge = Ue(Re(u)), X = ge.innerHeight - m, ne = ge.innerWidth - m;
1297
- if (G < m) {
1298
- const U = G - m;
1299
- G -= U, k.vertical += U;
1300
- } else if (le > X) {
1301
- const U = le - X;
1302
- G -= U, k.vertical += U;
1303
- }
1304
- if (process.env.NODE_ENV !== "production" && x.height > X && x.height && X && console.error(["MUI: The popover component is too tall.", `Some part of it can not be seen on the screen (${x.height - X}px).`, "Please consider adding a `max-height` to improve the user-experience."].join(`
1305
- `)), Q < m) {
1306
- const U = Q - m;
1307
- Q -= U, k.horizontal += U;
1308
- } else if (he > ne) {
1309
- const U = he - ne;
1310
- Q -= U, k.horizontal += U;
1311
- }
1312
- return {
1313
- top: `${Math.round(G)}px`,
1314
- left: `${Math.round(Q)}px`,
1315
- transformOrigin: Ye(k)
1316
- };
1317
- }, [u, b, D, W, m]), [H, K] = r.useState(I), O = r.useCallback(() => {
1318
- const E = S.current;
1319
- if (!E)
1320
- return;
1321
- const x = J(E);
1322
- x.top !== null && (E.style.top = x.top), x.left !== null && (E.style.left = x.left), E.style.transformOrigin = x.transformOrigin, K(!0);
1323
- }, [J]), g = (E, x) => {
1324
- d && d(E, x), O();
1325
- }, B = () => {
1326
- K(!1);
1327
- };
1328
- r.useEffect(() => {
1329
- I && O();
1330
- }), r.useImperativeHandle(f, () => I ? {
1331
- updatePosition: () => {
1332
- O();
1333
- }
1334
- } : null, [I, O]), r.useEffect(() => {
1335
- if (!I)
1336
- return;
1337
- const E = _n(() => {
1338
- O();
1339
- }), x = Ue(u);
1340
- return x.addEventListener("resize", E), () => {
1341
- E.clear(), x.removeEventListener("resize", E);
1342
- };
1343
- }, [u, I, O]);
1344
- let q = R;
1345
- R === "auto" && !y.muiSupportAuto && (q = void 0);
1346
- const V = $ || (u ? de(Re(u)).body : void 0);
1347
- return /* @__PURE__ */ w(pt, s({
1348
- BackdropProps: {
1349
- invisible: !0
1350
- },
1351
- className: re(A.root, F),
1352
- container: V,
1353
- open: I,
1354
- ref: o,
1355
- ownerState: L
1356
- }, T, {
1357
- children: /* @__PURE__ */ w(y, s({
1358
- appear: !0,
1359
- in: I,
1360
- onEntering: g,
1361
- onExited: B,
1362
- timeout: q
1363
- }, l, {
1364
- children: /* @__PURE__ */ w(ft, s({
1365
- elevation: M
1366
- }, v, {
1367
- ref: h,
1368
- className: re(A.paper, v.className)
1369
- }, H ? void 0 : {
1370
- style: s({}, v.style, {
1371
- opacity: 0
1372
- })
1373
- }, {
1374
- ownerState: L,
1375
- children: P
1376
- }))
1377
- }))
1378
- }));
1379
- });
1380
- process.env.NODE_ENV !== "production" && (hn.propTypes = {
1381
- // ----------------------------- Warning --------------------------------
1382
- // | These PropTypes are generated from the TypeScript type definitions |
1383
- // | To update them edit the d.ts file and run "yarn proptypes" |
1384
- // ----------------------------------------------------------------------
1385
- /**
1386
- * A ref for imperative actions.
1387
- * It currently only supports updatePosition() action.
1388
- */
1389
- action: be,
1390
- /**
1391
- * An HTML element, or a function that returns one.
1392
- * It's used to set the position of the popover.
1393
- */
1394
- anchorEl: wn(e.oneOfType([Me, e.func]), (n) => {
1395
- if (n.open && (!n.anchorReference || n.anchorReference === "anchorEl")) {
1396
- const t = Re(n.anchorEl);
1397
- if (t && t.nodeType === 1) {
1398
- const o = t.getBoundingClientRect();
1399
- if (process.env.NODE_ENV !== "test" && o.top === 0 && o.left === 0 && o.right === 0 && o.bottom === 0)
1400
- return new Error(["MUI: The `anchorEl` prop provided to the component is invalid.", "The anchor element should be part of the document layout.", "Make sure the element is present in the document or that it's not display none."].join(`
1401
- `));
1402
- } else
1403
- return new Error(["MUI: The `anchorEl` prop provided to the component is invalid.", `It should be an Element instance but it's \`${t}\` instead.`].join(`
1404
- `));
1405
- }
1406
- return null;
1407
- }),
1408
- /**
1409
- * This is the point on the anchor where the popover's
1410
- * `anchorEl` will attach to. This is not used when the
1411
- * anchorReference is 'anchorPosition'.
1412
- *
1413
- * Options:
1414
- * vertical: [top, center, bottom];
1415
- * horizontal: [left, center, right].
1416
- * @default {
1417
- * vertical: 'top',
1418
- * horizontal: 'left',
1419
- * }
1420
- */
1421
- anchorOrigin: e.shape({
1422
- horizontal: e.oneOfType([e.oneOf(["center", "left", "right"]), e.number]).isRequired,
1423
- vertical: e.oneOfType([e.oneOf(["bottom", "center", "top"]), e.number]).isRequired
1424
- }),
1425
- /**
1426
- * This is the position that may be used to set the position of the popover.
1427
- * The coordinates are relative to the application's client area.
1428
- */
1429
- anchorPosition: e.shape({
1430
- left: e.number.isRequired,
1431
- top: e.number.isRequired
1432
- }),
1433
- /**
1434
- * This determines which anchor prop to refer to when setting
1435
- * the position of the popover.
1436
- * @default 'anchorEl'
1437
- */
1438
- anchorReference: e.oneOf(["anchorEl", "anchorPosition", "none"]),
1439
- /**
1440
- * The content of the component.
1441
- */
1442
- children: e.node,
1443
- /**
1444
- * Override or extend the styles applied to the component.
1445
- */
1446
- classes: e.object,
1447
- /**
1448
- * @ignore
1449
- */
1450
- className: e.string,
1451
- /**
1452
- * An HTML element, component instance, or function that returns either.
1453
- * The `container` will passed to the Modal component.
1454
- *
1455
- * By default, it uses the body of the anchorEl's top-level document object,
1456
- * so it's simply `document.body` most of the time.
1457
- */
1458
- container: e.oneOfType([Me, e.func]),
1459
- /**
1460
- * The elevation of the popover.
1461
- * @default 8
1462
- */
1463
- elevation: Nn,
1464
- /**
1465
- * Specifies how close to the edge of the window the popover can appear.
1466
- * @default 16
1467
- */
1468
- marginThreshold: e.number,
1469
- /**
1470
- * Callback fired when the component requests to be closed.
1471
- * The `reason` parameter can optionally be used to control the response to `onClose`.
1472
- */
1473
- onClose: e.func,
1474
- /**
1475
- * If `true`, the component is shown.
1476
- */
1477
- open: e.bool.isRequired,
1478
- /**
1479
- * Props applied to the [`Paper`](/material-ui/api/paper/) element.
1480
- * @default {}
1481
- */
1482
- PaperProps: e.shape({
1483
- component: Ln
1484
- }),
1485
- /**
1486
- * The system prop that allows defining system overrides as well as additional CSS styles.
1487
- */
1488
- sx: e.oneOfType([e.arrayOf(e.oneOfType([e.func, e.object, e.bool])), e.func, e.object]),
1489
- /**
1490
- * This is the point on the popover which
1491
- * will attach to the anchor's origin.
1492
- *
1493
- * Options:
1494
- * vertical: [top, center, bottom, x(px)];
1495
- * horizontal: [left, center, right, x(px)].
1496
- * @default {
1497
- * vertical: 'top',
1498
- * horizontal: 'left',
1499
- * }
1500
- */
1501
- transformOrigin: e.shape({
1502
- horizontal: e.oneOfType([e.oneOf(["center", "left", "right"]), e.number]).isRequired,
1503
- vertical: e.oneOfType([e.oneOf(["bottom", "center", "top"]), e.number]).isRequired
1504
- }),
1505
- /**
1506
- * The component used for the transition.
1507
- * [Follow this guide](/material-ui/transitions/#transitioncomponent-prop) to learn more about the requirements for this component.
1508
- * @default Grow
1509
- */
1510
- TransitionComponent: e.elementType,
1511
- /**
1512
- * Set to 'auto' to automatically calculate transition time based on height.
1513
- * @default 'auto'
1514
- */
1515
- transitionDuration: e.oneOfType([e.oneOf(["auto"]), e.number, e.shape({
1516
- appear: e.number,
1517
- enter: e.number,
1518
- exit: e.number
1519
- })]),
1520
- /**
1521
- * Props applied to the transition element.
1522
- * By default, the element is based on this [`Transition`](http://reactcommunity.org/react-transition-group/transition/) component.
1523
- * @default {}
1524
- */
1525
- TransitionProps: e.object
1526
- });
1527
- function mt(n) {
1528
- return ae("MuiMenu", n);
1529
- }
1530
- ie("MuiMenu", ["root", "paper", "list"]);
1531
- const bt = ["onEntering"], ht = ["autoFocus", "children", "disableAutoFocusItem", "MenuListProps", "onClose", "open", "PaperProps", "PopoverClasses", "transitionDuration", "TransitionProps", "variant"], gt = {
1532
- vertical: "top",
1533
- horizontal: "right"
1534
- }, vt = {
1535
- vertical: "top",
1536
- horizontal: "left"
1537
- }, yt = (n) => {
1538
- const {
1539
- classes: t
1540
- } = n;
1541
- return se({
1542
- root: ["root"],
1543
- paper: ["paper"],
1544
- list: ["list"]
1545
- }, mt, t);
1546
- }, Ot = j(hn, {
1547
- shouldForwardProp: (n) => fe(n) || n === "classes",
1548
- name: "MuiMenu",
1549
- slot: "Root",
1550
- overridesResolver: (n, t) => t.root
1551
- })({}), Et = j(tn, {
1552
- name: "MuiMenu",
1553
- slot: "Paper",
1554
- overridesResolver: (n, t) => t.paper
1555
- })({
1556
- // specZ: The maximum height of a simple menu should be one or more rows less than the view
1557
- // height. This ensures a tapable area outside of the simple menu with which to dismiss
1558
- // the menu.
1559
- maxHeight: "calc(100% - 96px)",
1560
- // Add iOS momentum scrolling for iOS < 13.0
1561
- WebkitOverflowScrolling: "touch"
1562
- }), Ct = j(bn, {
1563
- name: "MuiMenu",
1564
- slot: "List",
1565
- overridesResolver: (n, t) => t.list
1566
- })({
1567
- // We disable the focus ring for mouse, touch and keyboard users.
1568
- outline: 0
1569
- }), gn = /* @__PURE__ */ r.forwardRef(function(t, o) {
1570
- const a = pe({
1571
- props: t,
1572
- name: "MuiMenu"
1573
- }), {
1574
- autoFocus: f = !0,
1575
- children: u,
1576
- disableAutoFocusItem: c = !1,
1577
- MenuListProps: p = {},
1578
- onClose: b,
1579
- open: P,
1580
- PaperProps: F = {},
1581
- PopoverClasses: $,
1582
- transitionDuration: M = "auto",
1583
- TransitionProps: {
1584
- onEntering: m
1585
- } = {},
1586
- variant: I = "selectedMenu"
1587
- } = a, v = z(a.TransitionProps, bt), N = z(a, ht), y = nn(), R = y.direction === "rtl", d = s({}, a, {
1588
- autoFocus: f,
1589
- disableAutoFocusItem: c,
1590
- MenuListProps: p,
1591
- onEntering: m,
1592
- PaperProps: F,
1593
- transitionDuration: M,
1594
- TransitionProps: v,
1595
- variant: I
1596
- }), l = yt(d), T = f && !c && P, S = r.useRef(null), h = (D, W) => {
1597
- S.current && S.current.adjustStyleForScrollbar(D, y), m && m(D, W);
1598
- }, L = (D) => {
1599
- D.key === "Tab" && (D.preventDefault(), b && b(D, "tabKeyDown"));
1600
- };
1601
- let A = -1;
1602
- return r.Children.map(u, (D, W) => {
1603
- /* @__PURE__ */ r.isValidElement(D) && (process.env.NODE_ENV !== "production" && Fe.isFragment(D) && console.error(["MUI: The Menu component doesn't accept a Fragment as a child.", "Consider providing an array instead."].join(`
1604
- `)), D.props.disabled || (I === "selectedMenu" && D.props.selected || A === -1) && (A = W));
1605
- }), /* @__PURE__ */ w(Ot, s({
1606
- onClose: b,
1607
- anchorOrigin: {
1608
- vertical: "bottom",
1609
- horizontal: R ? "right" : "left"
1610
- },
1611
- transformOrigin: R ? gt : vt,
1612
- PaperProps: s({
1613
- as: Et
1614
- }, F, {
1615
- classes: s({}, F.classes, {
1616
- root: l.paper
1617
- })
1618
- }),
1619
- className: l.root,
1620
- open: P,
1621
- ref: o,
1622
- transitionDuration: M,
1623
- TransitionProps: s({
1624
- onEntering: h
1625
- }, v),
1626
- ownerState: d
1627
- }, N, {
1628
- classes: $,
1629
- children: /* @__PURE__ */ w(Ct, s({
1630
- onKeyDown: L,
1631
- actions: S,
1632
- autoFocus: f && (A === -1 || c),
1633
- autoFocusItem: T,
1634
- variant: I
1635
- }, p, {
1636
- className: re(l.list, p.className),
1637
- children: u
1638
- }))
1639
- }));
1640
- });
1641
- process.env.NODE_ENV !== "production" && (gn.propTypes = {
1642
- // ----------------------------- Warning --------------------------------
1643
- // | These PropTypes are generated from the TypeScript type definitions |
1644
- // | To update them edit the d.ts file and run "yarn proptypes" |
1645
- // ----------------------------------------------------------------------
1646
- /**
1647
- * An HTML element, or a function that returns one.
1648
- * It's used to set the position of the menu.
1649
- */
1650
- anchorEl: e.oneOfType([Me, e.func]),
1651
- /**
1652
- * If `true` (Default) will focus the `[role="menu"]` if no focusable child is found. Disabled
1653
- * children are not focusable. If you set this prop to `false` focus will be placed
1654
- * on the parent modal container. This has severe accessibility implications
1655
- * and should only be considered if you manage focus otherwise.
1656
- * @default true
1657
- */
1658
- autoFocus: e.bool,
1659
- /**
1660
- * Menu contents, normally `MenuItem`s.
1661
- */
1662
- children: e.node,
1663
- /**
1664
- * Override or extend the styles applied to the component.
1665
- */
1666
- classes: e.object,
1667
- /**
1668
- * When opening the menu will not focus the active item but the `[role="menu"]`
1669
- * unless `autoFocus` is also set to `false`. Not using the default means not
1670
- * following WAI-ARIA authoring practices. Please be considerate about possible
1671
- * accessibility implications.
1672
- * @default false
1673
- */
1674
- disableAutoFocusItem: e.bool,
1675
- /**
1676
- * Props applied to the [`MenuList`](/material-ui/api/menu-list/) element.
1677
- * @default {}
1678
- */
1679
- MenuListProps: e.object,
1680
- /**
1681
- * Callback fired when the component requests to be closed.
1682
- *
1683
- * @param {object} event The event source of the callback.
1684
- * @param {string} reason Can be: `"escapeKeyDown"`, `"backdropClick"`, `"tabKeyDown"`.
1685
- */
1686
- onClose: e.func,
1687
- /**
1688
- * If `true`, the component is shown.
1689
- */
1690
- open: e.bool.isRequired,
1691
- /**
1692
- * @ignore
1693
- */
1694
- PaperProps: e.object,
1695
- /**
1696
- * `classes` prop applied to the [`Popover`](/material-ui/api/popover/) element.
1697
- */
1698
- PopoverClasses: e.object,
1699
- /**
1700
- * The system prop that allows defining system overrides as well as additional CSS styles.
1701
- */
1702
- sx: e.oneOfType([e.arrayOf(e.oneOfType([e.func, e.object, e.bool])), e.func, e.object]),
1703
- /**
1704
- * The length of the transition in `ms`, or 'auto'
1705
- * @default 'auto'
1706
- */
1707
- transitionDuration: e.oneOfType([e.oneOf(["auto"]), e.number, e.shape({
1708
- appear: e.number,
1709
- enter: e.number,
1710
- exit: e.number
1711
- })]),
1712
- /**
1713
- * Props applied to the transition element.
1714
- * By default, the element is based on this [`Transition`](http://reactcommunity.org/react-transition-group/transition/) component.
1715
- * @default {}
1716
- */
1717
- TransitionProps: e.object,
1718
- /**
1719
- * The variant to use. Use `menu` to prevent selected items from impacting the initial focus.
1720
- * @default 'selectedMenu'
1721
- */
1722
- variant: e.oneOf(["menu", "selectedMenu"])
1723
- });
1724
- function Rt(n) {
1725
- return ae("MuiNativeSelect", n);
1726
- }
1727
- const Le = ie("MuiNativeSelect", ["root", "select", "multiple", "filled", "outlined", "standard", "disabled", "icon", "iconOpen", "iconFilled", "iconOutlined", "iconStandard", "nativeInput"]), Tt = ["className", "disabled", "IconComponent", "inputRef", "variant"], It = (n) => {
1728
- const {
1729
- classes: t,
1730
- variant: o,
1731
- disabled: a,
1732
- multiple: f,
1733
- open: u
1734
- } = n, c = {
1735
- select: ["select", o, a && "disabled", f && "multiple"],
1736
- icon: ["icon", `icon${Te(o)}`, u && "iconOpen", a && "disabled"]
1737
- };
1738
- return se(c, Rt, t);
1739
- }, vn = ({
1740
- ownerState: n,
1741
- theme: t
1742
- }) => s({
1743
- MozAppearance: "none",
1744
- // Reset
1745
- WebkitAppearance: "none",
1746
- // Reset
1747
- // When interacting quickly, the text can end up selected.
1748
- // Native select can't be selected either.
1749
- userSelect: "none",
1750
- borderRadius: 0,
1751
- // Reset
1752
- cursor: "pointer",
1753
- "&:focus": s({}, t.vars ? {
1754
- backgroundColor: `rgba(${t.vars.palette.common.onBackgroundChannel} / 0.05)`
1755
- } : {
1756
- backgroundColor: t.palette.mode === "light" ? "rgba(0, 0, 0, 0.05)" : "rgba(255, 255, 255, 0.05)"
1757
- }, {
1758
- borderRadius: 0
1759
- // Reset Chrome style
1760
- }),
1761
- // Remove IE11 arrow
1762
- "&::-ms-expand": {
1763
- display: "none"
1764
- },
1765
- [`&.${Le.disabled}`]: {
1766
- cursor: "default"
1767
- },
1768
- "&[multiple]": {
1769
- height: "auto"
1770
- },
1771
- "&:not([multiple]) option, &:not([multiple]) optgroup": {
1772
- backgroundColor: (t.vars || t).palette.background.paper
1773
- },
1774
- // Bump specificity to allow extending custom inputs
1775
- "&&&": {
1776
- paddingRight: 24,
1777
- minWidth: 16
1778
- // So it doesn't collapse.
1779
- }
1780
- }, n.variant === "filled" && {
1781
- "&&&": {
1782
- paddingRight: 32
1783
- }
1784
- }, n.variant === "outlined" && {
1785
- borderRadius: (t.vars || t).shape.borderRadius,
1786
- "&:focus": {
1787
- borderRadius: (t.vars || t).shape.borderRadius
1788
- // Reset the reset for Chrome style
1789
- },
1790
- "&&&": {
1791
- paddingRight: 32
1792
- }
1793
- }), xt = j("select", {
1794
- name: "MuiNativeSelect",
1795
- slot: "Select",
1796
- shouldForwardProp: fe,
1797
- overridesResolver: (n, t) => {
1798
- const {
1799
- ownerState: o
1800
- } = n;
1801
- return [t.select, t[o.variant], {
1802
- [`&.${Le.multiple}`]: t.multiple
1803
- }];
1804
- }
1805
- })(vn), yn = ({
1806
- ownerState: n,
1807
- theme: t
1808
- }) => s({
1809
- // We use a position absolute over a flexbox in order to forward the pointer events
1810
- // to the input and to support wrapping tags..
1811
- position: "absolute",
1812
- right: 0,
1813
- top: "calc(50% - .5em)",
1814
- // Center vertically, height is 1em
1815
- pointerEvents: "none",
1816
- // Don't block pointer events on the select under the icon.
1817
- color: (t.vars || t).palette.action.active,
1818
- [`&.${Le.disabled}`]: {
1819
- color: (t.vars || t).palette.action.disabled
1820
- }
1821
- }, n.open && {
1822
- transform: "rotate(180deg)"
1823
- }, n.variant === "filled" && {
1824
- right: 7
1825
- }, n.variant === "outlined" && {
1826
- right: 7
1827
- }), Pt = j("svg", {
1828
- name: "MuiNativeSelect",
1829
- slot: "Icon",
1830
- overridesResolver: (n, t) => {
1831
- const {
1832
- ownerState: o
1833
- } = n;
1834
- return [t.icon, o.variant && t[`icon${Te(o.variant)}`], o.open && t.iconOpen];
1835
- }
1836
- })(yn), On = /* @__PURE__ */ r.forwardRef(function(t, o) {
1837
- const {
1838
- className: a,
1839
- disabled: f,
1840
- IconComponent: u,
1841
- inputRef: c,
1842
- variant: p = "standard"
1843
- } = t, b = z(t, Tt), P = s({}, t, {
1844
- disabled: f,
1845
- variant: p
1846
- }), F = It(P);
1847
- return /* @__PURE__ */ De(r.Fragment, {
1848
- children: [/* @__PURE__ */ w(xt, s({
1849
- ownerState: P,
1850
- className: re(F.select, a),
1851
- disabled: f,
1852
- ref: c || o
1853
- }, b)), t.multiple ? null : /* @__PURE__ */ w(Pt, {
1854
- as: u,
1855
- ownerState: P,
1856
- className: F.icon
1857
- })]
1858
- });
1859
- });
1860
- process.env.NODE_ENV !== "production" && (On.propTypes = {
1861
- /**
1862
- * The option elements to populate the select with.
1863
- * Can be some `<option>` elements.
1864
- */
1865
- children: e.node,
1866
- /**
1867
- * Override or extend the styles applied to the component.
1868
- * See [CSS API](#css) below for more details.
1869
- */
1870
- classes: e.object,
1871
- /**
1872
- * The CSS class name of the select element.
1873
- */
1874
- className: e.string,
1875
- /**
1876
- * If `true`, the select is disabled.
1877
- */
1878
- disabled: e.bool,
1879
- /**
1880
- * The icon that displays the arrow.
1881
- */
1882
- IconComponent: e.elementType.isRequired,
1883
- /**
1884
- * Use that prop to pass a ref to the native select element.
1885
- * @deprecated
1886
- */
1887
- inputRef: be,
1888
- /**
1889
- * @ignore
1890
- */
1891
- multiple: e.bool,
1892
- /**
1893
- * Name attribute of the `select` or hidden `input` element.
1894
- */
1895
- name: e.string,
1896
- /**
1897
- * Callback fired when a menu item is selected.
1898
- *
1899
- * @param {object} event The event source of the callback.
1900
- * You can pull out the new value by accessing `event.target.value` (string).
1901
- */
1902
- onChange: e.func,
1903
- /**
1904
- * The input value.
1905
- */
1906
- value: e.any,
1907
- /**
1908
- * The variant to use.
1909
- */
1910
- variant: e.oneOf(["standard", "outlined", "filled"])
1911
- });
1912
- function St(n) {
1913
- return ae("MuiSelect", n);
1914
- }
1915
- const Ce = ie("MuiSelect", ["select", "multiple", "filled", "outlined", "standard", "disabled", "focused", "icon", "iconOpen", "iconFilled", "iconOutlined", "iconStandard", "nativeInput"]);
1916
- var Je;
1917
- const wt = ["aria-describedby", "aria-label", "autoFocus", "autoWidth", "children", "className", "defaultOpen", "defaultValue", "disabled", "displayEmpty", "IconComponent", "inputRef", "labelId", "MenuProps", "multiple", "name", "onBlur", "onChange", "onClose", "onFocus", "onOpen", "open", "readOnly", "renderValue", "SelectDisplayProps", "tabIndex", "type", "value", "variant"], Mt = j("div", {
1918
- name: "MuiSelect",
1919
- slot: "Select",
1920
- overridesResolver: (n, t) => {
1921
- const {
1922
- ownerState: o
1923
- } = n;
1924
- return [
1925
- // Win specificity over the input base
1926
- {
1927
- [`&.${Ce.select}`]: t.select
1928
- },
1929
- {
1930
- [`&.${Ce.select}`]: t[o.variant]
1931
- },
1932
- {
1933
- [`&.${Ce.multiple}`]: t.multiple
1934
- }
1935
- ];
1936
- }
1937
- })(vn, {
1938
- // Win specificity over the input base
1939
- [`&.${Ce.select}`]: {
1940
- height: "auto",
1941
- // Resets for multiple select with chips
1942
- minHeight: "1.4375em",
1943
- // Required for select\text-field height consistency
1944
- textOverflow: "ellipsis",
1945
- whiteSpace: "nowrap",
1946
- overflow: "hidden"
1947
- }
1948
- }), Nt = j("svg", {
1949
- name: "MuiSelect",
1950
- slot: "Icon",
1951
- overridesResolver: (n, t) => {
1952
- const {
1953
- ownerState: o
1954
- } = n;
1955
- return [t.icon, o.variant && t[`icon${Te(o.variant)}`], o.open && t.iconOpen];
1956
- }
1957
- })(yn), Ft = j("input", {
1958
- shouldForwardProp: (n) => Mn(n) && n !== "classes",
1959
- name: "MuiSelect",
1960
- slot: "NativeInput",
1961
- overridesResolver: (n, t) => t.nativeInput
1962
- })({
1963
- bottom: 0,
1964
- left: 0,
1965
- position: "absolute",
1966
- opacity: 0,
1967
- pointerEvents: "none",
1968
- width: "100%",
1969
- boxSizing: "border-box"
1970
- });
1971
- function Qe(n, t) {
1972
- return typeof t == "object" && t !== null ? n === t : String(n) === String(t);
1973
- }
1974
- function Dt(n) {
1975
- return n == null || typeof n == "string" && !n.trim();
1976
- }
1977
- const $t = (n) => {
1978
- const {
1979
- classes: t,
1980
- variant: o,
1981
- disabled: a,
1982
- multiple: f,
1983
- open: u
1984
- } = n, c = {
1985
- select: ["select", o, a && "disabled", f && "multiple"],
1986
- icon: ["icon", `icon${Te(o)}`, u && "iconOpen", a && "disabled"],
1987
- nativeInput: ["nativeInput"]
1988
- };
1989
- return se(c, St, t);
1990
- }, En = /* @__PURE__ */ r.forwardRef(function(t, o) {
1991
- const {
1992
- "aria-describedby": a,
1993
- "aria-label": f,
1994
- autoFocus: u,
1995
- autoWidth: c,
1996
- children: p,
1997
- className: b,
1998
- defaultOpen: P,
1999
- defaultValue: F,
2000
- disabled: $,
2001
- displayEmpty: M,
2002
- IconComponent: m,
2003
- inputRef: I,
2004
- labelId: v,
2005
- MenuProps: N = {},
2006
- multiple: y,
2007
- name: R,
2008
- onBlur: d,
2009
- onChange: l,
2010
- onClose: T,
2011
- onFocus: S,
2012
- onOpen: h,
2013
- open: L,
2014
- readOnly: A,
2015
- renderValue: D,
2016
- SelectDisplayProps: W = {},
2017
- tabIndex: J,
2018
- value: H,
2019
- variant: K = "standard"
2020
- } = t, O = z(t, wt), [g, B] = He({
2021
- controlled: H,
2022
- default: F,
2023
- name: "Select"
2024
- }), [q, V] = He({
2025
- controlled: L,
2026
- default: P,
2027
- name: "Select"
2028
- }), E = r.useRef(null), x = r.useRef(null), [k, Y] = r.useState(null), {
2029
- current: G
2030
- } = r.useRef(L != null), [Q, le] = r.useState(), he = me(o, I), ge = r.useCallback((i) => {
2031
- x.current = i, i && Y(i);
2032
- }, []), X = k == null ? void 0 : k.parentNode;
2033
- r.useImperativeHandle(he, () => ({
2034
- focus: () => {
2035
- x.current.focus();
2036
- },
2037
- node: E.current,
2038
- value: g
2039
- }), [g]), r.useEffect(() => {
2040
- P && q && k && !G && (le(c ? null : X.clientWidth), x.current.focus());
2041
- }, [k, c]), r.useEffect(() => {
2042
- u && x.current.focus();
2043
- }, [u]), r.useEffect(() => {
2044
- if (!v)
2045
- return;
2046
- const i = de(x.current).getElementById(v);
2047
- if (i) {
2048
- const C = () => {
2049
- getSelection().isCollapsed && x.current.focus();
2050
- };
2051
- return i.addEventListener("click", C), () => {
2052
- i.removeEventListener("click", C);
2053
- };
2054
- }
2055
- }, [v]);
2056
- const ne = (i, C) => {
2057
- i ? h && h(C) : T && T(C), G || (le(c ? null : X.clientWidth), V(i));
2058
- }, U = (i) => {
2059
- i.button === 0 && (i.preventDefault(), x.current.focus(), ne(!0, i));
2060
- }, Rn = (i) => {
2061
- ne(!1, i);
2062
- }, ue = r.Children.toArray(p), Tn = (i) => {
2063
- const C = ue.map((Z) => Z.props.value).indexOf(i.target.value);
2064
- if (C === -1)
2065
- return;
2066
- const _ = ue[C];
2067
- B(_.props.value), l && l(i, _);
2068
- }, In = (i) => (C) => {
2069
- let _;
2070
- if (C.currentTarget.hasAttribute("tabindex")) {
2071
- if (y) {
2072
- _ = Array.isArray(g) ? g.slice() : [];
2073
- const Z = g.indexOf(i.props.value);
2074
- Z === -1 ? _.push(i.props.value) : _.splice(Z, 1);
2075
- } else
2076
- _ = i.props.value;
2077
- if (i.props.onClick && i.props.onClick(C), g !== _ && (B(_), l)) {
2078
- const Z = C.nativeEvent || C, Ve = new Z.constructor(Z.type, Z);
2079
- Object.defineProperty(Ve, "target", {
2080
- writable: !0,
2081
- value: {
2082
- value: _,
2083
- name: R
2084
- }
2085
- }), l(Ve, i);
2086
- }
2087
- y || ne(!1, C);
2088
- }
2089
- }, xn = (i) => {
2090
- A || [
2091
- " ",
2092
- "ArrowUp",
2093
- "ArrowDown",
2094
- // The native select doesn't respond to enter on macOS, but it's recommended by
2095
- // https://www.w3.org/WAI/ARIA/apg/patterns/combobox/examples/combobox-select-only/
2096
- "Enter"
2097
- ].indexOf(i.key) !== -1 && (i.preventDefault(), ne(!0, i));
2098
- }, ve = k !== null && q, Pn = (i) => {
2099
- !ve && d && (Object.defineProperty(i, "target", {
2100
- writable: !0,
2101
- value: {
2102
- value: g,
2103
- name: R
2104
- }
2105
- }), d(i));
2106
- };
2107
- delete O["aria-invalid"];
2108
- let oe, Ae;
2109
- const ye = [];
2110
- let Oe = !1, Ie = !1;
2111
- (Vn({
2112
- value: g
2113
- }) || M) && (D ? oe = D(g) : Oe = !0);
2114
- const Sn = ue.map((i) => {
2115
- if (!/* @__PURE__ */ r.isValidElement(i))
2116
- return null;
2117
- process.env.NODE_ENV !== "production" && Fe.isFragment(i) && console.error(["MUI: The Select component doesn't accept a Fragment as a child.", "Consider providing an array instead."].join(`
2118
- `));
2119
- let C;
2120
- if (y) {
2121
- if (!Array.isArray(g))
2122
- throw new Error(process.env.NODE_ENV !== "production" ? "MUI: The `value` prop must be an array when using the `Select` component with `multiple`." : Fn(2));
2123
- C = g.some((_) => Qe(_, i.props.value)), C && Oe && ye.push(i.props.children);
2124
- } else
2125
- C = Qe(g, i.props.value), C && Oe && (Ae = i.props.children);
2126
- return C && (Ie = !0), /* @__PURE__ */ r.cloneElement(i, {
2127
- "aria-selected": C ? "true" : "false",
2128
- onClick: In(i),
2129
- onKeyUp: (_) => {
2130
- _.key === " " && _.preventDefault(), i.props.onKeyUp && i.props.onKeyUp(_);
2131
- },
2132
- role: "option",
2133
- selected: C,
2134
- value: void 0,
2135
- // The value is most likely not a valid HTML attribute.
2136
- "data-value": i.props.value
2137
- // Instead, we provide it as a data attribute.
2138
- });
2139
- });
2140
- process.env.NODE_ENV !== "production" && r.useEffect(() => {
2141
- if (!Ie && !y && g !== "") {
2142
- const i = ue.map((C) => C.props.value);
2143
- console.warn([`MUI: You have provided an out-of-range value \`${g}\` for the select ${R ? `(name="${R}") ` : ""}component.`, "Consider providing a value that matches one of the available options or ''.", `The available values are ${i.filter((C) => C != null).map((C) => `\`${C}\``).join(", ") || '""'}.`].join(`
2144
- `));
2145
- }
2146
- }, [Ie, ue, y, R, g]), Oe && (y ? ye.length === 0 ? oe = null : oe = ye.reduce((i, C, _) => (i.push(C), _ < ye.length - 1 && i.push(", "), i), []) : oe = Ae);
2147
- let We = Q;
2148
- !c && G && k && (We = X.clientWidth);
2149
- let xe;
2150
- typeof J < "u" ? xe = J : xe = $ ? null : 0;
2151
- const Be = W.id || (R ? `mui-component-select-${R}` : void 0), Ee = s({}, t, {
2152
- variant: K,
2153
- value: g,
2154
- open: ve
2155
- }), Pe = $t(Ee);
2156
- return /* @__PURE__ */ De(r.Fragment, {
2157
- children: [/* @__PURE__ */ w(Mt, s({
2158
- ref: ge,
2159
- tabIndex: xe,
2160
- role: "button",
2161
- "aria-disabled": $ ? "true" : void 0,
2162
- "aria-expanded": ve ? "true" : "false",
2163
- "aria-haspopup": "listbox",
2164
- "aria-label": f,
2165
- "aria-labelledby": [v, Be].filter(Boolean).join(" ") || void 0,
2166
- "aria-describedby": a,
2167
- onKeyDown: xn,
2168
- onMouseDown: $ || A ? null : U,
2169
- onBlur: Pn,
2170
- onFocus: S
2171
- }, W, {
2172
- ownerState: Ee,
2173
- className: re(W.className, Pe.select, b),
2174
- id: Be,
2175
- children: Dt(oe) ? (
2176
- // notranslate needed while Google Translate will not fix zero-width space issue
2177
- Je || (Je = /* @__PURE__ */ w("span", {
2178
- className: "notranslate",
2179
- children: "​"
2180
- }))
2181
- ) : oe
2182
- })), /* @__PURE__ */ w(Ft, s({
2183
- value: Array.isArray(g) ? g.join(",") : g,
2184
- name: R,
2185
- ref: E,
2186
- "aria-hidden": !0,
2187
- onChange: Tn,
2188
- tabIndex: -1,
2189
- disabled: $,
2190
- className: Pe.nativeInput,
2191
- autoFocus: u,
2192
- ownerState: Ee
2193
- }, O)), /* @__PURE__ */ w(Nt, {
2194
- as: m,
2195
- className: Pe.icon,
2196
- ownerState: Ee
2197
- }), /* @__PURE__ */ w(gn, s({
2198
- id: `menu-${R || ""}`,
2199
- anchorEl: X,
2200
- open: ve,
2201
- onClose: Rn,
2202
- anchorOrigin: {
2203
- vertical: "bottom",
2204
- horizontal: "center"
2205
- },
2206
- transformOrigin: {
2207
- vertical: "top",
2208
- horizontal: "center"
2209
- }
2210
- }, N, {
2211
- MenuListProps: s({
2212
- "aria-labelledby": v,
2213
- role: "listbox",
2214
- disableListWrap: !0
2215
- }, N.MenuListProps),
2216
- PaperProps: s({}, N.PaperProps, {
2217
- style: s({
2218
- minWidth: We
2219
- }, N.PaperProps != null ? N.PaperProps.style : null)
2220
- }),
2221
- children: Sn
2222
- }))]
2223
- });
2224
- });
2225
- process.env.NODE_ENV !== "production" && (En.propTypes = {
2226
- /**
2227
- * @ignore
2228
- */
2229
- "aria-describedby": e.string,
2230
- /**
2231
- * @ignore
2232
- */
2233
- "aria-label": e.string,
2234
- /**
2235
- * @ignore
2236
- */
2237
- autoFocus: e.bool,
2238
- /**
2239
- * If `true`, the width of the popover will automatically be set according to the items inside the
2240
- * menu, otherwise it will be at least the width of the select input.
2241
- */
2242
- autoWidth: e.bool,
2243
- /**
2244
- * The option elements to populate the select with.
2245
- * Can be some `<MenuItem>` elements.
2246
- */
2247
- children: e.node,
2248
- /**
2249
- * Override or extend the styles applied to the component.
2250
- * See [CSS API](#css) below for more details.
2251
- */
2252
- classes: e.object,
2253
- /**
2254
- * The CSS class name of the select element.
2255
- */
2256
- className: e.string,
2257
- /**
2258
- * If `true`, the component is toggled on mount. Use when the component open state is not controlled.
2259
- * You can only use it when the `native` prop is `false` (default).
2260
- */
2261
- defaultOpen: e.bool,
2262
- /**
2263
- * The default value. Use when the component is not controlled.
2264
- */
2265
- defaultValue: e.any,
2266
- /**
2267
- * If `true`, the select is disabled.
2268
- */
2269
- disabled: e.bool,
2270
- /**
2271
- * If `true`, the selected item is displayed even if its value is empty.
2272
- */
2273
- displayEmpty: e.bool,
2274
- /**
2275
- * The icon that displays the arrow.
2276
- */
2277
- IconComponent: e.elementType.isRequired,
2278
- /**
2279
- * Imperative handle implementing `{ value: T, node: HTMLElement, focus(): void }`
2280
- * Equivalent to `ref`
2281
- */
2282
- inputRef: be,
2283
- /**
2284
- * The ID of an element that acts as an additional label. The Select will
2285
- * be labelled by the additional label and the selected value.
2286
- */
2287
- labelId: e.string,
2288
- /**
2289
- * Props applied to the [`Menu`](/material-ui/api/menu/) element.
2290
- */
2291
- MenuProps: e.object,
2292
- /**
2293
- * If `true`, `value` must be an array and the menu will support multiple selections.
2294
- */
2295
- multiple: e.bool,
2296
- /**
2297
- * Name attribute of the `select` or hidden `input` element.
2298
- */
2299
- name: e.string,
2300
- /**
2301
- * @ignore
2302
- */
2303
- onBlur: e.func,
2304
- /**
2305
- * Callback fired when a menu item is selected.
2306
- *
2307
- * @param {object} event The event source of the callback.
2308
- * You can pull out the new value by accessing `event.target.value` (any).
2309
- * @param {object} [child] The react element that was selected.
2310
- */
2311
- onChange: e.func,
2312
- /**
2313
- * Callback fired when the component requests to be closed.
2314
- * Use in controlled mode (see open).
2315
- *
2316
- * @param {object} event The event source of the callback.
2317
- */
2318
- onClose: e.func,
2319
- /**
2320
- * @ignore
2321
- */
2322
- onFocus: e.func,
2323
- /**
2324
- * Callback fired when the component requests to be opened.
2325
- * Use in controlled mode (see open).
2326
- *
2327
- * @param {object} event The event source of the callback.
2328
- */
2329
- onOpen: e.func,
2330
- /**
2331
- * If `true`, the component is shown.
2332
- */
2333
- open: e.bool,
2334
- /**
2335
- * @ignore
2336
- */
2337
- readOnly: e.bool,
2338
- /**
2339
- * Render the selected value.
2340
- *
2341
- * @param {any} value The `value` provided to the component.
2342
- * @returns {ReactNode}
2343
- */
2344
- renderValue: e.func,
2345
- /**
2346
- * Props applied to the clickable div element.
2347
- */
2348
- SelectDisplayProps: e.object,
2349
- /**
2350
- * @ignore
2351
- */
2352
- tabIndex: e.oneOfType([e.number, e.string]),
2353
- /**
2354
- * @ignore
2355
- */
2356
- type: e.any,
2357
- /**
2358
- * The input value.
2359
- */
2360
- value: e.any,
2361
- /**
2362
- * The variant to use.
2363
- */
2364
- variant: e.oneOf(["standard", "outlined", "filled"])
2365
- });
2366
- const kt = zn(/* @__PURE__ */ w("path", {
2367
- d: "M7 10l5 5 5-5z"
2368
- }), "ArrowDropDown");
2369
- var Ze, en;
2370
- const jt = ["autoWidth", "children", "classes", "className", "defaultOpen", "displayEmpty", "IconComponent", "id", "input", "inputProps", "label", "labelId", "MenuProps", "multiple", "native", "onClose", "onOpen", "open", "renderValue", "SelectDisplayProps", "variant"], Lt = (n) => {
2371
- const {
2372
- classes: t
2373
- } = n;
2374
- return t;
2375
- }, _e = {
2376
- name: "MuiSelect",
2377
- overridesResolver: (n, t) => t.root,
2378
- shouldForwardProp: (n) => fe(n) && n !== "variant",
2379
- slot: "Root"
2380
- }, _t = j(Un, _e)(""), At = j(je, _e)(""), Wt = j(ke, _e)(""), Cn = /* @__PURE__ */ r.forwardRef(function(t, o) {
2381
- const a = pe({
2382
- name: "MuiSelect",
2383
- props: t
2384
- }), {
2385
- autoWidth: f = !1,
2386
- children: u,
2387
- classes: c = {},
2388
- className: p,
2389
- defaultOpen: b = !1,
2390
- displayEmpty: P = !1,
2391
- IconComponent: F = kt,
2392
- id: $,
2393
- input: M,
2394
- inputProps: m,
2395
- label: I,
2396
- labelId: v,
2397
- MenuProps: N,
2398
- multiple: y = !1,
2399
- native: R = !1,
2400
- onClose: d,
2401
- onOpen: l,
2402
- open: T,
2403
- renderValue: S,
2404
- SelectDisplayProps: h,
2405
- variant: L = "outlined"
2406
- } = a, A = z(a, jt), D = R ? On : En, W = pn(), H = dn({
2407
- props: a,
2408
- muiFormControl: W,
2409
- states: ["variant"]
2410
- }).variant || L, K = M || {
2411
- standard: Ze || (Ze = /* @__PURE__ */ w(_t, {})),
2412
- outlined: /* @__PURE__ */ w(At, {
2413
- label: I
2414
- }),
2415
- filled: en || (en = /* @__PURE__ */ w(Wt, {}))
2416
- }[H], O = s({}, a, {
2417
- variant: H,
2418
- classes: c
2419
- }), g = Lt(O), B = me(o, K.ref);
2420
- return /* @__PURE__ */ w(r.Fragment, {
2421
- children: /* @__PURE__ */ r.cloneElement(K, s({
2422
- // Most of the logic is implemented in `SelectInput`.
2423
- // The `Select` component is a simple API wrapper to expose something better to play with.
2424
- inputComponent: D,
2425
- inputProps: s({
2426
- children: u,
2427
- IconComponent: F,
2428
- variant: H,
2429
- type: void 0,
2430
- // We render a select. We can ignore the type provided by the `Input`.
2431
- multiple: y
2432
- }, R ? {
2433
- id: $
2434
- } : {
2435
- autoWidth: f,
2436
- defaultOpen: b,
2437
- displayEmpty: P,
2438
- labelId: v,
2439
- MenuProps: N,
2440
- onClose: d,
2441
- onOpen: l,
2442
- open: T,
2443
- renderValue: S,
2444
- SelectDisplayProps: s({
2445
- id: $
2446
- }, h)
2447
- }, m, {
2448
- classes: m ? on(g, m.classes) : g
2449
- }, M ? M.props.inputProps : {})
2450
- }, y && R && H === "outlined" ? {
2451
- notched: !0
2452
- } : {}, {
2453
- ref: B,
2454
- className: re(K.props.className, p)
2455
- }, !M && {
2456
- variant: H
2457
- }, A))
2458
- });
2459
- });
2460
- process.env.NODE_ENV !== "production" && (Cn.propTypes = {
2461
- // ----------------------------- Warning --------------------------------
2462
- // | These PropTypes are generated from the TypeScript type definitions |
2463
- // | To update them edit the d.ts file and run "yarn proptypes" |
2464
- // ----------------------------------------------------------------------
2465
- /**
2466
- * If `true`, the width of the popover will automatically be set according to the items inside the
2467
- * menu, otherwise it will be at least the width of the select input.
2468
- * @default false
2469
- */
2470
- autoWidth: e.bool,
2471
- /**
2472
- * The option elements to populate the select with.
2473
- * Can be some `MenuItem` when `native` is false and `option` when `native` is true.
2474
- *
2475
- * ⚠️The `MenuItem` elements **must** be direct descendants when `native` is false.
2476
- */
2477
- children: e.node,
2478
- /**
2479
- * Override or extend the styles applied to the component.
2480
- * @default {}
2481
- */
2482
- classes: e.object,
2483
- /**
2484
- * @ignore
2485
- */
2486
- className: e.string,
2487
- /**
2488
- * If `true`, the component is initially open. Use when the component open state is not controlled (i.e. the `open` prop is not defined).
2489
- * You can only use it when the `native` prop is `false` (default).
2490
- * @default false
2491
- */
2492
- defaultOpen: e.bool,
2493
- /**
2494
- * The default value. Use when the component is not controlled.
2495
- */
2496
- defaultValue: e.any,
2497
- /**
2498
- * If `true`, a value is displayed even if no items are selected.
2499
- *
2500
- * In order to display a meaningful value, a function can be passed to the `renderValue` prop which
2501
- * returns the value to be displayed when no items are selected.
2502
- *
2503
- * ⚠️ When using this prop, make sure the label doesn't overlap with the empty displayed value.
2504
- * The label should either be hidden or forced to a shrunk state.
2505
- * @default false
2506
- */
2507
- displayEmpty: e.bool,
2508
- /**
2509
- * The icon that displays the arrow.
2510
- * @default ArrowDropDownIcon
2511
- */
2512
- IconComponent: e.elementType,
2513
- /**
2514
- * The `id` of the wrapper element or the `select` element when `native`.
2515
- */
2516
- id: e.string,
2517
- /**
2518
- * An `Input` element; does not have to be a material-ui specific `Input`.
2519
- */
2520
- input: e.element,
2521
- /**
2522
- * [Attributes](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#Attributes) applied to the `input` element.
2523
- * When `native` is `true`, the attributes are applied on the `select` element.
2524
- */
2525
- inputProps: e.object,
2526
- /**
2527
- * See [OutlinedInput#label](/material-ui/api/outlined-input/#props)
2528
- */
2529
- label: e.node,
2530
- /**
2531
- * The ID of an element that acts as an additional label. The Select will
2532
- * be labelled by the additional label and the selected value.
2533
- */
2534
- labelId: e.string,
2535
- /**
2536
- * Props applied to the [`Menu`](/material-ui/api/menu/) element.
2537
- */
2538
- MenuProps: e.object,
2539
- /**
2540
- * If `true`, `value` must be an array and the menu will support multiple selections.
2541
- * @default false
2542
- */
2543
- multiple: e.bool,
2544
- /**
2545
- * If `true`, the component uses a native `select` element.
2546
- * @default false
2547
- */
2548
- native: e.bool,
2549
- /**
2550
- * Callback fired when a menu item is selected.
2551
- *
2552
- * @param {SelectChangeEvent<T>} event The event source of the callback.
2553
- * You can pull out the new value by accessing `event.target.value` (any).
2554
- * **Warning**: This is a generic event, not a change event, unless the change event is caused by browser autofill.
2555
- * @param {object} [child] The react element that was selected when `native` is `false` (default).
2556
- */
2557
- onChange: e.func,
2558
- /**
2559
- * Callback fired when the component requests to be closed.
2560
- * Use it in either controlled (see the `open` prop), or uncontrolled mode (to detect when the Select collapes).
2561
- *
2562
- * @param {object} event The event source of the callback.
2563
- */
2564
- onClose: e.func,
2565
- /**
2566
- * Callback fired when the component requests to be opened.
2567
- * Use it in either controlled (see the `open` prop), or uncontrolled mode (to detect when the Select expands).
2568
- *
2569
- * @param {object} event The event source of the callback.
2570
- */
2571
- onOpen: e.func,
2572
- /**
2573
- * If `true`, the component is shown.
2574
- * You can only use it when the `native` prop is `false` (default).
2575
- */
2576
- open: e.bool,
2577
- /**
2578
- * Render the selected value.
2579
- * You can only use it when the `native` prop is `false` (default).
2580
- *
2581
- * @param {any} value The `value` provided to the component.
2582
- * @returns {ReactNode}
2583
- */
2584
- renderValue: e.func,
2585
- /**
2586
- * Props applied to the clickable div element.
2587
- */
2588
- SelectDisplayProps: e.object,
2589
- /**
2590
- * The system prop that allows defining system overrides as well as additional CSS styles.
2591
- */
2592
- sx: e.oneOfType([e.arrayOf(e.oneOfType([e.func, e.object, e.bool])), e.func, e.object]),
2593
- /**
2594
- * The `input` value. Providing an empty string will select no options.
2595
- * Set to an empty string `''` if you don't want any of the available options to be selected.
2596
- *
2597
- * If the value is an object it must have reference equality with the option in order to be selected.
2598
- * If the value is not an object, the string representation must match with the string representation of the option in order to be selected.
2599
- */
2600
- value: e.oneOfType([e.oneOf([""]), e.any]),
2601
- /**
2602
- * The variant to use.
2603
- * @default 'outlined'
2604
- */
2605
- variant: e.oneOf(["filled", "outlined", "standard"])
2606
- });
2607
- Cn.muiName = "Select";
2608
- export {
2609
- ke as F,
2610
- $e as G,
2611
- je as O,
2612
- Cn as S
2613
- };