@cgi-learning-hub/ui 1.3.5-dev.1739206891 → 1.3.5-dev.1739269730
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/Button-C-bZSJCq.cjs +28 -0
- package/dist/Button-CSNPv43f.js +542 -0
- package/dist/CloseRounded-Cu-sn6XC.cjs +1 -0
- package/dist/CloseRounded-Df8vYhLX.js +8 -0
- package/dist/components/Button/Button.cjs.js +1 -1
- package/dist/components/Button/Button.es.js +4 -297
- package/dist/components/Button/index.cjs.js +1 -1
- package/dist/components/Button/index.es.js +2 -2
- package/dist/components/Dialog/Dialog.cjs.js +1 -1
- package/dist/components/Dialog/Dialog.es.js +12 -14
- package/dist/components/EllipsisWithTooltip/EllipsisWithTooltip.cjs.js +1 -1
- package/dist/components/EllipsisWithTooltip/EllipsisWithTooltip.es.js +4 -3
- package/dist/components/FileList/FileIcon.cjs.js +1 -0
- package/dist/components/FileList/FileIcon.d.ts +3 -0
- package/dist/components/FileList/FileIcon.es.js +56 -0
- package/dist/components/FileList/FileInfosSeparator.cjs.js +1 -0
- package/dist/components/FileList/FileInfosSeparator.d.ts +1 -0
- package/dist/components/FileList/FileInfosSeparator.es.js +14 -0
- package/dist/components/FileList/FileList.cjs.js +1 -1
- package/dist/components/FileList/FileList.d.ts +5 -3
- package/dist/components/FileList/FileList.es.js +23 -14
- package/dist/components/FileList/FileListItem.cjs.js +1 -1
- package/dist/components/FileList/FileListItem.d.ts +9 -5
- package/dist/components/FileList/FileListItem.es.js +97 -24
- package/dist/components/FileList/utils.cjs.js +1 -0
- package/dist/components/FileList/utils.d.ts +2 -0
- package/dist/components/FileList/utils.es.js +13 -0
- package/dist/components/ImagePicker/ImagePicker.cjs.js +1 -1
- package/dist/components/ImagePicker/ImagePicker.es.js +40 -39
- package/dist/components/PasswordInput/PasswordInput.cjs.js +1 -1
- package/dist/components/PasswordInput/PasswordInput.es.js +1 -1
- package/dist/components/index.cjs.js +1 -1
- package/dist/components/index.es.js +212 -213
- package/dist/components/stories/Button.stories.cjs.js +1 -1
- package/dist/components/stories/Button.stories.es.js +1 -1
- package/dist/components/stories/Card.stories.cjs.js +1 -1
- package/dist/components/stories/Card.stories.es.js +1 -1
- package/dist/components/stories/Dialog.stories.cjs.js +1 -1
- package/dist/components/stories/Dialog.stories.es.js +1 -1
- package/dist/components/stories/FileList.stories.cjs.js +8 -1
- package/dist/components/stories/FileList.stories.es.js +145 -19
- package/dist/components/stories/Menu.stories.cjs.js +1 -1
- package/dist/components/stories/Menu.stories.es.js +1 -1
- package/dist/index.cjs.js +1 -1
- package/dist/index.es.js +212 -213
- package/package.json +1 -1
- package/dist/CircularProgress-BgUNlpbU.js +0 -253
- package/dist/CircularProgress-nxAXvjY0.cjs +0 -28
- package/dist/Delete-DCHX_nNr.js +0 -8
- package/dist/Delete-Z2rf9szx.cjs +0 -1
|
@@ -1,299 +1,6 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import { H as M, I as R, P as n } from "../../generateUtilityClasses-v9KcqdK1.js";
|
|
5
|
-
import { a as z, r as O, B as j } from "../../Button-DovfjBkz.js";
|
|
6
|
-
import { u as U } from "../../useId-CK6Kn3Tn.js";
|
|
7
|
-
import { c } from "../../capitalize-yX_QSknw.js";
|
|
8
|
-
import { m as v } from "../../memoTheme-D-rebSfX.js";
|
|
9
|
-
import { C as N } from "../../CircularProgress-BgUNlpbU.js";
|
|
10
|
-
import { c as W } from "../../chainPropTypes-D9lkm76m.js";
|
|
11
|
-
function D(o) {
|
|
12
|
-
return R("MuiLoadingButton", o);
|
|
13
|
-
}
|
|
14
|
-
const a = M("MuiLoadingButton", ["root", "label", "loading", "loadingIndicator", "loadingIndicatorCenter", "loadingIndicatorStart", "loadingIndicatorEnd", "endIconLoadingEnd", "startIconLoadingStart"]), F = (o) => {
|
|
15
|
-
const {
|
|
16
|
-
loading: t,
|
|
17
|
-
loadingPosition: i,
|
|
18
|
-
classes: e
|
|
19
|
-
} = o, u = {
|
|
20
|
-
root: ["root", t && "loading"],
|
|
21
|
-
label: ["label"],
|
|
22
|
-
startIcon: [t && `startIconLoading${c(i)}`],
|
|
23
|
-
endIcon: [t && `endIconLoading${c(i)}`],
|
|
24
|
-
loadingIndicator: ["loadingIndicator", t && `loadingIndicator${c(i)}`]
|
|
25
|
-
}, d = w(u, D, e);
|
|
26
|
-
return {
|
|
27
|
-
...e,
|
|
28
|
-
// forward the outlined, color, etc. classes to Button
|
|
29
|
-
...d
|
|
30
|
-
};
|
|
31
|
-
}, H = (o) => o !== "ownerState" && o !== "theme" && o !== "sx" && o !== "as" && o !== "classes", k = g(j, {
|
|
32
|
-
shouldForwardProp: (o) => H(o) || o === "classes",
|
|
33
|
-
name: "MuiLoadingButton",
|
|
34
|
-
slot: "Root",
|
|
35
|
-
overridesResolver: (o, t) => [t.root, t.startIconLoadingStart && {
|
|
36
|
-
[`& .${a.startIconLoadingStart}`]: t.startIconLoadingStart
|
|
37
|
-
}, t.endIconLoadingEnd && {
|
|
38
|
-
[`& .${a.endIconLoadingEnd}`]: t.endIconLoadingEnd
|
|
39
|
-
}]
|
|
40
|
-
})(v(({
|
|
41
|
-
theme: o
|
|
42
|
-
}) => ({
|
|
43
|
-
display: "inline-flex",
|
|
44
|
-
[`& .${a.startIconLoadingStart}, & .${a.endIconLoadingEnd}`]: {
|
|
45
|
-
transition: o.transitions.create(["opacity"], {
|
|
46
|
-
duration: o.transitions.duration.short
|
|
47
|
-
}),
|
|
48
|
-
opacity: 0
|
|
49
|
-
},
|
|
50
|
-
variants: [{
|
|
51
|
-
props: {
|
|
52
|
-
loadingPosition: "center"
|
|
53
|
-
},
|
|
54
|
-
style: {
|
|
55
|
-
transition: o.transitions.create(["background-color", "box-shadow", "border-color"], {
|
|
56
|
-
duration: o.transitions.duration.short
|
|
57
|
-
}),
|
|
58
|
-
[`&.${a.loading}`]: {
|
|
59
|
-
color: "transparent"
|
|
60
|
-
}
|
|
61
|
-
}
|
|
62
|
-
}, {
|
|
63
|
-
props: ({
|
|
64
|
-
ownerState: t
|
|
65
|
-
}) => t.loadingPosition === "start" && t.fullWidth,
|
|
66
|
-
style: {
|
|
67
|
-
[`& .${a.startIconLoadingStart}, & .${a.endIconLoadingEnd}`]: {
|
|
68
|
-
transition: o.transitions.create(["opacity"], {
|
|
69
|
-
duration: o.transitions.duration.short
|
|
70
|
-
}),
|
|
71
|
-
opacity: 0,
|
|
72
|
-
marginRight: -8
|
|
73
|
-
}
|
|
74
|
-
}
|
|
75
|
-
}, {
|
|
76
|
-
props: ({
|
|
77
|
-
ownerState: t
|
|
78
|
-
}) => t.loadingPosition === "end" && t.fullWidth,
|
|
79
|
-
style: {
|
|
80
|
-
[`& .${a.startIconLoadingStart}, & .${a.endIconLoadingEnd}`]: {
|
|
81
|
-
transition: o.transitions.create(["opacity"], {
|
|
82
|
-
duration: o.transitions.duration.short
|
|
83
|
-
}),
|
|
84
|
-
opacity: 0,
|
|
85
|
-
marginLeft: -8
|
|
86
|
-
}
|
|
87
|
-
}
|
|
88
|
-
}]
|
|
89
|
-
}))), G = g("span", {
|
|
90
|
-
name: "MuiLoadingButton",
|
|
91
|
-
slot: "LoadingIndicator",
|
|
92
|
-
overridesResolver: (o, t) => {
|
|
93
|
-
const {
|
|
94
|
-
ownerState: i
|
|
95
|
-
} = o;
|
|
96
|
-
return [t.loadingIndicator, t[`loadingIndicator${c(i.loadingPosition)}`]];
|
|
97
|
-
}
|
|
98
|
-
})(v(({
|
|
99
|
-
theme: o
|
|
100
|
-
}) => ({
|
|
101
|
-
position: "absolute",
|
|
102
|
-
visibility: "visible",
|
|
103
|
-
display: "flex",
|
|
104
|
-
variants: [{
|
|
105
|
-
props: {
|
|
106
|
-
loadingPosition: "start",
|
|
107
|
-
size: "small"
|
|
108
|
-
},
|
|
109
|
-
style: {
|
|
110
|
-
left: 10
|
|
111
|
-
}
|
|
112
|
-
}, {
|
|
113
|
-
props: ({
|
|
114
|
-
loadingPosition: t,
|
|
115
|
-
ownerState: i
|
|
116
|
-
}) => t === "start" && i.size !== "small",
|
|
117
|
-
style: {
|
|
118
|
-
left: 14
|
|
119
|
-
}
|
|
120
|
-
}, {
|
|
121
|
-
props: {
|
|
122
|
-
variant: "text",
|
|
123
|
-
loadingPosition: "start"
|
|
124
|
-
},
|
|
125
|
-
style: {
|
|
126
|
-
left: 6
|
|
127
|
-
}
|
|
128
|
-
}, {
|
|
129
|
-
props: {
|
|
130
|
-
loadingPosition: "center"
|
|
131
|
-
},
|
|
132
|
-
style: {
|
|
133
|
-
left: "50%",
|
|
134
|
-
transform: "translate(-50%)",
|
|
135
|
-
color: (o.vars || o).palette.action.disabled
|
|
136
|
-
}
|
|
137
|
-
}, {
|
|
138
|
-
props: {
|
|
139
|
-
loadingPosition: "end",
|
|
140
|
-
size: "small"
|
|
141
|
-
},
|
|
142
|
-
style: {
|
|
143
|
-
right: 10
|
|
144
|
-
}
|
|
145
|
-
}, {
|
|
146
|
-
props: ({
|
|
147
|
-
loadingPosition: t,
|
|
148
|
-
ownerState: i
|
|
149
|
-
}) => t === "end" && i.size !== "small",
|
|
150
|
-
style: {
|
|
151
|
-
right: 14
|
|
152
|
-
}
|
|
153
|
-
}, {
|
|
154
|
-
props: {
|
|
155
|
-
variant: "text",
|
|
156
|
-
loadingPosition: "end"
|
|
157
|
-
},
|
|
158
|
-
style: {
|
|
159
|
-
right: 6
|
|
160
|
-
}
|
|
161
|
-
}, {
|
|
162
|
-
props: ({
|
|
163
|
-
ownerState: t
|
|
164
|
-
}) => t.loadingPosition === "start" && t.fullWidth,
|
|
165
|
-
style: {
|
|
166
|
-
position: "relative",
|
|
167
|
-
left: -10
|
|
168
|
-
}
|
|
169
|
-
}, {
|
|
170
|
-
props: ({
|
|
171
|
-
ownerState: t
|
|
172
|
-
}) => t.loadingPosition === "end" && t.fullWidth,
|
|
173
|
-
style: {
|
|
174
|
-
position: "relative",
|
|
175
|
-
right: -10
|
|
176
|
-
}
|
|
177
|
-
}]
|
|
178
|
-
}))), h = g("span", {
|
|
179
|
-
name: "MuiLoadingButton",
|
|
180
|
-
slot: "Label",
|
|
181
|
-
overridesResolver: (o, t) => [t.label]
|
|
182
|
-
})({
|
|
183
|
-
display: "inherit",
|
|
184
|
-
alignItems: "inherit",
|
|
185
|
-
justifyContent: "inherit"
|
|
186
|
-
}), B = /* @__PURE__ */ P.forwardRef(function(t, i) {
|
|
187
|
-
const e = P.useContext(z), u = O(e, t), d = T({
|
|
188
|
-
props: u,
|
|
189
|
-
name: "MuiLoadingButton"
|
|
190
|
-
}), {
|
|
191
|
-
children: f,
|
|
192
|
-
disabled: I = !1,
|
|
193
|
-
id: x,
|
|
194
|
-
loading: p = !1,
|
|
195
|
-
loadingIndicator: $,
|
|
196
|
-
loadingPosition: C = "center",
|
|
197
|
-
variant: m = "text",
|
|
198
|
-
...E
|
|
199
|
-
} = d, L = U(x), b = $ ?? /* @__PURE__ */ r(N, {
|
|
200
|
-
"aria-labelledby": L,
|
|
201
|
-
color: "inherit",
|
|
202
|
-
size: 16
|
|
203
|
-
}), s = {
|
|
204
|
-
...d,
|
|
205
|
-
disabled: I,
|
|
206
|
-
loading: p,
|
|
207
|
-
loadingIndicator: b,
|
|
208
|
-
loadingPosition: C,
|
|
209
|
-
variant: m
|
|
210
|
-
}, l = F(s), y = p ? /* @__PURE__ */ r(G, {
|
|
211
|
-
className: l.loadingIndicator,
|
|
212
|
-
ownerState: s,
|
|
213
|
-
children: b
|
|
214
|
-
}) : null;
|
|
215
|
-
return /* @__PURE__ */ S(k, {
|
|
216
|
-
disabled: I || p,
|
|
217
|
-
id: L,
|
|
218
|
-
ref: i,
|
|
219
|
-
...E,
|
|
220
|
-
variant: m,
|
|
221
|
-
classes: l,
|
|
222
|
-
ownerState: s,
|
|
223
|
-
children: [s.loadingPosition === "end" ? /* @__PURE__ */ r(h, {
|
|
224
|
-
className: l.label,
|
|
225
|
-
children: f
|
|
226
|
-
}) : y, s.loadingPosition === "end" ? y : /* @__PURE__ */ r(h, {
|
|
227
|
-
className: l.label,
|
|
228
|
-
children: f
|
|
229
|
-
})]
|
|
230
|
-
});
|
|
231
|
-
});
|
|
232
|
-
process.env.NODE_ENV !== "production" && (B.propTypes = {
|
|
233
|
-
// ┌────────────────────────────── Warning ──────────────────────────────┐
|
|
234
|
-
// │ These PropTypes are generated from the TypeScript type definitions. │
|
|
235
|
-
// │ To update them, edit the d.ts file and run `pnpm proptypes`. │
|
|
236
|
-
// └─────────────────────────────────────────────────────────────────────┘
|
|
237
|
-
/**
|
|
238
|
-
* The content of the component.
|
|
239
|
-
*/
|
|
240
|
-
children: n.node,
|
|
241
|
-
/**
|
|
242
|
-
* Override or extend the styles applied to the component.
|
|
243
|
-
*/
|
|
244
|
-
classes: n.object,
|
|
245
|
-
/**
|
|
246
|
-
* If `true`, the component is disabled.
|
|
247
|
-
* @default false
|
|
248
|
-
*/
|
|
249
|
-
disabled: n.bool,
|
|
250
|
-
/**
|
|
251
|
-
* @ignore
|
|
252
|
-
*/
|
|
253
|
-
id: n.string,
|
|
254
|
-
/**
|
|
255
|
-
* If `true`, the loading indicator is shown and the button becomes disabled.
|
|
256
|
-
* @default false
|
|
257
|
-
*/
|
|
258
|
-
loading: n.bool,
|
|
259
|
-
/**
|
|
260
|
-
* Element placed before the children if the button is in loading state.
|
|
261
|
-
* The node should contain an element with `role="progressbar"` with an accessible name.
|
|
262
|
-
* By default we render a `CircularProgress` that is labelled by the button itself.
|
|
263
|
-
* @default <CircularProgress color="inherit" size={16} />
|
|
264
|
-
*/
|
|
265
|
-
loadingIndicator: n.node,
|
|
266
|
-
/**
|
|
267
|
-
* The loading indicator can be positioned on the start, end, or the center of the button.
|
|
268
|
-
* @default 'center'
|
|
269
|
-
*/
|
|
270
|
-
loadingPosition: W(n.oneOf(["start", "end", "center"]), (o) => o.loadingPosition === "start" && !o.startIcon ? new Error('MUI: The loadingPosition="start" should be used in combination with startIcon.') : o.loadingPosition === "end" && !o.endIcon ? new Error('MUI: The loadingPosition="end" should be used in combination with endIcon.') : null),
|
|
271
|
-
/**
|
|
272
|
-
* The system prop that allows defining system overrides as well as additional CSS styles.
|
|
273
|
-
*/
|
|
274
|
-
sx: n.oneOfType([n.arrayOf(n.oneOfType([n.func, n.object, n.bool])), n.func, n.object]),
|
|
275
|
-
/**
|
|
276
|
-
* The variant to use.
|
|
277
|
-
* @default 'text'
|
|
278
|
-
*/
|
|
279
|
-
variant: n.oneOfType([n.oneOf(["contained", "outlined", "text"]), n.string])
|
|
280
|
-
});
|
|
281
|
-
const V = g(B)(({ color: o, theme: t }) => ({
|
|
282
|
-
minHeight: 38,
|
|
283
|
-
textTransform: "none",
|
|
284
|
-
transition: "all 250ms cubic-bezier(0.4, 0, 0.2, 1) 0ms",
|
|
285
|
-
"&.MuiButton-outlined": {
|
|
286
|
-
borderRadius: 5,
|
|
287
|
-
borderWidth: 2
|
|
288
|
-
/* "&:hover": {
|
|
289
|
-
//backgroundColor: theme.palette[color].main,
|
|
290
|
-
color: theme.palette.common.white,
|
|
291
|
-
},*/
|
|
292
|
-
}
|
|
293
|
-
})), oo = ({
|
|
294
|
-
variant: o = "outlined",
|
|
295
|
-
...t
|
|
296
|
-
}) => /* @__PURE__ */ r(V, { variant: o, ...t });
|
|
1
|
+
import "react/jsx-runtime";
|
|
2
|
+
import "../../DefaultPropsProvider-CmOKr9hq.js";
|
|
3
|
+
import { B as p } from "../../Button-CSNPv43f.js";
|
|
297
4
|
export {
|
|
298
|
-
|
|
5
|
+
p as default
|
|
299
6
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("../../Button-C-bZSJCq.cjs");exports.Button=t.Button;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";const n=require("react/jsx-runtime"),t=require("../../
|
|
1
|
+
"use strict";const n=require("react/jsx-runtime"),t=require("../../CloseRounded-Cu-sn6XC.cjs"),c=require("@mui/material"),u=require("../../Dialog-BFZeovlo.cjs"),a=({children:s,showCloseButton:i=!0,...e})=>{const o=()=>{var l;return(l=e.onClose)==null?void 0:l.call(e,{},"escapeKeyDown")};return n.jsxs(u.Dialog,{...e,children:[i?n.jsx(c.IconButton,{"aria-label":"close",onClick:o,sx:{position:"absolute",right:16,top:16},children:n.jsx(t.CloseRounded,{})}):null,s]})};module.exports=a;
|
|
@@ -1,28 +1,26 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import { jsxs as i, jsx as n } from "react/jsx-runtime";
|
|
2
|
+
import { C as s } from "../../CloseRounded-Df8vYhLX.js";
|
|
3
3
|
import { IconButton as t } from "@mui/material";
|
|
4
|
-
import { D as
|
|
5
|
-
const
|
|
6
|
-
d: "M18.3 5.71a.996.996 0 0 0-1.41 0L12 10.59 7.11 5.7a.996.996 0 0 0-1.41 0c-.39.39-.39 1.02 0 1.41L10.59 12 5.7 16.89c-.39.39-.39 1.02 0 1.41s1.02.39 1.41 0L12 13.41l4.89 4.89c.39.39 1.02.39 1.41 0s.39-1.02 0-1.41L13.41 12l4.89-4.89c.38-.38.38-1.02 0-1.4"
|
|
7
|
-
}), "CloseRounded"), g = ({
|
|
4
|
+
import { D as c } from "../../Dialog-D0fzD-TX.js";
|
|
5
|
+
const f = ({
|
|
8
6
|
children: e,
|
|
9
7
|
showCloseButton: a = !0,
|
|
10
|
-
...
|
|
11
|
-
}) => /* @__PURE__ */ c
|
|
12
|
-
a ? /* @__PURE__ */
|
|
8
|
+
...l
|
|
9
|
+
}) => /* @__PURE__ */ i(c, { ...l, children: [
|
|
10
|
+
a ? /* @__PURE__ */ n(
|
|
13
11
|
t,
|
|
14
12
|
{
|
|
15
13
|
"aria-label": "close",
|
|
16
14
|
onClick: () => {
|
|
17
|
-
var
|
|
18
|
-
return (
|
|
15
|
+
var o;
|
|
16
|
+
return (o = l.onClose) == null ? void 0 : o.call(l, {}, "escapeKeyDown");
|
|
19
17
|
},
|
|
20
|
-
sx: { position: "absolute", right:
|
|
21
|
-
children: /* @__PURE__ */
|
|
18
|
+
sx: { position: "absolute", right: 16, top: 16 },
|
|
19
|
+
children: /* @__PURE__ */ n(s, {})
|
|
22
20
|
}
|
|
23
21
|
) : null,
|
|
24
22
|
e
|
|
25
23
|
] });
|
|
26
24
|
export {
|
|
27
|
-
|
|
25
|
+
f as default
|
|
28
26
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";const n=require("react/jsx-runtime"),o=require("@mui/material"),t=require("react"),x=({children:r,tooltipProps:l,typographyProps:c})=>{const[u,f]=t.useState(!1),e=t.useRef(null);return t.useEffect(()=>{const s=()=>{if(e.current){const{scrollWidth:p,clientWidth:a}=e.current;f(p>a)}},i=new ResizeObserver(()=>{s()});return e.current&&i.observe(e.current),s(),()=>{e.current&&i.unobserve(e.current)}},[]),n.jsx(o.Tooltip,{disableHoverListener:!u,title:r,...l,children:n.jsx(o.Typography,{ref:e,noWrap:!0,overflow:"hidden",textOverflow:"ellipsis",...c,children:r})})};module.exports=x;
|
|
1
|
+
"use strict";const n=require("react/jsx-runtime"),o=require("@mui/material"),t=require("react"),x=({children:r,tooltipProps:l,typographyProps:c})=>{const[u,f]=t.useState(!1),e=t.useRef(null);return t.useEffect(()=>{const s=()=>{if(e.current){const{scrollWidth:p,clientWidth:a}=e.current;f(p>a)}},i=new ResizeObserver(()=>{s()});return e.current&&i.observe(e.current),s(),()=>{e.current&&i.unobserve(e.current)}},[]),n.jsx(o.Tooltip,{disableHoverListener:!u,title:r,...l,children:n.jsx(o.Typography,{ref:e,noWrap:!0,overflow:"hidden",textOverflow:"ellipsis",...c,maxWidth:"100%",children:r})})};module.exports=x;
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { jsx as i } from "react/jsx-runtime";
|
|
2
2
|
import { Tooltip as p, Typography as d } from "@mui/material";
|
|
3
|
-
import { useState as a, useRef as
|
|
3
|
+
import { useState as a, useRef as h, useEffect as m } from "react";
|
|
4
4
|
const E = ({
|
|
5
5
|
children: t,
|
|
6
6
|
tooltipProps: o,
|
|
7
7
|
typographyProps: l
|
|
8
8
|
}) => {
|
|
9
|
-
const [n, c] = a(!1), e =
|
|
10
|
-
return
|
|
9
|
+
const [n, c] = a(!1), e = h(null);
|
|
10
|
+
return m(() => {
|
|
11
11
|
const r = () => {
|
|
12
12
|
if (e.current) {
|
|
13
13
|
const { scrollWidth: f, clientWidth: u } = e.current;
|
|
@@ -33,6 +33,7 @@ const E = ({
|
|
|
33
33
|
overflow: "hidden",
|
|
34
34
|
textOverflow: "ellipsis",
|
|
35
35
|
...l,
|
|
36
|
+
maxWidth: "100%",
|
|
36
37
|
children: t
|
|
37
38
|
}
|
|
38
39
|
)
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const c=require("react/jsx-runtime"),e=require("../../createSvgIcon-CWNQW6u6.cjs"),s=e.createSvgIcon(c.jsx("path",{d:"M20 4H4c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2M8 11H4V6h4zm6 0h-4V6h4zm6 0h-4V6h4zM8 18H4v-5h4zm6 0h-4v-5h4zm6 0h-4v-5h4z"}),"CalendarViewMonthRounded"),n=e.createSvgIcon(c.jsx("path",{d:"M8 16h8v2H8zm0-4h8v2H8zm6-10H6c-1.1 0-2 .9-2 2v16c0 1.1.89 2 1.99 2H18c1.1 0 2-.9 2-2V8zm4 18H6V4h7v5h5z"}),"DescriptionOutlined"),h=e.createSvgIcon(c.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-2V8zM6 20V4h7v5h5v11z"}),"InsertDriveFileOutlined"),a=e.createSvgIcon(c.jsx("path",{d:"M4 6.47 5.76 10H20v8H4zM22 4h-4l2 4h-3l-2-4h-2l2 4h-3l-2-4H8l2 4H7L5 4H4c-1.1 0-1.99.9-1.99 2L2 18c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2z"}),"MovieOutlined"),o=e.createSvgIcon(c.jsx("path",{d:"M12 5v8.55c-.94-.54-2.1-.75-3.33-.32-1.34.48-2.37 1.67-2.61 3.07-.46 2.74 1.86 5.08 4.59 4.65 1.96-.31 3.35-2.11 3.35-4.1V7h2c1.1 0 2-.9 2-2s-.9-2-2-2h-2c-1.1 0-2 .9-2 2"}),"MusicNoteRounded"),r=e.createSvgIcon(c.jsx("path",{d:"M21 3H3c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h5v1c0 .55.45 1 1 1h6c.55 0 1-.45 1-1v-1h5c1.1 0 1.99-.9 1.99-2L23 5c0-1.11-.9-2-2-2m-1 14H4c-.55 0-1-.45-1-1V6c0-.55.45-1 1-1h16c.55 0 1 .45 1 1v10c0 .55-.45 1-1 1m-5.52-5.13-3.98 2.28c-.67.38-1.5-.11-1.5-.87V8.72c0-.77.83-1.25 1.5-.87l3.98 2.28c.67.39.67 1.35 0 1.74"}),"OndemandVideoRounded"),d=e.createSvgIcon(c.jsx("path",{d:"M19 5v14H5V5zm0-2H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2m-4.86 8.86-3 3.87L9 13.14 6 17h12z"}),"PhotoOutlined"),v=e.createSvgIcon(c.jsx("path",{d:"M20 2H8c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2V4c0-1.1-.9-2-2-2m0 14H8V4h12zM4 6H2v14c0 1.1.9 2 2 2h14v-2H4zm12 6V9c0-.55-.45-1-1-1h-2v5h2c.55 0 1-.45 1-1m-2-3h1v3h-1zm4 2h1v-1h-1V9h1V8h-2v5h1zm-8 0h1c.55 0 1-.45 1-1V9c0-.55-.45-1-1-1H9v5h1zm0-2h1v1h-1z"}),"PictureAsPdfOutlined"),i=({extension:t})=>{switch(t.toUpperCase()){case"MP3":case"MIDI":case"WAV":return c.jsx(o,{});case"JPG":case"JPEG":case"PNG":case"SVG":return c.jsx(d,{});case"MP4":case"MOV":case"AVI":return c.jsx(a,{});case"CSV":case"ODS":case"XLS":case"XLSX":return c.jsx(s,{});case"PDF":return c.jsx(v,{});case"ODT":case"DOC":case"DOCX":case"TXT":return c.jsx(n,{});case"ODP":case"PPT":case"PPTX":return c.jsx(r,{});default:return c.jsx(h,{})}};exports.FileIcon=i;
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
import { jsx as c } from "react/jsx-runtime";
|
|
2
|
+
import { c as e } from "../../createSvgIcon-Cd6y8E9W.js";
|
|
3
|
+
const t = e(/* @__PURE__ */ c("path", {
|
|
4
|
+
d: "M20 4H4c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2M8 11H4V6h4zm6 0h-4V6h4zm6 0h-4V6h4zM8 18H4v-5h4zm6 0h-4v-5h4zm6 0h-4v-5h4z"
|
|
5
|
+
}), "CalendarViewMonthRounded"), n = e(/* @__PURE__ */ c("path", {
|
|
6
|
+
d: "M8 16h8v2H8zm0-4h8v2H8zm6-10H6c-1.1 0-2 .9-2 2v16c0 1.1.89 2 1.99 2H18c1.1 0 2-.9 2-2V8zm4 18H6V4h7v5h5z"
|
|
7
|
+
}), "DescriptionOutlined"), s = e(/* @__PURE__ */ c("path", {
|
|
8
|
+
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-2V8zM6 20V4h7v5h5v11z"
|
|
9
|
+
}), "InsertDriveFileOutlined"), d = e(/* @__PURE__ */ c("path", {
|
|
10
|
+
d: "M4 6.47 5.76 10H20v8H4zM22 4h-4l2 4h-3l-2-4h-2l2 4h-3l-2-4H8l2 4H7L5 4H4c-1.1 0-1.99.9-1.99 2L2 18c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2z"
|
|
11
|
+
}), "MovieOutlined"), a = e(/* @__PURE__ */ c("path", {
|
|
12
|
+
d: "M12 5v8.55c-.94-.54-2.1-.75-3.33-.32-1.34.48-2.37 1.67-2.61 3.07-.46 2.74 1.86 5.08 4.59 4.65 1.96-.31 3.35-2.11 3.35-4.1V7h2c1.1 0 2-.9 2-2s-.9-2-2-2h-2c-1.1 0-2 .9-2 2"
|
|
13
|
+
}), "MusicNoteRounded"), o = e(/* @__PURE__ */ c("path", {
|
|
14
|
+
d: "M21 3H3c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h5v1c0 .55.45 1 1 1h6c.55 0 1-.45 1-1v-1h5c1.1 0 1.99-.9 1.99-2L23 5c0-1.11-.9-2-2-2m-1 14H4c-.55 0-1-.45-1-1V6c0-.55.45-1 1-1h16c.55 0 1 .45 1 1v10c0 .55-.45 1-1 1m-5.52-5.13-3.98 2.28c-.67.38-1.5-.11-1.5-.87V8.72c0-.77.83-1.25 1.5-.87l3.98 2.28c.67.39.67 1.35 0 1.74"
|
|
15
|
+
}), "OndemandVideoRounded"), r = e(/* @__PURE__ */ c("path", {
|
|
16
|
+
d: "M19 5v14H5V5zm0-2H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2m-4.86 8.86-3 3.87L9 13.14 6 17h12z"
|
|
17
|
+
}), "PhotoOutlined"), i = e(/* @__PURE__ */ c("path", {
|
|
18
|
+
d: "M20 2H8c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2V4c0-1.1-.9-2-2-2m0 14H8V4h12zM4 6H2v14c0 1.1.9 2 2 2h14v-2H4zm12 6V9c0-.55-.45-1-1-1h-2v5h2c.55 0 1-.45 1-1m-2-3h1v3h-1zm4 2h1v-1h-1V9h1V8h-2v5h1zm-8 0h1c.55 0 1-.45 1-1V9c0-.55-.45-1-1-1H9v5h1zm0-2h1v1h-1z"
|
|
19
|
+
}), "PictureAsPdfOutlined"), V = ({ extension: h }) => {
|
|
20
|
+
switch (h.toUpperCase()) {
|
|
21
|
+
case "MP3":
|
|
22
|
+
case "MIDI":
|
|
23
|
+
case "WAV":
|
|
24
|
+
return /* @__PURE__ */ c(a, {});
|
|
25
|
+
case "JPG":
|
|
26
|
+
case "JPEG":
|
|
27
|
+
case "PNG":
|
|
28
|
+
case "SVG":
|
|
29
|
+
return /* @__PURE__ */ c(r, {});
|
|
30
|
+
case "MP4":
|
|
31
|
+
case "MOV":
|
|
32
|
+
case "AVI":
|
|
33
|
+
return /* @__PURE__ */ c(d, {});
|
|
34
|
+
case "CSV":
|
|
35
|
+
case "ODS":
|
|
36
|
+
case "XLS":
|
|
37
|
+
case "XLSX":
|
|
38
|
+
return /* @__PURE__ */ c(t, {});
|
|
39
|
+
case "PDF":
|
|
40
|
+
return /* @__PURE__ */ c(i, {});
|
|
41
|
+
case "ODT":
|
|
42
|
+
case "DOC":
|
|
43
|
+
case "DOCX":
|
|
44
|
+
case "TXT":
|
|
45
|
+
return /* @__PURE__ */ c(n, {});
|
|
46
|
+
case "ODP":
|
|
47
|
+
case "PPT":
|
|
48
|
+
case "PPTX":
|
|
49
|
+
return /* @__PURE__ */ c(o, {});
|
|
50
|
+
default:
|
|
51
|
+
return /* @__PURE__ */ c(s, {});
|
|
52
|
+
}
|
|
53
|
+
};
|
|
54
|
+
export {
|
|
55
|
+
V as FileIcon
|
|
56
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),r=require("@mui/material"),t=()=>e.jsx(r.Stack,{height:"100%",children:e.jsx(r.Stack,{height:"4px",width:"4px",borderRadius:"50%",sx:{backgroundColor:"divider"}})});exports.FileInfosSeparator=t;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const FileInfosSeparator: () => import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { jsx as r } from "react/jsx-runtime";
|
|
2
|
+
import { Stack as o } from "@mui/material";
|
|
3
|
+
const e = () => /* @__PURE__ */ r(o, { height: "100%", children: /* @__PURE__ */ r(
|
|
4
|
+
o,
|
|
5
|
+
{
|
|
6
|
+
height: "4px",
|
|
7
|
+
width: "4px",
|
|
8
|
+
borderRadius: "50%",
|
|
9
|
+
sx: { backgroundColor: "divider" }
|
|
10
|
+
}
|
|
11
|
+
) });
|
|
12
|
+
export {
|
|
13
|
+
e as FileInfosSeparator
|
|
14
|
+
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";const
|
|
1
|
+
"use strict";const e=require("react/jsx-runtime"),c=require("@mui/material");require("react");const l=require("./FileListItem.cjs.js"),x=require("../../Box-CVaz7diG.cjs"),u=({files:i,onDelete:t,onClick:s,onDownload:n})=>e.jsx(x.Box,{sx:{display:"flex",flexDirection:"column"},children:i.map((o,r)=>e.jsxs(e.Fragment,{children:[e.jsx(l,{file:o,onClick:s,onDelete:t,onDownload:n},r),r<i.length-1&&e.jsx(c.Divider,{variant:"middle"})]}))});module.exports=u;
|
|
@@ -1,7 +1,9 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export interface FileListProps<T extends
|
|
1
|
+
import { CustomFile } from './FileListItem';
|
|
2
|
+
export interface FileListProps<T extends CustomFile> {
|
|
3
3
|
files: T[];
|
|
4
4
|
onDelete?: (file: T) => void;
|
|
5
|
+
onClick?: (file: T) => void;
|
|
6
|
+
onDownload?: (file: T) => void;
|
|
5
7
|
}
|
|
6
|
-
declare const FileList: <T extends
|
|
8
|
+
declare const FileList: <T extends CustomFile>({ files, onDelete, onClick, onDownload, }: FileListProps<T>) => import("react/jsx-runtime").JSX.Element;
|
|
7
9
|
export default FileList;
|
|
@@ -1,17 +1,26 @@
|
|
|
1
|
-
import { jsx as r } from "react/jsx-runtime";
|
|
1
|
+
import { jsx as r, jsxs as s, Fragment as a } from "react/jsx-runtime";
|
|
2
|
+
import { Divider as n } from "@mui/material";
|
|
2
3
|
import "react";
|
|
3
|
-
import
|
|
4
|
-
import { B as
|
|
5
|
-
const
|
|
6
|
-
files: i
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
4
|
+
import p from "./FileListItem.es.js";
|
|
5
|
+
import { B as d } from "../../Box-Cpg9IWKr.js";
|
|
6
|
+
const F = ({
|
|
7
|
+
files: i,
|
|
8
|
+
onDelete: m,
|
|
9
|
+
onClick: o,
|
|
10
|
+
onDownload: e
|
|
11
|
+
}) => /* @__PURE__ */ r(d, { sx: { display: "flex", flexDirection: "column" }, children: i.map((l, t) => /* @__PURE__ */ s(a, { children: [
|
|
12
|
+
/* @__PURE__ */ r(
|
|
13
|
+
p,
|
|
14
|
+
{
|
|
15
|
+
file: l,
|
|
16
|
+
onClick: o,
|
|
17
|
+
onDelete: m,
|
|
18
|
+
onDownload: e
|
|
19
|
+
},
|
|
20
|
+
t
|
|
21
|
+
),
|
|
22
|
+
t < i.length - 1 && /* @__PURE__ */ r(n, { variant: "middle" })
|
|
23
|
+
] })) });
|
|
15
24
|
export {
|
|
16
|
-
|
|
25
|
+
F as default
|
|
17
26
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";const
|
|
1
|
+
"use strict";const e=require("react/jsx-runtime"),r=require("@mui/material"),g=require("../EllipsisWithTooltip/EllipsisWithTooltip.cjs.js"),y=require("./FileIcon.cjs.js"),x=require("./FileInfosSeparator.cjs.js"),p=require("./utils.cjs.js"),s=require("../../Stack-B68ooSQ-.cjs"),d=require("../../Typography-Y-OGmT9M.cjs"),j=require("../../createSvgIcon-CWNQW6u6.cjs"),S=require("../../CloseRounded-Cu-sn6XC.cjs"),I=j.createSvgIcon(e.jsx("path",{d:"M16.59 9H15V4c0-.55-.45-1-1-1h-4c-.55 0-1 .45-1 1v5H7.41c-.89 0-1.34 1.08-.71 1.71l4.59 4.59c.39.39 1.02.39 1.41 0l4.59-4.59c.63-.63.19-1.71-.7-1.71M5 19c0 .55.45 1 1 1h12c.55 0 1-.45 1-1s-.45-1-1-1H6c-.55 0-1 .45-1 1"}),"DownloadRounded"),b=({file:n,onDelete:i,onClick:c,onDownload:a})=>{if(!n.name)return null;const o=p.displaySize(n.size),t=p.displayExtension(n.name),h=()=>c==null?void 0:c(n),m=l=>{l.stopPropagation(),i==null||i(n)},u=l=>{l.stopPropagation(),a==null||a(n)};return e.jsxs(s.Stack,{direction:"row",alignItems:"center",spacing:2,padding:"0.5rem 1rem",width:"100%",justifyContent:"space-between",onClick:h,boxSizing:"border-box",sx:{"&:hover":{boxShadow:"0 4px 8px rgba(192, 192, 192, 0.3)",borderRadius:"4px",cursor:"pointer"}},children:[e.jsxs(s.Stack,{direction:"row",alignItems:"center",spacing:2,minWidth:"0",children:[e.jsx(s.Stack,{borderRadius:"4px",minWidth:"40px",maxWidth:"40px",minHeight:"40px",maxHeight:"40px",display:"flex",alignItems:"center",justifyContent:"center",sx:{backgroundColor:"grey.light"},children:e.jsx(r.Box,{color:"text.secondary",alignItems:"center",justifyContent:"center",display:"flex",children:e.jsx(y.FileIcon,{extension:t??""})})}),e.jsxs(s.Stack,{direction:"column",spacing:0,alignItems:"flex-start",minWidth:"0",children:[e.jsx(g,{children:n.name}),e.jsxs(s.Stack,{display:"flex",flexDirection:"row",alignItems:"center",gap:1,children:[o&&e.jsx(d.Typography,{fontSize:"0.8rem",color:"text.secondary",children:o+"coucou"}),o&&t&&e.jsx(x.FileInfosSeparator,{}),t&&e.jsx(d.Typography,{fontSize:"0.8rem",color:"text.secondary",children:t}),n.ownerName&&(o||t)&&e.jsx(x.FileInfosSeparator,{}),n.ownerName&&e.jsx(d.Typography,{fontSize:"0.8rem",color:"text.secondary",children:n.ownerName})]})]})]}),e.jsxs(r.Box,{alignItems:"center",display:"flex",gap:"1rem",children:[n.isLoading?e.jsx(r.Box,{marginRight:1,children:e.jsx(r.CircularProgress,{size:24,color:"primary"})}):n.isDownloadable?e.jsx(r.IconButton,{onClick:u,children:e.jsx(I,{color:"primary"})}):null,n.isDeletable&&e.jsx(r.IconButton,{onClick:m,children:e.jsx(S.CloseRounded,{})})]})]})};module.exports=b;
|
|
@@ -1,12 +1,16 @@
|
|
|
1
|
-
export interface
|
|
1
|
+
export interface CustomFile {
|
|
2
2
|
name: string;
|
|
3
3
|
size: number;
|
|
4
|
-
|
|
4
|
+
isLoading?: boolean;
|
|
5
|
+
isDeletable?: boolean;
|
|
6
|
+
isDownloadable?: boolean;
|
|
7
|
+
ownerName?: string;
|
|
5
8
|
}
|
|
6
|
-
export interface FileListItemProps<T extends
|
|
9
|
+
export interface FileListItemProps<T extends CustomFile> {
|
|
7
10
|
file: T;
|
|
8
|
-
uploading?: boolean;
|
|
9
11
|
onDelete?: (file: T) => void;
|
|
12
|
+
onClick?: (file: T) => void;
|
|
13
|
+
onDownload?: (file: T) => void;
|
|
10
14
|
}
|
|
11
|
-
declare const FileListItem: <T extends
|
|
15
|
+
declare const FileListItem: <T extends CustomFile>({ file, onDelete, onClick, onDownload, }: FileListItemProps<T>) => import("react/jsx-runtime").JSX.Element | null;
|
|
12
16
|
export default FileListItem;
|