@hybridcore/ui 1.0.2 → 1.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (103) hide show
  1. package/dist/Button-BZR43NHz.js +2025 -0
  2. package/dist/ButtonBase-B6WYZgVU.js +967 -0
  3. package/dist/CardContent-C8PxkJz4.js +73 -0
  4. package/dist/Checkbox-CxbQ9tJ5.js +673 -0
  5. package/dist/FormControl-C4PmH1vh.js +1491 -0
  6. package/dist/IconButton-CKHPuOyh.js +183 -0
  7. package/dist/Input-CH_JyT5B.js +324 -0
  8. package/dist/List-BX_5LP1i.js +132 -0
  9. package/dist/Object-DBPgar-D.js +688 -0
  10. package/dist/OutlinedInput-gnp48tDo.js +452 -0
  11. package/dist/Paper-CaiWdndQ.js +162 -0
  12. package/dist/Select-DOyHt8I_.js +2526 -0
  13. package/dist/Source-Bo1Eq6y-.js +4374 -0
  14. package/dist/Text-DVP2PrYM.js +2192 -0
  15. package/dist/Typography-XIiVCSto.js +178 -0
  16. package/dist/assertThisInitialized-BUtkG-md.js +13 -0
  17. package/dist/assets/index.css +1 -0
  18. package/dist/assets/index2.css +1 -0
  19. package/dist/chainPropTypes-DtBfUj5o.js +96 -0
  20. package/dist/components/access/helpers.js +32 -0
  21. package/dist/components/access/index.js +15 -0
  22. package/dist/components/card/index.js +159 -469
  23. package/dist/components/card/styled.js +75 -7
  24. package/dist/components/conditional-wrapper/index.js +9 -0
  25. package/dist/components/confirm/dialog.js +151 -0
  26. package/dist/components/confirm/index.js +23 -0
  27. package/dist/components/container/index.js +270 -0
  28. package/dist/components/context-menu/index.js +973 -0
  29. package/dist/components/data-management/instance-form/components/composite-list/index.js +12 -0
  30. package/dist/components/data-management/instance-form/components/composite-list/styled.js +64 -0
  31. package/dist/components/data-management/instance-form/components/policy-list/index.js +86 -0
  32. package/dist/components/data-management/instance-form/components/variable/index.js +15 -0
  33. package/dist/components/data-management/instance-form/components/variables/index.js +39 -0
  34. package/dist/components/data-management/instance-form/index.js +437 -0
  35. package/dist/components/data-security-selectors/dissemination-list/index.js +3201 -0
  36. package/dist/components/data-security-selectors/security-level/index.js +81 -0
  37. package/dist/components/date-time-picker/index.js +103 -0
  38. package/dist/components/geometry-picker/coordinate/index.js +93 -0
  39. package/dist/components/geometry-picker/edit/index.js +71 -0
  40. package/dist/components/geometry-picker/geometry/index.js +160 -0
  41. package/dist/components/geometry-picker/geometry/map-overlay.js +22 -0
  42. package/dist/components/geometry-picker/index.js +140 -0
  43. package/dist/components/geometry-picker/kml/index.js +62 -0
  44. package/dist/components/geometry-picker/kml/select-input-method.js +75 -0
  45. package/dist/components/geometry-picker/logic.js +69 -0
  46. package/dist/components/geometry-picker/map/index.js +42 -0
  47. package/dist/components/geometry-picker/map/logic.js +2360 -0
  48. package/dist/components/geometry-picker/map/style.js +88 -0
  49. package/dist/components/geometry-picker/parser/coordinate-input/index.js +78 -0
  50. package/dist/components/geometry-picker/parser/coordinate-input/logic.js +1305 -0
  51. package/dist/components/geometry-picker/parser/index.js +179 -0
  52. package/dist/components/geometry-picker/parser/logic.js +84 -0
  53. package/dist/components/geometry-picker/parser/styled.js +25 -0
  54. package/dist/components/geometry-picker/styled.js +48 -0
  55. package/dist/components/geometry-picker/wkt/index.js +59 -0
  56. package/dist/components/geometry-picker/wkt/select-input-method.js +75 -0
  57. package/dist/components/icon-button/index.js +18 -0
  58. package/dist/components/icon-button/styled.js +51 -0
  59. package/dist/components/key-protection/index.js +4 -0
  60. package/dist/components/key-protection/menu.js +85 -0
  61. package/dist/components/key-protection/utils.js +10 -0
  62. package/dist/components/loading/index.js +7 -0
  63. package/dist/components/loading/styled.js +16 -0
  64. package/dist/components/map/helpers/kml.js +45 -0
  65. package/dist/components/map/helpers/mapbox.js +48 -0
  66. package/dist/components/map/helpers/ol.js +25 -0
  67. package/dist/components/map/helpers/wkt.js +29 -0
  68. package/dist/components/map/index.js +30 -0
  69. package/dist/components/map/logic.js +140 -0
  70. package/dist/components/map/styled.js +8 -0
  71. package/dist/components/phone-input/index.js +25 -0
  72. package/dist/components/phone-input/styled.js +26 -0
  73. package/dist/components/search-input/index.js +76 -0
  74. package/dist/components/tree-select/index.js +70 -0
  75. package/dist/components/tree-select/styled.js +64 -0
  76. package/dist/components/treeview-filter/index.js +621 -0
  77. package/dist/components/treeview-filter/item/index.js +7 -0
  78. package/dist/components/treeview-filter/item-label/index.js +44 -0
  79. package/dist/createTheme-agWfFD64.js +2392 -0
  80. package/dist/exactProp-CI8dagM-.js +36 -0
  81. package/dist/extends-C3382pL0.js +22 -0
  82. package/dist/hooks/useMenuLogic.js +21 -0
  83. package/dist/hooks/useToggle.js +23 -0
  84. package/dist/index-BQE8B4sc.js +957 -0
  85. package/dist/index-DHFb1Qpn.js +1105 -0
  86. package/dist/isHostComponent-kiaBvYVo.js +6 -0
  87. package/dist/isMuiElement-CxT3_ACP.js +13 -0
  88. package/dist/main.d.ts +646 -0
  89. package/dist/ol-CMEkXXLJ.js +15041 -0
  90. package/dist/ownerDocument-CUrv0DIK.js +6 -0
  91. package/dist/ownerWindow-niciwP7I.js +7 -0
  92. package/dist/styled-B22KrhDR.js +229 -0
  93. package/dist/styled-Iq9jsO4F.js +1033 -0
  94. package/dist/useFormControl-CatNKXAi.js +10 -0
  95. package/dist/useId-BHG98T5I.js +26 -0
  96. package/dist/useTheme-C0Dky5rV.js +17 -0
  97. package/dist/useTheme-CeyGVuQP.js +10 -0
  98. package/dist/useThemeProps-CzAjOL6F.js +26 -0
  99. package/dist/utils/ontology.js +37 -0
  100. package/dist/utils-Bq0ye5vf.js +115 -0
  101. package/dist/utils-C13eMoWa.js +365 -0
  102. package/package.json +26 -5
  103. package/dist/styled-BG5UIpPU.js +0 -3459
@@ -0,0 +1,973 @@
1
+ import { jsx as b, jsxs as U, Fragment as ye } from "react/jsx-runtime";
2
+ import * as l from "react";
3
+ import { P as t } from "../../createTheme-agWfFD64.js";
4
+ import { u as H, a as be, B as se, b as ne, e as ge } from "../../ButtonBase-B6WYZgVU.js";
5
+ import { o as z } from "../../ownerDocument-CUrv0DIK.js";
6
+ import { e as ve, a as Ie } from "../../exactProp-CI8dagM-.js";
7
+ import { L, g as Ce, l as ee, a as xe, b as he } from "../../List-BX_5LP1i.js";
8
+ import { a as u, _ as $ } from "../../extends-C3382pL0.js";
9
+ import { u as M, c as T, a as w, g as Y, b as Le } from "../../chainPropTypes-DtBfUj5o.js";
10
+ import { s as A, g as q, r as Te, a as h } from "../../styled-Iq9jsO4F.js";
11
+ import { i as ae } from "../../isMuiElement-CxT3_ACP.js";
12
+ import { i as te } from "../../isHostComponent-kiaBvYVo.js";
13
+ import { T as F } from "../../Typography-XIiVCSto.js";
14
+ function oe(e) {
15
+ return e.substring(2).toLowerCase();
16
+ }
17
+ function Oe(e, o) {
18
+ return o.documentElement.clientWidth < e.clientX || o.documentElement.clientHeight < e.clientY;
19
+ }
20
+ function _(e) {
21
+ const {
22
+ children: o,
23
+ disableReactTree: s = !1,
24
+ mouseEvent: n = "onClick",
25
+ onClickAway: c,
26
+ touchEvent: i = "onTouchEnd"
27
+ } = e, d = l.useRef(!1), r = l.useRef(null), m = l.useRef(!1), f = l.useRef(!1);
28
+ l.useEffect(() => (setTimeout(() => {
29
+ m.current = !0;
30
+ }, 0), () => {
31
+ m.current = !1;
32
+ }), []);
33
+ const C = H(
34
+ // @ts-expect-error TODO upstream fix
35
+ o.ref,
36
+ r
37
+ ), g = be((a) => {
38
+ const p = f.current;
39
+ f.current = !1;
40
+ const y = z(r.current);
41
+ if (!m.current || !r.current || "clientX" in a && Oe(a, y))
42
+ return;
43
+ if (d.current) {
44
+ d.current = !1;
45
+ return;
46
+ }
47
+ let v;
48
+ a.composedPath ? v = a.composedPath().indexOf(r.current) > -1 : v = !y.documentElement.contains(
49
+ // @ts-expect-error returns `false` as intended when not dispatched from a Node
50
+ a.target
51
+ ) || r.current.contains(
52
+ // @ts-expect-error returns `false` as intended when not dispatched from a Node
53
+ a.target
54
+ ), !v && (s || !p) && c(a);
55
+ }), x = (a) => (p) => {
56
+ f.current = !0;
57
+ const y = o.props[a];
58
+ y && y(p);
59
+ }, I = {
60
+ ref: C
61
+ };
62
+ return i !== !1 && (I[i] = x(i)), l.useEffect(() => {
63
+ if (i !== !1) {
64
+ const a = oe(i), p = z(r.current), y = () => {
65
+ d.current = !0;
66
+ };
67
+ return p.addEventListener(a, g), p.addEventListener("touchmove", y), () => {
68
+ p.removeEventListener(a, g), p.removeEventListener("touchmove", y);
69
+ };
70
+ }
71
+ }, [g, i]), n !== !1 && (I[n] = x(n)), l.useEffect(() => {
72
+ if (n !== !1) {
73
+ const a = oe(n), p = z(r.current);
74
+ return p.addEventListener(a, g), () => {
75
+ p.removeEventListener(a, g);
76
+ };
77
+ }
78
+ }, [g, n]), /* @__PURE__ */ b(l.Fragment, {
79
+ children: /* @__PURE__ */ l.cloneElement(o, I)
80
+ });
81
+ }
82
+ process.env.NODE_ENV !== "production" && (_.propTypes = {
83
+ // ----------------------------- Warning --------------------------------
84
+ // | These PropTypes are generated from the TypeScript type definitions |
85
+ // | To update them edit TypeScript types and run "yarn proptypes" |
86
+ // ----------------------------------------------------------------------
87
+ /**
88
+ * The wrapped element.
89
+ */
90
+ children: ve.isRequired,
91
+ /**
92
+ * If `true`, the React tree is ignored and only the DOM tree is considered.
93
+ * This prop changes how portaled elements are handled.
94
+ * @default false
95
+ */
96
+ disableReactTree: t.bool,
97
+ /**
98
+ * The mouse event to listen to. You can disable the listener by providing `false`.
99
+ * @default 'onClick'
100
+ */
101
+ mouseEvent: t.oneOf(["onClick", "onMouseDown", "onMouseUp", "onPointerDown", "onPointerUp", !1]),
102
+ /**
103
+ * Callback fired when a "click away" event is detected.
104
+ */
105
+ onClickAway: t.func.isRequired,
106
+ /**
107
+ * The touch event to listen to. You can disable the listener by providing `false`.
108
+ * @default 'onTouchEnd'
109
+ */
110
+ touchEvent: t.oneOf(["onTouchEnd", "onTouchStart", !1])
111
+ });
112
+ process.env.NODE_ENV !== "production" && (_.propTypes = Ie(_.propTypes));
113
+ const Re = ["className"], Ne = (e) => {
114
+ const {
115
+ alignItems: o,
116
+ classes: s
117
+ } = e;
118
+ return w({
119
+ root: ["root", o === "flex-start" && "alignItemsFlexStart"]
120
+ }, Ce, s);
121
+ }, Pe = A("div", {
122
+ name: "MuiListItemIcon",
123
+ slot: "Root",
124
+ overridesResolver: (e, o) => {
125
+ const {
126
+ ownerState: s
127
+ } = e;
128
+ return [o.root, s.alignItems === "flex-start" && o.alignItemsFlexStart];
129
+ }
130
+ })(({
131
+ theme: e,
132
+ ownerState: o
133
+ }) => u({
134
+ minWidth: 56,
135
+ color: (e.vars || e).palette.action.active,
136
+ flexShrink: 0,
137
+ display: "inline-flex"
138
+ }, o.alignItems === "flex-start" && {
139
+ marginTop: 8
140
+ })), re = /* @__PURE__ */ l.forwardRef(function(o, s) {
141
+ const n = M({
142
+ props: o,
143
+ name: "MuiListItemIcon"
144
+ }), {
145
+ className: c
146
+ } = n, i = $(n, Re), d = l.useContext(L), r = u({}, n, {
147
+ alignItems: d.alignItems
148
+ }), m = Ne(r);
149
+ return /* @__PURE__ */ b(Pe, u({
150
+ className: T(m.root, c),
151
+ ownerState: r,
152
+ ref: s
153
+ }, i));
154
+ });
155
+ process.env.NODE_ENV !== "production" && (re.propTypes = {
156
+ // ┌────────────────────────────── Warning ──────────────────────────────┐
157
+ // │ These PropTypes are generated from the TypeScript type definitions. │
158
+ // │ To update them, edit the d.ts file and run `pnpm proptypes`. │
159
+ // └─────────────────────────────────────────────────────────────────────┘
160
+ /**
161
+ * The content of the component, normally `Icon`, `SvgIcon`,
162
+ * or a `@mui/icons-material` SVG icon element.
163
+ */
164
+ children: t.node,
165
+ /**
166
+ * Override or extend the styles applied to the component.
167
+ */
168
+ classes: t.object,
169
+ /**
170
+ * @ignore
171
+ */
172
+ className: t.string,
173
+ /**
174
+ * The system prop that allows defining system overrides as well as additional CSS styles.
175
+ */
176
+ sx: t.oneOfType([t.arrayOf(t.oneOfType([t.func, t.object, t.bool])), t.func, t.object])
177
+ });
178
+ const Ee = ["children", "className", "disableTypography", "inset", "primary", "primaryTypographyProps", "secondary", "secondaryTypographyProps"], $e = (e) => {
179
+ const {
180
+ classes: o,
181
+ inset: s,
182
+ primary: n,
183
+ secondary: c,
184
+ dense: i
185
+ } = e;
186
+ return w({
187
+ root: ["root", s && "inset", i && "dense", n && c && "multiline"],
188
+ primary: ["primary"],
189
+ secondary: ["secondary"]
190
+ }, xe, o);
191
+ }, Ae = A("div", {
192
+ name: "MuiListItemText",
193
+ slot: "Root",
194
+ overridesResolver: (e, o) => {
195
+ const {
196
+ ownerState: s
197
+ } = e;
198
+ return [{
199
+ [`& .${ee.primary}`]: o.primary
200
+ }, {
201
+ [`& .${ee.secondary}`]: o.secondary
202
+ }, o.root, s.inset && o.inset, s.primary && s.secondary && o.multiline, s.dense && o.dense];
203
+ }
204
+ })(({
205
+ ownerState: e
206
+ }) => u({
207
+ flex: "1 1 auto",
208
+ minWidth: 0,
209
+ marginTop: 4,
210
+ marginBottom: 4
211
+ }, e.primary && e.secondary && {
212
+ marginTop: 6,
213
+ marginBottom: 6
214
+ }, e.inset && {
215
+ paddingLeft: 56
216
+ })), ie = /* @__PURE__ */ l.forwardRef(function(o, s) {
217
+ const n = M({
218
+ props: o,
219
+ name: "MuiListItemText"
220
+ }), {
221
+ children: c,
222
+ className: i,
223
+ disableTypography: d = !1,
224
+ inset: r = !1,
225
+ primary: m,
226
+ primaryTypographyProps: f,
227
+ secondary: C,
228
+ secondaryTypographyProps: g
229
+ } = n, x = $(n, Ee), {
230
+ dense: I
231
+ } = l.useContext(L);
232
+ let a = m ?? c, p = C;
233
+ const y = u({}, n, {
234
+ disableTypography: d,
235
+ inset: r,
236
+ primary: !!a,
237
+ secondary: !!p,
238
+ dense: I
239
+ }), v = $e(y);
240
+ return a != null && a.type !== F && !d && (a = /* @__PURE__ */ b(F, u({
241
+ variant: I ? "body2" : "body1",
242
+ className: v.primary,
243
+ component: f != null && f.variant ? void 0 : "span",
244
+ display: "block"
245
+ }, f, {
246
+ children: a
247
+ }))), p != null && p.type !== F && !d && (p = /* @__PURE__ */ b(F, u({
248
+ variant: "body2",
249
+ className: v.secondary,
250
+ color: "text.secondary",
251
+ display: "block"
252
+ }, g, {
253
+ children: p
254
+ }))), /* @__PURE__ */ U(Ae, u({
255
+ className: T(v.root, i),
256
+ ownerState: y,
257
+ ref: s
258
+ }, x, {
259
+ children: [a, p]
260
+ }));
261
+ });
262
+ process.env.NODE_ENV !== "production" && (ie.propTypes = {
263
+ // ┌────────────────────────────── Warning ──────────────────────────────┐
264
+ // │ These PropTypes are generated from the TypeScript type definitions. │
265
+ // │ To update them, edit the d.ts file and run `pnpm proptypes`. │
266
+ // └─────────────────────────────────────────────────────────────────────┘
267
+ /**
268
+ * Alias for the `primary` prop.
269
+ */
270
+ children: t.node,
271
+ /**
272
+ * Override or extend the styles applied to the component.
273
+ */
274
+ classes: t.object,
275
+ /**
276
+ * @ignore
277
+ */
278
+ className: t.string,
279
+ /**
280
+ * If `true`, the children won't be wrapped by a Typography component.
281
+ * This can be useful to render an alternative Typography variant by wrapping
282
+ * the `children` (or `primary`) text, and optional `secondary` text
283
+ * with the Typography component.
284
+ * @default false
285
+ */
286
+ disableTypography: t.bool,
287
+ /**
288
+ * If `true`, the children are indented.
289
+ * This should be used if there is no left avatar or left icon.
290
+ * @default false
291
+ */
292
+ inset: t.bool,
293
+ /**
294
+ * The main content element.
295
+ */
296
+ primary: t.node,
297
+ /**
298
+ * These props will be forwarded to the primary typography component
299
+ * (as long as disableTypography is not `true`).
300
+ */
301
+ primaryTypographyProps: t.object,
302
+ /**
303
+ * The secondary content element.
304
+ */
305
+ secondary: t.node,
306
+ /**
307
+ * These props will be forwarded to the secondary typography component
308
+ * (as long as disableTypography is not `true`).
309
+ */
310
+ secondaryTypographyProps: t.object,
311
+ /**
312
+ * The system prop that allows defining system overrides as well as additional CSS styles.
313
+ */
314
+ sx: t.oneOfType([t.arrayOf(t.oneOfType([t.func, t.object, t.bool])), t.func, t.object])
315
+ });
316
+ function Se(e) {
317
+ return q("MuiListItem", e);
318
+ }
319
+ const P = Y("MuiListItem", ["root", "container", "focusVisible", "dense", "alignItemsFlexStart", "disabled", "divider", "gutters", "padding", "button", "secondaryAction", "selected"]);
320
+ function ke(e) {
321
+ return q("MuiListItemButton", e);
322
+ }
323
+ const E = Y("MuiListItemButton", ["root", "focusVisible", "dense", "alignItemsFlexStart", "disabled", "divider", "gutters", "selected"]), Me = ["alignItems", "autoFocus", "component", "children", "dense", "disableGutters", "divider", "focusVisibleClassName", "selected", "className"], we = (e, o) => {
324
+ const {
325
+ ownerState: s
326
+ } = e;
327
+ return [o.root, s.dense && o.dense, s.alignItems === "flex-start" && o.alignItemsFlexStart, s.divider && o.divider, !s.disableGutters && o.gutters];
328
+ }, je = (e) => {
329
+ const {
330
+ alignItems: o,
331
+ classes: s,
332
+ dense: n,
333
+ disabled: c,
334
+ disableGutters: i,
335
+ divider: d,
336
+ selected: r
337
+ } = e, f = w({
338
+ root: ["root", n && "dense", !i && "gutters", d && "divider", c && "disabled", o === "flex-start" && "alignItemsFlexStart", r && "selected"]
339
+ }, ke, s);
340
+ return u({}, s, f);
341
+ }, Ve = A(se, {
342
+ shouldForwardProp: (e) => Te(e) || e === "classes",
343
+ name: "MuiListItemButton",
344
+ slot: "Root",
345
+ overridesResolver: we
346
+ })(({
347
+ theme: e,
348
+ ownerState: o
349
+ }) => u({
350
+ display: "flex",
351
+ flexGrow: 1,
352
+ justifyContent: "flex-start",
353
+ alignItems: "center",
354
+ position: "relative",
355
+ textDecoration: "none",
356
+ minWidth: 0,
357
+ boxSizing: "border-box",
358
+ textAlign: "left",
359
+ paddingTop: 8,
360
+ paddingBottom: 8,
361
+ transition: e.transitions.create("background-color", {
362
+ duration: e.transitions.duration.shortest
363
+ }),
364
+ "&:hover": {
365
+ textDecoration: "none",
366
+ backgroundColor: (e.vars || e).palette.action.hover,
367
+ // Reset on touch devices, it doesn't add specificity
368
+ "@media (hover: none)": {
369
+ backgroundColor: "transparent"
370
+ }
371
+ },
372
+ [`&.${E.selected}`]: {
373
+ backgroundColor: e.vars ? `rgba(${e.vars.palette.primary.mainChannel} / ${e.vars.palette.action.selectedOpacity})` : h(e.palette.primary.main, e.palette.action.selectedOpacity),
374
+ [`&.${E.focusVisible}`]: {
375
+ backgroundColor: e.vars ? `rgba(${e.vars.palette.primary.mainChannel} / calc(${e.vars.palette.action.selectedOpacity} + ${e.vars.palette.action.focusOpacity}))` : h(e.palette.primary.main, e.palette.action.selectedOpacity + e.palette.action.focusOpacity)
376
+ }
377
+ },
378
+ [`&.${E.selected}:hover`]: {
379
+ backgroundColor: e.vars ? `rgba(${e.vars.palette.primary.mainChannel} / calc(${e.vars.palette.action.selectedOpacity} + ${e.vars.palette.action.hoverOpacity}))` : h(e.palette.primary.main, e.palette.action.selectedOpacity + e.palette.action.hoverOpacity),
380
+ // Reset on touch devices, it doesn't add specificity
381
+ "@media (hover: none)": {
382
+ backgroundColor: e.vars ? `rgba(${e.vars.palette.primary.mainChannel} / ${e.vars.palette.action.selectedOpacity})` : h(e.palette.primary.main, e.palette.action.selectedOpacity)
383
+ }
384
+ },
385
+ [`&.${E.focusVisible}`]: {
386
+ backgroundColor: (e.vars || e).palette.action.focus
387
+ },
388
+ [`&.${E.disabled}`]: {
389
+ opacity: (e.vars || e).palette.action.disabledOpacity
390
+ }
391
+ }, o.divider && {
392
+ borderBottom: `1px solid ${(e.vars || e).palette.divider}`,
393
+ backgroundClip: "padding-box"
394
+ }, o.alignItems === "flex-start" && {
395
+ alignItems: "flex-start"
396
+ }, !o.disableGutters && {
397
+ paddingLeft: 16,
398
+ paddingRight: 16
399
+ }, o.dense && {
400
+ paddingTop: 4,
401
+ paddingBottom: 4
402
+ })), ce = /* @__PURE__ */ l.forwardRef(function(o, s) {
403
+ const n = M({
404
+ props: o,
405
+ name: "MuiListItemButton"
406
+ }), {
407
+ alignItems: c = "center",
408
+ autoFocus: i = !1,
409
+ component: d = "div",
410
+ children: r,
411
+ dense: m = !1,
412
+ disableGutters: f = !1,
413
+ divider: C = !1,
414
+ focusVisibleClassName: g,
415
+ selected: x = !1,
416
+ className: I
417
+ } = n, a = $(n, Me), p = l.useContext(L), y = l.useMemo(() => ({
418
+ dense: m || p.dense || !1,
419
+ alignItems: c,
420
+ disableGutters: f
421
+ }), [c, p.dense, m, f]), v = l.useRef(null);
422
+ ne(() => {
423
+ i && (v.current ? v.current.focus() : process.env.NODE_ENV !== "production" && console.error("MUI: Unable to set focus to a ListItemButton whose component has not been rendered."));
424
+ }, [i]);
425
+ const j = u({}, n, {
426
+ alignItems: c,
427
+ dense: y.dense,
428
+ disableGutters: f,
429
+ divider: C,
430
+ selected: x
431
+ }), S = je(j), V = H(v, s);
432
+ return /* @__PURE__ */ b(L.Provider, {
433
+ value: y,
434
+ children: /* @__PURE__ */ b(Ve, u({
435
+ ref: V,
436
+ href: a.href || a.to,
437
+ component: (a.href || a.to) && d === "div" ? "button" : d,
438
+ focusVisibleClassName: T(S.focusVisible, g),
439
+ ownerState: j,
440
+ className: T(S.root, I)
441
+ }, a, {
442
+ classes: S,
443
+ children: r
444
+ }))
445
+ });
446
+ });
447
+ process.env.NODE_ENV !== "production" && (ce.propTypes = {
448
+ // ┌────────────────────────────── Warning ──────────────────────────────┐
449
+ // │ These PropTypes are generated from the TypeScript type definitions. │
450
+ // │ To update them, edit the d.ts file and run `pnpm proptypes`. │
451
+ // └─────────────────────────────────────────────────────────────────────┘
452
+ /**
453
+ * Defines the `align-items` style property.
454
+ * @default 'center'
455
+ */
456
+ alignItems: t.oneOf(["center", "flex-start"]),
457
+ /**
458
+ * If `true`, the list item is focused during the first mount.
459
+ * Focus will also be triggered if the value changes from false to true.
460
+ * @default false
461
+ */
462
+ autoFocus: t.bool,
463
+ /**
464
+ * The content of the component if a `ListItemSecondaryAction` is used it must
465
+ * be the last child.
466
+ */
467
+ children: t.node,
468
+ /**
469
+ * Override or extend the styles applied to the component.
470
+ */
471
+ classes: t.object,
472
+ /**
473
+ * @ignore
474
+ */
475
+ className: t.string,
476
+ /**
477
+ * The component used for the root node.
478
+ * Either a string to use a HTML element or a component.
479
+ */
480
+ component: t.elementType,
481
+ /**
482
+ * If `true`, compact vertical padding designed for keyboard and mouse input is used.
483
+ * The prop defaults to the value inherited from the parent List component.
484
+ * @default false
485
+ */
486
+ dense: t.bool,
487
+ /**
488
+ * If `true`, the component is disabled.
489
+ * @default false
490
+ */
491
+ disabled: t.bool,
492
+ /**
493
+ * If `true`, the left and right padding is removed.
494
+ * @default false
495
+ */
496
+ disableGutters: t.bool,
497
+ /**
498
+ * If `true`, a 1px light border is added to the bottom of the list item.
499
+ * @default false
500
+ */
501
+ divider: t.bool,
502
+ /**
503
+ * This prop can help identify which element has keyboard focus.
504
+ * The class name will be applied when the element gains the focus through keyboard interaction.
505
+ * It's a polyfill for the [CSS :focus-visible selector](https://drafts.csswg.org/selectors-4/#the-focus-visible-pseudo).
506
+ * The rationale for using this feature [is explained here](https://github.com/WICG/focus-visible/blob/HEAD/explainer.md).
507
+ * A [polyfill can be used](https://github.com/WICG/focus-visible) to apply a `focus-visible` class to other components
508
+ * if needed.
509
+ */
510
+ focusVisibleClassName: t.string,
511
+ /**
512
+ * @ignore
513
+ */
514
+ href: t.string,
515
+ /**
516
+ * Use to apply selected styling.
517
+ * @default false
518
+ */
519
+ selected: t.bool,
520
+ /**
521
+ * The system prop that allows defining system overrides as well as additional CSS styles.
522
+ */
523
+ sx: t.oneOfType([t.arrayOf(t.oneOfType([t.func, t.object, t.bool])), t.func, t.object])
524
+ });
525
+ function Be(e) {
526
+ return q("MuiListItemSecondaryAction", e);
527
+ }
528
+ Y("MuiListItemSecondaryAction", ["root", "disableGutters"]);
529
+ const Ge = ["className"], Fe = (e) => {
530
+ const {
531
+ disableGutters: o,
532
+ classes: s
533
+ } = e;
534
+ return w({
535
+ root: ["root", o && "disableGutters"]
536
+ }, Be, s);
537
+ }, Ue = A("div", {
538
+ name: "MuiListItemSecondaryAction",
539
+ slot: "Root",
540
+ overridesResolver: (e, o) => {
541
+ const {
542
+ ownerState: s
543
+ } = e;
544
+ return [o.root, s.disableGutters && o.disableGutters];
545
+ }
546
+ })(({
547
+ ownerState: e
548
+ }) => u({
549
+ position: "absolute",
550
+ right: 16,
551
+ top: "50%",
552
+ transform: "translateY(-50%)"
553
+ }, e.disableGutters && {
554
+ right: 0
555
+ })), X = /* @__PURE__ */ l.forwardRef(function(o, s) {
556
+ const n = M({
557
+ props: o,
558
+ name: "MuiListItemSecondaryAction"
559
+ }), {
560
+ className: c
561
+ } = n, i = $(n, Ge), d = l.useContext(L), r = u({}, n, {
562
+ disableGutters: d.disableGutters
563
+ }), m = Fe(r);
564
+ return /* @__PURE__ */ b(Ue, u({
565
+ className: T(m.root, c),
566
+ ownerState: r,
567
+ ref: s
568
+ }, i));
569
+ });
570
+ process.env.NODE_ENV !== "production" && (X.propTypes = {
571
+ // ┌────────────────────────────── Warning ──────────────────────────────┐
572
+ // │ These PropTypes are generated from the TypeScript type definitions. │
573
+ // │ To update them, edit the d.ts file and run `pnpm proptypes`. │
574
+ // └─────────────────────────────────────────────────────────────────────┘
575
+ /**
576
+ * The content of the component, normally an `IconButton` or selection control.
577
+ */
578
+ children: t.node,
579
+ /**
580
+ * Override or extend the styles applied to the component.
581
+ */
582
+ classes: t.object,
583
+ /**
584
+ * @ignore
585
+ */
586
+ className: t.string,
587
+ /**
588
+ * The system prop that allows defining system overrides as well as additional CSS styles.
589
+ */
590
+ sx: t.oneOfType([t.arrayOf(t.oneOfType([t.func, t.object, t.bool])), t.func, t.object])
591
+ });
592
+ X.muiName = "ListItemSecondaryAction";
593
+ const _e = ["className"], De = ["alignItems", "autoFocus", "button", "children", "className", "component", "components", "componentsProps", "ContainerComponent", "ContainerProps", "dense", "disabled", "disableGutters", "disablePadding", "divider", "focusVisibleClassName", "secondaryAction", "selected", "slotProps", "slots"], We = (e, o) => {
594
+ const {
595
+ ownerState: s
596
+ } = e;
597
+ return [o.root, s.dense && o.dense, s.alignItems === "flex-start" && o.alignItemsFlexStart, s.divider && o.divider, !s.disableGutters && o.gutters, !s.disablePadding && o.padding, s.button && o.button, s.hasSecondaryAction && o.secondaryAction];
598
+ }, ze = (e) => {
599
+ const {
600
+ alignItems: o,
601
+ button: s,
602
+ classes: n,
603
+ dense: c,
604
+ disabled: i,
605
+ disableGutters: d,
606
+ disablePadding: r,
607
+ divider: m,
608
+ hasSecondaryAction: f,
609
+ selected: C
610
+ } = e;
611
+ return w({
612
+ root: ["root", c && "dense", !d && "gutters", !r && "padding", m && "divider", i && "disabled", s && "button", o === "flex-start" && "alignItemsFlexStart", f && "secondaryAction", C && "selected"],
613
+ container: ["container"]
614
+ }, Se, n);
615
+ }, He = A("div", {
616
+ name: "MuiListItem",
617
+ slot: "Root",
618
+ overridesResolver: We
619
+ })(({
620
+ theme: e,
621
+ ownerState: o
622
+ }) => u({
623
+ display: "flex",
624
+ justifyContent: "flex-start",
625
+ alignItems: "center",
626
+ position: "relative",
627
+ textDecoration: "none",
628
+ width: "100%",
629
+ boxSizing: "border-box",
630
+ textAlign: "left"
631
+ }, !o.disablePadding && u({
632
+ paddingTop: 8,
633
+ paddingBottom: 8
634
+ }, o.dense && {
635
+ paddingTop: 4,
636
+ paddingBottom: 4
637
+ }, !o.disableGutters && {
638
+ paddingLeft: 16,
639
+ paddingRight: 16
640
+ }, !!o.secondaryAction && {
641
+ // Add some space to avoid collision as `ListItemSecondaryAction`
642
+ // is absolutely positioned.
643
+ paddingRight: 48
644
+ }), !!o.secondaryAction && {
645
+ [`& > .${E.root}`]: {
646
+ paddingRight: 48
647
+ }
648
+ }, {
649
+ [`&.${P.focusVisible}`]: {
650
+ backgroundColor: (e.vars || e).palette.action.focus
651
+ },
652
+ [`&.${P.selected}`]: {
653
+ backgroundColor: e.vars ? `rgba(${e.vars.palette.primary.mainChannel} / ${e.vars.palette.action.selectedOpacity})` : h(e.palette.primary.main, e.palette.action.selectedOpacity),
654
+ [`&.${P.focusVisible}`]: {
655
+ backgroundColor: e.vars ? `rgba(${e.vars.palette.primary.mainChannel} / calc(${e.vars.palette.action.selectedOpacity} + ${e.vars.palette.action.focusOpacity}))` : h(e.palette.primary.main, e.palette.action.selectedOpacity + e.palette.action.focusOpacity)
656
+ }
657
+ },
658
+ [`&.${P.disabled}`]: {
659
+ opacity: (e.vars || e).palette.action.disabledOpacity
660
+ }
661
+ }, o.alignItems === "flex-start" && {
662
+ alignItems: "flex-start"
663
+ }, o.divider && {
664
+ borderBottom: `1px solid ${(e.vars || e).palette.divider}`,
665
+ backgroundClip: "padding-box"
666
+ }, o.button && {
667
+ transition: e.transitions.create("background-color", {
668
+ duration: e.transitions.duration.shortest
669
+ }),
670
+ "&:hover": {
671
+ textDecoration: "none",
672
+ backgroundColor: (e.vars || e).palette.action.hover,
673
+ // Reset on touch devices, it doesn't add specificity
674
+ "@media (hover: none)": {
675
+ backgroundColor: "transparent"
676
+ }
677
+ },
678
+ [`&.${P.selected}:hover`]: {
679
+ backgroundColor: e.vars ? `rgba(${e.vars.palette.primary.mainChannel} / calc(${e.vars.palette.action.selectedOpacity} + ${e.vars.palette.action.hoverOpacity}))` : h(e.palette.primary.main, e.palette.action.selectedOpacity + e.palette.action.hoverOpacity),
680
+ // Reset on touch devices, it doesn't add specificity
681
+ "@media (hover: none)": {
682
+ backgroundColor: e.vars ? `rgba(${e.vars.palette.primary.mainChannel} / ${e.vars.palette.action.selectedOpacity})` : h(e.palette.primary.main, e.palette.action.selectedOpacity)
683
+ }
684
+ }
685
+ }, o.hasSecondaryAction && {
686
+ // Add some space to avoid collision as `ListItemSecondaryAction`
687
+ // is absolutely positioned.
688
+ paddingRight: 48
689
+ })), Ye = A("li", {
690
+ name: "MuiListItem",
691
+ slot: "Container",
692
+ overridesResolver: (e, o) => o.container
693
+ })({
694
+ position: "relative"
695
+ }), le = /* @__PURE__ */ l.forwardRef(function(o, s) {
696
+ const n = M({
697
+ props: o,
698
+ name: "MuiListItem"
699
+ }), {
700
+ alignItems: c = "center",
701
+ autoFocus: i = !1,
702
+ button: d = !1,
703
+ children: r,
704
+ className: m,
705
+ component: f,
706
+ components: C = {},
707
+ componentsProps: g = {},
708
+ ContainerComponent: x = "li",
709
+ ContainerProps: {
710
+ className: I
711
+ } = {},
712
+ dense: a = !1,
713
+ disabled: p = !1,
714
+ disableGutters: y = !1,
715
+ disablePadding: v = !1,
716
+ divider: j = !1,
717
+ focusVisibleClassName: S,
718
+ secondaryAction: V,
719
+ selected: de = !1,
720
+ slotProps: pe = {},
721
+ slots: ue = {}
722
+ } = n, me = $(n.ContainerProps, _e), fe = $(n, De), J = l.useContext(L), D = l.useMemo(() => ({
723
+ dense: a || J.dense || !1,
724
+ alignItems: c,
725
+ disableGutters: y
726
+ }), [c, J.dense, a, y]), W = l.useRef(null);
727
+ ne(() => {
728
+ i && (W.current ? W.current.focus() : process.env.NODE_ENV !== "production" && console.error("MUI: Unable to set focus to a ListItem whose component has not been rendered."));
729
+ }, [i]);
730
+ const N = l.Children.toArray(r), K = N.length && ae(N[N.length - 1], ["ListItemSecondaryAction"]), B = u({}, n, {
731
+ alignItems: c,
732
+ autoFocus: i,
733
+ button: d,
734
+ dense: D.dense,
735
+ disabled: p,
736
+ disableGutters: y,
737
+ disablePadding: v,
738
+ divider: j,
739
+ hasSecondaryAction: K,
740
+ selected: de
741
+ }), Q = ze(B), Z = H(W, s), G = ue.root || C.Root || He, k = pe.root || g.root || {}, O = u({
742
+ className: T(Q.root, k.className, m),
743
+ disabled: p
744
+ }, fe);
745
+ let R = f || "li";
746
+ return d && (O.component = f || "div", O.focusVisibleClassName = T(P.focusVisible, S), R = se), K ? (R = !O.component && !f ? "div" : R, x === "li" && (R === "li" ? R = "div" : O.component === "li" && (O.component = "div")), /* @__PURE__ */ b(L.Provider, {
747
+ value: D,
748
+ children: /* @__PURE__ */ U(Ye, u({
749
+ as: x,
750
+ className: T(Q.container, I),
751
+ ref: Z,
752
+ ownerState: B
753
+ }, me, {
754
+ children: [/* @__PURE__ */ b(G, u({}, k, !te(G) && {
755
+ as: R,
756
+ ownerState: u({}, B, k.ownerState)
757
+ }, O, {
758
+ children: N
759
+ })), N.pop()]
760
+ }))
761
+ })) : /* @__PURE__ */ b(L.Provider, {
762
+ value: D,
763
+ children: /* @__PURE__ */ U(G, u({}, k, {
764
+ as: R,
765
+ ref: Z
766
+ }, !te(G) && {
767
+ ownerState: u({}, B, k.ownerState)
768
+ }, O, {
769
+ children: [N, V && /* @__PURE__ */ b(X, {
770
+ children: V
771
+ })]
772
+ }))
773
+ });
774
+ });
775
+ process.env.NODE_ENV !== "production" && (le.propTypes = {
776
+ // ┌────────────────────────────── Warning ──────────────────────────────┐
777
+ // │ These PropTypes are generated from the TypeScript type definitions. │
778
+ // │ To update them, edit the d.ts file and run `pnpm proptypes`. │
779
+ // └─────────────────────────────────────────────────────────────────────┘
780
+ /**
781
+ * Defines the `align-items` style property.
782
+ * @default 'center'
783
+ */
784
+ alignItems: t.oneOf(["center", "flex-start"]),
785
+ /**
786
+ * If `true`, the list item is focused during the first mount.
787
+ * Focus will also be triggered if the value changes from false to true.
788
+ * @default false
789
+ * @deprecated checkout [ListItemButton](/material-ui/api/list-item-button/) instead
790
+ */
791
+ autoFocus: t.bool,
792
+ /**
793
+ * If `true`, the list item is a button (using `ButtonBase`). Props intended
794
+ * for `ButtonBase` can then be applied to `ListItem`.
795
+ * @default false
796
+ * @deprecated checkout [ListItemButton](/material-ui/api/list-item-button/) instead
797
+ */
798
+ button: t.bool,
799
+ /**
800
+ * The content of the component if a `ListItemSecondaryAction` is used it must
801
+ * be the last child.
802
+ */
803
+ children: Le(t.node, (e) => {
804
+ const o = l.Children.toArray(e.children);
805
+ let s = -1;
806
+ for (let n = o.length - 1; n >= 0; n -= 1) {
807
+ const c = o[n];
808
+ if (ae(c, ["ListItemSecondaryAction"])) {
809
+ s = n;
810
+ break;
811
+ }
812
+ }
813
+ return s !== -1 && s !== o.length - 1 ? new Error("MUI: You used an element after ListItemSecondaryAction. For ListItem to detect that it has a secondary action you must pass it as the last child to ListItem.") : null;
814
+ }),
815
+ /**
816
+ * Override or extend the styles applied to the component.
817
+ */
818
+ classes: t.object,
819
+ /**
820
+ * @ignore
821
+ */
822
+ className: t.string,
823
+ /**
824
+ * The component used for the root node.
825
+ * Either a string to use a HTML element or a component.
826
+ */
827
+ component: t.elementType,
828
+ /**
829
+ * The components used for each slot inside.
830
+ *
831
+ * This prop is an alias for the `slots` prop.
832
+ * It's recommended to use the `slots` prop instead.
833
+ *
834
+ * @default {}
835
+ */
836
+ components: t.shape({
837
+ Root: t.elementType
838
+ }),
839
+ /**
840
+ * The extra props for the slot components.
841
+ * You can override the existing props or add new ones.
842
+ *
843
+ * This prop is an alias for the `slotProps` prop.
844
+ * It's recommended to use the `slotProps` prop instead, as `componentsProps` will be deprecated in the future.
845
+ *
846
+ * @default {}
847
+ */
848
+ componentsProps: t.shape({
849
+ root: t.object
850
+ }),
851
+ /**
852
+ * The container component used when a `ListItemSecondaryAction` is the last child.
853
+ * @default 'li'
854
+ * @deprecated
855
+ */
856
+ ContainerComponent: ge,
857
+ /**
858
+ * Props applied to the container component if used.
859
+ * @default {}
860
+ * @deprecated
861
+ */
862
+ ContainerProps: t.object,
863
+ /**
864
+ * If `true`, compact vertical padding designed for keyboard and mouse input is used.
865
+ * The prop defaults to the value inherited from the parent List component.
866
+ * @default false
867
+ */
868
+ dense: t.bool,
869
+ /**
870
+ * If `true`, the component is disabled.
871
+ * @default false
872
+ * @deprecated checkout [ListItemButton](/material-ui/api/list-item-button/) instead
873
+ */
874
+ disabled: t.bool,
875
+ /**
876
+ * If `true`, the left and right padding is removed.
877
+ * @default false
878
+ */
879
+ disableGutters: t.bool,
880
+ /**
881
+ * If `true`, all padding is removed.
882
+ * @default false
883
+ */
884
+ disablePadding: t.bool,
885
+ /**
886
+ * If `true`, a 1px light border is added to the bottom of the list item.
887
+ * @default false
888
+ */
889
+ divider: t.bool,
890
+ /**
891
+ * @ignore
892
+ */
893
+ focusVisibleClassName: t.string,
894
+ /**
895
+ * The element to display at the end of ListItem.
896
+ */
897
+ secondaryAction: t.node,
898
+ /**
899
+ * Use to apply selected styling.
900
+ * @default false
901
+ * @deprecated checkout [ListItemButton](/material-ui/api/list-item-button/) instead
902
+ */
903
+ selected: t.bool,
904
+ /**
905
+ * The extra props for the slot components.
906
+ * You can override the existing props or add new ones.
907
+ *
908
+ * This prop is an alias for the `componentsProps` prop, which will be deprecated in the future.
909
+ *
910
+ * @default {}
911
+ */
912
+ slotProps: t.shape({
913
+ root: t.object
914
+ }),
915
+ /**
916
+ * The components used for each slot inside.
917
+ *
918
+ * This prop is an alias for the `components` prop, which will be deprecated in the future.
919
+ *
920
+ * @default {}
921
+ */
922
+ slots: t.shape({
923
+ root: t.elementType
924
+ }),
925
+ /**
926
+ * The system prop that allows defining system overrides as well as additional CSS styles.
927
+ */
928
+ sx: t.oneOfType([t.arrayOf(t.oneOfType([t.func, t.object, t.bool])), t.func, t.object])
929
+ });
930
+ const rt = ({
931
+ open: e,
932
+ buttons: o,
933
+ position: s,
934
+ width: n = 160,
935
+ sx: c,
936
+ onClose: i
937
+ }) => {
938
+ const d = () => {
939
+ i && i();
940
+ };
941
+ return e ? /* @__PURE__ */ b(_, { onClickAway: d, children: /* @__PURE__ */ b(
942
+ he,
943
+ {
944
+ sx: {
945
+ position: "absolute",
946
+ zIndex: 9999999,
947
+ width: n,
948
+ maxWidth: 360,
949
+ bgcolor: "background.paper",
950
+ left: s == null ? void 0 : s.left,
951
+ top: s == null ? void 0 : s.top,
952
+ borderRadius: 0.5,
953
+ ...c
954
+ },
955
+ disablePadding: !0,
956
+ children: o.map((r, m) => /* @__PURE__ */ b(le, { secondaryAction: r.endIcon, disablePadding: !0, children: /* @__PURE__ */ U(ce, { role: void 0, onClick: r.onClick, dense: !0, children: [
957
+ r.startIcon !== void 0 && /* @__PURE__ */ b(re, { sx: { minWidth: "auto", mr: 1 }, children: r.startIcon }),
958
+ /* @__PURE__ */ b(
959
+ ie,
960
+ {
961
+ primary: r.label,
962
+ primaryTypographyProps: {
963
+ fontSize: "12px"
964
+ }
965
+ }
966
+ )
967
+ ] }) }, m))
968
+ }
969
+ ) }) : /* @__PURE__ */ b(ye, {});
970
+ };
971
+ export {
972
+ rt as ContextMenu
973
+ };