@hybridcore/ui 1.1.3 → 1.3.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/dist/{ButtonBase-BYmh3G5j.js → ButtonBase-C7CHOX3y.js} +8 -7
- package/dist/{CardContent-C8PxkJz4.js → CardContent-DDFwwGfd.js} +3 -3
- package/dist/Checkbox-DP6_qp1v.js +469 -0
- package/dist/Collapse-9egEADkh.js +296 -0
- package/dist/{DialogContent-2aPOjKE7.js → DialogContent-MMUsECN2.js} +746 -789
- package/dist/{FormControl-BiAFm76F.js → FormControl-Cj5nc-Nv.js} +151 -163
- package/dist/FormControlLabel-j_atSYQA.js +827 -0
- package/dist/{IconButton-CQJ8wZE8.js → IconButton-2FRFauye.js} +4 -4
- package/dist/{Input-Bf5G3tFN.js → Input-BY_yKOrF.js} +5 -5
- package/dist/{listItemTextClasses-BvXFz-Oc.js → List-CgBXAAKA.js} +50 -62
- package/dist/ListItem-BFDUUjHt.js +428 -0
- package/dist/MenuItem-BejUFNIP.js +233 -0
- package/dist/{OutlinedInput-BEVE8VZQ.js → OutlinedInput-CnzESIDi.js} +5 -5
- package/dist/{Paper-CaiWdndQ.js → Paper-k37cShvn.js} +4 -4
- package/dist/{Select-DxpxZbJp.js → Select-BGt6e73I.js} +804 -1025
- package/dist/{Typography-XIiVCSto.js → Typography-Bjo-B13o.js} +3 -3
- package/dist/{chainPropTypes-DtBfUj5o.js → chainPropTypes-BmidnkZm.js} +2 -2
- package/dist/components/card/index.js +5 -5
- package/dist/components/card/styled.js +1 -1
- package/dist/components/collapsible-card/index.js +34 -0
- package/dist/components/collapsible-card/style.js +575 -0
- package/dist/components/confirm/dialog.js +5 -5
- package/dist/components/container/index.js +6 -6
- package/dist/components/context-menu/index.js +191 -603
- 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 +7 -5
- 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 +1 -1
- 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 +1 -1
- package/dist/components/geometry-picker/map/index.js +1 -1
- package/dist/components/geometry-picker/map/logic.js +1 -1
- package/dist/components/icon-button/index.js +1 -1
- package/dist/components/map/helpers/ol.js +2 -2
- package/dist/components/map/index.js +2 -2
- package/dist/components/map/logic.js +1 -1
- package/dist/components/map/styled.js +89 -6
- package/dist/components/search-input/index.js +3 -3
- package/dist/components/template-property-filters/index.js +78 -0
- package/dist/components/template-property-filters/property.js +7019 -0
- package/dist/components/tree-select/index.js +14 -13
- package/dist/components/treeview-filter/index.js +263 -328
- package/dist/components/treeview-filter/item/index.js +1 -1
- package/dist/components/treeview-filter/item-label/index.js +2 -2
- package/dist/createSvgIcon-DAR6Hwv8.js +77 -0
- package/dist/createSvgIcon-R_PakhKf.js +213 -0
- package/dist/{createTheme-agWfFD64.js → createTheme-oOCi1S_n.js} +5 -5
- package/dist/debounce-46wSf_lW.js +15 -0
- package/dist/{exactProp-CI8dagM-.js → exactProp-DhXxfU8X.js} +2 -2
- package/dist/index-C7W2wuUG.js +609 -0
- package/dist/index-DHnXB0CB.js +287 -0
- package/dist/{index-IvOfmM1F.js → index-JrtqxUdI.js} +6 -6
- package/dist/listItemTextClasses-CaI8l2PD.js +16 -0
- package/dist/main.d.ts +158 -0
- package/dist/main.js +33 -29
- package/dist/{ol-DXmSLlWv.js → ol-q6vTiF_t.js} +1 -1
- package/dist/resolveComponentProps-BwtY1IP3.js +54 -0
- package/dist/styled-CHMAYxVs.js +142 -0
- package/dist/{styled-Iq9jsO4F.js → styled-Wx2vv4j8.js} +1 -1
- package/dist/unsupportedProp-BuVD30Gh.js +9 -0
- package/dist/{useTheme-C0Dky5rV.js → useTheme-BI40KZ7w.js} +2 -1
- package/dist/{useTheme-CeyGVuQP.js → useTheme-CD5DEi5n.js} +2 -2
- package/dist/useThemeProps-D4or2IlT.js +62 -0
- package/dist/{useThemeProps-CzAjOL6F.js → useThemeProps-DT5EdhcP.js} +5 -4
- package/dist/{utils-DLpkeyhZ.js → utils-BEaBPoDF.js} +10 -10
- package/package.json +1 -1
- package/dist/Checkbox-DostZSwR.js +0 -673
- package/dist/index-Bw_m9ult.js +0 -1105
- package/dist/index-wW2D1aTG.js +0 -957
- package/dist/styled-C43K9x7T.js +0 -229
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { a as t, _ as h } from "./extends-C3382pL0.js";
|
|
2
2
|
import * as d from "react";
|
|
3
|
-
import { c as n, P as r } from "./createTheme-
|
|
4
|
-
import { g as z, u as R, c as C, b as B, a as I } from "./chainPropTypes-
|
|
5
|
-
import { g as O, s as x, a as g } from "./styled-
|
|
3
|
+
import { c as n, P as r } from "./createTheme-oOCi1S_n.js";
|
|
4
|
+
import { g as z, u as R, c as C, b as B, a as I } from "./chainPropTypes-BmidnkZm.js";
|
|
5
|
+
import { g as O, s as x, a as g } from "./styled-Wx2vv4j8.js";
|
|
6
6
|
import { jsx as T } from "react/jsx-runtime";
|
|
7
|
-
import { B as $ } from "./ButtonBase-
|
|
7
|
+
import { B as $ } from "./ButtonBase-C7CHOX3y.js";
|
|
8
8
|
function k(o) {
|
|
9
9
|
return O("MuiIconButton", o);
|
|
10
10
|
}
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { a, _ as U } from "./extends-C3382pL0.js";
|
|
2
2
|
import * as h from "react";
|
|
3
|
-
import { d as j, P as o } from "./createTheme-
|
|
4
|
-
import { g as _, s as y, r as w } from "./styled-
|
|
5
|
-
import { i as M, b as S, r as W, c as E, d as F, e as N } from "./FormControl-
|
|
6
|
-
import { g as X, u as A, a as D } from "./chainPropTypes-
|
|
3
|
+
import { d as j, P as o } from "./createTheme-oOCi1S_n.js";
|
|
4
|
+
import { g as _, s as y, r as w } from "./styled-Wx2vv4j8.js";
|
|
5
|
+
import { i as M, b as S, r as W, c as E, d as F, e as N } from "./FormControl-Cj5nc-Nv.js";
|
|
6
|
+
import { g as X, u as A, a as D } from "./chainPropTypes-BmidnkZm.js";
|
|
7
7
|
import { jsx as L } from "react/jsx-runtime";
|
|
8
|
-
import { r as V } from "./ButtonBase-
|
|
8
|
+
import { r as V } from "./ButtonBase-C7CHOX3y.js";
|
|
9
9
|
function k(t) {
|
|
10
10
|
return _("MuiInput", t);
|
|
11
11
|
}
|
|
@@ -1,37 +1,37 @@
|
|
|
1
|
-
import { a as
|
|
1
|
+
import { a as i, _ as L } from "./extends-C3382pL0.js";
|
|
2
2
|
import * as d from "react";
|
|
3
|
-
import { P as e } from "./createTheme-
|
|
4
|
-
import { g as
|
|
5
|
-
import { g as
|
|
6
|
-
import { jsx as
|
|
7
|
-
const
|
|
8
|
-
process.env.NODE_ENV !== "production" && (
|
|
9
|
-
function
|
|
10
|
-
return
|
|
3
|
+
import { P as e } from "./createTheme-oOCi1S_n.js";
|
|
4
|
+
import { g as x, u as P, c as y, a as N } from "./chainPropTypes-BmidnkZm.js";
|
|
5
|
+
import { g as v, s as C } from "./styled-Wx2vv4j8.js";
|
|
6
|
+
import { jsx as T, jsxs as j } from "react/jsx-runtime";
|
|
7
|
+
const u = /* @__PURE__ */ d.createContext({});
|
|
8
|
+
process.env.NODE_ENV !== "production" && (u.displayName = "ListContext");
|
|
9
|
+
function _(s) {
|
|
10
|
+
return v("MuiList", s);
|
|
11
11
|
}
|
|
12
|
-
|
|
13
|
-
const
|
|
12
|
+
x("MuiList", ["root", "padding", "dense", "subheader"]);
|
|
13
|
+
const M = ["children", "className", "component", "dense", "disablePadding", "subheader"], O = (s) => {
|
|
14
14
|
const {
|
|
15
|
-
classes:
|
|
16
|
-
disablePadding:
|
|
15
|
+
classes: o,
|
|
16
|
+
disablePadding: t,
|
|
17
17
|
dense: n,
|
|
18
|
-
subheader:
|
|
18
|
+
subheader: a
|
|
19
19
|
} = s;
|
|
20
|
-
return
|
|
21
|
-
root: ["root", !
|
|
22
|
-
},
|
|
23
|
-
},
|
|
20
|
+
return N({
|
|
21
|
+
root: ["root", !t && "padding", n && "dense", a && "subheader"]
|
|
22
|
+
}, _, o);
|
|
23
|
+
}, R = C("ul", {
|
|
24
24
|
name: "MuiList",
|
|
25
25
|
slot: "Root",
|
|
26
|
-
overridesResolver: (s,
|
|
26
|
+
overridesResolver: (s, o) => {
|
|
27
27
|
const {
|
|
28
|
-
ownerState:
|
|
28
|
+
ownerState: t
|
|
29
29
|
} = s;
|
|
30
|
-
return [
|
|
30
|
+
return [o.root, !t.disablePadding && o.padding, t.dense && o.dense, t.subheader && o.subheader];
|
|
31
31
|
}
|
|
32
32
|
})(({
|
|
33
33
|
ownerState: s
|
|
34
|
-
}) =>
|
|
34
|
+
}) => i({
|
|
35
35
|
listStyle: "none",
|
|
36
36
|
margin: 0,
|
|
37
37
|
padding: 0,
|
|
@@ -41,37 +41,37 @@ const j = ["children", "className", "component", "dense", "disablePadding", "sub
|
|
|
41
41
|
paddingBottom: 8
|
|
42
42
|
}, s.subheader && {
|
|
43
43
|
paddingTop: 0
|
|
44
|
-
})),
|
|
45
|
-
const n =
|
|
46
|
-
props:
|
|
44
|
+
})), E = /* @__PURE__ */ d.forwardRef(function(o, t) {
|
|
45
|
+
const n = P({
|
|
46
|
+
props: o,
|
|
47
47
|
name: "MuiList"
|
|
48
48
|
}), {
|
|
49
|
-
children:
|
|
50
|
-
className:
|
|
51
|
-
component:
|
|
52
|
-
dense:
|
|
53
|
-
disablePadding:
|
|
54
|
-
subheader:
|
|
55
|
-
} = n,
|
|
56
|
-
dense:
|
|
57
|
-
}), [
|
|
58
|
-
component:
|
|
59
|
-
dense:
|
|
60
|
-
disablePadding:
|
|
61
|
-
}),
|
|
62
|
-
return /* @__PURE__ */
|
|
63
|
-
value:
|
|
64
|
-
children: /* @__PURE__ */
|
|
65
|
-
as:
|
|
66
|
-
className:
|
|
67
|
-
ref:
|
|
68
|
-
ownerState:
|
|
69
|
-
},
|
|
70
|
-
children: [
|
|
49
|
+
children: a,
|
|
50
|
+
className: c,
|
|
51
|
+
component: l = "ul",
|
|
52
|
+
dense: r = !1,
|
|
53
|
+
disablePadding: m = !1,
|
|
54
|
+
subheader: b
|
|
55
|
+
} = n, f = L(n, M), g = d.useMemo(() => ({
|
|
56
|
+
dense: r
|
|
57
|
+
}), [r]), p = i({}, n, {
|
|
58
|
+
component: l,
|
|
59
|
+
dense: r,
|
|
60
|
+
disablePadding: m
|
|
61
|
+
}), h = O(p);
|
|
62
|
+
return /* @__PURE__ */ T(u.Provider, {
|
|
63
|
+
value: g,
|
|
64
|
+
children: /* @__PURE__ */ j(R, i({
|
|
65
|
+
as: l,
|
|
66
|
+
className: y(h.root, c),
|
|
67
|
+
ref: t,
|
|
68
|
+
ownerState: p
|
|
69
|
+
}, f, {
|
|
70
|
+
children: [b, a]
|
|
71
71
|
}))
|
|
72
72
|
});
|
|
73
73
|
});
|
|
74
|
-
process.env.NODE_ENV !== "production" && (
|
|
74
|
+
process.env.NODE_ENV !== "production" && (E.propTypes = {
|
|
75
75
|
// ┌────────────────────────────── Warning ──────────────────────────────┐
|
|
76
76
|
// │ These PropTypes are generated from the TypeScript type definitions. │
|
|
77
77
|
// │ To update them, edit the d.ts file and run `pnpm proptypes`. │
|
|
@@ -114,19 +114,7 @@ process.env.NODE_ENV !== "production" && (O.propTypes = {
|
|
|
114
114
|
*/
|
|
115
115
|
sx: e.oneOfType([e.arrayOf(e.oneOfType([e.func, e.object, e.bool])), e.func, e.object])
|
|
116
116
|
});
|
|
117
|
-
function V(s) {
|
|
118
|
-
return c("MuiListItemIcon", s);
|
|
119
|
-
}
|
|
120
|
-
const B = l("MuiListItemIcon", ["root", "alignItemsFlexStart"]);
|
|
121
|
-
function F(s) {
|
|
122
|
-
return c("MuiListItemText", s);
|
|
123
|
-
}
|
|
124
|
-
const W = l("MuiListItemText", ["root", "multiline", "dense", "inset", "primary", "secondary"]);
|
|
125
117
|
export {
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
O as b,
|
|
129
|
-
B as c,
|
|
130
|
-
V as g,
|
|
131
|
-
W as l
|
|
118
|
+
u as L,
|
|
119
|
+
E as a
|
|
132
120
|
};
|
|
@@ -0,0 +1,428 @@
|
|
|
1
|
+
import { a, _ as S } from "./extends-C3382pL0.js";
|
|
2
|
+
import * as r from "react";
|
|
3
|
+
import { P as e } from "./createTheme-oOCi1S_n.js";
|
|
4
|
+
import { g as R, u as Y, c as L, a as z, b as ot } from "./chainPropTypes-BmidnkZm.js";
|
|
5
|
+
import { g as $, s as M, a as x } from "./styled-Wx2vv4j8.js";
|
|
6
|
+
import { L as h } from "./List-CgBXAAKA.js";
|
|
7
|
+
import { jsx as v, jsxs as w } from "react/jsx-runtime";
|
|
8
|
+
import { b as st, a as nt, e as at, B as it } from "./ButtonBase-C7CHOX3y.js";
|
|
9
|
+
import { i as H } from "./isMuiElement-CxT3_ACP.js";
|
|
10
|
+
import { i as D } from "./isHostComponent-kiaBvYVo.js";
|
|
11
|
+
function rt(t) {
|
|
12
|
+
return $("MuiListItem", t);
|
|
13
|
+
}
|
|
14
|
+
const b = R("MuiListItem", ["root", "container", "focusVisible", "dense", "alignItemsFlexStart", "disabled", "divider", "gutters", "padding", "button", "secondaryAction", "selected"]);
|
|
15
|
+
function Rt(t) {
|
|
16
|
+
return $("MuiListItemButton", t);
|
|
17
|
+
}
|
|
18
|
+
const ct = R("MuiListItemButton", ["root", "focusVisible", "dense", "alignItemsFlexStart", "disabled", "divider", "gutters", "selected"]);
|
|
19
|
+
function lt(t) {
|
|
20
|
+
return $("MuiListItemSecondaryAction", t);
|
|
21
|
+
}
|
|
22
|
+
R("MuiListItemSecondaryAction", ["root", "disableGutters"]);
|
|
23
|
+
const dt = ["className"], pt = (t) => {
|
|
24
|
+
const {
|
|
25
|
+
disableGutters: o,
|
|
26
|
+
classes: s
|
|
27
|
+
} = t;
|
|
28
|
+
return z({
|
|
29
|
+
root: ["root", o && "disableGutters"]
|
|
30
|
+
}, lt, s);
|
|
31
|
+
}, ut = M("div", {
|
|
32
|
+
name: "MuiListItemSecondaryAction",
|
|
33
|
+
slot: "Root",
|
|
34
|
+
overridesResolver: (t, o) => {
|
|
35
|
+
const {
|
|
36
|
+
ownerState: s
|
|
37
|
+
} = t;
|
|
38
|
+
return [o.root, s.disableGutters && o.disableGutters];
|
|
39
|
+
}
|
|
40
|
+
})(({
|
|
41
|
+
ownerState: t
|
|
42
|
+
}) => a({
|
|
43
|
+
position: "absolute",
|
|
44
|
+
right: 16,
|
|
45
|
+
top: "50%",
|
|
46
|
+
transform: "translateY(-50%)"
|
|
47
|
+
}, t.disableGutters && {
|
|
48
|
+
right: 0
|
|
49
|
+
})), G = /* @__PURE__ */ r.forwardRef(function(o, s) {
|
|
50
|
+
const n = Y({
|
|
51
|
+
props: o,
|
|
52
|
+
name: "MuiListItemSecondaryAction"
|
|
53
|
+
}), {
|
|
54
|
+
className: i
|
|
55
|
+
} = n, c = S(n, dt), p = r.useContext(h), u = a({}, n, {
|
|
56
|
+
disableGutters: p.disableGutters
|
|
57
|
+
}), f = pt(u);
|
|
58
|
+
return /* @__PURE__ */ v(ut, a({
|
|
59
|
+
className: L(f.root, i),
|
|
60
|
+
ownerState: u,
|
|
61
|
+
ref: s
|
|
62
|
+
}, c));
|
|
63
|
+
});
|
|
64
|
+
process.env.NODE_ENV !== "production" && (G.propTypes = {
|
|
65
|
+
// ┌────────────────────────────── Warning ──────────────────────────────┐
|
|
66
|
+
// │ These PropTypes are generated from the TypeScript type definitions. │
|
|
67
|
+
// │ To update them, edit the d.ts file and run `pnpm proptypes`. │
|
|
68
|
+
// └─────────────────────────────────────────────────────────────────────┘
|
|
69
|
+
/**
|
|
70
|
+
* The content of the component, normally an `IconButton` or selection control.
|
|
71
|
+
*/
|
|
72
|
+
children: e.node,
|
|
73
|
+
/**
|
|
74
|
+
* Override or extend the styles applied to the component.
|
|
75
|
+
*/
|
|
76
|
+
classes: e.object,
|
|
77
|
+
/**
|
|
78
|
+
* @ignore
|
|
79
|
+
*/
|
|
80
|
+
className: e.string,
|
|
81
|
+
/**
|
|
82
|
+
* The system prop that allows defining system overrides as well as additional CSS styles.
|
|
83
|
+
*/
|
|
84
|
+
sx: e.oneOfType([e.arrayOf(e.oneOfType([e.func, e.object, e.bool])), e.func, e.object])
|
|
85
|
+
});
|
|
86
|
+
G.muiName = "ListItemSecondaryAction";
|
|
87
|
+
const mt = ["className"], bt = ["alignItems", "autoFocus", "button", "children", "className", "component", "components", "componentsProps", "ContainerComponent", "ContainerProps", "dense", "disabled", "disableGutters", "disablePadding", "divider", "focusVisibleClassName", "secondaryAction", "selected", "slotProps", "slots"], ft = (t, o) => {
|
|
88
|
+
const {
|
|
89
|
+
ownerState: s
|
|
90
|
+
} = t;
|
|
91
|
+
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];
|
|
92
|
+
}, gt = (t) => {
|
|
93
|
+
const {
|
|
94
|
+
alignItems: o,
|
|
95
|
+
button: s,
|
|
96
|
+
classes: n,
|
|
97
|
+
dense: i,
|
|
98
|
+
disabled: c,
|
|
99
|
+
disableGutters: p,
|
|
100
|
+
disablePadding: u,
|
|
101
|
+
divider: f,
|
|
102
|
+
hasSecondaryAction: g,
|
|
103
|
+
selected: A
|
|
104
|
+
} = t;
|
|
105
|
+
return z({
|
|
106
|
+
root: ["root", i && "dense", !p && "gutters", !u && "padding", f && "divider", c && "disabled", s && "button", o === "flex-start" && "alignItemsFlexStart", g && "secondaryAction", A && "selected"],
|
|
107
|
+
container: ["container"]
|
|
108
|
+
}, rt, n);
|
|
109
|
+
}, yt = M("div", {
|
|
110
|
+
name: "MuiListItem",
|
|
111
|
+
slot: "Root",
|
|
112
|
+
overridesResolver: ft
|
|
113
|
+
})(({
|
|
114
|
+
theme: t,
|
|
115
|
+
ownerState: o
|
|
116
|
+
}) => a({
|
|
117
|
+
display: "flex",
|
|
118
|
+
justifyContent: "flex-start",
|
|
119
|
+
alignItems: "center",
|
|
120
|
+
position: "relative",
|
|
121
|
+
textDecoration: "none",
|
|
122
|
+
width: "100%",
|
|
123
|
+
boxSizing: "border-box",
|
|
124
|
+
textAlign: "left"
|
|
125
|
+
}, !o.disablePadding && a({
|
|
126
|
+
paddingTop: 8,
|
|
127
|
+
paddingBottom: 8
|
|
128
|
+
}, o.dense && {
|
|
129
|
+
paddingTop: 4,
|
|
130
|
+
paddingBottom: 4
|
|
131
|
+
}, !o.disableGutters && {
|
|
132
|
+
paddingLeft: 16,
|
|
133
|
+
paddingRight: 16
|
|
134
|
+
}, !!o.secondaryAction && {
|
|
135
|
+
// Add some space to avoid collision as `ListItemSecondaryAction`
|
|
136
|
+
// is absolutely positioned.
|
|
137
|
+
paddingRight: 48
|
|
138
|
+
}), !!o.secondaryAction && {
|
|
139
|
+
[`& > .${ct.root}`]: {
|
|
140
|
+
paddingRight: 48
|
|
141
|
+
}
|
|
142
|
+
}, {
|
|
143
|
+
[`&.${b.focusVisible}`]: {
|
|
144
|
+
backgroundColor: (t.vars || t).palette.action.focus
|
|
145
|
+
},
|
|
146
|
+
[`&.${b.selected}`]: {
|
|
147
|
+
backgroundColor: t.vars ? `rgba(${t.vars.palette.primary.mainChannel} / ${t.vars.palette.action.selectedOpacity})` : x(t.palette.primary.main, t.palette.action.selectedOpacity),
|
|
148
|
+
[`&.${b.focusVisible}`]: {
|
|
149
|
+
backgroundColor: t.vars ? `rgba(${t.vars.palette.primary.mainChannel} / calc(${t.vars.palette.action.selectedOpacity} + ${t.vars.palette.action.focusOpacity}))` : x(t.palette.primary.main, t.palette.action.selectedOpacity + t.palette.action.focusOpacity)
|
|
150
|
+
}
|
|
151
|
+
},
|
|
152
|
+
[`&.${b.disabled}`]: {
|
|
153
|
+
opacity: (t.vars || t).palette.action.disabledOpacity
|
|
154
|
+
}
|
|
155
|
+
}, o.alignItems === "flex-start" && {
|
|
156
|
+
alignItems: "flex-start"
|
|
157
|
+
}, o.divider && {
|
|
158
|
+
borderBottom: `1px solid ${(t.vars || t).palette.divider}`,
|
|
159
|
+
backgroundClip: "padding-box"
|
|
160
|
+
}, o.button && {
|
|
161
|
+
transition: t.transitions.create("background-color", {
|
|
162
|
+
duration: t.transitions.duration.shortest
|
|
163
|
+
}),
|
|
164
|
+
"&:hover": {
|
|
165
|
+
textDecoration: "none",
|
|
166
|
+
backgroundColor: (t.vars || t).palette.action.hover,
|
|
167
|
+
// Reset on touch devices, it doesn't add specificity
|
|
168
|
+
"@media (hover: none)": {
|
|
169
|
+
backgroundColor: "transparent"
|
|
170
|
+
}
|
|
171
|
+
},
|
|
172
|
+
[`&.${b.selected}:hover`]: {
|
|
173
|
+
backgroundColor: t.vars ? `rgba(${t.vars.palette.primary.mainChannel} / calc(${t.vars.palette.action.selectedOpacity} + ${t.vars.palette.action.hoverOpacity}))` : x(t.palette.primary.main, t.palette.action.selectedOpacity + t.palette.action.hoverOpacity),
|
|
174
|
+
// Reset on touch devices, it doesn't add specificity
|
|
175
|
+
"@media (hover: none)": {
|
|
176
|
+
backgroundColor: t.vars ? `rgba(${t.vars.palette.primary.mainChannel} / ${t.vars.palette.action.selectedOpacity})` : x(t.palette.primary.main, t.palette.action.selectedOpacity)
|
|
177
|
+
}
|
|
178
|
+
}
|
|
179
|
+
}, o.hasSecondaryAction && {
|
|
180
|
+
// Add some space to avoid collision as `ListItemSecondaryAction`
|
|
181
|
+
// is absolutely positioned.
|
|
182
|
+
paddingRight: 48
|
|
183
|
+
})), vt = M("li", {
|
|
184
|
+
name: "MuiListItem",
|
|
185
|
+
slot: "Container",
|
|
186
|
+
overridesResolver: (t, o) => o.container
|
|
187
|
+
})({
|
|
188
|
+
position: "relative"
|
|
189
|
+
}), Ct = /* @__PURE__ */ r.forwardRef(function(o, s) {
|
|
190
|
+
const n = Y({
|
|
191
|
+
props: o,
|
|
192
|
+
name: "MuiListItem"
|
|
193
|
+
}), {
|
|
194
|
+
alignItems: i = "center",
|
|
195
|
+
autoFocus: c = !1,
|
|
196
|
+
button: p = !1,
|
|
197
|
+
children: u,
|
|
198
|
+
className: f,
|
|
199
|
+
component: g,
|
|
200
|
+
components: A = {},
|
|
201
|
+
componentsProps: T = {},
|
|
202
|
+
ContainerComponent: j = "li",
|
|
203
|
+
ContainerProps: {
|
|
204
|
+
className: W
|
|
205
|
+
} = {},
|
|
206
|
+
dense: V = !1,
|
|
207
|
+
disabled: k = !1,
|
|
208
|
+
disableGutters: P = !1,
|
|
209
|
+
disablePadding: q = !1,
|
|
210
|
+
divider: J = !1,
|
|
211
|
+
focusVisibleClassName: K,
|
|
212
|
+
secondaryAction: B,
|
|
213
|
+
selected: Q = !1,
|
|
214
|
+
slotProps: X = {},
|
|
215
|
+
slots: Z = {}
|
|
216
|
+
} = n, tt = S(n.ContainerProps, mt), et = S(n, bt), E = r.useContext(h), N = r.useMemo(() => ({
|
|
217
|
+
dense: V || E.dense || !1,
|
|
218
|
+
alignItems: i,
|
|
219
|
+
disableGutters: P
|
|
220
|
+
}), [i, E.dense, V, P]), O = r.useRef(null);
|
|
221
|
+
st(() => {
|
|
222
|
+
c && (O.current ? O.current.focus() : process.env.NODE_ENV !== "production" && console.error("MUI: Unable to set focus to a ListItem whose component has not been rendered."));
|
|
223
|
+
}, [c]);
|
|
224
|
+
const m = r.Children.toArray(u), U = m.length && H(m[m.length - 1], ["ListItemSecondaryAction"]), C = a({}, n, {
|
|
225
|
+
alignItems: i,
|
|
226
|
+
autoFocus: c,
|
|
227
|
+
button: p,
|
|
228
|
+
dense: N.dense,
|
|
229
|
+
disabled: k,
|
|
230
|
+
disableGutters: P,
|
|
231
|
+
disablePadding: q,
|
|
232
|
+
divider: J,
|
|
233
|
+
hasSecondaryAction: U,
|
|
234
|
+
selected: Q
|
|
235
|
+
}), _ = gt(C), F = nt(O, s), I = Z.root || A.Root || yt, y = X.root || T.root || {}, l = a({
|
|
236
|
+
className: L(_.root, y.className, f),
|
|
237
|
+
disabled: k
|
|
238
|
+
}, et);
|
|
239
|
+
let d = g || "li";
|
|
240
|
+
return p && (l.component = g || "div", l.focusVisibleClassName = L(b.focusVisible, K), d = it), U ? (d = !l.component && !g ? "div" : d, j === "li" && (d === "li" ? d = "div" : l.component === "li" && (l.component = "div")), /* @__PURE__ */ v(h.Provider, {
|
|
241
|
+
value: N,
|
|
242
|
+
children: /* @__PURE__ */ w(vt, a({
|
|
243
|
+
as: j,
|
|
244
|
+
className: L(_.container, W),
|
|
245
|
+
ref: F,
|
|
246
|
+
ownerState: C
|
|
247
|
+
}, tt, {
|
|
248
|
+
children: [/* @__PURE__ */ v(I, a({}, y, !D(I) && {
|
|
249
|
+
as: d,
|
|
250
|
+
ownerState: a({}, C, y.ownerState)
|
|
251
|
+
}, l, {
|
|
252
|
+
children: m
|
|
253
|
+
})), m.pop()]
|
|
254
|
+
}))
|
|
255
|
+
})) : /* @__PURE__ */ v(h.Provider, {
|
|
256
|
+
value: N,
|
|
257
|
+
children: /* @__PURE__ */ w(I, a({}, y, {
|
|
258
|
+
as: d,
|
|
259
|
+
ref: F
|
|
260
|
+
}, !D(I) && {
|
|
261
|
+
ownerState: a({}, C, y.ownerState)
|
|
262
|
+
}, l, {
|
|
263
|
+
children: [m, B && /* @__PURE__ */ v(G, {
|
|
264
|
+
children: B
|
|
265
|
+
})]
|
|
266
|
+
}))
|
|
267
|
+
});
|
|
268
|
+
});
|
|
269
|
+
process.env.NODE_ENV !== "production" && (Ct.propTypes = {
|
|
270
|
+
// ┌────────────────────────────── Warning ──────────────────────────────┐
|
|
271
|
+
// │ These PropTypes are generated from the TypeScript type definitions. │
|
|
272
|
+
// │ To update them, edit the d.ts file and run `pnpm proptypes`. │
|
|
273
|
+
// └─────────────────────────────────────────────────────────────────────┘
|
|
274
|
+
/**
|
|
275
|
+
* Defines the `align-items` style property.
|
|
276
|
+
* @default 'center'
|
|
277
|
+
*/
|
|
278
|
+
alignItems: e.oneOf(["center", "flex-start"]),
|
|
279
|
+
/**
|
|
280
|
+
* If `true`, the list item is focused during the first mount.
|
|
281
|
+
* Focus will also be triggered if the value changes from false to true.
|
|
282
|
+
* @default false
|
|
283
|
+
* @deprecated checkout [ListItemButton](/material-ui/api/list-item-button/) instead
|
|
284
|
+
*/
|
|
285
|
+
autoFocus: e.bool,
|
|
286
|
+
/**
|
|
287
|
+
* If `true`, the list item is a button (using `ButtonBase`). Props intended
|
|
288
|
+
* for `ButtonBase` can then be applied to `ListItem`.
|
|
289
|
+
* @default false
|
|
290
|
+
* @deprecated checkout [ListItemButton](/material-ui/api/list-item-button/) instead
|
|
291
|
+
*/
|
|
292
|
+
button: e.bool,
|
|
293
|
+
/**
|
|
294
|
+
* The content of the component if a `ListItemSecondaryAction` is used it must
|
|
295
|
+
* be the last child.
|
|
296
|
+
*/
|
|
297
|
+
children: ot(e.node, (t) => {
|
|
298
|
+
const o = r.Children.toArray(t.children);
|
|
299
|
+
let s = -1;
|
|
300
|
+
for (let n = o.length - 1; n >= 0; n -= 1) {
|
|
301
|
+
const i = o[n];
|
|
302
|
+
if (H(i, ["ListItemSecondaryAction"])) {
|
|
303
|
+
s = n;
|
|
304
|
+
break;
|
|
305
|
+
}
|
|
306
|
+
}
|
|
307
|
+
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;
|
|
308
|
+
}),
|
|
309
|
+
/**
|
|
310
|
+
* Override or extend the styles applied to the component.
|
|
311
|
+
*/
|
|
312
|
+
classes: e.object,
|
|
313
|
+
/**
|
|
314
|
+
* @ignore
|
|
315
|
+
*/
|
|
316
|
+
className: e.string,
|
|
317
|
+
/**
|
|
318
|
+
* The component used for the root node.
|
|
319
|
+
* Either a string to use a HTML element or a component.
|
|
320
|
+
*/
|
|
321
|
+
component: e.elementType,
|
|
322
|
+
/**
|
|
323
|
+
* The components used for each slot inside.
|
|
324
|
+
*
|
|
325
|
+
* This prop is an alias for the `slots` prop.
|
|
326
|
+
* It's recommended to use the `slots` prop instead.
|
|
327
|
+
*
|
|
328
|
+
* @default {}
|
|
329
|
+
*/
|
|
330
|
+
components: e.shape({
|
|
331
|
+
Root: e.elementType
|
|
332
|
+
}),
|
|
333
|
+
/**
|
|
334
|
+
* The extra props for the slot components.
|
|
335
|
+
* You can override the existing props or add new ones.
|
|
336
|
+
*
|
|
337
|
+
* This prop is an alias for the `slotProps` prop.
|
|
338
|
+
* It's recommended to use the `slotProps` prop instead, as `componentsProps` will be deprecated in the future.
|
|
339
|
+
*
|
|
340
|
+
* @default {}
|
|
341
|
+
*/
|
|
342
|
+
componentsProps: e.shape({
|
|
343
|
+
root: e.object
|
|
344
|
+
}),
|
|
345
|
+
/**
|
|
346
|
+
* The container component used when a `ListItemSecondaryAction` is the last child.
|
|
347
|
+
* @default 'li'
|
|
348
|
+
* @deprecated
|
|
349
|
+
*/
|
|
350
|
+
ContainerComponent: at,
|
|
351
|
+
/**
|
|
352
|
+
* Props applied to the container component if used.
|
|
353
|
+
* @default {}
|
|
354
|
+
* @deprecated
|
|
355
|
+
*/
|
|
356
|
+
ContainerProps: e.object,
|
|
357
|
+
/**
|
|
358
|
+
* If `true`, compact vertical padding designed for keyboard and mouse input is used.
|
|
359
|
+
* The prop defaults to the value inherited from the parent List component.
|
|
360
|
+
* @default false
|
|
361
|
+
*/
|
|
362
|
+
dense: e.bool,
|
|
363
|
+
/**
|
|
364
|
+
* If `true`, the component is disabled.
|
|
365
|
+
* @default false
|
|
366
|
+
* @deprecated checkout [ListItemButton](/material-ui/api/list-item-button/) instead
|
|
367
|
+
*/
|
|
368
|
+
disabled: e.bool,
|
|
369
|
+
/**
|
|
370
|
+
* If `true`, the left and right padding is removed.
|
|
371
|
+
* @default false
|
|
372
|
+
*/
|
|
373
|
+
disableGutters: e.bool,
|
|
374
|
+
/**
|
|
375
|
+
* If `true`, all padding is removed.
|
|
376
|
+
* @default false
|
|
377
|
+
*/
|
|
378
|
+
disablePadding: e.bool,
|
|
379
|
+
/**
|
|
380
|
+
* If `true`, a 1px light border is added to the bottom of the list item.
|
|
381
|
+
* @default false
|
|
382
|
+
*/
|
|
383
|
+
divider: e.bool,
|
|
384
|
+
/**
|
|
385
|
+
* @ignore
|
|
386
|
+
*/
|
|
387
|
+
focusVisibleClassName: e.string,
|
|
388
|
+
/**
|
|
389
|
+
* The element to display at the end of ListItem.
|
|
390
|
+
*/
|
|
391
|
+
secondaryAction: e.node,
|
|
392
|
+
/**
|
|
393
|
+
* Use to apply selected styling.
|
|
394
|
+
* @default false
|
|
395
|
+
* @deprecated checkout [ListItemButton](/material-ui/api/list-item-button/) instead
|
|
396
|
+
*/
|
|
397
|
+
selected: e.bool,
|
|
398
|
+
/**
|
|
399
|
+
* The extra props for the slot components.
|
|
400
|
+
* You can override the existing props or add new ones.
|
|
401
|
+
*
|
|
402
|
+
* This prop is an alias for the `componentsProps` prop, which will be deprecated in the future.
|
|
403
|
+
*
|
|
404
|
+
* @default {}
|
|
405
|
+
*/
|
|
406
|
+
slotProps: e.shape({
|
|
407
|
+
root: e.object
|
|
408
|
+
}),
|
|
409
|
+
/**
|
|
410
|
+
* The components used for each slot inside.
|
|
411
|
+
*
|
|
412
|
+
* This prop is an alias for the `components` prop, which will be deprecated in the future.
|
|
413
|
+
*
|
|
414
|
+
* @default {}
|
|
415
|
+
*/
|
|
416
|
+
slots: e.shape({
|
|
417
|
+
root: e.elementType
|
|
418
|
+
}),
|
|
419
|
+
/**
|
|
420
|
+
* The system prop that allows defining system overrides as well as additional CSS styles.
|
|
421
|
+
*/
|
|
422
|
+
sx: e.oneOfType([e.arrayOf(e.oneOfType([e.func, e.object, e.bool])), e.func, e.object])
|
|
423
|
+
});
|
|
424
|
+
export {
|
|
425
|
+
Ct as L,
|
|
426
|
+
Rt as g,
|
|
427
|
+
ct as l
|
|
428
|
+
};
|