@hybridcore/ui 1.0.0
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.
- package/README.md +50 -0
- package/dist/components/card/index.js +1101 -0
- package/dist/components/card/styled.js +8 -0
- package/dist/main.d.ts +31 -0
- package/dist/main.js +4 -0
- package/dist/styled-r6FrxDIi.js +4505 -0
- package/package.json +68 -0
|
@@ -0,0 +1,1101 @@
|
|
|
1
|
+
import { jsx as l, jsxs as C } from "react/jsx-runtime";
|
|
2
|
+
import { g as _, a as $, s as M, _ as c, u as j, b as w, c as T, P as o, d as E, e as q, f as k, h as Z, L as G, B as O, i as J, j as K, k as Q, l as X } from "../../styled-r6FrxDIi.js";
|
|
3
|
+
import * as x from "react";
|
|
4
|
+
function Y(e) {
|
|
5
|
+
return $("MuiCardActions", e);
|
|
6
|
+
}
|
|
7
|
+
_("MuiCardActions", ["root", "spacing"]);
|
|
8
|
+
const ee = ["disableSpacing", "className"], oe = (e) => {
|
|
9
|
+
const {
|
|
10
|
+
classes: t,
|
|
11
|
+
disableSpacing: n
|
|
12
|
+
} = e;
|
|
13
|
+
return E({
|
|
14
|
+
root: ["root", !n && "spacing"]
|
|
15
|
+
}, Y, t);
|
|
16
|
+
}, te = M("div", {
|
|
17
|
+
name: "MuiCardActions",
|
|
18
|
+
slot: "Root",
|
|
19
|
+
overridesResolver: (e, t) => {
|
|
20
|
+
const {
|
|
21
|
+
ownerState: n
|
|
22
|
+
} = e;
|
|
23
|
+
return [t.root, !n.disableSpacing && t.spacing];
|
|
24
|
+
}
|
|
25
|
+
})(({
|
|
26
|
+
ownerState: e
|
|
27
|
+
}) => c({
|
|
28
|
+
display: "flex",
|
|
29
|
+
alignItems: "center",
|
|
30
|
+
padding: 8
|
|
31
|
+
}, !e.disableSpacing && {
|
|
32
|
+
"& > :not(style) ~ :not(style)": {
|
|
33
|
+
marginLeft: 8
|
|
34
|
+
}
|
|
35
|
+
})), V = /* @__PURE__ */ x.forwardRef(function(t, n) {
|
|
36
|
+
const r = j({
|
|
37
|
+
props: t,
|
|
38
|
+
name: "MuiCardActions"
|
|
39
|
+
}), {
|
|
40
|
+
disableSpacing: s = !1,
|
|
41
|
+
className: a
|
|
42
|
+
} = r, d = w(r, ee), i = c({}, r, {
|
|
43
|
+
disableSpacing: s
|
|
44
|
+
}), g = oe(i);
|
|
45
|
+
return /* @__PURE__ */ l(te, c({
|
|
46
|
+
className: T(g.root, a),
|
|
47
|
+
ownerState: i,
|
|
48
|
+
ref: n
|
|
49
|
+
}, d));
|
|
50
|
+
});
|
|
51
|
+
process.env.NODE_ENV !== "production" && (V.propTypes = {
|
|
52
|
+
// ┌────────────────────────────── Warning ──────────────────────────────┐
|
|
53
|
+
// │ These PropTypes are generated from the TypeScript type definitions. │
|
|
54
|
+
// │ To update them, edit the d.ts file and run `pnpm proptypes`. │
|
|
55
|
+
// └─────────────────────────────────────────────────────────────────────┘
|
|
56
|
+
/**
|
|
57
|
+
* The content of the component.
|
|
58
|
+
*/
|
|
59
|
+
children: o.node,
|
|
60
|
+
/**
|
|
61
|
+
* Override or extend the styles applied to the component.
|
|
62
|
+
*/
|
|
63
|
+
classes: o.object,
|
|
64
|
+
/**
|
|
65
|
+
* @ignore
|
|
66
|
+
*/
|
|
67
|
+
className: o.string,
|
|
68
|
+
/**
|
|
69
|
+
* If `true`, the actions do not have additional margin.
|
|
70
|
+
* @default false
|
|
71
|
+
*/
|
|
72
|
+
disableSpacing: o.bool,
|
|
73
|
+
/**
|
|
74
|
+
* The system prop that allows defining system overrides as well as additional CSS styles.
|
|
75
|
+
*/
|
|
76
|
+
sx: o.oneOfType([o.arrayOf(o.oneOfType([o.func, o.object, o.bool])), o.func, o.object])
|
|
77
|
+
});
|
|
78
|
+
function ne(e) {
|
|
79
|
+
return $("MuiCardContent", e);
|
|
80
|
+
}
|
|
81
|
+
_("MuiCardContent", ["root"]);
|
|
82
|
+
const re = ["className", "component"], se = (e) => {
|
|
83
|
+
const {
|
|
84
|
+
classes: t
|
|
85
|
+
} = e;
|
|
86
|
+
return E({
|
|
87
|
+
root: ["root"]
|
|
88
|
+
}, ne, t);
|
|
89
|
+
}, ie = M("div", {
|
|
90
|
+
name: "MuiCardContent",
|
|
91
|
+
slot: "Root",
|
|
92
|
+
overridesResolver: (e, t) => t.root
|
|
93
|
+
})(() => ({
|
|
94
|
+
padding: 16,
|
|
95
|
+
"&:last-child": {
|
|
96
|
+
paddingBottom: 24
|
|
97
|
+
}
|
|
98
|
+
})), D = /* @__PURE__ */ x.forwardRef(function(t, n) {
|
|
99
|
+
const r = j({
|
|
100
|
+
props: t,
|
|
101
|
+
name: "MuiCardContent"
|
|
102
|
+
}), {
|
|
103
|
+
className: s,
|
|
104
|
+
component: a = "div"
|
|
105
|
+
} = r, d = w(r, re), i = c({}, r, {
|
|
106
|
+
component: a
|
|
107
|
+
}), g = se(i);
|
|
108
|
+
return /* @__PURE__ */ l(ie, c({
|
|
109
|
+
as: a,
|
|
110
|
+
className: T(g.root, s),
|
|
111
|
+
ownerState: i,
|
|
112
|
+
ref: n
|
|
113
|
+
}, d));
|
|
114
|
+
});
|
|
115
|
+
process.env.NODE_ENV !== "production" && (D.propTypes = {
|
|
116
|
+
// ┌────────────────────────────── Warning ──────────────────────────────┐
|
|
117
|
+
// │ These PropTypes are generated from the TypeScript type definitions. │
|
|
118
|
+
// │ To update them, edit the d.ts file and run `pnpm proptypes`. │
|
|
119
|
+
// └─────────────────────────────────────────────────────────────────────┘
|
|
120
|
+
/**
|
|
121
|
+
* The content of the component.
|
|
122
|
+
*/
|
|
123
|
+
children: o.node,
|
|
124
|
+
/**
|
|
125
|
+
* Override or extend the styles applied to the component.
|
|
126
|
+
*/
|
|
127
|
+
classes: o.object,
|
|
128
|
+
/**
|
|
129
|
+
* @ignore
|
|
130
|
+
*/
|
|
131
|
+
className: o.string,
|
|
132
|
+
/**
|
|
133
|
+
* The component used for the root node.
|
|
134
|
+
* Either a string to use a HTML element or a component.
|
|
135
|
+
*/
|
|
136
|
+
component: o.elementType,
|
|
137
|
+
/**
|
|
138
|
+
* The system prop that allows defining system overrides as well as additional CSS styles.
|
|
139
|
+
*/
|
|
140
|
+
sx: o.oneOfType([o.arrayOf(o.oneOfType([o.func, o.object, o.bool])), o.func, o.object])
|
|
141
|
+
});
|
|
142
|
+
function ae(e) {
|
|
143
|
+
return $("MuiCardMedia", e);
|
|
144
|
+
}
|
|
145
|
+
_("MuiCardMedia", ["root", "media", "img"]);
|
|
146
|
+
const le = ["children", "className", "component", "image", "src", "style"], ce = (e) => {
|
|
147
|
+
const {
|
|
148
|
+
classes: t,
|
|
149
|
+
isMediaComponent: n,
|
|
150
|
+
isImageComponent: r
|
|
151
|
+
} = e;
|
|
152
|
+
return E({
|
|
153
|
+
root: ["root", n && "media", r && "img"]
|
|
154
|
+
}, ae, t);
|
|
155
|
+
}, de = M("div", {
|
|
156
|
+
name: "MuiCardMedia",
|
|
157
|
+
slot: "Root",
|
|
158
|
+
overridesResolver: (e, t) => {
|
|
159
|
+
const {
|
|
160
|
+
ownerState: n
|
|
161
|
+
} = e, {
|
|
162
|
+
isMediaComponent: r,
|
|
163
|
+
isImageComponent: s
|
|
164
|
+
} = n;
|
|
165
|
+
return [t.root, r && t.media, s && t.img];
|
|
166
|
+
}
|
|
167
|
+
})(({
|
|
168
|
+
ownerState: e
|
|
169
|
+
}) => c({
|
|
170
|
+
display: "block",
|
|
171
|
+
backgroundSize: "cover",
|
|
172
|
+
backgroundRepeat: "no-repeat",
|
|
173
|
+
backgroundPosition: "center"
|
|
174
|
+
}, e.isMediaComponent && {
|
|
175
|
+
width: "100%"
|
|
176
|
+
}, e.isImageComponent && {
|
|
177
|
+
// ⚠️ object-fit is not supported by IE11.
|
|
178
|
+
objectFit: "cover"
|
|
179
|
+
})), pe = ["video", "audio", "picture", "iframe", "img"], ue = ["picture", "img"], F = /* @__PURE__ */ x.forwardRef(function(t, n) {
|
|
180
|
+
const r = j({
|
|
181
|
+
props: t,
|
|
182
|
+
name: "MuiCardMedia"
|
|
183
|
+
}), {
|
|
184
|
+
children: s,
|
|
185
|
+
className: a,
|
|
186
|
+
component: d = "div",
|
|
187
|
+
image: i,
|
|
188
|
+
src: g,
|
|
189
|
+
style: f
|
|
190
|
+
} = r, y = w(r, le), m = pe.indexOf(d) !== -1, p = !m && i ? c({
|
|
191
|
+
backgroundImage: `url("${i}")`
|
|
192
|
+
}, f) : f, u = c({}, r, {
|
|
193
|
+
component: d,
|
|
194
|
+
isMediaComponent: m,
|
|
195
|
+
isImageComponent: ue.indexOf(d) !== -1
|
|
196
|
+
}), h = ce(u);
|
|
197
|
+
return /* @__PURE__ */ l(de, c({
|
|
198
|
+
className: T(h.root, a),
|
|
199
|
+
as: d,
|
|
200
|
+
role: !m && i ? "img" : void 0,
|
|
201
|
+
ref: n,
|
|
202
|
+
style: p,
|
|
203
|
+
ownerState: u,
|
|
204
|
+
src: m ? i || g : void 0
|
|
205
|
+
}, y, {
|
|
206
|
+
children: s
|
|
207
|
+
}));
|
|
208
|
+
});
|
|
209
|
+
process.env.NODE_ENV !== "production" && (F.propTypes = {
|
|
210
|
+
// ┌────────────────────────────── Warning ──────────────────────────────┐
|
|
211
|
+
// │ These PropTypes are generated from the TypeScript type definitions. │
|
|
212
|
+
// │ To update them, edit the d.ts file and run `pnpm proptypes`. │
|
|
213
|
+
// └─────────────────────────────────────────────────────────────────────┘
|
|
214
|
+
/**
|
|
215
|
+
* The content of the component.
|
|
216
|
+
*/
|
|
217
|
+
children: q(o.node, (e) => !e.children && !e.image && !e.src && !e.component ? new Error("MUI: Either `children`, `image`, `src` or `component` prop must be specified.") : null),
|
|
218
|
+
/**
|
|
219
|
+
* Override or extend the styles applied to the component.
|
|
220
|
+
*/
|
|
221
|
+
classes: o.object,
|
|
222
|
+
/**
|
|
223
|
+
* @ignore
|
|
224
|
+
*/
|
|
225
|
+
className: o.string,
|
|
226
|
+
/**
|
|
227
|
+
* The component used for the root node.
|
|
228
|
+
* Either a string to use a HTML element or a component.
|
|
229
|
+
*/
|
|
230
|
+
component: o.elementType,
|
|
231
|
+
/**
|
|
232
|
+
* Image to be displayed as a background image.
|
|
233
|
+
* Either `image` or `src` prop must be specified.
|
|
234
|
+
* Note that caller must specify height otherwise the image will not be visible.
|
|
235
|
+
*/
|
|
236
|
+
image: o.string,
|
|
237
|
+
/**
|
|
238
|
+
* An alias for `image` property.
|
|
239
|
+
* Available only with media components.
|
|
240
|
+
* Media components: `video`, `audio`, `picture`, `iframe`, `img`.
|
|
241
|
+
*/
|
|
242
|
+
src: o.string,
|
|
243
|
+
/**
|
|
244
|
+
* @ignore
|
|
245
|
+
*/
|
|
246
|
+
style: o.object,
|
|
247
|
+
/**
|
|
248
|
+
* The system prop that allows defining system overrides as well as additional CSS styles.
|
|
249
|
+
*/
|
|
250
|
+
sx: o.oneOfType([o.arrayOf(o.oneOfType([o.func, o.object, o.bool])), o.func, o.object])
|
|
251
|
+
});
|
|
252
|
+
function fe(e) {
|
|
253
|
+
return $("MuiTypography", e);
|
|
254
|
+
}
|
|
255
|
+
_("MuiTypography", ["root", "h1", "h2", "h3", "h4", "h5", "h6", "subtitle1", "subtitle2", "body1", "body2", "inherit", "button", "caption", "overline", "alignLeft", "alignRight", "alignCenter", "alignJustify", "noWrap", "gutterBottom", "paragraph"]);
|
|
256
|
+
const me = ["align", "className", "component", "gutterBottom", "noWrap", "paragraph", "variant", "variantMapping"], ge = (e) => {
|
|
257
|
+
const {
|
|
258
|
+
align: t,
|
|
259
|
+
gutterBottom: n,
|
|
260
|
+
noWrap: r,
|
|
261
|
+
paragraph: s,
|
|
262
|
+
variant: a,
|
|
263
|
+
classes: d
|
|
264
|
+
} = e, i = {
|
|
265
|
+
root: ["root", a, e.align !== "inherit" && `align${k(t)}`, n && "gutterBottom", r && "noWrap", s && "paragraph"]
|
|
266
|
+
};
|
|
267
|
+
return E(i, fe, d);
|
|
268
|
+
}, he = M("span", {
|
|
269
|
+
name: "MuiTypography",
|
|
270
|
+
slot: "Root",
|
|
271
|
+
overridesResolver: (e, t) => {
|
|
272
|
+
const {
|
|
273
|
+
ownerState: n
|
|
274
|
+
} = e;
|
|
275
|
+
return [t.root, n.variant && t[n.variant], n.align !== "inherit" && t[`align${k(n.align)}`], n.noWrap && t.noWrap, n.gutterBottom && t.gutterBottom, n.paragraph && t.paragraph];
|
|
276
|
+
}
|
|
277
|
+
})(({
|
|
278
|
+
theme: e,
|
|
279
|
+
ownerState: t
|
|
280
|
+
}) => c({
|
|
281
|
+
margin: 0
|
|
282
|
+
}, t.variant === "inherit" && {
|
|
283
|
+
// Some elements, like <button> on Chrome have default font that doesn't inherit, reset this.
|
|
284
|
+
font: "inherit"
|
|
285
|
+
}, t.variant !== "inherit" && e.typography[t.variant], t.align !== "inherit" && {
|
|
286
|
+
textAlign: t.align
|
|
287
|
+
}, t.noWrap && {
|
|
288
|
+
overflow: "hidden",
|
|
289
|
+
textOverflow: "ellipsis",
|
|
290
|
+
whiteSpace: "nowrap"
|
|
291
|
+
}, t.gutterBottom && {
|
|
292
|
+
marginBottom: "0.35em"
|
|
293
|
+
}, t.paragraph && {
|
|
294
|
+
marginBottom: 16
|
|
295
|
+
})), L = {
|
|
296
|
+
h1: "h1",
|
|
297
|
+
h2: "h2",
|
|
298
|
+
h3: "h3",
|
|
299
|
+
h4: "h4",
|
|
300
|
+
h5: "h5",
|
|
301
|
+
h6: "h6",
|
|
302
|
+
subtitle1: "h6",
|
|
303
|
+
subtitle2: "h6",
|
|
304
|
+
body1: "p",
|
|
305
|
+
body2: "p",
|
|
306
|
+
inherit: "p"
|
|
307
|
+
}, ye = {
|
|
308
|
+
primary: "primary.main",
|
|
309
|
+
textPrimary: "text.primary",
|
|
310
|
+
secondary: "secondary.main",
|
|
311
|
+
textSecondary: "text.secondary",
|
|
312
|
+
error: "error.main"
|
|
313
|
+
}, ve = (e) => ye[e] || e, S = /* @__PURE__ */ x.forwardRef(function(t, n) {
|
|
314
|
+
const r = j({
|
|
315
|
+
props: t,
|
|
316
|
+
name: "MuiTypography"
|
|
317
|
+
}), s = ve(r.color), a = Z(c({}, r, {
|
|
318
|
+
color: s
|
|
319
|
+
})), {
|
|
320
|
+
align: d = "inherit",
|
|
321
|
+
className: i,
|
|
322
|
+
component: g,
|
|
323
|
+
gutterBottom: f = !1,
|
|
324
|
+
noWrap: y = !1,
|
|
325
|
+
paragraph: m = !1,
|
|
326
|
+
variant: p = "body1",
|
|
327
|
+
variantMapping: u = L
|
|
328
|
+
} = a, h = w(a, me), v = c({}, a, {
|
|
329
|
+
align: d,
|
|
330
|
+
color: s,
|
|
331
|
+
className: i,
|
|
332
|
+
component: g,
|
|
333
|
+
gutterBottom: f,
|
|
334
|
+
noWrap: y,
|
|
335
|
+
paragraph: m,
|
|
336
|
+
variant: p,
|
|
337
|
+
variantMapping: u
|
|
338
|
+
}), b = g || (m ? "p" : u[p] || L[p]) || "span", N = ge(v);
|
|
339
|
+
return /* @__PURE__ */ l(he, c({
|
|
340
|
+
as: b,
|
|
341
|
+
ref: n,
|
|
342
|
+
ownerState: v,
|
|
343
|
+
className: T(N.root, i)
|
|
344
|
+
}, h));
|
|
345
|
+
});
|
|
346
|
+
process.env.NODE_ENV !== "production" && (S.propTypes = {
|
|
347
|
+
// ┌────────────────────────────── Warning ──────────────────────────────┐
|
|
348
|
+
// │ These PropTypes are generated from the TypeScript type definitions. │
|
|
349
|
+
// │ To update them, edit the d.ts file and run `pnpm proptypes`. │
|
|
350
|
+
// └─────────────────────────────────────────────────────────────────────┘
|
|
351
|
+
/**
|
|
352
|
+
* Set the text-align on the component.
|
|
353
|
+
* @default 'inherit'
|
|
354
|
+
*/
|
|
355
|
+
align: o.oneOf(["center", "inherit", "justify", "left", "right"]),
|
|
356
|
+
/**
|
|
357
|
+
* The content of the component.
|
|
358
|
+
*/
|
|
359
|
+
children: o.node,
|
|
360
|
+
/**
|
|
361
|
+
* Override or extend the styles applied to the component.
|
|
362
|
+
*/
|
|
363
|
+
classes: o.object,
|
|
364
|
+
/**
|
|
365
|
+
* @ignore
|
|
366
|
+
*/
|
|
367
|
+
className: o.string,
|
|
368
|
+
/**
|
|
369
|
+
* The component used for the root node.
|
|
370
|
+
* Either a string to use a HTML element or a component.
|
|
371
|
+
*/
|
|
372
|
+
component: o.elementType,
|
|
373
|
+
/**
|
|
374
|
+
* If `true`, the text will have a bottom margin.
|
|
375
|
+
* @default false
|
|
376
|
+
*/
|
|
377
|
+
gutterBottom: o.bool,
|
|
378
|
+
/**
|
|
379
|
+
* If `true`, the text will not wrap, but instead will truncate with a text overflow ellipsis.
|
|
380
|
+
*
|
|
381
|
+
* Note that text overflow can only happen with block or inline-block level elements
|
|
382
|
+
* (the element needs to have a width in order to overflow).
|
|
383
|
+
* @default false
|
|
384
|
+
*/
|
|
385
|
+
noWrap: o.bool,
|
|
386
|
+
/**
|
|
387
|
+
* If `true`, the element will be a paragraph element.
|
|
388
|
+
* @default false
|
|
389
|
+
*/
|
|
390
|
+
paragraph: o.bool,
|
|
391
|
+
/**
|
|
392
|
+
* The system prop that allows defining system overrides as well as additional CSS styles.
|
|
393
|
+
*/
|
|
394
|
+
sx: o.oneOfType([o.arrayOf(o.oneOfType([o.func, o.object, o.bool])), o.func, o.object]),
|
|
395
|
+
/**
|
|
396
|
+
* Applies the theme typography styles.
|
|
397
|
+
* @default 'body1'
|
|
398
|
+
*/
|
|
399
|
+
variant: o.oneOfType([o.oneOf(["body1", "body2", "button", "caption", "h1", "h2", "h3", "h4", "h5", "h6", "inherit", "overline", "subtitle1", "subtitle2"]), o.string]),
|
|
400
|
+
/**
|
|
401
|
+
* The component maps the variant prop to a range of different HTML element types.
|
|
402
|
+
* For instance, subtitle1 to `<h6>`.
|
|
403
|
+
* If you wish to change that mapping, you can provide your own.
|
|
404
|
+
* Alternatively, you can use the `component` prop.
|
|
405
|
+
* @default {
|
|
406
|
+
* h1: 'h1',
|
|
407
|
+
* h2: 'h2',
|
|
408
|
+
* h3: 'h3',
|
|
409
|
+
* h4: 'h4',
|
|
410
|
+
* h5: 'h5',
|
|
411
|
+
* h6: 'h6',
|
|
412
|
+
* subtitle1: 'h6',
|
|
413
|
+
* subtitle2: 'h6',
|
|
414
|
+
* body1: 'p',
|
|
415
|
+
* body2: 'p',
|
|
416
|
+
* inherit: 'p',
|
|
417
|
+
* }
|
|
418
|
+
*/
|
|
419
|
+
variantMapping: o.object
|
|
420
|
+
});
|
|
421
|
+
function be(e, t) {
|
|
422
|
+
typeof e == "function" ? e(t) : e && (e.current = t);
|
|
423
|
+
}
|
|
424
|
+
function xe(...e) {
|
|
425
|
+
return x.useMemo(() => e.every((t) => t == null) ? null : (t) => {
|
|
426
|
+
e.forEach((n) => {
|
|
427
|
+
be(n, t);
|
|
428
|
+
});
|
|
429
|
+
}, e);
|
|
430
|
+
}
|
|
431
|
+
function Ce(e) {
|
|
432
|
+
return typeof e == "string";
|
|
433
|
+
}
|
|
434
|
+
function Se(e, t, n) {
|
|
435
|
+
return e === void 0 || Ce(e) ? t : c({}, t, {
|
|
436
|
+
ownerState: c({}, t.ownerState, n)
|
|
437
|
+
});
|
|
438
|
+
}
|
|
439
|
+
function we(e, t = []) {
|
|
440
|
+
if (e === void 0)
|
|
441
|
+
return {};
|
|
442
|
+
const n = {};
|
|
443
|
+
return Object.keys(e).filter((r) => r.match(/^on[A-Z]/) && typeof e[r] == "function" && !t.includes(r)).forEach((r) => {
|
|
444
|
+
n[r] = e[r];
|
|
445
|
+
}), n;
|
|
446
|
+
}
|
|
447
|
+
function H(e) {
|
|
448
|
+
if (e === void 0)
|
|
449
|
+
return {};
|
|
450
|
+
const t = {};
|
|
451
|
+
return Object.keys(e).filter((n) => !(n.match(/^on[A-Z]/) && typeof e[n] == "function")).forEach((n) => {
|
|
452
|
+
t[n] = e[n];
|
|
453
|
+
}), t;
|
|
454
|
+
}
|
|
455
|
+
function Ne(e) {
|
|
456
|
+
const {
|
|
457
|
+
getSlotProps: t,
|
|
458
|
+
additionalProps: n,
|
|
459
|
+
externalSlotProps: r,
|
|
460
|
+
externalForwardedProps: s,
|
|
461
|
+
className: a
|
|
462
|
+
} = e;
|
|
463
|
+
if (!t) {
|
|
464
|
+
const u = T(n == null ? void 0 : n.className, a, s == null ? void 0 : s.className, r == null ? void 0 : r.className), h = c({}, n == null ? void 0 : n.style, s == null ? void 0 : s.style, r == null ? void 0 : r.style), v = c({}, n, s, r);
|
|
465
|
+
return u.length > 0 && (v.className = u), Object.keys(h).length > 0 && (v.style = h), {
|
|
466
|
+
props: v,
|
|
467
|
+
internalRef: void 0
|
|
468
|
+
};
|
|
469
|
+
}
|
|
470
|
+
const d = we(c({}, s, r)), i = H(r), g = H(s), f = t(d), y = T(f == null ? void 0 : f.className, n == null ? void 0 : n.className, a, s == null ? void 0 : s.className, r == null ? void 0 : r.className), m = c({}, f == null ? void 0 : f.style, n == null ? void 0 : n.style, s == null ? void 0 : s.style, r == null ? void 0 : r.style), p = c({}, f, n, g, i);
|
|
471
|
+
return y.length > 0 && (p.className = y), Object.keys(m).length > 0 && (p.style = m), {
|
|
472
|
+
props: p,
|
|
473
|
+
internalRef: f.ref
|
|
474
|
+
};
|
|
475
|
+
}
|
|
476
|
+
function Oe(e, t, n) {
|
|
477
|
+
return typeof e == "function" ? e(t, n) : e;
|
|
478
|
+
}
|
|
479
|
+
function Te(e) {
|
|
480
|
+
return $("MuiSvgIcon", e);
|
|
481
|
+
}
|
|
482
|
+
_("MuiSvgIcon", ["root", "colorPrimary", "colorSecondary", "colorAction", "colorError", "colorDisabled", "fontSizeInherit", "fontSizeSmall", "fontSizeMedium", "fontSizeLarge"]);
|
|
483
|
+
const Me = ["children", "className", "color", "component", "fontSize", "htmlColor", "inheritViewBox", "titleAccess", "viewBox"], Re = (e) => {
|
|
484
|
+
const {
|
|
485
|
+
color: t,
|
|
486
|
+
fontSize: n,
|
|
487
|
+
classes: r
|
|
488
|
+
} = e, s = {
|
|
489
|
+
root: ["root", t !== "inherit" && `color${k(t)}`, `fontSize${k(n)}`]
|
|
490
|
+
};
|
|
491
|
+
return E(s, Te, r);
|
|
492
|
+
}, Pe = M("svg", {
|
|
493
|
+
name: "MuiSvgIcon",
|
|
494
|
+
slot: "Root",
|
|
495
|
+
overridesResolver: (e, t) => {
|
|
496
|
+
const {
|
|
497
|
+
ownerState: n
|
|
498
|
+
} = e;
|
|
499
|
+
return [t.root, n.color !== "inherit" && t[`color${k(n.color)}`], t[`fontSize${k(n.fontSize)}`]];
|
|
500
|
+
}
|
|
501
|
+
})(({
|
|
502
|
+
theme: e,
|
|
503
|
+
ownerState: t
|
|
504
|
+
}) => {
|
|
505
|
+
var n, r, s, a, d, i, g, f, y, m, p, u, h;
|
|
506
|
+
return {
|
|
507
|
+
userSelect: "none",
|
|
508
|
+
width: "1em",
|
|
509
|
+
height: "1em",
|
|
510
|
+
display: "inline-block",
|
|
511
|
+
// the <svg> will define the property that has `currentColor`
|
|
512
|
+
// for example heroicons uses fill="none" and stroke="currentColor"
|
|
513
|
+
fill: t.hasSvgAsChild ? void 0 : "currentColor",
|
|
514
|
+
flexShrink: 0,
|
|
515
|
+
transition: (n = e.transitions) == null || (r = n.create) == null ? void 0 : r.call(n, "fill", {
|
|
516
|
+
duration: (s = e.transitions) == null || (s = s.duration) == null ? void 0 : s.shorter
|
|
517
|
+
}),
|
|
518
|
+
fontSize: {
|
|
519
|
+
inherit: "inherit",
|
|
520
|
+
small: ((a = e.typography) == null || (d = a.pxToRem) == null ? void 0 : d.call(a, 20)) || "1.25rem",
|
|
521
|
+
medium: ((i = e.typography) == null || (g = i.pxToRem) == null ? void 0 : g.call(i, 24)) || "1.5rem",
|
|
522
|
+
large: ((f = e.typography) == null || (y = f.pxToRem) == null ? void 0 : y.call(f, 35)) || "2.1875rem"
|
|
523
|
+
}[t.fontSize],
|
|
524
|
+
// TODO v5 deprecate, v6 remove for sx
|
|
525
|
+
color: (m = (p = (e.vars || e).palette) == null || (p = p[t.color]) == null ? void 0 : p.main) != null ? m : {
|
|
526
|
+
action: (u = (e.vars || e).palette) == null || (u = u.action) == null ? void 0 : u.active,
|
|
527
|
+
disabled: (h = (e.vars || e).palette) == null || (h = h.action) == null ? void 0 : h.disabled,
|
|
528
|
+
inherit: void 0
|
|
529
|
+
}[t.color]
|
|
530
|
+
};
|
|
531
|
+
}), z = /* @__PURE__ */ x.forwardRef(function(t, n) {
|
|
532
|
+
const r = j({
|
|
533
|
+
props: t,
|
|
534
|
+
name: "MuiSvgIcon"
|
|
535
|
+
}), {
|
|
536
|
+
children: s,
|
|
537
|
+
className: a,
|
|
538
|
+
color: d = "inherit",
|
|
539
|
+
component: i = "svg",
|
|
540
|
+
fontSize: g = "medium",
|
|
541
|
+
htmlColor: f,
|
|
542
|
+
inheritViewBox: y = !1,
|
|
543
|
+
titleAccess: m,
|
|
544
|
+
viewBox: p = "0 0 24 24"
|
|
545
|
+
} = r, u = w(r, Me), h = /* @__PURE__ */ x.isValidElement(s) && s.type === "svg", v = c({}, r, {
|
|
546
|
+
color: d,
|
|
547
|
+
component: i,
|
|
548
|
+
fontSize: g,
|
|
549
|
+
instanceFontSize: t.fontSize,
|
|
550
|
+
inheritViewBox: y,
|
|
551
|
+
viewBox: p,
|
|
552
|
+
hasSvgAsChild: h
|
|
553
|
+
}), b = {};
|
|
554
|
+
y || (b.viewBox = p);
|
|
555
|
+
const N = Re(v);
|
|
556
|
+
return /* @__PURE__ */ C(Pe, c({
|
|
557
|
+
as: i,
|
|
558
|
+
className: T(N.root, a),
|
|
559
|
+
focusable: "false",
|
|
560
|
+
color: f,
|
|
561
|
+
"aria-hidden": m ? void 0 : !0,
|
|
562
|
+
role: m ? "img" : void 0,
|
|
563
|
+
ref: n
|
|
564
|
+
}, b, u, h && s.props, {
|
|
565
|
+
ownerState: v,
|
|
566
|
+
children: [h ? s.props.children : s, m ? /* @__PURE__ */ l("title", {
|
|
567
|
+
children: m
|
|
568
|
+
}) : null]
|
|
569
|
+
}));
|
|
570
|
+
});
|
|
571
|
+
process.env.NODE_ENV !== "production" && (z.propTypes = {
|
|
572
|
+
// ┌────────────────────────────── Warning ──────────────────────────────┐
|
|
573
|
+
// │ These PropTypes are generated from the TypeScript type definitions. │
|
|
574
|
+
// │ To update them, edit the d.ts file and run `pnpm proptypes`. │
|
|
575
|
+
// └─────────────────────────────────────────────────────────────────────┘
|
|
576
|
+
/**
|
|
577
|
+
* Node passed into the SVG element.
|
|
578
|
+
*/
|
|
579
|
+
children: o.node,
|
|
580
|
+
/**
|
|
581
|
+
* Override or extend the styles applied to the component.
|
|
582
|
+
*/
|
|
583
|
+
classes: o.object,
|
|
584
|
+
/**
|
|
585
|
+
* @ignore
|
|
586
|
+
*/
|
|
587
|
+
className: o.string,
|
|
588
|
+
/**
|
|
589
|
+
* The color of the component.
|
|
590
|
+
* It supports both default and custom theme colors, which can be added as shown in the
|
|
591
|
+
* [palette customization guide](https://mui.com/material-ui/customization/palette/#custom-colors).
|
|
592
|
+
* You can use the `htmlColor` prop to apply a color attribute to the SVG element.
|
|
593
|
+
* @default 'inherit'
|
|
594
|
+
*/
|
|
595
|
+
color: o.oneOfType([o.oneOf(["inherit", "action", "disabled", "primary", "secondary", "error", "info", "success", "warning"]), o.string]),
|
|
596
|
+
/**
|
|
597
|
+
* The component used for the root node.
|
|
598
|
+
* Either a string to use a HTML element or a component.
|
|
599
|
+
*/
|
|
600
|
+
component: o.elementType,
|
|
601
|
+
/**
|
|
602
|
+
* The fontSize applied to the icon. Defaults to 24px, but can be configure to inherit font size.
|
|
603
|
+
* @default 'medium'
|
|
604
|
+
*/
|
|
605
|
+
fontSize: o.oneOfType([o.oneOf(["inherit", "large", "medium", "small"]), o.string]),
|
|
606
|
+
/**
|
|
607
|
+
* Applies a color attribute to the SVG element.
|
|
608
|
+
*/
|
|
609
|
+
htmlColor: o.string,
|
|
610
|
+
/**
|
|
611
|
+
* If `true`, the root node will inherit the custom `component`'s viewBox and the `viewBox`
|
|
612
|
+
* prop will be ignored.
|
|
613
|
+
* Useful when you want to reference a custom `component` and have `SvgIcon` pass that
|
|
614
|
+
* `component`'s viewBox to the root node.
|
|
615
|
+
* @default false
|
|
616
|
+
*/
|
|
617
|
+
inheritViewBox: o.bool,
|
|
618
|
+
/**
|
|
619
|
+
* The shape-rendering attribute. The behavior of the different options is described on the
|
|
620
|
+
* [MDN Web Docs](https://developer.mozilla.org/en-US/docs/Web/SVG/Attribute/shape-rendering).
|
|
621
|
+
* If you are having issues with blurry icons you should investigate this prop.
|
|
622
|
+
*/
|
|
623
|
+
shapeRendering: o.string,
|
|
624
|
+
/**
|
|
625
|
+
* The system prop that allows defining system overrides as well as additional CSS styles.
|
|
626
|
+
*/
|
|
627
|
+
sx: o.oneOfType([o.arrayOf(o.oneOfType([o.func, o.object, o.bool])), o.func, o.object]),
|
|
628
|
+
/**
|
|
629
|
+
* Provides a human-readable title for the element that contains it.
|
|
630
|
+
* https://www.w3.org/TR/SVG-access/#Equivalent
|
|
631
|
+
*/
|
|
632
|
+
titleAccess: o.string,
|
|
633
|
+
/**
|
|
634
|
+
* Allows you to redefine what the coordinates without units mean inside an SVG element.
|
|
635
|
+
* For example, if the SVG element is 500 (width) by 200 (height),
|
|
636
|
+
* and you pass viewBox="0 0 50 20",
|
|
637
|
+
* this means that the coordinates inside the SVG will go from the top left corner (0,0)
|
|
638
|
+
* to bottom right (50,20) and each unit will be worth 10px.
|
|
639
|
+
* @default '0 0 24 24'
|
|
640
|
+
*/
|
|
641
|
+
viewBox: o.string
|
|
642
|
+
});
|
|
643
|
+
z.muiName = "SvgIcon";
|
|
644
|
+
function ke(e, t) {
|
|
645
|
+
function n(r, s) {
|
|
646
|
+
return /* @__PURE__ */ l(z, c({
|
|
647
|
+
"data-testid": `${t}Icon`,
|
|
648
|
+
ref: s
|
|
649
|
+
}, r, {
|
|
650
|
+
children: e
|
|
651
|
+
}));
|
|
652
|
+
}
|
|
653
|
+
return process.env.NODE_ENV !== "production" && (n.displayName = `${t}Icon`), n.muiName = z.muiName, /* @__PURE__ */ x.memo(/* @__PURE__ */ x.forwardRef(n));
|
|
654
|
+
}
|
|
655
|
+
const _e = ["className", "elementType", "ownerState", "externalForwardedProps", "getSlotOwnerState", "internalForwardedProps"], $e = ["component", "slots", "slotProps"], je = ["component"];
|
|
656
|
+
function Ee(e, t) {
|
|
657
|
+
const {
|
|
658
|
+
className: n,
|
|
659
|
+
elementType: r,
|
|
660
|
+
ownerState: s,
|
|
661
|
+
externalForwardedProps: a,
|
|
662
|
+
getSlotOwnerState: d,
|
|
663
|
+
internalForwardedProps: i
|
|
664
|
+
} = t, g = w(t, _e), {
|
|
665
|
+
component: f,
|
|
666
|
+
slots: y = {
|
|
667
|
+
[e]: void 0
|
|
668
|
+
},
|
|
669
|
+
slotProps: m = {
|
|
670
|
+
[e]: void 0
|
|
671
|
+
}
|
|
672
|
+
} = a;
|
|
673
|
+
w(a, $e);
|
|
674
|
+
const p = y[e] || r, u = Oe(m[e], s), h = Ne(c({
|
|
675
|
+
className: n
|
|
676
|
+
}, g, {
|
|
677
|
+
externalForwardedProps: void 0,
|
|
678
|
+
externalSlotProps: u
|
|
679
|
+
})), {
|
|
680
|
+
props: {
|
|
681
|
+
component: v
|
|
682
|
+
},
|
|
683
|
+
internalRef: b
|
|
684
|
+
} = h, N = w(h.props, je), I = xe(b, u == null ? void 0 : u.ref, t.ref), A = d ? d(N) : {}, R = c({}, s, A), P = v, B = Se(p, c({}, e === "root", !y[e] && i, N, P && {
|
|
685
|
+
as: P
|
|
686
|
+
}, {
|
|
687
|
+
ref: I
|
|
688
|
+
}), R);
|
|
689
|
+
return Object.keys(A).forEach((W) => {
|
|
690
|
+
delete B[W];
|
|
691
|
+
}), [p, B];
|
|
692
|
+
}
|
|
693
|
+
const Ae = ke(/* @__PURE__ */ l("path", {
|
|
694
|
+
d: "M12 12c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm0 2c-2.67 0-8 1.34-8 4v2h16v-2c0-2.66-5.33-4-8-4z"
|
|
695
|
+
}), "Person");
|
|
696
|
+
function Ie(e) {
|
|
697
|
+
return $("MuiAvatar", e);
|
|
698
|
+
}
|
|
699
|
+
_("MuiAvatar", ["root", "colorDefault", "circular", "rounded", "square", "img", "fallback"]);
|
|
700
|
+
const Be = ["alt", "children", "className", "component", "slots", "slotProps", "imgProps", "sizes", "src", "srcSet", "variant"], ze = (e) => {
|
|
701
|
+
const {
|
|
702
|
+
classes: t,
|
|
703
|
+
variant: n,
|
|
704
|
+
colorDefault: r
|
|
705
|
+
} = e;
|
|
706
|
+
return E({
|
|
707
|
+
root: ["root", n, r && "colorDefault"],
|
|
708
|
+
img: ["img"],
|
|
709
|
+
fallback: ["fallback"]
|
|
710
|
+
}, Ie, t);
|
|
711
|
+
}, We = M("div", {
|
|
712
|
+
name: "MuiAvatar",
|
|
713
|
+
slot: "Root",
|
|
714
|
+
overridesResolver: (e, t) => {
|
|
715
|
+
const {
|
|
716
|
+
ownerState: n
|
|
717
|
+
} = e;
|
|
718
|
+
return [t.root, t[n.variant], n.colorDefault && t.colorDefault];
|
|
719
|
+
}
|
|
720
|
+
})(({
|
|
721
|
+
theme: e
|
|
722
|
+
}) => ({
|
|
723
|
+
position: "relative",
|
|
724
|
+
display: "flex",
|
|
725
|
+
alignItems: "center",
|
|
726
|
+
justifyContent: "center",
|
|
727
|
+
flexShrink: 0,
|
|
728
|
+
width: 40,
|
|
729
|
+
height: 40,
|
|
730
|
+
fontFamily: e.typography.fontFamily,
|
|
731
|
+
fontSize: e.typography.pxToRem(20),
|
|
732
|
+
lineHeight: 1,
|
|
733
|
+
borderRadius: "50%",
|
|
734
|
+
overflow: "hidden",
|
|
735
|
+
userSelect: "none",
|
|
736
|
+
variants: [{
|
|
737
|
+
props: {
|
|
738
|
+
variant: "rounded"
|
|
739
|
+
},
|
|
740
|
+
style: {
|
|
741
|
+
borderRadius: (e.vars || e).shape.borderRadius
|
|
742
|
+
}
|
|
743
|
+
}, {
|
|
744
|
+
props: {
|
|
745
|
+
variant: "square"
|
|
746
|
+
},
|
|
747
|
+
style: {
|
|
748
|
+
borderRadius: 0
|
|
749
|
+
}
|
|
750
|
+
}, {
|
|
751
|
+
props: {
|
|
752
|
+
colorDefault: !0
|
|
753
|
+
},
|
|
754
|
+
style: c({
|
|
755
|
+
color: (e.vars || e).palette.background.default
|
|
756
|
+
}, e.vars ? {
|
|
757
|
+
backgroundColor: e.vars.palette.Avatar.defaultBg
|
|
758
|
+
} : c({
|
|
759
|
+
backgroundColor: e.palette.grey[400]
|
|
760
|
+
}, e.applyStyles("dark", {
|
|
761
|
+
backgroundColor: e.palette.grey[600]
|
|
762
|
+
})))
|
|
763
|
+
}]
|
|
764
|
+
})), De = M("img", {
|
|
765
|
+
name: "MuiAvatar",
|
|
766
|
+
slot: "Img",
|
|
767
|
+
overridesResolver: (e, t) => t.img
|
|
768
|
+
})({
|
|
769
|
+
width: "100%",
|
|
770
|
+
height: "100%",
|
|
771
|
+
textAlign: "center",
|
|
772
|
+
// Handle non-square image. The property isn't supported by IE11.
|
|
773
|
+
objectFit: "cover",
|
|
774
|
+
// Hide alt text.
|
|
775
|
+
color: "transparent",
|
|
776
|
+
// Hide the image broken icon, only works on Chrome.
|
|
777
|
+
textIndent: 1e4
|
|
778
|
+
}), Fe = M(Ae, {
|
|
779
|
+
name: "MuiAvatar",
|
|
780
|
+
slot: "Fallback",
|
|
781
|
+
overridesResolver: (e, t) => t.fallback
|
|
782
|
+
})({
|
|
783
|
+
width: "75%",
|
|
784
|
+
height: "75%"
|
|
785
|
+
});
|
|
786
|
+
function Ue({
|
|
787
|
+
crossOrigin: e,
|
|
788
|
+
referrerPolicy: t,
|
|
789
|
+
src: n,
|
|
790
|
+
srcSet: r
|
|
791
|
+
}) {
|
|
792
|
+
const [s, a] = x.useState(!1);
|
|
793
|
+
return x.useEffect(() => {
|
|
794
|
+
if (!n && !r)
|
|
795
|
+
return;
|
|
796
|
+
a(!1);
|
|
797
|
+
let d = !0;
|
|
798
|
+
const i = new Image();
|
|
799
|
+
return i.onload = () => {
|
|
800
|
+
d && a("loaded");
|
|
801
|
+
}, i.onerror = () => {
|
|
802
|
+
d && a("error");
|
|
803
|
+
}, i.crossOrigin = e, i.referrerPolicy = t, i.src = n, r && (i.srcset = r), () => {
|
|
804
|
+
d = !1;
|
|
805
|
+
};
|
|
806
|
+
}, [e, t, n, r]), s;
|
|
807
|
+
}
|
|
808
|
+
const U = /* @__PURE__ */ x.forwardRef(function(t, n) {
|
|
809
|
+
const r = j({
|
|
810
|
+
props: t,
|
|
811
|
+
name: "MuiAvatar"
|
|
812
|
+
}), {
|
|
813
|
+
alt: s,
|
|
814
|
+
children: a,
|
|
815
|
+
className: d,
|
|
816
|
+
component: i = "div",
|
|
817
|
+
slots: g = {},
|
|
818
|
+
slotProps: f = {},
|
|
819
|
+
imgProps: y,
|
|
820
|
+
sizes: m,
|
|
821
|
+
src: p,
|
|
822
|
+
srcSet: u,
|
|
823
|
+
variant: h = "circular"
|
|
824
|
+
} = r, v = w(r, Be);
|
|
825
|
+
let b = null;
|
|
826
|
+
const N = Ue(c({}, y, {
|
|
827
|
+
src: p,
|
|
828
|
+
srcSet: u
|
|
829
|
+
})), I = p || u, A = I && N !== "error", R = c({}, r, {
|
|
830
|
+
colorDefault: !A,
|
|
831
|
+
component: i,
|
|
832
|
+
variant: h
|
|
833
|
+
}), P = ze(R), [B, W] = Ee("img", {
|
|
834
|
+
className: P.img,
|
|
835
|
+
elementType: De,
|
|
836
|
+
externalForwardedProps: {
|
|
837
|
+
slots: g,
|
|
838
|
+
slotProps: {
|
|
839
|
+
img: c({}, y, f.img)
|
|
840
|
+
}
|
|
841
|
+
},
|
|
842
|
+
additionalProps: {
|
|
843
|
+
alt: s,
|
|
844
|
+
src: p,
|
|
845
|
+
srcSet: u,
|
|
846
|
+
sizes: m
|
|
847
|
+
},
|
|
848
|
+
ownerState: R
|
|
849
|
+
});
|
|
850
|
+
return A ? b = /* @__PURE__ */ l(B, c({}, W)) : a || a === 0 ? b = a : I && s ? b = s[0] : b = /* @__PURE__ */ l(Fe, {
|
|
851
|
+
ownerState: R,
|
|
852
|
+
className: P.fallback
|
|
853
|
+
}), /* @__PURE__ */ l(We, c({
|
|
854
|
+
as: i,
|
|
855
|
+
ownerState: R,
|
|
856
|
+
className: T(P.root, d),
|
|
857
|
+
ref: n
|
|
858
|
+
}, v, {
|
|
859
|
+
children: b
|
|
860
|
+
}));
|
|
861
|
+
});
|
|
862
|
+
process.env.NODE_ENV !== "production" && (U.propTypes = {
|
|
863
|
+
// ┌────────────────────────────── Warning ──────────────────────────────┐
|
|
864
|
+
// │ These PropTypes are generated from the TypeScript type definitions. │
|
|
865
|
+
// │ To update them, edit the d.ts file and run `pnpm proptypes`. │
|
|
866
|
+
// └─────────────────────────────────────────────────────────────────────┘
|
|
867
|
+
/**
|
|
868
|
+
* Used in combination with `src` or `srcSet` to
|
|
869
|
+
* provide an alt attribute for the rendered `img` element.
|
|
870
|
+
*/
|
|
871
|
+
alt: o.string,
|
|
872
|
+
/**
|
|
873
|
+
* Used to render icon or text elements inside the Avatar if `src` is not set.
|
|
874
|
+
* This can be an element, or just a string.
|
|
875
|
+
*/
|
|
876
|
+
children: o.node,
|
|
877
|
+
/**
|
|
878
|
+
* Override or extend the styles applied to the component.
|
|
879
|
+
*/
|
|
880
|
+
classes: o.object,
|
|
881
|
+
/**
|
|
882
|
+
* @ignore
|
|
883
|
+
*/
|
|
884
|
+
className: o.string,
|
|
885
|
+
/**
|
|
886
|
+
* The component used for the root node.
|
|
887
|
+
* Either a string to use a HTML element or a component.
|
|
888
|
+
*/
|
|
889
|
+
component: o.elementType,
|
|
890
|
+
/**
|
|
891
|
+
* [Attributes](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/img#attributes) applied to the `img` element if the component is used to display an image.
|
|
892
|
+
* It can be used to listen for the loading error event.
|
|
893
|
+
* @deprecated Use `slotProps.img` instead. This prop will be removed in v7. [How to migrate](/material-ui/migration/migrating-from-deprecated-apis/).
|
|
894
|
+
*/
|
|
895
|
+
imgProps: o.object,
|
|
896
|
+
/**
|
|
897
|
+
* The `sizes` attribute for the `img` element.
|
|
898
|
+
*/
|
|
899
|
+
sizes: o.string,
|
|
900
|
+
/**
|
|
901
|
+
* The props used for each slot inside.
|
|
902
|
+
* @default {}
|
|
903
|
+
*/
|
|
904
|
+
slotProps: o.shape({
|
|
905
|
+
img: o.oneOfType([o.func, o.object])
|
|
906
|
+
}),
|
|
907
|
+
/**
|
|
908
|
+
* The components used for each slot inside.
|
|
909
|
+
* @default {}
|
|
910
|
+
*/
|
|
911
|
+
slots: o.shape({
|
|
912
|
+
img: o.elementType
|
|
913
|
+
}),
|
|
914
|
+
/**
|
|
915
|
+
* The `src` attribute for the `img` element.
|
|
916
|
+
*/
|
|
917
|
+
src: o.string,
|
|
918
|
+
/**
|
|
919
|
+
* The `srcSet` attribute for the `img` element.
|
|
920
|
+
* Use this attribute for responsive image display.
|
|
921
|
+
*/
|
|
922
|
+
srcSet: o.string,
|
|
923
|
+
/**
|
|
924
|
+
* The system prop that allows defining system overrides as well as additional CSS styles.
|
|
925
|
+
*/
|
|
926
|
+
sx: o.oneOfType([o.arrayOf(o.oneOfType([o.func, o.object, o.bool])), o.func, o.object]),
|
|
927
|
+
/**
|
|
928
|
+
* The shape of the avatar.
|
|
929
|
+
* @default 'circular'
|
|
930
|
+
*/
|
|
931
|
+
variant: o.oneOfType([o.oneOf(["circular", "rounded", "square"]), o.string])
|
|
932
|
+
});
|
|
933
|
+
const Ve = ({
|
|
934
|
+
title: e,
|
|
935
|
+
text: t,
|
|
936
|
+
image: n,
|
|
937
|
+
orientation: r = "portrait",
|
|
938
|
+
avatar: s,
|
|
939
|
+
actions: a,
|
|
940
|
+
extraActions: d,
|
|
941
|
+
extraInfo: i,
|
|
942
|
+
stats: g
|
|
943
|
+
}) => r === "landscape" ? /* @__PURE__ */ C(G, { children: [
|
|
944
|
+
/* @__PURE__ */ l(
|
|
945
|
+
F,
|
|
946
|
+
{
|
|
947
|
+
component: "img",
|
|
948
|
+
alt: e,
|
|
949
|
+
image: n,
|
|
950
|
+
sx: { width: 330, height: 200 }
|
|
951
|
+
}
|
|
952
|
+
),
|
|
953
|
+
/* @__PURE__ */ C(D, { children: [
|
|
954
|
+
/* @__PURE__ */ l(O, { flex: 1, children: /* @__PURE__ */ C(
|
|
955
|
+
O,
|
|
956
|
+
{
|
|
957
|
+
display: "flex",
|
|
958
|
+
flexDirection: "column",
|
|
959
|
+
justifyContent: "space-between",
|
|
960
|
+
height: "100%",
|
|
961
|
+
children: [
|
|
962
|
+
/* @__PURE__ */ C(O, { children: [
|
|
963
|
+
/* @__PURE__ */ l(
|
|
964
|
+
S,
|
|
965
|
+
{
|
|
966
|
+
gutterBottom: !0,
|
|
967
|
+
variant: "subtitle1",
|
|
968
|
+
component: "h3",
|
|
969
|
+
sx: {
|
|
970
|
+
overflow: "hidden",
|
|
971
|
+
textOverflow: "ellipsis",
|
|
972
|
+
display: "-webkit-box",
|
|
973
|
+
WebkitLineClamp: 3,
|
|
974
|
+
WebkitBoxOrient: "vertical"
|
|
975
|
+
},
|
|
976
|
+
children: e
|
|
977
|
+
}
|
|
978
|
+
),
|
|
979
|
+
/* @__PURE__ */ l(
|
|
980
|
+
S,
|
|
981
|
+
{
|
|
982
|
+
variant: "caption",
|
|
983
|
+
component: "p",
|
|
984
|
+
sx: {
|
|
985
|
+
color: "text.secondary",
|
|
986
|
+
overflow: "hidden",
|
|
987
|
+
textOverflow: "ellipsis",
|
|
988
|
+
display: "-webkit-box",
|
|
989
|
+
WebkitLineClamp: 4,
|
|
990
|
+
WebkitBoxOrient: "vertical",
|
|
991
|
+
lineHeight: "16px"
|
|
992
|
+
},
|
|
993
|
+
children: /* @__PURE__ */ l("small", { children: t })
|
|
994
|
+
}
|
|
995
|
+
)
|
|
996
|
+
] }),
|
|
997
|
+
/* @__PURE__ */ l(O, { children: g })
|
|
998
|
+
]
|
|
999
|
+
}
|
|
1000
|
+
) }),
|
|
1001
|
+
/* @__PURE__ */ C(J, { children: [
|
|
1002
|
+
/* @__PURE__ */ l(U, { src: s.image, sx: { width: 42, height: 42 } }),
|
|
1003
|
+
/* @__PURE__ */ l(
|
|
1004
|
+
S,
|
|
1005
|
+
{
|
|
1006
|
+
variant: "subtitle2",
|
|
1007
|
+
sx: {
|
|
1008
|
+
fontWeight: "normal",
|
|
1009
|
+
lineHeight: "14px",
|
|
1010
|
+
fontSize: "13px"
|
|
1011
|
+
},
|
|
1012
|
+
children: s.title
|
|
1013
|
+
}
|
|
1014
|
+
),
|
|
1015
|
+
/* @__PURE__ */ l(
|
|
1016
|
+
S,
|
|
1017
|
+
{
|
|
1018
|
+
variant: "caption",
|
|
1019
|
+
sx: { color: "text.secondary", lineHeight: "12px" },
|
|
1020
|
+
children: /* @__PURE__ */ l("small", { children: s.subTitle })
|
|
1021
|
+
}
|
|
1022
|
+
),
|
|
1023
|
+
/* @__PURE__ */ l(K, { children: d }),
|
|
1024
|
+
/* @__PURE__ */ l(
|
|
1025
|
+
S,
|
|
1026
|
+
{
|
|
1027
|
+
variant: "caption",
|
|
1028
|
+
sx: { color: "text.secondary", lineHeight: "12px" },
|
|
1029
|
+
children: /* @__PURE__ */ l("small", { children: i })
|
|
1030
|
+
}
|
|
1031
|
+
),
|
|
1032
|
+
/* @__PURE__ */ l(O, { display: "flex", mt: 1, width: "100%", children: a })
|
|
1033
|
+
] })
|
|
1034
|
+
] })
|
|
1035
|
+
] }) : /* @__PURE__ */ C(Q, { children: [
|
|
1036
|
+
/* @__PURE__ */ l(F, { component: "img", alt: e, height: "172", image: n }),
|
|
1037
|
+
/* @__PURE__ */ C(D, { children: [
|
|
1038
|
+
/* @__PURE__ */ l(S, { gutterBottom: !0, variant: "subtitle1", component: "h3", noWrap: !0, children: e }),
|
|
1039
|
+
/* @__PURE__ */ l(
|
|
1040
|
+
S,
|
|
1041
|
+
{
|
|
1042
|
+
variant: "caption",
|
|
1043
|
+
component: "p",
|
|
1044
|
+
sx: {
|
|
1045
|
+
color: "text.secondary",
|
|
1046
|
+
overflow: "hidden",
|
|
1047
|
+
textOverflow: "ellipsis",
|
|
1048
|
+
display: "-webkit-box",
|
|
1049
|
+
WebkitLineClamp: 2,
|
|
1050
|
+
WebkitBoxOrient: "vertical",
|
|
1051
|
+
lineHeight: "16px"
|
|
1052
|
+
},
|
|
1053
|
+
children: /* @__PURE__ */ l("small", { children: t })
|
|
1054
|
+
}
|
|
1055
|
+
)
|
|
1056
|
+
] }),
|
|
1057
|
+
/* @__PURE__ */ C(
|
|
1058
|
+
V,
|
|
1059
|
+
{
|
|
1060
|
+
sx: {
|
|
1061
|
+
display: "flex",
|
|
1062
|
+
justifyContent: "space-between",
|
|
1063
|
+
p: (f) => f.spacing(2)
|
|
1064
|
+
},
|
|
1065
|
+
children: [
|
|
1066
|
+
/* @__PURE__ */ C(O, { display: "flex", justifyItems: "center", children: [
|
|
1067
|
+
/* @__PURE__ */ l(U, { src: s.image, sx: { width: 29, height: 29 } }),
|
|
1068
|
+
/* @__PURE__ */ C(O, { display: "flex", flexDirection: "column", ml: 1, children: [
|
|
1069
|
+
/* @__PURE__ */ l(
|
|
1070
|
+
S,
|
|
1071
|
+
{
|
|
1072
|
+
variant: "subtitle2",
|
|
1073
|
+
sx: {
|
|
1074
|
+
fontWeight: "normal",
|
|
1075
|
+
lineHeight: "14px",
|
|
1076
|
+
fontSize: "13px"
|
|
1077
|
+
},
|
|
1078
|
+
noWrap: !0,
|
|
1079
|
+
children: s.title
|
|
1080
|
+
}
|
|
1081
|
+
),
|
|
1082
|
+
/* @__PURE__ */ l(
|
|
1083
|
+
S,
|
|
1084
|
+
{
|
|
1085
|
+
variant: "caption",
|
|
1086
|
+
sx: { color: "text.secondary" },
|
|
1087
|
+
noWrap: !0,
|
|
1088
|
+
children: /* @__PURE__ */ l("small", { children: s.subTitle })
|
|
1089
|
+
}
|
|
1090
|
+
)
|
|
1091
|
+
] })
|
|
1092
|
+
] }),
|
|
1093
|
+
/* @__PURE__ */ l(O, { display: "flex", children: a })
|
|
1094
|
+
]
|
|
1095
|
+
}
|
|
1096
|
+
),
|
|
1097
|
+
d !== void 0 && /* @__PURE__ */ l(X, { className: "extra-actions", children: d })
|
|
1098
|
+
] });
|
|
1099
|
+
export {
|
|
1100
|
+
Ve as Card
|
|
1101
|
+
};
|