@cgi-learning-hub/ui 0.0.1-dev.1713359037 → 0.0.1-dev.1715078279
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.
- package/dist/Box-DL1-mhd_.cjs +1 -0
- package/dist/{Box-CcD_sRqe.js → Box-Mup7NS_A.js} +24 -26
- package/dist/{ButtonBase-BBqNg9BC.js → ButtonBase-CjZVRZ1j.js} +102 -107
- package/dist/ButtonBase-h89TFQ74.cjs +75 -0
- package/dist/{CircularProgress-G9G_loET.js → CircularProgress-B5dLec9p.js} +4 -4
- package/dist/{CircularProgress-DVnd6kxt.cjs → CircularProgress-DvSP1TlK.cjs} +1 -1
- package/dist/{DefaultButton-DDeufcNs.js → DefaultButton-Bm_9J15r.js} +94 -95
- package/dist/DefaultButton-DpAQ3D3A.cjs +1 -0
- package/dist/{IconButton-B6XIqj_T.js → IconButton-BTwUbULL.js} +28 -29
- package/dist/IconButton-DwyJkFK6.cjs +2 -0
- package/dist/{InputBase-CdKFPwS3.js → InputBase-DQZzB50R.js} +280 -320
- package/dist/InputBase-pgeQJ7f1.cjs +3 -0
- package/dist/{LocalizationProvider-CNYbKILJ.cjs → LocalizationProvider-DESNnS1V.cjs} +1 -1
- package/dist/{LocalizationProvider-0zrjdh3x.js → LocalizationProvider-DFtKYTy5.js} +2 -2
- package/dist/SearchInput-CwKQj1FS.cjs +1 -0
- package/dist/{SearchInput-Q5BP0X0K.js → SearchInput-DFha51RP.js} +25 -25
- package/dist/Tabs-BnINEF7f.cjs +4 -0
- package/dist/{Tabs-CDBEadDu.js → Tabs-LRPQPGjl.js} +264 -265
- package/dist/TextInput-C6fc3CHh.cjs +12 -0
- package/dist/{TextInput-BNe_BIm9.js → TextInput-UE9eu-Sh.js} +1388 -1397
- package/dist/{TimePicker-CLYqSUwA.js → TimePicker-DgWZLyZU.js} +4848 -4664
- package/dist/TimePicker-DqFt1DP_.cjs +73 -0
- package/dist/Typography-BAJIrofJ.cjs +1 -0
- package/dist/{Typography-CkEznQ8f.js → Typography-BWCcreVc.js} +74 -100
- package/dist/assets/index.css +1 -1
- package/dist/components/Dropzone/Dropzone.cjs.js +5 -5
- package/dist/components/Dropzone/Dropzone.d.ts +3 -2
- package/dist/components/Dropzone/Dropzone.es.js +9 -9
- package/dist/components/Dropzone/Dropzone.stories.d.ts +2 -1
- package/dist/components/Dropzone/index.d.ts +2 -2
- package/dist/components/LoaderBackdrop/LoaderBackdrop.cjs.js +1 -1
- package/dist/components/LoaderBackdrop/LoaderBackdrop.d.ts +2 -1
- package/dist/components/LoaderBackdrop/LoaderBackdrop.es.js +1 -0
- package/dist/components/LoaderBackdrop/LoaderBackdrop.stories.d.ts +2 -1
- package/dist/components/LoaderBackdrop/index.d.ts +2 -2
- package/dist/components/LocalizationProvider/LocalizationProvider.cjs.js +1 -1
- package/dist/components/LocalizationProvider/LocalizationProvider.d.ts +2 -1
- package/dist/components/LocalizationProvider/LocalizationProvider.es.js +2 -2
- package/dist/components/LocalizationProvider/index.cjs.js +1 -1
- package/dist/components/LocalizationProvider/index.d.ts +2 -2
- package/dist/components/LocalizationProvider/index.es.js +1 -1
- package/dist/components/buttons/DefaultButton/DefaultButton.cjs.js +1 -1
- package/dist/components/buttons/DefaultButton/DefaultButton.d.ts +3 -2
- package/dist/components/buttons/DefaultButton/DefaultButton.es.js +2 -2
- package/dist/components/buttons/DefaultButton/DefaultButtonIcon.cjs.js +1 -1
- package/dist/components/buttons/DefaultButton/DefaultButtonIcon.d.ts +2 -1
- package/dist/components/buttons/DefaultButton/DefaultButtonIcon.es.js +8 -8
- package/dist/components/buttons/DefaultButton/index.cjs.js +1 -1
- package/dist/components/buttons/DefaultButton/index.d.ts +2 -2
- package/dist/components/buttons/DefaultButton/index.es.js +1 -1
- package/dist/components/buttons/IconButton.stories.cjs.js +1 -1
- package/dist/components/buttons/IconButton.stories.d.ts +2 -1
- package/dist/components/buttons/IconButton.stories.es.js +10 -9
- package/dist/components/buttons/PrimaryButton/PrimaryButton.cjs.js +1 -1
- package/dist/components/buttons/PrimaryButton/PrimaryButton.d.ts +2 -2
- package/dist/components/buttons/PrimaryButton/PrimaryButton.es.js +1 -1
- package/dist/components/buttons/PrimaryButton/PrimaryButton.stories.cjs.js +1 -1
- package/dist/components/buttons/PrimaryButton/PrimaryButton.stories.d.ts +2 -1
- package/dist/components/buttons/PrimaryButton/PrimaryButton.stories.es.js +1 -1
- package/dist/components/buttons/PrimaryButton/index.d.ts +2 -2
- package/dist/components/buttons/SecondaryButton/SecondaryButton.cjs.js +1 -1
- package/dist/components/buttons/SecondaryButton/SecondaryButton.d.ts +2 -2
- package/dist/components/buttons/SecondaryButton/SecondaryButton.es.js +1 -1
- package/dist/components/buttons/SecondaryButton/SecondaryButton.stories.cjs.js +1 -1
- package/dist/components/buttons/SecondaryButton/SecondaryButton.stories.d.ts +2 -1
- package/dist/components/buttons/SecondaryButton/SecondaryButton.stories.es.js +1 -1
- package/dist/components/buttons/SecondaryButton/index.d.ts +2 -2
- package/dist/components/buttons/index.cjs.js +1 -1
- package/dist/components/buttons/index.d.ts +3 -3
- package/dist/components/buttons/index.es.js +1 -1
- package/dist/components/feedback/Alert/Alert.d.ts +2 -1
- package/dist/components/feedback/Alert/Alert.stories.d.ts +2 -1
- package/dist/components/feedback/Alert/index.d.ts +2 -2
- package/dist/components/index.cjs.js +1 -1
- package/dist/components/index.d.ts +110 -110
- package/dist/components/index.es.js +11 -11
- package/dist/components/inputs/PasswordInput/PasswordInput.cjs.js +1 -1
- package/dist/components/inputs/PasswordInput/PasswordInput.d.ts +2 -1
- package/dist/components/inputs/PasswordInput/PasswordInput.es.js +7 -6
- package/dist/components/inputs/PasswordInput/PasswordInput.stories.d.ts +2 -1
- package/dist/components/inputs/PasswordInput/index.d.ts +1 -1
- package/dist/components/inputs/SearchInput/SearchInput.cjs.js +1 -1
- package/dist/components/inputs/SearchInput/SearchInput.d.ts +2 -2
- package/dist/components/inputs/SearchInput/SearchInput.es.js +3 -3
- package/dist/components/inputs/SearchInput/SearchInput.stories.cjs.js +1 -1
- package/dist/components/inputs/SearchInput/SearchInput.stories.d.ts +2 -1
- package/dist/components/inputs/SearchInput/SearchInput.stories.es.js +1 -1
- package/dist/components/inputs/SearchInput/index.cjs.js +1 -1
- package/dist/components/inputs/SearchInput/index.d.ts +2 -2
- package/dist/components/inputs/SearchInput/index.es.js +1 -1
- package/dist/components/inputs/TextInput/TextInput.cjs.js +1 -1
- package/dist/components/inputs/TextInput/TextInput.d.ts +2 -2
- package/dist/components/inputs/TextInput/TextInput.es.js +1 -1
- package/dist/components/inputs/TextInput/TextInput.stories.cjs.js +1 -1
- package/dist/components/inputs/TextInput/TextInput.stories.d.ts +2 -1
- package/dist/components/inputs/TextInput/TextInput.stories.es.js +1 -1
- package/dist/components/inputs/TextInput/index.cjs.js +1 -1
- package/dist/components/inputs/TextInput/index.d.ts +2 -2
- package/dist/components/inputs/TextInput/index.es.js +1 -1
- package/dist/components/inputs/index.cjs.js +1 -1
- package/dist/components/inputs/index.d.ts +3 -3
- package/dist/components/inputs/index.es.js +2 -2
- package/dist/components/lists/FileList/FileList.cjs.js +1 -1
- package/dist/components/lists/FileList/FileList.d.ts +2 -1
- package/dist/components/lists/FileList/FileList.es.js +1 -1
- package/dist/components/lists/FileList/FileList.stories.d.ts +2 -1
- package/dist/components/lists/FileList/FileListItem.cjs.js +1 -1
- package/dist/components/lists/FileList/FileListItem.d.ts +2 -1
- package/dist/components/lists/FileList/FileListItem.es.js +11 -10
- package/dist/components/lists/FileList/index.d.ts +4 -4
- package/dist/components/lists/TabList.stories.cjs.js +1 -1
- package/dist/components/lists/TabList.stories.d.ts +2 -1
- package/dist/components/lists/TabList.stories.es.js +48 -49
- package/dist/components/lists/index.d.ts +1 -1
- package/dist/createSvgIcon-Bmh1dZN3.cjs +2 -0
- package/dist/createSvgIcon-BuZnNhW1.js +74 -0
- package/dist/{createSvgIcon-10LjrjuM.cjs → createSvgIcon-Ch5OwvT5.cjs} +1 -1
- package/dist/{createSvgIcon-DfXrmzRs.js → createSvgIcon-CwlWc9q-.js} +3 -3
- package/dist/{fr-HqFYdKZp.js → fr-1JMu1aWG.js} +1 -1
- package/dist/{fr-BNYi5x0Z.cjs → fr-BTDmq9ek.cjs} +1 -1
- package/dist/index.cjs.js +1 -1
- package/dist/index.d.ts +2 -1
- package/dist/index.es.js +184 -184
- package/dist/{refType-BklAUjsY.js → refType-BatLLQAf.js} +7 -7
- package/dist/{refType-B-3PavG_.cjs → refType-BbhHflrD.cjs} +1 -1
- package/dist/styled-BBsrnZJ1.js +1218 -0
- package/dist/styled-CJ2HJ-9N.cjs +26 -0
- package/dist/useSlotProps-Ds0ykcZp.js +87 -0
- package/dist/useSlotProps-DykCCTRs.cjs +1 -0
- package/dist/{useThemeProps-DDcolYEZ.js → useThemeProps-C59ZmJTM.js} +1034 -926
- package/dist/useThemeProps-C5iFxIYI.cjs +42 -0
- package/package.json +16 -16
- package/dist/Box-C0uoTW0F.cjs +0 -1
- package/dist/ButtonBase-C_YtHw1h.cjs +0 -75
- package/dist/DefaultButton-DlTnxizc.cjs +0 -1
- package/dist/IconButton-Cz-zGz0v.cjs +0 -2
- package/dist/InputBase-DCjJT6Ht.cjs +0 -4
- package/dist/SearchInput-sybrE3fq.cjs +0 -1
- package/dist/Tabs-DX6Gm63O.cjs +0 -4
- package/dist/TextInput-Bla-t0jF.cjs +0 -12
- package/dist/TimePicker-EGYtgZTn.cjs +0 -71
- package/dist/Typography-B7jZzwxf.cjs +0 -1
- package/dist/createSvgIcon-Cy5_B3av.cjs +0 -2
- package/dist/createSvgIcon-MpAknZJY.js +0 -84
- package/dist/styled-CCfndrS2.js +0 -424
- package/dist/styled-jkrYOquU.cjs +0 -24
- package/dist/useSlotProps-Br7yUp1t.js +0 -78
- package/dist/useSlotProps-I3uiiCEn.cjs +0 -1
- package/dist/useThemeProps-BYFHMDRd.cjs +0 -42
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";const t=require("./useThemeProps-C5iFxIYI.cjs"),O=require("react"),p=require("./styled-CJ2HJ-9N.cjs"),C=require("react/jsx-runtime");function j(o){const e=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(o){for(const r in o)if(r!=="default"){const a=Object.getOwnPropertyDescriptor(o,r);Object.defineProperty(e,r,a.get?a:{enumerable:!0,get:()=>o[r]})}}return e.default=o,Object.freeze(e)}const B=j(O);function T(o){return t.generateUtilityClass("MuiTypography",o)}const W=p.generateUtilityClasses("MuiTypography",["root","h1","h2","h3","h4","h5","h6","subtitle1","subtitle2","body1","body2","inherit","button","caption","overline","alignLeft","alignRight","alignCenter","alignJustify","noWrap","gutterBottom","paragraph"]),_=W,M=["align","className","component","gutterBottom","noWrap","paragraph","variant","variantMapping"],N=o=>{const{align:e,gutterBottom:r,noWrap:a,paragraph:s,variant:n,classes:c}=o,i={root:["root",n,o.align!=="inherit"&&`align${t.capitalize(e)}`,r&&"gutterBottom",a&&"noWrap",s&&"paragraph"]};return p.composeClasses(i,T,c)},R=p.styled("span",{name:"MuiTypography",slot:"Root",overridesResolver:(o,e)=>{const{ownerState:r}=o;return[e.root,r.variant&&e[r.variant],r.align!=="inherit"&&e[`align${t.capitalize(r.align)}`],r.noWrap&&e.noWrap,r.gutterBottom&&e.gutterBottom,r.paragraph&&e.paragraph]}})(({theme:o,ownerState:e})=>t._extends({margin:0},e.variant==="inherit"&&{font:"inherit"},e.variant!=="inherit"&&o.typography[e.variant],e.align!=="inherit"&&{textAlign:e.align},e.noWrap&&{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},e.gutterBottom&&{marginBottom:"0.35em"},e.paragraph&&{marginBottom:16})),m={h1:"h1",h2:"h2",h3:"h3",h4:"h4",h5:"h5",h6:"h6",subtitle1:"h6",subtitle2:"h6",body1:"p",body2:"p",inherit:"p"},$={primary:"primary.main",textPrimary:"text.primary",secondary:"secondary.main",textSecondary:"text.secondary",error:"error.main"},q=o=>$[o]||o,d=B.forwardRef(function(e,r){const a=t.useThemeProps({props:e,name:"MuiTypography"}),s=q(a.color),n=p.extendSxProp(t._extends({},a,{color:s})),{align:c="inherit",className:i,component:l,gutterBottom:f=!1,noWrap:b=!1,paragraph:h=!1,variant:y="body1",variantMapping:g=m}=n,P=t._objectWithoutPropertiesLoose(n,M),u=t._extends({},n,{align:c,color:s,className:i,component:l,gutterBottom:f,noWrap:b,paragraph:h,variant:y,variantMapping:g}),v=l||(h?"p":g[y]||m[y])||"span",x=N(u);return C.jsx(R,t._extends({as:v,ref:r,ownerState:u,className:p.clsx(x.root,i)},P))});process.env.NODE_ENV!=="production"&&(d.propTypes={align:t.PropTypes.oneOf(["center","inherit","justify","left","right"]),children:t.PropTypes.node,classes:t.PropTypes.object,className:t.PropTypes.string,component:t.PropTypes.elementType,gutterBottom:t.PropTypes.bool,noWrap:t.PropTypes.bool,paragraph:t.PropTypes.bool,sx:t.PropTypes.oneOfType([t.PropTypes.arrayOf(t.PropTypes.oneOfType([t.PropTypes.func,t.PropTypes.object,t.PropTypes.bool])),t.PropTypes.func,t.PropTypes.object]),variant:t.PropTypes.oneOfType([t.PropTypes.oneOf(["body1","body2","button","caption","h1","h2","h3","h4","h5","h6","inherit","overline","subtitle1","subtitle2"]),t.PropTypes.string]),variantMapping:t.PropTypes.object});const U=d;exports.Typography=U;exports.getTypographyUtilityClass=T;exports.typographyClasses=_;
|
|
@@ -1,75 +1,50 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import * as
|
|
3
|
-
import { g as
|
|
1
|
+
import { g as C, c as f, _ as p, u as W, b as M, P as t } from "./useThemeProps-C59ZmJTM.js";
|
|
2
|
+
import * as O from "react";
|
|
3
|
+
import { g as j, s as P, e as N, c as R, a as _ } from "./styled-BBsrnZJ1.js";
|
|
4
4
|
import { jsx as U } from "react/jsx-runtime";
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
const n = {
|
|
8
|
-
systemProps: {},
|
|
9
|
-
otherProps: {}
|
|
10
|
-
}, s = (t = o == null || (a = o.theme) == null ? void 0 : a.unstable_sxConfig) != null ? t : B;
|
|
11
|
-
return Object.keys(o).forEach((e) => {
|
|
12
|
-
s[e] ? n.systemProps[e] = o[e] : n.otherProps[e] = o[e];
|
|
13
|
-
}), n;
|
|
14
|
-
};
|
|
15
|
-
function D(o) {
|
|
16
|
-
const {
|
|
17
|
-
sx: t
|
|
18
|
-
} = o, a = f(o, A), {
|
|
19
|
-
systemProps: n,
|
|
20
|
-
otherProps: s
|
|
21
|
-
} = E(a);
|
|
22
|
-
let e;
|
|
23
|
-
return Array.isArray(t) ? e = [n, ...t] : typeof t == "function" ? e = (...l) => {
|
|
24
|
-
const i = t(...l);
|
|
25
|
-
return O(i) ? p({}, n, i) : n;
|
|
26
|
-
} : e = p({}, n, t), p({}, s, {
|
|
27
|
-
sx: e
|
|
28
|
-
});
|
|
29
|
-
}
|
|
30
|
-
function L(o) {
|
|
31
|
-
return W("MuiTypography", o);
|
|
5
|
+
function $(a) {
|
|
6
|
+
return C("MuiTypography", a);
|
|
32
7
|
}
|
|
33
|
-
const
|
|
8
|
+
const D = j("MuiTypography", ["root", "h1", "h2", "h3", "h4", "h5", "h6", "subtitle1", "subtitle2", "body1", "body2", "inherit", "button", "caption", "overline", "alignLeft", "alignRight", "alignCenter", "alignJustify", "noWrap", "gutterBottom", "paragraph"]), w = D, E = ["align", "className", "component", "gutterBottom", "noWrap", "paragraph", "variant", "variantMapping"], L = (a) => {
|
|
34
9
|
const {
|
|
35
|
-
align:
|
|
36
|
-
gutterBottom:
|
|
37
|
-
noWrap:
|
|
38
|
-
paragraph:
|
|
39
|
-
variant:
|
|
40
|
-
classes:
|
|
41
|
-
} =
|
|
42
|
-
root: ["root",
|
|
10
|
+
align: o,
|
|
11
|
+
gutterBottom: r,
|
|
12
|
+
noWrap: e,
|
|
13
|
+
paragraph: i,
|
|
14
|
+
variant: n,
|
|
15
|
+
classes: h
|
|
16
|
+
} = a, s = {
|
|
17
|
+
root: ["root", n, a.align !== "inherit" && `align${f(o)}`, r && "gutterBottom", e && "noWrap", i && "paragraph"]
|
|
43
18
|
};
|
|
44
|
-
return
|
|
45
|
-
},
|
|
19
|
+
return _(s, $, h);
|
|
20
|
+
}, V = P("span", {
|
|
46
21
|
name: "MuiTypography",
|
|
47
22
|
slot: "Root",
|
|
48
|
-
overridesResolver: (
|
|
23
|
+
overridesResolver: (a, o) => {
|
|
49
24
|
const {
|
|
50
|
-
ownerState:
|
|
51
|
-
} =
|
|
52
|
-
return [
|
|
25
|
+
ownerState: r
|
|
26
|
+
} = a;
|
|
27
|
+
return [o.root, r.variant && o[r.variant], r.align !== "inherit" && o[`align${f(r.align)}`], r.noWrap && o.noWrap, r.gutterBottom && o.gutterBottom, r.paragraph && o.paragraph];
|
|
53
28
|
}
|
|
54
29
|
})(({
|
|
55
|
-
theme:
|
|
56
|
-
ownerState:
|
|
30
|
+
theme: a,
|
|
31
|
+
ownerState: o
|
|
57
32
|
}) => p({
|
|
58
33
|
margin: 0
|
|
59
|
-
},
|
|
34
|
+
}, o.variant === "inherit" && {
|
|
60
35
|
// Some elements, like <button> on Chrome have default font that doesn't inherit, reset this.
|
|
61
36
|
font: "inherit"
|
|
62
|
-
},
|
|
63
|
-
textAlign:
|
|
64
|
-
},
|
|
37
|
+
}, o.variant !== "inherit" && a.typography[o.variant], o.align !== "inherit" && {
|
|
38
|
+
textAlign: o.align
|
|
39
|
+
}, o.noWrap && {
|
|
65
40
|
overflow: "hidden",
|
|
66
41
|
textOverflow: "ellipsis",
|
|
67
42
|
whiteSpace: "nowrap"
|
|
68
|
-
},
|
|
43
|
+
}, o.gutterBottom && {
|
|
69
44
|
marginBottom: "0.35em"
|
|
70
|
-
},
|
|
45
|
+
}, o.paragraph && {
|
|
71
46
|
marginBottom: 16
|
|
72
|
-
})),
|
|
47
|
+
})), u = {
|
|
73
48
|
h1: "h1",
|
|
74
49
|
h2: "h2",
|
|
75
50
|
h3: "h3",
|
|
@@ -81,46 +56,46 @@ const V = M("MuiTypography", ["root", "h1", "h2", "h3", "h4", "h5", "h6", "subti
|
|
|
81
56
|
body1: "p",
|
|
82
57
|
body2: "p",
|
|
83
58
|
inherit: "p"
|
|
84
|
-
},
|
|
59
|
+
}, z = {
|
|
85
60
|
primary: "primary.main",
|
|
86
61
|
textPrimary: "text.primary",
|
|
87
62
|
secondary: "secondary.main",
|
|
88
63
|
textSecondary: "text.secondary",
|
|
89
64
|
error: "error.main"
|
|
90
|
-
},
|
|
91
|
-
const
|
|
92
|
-
props:
|
|
65
|
+
}, A = (a) => z[a] || a, d = /* @__PURE__ */ O.forwardRef(function(o, r) {
|
|
66
|
+
const e = W({
|
|
67
|
+
props: o,
|
|
93
68
|
name: "MuiTypography"
|
|
94
|
-
}),
|
|
95
|
-
color:
|
|
69
|
+
}), i = A(e.color), n = N(p({}, e, {
|
|
70
|
+
color: i
|
|
96
71
|
})), {
|
|
97
|
-
align:
|
|
98
|
-
className:
|
|
99
|
-
component:
|
|
100
|
-
gutterBottom:
|
|
101
|
-
noWrap:
|
|
102
|
-
paragraph:
|
|
103
|
-
variant:
|
|
104
|
-
variantMapping: y =
|
|
105
|
-
} =
|
|
106
|
-
align:
|
|
107
|
-
color:
|
|
108
|
-
className:
|
|
109
|
-
component:
|
|
110
|
-
gutterBottom:
|
|
111
|
-
noWrap:
|
|
112
|
-
paragraph:
|
|
113
|
-
variant:
|
|
72
|
+
align: h = "inherit",
|
|
73
|
+
className: s,
|
|
74
|
+
component: l,
|
|
75
|
+
gutterBottom: b = !1,
|
|
76
|
+
noWrap: v = !1,
|
|
77
|
+
paragraph: c = !1,
|
|
78
|
+
variant: g = "body1",
|
|
79
|
+
variantMapping: y = u
|
|
80
|
+
} = n, T = M(n, E), m = p({}, n, {
|
|
81
|
+
align: h,
|
|
82
|
+
color: i,
|
|
83
|
+
className: s,
|
|
84
|
+
component: l,
|
|
85
|
+
gutterBottom: b,
|
|
86
|
+
noWrap: v,
|
|
87
|
+
paragraph: c,
|
|
88
|
+
variant: g,
|
|
114
89
|
variantMapping: y
|
|
115
|
-
}),
|
|
116
|
-
return /* @__PURE__ */ U(
|
|
117
|
-
as:
|
|
118
|
-
ref:
|
|
119
|
-
ownerState:
|
|
120
|
-
className:
|
|
90
|
+
}), x = l || (c ? "p" : y[g] || u[g]) || "span", B = L(m);
|
|
91
|
+
return /* @__PURE__ */ U(V, p({
|
|
92
|
+
as: x,
|
|
93
|
+
ref: r,
|
|
94
|
+
ownerState: m,
|
|
95
|
+
className: R(B.root, s)
|
|
121
96
|
}, T));
|
|
122
97
|
});
|
|
123
|
-
process.env.NODE_ENV !== "production" && (
|
|
98
|
+
process.env.NODE_ENV !== "production" && (d.propTypes = {
|
|
124
99
|
// ┌────────────────────────────── Warning ──────────────────────────────┐
|
|
125
100
|
// │ These PropTypes are generated from the TypeScript type definitions. │
|
|
126
101
|
// │ To update them, edit the d.ts file and run `pnpm proptypes`. │
|
|
@@ -129,29 +104,29 @@ process.env.NODE_ENV !== "production" && (b.propTypes = {
|
|
|
129
104
|
* Set the text-align on the component.
|
|
130
105
|
* @default 'inherit'
|
|
131
106
|
*/
|
|
132
|
-
align:
|
|
107
|
+
align: t.oneOf(["center", "inherit", "justify", "left", "right"]),
|
|
133
108
|
/**
|
|
134
109
|
* The content of the component.
|
|
135
110
|
*/
|
|
136
|
-
children:
|
|
111
|
+
children: t.node,
|
|
137
112
|
/**
|
|
138
113
|
* Override or extend the styles applied to the component.
|
|
139
114
|
*/
|
|
140
|
-
classes:
|
|
115
|
+
classes: t.object,
|
|
141
116
|
/**
|
|
142
117
|
* @ignore
|
|
143
118
|
*/
|
|
144
|
-
className:
|
|
119
|
+
className: t.string,
|
|
145
120
|
/**
|
|
146
121
|
* The component used for the root node.
|
|
147
122
|
* Either a string to use a HTML element or a component.
|
|
148
123
|
*/
|
|
149
|
-
component:
|
|
124
|
+
component: t.elementType,
|
|
150
125
|
/**
|
|
151
126
|
* If `true`, the text will have a bottom margin.
|
|
152
127
|
* @default false
|
|
153
128
|
*/
|
|
154
|
-
gutterBottom:
|
|
129
|
+
gutterBottom: t.bool,
|
|
155
130
|
/**
|
|
156
131
|
* If `true`, the text will not wrap, but instead will truncate with a text overflow ellipsis.
|
|
157
132
|
*
|
|
@@ -159,21 +134,21 @@ process.env.NODE_ENV !== "production" && (b.propTypes = {
|
|
|
159
134
|
* (the element needs to have a width in order to overflow).
|
|
160
135
|
* @default false
|
|
161
136
|
*/
|
|
162
|
-
noWrap:
|
|
137
|
+
noWrap: t.bool,
|
|
163
138
|
/**
|
|
164
139
|
* If `true`, the element will be a paragraph element.
|
|
165
140
|
* @default false
|
|
166
141
|
*/
|
|
167
|
-
paragraph:
|
|
142
|
+
paragraph: t.bool,
|
|
168
143
|
/**
|
|
169
144
|
* The system prop that allows defining system overrides as well as additional CSS styles.
|
|
170
145
|
*/
|
|
171
|
-
sx:
|
|
146
|
+
sx: t.oneOfType([t.arrayOf(t.oneOfType([t.func, t.object, t.bool])), t.func, t.object]),
|
|
172
147
|
/**
|
|
173
148
|
* Applies the theme typography styles.
|
|
174
149
|
* @default 'body1'
|
|
175
150
|
*/
|
|
176
|
-
variant:
|
|
151
|
+
variant: t.oneOfType([t.oneOf(["body1", "body2", "button", "caption", "h1", "h2", "h3", "h4", "h5", "h6", "inherit", "overline", "subtitle1", "subtitle2"]), t.string]),
|
|
177
152
|
/**
|
|
178
153
|
* The component maps the variant prop to a range of different HTML element types.
|
|
179
154
|
* For instance, subtitle1 to `<h6>`.
|
|
@@ -193,12 +168,11 @@ process.env.NODE_ENV !== "production" && (b.propTypes = {
|
|
|
193
168
|
* inherit: 'p',
|
|
194
169
|
* }
|
|
195
170
|
*/
|
|
196
|
-
variantMapping:
|
|
171
|
+
variantMapping: t.object
|
|
197
172
|
});
|
|
198
|
-
const
|
|
173
|
+
const F = d;
|
|
199
174
|
export {
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
H as t
|
|
175
|
+
F as T,
|
|
176
|
+
$ as g,
|
|
177
|
+
w as t
|
|
204
178
|
};
|
package/dist/assets/index.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
body{margin:0;padding:0;background:#fff}.cs-loader{position:absolute;top:0;left:0;height:100%;width:100%}.cs-loader-inner{transform:translateY(-50%);top:50%;position:absolute;width:100%;color:#00b8de;padding:0 100px;text-align:center}.cs-loader-inner label{font-size:20px;opacity:0;display:inline-block}@keyframes lol{0%{opacity:0;transform:translate(-300px)}33%{opacity:1;transform:translate(0)}66%{opacity:1;transform:translate(0)}to{opacity:0;transform:translate(300px)}}.cs-loader-inner label:nth-child(4){animation:lol 3s .2s infinite ease-in-out}.cs-loader-inner label:nth-child(3){animation:lol 3s .3s infinite ease-in-out}.cs-loader-inner label:nth-child(2){animation:lol 3s .4s infinite ease-in-out}.cs-loader-inner label:nth-child(1){animation:lol 3s .5s infinite ease-in-out}*,:before,:after{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: }::backdrop{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: }.flex{display:flex}.table{display:table}.w-full{width:100%}.border{border-width:1px}.text-start{text-align:start}.transition{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,-webkit-backdrop-filter;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter,-webkit-backdrop-filter;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}
|
|
1
|
+
body{margin:0;padding:0;background:#fff}.cs-loader{position:absolute;top:0;left:0;height:100%;width:100%}.cs-loader-inner{transform:translateY(-50%);top:50%;position:absolute;width:100%;color:#00b8de;padding:0 100px;text-align:center}.cs-loader-inner label{font-size:20px;opacity:0;display:inline-block}@keyframes lol{0%{opacity:0;transform:translate(-300px)}33%{opacity:1;transform:translate(0)}66%{opacity:1;transform:translate(0)}to{opacity:0;transform:translate(300px)}}.cs-loader-inner label:nth-child(4){animation:lol 3s .2s infinite ease-in-out}.cs-loader-inner label:nth-child(3){animation:lol 3s .3s infinite ease-in-out}.cs-loader-inner label:nth-child(2){animation:lol 3s .4s infinite ease-in-out}.cs-loader-inner label:nth-child(1){animation:lol 3s .5s infinite ease-in-out}*,:before,:after{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }::backdrop{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }.flex{display:flex}.table{display:table}.w-full{width:100%}.border{border-width:1px}.text-start{text-align:start}.transition{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,-webkit-backdrop-filter;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter,-webkit-backdrop-filter;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
"use strict";const x=require("react/jsx-runtime"),
|
|
2
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Kr(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function Hr(e){if(Array.isArray(e))return
|
|
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
|
|
4
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function pt(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function dt(e){if(Array.isArray(e))return
|
|
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 mt(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 yt(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=vt(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 vt(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,at),i=fr(n),o=i.open,c=Z(i,ut);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:jr,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 nt(t)},[t]),je=f.useMemo(function(){return tt(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(bt,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&&rt()),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(lt(_.current),[a.target]),J(a)&&Promise.resolve(i(a)).then(function(u){if(!(X(a)&&!O)){var y=u.length,v=y>0&&Qr({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:[Jr]})}),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){ot(u)?(B(u),D({type:"closeDialog"})):it(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||(et()?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,ct);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,st),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 bt(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 ht=br.styled(hr.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"})),Dt=({defaultLabel:e="Glisser et déposer des fichiers ici, ou cliquer pour sélectionner des fichiers",dragLabel:r="Déposer les fichiers ici",information:t,...n})=>{const{getRootProps:i,getInputProps:o,isDragActive:c}=fr({onDrop:n.onDrop});return x.jsxs(ht,{...i(),children:[x.jsx("input",{...o()}),c?x.jsxs(x.Fragment,{children:[x.jsx(Ze,{color:"primary"}),x.jsx(me.Typography,{children:r})]}):x.jsxs(x.Fragment,{children:[x.jsx(er,{color:"primary"}),x.jsx(me.Typography,{children:e}),t?x.jsx(me.Typography,{fontSize:"0.875rem",color:"grey",children:t}):null]})]})};module.exports=Dt;
|
|
1
|
+
"use strict";const x=require("react/jsx-runtime"),p=require("../../useThemeProps-C5iFxIYI.cjs"),Xe=require("../../createSvgIcon-Bmh1dZN3.cjs"),f=require("react"),br=require("../../styled-CJ2HJ-9N.cjs"),hr=require("../../Box-DL1-mhd_.cjs"),ge=require("../../Typography-BAJIrofJ.cjs");var we={},Dr=p.interopRequireDefaultExports;Object.defineProperty(we,"__esModule",{value:!0});var Ze=we.default=void 0,wr=Dr(Xe.requireCreateSvgIcon()),xr=x;Ze=we.default=(0,wr.default)((0,xr.jsx)("path",{d:"M9 16h6v-6h4l-7-7-7 7h4zm-4 2h14v2H5z"}),"FileUpload");var xe={},Ar=p.interopRequireDefaultExports;Object.defineProperty(xe,"__esModule",{value:!0});var er=xe.default=void 0,Er=Ar(Xe.requireCreateSvgIcon()),Or=x;er=xe.default=(0,Er.default)((0,Or.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 Ke(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 He(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 Fr=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=Pr(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 Pr(e){var r=e.name,t=r&&r.lastIndexOf(".")!==-1;if(t&&!e.type){var n=r.split(".").pop().toLowerCase(),i=Fr.get(n);i&&Object.defineProperty(e,"type",{value:i,writable:!1,configurable:!1,enumerable:!0})}return e}var _r=[".DS_Store","Thumbs.db"];function jr(e){return C(this,void 0,void 0,function(){return I(this,function(r){return Q(e)&&Tr(e.dataTransfer)?[2,Rr(e.dataTransfer,e.type)]:Sr(e)?[2,Cr(e)]:Array.isArray(e)&&e.every(function(t){return"getFile"in t&&typeof t.getFile=="function"})?[2,Ir(e)]:[2,[]]})})}function Tr(e){return Q(e)}function Sr(e){return Q(e)&&Q(e.target)}function Q(e){return typeof e=="object"&&e!==null}function Cr(e){return ye(e.target.files).map(function(r){return q(r)})}function Ir(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 Rr(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=ye(e.items).filter(function(o){return o.kind==="file"}),r!=="drop"?[2,t]:[4,Promise.all(t.map(kr))]):[3,2];case 1:return n=i.sent(),[2,qe(rr(n))];case 2:return[2,qe(ye(e.files).map(function(o){return q(o)}))]}})})}function qe(e){return e.filter(function(r){return _r.indexOf(r.name)===-1})}function ye(e){if(e===null)return[];for(var r=[],t=0;t<e.length;t++){var n=e[t];r.push(n)}return r}function kr(e){if(typeof e.webkitGetAsEntry!="function")return Be(e);var r=e.webkitGetAsEntry();return r&&r.isDirectory?tr(r):Be(e)}function rr(e){return e.reduce(function(r,t){return He(He([],Ke(r),!1),Ke(Array.isArray(t)?rr(t):[t]),!1)},[])}function Be(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 zr(e){return C(this,void 0,void 0,function(){return I(this,function(r){return[2,e.isDirectory?tr(e):Mr(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(zr)),i.push(m),o(),b.label=6;case 6:return[2]}})})},function(l){n(l)})}o()})}function Mr(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 Lr=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 We(e){return Hr(e)||Kr(e)||or(e)||$r()}function $r(){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 Kr(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function Hr(e){if(Array.isArray(e))return ve(e)}function Ue(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 Ne(e){for(var r=1;r<arguments.length;r++){var t=arguments[r]!=null?arguments[r]:{};r%2?Ue(Object(t),!0).forEach(function(n){nr(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):Ue(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 Wr(e)||Br(e,r)||or(e,r)||qr()}function qr(){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 ve(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 ve(e,r)}}function ve(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 Br(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 Wr(e){if(Array.isArray(e))return e}var Ur="file-invalid-type",Nr="file-too-large",Gr="file-too-small",Yr="too-many-files",Vr=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:Ur,message:"File type must be ".concat(t)}},Ge=function(r){return{code:Nr,message:"File is larger than ".concat(r," ").concat(r===1?"byte":"bytes")}},Ye=function(r){return{code:Gr,message:"File is smaller than ".concat(r," ").concat(r===1?"byte":"bytes")}},Jr={code:Yr,message:"Too many files"};function ir(e,r){var t=e.type==="application/x-moz-file"||Lr(e,r);return[t,t?null:Vr(r)]}function ar(e,r,t){if(P(e.size))if(P(r)&&P(t)){if(e.size>t)return[!1,Ge(t)];if(e.size<r)return[!1,Ye(r)]}else{if(P(r)&&e.size<r)return[!1,Ye(r)];if(P(t)&&e.size>t)return[!1,Ge(t)]}return[!0,null]}function P(e){return e!=null}function Qr(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 Ve(e){e.preventDefault()}function Xr(e){return e.indexOf("MSIE")!==-1||e.indexOf("Trident/")!==-1}function Zr(e){return e.indexOf("Edge/")!==-1}function et(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:window.navigator.userAgent;return Xr(e)||Zr(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 rt(){return"showOpenFilePicker"in window}function tt(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 Ne(Ne({},t),{},nr({},o,c))},{});return[{description:"Files",accept:r}]}return e}function nt(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(We(r),[i],We(o))},[]).filter(function(r){return ur(r)||cr(r)}).join(",")}function ot(e){return e instanceof DOMException&&(e.name==="AbortError"||e.code===e.ABORT_ERR)}function it(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 at=["children"],ut=["open"],ct=["refKey","role","onKeyDown","onFocus","onBlur","onClick","onDragEnter","onDragOver","onDragLeave","onDrop"],st=["refKey","onChange","onClick"];function lt(e){return dt(e)||pt(e)||sr(e)||ft()}function ft(){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 pt(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function dt(e){if(Array.isArray(e))return be(e)}function me(e,r){return yt(e)||mt(e,r)||sr(e,r)||gt()}function gt(){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 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 mt(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 yt(e){if(Array.isArray(e))return e}function Je(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?Je(Object(t),!0).forEach(function(n){he(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):Je(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}function he(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=vt(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 vt(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 Ae=f.forwardRef(function(e,r){var t=e.children,n=Z(e,at),i=fr(n),o=i.open,c=Z(i,ut);return f.useImperativeHandle(r,function(){return{open:o}},[o]),f.createElement(f.Fragment,null,t(d(d({},c),{},{open:o})))});Ae.displayName="Dropzone";var lr={disabled:!1,getFilesFromEvent:jr,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};Ae.defaultProps=lr;Ae.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 De={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,ee=r.onFileDialogOpen,Ee=r.useFsAccessApi,Oe=r.autoFocus,re=r.preventDropOnDocument,Fe=r.noClick,te=r.noKeyboard,Pe=r.noDrag,O=r.noDragEventsBubbling,ne=r.onError,L=r.validator,$=f.useMemo(function(){return nt(t)},[t]),_e=f.useMemo(function(){return tt(t)},[t]),oe=f.useMemo(function(){return typeof ee=="function"?ee:Qe},[ee]),B=f.useMemo(function(){return typeof M=="function"?M:Qe},[M]),h=f.useRef(null),A=f.useRef(null),pr=f.useReducer(bt,De),je=me(pr,2),ie=je[0],D=je[1],dr=ie.isFocused,Te=ie.isFileDialogActive,W=f.useRef(typeof window<"u"&&window.isSecureContext&&Ee&&rt()),Se=function(){!W.current&&Te&&setTimeout(function(){if(A.current){var u=A.current.files;u.length||(D({type:"closeDialog"}),B())}},300)};f.useEffect(function(){return window.addEventListener("focus",Se,!1),function(){window.removeEventListener("focus",Se,!1)}},[A,Te,B,W]);var _=f.useRef([]),Ce=function(u){h.current&&h.current.contains(u.target)||(u.preventDefault(),_.current=[])};f.useEffect(function(){return re&&(document.addEventListener("dragover",Ve,!1),document.addEventListener("drop",Ce,!1)),function(){re&&(document.removeEventListener("dragover",Ve),document.removeEventListener("drop",Ce))}},[h,re]),f.useEffect(function(){return!n&&Oe&&h.current&&h.current.focus(),function(){}},[h,Oe,n]);var F=f.useCallback(function(a){ne?ne(a):console.error(a)},[ne]),Ie=f.useCallback(function(a){a.preventDefault(),a.persist(),Y(a),_.current=[].concat(lt(_.current),[a.target]),J(a)&&Promise.resolve(i(a)).then(function(u){if(!(X(a)&&!O)){var y=u.length,v=y>0&&Qr({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]),Re=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]),ke=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=me(K,2),ue=S[0],ce=S[1],se=ar(w,c,o),V=me(se,2),le=V[0],fe=V[1],pe=L?L(w):null;if(ue&&le&&!pe)y.push(w);else{var de=[ce,fe];pe&&(de=de.concat(pe)),v.push({file:w,errors:de.filter(function(vr){return vr})})}}),(!l&&y.length>1||l&&g>=1&&y.length>g)&&(y.forEach(function(w){v.push({file:w,errors:[Jr]})}),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"}),oe();var a={multiple:l,types:_e};window.showOpenFilePicker(a).then(function(u){return i(u)}).then(function(u){U(u,null),D({type:"closeDialog"})}).catch(function(u){ot(u)?(B(u),D({type:"closeDialog"})):it(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"}),oe(),A.current.value=null,A.current.click())},[D,oe,B,Ee,U,F,_e,l]),ze=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]),Me=f.useCallback(function(){D({type:"focus"})},[]),Le=f.useCallback(function(){D({type:"blur"})},[]),$e=f.useCallback(function(){Fe||(et()?setTimeout(j,0):j())},[Fe,j]),T=function(u){return n?null:u},ae=function(u){return te?null:T(u)},G=function(u){return Pe?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,ue=a.onClick,ce=a.onDragEnter,se=a.onDragOver,V=a.onDragLeave,le=a.onDrop,fe=Z(a,ct);return d(d(he({onKeyDown:ae(E(w,ze)),onFocus:ae(E(K,Me)),onBlur:ae(E(S,Le)),onClick:T(E(ue,$e)),onDragEnter:G(E(ce,Ie)),onDragOver:G(E(se,Re)),onDragLeave:G(E(V,ke)),onDrop:G(E(le,N)),role:typeof v=="string"&&v!==""?v:"presentation"},y,h),!n&&!te?{tabIndex:0}:{}),fe)}},[h,ze,Me,Le,$e,Ie,Re,ke,N,te,Pe,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,st),S=he({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({},ie),{},{isFocused:dr&&!n,getRootProps:gr,getInputProps:yr,rootRef:h,inputRef:A,open:T(j)})}function bt(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({},De),{},{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({},De);default:return e}}function Qe(){}const ht=br.styled(hr.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"})),Dt=({defaultLabel:e="Glisser et déposer des fichiers ici, ou cliquer pour sélectionner des fichiers",dragLabel:r="Déposer les fichiers ici",information:t,...n})=>{const{getRootProps:i,getInputProps:o,isDragActive:c}=fr({onDrop:n.onDrop});return x.jsxs(ht,{...i(),children:[x.jsx("input",{...o()}),c?x.jsxs(x.Fragment,{children:[x.jsx(Ze,{color:"primary"}),x.jsx(ge.Typography,{children:r})]}):x.jsxs(x.Fragment,{children:[x.jsx(er,{color:"primary"}),x.jsx(ge.Typography,{children:e}),t?x.jsx(ge.Typography,{fontSize:"0.875rem",color:"grey",children:t}):null]})]})};module.exports=Dt;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import React from
|
|
2
|
-
import {
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
import { DropzoneProps as ReactDropzoneProps } from 'react-dropzone';
|
|
3
|
+
|
|
3
4
|
export interface DropzoneProps extends ReactDropzoneProps {
|
|
4
5
|
defaultLabel?: string;
|
|
5
6
|
dragLabel?: string;
|
|
@@ -1,23 +1,23 @@
|
|
|
1
1
|
import nr, { jsxs as ve, jsx as T, Fragment as Ue } from "react/jsx-runtime";
|
|
2
|
-
import {
|
|
2
|
+
import { i as or, P as f } from "../../useThemeProps-C59ZmJTM.js";
|
|
3
|
+
import { r as ir } from "../../createSvgIcon-BuZnNhW1.js";
|
|
3
4
|
import xr, { useMemo as I, useRef as Q, useReducer as Fr, useEffect as ye, useCallback as A, forwardRef as _r, useImperativeHandle as jr, Fragment as Sr } from "react";
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
|
|
8
|
-
var xe = {}, Ir = ir;
|
|
5
|
+
import { s as Pr } from "../../styled-BBsrnZJ1.js";
|
|
6
|
+
import { B as Tr } from "../../Box-Mup7NS_A.js";
|
|
7
|
+
import { T as be } from "../../Typography-BWCcreVc.js";
|
|
8
|
+
var xe = {}, Ir = or;
|
|
9
9
|
Object.defineProperty(xe, "__esModule", {
|
|
10
10
|
value: !0
|
|
11
11
|
});
|
|
12
|
-
var ar = xe.default = void 0, Cr = Ir(
|
|
12
|
+
var ar = xe.default = void 0, Cr = Ir(ir()), Rr = nr;
|
|
13
13
|
ar = xe.default = (0, Cr.default)(/* @__PURE__ */ (0, Rr.jsx)("path", {
|
|
14
14
|
d: "M9 16h6v-6h4l-7-7-7 7h4zm-4 2h14v2H5z"
|
|
15
15
|
}), "FileUpload");
|
|
16
|
-
var Fe = {}, zr =
|
|
16
|
+
var Fe = {}, zr = or;
|
|
17
17
|
Object.defineProperty(Fe, "__esModule", {
|
|
18
18
|
value: !0
|
|
19
19
|
});
|
|
20
|
-
var ur = Fe.default = void 0, kr = zr(
|
|
20
|
+
var ur = Fe.default = void 0, kr = zr(ir()), Lr = nr;
|
|
21
21
|
ur = Fe.default = (0, kr.default)(/* @__PURE__ */ (0, Lr.jsx)("path", {
|
|
22
22
|
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"
|
|
23
23
|
}), "UploadFile");
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export * from
|
|
2
|
-
export { default as Dropzone } from
|
|
1
|
+
export * from './Dropzone';
|
|
2
|
+
export { default as Dropzone } from './Dropzone';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";const e=require("react/jsx-runtime");;/* empty css */const r=({})=>e.jsx("div",{className:"cs-loader",children:e.jsxs("div",{className:"cs-loader-inner",children:[e.jsx("label",{children:"●"}),e.jsx("label",{children:"●"}),e.jsx("label",{children:"●"}),e.jsx("label",{children:"●"})]})});module.exports=r;
|
|
1
|
+
require('../../assets/styles.css');"use strict";const e=require("react/jsx-runtime");;/* empty css */const r=({})=>e.jsx("div",{className:"cs-loader",children:e.jsxs("div",{className:"cs-loader-inner",children:[e.jsx("label",{children:"●"}),e.jsx("label",{children:"●"}),e.jsx("label",{children:"●"}),e.jsx("label",{children:"●"})]})});module.exports=r;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export * from
|
|
2
|
-
export { default as LoaderBackdrop } from
|
|
1
|
+
export * from './LoaderBackdrop';
|
|
2
|
+
export { default as LoaderBackdrop } from './LoaderBackdrop';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";require("react/jsx-runtime");require("../../fr-
|
|
1
|
+
"use strict";require("react/jsx-runtime");require("../../fr-BTDmq9ek.cjs");const r=require("../../LocalizationProvider-DESNnS1V.cjs");module.exports=r.LocalizationProvider;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("../../LocalizationProvider-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("../../LocalizationProvider-DESNnS1V.cjs");exports.LocalizationProvider=o.LocalizationProvider;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export * from
|
|
2
|
-
export { default as LocalizationProvider } from
|
|
1
|
+
export * from './LocalizationProvider';
|
|
2
|
+
export { default as LocalizationProvider } from './LocalizationProvider';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";require("react/jsx-runtime");require("react");require("./DefaultButtonIcon.cjs.js");require("../../../styled-
|
|
1
|
+
"use strict";require("react/jsx-runtime");require("react");require("./DefaultButtonIcon.cjs.js");require("../../../styled-CJ2HJ-9N.cjs");const e=require("../../../DefaultButton-DpAQ3D3A.cjs");module.exports=e.DefaultButton;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { DefaultButtonIconProps } from
|
|
1
|
+
import { LoadingButtonProps } from '@mui/lab/LoadingButton';
|
|
2
|
+
import { DefaultButtonIconProps } from './DefaultButtonIcon';
|
|
3
|
+
|
|
3
4
|
export interface DefaultButtonProps extends LoadingButtonProps {
|
|
4
5
|
icon?: DefaultButtonIconProps;
|
|
5
6
|
text?: string;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import "react/jsx-runtime";
|
|
2
2
|
import "react";
|
|
3
3
|
import "./DefaultButtonIcon.es.js";
|
|
4
|
-
import "../../../styled-
|
|
5
|
-
import { D as a } from "../../../DefaultButton-
|
|
4
|
+
import "../../../styled-BBsrnZJ1.js";
|
|
5
|
+
import { D as a } from "../../../DefaultButton-Bm_9J15r.js";
|
|
6
6
|
export {
|
|
7
7
|
a as default
|
|
8
8
|
};
|