@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,802 @@
1
+ import * as s from "react";
2
+ import { P as e, J as Be, I as Me, L as pe, K as J, Z as He } from "./identifier-Bsv46xiT.js";
3
+ import { g as Pe } from "./index-C9spydU3.js";
4
+ import { s as ge, m as we, u as We, c as De } from "./DefaultPropsProvider-QV6PDjPd.js";
5
+ import { jsxs as Q, jsx as B } from "react/jsx-runtime";
6
+ import { a as ve, u as X } from "./useForkRef-DwN_Iz9R.js";
7
+ import { o as fe, d as Le } from "./ownerWindow-BoRkeomM.js";
8
+ import { e as Ve, r as Ue } from "./refType-BnS1d2D8.js";
9
+ const ne = /* @__PURE__ */ s.createContext(void 0);
10
+ process.env.NODE_ENV !== "production" && (ne.displayName = "FormControlContext");
11
+ function _e() {
12
+ return s.useContext(ne);
13
+ }
14
+ function me(n) {
15
+ return n != null && !(Array.isArray(n) && n.length === 0);
16
+ }
17
+ function je(n, o = !1) {
18
+ return n && (me(n.value) && n.value !== "" || o && me(n.defaultValue) && n.defaultValue !== "");
19
+ }
20
+ function dn(n) {
21
+ return n.startAdornment;
22
+ }
23
+ function Ke({
24
+ props: n,
25
+ states: o,
26
+ muiFormControl: t
27
+ }) {
28
+ return o.reduce((l, u) => (l[u] = n[u], t && typeof n[u] > "u" && (l[u] = t[u]), l), {});
29
+ }
30
+ function L(n) {
31
+ return parseInt(n, 10) || 0;
32
+ }
33
+ const $e = {
34
+ shadow: {
35
+ // Visibility needed to hide the extra text area on iPads
36
+ visibility: "hidden",
37
+ // Remove from the content flow
38
+ position: "absolute",
39
+ // Ignore the scrollbar width
40
+ overflow: "hidden",
41
+ height: 0,
42
+ top: 0,
43
+ left: 0,
44
+ // Create a new layer, increase the isolation of the computed values
45
+ transform: "translateZ(0)"
46
+ }
47
+ };
48
+ function qe(n) {
49
+ return n == null || Object.keys(n).length === 0 || n.outerHeightStyle === 0 && !n.overflowing;
50
+ }
51
+ const Ce = /* @__PURE__ */ s.forwardRef(function(o, t) {
52
+ const {
53
+ onChange: l,
54
+ maxRows: u,
55
+ minRows: p = 1,
56
+ style: O,
57
+ value: E,
58
+ ...M
59
+ } = o, {
60
+ current: C
61
+ } = s.useRef(E != null), h = s.useRef(null), T = ve(t, h), y = s.useRef(null), S = s.useRef(null), v = s.useCallback(() => {
62
+ const d = h.current, r = fe(d).getComputedStyle(d);
63
+ if (r.width === "0px")
64
+ return {
65
+ outerHeightStyle: 0,
66
+ overflowing: !1
67
+ };
68
+ const f = S.current;
69
+ f.style.width = r.width, f.value = d.value || o.placeholder || "x", f.value.slice(-1) === `
70
+ ` && (f.value += " ");
71
+ const z = r.boxSizing, R = L(r.paddingBottom) + L(r.paddingTop), g = L(r.borderBottomWidth) + L(r.borderTopWidth), A = f.scrollHeight;
72
+ f.value = "x";
73
+ const N = f.scrollHeight;
74
+ let c = A;
75
+ p && (c = Math.max(Number(p) * N, c)), u && (c = Math.min(Number(u) * N, c)), c = Math.max(c, N);
76
+ const H = c + (z === "border-box" ? R + g : 0), P = Math.abs(c - A) <= 1;
77
+ return {
78
+ outerHeightStyle: H,
79
+ overflowing: P
80
+ };
81
+ }, [u, p, o.placeholder]), x = s.useCallback(() => {
82
+ const d = v();
83
+ if (qe(d))
84
+ return;
85
+ const b = d.outerHeightStyle, r = h.current;
86
+ y.current !== b && (y.current = b, r.style.height = `${b}px`), r.style.overflow = d.overflowing ? "hidden" : "";
87
+ }, [v]);
88
+ X(() => {
89
+ const d = () => {
90
+ x();
91
+ };
92
+ let b;
93
+ const r = () => {
94
+ cancelAnimationFrame(b), b = requestAnimationFrame(() => {
95
+ d();
96
+ });
97
+ }, f = Le(d), z = h.current, R = fe(z);
98
+ R.addEventListener("resize", f);
99
+ let g;
100
+ return typeof ResizeObserver < "u" && (g = new ResizeObserver(process.env.NODE_ENV === "test" ? r : d), g.observe(z)), () => {
101
+ f.clear(), cancelAnimationFrame(b), R.removeEventListener("resize", f), g && g.disconnect();
102
+ };
103
+ }, [v, x]), X(() => {
104
+ x();
105
+ });
106
+ const V = (d) => {
107
+ C || x(), l && l(d);
108
+ };
109
+ return /* @__PURE__ */ Q(s.Fragment, {
110
+ children: [/* @__PURE__ */ B("textarea", {
111
+ value: E,
112
+ onChange: V,
113
+ ref: T,
114
+ rows: p,
115
+ style: O,
116
+ ...M
117
+ }), /* @__PURE__ */ B("textarea", {
118
+ "aria-hidden": !0,
119
+ className: o.className,
120
+ readOnly: !0,
121
+ ref: S,
122
+ tabIndex: -1,
123
+ style: {
124
+ ...$e.shadow,
125
+ ...O,
126
+ paddingTop: 0,
127
+ paddingBottom: 0
128
+ }
129
+ })]
130
+ });
131
+ });
132
+ process.env.NODE_ENV !== "production" && (Ce.propTypes = {
133
+ // ┌────────────────────────────── Warning ──────────────────────────────┐
134
+ // │ These PropTypes are generated from the TypeScript type definitions. │
135
+ // │ To update them, edit the TypeScript types and run `pnpm proptypes`. │
136
+ // └─────────────────────────────────────────────────────────────────────┘
137
+ /**
138
+ * @ignore
139
+ */
140
+ className: e.string,
141
+ /**
142
+ * Maximum number of rows to display.
143
+ */
144
+ maxRows: e.oneOfType([e.number, e.string]),
145
+ /**
146
+ * Minimum number of rows to display.
147
+ * @default 1
148
+ */
149
+ minRows: e.oneOfType([e.number, e.string]),
150
+ /**
151
+ * @ignore
152
+ */
153
+ onChange: e.func,
154
+ /**
155
+ * @ignore
156
+ */
157
+ placeholder: e.string,
158
+ /**
159
+ * @ignore
160
+ */
161
+ style: e.object,
162
+ /**
163
+ * @ignore
164
+ */
165
+ value: e.oneOfType([e.arrayOf(e.string), e.number, e.string])
166
+ });
167
+ function he(n) {
168
+ return typeof n == "string";
169
+ }
170
+ function Ge(n) {
171
+ return Me("MuiInputBase", n);
172
+ }
173
+ const ee = Be("MuiInputBase", ["root", "formControl", "focused", "disabled", "adornedStart", "adornedEnd", "error", "sizeSmall", "multiline", "colorSecondary", "fullWidth", "hiddenLabel", "readOnly", "input", "inputSizeSmall", "inputMultiline", "inputTypeSearch", "inputAdornedStart", "inputAdornedEnd", "inputHiddenLabel"]);
174
+ var ye;
175
+ const Ye = (n, o) => {
176
+ const {
177
+ ownerState: t
178
+ } = n;
179
+ return [o.root, t.formControl && o.formControl, t.startAdornment && o.adornedStart, t.endAdornment && o.adornedEnd, t.error && o.error, t.size === "small" && o.sizeSmall, t.multiline && o.multiline, t.color && o[`color${J(t.color)}`], t.fullWidth && o.fullWidth, t.hiddenLabel && o.hiddenLabel];
180
+ }, Ze = (n, o) => {
181
+ const {
182
+ ownerState: t
183
+ } = n;
184
+ return [o.input, t.size === "small" && o.inputSizeSmall, t.multiline && o.inputMultiline, t.type === "search" && o.inputTypeSearch, t.startAdornment && o.inputAdornedStart, t.endAdornment && o.inputAdornedEnd, t.hiddenLabel && o.inputHiddenLabel];
185
+ }, Je = (n) => {
186
+ const {
187
+ classes: o,
188
+ color: t,
189
+ disabled: l,
190
+ error: u,
191
+ endAdornment: p,
192
+ focused: O,
193
+ formControl: E,
194
+ fullWidth: M,
195
+ hiddenLabel: C,
196
+ multiline: h,
197
+ readOnly: T,
198
+ size: y,
199
+ startAdornment: S,
200
+ type: v
201
+ } = n, x = {
202
+ root: ["root", `color${J(t)}`, l && "disabled", u && "error", M && "fullWidth", O && "focused", E && "formControl", y && y !== "medium" && `size${J(y)}`, h && "multiline", S && "adornedStart", p && "adornedEnd", C && "hiddenLabel", T && "readOnly"],
203
+ input: ["input", l && "disabled", v === "search" && "inputTypeSearch", h && "inputMultiline", y === "small" && "inputSizeSmall", C && "inputHiddenLabel", S && "inputAdornedStart", p && "inputAdornedEnd", T && "readOnly"]
204
+ };
205
+ return De(x, Ge, o);
206
+ }, Qe = ge("div", {
207
+ name: "MuiInputBase",
208
+ slot: "Root",
209
+ overridesResolver: Ye
210
+ })(we(({
211
+ theme: n
212
+ }) => ({
213
+ ...n.typography.body1,
214
+ color: (n.vars || n).palette.text.primary,
215
+ lineHeight: "1.4375em",
216
+ // 23px
217
+ boxSizing: "border-box",
218
+ // Prevent padding issue with fullWidth.
219
+ position: "relative",
220
+ cursor: "text",
221
+ display: "inline-flex",
222
+ alignItems: "center",
223
+ [`&.${ee.disabled}`]: {
224
+ color: (n.vars || n).palette.text.disabled,
225
+ cursor: "default"
226
+ },
227
+ variants: [{
228
+ props: ({
229
+ ownerState: o
230
+ }) => o.multiline,
231
+ style: {
232
+ padding: "4px 0 5px"
233
+ }
234
+ }, {
235
+ props: ({
236
+ ownerState: o,
237
+ size: t
238
+ }) => o.multiline && t === "small",
239
+ style: {
240
+ paddingTop: 1
241
+ }
242
+ }, {
243
+ props: ({
244
+ ownerState: o
245
+ }) => o.fullWidth,
246
+ style: {
247
+ width: "100%"
248
+ }
249
+ }]
250
+ }))), Xe = ge("input", {
251
+ name: "MuiInputBase",
252
+ slot: "Input",
253
+ overridesResolver: Ze
254
+ })(we(({
255
+ theme: n
256
+ }) => {
257
+ const o = n.palette.mode === "light", t = {
258
+ color: "currentColor",
259
+ ...n.vars ? {
260
+ opacity: n.vars.opacity.inputPlaceholder
261
+ } : {
262
+ opacity: o ? 0.42 : 0.5
263
+ },
264
+ transition: n.transitions.create("opacity", {
265
+ duration: n.transitions.duration.shorter
266
+ })
267
+ }, l = {
268
+ opacity: "0 !important"
269
+ }, u = n.vars ? {
270
+ opacity: n.vars.opacity.inputPlaceholder
271
+ } : {
272
+ opacity: o ? 0.42 : 0.5
273
+ };
274
+ return {
275
+ font: "inherit",
276
+ letterSpacing: "inherit",
277
+ color: "currentColor",
278
+ padding: "4px 0 5px",
279
+ border: 0,
280
+ boxSizing: "content-box",
281
+ background: "none",
282
+ height: "1.4375em",
283
+ // Reset 23pxthe native input line-height
284
+ margin: 0,
285
+ // Reset for Safari
286
+ WebkitTapHighlightColor: "transparent",
287
+ display: "block",
288
+ // Make the flex item shrink with Firefox
289
+ minWidth: 0,
290
+ width: "100%",
291
+ "&::-webkit-input-placeholder": t,
292
+ "&::-moz-placeholder": t,
293
+ // Firefox 19+
294
+ "&::-ms-input-placeholder": t,
295
+ // Edge
296
+ "&:focus": {
297
+ outline: 0
298
+ },
299
+ // Reset Firefox invalid required input style
300
+ "&:invalid": {
301
+ boxShadow: "none"
302
+ },
303
+ "&::-webkit-search-decoration": {
304
+ // Remove the padding when type=search.
305
+ WebkitAppearance: "none"
306
+ },
307
+ // Show and hide the placeholder logic
308
+ [`label[data-shrink=false] + .${ee.formControl} &`]: {
309
+ "&::-webkit-input-placeholder": l,
310
+ "&::-moz-placeholder": l,
311
+ // Firefox 19+
312
+ "&::-ms-input-placeholder": l,
313
+ // Edge
314
+ "&:focus::-webkit-input-placeholder": u,
315
+ "&:focus::-moz-placeholder": u,
316
+ // Firefox 19+
317
+ "&:focus::-ms-input-placeholder": u
318
+ // Edge
319
+ },
320
+ [`&.${ee.disabled}`]: {
321
+ opacity: 1,
322
+ // Reset iOS opacity
323
+ WebkitTextFillColor: (n.vars || n).palette.text.disabled
324
+ // Fix opacity Safari bug
325
+ },
326
+ variants: [{
327
+ props: ({
328
+ ownerState: p
329
+ }) => !p.disableInjectingGlobalStyles,
330
+ style: {
331
+ animationName: "mui-auto-fill-cancel",
332
+ animationDuration: "10ms",
333
+ "&:-webkit-autofill": {
334
+ animationDuration: "5000s",
335
+ animationName: "mui-auto-fill"
336
+ }
337
+ }
338
+ }, {
339
+ props: {
340
+ size: "small"
341
+ },
342
+ style: {
343
+ paddingTop: 1
344
+ }
345
+ }, {
346
+ props: ({
347
+ ownerState: p
348
+ }) => p.multiline,
349
+ style: {
350
+ height: "auto",
351
+ resize: "none",
352
+ padding: 0,
353
+ paddingTop: 0
354
+ }
355
+ }, {
356
+ props: {
357
+ type: "search"
358
+ },
359
+ style: {
360
+ MozAppearance: "textfield"
361
+ // Improve type search style.
362
+ }
363
+ }]
364
+ };
365
+ })), be = Pe({
366
+ "@keyframes mui-auto-fill": {
367
+ from: {
368
+ display: "block"
369
+ }
370
+ },
371
+ "@keyframes mui-auto-fill-cancel": {
372
+ from: {
373
+ display: "block"
374
+ }
375
+ }
376
+ }), en = /* @__PURE__ */ s.forwardRef(function(o, t) {
377
+ const l = We({
378
+ props: o,
379
+ name: "MuiInputBase"
380
+ }), {
381
+ "aria-describedby": u,
382
+ autoComplete: p,
383
+ autoFocus: O,
384
+ className: E,
385
+ color: M,
386
+ components: C = {},
387
+ componentsProps: h = {},
388
+ defaultValue: T,
389
+ disabled: y,
390
+ disableInjectingGlobalStyles: S,
391
+ endAdornment: v,
392
+ error: x,
393
+ fullWidth: V = !1,
394
+ id: d,
395
+ inputComponent: b = "input",
396
+ inputProps: r = {},
397
+ inputRef: f,
398
+ margin: z,
399
+ maxRows: R,
400
+ minRows: g,
401
+ multiline: A = !1,
402
+ name: N,
403
+ onBlur: c,
404
+ onChange: H,
405
+ onClick: P,
406
+ onFocus: oe,
407
+ onKeyDown: Se,
408
+ onKeyUp: xe,
409
+ placeholder: Re,
410
+ readOnly: U,
411
+ renderSuffix: te,
412
+ rows: W,
413
+ size: nn,
414
+ slotProps: re = {},
415
+ slots: ie = {},
416
+ startAdornment: F,
417
+ type: ae = "text",
418
+ value: Oe,
419
+ ...Ee
420
+ } = l, D = r.value != null ? r.value : Oe, {
421
+ current: _
422
+ } = s.useRef(D != null), I = s.useRef(), Te = s.useCallback((i) => {
423
+ process.env.NODE_ENV !== "production" && i && i.nodeName !== "INPUT" && !i.focus && console.error(["MUI: You have provided a `inputComponent` to the input component", "that does not correctly handle the `ref` prop.", "Make sure the `ref` prop is called with a HTMLInputElement."].join(`
424
+ `));
425
+ }, []), Ie = ve(I, f, r.ref, Te), [j, K] = s.useState(!1), a = _e();
426
+ process.env.NODE_ENV !== "production" && s.useEffect(() => {
427
+ if (a)
428
+ return a.registerEffect();
429
+ }, [a]);
430
+ const m = Ke({
431
+ props: l,
432
+ muiFormControl: a,
433
+ states: ["color", "disabled", "error", "hiddenLabel", "size", "required", "filled"]
434
+ });
435
+ m.focused = a ? a.focused : j, s.useEffect(() => {
436
+ !a && y && j && (K(!1), c && c());
437
+ }, [a, y, j, c]);
438
+ const $ = a && a.onFilled, q = a && a.onEmpty, k = s.useCallback((i) => {
439
+ je(i) ? $ && $() : q && q();
440
+ }, [$, q]);
441
+ X(() => {
442
+ _ && k({
443
+ value: D
444
+ });
445
+ }, [D, k, _]);
446
+ const ze = (i) => {
447
+ oe && oe(i), r.onFocus && r.onFocus(i), a && a.onFocus ? a.onFocus(i) : K(!0);
448
+ }, Ae = (i) => {
449
+ c && c(i), r.onBlur && r.onBlur(i), a && a.onBlur ? a.onBlur(i) : K(!1);
450
+ }, Ne = (i, ...de) => {
451
+ if (!_) {
452
+ const ce = i.target || I.current;
453
+ if (ce == null)
454
+ throw new Error(process.env.NODE_ENV !== "production" ? "MUI: Expected valid input target. Did you use a custom `inputComponent` and forget to forward refs? See https://mui.com/r/input-component-ref-interface for more info." : He(1));
455
+ k({
456
+ value: ce.value
457
+ });
458
+ }
459
+ r.onChange && r.onChange(i, ...de), H && H(i, ...de);
460
+ };
461
+ s.useEffect(() => {
462
+ k(I.current);
463
+ }, []);
464
+ const Fe = (i) => {
465
+ I.current && i.currentTarget === i.target && I.current.focus(), P && P(i);
466
+ };
467
+ let G = b, w = r;
468
+ A && G === "input" && (W ? (process.env.NODE_ENV !== "production" && (g || R) && console.warn("MUI: You can not use the `minRows` or `maxRows` props when the input `rows` prop is set."), w = {
469
+ type: void 0,
470
+ minRows: W,
471
+ maxRows: W,
472
+ ...w
473
+ }) : w = {
474
+ type: void 0,
475
+ maxRows: R,
476
+ minRows: g,
477
+ ...w
478
+ }, G = Ce);
479
+ const ke = (i) => {
480
+ k(i.animationName === "mui-auto-fill-cancel" ? I.current : {
481
+ value: "x"
482
+ });
483
+ };
484
+ s.useEffect(() => {
485
+ a && a.setAdornedStart(!!F);
486
+ }, [a, F]);
487
+ const Y = {
488
+ ...l,
489
+ color: m.color || "primary",
490
+ disabled: m.disabled,
491
+ endAdornment: v,
492
+ error: m.error,
493
+ focused: m.focused,
494
+ formControl: a,
495
+ fullWidth: V,
496
+ hiddenLabel: m.hiddenLabel,
497
+ multiline: A,
498
+ size: m.size,
499
+ startAdornment: F,
500
+ type: ae
501
+ }, se = Je(Y), le = ie.root || C.Root || Qe, Z = re.root || h.root || {}, ue = ie.input || C.Input || Xe;
502
+ return w = {
503
+ ...w,
504
+ ...re.input ?? h.input
505
+ }, /* @__PURE__ */ Q(s.Fragment, {
506
+ children: [!S && typeof be == "function" && // For Emotion/Styled-components, InputGlobalStyles will be a function
507
+ // For Pigment CSS, this has no effect because the InputGlobalStyles will be null.
508
+ (ye || (ye = /* @__PURE__ */ B(be, {}))), /* @__PURE__ */ Q(le, {
509
+ ...Z,
510
+ ref: t,
511
+ onClick: Fe,
512
+ ...Ee,
513
+ ...!he(le) && {
514
+ ownerState: {
515
+ ...Y,
516
+ ...Z.ownerState
517
+ }
518
+ },
519
+ className: pe(se.root, Z.className, E, U && "MuiInputBase-readOnly"),
520
+ children: [F, /* @__PURE__ */ B(ne.Provider, {
521
+ value: null,
522
+ children: /* @__PURE__ */ B(ue, {
523
+ "aria-invalid": m.error,
524
+ "aria-describedby": u,
525
+ autoComplete: p,
526
+ autoFocus: O,
527
+ defaultValue: T,
528
+ disabled: m.disabled,
529
+ id: d,
530
+ onAnimationStart: ke,
531
+ name: N,
532
+ placeholder: Re,
533
+ readOnly: U,
534
+ required: m.required,
535
+ rows: W,
536
+ value: D,
537
+ onKeyDown: Se,
538
+ onKeyUp: xe,
539
+ type: ae,
540
+ ...w,
541
+ ...!he(ue) && {
542
+ as: G,
543
+ ownerState: {
544
+ ...Y,
545
+ ...w.ownerState
546
+ }
547
+ },
548
+ ref: Ie,
549
+ className: pe(se.input, w.className, U && "MuiInputBase-readOnly"),
550
+ onBlur: Ae,
551
+ onChange: Ne,
552
+ onFocus: ze
553
+ })
554
+ }), v, te ? te({
555
+ ...m,
556
+ startAdornment: F
557
+ }) : null]
558
+ })]
559
+ });
560
+ });
561
+ process.env.NODE_ENV !== "production" && (en.propTypes = {
562
+ // ┌────────────────────────────── Warning ──────────────────────────────┐
563
+ // │ These PropTypes are generated from the TypeScript type definitions. │
564
+ // │ To update them, edit the d.ts file and run `pnpm proptypes`. │
565
+ // └─────────────────────────────────────────────────────────────────────┘
566
+ /**
567
+ * @ignore
568
+ */
569
+ "aria-describedby": e.string,
570
+ /**
571
+ * This prop helps users to fill forms faster, especially on mobile devices.
572
+ * The name can be confusing, as it's more like an autofill.
573
+ * You can learn more about it [following the specification](https://html.spec.whatwg.org/multipage/form-control-infrastructure.html#autofill).
574
+ */
575
+ autoComplete: e.string,
576
+ /**
577
+ * If `true`, the `input` element is focused during the first mount.
578
+ */
579
+ autoFocus: e.bool,
580
+ /**
581
+ * Override or extend the styles applied to the component.
582
+ */
583
+ classes: e.object,
584
+ /**
585
+ * @ignore
586
+ */
587
+ className: e.string,
588
+ /**
589
+ * The color of the component.
590
+ * It supports both default and custom theme colors, which can be added as shown in the
591
+ * [palette customization guide](https://mui.com/material-ui/customization/palette/#custom-colors).
592
+ * The prop defaults to the value (`'primary'`) inherited from the parent FormControl component.
593
+ */
594
+ color: e.oneOfType([e.oneOf(["primary", "secondary", "error", "info", "success", "warning"]), e.string]),
595
+ /**
596
+ * The components used for each slot inside.
597
+ *
598
+ * @deprecated use the `slots` prop instead. This prop will be removed in v7. See [Migrating from deprecated APIs](https://mui.com/material-ui/migration/migrating-from-deprecated-apis/) for more details.
599
+ *
600
+ * @default {}
601
+ */
602
+ components: e.shape({
603
+ Input: e.elementType,
604
+ Root: e.elementType
605
+ }),
606
+ /**
607
+ * The extra props for the slot components.
608
+ * You can override the existing props or add new ones.
609
+ *
610
+ * @deprecated use the `slotProps` prop instead. This prop will be removed in v7. See [Migrating from deprecated APIs](https://mui.com/material-ui/migration/migrating-from-deprecated-apis/) for more details.
611
+ *
612
+ * @default {}
613
+ */
614
+ componentsProps: e.shape({
615
+ input: e.object,
616
+ root: e.object
617
+ }),
618
+ /**
619
+ * The default value. Use when the component is not controlled.
620
+ */
621
+ defaultValue: e.any,
622
+ /**
623
+ * If `true`, the component is disabled.
624
+ * The prop defaults to the value (`false`) inherited from the parent FormControl component.
625
+ */
626
+ disabled: e.bool,
627
+ /**
628
+ * If `true`, GlobalStyles for the auto-fill keyframes will not be injected/removed on mount/unmount. Make sure to inject them at the top of your application.
629
+ * This option is intended to help with boosting the initial rendering performance if you are loading a big amount of Input components at once.
630
+ * @default false
631
+ */
632
+ disableInjectingGlobalStyles: e.bool,
633
+ /**
634
+ * End `InputAdornment` for this component.
635
+ */
636
+ endAdornment: e.node,
637
+ /**
638
+ * If `true`, the `input` will indicate an error.
639
+ * The prop defaults to the value (`false`) inherited from the parent FormControl component.
640
+ */
641
+ error: e.bool,
642
+ /**
643
+ * If `true`, the `input` will take up the full width of its container.
644
+ * @default false
645
+ */
646
+ fullWidth: e.bool,
647
+ /**
648
+ * The id of the `input` element.
649
+ */
650
+ id: e.string,
651
+ /**
652
+ * The component used for the `input` element.
653
+ * Either a string to use a HTML element or a component.
654
+ * @default 'input'
655
+ */
656
+ inputComponent: Ve,
657
+ /**
658
+ * [Attributes](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#Attributes) applied to the `input` element.
659
+ * @default {}
660
+ */
661
+ inputProps: e.object,
662
+ /**
663
+ * Pass a ref to the `input` element.
664
+ */
665
+ inputRef: Ue,
666
+ /**
667
+ * If `dense`, will adjust vertical spacing. This is normally obtained via context from
668
+ * FormControl.
669
+ * The prop defaults to the value (`'none'`) inherited from the parent FormControl component.
670
+ */
671
+ margin: e.oneOf(["dense", "none"]),
672
+ /**
673
+ * Maximum number of rows to display when multiline option is set to true.
674
+ */
675
+ maxRows: e.oneOfType([e.number, e.string]),
676
+ /**
677
+ * Minimum number of rows to display when multiline option is set to true.
678
+ */
679
+ minRows: e.oneOfType([e.number, e.string]),
680
+ /**
681
+ * If `true`, a [TextareaAutosize](https://mui.com/material-ui/react-textarea-autosize/) element is rendered.
682
+ * @default false
683
+ */
684
+ multiline: e.bool,
685
+ /**
686
+ * Name attribute of the `input` element.
687
+ */
688
+ name: e.string,
689
+ /**
690
+ * Callback fired when the `input` is blurred.
691
+ *
692
+ * Notice that the first argument (event) might be undefined.
693
+ */
694
+ onBlur: e.func,
695
+ /**
696
+ * Callback fired when the value is changed.
697
+ *
698
+ * @param {React.ChangeEvent<HTMLTextAreaElement | HTMLInputElement>} event The event source of the callback.
699
+ * You can pull out the new value by accessing `event.target.value` (string).
700
+ */
701
+ onChange: e.func,
702
+ /**
703
+ * @ignore
704
+ */
705
+ onClick: e.func,
706
+ /**
707
+ * @ignore
708
+ */
709
+ onFocus: e.func,
710
+ /**
711
+ * Callback fired when the `input` doesn't satisfy its constraints.
712
+ */
713
+ onInvalid: e.func,
714
+ /**
715
+ * @ignore
716
+ */
717
+ onKeyDown: e.func,
718
+ /**
719
+ * @ignore
720
+ */
721
+ onKeyUp: e.func,
722
+ /**
723
+ * The short hint displayed in the `input` before the user enters a value.
724
+ */
725
+ placeholder: e.string,
726
+ /**
727
+ * It prevents the user from changing the value of the field
728
+ * (not from interacting with the field).
729
+ */
730
+ readOnly: e.bool,
731
+ /**
732
+ * @ignore
733
+ */
734
+ renderSuffix: e.func,
735
+ /**
736
+ * If `true`, the `input` element is required.
737
+ * The prop defaults to the value (`false`) inherited from the parent FormControl component.
738
+ */
739
+ required: e.bool,
740
+ /**
741
+ * Number of rows to display when multiline option is set to true.
742
+ */
743
+ rows: e.oneOfType([e.number, e.string]),
744
+ /**
745
+ * The size of the component.
746
+ */
747
+ size: e.oneOfType([e.oneOf(["medium", "small"]), e.string]),
748
+ /**
749
+ * The extra props for the slot components.
750
+ * You can override the existing props or add new ones.
751
+ *
752
+ * This prop is an alias for the `componentsProps` prop, which will be deprecated in the future.
753
+ *
754
+ * @default {}
755
+ */
756
+ slotProps: e.shape({
757
+ input: e.object,
758
+ root: e.object
759
+ }),
760
+ /**
761
+ * The components used for each slot inside.
762
+ *
763
+ * This prop is an alias for the `components` prop, which will be deprecated in the future.
764
+ *
765
+ * @default {}
766
+ */
767
+ slots: e.shape({
768
+ input: e.elementType,
769
+ root: e.elementType
770
+ }),
771
+ /**
772
+ * Start `InputAdornment` for this component.
773
+ */
774
+ startAdornment: e.node,
775
+ /**
776
+ * The system prop that allows defining system overrides as well as additional CSS styles.
777
+ */
778
+ sx: e.oneOfType([e.arrayOf(e.oneOfType([e.func, e.object, e.bool])), e.func, e.object]),
779
+ /**
780
+ * Type of the `input` element. It should be [a valid HTML5 input type](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#Form_%3Cinput%3E_types).
781
+ * @default 'text'
782
+ */
783
+ type: e.string,
784
+ /**
785
+ * The value of the `input` element, required for a controlled component.
786
+ */
787
+ value: e.any
788
+ });
789
+ export {
790
+ ne as F,
791
+ en as I,
792
+ je as a,
793
+ ee as b,
794
+ Qe as c,
795
+ Xe as d,
796
+ Ze as e,
797
+ Ke as f,
798
+ he as g,
799
+ dn as i,
800
+ Ye as r,
801
+ _e as u
802
+ };