@cgi-learning-hub/ui 0.0.1-dev.1708964890 → 0.0.1-dev.1708990372

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 (134) hide show
  1. package/dist/Button-Tkz5NkF_.cjs +1 -0
  2. package/dist/Button-X7eWZQfX.js +356 -0
  3. package/dist/ButtonBase-CKfcGhaU.js +892 -0
  4. package/dist/ButtonBase-Cg8cBMzO.cjs +75 -0
  5. package/dist/Input-CAb0EFzc.cjs +1 -0
  6. package/dist/Input-CbYjsRHK.js +322 -0
  7. package/dist/{InputBase-C_yPRkam.js → InputBase-B13Nzzhk.js} +215 -193
  8. package/dist/InputBase-CKlCw9fj.cjs +4 -0
  9. package/dist/assets/index.css +1 -1
  10. package/dist/components/AnotherComponent/AnotherComponent.cjs.js +1 -0
  11. package/dist/components/AnotherComponent/AnotherComponent.d.ts +2 -0
  12. package/dist/components/AnotherComponent/AnotherComponent.es.js +15 -0
  13. package/dist/components/AnotherComponent/AnotherComponent.stories.cjs.js +1 -0
  14. package/dist/components/{Dropzone/Dropzone.stories.d.ts → AnotherComponent/AnotherComponent.stories.d.ts} +2 -1
  15. package/dist/components/AnotherComponent/AnotherComponent.stories.es.js +22 -0
  16. package/dist/components/AnotherComponent/index.cjs.js +1 -0
  17. package/dist/components/AnotherComponent/index.d.ts +2 -0
  18. package/dist/components/AnotherComponent/index.es.js +4 -0
  19. package/dist/components/BasicButtons/BasicButtons.cjs.js +1 -0
  20. package/dist/components/BasicButtons/BasicButtons.d.ts +2 -0
  21. package/dist/components/BasicButtons/BasicButtons.es.js +189 -0
  22. package/dist/components/BasicButtons/BasicButtons.stories.cjs.js +1 -0
  23. package/dist/components/BasicButtons/BasicButtons.stories.d.ts +5 -0
  24. package/dist/components/BasicButtons/BasicButtons.stories.es.js +22 -0
  25. package/dist/components/BasicButtons/index.cjs.js +1 -0
  26. package/dist/components/BasicButtons/index.d.ts +2 -0
  27. package/dist/components/BasicButtons/index.es.js +4 -0
  28. package/dist/components/buttons/DefaultButton/DefaultButton.cjs.js +28 -1
  29. package/dist/components/buttons/DefaultButton/DefaultButton.es.js +267 -408
  30. package/dist/components/buttons/DefaultButton/DefaultButtonIcon.cjs.js +1 -1
  31. package/dist/components/buttons/DefaultButton/DefaultButtonIcon.es.js +5 -5
  32. package/dist/components/buttons/PrimaryButton/PrimaryButton.cjs.js +1 -1
  33. package/dist/components/buttons/PrimaryButton/PrimaryButton.es.js +1 -1
  34. package/dist/components/buttons/PrimaryButton/PrimaryButton.stories.cjs.js +1 -1
  35. package/dist/components/buttons/PrimaryButton/PrimaryButton.stories.d.ts +1 -1
  36. package/dist/components/buttons/PrimaryButton/PrimaryButton.stories.es.js +7 -8
  37. package/dist/components/buttons/SecondaryButton/SecondaryButton.cjs.js +1 -1
  38. package/dist/components/buttons/SecondaryButton/SecondaryButton.es.js +1 -1
  39. package/dist/components/buttons/SecondaryButton/SecondaryButton.stories.cjs.js +1 -1
  40. package/dist/components/buttons/SecondaryButton/SecondaryButton.stories.d.ts +1 -1
  41. package/dist/components/buttons/SecondaryButton/SecondaryButton.stories.es.js +9 -10
  42. package/dist/components/index.cjs.js +1 -1
  43. package/dist/components/index.d.ts +2 -4
  44. package/dist/components/index.es.js +14 -18
  45. package/dist/components/inputs/SearchInput/SearchInput.cjs.js +1 -1
  46. package/dist/components/inputs/SearchInput/SearchInput.es.js +247 -77
  47. package/dist/components/inputs/TextInput/TextInput.cjs.js +13 -11
  48. package/dist/components/inputs/TextInput/TextInput.es.js +1631 -1844
  49. package/dist/{createSvgIcon-B6bZPuto.cjs → createSvgIcon-jvI3LIfI.cjs} +1 -1
  50. package/dist/{createSvgIcon-KaSN8JhZ.js → createSvgIcon-qXNZi4k1.js} +8 -8
  51. package/dist/extendSxProp-BRHiEwyk.js +29 -0
  52. package/dist/extendSxProp-CvhhU9Vb.cjs +1 -0
  53. package/dist/index.cjs.js +1 -1
  54. package/dist/index.es.js +12 -16
  55. package/dist/useForkRef-82uiK71d.cjs +1 -0
  56. package/dist/useForkRef-CLcOhrzI.js +44 -0
  57. package/dist/useTheme-BWRyHzdn.js +65 -0
  58. package/dist/useTheme-BpLcDNG1.cjs +1 -0
  59. package/dist/{useThemeProps-Dg9Uoq7q.js → useThemeProps-B6yTTpAe.js} +1024 -1018
  60. package/dist/useThemeProps-CDriK9TK.cjs +65 -0
  61. package/package.json +1 -2
  62. package/dist/Box-7uR7JZiM.cjs +0 -1
  63. package/dist/Box-CPGTKTgx.js +0 -56
  64. package/dist/ButtonBase-B0tkJ9zf.js +0 -831
  65. package/dist/ButtonBase-DCL6Xlnm.cjs +0 -75
  66. package/dist/CircularProgress-CZX5SfKt.cjs +0 -28
  67. package/dist/CircularProgress-CguDBnxV.js +0 -215
  68. package/dist/IconButton-CJ1Nt-jf.js +0 -182
  69. package/dist/IconButton-De7ZdW2q.cjs +0 -2
  70. package/dist/InputBase-Dvr5GnwD.cjs +0 -4
  71. package/dist/Tab-Bhm9hCrX.cjs +0 -1
  72. package/dist/Tab-C4l6V01S.js +0 -237
  73. package/dist/TransitionGroupContext-C7wWJ6l7.js +0 -14
  74. package/dist/TransitionGroupContext-g4tmk10h.cjs +0 -1
  75. package/dist/Typography-CyFLZjnE.js +0 -202
  76. package/dist/Typography-DwsN2Ttm.cjs +0 -1
  77. package/dist/components/Dropzone/Dropzone.cjs.js +0 -5
  78. package/dist/components/Dropzone/Dropzone.d.ts +0 -9
  79. package/dist/components/Dropzone/Dropzone.es.js +0 -1210
  80. package/dist/components/Dropzone/Dropzone.stories.cjs.js +0 -1
  81. package/dist/components/Dropzone/Dropzone.stories.es.js +0 -17
  82. package/dist/components/Dropzone/index.cjs.js +0 -1
  83. package/dist/components/Dropzone/index.d.ts +0 -2
  84. package/dist/components/Dropzone/index.es.js +0 -4
  85. package/dist/components/buttons/IconButton.stories.cjs.js +0 -1
  86. package/dist/components/buttons/IconButton.stories.d.ts +0 -4
  87. package/dist/components/buttons/IconButton.stories.es.js +0 -27
  88. package/dist/components/inputs/SearchInput/SearchInput.stories.cjs.js +0 -1
  89. package/dist/components/inputs/SearchInput/SearchInput.stories.d.ts +0 -4
  90. package/dist/components/inputs/SearchInput/SearchInput.stories.es.js +0 -16
  91. package/dist/components/inputs/TextInput/TextInput.stories.cjs.js +0 -1
  92. package/dist/components/inputs/TextInput/TextInput.stories.d.ts +0 -4
  93. package/dist/components/inputs/TextInput/TextInput.stories.es.js +0 -17
  94. package/dist/components/lists/FileList/FileList.cjs.js +0 -1
  95. package/dist/components/lists/FileList/FileList.d.ts +0 -7
  96. package/dist/components/lists/FileList/FileList.es.js +0 -19
  97. package/dist/components/lists/FileList/FileList.stories.cjs.js +0 -1
  98. package/dist/components/lists/FileList/FileList.stories.d.ts +0 -4
  99. package/dist/components/lists/FileList/FileList.stories.es.js +0 -28
  100. package/dist/components/lists/FileList/FileListItem.cjs.js +0 -1
  101. package/dist/components/lists/FileList/FileListItem.d.ts +0 -13
  102. package/dist/components/lists/FileList/FileListItem.es.js +0 -41
  103. package/dist/components/lists/FileList/index.cjs.js +0 -1
  104. package/dist/components/lists/FileList/index.d.ts +0 -4
  105. package/dist/components/lists/FileList/index.es.js +0 -6
  106. package/dist/components/lists/TabList.stories.cjs.js +0 -4
  107. package/dist/components/lists/TabList.stories.d.ts +0 -4
  108. package/dist/components/lists/TabList.stories.es.js +0 -1027
  109. package/dist/components/lists/index.cjs.js +0 -1
  110. package/dist/components/lists/index.d.ts +0 -1
  111. package/dist/components/lists/index.es.js +0 -6
  112. package/dist/createSvgIcon-BX8WQ5r-.cjs +0 -2
  113. package/dist/createSvgIcon-m_wsenOJ.js +0 -84
  114. package/dist/isHostComponent-PydJW4A4.cjs +0 -1
  115. package/dist/isHostComponent-kiaBvYVo.js +0 -6
  116. package/dist/ownerWindow-C7EH1lr6.js +0 -23
  117. package/dist/ownerWindow-Dk_4aaak.cjs +0 -1
  118. package/dist/refType-CHSN6ysS.cjs +0 -1
  119. package/dist/refType-Hh9tfnoF.js +0 -29
  120. package/dist/unsupportedProp-Bn6XWqwH.cjs +0 -1
  121. package/dist/unsupportedProp-BuVD30Gh.js +0 -9
  122. package/dist/useControlled-BsLcOmhe.js +0 -48
  123. package/dist/useControlled-jN3fqFfv.cjs +0 -3
  124. package/dist/useForkRef-CGd3Nhyb.cjs +0 -1
  125. package/dist/useForkRef-DwN_Iz9R.js +0 -17
  126. package/dist/useIsFocusVisible-BF0lT08B.cjs +0 -1
  127. package/dist/useIsFocusVisible-D8ksiuhS.js +0 -69
  128. package/dist/useSlotProps-MoAYME1z.js +0 -70
  129. package/dist/useSlotProps-R4s13HHI.cjs +0 -1
  130. package/dist/useTheme-BDPYLOoP.cjs +0 -1
  131. package/dist/useTheme-DJEDOopE.js +0 -9
  132. package/dist/useThemeProps-jkB5q9ie.cjs +0 -65
  133. package/dist/useTimeout-KN97abZR.js +0 -47
  134. package/dist/useTimeout-qjxkiZZn.cjs +0 -1
@@ -1,237 +0,0 @@
1
- import { g as _, a as E, s as M, c as R, _ as x, b as U, e as H, f as F, P as i, h as z } from "./useThemeProps-Dg9Uoq7q.js";
2
- import * as p from "react";
3
- import { jsxs as C } from "react/jsx-runtime";
4
- import { B as D } from "./ButtonBase-B0tkJ9zf.js";
5
- import { u as L } from "./unsupportedProp-BuVD30Gh.js";
6
- function V(o) {
7
- return E("MuiTab", o);
8
- }
9
- const A = _("MuiTab", ["root", "labelIcon", "textColorInherit", "textColorPrimary", "textColorSecondary", "selected", "disabled", "fullWidth", "wrapped", "iconWrapper"]), a = A, G = ["className", "disabled", "disableFocusRipple", "fullWidth", "icon", "iconPosition", "indicator", "label", "onChange", "onClick", "onFocus", "selected", "selectionFollowsFocus", "textColor", "value", "wrapped"], q = (o) => {
10
- const {
11
- classes: e,
12
- textColor: s,
13
- fullWidth: t,
14
- wrapped: m,
15
- icon: d,
16
- label: b,
17
- selected: g,
18
- disabled: l
19
- } = o, n = {
20
- root: ["root", d && b && "labelIcon", `textColor${R(s)}`, t && "fullWidth", m && "wrapped", g && "selected", l && "disabled"],
21
- iconWrapper: ["iconWrapper"]
22
- };
23
- return z(n, V, e);
24
- }, J = M(D, {
25
- name: "MuiTab",
26
- slot: "Root",
27
- overridesResolver: (o, e) => {
28
- const {
29
- ownerState: s
30
- } = o;
31
- return [e.root, s.label && s.icon && e.labelIcon, e[`textColor${R(s.textColor)}`], s.fullWidth && e.fullWidth, s.wrapped && e.wrapped];
32
- }
33
- })(({
34
- theme: o,
35
- ownerState: e
36
- }) => x({}, o.typography.button, {
37
- maxWidth: 360,
38
- minWidth: 90,
39
- position: "relative",
40
- minHeight: 48,
41
- flexShrink: 0,
42
- padding: "12px 16px",
43
- overflow: "hidden",
44
- whiteSpace: "normal",
45
- textAlign: "center"
46
- }, e.label && {
47
- flexDirection: e.iconPosition === "top" || e.iconPosition === "bottom" ? "column" : "row"
48
- }, {
49
- lineHeight: 1.25
50
- }, e.icon && e.label && {
51
- minHeight: 72,
52
- paddingTop: 9,
53
- paddingBottom: 9,
54
- [`& > .${a.iconWrapper}`]: x({}, e.iconPosition === "top" && {
55
- marginBottom: 6
56
- }, e.iconPosition === "bottom" && {
57
- marginTop: 6
58
- }, e.iconPosition === "start" && {
59
- marginRight: o.spacing(1)
60
- }, e.iconPosition === "end" && {
61
- marginLeft: o.spacing(1)
62
- })
63
- }, e.textColor === "inherit" && {
64
- color: "inherit",
65
- opacity: 0.6,
66
- // same opacity as theme.palette.text.secondary
67
- [`&.${a.selected}`]: {
68
- opacity: 1
69
- },
70
- [`&.${a.disabled}`]: {
71
- opacity: (o.vars || o).palette.action.disabledOpacity
72
- }
73
- }, e.textColor === "primary" && {
74
- color: (o.vars || o).palette.text.secondary,
75
- [`&.${a.selected}`]: {
76
- color: (o.vars || o).palette.primary.main
77
- },
78
- [`&.${a.disabled}`]: {
79
- color: (o.vars || o).palette.text.disabled
80
- }
81
- }, e.textColor === "secondary" && {
82
- color: (o.vars || o).palette.text.secondary,
83
- [`&.${a.selected}`]: {
84
- color: (o.vars || o).palette.secondary.main
85
- },
86
- [`&.${a.disabled}`]: {
87
- color: (o.vars || o).palette.text.disabled
88
- }
89
- }, e.fullWidth && {
90
- flexShrink: 1,
91
- flexGrow: 1,
92
- flexBasis: 0,
93
- maxWidth: "none"
94
- }, e.wrapped && {
95
- fontSize: o.typography.pxToRem(12)
96
- })), $ = /* @__PURE__ */ p.forwardRef(function(e, s) {
97
- const t = U({
98
- props: e,
99
- name: "MuiTab"
100
- }), {
101
- className: m,
102
- disabled: d = !1,
103
- disableFocusRipple: b = !1,
104
- // eslint-disable-next-line react/prop-types
105
- fullWidth: g,
106
- icon: l,
107
- iconPosition: n = "top",
108
- // eslint-disable-next-line react/prop-types
109
- indicator: N,
110
- label: u,
111
- onChange: f,
112
- onClick: y,
113
- onFocus: h,
114
- // eslint-disable-next-line react/prop-types
115
- selected: c,
116
- // eslint-disable-next-line react/prop-types
117
- selectionFollowsFocus: k,
118
- // eslint-disable-next-line react/prop-types
119
- textColor: O = "inherit",
120
- value: T,
121
- wrapped: w = !1
122
- } = t, B = H(t, G), W = x({}, t, {
123
- disabled: d,
124
- disableFocusRipple: b,
125
- selected: c,
126
- icon: !!l,
127
- iconPosition: n,
128
- label: !!u,
129
- fullWidth: g,
130
- textColor: O,
131
- wrapped: w
132
- }), P = q(W), v = l && u && /* @__PURE__ */ p.isValidElement(l) ? /* @__PURE__ */ p.cloneElement(l, {
133
- className: F(P.iconWrapper, l.props.className)
134
- }) : l, j = (r) => {
135
- !c && f && f(r, T), y && y(r);
136
- }, I = (r) => {
137
- k && !c && f && f(r, T), h && h(r);
138
- };
139
- return /* @__PURE__ */ C(J, x({
140
- focusRipple: !b,
141
- className: F(P.root, m),
142
- ref: s,
143
- role: "tab",
144
- "aria-selected": c,
145
- disabled: d,
146
- onClick: j,
147
- onFocus: I,
148
- ownerState: W,
149
- tabIndex: c ? 0 : -1
150
- }, B, {
151
- children: [n === "top" || n === "start" ? /* @__PURE__ */ C(p.Fragment, {
152
- children: [v, u]
153
- }) : /* @__PURE__ */ C(p.Fragment, {
154
- children: [u, v]
155
- }), N]
156
- }));
157
- });
158
- process.env.NODE_ENV !== "production" && ($.propTypes = {
159
- // ┌────────────────────────────── Warning ──────────────────────────────┐
160
- // │ These PropTypes are generated from the TypeScript type definitions. │
161
- // │ To update them, edit the d.ts file and run `pnpm proptypes`. │
162
- // └─────────────────────────────────────────────────────────────────────┘
163
- /**
164
- * This prop isn't supported.
165
- * Use the `component` prop if you need to change the children structure.
166
- */
167
- children: L,
168
- /**
169
- * Override or extend the styles applied to the component.
170
- */
171
- classes: i.object,
172
- /**
173
- * @ignore
174
- */
175
- className: i.string,
176
- /**
177
- * If `true`, the component is disabled.
178
- * @default false
179
- */
180
- disabled: i.bool,
181
- /**
182
- * If `true`, the keyboard focus ripple is disabled.
183
- * @default false
184
- */
185
- disableFocusRipple: i.bool,
186
- /**
187
- * If `true`, the ripple effect is disabled.
188
- *
189
- * ⚠️ Without a ripple there is no styling for :focus-visible by default. Be sure
190
- * to highlight the element by applying separate styles with the `.Mui-focusVisible` class.
191
- * @default false
192
- */
193
- disableRipple: i.bool,
194
- /**
195
- * The icon to display.
196
- */
197
- icon: i.oneOfType([i.element, i.string]),
198
- /**
199
- * The position of the icon relative to the label.
200
- * @default 'top'
201
- */
202
- iconPosition: i.oneOf(["bottom", "end", "start", "top"]),
203
- /**
204
- * The label element.
205
- */
206
- label: i.node,
207
- /**
208
- * @ignore
209
- */
210
- onChange: i.func,
211
- /**
212
- * @ignore
213
- */
214
- onClick: i.func,
215
- /**
216
- * @ignore
217
- */
218
- onFocus: i.func,
219
- /**
220
- * The system prop that allows defining system overrides as well as additional CSS styles.
221
- */
222
- sx: i.oneOfType([i.arrayOf(i.oneOfType([i.func, i.object, i.bool])), i.func, i.object]),
223
- /**
224
- * You can provide your own value. Otherwise, we fallback to the child position index.
225
- */
226
- value: i.any,
227
- /**
228
- * Tab labels appear in a single row.
229
- * They can use a second line if needed.
230
- * @default false
231
- */
232
- wrapped: i.bool
233
- });
234
- const Z = $;
235
- export {
236
- Z as T
237
- };
@@ -1,14 +0,0 @@
1
- import p from "react";
2
- function e(t, o) {
3
- return e = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function(r, n) {
4
- return r.__proto__ = n, r;
5
- }, e(t, o);
6
- }
7
- function f(t, o) {
8
- t.prototype = Object.create(o.prototype), t.prototype.constructor = t, e(t, o);
9
- }
10
- const i = p.createContext(null);
11
- export {
12
- i as T,
13
- f as _
14
- };
@@ -1 +0,0 @@
1
- "use strict";const c=require("react");function e(t,o){return e=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,n){return r.__proto__=n,r},e(t,o)}function i(t,o){t.prototype=Object.create(o.prototype),t.prototype.constructor=t,e(t,o)}const p=c.createContext(null);exports.TransitionGroupContext=p;exports._inheritsLoose=i;
@@ -1,202 +0,0 @@
1
- import { e as f, _ as p, m as C, n as O, a as W, g as j, s as _, c as d, b as M, f as $, P as r, h as N } from "./useThemeProps-Dg9Uoq7q.js";
2
- import * as R from "react";
3
- import { jsx as U } from "react/jsx-runtime";
4
- const A = ["sx"], E = (o) => {
5
- var t, a;
6
- const n = {
7
- systemProps: {},
8
- otherProps: {}
9
- }, s = (t = o == null || (a = o.theme) == null ? void 0 : a.unstable_sxConfig) != null ? t : C;
10
- return Object.keys(o).forEach((e) => {
11
- s[e] ? n.systemProps[e] = o[e] : n.otherProps[e] = o[e];
12
- }), n;
13
- };
14
- function D(o) {
15
- const {
16
- sx: t
17
- } = o, a = f(o, A), {
18
- systemProps: n,
19
- otherProps: s
20
- } = E(a);
21
- let e;
22
- return Array.isArray(t) ? e = [n, ...t] : typeof t == "function" ? e = (...l) => {
23
- const i = t(...l);
24
- return O(i) ? p({}, n, i) : n;
25
- } : e = p({}, n, t), p({}, s, {
26
- sx: e
27
- });
28
- }
29
- function L(o) {
30
- return W("MuiTypography", o);
31
- }
32
- j("MuiTypography", ["root", "h1", "h2", "h3", "h4", "h5", "h6", "subtitle1", "subtitle2", "body1", "body2", "inherit", "button", "caption", "overline", "alignLeft", "alignRight", "alignCenter", "alignJustify", "noWrap", "gutterBottom", "paragraph"]);
33
- const V = ["align", "className", "component", "gutterBottom", "noWrap", "paragraph", "variant", "variantMapping"], k = (o) => {
34
- const {
35
- align: t,
36
- gutterBottom: a,
37
- noWrap: n,
38
- paragraph: s,
39
- variant: e,
40
- classes: l
41
- } = o, i = {
42
- root: ["root", e, o.align !== "inherit" && `align${d(t)}`, a && "gutterBottom", n && "noWrap", s && "paragraph"]
43
- };
44
- return N(i, L, l);
45
- }, z = _("span", {
46
- name: "MuiTypography",
47
- slot: "Root",
48
- overridesResolver: (o, t) => {
49
- const {
50
- ownerState: a
51
- } = o;
52
- return [t.root, a.variant && t[a.variant], a.align !== "inherit" && t[`align${d(a.align)}`], a.noWrap && t.noWrap, a.gutterBottom && t.gutterBottom, a.paragraph && t.paragraph];
53
- }
54
- })(({
55
- theme: o,
56
- ownerState: t
57
- }) => p({
58
- margin: 0
59
- }, t.variant === "inherit" && {
60
- // Some elements, like <button> on Chrome have default font that doesn't inherit, reset this.
61
- font: "inherit"
62
- }, t.variant !== "inherit" && o.typography[t.variant], t.align !== "inherit" && {
63
- textAlign: t.align
64
- }, t.noWrap && {
65
- overflow: "hidden",
66
- textOverflow: "ellipsis",
67
- whiteSpace: "nowrap"
68
- }, t.gutterBottom && {
69
- marginBottom: "0.35em"
70
- }, t.paragraph && {
71
- marginBottom: 16
72
- })), y = {
73
- h1: "h1",
74
- h2: "h2",
75
- h3: "h3",
76
- h4: "h4",
77
- h5: "h5",
78
- h6: "h6",
79
- subtitle1: "h6",
80
- subtitle2: "h6",
81
- body1: "p",
82
- body2: "p",
83
- inherit: "p"
84
- }, J = {
85
- primary: "primary.main",
86
- textPrimary: "text.primary",
87
- secondary: "secondary.main",
88
- textSecondary: "text.secondary",
89
- error: "error.main"
90
- }, S = (o) => J[o] || o, b = /* @__PURE__ */ R.forwardRef(function(t, a) {
91
- const n = M({
92
- props: t,
93
- name: "MuiTypography"
94
- }), s = S(n.color), e = D(p({}, n, {
95
- color: s
96
- })), {
97
- align: l = "inherit",
98
- className: i,
99
- component: c,
100
- gutterBottom: v = !1,
101
- noWrap: x = !1,
102
- paragraph: g = !1,
103
- variant: h = "body1",
104
- variantMapping: u = y
105
- } = e, T = f(e, V), m = p({}, e, {
106
- align: l,
107
- color: s,
108
- className: i,
109
- component: c,
110
- gutterBottom: v,
111
- noWrap: x,
112
- paragraph: g,
113
- variant: h,
114
- variantMapping: u
115
- }), P = c || (g ? "p" : u[h] || y[h]) || "span", B = k(m);
116
- return /* @__PURE__ */ U(z, p({
117
- as: P,
118
- ref: a,
119
- ownerState: m,
120
- className: $(B.root, i)
121
- }, T));
122
- });
123
- process.env.NODE_ENV !== "production" && (b.propTypes = {
124
- // ┌────────────────────────────── Warning ──────────────────────────────┐
125
- // │ These PropTypes are generated from the TypeScript type definitions. │
126
- // │ To update them, edit the d.ts file and run `pnpm proptypes`. │
127
- // └─────────────────────────────────────────────────────────────────────┘
128
- /**
129
- * Set the text-align on the component.
130
- * @default 'inherit'
131
- */
132
- align: r.oneOf(["center", "inherit", "justify", "left", "right"]),
133
- /**
134
- * The content of the component.
135
- */
136
- children: r.node,
137
- /**
138
- * Override or extend the styles applied to the component.
139
- */
140
- classes: r.object,
141
- /**
142
- * @ignore
143
- */
144
- className: r.string,
145
- /**
146
- * The component used for the root node.
147
- * Either a string to use a HTML element or a component.
148
- */
149
- component: r.elementType,
150
- /**
151
- * If `true`, the text will have a bottom margin.
152
- * @default false
153
- */
154
- gutterBottom: r.bool,
155
- /**
156
- * If `true`, the text will not wrap, but instead will truncate with a text overflow ellipsis.
157
- *
158
- * Note that text overflow can only happen with block or inline-block level elements
159
- * (the element needs to have a width in order to overflow).
160
- * @default false
161
- */
162
- noWrap: r.bool,
163
- /**
164
- * If `true`, the element will be a paragraph element.
165
- * @default false
166
- */
167
- paragraph: r.bool,
168
- /**
169
- * The system prop that allows defining system overrides as well as additional CSS styles.
170
- */
171
- sx: r.oneOfType([r.arrayOf(r.oneOfType([r.func, r.object, r.bool])), r.func, r.object]),
172
- /**
173
- * Applies the theme typography styles.
174
- * @default 'body1'
175
- */
176
- variant: r.oneOfType([r.oneOf(["body1", "body2", "button", "caption", "h1", "h2", "h3", "h4", "h5", "h6", "inherit", "overline", "subtitle1", "subtitle2"]), r.string]),
177
- /**
178
- * The component maps the variant prop to a range of different HTML element types.
179
- * For instance, subtitle1 to `<h6>`.
180
- * If you wish to change that mapping, you can provide your own.
181
- * Alternatively, you can use the `component` prop.
182
- * @default {
183
- * h1: 'h1',
184
- * h2: 'h2',
185
- * h3: 'h3',
186
- * h4: 'h4',
187
- * h5: 'h5',
188
- * h6: 'h6',
189
- * subtitle1: 'h6',
190
- * subtitle2: 'h6',
191
- * body1: 'p',
192
- * body2: 'p',
193
- * inherit: 'p',
194
- * }
195
- */
196
- variantMapping: r.object
197
- });
198
- const F = b;
199
- export {
200
- F as T,
201
- D as e
202
- };
@@ -1 +0,0 @@
1
- "use strict";const e=require("./useThemeProps-jkB5q9ie.cjs"),v=require("react"),_=require("react/jsx-runtime");function O(o){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(o){for(const r in o)if(r!=="default"){const n=Object.getOwnPropertyDescriptor(o,r);Object.defineProperty(t,r,n.get?n:{enumerable:!0,get:()=>o[r]})}}return t.default=o,Object.freeze(t)}const j=O(v),B=["sx"],W=o=>{var t,r;const n={systemProps:{},otherProps:{}},s=(t=o==null||(r=o.theme)==null?void 0:r.unstable_sxConfig)!=null?t:e.defaultSxConfig;return Object.keys(o).forEach(a=>{s[a]?n.systemProps[a]=o[a]:n.otherProps[a]=o[a]}),n};function m(o){const{sx:t}=o,r=e._objectWithoutPropertiesLoose(o,B),{systemProps:n,otherProps:s}=W(r);let a;return Array.isArray(t)?a=[n,...t]:typeof t=="function"?a=(...p)=>{const i=t(...p);return e.isPlainObject(i)?e._extends({},n,i):n}:a=e._extends({},n,t),e._extends({},s,{sx:a})}function C(o){return e.generateUtilityClass("MuiTypography",o)}e.generateUtilityClasses("MuiTypography",["root","h1","h2","h3","h4","h5","h6","subtitle1","subtitle2","body1","body2","inherit","button","caption","overline","alignLeft","alignRight","alignCenter","alignJustify","noWrap","gutterBottom","paragraph"]);const M=["align","className","component","gutterBottom","noWrap","paragraph","variant","variantMapping"],$=o=>{const{align:t,gutterBottom:r,noWrap:n,paragraph:s,variant:a,classes:p}=o,i={root:["root",a,o.align!=="inherit"&&`align${e.capitalize(t)}`,r&&"gutterBottom",n&&"noWrap",s&&"paragraph"]};return e.composeClasses(i,C,p)},N=e.styled("span",{name:"MuiTypography",slot:"Root",overridesResolver:(o,t)=>{const{ownerState:r}=o;return[t.root,r.variant&&t[r.variant],r.align!=="inherit"&&t[`align${e.capitalize(r.align)}`],r.noWrap&&t.noWrap,r.gutterBottom&&t.gutterBottom,r.paragraph&&t.paragraph]}})(({theme:o,ownerState:t})=>e._extends({margin:0},t.variant==="inherit"&&{font:"inherit"},t.variant!=="inherit"&&o.typography[t.variant],t.align!=="inherit"&&{textAlign:t.align},t.noWrap&&{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},t.gutterBottom&&{marginBottom:"0.35em"},t.paragraph&&{marginBottom:16})),g={h1:"h1",h2:"h2",h3:"h3",h4:"h4",h5:"h5",h6:"h6",subtitle1:"h6",subtitle2:"h6",body1:"p",body2:"p",inherit:"p"},R={primary:"primary.main",textPrimary:"text.primary",secondary:"secondary.main",textSecondary:"text.secondary",error:"error.main"},q=o=>R[o]||o,f=j.forwardRef(function(t,r){const n=e.useThemeProps({props:t,name:"MuiTypography"}),s=q(n.color),a=m(e._extends({},n,{color:s})),{align:p="inherit",className:i,component:l,gutterBottom:d=!1,noWrap:T=!1,paragraph:h=!1,variant:c="body1",variantMapping:y=g}=a,P=e._objectWithoutPropertiesLoose(a,M),u=e._extends({},a,{align:p,color:s,className:i,component:l,gutterBottom:d,noWrap:T,paragraph:h,variant:c,variantMapping:y}),b=l||(h?"p":y[c]||g[c])||"span",x=$(u);return _.jsx(N,e._extends({as:b,ref:r,ownerState:u,className:e.clsx(x.root,i)},P))});process.env.NODE_ENV!=="production"&&(f.propTypes={align:e.PropTypes.oneOf(["center","inherit","justify","left","right"]),children:e.PropTypes.node,classes:e.PropTypes.object,className:e.PropTypes.string,component:e.PropTypes.elementType,gutterBottom:e.PropTypes.bool,noWrap:e.PropTypes.bool,paragraph:e.PropTypes.bool,sx:e.PropTypes.oneOfType([e.PropTypes.arrayOf(e.PropTypes.oneOfType([e.PropTypes.func,e.PropTypes.object,e.PropTypes.bool])),e.PropTypes.func,e.PropTypes.object]),variant:e.PropTypes.oneOfType([e.PropTypes.oneOf(["body1","body2","button","caption","h1","h2","h3","h4","h5","h6","inherit","overline","subtitle1","subtitle2"]),e.PropTypes.string]),variantMapping:e.PropTypes.object});const D=f;exports.Typography=D;exports.extendSxProp=m;
@@ -1,5 +0,0 @@
1
- "use strict";const x=require("react/jsx-runtime"),ee=require("../../createSvgIcon-BX8WQ5r-.cjs"),f=require("react"),p=require("../../useThemeProps-jkB5q9ie.cjs"),br=require("../../Box-7uR7JZiM.cjs"),me=require("../../Typography-DwsN2Ttm.cjs");var xe={},hr=ee.interopRequireDefaultExports;Object.defineProperty(xe,"__esModule",{value:!0});var Ze=xe.default=void 0,Dr=hr(ee.requireCreateSvgIcon()),wr=x;Ze=xe.default=(0,Dr.default)((0,wr.jsx)("path",{d:"M9 16h6v-6h4l-7-7-7 7h4zm-4 2h14v2H5z"}),"FileUpload");var Ae={},xr=ee.interopRequireDefaultExports;Object.defineProperty(Ae,"__esModule",{value:!0});var er=Ae.default=void 0,Ar=xr(ee.requireCreateSvgIcon()),Er=x;er=Ae.default=(0,Ar.default)((0,Er.jsx)("path",{d:"M14 2H6c-1.1 0-1.99.9-1.99 2L4 20c0 1.1.89 2 1.99 2H18c1.1 0 2-.9 2-2V8zm4 18H6V4h7v5h5zM8 15.01l1.41 1.41L11 14.84V19h2v-4.16l1.59 1.59L16 15.01 12.01 11z"}),"UploadFile");function C(e,r,t,n){function i(o){return o instanceof t?o:new t(function(c){c(o)})}return new(t||(t=Promise))(function(o,c){function l(m){try{s(n.next(m))}catch(b){c(b)}}function g(m){try{s(n.throw(m))}catch(b){c(b)}}function s(m){m.done?o(m.value):i(m.value).then(l,g)}s((n=n.apply(e,r||[])).next())})}function I(e,r){var t={label:0,sent:function(){if(o[0]&1)throw o[1];return o[1]},trys:[],ops:[]},n,i,o,c;return c={next:l(0),throw:l(1),return:l(2)},typeof Symbol=="function"&&(c[Symbol.iterator]=function(){return this}),c;function l(s){return function(m){return g([s,m])}}function g(s){if(n)throw new TypeError("Generator is already executing.");for(;c&&(c=0,s[0]&&(t=0)),t;)try{if(n=1,i&&(o=s[0]&2?i.return:s[0]?i.throw||((o=i.return)&&o.call(i),0):i.next)&&!(o=o.call(i,s[1])).done)return o;switch(i=0,o&&(s=[s[0]&2,o.value]),s[0]){case 0:case 1:o=s;break;case 4:return t.label++,{value:s[1],done:!1};case 5:t.label++,i=s[1],s=[0];continue;case 7:s=t.ops.pop(),t.trys.pop();continue;default:if(o=t.trys,!(o=o.length>0&&o[o.length-1])&&(s[0]===6||s[0]===2)){t=0;continue}if(s[0]===3&&(!o||s[1]>o[0]&&s[1]<o[3])){t.label=s[1];break}if(s[0]===6&&t.label<o[1]){t.label=o[1],o=s;break}if(o&&t.label<o[2]){t.label=o[2],t.ops.push(s);break}o[2]&&t.ops.pop(),t.trys.pop();continue}s=r.call(e,t)}catch(m){s=[6,m],i=0}finally{n=o=0}if(s[0]&5)throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}}function He(e,r){var t=typeof Symbol=="function"&&e[Symbol.iterator];if(!t)return e;var n=t.call(e),i,o=[],c;try{for(;(r===void 0||r-- >0)&&!(i=n.next()).done;)o.push(i.value)}catch(l){c={error:l}}finally{try{i&&!i.done&&(t=n.return)&&t.call(n)}finally{if(c)throw c.error}}return o}function qe(e,r,t){if(t||arguments.length===2)for(var n=0,i=r.length,o;n<i;n++)(o||!(n in r))&&(o||(o=Array.prototype.slice.call(r,0,n)),o[n]=r[n]);return e.concat(o||Array.prototype.slice.call(r))}var Or=new Map([["aac","audio/aac"],["abw","application/x-abiword"],["arc","application/x-freearc"],["avif","image/avif"],["avi","video/x-msvideo"],["azw","application/vnd.amazon.ebook"],["bin","application/octet-stream"],["bmp","image/bmp"],["bz","application/x-bzip"],["bz2","application/x-bzip2"],["cda","application/x-cdf"],["csh","application/x-csh"],["css","text/css"],["csv","text/csv"],["doc","application/msword"],["docx","application/vnd.openxmlformats-officedocument.wordprocessingml.document"],["eot","application/vnd.ms-fontobject"],["epub","application/epub+zip"],["gz","application/gzip"],["gif","image/gif"],["heic","image/heic"],["heif","image/heif"],["htm","text/html"],["html","text/html"],["ico","image/vnd.microsoft.icon"],["ics","text/calendar"],["jar","application/java-archive"],["jpeg","image/jpeg"],["jpg","image/jpeg"],["js","text/javascript"],["json","application/json"],["jsonld","application/ld+json"],["mid","audio/midi"],["midi","audio/midi"],["mjs","text/javascript"],["mp3","audio/mpeg"],["mp4","video/mp4"],["mpeg","video/mpeg"],["mpkg","application/vnd.apple.installer+xml"],["odp","application/vnd.oasis.opendocument.presentation"],["ods","application/vnd.oasis.opendocument.spreadsheet"],["odt","application/vnd.oasis.opendocument.text"],["oga","audio/ogg"],["ogv","video/ogg"],["ogx","application/ogg"],["opus","audio/opus"],["otf","font/otf"],["png","image/png"],["pdf","application/pdf"],["php","application/x-httpd-php"],["ppt","application/vnd.ms-powerpoint"],["pptx","application/vnd.openxmlformats-officedocument.presentationml.presentation"],["rar","application/vnd.rar"],["rtf","application/rtf"],["sh","application/x-sh"],["svg","image/svg+xml"],["swf","application/x-shockwave-flash"],["tar","application/x-tar"],["tif","image/tiff"],["tiff","image/tiff"],["ts","video/mp2t"],["ttf","font/ttf"],["txt","text/plain"],["vsd","application/vnd.visio"],["wav","audio/wav"],["weba","audio/webm"],["webm","video/webm"],["webp","image/webp"],["woff","font/woff"],["woff2","font/woff2"],["xhtml","application/xhtml+xml"],["xls","application/vnd.ms-excel"],["xlsx","application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"],["xml","application/xml"],["xul","application/vnd.mozilla.xul+xml"],["zip","application/zip"],["7z","application/x-7z-compressed"],["mkv","video/x-matroska"],["mov","video/quicktime"],["msg","application/vnd.ms-outlook"]]);function q(e,r){var t=Fr(e);if(typeof t.path!="string"){var n=e.webkitRelativePath;Object.defineProperty(t,"path",{value:typeof r=="string"?r:typeof n=="string"&&n.length>0?n:e.name,writable:!1,configurable:!1,enumerable:!0})}return t}function Fr(e){var r=e.name,t=r&&r.lastIndexOf(".")!==-1;if(t&&!e.type){var n=r.split(".").pop().toLowerCase(),i=Or.get(n);i&&Object.defineProperty(e,"type",{value:i,writable:!1,configurable:!1,enumerable:!0})}return e}var Pr=[".DS_Store","Thumbs.db"];function _r(e){return C(this,void 0,void 0,function(){return I(this,function(r){return Q(e)&&jr(e.dataTransfer)?[2,Ir(e.dataTransfer,e.type)]:Tr(e)?[2,Sr(e)]:Array.isArray(e)&&e.every(function(t){return"getFile"in t&&typeof t.getFile=="function"})?[2,Cr(e)]:[2,[]]})})}function jr(e){return Q(e)}function Tr(e){return Q(e)&&Q(e.target)}function Q(e){return typeof e=="object"&&e!==null}function Sr(e){return ve(e.target.files).map(function(r){return q(r)})}function Cr(e){return C(this,void 0,void 0,function(){var r;return I(this,function(t){switch(t.label){case 0:return[4,Promise.all(e.map(function(n){return n.getFile()}))];case 1:return r=t.sent(),[2,r.map(function(n){return q(n)})]}})})}function Ir(e,r){return C(this,void 0,void 0,function(){var t,n;return I(this,function(i){switch(i.label){case 0:return e.items?(t=ve(e.items).filter(function(o){return o.kind==="file"}),r!=="drop"?[2,t]:[4,Promise.all(t.map(Rr))]):[3,2];case 1:return n=i.sent(),[2,Be(rr(n))];case 2:return[2,Be(ve(e.files).map(function(o){return q(o)}))]}})})}function Be(e){return e.filter(function(r){return Pr.indexOf(r.name)===-1})}function ve(e){if(e===null)return[];for(var r=[],t=0;t<e.length;t++){var n=e[t];r.push(n)}return r}function Rr(e){if(typeof e.webkitGetAsEntry!="function")return We(e);var r=e.webkitGetAsEntry();return r&&r.isDirectory?tr(r):We(e)}function rr(e){return e.reduce(function(r,t){return qe(qe([],He(r),!1),He(Array.isArray(t)?rr(t):[t]),!1)},[])}function We(e){var r=e.getAsFile();if(!r)return Promise.reject("".concat(e," is not a File"));var t=q(r);return Promise.resolve(t)}function kr(e){return C(this,void 0,void 0,function(){return I(this,function(r){return[2,e.isDirectory?tr(e):zr(e)]})})}function tr(e){var r=e.createReader();return new Promise(function(t,n){var i=[];function o(){var c=this;r.readEntries(function(l){return C(c,void 0,void 0,function(){var g,s,m;return I(this,function(b){switch(b.label){case 0:if(l.length)return[3,5];b.label=1;case 1:return b.trys.push([1,3,,4]),[4,Promise.all(i)];case 2:return g=b.sent(),t(g),[3,4];case 3:return s=b.sent(),n(s),[3,4];case 4:return[3,6];case 5:m=Promise.all(l.map(kr)),i.push(m),o(),b.label=6;case 6:return[2]}})})},function(l){n(l)})}o()})}function zr(e){return C(this,void 0,void 0,function(){return I(this,function(r){return[2,new Promise(function(t,n){e.file(function(i){var o=q(i,e.fullPath);t(o)},function(i){n(i)})})]})})}var Mr=function(e,r){if(e&&r){var t=Array.isArray(r)?r:r.split(","),n=e.name||"",i=(e.type||"").toLowerCase(),o=i.replace(/\/.*$/,"");return t.some(function(c){var l=c.trim().toLowerCase();return l.charAt(0)==="."?n.toLowerCase().endsWith(l):l.endsWith("/*")?o===l.replace(/\/.*$/,""):i===l})}return!0};function Ue(e){return Kr(e)||$r(e)||or(e)||Lr()}function Lr(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
2
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function $r(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function Kr(e){if(Array.isArray(e))return be(e)}function Ne(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);r&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),t.push.apply(t,n)}return t}function Ge(e){for(var r=1;r<arguments.length;r++){var t=arguments[r]!=null?arguments[r]:{};r%2?Ne(Object(t),!0).forEach(function(n){nr(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):Ne(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}function nr(e,r,t){return r in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}function H(e,r){return Br(e)||qr(e,r)||or(e,r)||Hr()}function Hr(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
3
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function or(e,r){if(e){if(typeof e=="string")return be(e,r);var t=Object.prototype.toString.call(e).slice(8,-1);if(t==="Object"&&e.constructor&&(t=e.constructor.name),t==="Map"||t==="Set")return Array.from(e);if(t==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return be(e,r)}}function be(e,r){(r==null||r>e.length)&&(r=e.length);for(var t=0,n=new Array(r);t<r;t++)n[t]=e[t];return n}function qr(e,r){var t=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(t!=null){var n=[],i=!0,o=!1,c,l;try{for(t=t.call(e);!(i=(c=t.next()).done)&&(n.push(c.value),!(r&&n.length===r));i=!0);}catch(g){o=!0,l=g}finally{try{!i&&t.return!=null&&t.return()}finally{if(o)throw l}}return n}}function Br(e){if(Array.isArray(e))return e}var Wr="file-invalid-type",Ur="file-too-large",Nr="file-too-small",Gr="too-many-files",Yr=function(r){r=Array.isArray(r)&&r.length===1?r[0]:r;var t=Array.isArray(r)?"one of ".concat(r.join(", ")):r;return{code:Wr,message:"File type must be ".concat(t)}},Ye=function(r){return{code:Ur,message:"File is larger than ".concat(r," ").concat(r===1?"byte":"bytes")}},Ve=function(r){return{code:Nr,message:"File is smaller than ".concat(r," ").concat(r===1?"byte":"bytes")}},Vr={code:Gr,message:"Too many files"};function ir(e,r){var t=e.type==="application/x-moz-file"||Mr(e,r);return[t,t?null:Yr(r)]}function ar(e,r,t){if(P(e.size))if(P(r)&&P(t)){if(e.size>t)return[!1,Ye(t)];if(e.size<r)return[!1,Ve(r)]}else{if(P(r)&&e.size<r)return[!1,Ve(r)];if(P(t)&&e.size>t)return[!1,Ye(t)]}return[!0,null]}function P(e){return e!=null}function Jr(e){var r=e.files,t=e.accept,n=e.minSize,i=e.maxSize,o=e.multiple,c=e.maxFiles,l=e.validator;return!o&&r.length>1||o&&c>=1&&r.length>c?!1:r.every(function(g){var s=ir(g,t),m=H(s,1),b=m[0],R=ar(g,n,i),k=H(R,1),z=k[0],M=l?l(g):null;return b&&z&&!M})}function X(e){return typeof e.isPropagationStopped=="function"?e.isPropagationStopped():typeof e.cancelBubble<"u"?e.cancelBubble:!1}function J(e){return e.dataTransfer?Array.prototype.some.call(e.dataTransfer.types,function(r){return r==="Files"||r==="application/x-moz-file"}):!!e.target&&!!e.target.files}function Je(e){e.preventDefault()}function Qr(e){return e.indexOf("MSIE")!==-1||e.indexOf("Trident/")!==-1}function Xr(e){return e.indexOf("Edge/")!==-1}function Zr(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:window.navigator.userAgent;return Qr(e)||Xr(e)}function E(){for(var e=arguments.length,r=new Array(e),t=0;t<e;t++)r[t]=arguments[t];return function(n){for(var i=arguments.length,o=new Array(i>1?i-1:0),c=1;c<i;c++)o[c-1]=arguments[c];return r.some(function(l){return!X(n)&&l&&l.apply(void 0,[n].concat(o)),X(n)})}}function et(){return"showOpenFilePicker"in window}function rt(e){if(P(e)){var r=Object.entries(e).filter(function(t){var n=H(t,2),i=n[0],o=n[1],c=!0;return ur(i)||(console.warn('Skipped "'.concat(i,'" because it is not a valid MIME type. Check https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/MIME_types/Common_types for a list of valid MIME types.')),c=!1),(!Array.isArray(o)||!o.every(cr))&&(console.warn('Skipped "'.concat(i,'" because an invalid file extension was provided.')),c=!1),c}).reduce(function(t,n){var i=H(n,2),o=i[0],c=i[1];return Ge(Ge({},t),{},nr({},o,c))},{});return[{description:"Files",accept:r}]}return e}function tt(e){if(P(e))return Object.entries(e).reduce(function(r,t){var n=H(t,2),i=n[0],o=n[1];return[].concat(Ue(r),[i],Ue(o))},[]).filter(function(r){return ur(r)||cr(r)}).join(",")}function nt(e){return e instanceof DOMException&&(e.name==="AbortError"||e.code===e.ABORT_ERR)}function ot(e){return e instanceof DOMException&&(e.name==="SecurityError"||e.code===e.SECURITY_ERR)}function ur(e){return e==="audio/*"||e==="video/*"||e==="image/*"||e==="text/*"||/\w+\/[-+.\w]+/g.test(e)}function cr(e){return/^.*\.[\w]+$/.test(e)}var it=["children"],at=["open"],ut=["refKey","role","onKeyDown","onFocus","onBlur","onClick","onDragEnter","onDragOver","onDragLeave","onDrop"],ct=["refKey","onChange","onClick"];function st(e){return pt(e)||ft(e)||sr(e)||lt()}function lt(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
4
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function ft(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function pt(e){if(Array.isArray(e))return he(e)}function ye(e,r){return mt(e)||gt(e,r)||sr(e,r)||dt()}function dt(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
5
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function sr(e,r){if(e){if(typeof e=="string")return he(e,r);var t=Object.prototype.toString.call(e).slice(8,-1);if(t==="Object"&&e.constructor&&(t=e.constructor.name),t==="Map"||t==="Set")return Array.from(e);if(t==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return he(e,r)}}function he(e,r){(r==null||r>e.length)&&(r=e.length);for(var t=0,n=new Array(r);t<r;t++)n[t]=e[t];return n}function gt(e,r){var t=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(t!=null){var n=[],i=!0,o=!1,c,l;try{for(t=t.call(e);!(i=(c=t.next()).done)&&(n.push(c.value),!(r&&n.length===r));i=!0);}catch(g){o=!0,l=g}finally{try{!i&&t.return!=null&&t.return()}finally{if(o)throw l}}return n}}function mt(e){if(Array.isArray(e))return e}function Qe(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);r&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),t.push.apply(t,n)}return t}function d(e){for(var r=1;r<arguments.length;r++){var t=arguments[r]!=null?arguments[r]:{};r%2?Qe(Object(t),!0).forEach(function(n){De(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):Qe(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}function De(e,r,t){return r in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}function Z(e,r){if(e==null)return{};var t=yt(e,r),n,i;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(i=0;i<o.length;i++)n=o[i],!(r.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(t[n]=e[n])}return t}function yt(e,r){if(e==null)return{};var t={},n=Object.keys(e),i,o;for(o=0;o<n.length;o++)i=n[o],!(r.indexOf(i)>=0)&&(t[i]=e[i]);return t}var Ee=f.forwardRef(function(e,r){var t=e.children,n=Z(e,it),i=fr(n),o=i.open,c=Z(i,at);return f.useImperativeHandle(r,function(){return{open:o}},[o]),f.createElement(f.Fragment,null,t(d(d({},c),{},{open:o})))});Ee.displayName="Dropzone";var lr={disabled:!1,getFilesFromEvent:_r,maxSize:1/0,minSize:0,multiple:!0,maxFiles:0,preventDropOnDocument:!0,noClick:!1,noKeyboard:!1,noDrag:!1,noDragEventsBubbling:!1,validator:null,useFsAccessApi:!0,autoFocus:!1};Ee.defaultProps=lr;Ee.propTypes={children:p.PropTypes.func,accept:p.PropTypes.objectOf(p.PropTypes.arrayOf(p.PropTypes.string)),multiple:p.PropTypes.bool,preventDropOnDocument:p.PropTypes.bool,noClick:p.PropTypes.bool,noKeyboard:p.PropTypes.bool,noDrag:p.PropTypes.bool,noDragEventsBubbling:p.PropTypes.bool,minSize:p.PropTypes.number,maxSize:p.PropTypes.number,maxFiles:p.PropTypes.number,disabled:p.PropTypes.bool,getFilesFromEvent:p.PropTypes.func,onFileDialogCancel:p.PropTypes.func,onFileDialogOpen:p.PropTypes.func,useFsAccessApi:p.PropTypes.bool,autoFocus:p.PropTypes.bool,onDragEnter:p.PropTypes.func,onDragLeave:p.PropTypes.func,onDragOver:p.PropTypes.func,onDrop:p.PropTypes.func,onDropAccepted:p.PropTypes.func,onDropRejected:p.PropTypes.func,onError:p.PropTypes.func,validator:p.PropTypes.func};var we={isFocused:!1,isFileDialogActive:!1,isDragActive:!1,isDragAccept:!1,isDragReject:!1,acceptedFiles:[],fileRejections:[]};function fr(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},r=d(d({},lr),e),t=r.accept,n=r.disabled,i=r.getFilesFromEvent,o=r.maxSize,c=r.minSize,l=r.multiple,g=r.maxFiles,s=r.onDragEnter,m=r.onDragLeave,b=r.onDragOver,R=r.onDrop,k=r.onDropAccepted,z=r.onDropRejected,M=r.onFileDialogCancel,re=r.onFileDialogOpen,Oe=r.useFsAccessApi,Fe=r.autoFocus,te=r.preventDropOnDocument,Pe=r.noClick,ne=r.noKeyboard,_e=r.noDrag,O=r.noDragEventsBubbling,oe=r.onError,L=r.validator,$=f.useMemo(function(){return tt(t)},[t]),je=f.useMemo(function(){return rt(t)},[t]),ie=f.useMemo(function(){return typeof re=="function"?re:Xe},[re]),B=f.useMemo(function(){return typeof M=="function"?M:Xe},[M]),h=f.useRef(null),A=f.useRef(null),pr=f.useReducer(vt,we),Te=ye(pr,2),ae=Te[0],D=Te[1],dr=ae.isFocused,Se=ae.isFileDialogActive,W=f.useRef(typeof window<"u"&&window.isSecureContext&&Oe&&et()),Ce=function(){!W.current&&Se&&setTimeout(function(){if(A.current){var u=A.current.files;u.length||(D({type:"closeDialog"}),B())}},300)};f.useEffect(function(){return window.addEventListener("focus",Ce,!1),function(){window.removeEventListener("focus",Ce,!1)}},[A,Se,B,W]);var _=f.useRef([]),Ie=function(u){h.current&&h.current.contains(u.target)||(u.preventDefault(),_.current=[])};f.useEffect(function(){return te&&(document.addEventListener("dragover",Je,!1),document.addEventListener("drop",Ie,!1)),function(){te&&(document.removeEventListener("dragover",Je),document.removeEventListener("drop",Ie))}},[h,te]),f.useEffect(function(){return!n&&Fe&&h.current&&h.current.focus(),function(){}},[h,Fe,n]);var F=f.useCallback(function(a){oe?oe(a):console.error(a)},[oe]),Re=f.useCallback(function(a){a.preventDefault(),a.persist(),Y(a),_.current=[].concat(st(_.current),[a.target]),J(a)&&Promise.resolve(i(a)).then(function(u){if(!(X(a)&&!O)){var y=u.length,v=y>0&&Jr({files:u,accept:$,minSize:c,maxSize:o,multiple:l,maxFiles:g,validator:L}),w=y>0&&!v;D({isDragAccept:v,isDragReject:w,isDragActive:!0,type:"setDraggedFiles"}),s&&s(a)}}).catch(function(u){return F(u)})},[i,s,F,O,$,c,o,l,g,L]),ke=f.useCallback(function(a){a.preventDefault(),a.persist(),Y(a);var u=J(a);if(u&&a.dataTransfer)try{a.dataTransfer.dropEffect="copy"}catch{}return u&&b&&b(a),!1},[b,O]),ze=f.useCallback(function(a){a.preventDefault(),a.persist(),Y(a);var u=_.current.filter(function(v){return h.current&&h.current.contains(v)}),y=u.indexOf(a.target);y!==-1&&u.splice(y,1),_.current=u,!(u.length>0)&&(D({type:"setDraggedFiles",isDragActive:!1,isDragAccept:!1,isDragReject:!1}),J(a)&&m&&m(a))},[h,m,O]),U=f.useCallback(function(a,u){var y=[],v=[];a.forEach(function(w){var K=ir(w,$),S=ye(K,2),ce=S[0],se=S[1],le=ar(w,c,o),V=ye(le,2),fe=V[0],pe=V[1],de=L?L(w):null;if(ce&&fe&&!de)y.push(w);else{var ge=[se,pe];de&&(ge=ge.concat(de)),v.push({file:w,errors:ge.filter(function(vr){return vr})})}}),(!l&&y.length>1||l&&g>=1&&y.length>g)&&(y.forEach(function(w){v.push({file:w,errors:[Vr]})}),y.splice(0)),D({acceptedFiles:y,fileRejections:v,type:"setFiles"}),R&&R(y,v,u),v.length>0&&z&&z(v,u),y.length>0&&k&&k(y,u)},[D,l,$,c,o,g,R,k,z,L]),N=f.useCallback(function(a){a.preventDefault(),a.persist(),Y(a),_.current=[],J(a)&&Promise.resolve(i(a)).then(function(u){X(a)&&!O||U(u,a)}).catch(function(u){return F(u)}),D({type:"reset"})},[i,U,F,O]),j=f.useCallback(function(){if(W.current){D({type:"openDialog"}),ie();var a={multiple:l,types:je};window.showOpenFilePicker(a).then(function(u){return i(u)}).then(function(u){U(u,null),D({type:"closeDialog"})}).catch(function(u){nt(u)?(B(u),D({type:"closeDialog"})):ot(u)?(W.current=!1,A.current?(A.current.value=null,A.current.click()):F(new Error("Cannot open the file picker because the https://developer.mozilla.org/en-US/docs/Web/API/File_System_Access_API is not supported and no <input> was provided."))):F(u)});return}A.current&&(D({type:"openDialog"}),ie(),A.current.value=null,A.current.click())},[D,ie,B,Oe,U,F,je,l]),Me=f.useCallback(function(a){!h.current||!h.current.isEqualNode(a.target)||(a.key===" "||a.key==="Enter"||a.keyCode===32||a.keyCode===13)&&(a.preventDefault(),j())},[h,j]),Le=f.useCallback(function(){D({type:"focus"})},[]),$e=f.useCallback(function(){D({type:"blur"})},[]),Ke=f.useCallback(function(){Pe||(Zr()?setTimeout(j,0):j())},[Pe,j]),T=function(u){return n?null:u},ue=function(u){return ne?null:T(u)},G=function(u){return _e?null:T(u)},Y=function(u){O&&u.stopPropagation()},gr=f.useMemo(function(){return function(){var a=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},u=a.refKey,y=u===void 0?"ref":u,v=a.role,w=a.onKeyDown,K=a.onFocus,S=a.onBlur,ce=a.onClick,se=a.onDragEnter,le=a.onDragOver,V=a.onDragLeave,fe=a.onDrop,pe=Z(a,ut);return d(d(De({onKeyDown:ue(E(w,Me)),onFocus:ue(E(K,Le)),onBlur:ue(E(S,$e)),onClick:T(E(ce,Ke)),onDragEnter:G(E(se,Re)),onDragOver:G(E(le,ke)),onDragLeave:G(E(V,ze)),onDrop:G(E(fe,N)),role:typeof v=="string"&&v!==""?v:"presentation"},y,h),!n&&!ne?{tabIndex:0}:{}),pe)}},[h,Me,Le,$e,Ke,Re,ke,ze,N,ne,_e,n]),mr=f.useCallback(function(a){a.stopPropagation()},[]),yr=f.useMemo(function(){return function(){var a=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},u=a.refKey,y=u===void 0?"ref":u,v=a.onChange,w=a.onClick,K=Z(a,ct),S=De({accept:$,multiple:l,type:"file",style:{display:"none"},onChange:T(E(v,N)),onClick:T(E(w,mr)),tabIndex:-1},y,A);return d(d({},S),K)}},[A,t,l,N,n]);return d(d({},ae),{},{isFocused:dr&&!n,getRootProps:gr,getInputProps:yr,rootRef:h,inputRef:A,open:T(j)})}function vt(e,r){switch(r.type){case"focus":return d(d({},e),{},{isFocused:!0});case"blur":return d(d({},e),{},{isFocused:!1});case"openDialog":return d(d({},we),{},{isFileDialogActive:!0});case"closeDialog":return d(d({},e),{},{isFileDialogActive:!1});case"setDraggedFiles":return d(d({},e),{},{isDragActive:r.isDragActive,isDragAccept:r.isDragAccept,isDragReject:r.isDragReject});case"setFiles":return d(d({},e),{},{acceptedFiles:r.acceptedFiles,fileRejections:r.fileRejections});case"reset":return d({},we);default:return e}}function Xe(){}const bt=p.styled(br.Box)(({theme:e})=>({display:"flex",flexDirection:"column",justifyContent:"center",alignItems:"center",gap:"0.5rem",padding:"0.5rem",width:"20rem",height:"10rem",border:"1px dashed",borderColor:e.palette.grey[500],borderRadius:4,cursor:"pointer"})),ht=e=>{const{getRootProps:r,getInputProps:t,isDragActive:n}=fr({onDrop:e.onDrop}),{information:i}=e;return x.jsxs(bt,{...r(),children:[x.jsx("input",{...t()}),n?x.jsxs(x.Fragment,{children:[x.jsx(Ze,{color:"primary"}),x.jsx(me.Typography,{children:"Déposer les fichiers ici"})]}):x.jsxs(x.Fragment,{children:[x.jsx(er,{color:"primary"}),x.jsx(me.Typography,{children:"Glisser et déposer des fichiers ici, ou cliquer pour sélectionner des fichiers"}),i?x.jsx(me.Typography,{fontSize:"0.875rem",color:"grey",children:i}):null]})]})};module.exports=ht;
@@ -1,9 +0,0 @@
1
- import React from "react";
2
- import { type DropzoneProps as ReactDropzoneProps, type FileWithPath } from "react-dropzone";
3
- export interface File extends FileWithPath {
4
- }
5
- export interface DropzoneProps extends ReactDropzoneProps {
6
- information?: string;
7
- }
8
- declare const Dropzone: React.FunctionComponent<DropzoneProps>;
9
- export default Dropzone;