@cgi-learning-hub/ui 1.4.0-dev.1742214247 → 1.4.0-dev.1742227742

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 (39) hide show
  1. package/dist/CustomTreeItem-DBgMgvLx.cjs +3 -0
  2. package/dist/CustomTreeItem-ca-TgHSV.js +1329 -0
  3. package/dist/Folder-DXybV_jP.js +8 -0
  4. package/dist/Folder-DiQqYwXI.cjs +1 -0
  5. package/dist/MoreVert-CxgmXooO.cjs +1 -0
  6. package/dist/MoreVert-rsN-POLa.js +8 -0
  7. package/dist/components/FolderCard/FolderCard.cjs.js +1 -0
  8. package/dist/components/FolderCard/FolderCard.d.ts +10 -0
  9. package/dist/components/FolderCard/FolderCard.es.js +78 -0
  10. package/dist/components/FolderCard/index.cjs.js +1 -0
  11. package/dist/components/FolderCard/index.d.ts +2 -0
  12. package/dist/components/FolderCard/index.es.js +4 -0
  13. package/dist/components/FolderCard/styles.cjs.js +1 -0
  14. package/dist/components/FolderCard/styles.d.ts +10 -0
  15. package/dist/components/FolderCard/styles.es.js +13 -0
  16. package/dist/components/FolderCard/types.cjs.js +1 -0
  17. package/dist/components/FolderCard/types.d.ts +11 -0
  18. package/dist/components/FolderCard/types.es.js +14 -0
  19. package/dist/components/ResourceCard/ResourceCard.cjs.js +1 -1
  20. package/dist/components/ResourceCard/ResourceCard.es.js +16 -18
  21. package/dist/components/TreeView/TreeView.cjs.js +4 -4
  22. package/dist/components/TreeView/TreeView.es.js +21 -22
  23. package/dist/components/TreeView/components/CustomTreeItem.cjs.js +1 -1
  24. package/dist/components/TreeView/components/CustomTreeItem.es.js +1 -1
  25. package/dist/components/TreeView/utils.cjs.js +1 -1
  26. package/dist/components/TreeView/utils.es.js +26 -27
  27. package/dist/components/index.cjs.js +1 -1
  28. package/dist/components/index.d.ts +2 -0
  29. package/dist/components/index.es.js +266 -260
  30. package/dist/components/stories/FolderCard.stories.cjs.js +1 -0
  31. package/dist/components/stories/FolderCard.stories.d.ts +7 -0
  32. package/dist/components/stories/FolderCard.stories.es.js +71 -0
  33. package/dist/index.cjs.js +1 -1
  34. package/dist/index.es.js +266 -260
  35. package/package.json +1 -1
  36. package/dist/Collapse-Bvxtq7n-.cjs +0 -1
  37. package/dist/Collapse-CcMCOZ3q.js +0 -334
  38. package/dist/CustomTreeItem-CG7mGHC9.cjs +0 -3
  39. package/dist/CustomTreeItem-PTf-e74x.js +0 -1003
@@ -0,0 +1,1329 @@
1
+ import { jsx as x, jsxs as ie } from "react/jsx-runtime";
2
+ import { c as ae } from "./createSvgIcon-B62eln-G.js";
3
+ import { B as ze } from "./Box-GMNejc_m.js";
4
+ import { _ as g } from "./ButtonBase-CU1npQuI.js";
5
+ import * as R from "react";
6
+ import { w as Be } from "./warning-C8W811fV.js";
7
+ import { u as ce } from "./useForkRef-C_4o__cU.js";
8
+ import { e as B, r as be } from "./resolveComponentProps-CIdMNno4.js";
9
+ import { treeContentStyle as Ke, arrowContainerStyle as Fe, expandedGroupStyle as je } from "./components/TreeView/style.es.js";
10
+ import { getIconComponent as qe } from "./components/TreeView/utils.es.js";
11
+ import { G as xe, H as Ce, x as Ue, I as Te, P as i, n as oe } from "./generateUtilityClasses-EXBFO7eY.js";
12
+ import { a as we } from "./TransitionGroupContext-DbLioz_6.js";
13
+ import { u as _e } from "./useThemeProps-v-SfXuGn.js";
14
+ import { u as We, s as A, c as ve, f as le } from "./DefaultPropsProvider-CQixa6JQ.js";
15
+ import { u as Ge } from "./useTheme-Czi7oO55.js";
16
+ import { m as Xe } from "./memoTheme-DJWQ754x.js";
17
+ import { T as Ye, g as Ie } from "./utils-B2jSugkj.js";
18
+ import { u as Je } from "./useTimeout-CrCYVizI.js";
19
+ import { e as Qe } from "./elementTypeAcceptingRef-B04tk6ag.js";
20
+ import { C as Ze } from "./Checkbox-CtRSDqOe.js";
21
+ import { u as He } from "./unsupportedProp-BuVD30Gh.js";
22
+ import { u as K } from "./useSlotProps-U2Iu6E0j.js";
23
+ function et(e) {
24
+ return Ce("MuiCollapse", e);
25
+ }
26
+ const Xt = xe("MuiCollapse", ["root", "horizontal", "vertical", "entered", "hidden", "wrapper", "wrapperInner"]), tt = (e) => {
27
+ const {
28
+ orientation: t,
29
+ classes: o
30
+ } = e, s = {
31
+ root: ["root", `${t}`],
32
+ entered: ["entered"],
33
+ hidden: ["hidden"],
34
+ wrapper: ["wrapper", `${t}`],
35
+ wrapperInner: ["wrapperInner", `${t}`]
36
+ };
37
+ return ve(s, et, o);
38
+ }, ot = A("div", {
39
+ name: "MuiCollapse",
40
+ slot: "Root",
41
+ overridesResolver: (e, t) => {
42
+ const {
43
+ ownerState: o
44
+ } = e;
45
+ return [t.root, t[o.orientation], o.state === "entered" && t.entered, o.state === "exited" && !o.in && o.collapsedSize === "0px" && t.hidden];
46
+ }
47
+ })(Xe(({
48
+ theme: e
49
+ }) => ({
50
+ height: 0,
51
+ overflow: "hidden",
52
+ transition: e.transitions.create("height"),
53
+ variants: [{
54
+ props: {
55
+ orientation: "horizontal"
56
+ },
57
+ style: {
58
+ height: "auto",
59
+ width: 0,
60
+ transition: e.transitions.create("width")
61
+ }
62
+ }, {
63
+ props: {
64
+ state: "entered"
65
+ },
66
+ style: {
67
+ height: "auto",
68
+ overflow: "visible"
69
+ }
70
+ }, {
71
+ props: {
72
+ state: "entered",
73
+ orientation: "horizontal"
74
+ },
75
+ style: {
76
+ width: "auto"
77
+ }
78
+ }, {
79
+ props: ({
80
+ ownerState: t
81
+ }) => t.state === "exited" && !t.in && t.collapsedSize === "0px",
82
+ style: {
83
+ visibility: "hidden"
84
+ }
85
+ }]
86
+ }))), nt = A("div", {
87
+ name: "MuiCollapse",
88
+ slot: "Wrapper",
89
+ overridesResolver: (e, t) => t.wrapper
90
+ })({
91
+ // Hack to get children with a negative margin to not falsify the height computation.
92
+ display: "flex",
93
+ width: "100%",
94
+ variants: [{
95
+ props: {
96
+ orientation: "horizontal"
97
+ },
98
+ style: {
99
+ width: "auto",
100
+ height: "100%"
101
+ }
102
+ }]
103
+ }), rt = A("div", {
104
+ name: "MuiCollapse",
105
+ slot: "WrapperInner",
106
+ overridesResolver: (e, t) => t.wrapperInner
107
+ })({
108
+ width: "100%",
109
+ variants: [{
110
+ props: {
111
+ orientation: "horizontal"
112
+ },
113
+ style: {
114
+ width: "auto",
115
+ height: "100%"
116
+ }
117
+ }]
118
+ }), se = /* @__PURE__ */ R.forwardRef(function(t, o) {
119
+ const s = We({
120
+ props: t,
121
+ name: "MuiCollapse"
122
+ }), {
123
+ addEndListener: p,
124
+ children: d,
125
+ className: m,
126
+ collapsedSize: l = "0px",
127
+ component: f,
128
+ easing: c,
129
+ in: h,
130
+ onEnter: b,
131
+ onEntered: C,
132
+ onEntering: r,
133
+ onExit: y,
134
+ onExited: S,
135
+ onExiting: F,
136
+ orientation: X = "vertical",
137
+ style: U,
138
+ timeout: w = Ue.standard,
139
+ // eslint-disable-next-line react/prop-types
140
+ TransitionComponent: E = Ye,
141
+ ...P
142
+ } = s, T = {
143
+ ...s,
144
+ orientation: X,
145
+ collapsedSize: l
146
+ }, O = tt(T), _ = Ge(), Y = Je(), D = R.useRef(null), j = R.useRef(), q = typeof l == "number" ? `${l}px` : l, M = X === "horizontal", $ = M ? "width" : "height", z = R.useRef(null), H = ce(o, z), N = (I) => (k) => {
147
+ if (I) {
148
+ const L = z.current;
149
+ k === void 0 ? I(L) : I(L, k);
150
+ }
151
+ }, W = () => D.current ? D.current[M ? "clientWidth" : "clientHeight"] : 0, J = N((I, k) => {
152
+ D.current && M && (D.current.style.position = "absolute"), I.style[$] = q, b && b(I, k);
153
+ }), ee = N((I, k) => {
154
+ const L = W();
155
+ D.current && M && (D.current.style.position = "");
156
+ const {
157
+ duration: Z,
158
+ easing: a
159
+ } = Ie({
160
+ style: U,
161
+ timeout: w,
162
+ easing: c
163
+ }, {
164
+ mode: "enter"
165
+ });
166
+ if (w === "auto") {
167
+ const n = _.transitions.getAutoHeightDuration(L);
168
+ I.style.transitionDuration = `${n}ms`, j.current = n;
169
+ } else
170
+ I.style.transitionDuration = typeof Z == "string" ? Z : `${Z}ms`;
171
+ I.style[$] = `${L}px`, I.style.transitionTimingFunction = a, r && r(I, k);
172
+ }), Q = N((I, k) => {
173
+ I.style[$] = "auto", C && C(I, k);
174
+ }), re = N((I) => {
175
+ I.style[$] = `${W()}px`, y && y(I);
176
+ }), ue = N(S), me = N((I) => {
177
+ const k = W(), {
178
+ duration: L,
179
+ easing: Z
180
+ } = Ie({
181
+ style: U,
182
+ timeout: w,
183
+ easing: c
184
+ }, {
185
+ mode: "exit"
186
+ });
187
+ if (w === "auto") {
188
+ const a = _.transitions.getAutoHeightDuration(k);
189
+ I.style.transitionDuration = `${a}ms`, j.current = a;
190
+ } else
191
+ I.style.transitionDuration = typeof L == "string" ? L : `${L}ms`;
192
+ I.style[$] = q, I.style.transitionTimingFunction = Z, F && F(I);
193
+ });
194
+ return /* @__PURE__ */ x(E, {
195
+ in: h,
196
+ onEnter: J,
197
+ onEntered: Q,
198
+ onEntering: ee,
199
+ onExit: re,
200
+ onExited: ue,
201
+ onExiting: me,
202
+ addEndListener: (I) => {
203
+ w === "auto" && Y.start(j.current || 0, I), p && p(z.current, I);
204
+ },
205
+ nodeRef: z,
206
+ timeout: w === "auto" ? null : w,
207
+ ...P,
208
+ children: (I, {
209
+ ownerState: k,
210
+ ...L
211
+ }) => /* @__PURE__ */ x(ot, {
212
+ as: f,
213
+ className: Te(O.root, m, {
214
+ entered: O.entered,
215
+ exited: !h && q === "0px" && O.hidden
216
+ }[I]),
217
+ style: {
218
+ [M ? "minWidth" : "minHeight"]: q,
219
+ ...U
220
+ },
221
+ ref: H,
222
+ ownerState: {
223
+ ...T,
224
+ state: I
225
+ },
226
+ ...L,
227
+ children: /* @__PURE__ */ x(nt, {
228
+ ownerState: {
229
+ ...T,
230
+ state: I
231
+ },
232
+ className: O.wrapper,
233
+ ref: D,
234
+ children: /* @__PURE__ */ x(rt, {
235
+ ownerState: {
236
+ ...T,
237
+ state: I
238
+ },
239
+ className: O.wrapperInner,
240
+ children: d
241
+ })
242
+ })
243
+ })
244
+ });
245
+ });
246
+ process.env.NODE_ENV !== "production" && (se.propTypes = {
247
+ // ┌────────────────────────────── Warning ──────────────────────────────┐
248
+ // │ These PropTypes are generated from the TypeScript type definitions. │
249
+ // │ To update them, edit the d.ts file and run `pnpm proptypes`. │
250
+ // └─────────────────────────────────────────────────────────────────────┘
251
+ /**
252
+ * Add a custom transition end trigger. Called with the transitioning DOM
253
+ * node and a done callback. Allows for more fine grained transition end
254
+ * logic. Note: Timeouts are still used as a fallback if provided.
255
+ */
256
+ addEndListener: i.func,
257
+ /**
258
+ * The content node to be collapsed.
259
+ */
260
+ children: i.node,
261
+ /**
262
+ * Override or extend the styles applied to the component.
263
+ */
264
+ classes: i.object,
265
+ /**
266
+ * @ignore
267
+ */
268
+ className: i.string,
269
+ /**
270
+ * The width (horizontal) or height (vertical) of the container when collapsed.
271
+ * @default '0px'
272
+ */
273
+ collapsedSize: i.oneOfType([i.number, i.string]),
274
+ /**
275
+ * The component used for the root node.
276
+ * Either a string to use a HTML element or a component.
277
+ */
278
+ component: Qe,
279
+ /**
280
+ * The transition timing function.
281
+ * You may specify a single easing or a object containing enter and exit values.
282
+ */
283
+ easing: i.oneOfType([i.shape({
284
+ enter: i.string,
285
+ exit: i.string
286
+ }), i.string]),
287
+ /**
288
+ * If `true`, the component will transition in.
289
+ */
290
+ in: i.bool,
291
+ /**
292
+ * @ignore
293
+ */
294
+ onEnter: i.func,
295
+ /**
296
+ * @ignore
297
+ */
298
+ onEntered: i.func,
299
+ /**
300
+ * @ignore
301
+ */
302
+ onEntering: i.func,
303
+ /**
304
+ * @ignore
305
+ */
306
+ onExit: i.func,
307
+ /**
308
+ * @ignore
309
+ */
310
+ onExited: i.func,
311
+ /**
312
+ * @ignore
313
+ */
314
+ onExiting: i.func,
315
+ /**
316
+ * The transition orientation.
317
+ * @default 'vertical'
318
+ */
319
+ orientation: i.oneOf(["horizontal", "vertical"]),
320
+ /**
321
+ * @ignore
322
+ */
323
+ style: i.object,
324
+ /**
325
+ * The system prop that allows defining system overrides as well as additional CSS styles.
326
+ */
327
+ sx: i.oneOfType([i.arrayOf(i.oneOfType([i.func, i.object, i.bool])), i.func, i.object]),
328
+ /**
329
+ * The duration for the transition, in milliseconds.
330
+ * You may specify a single timeout for all transitions, or individually with an object.
331
+ *
332
+ * Set to 'auto' to automatically calculate transition time based on height.
333
+ * @default duration.standard
334
+ */
335
+ timeout: i.oneOfType([i.oneOf(["auto"]), i.number, i.shape({
336
+ appear: i.number,
337
+ enter: i.number,
338
+ exit: i.number
339
+ })])
340
+ });
341
+ se && (se.muiSupportAuto = !0);
342
+ const it = ae(/* @__PURE__ */ x("path", {
343
+ d: "M7.41 8.59 12 13.17l4.59-4.58L18 10l-6 6-6-6z"
344
+ }), "KeyboardArrowDown"), st = ae(/* @__PURE__ */ x("path", {
345
+ d: "M8.59 16.59 13.17 12 8.59 7.41 10 6l6 6-6 6z"
346
+ }), "KeyboardArrowRight");
347
+ function at(e) {
348
+ return _e;
349
+ }
350
+ let he = 0;
351
+ const Yt = () => (he += 1, `mui-tree-view-${he}`), lt = ({
352
+ id: e,
353
+ treeId: t = "",
354
+ itemId: o
355
+ }) => e ?? `${t}-${o}`, Pe = /* @__PURE__ */ R.createContext(null);
356
+ process.env.NODE_ENV !== "production" && (Pe.displayName = "TreeViewContext");
357
+ const ne = () => {
358
+ const e = R.useContext(Pe);
359
+ if (e == null)
360
+ throw new Error(["MUI X: Could not find the Tree View context.", "It looks like you rendered your component outside of a SimpleTreeView or RichTreeView parent component.", "This can also happen if you are bundling multiple versions of the Tree View."].join(`
361
+ `));
362
+ return e;
363
+ }, Ee = /* @__PURE__ */ R.createContext(() => -1);
364
+ process.env.NODE_ENV !== "production" && (Ee.displayName = "TreeViewItemDepthContext");
365
+ const Re = (e, t) => {
366
+ let o = t.length - 1;
367
+ for (; o >= 0 && !e.isItemNavigable(t[o]); )
368
+ o -= 1;
369
+ if (o !== -1)
370
+ return t[o];
371
+ }, dt = (e, t) => {
372
+ const o = e.getItemMeta(t), s = e.getItemOrderedChildrenIds(o.parentId), p = e.getItemIndex(t);
373
+ if (p === 0)
374
+ return o.parentId;
375
+ let d = p - 1;
376
+ for (; !e.isItemNavigable(s[d]) && d >= 0; )
377
+ d -= 1;
378
+ if (d === -1)
379
+ return o.parentId == null ? null : dt(e, o.parentId);
380
+ let m = s[d], l = Re(e, e.getItemOrderedChildrenIds(m));
381
+ for (; e.isItemExpanded(m) && l != null; )
382
+ m = l, l = e.getItemOrderedChildrenIds(m).find(e.isItemNavigable);
383
+ return m;
384
+ }, ct = (e, t) => {
385
+ if (e.isItemExpanded(t)) {
386
+ const s = e.getItemOrderedChildrenIds(t).find(e.isItemNavigable);
387
+ if (s != null)
388
+ return s;
389
+ }
390
+ let o = e.getItemMeta(t);
391
+ for (; o != null; ) {
392
+ const s = e.getItemOrderedChildrenIds(o.parentId), p = e.getItemIndex(o.id);
393
+ if (p < s.length - 1) {
394
+ let d = p + 1;
395
+ for (; !e.isItemNavigable(s[d]) && d < s.length - 1; )
396
+ d += 1;
397
+ if (e.isItemNavigable(s[d]))
398
+ return s[d];
399
+ }
400
+ o = e.getItemMeta(o.parentId);
401
+ }
402
+ return null;
403
+ }, Jt = (e) => {
404
+ let t = null;
405
+ for (; t == null || e.isItemExpanded(t); ) {
406
+ const o = e.getItemOrderedChildrenIds(t), s = Re(e, o);
407
+ if (s == null)
408
+ return t;
409
+ t = s;
410
+ }
411
+ return t;
412
+ }, pt = (e) => e.getItemOrderedChildrenIds(null).find(e.isItemNavigable), ut = (e, t, o) => {
413
+ if (t === o)
414
+ return [t, o];
415
+ const s = e.getItemMeta(t), p = e.getItemMeta(o);
416
+ if (s.parentId === p.id || p.parentId === s.id)
417
+ return p.parentId === s.id ? [s.id, p.id] : [p.id, s.id];
418
+ const d = [s.id], m = [p.id];
419
+ let l = s.parentId, f = p.parentId, c = m.indexOf(l) !== -1, h = d.indexOf(f) !== -1, b = !0, C = !0;
420
+ for (; !h && !c; )
421
+ b && (d.push(l), c = m.indexOf(l) !== -1, b = l !== null, !c && b && (l = e.getItemMeta(l).parentId)), C && !c && (m.push(f), h = d.indexOf(f) !== -1, C = f !== null, !h && C && (f = e.getItemMeta(f).parentId));
422
+ const r = c ? l : f, y = e.getItemOrderedChildrenIds(r), S = d[d.indexOf(r) - 1], F = m[m.indexOf(r) - 1];
423
+ return y.indexOf(S) < y.indexOf(F) ? [t, o] : [o, t];
424
+ }, Qt = (e, t, o) => {
425
+ const s = (f) => {
426
+ if (e.isItemExpandable(f) && e.isItemExpanded(f))
427
+ return e.getItemOrderedChildrenIds(f)[0];
428
+ let c = e.getItemMeta(f);
429
+ for (; c != null; ) {
430
+ const h = e.getItemOrderedChildrenIds(c.parentId), b = e.getItemIndex(c.id);
431
+ if (b < h.length - 1)
432
+ return h[b + 1];
433
+ c = e.getItemMeta(c.parentId);
434
+ }
435
+ throw new Error("Invalid range");
436
+ }, [p, d] = ut(e, t, o), m = [p];
437
+ let l = p;
438
+ for (; l !== d; )
439
+ l = s(l), e.isItemDisabled(l) || m.push(l);
440
+ return m;
441
+ }, Zt = (e) => {
442
+ let t = pt(e);
443
+ const o = [];
444
+ for (; t != null; )
445
+ o.push(t), t = ct(e, t);
446
+ return o;
447
+ }, ye = (e, t) => t !== e.closest('*[role="treeitem"]'), de = (e, t) => e.getAvailablePlugins().has(t), mt = ({
448
+ props: e
449
+ }) => {
450
+ const {
451
+ instance: t
452
+ } = ne(), {
453
+ label: o,
454
+ itemId: s
455
+ } = e, [p, d] = R.useState(o), m = t.isItemBeingEdited(s);
456
+ return R.useEffect(() => {
457
+ m || d(o);
458
+ }, [m, o]), {
459
+ propsEnhancers: {
460
+ labelInput: ({
461
+ externalEventHandlers: l,
462
+ interactions: f
463
+ }) => t.isItemEditable(s) ? {
464
+ value: p ?? "",
465
+ "data-element": "labelInput",
466
+ onChange: (r) => {
467
+ var y;
468
+ (y = l.onChange) == null || y.call(l, r), d(r.target.value);
469
+ },
470
+ onKeyDown: (r) => {
471
+ var S;
472
+ if ((S = l.onKeyDown) == null || S.call(l, r), r.defaultMuiPrevented)
473
+ return;
474
+ const y = r.target;
475
+ r.key === "Enter" && y.value ? f.handleSaveItemLabel(r, y.value) : r.key === "Escape" && f.handleCancelItemLabelEditing(r);
476
+ },
477
+ onBlur: (r) => {
478
+ var y;
479
+ (y = l.onBlur) == null || y.call(l, r), !r.defaultMuiPrevented && r.target.value && f.handleSaveItemLabel(r, r.target.value);
480
+ },
481
+ autoFocus: !0,
482
+ type: "text"
483
+ } : {}
484
+ }
485
+ };
486
+ }, G = ({
487
+ instance: e,
488
+ state: t,
489
+ setState: o,
490
+ params: s
491
+ }) => {
492
+ const p = R.useRef(t.editedItemId), d = (b) => p.current === b, m = (b) => {
493
+ o((C) => g({}, C, {
494
+ editedItemId: b
495
+ })), p.current = b;
496
+ }, l = (b) => b === t.editedItemId, f = !!s.isItemEditable, c = (b) => {
497
+ if (b == null || !f)
498
+ return !1;
499
+ const C = e.getItem(b);
500
+ return C ? typeof s.isItemEditable == "function" ? s.isItemEditable(C) : !!s.isItemEditable : !1;
501
+ }, h = (b, C) => {
502
+ if (!C)
503
+ throw new Error(["MUI X: The Tree View component requires all items to have a `label` property.", "The label of an item cannot be empty.", b].join(`
504
+ `));
505
+ o((r) => {
506
+ const y = r.items.itemMetaMap[b];
507
+ return y.label !== C ? g({}, r, {
508
+ items: g({}, r.items, {
509
+ itemMetaMap: g({}, r.items.itemMetaMap, {
510
+ [b]: g({}, y, {
511
+ label: C
512
+ })
513
+ })
514
+ })
515
+ }) : r;
516
+ }), s.onItemLabelChange && s.onItemLabelChange(b, C);
517
+ };
518
+ return {
519
+ instance: {
520
+ setEditedItemId: m,
521
+ isItemBeingEdited: l,
522
+ updateItemLabel: h,
523
+ isItemEditable: c,
524
+ isTreeViewEditable: f,
525
+ isItemBeingEditedRef: d
526
+ },
527
+ publicAPI: {
528
+ updateItemLabel: h
529
+ }
530
+ };
531
+ };
532
+ G.itemPlugin = mt;
533
+ G.getDefaultizedParams = ({
534
+ params: e,
535
+ experimentalFeatures: t
536
+ }) => {
537
+ const o = t == null ? void 0 : t.labelEditing;
538
+ return process.env.NODE_ENV !== "production" && e.isItemEditable && !o && Be(["MUI X: The label editing feature requires the `labelEditing` experimental feature to be enabled.", "You can do it by passing `experimentalFeatures={{ labelEditing: true}}` to the Rich Tree View Pro component.", "Check the documentation for more details: https://mui.com/x/react-tree-view/rich-tree-view/editing/"]), g({}, e, {
539
+ isItemEditable: o ? e.isItemEditable ?? !1 : !1
540
+ });
541
+ };
542
+ G.getInitialState = () => ({
543
+ editedItemId: null
544
+ });
545
+ G.params = {
546
+ onItemLabelChange: !0,
547
+ isItemEditable: !0
548
+ };
549
+ const gt = A("div", {
550
+ name: "MuiTreeItem2DragAndDropOverlay",
551
+ slot: "Root",
552
+ overridesResolver: (e, t) => t.root,
553
+ shouldForwardProp: (e) => le(e) && e !== "action"
554
+ })(({
555
+ theme: e
556
+ }) => ({
557
+ position: "absolute",
558
+ left: 0,
559
+ display: "flex",
560
+ top: 0,
561
+ bottom: 0,
562
+ right: 0,
563
+ pointerEvents: "none",
564
+ variants: [{
565
+ props: {
566
+ action: "make-child"
567
+ },
568
+ style: {
569
+ marginLeft: "calc(var(--TreeView-indentMultiplier) * var(--TreeView-itemDepth))",
570
+ borderRadius: e.shape.borderRadius,
571
+ backgroundColor: e.vars ? `rgba(${e.vars.palette.primary.darkChannel} / ${e.vars.palette.action.focusOpacity})` : oe(e.palette.primary.dark, e.palette.action.focusOpacity)
572
+ }
573
+ }, {
574
+ props: {
575
+ action: "reorder-above"
576
+ },
577
+ style: {
578
+ marginLeft: "calc(var(--TreeView-indentMultiplier) * var(--TreeView-itemDepth))",
579
+ borderTop: `1px solid ${(e.vars || e).palette.action.active}`
580
+ }
581
+ }, {
582
+ props: {
583
+ action: "reorder-below"
584
+ },
585
+ style: {
586
+ marginLeft: "calc(var(--TreeView-indentMultiplier) * var(--TreeView-itemDepth))",
587
+ borderBottom: `1px solid ${(e.vars || e).palette.action.active}`
588
+ }
589
+ }, {
590
+ props: {
591
+ action: "move-to-parent"
592
+ },
593
+ style: {
594
+ marginLeft: "calc(var(--TreeView-indentMultiplier) * calc(var(--TreeView-itemDepth) - 1))",
595
+ borderBottom: `1px solid ${(e.vars || e).palette.action.active}`
596
+ }
597
+ }]
598
+ }));
599
+ function Se(e) {
600
+ return e.action == null ? null : /* @__PURE__ */ x(gt, g({}, e));
601
+ }
602
+ process.env.NODE_ENV !== "production" && (Se.propTypes = {
603
+ // ----------------------------- Warning --------------------------------
604
+ // | These PropTypes are generated from the TypeScript type definitions |
605
+ // | To update them edit the TypeScript types and run "pnpm proptypes" |
606
+ // ----------------------------------------------------------------------
607
+ action: i.oneOf(["make-child", "move-to-parent", "reorder-above", "reorder-below"]),
608
+ style: i.object
609
+ });
610
+ const ft = A("input", {
611
+ name: "MuiTreeItem2",
612
+ slot: "LabelInput",
613
+ overridesResolver: (e, t) => t.labelInput
614
+ })(({
615
+ theme: e
616
+ }) => g({}, e.typography.body1, {
617
+ width: "100%",
618
+ backgroundColor: e.palette.background.paper,
619
+ borderRadius: e.shape.borderRadius,
620
+ border: "none",
621
+ padding: "0 2px",
622
+ boxSizing: "border-box",
623
+ "&:focus": {
624
+ outline: `1px solid ${e.palette.primary.main}`
625
+ }
626
+ }));
627
+ function bt(e) {
628
+ return Ce("MuiTreeItem", e);
629
+ }
630
+ const Ht = xe("MuiTreeItem", ["root", "groupTransition", "content", "expanded", "selected", "focused", "disabled", "iconContainer", "label", "checkbox", "labelInput", "editable", "editing", "dragAndDropOverlay"]), It = ae(/* @__PURE__ */ x("path", {
631
+ d: "M10 6 8.59 7.41 13.17 12l-4.58 4.59L10 18l6-6z"
632
+ }), "TreeViewExpandIcon"), ht = ae(/* @__PURE__ */ x("path", {
633
+ d: "M16.59 8.59 12 13.17 7.41 8.59 6 10l6 6 6-6z"
634
+ }), "TreeViewCollapseIcon");
635
+ function pe(e) {
636
+ const {
637
+ children: t,
638
+ itemId: o
639
+ } = e, {
640
+ wrapItem: s,
641
+ instance: p
642
+ } = ne();
643
+ return s({
644
+ children: t,
645
+ itemId: o,
646
+ instance: p
647
+ });
648
+ }
649
+ pe.propTypes = {
650
+ // ----------------------------- Warning --------------------------------
651
+ // | These PropTypes are generated from the TypeScript type definitions |
652
+ // | To update them edit the TypeScript types and run "pnpm proptypes" |
653
+ // ----------------------------------------------------------------------
654
+ children: i.node,
655
+ itemId: i.string.isRequired
656
+ };
657
+ const Oe = (e) => Array.isArray(e) ? e.length > 0 && e.some(Oe) : !!e, yt = ({
658
+ itemId: e,
659
+ children: t
660
+ }) => {
661
+ const {
662
+ instance: o,
663
+ selection: {
664
+ multiSelect: s
665
+ },
666
+ publicAPI: p
667
+ } = ne(), d = {
668
+ expandable: Oe(t),
669
+ expanded: o.isItemExpanded(e),
670
+ focused: o.isItemFocused(e),
671
+ selected: o.isItemSelected(e),
672
+ disabled: o.isItemDisabled(e),
673
+ editing: o != null && o.isItemBeingEdited ? o == null ? void 0 : o.isItemBeingEdited(e) : !1,
674
+ editable: o.isItemEditable ? o.isItemEditable(e) : !1
675
+ }, m = (r) => {
676
+ if (d.disabled)
677
+ return;
678
+ d.focused || o.focusItem(r, e);
679
+ const y = s && (r.shiftKey || r.ctrlKey || r.metaKey);
680
+ d.expandable && !(y && o.isItemExpanded(e)) && o.toggleItemExpansion(r, e);
681
+ }, l = (r) => {
682
+ if (d.disabled)
683
+ return;
684
+ d.focused || o.focusItem(r, e), s && (r.shiftKey || r.ctrlKey || r.metaKey) ? r.shiftKey ? o.expandSelectionRange(r, e) : o.selectItem({
685
+ event: r,
686
+ itemId: e,
687
+ keepExistingSelection: !0
688
+ }) : o.selectItem({
689
+ event: r,
690
+ itemId: e,
691
+ shouldBeSelected: !0
692
+ });
693
+ }, f = (r) => {
694
+ const y = r.nativeEvent.shiftKey;
695
+ s && y ? o.expandSelectionRange(r, e) : o.selectItem({
696
+ event: r,
697
+ itemId: e,
698
+ keepExistingSelection: s,
699
+ shouldBeSelected: r.target.checked
700
+ });
701
+ }, c = () => {
702
+ de(o, G) && o.isItemEditable(e) && (o.isItemBeingEdited(e) ? o.setEditedItemId(null) : o.setEditedItemId(e));
703
+ };
704
+ return {
705
+ interactions: {
706
+ handleExpansion: m,
707
+ handleSelection: l,
708
+ handleCheckboxSelection: f,
709
+ toggleItemEditing: c,
710
+ handleSaveItemLabel: (r, y) => {
711
+ de(o, G) && o.isItemBeingEditedRef(e) && (o.updateItemLabel(e, y), c(), o.focusItem(r, e));
712
+ },
713
+ handleCancelItemLabelEditing: (r) => {
714
+ de(o, G) && o.isItemBeingEditedRef(e) && (c(), o.focusItem(r, e));
715
+ }
716
+ },
717
+ status: d,
718
+ publicAPI: p
719
+ };
720
+ }, xt = (e) => {
721
+ const {
722
+ runItemPlugins: t,
723
+ items: {
724
+ onItemClick: o,
725
+ disabledItemsFocusable: s,
726
+ indentationAtItemLevel: p
727
+ },
728
+ selection: {
729
+ disableSelection: d,
730
+ checkboxSelection: m
731
+ },
732
+ expansion: {
733
+ expansionTrigger: l
734
+ },
735
+ treeId: f,
736
+ instance: c,
737
+ publicAPI: h
738
+ } = ne(), b = R.useContext(Ee), {
739
+ id: C,
740
+ itemId: r,
741
+ label: y,
742
+ children: S,
743
+ rootRef: F
744
+ } = e, {
745
+ rootRef: X,
746
+ contentRef: U,
747
+ propsEnhancers: w
748
+ } = t(e), {
749
+ interactions: E,
750
+ status: P
751
+ } = yt({
752
+ itemId: r,
753
+ children: S
754
+ }), T = R.useRef(null), O = R.useRef(null), _ = ce(F, X, T), Y = ce(U, O), D = R.useRef(null), j = lt({
755
+ itemId: r,
756
+ treeId: f,
757
+ id: C
758
+ }), q = c.canItemBeTabbed(r) ? 0 : -1, M = {
759
+ rootRefObject: T,
760
+ contentRefObject: O,
761
+ interactions: E
762
+ }, $ = (a) => (n) => {
763
+ var v;
764
+ if ((v = a.onFocus) == null || v.call(a, n), n.defaultMuiPrevented)
765
+ return;
766
+ const u = !P.disabled || s;
767
+ !P.focused && u && n.currentTarget === n.target && c.focusItem(n, r);
768
+ }, z = (a) => (n) => {
769
+ var v, V, te, ge, fe;
770
+ if ((v = a.onBlur) == null || v.call(a, n), n.defaultMuiPrevented)
771
+ return;
772
+ const u = c.getItemDOMElement(r);
773
+ P.editing || // we can exit the editing state by clicking outside the input (within the Tree Item) or by pressing Enter or Escape -> we don't want to remove the focused item from the state in these cases
774
+ // we can also exit the editing state by clicking on the root itself -> want to remove the focused item from the state in this case
775
+ n.relatedTarget && ye(n.relatedTarget, u) && (n.target && ((te = (V = n.target) == null ? void 0 : V.dataset) == null ? void 0 : te.element) === "labelInput" && ye(n.target, u) || ((fe = (ge = n.relatedTarget) == null ? void 0 : ge.dataset) == null ? void 0 : fe.element) === "labelInput") || c.removeFocusedItem();
776
+ }, H = (a) => (n) => {
777
+ var u, v, V;
778
+ (u = a.onKeyDown) == null || u.call(a, n), !(n.defaultMuiPrevented || ((V = (v = n.target) == null ? void 0 : v.dataset) == null ? void 0 : V.element) === "labelInput") && c.handleItemKeyDown(n, r);
779
+ }, N = (a) => (n) => {
780
+ var u;
781
+ (u = a.onDoubleClick) == null || u.call(a, n), !n.defaultMuiPrevented && E.toggleItemEditing();
782
+ }, W = (a) => (n) => {
783
+ var u, v;
784
+ (u = a.onClick) == null || u.call(a, n), o == null || o(n, r), !(n.defaultMuiPrevented || (v = D.current) != null && v.contains(n.target)) && (l === "content" && E.handleExpansion(n), m || E.handleSelection(n));
785
+ }, J = (a) => (n) => {
786
+ var u;
787
+ (u = a.onMouseDown) == null || u.call(a, n), !n.defaultMuiPrevented && (n.shiftKey || n.ctrlKey || n.metaKey || P.disabled) && n.preventDefault();
788
+ }, ee = (a) => (n) => {
789
+ var u;
790
+ (u = a.onChange) == null || u.call(a, n), !n.defaultMuiPrevented && (d || P.disabled || E.handleCheckboxSelection(n));
791
+ }, Q = (a) => (n) => {
792
+ var u;
793
+ (u = a.onClick) == null || u.call(a, n), !n.defaultMuiPrevented && l === "iconContainer" && E.handleExpansion(n);
794
+ };
795
+ return {
796
+ getRootProps: (a = {}) => {
797
+ var te;
798
+ const n = g({}, B(e), B(a));
799
+ let u;
800
+ P.selected ? u = !0 : d || P.disabled ? u = void 0 : u = !1;
801
+ const v = g({}, n, {
802
+ ref: _,
803
+ role: "treeitem",
804
+ tabIndex: q,
805
+ id: j,
806
+ "aria-expanded": P.expandable ? P.expanded : void 0,
807
+ "aria-selected": u,
808
+ "aria-disabled": P.disabled || void 0
809
+ }, a, {
810
+ onFocus: $(n),
811
+ onBlur: z(n),
812
+ onKeyDown: H(n)
813
+ });
814
+ p && (v.style = {
815
+ "--TreeView-itemDepth": typeof b == "function" ? b(r) : b
816
+ });
817
+ const V = ((te = w.root) == null ? void 0 : te.call(w, g({}, M, {
818
+ externalEventHandlers: n
819
+ }))) ?? {};
820
+ return g({}, v, V);
821
+ },
822
+ getContentProps: (a = {}) => {
823
+ var V;
824
+ const n = B(a), u = g({}, n, a, {
825
+ ref: Y,
826
+ onClick: W(n),
827
+ onMouseDown: J(n),
828
+ status: P
829
+ });
830
+ p && (u.indentationAtItemLevel = !0);
831
+ const v = ((V = w.content) == null ? void 0 : V.call(w, g({}, M, {
832
+ externalEventHandlers: n
833
+ }))) ?? {};
834
+ return g({}, u, v);
835
+ },
836
+ getGroupTransitionProps: (a = {}) => {
837
+ const n = B(a), u = g({}, n, {
838
+ unmountOnExit: !0,
839
+ component: "ul",
840
+ role: "group",
841
+ in: P.expanded,
842
+ children: S
843
+ }, a);
844
+ return p && (u.indentationAtItemLevel = !0), u;
845
+ },
846
+ getIconContainerProps: (a = {}) => {
847
+ const n = B(a);
848
+ return g({}, n, a, {
849
+ onClick: Q(n)
850
+ });
851
+ },
852
+ getCheckboxProps: (a = {}) => {
853
+ const n = B(a);
854
+ return g({}, n, {
855
+ visible: m,
856
+ ref: D,
857
+ checked: P.selected,
858
+ disabled: d || P.disabled,
859
+ tabIndex: -1
860
+ }, a, {
861
+ onChange: ee(n)
862
+ });
863
+ },
864
+ getLabelProps: (a = {}) => {
865
+ const n = g({}, B(a)), u = g({}, n, {
866
+ children: y
867
+ }, a, {
868
+ onDoubleClick: N(n)
869
+ });
870
+ return c.isTreeViewEditable && (u.editable = P.editable), u;
871
+ },
872
+ getLabelInputProps: (a = {}) => {
873
+ var v;
874
+ const n = B(a), u = ((v = w.labelInput) == null ? void 0 : v.call(w, {
875
+ rootRefObject: T,
876
+ contentRefObject: O,
877
+ externalEventHandlers: n,
878
+ interactions: E
879
+ })) ?? {};
880
+ return g({}, a, u);
881
+ },
882
+ getDragAndDropOverlayProps: (a = {}) => {
883
+ var v;
884
+ const n = B(a), u = ((v = w.dragAndDropOverlay) == null ? void 0 : v.call(w, g({}, M, {
885
+ externalEventHandlers: n
886
+ }))) ?? {};
887
+ return g({}, a, u);
888
+ },
889
+ rootRef: _,
890
+ status: P,
891
+ publicAPI: h
892
+ };
893
+ }, De = xt;
894
+ function Me(e) {
895
+ const {
896
+ slots: t,
897
+ slotProps: o,
898
+ status: s
899
+ } = e, p = ne(), d = g({}, p.icons.slots, {
900
+ expandIcon: p.icons.slots.expandIcon ?? It,
901
+ collapseIcon: p.icons.slots.collapseIcon ?? ht
902
+ }), m = p.icons.slotProps;
903
+ let l;
904
+ t != null && t.icon ? l = "icon" : s.expandable ? s.expanded ? l = "collapseIcon" : l = "expandIcon" : l = "endIcon";
905
+ const f = (t == null ? void 0 : t[l]) ?? d[l], c = K({
906
+ elementType: f,
907
+ externalSlotProps: (h) => g({}, be(m[l], h), be(o == null ? void 0 : o[l], h)),
908
+ // TODO: Add proper ownerState
909
+ ownerState: {}
910
+ });
911
+ return f ? /* @__PURE__ */ x(f, g({}, c)) : null;
912
+ }
913
+ process.env.NODE_ENV !== "production" && (Me.propTypes = {
914
+ // ----------------------------- Warning --------------------------------
915
+ // | These PropTypes are generated from the TypeScript type definitions |
916
+ // | To update them edit the TypeScript types and run "pnpm proptypes" |
917
+ // ----------------------------------------------------------------------
918
+ /**
919
+ * The props used for each component slot.
920
+ * @default {}
921
+ */
922
+ slotProps: i.object,
923
+ /**
924
+ * Overridable component slots.
925
+ * @default {}
926
+ */
927
+ slots: i.object,
928
+ status: i.shape({
929
+ disabled: i.bool.isRequired,
930
+ editable: i.bool.isRequired,
931
+ editing: i.bool.isRequired,
932
+ expandable: i.bool.isRequired,
933
+ expanded: i.bool.isRequired,
934
+ focused: i.bool.isRequired,
935
+ selected: i.bool.isRequired
936
+ }).isRequired
937
+ });
938
+ const Ct = ["visible"], Tt = ["id", "itemId", "label", "disabled", "children", "slots", "slotProps"], wt = at(), ke = A("li", {
939
+ name: "MuiTreeItem2",
940
+ slot: "Root",
941
+ overridesResolver: (e, t) => t.root
942
+ })({
943
+ listStyle: "none",
944
+ margin: 0,
945
+ padding: 0,
946
+ outline: 0
947
+ }), Le = A("div", {
948
+ name: "MuiTreeItem2",
949
+ slot: "Content",
950
+ overridesResolver: (e, t) => t.content,
951
+ shouldForwardProp: (e) => le(e) && e !== "status" && e !== "indentationAtItemLevel"
952
+ })(({
953
+ theme: e
954
+ }) => ({
955
+ padding: e.spacing(0.5, 1),
956
+ borderRadius: e.shape.borderRadius,
957
+ width: "100%",
958
+ boxSizing: "border-box",
959
+ // prevent width + padding to overflow
960
+ position: "relative",
961
+ display: "flex",
962
+ alignItems: "center",
963
+ gap: e.spacing(1),
964
+ cursor: "pointer",
965
+ WebkitTapHighlightColor: "transparent",
966
+ "&:hover": {
967
+ backgroundColor: (e.vars || e).palette.action.hover,
968
+ // Reset on touch devices, it doesn't add specificity
969
+ "@media (hover: none)": {
970
+ backgroundColor: "transparent"
971
+ }
972
+ },
973
+ variants: [{
974
+ props: {
975
+ indentationAtItemLevel: !0
976
+ },
977
+ style: {
978
+ paddingLeft: `calc(${e.spacing(1)} + var(--TreeView-itemChildrenIndentation) * var(--TreeView-itemDepth))`
979
+ }
980
+ }, {
981
+ props: ({
982
+ status: t
983
+ }) => t.disabled,
984
+ style: {
985
+ opacity: (e.vars || e).palette.action.disabledOpacity,
986
+ backgroundColor: "transparent"
987
+ }
988
+ }, {
989
+ props: ({
990
+ status: t
991
+ }) => t.focused,
992
+ style: {
993
+ backgroundColor: (e.vars || e).palette.action.focus
994
+ }
995
+ }, {
996
+ props: ({
997
+ status: t
998
+ }) => t.selected,
999
+ style: {
1000
+ backgroundColor: e.vars ? `rgba(${e.vars.palette.primary.mainChannel} / ${e.vars.palette.action.selectedOpacity})` : oe(e.palette.primary.main, e.palette.action.selectedOpacity),
1001
+ "&:hover": {
1002
+ backgroundColor: e.vars ? `rgba(${e.vars.palette.primary.mainChannel} / calc(${e.vars.palette.action.selectedOpacity} + ${e.vars.palette.action.hoverOpacity}))` : oe(e.palette.primary.main, e.palette.action.selectedOpacity + e.palette.action.hoverOpacity),
1003
+ // Reset on touch devices, it doesn't add specificity
1004
+ "@media (hover: none)": {
1005
+ backgroundColor: e.vars ? `rgba(${e.vars.palette.primary.mainChannel} / ${e.vars.palette.action.selectedOpacity})` : oe(e.palette.primary.main, e.palette.action.selectedOpacity)
1006
+ }
1007
+ }
1008
+ }
1009
+ }, {
1010
+ props: ({
1011
+ status: t
1012
+ }) => t.selected && t.focused,
1013
+ style: {
1014
+ backgroundColor: e.vars ? `rgba(${e.vars.palette.primary.mainChannel} / calc(${e.vars.palette.action.selectedOpacity} + ${e.vars.palette.action.focusOpacity}))` : oe(e.palette.primary.main, e.palette.action.selectedOpacity + e.palette.action.focusOpacity)
1015
+ }
1016
+ }]
1017
+ })), Ne = A("div", {
1018
+ name: "MuiTreeItem2",
1019
+ slot: "Label",
1020
+ overridesResolver: (e, t) => t.label,
1021
+ shouldForwardProp: (e) => le(e) && e !== "editable"
1022
+ })(({
1023
+ theme: e
1024
+ }) => g({
1025
+ width: "100%",
1026
+ boxSizing: "border-box",
1027
+ // prevent width + padding to overflow
1028
+ // fixes overflow - see https://github.com/mui/material-ui/issues/27372
1029
+ minWidth: 0,
1030
+ position: "relative",
1031
+ overflow: "hidden"
1032
+ }, e.typography.body1, {
1033
+ variants: [{
1034
+ props: ({
1035
+ editable: t
1036
+ }) => t,
1037
+ style: {
1038
+ paddingLeft: "2px"
1039
+ }
1040
+ }]
1041
+ })), Ae = A("div", {
1042
+ name: "MuiTreeItem2",
1043
+ slot: "IconContainer",
1044
+ overridesResolver: (e, t) => t.iconContainer
1045
+ })({
1046
+ width: 16,
1047
+ display: "flex",
1048
+ flexShrink: 0,
1049
+ justifyContent: "center",
1050
+ "& svg": {
1051
+ fontSize: 18
1052
+ }
1053
+ }), Ve = A(se, {
1054
+ name: "MuiTreeItem2",
1055
+ slot: "GroupTransition",
1056
+ overridesResolver: (e, t) => t.groupTransition,
1057
+ shouldForwardProp: (e) => le(e) && e !== "indentationAtItemLevel"
1058
+ })({
1059
+ margin: 0,
1060
+ padding: 0,
1061
+ paddingLeft: "var(--TreeView-itemChildrenIndentation)",
1062
+ variants: [{
1063
+ props: {
1064
+ indentationAtItemLevel: !0
1065
+ },
1066
+ style: {
1067
+ paddingLeft: 0
1068
+ }
1069
+ }]
1070
+ }), vt = A(/* @__PURE__ */ R.forwardRef((e, t) => {
1071
+ const {
1072
+ visible: o
1073
+ } = e, s = we(e, Ct);
1074
+ return o ? /* @__PURE__ */ x(Ze, g({}, s, {
1075
+ ref: t
1076
+ })) : null;
1077
+ }), {
1078
+ name: "MuiTreeItem2",
1079
+ slot: "Checkbox",
1080
+ overridesResolver: (e, t) => t.checkbox
1081
+ })({
1082
+ padding: 0
1083
+ }), Pt = (e) => {
1084
+ const {
1085
+ classes: t
1086
+ } = e;
1087
+ return ve({
1088
+ root: ["root"],
1089
+ content: ["content"],
1090
+ expanded: ["expanded"],
1091
+ editing: ["editing"],
1092
+ editable: ["editable"],
1093
+ selected: ["selected"],
1094
+ focused: ["focused"],
1095
+ disabled: ["disabled"],
1096
+ iconContainer: ["iconContainer"],
1097
+ checkbox: ["checkbox"],
1098
+ label: ["label"],
1099
+ groupTransition: ["groupTransition"],
1100
+ labelInput: ["labelInput"],
1101
+ dragAndDropOverlay: ["dragAndDropOverlay"]
1102
+ }, bt, t);
1103
+ }, Et = /* @__PURE__ */ R.forwardRef(function(t, o) {
1104
+ const s = wt({
1105
+ props: t,
1106
+ name: "MuiTreeItem2"
1107
+ }), {
1108
+ id: p,
1109
+ itemId: d,
1110
+ label: m,
1111
+ disabled: l,
1112
+ children: f,
1113
+ slots: c = {},
1114
+ slotProps: h = {}
1115
+ } = s, b = we(s, Tt), {
1116
+ getRootProps: C,
1117
+ getContentProps: r,
1118
+ getIconContainerProps: y,
1119
+ getCheckboxProps: S,
1120
+ getLabelProps: F,
1121
+ getGroupTransitionProps: X,
1122
+ getLabelInputProps: U,
1123
+ getDragAndDropOverlayProps: w,
1124
+ status: E
1125
+ } = De({
1126
+ id: p,
1127
+ itemId: d,
1128
+ children: f,
1129
+ label: m,
1130
+ disabled: l
1131
+ }), P = g({}, s, E), T = Pt(P), O = c.root ?? ke, _ = K({
1132
+ elementType: O,
1133
+ getSlotProps: C,
1134
+ externalForwardedProps: b,
1135
+ externalSlotProps: h.root,
1136
+ additionalProps: {
1137
+ ref: o
1138
+ },
1139
+ ownerState: {},
1140
+ className: T.root
1141
+ }), Y = c.content ?? Le, D = K({
1142
+ elementType: Y,
1143
+ getSlotProps: r,
1144
+ externalSlotProps: h.content,
1145
+ ownerState: {},
1146
+ className: Te(T.content, E.expanded && T.expanded, E.selected && T.selected, E.focused && T.focused, E.disabled && T.disabled, E.editing && T.editing, E.editable && T.editable)
1147
+ }), j = c.iconContainer ?? Ae, q = K({
1148
+ elementType: j,
1149
+ getSlotProps: y,
1150
+ externalSlotProps: h.iconContainer,
1151
+ ownerState: {},
1152
+ className: T.iconContainer
1153
+ }), M = c.label ?? Ne, $ = K({
1154
+ elementType: M,
1155
+ getSlotProps: F,
1156
+ externalSlotProps: h.label,
1157
+ ownerState: {},
1158
+ className: T.label
1159
+ }), z = c.checkbox ?? vt, H = K({
1160
+ elementType: z,
1161
+ getSlotProps: S,
1162
+ externalSlotProps: h.checkbox,
1163
+ ownerState: {},
1164
+ className: T.checkbox
1165
+ }), N = c.groupTransition ?? void 0, W = K({
1166
+ elementType: N,
1167
+ getSlotProps: X,
1168
+ externalSlotProps: h.groupTransition,
1169
+ ownerState: {},
1170
+ className: T.groupTransition
1171
+ }), J = c.labelInput ?? ft, ee = K({
1172
+ elementType: J,
1173
+ getSlotProps: U,
1174
+ externalSlotProps: h.labelInput,
1175
+ ownerState: {},
1176
+ className: T.labelInput
1177
+ }), Q = c.dragAndDropOverlay ?? Se, re = K({
1178
+ elementType: Q,
1179
+ getSlotProps: w,
1180
+ externalSlotProps: h.dragAndDropOverlay,
1181
+ ownerState: {},
1182
+ className: T.dragAndDropOverlay
1183
+ });
1184
+ return /* @__PURE__ */ x(pe, {
1185
+ itemId: d,
1186
+ children: /* @__PURE__ */ ie(O, g({}, _, {
1187
+ children: [/* @__PURE__ */ ie(Y, g({}, D, {
1188
+ children: [/* @__PURE__ */ x(j, g({}, q, {
1189
+ children: /* @__PURE__ */ x(Me, {
1190
+ status: E,
1191
+ slots: c,
1192
+ slotProps: h
1193
+ })
1194
+ })), /* @__PURE__ */ x(z, g({}, H)), E.editing ? /* @__PURE__ */ x(J, g({}, ee)) : /* @__PURE__ */ x(M, g({}, $)), /* @__PURE__ */ x(Q, g({}, re))]
1195
+ })), f && /* @__PURE__ */ x(Ve, g({
1196
+ as: N
1197
+ }, W))]
1198
+ }))
1199
+ });
1200
+ });
1201
+ process.env.NODE_ENV !== "production" && (Et.propTypes = {
1202
+ // ----------------------------- Warning --------------------------------
1203
+ // | These PropTypes are generated from the TypeScript type definitions |
1204
+ // | To update them edit the TypeScript types and run "pnpm proptypes" |
1205
+ // ----------------------------------------------------------------------
1206
+ /**
1207
+ * The content of the component.
1208
+ */
1209
+ children: i.node,
1210
+ /**
1211
+ * Override or extend the styles applied to the component.
1212
+ */
1213
+ classes: i.object,
1214
+ className: i.string,
1215
+ /**
1216
+ * If `true`, the item is disabled.
1217
+ * @default false
1218
+ */
1219
+ disabled: i.bool,
1220
+ /**
1221
+ * The id attribute of the item. If not provided, it will be generated.
1222
+ */
1223
+ id: i.string,
1224
+ /**
1225
+ * The id of the item.
1226
+ * Must be unique.
1227
+ */
1228
+ itemId: i.string.isRequired,
1229
+ /**
1230
+ * The label of the item.
1231
+ */
1232
+ label: i.node,
1233
+ /**
1234
+ * Callback fired when the item root is blurred.
1235
+ */
1236
+ onBlur: i.func,
1237
+ /**
1238
+ * This prop isn't supported.
1239
+ * Use the `onItemFocus` callback on the tree if you need to monitor an item's focus.
1240
+ */
1241
+ onFocus: He,
1242
+ /**
1243
+ * Callback fired when a key is pressed on the keyboard and the tree is in focus.
1244
+ */
1245
+ onKeyDown: i.func,
1246
+ /**
1247
+ * The props used for each component slot.
1248
+ * @default {}
1249
+ */
1250
+ slotProps: i.object,
1251
+ /**
1252
+ * Overridable component slots.
1253
+ * @default {}
1254
+ */
1255
+ slots: i.object
1256
+ });
1257
+ function eo(e) {
1258
+ const {
1259
+ id: t,
1260
+ itemId: o,
1261
+ label: s,
1262
+ disabled: p,
1263
+ children: d,
1264
+ itemData: m,
1265
+ iconColor: l = "primary",
1266
+ ref: f
1267
+ } = e, c = qe(
1268
+ m == null ? void 0 : m.iconType,
1269
+ m == null ? void 0 : m.customIcon
1270
+ ), {
1271
+ getRootProps: h,
1272
+ getContentProps: b,
1273
+ getLabelProps: C,
1274
+ getGroupTransitionProps: r,
1275
+ getIconContainerProps: y,
1276
+ status: S
1277
+ } = De({ id: t, itemId: o, label: s, disabled: p, children: d, rootRef: f });
1278
+ return /* @__PURE__ */ x(pe, { itemId: o, children: /* @__PURE__ */ ie(
1279
+ ke,
1280
+ {
1281
+ ...h(),
1282
+ "data-treeview-item": o || "",
1283
+ "data-treeview-item-label": s || "",
1284
+ children: [
1285
+ /* @__PURE__ */ ie(Le, { ...b(), style: Ke, children: [
1286
+ /* @__PURE__ */ x(Ae, { ...y(), children: /* @__PURE__ */ x(c, { fontSize: "small", color: l }) }),
1287
+ /* @__PURE__ */ x(Ne, { ...C() }),
1288
+ /* @__PURE__ */ x(ze, { sx: Fe, children: S.expandable && (S.expanded ? /* @__PURE__ */ x(it, { fontSize: "small" }) : /* @__PURE__ */ x(st, { fontSize: "small" })) })
1289
+ ] }),
1290
+ d && /* @__PURE__ */ x(
1291
+ Ve,
1292
+ {
1293
+ ...r(),
1294
+ style: S.expanded ? je : void 0
1295
+ }
1296
+ )
1297
+ ]
1298
+ }
1299
+ ) });
1300
+ }
1301
+ export {
1302
+ se as C,
1303
+ Pe as T,
1304
+ Yt as a,
1305
+ lt as b,
1306
+ Xt as c,
1307
+ Ee as d,
1308
+ Jt as e,
1309
+ pt as f,
1310
+ et as g,
1311
+ ut as h,
1312
+ Zt as i,
1313
+ Qt as j,
1314
+ ye as k,
1315
+ ct as l,
1316
+ dt as m,
1317
+ de as n,
1318
+ ne as o,
1319
+ ft as p,
1320
+ Se as q,
1321
+ at as r,
1322
+ ht as s,
1323
+ It as t,
1324
+ G as u,
1325
+ pe as v,
1326
+ bt as w,
1327
+ Ht as x,
1328
+ eo as y
1329
+ };