@hybridcore/ui 1.6.11 → 1.6.13

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 (150) hide show
  1. package/dist/{AnimatedTheme-D3VZKKNV.js → AnimatedTheme-ktdO3Bel.js} +6 -6
  2. package/dist/{AxisRenderer-Doyw-FTI.js → AxisRenderer-BCQoUJw6.js} +6 -6
  3. package/dist/{AxisRendererY-BylCU67e.js → AxisRendererY-AXWvGU6r.js} +3 -3
  4. package/dist/{Bullet-C6357hTv.js → Bullet-Djj7Vs9T.js} +1 -1
  5. package/dist/{Button-DGOT8RcT.js → Button-BLY4PVJC.js} +3 -3
  6. package/dist/{CategoryAxis-B5uTZjhL.js → CategoryAxis-B6NqW8qd.js} +3 -3
  7. package/dist/{Circle-DhzVdFBd.js → Circle-BnfBNKBD.js} +1 -1
  8. package/dist/{ColorSet-DGLMpbL3.js → ColorSet-cyPmWGwh.js} +1 -1
  9. package/dist/{ColumnSeries-CqJ-563p.js → ColumnSeries-CtRTsn-E.js} +28 -28
  10. package/dist/{DateAxis-lJZjbAS-.js → DateAxis-DEXKps1S.js} +4 -4
  11. package/dist/{Entity-4Lr2piVN.js → Entity-BJCuhdq_.js} +14 -14
  12. package/dist/GaplessDateAxis-B2g2jgSG.js +376 -0
  13. package/dist/{Hierarchy-DPEcTr0v.js → Hierarchy-CEOK8Gzh.js} +4 -4
  14. package/dist/{Legend-CTb6rZz_.js → Legend-CFvQiIfn.js} +4 -4
  15. package/dist/{LineSeries-Dg1aytHA.js → LineSeries-D_IL2qGF.js} +4 -4
  16. package/dist/{LinearGradient-D1hzMjaW.js → LinearGradient-CxQyCSEB.js} +2 -2
  17. package/dist/{PieSeries-C9YUWMnA.js → PieSeries-CMH0Z7pz.js} +8 -8
  18. package/dist/{RoundedRectangle-B23Oh_r6.js → RoundedRectangle-BKLX1LKM.js} +2 -2
  19. package/dist/{Scrollbar-CSoXoZSe.js → Scrollbar-CTI7_8Qw.js} +4 -4
  20. package/dist/{Slice-CIP7Vmzu.js → Slice-BUncQh1B.js} +11 -11
  21. package/dist/{Tick-CRu6rQQy.js → Tick--VhF0xlz.js} +2 -2
  22. package/dist/{Tooltip-RhAldW7s.js → Tooltip-vyZRZWih.js} +1 -1
  23. package/dist/{XYCursor-Z-Ral42q.js → XYCursor-CVUSpqb9.js} +3 -3
  24. package/dist/{ZoomableContainer-D1laxHnA.js → ZoomableContainer-Ca_pDVYQ.js} +2 -2
  25. package/dist/assets/index.css +1 -1
  26. package/dist/assets/index2.css +1 -1
  27. package/dist/components/button/styled.js +1 -1
  28. package/dist/components/charts/_common/format.js +149 -41
  29. package/dist/components/charts/_common/tooltip.js +2 -2
  30. package/dist/components/charts/_common/utils.js +16 -11
  31. package/dist/components/charts/candlestick/logic.js +34 -35
  32. package/dist/components/charts/column-line-mix/logic.js +40 -41
  33. package/dist/components/charts/donut-chart/logic.js +4 -4
  34. package/dist/components/charts/drill-down-treemap/logic.js +5 -5
  35. package/dist/components/charts/drill-down-voronoi-treemap/logic.js +5 -5
  36. package/dist/components/charts/forecast-cone/logic.js +134 -120
  37. package/dist/components/charts/heatmap/logic.js +9 -9
  38. package/dist/components/charts/highlighting-line-data/logic.js +10 -10
  39. package/dist/components/charts/line/logic.js +19 -20
  40. package/dist/components/charts/logaritmic-scale/logic.js +30 -31
  41. package/dist/components/charts/multiple-value-axes/logic.js +18 -19
  42. package/dist/components/charts/nested-pie/logic.js +3 -3
  43. package/dist/components/charts/packed-circles/logic.js +7 -7
  44. package/dist/components/charts/pie-chart/logic.js +4 -4
  45. package/dist/components/charts/stacked-area-radar/logic.js +9 -9
  46. package/dist/components/charts/stacked-column-chart/logic.js +10 -10
  47. package/dist/components/charts/xy-chart/logic.js +28 -29
  48. package/dist/components/collapsible-card/index.js +21 -30
  49. package/dist/components/collapsible-card/styled.js +16 -14
  50. package/dist/components/color-picker/index.js +2227 -3357
  51. package/dist/components/color-picker/styled.js +87 -7
  52. package/dist/components/confirm/dialog.js +89 -8
  53. package/dist/components/confirm/index.js +1 -1
  54. package/dist/components/data-map/index.js +1 -1
  55. package/dist/components/data-map/logic.js +20 -20
  56. package/dist/components/data-security-selectors/dissemination-list/index.js +32 -3117
  57. package/dist/components/date-picker-with-custom-range/index.js +86 -7
  58. package/dist/components/date-range-picker/index.js +464 -452
  59. package/dist/components/document-viewer/components/viewer/index.js +1 -1
  60. package/dist/components/duration-select/index.js +10 -10
  61. package/dist/components/duration-select/styled.js +1 -1
  62. package/dist/components/geometry-picker/coordinate/index.js +14 -14
  63. package/dist/components/geometry-picker/edit/index.js +1 -1
  64. package/dist/components/geometry-picker/geometry/index.js +1 -1
  65. package/dist/components/geometry-picker/kml/index.js +11 -11
  66. package/dist/components/geometry-picker/map/logic.js +145 -3656
  67. package/dist/components/geometry-picker/map/style.js +18 -17
  68. package/dist/components/geometry-picker/parser/coordinate-input/logic.js +43 -1255
  69. package/dist/components/heat-map/index.js +1 -1
  70. package/dist/components/heat-map/logic.js +77 -1924
  71. package/dist/components/instance-hierarchy-table/styled.js +18 -16
  72. package/dist/components/map/helpers/mapbox.js +17 -15
  73. package/dist/components/map/helpers/ol.js +386 -27
  74. package/dist/components/map/index.js +11 -10
  75. package/dist/components/map/logic.js +22 -22
  76. package/dist/components/map/styled.js +31 -27
  77. package/dist/components/metric-card/MetricChart.js +9 -9
  78. package/dist/components/metric-card/logic.js +46 -49
  79. package/dist/components/phone-input/index.js +10 -9
  80. package/dist/components/property-mapping/index.js +1 -1
  81. package/dist/components/prr-map/index.js +1 -1
  82. package/dist/components/prr-map/logic.js +27 -26
  83. package/dist/components/range-selector/styled.js +65 -4228
  84. package/dist/components/raster-grid-map/index.js +1 -1
  85. package/dist/components/raster-grid-map/logic.js +60 -57
  86. package/dist/components/simple-pivot-table/index.js +17 -17
  87. package/dist/components/simple-pivot-table/logic.js +67 -76
  88. package/dist/components/sortable-list/index.js +1091 -1264
  89. package/dist/components/template-form/components/property-list/index.js +36 -33
  90. package/dist/components/template-form/components/property-list/property-list-columns.js +19 -18
  91. package/dist/components/template-form/components/property-list/property-list-form.js +137 -601
  92. package/dist/components/template-form/components/recognition-property-list/index.js +40 -37
  93. package/dist/components/template-form/components/recognition-property-list/recognition-property-list-columns.js +11 -10
  94. package/dist/components/template-form/components/recognition-property-list/recognition-property-list-form.js +55 -63
  95. package/dist/components/tree-select/index.js +16 -16
  96. package/dist/index.esm-UfGMjYOL.js +197 -0
  97. package/dist/main.d.ts +67 -8
  98. package/dist/main.js +176 -175
  99. package/package.json +1 -1
  100. package/dist/AccordionSummary-CJppWeqF.js +0 -781
  101. package/dist/Add-CqcD1PWb.js +0 -403
  102. package/dist/Box-DqUMmZjL.js +0 -31
  103. package/dist/Button-C5yquWAB.js +0 -357
  104. package/dist/ButtonBase-BEF7oTOe.js +0 -887
  105. package/dist/DataProcessor-WXzhvIg6.js +0 -83
  106. package/dist/Delete-BdyYpINH.js +0 -23
  107. package/dist/DialogContent-BvVjD9z3.js +0 -523
  108. package/dist/FormGroup-CpBsIyYR.js +0 -89
  109. package/dist/GaplessDateAxis-DowssQ6y.js +0 -296
  110. package/dist/IconButton-BoGwbvrP.js +0 -184
  111. package/dist/InputLabel-Dd8RrneV.js +0 -341
  112. package/dist/MenuItem-DwqJqzuM.js +0 -233
  113. package/dist/Modal-MUZygjmQ.js +0 -1158
  114. package/dist/Paper-BkQLdsCI.js +0 -582
  115. package/dist/Select-DHUl_uG3.js +0 -3916
  116. package/dist/Source-BSZST_GH.js +0 -4410
  117. package/dist/SwitchBase-DTndTqI8.js +0 -235
  118. package/dist/Text-ChJRuaD8.js +0 -2197
  119. package/dist/TextField-e2oKaUN1.js +0 -669
  120. package/dist/TransitionGroupContext-BDAp2T0O.js +0 -96
  121. package/dist/Typography-DgsSLCFC.js +0 -178
  122. package/dist/Vector-BmuhQO4p.js +0 -3606
  123. package/dist/Vector-DfTqQEln.js +0 -1735
  124. package/dist/WKT-2wsDT-nq.js +0 -2310
  125. package/dist/assertThisInitialized-C1dAyb4j.js +0 -7
  126. package/dist/assets/index3.css +0 -1
  127. package/dist/assets/index4.css +0 -1
  128. package/dist/clsx-OuTLNxxd.js +0 -16
  129. package/dist/createChainedFunction-C0nujS3O.js +0 -9
  130. package/dist/createSvgIcon-Ch_cT8az.js +0 -185
  131. package/dist/createSvgIcon-DuDuASu1.js +0 -62
  132. package/dist/debounce-46wSf_lW.js +0 -15
  133. package/dist/dialog-BYRnCztH.js +0 -154
  134. package/dist/formControlState-vgaj2ksH.js +0 -10
  135. package/dist/generateUtilityClasses-C3ivN9Ie.js +0 -2973
  136. package/dist/index-DH6qsPBn.js +0 -153
  137. package/dist/index-e9xTIYWt.js +0 -1934
  138. package/dist/index.esm-BLLrbTzY.js +0 -318
  139. package/dist/math-Bvt2Ubuz.js +0 -704
  140. package/dist/objectWithoutPropertiesLoose-DJteAcBH.js +0 -22
  141. package/dist/ol-yOE-NV0X.js +0 -7465
  142. package/dist/ownerWindow-wg6foiOE.js +0 -10
  143. package/dist/setPrototypeOf-NPgp4cYc.js +0 -8
  144. package/dist/styled-SoqbyrkW.js +0 -350
  145. package/dist/unsupportedProp-DuqR2hj9.js +0 -36
  146. package/dist/useControlled-BYdyS7Pn.js +0 -31
  147. package/dist/useFormControl-CatNKXAi.js +0 -10
  148. package/dist/useId-BW-oWmul.js +0 -19
  149. package/dist/useMobilePicker-CY8ndYRL.js +0 -8279
  150. package/dist/useSlot-B_Q4vnX5.js +0 -42
@@ -1,341 +0,0 @@
1
- import { a as i, _ as h } from "./objectWithoutPropertiesLoose-DJteAcBH.js";
2
- import * as k from "react";
3
- import { P as o } from "./index-C__OZmYy.js";
4
- import { c as y } from "./clsx-OuTLNxxd.js";
5
- import { f as g } from "./formControlState-vgaj2ksH.js";
6
- import { u as C } from "./useFormControl-CatNKXAi.js";
7
- import { g as O, a as L, s as b, u as z, b as q, c as F, r as I } from "./generateUtilityClasses-C3ivN9Ie.js";
8
- import { jsxs as v, jsx as T } from "react/jsx-runtime";
9
- function R(e) {
10
- return L("MuiFormLabel", e);
11
- }
12
- const u = O("MuiFormLabel", ["root", "colorSecondary", "focused", "disabled", "error", "filled", "required", "asterisk"]), j = ["children", "className", "color", "component", "disabled", "error", "filled", "focused", "required"], M = (e) => {
13
- const {
14
- classes: r,
15
- color: a,
16
- focused: s,
17
- disabled: f,
18
- error: l,
19
- filled: c,
20
- required: p
21
- } = e, n = {
22
- root: ["root", `color${q(a)}`, f && "disabled", l && "error", c && "filled", s && "focused", p && "required"],
23
- asterisk: ["asterisk", l && "error"]
24
- };
25
- return F(n, R, r);
26
- }, $ = b("label", {
27
- name: "MuiFormLabel",
28
- slot: "Root",
29
- overridesResolver: ({
30
- ownerState: e
31
- }, r) => i({}, r.root, e.color === "secondary" && r.colorSecondary, e.filled && r.filled)
32
- })(({
33
- theme: e,
34
- ownerState: r
35
- }) => i({
36
- color: (e.vars || e).palette.text.secondary
37
- }, e.typography.body1, {
38
- lineHeight: "1.4375em",
39
- padding: 0,
40
- position: "relative",
41
- [`&.${u.focused}`]: {
42
- color: (e.vars || e).palette[r.color].main
43
- },
44
- [`&.${u.disabled}`]: {
45
- color: (e.vars || e).palette.text.disabled
46
- },
47
- [`&.${u.error}`]: {
48
- color: (e.vars || e).palette.error.main
49
- }
50
- })), A = b("span", {
51
- name: "MuiFormLabel",
52
- slot: "Asterisk",
53
- overridesResolver: (e, r) => r.asterisk
54
- })(({
55
- theme: e
56
- }) => ({
57
- [`&.${u.error}`]: {
58
- color: (e.vars || e).palette.error.main
59
- }
60
- })), N = /* @__PURE__ */ k.forwardRef(function(r, a) {
61
- const s = z({
62
- props: r,
63
- name: "MuiFormLabel"
64
- }), {
65
- children: f,
66
- className: l,
67
- component: c = "label"
68
- } = s, p = h(s, j), n = C(), t = g({
69
- props: s,
70
- muiFormControl: n,
71
- states: ["color", "required", "focused", "disabled", "error", "filled"]
72
- }), d = i({}, s, {
73
- color: t.color || "primary",
74
- component: c,
75
- disabled: t.disabled,
76
- error: t.error,
77
- filled: t.filled,
78
- focused: t.focused,
79
- required: t.required
80
- }), m = M(d);
81
- return /* @__PURE__ */ v($, i({
82
- as: c,
83
- ownerState: d,
84
- className: y(m.root, l),
85
- ref: a
86
- }, p, {
87
- children: [f, t.required && /* @__PURE__ */ v(A, {
88
- ownerState: d,
89
- "aria-hidden": !0,
90
- className: m.asterisk,
91
- children: [" ", "*"]
92
- })]
93
- }));
94
- });
95
- process.env.NODE_ENV !== "production" && (N.propTypes = {
96
- // ┌────────────────────────────── Warning ──────────────────────────────┐
97
- // │ These PropTypes are generated from the TypeScript type definitions. │
98
- // │ To update them, edit the d.ts file and run `pnpm proptypes`. │
99
- // └─────────────────────────────────────────────────────────────────────┘
100
- /**
101
- * The content of the component.
102
- */
103
- children: o.node,
104
- /**
105
- * Override or extend the styles applied to the component.
106
- */
107
- classes: o.object,
108
- /**
109
- * @ignore
110
- */
111
- className: o.string,
112
- /**
113
- * The color of the component.
114
- * It supports both default and custom theme colors, which can be added as shown in the
115
- * [palette customization guide](https://mui.com/material-ui/customization/palette/#custom-colors).
116
- */
117
- color: o.oneOfType([o.oneOf(["error", "info", "primary", "secondary", "success", "warning"]), o.string]),
118
- /**
119
- * The component used for the root node.
120
- * Either a string to use a HTML element or a component.
121
- */
122
- component: o.elementType,
123
- /**
124
- * If `true`, the label should be displayed in a disabled state.
125
- */
126
- disabled: o.bool,
127
- /**
128
- * If `true`, the label is displayed in an error state.
129
- */
130
- error: o.bool,
131
- /**
132
- * If `true`, the label should use filled classes key.
133
- */
134
- filled: o.bool,
135
- /**
136
- * If `true`, the input of this label is focused (used by `FormGroup` components).
137
- */
138
- focused: o.bool,
139
- /**
140
- * If `true`, the label will indicate that the `input` is required.
141
- */
142
- required: o.bool,
143
- /**
144
- * The system prop that allows defining system overrides as well as additional CSS styles.
145
- */
146
- sx: o.oneOfType([o.arrayOf(o.oneOfType([o.func, o.object, o.bool])), o.func, o.object])
147
- });
148
- function E(e) {
149
- return L("MuiInputLabel", e);
150
- }
151
- O("MuiInputLabel", ["root", "focused", "disabled", "error", "required", "asterisk", "formControl", "sizeSmall", "shrink", "animated", "standard", "filled", "outlined"]);
152
- const P = ["disableAnimation", "margin", "shrink", "variant", "className"], W = (e) => {
153
- const {
154
- classes: r,
155
- formControl: a,
156
- size: s,
157
- shrink: f,
158
- disableAnimation: l,
159
- variant: c,
160
- required: p
161
- } = e, n = {
162
- root: ["root", a && "formControl", !l && "animated", f && "shrink", s && s !== "normal" && `size${q(s)}`, c],
163
- asterisk: [p && "asterisk"]
164
- }, t = F(n, E, r);
165
- return i({}, r, t);
166
- }, _ = b(N, {
167
- shouldForwardProp: (e) => I(e) || e === "classes",
168
- name: "MuiInputLabel",
169
- slot: "Root",
170
- overridesResolver: (e, r) => {
171
- const {
172
- ownerState: a
173
- } = e;
174
- return [{
175
- [`& .${u.asterisk}`]: r.asterisk
176
- }, r.root, a.formControl && r.formControl, a.size === "small" && r.sizeSmall, a.shrink && r.shrink, !a.disableAnimation && r.animated, a.focused && r.focused, r[a.variant]];
177
- }
178
- })(({
179
- theme: e,
180
- ownerState: r
181
- }) => i({
182
- display: "block",
183
- transformOrigin: "top left",
184
- whiteSpace: "nowrap",
185
- overflow: "hidden",
186
- textOverflow: "ellipsis",
187
- maxWidth: "100%"
188
- }, r.formControl && {
189
- position: "absolute",
190
- left: 0,
191
- top: 0,
192
- // slight alteration to spec spacing to match visual spec result
193
- transform: "translate(0, 20px) scale(1)"
194
- }, r.size === "small" && {
195
- // Compensation for the `Input.inputSizeSmall` style.
196
- transform: "translate(0, 17px) scale(1)"
197
- }, r.shrink && {
198
- transform: "translate(0, -1.5px) scale(0.75)",
199
- transformOrigin: "top left",
200
- maxWidth: "133%"
201
- }, !r.disableAnimation && {
202
- transition: e.transitions.create(["color", "transform", "max-width"], {
203
- duration: e.transitions.duration.shorter,
204
- easing: e.transitions.easing.easeOut
205
- })
206
- }, r.variant === "filled" && i({
207
- // Chrome's autofill feature gives the input field a yellow background.
208
- // Since the input field is behind the label in the HTML tree,
209
- // the input field is drawn last and hides the label with an opaque background color.
210
- // zIndex: 1 will raise the label above opaque background-colors of input.
211
- zIndex: 1,
212
- pointerEvents: "none",
213
- transform: "translate(12px, 16px) scale(1)",
214
- maxWidth: "calc(100% - 24px)"
215
- }, r.size === "small" && {
216
- transform: "translate(12px, 13px) scale(1)"
217
- }, r.shrink && i({
218
- userSelect: "none",
219
- pointerEvents: "auto",
220
- transform: "translate(12px, 7px) scale(0.75)",
221
- maxWidth: "calc(133% - 24px)"
222
- }, r.size === "small" && {
223
- transform: "translate(12px, 4px) scale(0.75)"
224
- })), r.variant === "outlined" && i({
225
- // see comment above on filled.zIndex
226
- zIndex: 1,
227
- pointerEvents: "none",
228
- transform: "translate(14px, 16px) scale(1)",
229
- maxWidth: "calc(100% - 24px)"
230
- }, r.size === "small" && {
231
- transform: "translate(14px, 9px) scale(1)"
232
- }, r.shrink && {
233
- userSelect: "none",
234
- pointerEvents: "auto",
235
- // Theoretically, we should have (8+5)*2/0.75 = 34px
236
- // but it feels a better when it bleeds a bit on the left, so 32px.
237
- maxWidth: "calc(133% - 32px)",
238
- transform: "translate(14px, -9px) scale(0.75)"
239
- }))), w = /* @__PURE__ */ k.forwardRef(function(r, a) {
240
- const s = z({
241
- name: "MuiInputLabel",
242
- props: r
243
- }), {
244
- disableAnimation: f = !1,
245
- shrink: l,
246
- className: c
247
- } = s, p = h(s, P), n = C();
248
- let t = l;
249
- typeof t > "u" && n && (t = n.filled || n.focused || n.adornedStart);
250
- const d = g({
251
- props: s,
252
- muiFormControl: n,
253
- states: ["size", "variant", "required", "focused"]
254
- }), m = i({}, s, {
255
- disableAnimation: f,
256
- formControl: n,
257
- shrink: t,
258
- size: d.size,
259
- variant: d.variant,
260
- required: d.required,
261
- focused: d.focused
262
- }), x = W(m);
263
- return /* @__PURE__ */ T(_, i({
264
- "data-shrink": t,
265
- ownerState: m,
266
- ref: a,
267
- className: y(x.root, c)
268
- }, p, {
269
- classes: x
270
- }));
271
- });
272
- process.env.NODE_ENV !== "production" && (w.propTypes = {
273
- // ┌────────────────────────────── Warning ──────────────────────────────┐
274
- // │ These PropTypes are generated from the TypeScript type definitions. │
275
- // │ To update them, edit the d.ts file and run `pnpm proptypes`. │
276
- // └─────────────────────────────────────────────────────────────────────┘
277
- /**
278
- * The content of the component.
279
- */
280
- children: o.node,
281
- /**
282
- * Override or extend the styles applied to the component.
283
- */
284
- classes: o.object,
285
- /**
286
- * @ignore
287
- */
288
- className: o.string,
289
- /**
290
- * The color of the component.
291
- * It supports both default and custom theme colors, which can be added as shown in the
292
- * [palette customization guide](https://mui.com/material-ui/customization/palette/#custom-colors).
293
- */
294
- color: o.oneOfType([o.oneOf(["error", "info", "primary", "secondary", "success", "warning"]), o.string]),
295
- /**
296
- * If `true`, the transition animation is disabled.
297
- * @default false
298
- */
299
- disableAnimation: o.bool,
300
- /**
301
- * If `true`, the component is disabled.
302
- */
303
- disabled: o.bool,
304
- /**
305
- * If `true`, the label is displayed in an error state.
306
- */
307
- error: o.bool,
308
- /**
309
- * If `true`, the `input` of this label is focused.
310
- */
311
- focused: o.bool,
312
- /**
313
- * If `dense`, will adjust vertical spacing. This is normally obtained via context from
314
- * FormControl.
315
- */
316
- margin: o.oneOf(["dense"]),
317
- /**
318
- * if `true`, the label will indicate that the `input` is required.
319
- */
320
- required: o.bool,
321
- /**
322
- * If `true`, the label is shrunk.
323
- */
324
- shrink: o.bool,
325
- /**
326
- * The size of the component.
327
- * @default 'normal'
328
- */
329
- size: o.oneOfType([o.oneOf(["normal", "small"]), o.string]),
330
- /**
331
- * The system prop that allows defining system overrides as well as additional CSS styles.
332
- */
333
- sx: o.oneOfType([o.arrayOf(o.oneOfType([o.func, o.object, o.bool])), o.func, o.object]),
334
- /**
335
- * The variant to use.
336
- */
337
- variant: o.oneOf(["filled", "outlined", "standard"])
338
- });
339
- export {
340
- w as I
341
- };
@@ -1,233 +0,0 @@
1
- import { a as l, _ as P } from "./objectWithoutPropertiesLoose-DJteAcBH.js";
2
- import * as d from "react";
3
- import { P as t } from "./index-C__OZmYy.js";
4
- import { c as I } from "./clsx-OuTLNxxd.js";
5
- import { g as u, a as F, s as _, r as j, f as p, u as D, c as E } from "./generateUtilityClasses-C3ivN9Ie.js";
6
- import { L as $ } from "./Select-DHUl_uG3.js";
7
- import { jsx as M } from "react/jsx-runtime";
8
- import { B as G } from "./ButtonBase-BEF7oTOe.js";
9
- import { a as U, u as S } from "./TransitionGroupContext-BDAp2T0O.js";
10
- const O = u("MuiDivider", ["root", "absolute", "fullWidth", "inset", "middle", "flexItem", "light", "vertical", "withChildren", "withChildrenVertical", "textAlignRight", "textAlignLeft", "wrapper", "wrapperVertical"]), N = u("MuiListItemIcon", ["root", "alignItemsFlexStart"]), V = u("MuiListItemText", ["root", "multiline", "dense", "inset", "primary", "secondary"]);
11
- function H(e) {
12
- return F("MuiMenuItem", e);
13
- }
14
- const n = u("MuiMenuItem", ["root", "focusVisible", "dense", "disabled", "divider", "gutters", "selected"]), W = ["autoFocus", "component", "dense", "divider", "disableGutters", "focusVisibleClassName", "role", "tabIndex", "className"], h = (e, o) => {
15
- const {
16
- ownerState: s
17
- } = e;
18
- return [o.root, s.dense && o.dense, s.divider && o.divider, !s.disableGutters && o.gutters];
19
- }, z = (e) => {
20
- const {
21
- disabled: o,
22
- dense: s,
23
- divider: a,
24
- disableGutters: c,
25
- selected: b,
26
- classes: i
27
- } = e, r = E({
28
- root: ["root", s && "dense", o && "disabled", !c && "gutters", a && "divider", b && "selected"]
29
- }, H, i);
30
- return l({}, i, r);
31
- }, A = _(G, {
32
- shouldForwardProp: (e) => j(e) || e === "classes",
33
- name: "MuiMenuItem",
34
- slot: "Root",
35
- overridesResolver: h
36
- })(({
37
- theme: e,
38
- ownerState: o
39
- }) => l({}, e.typography.body1, {
40
- display: "flex",
41
- justifyContent: "flex-start",
42
- alignItems: "center",
43
- position: "relative",
44
- textDecoration: "none",
45
- minHeight: 48,
46
- paddingTop: 6,
47
- paddingBottom: 6,
48
- boxSizing: "border-box",
49
- whiteSpace: "nowrap"
50
- }, !o.disableGutters && {
51
- paddingLeft: 16,
52
- paddingRight: 16
53
- }, o.divider && {
54
- borderBottom: `1px solid ${(e.vars || e).palette.divider}`,
55
- backgroundClip: "padding-box"
56
- }, {
57
- "&:hover": {
58
- textDecoration: "none",
59
- backgroundColor: (e.vars || e).palette.action.hover,
60
- // Reset on touch devices, it doesn't add specificity
61
- "@media (hover: none)": {
62
- backgroundColor: "transparent"
63
- }
64
- },
65
- [`&.${n.selected}`]: {
66
- backgroundColor: e.vars ? `rgba(${e.vars.palette.primary.mainChannel} / ${e.vars.palette.action.selectedOpacity})` : p(e.palette.primary.main, e.palette.action.selectedOpacity),
67
- [`&.${n.focusVisible}`]: {
68
- backgroundColor: e.vars ? `rgba(${e.vars.palette.primary.mainChannel} / calc(${e.vars.palette.action.selectedOpacity} + ${e.vars.palette.action.focusOpacity}))` : p(e.palette.primary.main, e.palette.action.selectedOpacity + e.palette.action.focusOpacity)
69
- }
70
- },
71
- [`&.${n.selected}:hover`]: {
72
- backgroundColor: e.vars ? `rgba(${e.vars.palette.primary.mainChannel} / calc(${e.vars.palette.action.selectedOpacity} + ${e.vars.palette.action.hoverOpacity}))` : p(e.palette.primary.main, e.palette.action.selectedOpacity + e.palette.action.hoverOpacity),
73
- // Reset on touch devices, it doesn't add specificity
74
- "@media (hover: none)": {
75
- backgroundColor: e.vars ? `rgba(${e.vars.palette.primary.mainChannel} / ${e.vars.palette.action.selectedOpacity})` : p(e.palette.primary.main, e.palette.action.selectedOpacity)
76
- }
77
- },
78
- [`&.${n.focusVisible}`]: {
79
- backgroundColor: (e.vars || e).palette.action.focus
80
- },
81
- [`&.${n.disabled}`]: {
82
- opacity: (e.vars || e).palette.action.disabledOpacity
83
- },
84
- [`& + .${O.root}`]: {
85
- marginTop: e.spacing(1),
86
- marginBottom: e.spacing(1)
87
- },
88
- [`& + .${O.inset}`]: {
89
- marginLeft: 52
90
- },
91
- [`& .${V.root}`]: {
92
- marginTop: 0,
93
- marginBottom: 0
94
- },
95
- [`& .${V.inset}`]: {
96
- paddingLeft: 36
97
- },
98
- [`& .${N.root}`]: {
99
- minWidth: 36
100
- }
101
- }, !o.dense && {
102
- [e.breakpoints.up("sm")]: {
103
- minHeight: "auto"
104
- }
105
- }, o.dense && l({
106
- minHeight: 32,
107
- // https://m2.material.io/components/menus#specs > Dense
108
- paddingTop: 4,
109
- paddingBottom: 4
110
- }, e.typography.body2, {
111
- [`& .${N.root} svg`]: {
112
- fontSize: "1.25rem"
113
- }
114
- }))), q = /* @__PURE__ */ d.forwardRef(function(o, s) {
115
- const a = D({
116
- props: o,
117
- name: "MuiMenuItem"
118
- }), {
119
- autoFocus: c = !1,
120
- component: b = "li",
121
- dense: i = !1,
122
- divider: g = !1,
123
- disableGutters: r = !1,
124
- focusVisibleClassName: R,
125
- role: T = "menuitem",
126
- tabIndex: v,
127
- className: k
128
- } = a, w = P(a, W), y = d.useContext($), C = d.useMemo(() => ({
129
- dense: i || y.dense || !1,
130
- disableGutters: r
131
- }), [y.dense, i, r]), m = d.useRef(null);
132
- U(() => {
133
- c && (m.current ? m.current.focus() : process.env.NODE_ENV !== "production" && console.error("MUI: Unable to set focus to a MenuItem whose component has not been rendered."));
134
- }, [c]);
135
- const L = l({}, a, {
136
- dense: C.dense,
137
- divider: g,
138
- disableGutters: r
139
- }), f = z(a), B = S(m, s);
140
- let x;
141
- return a.disabled || (x = v !== void 0 ? v : -1), /* @__PURE__ */ M($.Provider, {
142
- value: C,
143
- children: /* @__PURE__ */ M(A, l({
144
- ref: B,
145
- role: T,
146
- tabIndex: x,
147
- component: b,
148
- focusVisibleClassName: I(f.focusVisible, R),
149
- className: I(f.root, k)
150
- }, w, {
151
- ownerState: L,
152
- classes: f
153
- }))
154
- });
155
- });
156
- process.env.NODE_ENV !== "production" && (q.propTypes = {
157
- // ┌────────────────────────────── Warning ──────────────────────────────┐
158
- // │ These PropTypes are generated from the TypeScript type definitions. │
159
- // │ To update them, edit the d.ts file and run `pnpm proptypes`. │
160
- // └─────────────────────────────────────────────────────────────────────┘
161
- /**
162
- * If `true`, the list item is focused during the first mount.
163
- * Focus will also be triggered if the value changes from false to true.
164
- * @default false
165
- */
166
- autoFocus: t.bool,
167
- /**
168
- * The content of the component.
169
- */
170
- children: t.node,
171
- /**
172
- * Override or extend the styles applied to the component.
173
- */
174
- classes: t.object,
175
- /**
176
- * @ignore
177
- */
178
- className: t.string,
179
- /**
180
- * The component used for the root node.
181
- * Either a string to use a HTML element or a component.
182
- */
183
- component: t.elementType,
184
- /**
185
- * If `true`, compact vertical padding designed for keyboard and mouse input is used.
186
- * The prop defaults to the value inherited from the parent Menu component.
187
- * @default false
188
- */
189
- dense: t.bool,
190
- /**
191
- * @ignore
192
- */
193
- disabled: t.bool,
194
- /**
195
- * If `true`, the left and right padding is removed.
196
- * @default false
197
- */
198
- disableGutters: t.bool,
199
- /**
200
- * If `true`, a 1px light border is added to the bottom of the menu item.
201
- * @default false
202
- */
203
- divider: t.bool,
204
- /**
205
- * This prop can help identify which element has keyboard focus.
206
- * The class name will be applied when the element gains the focus through keyboard interaction.
207
- * It's a polyfill for the [CSS :focus-visible selector](https://drafts.csswg.org/selectors-4/#the-focus-visible-pseudo).
208
- * The rationale for using this feature [is explained here](https://github.com/WICG/focus-visible/blob/HEAD/explainer.md).
209
- * A [polyfill can be used](https://github.com/WICG/focus-visible) to apply a `focus-visible` class to other components
210
- * if needed.
211
- */
212
- focusVisibleClassName: t.string,
213
- /**
214
- * @ignore
215
- */
216
- role: t.string,
217
- /**
218
- * If `true`, the component is selected.
219
- * @default false
220
- */
221
- selected: t.bool,
222
- /**
223
- * The system prop that allows defining system overrides as well as additional CSS styles.
224
- */
225
- sx: t.oneOfType([t.arrayOf(t.oneOfType([t.func, t.object, t.bool])), t.func, t.object]),
226
- /**
227
- * @default 0
228
- */
229
- tabIndex: t.number
230
- });
231
- export {
232
- q as M
233
- };