@hybridcore/ui 1.1.0 → 1.1.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{ButtonBase-B6WYZgVU.js → ButtonBase-BYmh3G5j.js} +3 -3
- package/dist/{Checkbox-CxbQ9tJ5.js → Checkbox-DostZSwR.js} +1 -1
- package/dist/{Button-BZR43NHz.js → DialogContent-2aPOjKE7.js} +1252 -1252
- package/dist/{FormControl-C4PmH1vh.js → FormControl-BiAFm76F.js} +1 -1
- package/dist/{IconButton-CKHPuOyh.js → IconButton-CQJ8wZE8.js} +1 -1
- package/dist/{Input-CH_JyT5B.js → Input-Bf5G3tFN.js} +2 -2
- package/dist/{OutlinedInput-gnp48tDo.js → OutlinedInput-BEVE8VZQ.js} +2 -2
- package/dist/{Select-DOyHt8I_.js → Select-DxpxZbJp.js} +8 -8
- package/dist/{Source-Bo1Eq6y-.js → Source-CnCcu5UP.js} +275 -275
- package/dist/{Text-DVP2PrYM.js → Text-BT5kPHOo.js} +1156 -1156
- package/dist/assets/index.css +1 -1
- package/dist/assets/index2.css +1 -1
- package/dist/components/confirm/dialog.js +1 -1
- package/dist/components/context-menu/index.js +642 -642
- package/dist/components/data-management/instance-form/components/composite-list/index.js +1 -1
- package/dist/components/data-management/instance-form/components/variable/index.js +4 -4
- package/dist/components/data-management/instance-form/components/variables/index.js +1 -1
- package/dist/components/geometry-picker/coordinate/index.js +1 -1
- package/dist/components/geometry-picker/edit/index.js +3 -3
- package/dist/components/geometry-picker/geometry/index.js +1 -1
- package/dist/components/geometry-picker/index.js +2 -2
- package/dist/components/geometry-picker/kml/index.js +7 -7
- package/dist/components/geometry-picker/map/index.js +1 -1
- package/dist/components/geometry-picker/map/logic.js +4 -4
- package/dist/components/geometry-picker/map/style.js +1 -1
- package/dist/components/icon-button/index.js +1 -1
- package/dist/components/map/helpers/mapbox.js +1 -1
- package/dist/components/map/helpers/ol.js +4 -4
- package/dist/components/map/index.js +6 -28
- package/dist/components/map/logic.js +62 -62
- package/dist/components/map/styled.js +2 -2
- package/dist/components/phone-input/index.js +1 -1
- package/dist/components/search-input/index.js +3 -3
- package/dist/components/tree-select/index.js +3 -3
- package/dist/components/treeview-filter/index.js +4 -4
- package/dist/components/treeview-filter/item/index.js +1 -1
- package/dist/components/treeview-filter/item-label/index.js +1 -1
- package/dist/{Object-DBPgar-D.js → has-9_asnBxn.js} +108 -108
- package/dist/{index-DHFb1Qpn.js → index-Bw_m9ult.js} +7 -7
- package/dist/index-IvOfmM1F.js +34 -0
- package/dist/{index-BQE8B4sc.js → index-wW2D1aTG.js} +2 -2
- package/dist/{List-BX_5LP1i.js → listItemTextClasses-BvXFz-Oc.js} +16 -16
- package/dist/main.d.ts +677 -6
- package/dist/main.js +41 -2
- package/dist/{ol-CMEkXXLJ.js → ol-DXmSLlWv.js} +8 -8
- package/dist/{styled-B22KrhDR.js → styled-C43K9x7T.js} +1 -1
- package/dist/{utils-C13eMoWa.js → utils-DLpkeyhZ.js} +1 -1
- package/package.json +1 -1
|
@@ -1,156 +1,146 @@
|
|
|
1
1
|
import { jsx as b, jsxs as U, Fragment as ye } from "react/jsx-runtime";
|
|
2
2
|
import * as l from "react";
|
|
3
3
|
import { P as t } from "../../createTheme-agWfFD64.js";
|
|
4
|
-
import {
|
|
4
|
+
import { B as se, u as ne, a as H, e as be, b as ge } from "../../ButtonBase-BYmh3G5j.js";
|
|
5
5
|
import { o as z } from "../../ownerDocument-CUrv0DIK.js";
|
|
6
6
|
import { e as ve, a as Ie } from "../../exactProp-CI8dagM-.js";
|
|
7
|
-
import { L, g as Ce, l as ee, a as xe, b as he } from "../../
|
|
7
|
+
import { L, g as Ce, l as ee, a as xe, b as he } from "../../listItemTextClasses-BvXFz-Oc.js";
|
|
8
8
|
import { a as u, _ as $ } from "../../extends-C3382pL0.js";
|
|
9
|
-
import { u as M, c as T, a as w,
|
|
10
|
-
import {
|
|
9
|
+
import { g as Y, u as M, c as T, a as w, b as Le } from "../../chainPropTypes-DtBfUj5o.js";
|
|
10
|
+
import { g as q, s as A, r as Te, a as h } from "../../styled-Iq9jsO4F.js";
|
|
11
11
|
import { i as ae } from "../../isMuiElement-CxT3_ACP.js";
|
|
12
12
|
import { i as te } from "../../isHostComponent-kiaBvYVo.js";
|
|
13
13
|
import { T as F } from "../../Typography-XIiVCSto.js";
|
|
14
|
-
function
|
|
15
|
-
return e
|
|
14
|
+
function Oe(e) {
|
|
15
|
+
return q("MuiListItem", e);
|
|
16
16
|
}
|
|
17
|
-
|
|
18
|
-
|
|
17
|
+
const P = Y("MuiListItem", ["root", "container", "focusVisible", "dense", "alignItemsFlexStart", "disabled", "divider", "gutters", "padding", "button", "secondaryAction", "selected"]);
|
|
18
|
+
function Re(e) {
|
|
19
|
+
return q("MuiListItemButton", e);
|
|
19
20
|
}
|
|
20
|
-
|
|
21
|
+
const E = Y("MuiListItemButton", ["root", "focusVisible", "dense", "alignItemsFlexStart", "disabled", "divider", "gutters", "selected"]), Ne = ["alignItems", "autoFocus", "component", "children", "dense", "disableGutters", "divider", "focusVisibleClassName", "selected", "className"], Pe = (e, o) => {
|
|
21
22
|
const {
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
touchEvent: i = "onTouchEnd"
|
|
27
|
-
} = e, d = l.useRef(!1), r = l.useRef(null), m = l.useRef(!1), f = l.useRef(!1);
|
|
28
|
-
l.useEffect(() => (setTimeout(() => {
|
|
29
|
-
m.current = !0;
|
|
30
|
-
}, 0), () => {
|
|
31
|
-
m.current = !1;
|
|
32
|
-
}), []);
|
|
33
|
-
const C = H(
|
|
34
|
-
// @ts-expect-error TODO upstream fix
|
|
35
|
-
o.ref,
|
|
36
|
-
r
|
|
37
|
-
), g = be((a) => {
|
|
38
|
-
const p = f.current;
|
|
39
|
-
f.current = !1;
|
|
40
|
-
const y = z(r.current);
|
|
41
|
-
if (!m.current || !r.current || "clientX" in a && Oe(a, y))
|
|
42
|
-
return;
|
|
43
|
-
if (d.current) {
|
|
44
|
-
d.current = !1;
|
|
45
|
-
return;
|
|
46
|
-
}
|
|
47
|
-
let v;
|
|
48
|
-
a.composedPath ? v = a.composedPath().indexOf(r.current) > -1 : v = !y.documentElement.contains(
|
|
49
|
-
// @ts-expect-error returns `false` as intended when not dispatched from a Node
|
|
50
|
-
a.target
|
|
51
|
-
) || r.current.contains(
|
|
52
|
-
// @ts-expect-error returns `false` as intended when not dispatched from a Node
|
|
53
|
-
a.target
|
|
54
|
-
), !v && (s || !p) && c(a);
|
|
55
|
-
}), x = (a) => (p) => {
|
|
56
|
-
f.current = !0;
|
|
57
|
-
const y = o.props[a];
|
|
58
|
-
y && y(p);
|
|
59
|
-
}, I = {
|
|
60
|
-
ref: C
|
|
61
|
-
};
|
|
62
|
-
return i !== !1 && (I[i] = x(i)), l.useEffect(() => {
|
|
63
|
-
if (i !== !1) {
|
|
64
|
-
const a = oe(i), p = z(r.current), y = () => {
|
|
65
|
-
d.current = !0;
|
|
66
|
-
};
|
|
67
|
-
return p.addEventListener(a, g), p.addEventListener("touchmove", y), () => {
|
|
68
|
-
p.removeEventListener(a, g), p.removeEventListener("touchmove", y);
|
|
69
|
-
};
|
|
70
|
-
}
|
|
71
|
-
}, [g, i]), n !== !1 && (I[n] = x(n)), l.useEffect(() => {
|
|
72
|
-
if (n !== !1) {
|
|
73
|
-
const a = oe(n), p = z(r.current);
|
|
74
|
-
return p.addEventListener(a, g), () => {
|
|
75
|
-
p.removeEventListener(a, g);
|
|
76
|
-
};
|
|
77
|
-
}
|
|
78
|
-
}, [g, n]), /* @__PURE__ */ b(l.Fragment, {
|
|
79
|
-
children: /* @__PURE__ */ l.cloneElement(o, I)
|
|
80
|
-
});
|
|
81
|
-
}
|
|
82
|
-
process.env.NODE_ENV !== "production" && (_.propTypes = {
|
|
83
|
-
// ----------------------------- Warning --------------------------------
|
|
84
|
-
// | These PropTypes are generated from the TypeScript type definitions |
|
|
85
|
-
// | To update them edit TypeScript types and run "yarn proptypes" |
|
|
86
|
-
// ----------------------------------------------------------------------
|
|
87
|
-
/**
|
|
88
|
-
* The wrapped element.
|
|
89
|
-
*/
|
|
90
|
-
children: ve.isRequired,
|
|
91
|
-
/**
|
|
92
|
-
* If `true`, the React tree is ignored and only the DOM tree is considered.
|
|
93
|
-
* This prop changes how portaled elements are handled.
|
|
94
|
-
* @default false
|
|
95
|
-
*/
|
|
96
|
-
disableReactTree: t.bool,
|
|
97
|
-
/**
|
|
98
|
-
* The mouse event to listen to. You can disable the listener by providing `false`.
|
|
99
|
-
* @default 'onClick'
|
|
100
|
-
*/
|
|
101
|
-
mouseEvent: t.oneOf(["onClick", "onMouseDown", "onMouseUp", "onPointerDown", "onPointerUp", !1]),
|
|
102
|
-
/**
|
|
103
|
-
* Callback fired when a "click away" event is detected.
|
|
104
|
-
*/
|
|
105
|
-
onClickAway: t.func.isRequired,
|
|
106
|
-
/**
|
|
107
|
-
* The touch event to listen to. You can disable the listener by providing `false`.
|
|
108
|
-
* @default 'onTouchEnd'
|
|
109
|
-
*/
|
|
110
|
-
touchEvent: t.oneOf(["onTouchEnd", "onTouchStart", !1])
|
|
111
|
-
});
|
|
112
|
-
process.env.NODE_ENV !== "production" && (_.propTypes = Ie(_.propTypes));
|
|
113
|
-
const Re = ["className"], Ne = (e) => {
|
|
23
|
+
ownerState: s
|
|
24
|
+
} = e;
|
|
25
|
+
return [o.root, s.dense && o.dense, s.alignItems === "flex-start" && o.alignItemsFlexStart, s.divider && o.divider, !s.disableGutters && o.gutters];
|
|
26
|
+
}, Ee = (e) => {
|
|
114
27
|
const {
|
|
115
28
|
alignItems: o,
|
|
116
|
-
classes: s
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
29
|
+
classes: s,
|
|
30
|
+
dense: n,
|
|
31
|
+
disabled: c,
|
|
32
|
+
disableGutters: i,
|
|
33
|
+
divider: d,
|
|
34
|
+
selected: r
|
|
35
|
+
} = e, f = w({
|
|
36
|
+
root: ["root", n && "dense", !i && "gutters", d && "divider", c && "disabled", o === "flex-start" && "alignItemsFlexStart", r && "selected"]
|
|
37
|
+
}, Re, s);
|
|
38
|
+
return u({}, s, f);
|
|
39
|
+
}, $e = A(se, {
|
|
40
|
+
shouldForwardProp: (e) => Te(e) || e === "classes",
|
|
41
|
+
name: "MuiListItemButton",
|
|
123
42
|
slot: "Root",
|
|
124
|
-
overridesResolver:
|
|
125
|
-
const {
|
|
126
|
-
ownerState: s
|
|
127
|
-
} = e;
|
|
128
|
-
return [o.root, s.alignItems === "flex-start" && o.alignItemsFlexStart];
|
|
129
|
-
}
|
|
43
|
+
overridesResolver: Pe
|
|
130
44
|
})(({
|
|
131
45
|
theme: e,
|
|
132
46
|
ownerState: o
|
|
133
47
|
}) => u({
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
48
|
+
display: "flex",
|
|
49
|
+
flexGrow: 1,
|
|
50
|
+
justifyContent: "flex-start",
|
|
51
|
+
alignItems: "center",
|
|
52
|
+
position: "relative",
|
|
53
|
+
textDecoration: "none",
|
|
54
|
+
minWidth: 0,
|
|
55
|
+
boxSizing: "border-box",
|
|
56
|
+
textAlign: "left",
|
|
57
|
+
paddingTop: 8,
|
|
58
|
+
paddingBottom: 8,
|
|
59
|
+
transition: e.transitions.create("background-color", {
|
|
60
|
+
duration: e.transitions.duration.shortest
|
|
61
|
+
}),
|
|
62
|
+
"&:hover": {
|
|
63
|
+
textDecoration: "none",
|
|
64
|
+
backgroundColor: (e.vars || e).palette.action.hover,
|
|
65
|
+
// Reset on touch devices, it doesn't add specificity
|
|
66
|
+
"@media (hover: none)": {
|
|
67
|
+
backgroundColor: "transparent"
|
|
68
|
+
}
|
|
69
|
+
},
|
|
70
|
+
[`&.${E.selected}`]: {
|
|
71
|
+
backgroundColor: e.vars ? `rgba(${e.vars.palette.primary.mainChannel} / ${e.vars.palette.action.selectedOpacity})` : h(e.palette.primary.main, e.palette.action.selectedOpacity),
|
|
72
|
+
[`&.${E.focusVisible}`]: {
|
|
73
|
+
backgroundColor: e.vars ? `rgba(${e.vars.palette.primary.mainChannel} / calc(${e.vars.palette.action.selectedOpacity} + ${e.vars.palette.action.focusOpacity}))` : h(e.palette.primary.main, e.palette.action.selectedOpacity + e.palette.action.focusOpacity)
|
|
74
|
+
}
|
|
75
|
+
},
|
|
76
|
+
[`&.${E.selected}:hover`]: {
|
|
77
|
+
backgroundColor: e.vars ? `rgba(${e.vars.palette.primary.mainChannel} / calc(${e.vars.palette.action.selectedOpacity} + ${e.vars.palette.action.hoverOpacity}))` : h(e.palette.primary.main, e.palette.action.selectedOpacity + e.palette.action.hoverOpacity),
|
|
78
|
+
// Reset on touch devices, it doesn't add specificity
|
|
79
|
+
"@media (hover: none)": {
|
|
80
|
+
backgroundColor: e.vars ? `rgba(${e.vars.palette.primary.mainChannel} / ${e.vars.palette.action.selectedOpacity})` : h(e.palette.primary.main, e.palette.action.selectedOpacity)
|
|
81
|
+
}
|
|
82
|
+
},
|
|
83
|
+
[`&.${E.focusVisible}`]: {
|
|
84
|
+
backgroundColor: (e.vars || e).palette.action.focus
|
|
85
|
+
},
|
|
86
|
+
[`&.${E.disabled}`]: {
|
|
87
|
+
opacity: (e.vars || e).palette.action.disabledOpacity
|
|
88
|
+
}
|
|
89
|
+
}, o.divider && {
|
|
90
|
+
borderBottom: `1px solid ${(e.vars || e).palette.divider}`,
|
|
91
|
+
backgroundClip: "padding-box"
|
|
138
92
|
}, o.alignItems === "flex-start" && {
|
|
139
|
-
|
|
93
|
+
alignItems: "flex-start"
|
|
94
|
+
}, !o.disableGutters && {
|
|
95
|
+
paddingLeft: 16,
|
|
96
|
+
paddingRight: 16
|
|
97
|
+
}, o.dense && {
|
|
98
|
+
paddingTop: 4,
|
|
99
|
+
paddingBottom: 4
|
|
140
100
|
})), re = /* @__PURE__ */ l.forwardRef(function(o, s) {
|
|
141
101
|
const n = M({
|
|
142
102
|
props: o,
|
|
143
|
-
name: "
|
|
103
|
+
name: "MuiListItemButton"
|
|
144
104
|
}), {
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
105
|
+
alignItems: c = "center",
|
|
106
|
+
autoFocus: i = !1,
|
|
107
|
+
component: d = "div",
|
|
108
|
+
children: r,
|
|
109
|
+
dense: m = !1,
|
|
110
|
+
disableGutters: f = !1,
|
|
111
|
+
divider: C = !1,
|
|
112
|
+
focusVisibleClassName: g,
|
|
113
|
+
selected: x = !1,
|
|
114
|
+
className: I
|
|
115
|
+
} = n, a = $(n, Ne), p = l.useContext(L), y = l.useMemo(() => ({
|
|
116
|
+
dense: m || p.dense || !1,
|
|
117
|
+
alignItems: c,
|
|
118
|
+
disableGutters: f
|
|
119
|
+
}), [c, p.dense, m, f]), v = l.useRef(null);
|
|
120
|
+
ne(() => {
|
|
121
|
+
i && (v.current ? v.current.focus() : process.env.NODE_ENV !== "production" && console.error("MUI: Unable to set focus to a ListItemButton whose component has not been rendered."));
|
|
122
|
+
}, [i]);
|
|
123
|
+
const j = u({}, n, {
|
|
124
|
+
alignItems: c,
|
|
125
|
+
dense: y.dense,
|
|
126
|
+
disableGutters: f,
|
|
127
|
+
divider: C,
|
|
128
|
+
selected: x
|
|
129
|
+
}), S = Ee(j), V = H(v, s);
|
|
130
|
+
return /* @__PURE__ */ b(L.Provider, {
|
|
131
|
+
value: y,
|
|
132
|
+
children: /* @__PURE__ */ b($e, u({
|
|
133
|
+
ref: V,
|
|
134
|
+
href: a.href || a.to,
|
|
135
|
+
component: (a.href || a.to) && d === "div" ? "button" : d,
|
|
136
|
+
focusVisibleClassName: T(S.focusVisible, g),
|
|
137
|
+
ownerState: j,
|
|
138
|
+
className: T(S.root, I)
|
|
139
|
+
}, a, {
|
|
140
|
+
classes: S,
|
|
141
|
+
children: r
|
|
142
|
+
}))
|
|
143
|
+
});
|
|
154
144
|
});
|
|
155
145
|
process.env.NODE_ENV !== "production" && (re.propTypes = {
|
|
156
146
|
// ┌────────────────────────────── Warning ──────────────────────────────┐
|
|
@@ -158,8 +148,19 @@ process.env.NODE_ENV !== "production" && (re.propTypes = {
|
|
|
158
148
|
// │ To update them, edit the d.ts file and run `pnpm proptypes`. │
|
|
159
149
|
// └─────────────────────────────────────────────────────────────────────┘
|
|
160
150
|
/**
|
|
161
|
-
*
|
|
162
|
-
*
|
|
151
|
+
* Defines the `align-items` style property.
|
|
152
|
+
* @default 'center'
|
|
153
|
+
*/
|
|
154
|
+
alignItems: t.oneOf(["center", "flex-start"]),
|
|
155
|
+
/**
|
|
156
|
+
* If `true`, the list item is focused during the first mount.
|
|
157
|
+
* Focus will also be triggered if the value changes from false to true.
|
|
158
|
+
* @default false
|
|
159
|
+
*/
|
|
160
|
+
autoFocus: t.bool,
|
|
161
|
+
/**
|
|
162
|
+
* The content of the component if a `ListItemSecondaryAction` is used it must
|
|
163
|
+
* be the last child.
|
|
163
164
|
*/
|
|
164
165
|
children: t.node,
|
|
165
166
|
/**
|
|
@@ -170,102 +171,107 @@ process.env.NODE_ENV !== "production" && (re.propTypes = {
|
|
|
170
171
|
* @ignore
|
|
171
172
|
*/
|
|
172
173
|
className: t.string,
|
|
174
|
+
/**
|
|
175
|
+
* The component used for the root node.
|
|
176
|
+
* Either a string to use a HTML element or a component.
|
|
177
|
+
*/
|
|
178
|
+
component: t.elementType,
|
|
179
|
+
/**
|
|
180
|
+
* If `true`, compact vertical padding designed for keyboard and mouse input is used.
|
|
181
|
+
* The prop defaults to the value inherited from the parent List component.
|
|
182
|
+
* @default false
|
|
183
|
+
*/
|
|
184
|
+
dense: t.bool,
|
|
185
|
+
/**
|
|
186
|
+
* If `true`, the component is disabled.
|
|
187
|
+
* @default false
|
|
188
|
+
*/
|
|
189
|
+
disabled: t.bool,
|
|
190
|
+
/**
|
|
191
|
+
* If `true`, the left and right padding is removed.
|
|
192
|
+
* @default false
|
|
193
|
+
*/
|
|
194
|
+
disableGutters: t.bool,
|
|
195
|
+
/**
|
|
196
|
+
* If `true`, a 1px light border is added to the bottom of the list item.
|
|
197
|
+
* @default false
|
|
198
|
+
*/
|
|
199
|
+
divider: t.bool,
|
|
200
|
+
/**
|
|
201
|
+
* This prop can help identify which element has keyboard focus.
|
|
202
|
+
* The class name will be applied when the element gains the focus through keyboard interaction.
|
|
203
|
+
* It's a polyfill for the [CSS :focus-visible selector](https://drafts.csswg.org/selectors-4/#the-focus-visible-pseudo).
|
|
204
|
+
* The rationale for using this feature [is explained here](https://github.com/WICG/focus-visible/blob/HEAD/explainer.md).
|
|
205
|
+
* A [polyfill can be used](https://github.com/WICG/focus-visible) to apply a `focus-visible` class to other components
|
|
206
|
+
* if needed.
|
|
207
|
+
*/
|
|
208
|
+
focusVisibleClassName: t.string,
|
|
209
|
+
/**
|
|
210
|
+
* @ignore
|
|
211
|
+
*/
|
|
212
|
+
href: t.string,
|
|
213
|
+
/**
|
|
214
|
+
* Use to apply selected styling.
|
|
215
|
+
* @default false
|
|
216
|
+
*/
|
|
217
|
+
selected: t.bool,
|
|
173
218
|
/**
|
|
174
219
|
* The system prop that allows defining system overrides as well as additional CSS styles.
|
|
175
220
|
*/
|
|
176
221
|
sx: t.oneOfType([t.arrayOf(t.oneOfType([t.func, t.object, t.bool])), t.func, t.object])
|
|
177
222
|
});
|
|
178
|
-
|
|
223
|
+
function Ae(e) {
|
|
224
|
+
return q("MuiListItemSecondaryAction", e);
|
|
225
|
+
}
|
|
226
|
+
Y("MuiListItemSecondaryAction", ["root", "disableGutters"]);
|
|
227
|
+
const Se = ["className"], ke = (e) => {
|
|
179
228
|
const {
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
primary: n,
|
|
183
|
-
secondary: c,
|
|
184
|
-
dense: i
|
|
229
|
+
disableGutters: o,
|
|
230
|
+
classes: s
|
|
185
231
|
} = e;
|
|
186
232
|
return w({
|
|
187
|
-
root: ["root",
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
}, Ae = A("div", {
|
|
192
|
-
name: "MuiListItemText",
|
|
233
|
+
root: ["root", o && "disableGutters"]
|
|
234
|
+
}, Ae, s);
|
|
235
|
+
}, Me = A("div", {
|
|
236
|
+
name: "MuiListItemSecondaryAction",
|
|
193
237
|
slot: "Root",
|
|
194
238
|
overridesResolver: (e, o) => {
|
|
195
239
|
const {
|
|
196
240
|
ownerState: s
|
|
197
241
|
} = e;
|
|
198
|
-
return [
|
|
199
|
-
[`& .${ee.primary}`]: o.primary
|
|
200
|
-
}, {
|
|
201
|
-
[`& .${ee.secondary}`]: o.secondary
|
|
202
|
-
}, o.root, s.inset && o.inset, s.primary && s.secondary && o.multiline, s.dense && o.dense];
|
|
242
|
+
return [o.root, s.disableGutters && o.disableGutters];
|
|
203
243
|
}
|
|
204
244
|
})(({
|
|
205
245
|
ownerState: e
|
|
206
246
|
}) => u({
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
}, e.
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
}, e.inset && {
|
|
215
|
-
paddingLeft: 56
|
|
216
|
-
})), ie = /* @__PURE__ */ l.forwardRef(function(o, s) {
|
|
247
|
+
position: "absolute",
|
|
248
|
+
right: 16,
|
|
249
|
+
top: "50%",
|
|
250
|
+
transform: "translateY(-50%)"
|
|
251
|
+
}, e.disableGutters && {
|
|
252
|
+
right: 0
|
|
253
|
+
})), X = /* @__PURE__ */ l.forwardRef(function(o, s) {
|
|
217
254
|
const n = M({
|
|
218
255
|
props: o,
|
|
219
|
-
name: "
|
|
256
|
+
name: "MuiListItemSecondaryAction"
|
|
220
257
|
}), {
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
secondaryTypographyProps: g
|
|
229
|
-
} = n, x = $(n, Ee), {
|
|
230
|
-
dense: I
|
|
231
|
-
} = l.useContext(L);
|
|
232
|
-
let a = m ?? c, p = C;
|
|
233
|
-
const y = u({}, n, {
|
|
234
|
-
disableTypography: d,
|
|
235
|
-
inset: r,
|
|
236
|
-
primary: !!a,
|
|
237
|
-
secondary: !!p,
|
|
238
|
-
dense: I
|
|
239
|
-
}), v = $e(y);
|
|
240
|
-
return a != null && a.type !== F && !d && (a = /* @__PURE__ */ b(F, u({
|
|
241
|
-
variant: I ? "body2" : "body1",
|
|
242
|
-
className: v.primary,
|
|
243
|
-
component: f != null && f.variant ? void 0 : "span",
|
|
244
|
-
display: "block"
|
|
245
|
-
}, f, {
|
|
246
|
-
children: a
|
|
247
|
-
}))), p != null && p.type !== F && !d && (p = /* @__PURE__ */ b(F, u({
|
|
248
|
-
variant: "body2",
|
|
249
|
-
className: v.secondary,
|
|
250
|
-
color: "text.secondary",
|
|
251
|
-
display: "block"
|
|
252
|
-
}, g, {
|
|
253
|
-
children: p
|
|
254
|
-
}))), /* @__PURE__ */ U(Ae, u({
|
|
255
|
-
className: T(v.root, i),
|
|
256
|
-
ownerState: y,
|
|
258
|
+
className: c
|
|
259
|
+
} = n, i = $(n, Se), d = l.useContext(L), r = u({}, n, {
|
|
260
|
+
disableGutters: d.disableGutters
|
|
261
|
+
}), m = ke(r);
|
|
262
|
+
return /* @__PURE__ */ b(Me, u({
|
|
263
|
+
className: T(m.root, c),
|
|
264
|
+
ownerState: r,
|
|
257
265
|
ref: s
|
|
258
|
-
},
|
|
259
|
-
children: [a, p]
|
|
260
|
-
}));
|
|
266
|
+
}, i));
|
|
261
267
|
});
|
|
262
|
-
process.env.NODE_ENV !== "production" && (
|
|
268
|
+
process.env.NODE_ENV !== "production" && (X.propTypes = {
|
|
263
269
|
// ┌────────────────────────────── Warning ──────────────────────────────┐
|
|
264
270
|
// │ These PropTypes are generated from the TypeScript type definitions. │
|
|
265
271
|
// │ To update them, edit the d.ts file and run `pnpm proptypes`. │
|
|
266
272
|
// └─────────────────────────────────────────────────────────────────────┘
|
|
267
273
|
/**
|
|
268
|
-
*
|
|
274
|
+
* The content of the component, normally an `IconButton` or selection control.
|
|
269
275
|
*/
|
|
270
276
|
children: t.node,
|
|
271
277
|
/**
|
|
@@ -276,88 +282,86 @@ process.env.NODE_ENV !== "production" && (ie.propTypes = {
|
|
|
276
282
|
* @ignore
|
|
277
283
|
*/
|
|
278
284
|
className: t.string,
|
|
279
|
-
/**
|
|
280
|
-
* If `true`, the children won't be wrapped by a Typography component.
|
|
281
|
-
* This can be useful to render an alternative Typography variant by wrapping
|
|
282
|
-
* the `children` (or `primary`) text, and optional `secondary` text
|
|
283
|
-
* with the Typography component.
|
|
284
|
-
* @default false
|
|
285
|
-
*/
|
|
286
|
-
disableTypography: t.bool,
|
|
287
|
-
/**
|
|
288
|
-
* If `true`, the children are indented.
|
|
289
|
-
* This should be used if there is no left avatar or left icon.
|
|
290
|
-
* @default false
|
|
291
|
-
*/
|
|
292
|
-
inset: t.bool,
|
|
293
|
-
/**
|
|
294
|
-
* The main content element.
|
|
295
|
-
*/
|
|
296
|
-
primary: t.node,
|
|
297
|
-
/**
|
|
298
|
-
* These props will be forwarded to the primary typography component
|
|
299
|
-
* (as long as disableTypography is not `true`).
|
|
300
|
-
*/
|
|
301
|
-
primaryTypographyProps: t.object,
|
|
302
|
-
/**
|
|
303
|
-
* The secondary content element.
|
|
304
|
-
*/
|
|
305
|
-
secondary: t.node,
|
|
306
|
-
/**
|
|
307
|
-
* These props will be forwarded to the secondary typography component
|
|
308
|
-
* (as long as disableTypography is not `true`).
|
|
309
|
-
*/
|
|
310
|
-
secondaryTypographyProps: t.object,
|
|
311
285
|
/**
|
|
312
286
|
* The system prop that allows defining system overrides as well as additional CSS styles.
|
|
313
287
|
*/
|
|
314
288
|
sx: t.oneOfType([t.arrayOf(t.oneOfType([t.func, t.object, t.bool])), t.func, t.object])
|
|
315
289
|
});
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
}
|
|
319
|
-
const P = Y("MuiListItem", ["root", "container", "focusVisible", "dense", "alignItemsFlexStart", "disabled", "divider", "gutters", "padding", "button", "secondaryAction", "selected"]);
|
|
320
|
-
function ke(e) {
|
|
321
|
-
return q("MuiListItemButton", e);
|
|
322
|
-
}
|
|
323
|
-
const E = Y("MuiListItemButton", ["root", "focusVisible", "dense", "alignItemsFlexStart", "disabled", "divider", "gutters", "selected"]), Me = ["alignItems", "autoFocus", "component", "children", "dense", "disableGutters", "divider", "focusVisibleClassName", "selected", "className"], we = (e, o) => {
|
|
290
|
+
X.muiName = "ListItemSecondaryAction";
|
|
291
|
+
const we = ["className"], je = ["alignItems", "autoFocus", "button", "children", "className", "component", "components", "componentsProps", "ContainerComponent", "ContainerProps", "dense", "disabled", "disableGutters", "disablePadding", "divider", "focusVisibleClassName", "secondaryAction", "selected", "slotProps", "slots"], Ve = (e, o) => {
|
|
324
292
|
const {
|
|
325
293
|
ownerState: s
|
|
326
294
|
} = e;
|
|
327
|
-
return [o.root, s.dense && o.dense, s.alignItems === "flex-start" && o.alignItemsFlexStart, s.divider && o.divider, !s.disableGutters && o.gutters];
|
|
328
|
-
},
|
|
329
|
-
const {
|
|
330
|
-
alignItems: o,
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
295
|
+
return [o.root, s.dense && o.dense, s.alignItems === "flex-start" && o.alignItemsFlexStart, s.divider && o.divider, !s.disableGutters && o.gutters, !s.disablePadding && o.padding, s.button && o.button, s.hasSecondaryAction && o.secondaryAction];
|
|
296
|
+
}, Be = (e) => {
|
|
297
|
+
const {
|
|
298
|
+
alignItems: o,
|
|
299
|
+
button: s,
|
|
300
|
+
classes: n,
|
|
301
|
+
dense: c,
|
|
302
|
+
disabled: i,
|
|
303
|
+
disableGutters: d,
|
|
304
|
+
disablePadding: r,
|
|
305
|
+
divider: m,
|
|
306
|
+
hasSecondaryAction: f,
|
|
307
|
+
selected: C
|
|
308
|
+
} = e;
|
|
309
|
+
return w({
|
|
310
|
+
root: ["root", c && "dense", !d && "gutters", !r && "padding", m && "divider", i && "disabled", s && "button", o === "flex-start" && "alignItemsFlexStart", f && "secondaryAction", C && "selected"],
|
|
311
|
+
container: ["container"]
|
|
312
|
+
}, Oe, n);
|
|
313
|
+
}, Ge = A("div", {
|
|
314
|
+
name: "MuiListItem",
|
|
344
315
|
slot: "Root",
|
|
345
|
-
overridesResolver:
|
|
316
|
+
overridesResolver: Ve
|
|
346
317
|
})(({
|
|
347
318
|
theme: e,
|
|
348
319
|
ownerState: o
|
|
349
320
|
}) => u({
|
|
350
321
|
display: "flex",
|
|
351
|
-
flexGrow: 1,
|
|
352
322
|
justifyContent: "flex-start",
|
|
353
323
|
alignItems: "center",
|
|
354
324
|
position: "relative",
|
|
355
325
|
textDecoration: "none",
|
|
356
|
-
|
|
326
|
+
width: "100%",
|
|
357
327
|
boxSizing: "border-box",
|
|
358
|
-
textAlign: "left"
|
|
328
|
+
textAlign: "left"
|
|
329
|
+
}, !o.disablePadding && u({
|
|
359
330
|
paddingTop: 8,
|
|
360
|
-
paddingBottom: 8
|
|
331
|
+
paddingBottom: 8
|
|
332
|
+
}, o.dense && {
|
|
333
|
+
paddingTop: 4,
|
|
334
|
+
paddingBottom: 4
|
|
335
|
+
}, !o.disableGutters && {
|
|
336
|
+
paddingLeft: 16,
|
|
337
|
+
paddingRight: 16
|
|
338
|
+
}, !!o.secondaryAction && {
|
|
339
|
+
// Add some space to avoid collision as `ListItemSecondaryAction`
|
|
340
|
+
// is absolutely positioned.
|
|
341
|
+
paddingRight: 48
|
|
342
|
+
}), !!o.secondaryAction && {
|
|
343
|
+
[`& > .${E.root}`]: {
|
|
344
|
+
paddingRight: 48
|
|
345
|
+
}
|
|
346
|
+
}, {
|
|
347
|
+
[`&.${P.focusVisible}`]: {
|
|
348
|
+
backgroundColor: (e.vars || e).palette.action.focus
|
|
349
|
+
},
|
|
350
|
+
[`&.${P.selected}`]: {
|
|
351
|
+
backgroundColor: e.vars ? `rgba(${e.vars.palette.primary.mainChannel} / ${e.vars.palette.action.selectedOpacity})` : h(e.palette.primary.main, e.palette.action.selectedOpacity),
|
|
352
|
+
[`&.${P.focusVisible}`]: {
|
|
353
|
+
backgroundColor: e.vars ? `rgba(${e.vars.palette.primary.mainChannel} / calc(${e.vars.palette.action.selectedOpacity} + ${e.vars.palette.action.focusOpacity}))` : h(e.palette.primary.main, e.palette.action.selectedOpacity + e.palette.action.focusOpacity)
|
|
354
|
+
}
|
|
355
|
+
},
|
|
356
|
+
[`&.${P.disabled}`]: {
|
|
357
|
+
opacity: (e.vars || e).palette.action.disabledOpacity
|
|
358
|
+
}
|
|
359
|
+
}, o.alignItems === "flex-start" && {
|
|
360
|
+
alignItems: "flex-start"
|
|
361
|
+
}, o.divider && {
|
|
362
|
+
borderBottom: `1px solid ${(e.vars || e).palette.divider}`,
|
|
363
|
+
backgroundClip: "padding-box"
|
|
364
|
+
}, o.button && {
|
|
361
365
|
transition: e.transitions.create("background-color", {
|
|
362
366
|
duration: e.transitions.duration.shortest
|
|
363
367
|
}),
|
|
@@ -369,82 +373,104 @@ const E = Y("MuiListItemButton", ["root", "focusVisible", "dense", "alignItemsFl
|
|
|
369
373
|
backgroundColor: "transparent"
|
|
370
374
|
}
|
|
371
375
|
},
|
|
372
|
-
[`&.${
|
|
373
|
-
backgroundColor: e.vars ? `rgba(${e.vars.palette.primary.mainChannel} / ${e.vars.palette.action.selectedOpacity})` : h(e.palette.primary.main, e.palette.action.selectedOpacity),
|
|
374
|
-
[`&.${E.focusVisible}`]: {
|
|
375
|
-
backgroundColor: e.vars ? `rgba(${e.vars.palette.primary.mainChannel} / calc(${e.vars.palette.action.selectedOpacity} + ${e.vars.palette.action.focusOpacity}))` : h(e.palette.primary.main, e.palette.action.selectedOpacity + e.palette.action.focusOpacity)
|
|
376
|
-
}
|
|
377
|
-
},
|
|
378
|
-
[`&.${E.selected}:hover`]: {
|
|
376
|
+
[`&.${P.selected}:hover`]: {
|
|
379
377
|
backgroundColor: e.vars ? `rgba(${e.vars.palette.primary.mainChannel} / calc(${e.vars.palette.action.selectedOpacity} + ${e.vars.palette.action.hoverOpacity}))` : h(e.palette.primary.main, e.palette.action.selectedOpacity + e.palette.action.hoverOpacity),
|
|
380
378
|
// Reset on touch devices, it doesn't add specificity
|
|
381
379
|
"@media (hover: none)": {
|
|
382
380
|
backgroundColor: e.vars ? `rgba(${e.vars.palette.primary.mainChannel} / ${e.vars.palette.action.selectedOpacity})` : h(e.palette.primary.main, e.palette.action.selectedOpacity)
|
|
383
381
|
}
|
|
384
|
-
},
|
|
385
|
-
[`&.${E.focusVisible}`]: {
|
|
386
|
-
backgroundColor: (e.vars || e).palette.action.focus
|
|
387
|
-
},
|
|
388
|
-
[`&.${E.disabled}`]: {
|
|
389
|
-
opacity: (e.vars || e).palette.action.disabledOpacity
|
|
390
382
|
}
|
|
391
|
-
}, o.
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
}
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
})), ce = /* @__PURE__ */ l.forwardRef(function(o, s) {
|
|
383
|
+
}, o.hasSecondaryAction && {
|
|
384
|
+
// Add some space to avoid collision as `ListItemSecondaryAction`
|
|
385
|
+
// is absolutely positioned.
|
|
386
|
+
paddingRight: 48
|
|
387
|
+
})), Fe = A("li", {
|
|
388
|
+
name: "MuiListItem",
|
|
389
|
+
slot: "Container",
|
|
390
|
+
overridesResolver: (e, o) => o.container
|
|
391
|
+
})({
|
|
392
|
+
position: "relative"
|
|
393
|
+
}), ie = /* @__PURE__ */ l.forwardRef(function(o, s) {
|
|
403
394
|
const n = M({
|
|
404
395
|
props: o,
|
|
405
|
-
name: "
|
|
396
|
+
name: "MuiListItem"
|
|
406
397
|
}), {
|
|
407
398
|
alignItems: c = "center",
|
|
408
399
|
autoFocus: i = !1,
|
|
409
|
-
|
|
400
|
+
button: d = !1,
|
|
410
401
|
children: r,
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
402
|
+
className: m,
|
|
403
|
+
component: f,
|
|
404
|
+
components: C = {},
|
|
405
|
+
componentsProps: g = {},
|
|
406
|
+
ContainerComponent: x = "li",
|
|
407
|
+
ContainerProps: {
|
|
408
|
+
className: I
|
|
409
|
+
} = {},
|
|
410
|
+
dense: a = !1,
|
|
411
|
+
disabled: p = !1,
|
|
412
|
+
disableGutters: y = !1,
|
|
413
|
+
disablePadding: v = !1,
|
|
414
|
+
divider: j = !1,
|
|
415
|
+
focusVisibleClassName: S,
|
|
416
|
+
secondaryAction: V,
|
|
417
|
+
selected: de = !1,
|
|
418
|
+
slotProps: pe = {},
|
|
419
|
+
slots: ue = {}
|
|
420
|
+
} = n, me = $(n.ContainerProps, we), fe = $(n, je), J = l.useContext(L), D = l.useMemo(() => ({
|
|
421
|
+
dense: a || J.dense || !1,
|
|
419
422
|
alignItems: c,
|
|
420
|
-
disableGutters:
|
|
421
|
-
}), [c,
|
|
423
|
+
disableGutters: y
|
|
424
|
+
}), [c, J.dense, a, y]), W = l.useRef(null);
|
|
422
425
|
ne(() => {
|
|
423
|
-
i && (
|
|
426
|
+
i && (W.current ? W.current.focus() : process.env.NODE_ENV !== "production" && console.error("MUI: Unable to set focus to a ListItem whose component has not been rendered."));
|
|
424
427
|
}, [i]);
|
|
425
|
-
const
|
|
428
|
+
const N = l.Children.toArray(r), K = N.length && ae(N[N.length - 1], ["ListItemSecondaryAction"]), B = u({}, n, {
|
|
426
429
|
alignItems: c,
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
430
|
+
autoFocus: i,
|
|
431
|
+
button: d,
|
|
432
|
+
dense: D.dense,
|
|
433
|
+
disabled: p,
|
|
434
|
+
disableGutters: y,
|
|
435
|
+
disablePadding: v,
|
|
436
|
+
divider: j,
|
|
437
|
+
hasSecondaryAction: K,
|
|
438
|
+
selected: de
|
|
439
|
+
}), Q = Be(B), Z = H(W, s), G = ue.root || C.Root || Ge, k = pe.root || g.root || {}, O = u({
|
|
440
|
+
className: T(Q.root, k.className, m),
|
|
441
|
+
disabled: p
|
|
442
|
+
}, fe);
|
|
443
|
+
let R = f || "li";
|
|
444
|
+
return d && (O.component = f || "div", O.focusVisibleClassName = T(P.focusVisible, S), R = se), K ? (R = !O.component && !f ? "div" : R, x === "li" && (R === "li" ? R = "div" : O.component === "li" && (O.component = "div")), /* @__PURE__ */ b(L.Provider, {
|
|
445
|
+
value: D,
|
|
446
|
+
children: /* @__PURE__ */ U(Fe, u({
|
|
447
|
+
as: x,
|
|
448
|
+
className: T(Q.container, I),
|
|
449
|
+
ref: Z,
|
|
450
|
+
ownerState: B
|
|
451
|
+
}, me, {
|
|
452
|
+
children: [/* @__PURE__ */ b(G, u({}, k, !te(G) && {
|
|
453
|
+
as: R,
|
|
454
|
+
ownerState: u({}, B, k.ownerState)
|
|
455
|
+
}, O, {
|
|
456
|
+
children: N
|
|
457
|
+
})), N.pop()]
|
|
458
|
+
}))
|
|
459
|
+
})) : /* @__PURE__ */ b(L.Provider, {
|
|
460
|
+
value: D,
|
|
461
|
+
children: /* @__PURE__ */ U(G, u({}, k, {
|
|
462
|
+
as: R,
|
|
463
|
+
ref: Z
|
|
464
|
+
}, !te(G) && {
|
|
465
|
+
ownerState: u({}, B, k.ownerState)
|
|
466
|
+
}, O, {
|
|
467
|
+
children: [N, V && /* @__PURE__ */ b(X, {
|
|
468
|
+
children: V
|
|
469
|
+
})]
|
|
444
470
|
}))
|
|
445
471
|
});
|
|
446
472
|
});
|
|
447
|
-
process.env.NODE_ENV !== "production" && (
|
|
473
|
+
process.env.NODE_ENV !== "production" && (ie.propTypes = {
|
|
448
474
|
// ┌────────────────────────────── Warning ──────────────────────────────┐
|
|
449
475
|
// │ These PropTypes are generated from the TypeScript type definitions. │
|
|
450
476
|
// │ To update them, edit the d.ts file and run `pnpm proptypes`. │
|
|
@@ -458,13 +484,32 @@ process.env.NODE_ENV !== "production" && (ce.propTypes = {
|
|
|
458
484
|
* If `true`, the list item is focused during the first mount.
|
|
459
485
|
* Focus will also be triggered if the value changes from false to true.
|
|
460
486
|
* @default false
|
|
487
|
+
* @deprecated checkout [ListItemButton](/material-ui/api/list-item-button/) instead
|
|
461
488
|
*/
|
|
462
489
|
autoFocus: t.bool,
|
|
490
|
+
/**
|
|
491
|
+
* If `true`, the list item is a button (using `ButtonBase`). Props intended
|
|
492
|
+
* for `ButtonBase` can then be applied to `ListItem`.
|
|
493
|
+
* @default false
|
|
494
|
+
* @deprecated checkout [ListItemButton](/material-ui/api/list-item-button/) instead
|
|
495
|
+
*/
|
|
496
|
+
button: t.bool,
|
|
463
497
|
/**
|
|
464
498
|
* The content of the component if a `ListItemSecondaryAction` is used it must
|
|
465
499
|
* be the last child.
|
|
466
500
|
*/
|
|
467
|
-
children: t.node,
|
|
501
|
+
children: Le(t.node, (e) => {
|
|
502
|
+
const o = l.Children.toArray(e.children);
|
|
503
|
+
let s = -1;
|
|
504
|
+
for (let n = o.length - 1; n >= 0; n -= 1) {
|
|
505
|
+
const c = o[n];
|
|
506
|
+
if (ae(c, ["ListItemSecondaryAction"])) {
|
|
507
|
+
s = n;
|
|
508
|
+
break;
|
|
509
|
+
}
|
|
510
|
+
}
|
|
511
|
+
return s !== -1 && s !== o.length - 1 ? new Error("MUI: You used an element after ListItemSecondaryAction. For ListItem to detect that it has a secondary action you must pass it as the last child to ListItem.") : null;
|
|
512
|
+
}),
|
|
468
513
|
/**
|
|
469
514
|
* Override or extend the styles applied to the component.
|
|
470
515
|
*/
|
|
@@ -478,6 +523,41 @@ process.env.NODE_ENV !== "production" && (ce.propTypes = {
|
|
|
478
523
|
* Either a string to use a HTML element or a component.
|
|
479
524
|
*/
|
|
480
525
|
component: t.elementType,
|
|
526
|
+
/**
|
|
527
|
+
* The components used for each slot inside.
|
|
528
|
+
*
|
|
529
|
+
* This prop is an alias for the `slots` prop.
|
|
530
|
+
* It's recommended to use the `slots` prop instead.
|
|
531
|
+
*
|
|
532
|
+
* @default {}
|
|
533
|
+
*/
|
|
534
|
+
components: t.shape({
|
|
535
|
+
Root: t.elementType
|
|
536
|
+
}),
|
|
537
|
+
/**
|
|
538
|
+
* The extra props for the slot components.
|
|
539
|
+
* You can override the existing props or add new ones.
|
|
540
|
+
*
|
|
541
|
+
* This prop is an alias for the `slotProps` prop.
|
|
542
|
+
* It's recommended to use the `slotProps` prop instead, as `componentsProps` will be deprecated in the future.
|
|
543
|
+
*
|
|
544
|
+
* @default {}
|
|
545
|
+
*/
|
|
546
|
+
componentsProps: t.shape({
|
|
547
|
+
root: t.object
|
|
548
|
+
}),
|
|
549
|
+
/**
|
|
550
|
+
* The container component used when a `ListItemSecondaryAction` is the last child.
|
|
551
|
+
* @default 'li'
|
|
552
|
+
* @deprecated
|
|
553
|
+
*/
|
|
554
|
+
ContainerComponent: be,
|
|
555
|
+
/**
|
|
556
|
+
* Props applied to the container component if used.
|
|
557
|
+
* @default {}
|
|
558
|
+
* @deprecated
|
|
559
|
+
*/
|
|
560
|
+
ContainerProps: t.object,
|
|
481
561
|
/**
|
|
482
562
|
* If `true`, compact vertical padding designed for keyboard and mouse input is used.
|
|
483
563
|
* The prop defaults to the value inherited from the parent List component.
|
|
@@ -487,6 +567,7 @@ process.env.NODE_ENV !== "production" && (ce.propTypes = {
|
|
|
487
567
|
/**
|
|
488
568
|
* If `true`, the component is disabled.
|
|
489
569
|
* @default false
|
|
570
|
+
* @deprecated checkout [ListItemButton](/material-ui/api/list-item-button/) instead
|
|
490
571
|
*/
|
|
491
572
|
disabled: t.bool,
|
|
492
573
|
/**
|
|
@@ -494,86 +575,106 @@ process.env.NODE_ENV !== "production" && (ce.propTypes = {
|
|
|
494
575
|
* @default false
|
|
495
576
|
*/
|
|
496
577
|
disableGutters: t.bool,
|
|
578
|
+
/**
|
|
579
|
+
* If `true`, all padding is removed.
|
|
580
|
+
* @default false
|
|
581
|
+
*/
|
|
582
|
+
disablePadding: t.bool,
|
|
497
583
|
/**
|
|
498
584
|
* If `true`, a 1px light border is added to the bottom of the list item.
|
|
499
585
|
* @default false
|
|
500
586
|
*/
|
|
501
587
|
divider: t.bool,
|
|
502
588
|
/**
|
|
503
|
-
*
|
|
504
|
-
* The class name will be applied when the element gains the focus through keyboard interaction.
|
|
505
|
-
* It's a polyfill for the [CSS :focus-visible selector](https://drafts.csswg.org/selectors-4/#the-focus-visible-pseudo).
|
|
506
|
-
* The rationale for using this feature [is explained here](https://github.com/WICG/focus-visible/blob/HEAD/explainer.md).
|
|
507
|
-
* A [polyfill can be used](https://github.com/WICG/focus-visible) to apply a `focus-visible` class to other components
|
|
508
|
-
* if needed.
|
|
589
|
+
* @ignore
|
|
509
590
|
*/
|
|
510
591
|
focusVisibleClassName: t.string,
|
|
511
592
|
/**
|
|
512
|
-
*
|
|
593
|
+
* The element to display at the end of ListItem.
|
|
513
594
|
*/
|
|
514
|
-
|
|
595
|
+
secondaryAction: t.node,
|
|
515
596
|
/**
|
|
516
597
|
* Use to apply selected styling.
|
|
517
598
|
* @default false
|
|
599
|
+
* @deprecated checkout [ListItemButton](/material-ui/api/list-item-button/) instead
|
|
518
600
|
*/
|
|
519
601
|
selected: t.bool,
|
|
602
|
+
/**
|
|
603
|
+
* The extra props for the slot components.
|
|
604
|
+
* You can override the existing props or add new ones.
|
|
605
|
+
*
|
|
606
|
+
* This prop is an alias for the `componentsProps` prop, which will be deprecated in the future.
|
|
607
|
+
*
|
|
608
|
+
* @default {}
|
|
609
|
+
*/
|
|
610
|
+
slotProps: t.shape({
|
|
611
|
+
root: t.object
|
|
612
|
+
}),
|
|
613
|
+
/**
|
|
614
|
+
* The components used for each slot inside.
|
|
615
|
+
*
|
|
616
|
+
* This prop is an alias for the `components` prop, which will be deprecated in the future.
|
|
617
|
+
*
|
|
618
|
+
* @default {}
|
|
619
|
+
*/
|
|
620
|
+
slots: t.shape({
|
|
621
|
+
root: t.elementType
|
|
622
|
+
}),
|
|
520
623
|
/**
|
|
521
624
|
* The system prop that allows defining system overrides as well as additional CSS styles.
|
|
522
625
|
*/
|
|
523
626
|
sx: t.oneOfType([t.arrayOf(t.oneOfType([t.func, t.object, t.bool])), t.func, t.object])
|
|
524
627
|
});
|
|
525
|
-
|
|
526
|
-
return q("MuiListItemSecondaryAction", e);
|
|
527
|
-
}
|
|
528
|
-
Y("MuiListItemSecondaryAction", ["root", "disableGutters"]);
|
|
529
|
-
const Ge = ["className"], Fe = (e) => {
|
|
628
|
+
const Ue = ["className"], _e = (e) => {
|
|
530
629
|
const {
|
|
531
|
-
|
|
630
|
+
alignItems: o,
|
|
532
631
|
classes: s
|
|
533
632
|
} = e;
|
|
534
633
|
return w({
|
|
535
|
-
root: ["root", o && "
|
|
536
|
-
},
|
|
537
|
-
},
|
|
538
|
-
name: "
|
|
634
|
+
root: ["root", o === "flex-start" && "alignItemsFlexStart"]
|
|
635
|
+
}, Ce, s);
|
|
636
|
+
}, De = A("div", {
|
|
637
|
+
name: "MuiListItemIcon",
|
|
539
638
|
slot: "Root",
|
|
540
639
|
overridesResolver: (e, o) => {
|
|
541
640
|
const {
|
|
542
641
|
ownerState: s
|
|
543
642
|
} = e;
|
|
544
|
-
return [o.root, s.
|
|
643
|
+
return [o.root, s.alignItems === "flex-start" && o.alignItemsFlexStart];
|
|
545
644
|
}
|
|
546
645
|
})(({
|
|
547
|
-
|
|
646
|
+
theme: e,
|
|
647
|
+
ownerState: o
|
|
548
648
|
}) => u({
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
},
|
|
554
|
-
|
|
555
|
-
})),
|
|
649
|
+
minWidth: 56,
|
|
650
|
+
color: (e.vars || e).palette.action.active,
|
|
651
|
+
flexShrink: 0,
|
|
652
|
+
display: "inline-flex"
|
|
653
|
+
}, o.alignItems === "flex-start" && {
|
|
654
|
+
marginTop: 8
|
|
655
|
+
})), ce = /* @__PURE__ */ l.forwardRef(function(o, s) {
|
|
556
656
|
const n = M({
|
|
557
657
|
props: o,
|
|
558
|
-
name: "
|
|
658
|
+
name: "MuiListItemIcon"
|
|
559
659
|
}), {
|
|
560
660
|
className: c
|
|
561
|
-
} = n, i = $(n,
|
|
562
|
-
|
|
563
|
-
}), m =
|
|
564
|
-
return /* @__PURE__ */ b(
|
|
661
|
+
} = n, i = $(n, Ue), d = l.useContext(L), r = u({}, n, {
|
|
662
|
+
alignItems: d.alignItems
|
|
663
|
+
}), m = _e(r);
|
|
664
|
+
return /* @__PURE__ */ b(De, u({
|
|
565
665
|
className: T(m.root, c),
|
|
566
666
|
ownerState: r,
|
|
567
667
|
ref: s
|
|
568
668
|
}, i));
|
|
569
669
|
});
|
|
570
|
-
process.env.NODE_ENV !== "production" && (
|
|
670
|
+
process.env.NODE_ENV !== "production" && (ce.propTypes = {
|
|
571
671
|
// ┌────────────────────────────── Warning ──────────────────────────────┐
|
|
572
672
|
// │ These PropTypes are generated from the TypeScript type definitions. │
|
|
573
673
|
// │ To update them, edit the d.ts file and run `pnpm proptypes`. │
|
|
574
674
|
// └─────────────────────────────────────────────────────────────────────┘
|
|
575
675
|
/**
|
|
576
|
-
* The content of the component, normally
|
|
676
|
+
* The content of the component, normally `Icon`, `SvgIcon`,
|
|
677
|
+
* or a `@mui/icons-material` SVG icon element.
|
|
577
678
|
*/
|
|
578
679
|
children: t.node,
|
|
579
680
|
/**
|
|
@@ -589,188 +690,89 @@ process.env.NODE_ENV !== "production" && (X.propTypes = {
|
|
|
589
690
|
*/
|
|
590
691
|
sx: t.oneOfType([t.arrayOf(t.oneOfType([t.func, t.object, t.bool])), t.func, t.object])
|
|
591
692
|
});
|
|
592
|
-
|
|
593
|
-
const _e = ["className"], De = ["alignItems", "autoFocus", "button", "children", "className", "component", "components", "componentsProps", "ContainerComponent", "ContainerProps", "dense", "disabled", "disableGutters", "disablePadding", "divider", "focusVisibleClassName", "secondaryAction", "selected", "slotProps", "slots"], We = (e, o) => {
|
|
594
|
-
const {
|
|
595
|
-
ownerState: s
|
|
596
|
-
} = e;
|
|
597
|
-
return [o.root, s.dense && o.dense, s.alignItems === "flex-start" && o.alignItemsFlexStart, s.divider && o.divider, !s.disableGutters && o.gutters, !s.disablePadding && o.padding, s.button && o.button, s.hasSecondaryAction && o.secondaryAction];
|
|
598
|
-
}, ze = (e) => {
|
|
693
|
+
const We = ["children", "className", "disableTypography", "inset", "primary", "primaryTypographyProps", "secondary", "secondaryTypographyProps"], ze = (e) => {
|
|
599
694
|
const {
|
|
600
|
-
|
|
601
|
-
|
|
602
|
-
|
|
603
|
-
|
|
604
|
-
|
|
605
|
-
disableGutters: d,
|
|
606
|
-
disablePadding: r,
|
|
607
|
-
divider: m,
|
|
608
|
-
hasSecondaryAction: f,
|
|
609
|
-
selected: C
|
|
695
|
+
classes: o,
|
|
696
|
+
inset: s,
|
|
697
|
+
primary: n,
|
|
698
|
+
secondary: c,
|
|
699
|
+
dense: i
|
|
610
700
|
} = e;
|
|
611
701
|
return w({
|
|
612
|
-
root: ["root",
|
|
613
|
-
|
|
614
|
-
|
|
702
|
+
root: ["root", s && "inset", i && "dense", n && c && "multiline"],
|
|
703
|
+
primary: ["primary"],
|
|
704
|
+
secondary: ["secondary"]
|
|
705
|
+
}, xe, o);
|
|
615
706
|
}, He = A("div", {
|
|
616
|
-
name: "
|
|
707
|
+
name: "MuiListItemText",
|
|
617
708
|
slot: "Root",
|
|
618
|
-
overridesResolver:
|
|
709
|
+
overridesResolver: (e, o) => {
|
|
710
|
+
const {
|
|
711
|
+
ownerState: s
|
|
712
|
+
} = e;
|
|
713
|
+
return [{
|
|
714
|
+
[`& .${ee.primary}`]: o.primary
|
|
715
|
+
}, {
|
|
716
|
+
[`& .${ee.secondary}`]: o.secondary
|
|
717
|
+
}, o.root, s.inset && o.inset, s.primary && s.secondary && o.multiline, s.dense && o.dense];
|
|
718
|
+
}
|
|
619
719
|
})(({
|
|
620
|
-
|
|
621
|
-
ownerState: o
|
|
720
|
+
ownerState: e
|
|
622
721
|
}) => u({
|
|
623
|
-
|
|
624
|
-
|
|
625
|
-
|
|
626
|
-
|
|
627
|
-
|
|
628
|
-
|
|
629
|
-
|
|
630
|
-
|
|
631
|
-
|
|
632
|
-
|
|
633
|
-
paddingBottom: 8
|
|
634
|
-
}, o.dense && {
|
|
635
|
-
paddingTop: 4,
|
|
636
|
-
paddingBottom: 4
|
|
637
|
-
}, !o.disableGutters && {
|
|
638
|
-
paddingLeft: 16,
|
|
639
|
-
paddingRight: 16
|
|
640
|
-
}, !!o.secondaryAction && {
|
|
641
|
-
// Add some space to avoid collision as `ListItemSecondaryAction`
|
|
642
|
-
// is absolutely positioned.
|
|
643
|
-
paddingRight: 48
|
|
644
|
-
}), !!o.secondaryAction && {
|
|
645
|
-
[`& > .${E.root}`]: {
|
|
646
|
-
paddingRight: 48
|
|
647
|
-
}
|
|
648
|
-
}, {
|
|
649
|
-
[`&.${P.focusVisible}`]: {
|
|
650
|
-
backgroundColor: (e.vars || e).palette.action.focus
|
|
651
|
-
},
|
|
652
|
-
[`&.${P.selected}`]: {
|
|
653
|
-
backgroundColor: e.vars ? `rgba(${e.vars.palette.primary.mainChannel} / ${e.vars.palette.action.selectedOpacity})` : h(e.palette.primary.main, e.palette.action.selectedOpacity),
|
|
654
|
-
[`&.${P.focusVisible}`]: {
|
|
655
|
-
backgroundColor: e.vars ? `rgba(${e.vars.palette.primary.mainChannel} / calc(${e.vars.palette.action.selectedOpacity} + ${e.vars.palette.action.focusOpacity}))` : h(e.palette.primary.main, e.palette.action.selectedOpacity + e.palette.action.focusOpacity)
|
|
656
|
-
}
|
|
657
|
-
},
|
|
658
|
-
[`&.${P.disabled}`]: {
|
|
659
|
-
opacity: (e.vars || e).palette.action.disabledOpacity
|
|
660
|
-
}
|
|
661
|
-
}, o.alignItems === "flex-start" && {
|
|
662
|
-
alignItems: "flex-start"
|
|
663
|
-
}, o.divider && {
|
|
664
|
-
borderBottom: `1px solid ${(e.vars || e).palette.divider}`,
|
|
665
|
-
backgroundClip: "padding-box"
|
|
666
|
-
}, o.button && {
|
|
667
|
-
transition: e.transitions.create("background-color", {
|
|
668
|
-
duration: e.transitions.duration.shortest
|
|
669
|
-
}),
|
|
670
|
-
"&:hover": {
|
|
671
|
-
textDecoration: "none",
|
|
672
|
-
backgroundColor: (e.vars || e).palette.action.hover,
|
|
673
|
-
// Reset on touch devices, it doesn't add specificity
|
|
674
|
-
"@media (hover: none)": {
|
|
675
|
-
backgroundColor: "transparent"
|
|
676
|
-
}
|
|
677
|
-
},
|
|
678
|
-
[`&.${P.selected}:hover`]: {
|
|
679
|
-
backgroundColor: e.vars ? `rgba(${e.vars.palette.primary.mainChannel} / calc(${e.vars.palette.action.selectedOpacity} + ${e.vars.palette.action.hoverOpacity}))` : h(e.palette.primary.main, e.palette.action.selectedOpacity + e.palette.action.hoverOpacity),
|
|
680
|
-
// Reset on touch devices, it doesn't add specificity
|
|
681
|
-
"@media (hover: none)": {
|
|
682
|
-
backgroundColor: e.vars ? `rgba(${e.vars.palette.primary.mainChannel} / ${e.vars.palette.action.selectedOpacity})` : h(e.palette.primary.main, e.palette.action.selectedOpacity)
|
|
683
|
-
}
|
|
684
|
-
}
|
|
685
|
-
}, o.hasSecondaryAction && {
|
|
686
|
-
// Add some space to avoid collision as `ListItemSecondaryAction`
|
|
687
|
-
// is absolutely positioned.
|
|
688
|
-
paddingRight: 48
|
|
689
|
-
})), Ye = A("li", {
|
|
690
|
-
name: "MuiListItem",
|
|
691
|
-
slot: "Container",
|
|
692
|
-
overridesResolver: (e, o) => o.container
|
|
693
|
-
})({
|
|
694
|
-
position: "relative"
|
|
695
|
-
}), le = /* @__PURE__ */ l.forwardRef(function(o, s) {
|
|
722
|
+
flex: "1 1 auto",
|
|
723
|
+
minWidth: 0,
|
|
724
|
+
marginTop: 4,
|
|
725
|
+
marginBottom: 4
|
|
726
|
+
}, e.primary && e.secondary && {
|
|
727
|
+
marginTop: 6,
|
|
728
|
+
marginBottom: 6
|
|
729
|
+
}, e.inset && {
|
|
730
|
+
paddingLeft: 56
|
|
731
|
+
})), le = /* @__PURE__ */ l.forwardRef(function(o, s) {
|
|
696
732
|
const n = M({
|
|
697
733
|
props: o,
|
|
698
|
-
name: "
|
|
734
|
+
name: "MuiListItemText"
|
|
699
735
|
}), {
|
|
700
|
-
|
|
701
|
-
|
|
702
|
-
|
|
703
|
-
|
|
704
|
-
|
|
705
|
-
|
|
706
|
-
|
|
707
|
-
|
|
708
|
-
|
|
709
|
-
|
|
710
|
-
|
|
711
|
-
|
|
712
|
-
|
|
713
|
-
|
|
714
|
-
|
|
715
|
-
|
|
716
|
-
|
|
717
|
-
|
|
718
|
-
|
|
719
|
-
|
|
720
|
-
|
|
721
|
-
|
|
722
|
-
|
|
723
|
-
|
|
724
|
-
|
|
725
|
-
|
|
726
|
-
}),
|
|
727
|
-
|
|
728
|
-
|
|
729
|
-
|
|
730
|
-
|
|
731
|
-
|
|
732
|
-
|
|
733
|
-
|
|
734
|
-
|
|
735
|
-
|
|
736
|
-
|
|
737
|
-
|
|
738
|
-
|
|
739
|
-
|
|
740
|
-
selected: de
|
|
741
|
-
}), Q = ze(B), Z = H(W, s), G = ue.root || C.Root || He, k = pe.root || g.root || {}, O = u({
|
|
742
|
-
className: T(Q.root, k.className, m),
|
|
743
|
-
disabled: p
|
|
744
|
-
}, fe);
|
|
745
|
-
let R = f || "li";
|
|
746
|
-
return d && (O.component = f || "div", O.focusVisibleClassName = T(P.focusVisible, S), R = se), K ? (R = !O.component && !f ? "div" : R, x === "li" && (R === "li" ? R = "div" : O.component === "li" && (O.component = "div")), /* @__PURE__ */ b(L.Provider, {
|
|
747
|
-
value: D,
|
|
748
|
-
children: /* @__PURE__ */ U(Ye, u({
|
|
749
|
-
as: x,
|
|
750
|
-
className: T(Q.container, I),
|
|
751
|
-
ref: Z,
|
|
752
|
-
ownerState: B
|
|
753
|
-
}, me, {
|
|
754
|
-
children: [/* @__PURE__ */ b(G, u({}, k, !te(G) && {
|
|
755
|
-
as: R,
|
|
756
|
-
ownerState: u({}, B, k.ownerState)
|
|
757
|
-
}, O, {
|
|
758
|
-
children: N
|
|
759
|
-
})), N.pop()]
|
|
760
|
-
}))
|
|
761
|
-
})) : /* @__PURE__ */ b(L.Provider, {
|
|
762
|
-
value: D,
|
|
763
|
-
children: /* @__PURE__ */ U(G, u({}, k, {
|
|
764
|
-
as: R,
|
|
765
|
-
ref: Z
|
|
766
|
-
}, !te(G) && {
|
|
767
|
-
ownerState: u({}, B, k.ownerState)
|
|
768
|
-
}, O, {
|
|
769
|
-
children: [N, V && /* @__PURE__ */ b(X, {
|
|
770
|
-
children: V
|
|
771
|
-
})]
|
|
772
|
-
}))
|
|
773
|
-
});
|
|
736
|
+
children: c,
|
|
737
|
+
className: i,
|
|
738
|
+
disableTypography: d = !1,
|
|
739
|
+
inset: r = !1,
|
|
740
|
+
primary: m,
|
|
741
|
+
primaryTypographyProps: f,
|
|
742
|
+
secondary: C,
|
|
743
|
+
secondaryTypographyProps: g
|
|
744
|
+
} = n, x = $(n, We), {
|
|
745
|
+
dense: I
|
|
746
|
+
} = l.useContext(L);
|
|
747
|
+
let a = m ?? c, p = C;
|
|
748
|
+
const y = u({}, n, {
|
|
749
|
+
disableTypography: d,
|
|
750
|
+
inset: r,
|
|
751
|
+
primary: !!a,
|
|
752
|
+
secondary: !!p,
|
|
753
|
+
dense: I
|
|
754
|
+
}), v = ze(y);
|
|
755
|
+
return a != null && a.type !== F && !d && (a = /* @__PURE__ */ b(F, u({
|
|
756
|
+
variant: I ? "body2" : "body1",
|
|
757
|
+
className: v.primary,
|
|
758
|
+
component: f != null && f.variant ? void 0 : "span",
|
|
759
|
+
display: "block"
|
|
760
|
+
}, f, {
|
|
761
|
+
children: a
|
|
762
|
+
}))), p != null && p.type !== F && !d && (p = /* @__PURE__ */ b(F, u({
|
|
763
|
+
variant: "body2",
|
|
764
|
+
className: v.secondary,
|
|
765
|
+
color: "text.secondary",
|
|
766
|
+
display: "block"
|
|
767
|
+
}, g, {
|
|
768
|
+
children: p
|
|
769
|
+
}))), /* @__PURE__ */ U(He, u({
|
|
770
|
+
className: T(v.root, i),
|
|
771
|
+
ownerState: y,
|
|
772
|
+
ref: s
|
|
773
|
+
}, x, {
|
|
774
|
+
children: [a, p]
|
|
775
|
+
}));
|
|
774
776
|
});
|
|
775
777
|
process.env.NODE_ENV !== "production" && (le.propTypes = {
|
|
776
778
|
// ┌────────────────────────────── Warning ──────────────────────────────┐
|
|
@@ -778,40 +780,9 @@ process.env.NODE_ENV !== "production" && (le.propTypes = {
|
|
|
778
780
|
// │ To update them, edit the d.ts file and run `pnpm proptypes`. │
|
|
779
781
|
// └─────────────────────────────────────────────────────────────────────┘
|
|
780
782
|
/**
|
|
781
|
-
*
|
|
782
|
-
* @default 'center'
|
|
783
|
-
*/
|
|
784
|
-
alignItems: t.oneOf(["center", "flex-start"]),
|
|
785
|
-
/**
|
|
786
|
-
* If `true`, the list item is focused during the first mount.
|
|
787
|
-
* Focus will also be triggered if the value changes from false to true.
|
|
788
|
-
* @default false
|
|
789
|
-
* @deprecated checkout [ListItemButton](/material-ui/api/list-item-button/) instead
|
|
790
|
-
*/
|
|
791
|
-
autoFocus: t.bool,
|
|
792
|
-
/**
|
|
793
|
-
* If `true`, the list item is a button (using `ButtonBase`). Props intended
|
|
794
|
-
* for `ButtonBase` can then be applied to `ListItem`.
|
|
795
|
-
* @default false
|
|
796
|
-
* @deprecated checkout [ListItemButton](/material-ui/api/list-item-button/) instead
|
|
797
|
-
*/
|
|
798
|
-
button: t.bool,
|
|
799
|
-
/**
|
|
800
|
-
* The content of the component if a `ListItemSecondaryAction` is used it must
|
|
801
|
-
* be the last child.
|
|
783
|
+
* Alias for the `primary` prop.
|
|
802
784
|
*/
|
|
803
|
-
children:
|
|
804
|
-
const o = l.Children.toArray(e.children);
|
|
805
|
-
let s = -1;
|
|
806
|
-
for (let n = o.length - 1; n >= 0; n -= 1) {
|
|
807
|
-
const c = o[n];
|
|
808
|
-
if (ae(c, ["ListItemSecondaryAction"])) {
|
|
809
|
-
s = n;
|
|
810
|
-
break;
|
|
811
|
-
}
|
|
812
|
-
}
|
|
813
|
-
return s !== -1 && s !== o.length - 1 ? new Error("MUI: You used an element after ListItemSecondaryAction. For ListItem to detect that it has a secondary action you must pass it as the last child to ListItem.") : null;
|
|
814
|
-
}),
|
|
785
|
+
children: t.node,
|
|
815
786
|
/**
|
|
816
787
|
* Override or extend the styles applied to the component.
|
|
817
788
|
*/
|
|
@@ -821,112 +792,141 @@ process.env.NODE_ENV !== "production" && (le.propTypes = {
|
|
|
821
792
|
*/
|
|
822
793
|
className: t.string,
|
|
823
794
|
/**
|
|
824
|
-
*
|
|
825
|
-
*
|
|
826
|
-
|
|
827
|
-
|
|
828
|
-
|
|
829
|
-
* The components used for each slot inside.
|
|
830
|
-
*
|
|
831
|
-
* This prop is an alias for the `slots` prop.
|
|
832
|
-
* It's recommended to use the `slots` prop instead.
|
|
833
|
-
*
|
|
834
|
-
* @default {}
|
|
835
|
-
*/
|
|
836
|
-
components: t.shape({
|
|
837
|
-
Root: t.elementType
|
|
838
|
-
}),
|
|
839
|
-
/**
|
|
840
|
-
* The extra props for the slot components.
|
|
841
|
-
* You can override the existing props or add new ones.
|
|
842
|
-
*
|
|
843
|
-
* This prop is an alias for the `slotProps` prop.
|
|
844
|
-
* It's recommended to use the `slotProps` prop instead, as `componentsProps` will be deprecated in the future.
|
|
845
|
-
*
|
|
846
|
-
* @default {}
|
|
847
|
-
*/
|
|
848
|
-
componentsProps: t.shape({
|
|
849
|
-
root: t.object
|
|
850
|
-
}),
|
|
851
|
-
/**
|
|
852
|
-
* The container component used when a `ListItemSecondaryAction` is the last child.
|
|
853
|
-
* @default 'li'
|
|
854
|
-
* @deprecated
|
|
855
|
-
*/
|
|
856
|
-
ContainerComponent: ge,
|
|
857
|
-
/**
|
|
858
|
-
* Props applied to the container component if used.
|
|
859
|
-
* @default {}
|
|
860
|
-
* @deprecated
|
|
795
|
+
* If `true`, the children won't be wrapped by a Typography component.
|
|
796
|
+
* This can be useful to render an alternative Typography variant by wrapping
|
|
797
|
+
* the `children` (or `primary`) text, and optional `secondary` text
|
|
798
|
+
* with the Typography component.
|
|
799
|
+
* @default false
|
|
861
800
|
*/
|
|
862
|
-
|
|
801
|
+
disableTypography: t.bool,
|
|
863
802
|
/**
|
|
864
|
-
* If `true`,
|
|
865
|
-
*
|
|
803
|
+
* If `true`, the children are indented.
|
|
804
|
+
* This should be used if there is no left avatar or left icon.
|
|
866
805
|
* @default false
|
|
867
806
|
*/
|
|
868
|
-
|
|
807
|
+
inset: t.bool,
|
|
869
808
|
/**
|
|
870
|
-
*
|
|
871
|
-
* @default false
|
|
872
|
-
* @deprecated checkout [ListItemButton](/material-ui/api/list-item-button/) instead
|
|
809
|
+
* The main content element.
|
|
873
810
|
*/
|
|
874
|
-
|
|
811
|
+
primary: t.node,
|
|
875
812
|
/**
|
|
876
|
-
*
|
|
877
|
-
*
|
|
813
|
+
* These props will be forwarded to the primary typography component
|
|
814
|
+
* (as long as disableTypography is not `true`).
|
|
878
815
|
*/
|
|
879
|
-
|
|
816
|
+
primaryTypographyProps: t.object,
|
|
880
817
|
/**
|
|
881
|
-
*
|
|
882
|
-
* @default false
|
|
818
|
+
* The secondary content element.
|
|
883
819
|
*/
|
|
884
|
-
|
|
820
|
+
secondary: t.node,
|
|
885
821
|
/**
|
|
886
|
-
*
|
|
887
|
-
*
|
|
822
|
+
* These props will be forwarded to the secondary typography component
|
|
823
|
+
* (as long as disableTypography is not `true`).
|
|
888
824
|
*/
|
|
889
|
-
|
|
825
|
+
secondaryTypographyProps: t.object,
|
|
890
826
|
/**
|
|
891
|
-
*
|
|
827
|
+
* The system prop that allows defining system overrides as well as additional CSS styles.
|
|
892
828
|
*/
|
|
893
|
-
|
|
829
|
+
sx: t.oneOfType([t.arrayOf(t.oneOfType([t.func, t.object, t.bool])), t.func, t.object])
|
|
830
|
+
});
|
|
831
|
+
function oe(e) {
|
|
832
|
+
return e.substring(2).toLowerCase();
|
|
833
|
+
}
|
|
834
|
+
function Ye(e, o) {
|
|
835
|
+
return o.documentElement.clientWidth < e.clientX || o.documentElement.clientHeight < e.clientY;
|
|
836
|
+
}
|
|
837
|
+
function _(e) {
|
|
838
|
+
const {
|
|
839
|
+
children: o,
|
|
840
|
+
disableReactTree: s = !1,
|
|
841
|
+
mouseEvent: n = "onClick",
|
|
842
|
+
onClickAway: c,
|
|
843
|
+
touchEvent: i = "onTouchEnd"
|
|
844
|
+
} = e, d = l.useRef(!1), r = l.useRef(null), m = l.useRef(!1), f = l.useRef(!1);
|
|
845
|
+
l.useEffect(() => (setTimeout(() => {
|
|
846
|
+
m.current = !0;
|
|
847
|
+
}, 0), () => {
|
|
848
|
+
m.current = !1;
|
|
849
|
+
}), []);
|
|
850
|
+
const C = H(
|
|
851
|
+
// @ts-expect-error TODO upstream fix
|
|
852
|
+
o.ref,
|
|
853
|
+
r
|
|
854
|
+
), g = ge((a) => {
|
|
855
|
+
const p = f.current;
|
|
856
|
+
f.current = !1;
|
|
857
|
+
const y = z(r.current);
|
|
858
|
+
if (!m.current || !r.current || "clientX" in a && Ye(a, y))
|
|
859
|
+
return;
|
|
860
|
+
if (d.current) {
|
|
861
|
+
d.current = !1;
|
|
862
|
+
return;
|
|
863
|
+
}
|
|
864
|
+
let v;
|
|
865
|
+
a.composedPath ? v = a.composedPath().indexOf(r.current) > -1 : v = !y.documentElement.contains(
|
|
866
|
+
// @ts-expect-error returns `false` as intended when not dispatched from a Node
|
|
867
|
+
a.target
|
|
868
|
+
) || r.current.contains(
|
|
869
|
+
// @ts-expect-error returns `false` as intended when not dispatched from a Node
|
|
870
|
+
a.target
|
|
871
|
+
), !v && (s || !p) && c(a);
|
|
872
|
+
}), x = (a) => (p) => {
|
|
873
|
+
f.current = !0;
|
|
874
|
+
const y = o.props[a];
|
|
875
|
+
y && y(p);
|
|
876
|
+
}, I = {
|
|
877
|
+
ref: C
|
|
878
|
+
};
|
|
879
|
+
return i !== !1 && (I[i] = x(i)), l.useEffect(() => {
|
|
880
|
+
if (i !== !1) {
|
|
881
|
+
const a = oe(i), p = z(r.current), y = () => {
|
|
882
|
+
d.current = !0;
|
|
883
|
+
};
|
|
884
|
+
return p.addEventListener(a, g), p.addEventListener("touchmove", y), () => {
|
|
885
|
+
p.removeEventListener(a, g), p.removeEventListener("touchmove", y);
|
|
886
|
+
};
|
|
887
|
+
}
|
|
888
|
+
}, [g, i]), n !== !1 && (I[n] = x(n)), l.useEffect(() => {
|
|
889
|
+
if (n !== !1) {
|
|
890
|
+
const a = oe(n), p = z(r.current);
|
|
891
|
+
return p.addEventListener(a, g), () => {
|
|
892
|
+
p.removeEventListener(a, g);
|
|
893
|
+
};
|
|
894
|
+
}
|
|
895
|
+
}, [g, n]), /* @__PURE__ */ b(l.Fragment, {
|
|
896
|
+
children: /* @__PURE__ */ l.cloneElement(o, I)
|
|
897
|
+
});
|
|
898
|
+
}
|
|
899
|
+
process.env.NODE_ENV !== "production" && (_.propTypes = {
|
|
900
|
+
// ----------------------------- Warning --------------------------------
|
|
901
|
+
// | These PropTypes are generated from the TypeScript type definitions |
|
|
902
|
+
// | To update them edit TypeScript types and run "yarn proptypes" |
|
|
903
|
+
// ----------------------------------------------------------------------
|
|
894
904
|
/**
|
|
895
|
-
* The element
|
|
905
|
+
* The wrapped element.
|
|
896
906
|
*/
|
|
897
|
-
|
|
907
|
+
children: ve.isRequired,
|
|
898
908
|
/**
|
|
899
|
-
*
|
|
909
|
+
* If `true`, the React tree is ignored and only the DOM tree is considered.
|
|
910
|
+
* This prop changes how portaled elements are handled.
|
|
900
911
|
* @default false
|
|
901
|
-
* @deprecated checkout [ListItemButton](/material-ui/api/list-item-button/) instead
|
|
902
912
|
*/
|
|
903
|
-
|
|
913
|
+
disableReactTree: t.bool,
|
|
904
914
|
/**
|
|
905
|
-
* The
|
|
906
|
-
*
|
|
907
|
-
*
|
|
908
|
-
* This prop is an alias for the `componentsProps` prop, which will be deprecated in the future.
|
|
909
|
-
*
|
|
910
|
-
* @default {}
|
|
915
|
+
* The mouse event to listen to. You can disable the listener by providing `false`.
|
|
916
|
+
* @default 'onClick'
|
|
911
917
|
*/
|
|
912
|
-
|
|
913
|
-
root: t.object
|
|
914
|
-
}),
|
|
918
|
+
mouseEvent: t.oneOf(["onClick", "onMouseDown", "onMouseUp", "onPointerDown", "onPointerUp", !1]),
|
|
915
919
|
/**
|
|
916
|
-
*
|
|
917
|
-
*
|
|
918
|
-
* This prop is an alias for the `components` prop, which will be deprecated in the future.
|
|
919
|
-
*
|
|
920
|
-
* @default {}
|
|
920
|
+
* Callback fired when a "click away" event is detected.
|
|
921
921
|
*/
|
|
922
|
-
|
|
923
|
-
root: t.elementType
|
|
924
|
-
}),
|
|
922
|
+
onClickAway: t.func.isRequired,
|
|
925
923
|
/**
|
|
926
|
-
* The
|
|
924
|
+
* The touch event to listen to. You can disable the listener by providing `false`.
|
|
925
|
+
* @default 'onTouchEnd'
|
|
927
926
|
*/
|
|
928
|
-
|
|
927
|
+
touchEvent: t.oneOf(["onTouchEnd", "onTouchStart", !1])
|
|
929
928
|
});
|
|
929
|
+
process.env.NODE_ENV !== "production" && (_.propTypes = Ie(_.propTypes));
|
|
930
930
|
const rt = ({
|
|
931
931
|
open: e,
|
|
932
932
|
buttons: o,
|
|
@@ -953,10 +953,10 @@ const rt = ({
|
|
|
953
953
|
...c
|
|
954
954
|
},
|
|
955
955
|
disablePadding: !0,
|
|
956
|
-
children: o.map((r, m) => /* @__PURE__ */ b(
|
|
957
|
-
r.startIcon !== void 0 && /* @__PURE__ */ b(
|
|
956
|
+
children: o.map((r, m) => /* @__PURE__ */ b(ie, { secondaryAction: r.endIcon, disablePadding: !0, children: /* @__PURE__ */ U(re, { role: void 0, onClick: r.onClick, dense: !0, children: [
|
|
957
|
+
r.startIcon !== void 0 && /* @__PURE__ */ b(ce, { sx: { minWidth: "auto", mr: 1 }, children: r.startIcon }),
|
|
958
958
|
/* @__PURE__ */ b(
|
|
959
|
-
|
|
959
|
+
le,
|
|
960
960
|
{
|
|
961
961
|
primary: r.label,
|
|
962
962
|
primaryTypographyProps: {
|