@hybridcore/ui 1.3.3 → 1.3.4

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 (64) hide show
  1. package/dist/{ButtonBase-DE8d_U2E.js → ButtonBase-DJz-TFGO.js} +199 -207
  2. package/dist/{CardContent-Du2i427Y.js → CardContent-DZnCVGy9.js} +15 -15
  3. package/dist/{Checkbox-BGNAqLl0.js → Checkbox-DzmWBCrt.js} +154 -144
  4. package/dist/{Collapse-FRd0_2Pt.js → Collapse-NqW0GIK_.js} +79 -77
  5. package/dist/DialogContent-D51w7KVX.js +2119 -0
  6. package/dist/{FormControl-ChTmxscy.js → FormControl-aXQs42m6.js} +496 -466
  7. package/dist/FormControlLabel-hDa-xf_q.js +639 -0
  8. package/dist/{IconButton-Cu_XEJB2.js → IconButton-SnBOFQ43.js} +22 -22
  9. package/dist/{Input-DU22-Zbo.js → Input-CeVb6kjv.js} +34 -34
  10. package/dist/{InputAdornment-6aeADcPO.js → InputAdornment-fM3loNyx.js} +12 -12
  11. package/dist/{List-nOXr-cFJ.js → List-DLIiXc6r.js} +10 -10
  12. package/dist/{ListItem-RJvRMwkZ.js → ListItem-BkxmqFI8.js} +23 -23
  13. package/dist/{MenuItem-DF45rx2m.js → MenuItem-BEW28T9O.js} +27 -27
  14. package/dist/{OutlinedInput-DJCHjkR3.js → OutlinedInput-DkzLHRTd.js} +75 -78
  15. package/dist/{Paper-CD_ma6NJ.js → Paper-Dp3qO0cK.js} +18 -18
  16. package/dist/Select-Cdmu0dQ4.js +2175 -0
  17. package/dist/Typography-CXe5ytr0.js +201 -0
  18. package/dist/components/card/index.js +17 -17
  19. package/dist/components/card/styled.js +1 -1
  20. package/dist/components/collapsible-card/style.js +222 -302
  21. package/dist/components/confirm/dialog.js +13 -13
  22. package/dist/components/container/index.js +19 -19
  23. package/dist/components/context-menu/index.js +32 -32
  24. package/dist/components/data-management/instance-form/components/composite-list/index.js +1 -1
  25. package/dist/components/data-management/instance-form/components/variable/index.js +6 -6
  26. package/dist/components/data-management/instance-form/components/variables/index.js +1 -1
  27. package/dist/components/geometry-picker/index.js +3 -3
  28. package/dist/components/icon-button/index.js +1 -1
  29. package/dist/components/map/styled.js +14 -14
  30. package/dist/components/search-input/index.js +4 -4
  31. package/dist/components/template-property-filters/index.js +1 -1
  32. package/dist/components/template-property-filters/property.js +4 -4
  33. package/dist/components/tree-select/index.js +4 -4
  34. package/dist/components/treeview-filter/index.js +29 -30
  35. package/dist/components/treeview-filter/item/index.js +1 -1
  36. package/dist/components/treeview-filter/item-label/index.js +2 -2
  37. package/dist/createStyled-liRRhQcN.js +1910 -0
  38. package/dist/createSvgIcon-B4TFefhd.js +73 -0
  39. package/dist/{createSvgIcon-DPZ7UbxM.js → createSvgIcon-Cl8kMTkx.js} +82 -85
  40. package/dist/{exactProp--3vlJ9a9.js → exactProp-CT2wqJXE.js} +2 -2
  41. package/dist/{index-CtuBGOmk.js → index-D9TdkXAs.js} +5 -5
  42. package/dist/{index-DzFccwzL.js → index-DRy8nExS.js} +205 -218
  43. package/dist/{listItemTextClasses-2BAu-hye.js → listItemTextClasses-BrCbmCR1.js} +2 -2
  44. package/dist/main.js +2 -2
  45. package/dist/{property-BSufYw1E.js → property-BsU8ijQF.js} +1056 -1087
  46. package/dist/styled-Dm8rXzIG.js +677 -0
  47. package/dist/useTheme-CTuK-wFF.js +10 -0
  48. package/dist/useThemeProps-BXn-nVhw.js +107 -0
  49. package/dist/{utils-qcu0RzdN.js → utils-DY9Jk4Ah.js} +2 -2
  50. package/package.json +3 -3
  51. package/dist/DialogContent-CKeAZ3Ts.js +0 -1982
  52. package/dist/FormControlLabel-Df7csguX.js +0 -827
  53. package/dist/Select-C1jD_gBQ.js +0 -2305
  54. package/dist/Typography-C2BkMNk-.js +0 -178
  55. package/dist/chainPropTypes-GRMJ22CO.js +0 -96
  56. package/dist/createSvgIcon-6wv0RQr3.js +0 -63
  57. package/dist/createTheme-C3DKplhE.js +0 -2395
  58. package/dist/resolveComponentProps-DozbaB8e.js +0 -54
  59. package/dist/styled-CVWGE9ik.js +0 -142
  60. package/dist/styled-iyoioZCr.js +0 -1033
  61. package/dist/useTheme--x3BjP9A.js +0 -17
  62. package/dist/useTheme-pWltVFb2.js +0 -10
  63. package/dist/useThemeProps-C90JF0Qc.js +0 -62
  64. package/dist/useThemeProps-DNZoozBw.js +0 -26
@@ -1,1982 +0,0 @@
1
- import { a as j, _ as d } from "./extends-Cyw62AD_.js";
2
- import * as c from "react";
3
- import { a as M, P as e } from "./createTheme-C3DKplhE.js";
4
- import { g as U, r as Lo, u as Y, c as L, a as G } from "./chainPropTypes-GRMJ22CO.js";
5
- import { g as H, s as _, r as jo, a as eo } from "./styled-iyoioZCr.js";
6
- import { jsx as N, jsxs as co } from "react/jsx-runtime";
7
- import { u as Q, B as Vo, b as ho, s as yo, a as Eo } from "./ButtonBase-DE8d_U2E.js";
8
- import { u as No } from "./useTheme-pWltVFb2.js";
9
- import { T as Uo, r as Ho, g as To } from "./utils-qcu0RzdN.js";
10
- import { e as po, a as So } from "./exactProp--3vlJ9a9.js";
11
- import { o as V } from "./ownerDocument-CUrv0DIK.js";
12
- import { o as uo } from "./ownerWindow-niciwP7I.js";
13
- import { r as Ko, m as qo, a as Yo, e as Go } from "./resolveComponentProps-DozbaB8e.js";
14
- import { c as Co, u as Xo } from "./useId-BHG98T5I.js";
15
- import * as Jo from "react-dom";
16
- import { P as Do } from "./Paper-CD_ma6NJ.js";
17
- function Oo(o, n, t, r, s) {
18
- if (process.env.NODE_ENV === "production")
19
- return null;
20
- const i = o[n], a = s || n;
21
- return i == null ? null : i && i.nodeType !== 1 ? new Error(`Invalid ${r} \`${a}\` supplied to \`${t}\`. Expected an HTMLElement.`) : null;
22
- }
23
- function Qo(o) {
24
- const n = o.documentElement.clientWidth;
25
- return Math.abs(window.innerWidth - n);
26
- }
27
- const Zo = ["elementType", "externalSlotProps", "ownerState", "skipResolvingSlotProps"];
28
- function ko(o) {
29
- var n;
30
- const {
31
- elementType: t,
32
- externalSlotProps: r,
33
- ownerState: s,
34
- skipResolvingSlotProps: i = !1
35
- } = o, a = j(o, Zo), l = i ? {} : Ko(r, s), {
36
- props: u,
37
- internalRef: g
38
- } = qo(d({}, a, {
39
- externalSlotProps: l
40
- })), m = Q(g, l == null ? void 0 : l.ref, (n = o.additionalProps) == null ? void 0 : n.ref);
41
- return Yo(t, d({}, u, {
42
- ref: m
43
- }), s);
44
- }
45
- function oe(o) {
46
- return H("MuiButton", o);
47
- }
48
- const no = U("MuiButton", ["root", "text", "textInherit", "textPrimary", "textSecondary", "textSuccess", "textError", "textInfo", "textWarning", "outlined", "outlinedInherit", "outlinedPrimary", "outlinedSecondary", "outlinedSuccess", "outlinedError", "outlinedInfo", "outlinedWarning", "contained", "containedInherit", "containedPrimary", "containedSecondary", "containedSuccess", "containedError", "containedInfo", "containedWarning", "disableElevation", "focusVisible", "disabled", "colorInherit", "colorPrimary", "colorSecondary", "colorSuccess", "colorError", "colorInfo", "colorWarning", "textSizeSmall", "textSizeMedium", "textSizeLarge", "outlinedSizeSmall", "outlinedSizeMedium", "outlinedSizeLarge", "containedSizeSmall", "containedSizeMedium", "containedSizeLarge", "sizeMedium", "sizeSmall", "sizeLarge", "fullWidth", "startIcon", "endIcon", "icon", "iconSizeSmall", "iconSizeMedium", "iconSizeLarge"]), Io = /* @__PURE__ */ c.createContext({});
49
- process.env.NODE_ENV !== "production" && (Io.displayName = "ButtonGroupContext");
50
- const Bo = /* @__PURE__ */ c.createContext(void 0);
51
- process.env.NODE_ENV !== "production" && (Bo.displayName = "ButtonGroupButtonContext");
52
- const ee = ["children", "color", "component", "className", "disabled", "disableElevation", "disableFocusRipple", "endIcon", "focusVisibleClassName", "fullWidth", "size", "startIcon", "type", "variant"], ne = (o) => {
53
- const {
54
- color: n,
55
- disableElevation: t,
56
- fullWidth: r,
57
- size: s,
58
- variant: i,
59
- classes: a
60
- } = o, l = {
61
- root: ["root", i, `${i}${M(n)}`, `size${M(s)}`, `${i}Size${M(s)}`, `color${M(n)}`, t && "disableElevation", r && "fullWidth"],
62
- label: ["label"],
63
- startIcon: ["icon", "startIcon", `iconSize${M(s)}`],
64
- endIcon: ["icon", "endIcon", `iconSize${M(s)}`]
65
- }, u = G(l, oe, a);
66
- return d({}, a, u);
67
- }, Mo = (o) => d({}, o.size === "small" && {
68
- "& > *:nth-of-type(1)": {
69
- fontSize: 18
70
- }
71
- }, o.size === "medium" && {
72
- "& > *:nth-of-type(1)": {
73
- fontSize: 20
74
- }
75
- }, o.size === "large" && {
76
- "& > *:nth-of-type(1)": {
77
- fontSize: 22
78
- }
79
- }), te = _(Vo, {
80
- shouldForwardProp: (o) => jo(o) || o === "classes",
81
- name: "MuiButton",
82
- slot: "Root",
83
- overridesResolver: (o, n) => {
84
- const {
85
- ownerState: t
86
- } = o;
87
- return [n.root, n[t.variant], n[`${t.variant}${M(t.color)}`], n[`size${M(t.size)}`], n[`${t.variant}Size${M(t.size)}`], t.color === "inherit" && n.colorInherit, t.disableElevation && n.disableElevation, t.fullWidth && n.fullWidth];
88
- }
89
- })(({
90
- theme: o,
91
- ownerState: n
92
- }) => {
93
- var t, r;
94
- const s = o.palette.mode === "light" ? o.palette.grey[300] : o.palette.grey[800], i = o.palette.mode === "light" ? o.palette.grey.A100 : o.palette.grey[700];
95
- return d({}, o.typography.button, {
96
- minWidth: 64,
97
- padding: "6px 16px",
98
- borderRadius: (o.vars || o).shape.borderRadius,
99
- transition: o.transitions.create(["background-color", "box-shadow", "border-color", "color"], {
100
- duration: o.transitions.duration.short
101
- }),
102
- "&:hover": d({
103
- textDecoration: "none",
104
- backgroundColor: o.vars ? `rgba(${o.vars.palette.text.primaryChannel} / ${o.vars.palette.action.hoverOpacity})` : eo(o.palette.text.primary, o.palette.action.hoverOpacity),
105
- // Reset on touch devices, it doesn't add specificity
106
- "@media (hover: none)": {
107
- backgroundColor: "transparent"
108
- }
109
- }, n.variant === "text" && n.color !== "inherit" && {
110
- backgroundColor: o.vars ? `rgba(${o.vars.palette[n.color].mainChannel} / ${o.vars.palette.action.hoverOpacity})` : eo(o.palette[n.color].main, o.palette.action.hoverOpacity),
111
- // Reset on touch devices, it doesn't add specificity
112
- "@media (hover: none)": {
113
- backgroundColor: "transparent"
114
- }
115
- }, n.variant === "outlined" && n.color !== "inherit" && {
116
- border: `1px solid ${(o.vars || o).palette[n.color].main}`,
117
- backgroundColor: o.vars ? `rgba(${o.vars.palette[n.color].mainChannel} / ${o.vars.palette.action.hoverOpacity})` : eo(o.palette[n.color].main, o.palette.action.hoverOpacity),
118
- // Reset on touch devices, it doesn't add specificity
119
- "@media (hover: none)": {
120
- backgroundColor: "transparent"
121
- }
122
- }, n.variant === "contained" && {
123
- backgroundColor: o.vars ? o.vars.palette.Button.inheritContainedHoverBg : i,
124
- boxShadow: (o.vars || o).shadows[4],
125
- // Reset on touch devices, it doesn't add specificity
126
- "@media (hover: none)": {
127
- boxShadow: (o.vars || o).shadows[2],
128
- backgroundColor: (o.vars || o).palette.grey[300]
129
- }
130
- }, n.variant === "contained" && n.color !== "inherit" && {
131
- backgroundColor: (o.vars || o).palette[n.color].dark,
132
- // Reset on touch devices, it doesn't add specificity
133
- "@media (hover: none)": {
134
- backgroundColor: (o.vars || o).palette[n.color].main
135
- }
136
- }),
137
- "&:active": d({}, n.variant === "contained" && {
138
- boxShadow: (o.vars || o).shadows[8]
139
- }),
140
- [`&.${no.focusVisible}`]: d({}, n.variant === "contained" && {
141
- boxShadow: (o.vars || o).shadows[6]
142
- }),
143
- [`&.${no.disabled}`]: d({
144
- color: (o.vars || o).palette.action.disabled
145
- }, n.variant === "outlined" && {
146
- border: `1px solid ${(o.vars || o).palette.action.disabledBackground}`
147
- }, n.variant === "contained" && {
148
- color: (o.vars || o).palette.action.disabled,
149
- boxShadow: (o.vars || o).shadows[0],
150
- backgroundColor: (o.vars || o).palette.action.disabledBackground
151
- })
152
- }, n.variant === "text" && {
153
- padding: "6px 8px"
154
- }, n.variant === "text" && n.color !== "inherit" && {
155
- color: (o.vars || o).palette[n.color].main
156
- }, n.variant === "outlined" && {
157
- padding: "5px 15px",
158
- border: "1px solid currentColor"
159
- }, n.variant === "outlined" && n.color !== "inherit" && {
160
- color: (o.vars || o).palette[n.color].main,
161
- border: o.vars ? `1px solid rgba(${o.vars.palette[n.color].mainChannel} / 0.5)` : `1px solid ${eo(o.palette[n.color].main, 0.5)}`
162
- }, n.variant === "contained" && {
163
- color: o.vars ? (
164
- // this is safe because grey does not change between default light/dark mode
165
- o.vars.palette.text.primary
166
- ) : (t = (r = o.palette).getContrastText) == null ? void 0 : t.call(r, o.palette.grey[300]),
167
- backgroundColor: o.vars ? o.vars.palette.Button.inheritContainedBg : s,
168
- boxShadow: (o.vars || o).shadows[2]
169
- }, n.variant === "contained" && n.color !== "inherit" && {
170
- color: (o.vars || o).palette[n.color].contrastText,
171
- backgroundColor: (o.vars || o).palette[n.color].main
172
- }, n.color === "inherit" && {
173
- color: "inherit",
174
- borderColor: "currentColor"
175
- }, n.size === "small" && n.variant === "text" && {
176
- padding: "4px 5px",
177
- fontSize: o.typography.pxToRem(13)
178
- }, n.size === "large" && n.variant === "text" && {
179
- padding: "8px 11px",
180
- fontSize: o.typography.pxToRem(15)
181
- }, n.size === "small" && n.variant === "outlined" && {
182
- padding: "3px 9px",
183
- fontSize: o.typography.pxToRem(13)
184
- }, n.size === "large" && n.variant === "outlined" && {
185
- padding: "7px 21px",
186
- fontSize: o.typography.pxToRem(15)
187
- }, n.size === "small" && n.variant === "contained" && {
188
- padding: "4px 10px",
189
- fontSize: o.typography.pxToRem(13)
190
- }, n.size === "large" && n.variant === "contained" && {
191
- padding: "8px 22px",
192
- fontSize: o.typography.pxToRem(15)
193
- }, n.fullWidth && {
194
- width: "100%"
195
- });
196
- }, ({
197
- ownerState: o
198
- }) => o.disableElevation && {
199
- boxShadow: "none",
200
- "&:hover": {
201
- boxShadow: "none"
202
- },
203
- [`&.${no.focusVisible}`]: {
204
- boxShadow: "none"
205
- },
206
- "&:active": {
207
- boxShadow: "none"
208
- },
209
- [`&.${no.disabled}`]: {
210
- boxShadow: "none"
211
- }
212
- }), re = _("span", {
213
- name: "MuiButton",
214
- slot: "StartIcon",
215
- overridesResolver: (o, n) => {
216
- const {
217
- ownerState: t
218
- } = o;
219
- return [n.startIcon, n[`iconSize${M(t.size)}`]];
220
- }
221
- })(({
222
- ownerState: o
223
- }) => d({
224
- display: "inherit",
225
- marginRight: 8,
226
- marginLeft: -4
227
- }, o.size === "small" && {
228
- marginLeft: -2
229
- }, Mo(o))), ie = _("span", {
230
- name: "MuiButton",
231
- slot: "EndIcon",
232
- overridesResolver: (o, n) => {
233
- const {
234
- ownerState: t
235
- } = o;
236
- return [n.endIcon, n[`iconSize${M(t.size)}`]];
237
- }
238
- })(({
239
- ownerState: o
240
- }) => d({
241
- display: "inherit",
242
- marginRight: -4,
243
- marginLeft: 8
244
- }, o.size === "small" && {
245
- marginRight: -2
246
- }, Mo(o))), se = /* @__PURE__ */ c.forwardRef(function(n, t) {
247
- const r = c.useContext(Io), s = c.useContext(Bo), i = Lo(r, n), a = Y({
248
- props: i,
249
- name: "MuiButton"
250
- }), {
251
- children: l,
252
- color: u = "primary",
253
- component: g = "button",
254
- className: m,
255
- disabled: x = !1,
256
- disableElevation: R = !1,
257
- disableFocusRipple: C = !1,
258
- endIcon: f,
259
- focusVisibleClassName: $,
260
- fullWidth: S = !1,
261
- size: D = "medium",
262
- startIcon: P,
263
- type: p,
264
- variant: T = "text"
265
- } = a, h = j(a, ee), k = d({}, a, {
266
- color: u,
267
- component: g,
268
- disabled: x,
269
- disableElevation: R,
270
- disableFocusRipple: C,
271
- fullWidth: S,
272
- size: D,
273
- type: p,
274
- variant: T
275
- }), y = ne(k), O = P && /* @__PURE__ */ N(re, {
276
- className: y.startIcon,
277
- ownerState: k,
278
- children: P
279
- }), z = f && /* @__PURE__ */ N(ie, {
280
- className: y.endIcon,
281
- ownerState: k,
282
- children: f
283
- }), I = s || "";
284
- return /* @__PURE__ */ co(te, d({
285
- ownerState: k,
286
- className: L(r.className, y.root, m, I),
287
- component: g,
288
- disabled: x,
289
- focusRipple: !C,
290
- focusVisibleClassName: L(y.focusVisible, $),
291
- ref: t,
292
- type: p
293
- }, h, {
294
- classes: y,
295
- children: [O, l, z]
296
- }));
297
- });
298
- process.env.NODE_ENV !== "production" && (se.propTypes = {
299
- // ┌────────────────────────────── Warning ──────────────────────────────┐
300
- // │ These PropTypes are generated from the TypeScript type definitions. │
301
- // │ To update them, edit the d.ts file and run `pnpm proptypes`. │
302
- // └─────────────────────────────────────────────────────────────────────┘
303
- /**
304
- * The content of the component.
305
- */
306
- children: e.node,
307
- /**
308
- * Override or extend the styles applied to the component.
309
- */
310
- classes: e.object,
311
- /**
312
- * @ignore
313
- */
314
- className: e.string,
315
- /**
316
- * The color of the component.
317
- * It supports both default and custom theme colors, which can be added as shown in the
318
- * [palette customization guide](https://mui.com/material-ui/customization/palette/#custom-colors).
319
- * @default 'primary'
320
- */
321
- color: e.oneOfType([e.oneOf(["inherit", "primary", "secondary", "success", "error", "info", "warning"]), e.string]),
322
- /**
323
- * The component used for the root node.
324
- * Either a string to use a HTML element or a component.
325
- */
326
- component: e.elementType,
327
- /**
328
- * If `true`, the component is disabled.
329
- * @default false
330
- */
331
- disabled: e.bool,
332
- /**
333
- * If `true`, no elevation is used.
334
- * @default false
335
- */
336
- disableElevation: e.bool,
337
- /**
338
- * If `true`, the keyboard focus ripple is disabled.
339
- * @default false
340
- */
341
- disableFocusRipple: e.bool,
342
- /**
343
- * If `true`, the ripple effect is disabled.
344
- *
345
- * ⚠️ Without a ripple there is no styling for :focus-visible by default. Be sure
346
- * to highlight the element by applying separate styles with the `.Mui-focusVisible` class.
347
- * @default false
348
- */
349
- disableRipple: e.bool,
350
- /**
351
- * Element placed after the children.
352
- */
353
- endIcon: e.node,
354
- /**
355
- * @ignore
356
- */
357
- focusVisibleClassName: e.string,
358
- /**
359
- * If `true`, the button will take up the full width of its container.
360
- * @default false
361
- */
362
- fullWidth: e.bool,
363
- /**
364
- * The URL to link to when the button is clicked.
365
- * If defined, an `a` element will be used as the root node.
366
- */
367
- href: e.string,
368
- /**
369
- * The size of the component.
370
- * `small` is equivalent to the dense button styling.
371
- * @default 'medium'
372
- */
373
- size: e.oneOfType([e.oneOf(["small", "medium", "large"]), e.string]),
374
- /**
375
- * Element placed before the children.
376
- */
377
- startIcon: e.node,
378
- /**
379
- * The system prop that allows defining system overrides as well as additional CSS styles.
380
- */
381
- sx: e.oneOfType([e.arrayOf(e.oneOfType([e.func, e.object, e.bool])), e.func, e.object]),
382
- /**
383
- * @ignore
384
- */
385
- type: e.oneOfType([e.oneOf(["button", "reset", "submit"]), e.string]),
386
- /**
387
- * The variant to use.
388
- * @default 'text'
389
- */
390
- variant: e.oneOfType([e.oneOf(["contained", "outlined", "text"]), e.string])
391
- });
392
- function ae(o) {
393
- const n = V(o);
394
- return n.body === o ? uo(o).innerWidth > n.documentElement.clientWidth : o.scrollHeight > o.clientHeight;
395
- }
396
- function J(o, n) {
397
- n ? o.setAttribute("aria-hidden", "true") : o.removeAttribute("aria-hidden");
398
- }
399
- function Po(o) {
400
- return parseInt(uo(o).getComputedStyle(o).paddingRight, 10) || 0;
401
- }
402
- function le(o) {
403
- const t = ["TEMPLATE", "SCRIPT", "STYLE", "LINK", "MAP", "META", "NOSCRIPT", "PICTURE", "COL", "COLGROUP", "PARAM", "SLOT", "SOURCE", "TRACK"].indexOf(o.tagName) !== -1, r = o.tagName === "INPUT" && o.getAttribute("type") === "hidden";
404
- return t || r;
405
- }
406
- function Ro(o, n, t, r, s) {
407
- const i = [n, t, ...r];
408
- [].forEach.call(o.children, (a) => {
409
- const l = i.indexOf(a) === -1, u = !le(a);
410
- l && u && J(a, s);
411
- });
412
- }
413
- function ao(o, n) {
414
- let t = -1;
415
- return o.some((r, s) => n(r) ? (t = s, !0) : !1), t;
416
- }
417
- function ce(o, n) {
418
- const t = [], r = o.container;
419
- if (!n.disableScrollLock) {
420
- if (ae(r)) {
421
- const a = Qo(V(r));
422
- t.push({
423
- value: r.style.paddingRight,
424
- property: "padding-right",
425
- el: r
426
- }), r.style.paddingRight = `${Po(r) + a}px`;
427
- const l = V(r).querySelectorAll(".mui-fixed");
428
- [].forEach.call(l, (u) => {
429
- t.push({
430
- value: u.style.paddingRight,
431
- property: "padding-right",
432
- el: u
433
- }), u.style.paddingRight = `${Po(u) + a}px`;
434
- });
435
- }
436
- let i;
437
- if (r.parentNode instanceof DocumentFragment)
438
- i = V(r).body;
439
- else {
440
- const a = r.parentElement, l = uo(r);
441
- i = (a == null ? void 0 : a.nodeName) === "HTML" && l.getComputedStyle(a).overflowY === "scroll" ? a : r;
442
- }
443
- t.push({
444
- value: i.style.overflow,
445
- property: "overflow",
446
- el: i
447
- }, {
448
- value: i.style.overflowX,
449
- property: "overflow-x",
450
- el: i
451
- }, {
452
- value: i.style.overflowY,
453
- property: "overflow-y",
454
- el: i
455
- }), i.style.overflow = "hidden";
456
- }
457
- return () => {
458
- t.forEach(({
459
- value: i,
460
- el: a,
461
- property: l
462
- }) => {
463
- i ? a.style.setProperty(l, i) : a.style.removeProperty(l);
464
- });
465
- };
466
- }
467
- function de(o) {
468
- const n = [];
469
- return [].forEach.call(o.children, (t) => {
470
- t.getAttribute("aria-hidden") === "true" && n.push(t);
471
- }), n;
472
- }
473
- class pe {
474
- constructor() {
475
- this.containers = void 0, this.modals = void 0, this.modals = [], this.containers = [];
476
- }
477
- add(n, t) {
478
- let r = this.modals.indexOf(n);
479
- if (r !== -1)
480
- return r;
481
- r = this.modals.length, this.modals.push(n), n.modalRef && J(n.modalRef, !1);
482
- const s = de(t);
483
- Ro(t, n.mount, n.modalRef, s, !0);
484
- const i = ao(this.containers, (a) => a.container === t);
485
- return i !== -1 ? (this.containers[i].modals.push(n), r) : (this.containers.push({
486
- modals: [n],
487
- container: t,
488
- restore: null,
489
- hiddenSiblings: s
490
- }), r);
491
- }
492
- mount(n, t) {
493
- const r = ao(this.containers, (i) => i.modals.indexOf(n) !== -1), s = this.containers[r];
494
- s.restore || (s.restore = ce(s, t));
495
- }
496
- remove(n, t = !0) {
497
- const r = this.modals.indexOf(n);
498
- if (r === -1)
499
- return r;
500
- const s = ao(this.containers, (a) => a.modals.indexOf(n) !== -1), i = this.containers[s];
501
- if (i.modals.splice(i.modals.indexOf(n), 1), this.modals.splice(r, 1), i.modals.length === 0)
502
- i.restore && i.restore(), n.modalRef && J(n.modalRef, t), Ro(i.container, n.mount, n.modalRef, i.hiddenSiblings, !1), this.containers.splice(s, 1);
503
- else {
504
- const a = i.modals[i.modals.length - 1];
505
- a.modalRef && J(a.modalRef, !1);
506
- }
507
- return r;
508
- }
509
- isTopModal(n) {
510
- return this.modals.length > 0 && this.modals[this.modals.length - 1] === n;
511
- }
512
- }
513
- const ue = ["input", "select", "textarea", "a[href]", "button", "[tabindex]", "audio[controls]", "video[controls]", '[contenteditable]:not([contenteditable="false"])'].join(",");
514
- function fe(o) {
515
- const n = parseInt(o.getAttribute("tabindex") || "", 10);
516
- return Number.isNaN(n) ? o.contentEditable === "true" || (o.nodeName === "AUDIO" || o.nodeName === "VIDEO" || o.nodeName === "DETAILS") && o.getAttribute("tabindex") === null ? 0 : o.tabIndex : n;
517
- }
518
- function be(o) {
519
- if (o.tagName !== "INPUT" || o.type !== "radio" || !o.name)
520
- return !1;
521
- const n = (r) => o.ownerDocument.querySelector(`input[type="radio"]${r}`);
522
- let t = n(`[name="${o.name}"]:checked`);
523
- return t || (t = n(`[name="${o.name}"]`)), t !== o;
524
- }
525
- function ge(o) {
526
- return !(o.disabled || o.tagName === "INPUT" && o.type === "hidden" || be(o));
527
- }
528
- function me(o) {
529
- const n = [], t = [];
530
- return Array.from(o.querySelectorAll(ue)).forEach((r, s) => {
531
- const i = fe(r);
532
- i === -1 || !ge(r) || (i === 0 ? n.push(r) : t.push({
533
- documentOrder: s,
534
- tabIndex: i,
535
- node: r
536
- }));
537
- }), t.sort((r, s) => r.tabIndex === s.tabIndex ? r.documentOrder - s.documentOrder : r.tabIndex - s.tabIndex).map((r) => r.node).concat(n);
538
- }
539
- function ve() {
540
- return !0;
541
- }
542
- function to(o) {
543
- const {
544
- children: n,
545
- disableAutoFocus: t = !1,
546
- disableEnforceFocus: r = !1,
547
- disableRestoreFocus: s = !1,
548
- getTabbable: i = me,
549
- isEnabled: a = ve,
550
- open: l
551
- } = o, u = c.useRef(!1), g = c.useRef(null), m = c.useRef(null), x = c.useRef(null), R = c.useRef(null), C = c.useRef(!1), f = c.useRef(null), $ = Q(n.ref, f), S = c.useRef(null);
552
- c.useEffect(() => {
553
- !l || !f.current || (C.current = !t);
554
- }, [t, l]), c.useEffect(() => {
555
- if (!l || !f.current)
556
- return;
557
- const p = V(f.current);
558
- return f.current.contains(p.activeElement) || (f.current.hasAttribute("tabIndex") || (process.env.NODE_ENV !== "production" && console.error(["MUI: The modal content node does not accept focus.", 'For the benefit of assistive technologies, the tabIndex of the node is being set to "-1".'].join(`
559
- `)), f.current.setAttribute("tabIndex", "-1")), C.current && f.current.focus()), () => {
560
- s || (x.current && x.current.focus && (u.current = !0, x.current.focus()), x.current = null);
561
- };
562
- }, [l]), c.useEffect(() => {
563
- if (!l || !f.current)
564
- return;
565
- const p = V(f.current), T = (y) => {
566
- S.current = y, !(r || !a() || y.key !== "Tab") && p.activeElement === f.current && y.shiftKey && (u.current = !0, m.current && m.current.focus());
567
- }, h = () => {
568
- const y = f.current;
569
- if (y === null)
570
- return;
571
- if (!p.hasFocus() || !a() || u.current) {
572
- u.current = !1;
573
- return;
574
- }
575
- if (y.contains(p.activeElement) || r && p.activeElement !== g.current && p.activeElement !== m.current)
576
- return;
577
- if (p.activeElement !== R.current)
578
- R.current = null;
579
- else if (R.current !== null)
580
- return;
581
- if (!C.current)
582
- return;
583
- let O = [];
584
- if ((p.activeElement === g.current || p.activeElement === m.current) && (O = i(f.current)), O.length > 0) {
585
- var z, I;
586
- const F = !!((z = S.current) != null && z.shiftKey && ((I = S.current) == null ? void 0 : I.key) === "Tab"), A = O[0], w = O[O.length - 1];
587
- typeof A != "string" && typeof w != "string" && (F ? w.focus() : A.focus());
588
- } else
589
- y.focus();
590
- };
591
- p.addEventListener("focusin", h), p.addEventListener("keydown", T, !0);
592
- const k = setInterval(() => {
593
- p.activeElement && p.activeElement.tagName === "BODY" && h();
594
- }, 50);
595
- return () => {
596
- clearInterval(k), p.removeEventListener("focusin", h), p.removeEventListener("keydown", T, !0);
597
- };
598
- }, [t, r, s, a, l, i]);
599
- const D = (p) => {
600
- x.current === null && (x.current = p.relatedTarget), C.current = !0, R.current = p.target;
601
- const T = n.props.onFocus;
602
- T && T(p);
603
- }, P = (p) => {
604
- x.current === null && (x.current = p.relatedTarget), C.current = !0;
605
- };
606
- return /* @__PURE__ */ co(c.Fragment, {
607
- children: [/* @__PURE__ */ N("div", {
608
- tabIndex: l ? 0 : -1,
609
- onFocus: P,
610
- ref: g,
611
- "data-testid": "sentinelStart"
612
- }), /* @__PURE__ */ c.cloneElement(n, {
613
- ref: $,
614
- onFocus: D
615
- }), /* @__PURE__ */ N("div", {
616
- tabIndex: l ? 0 : -1,
617
- onFocus: P,
618
- ref: m,
619
- "data-testid": "sentinelEnd"
620
- })]
621
- });
622
- }
623
- process.env.NODE_ENV !== "production" && (to.propTypes = {
624
- // ┌────────────────────────────── Warning ──────────────────────────────┐
625
- // │ These PropTypes are generated from the TypeScript type definitions. │
626
- // │ To update them, edit the TypeScript types and run `pnpm proptypes`. │
627
- // └─────────────────────────────────────────────────────────────────────┘
628
- /**
629
- * A single child content element.
630
- */
631
- children: po,
632
- /**
633
- * If `true`, the focus trap will not automatically shift focus to itself when it opens, and
634
- * replace it to the last focused element when it closes.
635
- * This also works correctly with any focus trap children that have the `disableAutoFocus` prop.
636
- *
637
- * Generally this should never be set to `true` as it makes the focus trap less
638
- * accessible to assistive technologies, like screen readers.
639
- * @default false
640
- */
641
- disableAutoFocus: e.bool,
642
- /**
643
- * If `true`, the focus trap will not prevent focus from leaving the focus trap while open.
644
- *
645
- * Generally this should never be set to `true` as it makes the focus trap less
646
- * accessible to assistive technologies, like screen readers.
647
- * @default false
648
- */
649
- disableEnforceFocus: e.bool,
650
- /**
651
- * If `true`, the focus trap will not restore focus to previously focused element once
652
- * focus trap is hidden or unmounted.
653
- * @default false
654
- */
655
- disableRestoreFocus: e.bool,
656
- /**
657
- * Returns an array of ordered tabbable nodes (i.e. in tab order) within the root.
658
- * For instance, you can provide the "tabbable" npm dependency.
659
- * @param {HTMLElement} root
660
- */
661
- getTabbable: e.func,
662
- /**
663
- * This prop extends the `open` prop.
664
- * It allows to toggle the open state without having to wait for a rerender when changing the `open` prop.
665
- * This prop should be memoized.
666
- * It can be used to support multiple focus trap mounted at the same time.
667
- * @default function defaultIsEnabled(): boolean {
668
- * return true;
669
- * }
670
- */
671
- isEnabled: e.func,
672
- /**
673
- * If `true`, focus is locked.
674
- */
675
- open: e.bool.isRequired
676
- });
677
- process.env.NODE_ENV !== "production" && (to.propTypes = So(to.propTypes));
678
- function xe(o) {
679
- return typeof o == "function" ? o() : o;
680
- }
681
- const ro = /* @__PURE__ */ c.forwardRef(function(n, t) {
682
- const {
683
- children: r,
684
- container: s,
685
- disablePortal: i = !1
686
- } = n, [a, l] = c.useState(null), u = Q(/* @__PURE__ */ c.isValidElement(r) ? r.ref : null, t);
687
- if (ho(() => {
688
- i || l(xe(s) || document.body);
689
- }, [s, i]), ho(() => {
690
- if (a && !i)
691
- return yo(t, a), () => {
692
- yo(t, null);
693
- };
694
- }, [t, a, i]), i) {
695
- if (/* @__PURE__ */ c.isValidElement(r)) {
696
- const g = {
697
- ref: u
698
- };
699
- return /* @__PURE__ */ c.cloneElement(r, g);
700
- }
701
- return /* @__PURE__ */ N(c.Fragment, {
702
- children: r
703
- });
704
- }
705
- return /* @__PURE__ */ N(c.Fragment, {
706
- children: a && /* @__PURE__ */ Jo.createPortal(r, a)
707
- });
708
- });
709
- process.env.NODE_ENV !== "production" && (ro.propTypes = {
710
- // ┌────────────────────────────── Warning ──────────────────────────────┐
711
- // │ These PropTypes are generated from the TypeScript type definitions. │
712
- // │ To update them, edit the TypeScript types and run `pnpm proptypes`. │
713
- // └─────────────────────────────────────────────────────────────────────┘
714
- /**
715
- * The children to render into the `container`.
716
- */
717
- children: e.node,
718
- /**
719
- * An HTML element or function that returns one.
720
- * The `container` will have the portal children appended to it.
721
- *
722
- * You can also provide a callback, which is called in a React layout effect.
723
- * This lets you set the container from a ref, and also makes server-side rendering possible.
724
- *
725
- * By default, it uses the body of the top-level document object,
726
- * so it's simply `document.body` most of the time.
727
- */
728
- container: e.oneOfType([Oo, e.func]),
729
- /**
730
- * The `children` will be under the DOM hierarchy of the parent component.
731
- * @default false
732
- */
733
- disablePortal: e.bool
734
- });
735
- process.env.NODE_ENV !== "production" && (ro.propTypes = So(ro.propTypes));
736
- const he = ["addEndListener", "appear", "children", "easing", "in", "onEnter", "onEntered", "onEntering", "onExit", "onExited", "onExiting", "style", "timeout", "TransitionComponent"], ye = {
737
- entering: {
738
- opacity: 1
739
- },
740
- entered: {
741
- opacity: 1
742
- }
743
- }, fo = /* @__PURE__ */ c.forwardRef(function(n, t) {
744
- const r = No(), s = {
745
- enter: r.transitions.duration.enteringScreen,
746
- exit: r.transitions.duration.leavingScreen
747
- }, {
748
- addEndListener: i,
749
- appear: a = !0,
750
- children: l,
751
- easing: u,
752
- in: g,
753
- onEnter: m,
754
- onEntered: x,
755
- onEntering: R,
756
- onExit: C,
757
- onExited: f,
758
- onExiting: $,
759
- style: S,
760
- timeout: D = s,
761
- // eslint-disable-next-line react/prop-types
762
- TransitionComponent: P = Uo
763
- } = n, p = j(n, he), T = c.useRef(null), h = Q(T, l.ref, t), k = (v) => (W) => {
764
- if (v) {
765
- const b = T.current;
766
- W === void 0 ? v(b) : v(b, W);
767
- }
768
- }, y = k(R), O = k((v, W) => {
769
- Ho(v);
770
- const b = To({
771
- style: S,
772
- timeout: D,
773
- easing: u
774
- }, {
775
- mode: "enter"
776
- });
777
- v.style.webkitTransition = r.transitions.create("opacity", b), v.style.transition = r.transitions.create("opacity", b), m && m(v, W);
778
- }), z = k(x), I = k($), F = k((v) => {
779
- const W = To({
780
- style: S,
781
- timeout: D,
782
- easing: u
783
- }, {
784
- mode: "exit"
785
- });
786
- v.style.webkitTransition = r.transitions.create("opacity", W), v.style.transition = r.transitions.create("opacity", W), C && C(v);
787
- }), A = k(f);
788
- return /* @__PURE__ */ N(P, d({
789
- appear: a,
790
- in: g,
791
- nodeRef: T,
792
- onEnter: O,
793
- onEntered: z,
794
- onEntering: y,
795
- onExit: F,
796
- onExited: A,
797
- onExiting: I,
798
- addEndListener: (v) => {
799
- i && i(T.current, v);
800
- },
801
- timeout: D
802
- }, p, {
803
- children: (v, W) => /* @__PURE__ */ c.cloneElement(l, d({
804
- style: d({
805
- opacity: 0,
806
- visibility: v === "exited" && !g ? "hidden" : void 0
807
- }, ye[v], S, l.props.style),
808
- ref: h
809
- }, W))
810
- }));
811
- });
812
- process.env.NODE_ENV !== "production" && (fo.propTypes = {
813
- // ┌────────────────────────────── Warning ──────────────────────────────┐
814
- // │ These PropTypes are generated from the TypeScript type definitions. │
815
- // │ To update them, edit the d.ts file and run `pnpm proptypes`. │
816
- // └─────────────────────────────────────────────────────────────────────┘
817
- /**
818
- * Add a custom transition end trigger. Called with the transitioning DOM
819
- * node and a done callback. Allows for more fine grained transition end
820
- * logic. Note: Timeouts are still used as a fallback if provided.
821
- */
822
- addEndListener: e.func,
823
- /**
824
- * Perform the enter transition when it first mounts if `in` is also `true`.
825
- * Set this to `false` to disable this behavior.
826
- * @default true
827
- */
828
- appear: e.bool,
829
- /**
830
- * A single child content element.
831
- */
832
- children: po.isRequired,
833
- /**
834
- * The transition timing function.
835
- * You may specify a single easing or a object containing enter and exit values.
836
- */
837
- easing: e.oneOfType([e.shape({
838
- enter: e.string,
839
- exit: e.string
840
- }), e.string]),
841
- /**
842
- * If `true`, the component will transition in.
843
- */
844
- in: e.bool,
845
- /**
846
- * @ignore
847
- */
848
- onEnter: e.func,
849
- /**
850
- * @ignore
851
- */
852
- onEntered: e.func,
853
- /**
854
- * @ignore
855
- */
856
- onEntering: e.func,
857
- /**
858
- * @ignore
859
- */
860
- onExit: e.func,
861
- /**
862
- * @ignore
863
- */
864
- onExited: e.func,
865
- /**
866
- * @ignore
867
- */
868
- onExiting: e.func,
869
- /**
870
- * @ignore
871
- */
872
- style: e.object,
873
- /**
874
- * The duration for the transition, in milliseconds.
875
- * You may specify a single timeout for all transitions, or individually with an object.
876
- * @default {
877
- * enter: theme.transitions.duration.enteringScreen,
878
- * exit: theme.transitions.duration.leavingScreen,
879
- * }
880
- */
881
- timeout: e.oneOfType([e.number, e.shape({
882
- appear: e.number,
883
- enter: e.number,
884
- exit: e.number
885
- })])
886
- });
887
- function Ee(o) {
888
- return H("MuiBackdrop", o);
889
- }
890
- U("MuiBackdrop", ["root", "invisible"]);
891
- const Te = ["children", "className", "component", "components", "componentsProps", "invisible", "open", "slotProps", "slots", "TransitionComponent", "transitionDuration"], Ce = (o) => {
892
- const {
893
- classes: n,
894
- invisible: t
895
- } = o;
896
- return G({
897
- root: ["root", t && "invisible"]
898
- }, Ee, n);
899
- }, ke = _("div", {
900
- name: "MuiBackdrop",
901
- slot: "Root",
902
- overridesResolver: (o, n) => {
903
- const {
904
- ownerState: t
905
- } = o;
906
- return [n.root, t.invisible && n.invisible];
907
- }
908
- })(({
909
- ownerState: o
910
- }) => d({
911
- position: "fixed",
912
- display: "flex",
913
- alignItems: "center",
914
- justifyContent: "center",
915
- right: 0,
916
- bottom: 0,
917
- top: 0,
918
- left: 0,
919
- backgroundColor: "rgba(0, 0, 0, 0.5)",
920
- WebkitTapHighlightColor: "transparent"
921
- }, o.invisible && {
922
- backgroundColor: "transparent"
923
- })), bo = /* @__PURE__ */ c.forwardRef(function(n, t) {
924
- var r, s, i;
925
- const a = Y({
926
- props: n,
927
- name: "MuiBackdrop"
928
- }), {
929
- children: l,
930
- className: u,
931
- component: g = "div",
932
- components: m = {},
933
- componentsProps: x = {},
934
- invisible: R = !1,
935
- open: C,
936
- slotProps: f = {},
937
- slots: $ = {},
938
- TransitionComponent: S = fo,
939
- transitionDuration: D
940
- } = a, P = j(a, Te), p = d({}, a, {
941
- component: g,
942
- invisible: R
943
- }), T = Ce(p), h = (r = f.root) != null ? r : x.root;
944
- return /* @__PURE__ */ N(S, d({
945
- in: C,
946
- timeout: D
947
- }, P, {
948
- children: /* @__PURE__ */ N(ke, d({
949
- "aria-hidden": !0
950
- }, h, {
951
- as: (s = (i = $.root) != null ? i : m.Root) != null ? s : g,
952
- className: L(T.root, u, h == null ? void 0 : h.className),
953
- ownerState: d({}, p, h == null ? void 0 : h.ownerState),
954
- classes: T,
955
- ref: t,
956
- children: l
957
- }))
958
- }));
959
- });
960
- process.env.NODE_ENV !== "production" && (bo.propTypes = {
961
- // ┌────────────────────────────── Warning ──────────────────────────────┐
962
- // │ These PropTypes are generated from the TypeScript type definitions. │
963
- // │ To update them, edit the d.ts file and run `pnpm proptypes`. │
964
- // └─────────────────────────────────────────────────────────────────────┘
965
- /**
966
- * The content of the component.
967
- */
968
- children: e.node,
969
- /**
970
- * Override or extend the styles applied to the component.
971
- */
972
- classes: e.object,
973
- /**
974
- * @ignore
975
- */
976
- className: e.string,
977
- /**
978
- * The component used for the root node.
979
- * Either a string to use a HTML element or a component.
980
- */
981
- component: e.elementType,
982
- /**
983
- * The components used for each slot inside.
984
- *
985
- * This prop is an alias for the `slots` prop.
986
- * It's recommended to use the `slots` prop instead.
987
- *
988
- * @default {}
989
- */
990
- components: e.shape({
991
- Root: e.elementType
992
- }),
993
- /**
994
- * The extra props for the slot components.
995
- * You can override the existing props or add new ones.
996
- *
997
- * This prop is an alias for the `slotProps` prop.
998
- * It's recommended to use the `slotProps` prop instead, as `componentsProps` will be deprecated in the future.
999
- *
1000
- * @default {}
1001
- */
1002
- componentsProps: e.shape({
1003
- root: e.object
1004
- }),
1005
- /**
1006
- * If `true`, the backdrop is invisible.
1007
- * It can be used when rendering a popover or a custom select component.
1008
- * @default false
1009
- */
1010
- invisible: e.bool,
1011
- /**
1012
- * If `true`, the component is shown.
1013
- */
1014
- open: e.bool.isRequired,
1015
- /**
1016
- * The extra props for the slot components.
1017
- * You can override the existing props or add new ones.
1018
- *
1019
- * This prop is an alias for the `componentsProps` prop, which will be deprecated in the future.
1020
- *
1021
- * @default {}
1022
- */
1023
- slotProps: e.shape({
1024
- root: e.object
1025
- }),
1026
- /**
1027
- * The components used for each slot inside.
1028
- *
1029
- * This prop is an alias for the `components` prop, which will be deprecated in the future.
1030
- *
1031
- * @default {}
1032
- */
1033
- slots: e.shape({
1034
- root: e.elementType
1035
- }),
1036
- /**
1037
- * The system prop that allows defining system overrides as well as additional CSS styles.
1038
- */
1039
- sx: e.oneOfType([e.arrayOf(e.oneOfType([e.func, e.object, e.bool])), e.func, e.object]),
1040
- /**
1041
- * The component used for the transition.
1042
- * [Follow this guide](/material-ui/transitions/#transitioncomponent-prop) to learn more about the requirements for this component.
1043
- * @default Fade
1044
- */
1045
- TransitionComponent: e.elementType,
1046
- /**
1047
- * The duration for the transition, in milliseconds.
1048
- * You may specify a single timeout for all transitions, or individually with an object.
1049
- */
1050
- transitionDuration: e.oneOfType([e.number, e.shape({
1051
- appear: e.number,
1052
- enter: e.number,
1053
- exit: e.number
1054
- })])
1055
- });
1056
- function Pe(o) {
1057
- return typeof o == "function" ? o() : o;
1058
- }
1059
- function Re(o) {
1060
- return o ? o.props.hasOwnProperty("in") : !1;
1061
- }
1062
- const Ne = new pe();
1063
- function Se(o) {
1064
- const {
1065
- container: n,
1066
- disableEscapeKeyDown: t = !1,
1067
- disableScrollLock: r = !1,
1068
- // @ts-ignore internal logic - Base UI supports the manager as a prop too
1069
- manager: s = Ne,
1070
- closeAfterTransition: i = !1,
1071
- onTransitionEnter: a,
1072
- onTransitionExited: l,
1073
- children: u,
1074
- onClose: g,
1075
- open: m,
1076
- rootRef: x
1077
- } = o, R = c.useRef({}), C = c.useRef(null), f = c.useRef(null), $ = Q(f, x), [S, D] = c.useState(!m), P = Re(u);
1078
- let p = !0;
1079
- (o["aria-hidden"] === "false" || o["aria-hidden"] === !1) && (p = !1);
1080
- const T = () => V(C.current), h = () => (R.current.modalRef = f.current, R.current.mount = C.current, R.current), k = () => {
1081
- s.mount(h(), {
1082
- disableScrollLock: r
1083
- }), f.current && (f.current.scrollTop = 0);
1084
- }, y = Eo(() => {
1085
- const b = Pe(n) || T().body;
1086
- s.add(h(), b), f.current && k();
1087
- }), O = c.useCallback(() => s.isTopModal(h()), [s]), z = Eo((b) => {
1088
- C.current = b, b && (m && O() ? k() : f.current && J(f.current, p));
1089
- }), I = c.useCallback(() => {
1090
- s.remove(h(), p);
1091
- }, [p, s]);
1092
- c.useEffect(() => () => {
1093
- I();
1094
- }, [I]), c.useEffect(() => {
1095
- m ? y() : (!P || !i) && I();
1096
- }, [m, I, P, i, y]);
1097
- const F = (b) => (E) => {
1098
- var B;
1099
- (B = b.onKeyDown) == null || B.call(b, E), !(E.key !== "Escape" || E.which === 229 || // Wait until IME is settled.
1100
- !O()) && (t || (E.stopPropagation(), g && g(E, "escapeKeyDown")));
1101
- }, A = (b) => (E) => {
1102
- var B;
1103
- (B = b.onClick) == null || B.call(b, E), E.target === E.currentTarget && g && g(E, "backdropClick");
1104
- };
1105
- return {
1106
- getRootProps: (b = {}) => {
1107
- const E = Go(o);
1108
- delete E.onTransitionEnter, delete E.onTransitionExited;
1109
- const B = d({}, E, b);
1110
- return d({
1111
- role: "presentation"
1112
- }, B, {
1113
- onKeyDown: F(B),
1114
- ref: $
1115
- });
1116
- },
1117
- getBackdropProps: (b = {}) => {
1118
- const E = b;
1119
- return d({
1120
- "aria-hidden": !0
1121
- }, E, {
1122
- onClick: A(E),
1123
- open: m
1124
- });
1125
- },
1126
- getTransitionProps: () => {
1127
- const b = () => {
1128
- D(!1), a && a();
1129
- }, E = () => {
1130
- D(!0), l && l(), i && I();
1131
- };
1132
- return {
1133
- onEnter: Co(b, u == null ? void 0 : u.props.onEnter),
1134
- onExited: Co(E, u == null ? void 0 : u.props.onExited)
1135
- };
1136
- },
1137
- rootRef: $,
1138
- portalRef: z,
1139
- isTopModal: O,
1140
- exited: S,
1141
- hasTransition: P
1142
- };
1143
- }
1144
- function De(o) {
1145
- return H("MuiModal", o);
1146
- }
1147
- U("MuiModal", ["root", "hidden", "backdrop"]);
1148
- const Oe = ["BackdropComponent", "BackdropProps", "classes", "className", "closeAfterTransition", "children", "container", "component", "components", "componentsProps", "disableAutoFocus", "disableEnforceFocus", "disableEscapeKeyDown", "disablePortal", "disableRestoreFocus", "disableScrollLock", "hideBackdrop", "keepMounted", "onBackdropClick", "onClose", "onTransitionEnter", "onTransitionExited", "open", "slotProps", "slots", "theme"], Ie = (o) => {
1149
- const {
1150
- open: n,
1151
- exited: t,
1152
- classes: r
1153
- } = o;
1154
- return G({
1155
- root: ["root", !n && t && "hidden"],
1156
- backdrop: ["backdrop"]
1157
- }, De, r);
1158
- }, Be = _("div", {
1159
- name: "MuiModal",
1160
- slot: "Root",
1161
- overridesResolver: (o, n) => {
1162
- const {
1163
- ownerState: t
1164
- } = o;
1165
- return [n.root, !t.open && t.exited && n.hidden];
1166
- }
1167
- })(({
1168
- theme: o,
1169
- ownerState: n
1170
- }) => d({
1171
- position: "fixed",
1172
- zIndex: (o.vars || o).zIndex.modal,
1173
- right: 0,
1174
- bottom: 0,
1175
- top: 0,
1176
- left: 0
1177
- }, !n.open && n.exited && {
1178
- visibility: "hidden"
1179
- })), Me = _(bo, {
1180
- name: "MuiModal",
1181
- slot: "Backdrop",
1182
- overridesResolver: (o, n) => n.backdrop
1183
- })({
1184
- zIndex: -1
1185
- }), $o = /* @__PURE__ */ c.forwardRef(function(n, t) {
1186
- var r, s, i, a, l, u;
1187
- const g = Y({
1188
- name: "MuiModal",
1189
- props: n
1190
- }), {
1191
- BackdropComponent: m = Me,
1192
- BackdropProps: x,
1193
- className: R,
1194
- closeAfterTransition: C = !1,
1195
- children: f,
1196
- container: $,
1197
- component: S,
1198
- components: D = {},
1199
- componentsProps: P = {},
1200
- disableAutoFocus: p = !1,
1201
- disableEnforceFocus: T = !1,
1202
- disableEscapeKeyDown: h = !1,
1203
- disablePortal: k = !1,
1204
- disableRestoreFocus: y = !1,
1205
- disableScrollLock: O = !1,
1206
- hideBackdrop: z = !1,
1207
- keepMounted: I = !1,
1208
- onBackdropClick: F,
1209
- open: A,
1210
- slotProps: w,
1211
- slots: v
1212
- // eslint-disable-next-line react/prop-types
1213
- } = g, W = j(g, Oe), b = d({}, g, {
1214
- closeAfterTransition: C,
1215
- disableAutoFocus: p,
1216
- disableEnforceFocus: T,
1217
- disableEscapeKeyDown: h,
1218
- disablePortal: k,
1219
- disableRestoreFocus: y,
1220
- disableScrollLock: O,
1221
- hideBackdrop: z,
1222
- keepMounted: I
1223
- }), {
1224
- getRootProps: E,
1225
- getBackdropProps: B,
1226
- getTransitionProps: zo,
1227
- portalRef: Fo,
1228
- isTopModal: Ao,
1229
- exited: go,
1230
- hasTransition: mo
1231
- } = Se(d({}, b, {
1232
- rootRef: t
1233
- })), X = d({}, b, {
1234
- exited: go
1235
- }), K = Ie(X), Z = {};
1236
- if (f.props.tabIndex === void 0 && (Z.tabIndex = "-1"), mo) {
1237
- const {
1238
- onEnter: q,
1239
- onExited: oo
1240
- } = zo();
1241
- Z.onEnter = q, Z.onExited = oo;
1242
- }
1243
- const vo = (r = (s = v == null ? void 0 : v.root) != null ? s : D.Root) != null ? r : Be, xo = (i = (a = v == null ? void 0 : v.backdrop) != null ? a : D.Backdrop) != null ? i : m, io = (l = w == null ? void 0 : w.root) != null ? l : P.root, so = (u = w == null ? void 0 : w.backdrop) != null ? u : P.backdrop, wo = ko({
1244
- elementType: vo,
1245
- externalSlotProps: io,
1246
- externalForwardedProps: W,
1247
- getSlotProps: E,
1248
- additionalProps: {
1249
- ref: t,
1250
- as: S
1251
- },
1252
- ownerState: X,
1253
- className: L(R, io == null ? void 0 : io.className, K == null ? void 0 : K.root, !X.open && X.exited && (K == null ? void 0 : K.hidden))
1254
- }), _o = ko({
1255
- elementType: xo,
1256
- externalSlotProps: so,
1257
- additionalProps: x,
1258
- getSlotProps: (q) => B(d({}, q, {
1259
- onClick: (oo) => {
1260
- F && F(oo), q != null && q.onClick && q.onClick(oo);
1261
- }
1262
- })),
1263
- className: L(so == null ? void 0 : so.className, x == null ? void 0 : x.className, K == null ? void 0 : K.backdrop),
1264
- ownerState: X
1265
- });
1266
- return !I && !A && (!mo || go) ? null : /* @__PURE__ */ N(ro, {
1267
- ref: Fo,
1268
- container: $,
1269
- disablePortal: k,
1270
- children: /* @__PURE__ */ co(vo, d({}, wo, {
1271
- children: [!z && m ? /* @__PURE__ */ N(xo, d({}, _o)) : null, /* @__PURE__ */ N(to, {
1272
- disableEnforceFocus: T,
1273
- disableAutoFocus: p,
1274
- disableRestoreFocus: y,
1275
- isEnabled: Ao,
1276
- open: A,
1277
- children: /* @__PURE__ */ c.cloneElement(f, Z)
1278
- })]
1279
- }))
1280
- });
1281
- });
1282
- process.env.NODE_ENV !== "production" && ($o.propTypes = {
1283
- // ┌────────────────────────────── Warning ──────────────────────────────┐
1284
- // │ These PropTypes are generated from the TypeScript type definitions. │
1285
- // │ To update them, edit the d.ts file and run `pnpm proptypes`. │
1286
- // └─────────────────────────────────────────────────────────────────────┘
1287
- /**
1288
- * A backdrop component. This prop enables custom backdrop rendering.
1289
- * @deprecated Use `slots.backdrop` instead. While this prop currently works, it will be removed in the next major version.
1290
- * Use the `slots.backdrop` prop to make your application ready for the next version of Material UI.
1291
- * @default styled(Backdrop, {
1292
- * name: 'MuiModal',
1293
- * slot: 'Backdrop',
1294
- * overridesResolver: (props, styles) => {
1295
- * return styles.backdrop;
1296
- * },
1297
- * })({
1298
- * zIndex: -1,
1299
- * })
1300
- */
1301
- BackdropComponent: e.elementType,
1302
- /**
1303
- * Props applied to the [`Backdrop`](/material-ui/api/backdrop/) element.
1304
- * @deprecated Use `slotProps.backdrop` instead.
1305
- */
1306
- BackdropProps: e.object,
1307
- /**
1308
- * A single child content element.
1309
- */
1310
- children: po.isRequired,
1311
- /**
1312
- * Override or extend the styles applied to the component.
1313
- */
1314
- classes: e.object,
1315
- /**
1316
- * @ignore
1317
- */
1318
- className: e.string,
1319
- /**
1320
- * When set to true the Modal waits until a nested Transition is completed before closing.
1321
- * @default false
1322
- */
1323
- closeAfterTransition: e.bool,
1324
- /**
1325
- * The component used for the root node.
1326
- * Either a string to use a HTML element or a component.
1327
- */
1328
- component: e.elementType,
1329
- /**
1330
- * The components used for each slot inside.
1331
- *
1332
- * This prop is an alias for the `slots` prop.
1333
- * It's recommended to use the `slots` prop instead.
1334
- *
1335
- * @default {}
1336
- */
1337
- components: e.shape({
1338
- Backdrop: e.elementType,
1339
- Root: e.elementType
1340
- }),
1341
- /**
1342
- * The extra props for the slot components.
1343
- * You can override the existing props or add new ones.
1344
- *
1345
- * This prop is an alias for the `slotProps` prop.
1346
- * It's recommended to use the `slotProps` prop instead, as `componentsProps` will be deprecated in the future.
1347
- *
1348
- * @default {}
1349
- */
1350
- componentsProps: e.shape({
1351
- backdrop: e.oneOfType([e.func, e.object]),
1352
- root: e.oneOfType([e.func, e.object])
1353
- }),
1354
- /**
1355
- * An HTML element or function that returns one.
1356
- * The `container` will have the portal children appended to it.
1357
- *
1358
- * You can also provide a callback, which is called in a React layout effect.
1359
- * This lets you set the container from a ref, and also makes server-side rendering possible.
1360
- *
1361
- * By default, it uses the body of the top-level document object,
1362
- * so it's simply `document.body` most of the time.
1363
- */
1364
- container: e.oneOfType([Oo, e.func]),
1365
- /**
1366
- * If `true`, the modal will not automatically shift focus to itself when it opens, and
1367
- * replace it to the last focused element when it closes.
1368
- * This also works correctly with any modal children that have the `disableAutoFocus` prop.
1369
- *
1370
- * Generally this should never be set to `true` as it makes the modal less
1371
- * accessible to assistive technologies, like screen readers.
1372
- * @default false
1373
- */
1374
- disableAutoFocus: e.bool,
1375
- /**
1376
- * If `true`, the modal will not prevent focus from leaving the modal while open.
1377
- *
1378
- * Generally this should never be set to `true` as it makes the modal less
1379
- * accessible to assistive technologies, like screen readers.
1380
- * @default false
1381
- */
1382
- disableEnforceFocus: e.bool,
1383
- /**
1384
- * If `true`, hitting escape will not fire the `onClose` callback.
1385
- * @default false
1386
- */
1387
- disableEscapeKeyDown: e.bool,
1388
- /**
1389
- * The `children` will be under the DOM hierarchy of the parent component.
1390
- * @default false
1391
- */
1392
- disablePortal: e.bool,
1393
- /**
1394
- * If `true`, the modal will not restore focus to previously focused element once
1395
- * modal is hidden or unmounted.
1396
- * @default false
1397
- */
1398
- disableRestoreFocus: e.bool,
1399
- /**
1400
- * Disable the scroll lock behavior.
1401
- * @default false
1402
- */
1403
- disableScrollLock: e.bool,
1404
- /**
1405
- * If `true`, the backdrop is not rendered.
1406
- * @default false
1407
- */
1408
- hideBackdrop: e.bool,
1409
- /**
1410
- * Always keep the children in the DOM.
1411
- * This prop can be useful in SEO situation or
1412
- * when you want to maximize the responsiveness of the Modal.
1413
- * @default false
1414
- */
1415
- keepMounted: e.bool,
1416
- /**
1417
- * Callback fired when the backdrop is clicked.
1418
- * @deprecated Use the `onClose` prop with the `reason` argument to handle the `backdropClick` events.
1419
- */
1420
- onBackdropClick: e.func,
1421
- /**
1422
- * Callback fired when the component requests to be closed.
1423
- * The `reason` parameter can optionally be used to control the response to `onClose`.
1424
- *
1425
- * @param {object} event The event source of the callback.
1426
- * @param {string} reason Can be: `"escapeKeyDown"`, `"backdropClick"`.
1427
- */
1428
- onClose: e.func,
1429
- /**
1430
- * A function called when a transition enters.
1431
- */
1432
- onTransitionEnter: e.func,
1433
- /**
1434
- * A function called when a transition has exited.
1435
- */
1436
- onTransitionExited: e.func,
1437
- /**
1438
- * If `true`, the component is shown.
1439
- */
1440
- open: e.bool.isRequired,
1441
- /**
1442
- * The props used for each slot inside the Modal.
1443
- * @default {}
1444
- */
1445
- slotProps: e.shape({
1446
- backdrop: e.oneOfType([e.func, e.object]),
1447
- root: e.oneOfType([e.func, e.object])
1448
- }),
1449
- /**
1450
- * The components used for each slot inside the Modal.
1451
- * Either a string to use a HTML element or a component.
1452
- * @default {}
1453
- */
1454
- slots: e.shape({
1455
- backdrop: e.elementType,
1456
- root: e.elementType
1457
- }),
1458
- /**
1459
- * The system prop that allows defining system overrides as well as additional CSS styles.
1460
- */
1461
- sx: e.oneOfType([e.arrayOf(e.oneOfType([e.func, e.object, e.bool])), e.func, e.object])
1462
- });
1463
- function $e(o) {
1464
- return H("MuiDialog", o);
1465
- }
1466
- const lo = U("MuiDialog", ["root", "scrollPaper", "scrollBody", "container", "paper", "paperScrollPaper", "paperScrollBody", "paperWidthFalse", "paperWidthXs", "paperWidthSm", "paperWidthMd", "paperWidthLg", "paperWidthXl", "paperFullWidth", "paperFullScreen"]), Wo = /* @__PURE__ */ c.createContext({});
1467
- process.env.NODE_ENV !== "production" && (Wo.displayName = "DialogContext");
1468
- const We = ["aria-describedby", "aria-labelledby", "BackdropComponent", "BackdropProps", "children", "className", "disableEscapeKeyDown", "fullScreen", "fullWidth", "maxWidth", "onBackdropClick", "onClick", "onClose", "open", "PaperComponent", "PaperProps", "scroll", "TransitionComponent", "transitionDuration", "TransitionProps"], ze = _(bo, {
1469
- name: "MuiDialog",
1470
- slot: "Backdrop",
1471
- overrides: (o, n) => n.backdrop
1472
- })({
1473
- // Improve scrollable dialog support.
1474
- zIndex: -1
1475
- }), Fe = (o) => {
1476
- const {
1477
- classes: n,
1478
- scroll: t,
1479
- maxWidth: r,
1480
- fullWidth: s,
1481
- fullScreen: i
1482
- } = o, a = {
1483
- root: ["root"],
1484
- container: ["container", `scroll${M(t)}`],
1485
- paper: ["paper", `paperScroll${M(t)}`, `paperWidth${M(String(r))}`, s && "paperFullWidth", i && "paperFullScreen"]
1486
- };
1487
- return G(a, $e, n);
1488
- }, Ae = _($o, {
1489
- name: "MuiDialog",
1490
- slot: "Root",
1491
- overridesResolver: (o, n) => n.root
1492
- })({
1493
- "@media print": {
1494
- // Use !important to override the Modal inline-style.
1495
- position: "absolute !important"
1496
- }
1497
- }), we = _("div", {
1498
- name: "MuiDialog",
1499
- slot: "Container",
1500
- overridesResolver: (o, n) => {
1501
- const {
1502
- ownerState: t
1503
- } = o;
1504
- return [n.container, n[`scroll${M(t.scroll)}`]];
1505
- }
1506
- })(({
1507
- ownerState: o
1508
- }) => d({
1509
- height: "100%",
1510
- "@media print": {
1511
- height: "auto"
1512
- },
1513
- // We disable the focus ring for mouse, touch and keyboard users.
1514
- outline: 0
1515
- }, o.scroll === "paper" && {
1516
- display: "flex",
1517
- justifyContent: "center",
1518
- alignItems: "center"
1519
- }, o.scroll === "body" && {
1520
- overflowY: "auto",
1521
- overflowX: "hidden",
1522
- textAlign: "center",
1523
- "&::after": {
1524
- content: '""',
1525
- display: "inline-block",
1526
- verticalAlign: "middle",
1527
- height: "100%",
1528
- width: "0"
1529
- }
1530
- })), _e = _(Do, {
1531
- name: "MuiDialog",
1532
- slot: "Paper",
1533
- overridesResolver: (o, n) => {
1534
- const {
1535
- ownerState: t
1536
- } = o;
1537
- return [n.paper, n[`scrollPaper${M(t.scroll)}`], n[`paperWidth${M(String(t.maxWidth))}`], t.fullWidth && n.paperFullWidth, t.fullScreen && n.paperFullScreen];
1538
- }
1539
- })(({
1540
- theme: o,
1541
- ownerState: n
1542
- }) => d({
1543
- margin: 32,
1544
- position: "relative",
1545
- overflowY: "auto",
1546
- // Fix IE11 issue, to remove at some point.
1547
- "@media print": {
1548
- overflowY: "visible",
1549
- boxShadow: "none"
1550
- }
1551
- }, n.scroll === "paper" && {
1552
- display: "flex",
1553
- flexDirection: "column",
1554
- maxHeight: "calc(100% - 64px)"
1555
- }, n.scroll === "body" && {
1556
- display: "inline-block",
1557
- verticalAlign: "middle",
1558
- textAlign: "left"
1559
- // 'initial' doesn't work on IE11
1560
- }, !n.maxWidth && {
1561
- maxWidth: "calc(100% - 64px)"
1562
- }, n.maxWidth === "xs" && {
1563
- maxWidth: o.breakpoints.unit === "px" ? Math.max(o.breakpoints.values.xs, 444) : `max(${o.breakpoints.values.xs}${o.breakpoints.unit}, 444px)`,
1564
- [`&.${lo.paperScrollBody}`]: {
1565
- [o.breakpoints.down(Math.max(o.breakpoints.values.xs, 444) + 32 * 2)]: {
1566
- maxWidth: "calc(100% - 64px)"
1567
- }
1568
- }
1569
- }, n.maxWidth && n.maxWidth !== "xs" && {
1570
- maxWidth: `${o.breakpoints.values[n.maxWidth]}${o.breakpoints.unit}`,
1571
- [`&.${lo.paperScrollBody}`]: {
1572
- [o.breakpoints.down(o.breakpoints.values[n.maxWidth] + 32 * 2)]: {
1573
- maxWidth: "calc(100% - 64px)"
1574
- }
1575
- }
1576
- }, n.fullWidth && {
1577
- width: "calc(100% - 64px)"
1578
- }, n.fullScreen && {
1579
- margin: 0,
1580
- width: "100%",
1581
- maxWidth: "100%",
1582
- height: "100%",
1583
- maxHeight: "none",
1584
- borderRadius: 0,
1585
- [`&.${lo.paperScrollBody}`]: {
1586
- margin: 0,
1587
- maxWidth: "100%"
1588
- }
1589
- })), Le = /* @__PURE__ */ c.forwardRef(function(n, t) {
1590
- const r = Y({
1591
- props: n,
1592
- name: "MuiDialog"
1593
- }), s = No(), i = {
1594
- enter: s.transitions.duration.enteringScreen,
1595
- exit: s.transitions.duration.leavingScreen
1596
- }, {
1597
- "aria-describedby": a,
1598
- "aria-labelledby": l,
1599
- BackdropComponent: u,
1600
- BackdropProps: g,
1601
- children: m,
1602
- className: x,
1603
- disableEscapeKeyDown: R = !1,
1604
- fullScreen: C = !1,
1605
- fullWidth: f = !1,
1606
- maxWidth: $ = "sm",
1607
- onBackdropClick: S,
1608
- onClick: D,
1609
- onClose: P,
1610
- open: p,
1611
- PaperComponent: T = Do,
1612
- PaperProps: h = {},
1613
- scroll: k = "paper",
1614
- TransitionComponent: y = fo,
1615
- transitionDuration: O = i,
1616
- TransitionProps: z
1617
- } = r, I = j(r, We), F = d({}, r, {
1618
- disableEscapeKeyDown: R,
1619
- fullScreen: C,
1620
- fullWidth: f,
1621
- maxWidth: $,
1622
- scroll: k
1623
- }), A = Fe(F), w = c.useRef(), v = (B) => {
1624
- w.current = B.target === B.currentTarget;
1625
- }, W = (B) => {
1626
- D && D(B), w.current && (w.current = null, S && S(B), P && P(B, "backdropClick"));
1627
- }, b = Xo(l), E = c.useMemo(() => ({
1628
- titleId: b
1629
- }), [b]);
1630
- return /* @__PURE__ */ N(Ae, d({
1631
- className: L(A.root, x),
1632
- closeAfterTransition: !0,
1633
- components: {
1634
- Backdrop: ze
1635
- },
1636
- componentsProps: {
1637
- backdrop: d({
1638
- transitionDuration: O,
1639
- as: u
1640
- }, g)
1641
- },
1642
- disableEscapeKeyDown: R,
1643
- onClose: P,
1644
- open: p,
1645
- ref: t,
1646
- onClick: W,
1647
- ownerState: F
1648
- }, I, {
1649
- children: /* @__PURE__ */ N(y, d({
1650
- appear: !0,
1651
- in: p,
1652
- timeout: O,
1653
- role: "presentation"
1654
- }, z, {
1655
- children: /* @__PURE__ */ N(we, {
1656
- className: L(A.container),
1657
- onMouseDown: v,
1658
- ownerState: F,
1659
- children: /* @__PURE__ */ N(_e, d({
1660
- as: T,
1661
- elevation: 24,
1662
- role: "dialog",
1663
- "aria-describedby": a,
1664
- "aria-labelledby": b
1665
- }, h, {
1666
- className: L(A.paper, h.className),
1667
- ownerState: F,
1668
- children: /* @__PURE__ */ N(Wo.Provider, {
1669
- value: E,
1670
- children: m
1671
- })
1672
- }))
1673
- })
1674
- }))
1675
- }));
1676
- });
1677
- process.env.NODE_ENV !== "production" && (Le.propTypes = {
1678
- // ┌────────────────────────────── Warning ──────────────────────────────┐
1679
- // │ These PropTypes are generated from the TypeScript type definitions. │
1680
- // │ To update them, edit the d.ts file and run `pnpm proptypes`. │
1681
- // └─────────────────────────────────────────────────────────────────────┘
1682
- /**
1683
- * The id(s) of the element(s) that describe the dialog.
1684
- */
1685
- "aria-describedby": e.string,
1686
- /**
1687
- * The id(s) of the element(s) that label the dialog.
1688
- */
1689
- "aria-labelledby": e.string,
1690
- /**
1691
- * A backdrop component. This prop enables custom backdrop rendering.
1692
- * @deprecated Use `slots.backdrop` instead. While this prop currently works, it will be removed in the next major version.
1693
- * Use the `slots.backdrop` prop to make your application ready for the next version of Material UI.
1694
- * @default styled(Backdrop, {
1695
- * name: 'MuiModal',
1696
- * slot: 'Backdrop',
1697
- * overridesResolver: (props, styles) => {
1698
- * return styles.backdrop;
1699
- * },
1700
- * })({
1701
- * zIndex: -1,
1702
- * })
1703
- */
1704
- BackdropComponent: e.elementType,
1705
- /**
1706
- * @ignore
1707
- */
1708
- BackdropProps: e.object,
1709
- /**
1710
- * Dialog children, usually the included sub-components.
1711
- */
1712
- children: e.node,
1713
- /**
1714
- * Override or extend the styles applied to the component.
1715
- */
1716
- classes: e.object,
1717
- /**
1718
- * @ignore
1719
- */
1720
- className: e.string,
1721
- /**
1722
- * If `true`, hitting escape will not fire the `onClose` callback.
1723
- * @default false
1724
- */
1725
- disableEscapeKeyDown: e.bool,
1726
- /**
1727
- * If `true`, the dialog is full-screen.
1728
- * @default false
1729
- */
1730
- fullScreen: e.bool,
1731
- /**
1732
- * If `true`, the dialog stretches to `maxWidth`.
1733
- *
1734
- * Notice that the dialog width grow is limited by the default margin.
1735
- * @default false
1736
- */
1737
- fullWidth: e.bool,
1738
- /**
1739
- * Determine the max-width of the dialog.
1740
- * The dialog width grows with the size of the screen.
1741
- * Set to `false` to disable `maxWidth`.
1742
- * @default 'sm'
1743
- */
1744
- maxWidth: e.oneOfType([e.oneOf(["xs", "sm", "md", "lg", "xl", !1]), e.string]),
1745
- /**
1746
- * Callback fired when the backdrop is clicked.
1747
- * @deprecated Use the `onClose` prop with the `reason` argument to handle the `backdropClick` events.
1748
- */
1749
- onBackdropClick: e.func,
1750
- /**
1751
- * @ignore
1752
- */
1753
- onClick: e.func,
1754
- /**
1755
- * Callback fired when the component requests to be closed.
1756
- *
1757
- * @param {object} event The event source of the callback.
1758
- * @param {string} reason Can be: `"escapeKeyDown"`, `"backdropClick"`.
1759
- */
1760
- onClose: e.func,
1761
- /**
1762
- * If `true`, the component is shown.
1763
- */
1764
- open: e.bool.isRequired,
1765
- /**
1766
- * The component used to render the body of the dialog.
1767
- * @default Paper
1768
- */
1769
- PaperComponent: e.elementType,
1770
- /**
1771
- * Props applied to the [`Paper`](/material-ui/api/paper/) element.
1772
- * @default {}
1773
- */
1774
- PaperProps: e.object,
1775
- /**
1776
- * Determine the container for scrolling the dialog.
1777
- * @default 'paper'
1778
- */
1779
- scroll: e.oneOf(["body", "paper"]),
1780
- /**
1781
- * The system prop that allows defining system overrides as well as additional CSS styles.
1782
- */
1783
- sx: e.oneOfType([e.arrayOf(e.oneOfType([e.func, e.object, e.bool])), e.func, e.object]),
1784
- /**
1785
- * The component used for the transition.
1786
- * [Follow this guide](/material-ui/transitions/#transitioncomponent-prop) to learn more about the requirements for this component.
1787
- * @default Fade
1788
- */
1789
- TransitionComponent: e.elementType,
1790
- /**
1791
- * The duration for the transition, in milliseconds.
1792
- * You may specify a single timeout for all transitions, or individually with an object.
1793
- * @default {
1794
- * enter: theme.transitions.duration.enteringScreen,
1795
- * exit: theme.transitions.duration.leavingScreen,
1796
- * }
1797
- */
1798
- transitionDuration: e.oneOfType([e.number, e.shape({
1799
- appear: e.number,
1800
- enter: e.number,
1801
- exit: e.number
1802
- })]),
1803
- /**
1804
- * Props applied to the transition element.
1805
- * By default, the element is based on this [`Transition`](https://reactcommunity.org/react-transition-group/transition/) component.
1806
- */
1807
- TransitionProps: e.object
1808
- });
1809
- function je(o) {
1810
- return H("MuiDialogActions", o);
1811
- }
1812
- U("MuiDialogActions", ["root", "spacing"]);
1813
- const Ve = ["className", "disableSpacing"], Ue = (o) => {
1814
- const {
1815
- classes: n,
1816
- disableSpacing: t
1817
- } = o;
1818
- return G({
1819
- root: ["root", !t && "spacing"]
1820
- }, je, n);
1821
- }, He = _("div", {
1822
- name: "MuiDialogActions",
1823
- slot: "Root",
1824
- overridesResolver: (o, n) => {
1825
- const {
1826
- ownerState: t
1827
- } = o;
1828
- return [n.root, !t.disableSpacing && n.spacing];
1829
- }
1830
- })(({
1831
- ownerState: o
1832
- }) => d({
1833
- display: "flex",
1834
- alignItems: "center",
1835
- padding: 8,
1836
- justifyContent: "flex-end",
1837
- flex: "0 0 auto"
1838
- }, !o.disableSpacing && {
1839
- "& > :not(style) ~ :not(style)": {
1840
- marginLeft: 8
1841
- }
1842
- })), Ke = /* @__PURE__ */ c.forwardRef(function(n, t) {
1843
- const r = Y({
1844
- props: n,
1845
- name: "MuiDialogActions"
1846
- }), {
1847
- className: s,
1848
- disableSpacing: i = !1
1849
- } = r, a = j(r, Ve), l = d({}, r, {
1850
- disableSpacing: i
1851
- }), u = Ue(l);
1852
- return /* @__PURE__ */ N(He, d({
1853
- className: L(u.root, s),
1854
- ownerState: l,
1855
- ref: t
1856
- }, a));
1857
- });
1858
- process.env.NODE_ENV !== "production" && (Ke.propTypes = {
1859
- // ┌────────────────────────────── Warning ──────────────────────────────┐
1860
- // │ These PropTypes are generated from the TypeScript type definitions. │
1861
- // │ To update them, edit the d.ts file and run `pnpm proptypes`. │
1862
- // └─────────────────────────────────────────────────────────────────────┘
1863
- /**
1864
- * The content of the component.
1865
- */
1866
- children: e.node,
1867
- /**
1868
- * Override or extend the styles applied to the component.
1869
- */
1870
- classes: e.object,
1871
- /**
1872
- * @ignore
1873
- */
1874
- className: e.string,
1875
- /**
1876
- * If `true`, the actions do not have additional margin.
1877
- * @default false
1878
- */
1879
- disableSpacing: e.bool,
1880
- /**
1881
- * The system prop that allows defining system overrides as well as additional CSS styles.
1882
- */
1883
- sx: e.oneOfType([e.arrayOf(e.oneOfType([e.func, e.object, e.bool])), e.func, e.object])
1884
- });
1885
- function qe(o) {
1886
- return H("MuiDialogContent", o);
1887
- }
1888
- U("MuiDialogContent", ["root", "dividers"]);
1889
- function bn(o) {
1890
- return H("MuiDialogTitle", o);
1891
- }
1892
- const Ye = U("MuiDialogTitle", ["root"]), Ge = ["className", "dividers"], Xe = (o) => {
1893
- const {
1894
- classes: n,
1895
- dividers: t
1896
- } = o;
1897
- return G({
1898
- root: ["root", t && "dividers"]
1899
- }, qe, n);
1900
- }, Je = _("div", {
1901
- name: "MuiDialogContent",
1902
- slot: "Root",
1903
- overridesResolver: (o, n) => {
1904
- const {
1905
- ownerState: t
1906
- } = o;
1907
- return [n.root, t.dividers && n.dividers];
1908
- }
1909
- })(({
1910
- theme: o,
1911
- ownerState: n
1912
- }) => d({
1913
- flex: "1 1 auto",
1914
- // Add iOS momentum scrolling for iOS < 13.0
1915
- WebkitOverflowScrolling: "touch",
1916
- overflowY: "auto",
1917
- padding: "20px 24px"
1918
- }, n.dividers ? {
1919
- padding: "16px 24px",
1920
- borderTop: `1px solid ${(o.vars || o).palette.divider}`,
1921
- borderBottom: `1px solid ${(o.vars || o).palette.divider}`
1922
- } : {
1923
- [`.${Ye.root} + &`]: {
1924
- paddingTop: 0
1925
- }
1926
- })), Qe = /* @__PURE__ */ c.forwardRef(function(n, t) {
1927
- const r = Y({
1928
- props: n,
1929
- name: "MuiDialogContent"
1930
- }), {
1931
- className: s,
1932
- dividers: i = !1
1933
- } = r, a = j(r, Ge), l = d({}, r, {
1934
- dividers: i
1935
- }), u = Xe(l);
1936
- return /* @__PURE__ */ N(Je, d({
1937
- className: L(u.root, s),
1938
- ownerState: l,
1939
- ref: t
1940
- }, a));
1941
- });
1942
- process.env.NODE_ENV !== "production" && (Qe.propTypes = {
1943
- // ┌────────────────────────────── Warning ──────────────────────────────┐
1944
- // │ These PropTypes are generated from the TypeScript type definitions. │
1945
- // │ To update them, edit the d.ts file and run `pnpm proptypes`. │
1946
- // └─────────────────────────────────────────────────────────────────────┘
1947
- /**
1948
- * The content of the component.
1949
- */
1950
- children: e.node,
1951
- /**
1952
- * Override or extend the styles applied to the component.
1953
- */
1954
- classes: e.object,
1955
- /**
1956
- * @ignore
1957
- */
1958
- className: e.string,
1959
- /**
1960
- * Display the top and bottom dividers.
1961
- * @default false
1962
- */
1963
- dividers: e.bool,
1964
- /**
1965
- * The system prop that allows defining system overrides as well as additional CSS styles.
1966
- */
1967
- sx: e.oneOfType([e.arrayOf(e.oneOfType([e.func, e.object, e.bool])), e.func, e.object])
1968
- });
1969
- export {
1970
- se as B,
1971
- Le as D,
1972
- fo as F,
1973
- Oo as H,
1974
- $o as M,
1975
- Qe as a,
1976
- Ke as b,
1977
- Wo as c,
1978
- lo as d,
1979
- Qo as e,
1980
- bn as g,
1981
- ko as u
1982
- };