@cgi-learning-hub/ui 1.2.0-dev.1725543340 → 1.2.0-dev.1725543764

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 (163) hide show
  1. package/dist/Box-BDMtAH2P.cjs +1 -0
  2. package/dist/{Box-BJvmuM0Y.js → Box-CONPkck2.js} +32 -30
  3. package/dist/Button-By3A0teb.js +454 -0
  4. package/dist/Button-CBAa7bmK.cjs +1 -0
  5. package/dist/ButtonBase-D0vqeM8I.js +890 -0
  6. package/dist/ButtonBase-DePtV_m6.cjs +75 -0
  7. package/dist/CircularProgress-BRnSv2J2.cjs +28 -0
  8. package/dist/CircularProgress-BrfcRJbv.js +251 -0
  9. package/dist/DatePicker-Cw1xQ3Sn.cjs +19 -0
  10. package/dist/{DatePicker-vhA6Fe5s.js → DatePicker-wZ1VHlXF.js} +4665 -4520
  11. package/dist/DefaultButton-B2fD87Nn.cjs +1 -0
  12. package/dist/DefaultButton-B8Qi2O0K.js +353 -0
  13. package/dist/DefaultPropsProvider-B6IbLm7M.cjs +17 -0
  14. package/dist/DefaultPropsProvider-QV6PDjPd.js +468 -0
  15. package/dist/IconButton-BiLAYORS.js +239 -0
  16. package/dist/IconButton-DE-QtB3Q.cjs +2 -0
  17. package/dist/{InputAdornment-zaw7AFWU.js → InputAdornment-7ED2C-w1.js} +81 -65
  18. package/dist/InputAdornment-CJbpwt2R.cjs +1 -0
  19. package/dist/InputBase-LZPaeC-A.cjs +3 -0
  20. package/dist/InputBase-jbXydPMc.js +802 -0
  21. package/dist/{Stack-Dlgk5t_M.js → Stack-BzF_6-v5.js} +62 -60
  22. package/dist/Stack-D6Kv6y1D.cjs +1 -0
  23. package/dist/Tabs-CV_eM5RY.js +1222 -0
  24. package/dist/Tabs-DcqpjpXb.cjs +4 -0
  25. package/dist/TextField-DAxS82qf.cjs +12 -0
  26. package/dist/{TextField-DG1754qQ.js → TextField-G9MOGCdw.js} +3033 -2408
  27. package/dist/{Tooltip-C7ZUZylZ.js → Tooltip-D_4ANHAc.js} +4682 -3406
  28. package/dist/Tooltip-Ma-NowZd.cjs +100 -0
  29. package/dist/TransitionGroupContext-B5aSBz0G.js +64 -0
  30. package/dist/TransitionGroupContext-gQFtuZSh.cjs +1 -0
  31. package/dist/Typography-4kqbsc6q.js +258 -0
  32. package/dist/Typography-CNQVeQXr.cjs +1 -0
  33. package/dist/components/DatePicker/DatePicker.cjs.js +1 -1
  34. package/dist/components/DatePicker/DatePicker.es.js +3 -3
  35. package/dist/components/DatePicker/DatePicker.stories.cjs.js +1 -1
  36. package/dist/components/DatePicker/DatePicker.stories.es.js +3 -3
  37. package/dist/components/DatePicker/index.cjs.js +1 -1
  38. package/dist/components/DatePicker/index.es.js +1 -1
  39. package/dist/components/DefaultButton/DefaultButton.cjs.js +1 -1
  40. package/dist/components/DefaultButton/DefaultButton.es.js +2 -2
  41. package/dist/components/DefaultButton/DefaultButtonIcon.cjs.js +1 -1
  42. package/dist/components/DefaultButton/DefaultButtonIcon.es.js +108 -67
  43. package/dist/components/DefaultButton/index.cjs.js +1 -1
  44. package/dist/components/DefaultButton/index.es.js +1 -1
  45. package/dist/components/Dropzone/Dropzone.cjs.js +5 -5
  46. package/dist/components/Dropzone/Dropzone.es.js +8 -8
  47. package/dist/components/EmptyState/EmptyState.cjs.js +1 -1
  48. package/dist/components/EmptyState/EmptyState.es.js +2 -2
  49. package/dist/components/FileList/FileList.cjs.js +1 -1
  50. package/dist/components/FileList/FileList.es.js +1 -1
  51. package/dist/components/FileList/FileListItem.cjs.js +1 -1
  52. package/dist/components/FileList/FileListItem.es.js +10 -11
  53. package/dist/components/IconButton.stories.cjs.js +1 -1
  54. package/dist/components/IconButton.stories.es.js +13 -14
  55. package/dist/components/Loader/Loader.cjs.js +1 -1
  56. package/dist/components/Loader/Loader.es.js +1 -1
  57. package/dist/components/PaperHeader/PaperHeader.cjs.js +1 -1
  58. package/dist/components/PaperHeader/PaperHeader.d.ts +3 -1
  59. package/dist/components/PaperHeader/PaperHeader.es.js +26 -28
  60. package/dist/components/PaperHeader/PaperHeader.stories.cjs.js +1 -1
  61. package/dist/components/PaperHeader/PaperHeader.stories.es.js +7 -7
  62. package/dist/components/PasswordInput/PasswordInput.cjs.js +1 -1
  63. package/dist/components/PasswordInput/PasswordInput.es.js +5 -5
  64. package/dist/components/PrimaryButton/PrimaryButton.cjs.js +1 -1
  65. package/dist/components/PrimaryButton/PrimaryButton.es.js +1 -1
  66. package/dist/components/PrimaryButton/PrimaryButton.stories.cjs.js +1 -1
  67. package/dist/components/PrimaryButton/PrimaryButton.stories.es.js +1 -1
  68. package/dist/components/SearchInput/SearchInput.cjs.js +1 -1
  69. package/dist/components/SearchInput/SearchInput.es.js +4 -4
  70. package/dist/components/SecondaryButton/SecondaryButton.cjs.js +1 -1
  71. package/dist/components/SecondaryButton/SecondaryButton.es.js +1 -1
  72. package/dist/components/SecondaryButton/SecondaryButton.stories.cjs.js +1 -1
  73. package/dist/components/SecondaryButton/SecondaryButton.stories.es.js +1 -1
  74. package/dist/components/TabList.stories.cjs.js +1 -1
  75. package/dist/components/TabList.stories.es.js +100 -87
  76. package/dist/components/TextInput/TextInput.cjs.js +1 -1
  77. package/dist/components/TextInput/TextInput.es.js +1 -1
  78. package/dist/components/index.cjs.js +1 -1
  79. package/dist/components/index.d.ts +2 -0
  80. package/dist/components/index.es.js +244 -236
  81. package/dist/composeClasses-B_ETVugV.cjs +1 -0
  82. package/dist/composeClasses-zmPRtZOg.js +16 -0
  83. package/dist/createSvgIcon-B6bEgasO.js +249 -0
  84. package/dist/createSvgIcon-C92jLZ0q.cjs +2 -0
  85. package/dist/createSvgIcon-Cdsg9tFu.js +88 -0
  86. package/dist/createSvgIcon-CrOALbij.cjs +1 -0
  87. package/dist/extendSxProp-BpSXIdup.js +37 -0
  88. package/dist/extendSxProp-DVE8Tgj8.cjs +1 -0
  89. package/dist/{fr-CXEmlY0d.js → fr-D92L3a1M.js} +13 -13
  90. package/dist/{fr-C4bcUC-9.cjs → fr-EMw1nUC-.cjs} +1 -1
  91. package/dist/identifier-7NboR24y.cjs +59 -0
  92. package/dist/identifier-Bsv46xiT.js +2930 -0
  93. package/dist/index-C9spydU3.js +89 -0
  94. package/dist/index-DHDspyh-.cjs +1 -0
  95. package/dist/index.cjs.js +1 -1
  96. package/dist/index.es.js +244 -236
  97. package/dist/{ownerWindow-C7EH1lr6.js → ownerWindow-BoRkeomM.js} +2 -2
  98. package/dist/{refType-DiVIFcsY.js → refType-BnS1d2D8.js} +1 -1
  99. package/dist/{refType-D1DDOFsy.cjs → refType-YgbJS0xl.cjs} +1 -1
  100. package/dist/useControlled-Bf7_InaL.cjs +3 -0
  101. package/dist/useControlled-D59BLg1S.js +48 -0
  102. package/dist/useEventCallback-BgMlqKLP.js +14 -0
  103. package/dist/useEventCallback-CrCf96iG.cjs +1 -0
  104. package/dist/useId-CyGZMA-F.js +19 -0
  105. package/dist/useId-D5Txt-1B.cjs +1 -0
  106. package/dist/useTheme-A9inJAFh.cjs +1 -0
  107. package/dist/useTheme-C0nMwKpp.js +128 -0
  108. package/dist/{useTheme-1gSw-INq.js → useTheme-DzMeSzHc.js} +5 -5
  109. package/dist/useTheme-Zq6D7sUp.cjs +1 -0
  110. package/dist/useThemeProps-YFPF1eJp.js +40 -0
  111. package/dist/useThemeProps-r2yCksSx.cjs +1 -0
  112. package/package.json +15 -15
  113. package/dist/Box-2ZrLOc7U.cjs +0 -1
  114. package/dist/Button-HyZp1VKI.js +0 -359
  115. package/dist/Button-NhaA68Of.cjs +0 -1
  116. package/dist/ButtonBase-CnINN-P4.cjs +0 -75
  117. package/dist/ButtonBase-cOL6Mpcp.js +0 -827
  118. package/dist/CircularProgress-01RZzfpF.cjs +0 -28
  119. package/dist/CircularProgress-DO4r9-x8.js +0 -217
  120. package/dist/DatePicker-GTtXZK-p.cjs +0 -19
  121. package/dist/DefaultButton-BMmuKPgA.cjs +0 -1
  122. package/dist/DefaultButton-CKY6tuni.js +0 -258
  123. package/dist/IconButton-3v-0zgZW.cjs +0 -2
  124. package/dist/IconButton-BBfmzBP6.js +0 -184
  125. package/dist/InputAdornment-DHmtETz3.cjs +0 -1
  126. package/dist/InputBase-BpGQgBej.cjs +0 -3
  127. package/dist/InputBase-COUxfhh1.js +0 -794
  128. package/dist/Stack-D9IYPfJ8.cjs +0 -1
  129. package/dist/Tabs-Blo-8Ro5.js +0 -1091
  130. package/dist/Tabs-D0e7cB4l.cjs +0 -4
  131. package/dist/TextField-8AuRLRIK.cjs +0 -12
  132. package/dist/Tooltip-CFVJXplM.cjs +0 -95
  133. package/dist/TransitionGroupContext-BkoHK5Kx.js +0 -14
  134. package/dist/TransitionGroupContext-mYDSzffd.cjs +0 -1
  135. package/dist/Typography-DjrvRhOr.js +0 -178
  136. package/dist/Typography-YHooSvuR.cjs +0 -1
  137. package/dist/createStyled--XbpooZB.js +0 -142
  138. package/dist/createStyled-CuYz_ckk.cjs +0 -1
  139. package/dist/createSvgIcon-CUiH3cta.cjs +0 -1
  140. package/dist/createSvgIcon-D29Io9jD.js +0 -183
  141. package/dist/createSvgIcon-DTc4Xvfk.cjs +0 -2
  142. package/dist/createSvgIcon-DvOXtgXV.js +0 -76
  143. package/dist/identifier-CAQ9PWqs.js +0 -3046
  144. package/dist/identifier-CWIj084w.cjs +0 -50
  145. package/dist/isHostComponent-PydJW4A4.cjs +0 -1
  146. package/dist/isHostComponent-kiaBvYVo.js +0 -6
  147. package/dist/styled-Bt4oYVnF.cjs +0 -17
  148. package/dist/styled-Co-8YWfm.js +0 -533
  149. package/dist/useControlled-DKpcyPsg.cjs +0 -3
  150. package/dist/useControlled-DoRrpN8o.js +0 -48
  151. package/dist/useId-BW-oWmul.js +0 -19
  152. package/dist/useId-Cw0TtD-8.cjs +0 -1
  153. package/dist/useIsFocusVisible-Bv_7uvif.cjs +0 -1
  154. package/dist/useIsFocusVisible-DhASXQ4o.js +0 -69
  155. package/dist/useTheme-Dm6RnXrf.cjs +0 -1
  156. package/dist/useTheme-HJhneR9g.js +0 -99
  157. package/dist/useTheme-T2P7WhLG.cjs +0 -1
  158. package/dist/useThemeProps-BKIVQv3E.js +0 -17
  159. package/dist/useThemeProps-BfZ3lLQs.js +0 -27
  160. package/dist/useThemeProps-BpFUkYqe.cjs +0 -1
  161. package/dist/useThemeProps-Co5ylM0H.cjs +0 -1
  162. package/dist/useTimeout-BdvDipeg.js +0 -47
  163. package/dist/useTimeout-XUWYBnl6.cjs +0 -1
@@ -0,0 +1,890 @@
1
+ var Oe = Object.defineProperty;
2
+ var je = (n, e, o) => e in n ? Oe(n, e, { enumerable: !0, configurable: !0, writable: !0, value: o }) : n[e] = o;
3
+ var le = (n, e, o) => je(n, typeof e != "symbol" ? e + "" : e, o);
4
+ import * as d from "react";
5
+ import W, { Children as ke, isValidElement as G, cloneElement as J } from "react";
6
+ import { P as t, L as E, J as de, I as Fe } from "./identifier-Bsv46xiT.js";
7
+ import { jsx as U, jsxs as Ie } from "react/jsx-runtime";
8
+ import { s as ne, u as he, c as Ue } from "./DefaultPropsProvider-QV6PDjPd.js";
9
+ import { u as $e, _ as ze, a as _e, T as ce, b as Ae } from "./TransitionGroupContext-B5aSBz0G.js";
10
+ import { keyframes as oe } from "@emotion/react";
11
+ import { a as pe } from "./useForkRef-DwN_Iz9R.js";
12
+ import { u as H } from "./useEventCallback-BgMlqKLP.js";
13
+ import { r as Xe, e as Ye } from "./refType-BnS1d2D8.js";
14
+ function fe(n) {
15
+ try {
16
+ return n.matches(":focus-visible");
17
+ } catch {
18
+ process.env.NODE_ENV !== "production" && !/jsdom/.test(window.navigator.userAgent) && console.warn(["MUI: The `:focus-visible` pseudo class is not supported in this browser.", "Some components rely on this feature to work properly."].join(`
19
+ `));
20
+ }
21
+ return !1;
22
+ }
23
+ class Q {
24
+ constructor() {
25
+ le(this, "mountEffect", () => {
26
+ this.shouldMount && !this.didMount && this.ref.current !== null && (this.didMount = !0, this.mounted.resolve());
27
+ });
28
+ this.ref = {
29
+ current: null
30
+ }, this.mounted = null, this.didMount = !1, this.shouldMount = !1, this.setShouldMount = null;
31
+ }
32
+ /** React ref to the ripple instance */
33
+ /** If the ripple component should be mounted */
34
+ /** Promise that resolves when the ripple component is mounted */
35
+ /** If the ripple component has been mounted */
36
+ /** React state hook setter */
37
+ static create() {
38
+ return new Q();
39
+ }
40
+ static use() {
41
+ const e = $e(Q.create).current, [o, u] = d.useState(!1);
42
+ return e.shouldMount = o, e.setShouldMount = u, d.useEffect(e.mountEffect, [o]), e;
43
+ }
44
+ mount() {
45
+ return this.mounted || (this.mounted = qe(), this.shouldMount = !0, this.setShouldMount(this.shouldMount)), this.mounted;
46
+ }
47
+ /* Ripple API */
48
+ start(...e) {
49
+ this.mount().then(() => {
50
+ var o;
51
+ return (o = this.ref.current) == null ? void 0 : o.start(...e);
52
+ });
53
+ }
54
+ stop(...e) {
55
+ this.mount().then(() => {
56
+ var o;
57
+ return (o = this.ref.current) == null ? void 0 : o.stop(...e);
58
+ });
59
+ }
60
+ pulsate(...e) {
61
+ this.mount().then(() => {
62
+ var o;
63
+ return (o = this.ref.current) == null ? void 0 : o.pulsate(...e);
64
+ });
65
+ }
66
+ }
67
+ function Ke() {
68
+ return Q.use();
69
+ }
70
+ function qe() {
71
+ let n, e;
72
+ const o = new Promise((u, i) => {
73
+ n = u, e = i;
74
+ });
75
+ return o.resolve = n, o.reject = e, o;
76
+ }
77
+ function ee() {
78
+ return ee = Object.assign ? Object.assign.bind() : function(n) {
79
+ for (var e = 1; e < arguments.length; e++) {
80
+ var o = arguments[e];
81
+ for (var u in o) ({}).hasOwnProperty.call(o, u) && (n[u] = o[u]);
82
+ }
83
+ return n;
84
+ }, ee.apply(null, arguments);
85
+ }
86
+ function We(n) {
87
+ if (n === void 0) throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
88
+ return n;
89
+ }
90
+ function ie(n, e) {
91
+ var o = function(s) {
92
+ return e && G(s) ? e(s) : s;
93
+ }, u = /* @__PURE__ */ Object.create(null);
94
+ return n && ke.map(n, function(i) {
95
+ return i;
96
+ }).forEach(function(i) {
97
+ u[i.key] = o(i);
98
+ }), u;
99
+ }
100
+ function He(n, e) {
101
+ n = n || {}, e = e || {};
102
+ function o(h) {
103
+ return h in e ? e[h] : n[h];
104
+ }
105
+ var u = /* @__PURE__ */ Object.create(null), i = [];
106
+ for (var s in n)
107
+ s in e ? i.length && (u[s] = i, i = []) : i.push(s);
108
+ var r, p = {};
109
+ for (var l in e) {
110
+ if (u[l])
111
+ for (r = 0; r < u[l].length; r++) {
112
+ var f = u[l][r];
113
+ p[u[l][r]] = o(f);
114
+ }
115
+ p[l] = o(l);
116
+ }
117
+ for (r = 0; r < i.length; r++)
118
+ p[i[r]] = o(i[r]);
119
+ return p;
120
+ }
121
+ function j(n, e, o) {
122
+ return o[e] != null ? o[e] : n.props[e];
123
+ }
124
+ function Ge(n, e) {
125
+ return ie(n.children, function(o) {
126
+ return J(o, {
127
+ onExited: e.bind(null, o),
128
+ in: !0,
129
+ appear: j(o, "appear", n),
130
+ enter: j(o, "enter", n),
131
+ exit: j(o, "exit", n)
132
+ });
133
+ });
134
+ }
135
+ function Je(n, e, o) {
136
+ var u = ie(n.children), i = He(e, u);
137
+ return Object.keys(i).forEach(function(s) {
138
+ var r = i[s];
139
+ if (G(r)) {
140
+ var p = s in e, l = s in u, f = e[s], h = G(f) && !f.props.in;
141
+ l && (!p || h) ? i[s] = J(r, {
142
+ onExited: o.bind(null, r),
143
+ in: !0,
144
+ exit: j(r, "exit", n),
145
+ enter: j(r, "enter", n)
146
+ }) : !l && p && !h ? i[s] = J(r, {
147
+ in: !1
148
+ }) : l && p && G(f) && (i[s] = J(r, {
149
+ onExited: o.bind(null, r),
150
+ in: f.props.in,
151
+ exit: j(r, "exit", n),
152
+ enter: j(r, "enter", n)
153
+ }));
154
+ }
155
+ }), i;
156
+ }
157
+ var Qe = Object.values || function(n) {
158
+ return Object.keys(n).map(function(e) {
159
+ return n[e];
160
+ });
161
+ }, Ze = {
162
+ component: "div",
163
+ childFactory: function(e) {
164
+ return e;
165
+ }
166
+ }, se = /* @__PURE__ */ function(n) {
167
+ ze(e, n);
168
+ function e(u, i) {
169
+ var s;
170
+ s = n.call(this, u, i) || this;
171
+ var r = s.handleExited.bind(We(s));
172
+ return s.state = {
173
+ contextValue: {
174
+ isMounting: !0
175
+ },
176
+ handleExited: r,
177
+ firstRender: !0
178
+ }, s;
179
+ }
180
+ var o = e.prototype;
181
+ return o.componentDidMount = function() {
182
+ this.mounted = !0, this.setState({
183
+ contextValue: {
184
+ isMounting: !1
185
+ }
186
+ });
187
+ }, o.componentWillUnmount = function() {
188
+ this.mounted = !1;
189
+ }, e.getDerivedStateFromProps = function(i, s) {
190
+ var r = s.children, p = s.handleExited, l = s.firstRender;
191
+ return {
192
+ children: l ? Ge(i, p) : Je(i, r, p),
193
+ firstRender: !1
194
+ };
195
+ }, o.handleExited = function(i, s) {
196
+ var r = ie(this.props.children);
197
+ i.key in r || (i.props.onExited && i.props.onExited(s), this.mounted && this.setState(function(p) {
198
+ var l = ee({}, p.children);
199
+ return delete l[i.key], {
200
+ children: l
201
+ };
202
+ }));
203
+ }, o.render = function() {
204
+ var i = this.props, s = i.component, r = i.childFactory, p = _e(i, ["component", "childFactory"]), l = this.state.contextValue, f = Qe(this.state.children).map(r);
205
+ return delete p.appear, delete p.enter, delete p.exit, s === null ? /* @__PURE__ */ W.createElement(ce.Provider, {
206
+ value: l
207
+ }, f) : /* @__PURE__ */ W.createElement(ce.Provider, {
208
+ value: l
209
+ }, /* @__PURE__ */ W.createElement(s, p, f));
210
+ }, e;
211
+ }(W.Component);
212
+ se.propTypes = process.env.NODE_ENV !== "production" ? {
213
+ /**
214
+ * `<TransitionGroup>` renders a `<div>` by default. You can change this
215
+ * behavior by providing a `component` prop.
216
+ * If you use React v16+ and would like to avoid a wrapping `<div>` element
217
+ * you can pass in `component={null}`. This is useful if the wrapping div
218
+ * borks your css styles.
219
+ */
220
+ component: t.any,
221
+ /**
222
+ * A set of `<Transition>` components, that are toggled `in` and out as they
223
+ * leave. the `<TransitionGroup>` will inject specific transition props, so
224
+ * remember to spread them through if you are wrapping the `<Transition>` as
225
+ * with our `<Fade>` example.
226
+ *
227
+ * While this component is meant for multiple `Transition` or `CSSTransition`
228
+ * children, sometimes you may want to have a single transition child with
229
+ * content that you want to be transitioned out and in when you change it
230
+ * (e.g. routes, images etc.) In that case you can change the `key` prop of
231
+ * the transition child as you change its content, this will cause
232
+ * `TransitionGroup` to transition the child out and back in.
233
+ */
234
+ children: t.node,
235
+ /**
236
+ * A convenience prop that enables or disables appear animations
237
+ * for all children. Note that specifying this will override any defaults set
238
+ * on individual children Transitions.
239
+ */
240
+ appear: t.bool,
241
+ /**
242
+ * A convenience prop that enables or disables enter animations
243
+ * for all children. Note that specifying this will override any defaults set
244
+ * on individual children Transitions.
245
+ */
246
+ enter: t.bool,
247
+ /**
248
+ * A convenience prop that enables or disables exit animations
249
+ * for all children. Note that specifying this will override any defaults set
250
+ * on individual children Transitions.
251
+ */
252
+ exit: t.bool,
253
+ /**
254
+ * You may need to apply reactive updates to a child as it is exiting.
255
+ * This is generally done by using `cloneElement` however in the case of an exiting
256
+ * child the element has already been removed and not accessible to the consumer.
257
+ *
258
+ * If you do need to update a child as it leaves you can provide a `childFactory`
259
+ * to wrap every child, even the ones that are leaving.
260
+ *
261
+ * @type Function(child: ReactElement) -> ReactElement
262
+ */
263
+ childFactory: t.func
264
+ } : {};
265
+ se.defaultProps = Ze;
266
+ function me(n) {
267
+ const {
268
+ className: e,
269
+ classes: o,
270
+ pulsate: u = !1,
271
+ rippleX: i,
272
+ rippleY: s,
273
+ rippleSize: r,
274
+ in: p,
275
+ onExited: l,
276
+ timeout: f
277
+ } = n, [h, M] = d.useState(!1), g = E(e, o.ripple, o.rippleVisible, u && o.ripplePulsate), N = {
278
+ width: r,
279
+ height: r,
280
+ top: -(r / 2) + s,
281
+ left: -(r / 2) + i
282
+ }, m = E(o.child, h && o.childLeaving, u && o.childPulsate);
283
+ return !p && !h && M(!0), d.useEffect(() => {
284
+ if (!p && l != null) {
285
+ const S = setTimeout(l, f);
286
+ return () => {
287
+ clearTimeout(S);
288
+ };
289
+ }
290
+ }, [l, p, f]), /* @__PURE__ */ U("span", {
291
+ className: g,
292
+ style: N,
293
+ children: /* @__PURE__ */ U("span", {
294
+ className: m
295
+ })
296
+ });
297
+ }
298
+ process.env.NODE_ENV !== "production" && (me.propTypes = {
299
+ /**
300
+ * Override or extend the styles applied to the component.
301
+ */
302
+ classes: t.object.isRequired,
303
+ className: t.string,
304
+ /**
305
+ * @ignore - injected from TransitionGroup
306
+ */
307
+ in: t.bool,
308
+ /**
309
+ * @ignore - injected from TransitionGroup
310
+ */
311
+ onExited: t.func,
312
+ /**
313
+ * If `true`, the ripple pulsates, typically indicating the keyboard focus state of an element.
314
+ */
315
+ pulsate: t.bool,
316
+ /**
317
+ * Diameter of the ripple.
318
+ */
319
+ rippleSize: t.number,
320
+ /**
321
+ * Horizontal position of the ripple center.
322
+ */
323
+ rippleX: t.number,
324
+ /**
325
+ * Vertical position of the ripple center.
326
+ */
327
+ rippleY: t.number,
328
+ /**
329
+ * exit delay
330
+ */
331
+ timeout: t.number.isRequired
332
+ });
333
+ const b = de("MuiTouchRipple", ["root", "ripple", "rippleVisible", "ripplePulsate", "child", "childLeaving", "childPulsate"]), te = 550, et = 80, tt = oe`
334
+ 0% {
335
+ transform: scale(0);
336
+ opacity: 0.1;
337
+ }
338
+
339
+ 100% {
340
+ transform: scale(1);
341
+ opacity: 0.3;
342
+ }
343
+ `, nt = oe`
344
+ 0% {
345
+ opacity: 1;
346
+ }
347
+
348
+ 100% {
349
+ opacity: 0;
350
+ }
351
+ `, ot = oe`
352
+ 0% {
353
+ transform: scale(1);
354
+ }
355
+
356
+ 50% {
357
+ transform: scale(0.92);
358
+ }
359
+
360
+ 100% {
361
+ transform: scale(1);
362
+ }
363
+ `, it = ne("span", {
364
+ name: "MuiTouchRipple",
365
+ slot: "Root"
366
+ })({
367
+ overflow: "hidden",
368
+ pointerEvents: "none",
369
+ position: "absolute",
370
+ zIndex: 0,
371
+ top: 0,
372
+ right: 0,
373
+ bottom: 0,
374
+ left: 0,
375
+ borderRadius: "inherit"
376
+ }), st = ne(me, {
377
+ name: "MuiTouchRipple",
378
+ slot: "Ripple"
379
+ })`
380
+ opacity: 0;
381
+ position: absolute;
382
+
383
+ &.${b.rippleVisible} {
384
+ opacity: 0.3;
385
+ transform: scale(1);
386
+ animation-name: ${tt};
387
+ animation-duration: ${te}ms;
388
+ animation-timing-function: ${({
389
+ theme: n
390
+ }) => n.transitions.easing.easeInOut};
391
+ }
392
+
393
+ &.${b.ripplePulsate} {
394
+ animation-duration: ${({
395
+ theme: n
396
+ }) => n.transitions.duration.shorter}ms;
397
+ }
398
+
399
+ & .${b.child} {
400
+ opacity: 1;
401
+ display: block;
402
+ width: 100%;
403
+ height: 100%;
404
+ border-radius: 50%;
405
+ background-color: currentColor;
406
+ }
407
+
408
+ & .${b.childLeaving} {
409
+ opacity: 0;
410
+ animation-name: ${nt};
411
+ animation-duration: ${te}ms;
412
+ animation-timing-function: ${({
413
+ theme: n
414
+ }) => n.transitions.easing.easeInOut};
415
+ }
416
+
417
+ & .${b.childPulsate} {
418
+ position: absolute;
419
+ /* @noflip */
420
+ left: 0px;
421
+ top: 0;
422
+ animation-name: ${ot};
423
+ animation-duration: 2500ms;
424
+ animation-timing-function: ${({
425
+ theme: n
426
+ }) => n.transitions.easing.easeInOut};
427
+ animation-iteration-count: infinite;
428
+ animation-delay: 200ms;
429
+ }
430
+ `, be = /* @__PURE__ */ d.forwardRef(function(e, o) {
431
+ const u = he({
432
+ props: e,
433
+ name: "MuiTouchRipple"
434
+ }), {
435
+ center: i = !1,
436
+ classes: s = {},
437
+ className: r,
438
+ ...p
439
+ } = u, [l, f] = d.useState([]), h = d.useRef(0), M = d.useRef(null);
440
+ d.useEffect(() => {
441
+ M.current && (M.current(), M.current = null);
442
+ }, [l]);
443
+ const g = d.useRef(!1), N = Ae(), m = d.useRef(null), S = d.useRef(null), C = d.useCallback((c) => {
444
+ const {
445
+ pulsate: R,
446
+ rippleX: y,
447
+ rippleY: I,
448
+ rippleSize: B,
449
+ cb: $
450
+ } = c;
451
+ f((T) => [...T, /* @__PURE__ */ U(st, {
452
+ classes: {
453
+ ripple: E(s.ripple, b.ripple),
454
+ rippleVisible: E(s.rippleVisible, b.rippleVisible),
455
+ ripplePulsate: E(s.ripplePulsate, b.ripplePulsate),
456
+ child: E(s.child, b.child),
457
+ childLeaving: E(s.childLeaving, b.childLeaving),
458
+ childPulsate: E(s.childPulsate, b.childPulsate)
459
+ },
460
+ timeout: te,
461
+ pulsate: R,
462
+ rippleX: y,
463
+ rippleY: I,
464
+ rippleSize: B
465
+ }, h.current)]), h.current += 1, M.current = $;
466
+ }, [s]), k = d.useCallback((c = {}, R = {}, y = () => {
467
+ }) => {
468
+ const {
469
+ pulsate: I = !1,
470
+ center: B = i || R.pulsate,
471
+ fakeElement: $ = !1
472
+ // For test purposes
473
+ } = R;
474
+ if ((c == null ? void 0 : c.type) === "mousedown" && g.current) {
475
+ g.current = !1;
476
+ return;
477
+ }
478
+ (c == null ? void 0 : c.type) === "touchstart" && (g.current = !0);
479
+ const T = $ ? null : S.current, w = T ? T.getBoundingClientRect() : {
480
+ width: 0,
481
+ height: 0,
482
+ left: 0,
483
+ top: 0
484
+ };
485
+ let D, x, V;
486
+ if (B || c === void 0 || c.clientX === 0 && c.clientY === 0 || !c.clientX && !c.touches)
487
+ D = Math.round(w.width / 2), x = Math.round(w.height / 2);
488
+ else {
489
+ const {
490
+ clientX: z,
491
+ clientY: L
492
+ } = c.touches && c.touches.length > 0 ? c.touches[0] : c;
493
+ D = Math.round(z - w.left), x = Math.round(L - w.top);
494
+ }
495
+ if (B)
496
+ V = Math.sqrt((2 * w.width ** 2 + w.height ** 2) / 3), V % 2 === 0 && (V += 1);
497
+ else {
498
+ const z = Math.max(Math.abs((T ? T.clientWidth : 0) - D), D) * 2 + 2, L = Math.max(Math.abs((T ? T.clientHeight : 0) - x), x) * 2 + 2;
499
+ V = Math.sqrt(z ** 2 + L ** 2);
500
+ }
501
+ c != null && c.touches ? m.current === null && (m.current = () => {
502
+ C({
503
+ pulsate: I,
504
+ rippleX: D,
505
+ rippleY: x,
506
+ rippleSize: V,
507
+ cb: y
508
+ });
509
+ }, N.start(et, () => {
510
+ m.current && (m.current(), m.current = null);
511
+ })) : C({
512
+ pulsate: I,
513
+ rippleX: D,
514
+ rippleY: x,
515
+ rippleSize: V,
516
+ cb: y
517
+ });
518
+ }, [i, C, N]), Y = d.useCallback(() => {
519
+ k({}, {
520
+ pulsate: !0
521
+ });
522
+ }, [k]), F = d.useCallback((c, R) => {
523
+ if (N.clear(), (c == null ? void 0 : c.type) === "touchend" && m.current) {
524
+ m.current(), m.current = null, N.start(0, () => {
525
+ F(c, R);
526
+ });
527
+ return;
528
+ }
529
+ m.current = null, f((y) => y.length > 0 ? y.slice(1) : y), M.current = R;
530
+ }, [N]);
531
+ return d.useImperativeHandle(o, () => ({
532
+ pulsate: Y,
533
+ start: k,
534
+ stop: F
535
+ }), [Y, k, F]), /* @__PURE__ */ U(it, {
536
+ className: E(b.root, s.root, r),
537
+ ref: S,
538
+ ...p,
539
+ children: /* @__PURE__ */ U(se, {
540
+ component: null,
541
+ exit: !0,
542
+ children: l
543
+ })
544
+ });
545
+ });
546
+ process.env.NODE_ENV !== "production" && (be.propTypes = {
547
+ /**
548
+ * If `true`, the ripple starts at the center of the component
549
+ * rather than at the point of interaction.
550
+ */
551
+ center: t.bool,
552
+ /**
553
+ * Override or extend the styles applied to the component.
554
+ */
555
+ classes: t.object,
556
+ /**
557
+ * @ignore
558
+ */
559
+ className: t.string
560
+ });
561
+ function rt(n) {
562
+ return Fe("MuiButtonBase", n);
563
+ }
564
+ const at = de("MuiButtonBase", ["root", "disabled", "focusVisible"]), ut = (n) => {
565
+ const {
566
+ disabled: e,
567
+ focusVisible: o,
568
+ focusVisibleClassName: u,
569
+ classes: i
570
+ } = n, r = Ue({
571
+ root: ["root", e && "disabled", o && "focusVisible"]
572
+ }, rt, i);
573
+ return o && u && (r.root += ` ${u}`), r;
574
+ }, lt = ne("button", {
575
+ name: "MuiButtonBase",
576
+ slot: "Root",
577
+ overridesResolver: (n, e) => e.root
578
+ })({
579
+ display: "inline-flex",
580
+ alignItems: "center",
581
+ justifyContent: "center",
582
+ position: "relative",
583
+ boxSizing: "border-box",
584
+ WebkitTapHighlightColor: "transparent",
585
+ backgroundColor: "transparent",
586
+ // Reset default value
587
+ // We disable the focus ring for mouse, touch and keyboard users.
588
+ outline: 0,
589
+ border: 0,
590
+ margin: 0,
591
+ // Remove the margin in Safari
592
+ borderRadius: 0,
593
+ padding: 0,
594
+ // Remove the padding in Firefox
595
+ cursor: "pointer",
596
+ userSelect: "none",
597
+ verticalAlign: "middle",
598
+ MozAppearance: "none",
599
+ // Reset
600
+ WebkitAppearance: "none",
601
+ // Reset
602
+ textDecoration: "none",
603
+ // So we take precedent over the style of a native <a /> element.
604
+ color: "inherit",
605
+ "&::-moz-focus-inner": {
606
+ borderStyle: "none"
607
+ // Remove Firefox dotted outline.
608
+ },
609
+ [`&.${at.disabled}`]: {
610
+ pointerEvents: "none",
611
+ // Disable link interactions
612
+ cursor: "default"
613
+ },
614
+ "@media print": {
615
+ colorAdjust: "exact"
616
+ }
617
+ }), ct = /* @__PURE__ */ d.forwardRef(function(e, o) {
618
+ const u = he({
619
+ props: e,
620
+ name: "MuiButtonBase"
621
+ }), {
622
+ action: i,
623
+ centerRipple: s = !1,
624
+ children: r,
625
+ className: p,
626
+ component: l = "button",
627
+ disabled: f = !1,
628
+ disableRipple: h = !1,
629
+ disableTouchRipple: M = !1,
630
+ focusRipple: g = !1,
631
+ focusVisibleClassName: N,
632
+ LinkComponent: m = "a",
633
+ onBlur: S,
634
+ onClick: C,
635
+ onContextMenu: k,
636
+ onDragLeave: Y,
637
+ onFocus: F,
638
+ onFocusVisible: c,
639
+ onKeyDown: R,
640
+ onKeyUp: y,
641
+ onMouseDown: I,
642
+ onMouseLeave: B,
643
+ onMouseUp: $,
644
+ onTouchEnd: T,
645
+ onTouchMove: w,
646
+ onTouchStart: D,
647
+ tabIndex: x = 0,
648
+ TouchRippleProps: V,
649
+ touchRippleRef: z,
650
+ type: L,
651
+ ..._
652
+ } = u, A = d.useRef(null), P = Ke(), ge = pe(P.ref, z), [O, K] = d.useState(!1);
653
+ f && O && K(!1), d.useImperativeHandle(i, () => ({
654
+ focusVisible: () => {
655
+ K(!0), A.current.focus();
656
+ }
657
+ }), []);
658
+ const ye = P.shouldMount && !h && !f;
659
+ d.useEffect(() => {
660
+ O && g && !h && P.pulsate();
661
+ }, [h, g, O, P]);
662
+ function v(a, ae, Le = M) {
663
+ return H((ue) => (ae && ae(ue), Le || P[a](ue), !0));
664
+ }
665
+ const Me = v("start", I), Re = v("stop", k), Te = v("stop", Y), Ee = v("stop", $), Ce = v("stop", (a) => {
666
+ O && a.preventDefault(), B && B(a);
667
+ }), xe = v("start", D), Pe = v("stop", T), ve = v("stop", w), Ne = v("stop", (a) => {
668
+ fe(a.target) || K(!1), S && S(a);
669
+ }, !1), we = H((a) => {
670
+ A.current || (A.current = a.currentTarget), fe(a.target) && (K(!0), c && c(a)), F && F(a);
671
+ }), Z = () => {
672
+ const a = A.current;
673
+ return l && l !== "button" && !(a.tagName === "A" && a.href);
674
+ }, De = H((a) => {
675
+ g && !a.repeat && O && a.key === " " && P.stop(a, () => {
676
+ P.start(a);
677
+ }), a.target === a.currentTarget && Z() && a.key === " " && a.preventDefault(), R && R(a), a.target === a.currentTarget && Z() && a.key === "Enter" && !f && (a.preventDefault(), C && C(a));
678
+ }), Ve = H((a) => {
679
+ g && a.key === " " && O && !a.defaultPrevented && P.stop(a, () => {
680
+ P.pulsate(a);
681
+ }), y && y(a), C && a.target === a.currentTarget && Z() && a.key === " " && !a.defaultPrevented && C(a);
682
+ });
683
+ let q = l;
684
+ q === "button" && (_.href || _.to) && (q = m);
685
+ const X = {};
686
+ q === "button" ? (X.type = L === void 0 ? "button" : L, X.disabled = f) : (!_.href && !_.to && (X.role = "button"), f && (X["aria-disabled"] = f));
687
+ const Se = pe(o, A), re = {
688
+ ...u,
689
+ centerRipple: s,
690
+ component: l,
691
+ disabled: f,
692
+ disableRipple: h,
693
+ disableTouchRipple: M,
694
+ focusRipple: g,
695
+ tabIndex: x,
696
+ focusVisible: O
697
+ }, Be = ut(re);
698
+ return /* @__PURE__ */ Ie(lt, {
699
+ as: q,
700
+ className: E(Be.root, p),
701
+ ownerState: re,
702
+ onBlur: Ne,
703
+ onClick: C,
704
+ onContextMenu: Re,
705
+ onFocus: we,
706
+ onKeyDown: De,
707
+ onKeyUp: Ve,
708
+ onMouseDown: Me,
709
+ onMouseLeave: Ce,
710
+ onMouseUp: Ee,
711
+ onDragLeave: Te,
712
+ onTouchEnd: Pe,
713
+ onTouchMove: ve,
714
+ onTouchStart: xe,
715
+ ref: Se,
716
+ tabIndex: f ? -1 : x,
717
+ type: L,
718
+ ...X,
719
+ ..._,
720
+ children: [r, ye ? /* @__PURE__ */ U(be, {
721
+ ref: ge,
722
+ center: s,
723
+ ...V
724
+ }) : null]
725
+ });
726
+ });
727
+ process.env.NODE_ENV !== "production" && (ct.propTypes = {
728
+ // ┌────────────────────────────── Warning ──────────────────────────────┐
729
+ // │ These PropTypes are generated from the TypeScript type definitions. │
730
+ // │ To update them, edit the d.ts file and run `pnpm proptypes`. │
731
+ // └─────────────────────────────────────────────────────────────────────┘
732
+ /**
733
+ * A ref for imperative actions.
734
+ * It currently only supports `focusVisible()` action.
735
+ */
736
+ action: Xe,
737
+ /**
738
+ * If `true`, the ripples are centered.
739
+ * They won't start at the cursor interaction position.
740
+ * @default false
741
+ */
742
+ centerRipple: t.bool,
743
+ /**
744
+ * The content of the component.
745
+ */
746
+ children: t.node,
747
+ /**
748
+ * Override or extend the styles applied to the component.
749
+ */
750
+ classes: t.object,
751
+ /**
752
+ * @ignore
753
+ */
754
+ className: t.string,
755
+ /**
756
+ * The component used for the root node.
757
+ * Either a string to use a HTML element or a component.
758
+ */
759
+ component: Ye,
760
+ /**
761
+ * If `true`, the component is disabled.
762
+ * @default false
763
+ */
764
+ disabled: t.bool,
765
+ /**
766
+ * If `true`, the ripple effect is disabled.
767
+ *
768
+ * ⚠️ Without a ripple there is no styling for :focus-visible by default. Be sure
769
+ * to highlight the element by applying separate styles with the `.Mui-focusVisible` class.
770
+ * @default false
771
+ */
772
+ disableRipple: t.bool,
773
+ /**
774
+ * If `true`, the touch ripple effect is disabled.
775
+ * @default false
776
+ */
777
+ disableTouchRipple: t.bool,
778
+ /**
779
+ * If `true`, the base button will have a keyboard focus ripple.
780
+ * @default false
781
+ */
782
+ focusRipple: t.bool,
783
+ /**
784
+ * This prop can help identify which element has keyboard focus.
785
+ * The class name will be applied when the element gains the focus through keyboard interaction.
786
+ * It's a polyfill for the [CSS :focus-visible selector](https://drafts.csswg.org/selectors-4/#the-focus-visible-pseudo).
787
+ * The rationale for using this feature [is explained here](https://github.com/WICG/focus-visible/blob/HEAD/explainer.md).
788
+ * A [polyfill can be used](https://github.com/WICG/focus-visible) to apply a `focus-visible` class to other components
789
+ * if needed.
790
+ */
791
+ focusVisibleClassName: t.string,
792
+ /**
793
+ * @ignore
794
+ */
795
+ href: t.any,
796
+ /**
797
+ * The component used to render a link when the `href` prop is provided.
798
+ * @default 'a'
799
+ */
800
+ LinkComponent: t.elementType,
801
+ /**
802
+ * @ignore
803
+ */
804
+ onBlur: t.func,
805
+ /**
806
+ * @ignore
807
+ */
808
+ onClick: t.func,
809
+ /**
810
+ * @ignore
811
+ */
812
+ onContextMenu: t.func,
813
+ /**
814
+ * @ignore
815
+ */
816
+ onDragLeave: t.func,
817
+ /**
818
+ * @ignore
819
+ */
820
+ onFocus: t.func,
821
+ /**
822
+ * Callback fired when the component is focused with a keyboard.
823
+ * We trigger a `onFocus` callback too.
824
+ */
825
+ onFocusVisible: t.func,
826
+ /**
827
+ * @ignore
828
+ */
829
+ onKeyDown: t.func,
830
+ /**
831
+ * @ignore
832
+ */
833
+ onKeyUp: t.func,
834
+ /**
835
+ * @ignore
836
+ */
837
+ onMouseDown: t.func,
838
+ /**
839
+ * @ignore
840
+ */
841
+ onMouseLeave: t.func,
842
+ /**
843
+ * @ignore
844
+ */
845
+ onMouseUp: t.func,
846
+ /**
847
+ * @ignore
848
+ */
849
+ onTouchEnd: t.func,
850
+ /**
851
+ * @ignore
852
+ */
853
+ onTouchMove: t.func,
854
+ /**
855
+ * @ignore
856
+ */
857
+ onTouchStart: t.func,
858
+ /**
859
+ * The system prop that allows defining system overrides as well as additional CSS styles.
860
+ */
861
+ sx: t.oneOfType([t.arrayOf(t.oneOfType([t.func, t.object, t.bool])), t.func, t.object]),
862
+ /**
863
+ * @default 0
864
+ */
865
+ tabIndex: t.number,
866
+ /**
867
+ * Props applied to the `TouchRipple` element.
868
+ */
869
+ TouchRippleProps: t.object,
870
+ /**
871
+ * A ref that points to the `TouchRipple` element.
872
+ */
873
+ touchRippleRef: t.oneOfType([t.func, t.shape({
874
+ current: t.shape({
875
+ pulsate: t.func.isRequired,
876
+ start: t.func.isRequired,
877
+ stop: t.func.isRequired
878
+ })
879
+ })]),
880
+ /**
881
+ * @ignore
882
+ */
883
+ type: t.oneOfType([t.oneOf(["button", "reset", "submit"]), t.string])
884
+ });
885
+ export {
886
+ ct as B,
887
+ se as T,
888
+ ee as _,
889
+ fe as i
890
+ };