jcicl 0.0.56 → 0.0.58

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 (48) hide show
  1. package/.chunks/ButtonBase.js +202 -209
  2. package/.chunks/Input.js +6722 -0
  3. package/.chunks/Portal.js +824 -0
  4. package/.chunks/TransitionGroupContext.js +60 -78
  5. package/.chunks/elementTypeAcceptingRef.js +23 -0
  6. package/.chunks/isFocusVisible.js +12 -0
  7. package/animation/Spin/Spin.d.ts +5 -0
  8. package/animation/Spin/Spin.js +22 -0
  9. package/animation/Spin/index.d.ts +1 -0
  10. package/animation/Spin/index.js +4 -0
  11. package/animation/index.d.ts +1 -0
  12. package/animation/index.js +4 -2
  13. package/base/Button/Button.d.ts +1 -1
  14. package/base/Button/Button.js +66 -64
  15. package/base/Input/Input.d.ts +4 -1
  16. package/base/Input/Input.js +6 -7486
  17. package/base/Input/index.d.ts +1 -1
  18. package/base/Input/index.js +2 -2
  19. package/base/LabeledValue/LabeledValue.js +23 -12
  20. package/base/index.js +6 -6
  21. package/composite/Accordion/Accordion.d.ts +15 -0
  22. package/composite/Accordion/Accordion.js +65 -0
  23. package/composite/Accordion/index.d.ts +1 -0
  24. package/composite/Accordion/index.js +4 -0
  25. package/composite/InfoCard/InfoCard.d.ts +3 -0
  26. package/composite/InfoCard/InfoCard.js +13 -11
  27. package/composite/LabeledInput/LabeledInput.d.ts +9 -0
  28. package/composite/LabeledInput/LabeledInput.js +35 -0
  29. package/composite/LabeledInput/index.d.ts +1 -0
  30. package/composite/LabeledInput/index.js +4 -0
  31. package/composite/Tooltip/Tooltip.d.ts +7 -0
  32. package/composite/Tooltip/Tooltip.js +2092 -0
  33. package/composite/Tooltip/index.d.ts +1 -0
  34. package/composite/Tooltip/index.js +4 -0
  35. package/composite/index.d.ts +3 -0
  36. package/composite/index.js +16 -10
  37. package/index.d.ts +3 -3
  38. package/index.js +50 -40
  39. package/package.json +1 -1
  40. package/supercomposite/AppHeader/AppHeader.js +1 -1
  41. package/supercomposite/EditableInfoCard/EditableInfoCard.d.ts +29 -0
  42. package/supercomposite/EditableInfoCard/EditableInfoCard.js +223 -0
  43. package/supercomposite/EditableInfoCard/index.d.ts +1 -0
  44. package/supercomposite/EditableInfoCard/index.js +4 -0
  45. package/supercomposite/index.d.ts +1 -0
  46. package/supercomposite/index.js +6 -4
  47. package/theme.d.ts +8 -0
  48. package/theme.js +7 -0
@@ -0,0 +1,824 @@
1
+ import * as f from "react";
2
+ import _ from "react";
3
+ import { P as r, b as W, h as de, T as pe, i as me } from "./DefaultPropsProvider.js";
4
+ import { c as q, _ as Ee, a as he, T as K, b as ge, e as P, s as X } from "./TransitionGroupContext.js";
5
+ import { jsx as H } from "react/jsx-runtime";
6
+ import { T as ve } from "./emotion-styled.browser.esm.js";
7
+ import { c as Q } from "./chainPropTypes.js";
8
+ import * as xe from "react-dom";
9
+ import M from "react-dom";
10
+ function ye(e) {
11
+ const {
12
+ prototype: s = {}
13
+ } = e;
14
+ return !!s.isReactComponent;
15
+ }
16
+ function Y(e, s, o, i, n) {
17
+ const t = e[s], a = n || s;
18
+ if (t == null || // When server-side rendering React doesn't warn either.
19
+ // This is not an accurate check for SSR.
20
+ // This is only in place for Emotion compat.
21
+ // TODO: Revisit once https://github.com/facebook/react/issues/20047 is resolved.
22
+ typeof window > "u")
23
+ return null;
24
+ let u;
25
+ const c = t.type;
26
+ return typeof c == "function" && !ye(c) && (u = "Did you accidentally use a plain function component for an element instead?"), u !== void 0 ? new Error(`Invalid ${i} \`${a}\` supplied to \`${o}\`. Expected an element that can hold a ref. ${u} For more information see https://mui.com/r/caveat-with-refs-guide`) : null;
27
+ }
28
+ const ee = Q(r.element, Y);
29
+ ee.isRequired = Q(r.element.isRequired, Y);
30
+ const Te = "exact-prop: ​";
31
+ function be(e) {
32
+ return process.env.NODE_ENV === "production" ? e : {
33
+ ...e,
34
+ [Te]: (s) => {
35
+ const o = Object.keys(s).filter((i) => !e.hasOwnProperty(i));
36
+ return o.length > 0 ? new Error(`The following props are not supported: ${o.map((i) => `\`${i}\``).join(", ")}. Please remove them.`) : null;
37
+ }
38
+ };
39
+ }
40
+ function Ne(e, s, o, i, n) {
41
+ if (process.env.NODE_ENV === "production")
42
+ return null;
43
+ const t = e[s], a = n || s;
44
+ return t == null ? null : t && t.nodeType !== 1 ? new Error(`Invalid ${i} \`${a}\` supplied to \`${o}\`. Expected an HTMLElement.`) : null;
45
+ }
46
+ function Je(e) {
47
+ return e && e.ownerDocument || document;
48
+ }
49
+ let z = 0;
50
+ function Oe(e) {
51
+ const [s, o] = f.useState(e), i = e || s;
52
+ return f.useEffect(() => {
53
+ s == null && (z += 1, o(`mui-${z}`));
54
+ }, [s]), i;
55
+ }
56
+ const Re = {
57
+ ...f
58
+ }, F = Re.useId;
59
+ function Ke(e) {
60
+ if (F !== void 0) {
61
+ const s = F();
62
+ return e ?? s;
63
+ }
64
+ return Oe(e);
65
+ }
66
+ function Qe({
67
+ controlled: e,
68
+ default: s,
69
+ name: o,
70
+ state: i = "value"
71
+ }) {
72
+ const {
73
+ current: n
74
+ } = f.useRef(e !== void 0), [t, a] = f.useState(s), u = n ? e : t;
75
+ if (process.env.NODE_ENV !== "production") {
76
+ f.useEffect(() => {
77
+ n !== (e !== void 0) && console.error([`MUI: A component is changing the ${n ? "" : "un"}controlled ${i} state of ${o} to be ${n ? "un" : ""}controlled.`, "Elements should not switch from uncontrolled to controlled (or vice versa).", `Decide between using a controlled or uncontrolled ${o} element for the lifetime of the component.`, "The nature of the state is determined during the first render. It's considered controlled if the value is not `undefined`.", "More info: https://fb.me/react-controlled-components"].join(`
78
+ `));
79
+ }, [i, o, e]);
80
+ const {
81
+ current: l
82
+ } = f.useRef(s);
83
+ f.useEffect(() => {
84
+ !n && !Object.is(l, s) && console.error([`MUI: A component is changing the default ${i} state of an uncontrolled ${o} after being initialized. To suppress this warning opt to use a controlled ${o}.`].join(`
85
+ `));
86
+ }, [JSON.stringify(s)]);
87
+ }
88
+ const c = f.useCallback((l) => {
89
+ n || a(l);
90
+ }, []);
91
+ return [u, c];
92
+ }
93
+ function De(e) {
94
+ return typeof e == "string";
95
+ }
96
+ function Ce(e, s, o) {
97
+ return e === void 0 || De(e) ? s : {
98
+ ...s,
99
+ ownerState: {
100
+ ...s.ownerState,
101
+ ...o
102
+ }
103
+ };
104
+ }
105
+ function Se(e, s = []) {
106
+ if (e === void 0)
107
+ return {};
108
+ const o = {};
109
+ return Object.keys(e).filter((i) => i.match(/^on[A-Z]/) && typeof e[i] == "function" && !s.includes(i)).forEach((i) => {
110
+ o[i] = e[i];
111
+ }), o;
112
+ }
113
+ function Z(e) {
114
+ if (e === void 0)
115
+ return {};
116
+ const s = {};
117
+ return Object.keys(e).filter((o) => !(o.match(/^on[A-Z]/) && typeof e[o] == "function")).forEach((o) => {
118
+ s[o] = e[o];
119
+ }), s;
120
+ }
121
+ function Ie(e) {
122
+ const {
123
+ getSlotProps: s,
124
+ additionalProps: o,
125
+ externalSlotProps: i,
126
+ externalForwardedProps: n,
127
+ className: t
128
+ } = e;
129
+ if (!s) {
130
+ const k = W(o == null ? void 0 : o.className, t, n == null ? void 0 : n.className, i == null ? void 0 : i.className), N = {
131
+ ...o == null ? void 0 : o.style,
132
+ ...n == null ? void 0 : n.style,
133
+ ...i == null ? void 0 : i.style
134
+ }, E = {
135
+ ...o,
136
+ ...n,
137
+ ...i
138
+ };
139
+ return k.length > 0 && (E.className = k), Object.keys(N).length > 0 && (E.style = N), {
140
+ props: E,
141
+ internalRef: void 0
142
+ };
143
+ }
144
+ const a = Se({
145
+ ...n,
146
+ ...i
147
+ }), u = Z(i), c = Z(n), l = s(a), p = W(l == null ? void 0 : l.className, o == null ? void 0 : o.className, t, n == null ? void 0 : n.className, i == null ? void 0 : i.className), m = {
148
+ ...l == null ? void 0 : l.style,
149
+ ...o == null ? void 0 : o.style,
150
+ ...n == null ? void 0 : n.style,
151
+ ...i == null ? void 0 : i.style
152
+ }, y = {
153
+ ...l,
154
+ ...o,
155
+ ...c,
156
+ ...u
157
+ };
158
+ return p.length > 0 && (y.className = p), Object.keys(m).length > 0 && (y.style = m), {
159
+ props: y,
160
+ internalRef: l.ref
161
+ };
162
+ }
163
+ function ke(e, s, o) {
164
+ return typeof e == "function" ? e(s, o) : e;
165
+ }
166
+ function Ye(e) {
167
+ var m;
168
+ const {
169
+ elementType: s,
170
+ externalSlotProps: o,
171
+ ownerState: i,
172
+ skipResolvingSlotProps: n = !1,
173
+ ...t
174
+ } = e, a = n ? {} : ke(o, i), {
175
+ props: u,
176
+ internalRef: c
177
+ } = Ie({
178
+ ...t,
179
+ externalSlotProps: a
180
+ }), l = q(c, a == null ? void 0 : a.ref, (m = e.additionalProps) == null ? void 0 : m.ref);
181
+ return Ce(s, {
182
+ ...u,
183
+ ref: l
184
+ }, i);
185
+ }
186
+ function te(e) {
187
+ var s;
188
+ return parseInt(f.version, 10) >= 19 ? ((s = e == null ? void 0 : e.props) == null ? void 0 : s.ref) || null : (e == null ? void 0 : e.ref) || null;
189
+ }
190
+ function $e(e) {
191
+ return Object.keys(e).length === 0;
192
+ }
193
+ function we(e = null) {
194
+ const s = f.useContext(ve);
195
+ return !s || $e(s) ? e : s;
196
+ }
197
+ const _e = de();
198
+ function Me(e = _e) {
199
+ return we(e);
200
+ }
201
+ const Ve = /* @__PURE__ */ f.createContext();
202
+ process.env.NODE_ENV !== "production" && (r.node, r.bool);
203
+ const et = () => f.useContext(Ve) ?? !1;
204
+ function Le() {
205
+ const e = Me(me);
206
+ return process.env.NODE_ENV !== "production" && f.useDebugValue(e), e[pe] || e;
207
+ }
208
+ const B = {
209
+ disabled: !1
210
+ };
211
+ var He = process.env.NODE_ENV !== "production" ? r.oneOfType([r.number, r.shape({
212
+ enter: r.number,
213
+ exit: r.number,
214
+ appear: r.number
215
+ }).isRequired]) : null;
216
+ process.env.NODE_ENV !== "production" && r.oneOfType([r.string, r.shape({
217
+ enter: r.string,
218
+ exit: r.string,
219
+ active: r.string
220
+ }), r.shape({
221
+ enter: r.string,
222
+ enterDone: r.string,
223
+ enterActive: r.string,
224
+ exit: r.string,
225
+ exitDone: r.string,
226
+ exitActive: r.string
227
+ })]);
228
+ var Ae = function(s) {
229
+ return s.scrollTop;
230
+ }, I = "unmounted", T = "exited", b = "entering", S = "entered", A = "exiting", g = /* @__PURE__ */ function(e) {
231
+ Ee(s, e);
232
+ function s(i, n) {
233
+ var t;
234
+ t = e.call(this, i, n) || this;
235
+ var a = n, u = a && !a.isMounting ? i.enter : i.appear, c;
236
+ return t.appearStatus = null, i.in ? u ? (c = T, t.appearStatus = b) : c = S : i.unmountOnExit || i.mountOnEnter ? c = I : c = T, t.state = {
237
+ status: c
238
+ }, t.nextCallback = null, t;
239
+ }
240
+ s.getDerivedStateFromProps = function(n, t) {
241
+ var a = n.in;
242
+ return a && t.status === I ? {
243
+ status: T
244
+ } : null;
245
+ };
246
+ var o = s.prototype;
247
+ return o.componentDidMount = function() {
248
+ this.updateStatus(!0, this.appearStatus);
249
+ }, o.componentDidUpdate = function(n) {
250
+ var t = null;
251
+ if (n !== this.props) {
252
+ var a = this.state.status;
253
+ this.props.in ? a !== b && a !== S && (t = b) : (a === b || a === S) && (t = A);
254
+ }
255
+ this.updateStatus(!1, t);
256
+ }, o.componentWillUnmount = function() {
257
+ this.cancelNextCallback();
258
+ }, o.getTimeouts = function() {
259
+ var n = this.props.timeout, t, a, u;
260
+ return t = a = u = n, n != null && typeof n != "number" && (t = n.exit, a = n.enter, u = n.appear !== void 0 ? n.appear : a), {
261
+ exit: t,
262
+ enter: a,
263
+ appear: u
264
+ };
265
+ }, o.updateStatus = function(n, t) {
266
+ if (n === void 0 && (n = !1), t !== null)
267
+ if (this.cancelNextCallback(), t === b) {
268
+ if (this.props.unmountOnExit || this.props.mountOnEnter) {
269
+ var a = this.props.nodeRef ? this.props.nodeRef.current : M.findDOMNode(this);
270
+ a && Ae(a);
271
+ }
272
+ this.performEnter(n);
273
+ } else
274
+ this.performExit();
275
+ else this.props.unmountOnExit && this.state.status === T && this.setState({
276
+ status: I
277
+ });
278
+ }, o.performEnter = function(n) {
279
+ var t = this, a = this.props.enter, u = this.context ? this.context.isMounting : n, c = this.props.nodeRef ? [u] : [M.findDOMNode(this), u], l = c[0], p = c[1], m = this.getTimeouts(), y = u ? m.appear : m.enter;
280
+ if (!n && !a || B.disabled) {
281
+ this.safeSetState({
282
+ status: S
283
+ }, function() {
284
+ t.props.onEntered(l);
285
+ });
286
+ return;
287
+ }
288
+ this.props.onEnter(l, p), this.safeSetState({
289
+ status: b
290
+ }, function() {
291
+ t.props.onEntering(l, p), t.onTransitionEnd(y, function() {
292
+ t.safeSetState({
293
+ status: S
294
+ }, function() {
295
+ t.props.onEntered(l, p);
296
+ });
297
+ });
298
+ });
299
+ }, o.performExit = function() {
300
+ var n = this, t = this.props.exit, a = this.getTimeouts(), u = this.props.nodeRef ? void 0 : M.findDOMNode(this);
301
+ if (!t || B.disabled) {
302
+ this.safeSetState({
303
+ status: T
304
+ }, function() {
305
+ n.props.onExited(u);
306
+ });
307
+ return;
308
+ }
309
+ this.props.onExit(u), this.safeSetState({
310
+ status: A
311
+ }, function() {
312
+ n.props.onExiting(u), n.onTransitionEnd(a.exit, function() {
313
+ n.safeSetState({
314
+ status: T
315
+ }, function() {
316
+ n.props.onExited(u);
317
+ });
318
+ });
319
+ });
320
+ }, o.cancelNextCallback = function() {
321
+ this.nextCallback !== null && (this.nextCallback.cancel(), this.nextCallback = null);
322
+ }, o.safeSetState = function(n, t) {
323
+ t = this.setNextCallback(t), this.setState(n, t);
324
+ }, o.setNextCallback = function(n) {
325
+ var t = this, a = !0;
326
+ return this.nextCallback = function(u) {
327
+ a && (a = !1, t.nextCallback = null, n(u));
328
+ }, this.nextCallback.cancel = function() {
329
+ a = !1;
330
+ }, this.nextCallback;
331
+ }, o.onTransitionEnd = function(n, t) {
332
+ this.setNextCallback(t);
333
+ var a = this.props.nodeRef ? this.props.nodeRef.current : M.findDOMNode(this), u = n == null && !this.props.addEndListener;
334
+ if (!a || u) {
335
+ setTimeout(this.nextCallback, 0);
336
+ return;
337
+ }
338
+ if (this.props.addEndListener) {
339
+ var c = this.props.nodeRef ? [this.nextCallback] : [a, this.nextCallback], l = c[0], p = c[1];
340
+ this.props.addEndListener(l, p);
341
+ }
342
+ n != null && setTimeout(this.nextCallback, n);
343
+ }, o.render = function() {
344
+ var n = this.state.status;
345
+ if (n === I)
346
+ return null;
347
+ var t = this.props, a = t.children;
348
+ t.in, t.mountOnEnter, t.unmountOnExit, t.appear, t.enter, t.exit, t.timeout, t.addEndListener, t.onEnter, t.onEntering, t.onEntered, t.onExit, t.onExiting, t.onExited, t.nodeRef;
349
+ var u = he(t, ["children", "in", "mountOnEnter", "unmountOnExit", "appear", "enter", "exit", "timeout", "addEndListener", "onEnter", "onEntering", "onEntered", "onExit", "onExiting", "onExited", "nodeRef"]);
350
+ return (
351
+ // allows for nested Transitions
352
+ /* @__PURE__ */ _.createElement(K.Provider, {
353
+ value: null
354
+ }, typeof a == "function" ? a(n, u) : _.cloneElement(_.Children.only(a), u))
355
+ );
356
+ }, s;
357
+ }(_.Component);
358
+ g.contextType = K;
359
+ g.propTypes = process.env.NODE_ENV !== "production" ? {
360
+ /**
361
+ * A React reference to DOM element that need to transition:
362
+ * https://stackoverflow.com/a/51127130/4671932
363
+ *
364
+ * - When `nodeRef` prop is used, `node` is not passed to callback functions
365
+ * (e.g. `onEnter`) because user already has direct access to the node.
366
+ * - When changing `key` prop of `Transition` in a `TransitionGroup` a new
367
+ * `nodeRef` need to be provided to `Transition` with changed `key` prop
368
+ * (see
369
+ * [test/CSSTransition-test.js](https://github.com/reactjs/react-transition-group/blob/13435f897b3ab71f6e19d724f145596f5910581c/test/CSSTransition-test.js#L362-L437)).
370
+ */
371
+ nodeRef: r.shape({
372
+ current: typeof Element > "u" ? r.any : function(e, s, o, i, n, t) {
373
+ var a = e[s];
374
+ return r.instanceOf(a && "ownerDocument" in a ? a.ownerDocument.defaultView.Element : Element)(e, s, o, i, n, t);
375
+ }
376
+ }),
377
+ /**
378
+ * A `function` child can be used instead of a React element. This function is
379
+ * called with the current transition status (`'entering'`, `'entered'`,
380
+ * `'exiting'`, `'exited'`), which can be used to apply context
381
+ * specific props to a component.
382
+ *
383
+ * ```jsx
384
+ * <Transition in={this.state.in} timeout={150}>
385
+ * {state => (
386
+ * <MyComponent className={`fade fade-${state}`} />
387
+ * )}
388
+ * </Transition>
389
+ * ```
390
+ */
391
+ children: r.oneOfType([r.func.isRequired, r.element.isRequired]).isRequired,
392
+ /**
393
+ * Show the component; triggers the enter or exit states
394
+ */
395
+ in: r.bool,
396
+ /**
397
+ * By default the child component is mounted immediately along with
398
+ * the parent `Transition` component. If you want to "lazy mount" the component on the
399
+ * first `in={true}` you can set `mountOnEnter`. After the first enter transition the component will stay
400
+ * mounted, even on "exited", unless you also specify `unmountOnExit`.
401
+ */
402
+ mountOnEnter: r.bool,
403
+ /**
404
+ * By default the child component stays mounted after it reaches the `'exited'` state.
405
+ * Set `unmountOnExit` if you'd prefer to unmount the component after it finishes exiting.
406
+ */
407
+ unmountOnExit: r.bool,
408
+ /**
409
+ * By default the child component does not perform the enter transition when
410
+ * it first mounts, regardless of the value of `in`. If you want this
411
+ * behavior, set both `appear` and `in` to `true`.
412
+ *
413
+ * > **Note**: there are no special appear states like `appearing`/`appeared`, this prop
414
+ * > only adds an additional enter transition. However, in the
415
+ * > `<CSSTransition>` component that first enter transition does result in
416
+ * > additional `.appear-*` classes, that way you can choose to style it
417
+ * > differently.
418
+ */
419
+ appear: r.bool,
420
+ /**
421
+ * Enable or disable enter transitions.
422
+ */
423
+ enter: r.bool,
424
+ /**
425
+ * Enable or disable exit transitions.
426
+ */
427
+ exit: r.bool,
428
+ /**
429
+ * The duration of the transition, in milliseconds.
430
+ * Required unless `addEndListener` is provided.
431
+ *
432
+ * You may specify a single timeout for all transitions:
433
+ *
434
+ * ```jsx
435
+ * timeout={500}
436
+ * ```
437
+ *
438
+ * or individually:
439
+ *
440
+ * ```jsx
441
+ * timeout={{
442
+ * appear: 500,
443
+ * enter: 300,
444
+ * exit: 500,
445
+ * }}
446
+ * ```
447
+ *
448
+ * - `appear` defaults to the value of `enter`
449
+ * - `enter` defaults to `0`
450
+ * - `exit` defaults to `0`
451
+ *
452
+ * @type {number | { enter?: number, exit?: number, appear?: number }}
453
+ */
454
+ timeout: function(s) {
455
+ var o = He;
456
+ s.addEndListener || (o = o.isRequired);
457
+ for (var i = arguments.length, n = new Array(i > 1 ? i - 1 : 0), t = 1; t < i; t++)
458
+ n[t - 1] = arguments[t];
459
+ return o.apply(void 0, [s].concat(n));
460
+ },
461
+ /**
462
+ * Add a custom transition end trigger. Called with the transitioning
463
+ * DOM node and a `done` callback. Allows for more fine grained transition end
464
+ * logic. Timeouts are still used as a fallback if provided.
465
+ *
466
+ * **Note**: when `nodeRef` prop is passed, `node` is not passed.
467
+ *
468
+ * ```jsx
469
+ * addEndListener={(node, done) => {
470
+ * // use the css transitionend event to mark the finish of a transition
471
+ * node.addEventListener('transitionend', done, false);
472
+ * }}
473
+ * ```
474
+ */
475
+ addEndListener: r.func,
476
+ /**
477
+ * Callback fired before the "entering" status is applied. An extra parameter
478
+ * `isAppearing` is supplied to indicate if the enter stage is occurring on the initial mount
479
+ *
480
+ * **Note**: when `nodeRef` prop is passed, `node` is not passed.
481
+ *
482
+ * @type Function(node: HtmlElement, isAppearing: bool) -> void
483
+ */
484
+ onEnter: r.func,
485
+ /**
486
+ * Callback fired after the "entering" status is applied. An extra parameter
487
+ * `isAppearing` is supplied to indicate if the enter stage is occurring on the initial mount
488
+ *
489
+ * **Note**: when `nodeRef` prop is passed, `node` is not passed.
490
+ *
491
+ * @type Function(node: HtmlElement, isAppearing: bool)
492
+ */
493
+ onEntering: r.func,
494
+ /**
495
+ * Callback fired after the "entered" status is applied. An extra parameter
496
+ * `isAppearing` is supplied to indicate if the enter stage is occurring on the initial mount
497
+ *
498
+ * **Note**: when `nodeRef` prop is passed, `node` is not passed.
499
+ *
500
+ * @type Function(node: HtmlElement, isAppearing: bool) -> void
501
+ */
502
+ onEntered: r.func,
503
+ /**
504
+ * Callback fired before the "exiting" status is applied.
505
+ *
506
+ * **Note**: when `nodeRef` prop is passed, `node` is not passed.
507
+ *
508
+ * @type Function(node: HtmlElement) -> void
509
+ */
510
+ onExit: r.func,
511
+ /**
512
+ * Callback fired after the "exiting" status is applied.
513
+ *
514
+ * **Note**: when `nodeRef` prop is passed, `node` is not passed.
515
+ *
516
+ * @type Function(node: HtmlElement) -> void
517
+ */
518
+ onExiting: r.func,
519
+ /**
520
+ * Callback fired after the "exited" status is applied.
521
+ *
522
+ * **Note**: when `nodeRef` prop is passed, `node` is not passed
523
+ *
524
+ * @type Function(node: HtmlElement) -> void
525
+ */
526
+ onExited: r.func
527
+ } : {};
528
+ function C() {
529
+ }
530
+ g.defaultProps = {
531
+ in: !1,
532
+ mountOnEnter: !1,
533
+ unmountOnExit: !1,
534
+ appear: !1,
535
+ enter: !0,
536
+ exit: !0,
537
+ onEnter: C,
538
+ onEntering: C,
539
+ onEntered: C,
540
+ onExit: C,
541
+ onExiting: C,
542
+ onExited: C
543
+ };
544
+ g.UNMOUNTED = I;
545
+ g.EXITED = T;
546
+ g.ENTERING = b;
547
+ g.ENTERED = S;
548
+ g.EXITING = A;
549
+ const je = (e) => e.scrollTop;
550
+ function J(e, s) {
551
+ const {
552
+ timeout: o,
553
+ easing: i,
554
+ style: n = {}
555
+ } = e;
556
+ return {
557
+ duration: n.transitionDuration ?? (typeof o == "number" ? o : o[s.mode] || 0),
558
+ easing: n.transitionTimingFunction ?? (typeof i == "object" ? i[s.mode] : i),
559
+ delay: n.transitionDelay
560
+ };
561
+ }
562
+ function j(e) {
563
+ return `scale(${e}, ${e ** 2})`;
564
+ }
565
+ const Ue = {
566
+ entering: {
567
+ opacity: 1,
568
+ transform: j(1)
569
+ },
570
+ entered: {
571
+ opacity: 1,
572
+ transform: "none"
573
+ }
574
+ }, L = typeof navigator < "u" && /^((?!chrome|android).)*(safari|mobile)/i.test(navigator.userAgent) && /(os |version\/)15(.|_)4/i.test(navigator.userAgent), U = /* @__PURE__ */ f.forwardRef(function(s, o) {
575
+ const {
576
+ addEndListener: i,
577
+ appear: n = !0,
578
+ children: t,
579
+ easing: a,
580
+ in: u,
581
+ onEnter: c,
582
+ onEntered: l,
583
+ onEntering: p,
584
+ onExit: m,
585
+ onExited: y,
586
+ onExiting: k,
587
+ style: N,
588
+ timeout: E = "auto",
589
+ // eslint-disable-next-line react/prop-types
590
+ TransitionComponent: ne = g,
591
+ ...ie
592
+ } = s, oe = ge(), V = f.useRef(), O = Le(), $ = f.useRef(null), re = q($, te(t), o), R = (d) => (v) => {
593
+ if (d) {
594
+ const x = $.current;
595
+ v === void 0 ? d(x) : d(x, v);
596
+ }
597
+ }, se = R(p), ae = R((d, v) => {
598
+ je(d);
599
+ const {
600
+ duration: x,
601
+ delay: w,
602
+ easing: h
603
+ } = J({
604
+ style: N,
605
+ timeout: E,
606
+ easing: a
607
+ }, {
608
+ mode: "enter"
609
+ });
610
+ let D;
611
+ E === "auto" ? (D = O.transitions.getAutoHeightDuration(d.clientHeight), V.current = D) : D = x, d.style.transition = [O.transitions.create("opacity", {
612
+ duration: D,
613
+ delay: w
614
+ }), O.transitions.create("transform", {
615
+ duration: L ? D : D * 0.666,
616
+ delay: w,
617
+ easing: h
618
+ })].join(","), c && c(d, v);
619
+ }), ue = R(l), ce = R(k), le = R((d) => {
620
+ const {
621
+ duration: v,
622
+ delay: x,
623
+ easing: w
624
+ } = J({
625
+ style: N,
626
+ timeout: E,
627
+ easing: a
628
+ }, {
629
+ mode: "exit"
630
+ });
631
+ let h;
632
+ E === "auto" ? (h = O.transitions.getAutoHeightDuration(d.clientHeight), V.current = h) : h = v, d.style.transition = [O.transitions.create("opacity", {
633
+ duration: h,
634
+ delay: x
635
+ }), O.transitions.create("transform", {
636
+ duration: L ? h : h * 0.666,
637
+ delay: L ? x : x || h * 0.333,
638
+ easing: w
639
+ })].join(","), d.style.opacity = 0, d.style.transform = j(0.75), m && m(d);
640
+ }), fe = R(y);
641
+ return /* @__PURE__ */ H(ne, {
642
+ appear: n,
643
+ in: u,
644
+ nodeRef: $,
645
+ onEnter: ae,
646
+ onEntered: ue,
647
+ onEntering: se,
648
+ onExit: le,
649
+ onExited: fe,
650
+ onExiting: ce,
651
+ addEndListener: (d) => {
652
+ E === "auto" && oe.start(V.current || 0, d), i && i($.current, d);
653
+ },
654
+ timeout: E === "auto" ? null : E,
655
+ ...ie,
656
+ children: (d, v) => /* @__PURE__ */ f.cloneElement(t, {
657
+ style: {
658
+ opacity: 0,
659
+ transform: j(0.75),
660
+ visibility: d === "exited" && !u ? "hidden" : void 0,
661
+ ...Ue[d],
662
+ ...N,
663
+ ...t.props.style
664
+ },
665
+ ref: re,
666
+ ...v
667
+ })
668
+ });
669
+ });
670
+ process.env.NODE_ENV !== "production" && (U.propTypes = {
671
+ // ┌────────────────────────────── Warning ──────────────────────────────┐
672
+ // │ These PropTypes are generated from the TypeScript type definitions. │
673
+ // │ To update them, edit the d.ts file and run `pnpm proptypes`. │
674
+ // └─────────────────────────────────────────────────────────────────────┘
675
+ /**
676
+ * Add a custom transition end trigger. Called with the transitioning DOM
677
+ * node and a done callback. Allows for more fine grained transition end
678
+ * logic. Note: Timeouts are still used as a fallback if provided.
679
+ */
680
+ addEndListener: r.func,
681
+ /**
682
+ * Perform the enter transition when it first mounts if `in` is also `true`.
683
+ * Set this to `false` to disable this behavior.
684
+ * @default true
685
+ */
686
+ appear: r.bool,
687
+ /**
688
+ * A single child content element.
689
+ */
690
+ children: ee.isRequired,
691
+ /**
692
+ * The transition timing function.
693
+ * You may specify a single easing or a object containing enter and exit values.
694
+ */
695
+ easing: r.oneOfType([r.shape({
696
+ enter: r.string,
697
+ exit: r.string
698
+ }), r.string]),
699
+ /**
700
+ * If `true`, the component will transition in.
701
+ */
702
+ in: r.bool,
703
+ /**
704
+ * @ignore
705
+ */
706
+ onEnter: r.func,
707
+ /**
708
+ * @ignore
709
+ */
710
+ onEntered: r.func,
711
+ /**
712
+ * @ignore
713
+ */
714
+ onEntering: r.func,
715
+ /**
716
+ * @ignore
717
+ */
718
+ onExit: r.func,
719
+ /**
720
+ * @ignore
721
+ */
722
+ onExited: r.func,
723
+ /**
724
+ * @ignore
725
+ */
726
+ onExiting: r.func,
727
+ /**
728
+ * @ignore
729
+ */
730
+ style: r.object,
731
+ /**
732
+ * The duration for the transition, in milliseconds.
733
+ * You may specify a single timeout for all transitions, or individually with an object.
734
+ *
735
+ * Set to 'auto' to automatically calculate transition time based on height.
736
+ * @default 'auto'
737
+ */
738
+ timeout: r.oneOfType([r.oneOf(["auto"]), r.number, r.shape({
739
+ appear: r.number,
740
+ enter: r.number,
741
+ exit: r.number
742
+ })])
743
+ });
744
+ U && (U.muiSupportAuto = !0);
745
+ function Ge(e) {
746
+ return typeof e == "function" ? e() : e;
747
+ }
748
+ const G = /* @__PURE__ */ f.forwardRef(function(s, o) {
749
+ const {
750
+ children: i,
751
+ container: n,
752
+ disablePortal: t = !1
753
+ } = s, [a, u] = f.useState(null), c = q(/* @__PURE__ */ f.isValidElement(i) ? te(i) : null, o);
754
+ if (P(() => {
755
+ t || u(Ge(n) || document.body);
756
+ }, [n, t]), P(() => {
757
+ if (a && !t)
758
+ return X(o, a), () => {
759
+ X(o, null);
760
+ };
761
+ }, [o, a, t]), t) {
762
+ if (/* @__PURE__ */ f.isValidElement(i)) {
763
+ const l = {
764
+ ref: c
765
+ };
766
+ return /* @__PURE__ */ f.cloneElement(i, l);
767
+ }
768
+ return /* @__PURE__ */ H(f.Fragment, {
769
+ children: i
770
+ });
771
+ }
772
+ return /* @__PURE__ */ H(f.Fragment, {
773
+ children: a && /* @__PURE__ */ xe.createPortal(i, a)
774
+ });
775
+ });
776
+ process.env.NODE_ENV !== "production" && (G.propTypes = {
777
+ // ┌────────────────────────────── Warning ──────────────────────────────┐
778
+ // │ These PropTypes are generated from the TypeScript type definitions. │
779
+ // │ To update them, edit the TypeScript types and run `pnpm proptypes`. │
780
+ // └─────────────────────────────────────────────────────────────────────┘
781
+ /**
782
+ * The children to render into the `container`.
783
+ */
784
+ children: r.node,
785
+ /**
786
+ * An HTML element or function that returns one.
787
+ * The `container` will have the portal children appended to it.
788
+ *
789
+ * You can also provide a callback, which is called in a React layout effect.
790
+ * This lets you set the container from a ref, and also makes server-side rendering possible.
791
+ *
792
+ * By default, it uses the body of the top-level document object,
793
+ * so it's simply `document.body` most of the time.
794
+ */
795
+ container: r.oneOfType([Ne, r.func]),
796
+ /**
797
+ * The `children` will be under the DOM hierarchy of the parent component.
798
+ * @default false
799
+ */
800
+ disablePortal: r.bool
801
+ });
802
+ process.env.NODE_ENV !== "production" && (G.propTypes = be(G.propTypes));
803
+ export {
804
+ U as G,
805
+ Ne as H,
806
+ G as P,
807
+ g as T,
808
+ et as a,
809
+ Le as b,
810
+ Qe as c,
811
+ Ke as d,
812
+ Ce as e,
813
+ ee as f,
814
+ te as g,
815
+ Me as h,
816
+ be as i,
817
+ je as j,
818
+ J as k,
819
+ Se as l,
820
+ Ie as m,
821
+ Je as o,
822
+ ke as r,
823
+ Ye as u
824
+ };