@cgi-learning-hub/ui 1.3.3-dev.1732550407 → 1.3.3-dev.1732614205
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/components/Dropzone/Dropzone.cjs.js +5 -1
- package/dist/components/Dropzone/Dropzone.es.js +2162 -24
- package/dist/components/FileList/FileListItem.cjs.js +1 -1
- package/dist/components/FileList/FileListItem.es.js +21 -20
- package/dist/components/PasswordInput/PasswordInput.cjs.js +1 -1
- package/dist/components/PasswordInput/PasswordInput.es.js +2 -3
- package/dist/components/index.cjs.js +1 -1
- package/dist/components/index.d.ts +0 -1
- package/dist/components/index.es.js +171 -173
- package/dist/index.cjs.js +1 -1
- package/dist/index.es.js +171 -173
- package/package.json +1 -1
- package/dist/Delete-Bb_PhA6v.cjs +0 -1
- package/dist/Delete-Dip-1l7n.js +0 -8
- package/dist/components/ImagePicker/ImagePicker.cjs.js +0 -1
- package/dist/components/ImagePicker/ImagePicker.d.ts +0 -9
- package/dist/components/ImagePicker/ImagePicker.es.js +0 -148
- package/dist/components/ImagePicker/index.cjs.js +0 -1
- package/dist/components/ImagePicker/index.d.ts +0 -2
- package/dist/components/ImagePicker/index.es.js +0 -4
- package/dist/components/stories/ImagePicker.stories.cjs.js +0 -1
- package/dist/components/stories/ImagePicker.stories.d.ts +0 -6
- package/dist/components/stories/ImagePicker.stories.es.js +0 -16
- package/dist/index-BtGBke8y.js +0 -2141
- package/dist/index-CEgiY5tJ.cjs +0 -5
|
@@ -1,148 +0,0 @@
|
|
|
1
|
-
import { jsx as e, jsxs as r, Fragment as p } from "react/jsx-runtime";
|
|
2
|
-
import { c as h } from "../../createSvgIcon-BS0Qe85N.js";
|
|
3
|
-
import { D as P } from "../../Delete-Dip-1l7n.js";
|
|
4
|
-
import { Box as o } from "@mui/material";
|
|
5
|
-
import { useState as j } from "react";
|
|
6
|
-
import { u as v } from "../../index-BtGBke8y.js";
|
|
7
|
-
import { S as w } from "../../Stack-DbWQHN5i.js";
|
|
8
|
-
import { T as n } from "../../Typography-CizHc1nM.js";
|
|
9
|
-
const m = h(/* @__PURE__ */ e("path", {
|
|
10
|
-
d: "M19 7v2.99s-1.99.01-2 0V7h-3s.01-1.99 0-2h3V2h2v3h3v2zm-3 4V8h-3V5H5c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2v-8zM5 19l3-4 2 3 3-4 4 5z"
|
|
11
|
-
}), "AddPhotoAlternate"), A = h(/* @__PURE__ */ e("path", {
|
|
12
|
-
d: "M3 17.25V21h3.75L17.81 9.94l-3.75-3.75zM20.71 7.04c.39-.39.39-1.02 0-1.41l-2.34-2.34a.996.996 0 0 0-1.41 0l-1.83 1.83 3.75 3.75z"
|
|
13
|
-
}), "Create"), L = ({
|
|
14
|
-
defaultLabel: g = "Glissez-déposez ou cliquez pour choisir une image",
|
|
15
|
-
dragLabel: u = "Glissez une image",
|
|
16
|
-
information: l = "PNG, JPEG, GIF, JPG",
|
|
17
|
-
onFileChange: c = (i) => {
|
|
18
|
-
},
|
|
19
|
-
...x
|
|
20
|
-
}) => {
|
|
21
|
-
const [i, s] = j(null), f = (t) => {
|
|
22
|
-
const d = t[0] || null;
|
|
23
|
-
s(d), c(d);
|
|
24
|
-
}, y = (t) => {
|
|
25
|
-
t.stopPropagation(), s(null), c(null);
|
|
26
|
-
}, b = (t) => {
|
|
27
|
-
t.stopPropagation(), a();
|
|
28
|
-
}, { open: a, getRootProps: z, getInputProps: C, isDragActive: I } = v({
|
|
29
|
-
...x,
|
|
30
|
-
maxFiles: 1,
|
|
31
|
-
onDropAccepted: f,
|
|
32
|
-
accept: {
|
|
33
|
-
"image/*": [".png", ".jpeg", ".jpg", ".gif"]
|
|
34
|
-
},
|
|
35
|
-
noClick: !0
|
|
36
|
-
});
|
|
37
|
-
return /* @__PURE__ */ r(
|
|
38
|
-
w,
|
|
39
|
-
{
|
|
40
|
-
direction: "column",
|
|
41
|
-
justifyContent: "center",
|
|
42
|
-
alignItems: "center",
|
|
43
|
-
spacing: 1,
|
|
44
|
-
width: "100%",
|
|
45
|
-
minWidth: "200px",
|
|
46
|
-
padding: 1,
|
|
47
|
-
border: "1px dashed",
|
|
48
|
-
borderColor: "grey.main",
|
|
49
|
-
borderRadius: 1,
|
|
50
|
-
sx: {
|
|
51
|
-
cursor: "pointer"
|
|
52
|
-
},
|
|
53
|
-
...z({
|
|
54
|
-
onClick: a
|
|
55
|
-
}),
|
|
56
|
-
children: [
|
|
57
|
-
/* @__PURE__ */ e("input", { ...C() }),
|
|
58
|
-
i ? /* @__PURE__ */ r(o, { sx: { position: "relative" }, children: [
|
|
59
|
-
/* @__PURE__ */ r(
|
|
60
|
-
o,
|
|
61
|
-
{
|
|
62
|
-
sx: {
|
|
63
|
-
position: "absolute",
|
|
64
|
-
top: "0.5rem",
|
|
65
|
-
right: "0.5rem",
|
|
66
|
-
display: "flex",
|
|
67
|
-
gap: "0.5rem"
|
|
68
|
-
},
|
|
69
|
-
children: [
|
|
70
|
-
/* @__PURE__ */ e(
|
|
71
|
-
o,
|
|
72
|
-
{
|
|
73
|
-
onClick: b,
|
|
74
|
-
sx: {
|
|
75
|
-
backgroundColor: "white",
|
|
76
|
-
display: "flex",
|
|
77
|
-
borderRadius: "3px",
|
|
78
|
-
alignItems: "center",
|
|
79
|
-
justifyContent: "center",
|
|
80
|
-
boxShadow: 1,
|
|
81
|
-
width: "2rem",
|
|
82
|
-
height: "2rem",
|
|
83
|
-
cursor: "pointer"
|
|
84
|
-
},
|
|
85
|
-
children: /* @__PURE__ */ e(A, { fontSize: "small" })
|
|
86
|
-
}
|
|
87
|
-
),
|
|
88
|
-
/* @__PURE__ */ e(
|
|
89
|
-
o,
|
|
90
|
-
{
|
|
91
|
-
onClick: y,
|
|
92
|
-
sx: {
|
|
93
|
-
backgroundColor: "white",
|
|
94
|
-
display: "flex",
|
|
95
|
-
borderRadius: "3px",
|
|
96
|
-
alignItems: "center",
|
|
97
|
-
boxShadow: 1,
|
|
98
|
-
justifyContent: "center",
|
|
99
|
-
width: "2rem",
|
|
100
|
-
height: "2rem",
|
|
101
|
-
cursor: "pointer"
|
|
102
|
-
},
|
|
103
|
-
children: /* @__PURE__ */ e(P, { fontSize: "small" })
|
|
104
|
-
}
|
|
105
|
-
)
|
|
106
|
-
]
|
|
107
|
-
}
|
|
108
|
-
),
|
|
109
|
-
/* @__PURE__ */ e(
|
|
110
|
-
"img",
|
|
111
|
-
{
|
|
112
|
-
src: URL.createObjectURL(i),
|
|
113
|
-
alt: i.name,
|
|
114
|
-
style: {
|
|
115
|
-
width: "100%",
|
|
116
|
-
height: "auto",
|
|
117
|
-
minWidth: "100px",
|
|
118
|
-
maxWidth: "300px",
|
|
119
|
-
maxHeight: "300px",
|
|
120
|
-
objectFit: "cover",
|
|
121
|
-
borderRadius: "8px"
|
|
122
|
-
}
|
|
123
|
-
}
|
|
124
|
-
)
|
|
125
|
-
] }) : /* @__PURE__ */ e(p, { children: I ? /* @__PURE__ */ r(p, { children: [
|
|
126
|
-
/* @__PURE__ */ e(m, { color: "primary" }),
|
|
127
|
-
/* @__PURE__ */ e(n, { textAlign: "center", children: u })
|
|
128
|
-
] }) : /* @__PURE__ */ r(o, { sx: {
|
|
129
|
-
display: "flex",
|
|
130
|
-
flexDirection: "column",
|
|
131
|
-
alignItems: "center",
|
|
132
|
-
padding: "0.5rem",
|
|
133
|
-
gap: "0.5rem"
|
|
134
|
-
}, children: [
|
|
135
|
-
/* @__PURE__ */ e(m, { color: "primary", style: {
|
|
136
|
-
width: "2.5rem",
|
|
137
|
-
height: "2.5rem"
|
|
138
|
-
} }),
|
|
139
|
-
/* @__PURE__ */ e(n, { textAlign: "center", children: g }),
|
|
140
|
-
l && /* @__PURE__ */ e(n, { textAlign: "center", fontSize: "0.875rem", color: "grey", children: l })
|
|
141
|
-
] }) })
|
|
142
|
-
]
|
|
143
|
-
}
|
|
144
|
-
);
|
|
145
|
-
};
|
|
146
|
-
export {
|
|
147
|
-
L as default
|
|
148
|
-
};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./ImagePicker.cjs.js");exports.ImagePicker=e;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const o=require("../ImagePicker/ImagePicker.cjs.js"),t={title:"Components/ImagePicker",component:o},n={args:{information:"SVG, PNG, JPG, GIF",onFileChange:e=>{console.log(e?"Image uplaodé":"Image supprimé")}}};exports.Default=n;exports.default=t;
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import o from "../ImagePicker/ImagePicker.es.js";
|
|
2
|
-
const n = {
|
|
3
|
-
title: "Components/ImagePicker",
|
|
4
|
-
component: o
|
|
5
|
-
}, t = {
|
|
6
|
-
args: {
|
|
7
|
-
information: "SVG, PNG, JPG, GIF",
|
|
8
|
-
onFileChange: (e) => {
|
|
9
|
-
console.log(e ? "Image uplaodé" : "Image supprimé");
|
|
10
|
-
}
|
|
11
|
-
}
|
|
12
|
-
};
|
|
13
|
-
export {
|
|
14
|
-
t as Default,
|
|
15
|
-
n as default
|
|
16
|
-
};
|