@hybridcore/ui 1.3.2 → 1.3.4

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