UNPKG

@cgi-learning-hub/ui

Version:

@cgi-learning-hub/ui is an open-source React component library that implements UI for HUB's features

1,651 lines 60.8 kB
import { jsx as O, jsxs as de } from "react/jsx-runtime"; import { c as Ce } from "./createSvgIcon-B1E6Wo8z.js"; import At from "./components/EllipsisWithTooltip/EllipsisWithTooltip.es.js"; import { treeItemRootStyle as Pt, treeContentStyle as zt, iconStyle as Be, arrowContainerStyle as jt, expandedGroupStyle as $t } from "./components/TreeView/style.es.js"; import { getIconComponent as Kt } from "./components/TreeView/utils.es.js"; import { _ as E } from "./ButtonBase-6TF6t2SP.js"; import * as P from "react"; import Se from "react"; import { u as Ft } from "./useEventCallback-Y2KwRxBw.js"; import { u as ke } from "./useForkRef-u29GSuCu.js"; import { e as B, r as Ge } from "./useSlot-BzdKwDQ5.js"; import { P as m } from "./index-Sy88PpwE.js"; import { a as at } from "./TransitionGroupContext-DbLioz_6.js"; import { F as lt, G as ct, w as Wt, H as W, n as ue } from "./identifier-PWESmBq6.js"; import { u as Bt } from "./useThemeProps-CQ9rZe7g.js"; import { u as Gt, s as K, c as ut, f as Me } from "./DefaultPropsProvider-DqazQPtr.js"; import { u as qt } from "./useTheme-XJ9sFCWX.js"; import { m as Ut } from "./memoTheme-DAFDflPY.js"; import { T as Xt, g as qe } from "./utils-BQenyzDz.js"; import { u as Yt } from "./useTimeout-CrCYVizI.js"; import { e as Jt } from "./elementTypeAcceptingRef-DOeckaXy.js"; import { u as G } from "./useSlotProps-DdMuGelR.js"; import { C as Qt } from "./Checkbox-BfBDowB2.js"; import { C as Zt } from "./CircularProgress-DZuYTFz-.js"; import { u as Ht } from "./unsupportedProp-BuVD30Gh.js"; import { B as en } from "./Box-BI4osO9v.js"; function tn(e) { return ct("MuiCollapse", e); } const Uo = lt("MuiCollapse", ["root", "horizontal", "vertical", "entered", "hidden", "wrapper", "wrapperInner"]), nn = (e) => { const { orientation: t, classes: n } = e, o = { root: ["root", `${t}`], entered: ["entered"], hidden: ["hidden"], wrapper: ["wrapper", `${t}`], wrapperInner: ["wrapperInner", `${t}`] }; return ut(o, tn, n); }, on = K("div", { name: "MuiCollapse", slot: "Root", overridesResolver: (e, t) => { const { ownerState: n } = e; return [t.root, t[n.orientation], n.state === "entered" && t.entered, n.state === "exited" && !n.in && n.collapsedSize === "0px" && t.hidden]; } })(Ut(({ theme: e }) => ({ height: 0, overflow: "hidden", transition: e.transitions.create("height"), variants: [{ props: { orientation: "horizontal" }, style: { height: "auto", width: 0, transition: e.transitions.create("width") } }, { props: { state: "entered" }, style: { height: "auto", overflow: "visible" } }, { props: { state: "entered", orientation: "horizontal" }, style: { width: "auto" } }, { props: ({ ownerState: t }) => t.state === "exited" && !t.in && t.collapsedSize === "0px", style: { visibility: "hidden" } }] }))), rn = K("div", { name: "MuiCollapse", slot: "Wrapper" })({ // Hack to get children with a negative margin to not falsify the height computation. display: "flex", width: "100%", variants: [{ props: { orientation: "horizontal" }, style: { width: "auto", height: "100%" } }] }), sn = K("div", { name: "MuiCollapse", slot: "WrapperInner" })({ width: "100%", variants: [{ props: { orientation: "horizontal" }, style: { width: "auto", height: "100%" } }] }), ve = /* @__PURE__ */ P.forwardRef(function(t, n) { const o = Gt({ props: t, name: "MuiCollapse" }), { addEndListener: r, children: s, className: u, collapsedSize: i = "0px", component: l, easing: a, in: d, onEnter: h, onEntered: I, onEntering: p, onExit: c, onExited: b, onExiting: y, orientation: x = "vertical", style: L, timeout: R = Wt.standard, // eslint-disable-next-line react/prop-types TransitionComponent: V = Xt, ...A } = o, w = { ...o, orientation: x, collapsedSize: i }, _ = nn(w), D = qt(), v = Yt(), N = P.useRef(null), F = P.useRef(), J = typeof i == "number" ? `${i}px` : i, Q = x === "horizontal", X = Q ? "width" : "height", Z = P.useRef(null), ie = ke(n, Z), Y = (T) => ($) => { if (T) { const j = Z.current; $ === void 0 ? T(j) : T(j, $); } }, H = () => N.current ? N.current[Q ? "clientWidth" : "clientHeight"] : 0, fe = Y((T, $) => { N.current && Q && (N.current.style.position = "absolute"), T.style[X] = J, h && h(T, $); }), ae = Y((T, $) => { const j = H(); N.current && Q && (N.current.style.position = ""); const { duration: ee, easing: g } = qe({ style: L, timeout: R, easing: a }, { mode: "enter" }); if (R === "auto") { const f = D.transitions.getAutoHeightDuration(j); T.style.transitionDuration = `${f}ms`, F.current = f; } else T.style.transitionDuration = typeof ee == "string" ? ee : `${ee}ms`; T.style[X] = `${j}px`, T.style.transitionTimingFunction = g, p && p(T, $); }), me = Y((T, $) => { T.style[X] = "auto", I && I(T, $); }), le = Y((T) => { T.style[X] = `${H()}px`, c && c(T); }), ge = Y(b), ce = Y((T) => { const $ = H(), { duration: j, easing: ee } = qe({ style: L, timeout: R, easing: a }, { mode: "exit" }); if (R === "auto") { const g = D.transitions.getAutoHeightDuration($); T.style.transitionDuration = `${g}ms`, F.current = g; } else T.style.transitionDuration = typeof j == "string" ? j : `${j}ms`; T.style[X] = J, T.style.transitionTimingFunction = ee, y && y(T); }); return /* @__PURE__ */ O(V, { in: d, onEnter: fe, onEntered: me, onEntering: ae, onExit: le, onExited: ge, onExiting: ce, addEndListener: (T) => { R === "auto" && v.start(F.current || 0, T), r && r(Z.current, T); }, nodeRef: Z, timeout: R === "auto" ? null : R, ...A, children: (T, { ownerState: $, ...j }) => /* @__PURE__ */ O(on, { as: l, className: W(_.root, u, { entered: _.entered, exited: !d && J === "0px" && _.hidden }[T]), style: { [Q ? "minWidth" : "minHeight"]: J, ...L }, ref: ie, ownerState: { ...w, state: T }, ...j, children: /* @__PURE__ */ O(rn, { ownerState: { ...w, state: T }, className: _.wrapper, ref: N, children: /* @__PURE__ */ O(sn, { ownerState: { ...w, state: T }, className: _.wrapperInner, children: s }) }) }) }); }); process.env.NODE_ENV !== "production" && (ve.propTypes = { // ┌────────────────────────────── Warning ──────────────────────────────┐ // │ These PropTypes are generated from the TypeScript type definitions. │ // │ To update them, edit the d.ts file and run `pnpm proptypes`. │ // └─────────────────────────────────────────────────────────────────────┘ /** * Add a custom transition end trigger. Called with the transitioning DOM * node and a done callback. Allows for more fine grained transition end * logic. Note: Timeouts are still used as a fallback if provided. */ addEndListener: m.func, /** * The content node to be collapsed. */ children: m.node, /** * Override or extend the styles applied to the component. */ classes: m.object, /** * @ignore */ className: m.string, /** * The width (horizontal) or height (vertical) of the container when collapsed. * @default '0px' */ collapsedSize: m.oneOfType([m.number, m.string]), /** * The component used for the root node. * Either a string to use a HTML element or a component. */ component: Jt, /** * The transition timing function. * You may specify a single easing or a object containing enter and exit values. */ easing: m.oneOfType([m.shape({ enter: m.string, exit: m.string }), m.string]), /** * If `true`, the component will transition in. */ in: m.bool, /** * @ignore */ onEnter: m.func, /** * @ignore */ onEntered: m.func, /** * @ignore */ onEntering: m.func, /** * @ignore */ onExit: m.func, /** * @ignore */ onExited: m.func, /** * @ignore */ onExiting: m.func, /** * The transition orientation. * @default 'vertical' */ orientation: m.oneOf(["horizontal", "vertical"]), /** * @ignore */ style: m.object, /** * The system prop that allows defining system overrides as well as additional CSS styles. */ sx: m.oneOfType([m.arrayOf(m.oneOfType([m.func, m.object, m.bool])), m.func, m.object]), /** * The duration for the transition, in milliseconds. * You may specify a single timeout for all transitions, or individually with an object. * * Set to 'auto' to automatically calculate transition time based on height. * @default duration.standard */ timeout: m.oneOfType([m.oneOf(["auto"]), m.number, m.shape({ appear: m.number, enter: m.number, exit: m.number })]) }); ve && (ve.muiSupportAuto = !0); const an = Ce(/* @__PURE__ */ O("path", { d: "M7.41 8.59 12 13.17l4.59-4.58L18 10l-6 6-6-6z" }), "KeyboardArrowDown"), ln = Ce(/* @__PURE__ */ O("path", { d: "M8.59 16.59 13.17 12 8.59 7.41 10 6l6 6-6 6z" }), "KeyboardArrowRight"); function cn(e) { return Bt; } var be = { exports: {} }, Oe = {}, ye = { exports: {} }, _e = {}; /** * @license React * use-sync-external-store-shim.production.js * * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */ var Ue; function un() { if (Ue) return _e; Ue = 1; var e = Se; function t(h, I) { return h === I && (h !== 0 || 1 / h === 1 / I) || h !== h && I !== I; } var n = typeof Object.is == "function" ? Object.is : t, o = e.useState, r = e.useEffect, s = e.useLayoutEffect, u = e.useDebugValue; function i(h, I) { var p = I(), c = o({ inst: { value: p, getSnapshot: I } }), b = c[0].inst, y = c[1]; return s( function() { b.value = p, b.getSnapshot = I, l(b) && y({ inst: b }); }, [h, p, I] ), r( function() { return l(b) && y({ inst: b }), h(function() { l(b) && y({ inst: b }); }); }, [h] ), u(p), p; } function l(h) { var I = h.getSnapshot; h = h.value; try { var p = I(); return !n(h, p); } catch { return !0; } } function a(h, I) { return I(); } var d = typeof window > "u" || typeof window.document > "u" || typeof window.document.createElement > "u" ? a : i; return _e.useSyncExternalStore = e.useSyncExternalStore !== void 0 ? e.useSyncExternalStore : d, _e; } var Re = {}; /** * @license React * use-sync-external-store-shim.development.js * * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */ var Xe; function dn() { return Xe || (Xe = 1, process.env.NODE_ENV !== "production" && function() { function e(p, c) { return p === c && (p !== 0 || 1 / p === 1 / c) || p !== p && c !== c; } function t(p, c) { d || r.startTransition === void 0 || (d = !0, console.error( "You are using an outdated, pre-release alpha of React 18 that does not support useSyncExternalStore. The use-sync-external-store shim will not work correctly. Upgrade to a newer pre-release." )); var b = c(); if (!h) { var y = c(); s(b, y) || (console.error( "The result of getSnapshot should be cached to avoid an infinite loop" ), h = !0); } y = u({ inst: { value: b, getSnapshot: c } }); var x = y[0].inst, L = y[1]; return l( function() { x.value = b, x.getSnapshot = c, n(x) && L({ inst: x }); }, [p, b, c] ), i( function() { return n(x) && L({ inst: x }), p(function() { n(x) && L({ inst: x }); }); }, [p] ), a(b), b; } function n(p) { var c = p.getSnapshot; p = p.value; try { var b = c(); return !s(p, b); } catch { return !0; } } function o(p, c) { return c(); } typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ < "u" && typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart == "function" && __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error()); var r = Se, s = typeof Object.is == "function" ? Object.is : e, u = r.useState, i = r.useEffect, l = r.useLayoutEffect, a = r.useDebugValue, d = !1, h = !1, I = typeof window > "u" || typeof window.document > "u" || typeof window.document.createElement > "u" ? o : t; Re.useSyncExternalStore = r.useSyncExternalStore !== void 0 ? r.useSyncExternalStore : I, typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ < "u" && typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop == "function" && __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error()); }()), Re; } var Ye; function dt() { return Ye || (Ye = 1, process.env.NODE_ENV === "production" ? ye.exports = un() : ye.exports = dn()), ye.exports; } /** * @license React * use-sync-external-store-shim/with-selector.production.js * * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */ var Je; function pn() { if (Je) return Oe; Je = 1; var e = Se, t = dt(); function n(a, d) { return a === d && (a !== 0 || 1 / a === 1 / d) || a !== a && d !== d; } var o = typeof Object.is == "function" ? Object.is : n, r = t.useSyncExternalStore, s = e.useRef, u = e.useEffect, i = e.useMemo, l = e.useDebugValue; return Oe.useSyncExternalStoreWithSelector = function(a, d, h, I, p) { var c = s(null); if (c.current === null) { var b = { hasValue: !1, value: null }; c.current = b; } else b = c.current; c = i( function() { function x(w) { if (!L) { if (L = !0, R = w, w = I(w), p !== void 0 && b.hasValue) { var _ = b.value; if (p(_, w)) return V = _; } return V = w; } if (_ = V, o(R, w)) return _; var D = I(w); return p !== void 0 && p(_, D) ? (R = w, _) : (R = w, V = D); } var L = !1, R, V, A = h === void 0 ? null : h; return [ function() { return x(d()); }, A === null ? void 0 : function() { return x(A()); } ]; }, [d, h, I, p] ); var y = r(a, c[0], c[1]); return u( function() { b.hasValue = !0, b.value = y; }, [y] ), l(y), y; }, Oe; } var De = {}; /** * @license React * use-sync-external-store-shim/with-selector.development.js * * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */ var Qe; function fn() { return Qe || (Qe = 1, process.env.NODE_ENV !== "production" && function() { function e(a, d) { return a === d && (a !== 0 || 1 / a === 1 / d) || a !== a && d !== d; } typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ < "u" && typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart == "function" && __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error()); var t = Se, n = dt(), o = typeof Object.is == "function" ? Object.is : e, r = n.useSyncExternalStore, s = t.useRef, u = t.useEffect, i = t.useMemo, l = t.useDebugValue; De.useSyncExternalStoreWithSelector = function(a, d, h, I, p) { var c = s(null); if (c.current === null) { var b = { hasValue: !1, value: null }; c.current = b; } else b = c.current; c = i( function() { function x(w) { if (!L) { if (L = !0, R = w, w = I(w), p !== void 0 && b.hasValue) { var _ = b.value; if (p(_, w)) return V = _; } return V = w; } if (_ = V, o(R, w)) return _; var D = I(w); return p !== void 0 && p(_, D) ? (R = w, _) : (R = w, V = D); } var L = !1, R, V, A = h === void 0 ? null : h; return [ function() { return x(d()); }, A === null ? void 0 : function() { return x(A()); } ]; }, [d, h, I, p] ); var y = r(a, c[0], c[1]); return u( function() { b.hasValue = !0, b.value = y; }, [y] ), l(y), y; }, typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ < "u" && typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop == "function" && __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error()); }()), De; } var Ze; function mn() { return Ze || (Ze = 1, process.env.NODE_ENV === "production" ? be.exports = pn() : be.exports = fn()), be.exports; } var gn = mn(); const bn = Object.is, M = (e, t, n = void 0, o = bn) => { const r = (s) => t(s, n); return gn.useSyncExternalStoreWithSelector(e.subscribe, e.getSnapshot, e.getSnapshot, r, o); }; var yn = (e, t, n) => { if (t.length === 1 && t[0] === n) { let o = !1; try { const r = {}; e(r) === r && (o = !0); } catch { } if (o) { let r; try { throw new Error(); } catch (s) { ({ stack: r } = s); } console.warn( `The result function returned its own inputs without modification. e.g \`createSelector([state => state.todos], todos => todos)\` This could lead to inefficient memoization and unnecessary re-renders. Ensure transformation logic is in the result function, and extraction logic is in the input selectors.`, { stack: r } ); } } }, hn = (e, t, n) => { const { memoize: o, memoizeOptions: r } = t, { inputSelectorResults: s, inputSelectorResultsCopy: u } = e, i = o(() => ({}), ...r); if (!(i.apply(null, s) === i.apply(null, u))) { let a; try { throw new Error(); } catch (d) { ({ stack: a } = d); } console.warn( `An input selector returned a different result when passed same arguments. This means your output selector will likely run more frequently than intended. Avoid returning a new reference inside your input selector, e.g. \`createSelector([state => state.todos.map(todo => todo.id)], todoIds => todoIds.length)\``, { arguments: n, firstInputs: s, secondInputs: u, stack: a } ); } }, In = { inputStabilityCheck: "once", identityFunctionCheck: "once" }, Ee = /* @__PURE__ */ Symbol("NOT_FOUND"); function vn(e, t = `expected a function, instead received ${typeof e}`) { if (typeof e != "function") throw new TypeError(t); } function En(e, t = `expected an object, instead received ${typeof e}`) { if (typeof e != "object") throw new TypeError(t); } function Cn(e, t = "expected all items to be functions, instead received the following types: ") { if (!e.every((n) => typeof n == "function")) { const n = e.map( (o) => typeof o == "function" ? `function ${o.name || "unnamed"}()` : typeof o ).join(", "); throw new TypeError(`${t}[${n}]`); } } var He = (e) => Array.isArray(e) ? e : [e]; function Sn(e) { const t = Array.isArray(e[0]) ? e[0] : e; return Cn( t, "createSelector expects all input-selectors to be functions, but received the following types: " ), t; } function et(e, t) { const n = [], { length: o } = e; for (let r = 0; r < o; r++) n.push(e[r].apply(null, t)); return n; } var Tn = (e, t) => { const { identityFunctionCheck: n, inputStabilityCheck: o } = { ...In, ...t }; return { identityFunctionCheck: { shouldRun: n === "always" || n === "once" && e, run: yn }, inputStabilityCheck: { shouldRun: o === "always" || o === "once" && e, run: hn } }; }; function xn(e) { let t; return { get(n) { return t && e(t.key, n) ? t.value : Ee; }, put(n, o) { t = { key: n, value: o }; }, getEntries() { return t ? [t] : []; }, clear() { t = void 0; } }; } function wn(e, t) { let n = []; function o(i) { const l = n.findIndex((a) => t(i, a.key)); if (l > -1) { const a = n[l]; return l > 0 && (n.splice(l, 1), n.unshift(a)), a.value; } return Ee; } function r(i, l) { o(i) === Ee && (n.unshift({ key: i, value: l }), n.length > e && n.pop()); } function s() { return n; } function u() { n = []; } return { get: o, put: r, getEntries: s, clear: u }; } var On = (e, t) => e === t; function _n(e) { return function(n, o) { if (n === null || o === null || n.length !== o.length) return !1; const { length: r } = n; for (let s = 0; s < r; s++) if (!e(n[s], o[s])) return !1; return !0; }; } function Rn(e, t) { const n = typeof t == "object" ? t : { equalityCheck: t }, { equalityCheck: o = On, maxSize: r = 1, resultEqualityCheck: s } = n, u = _n(o); let i = 0; const l = r <= 1 ? xn(u) : wn(r, u); function a() { let d = l.get(arguments); if (d === Ee) { if (d = e.apply(null, arguments), i++, s) { const I = l.getEntries().find( (p) => s(p.value, d) ); I && (d = I.value, i !== 0 && i--); } l.put(arguments, d); } return d; } return a.clearCache = () => { l.clear(), a.resetResultsCount(); }, a.resultsCount = () => i, a.resetResultsCount = () => { i = 0; }, a; } var Dn = class { constructor(e) { this.value = e; } deref() { return this.value; } }, Ln = typeof WeakRef < "u" ? WeakRef : Dn, kn = 0, tt = 1; function he() { return { s: kn, v: void 0, o: null, p: null }; } function pt(e, t = {}) { let n = he(); const { resultEqualityCheck: o } = t; let r, s = 0; function u() { var h; let i = n; const { length: l } = arguments; for (let I = 0, p = l; I < p; I++) { const c = arguments[I]; if (typeof c == "function" || typeof c == "object" && c !== null) { let b = i.o; b === null && (i.o = b = /* @__PURE__ */ new WeakMap()); const y = b.get(c); y === void 0 ? (i = he(), b.set(c, i)) : i = y; } else { let b = i.p; b === null && (i.p = b = /* @__PURE__ */ new Map()); const y = b.get(c); y === void 0 ? (i = he(), b.set(c, i)) : i = y; } } const a = i; let d; if (i.s === tt) d = i.v; else if (d = e.apply(null, arguments), s++, o) { const I = ((h = r == null ? void 0 : r.deref) == null ? void 0 : h.call(r)) ?? r; I != null && o(I, d) && (d = I, s !== 0 && s--), r = typeof d == "object" && d !== null || typeof d == "function" ? new Ln(d) : d; } return a.s = tt, a.v = d, d; } return u.clearCache = () => { n = he(), u.resetResultsCount(); }, u.resultsCount = () => s, u.resetResultsCount = () => { s = 0; }, u; } function ft(e, ...t) { const n = typeof e == "function" ? { memoize: e, memoizeOptions: t } : e, o = (...r) => { let s = 0, u = 0, i, l = {}, a = r.pop(); typeof a == "object" && (l = a, a = r.pop()), vn( a, `createSelector expects an output function after the inputs, but received: [${typeof a}]` ); const d = { ...n, ...l }, { memoize: h, memoizeOptions: I = [], argsMemoize: p = pt, argsMemoizeOptions: c = [], devModeChecks: b = {} } = d, y = He(I), x = He(c), L = Sn(r), R = h(function() { return s++, a.apply( null, arguments ); }, ...y); let V = !0; const A = p(function() { u++; const _ = et( L, arguments ); if (i = R.apply(null, _), process.env.NODE_ENV !== "production") { const { identityFunctionCheck: D, inputStabilityCheck: v } = Tn(V, b); if (D.shouldRun && D.run( a, _, i ), v.shouldRun) { const N = et( L, arguments ); v.run( { inputSelectorResults: _, inputSelectorResultsCopy: N }, { memoize: h, memoizeOptions: y }, arguments ); } V && (V = !1); } return i; }, ...x); return Object.assign(A, { resultFunc: a, memoizedResultFunc: R, dependencies: L, dependencyRecomputations: () => u, resetDependencyRecomputations: () => { u = 0; }, lastResult: () => i, recomputations: () => s, resetRecomputations: () => { s = 0; }, memoize: h, argsMemoize: p }); }; return Object.assign(o, { withTypes: () => o }), o; } var Vn = /* @__PURE__ */ ft(pt), Nn = Object.assign( (e, t = Vn) => { En( e, `createStructuredSelector expects first argument to be an object where each property is a selector, instead received a ${typeof e}` ); const n = Object.keys(e), o = n.map( (s) => e[s] ); return t( o, (...s) => s.reduce((u, i, l) => (u[n[l]] = i, u), {}) ); }, { withTypes: () => Nn } ); const Mn = ft({ memoize: Rn, memoizeOptions: { maxSize: 1, equalityCheck: Object.is } }), nt = /* @__PURE__ */ new WeakMap(), C = (...e) => (n, o) => { const r = n.cacheKey; let s = nt.get(r); s || (s = /* @__PURE__ */ new Map(), nt.set(r, s)); const u = s.get(e); if (u) return u(n, o); const i = Mn(...e); return s.set(e, i), i(n, o); }, An = (e) => e.id, mt = C(An, (e) => e.treeId); let ot = 0; const Xo = () => (ot += 1, `mui-tree-view-${ot}`), gt = ({ id: e, treeId: t = "", itemId: n }) => e ?? `${t}-${n}`, bt = /* @__PURE__ */ P.createContext(null); process.env.NODE_ENV !== "production" && (bt.displayName = "TreeViewContext"); const Te = () => { const e = P.useContext(bt); if (e == null) 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(` `)); return e; }, yt = /* @__PURE__ */ P.createContext({ classes: {}, slots: {}, slotProps: {} }); process.env.NODE_ENV !== "production" && (yt.displayName = "TreeViewStyleContext"); const ht = () => P.useContext(yt), Ae = "__TREE_VIEW_ROOT_PARENT_ID__", Yo = (e) => { const t = {}; return e.forEach((n, o) => { t[n] = o; }), t; }, Ve = (e, t) => { if (t == null) return !1; let n = e[t]; if (!n) return !1; if (n.disabled) return !0; for (; n.parentId != null; ) { if (n = e[n.parentId], !n) return !1; if (n.disabled) return !0; } return !1; }, It = /* @__PURE__ */ P.createContext(() => -1); process.env.NODE_ENV !== "production" && (It.displayName = "TreeViewItemDepthContext"); const re = (e) => e.items, Jo = C(re, (e) => e.loading), Qo = C(re, (e) => e.error), Pe = C(re, (e) => e.itemMetaLookup), Pn = [], q = C([re, (e, t) => t], (e, t) => e.itemOrderedChildrenIdsLookup[t ?? Ae] ?? Pn), zn = C([re, (e, t) => t], (e, t) => e.itemModelLookup[t]), U = C([Pe, (e, t) => t], (e, t) => e[t ?? Ae] ?? null), xe = C([Pe, (e, t) => t], Ve), ze = C([re, U], (e, t) => t == null ? -1 : e.itemChildrenIndexesLookup[t.parentId ?? Ae][t.id]), rt = C([U], (e) => (e == null ? void 0 : e.parentId) ?? null), Zo = C([U], (e) => (e == null ? void 0 : e.depth) ?? 0), vt = C([re], (e) => e.disabledItemsFocusable), ne = C([vt, xe], (e, t) => e ? !0 : !t), Et = (e) => e.expansion, jn = C([Et], (e) => e.expandedItems), Ct = C([jn], (e) => { const t = /* @__PURE__ */ new Map(); return e.forEach((n) => { t.set(n, !0); }), t; }), se = C([Ct, (e, t) => t], (e, t) => e.has(t)), St = C([U], (e) => (e == null ? void 0 : e.expandable) ?? !1), it = C([Et], (e) => e.expansionTrigger), Ne = (e, t) => { let n = t.length - 1; for (; n >= 0 && !ne(e, t[n]); ) n -= 1; if (n !== -1) return t[n]; }, $n = (e, t) => { const n = U(e, t); if (!n) return null; const o = q(e, n.parentId), r = ze(e, t); if (r === 0) return n.parentId; let s = r - 1; for (; !ne(e, o[s]) && s >= 0; ) s -= 1; if (s === -1) return n.parentId == null ? null : $n(e, n.parentId); let u = o[s], i = Ne(e, q(e, u)); for (; se(e, u) && i != null; ) u = i, i = Ne(e, q(e, u)); return u; }, Kn = (e, t) => { if (se(e, t)) { const o = q(e, t).find((r) => ne(e, r)); if (o != null) return o; } let n = U(e, t); for (; n != null; ) { const o = q(e, n.parentId), r = ze(e, n.id); if (r < o.length - 1) { let s = r + 1; for (; !ne(e, o[s]) && s < o.length - 1; ) s += 1; if (ne(e, o[s])) return o[s]; } n = U(e, n.parentId); } return null; }, Ho = (e) => { let t = null; for (; t == null || se(e, t); ) { const n = q(e, t), o = Ne(e, n); if (o == null) return t; t = o; } return t; }, Fn = (e) => q(e, null).find((t) => ne(e, t)), Wn = (e, t, n) => { if (t === n) return [t, n]; const o = U(e, t), r = U(e, n); if (!o || !r) return [t, n]; if (o.parentId === r.id || r.parentId === o.id) return r.parentId === o.id ? [o.id, r.id] : [r.id, o.id]; const s = [o.id], u = [r.id]; let i = o.parentId, l = r.parentId, a = u.indexOf(i) !== -1, d = s.indexOf(l) !== -1, h = !0, I = !0; for (; !d && !a; ) h && (s.push(i), a = u.indexOf(i) !== -1, h = i !== null, !a && h && (i = rt(e, i))), I && !a && (u.push(l), d = s.indexOf(l) !== -1, I = l !== null, !d && I && (l = rt(e, l))); const p = a ? i : l, c = q(e, p), b = s[s.indexOf(p) - 1], y = u[u.indexOf(p) - 1]; return c.indexOf(b) < c.indexOf(y) ? [t, n] : [n, t]; }, er = (e, t, n) => { const o = (l) => { if (St(e, l) && se(e, l)) return q(e, l)[0]; let a = U(e, l); for (; a != null; ) { const d = q(e, a.parentId), h = ze(e, a.id); if (h < d.length - 1) return d[h + 1]; a = a.parentId ? U(e, a.parentId) : null; } throw new Error("Invalid range"); }, [r, s] = Wn(e, t, n), u = [r]; let i = r; for (; i !== s; ) i = o(i), xe(e, i) || u.push(i); return u; }, tr = (e) => { let t = Fn(e); const n = []; for (; t != null; ) n.push(t), t = Kn(e, t); return n; }, st = (e, t) => t !== e.closest('*[role="treeitem"]'), pe = (e) => e.selection, Bn = C([pe], (e) => e.selectedItems), Tt = C([Bn], (e) => Array.isArray(e) ? e : e != null ? [e] : []), Gn = C([Tt], (e) => { const t = /* @__PURE__ */ new Map(); return e.forEach((n) => { t.set(n, !0); }), t; }), qn = C([Gn, (e, t) => t], (e, t) => e.has(t)), Un = C([pe], (e) => e.isEnabled && e.isMultiSelectEnabled), Xn = C([pe], (e) => e.isEnabled), Yn = C([pe], (e) => e.isCheckboxSelectionEnabled), Jn = C([xe, Xn], (e, t) => t && !e), nr = C([pe], (e) => e.selectionPropagation), Qn = (e) => e.focus, Zn = C([Tt, Ct, Pe, vt, (e) => q(e, null)], (e, t, n, o, r) => { const s = e.find((i) => { if (!o && Ve(n, i)) return !1; const l = n[i]; return l && (l.parentId == null || t.has(l.parentId)); }); if (s != null) return s; const u = r.find((i) => o || !Ve(n, i)); return u ?? null; }), Hn = C([Zn, (e, t) => t], (e, t) => e === t), eo = C(Qn, (e) => e.focusedItemId), to = C([eo, (e, t) => t], (e, t) => e === t), Le = (e, t) => e.getAvailablePlugins().has(t), je = (e) => e.label, $e = C([je, (e, t) => zn(e, t)], (e, t) => !t || !e ? !1 : typeof e.isItemEditable == "boolean" ? e.isItemEditable : e.isItemEditable(t)), Ie = C([je, (e, t) => t], (e, t) => t ? (e == null ? void 0 : e.editedItemId) === t : !1); C(je, (e) => !!(e != null && e.editedItemId)); const no = ({ props: e }) => { const { store: t } = Te(), { label: n, itemId: o } = e, [r, s] = P.useState(n), u = M(t, $e, o), i = M(t, Ie, o); return P.useEffect(() => { i || s(n); }, [i, n]), { propsEnhancers: { label: () => ({ editable: u }), labelInput: ({ externalEventHandlers: l, interactions: a }) => u ? { value: r ?? "", "data-element": "labelInput", onChange: (p) => { var c; (c = l.onChange) == null || c.call(l, p), s(p.target.value); }, onKeyDown: (p) => { var b; if ((b = l.onKeyDown) == null || b.call(l, p), p.defaultMuiPrevented) return; const c = p.target; p.key === "Enter" && c.value ? a.handleSaveItemLabel(p, c.value) : p.key === "Escape" && a.handleCancelItemLabelEditing(p); }, onBlur: (p) => { var c; (c = l.onBlur) == null || c.call(l, p), !p.defaultMuiPrevented && p.target.value && a.handleSaveItemLabel(p, p.target.value); }, autoFocus: !0, type: "text" } : {} } }; }, oe = ({ store: e, params: t }) => { const n = (r) => { r !== null && !$e(e.value, r) || e.update((s) => E({}, s, { label: E({}, s.label, { editedItemId: r }) })); }, o = (r, s) => { if (!s) 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.", r].join(` `)); e.update((u) => { const i = u.items.itemMetaLookup[r]; return i.label !== s ? E({}, u, { items: E({}, u.items, { itemMetaLookup: E({}, u.items.itemMetaLookup, { [r]: E({}, i, { label: s }) }) }) }) : u; }), t.onItemLabelChange && t.onItemLabelChange(r, s); }; return Ft(() => { e.update((r) => E({}, r, { label: E({}, r.label, { isItemEditable: t.isItemEditable }) })); }, [e, t.isItemEditable]), { instance: { setEditedItem: n, updateItemLabel: o }, publicAPI: { setEditedItem: n, updateItemLabel: o } }; }; oe.itemPlugin = no; oe.applyDefaultValuesToParams = ({ params: e }) => E({}, e, { isItemEditable: e.isItemEditable ?? !1 }); oe.getInitialState = (e) => ({ label: { isItemEditable: e.isItemEditable, editedItemId: null } }); oe.params = { onItemLabelChange: !0, isItemEditable: !0 }; const oo = (e) => e.lazyLoading, ro = (e) => e.lazyLoading, xt = C([oo], (e) => e.dataSource), io = C([ro], (e) => !!(e != null && e.enabled)), so = C([xt, (e, t) => t], (e, t) => e.loading[t] || !1), ao = C([xt, (e, t) => t], (e, t) => e.errors[t] || null), wt = (e) => Array.isArray(e) ? e.length > 0 && e.some(wt) : !!e, lo = ({ itemId: e, children: t }) => { const { instance: n, store: o, publicAPI: r } = Te(), s = M(o, St, e), u = M(o, io), i = M(o, Un), l = M(o, (v) => u ? so(v, e) : !1), a = M(o, (v) => u ? !!ao(v, e) : !1), d = wt(t) || s, h = M(o, se, e), I = M(o, to, e), p = M(o, qn, e), c = M(o, xe, e), b = M(o, Ie, e), y = M(o, $e, e), x = { expandable: d, expanded: h, focused: I, selected: p, disabled: c, editing: b, editable: y, loading: l, error: a }, L = (v) => { if (x.disabled) return; x.focused || n.focusItem(v, e); const N = i && (v.shiftKey || v.ctrlKey || v.metaKey); x.expandable && !(N && se(o.value, e)) && n.setItemExpansion({ event: v, itemId: e }); }, R = (v) => { if (x.disabled) return; !x.focused && !x.editing && n.focusItem(v, e), i && (v.shiftKey || v.ctrlKey || v.metaKey) ? v.shiftKey ? n.expandSelectionRange(v, e) : n.setItemSelection({ event: v, itemId: e, keepExistingSelection: !0 }) : n.setItemSelection({ event: v, itemId: e, shouldBeSelected: !0 }); }, V = (v) => { const N = v.nativeEvent.shiftKey; i && N ? n.expandSelectionRange(v, e) : n.setItemSelection({ event: v, itemId: e, keepExistingSelection: i, shouldBeSelected: v.target.checked }); }, A = () => { Le(n, oe) && (b ? n.setEditedItem(null) : n.setEditedItem(e)); }; return { interactions: { handleExpansion: L, handleSelection: R, handleCheckboxSelection: V, toggleItemEditing: A, handleSaveItemLabel: (v, N) => { Le(n, oe) && Ie(o.value, e) && (n.updateItemLabel(e, N), A(), n.focusItem(v, e)); }, handleCancelItemLabelEditing: (v) => { Le(n, oe) && Ie(o.value, e) && (A(), n.focusItem(v, e)); } }, status: x, publicAPI: r }; }, Ot = (e) => { const { runItemPlugins: t, instance: n, publicAPI: o, store: r } = Te(), s = P.useContext(It), u = M(r, (...g) => typeof s == "function" ? s(...g) : s, e.itemId), { id: i, itemId: l, label: a, children: d, rootRef: h } = e, { rootRef: I, contentRef: p, propsEnhancers: c } = t(e), { interactions: b, status: y } = lo({ itemId: l, children: d }), x = P.useRef(null), L = P.useRef(null), R = ke(h, I, x), V = ke(p, L), A = P.useRef(null), w = M(r, mt), _ = M(r, Jn, l), D = M(r, Yn), v = gt({ itemId: l, treeId: w, id: i }), N = M(r, Hn, l), F = { rootRefObject: x, contentRefObject: L, interactions: b }, J = (g) => (f) => { var S; (S = g.onFocus) == null || S.call(g, f), !f.defaultMuiPrevented && !y.focused && ne(r.value, l) && f.currentTarget === f.target && n.focusItem(f, l); }, Q = (g) => (f) => { var k, z, te, Fe, We; if ((k = g.onBlur) == null || k.call(g, f), f.defaultMuiPrevented) return; const S = n.getItemDOMElement(l); y.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 // 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 f.relatedTarget && st(f.relatedTarget, S) && (f.target && ((te = (z = f.target) == null ? void 0 : z.dataset) == null ? void 0 : te.element) === "labelInput" && st(f.target, S) || ((We = (Fe = f.relatedTarget) == null ? void 0 : Fe.dataset) == null ? void 0 : We.element) === "labelInput") || n.removeFocusedItem(); }, X = (g) => (f) => { var S, k, z; (S = g.onKeyDown) == null || S.call(g, f), !(f.defaultMuiPrevented || ((z = (k = f.target) == null ? void 0 : k.dataset) == null ? void 0 : z.element) === "labelInput") && n.handleItemKeyDown(f, l); }, Z = (g) => (f) => { var S; (S = g.onDoubleClick) == null || S.call(g, f), !f.defaultMuiPrevented && b.toggleItemEditing(); }, ie = (g) => (f) => { var S, k; (S = g.onClick) == null || S.call(g, f), n.handleItemClick(f, l), !(f.defaultMuiPrevented || (k = A.current) != null && k.contains(f.target)) && (it(r.value) === "content" && b.handleExpansion(f), D || b.handleSelection(f)); }, Y = (g) => (f) => { var S; (S = g.onMouseDown) == null || S.call(g, f), !f.defaultMuiPrevented && (f.shiftKey || f.ctrlKey || f.metaKey || y.disabled) && f.preventDefault(); }, H = (g) => (f) => { var S; (S = g.onClick) == null || S.call(g, f), !f.defaultMuiPrevented && it(r.value) === "iconContainer" && b.handleExpansion(f); }; return { getContextProviderProps: () => ({ itemId: l, id: i }), getRootProps: (g = {}) => { var te; const f = E({}, B(e), B(g)); let S; y.selected ? S = !0 : _ ? S = !1 : S = void 0; const k = E({}, f, { ref: R, role: "treeitem", tabIndex: N ? 0 : -1, id: v, "aria-expanded": y.expandable ? y.expanded : void 0, "aria-selected": S, "aria-disabled": y.disabled || void 0 }, g, { style: E({}, g.style ?? {}, { "--TreeView-itemDepth": u }), onFocus: J(f), onBlur: Q(f), onKeyDown: X(f) }), z = ((te = c.root) == null ? void 0 : te.call(c, E({}, F, { externalEventHandlers: f }))) ?? {}; return E({}, k, z); }, getContentProps: (g = {}) => { var z; const f = B(g), S = E({}, f, g, { ref: V, onClick: ie(f), onMouseDown: Y(f), status: y }); ["expanded", "selected", "focused", "disabled", "editing", "editable"].forEach((te) => { y[te] && (S[`data-${te}`] = ""); }); const k = ((z = c.content) == null ? void 0 : z.call(c, E({}, F, { externalEventHandlers: f }))) ?? {}; return E({}, S, k); }, getGroupTransitionProps: (g = {}) => { const f = B(g); return E({}, f, { unmountOnExit: !0, component: "ul", role: "group", in: y.expanded, children: d }, g); }, getIconContainerProps: (g = {}) => { const f = B(g); return E({}, f, g, { onClick: H(f) }); }, getCheckboxProps: (g = {}) => { var z; const f = B(g), S = E({}, f, { ref: A }, g), k = ((z = c.checkbox) == null ? void 0 : z.call(c, E({}, F, { externalEventHandlers: f }))) ?? {}; return E({}, S, k); }, getLabelProps: (g = {}) => { var z; const f = E({}, B(g)), S = E({}, f, { children: a }, g, { onDoubleClick: Z(f) }), k = ((z = c.label) == null ? void 0 : z.call(c, E({}, F, { externalEventHandlers: f }))) ?? {}; return E({}, k, S); }, getLabelInputProps: (g = {}) => { var k; const f = B(g), S = ((k = c.labelInput) == null ? void 0 : k.call(c, E({}, F, { externalEventHandlers: f }))) ?? {}; return E({}, g, S); }, getDragAndDropOverlayProps: (g = {}) => { var k; const f = B(g), S = ((k = c.dragAndDropOverlay) == null ? void 0 : k.call(c, E({}, F, { externalEventHandlers: f }))) ?? {}; return E({}, g, S); }, getErrorContainerProps: (g = {}) => { const f = B(g); return E({}, f, g); }, getLoadingContainerProps: (g = {}) => { const f = B(g); return E({ size: "12px", thickness: 6 }, f, g); }, rootRef: R, status: y, publicAPI: o }; }; function co(e) { return ct("MuiTreeItem", e); } lt("MuiTreeItem", [ "root", "content", "groupTransition", "iconContainer", "label", "checkbox", "labelInput", "dragAndDropOverlay", "errorIcon", "loadingIcon", // State classes, will be replaced by data-attrs in the next major "expanded", "selected", "focused", "disabled", "editable", "editing" ]); const uo = Ce(/* @__PURE__ */ O("path", { d: "M10 6 8.59 7.41 13.17 12l-4.58 4.59L10 18l6-6z" }), "TreeViewExpandIcon"), po = Ce(/* @__PURE__ */ O("path", { d: "M16.59 8.59 12 13.17 7.41 8.59 6 10l6 6 6-6z" }), "TreeViewCollapseIcon"); function _t(e) { const { slots: t, slotProps: n, status: o } = e, { slots: r, slotProps: s } = ht(), u = { collapseIcon: (t == null ? void 0 : t.collapseIcon) ?? r.collapseIcon ?? po, expandIcon: (t == null ? void 0 : t.expandIcon) ?? r.expandIcon ?? uo, endIcon: (t == null ? void 0 : t.endIcon) ?? r.endIcon, icon: t == null ? void 0 : t.icon }; let i; u != null && u.icon ? i = "icon" : o.expandable ? o.expanded ? i = "collapseIcon" : i = "expandIcon" : i = "endIcon"; const l = u[i], a = G({ elementType: l, externalSlotProps: (d) => E({}, Ge(s[i], d), Ge(n == null ? void 0 : n[i], d)), // TODO: Add proper ownerState ownerState: {} }); return l ? /* @__PURE__ */ O(l, E({}, a)) : null; } process.env.NODE_ENV !== "production" && (_t.propTypes = { // ----------------------------- Warning -------------------------------- // | These PropTypes are generated from the TypeScript type definitions | // | To update them edit the TypeScript types and run "pnpm proptypes" | // ---------------------------------------------------------------------- /** * The props used for each component slot. * @default {} */ slotProps: m.object, /** * Overridable component slots. * @default {} */ slots: m.object, status: m.shape({ disabled: m.bool.isRequired, editable: m.bool.isRequired, editing: m.bool.isRequired, error: m.bool.isRequired, expandable: m.bool.isRequired, expanded: m.bool.isRequired, focused: m.bool.isRequired, loading: m.bool.isRequired, selected: m.bool.isRequired }).isRequired }); const fo = K("div", { name: "MuiTreeItemDragAndDropOverlay", slot: "Root", shouldForwardProp: (e) => Me(e) && e !== "action" })(({ theme: e }) => ({ position: "absolute", left: 0, display: "flex", top: 0, bottom: 0, right: 0, pointerEvents: "none", variants: [{ props: { action: "make-child" }, style: { marginLeft: "calc(var(--TreeView-indentMultiplier) * var(--TreeView-itemDepth))", borderRadius: e.shape.borderRadius, backgroundColor: e.vars ? `rgba(${e.vars.palette.primary.darkChannel} / ${e.vars.palette.action.focusOpacity})` : ue(e.palette.primary.dark, e.palette.action.focusOpacity) } }, { props: { action: "reorder-above" }, style: { marginLeft: "calc(var(--TreeView-indentMultiplier) * var(--TreeView-itemDepth))", borderTop: `1px solid ${(e.vars || e).palette.action.active}` } }, { props: { action: "reorder-below" }, style: { marginLeft: "calc(var(--TreeView-indentMultiplier) * var(--TreeView-itemDepth))", borderBottom: `1px solid ${(e.vars || e).palette.action.active}` } }, { props: { action: "move-to-parent" }, style: { marginLeft: "calc(var(--TreeView-indentMultiplier) * calc(var(--TreeView-itemDepth) - 1))", borderBottom: `1px solid ${(e.vars || e).palette.action.active}` } }] })); function Rt(e) { return e.action == null ? null : /* @__PURE__ */ O(fo, E({}, e)); } process.env.NODE_ENV !== "production" && (Rt.propTypes = { // ----------------------------- Warning -------------------------------- // | These PropTypes are generated from the TypeScript type definitions | // | To update them edit the TypeScript types and run "pnpm proptypes" | // ---------------------------------------------------------------------- action: m.oneOf(["make-child", "move-to-parent", "reorder-above", "reorder-below"]), style: m.object }); function Ke(e) { const { children: t, itemId: n, id: o } = e, { wrapItem: r, instance: s, store: u } = Te(), i = M(u, mt), l = gt({ itemId: n, treeId: i, id: o }); return /* @__PURE__ */ O(P.Fragment, { children: r({ children: t, itemId: n, instance: s, idAttribute: l }) }); } process.env.NODE_ENV !== "production" && (Ke.propTypes = { // ----------------------------- Warning -------------------------------- // | These PropTypes are generated from the TypeScript type definitions | // | To update them edit the TypeScript types and run "pnpm proptypes" | // ---------------------------------------------------------------------- children: m.node, id: m.string, itemId: m.string.isRequired }); const mo = K("input", { name: "MuiTreeItem", slot: "LabelInput" })(({ theme: e }) => E({}, e.typography.body1, { width: "100%", backgroundColor: (e.vars || e).palette.background.paper, borderRadius: e.shape.borderRadius, border: "none", padding: "0 2px", boxSizing: "border-box", "&:focus": { outline: `1px solid ${(e.vars || e).palette.primary.main}` } })), go = ["visible"], bo = ["id", "itemId", "label", "disabled", "children", "slots", "slotProps", "classes"], yo = cn(), Dt = K("li", { name: "MuiTreeItem", slot: "Root" })({ listStyle: "none", margin: 0, padding: 0, outline: 0 }), Lt = K("div", { name: "MuiTreeItem", slot: "Content", shouldForwardProp: (e) => Me(e) && e !== "status" })(({ theme: e }) => ({ padding: e.spacing(0.5, 1), paddingLeft: `calc(${e.spacing(1)} + var(--TreeView-itemChildrenIndentation) * var(--TreeView-itemDepth))`, borderRadius: e.shape.borderRadius, width: "100%", boxSizing: "border-box", // prevent width + padding to overflow position: "relative", display: "flex", alignItems: "center", gap: e.spacing(1), cursor: "pointer", WebkitTapHighlightColor: "transparent", "&:hover": { backgroundColor: (e.vars || e).palette.action.hover, // Reset on touch devices, it doesn't add specificity "@media (hover: none)": { backgroundColor: "transparent" } }, "&[data-disabled]": { opacity: (e.vars || e).palette.action.disabledOpacity, backgroundColor: "transparent" }, "&[data-focused]": { backgroundColor: (e.vars || e).palette.action.focus }, "&[data-selected]": { backgroundColor: e.vars ? `rgba(${e.vars.palette.primary.mainChannel} / ${e.vars.palette.action.selectedOpacity})` : ue(e.palette.primary.main, e.palette.action.selectedOpacity), "&:hover": { backgroundColor: e.vars ? `rgba(${e.vars.palette.primary.mainChannel} / calc(${e.vars.palette.action.s