@hybridcore/ui 1.5.90 → 1.6.1

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