@hybridcore/ui 1.3.3 → 1.3.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (67) hide show
  1. package/dist/{ButtonBase-DE8d_U2E.js → ButtonBase-D6qhsxB0.js} +201 -210
  2. package/dist/{CardContent-Du2i427Y.js → CardContent-B8hqgH-I.js} +15 -15
  3. package/dist/{Checkbox-BGNAqLl0.js → Checkbox-BFWhj3s-.js} +154 -144
  4. package/dist/{Collapse-FRd0_2Pt.js → Collapse-D_TjnyE5.js} +96 -87
  5. package/dist/DialogContent-BCYm_d1s.js +864 -0
  6. package/dist/{FormControl-ChTmxscy.js → FormControl-BMRUQKHh.js} +479 -449
  7. package/dist/FormControlLabel-DENNVXWL.js +639 -0
  8. package/dist/{IconButton-Cu_XEJB2.js → IconButton-D8bwME9t.js} +22 -22
  9. package/dist/{Input-DU22-Zbo.js → Input-Dxzguyp5.js} +34 -34
  10. package/dist/{InputAdornment-6aeADcPO.js → InputAdornment-B8ERE7Zv.js} +12 -12
  11. package/dist/{List-nOXr-cFJ.js → List-DEWyK9IO.js} +12 -12
  12. package/dist/{MenuItem-DF45rx2m.js → MenuItem-DstAFfik.js} +26 -26
  13. package/dist/Modal-DNGEQJ1M.js +1267 -0
  14. package/dist/{OutlinedInput-DJCHjkR3.js → OutlinedInput-w2Cj9STF.js} +75 -78
  15. package/dist/{Paper-CD_ma6NJ.js → Paper-BseeergJ.js} +15 -15
  16. package/dist/Select-NDq3WyLt.js +2175 -0
  17. package/dist/Typography-Dg-ROiTA.js +201 -0
  18. package/dist/components/card/index.js +17 -17
  19. package/dist/components/card/styled.js +1 -1
  20. package/dist/components/collapsible-card/style.js +222 -302
  21. package/dist/components/confirm/dialog.js +13 -13
  22. package/dist/components/container/index.js +19 -19
  23. package/dist/components/context-menu/index.js +616 -203
  24. package/dist/components/data-management/instance-form/components/composite-list/index.js +1 -1
  25. package/dist/components/data-management/instance-form/components/variable/index.js +6 -6
  26. package/dist/components/data-management/instance-form/components/variables/index.js +1 -1
  27. package/dist/components/geometry-picker/index.js +3 -3
  28. package/dist/components/icon-button/index.js +1 -1
  29. package/dist/components/map/styled.js +14 -14
  30. package/dist/components/search-input/index.js +4 -4
  31. package/dist/components/template-property-filters/index.js +1 -1
  32. package/dist/components/template-property-filters/property.js +209 -10
  33. package/dist/components/tree-select/index.js +4 -4
  34. package/dist/components/treeview-filter/index.js +29 -30
  35. package/dist/components/treeview-filter/item/index.js +1 -1
  36. package/dist/components/treeview-filter/item-label/index.js +2 -2
  37. package/dist/createStyled-B96gjom1.js +1887 -0
  38. package/dist/createSvgIcon-B2WT0K4k.js +87 -0
  39. package/dist/{createSvgIcon-DPZ7UbxM.js → createSvgIcon-BNrb7rDY.js} +82 -85
  40. package/dist/{exactProp--3vlJ9a9.js → exactProp-CI_rjX83.js} +2 -2
  41. package/dist/{index-CtuBGOmk.js → index-B3Oj04nl.js} +5 -5
  42. package/dist/{index-DzFccwzL.js → index-CSfSVkKj.js} +204 -218
  43. package/dist/{listItemTextClasses-2BAu-hye.js → listItemTextClasses-CFiI_U7B.js} +2 -2
  44. package/dist/main.js +150 -144
  45. package/dist/styled-cPJbqF0E.js +677 -0
  46. package/dist/useTheme-C-T6Qisa.js +10 -0
  47. package/dist/useThemeProps-DeftUmqJ.js +107 -0
  48. package/dist/{utils-qcu0RzdN.js → utils-CCkxV0lZ.js} +15 -15
  49. package/package.json +3 -3
  50. package/dist/DialogContent-CKeAZ3Ts.js +0 -1982
  51. package/dist/FormControlLabel-Df7csguX.js +0 -827
  52. package/dist/ListItem-RJvRMwkZ.js +0 -428
  53. package/dist/Select-C1jD_gBQ.js +0 -2305
  54. package/dist/Typography-C2BkMNk-.js +0 -178
  55. package/dist/chainPropTypes-GRMJ22CO.js +0 -96
  56. package/dist/createSvgIcon-6wv0RQr3.js +0 -63
  57. package/dist/createTheme-C3DKplhE.js +0 -2395
  58. package/dist/property-BSufYw1E.js +0 -6888
  59. package/dist/requirePropFactory-BItwGLRQ.js +0 -18
  60. package/dist/resolveComponentProps-DozbaB8e.js +0 -54
  61. package/dist/styled-CVWGE9ik.js +0 -142
  62. package/dist/styled-iyoioZCr.js +0 -1033
  63. package/dist/unsupportedProp-BuVD30Gh.js +0 -9
  64. package/dist/useTheme--x3BjP9A.js +0 -17
  65. package/dist/useTheme-pWltVFb2.js +0 -10
  66. package/dist/useThemeProps-C90JF0Qc.js +0 -62
  67. package/dist/useThemeProps-DNZoozBw.js +0 -26
@@ -1,84 +1,71 @@
1
- import { jsx as T, jsxs as ae } from "react/jsx-runtime";
2
- import xe from "./components/treeview-filter/item-label/index.js";
1
+ import { jsx as T, jsxs as re } from "react/jsx-runtime";
2
+ import ye from "./components/treeview-filter/item-label/index.js";
3
3
  import se from "lodash";
4
4
  import * as l from "react";
5
- import { P as o } from "./createTheme-C3DKplhE.js";
6
- import { b as Ie, u as Te, e as he } from "./ButtonBase-DE8d_U2E.js";
7
- import { g as Ee, a as ve } from "./chainPropTypes-GRMJ22CO.js";
8
- import { g as De, s as W } from "./styled-iyoioZCr.js";
9
- import { a as $, u as Ne } from "./useThemeProps-C90JF0Qc.js";
10
- import { C as ie } from "./Collapse-FRd0_2Pt.js";
11
- import { u as Oe } from "./unsupportedProp-BuVD30Gh.js";
12
- import { o as Se } from "./ownerDocument-CUrv0DIK.js";
13
- function ce(e) {
14
- var n, s, t = "";
15
- if (typeof e == "string" || typeof e == "number") t += e;
16
- else if (typeof e == "object") if (Array.isArray(e)) for (n = 0; n < e.length; n++) e[n] && (s = ce(e[n])) && (t && (t += " "), t += s);
17
- else for (n in e) e[n] && (t && (t += " "), t += n);
18
- return t;
19
- }
20
- function le() {
21
- for (var e, n, s = 0, t = ""; s < arguments.length; ) (e = arguments[s++]) && (n = ce(e)) && (t && (t += " "), t += n);
22
- return t;
23
- }
5
+ import { c as ie, g as xe, u as Ie, a as Te } from "./useThemeProps-DeftUmqJ.js";
6
+ import { P as n } from "./createStyled-B96gjom1.js";
7
+ import { u as Ee, a as he, e as De } from "./ButtonBase-D6qhsxB0.js";
8
+ import { g as ve, s as W, a as $ } from "./styled-cPJbqF0E.js";
9
+ import { C as ce, u as Ne } from "./Collapse-D_TjnyE5.js";
10
+ import { o as Oe } from "./ownerDocument-CUrv0DIK.js";
24
11
  const z = /* @__PURE__ */ l.createContext({});
25
12
  process.env.NODE_ENV !== "production" && (z.displayName = "TreeViewContext");
26
- function ke(e, n) {
27
- for (let s = 0; s < e.length; s += 1)
28
- if (n(e[s]))
29
- return s;
13
+ function Se(e, t) {
14
+ for (let o = 0; o < e.length; o += 1)
15
+ if (t(e[o]))
16
+ return o;
30
17
  return -1;
31
18
  }
32
- function we(e, n) {
33
- let s = 0, t = e.length - 1;
34
- for (; s <= t; ) {
35
- const r = Math.floor((s + t) / 2);
36
- if (e[r].element === n)
37
- return r;
38
- e[r].element.compareDocumentPosition(n) & Node.DOCUMENT_POSITION_PRECEDING ? t = r - 1 : s = r + 1;
19
+ function ke(e, t) {
20
+ let o = 0, s = e.length - 1;
21
+ for (; o <= s; ) {
22
+ const a = Math.floor((o + s) / 2);
23
+ if (e[a].element === t)
24
+ return a;
25
+ e[a].element.compareDocumentPosition(t) & Node.DOCUMENT_POSITION_PRECEDING ? s = a - 1 : o = a + 1;
39
26
  }
40
- return s;
27
+ return o;
41
28
  }
42
29
  const J = /* @__PURE__ */ l.createContext({});
43
30
  process.env.NODE_ENV !== "production" && (J.displayName = "DescendantContext");
44
- function Re(e) {
45
- const n = l.useRef(null);
31
+ function we(e) {
32
+ const t = l.useRef(null);
46
33
  return l.useEffect(() => {
47
- n.current = e;
48
- }, [e]), n.current;
34
+ t.current = e;
35
+ }, [e]), t.current;
49
36
  }
50
- const re = () => {
37
+ const ae = () => {
51
38
  };
52
- function $e(e) {
53
- const [, n] = l.useState(), {
54
- registerDescendant: s = re,
55
- unregisterDescendant: t = re,
56
- descendants: r = [],
57
- parentId: g = null
58
- } = l.useContext(J), f = ke(r, (p) => p.element === e.element), m = Re(r), d = r.some((p, c) => m && m[c] && m[c].element !== p.element);
59
- return Ie(() => {
39
+ function Re(e) {
40
+ const [, t] = l.useState(), {
41
+ registerDescendant: o = ae,
42
+ unregisterDescendant: s = ae,
43
+ descendants: a = [],
44
+ parentId: b = null
45
+ } = l.useContext(J), f = Se(a, (p) => p.element === e.element), m = we(a), d = a.some((p, c) => m && m[c] && m[c].element !== p.element);
46
+ return Ee(() => {
60
47
  if (e.element)
61
- return s({
48
+ return o({
62
49
  ...e,
63
50
  index: f
64
51
  }), () => {
65
- t(e.element);
52
+ s(e.element);
66
53
  };
67
- n({});
68
- }, [s, t, f, d, e]), {
69
- parentId: g,
54
+ t({});
55
+ }, [o, s, f, d, e]), {
56
+ parentId: b,
70
57
  index: f
71
58
  };
72
59
  }
73
- function de(e) {
60
+ function le(e) {
74
61
  const {
75
- children: n,
76
- id: s
77
- } = e, [t, r] = l.useState([]), g = l.useCallback(({
62
+ children: t,
63
+ id: o
64
+ } = e, [s, a] = l.useState([]), b = l.useCallback(({
78
65
  element: d,
79
66
  ...p
80
67
  }) => {
81
- r((c) => {
68
+ a((c) => {
82
69
  let u;
83
70
  if (c.length === 0)
84
71
  return [{
@@ -86,78 +73,78 @@ function de(e) {
86
73
  element: d,
87
74
  index: 0
88
75
  }];
89
- const C = we(c, d);
76
+ const C = ke(c, d);
90
77
  if (c[C] && c[C].element === d)
91
78
  u = c;
92
79
  else {
93
- const b = {
80
+ const g = {
94
81
  ...p,
95
82
  element: d,
96
83
  index: C
97
84
  };
98
- u = c.slice(), u.splice(C, 0, b);
85
+ u = c.slice(), u.splice(C, 0, g);
99
86
  }
100
- return u.forEach((b, y) => {
101
- b.index = y;
87
+ return u.forEach((g, y) => {
88
+ g.index = y;
102
89
  }), u;
103
90
  });
104
91
  }, []), f = l.useCallback((d) => {
105
- r((p) => p.filter((c) => d !== c.element));
92
+ a((p) => p.filter((c) => d !== c.element));
106
93
  }, []), m = l.useMemo(() => ({
107
- descendants: t,
108
- registerDescendant: g,
94
+ descendants: s,
95
+ registerDescendant: b,
109
96
  unregisterDescendant: f,
110
- parentId: s
111
- }), [t, g, f, s]);
97
+ parentId: o
98
+ }), [s, b, f, o]);
112
99
  return /* @__PURE__ */ T(J.Provider, {
113
100
  value: m,
114
- children: n
101
+ children: t
115
102
  });
116
103
  }
117
- process.env.NODE_ENV !== "production" && (de.propTypes = {
118
- children: o.node,
119
- id: o.string
104
+ process.env.NODE_ENV !== "production" && (le.propTypes = {
105
+ children: n.node,
106
+ id: n.string
120
107
  });
121
- function Me(e) {
108
+ function $e(e) {
122
109
  const {
123
- focus: n,
124
- isExpanded: s,
125
- isExpandable: t,
126
- isFocused: r,
127
- isDisabled: g,
110
+ focus: t,
111
+ isExpanded: o,
112
+ isExpandable: s,
113
+ isFocused: a,
114
+ isDisabled: b,
128
115
  isSelected: f,
129
116
  multiSelect: m,
130
117
  selectNode: d,
131
118
  selectRange: p,
132
119
  toggleExpansion: c
133
- } = l.useContext(z), u = t ? t(e) : !1, C = s ? s(e) : !1, b = r ? r(e) : !1, y = g ? g(e) : !1, i = f ? f(e) : !1;
120
+ } = l.useContext(z), u = s ? s(e) : !1, C = o ? o(e) : !1, g = a ? a(e) : !1, y = b ? b(e) : !1, i = f ? f(e) : !1;
134
121
  return {
135
122
  disabled: y,
136
123
  expanded: C,
137
124
  selected: i,
138
- focused: b,
139
- handleExpansion: (a) => {
125
+ focused: g,
126
+ handleExpansion: (r) => {
140
127
  if (!y) {
141
- b || n(a, e);
142
- const v = m && (a.shiftKey || a.ctrlKey || a.metaKey);
143
- u && !(v && s(e)) && c(a, e);
128
+ g || t(r, e);
129
+ const D = m && (r.shiftKey || r.ctrlKey || r.metaKey);
130
+ u && !(D && o(e)) && c(r, e);
144
131
  }
145
132
  },
146
- handleSelection: (a) => {
147
- y || (b || n(a, e), m && (a.shiftKey || a.ctrlKey || a.metaKey) ? a.shiftKey ? p(a, {
133
+ handleSelection: (r) => {
134
+ y || (g || t(r, e), m && (r.shiftKey || r.ctrlKey || r.metaKey) ? r.shiftKey ? p(r, {
148
135
  end: e
149
- }) : d(a, e, !0) : d(a, e));
136
+ }) : d(r, e, !0) : d(r, e));
150
137
  },
151
- preventSelection: (a) => {
152
- (a.shiftKey || a.ctrlKey || a.metaKey || y) && a.preventDefault();
138
+ preventSelection: (r) => {
139
+ (r.shiftKey || r.ctrlKey || r.metaKey || y) && r.preventDefault();
153
140
  }
154
141
  };
155
142
  }
156
- const Q = /* @__PURE__ */ l.forwardRef(function(n, s) {
143
+ const Q = /* @__PURE__ */ l.forwardRef(function(t, o) {
157
144
  const {
158
- classes: t,
159
- className: r,
160
- displayIcon: g,
145
+ classes: s,
146
+ className: a,
147
+ displayIcon: b,
161
148
  expansionIcon: f,
162
149
  icon: m,
163
150
  label: d,
@@ -165,32 +152,32 @@ const Q = /* @__PURE__ */ l.forwardRef(function(n, s) {
165
152
  onClick: c,
166
153
  onMouseDown: u,
167
154
  ...C
168
- } = n, {
169
- disabled: b,
155
+ } = t, {
156
+ disabled: g,
170
157
  expanded: y,
171
158
  selected: i,
172
159
  focused: S,
173
160
  handleExpansion: k,
174
161
  handleSelection: w,
175
- preventSelection: a
176
- } = Me(p), v = m || f || g, D = (x) => {
177
- a(x), u && u(x);
162
+ preventSelection: r
163
+ } = $e(p), D = m || f || b, v = (x) => {
164
+ r(x), u && u(x);
178
165
  }, M = (x) => {
179
166
  k(x), w(x), c && c(x);
180
167
  };
181
168
  return (
182
169
  /* eslint-disable-next-line jsx-a11y/click-events-have-key-events,jsx-a11y/no-static-element-interactions -- Key event is handled by the TreeView */
183
- /* @__PURE__ */ ae("div", {
184
- className: le(r, t.root, y && t.expanded, i && t.selected, S && t.focused, b && t.disabled),
170
+ /* @__PURE__ */ re("div", {
171
+ className: ie(a, s.root, y && s.expanded, i && s.selected, S && s.focused, g && s.disabled),
185
172
  onClick: M,
186
- onMouseDown: D,
187
- ref: s,
173
+ onMouseDown: v,
174
+ ref: o,
188
175
  ...C,
189
176
  children: [/* @__PURE__ */ T("div", {
190
- className: t.iconContainer,
191
- children: v
177
+ className: s.iconContainer,
178
+ children: D
192
179
  }), /* @__PURE__ */ T("div", {
193
- className: t.label,
180
+ className: s.label,
194
181
  children: d
195
182
  })]
196
183
  })
@@ -205,48 +192,48 @@ process.env.NODE_ENV !== "production" && (Q.propTypes = {
205
192
  * Override or extend the styles applied to the component.
206
193
  * See [CSS API](#css) below for more details.
207
194
  */
208
- classes: o.object,
195
+ classes: n.object,
209
196
  /**
210
197
  * className applied to the root element.
211
198
  */
212
- className: o.string,
199
+ className: n.string,
213
200
  /**
214
201
  * The icon to display next to the tree node's label. Either a parent or end icon.
215
202
  */
216
- displayIcon: o.node,
203
+ displayIcon: n.node,
217
204
  /**
218
205
  * The icon to display next to the tree node's label. Either an expansion or collapse icon.
219
206
  */
220
- expansionIcon: o.node,
207
+ expansionIcon: n.node,
221
208
  /**
222
209
  * The icon to display next to the tree node's label.
223
210
  */
224
- icon: o.node,
211
+ icon: n.node,
225
212
  /**
226
213
  * The tree node label.
227
214
  */
228
- label: o.node,
215
+ label: n.node,
229
216
  /**
230
217
  * The id of the node.
231
218
  */
232
- nodeId: o.string.isRequired,
219
+ nodeId: n.string.isRequired,
233
220
  /**
234
221
  * @ignore
235
222
  */
236
- onClick: o.func,
223
+ onClick: n.func,
237
224
  /**
238
225
  * @ignore
239
226
  */
240
- onMouseDown: o.func
227
+ onMouseDown: n.func
241
228
  });
242
- function Pe(e) {
243
- return De("MuiTreeItem", e);
229
+ function Me(e) {
230
+ return ve("MuiTreeItem", e);
244
231
  }
245
- const E = Ee("MuiTreeItem", ["root", "group", "content", "expanded", "selected", "focused", "disabled", "iconContainer", "label"]), je = (e) => {
232
+ const h = xe("MuiTreeItem", ["root", "group", "content", "expanded", "selected", "focused", "disabled", "iconContainer", "label"]), Pe = (e) => {
246
233
  const {
247
- classes: n
234
+ classes: t
248
235
  } = e;
249
- return ve({
236
+ return Te({
250
237
  root: ["root"],
251
238
  content: ["content"],
252
239
  expanded: ["expanded"],
@@ -256,23 +243,23 @@ const E = Ee("MuiTreeItem", ["root", "group", "content", "expanded", "selected",
256
243
  iconContainer: ["iconContainer"],
257
244
  label: ["label"],
258
245
  group: ["group"]
259
- }, Pe, n);
246
+ }, Me, t);
260
247
  }, Fe = W("li", {
261
248
  name: "MuiTreeItem",
262
249
  slot: "Root",
263
- overridesResolver: (e, n) => n.root
250
+ overridesResolver: (e, t) => t.root
264
251
  })({
265
252
  listStyle: "none",
266
253
  margin: 0,
267
254
  padding: 0,
268
255
  outline: 0
269
- }), Ke = W(Q, {
256
+ }), je = W(Q, {
270
257
  name: "MuiTreeItem",
271
258
  slot: "Content",
272
- overridesResolver: (e, n) => [n.content, n.iconContainer && {
273
- [`& .${E.iconContainer}`]: n.iconContainer
274
- }, n.label && {
275
- [`& .${E.label}`]: n.label
259
+ overridesResolver: (e, t) => [t.content, t.iconContainer && {
260
+ [`& .${h.iconContainer}`]: t.iconContainer
261
+ }, t.label && {
262
+ [`& .${h.label}`]: t.label
276
263
  }]
277
264
  })(({
278
265
  theme: e
@@ -290,14 +277,14 @@ const E = Ee("MuiTreeItem", ["root", "group", "content", "expanded", "selected",
290
277
  backgroundColor: "transparent"
291
278
  }
292
279
  },
293
- [`&.${E.disabled}`]: {
280
+ [`&.${h.disabled}`]: {
294
281
  opacity: (e.vars || e).palette.action.disabledOpacity,
295
282
  backgroundColor: "transparent"
296
283
  },
297
- [`&.${E.focused}`]: {
284
+ [`&.${h.focused}`]: {
298
285
  backgroundColor: (e.vars || e).palette.action.focus
299
286
  },
300
- [`&.${E.selected}`]: {
287
+ [`&.${h.selected}`]: {
301
288
  backgroundColor: e.vars ? `rgba(${e.vars.palette.primary.mainChannel} / ${e.vars.palette.action.selectedOpacity})` : $(e.palette.primary.main, e.palette.action.selectedOpacity),
302
289
  "&:hover": {
303
290
  backgroundColor: e.vars ? `rgba(${e.vars.palette.primary.mainChannel} / calc(${e.vars.palette.action.selectedOpacity} + ${e.vars.palette.action.hoverOpacity}))` : $(e.palette.primary.main, e.palette.action.selectedOpacity + e.palette.action.hoverOpacity),
@@ -306,11 +293,11 @@ const E = Ee("MuiTreeItem", ["root", "group", "content", "expanded", "selected",
306
293
  backgroundColor: e.vars ? `rgba(${e.vars.palette.primary.mainChannel} / ${e.vars.palette.action.selectedOpacity})` : $(e.palette.primary.main, e.palette.action.selectedOpacity)
307
294
  }
308
295
  },
309
- [`&.${E.focused}`]: {
296
+ [`&.${h.focused}`]: {
310
297
  backgroundColor: e.vars ? `rgba(${e.vars.palette.primary.mainChannel} / calc(${e.vars.palette.action.selectedOpacity} + ${e.vars.palette.action.focusOpacity}))` : $(e.palette.primary.main, e.palette.action.selectedOpacity + e.palette.action.focusOpacity)
311
298
  }
312
299
  },
313
- [`& .${E.iconContainer}`]: {
300
+ [`& .${h.iconContainer}`]: {
314
301
  marginRight: 4,
315
302
  width: 15,
316
303
  display: "flex",
@@ -320,7 +307,7 @@ const E = Ee("MuiTreeItem", ["root", "group", "content", "expanded", "selected",
320
307
  fontSize: 18
321
308
  }
322
309
  },
323
- [`& .${E.label}`]: {
310
+ [`& .${h.label}`]: {
324
311
  width: "100%",
325
312
  // fixes overflow - see https://github.com/mui/material-ui/issues/27372
326
313
  minWidth: 0,
@@ -328,21 +315,21 @@ const E = Ee("MuiTreeItem", ["root", "group", "content", "expanded", "selected",
328
315
  position: "relative",
329
316
  ...e.typography.body1
330
317
  }
331
- })), _e = W(ie, {
318
+ })), Ke = W(ce, {
332
319
  name: "MuiTreeItem",
333
320
  slot: "Group",
334
- overridesResolver: (e, n) => n.group
321
+ overridesResolver: (e, t) => t.group
335
322
  })({
336
323
  margin: 0,
337
324
  padding: 0,
338
325
  marginLeft: 17
339
- }), pe = /* @__PURE__ */ l.forwardRef(function(n, s) {
340
- const t = Ne({
341
- props: n,
326
+ }), de = /* @__PURE__ */ l.forwardRef(function(t, o) {
327
+ const s = Ie({
328
+ props: t,
342
329
  name: "MuiTreeItem"
343
330
  }), {
344
- children: r,
345
- className: g,
331
+ children: a,
332
+ className: b,
346
333
  collapseIcon: f,
347
334
  ContentComponent: m = Q,
348
335
  ContentProps: d,
@@ -350,48 +337,48 @@ const E = Ee("MuiTreeItem", ["root", "group", "content", "expanded", "selected",
350
337
  expandIcon: c,
351
338
  disabled: u,
352
339
  icon: C,
353
- id: b,
340
+ id: g,
354
341
  label: y,
355
342
  nodeId: i,
356
343
  onClick: S,
357
344
  onMouseDown: k,
358
- TransitionComponent: w = ie,
359
- TransitionProps: a,
360
- ...v
361
- } = t, {
362
- icons: D = {},
345
+ TransitionComponent: w = ce,
346
+ TransitionProps: r,
347
+ ...D
348
+ } = s, {
349
+ icons: v = {},
363
350
  focus: M,
364
351
  isExpanded: x,
365
352
  isFocused: X,
366
353
  isSelected: Y,
367
354
  isDisabled: Z,
368
- multiSelect: ue,
369
- disabledItemsFocusable: fe,
355
+ multiSelect: pe,
356
+ disabledItemsFocusable: ue,
370
357
  mapFirstChar: P,
371
- unMapFirstChar: j,
372
- registerNode: F,
358
+ unMapFirstChar: F,
359
+ registerNode: j,
373
360
  unregisterNode: K,
374
361
  treeId: _
375
362
  } = l.useContext(z);
376
363
  let N = null;
377
- b != null ? N = b : _ && i && (N = `${_}-${i}`);
378
- const [ee, me] = l.useState(null), ne = l.useRef(null), ge = Te(me, s), be = l.useMemo(() => ({
364
+ g != null ? N = g : _ && i && (N = `${_}-${i}`);
365
+ const [ee, fe] = l.useState(null), ne = l.useRef(null), me = he(fe, o), be = l.useMemo(() => ({
379
366
  element: ee,
380
367
  id: i
381
368
  }), [i, ee]), {
382
369
  index: V,
383
370
  parentId: te
384
- } = $e(be), O = !!(Array.isArray(r) ? r.length : r), R = x ? x(i) : !1, oe = X ? X(i) : !1, A = Y ? Y(i) : !1, U = Z ? Z(i) : !1, L = {
385
- ...t,
371
+ } = Re(be), O = !!(Array.isArray(a) ? a.length : a), R = x ? x(i) : !1, oe = X ? X(i) : !1, U = Y ? Y(i) : !1, A = Z ? Z(i) : !1, L = {
372
+ ...s,
386
373
  expanded: R,
387
374
  focused: oe,
388
- selected: A,
389
- disabled: U
390
- }, I = je(L);
375
+ selected: U,
376
+ disabled: A
377
+ }, I = Pe(L);
391
378
  let G, q;
392
- O && (R ? q = f || D.defaultCollapseIcon : q = c || D.defaultExpandIcon), O ? G = D.defaultParentIcon : G = p || D.defaultEndIcon, l.useEffect(() => {
393
- if (F && K && V !== -1)
394
- return F({
379
+ O && (R ? q = f || v.defaultCollapseIcon : q = c || v.defaultExpandIcon), O ? G = v.defaultParentIcon : G = p || v.defaultEndIcon, l.useEffect(() => {
380
+ if (j && K && V !== -1)
381
+ return j({
395
382
  id: i,
396
383
  idAttribute: N,
397
384
  index: V,
@@ -401,37 +388,37 @@ const E = Ee("MuiTreeItem", ["root", "group", "content", "expanded", "selected",
401
388
  }), () => {
402
389
  K(i);
403
390
  };
404
- }, [F, K, te, V, i, O, u, N]), l.useEffect(() => {
405
- if (P && j && y)
391
+ }, [j, K, te, V, i, O, u, N]), l.useEffect(() => {
392
+ if (P && F && y)
406
393
  return P(i, ne.current.textContent.substring(0, 1).toLowerCase()), () => {
407
- j(i);
394
+ F(i);
408
395
  };
409
- }, [P, j, i, y]);
396
+ }, [P, F, i, y]);
410
397
  let B;
411
- ue ? B = A : A && (B = !0);
412
- function Ce(h) {
413
- if (h.target === h.currentTarget) {
398
+ pe ? B = U : U && (B = !0);
399
+ function ge(E) {
400
+ if (E.target === E.currentTarget) {
414
401
  let H;
415
- typeof h.target.getRootNode == "function" ? H = h.target.getRootNode() : H = Se(h.target), H.getElementById(_).focus({
402
+ typeof E.target.getRootNode == "function" ? H = E.target.getRootNode() : H = Oe(E.target), H.getElementById(_).focus({
416
403
  preventScroll: !0
417
404
  });
418
405
  }
419
- const ye = !fe && U;
420
- !oe && h.currentTarget === h.target && !ye && M(h, i);
406
+ const Ce = !ue && A;
407
+ !oe && E.currentTarget === E.target && !Ce && M(E, i);
421
408
  }
422
- return /* @__PURE__ */ ae(Fe, {
423
- className: le(I.root, g),
409
+ return /* @__PURE__ */ re(Fe, {
410
+ className: ie(I.root, b),
424
411
  role: "treeitem",
425
412
  "aria-expanded": O ? R : null,
426
413
  "aria-selected": B,
427
- "aria-disabled": U || null,
428
- ref: ge,
414
+ "aria-disabled": A || null,
415
+ ref: me,
429
416
  id: N,
430
417
  tabIndex: -1,
431
- ...v,
418
+ ...D,
432
419
  ownerState: L,
433
- onFocus: Ce,
434
- children: [/* @__PURE__ */ T(Ke, {
420
+ onFocus: ge,
421
+ children: [/* @__PURE__ */ T(je, {
435
422
  as: m,
436
423
  ref: ne,
437
424
  classes: {
@@ -452,22 +439,22 @@ const E = Ee("MuiTreeItem", ["root", "group", "content", "expanded", "selected",
452
439
  displayIcon: G,
453
440
  ownerState: L,
454
441
  ...d
455
- }), r && /* @__PURE__ */ T(de, {
442
+ }), a && /* @__PURE__ */ T(le, {
456
443
  id: i,
457
- children: /* @__PURE__ */ T(_e, {
444
+ children: /* @__PURE__ */ T(Ke, {
458
445
  as: w,
459
446
  unmountOnExit: !0,
460
447
  className: I.group,
461
448
  in: R,
462
449
  component: "ul",
463
450
  role: "group",
464
- ...a,
465
- children: r
451
+ ...r,
452
+ children: a
466
453
  })
467
454
  })]
468
455
  });
469
456
  });
470
- process.env.NODE_ENV !== "production" && (pe.propTypes = {
457
+ process.env.NODE_ENV !== "production" && (de.propTypes = {
471
458
  // ----------------------------- Warning --------------------------------
472
459
  // | These PropTypes are generated from the TypeScript type definitions |
473
460
  // | To update them edit the d.ts file and run "yarn proptypes" |
@@ -475,122 +462,122 @@ process.env.NODE_ENV !== "production" && (pe.propTypes = {
475
462
  /**
476
463
  * The content of the component.
477
464
  */
478
- children: o.node,
465
+ children: n.node,
479
466
  /**
480
467
  * Override or extend the styles applied to the component.
481
468
  */
482
- classes: o.object,
469
+ classes: n.object,
483
470
  /**
484
471
  * @ignore
485
472
  */
486
- className: o.string,
473
+ className: n.string,
487
474
  /**
488
475
  * The icon used to collapse the node.
489
476
  */
490
- collapseIcon: o.node,
477
+ collapseIcon: n.node,
491
478
  /**
492
479
  * The component used for the content node.
493
480
  * @default TreeItemContent
494
481
  */
495
- ContentComponent: he,
482
+ ContentComponent: De,
496
483
  /**
497
484
  * Props applied to ContentComponent
498
485
  */
499
- ContentProps: o.object,
486
+ ContentProps: n.object,
500
487
  /**
501
488
  * If `true`, the node is disabled.
502
489
  * @default false
503
490
  */
504
- disabled: o.bool,
491
+ disabled: n.bool,
505
492
  /**
506
493
  * The icon displayed next to a end node.
507
494
  */
508
- endIcon: o.node,
495
+ endIcon: n.node,
509
496
  /**
510
497
  * The icon used to expand the node.
511
498
  */
512
- expandIcon: o.node,
499
+ expandIcon: n.node,
513
500
  /**
514
501
  * The icon to display next to the tree node's label.
515
502
  */
516
- icon: o.node,
503
+ icon: n.node,
517
504
  /**
518
505
  * @ignore
519
506
  */
520
- id: o.string,
507
+ id: n.string,
521
508
  /**
522
509
  * The tree node label.
523
510
  */
524
- label: o.node,
511
+ label: n.node,
525
512
  /**
526
513
  * The id of the node.
527
514
  */
528
- nodeId: o.string.isRequired,
515
+ nodeId: n.string.isRequired,
529
516
  /**
530
517
  * @ignore
531
518
  */
532
- onClick: o.func,
519
+ onClick: n.func,
533
520
  /**
534
521
  * This prop isn't supported.
535
522
  * Use the `onNodeFocus` callback on the tree if you need to monitor a node's focus.
536
523
  */
537
- onFocus: Oe,
524
+ onFocus: Ne,
538
525
  /**
539
526
  * @ignore
540
527
  */
541
- onMouseDown: o.func,
528
+ onMouseDown: n.func,
542
529
  /**
543
530
  * The system prop that allows defining system overrides as well as additional CSS styles.
544
531
  */
545
- sx: o.oneOfType([o.arrayOf(o.oneOfType([o.func, o.object, o.bool])), o.func, o.object]),
532
+ sx: n.oneOfType([n.arrayOf(n.oneOfType([n.func, n.object, n.bool])), n.func, n.object]),
546
533
  /**
547
534
  * The component used for the transition.
548
535
  * [Follow this guide](/material-ui/transitions/#transitioncomponent-prop) to learn more about the requirements for this component.
549
536
  * @default Collapse
550
537
  */
551
- TransitionComponent: o.elementType,
538
+ TransitionComponent: n.elementType,
552
539
  /**
553
540
  * Props applied to the transition element.
554
541
  * By default, the element is based on this [`Transition`](http://reactcommunity.org/react-transition-group/transition/) component.
555
542
  */
556
- TransitionProps: o.object
543
+ TransitionProps: n.object
557
544
  });
558
- function Ve({
545
+ function _e({
559
546
  id: e,
560
- idKey: n,
561
- name: s,
562
- checked: t,
563
- disabled: r,
564
- disabledIds: g,
547
+ idKey: t,
548
+ name: o,
549
+ checked: s,
550
+ disabled: a,
551
+ disabledIds: b,
565
552
  onChange: f,
566
553
  children: m,
567
554
  defaultSelected: d
568
555
  }) {
569
556
  return /* @__PURE__ */ T(
570
- pe,
557
+ de,
571
558
  {
572
559
  nodeId: String(e),
573
560
  label: /* @__PURE__ */ T(
574
- xe,
561
+ ye,
575
562
  {
576
563
  id: e,
577
- name: s,
578
- checked: t,
579
- disabled: r,
564
+ name: o,
565
+ checked: s,
566
+ disabled: a,
580
567
  onChange: f
581
568
  }
582
569
  ),
583
570
  children: m && m.map((p, c) => {
584
- const u = String(p[n]), C = se.includes(d, u), b = se.includes(g, u);
571
+ const u = String(p[t]), C = se.includes(d, u), g = se.includes(b, u);
585
572
  return /* @__PURE__ */ T(
586
- Ve,
573
+ _e,
587
574
  {
588
575
  id: u,
589
- idKey: n,
576
+ idKey: t,
590
577
  name: p.name,
591
578
  checked: C,
592
- disabled: b,
593
- disabledIds: g,
579
+ disabled: g,
580
+ disabledIds: b,
594
581
  children: p.children,
595
582
  onChange: f,
596
583
  defaultSelected: d
@@ -602,8 +589,7 @@ function Ve({
602
589
  );
603
590
  }
604
591
  export {
605
- de as D,
606
- Ve as I,
607
- z as T,
608
- le as c
592
+ le as D,
593
+ _e as I,
594
+ z as T
609
595
  };