@hybridcore/ui 1.6.1 → 1.6.2

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