@cgi-learning-hub/ui 1.0.0 → 1.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (170) hide show
  1. package/dist/Box-5x1F2S3-.cjs +1 -0
  2. package/dist/{Box-BHWJ-D81.js → Box-Bawb5zHX.js} +24 -23
  3. package/dist/Button-C__-QOJY.js +359 -0
  4. package/dist/Button-DKIRmOzf.cjs +1 -0
  5. package/dist/{ButtonBase-BpYorbzW.js → ButtonBase-4F5roLHd.js} +36 -37
  6. package/dist/ButtonBase-Bw3wq81v.cjs +75 -0
  7. package/dist/{CircularProgress-C8TogtEK.js → CircularProgress-BNazIBar.js} +30 -30
  8. package/dist/CircularProgress-WnNPMTjD.cjs +28 -0
  9. package/dist/DatePicker-B0jLSEvZ.cjs +19 -0
  10. package/dist/DatePicker-DGVeagTz.js +12663 -0
  11. package/dist/DefaultButton-F67BOmrx.js +258 -0
  12. package/dist/DefaultButton-y-mHSNFH.cjs +1 -0
  13. package/dist/{IconButton-Hsn7HKeI.js → IconButton-D_deQOvN.js} +15 -15
  14. package/dist/IconButton-DhWgsgQ7.cjs +2 -0
  15. package/dist/InputAdornment-DYqMrYJz.cjs +1 -0
  16. package/dist/InputAdornment-hNrnvXW9.js +153 -0
  17. package/dist/InputBase-BeZ70Fbf.cjs +3 -0
  18. package/dist/{InputBase-BdOkEcEz.js → InputBase-DNkF-TAp.js} +218 -217
  19. package/dist/Stack-BJ2ths-g.js +172 -0
  20. package/dist/Stack-BOcvai-O.cjs +1 -0
  21. package/dist/Tabs-CG428TT3.cjs +4 -0
  22. package/dist/{Tabs-C8ECGIYh.js → Tabs-CWujD0SK.js} +33 -33
  23. package/dist/{TextInput-CpnUc54E.js → TextField-DDmGQyEr.js} +3607 -3603
  24. package/dist/TextField-wYRnAj1v.cjs +12 -0
  25. package/dist/Tooltip-D42pzHKW.js +7463 -0
  26. package/dist/Tooltip-O30xWGZU.cjs +95 -0
  27. package/dist/{Typography-D9Jbc-Y5.js → Typography-B2XMXu83.js} +18 -18
  28. package/dist/Typography-DR_aF9lJ.cjs +1 -0
  29. package/dist/assets/index.css +1 -1
  30. package/dist/assets/styles.css +1 -1
  31. package/dist/components/Dropzone/Dropzone.cjs.js +5 -5
  32. package/dist/components/Dropzone/Dropzone.d.ts +2 -3
  33. package/dist/components/Dropzone/Dropzone.es.js +212 -240
  34. package/dist/components/Loader/Loader.cjs.js +1 -1
  35. package/dist/components/Loader/Loader.d.ts +0 -1
  36. package/dist/components/Loader/Loader.es.js +9 -9
  37. package/dist/components/LoaderBackdrop/LoaderBackdrop.cjs.js +1 -1
  38. package/dist/components/LoaderBackdrop/LoaderBackdrop.d.ts +0 -1
  39. package/dist/components/LoaderBackdrop/LoaderBackdrop.es.js +1 -2
  40. package/dist/components/PaperHeader/PaperHeader.cjs.js +1 -0
  41. package/dist/components/PaperHeader/PaperHeader.d.ts +13 -0
  42. package/dist/components/PaperHeader/PaperHeader.es.js +41 -0
  43. package/dist/components/PaperHeader/PaperHeader.stories.cjs.js +1 -0
  44. package/dist/components/PaperHeader/PaperHeader.stories.d.ts +5 -0
  45. package/dist/components/PaperHeader/PaperHeader.stories.es.js +28 -0
  46. package/dist/components/PaperHeader/index.cjs.js +1 -0
  47. package/dist/components/PaperHeader/index.d.ts +2 -0
  48. package/dist/components/PaperHeader/index.es.js +4 -0
  49. package/dist/components/buttons/DefaultButton/DefaultButton.cjs.js +1 -1
  50. package/dist/components/buttons/DefaultButton/DefaultButton.es.js +2 -2
  51. package/dist/components/buttons/DefaultButton/DefaultButtonIcon.cjs.js +1 -1
  52. package/dist/components/buttons/DefaultButton/DefaultButtonIcon.es.js +14 -14
  53. package/dist/components/buttons/DefaultButton/index.cjs.js +1 -1
  54. package/dist/components/buttons/DefaultButton/index.es.js +1 -1
  55. package/dist/components/buttons/IconButton.stories.cjs.js +1 -1
  56. package/dist/components/buttons/IconButton.stories.es.js +3 -3
  57. package/dist/components/buttons/PrimaryButton/PrimaryButton.cjs.js +1 -1
  58. package/dist/components/buttons/PrimaryButton/PrimaryButton.es.js +1 -1
  59. package/dist/components/buttons/PrimaryButton/PrimaryButton.stories.cjs.js +1 -1
  60. package/dist/components/buttons/PrimaryButton/PrimaryButton.stories.es.js +1 -1
  61. package/dist/components/buttons/SecondaryButton/SecondaryButton.cjs.js +1 -1
  62. package/dist/components/buttons/SecondaryButton/SecondaryButton.es.js +1 -1
  63. package/dist/components/buttons/SecondaryButton/SecondaryButton.stories.cjs.js +1 -1
  64. package/dist/components/buttons/SecondaryButton/SecondaryButton.stories.es.js +1 -1
  65. package/dist/components/buttons/index.cjs.js +1 -1
  66. package/dist/components/buttons/index.es.js +1 -1
  67. package/dist/components/feedback/Alert/Alert.d.ts +0 -1
  68. package/dist/components/feedback/QueryError/QueryError.cjs.js +1 -1
  69. package/dist/components/feedback/QueryError/QueryError.es.js +1 -1
  70. package/dist/components/index.cjs.js +1 -1
  71. package/dist/components/index.d.ts +37 -21
  72. package/dist/components/index.es.js +271 -186
  73. package/dist/components/inputs/PasswordInput/PasswordInput.cjs.js +1 -1
  74. package/dist/components/inputs/PasswordInput/PasswordInput.es.js +13 -15
  75. package/dist/components/inputs/SearchInput/SearchInput.cjs.js +1 -1
  76. package/dist/components/inputs/SearchInput/SearchInput.es.js +36 -5
  77. package/dist/components/inputs/SearchInput/SearchInput.stories.cjs.js +1 -1
  78. package/dist/components/inputs/SearchInput/SearchInput.stories.es.js +4 -4
  79. package/dist/components/inputs/SearchInput/index.cjs.js +1 -1
  80. package/dist/components/inputs/SearchInput/index.es.js +2 -2
  81. package/dist/components/inputs/TextInput/TextInput.cjs.js +1 -1
  82. package/dist/components/inputs/TextInput/TextInput.es.js +4 -3
  83. package/dist/components/inputs/TextInput/TextInput.stories.cjs.js +1 -1
  84. package/dist/components/inputs/TextInput/TextInput.stories.es.js +1 -1
  85. package/dist/components/inputs/TextInput/index.cjs.js +1 -1
  86. package/dist/components/inputs/TextInput/index.es.js +2 -2
  87. package/dist/components/inputs/index.cjs.js +1 -1
  88. package/dist/components/inputs/index.es.js +6 -6
  89. package/dist/components/lists/FileList/FileList.cjs.js +1 -1
  90. package/dist/components/lists/FileList/FileList.es.js +1 -1
  91. package/dist/components/lists/FileList/FileListItem.cjs.js +1 -1
  92. package/dist/components/lists/FileList/FileListItem.es.js +6 -6
  93. package/dist/components/lists/TabList.stories.cjs.js +1 -1
  94. package/dist/components/lists/TabList.stories.es.js +27 -26
  95. package/dist/components/pickers/DatePicker/DatePicker.cjs.js +1 -0
  96. package/dist/components/pickers/DatePicker/DatePicker.d.ts +8 -0
  97. package/dist/components/pickers/DatePicker/DatePicker.es.js +6 -0
  98. package/dist/components/pickers/DatePicker/DatePicker.stories.cjs.js +1 -0
  99. package/dist/components/pickers/DatePicker/DatePicker.stories.d.ts +5 -0
  100. package/dist/components/pickers/DatePicker/DatePicker.stories.es.js +16 -0
  101. package/dist/components/pickers/DatePicker/index.cjs.js +1 -0
  102. package/dist/components/pickers/DatePicker/index.d.ts +2 -0
  103. package/dist/components/pickers/DatePicker/index.es.js +4 -0
  104. package/dist/components/pickers/index.cjs.js +1 -0
  105. package/dist/components/pickers/index.d.ts +1 -0
  106. package/dist/components/pickers/index.es.js +4 -0
  107. package/dist/createStyled-CzVedz8V.js +142 -0
  108. package/dist/createStyled-LobpFGWo.cjs +1 -0
  109. package/dist/{createSvgIcon-BpzrJYC7.js → createSvgIcon-B8vHI3I6.js} +12 -12
  110. package/dist/createSvgIcon-BGm-SWUB.cjs +1 -0
  111. package/dist/createSvgIcon-CKlvKClV.cjs +2 -0
  112. package/dist/{createSvgIcon-CbXClqUM.js → createSvgIcon-DjuUwmEp.js} +21 -20
  113. package/dist/fr-By4s91yO.js +307 -0
  114. package/dist/fr-TRjulm1Q.cjs +1 -0
  115. package/dist/identifier-4KVhx666.cjs +50 -0
  116. package/dist/identifier-D-ng7Qqa.js +3047 -0
  117. package/dist/index.cjs.js +1 -1
  118. package/dist/index.es.js +273 -189
  119. package/dist/refType-BhXrhWFB.cjs +1 -0
  120. package/dist/{refType-CD9RZ5PF.js → refType-COGEdfch.js} +1 -1
  121. package/dist/styled-ZF_yhfMW.cjs +17 -0
  122. package/dist/styled-xiAudcD_.js +533 -0
  123. package/dist/useForkRef-CGd3Nhyb.cjs +1 -0
  124. package/dist/{useIsFocusVisible-B2ErvDHn.cjs → useIsFocusVisible-Bv_7uvif.cjs} +1 -1
  125. package/dist/{useIsFocusVisible-BsjI7Zxf.js → useIsFocusVisible-DhASXQ4o.js} +1 -1
  126. package/dist/useTheme-B5RCz7rY.cjs +1 -0
  127. package/dist/useTheme-CjBTq22m.js +18 -0
  128. package/dist/{useSlotProps-BCdUhJUO.js → useTheme-iNHILPzK.js} +41 -29
  129. package/dist/useTheme-kqsjFBnC.cjs +1 -0
  130. package/dist/useThemeProps-B-Oq4Y2j.cjs +1 -0
  131. package/dist/useThemeProps-BHAsCmc4.cjs +1 -0
  132. package/dist/useThemeProps-BM4fCFq5.js +27 -0
  133. package/dist/useThemeProps-BVvSbkPP.js +17 -0
  134. package/dist/{useTimeout-Dokw0W_A.js → useTimeout-BdvDipeg.js} +1 -1
  135. package/dist/{useTimeout-D8rbe5ty.cjs → useTimeout-XUWYBnl6.cjs} +1 -1
  136. package/package.json +18 -16
  137. package/dist/Box-DjpT-6Yv.cjs +0 -1
  138. package/dist/ButtonBase-BHN-4x4u.cjs +0 -75
  139. package/dist/CircularProgress-CjET2rvP.cjs +0 -28
  140. package/dist/DefaultButton-BoDg7xMm.cjs +0 -1
  141. package/dist/DefaultButton-y5BL9CKZ.js +0 -601
  142. package/dist/IconButton-fqTVX40x.cjs +0 -2
  143. package/dist/InputBase-DLc7Nf1T.cjs +0 -3
  144. package/dist/LocalizationProvider-B28kINsn.js +0 -575
  145. package/dist/LocalizationProvider-U4FHK15N.cjs +0 -5
  146. package/dist/SearchInput-B_Mgl-CJ.cjs +0 -1
  147. package/dist/SearchInput-DVccMSI6.js +0 -186
  148. package/dist/Tabs-Cij7O-J8.cjs +0 -4
  149. package/dist/TextInput-5zTkdX7s.cjs +0 -12
  150. package/dist/TimePicker-BRY05Sej.cjs +0 -73
  151. package/dist/TimePicker-CLolXFl8.js +0 -22074
  152. package/dist/Typography-6WB4M4zs.cjs +0 -1
  153. package/dist/components/LocalizationProvider/LocalizationProvider.cjs.js +0 -1
  154. package/dist/components/LocalizationProvider/LocalizationProvider.d.ts +0 -7
  155. package/dist/components/LocalizationProvider/LocalizationProvider.es.js +0 -6
  156. package/dist/components/LocalizationProvider/index.cjs.js +0 -1
  157. package/dist/components/LocalizationProvider/index.d.ts +0 -2
  158. package/dist/components/LocalizationProvider/index.es.js +0 -4
  159. package/dist/createSvgIcon-DQmDu_xr.cjs +0 -2
  160. package/dist/createSvgIcon-O41BSqQe.cjs +0 -1
  161. package/dist/fr-LokUOTE7.cjs +0 -1
  162. package/dist/fr-ndKV9IhC.js +0 -335
  163. package/dist/refType-DR4z34r8.cjs +0 -1
  164. package/dist/styled-D6_yEe4a.cjs +0 -26
  165. package/dist/styled-DSGBDqKV.js +0 -1218
  166. package/dist/useForkRef-DfdM2MN5.cjs +0 -1
  167. package/dist/useSlotProps-CXRrw38p.cjs +0 -1
  168. package/dist/useThemeProps-BktqG0To.cjs +0 -42
  169. package/dist/useThemeProps-DJpU2Yr7.js +0 -2428
  170. package/dist/{useForkRef-CQ5u1_mH.js → useForkRef-DwN_Iz9R.js} +1 -1
@@ -1,22 +1,23 @@
1
- import { d as ke, P as e, b as he, _ as d, h as Be, T as Pe, g as Me, u as He, c as J, k as We } from "./useThemeProps-DJpU2Yr7.js";
2
- import * as u from "react";
3
- import { G as De, g as Ve, s as be, c as ce, a as _e } from "./styled-DSGBDqKV.js";
4
- import { jsx as O, jsxs as Q } from "react/jsx-runtime";
5
- import { a as ye, u as X } from "./useForkRef-CQ5u1_mH.js";
6
- import { a as pe, d as Le } from "./ownerWindow-C7EH1lr6.js";
7
- import { i as fe } from "./isHostComponent-kiaBvYVo.js";
8
- import { e as je, r as Ue } from "./refType-CD9RZ5PF.js";
9
- function ge({
1
+ import { K as ke, P as e, _ as ye, m as d, T as Be, v as Pe, w as Me, x as pe, q as Q, L as He } from "./identifier-D-ng7Qqa.js";
2
+ import * as l from "react";
3
+ import { d as De, s as be, u as We, c as Ve } from "./styled-xiAudcD_.js";
4
+ import { jsx as N, jsxs as X } from "react/jsx-runtime";
5
+ import { a as ge, u as ee } from "./useForkRef-DwN_Iz9R.js";
6
+ import { a as fe, d as Le } from "./ownerWindow-C7EH1lr6.js";
7
+ import { i as me } from "./isHostComponent-kiaBvYVo.js";
8
+ import { e as _e, r as je } from "./refType-COGEdfch.js";
9
+ import { u as Ue } from "./useTheme-CjBTq22m.js";
10
+ function we({
10
11
  styles: o,
11
12
  themeId: n,
12
13
  defaultTheme: t = {}
13
14
  }) {
14
- const s = ke(t), i = typeof o == "function" ? o(n && s[n] || s) : o;
15
- return /* @__PURE__ */ O(De, {
15
+ const s = Ue(t), i = typeof o == "function" ? o(n && s[n] || s) : o;
16
+ return /* @__PURE__ */ N(ke, {
16
17
  styles: i
17
18
  });
18
19
  }
19
- process.env.NODE_ENV !== "production" && (ge.propTypes = {
20
+ process.env.NODE_ENV !== "production" && (we.propTypes = {
20
21
  // ┌────────────────────────────── Warning ──────────────────────────────┐
21
22
  // │ These PropTypes are generated from the TypeScript type definitions. │
22
23
  // │ To update them, edit the TypeScript types and run `pnpm proptypes`. │
@@ -34,16 +35,32 @@ process.env.NODE_ENV !== "production" && (ge.propTypes = {
34
35
  */
35
36
  themeId: e.string
36
37
  });
37
- const oe = /* @__PURE__ */ u.createContext(void 0);
38
- process.env.NODE_ENV !== "production" && (oe.displayName = "FormControlContext");
38
+ const ne = /* @__PURE__ */ l.createContext(void 0);
39
+ process.env.NODE_ENV !== "production" && (ne.displayName = "FormControlContext");
39
40
  function $e() {
40
- return u.useContext(oe);
41
+ return l.useContext(ne);
42
+ }
43
+ function he(o) {
44
+ return o != null && !(Array.isArray(o) && o.length === 0);
45
+ }
46
+ function Ke(o, n = !1) {
47
+ return o && (he(o.value) && o.value !== "" || n && he(o.defaultValue) && o.defaultValue !== "");
41
48
  }
42
- const Ge = ["onChange", "maxRows", "minRows", "style", "value"];
49
+ function ho(o) {
50
+ return o.startAdornment;
51
+ }
52
+ function Ge({
53
+ props: o,
54
+ states: n,
55
+ muiFormControl: t
56
+ }) {
57
+ return n.reduce((s, i) => (s[i] = o[i], t && typeof o[i] > "u" && (s[i] = t[i]), s), {});
58
+ }
59
+ const qe = ["onChange", "maxRows", "minRows", "style", "value"];
43
60
  function L(o) {
44
61
  return parseInt(o, 10) || 0;
45
62
  }
46
- const Ke = {
63
+ const Ye = {
47
64
  shadow: {
48
65
  // Visibility needed to hide the extra text area on iPads
49
66
  visibility: "hidden",
@@ -58,87 +75,87 @@ const Ke = {
58
75
  transform: "translateZ(0)"
59
76
  }
60
77
  };
61
- function qe(o) {
78
+ function Ze(o) {
62
79
  return o == null || Object.keys(o).length === 0 || o.outerHeightStyle === 0 && !o.overflowing;
63
80
  }
64
- const we = /* @__PURE__ */ u.forwardRef(function(n, t) {
81
+ const ve = /* @__PURE__ */ l.forwardRef(function(n, t) {
65
82
  const {
66
83
  onChange: s,
67
84
  maxRows: i,
68
85
  minRows: p = 1,
69
- style: N,
70
- value: z
71
- } = n, F = he(n, Ge), {
86
+ style: z,
87
+ value: A
88
+ } = n, B = ye(n, qe), {
72
89
  current: R
73
- } = u.useRef(z != null), b = u.useRef(null), A = ye(t, b), y = u.useRef(null), S = u.useCallback(() => {
74
- const c = b.current, l = pe(c).getComputedStyle(c);
75
- if (l.width === "0px")
90
+ } = l.useRef(A != null), b = l.useRef(null), I = ge(t, b), g = l.useRef(null), T = l.useRef(null), v = l.useCallback(() => {
91
+ const c = b.current, f = fe(c).getComputedStyle(c);
92
+ if (f.width === "0px")
76
93
  return {
77
94
  outerHeightStyle: 0,
78
95
  overflowing: !1
79
96
  };
80
- const f = y.current;
81
- f.style.width = l.width, f.value = c.value || n.placeholder || "x", f.value.slice(-1) === `
82
- ` && (f.value += " ");
83
- const T = l.boxSizing, E = L(l.paddingBottom) + L(l.paddingTop), v = L(l.borderBottomWidth) + L(l.borderTopWidth), M = f.scrollHeight;
84
- f.value = "x";
85
- const C = f.scrollHeight;
86
- let h = M;
87
- p && (h = Math.max(Number(p) * C, h)), i && (h = Math.min(Number(i) * C, h)), h = Math.max(h, C);
88
- const H = h + (T === "border-box" ? E + v : 0), W = Math.abs(h - M) <= 1;
97
+ const m = T.current;
98
+ m.style.width = f.width, m.value = c.value || n.placeholder || "x", m.value.slice(-1) === `
99
+ ` && (m.value += " ");
100
+ const E = f.boxSizing, O = L(f.paddingBottom) + L(f.paddingTop), x = L(f.borderBottomWidth) + L(f.borderTopWidth), S = m.scrollHeight;
101
+ m.value = "x";
102
+ const F = m.scrollHeight;
103
+ let y = S;
104
+ p && (y = Math.max(Number(p) * F, y)), i && (y = Math.min(Number(i) * F, y)), y = Math.max(y, F);
105
+ const H = y + (E === "border-box" ? O + x : 0), j = Math.abs(y - S) <= 1;
89
106
  return {
90
107
  outerHeightStyle: H,
91
- overflowing: W
108
+ overflowing: j
92
109
  };
93
- }, [i, p, n.placeholder]), g = u.useCallback(() => {
94
- const c = S();
95
- if (qe(c))
110
+ }, [i, p, n.placeholder]), C = l.useCallback(() => {
111
+ const c = v();
112
+ if (Ze(c))
96
113
  return;
97
- const w = b.current;
98
- w.style.height = `${c.outerHeightStyle}px`, w.style.overflow = c.overflowing ? "hidden" : "";
99
- }, [S]);
100
- X(() => {
114
+ const u = c.outerHeightStyle, f = b.current;
115
+ g.current !== u && (g.current = u, f.style.height = `${u}px`), f.style.overflow = c.overflowing ? "hidden" : "";
116
+ }, [v]);
117
+ ee(() => {
101
118
  const c = () => {
102
- g();
119
+ C();
103
120
  };
104
- let w;
105
- const l = () => {
106
- cancelAnimationFrame(w), w = requestAnimationFrame(() => {
121
+ let u;
122
+ const f = () => {
123
+ cancelAnimationFrame(u), u = requestAnimationFrame(() => {
107
124
  c();
108
125
  });
109
- }, f = Le(c), T = b.current, E = pe(T);
110
- E.addEventListener("resize", f);
111
- let v;
112
- return typeof ResizeObserver < "u" && (v = new ResizeObserver(process.env.NODE_ENV === "test" ? l : c), v.observe(T)), () => {
113
- f.clear(), cancelAnimationFrame(w), E.removeEventListener("resize", f), v && v.disconnect();
126
+ }, m = Le(c), E = b.current, O = fe(E);
127
+ O.addEventListener("resize", m);
128
+ let x;
129
+ return typeof ResizeObserver < "u" && (x = new ResizeObserver(process.env.NODE_ENV === "test" ? f : c), x.observe(E)), () => {
130
+ m.clear(), cancelAnimationFrame(u), O.removeEventListener("resize", m), x && x.disconnect();
114
131
  };
115
- }, [S, g]), X(() => {
116
- g();
132
+ }, [v, C]), ee(() => {
133
+ C();
117
134
  });
118
- const k = (c) => {
119
- R || g(), s && s(c);
135
+ const _ = (c) => {
136
+ R || C(), s && s(c);
120
137
  };
121
- return /* @__PURE__ */ Q(u.Fragment, {
122
- children: [/* @__PURE__ */ O("textarea", d({
123
- value: z,
124
- onChange: k,
125
- ref: A,
138
+ return /* @__PURE__ */ X(l.Fragment, {
139
+ children: [/* @__PURE__ */ N("textarea", d({
140
+ value: A,
141
+ onChange: _,
142
+ ref: I,
126
143
  rows: p,
127
- style: N
128
- }, F)), /* @__PURE__ */ O("textarea", {
144
+ style: z
145
+ }, B)), /* @__PURE__ */ N("textarea", {
129
146
  "aria-hidden": !0,
130
147
  className: n.className,
131
148
  readOnly: !0,
132
- ref: y,
149
+ ref: T,
133
150
  tabIndex: -1,
134
- style: d({}, Ke.shadow, N, {
151
+ style: d({}, Ye.shadow, z, {
135
152
  paddingTop: 0,
136
153
  paddingBottom: 0
137
154
  })
138
155
  })]
139
156
  });
140
157
  });
141
- process.env.NODE_ENV !== "production" && (we.propTypes = {
158
+ process.env.NODE_ENV !== "production" && (ve.propTypes = {
142
159
  // ┌────────────────────────────── Warning ──────────────────────────────┐
143
160
  // │ These PropTypes are generated from the TypeScript type definitions. │
144
161
  // │ To update them, edit the TypeScript types and run `pnpm proptypes`. │
@@ -173,20 +190,13 @@ process.env.NODE_ENV !== "production" && (we.propTypes = {
173
190
  */
174
191
  value: e.oneOfType([e.arrayOf(e.string), e.number, e.string])
175
192
  });
176
- function Ye({
177
- props: o,
178
- states: n,
179
- muiFormControl: t
180
- }) {
181
- return n.reduce((s, i) => (s[i] = o[i], t && typeof o[i] > "u" && (s[i] = t[i]), s), {});
182
- }
183
- function ve(o) {
184
- return /* @__PURE__ */ O(ge, d({}, o, {
185
- defaultTheme: Be,
186
- themeId: Pe
193
+ function Ce(o) {
194
+ return /* @__PURE__ */ N(we, d({}, o, {
195
+ defaultTheme: De,
196
+ themeId: Be
187
197
  }));
188
198
  }
189
- process.env.NODE_ENV !== "production" && (ve.propTypes = {
199
+ process.env.NODE_ENV !== "production" && (Ce.propTypes = {
190
200
  // ┌────────────────────────────── Warning ──────────────────────────────┐
191
201
  // │ These PropTypes are generated from the TypeScript type definitions. │
192
202
  // │ To update them, edit the d.ts file and run `pnpm proptypes`. │
@@ -196,23 +206,14 @@ process.env.NODE_ENV !== "production" && (ve.propTypes = {
196
206
  */
197
207
  styles: e.oneOfType([e.array, e.func, e.number, e.object, e.string, e.bool])
198
208
  });
199
- function me(o) {
200
- return o != null && !(Array.isArray(o) && o.length === 0);
201
- }
202
- function Ze(o, n = !1) {
203
- return o && (me(o.value) && o.value !== "" || n && me(o.defaultValue) && o.defaultValue !== "");
204
- }
205
- function mo(o) {
206
- return o.startAdornment;
207
- }
208
209
  function Je(o) {
209
210
  return Me("MuiInputBase", o);
210
211
  }
211
- const ee = Ve("MuiInputBase", ["root", "formControl", "focused", "disabled", "adornedStart", "adornedEnd", "error", "sizeSmall", "multiline", "colorSecondary", "fullWidth", "hiddenLabel", "readOnly", "input", "inputSizeSmall", "inputMultiline", "inputTypeSearch", "inputAdornedStart", "inputAdornedEnd", "inputHiddenLabel"]), Qe = ["aria-describedby", "autoComplete", "autoFocus", "className", "color", "components", "componentsProps", "defaultValue", "disabled", "disableInjectingGlobalStyles", "endAdornment", "error", "fullWidth", "id", "inputComponent", "inputProps", "inputRef", "margin", "maxRows", "minRows", "multiline", "name", "onBlur", "onChange", "onClick", "onFocus", "onKeyDown", "onKeyUp", "placeholder", "readOnly", "renderSuffix", "rows", "size", "slotProps", "slots", "startAdornment", "type", "value"], Xe = (o, n) => {
212
+ const oe = Pe("MuiInputBase", ["root", "formControl", "focused", "disabled", "adornedStart", "adornedEnd", "error", "sizeSmall", "multiline", "colorSecondary", "fullWidth", "hiddenLabel", "readOnly", "input", "inputSizeSmall", "inputMultiline", "inputTypeSearch", "inputAdornedStart", "inputAdornedEnd", "inputHiddenLabel"]), Qe = ["aria-describedby", "autoComplete", "autoFocus", "className", "color", "components", "componentsProps", "defaultValue", "disabled", "disableInjectingGlobalStyles", "endAdornment", "error", "fullWidth", "id", "inputComponent", "inputProps", "inputRef", "margin", "maxRows", "minRows", "multiline", "name", "onBlur", "onChange", "onClick", "onFocus", "onKeyDown", "onKeyUp", "placeholder", "readOnly", "renderSuffix", "rows", "size", "slotProps", "slots", "startAdornment", "type", "value"], Xe = (o, n) => {
212
213
  const {
213
214
  ownerState: t
214
215
  } = o;
215
- return [n.root, t.formControl && n.formControl, t.startAdornment && n.adornedStart, t.endAdornment && n.adornedEnd, t.error && n.error, t.size === "small" && n.sizeSmall, t.multiline && n.multiline, t.color && n[`color${J(t.color)}`], t.fullWidth && n.fullWidth, t.hiddenLabel && n.hiddenLabel];
216
+ return [n.root, t.formControl && n.formControl, t.startAdornment && n.adornedStart, t.endAdornment && n.adornedEnd, t.error && n.error, t.size === "small" && n.sizeSmall, t.multiline && n.multiline, t.color && n[`color${Q(t.color)}`], t.fullWidth && n.fullWidth, t.hiddenLabel && n.hiddenLabel];
216
217
  }, eo = (o, n) => {
217
218
  const {
218
219
  ownerState: t
@@ -225,20 +226,20 @@ const ee = Ve("MuiInputBase", ["root", "formControl", "focused", "disabled", "ad
225
226
  disabled: s,
226
227
  error: i,
227
228
  endAdornment: p,
228
- focused: N,
229
- formControl: z,
230
- fullWidth: F,
229
+ focused: z,
230
+ formControl: A,
231
+ fullWidth: B,
231
232
  hiddenLabel: R,
232
233
  multiline: b,
233
- readOnly: A,
234
- size: y,
235
- startAdornment: S,
236
- type: g
237
- } = o, k = {
238
- root: ["root", `color${J(t)}`, s && "disabled", i && "error", F && "fullWidth", N && "focused", z && "formControl", y && y !== "medium" && `size${J(y)}`, b && "multiline", S && "adornedStart", p && "adornedEnd", R && "hiddenLabel", A && "readOnly"],
239
- input: ["input", s && "disabled", g === "search" && "inputTypeSearch", b && "inputMultiline", y === "small" && "inputSizeSmall", R && "inputHiddenLabel", S && "inputAdornedStart", p && "inputAdornedEnd", A && "readOnly"]
234
+ readOnly: I,
235
+ size: g,
236
+ startAdornment: T,
237
+ type: v
238
+ } = o, C = {
239
+ root: ["root", `color${Q(t)}`, s && "disabled", i && "error", B && "fullWidth", z && "focused", A && "formControl", g && g !== "medium" && `size${Q(g)}`, b && "multiline", T && "adornedStart", p && "adornedEnd", R && "hiddenLabel", I && "readOnly"],
240
+ input: ["input", s && "disabled", v === "search" && "inputTypeSearch", b && "inputMultiline", g === "small" && "inputSizeSmall", R && "inputHiddenLabel", T && "inputAdornedStart", p && "inputAdornedEnd", I && "readOnly"]
240
241
  };
241
- return _e(k, Je, n);
242
+ return Ve(C, Je, n);
242
243
  }, no = be("div", {
243
244
  name: "MuiInputBase",
244
245
  slot: "Root",
@@ -256,7 +257,7 @@ const ee = Ve("MuiInputBase", ["root", "formControl", "focused", "disabled", "ad
256
257
  cursor: "text",
257
258
  display: "inline-flex",
258
259
  alignItems: "center",
259
- [`&.${ee.disabled}`]: {
260
+ [`&.${oe.disabled}`]: {
260
261
  color: (o.vars || o).palette.text.disabled,
261
262
  cursor: "default"
262
263
  }
@@ -330,7 +331,7 @@ const ee = Ve("MuiInputBase", ["root", "formControl", "focused", "disabled", "ad
330
331
  WebkitAppearance: "none"
331
332
  },
332
333
  // Show and hide the placeholder logic
333
- [`label[data-shrink=false] + .${ee.formControl} &`]: {
334
+ [`label[data-shrink=false] + .${oe.formControl} &`]: {
334
335
  "&::-webkit-input-placeholder": i,
335
336
  "&::-moz-placeholder": i,
336
337
  // Firefox 19+
@@ -346,7 +347,7 @@ const ee = Ve("MuiInputBase", ["root", "formControl", "focused", "disabled", "ad
346
347
  "&:focus::-ms-input-placeholder": p
347
348
  // Edge
348
349
  },
349
- [`&.${ee.disabled}`]: {
350
+ [`&.${oe.disabled}`]: {
350
351
  opacity: 1,
351
352
  // Reset iOS opacity
352
353
  WebkitTextFillColor: (o.vars || o).palette.text.disabled
@@ -367,7 +368,7 @@ const ee = Ve("MuiInputBase", ["root", "formControl", "focused", "disabled", "ad
367
368
  // Improve type search style.
368
369
  MozAppearance: "textfield"
369
370
  });
370
- }), ro = /* @__PURE__ */ O(ve, {
371
+ }), ro = /* @__PURE__ */ N(Ce, {
371
372
  styles: {
372
373
  "@keyframes mui-auto-fill": {
373
374
  from: {
@@ -380,170 +381,170 @@ const ee = Ve("MuiInputBase", ["root", "formControl", "focused", "disabled", "ad
380
381
  }
381
382
  }
382
383
  }
383
- }), io = /* @__PURE__ */ u.forwardRef(function(n, t) {
384
+ }), io = /* @__PURE__ */ l.forwardRef(function(n, t) {
384
385
  var s;
385
- const i = He({
386
+ const i = We({
386
387
  props: n,
387
388
  name: "MuiInputBase"
388
389
  }), {
389
390
  "aria-describedby": p,
390
- autoComplete: N,
391
- autoFocus: z,
392
- className: F,
391
+ autoComplete: z,
392
+ autoFocus: A,
393
+ className: B,
393
394
  components: R = {},
394
395
  componentsProps: b = {},
395
- defaultValue: A,
396
- disabled: y,
397
- disableInjectingGlobalStyles: S,
398
- endAdornment: g,
399
- fullWidth: k = !1,
400
- id: c,
401
- inputComponent: w = "input",
402
- inputProps: l = {},
396
+ defaultValue: I,
397
+ disabled: g,
398
+ disableInjectingGlobalStyles: T,
399
+ endAdornment: v,
400
+ fullWidth: C = !1,
401
+ id: _,
402
+ inputComponent: c = "input",
403
+ inputProps: u = {},
403
404
  inputRef: f,
404
- maxRows: T,
405
+ maxRows: m,
405
406
  minRows: E,
406
- multiline: v = !1,
407
- name: M,
408
- onBlur: C,
409
- onChange: h,
410
- onClick: H,
411
- onFocus: W,
412
- onKeyDown: Ce,
407
+ multiline: O = !1,
408
+ name: x,
409
+ onBlur: S,
410
+ onChange: F,
411
+ onClick: y,
412
+ onFocus: H,
413
+ onKeyDown: j,
413
414
  onKeyUp: xe,
414
415
  placeholder: Se,
415
- readOnly: j,
416
- renderSuffix: ne,
416
+ readOnly: U,
417
+ renderSuffix: te,
417
418
  rows: D,
418
- slotProps: te = {},
419
- slots: re = {},
420
- startAdornment: B,
421
- type: ie = "text",
419
+ slotProps: re = {},
420
+ slots: ie = {},
421
+ startAdornment: P,
422
+ type: ae = "text",
422
423
  value: Re
423
- } = i, Te = he(i, Qe), V = l.value != null ? l.value : Re, {
424
- current: U
425
- } = u.useRef(V != null), I = u.useRef(), Ee = u.useCallback((r) => {
424
+ } = i, Te = ye(i, Qe), W = u.value != null ? u.value : Re, {
425
+ current: $
426
+ } = l.useRef(W != null), k = l.useRef(), Ee = l.useCallback((r) => {
426
427
  process.env.NODE_ENV !== "production" && r && r.nodeName !== "INPUT" && !r.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(`
427
428
  `));
428
- }, []), Oe = ye(I, f, l.ref, Ee), [$, G] = u.useState(!1), a = $e();
429
- process.env.NODE_ENV !== "production" && u.useEffect(() => {
429
+ }, []), Oe = ge(k, f, u.ref, Ee), [K, G] = l.useState(!1), a = $e();
430
+ process.env.NODE_ENV !== "production" && l.useEffect(() => {
430
431
  if (a)
431
432
  return a.registerEffect();
432
433
  }, [a]);
433
- const m = Ye({
434
+ const h = Ge({
434
435
  props: i,
435
436
  muiFormControl: a,
436
437
  states: ["color", "disabled", "error", "hiddenLabel", "size", "required", "filled"]
437
438
  });
438
- m.focused = a ? a.focused : $, u.useEffect(() => {
439
- !a && y && $ && (G(!1), C && C());
440
- }, [a, y, $, C]);
441
- const K = a && a.onFilled, q = a && a.onEmpty, P = u.useCallback((r) => {
442
- Ze(r) ? K && K() : q && q();
443
- }, [K, q]);
444
- X(() => {
445
- U && P({
446
- value: V
439
+ h.focused = a ? a.focused : K, l.useEffect(() => {
440
+ !a && g && K && (G(!1), S && S());
441
+ }, [a, g, K, S]);
442
+ const q = a && a.onFilled, Y = a && a.onEmpty, M = l.useCallback((r) => {
443
+ Ke(r) ? q && q() : Y && Y();
444
+ }, [q, Y]);
445
+ ee(() => {
446
+ $ && M({
447
+ value: W
447
448
  });
448
- }, [V, P, U]);
449
+ }, [W, M, $]);
449
450
  const Ne = (r) => {
450
- if (m.disabled) {
451
+ if (h.disabled) {
451
452
  r.stopPropagation();
452
453
  return;
453
454
  }
454
- W && W(r), l.onFocus && l.onFocus(r), a && a.onFocus ? a.onFocus(r) : G(!0);
455
+ H && H(r), u.onFocus && u.onFocus(r), a && a.onFocus ? a.onFocus(r) : G(!0);
455
456
  }, ze = (r) => {
456
- C && C(r), l.onBlur && l.onBlur(r), a && a.onBlur ? a.onBlur(r) : G(!1);
457
- }, Ae = (r, ...ue) => {
458
- if (!U) {
459
- const de = r.target || I.current;
460
- if (de == null)
461
- 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." : We(1));
462
- P({
463
- value: de.value
457
+ S && S(r), u.onBlur && u.onBlur(r), a && a.onBlur ? a.onBlur(r) : G(!1);
458
+ }, Ae = (r, ...de) => {
459
+ if (!$) {
460
+ const ce = r.target || k.current;
461
+ if (ce == null)
462
+ 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));
463
+ M({
464
+ value: ce.value
464
465
  });
465
466
  }
466
- l.onChange && l.onChange(r, ...ue), h && h(r, ...ue);
467
+ u.onChange && u.onChange(r, ...de), F && F(r, ...de);
467
468
  };
468
- u.useEffect(() => {
469
- P(I.current);
469
+ l.useEffect(() => {
470
+ M(k.current);
470
471
  }, []);
471
472
  const Ie = (r) => {
472
- I.current && r.currentTarget === r.target && I.current.focus(), H && H(r);
473
+ k.current && r.currentTarget === r.target && k.current.focus(), y && y(r);
473
474
  };
474
- let Y = w, x = l;
475
- v && Y === "input" && (D ? (process.env.NODE_ENV !== "production" && (E || T) && console.warn("MUI: You can not use the `minRows` or `maxRows` props when the input `rows` prop is set."), x = d({
475
+ let Z = c, w = u;
476
+ O && Z === "input" && (D ? (process.env.NODE_ENV !== "production" && (E || m) && console.warn("MUI: You can not use the `minRows` or `maxRows` props when the input `rows` prop is set."), w = d({
476
477
  type: void 0,
477
478
  minRows: D,
478
479
  maxRows: D
479
- }, x)) : x = d({
480
+ }, w)) : w = d({
480
481
  type: void 0,
481
- maxRows: T,
482
+ maxRows: m,
482
483
  minRows: E
483
- }, x), Y = we);
484
+ }, w), Z = ve);
484
485
  const Fe = (r) => {
485
- P(r.animationName === "mui-auto-fill-cancel" ? I.current : {
486
+ M(r.animationName === "mui-auto-fill-cancel" ? k.current : {
486
487
  value: "x"
487
488
  });
488
489
  };
489
- u.useEffect(() => {
490
- a && a.setAdornedStart(!!B);
491
- }, [a, B]);
492
- const _ = d({}, i, {
493
- color: m.color || "primary",
494
- disabled: m.disabled,
495
- endAdornment: g,
496
- error: m.error,
497
- focused: m.focused,
490
+ l.useEffect(() => {
491
+ a && a.setAdornedStart(!!P);
492
+ }, [a, P]);
493
+ const V = d({}, i, {
494
+ color: h.color || "primary",
495
+ disabled: h.disabled,
496
+ endAdornment: v,
497
+ error: h.error,
498
+ focused: h.focused,
498
499
  formControl: a,
499
- fullWidth: k,
500
- hiddenLabel: m.hiddenLabel,
501
- multiline: v,
502
- size: m.size,
503
- startAdornment: B,
504
- type: ie
505
- }), ae = oo(_), se = re.root || R.Root || no, Z = te.root || b.root || {}, le = re.input || R.Input || to;
506
- return x = d({}, x, (s = te.input) != null ? s : b.input), /* @__PURE__ */ Q(u.Fragment, {
507
- children: [!S && ro, /* @__PURE__ */ Q(se, d({}, Z, !fe(se) && {
508
- ownerState: d({}, _, Z.ownerState)
500
+ fullWidth: C,
501
+ hiddenLabel: h.hiddenLabel,
502
+ multiline: O,
503
+ size: h.size,
504
+ startAdornment: P,
505
+ type: ae
506
+ }), se = oo(V), le = ie.root || R.Root || no, J = re.root || b.root || {}, ue = ie.input || R.Input || to;
507
+ return w = d({}, w, (s = re.input) != null ? s : b.input), /* @__PURE__ */ X(l.Fragment, {
508
+ children: [!T && ro, /* @__PURE__ */ X(le, d({}, J, !me(le) && {
509
+ ownerState: d({}, V, J.ownerState)
509
510
  }, {
510
511
  ref: t,
511
512
  onClick: Ie
512
513
  }, Te, {
513
- className: ce(ae.root, Z.className, F, j && "MuiInputBase-readOnly"),
514
- children: [B, /* @__PURE__ */ O(oe.Provider, {
514
+ className: pe(se.root, J.className, B, U && "MuiInputBase-readOnly"),
515
+ children: [P, /* @__PURE__ */ N(ne.Provider, {
515
516
  value: null,
516
- children: /* @__PURE__ */ O(le, d({
517
- ownerState: _,
518
- "aria-invalid": m.error,
517
+ children: /* @__PURE__ */ N(ue, d({
518
+ ownerState: V,
519
+ "aria-invalid": h.error,
519
520
  "aria-describedby": p,
520
- autoComplete: N,
521
- autoFocus: z,
522
- defaultValue: A,
523
- disabled: m.disabled,
524
- id: c,
521
+ autoComplete: z,
522
+ autoFocus: A,
523
+ defaultValue: I,
524
+ disabled: h.disabled,
525
+ id: _,
525
526
  onAnimationStart: Fe,
526
- name: M,
527
+ name: x,
527
528
  placeholder: Se,
528
- readOnly: j,
529
- required: m.required,
529
+ readOnly: U,
530
+ required: h.required,
530
531
  rows: D,
531
- value: V,
532
- onKeyDown: Ce,
532
+ value: W,
533
+ onKeyDown: j,
533
534
  onKeyUp: xe,
534
- type: ie
535
- }, x, !fe(le) && {
536
- as: Y,
537
- ownerState: d({}, _, x.ownerState)
535
+ type: ae
536
+ }, w, !me(ue) && {
537
+ as: Z,
538
+ ownerState: d({}, V, w.ownerState)
538
539
  }, {
539
540
  ref: Oe,
540
- className: ce(ae.input, x.className, j && "MuiInputBase-readOnly"),
541
+ className: pe(se.input, w.className, U && "MuiInputBase-readOnly"),
541
542
  onBlur: ze,
542
543
  onChange: Ae,
543
544
  onFocus: Ne
544
545
  }))
545
- }), g, ne ? ne(d({}, m, {
546
- startAdornment: B
546
+ }), v, te ? te(d({}, h, {
547
+ startAdornment: P
547
548
  })) : null]
548
549
  }))]
549
550
  });
@@ -645,7 +646,7 @@ process.env.NODE_ENV !== "production" && (io.propTypes = {
645
646
  * Either a string to use a HTML element or a component.
646
647
  * @default 'input'
647
648
  */
648
- inputComponent: je,
649
+ inputComponent: _e,
649
650
  /**
650
651
  * [Attributes](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#Attributes) applied to the `input` element.
651
652
  * @default {}
@@ -654,7 +655,7 @@ process.env.NODE_ENV !== "production" && (io.propTypes = {
654
655
  /**
655
656
  * Pass a ref to the `input` element.
656
657
  */
657
- inputRef: Ue,
658
+ inputRef: je,
658
659
  /**
659
660
  * If `dense`, will adjust vertical spacing. This is normally obtained via context from
660
661
  * FormControl.
@@ -779,15 +780,15 @@ process.env.NODE_ENV !== "production" && (io.propTypes = {
779
780
  value: e.any
780
781
  });
781
782
  export {
782
- oe as F,
783
+ ne as F,
783
784
  io as I,
784
- no as a,
785
- to as b,
786
- eo as c,
787
- mo as d,
788
- Ze as e,
789
- Ye as f,
790
- ee as i,
785
+ Ke as a,
786
+ oe as b,
787
+ no as c,
788
+ to as d,
789
+ eo as e,
790
+ Ge as f,
791
+ ho as i,
791
792
  Xe as r,
792
793
  $e as u
793
794
  };