@cgi-learning-hub/ui 1.3.3-dev.1732618892 → 1.3.3-dev.1732627187
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/Delete-Bb_PhA6v.cjs +1 -0
- package/dist/Delete-Dip-1l7n.js +8 -0
- package/dist/components/Dropzone/Dropzone.cjs.js +1 -5
- package/dist/components/Dropzone/Dropzone.es.js +24 -2162
- package/dist/components/FileList/FileListItem.cjs.js +1 -1
- package/dist/components/FileList/FileListItem.es.js +20 -21
- package/dist/components/ImagePicker/ImagePicker.cjs.js +1 -0
- package/dist/components/ImagePicker/ImagePicker.d.ts +12 -0
- package/dist/components/ImagePicker/ImagePicker.es.js +176 -0
- package/dist/components/ImagePicker/index.cjs.js +1 -0
- package/dist/components/ImagePicker/index.d.ts +2 -0
- package/dist/components/ImagePicker/index.es.js +4 -0
- package/dist/components/PasswordInput/PasswordInput.cjs.js +1 -1
- package/dist/components/PasswordInput/PasswordInput.es.js +3 -2
- package/dist/components/index.cjs.js +1 -1
- package/dist/components/index.d.ts +1 -0
- package/dist/components/index.es.js +173 -171
- package/dist/components/stories/Dialog.stories.cjs.js +1 -1
- package/dist/components/stories/Dialog.stories.es.js +17 -37
- package/dist/components/stories/ImagePicker.stories.cjs.js +1 -0
- package/dist/components/stories/ImagePicker.stories.d.ts +6 -0
- package/dist/components/stories/ImagePicker.stories.es.js +50 -0
- package/dist/components/stories/TabList.stories.cjs.js +1 -1
- package/dist/components/stories/TabList.stories.es.js +89 -139
- package/dist/index-BtGBke8y.js +2141 -0
- package/dist/index-CEgiY5tJ.cjs +5 -0
- package/dist/index.cjs.js +1 -1
- package/dist/index.es.js +173 -171
- package/package.json +1 -1
|
@@ -1,32 +1,31 @@
|
|
|
1
|
-
import { jsx as
|
|
1
|
+
import { jsx as s, jsxs as T } from "react/jsx-runtime";
|
|
2
2
|
import * as r from "react";
|
|
3
|
-
import {
|
|
4
|
-
import { P as o, I, H as M, G as O } from "../../identifier-B7MO0PvI.js";
|
|
3
|
+
import { P as n, I as M, H as O, G as w } from "../../identifier-B7MO0PvI.js";
|
|
5
4
|
import { a as R, T as f } from "../../Tabs-BqJSX1la.js";
|
|
6
|
-
import { s as
|
|
7
|
-
import { u as
|
|
5
|
+
import { s as D, c as U } from "../../DefaultPropsProvider-BYFwNPLt.js";
|
|
6
|
+
import { u as I } from "../../useThemeProps-B9UyPpzT.js";
|
|
8
7
|
const b = /* @__PURE__ */ r.createContext(null);
|
|
9
8
|
process.env.NODE_ENV !== "production" && (b.displayName = "TabContext");
|
|
10
|
-
function
|
|
11
|
-
const [e,
|
|
9
|
+
function $() {
|
|
10
|
+
const [e, o] = r.useState(null);
|
|
12
11
|
return r.useEffect(() => {
|
|
13
|
-
|
|
12
|
+
o(`mui-p-${Math.round(Math.random() * 1e5)}`);
|
|
14
13
|
}, []), e;
|
|
15
14
|
}
|
|
16
|
-
function
|
|
15
|
+
function v(e) {
|
|
17
16
|
const {
|
|
18
|
-
children:
|
|
19
|
-
value:
|
|
20
|
-
} = e, a =
|
|
17
|
+
children: o,
|
|
18
|
+
value: t
|
|
19
|
+
} = e, a = $(), c = r.useMemo(() => ({
|
|
21
20
|
idPrefix: a,
|
|
22
|
-
value:
|
|
23
|
-
}), [a,
|
|
24
|
-
return /* @__PURE__ */
|
|
25
|
-
value:
|
|
26
|
-
children:
|
|
21
|
+
value: t
|
|
22
|
+
}), [a, t]);
|
|
23
|
+
return /* @__PURE__ */ s(b.Provider, {
|
|
24
|
+
value: c,
|
|
25
|
+
children: o
|
|
27
26
|
});
|
|
28
27
|
}
|
|
29
|
-
process.env.NODE_ENV !== "production" && (
|
|
28
|
+
process.env.NODE_ENV !== "production" && (v.propTypes = {
|
|
30
29
|
// ┌────────────────────────────── Warning ──────────────────────────────┐
|
|
31
30
|
// │ These PropTypes are generated from the TypeScript type definitions. │
|
|
32
31
|
// │ To update them, edit the d.ts file and run `pnpm proptypes`. │
|
|
@@ -34,47 +33,47 @@ process.env.NODE_ENV !== "production" && (h.propTypes = {
|
|
|
34
33
|
/**
|
|
35
34
|
* The content of the component.
|
|
36
35
|
*/
|
|
37
|
-
children:
|
|
36
|
+
children: n.node,
|
|
38
37
|
/**
|
|
39
38
|
* The value of the currently selected `Tab`.
|
|
40
39
|
*/
|
|
41
|
-
value:
|
|
40
|
+
value: n.oneOfType([n.number, n.string]).isRequired
|
|
42
41
|
});
|
|
43
|
-
function
|
|
42
|
+
function h() {
|
|
44
43
|
return r.useContext(b);
|
|
45
44
|
}
|
|
46
|
-
function
|
|
45
|
+
function P(e, o) {
|
|
47
46
|
const {
|
|
48
|
-
idPrefix:
|
|
47
|
+
idPrefix: t
|
|
49
48
|
} = e;
|
|
50
|
-
return
|
|
49
|
+
return t === null ? null : `${e.idPrefix}-P-${o}`;
|
|
51
50
|
}
|
|
52
|
-
function x(e,
|
|
51
|
+
function x(e, o) {
|
|
53
52
|
const {
|
|
54
|
-
idPrefix:
|
|
53
|
+
idPrefix: t
|
|
55
54
|
} = e;
|
|
56
|
-
return
|
|
55
|
+
return t === null ? null : `${e.idPrefix}-T-${o}`;
|
|
57
56
|
}
|
|
58
|
-
const
|
|
57
|
+
const y = /* @__PURE__ */ r.forwardRef(function(o, t) {
|
|
59
58
|
const {
|
|
60
59
|
children: a,
|
|
61
|
-
...
|
|
62
|
-
} =
|
|
63
|
-
if (
|
|
60
|
+
...c
|
|
61
|
+
} = o, i = h();
|
|
62
|
+
if (i === null)
|
|
64
63
|
throw new TypeError("No TabContext provided");
|
|
65
|
-
const
|
|
64
|
+
const l = r.Children.map(a, (u) => /* @__PURE__ */ r.isValidElement(u) ? /* @__PURE__ */ r.cloneElement(u, {
|
|
66
65
|
// SOMEDAY: `Tabs` will set those themselves
|
|
67
|
-
"aria-controls":
|
|
68
|
-
id: x(
|
|
66
|
+
"aria-controls": P(i, u.props.value),
|
|
67
|
+
id: x(i, u.props.value)
|
|
69
68
|
}) : null);
|
|
70
|
-
return /* @__PURE__ */
|
|
71
|
-
...
|
|
72
|
-
ref:
|
|
73
|
-
value:
|
|
74
|
-
children:
|
|
69
|
+
return /* @__PURE__ */ s(R, {
|
|
70
|
+
...c,
|
|
71
|
+
ref: t,
|
|
72
|
+
value: i.value,
|
|
73
|
+
children: l
|
|
75
74
|
});
|
|
76
75
|
});
|
|
77
|
-
process.env.NODE_ENV !== "production" && (
|
|
76
|
+
process.env.NODE_ENV !== "production" && (y.propTypes = {
|
|
78
77
|
// ┌────────────────────────────── Warning ──────────────────────────────┐
|
|
79
78
|
// │ These PropTypes are generated from the TypeScript type definitions. │
|
|
80
79
|
// │ To update them, edit the d.ts file and run `pnpm proptypes`. │
|
|
@@ -82,54 +81,54 @@ process.env.NODE_ENV !== "production" && (C.propTypes = {
|
|
|
82
81
|
/**
|
|
83
82
|
* A list of `<Tab />` elements.
|
|
84
83
|
*/
|
|
85
|
-
children:
|
|
84
|
+
children: n.node
|
|
86
85
|
});
|
|
87
|
-
function
|
|
88
|
-
return
|
|
86
|
+
function j(e) {
|
|
87
|
+
return O("MuiTabPanel", e);
|
|
89
88
|
}
|
|
90
|
-
|
|
91
|
-
const
|
|
89
|
+
M("MuiTabPanel", ["root", "hidden"]);
|
|
90
|
+
const V = (e) => {
|
|
92
91
|
const {
|
|
93
|
-
classes:
|
|
94
|
-
hidden:
|
|
92
|
+
classes: o,
|
|
93
|
+
hidden: t
|
|
95
94
|
} = e;
|
|
96
|
-
return
|
|
97
|
-
root: ["root",
|
|
98
|
-
},
|
|
99
|
-
},
|
|
95
|
+
return U({
|
|
96
|
+
root: ["root", t && "hidden"]
|
|
97
|
+
}, j, o);
|
|
98
|
+
}, L = D("div", {
|
|
100
99
|
name: "MuiTabPanel",
|
|
101
100
|
slot: "Root",
|
|
102
|
-
overridesResolver: (e,
|
|
101
|
+
overridesResolver: (e, o) => o.root
|
|
103
102
|
})(({
|
|
104
103
|
theme: e
|
|
105
104
|
}) => ({
|
|
106
105
|
padding: e.spacing(3)
|
|
107
|
-
})), p = /* @__PURE__ */ r.forwardRef(function(
|
|
108
|
-
const a =
|
|
109
|
-
props:
|
|
106
|
+
})), p = /* @__PURE__ */ r.forwardRef(function(o, t) {
|
|
107
|
+
const a = I({
|
|
108
|
+
props: o,
|
|
110
109
|
name: "MuiTabPanel"
|
|
111
110
|
}), {
|
|
112
|
-
children:
|
|
113
|
-
className:
|
|
114
|
-
value:
|
|
111
|
+
children: c,
|
|
112
|
+
className: i,
|
|
113
|
+
value: l,
|
|
115
114
|
keepMounted: u = !1,
|
|
116
|
-
...
|
|
115
|
+
...C
|
|
117
116
|
} = a, m = {
|
|
118
117
|
...a
|
|
119
|
-
},
|
|
118
|
+
}, N = V(m), d = h();
|
|
120
119
|
if (d === null)
|
|
121
120
|
throw new TypeError("No TabContext provided");
|
|
122
|
-
const
|
|
123
|
-
return /* @__PURE__ */
|
|
124
|
-
"aria-labelledby":
|
|
125
|
-
className:
|
|
126
|
-
hidden:
|
|
127
|
-
id:
|
|
128
|
-
ref:
|
|
121
|
+
const E = P(d, l), g = x(d, l);
|
|
122
|
+
return /* @__PURE__ */ s(L, {
|
|
123
|
+
"aria-labelledby": g,
|
|
124
|
+
className: w(N.root, i),
|
|
125
|
+
hidden: l !== d.value,
|
|
126
|
+
id: E,
|
|
127
|
+
ref: t,
|
|
129
128
|
role: "tabpanel",
|
|
130
129
|
ownerState: m,
|
|
131
|
-
...
|
|
132
|
-
children: (u ||
|
|
130
|
+
...C,
|
|
131
|
+
children: (u || l === d.value) && c
|
|
133
132
|
});
|
|
134
133
|
});
|
|
135
134
|
process.env.NODE_ENV !== "production" && (p.propTypes = {
|
|
@@ -140,97 +139,48 @@ process.env.NODE_ENV !== "production" && (p.propTypes = {
|
|
|
140
139
|
/**
|
|
141
140
|
* The content of the component.
|
|
142
141
|
*/
|
|
143
|
-
children:
|
|
142
|
+
children: n.node,
|
|
144
143
|
/**
|
|
145
144
|
* Override or extend the styles applied to the component.
|
|
146
145
|
*/
|
|
147
|
-
classes:
|
|
146
|
+
classes: n.object,
|
|
148
147
|
/**
|
|
149
148
|
* @ignore
|
|
150
149
|
*/
|
|
151
|
-
className:
|
|
150
|
+
className: n.string,
|
|
152
151
|
/**
|
|
153
152
|
* Always keep the children in the DOM.
|
|
154
153
|
* @default false
|
|
155
154
|
*/
|
|
156
|
-
keepMounted:
|
|
155
|
+
keepMounted: n.bool,
|
|
157
156
|
/**
|
|
158
157
|
* The system prop that allows defining system overrides as well as additional CSS styles.
|
|
159
158
|
*/
|
|
160
|
-
sx:
|
|
159
|
+
sx: n.oneOfType([n.arrayOf(n.oneOfType([n.func, n.object, n.bool])), n.func, n.object]),
|
|
161
160
|
/**
|
|
162
161
|
* The `value` of the corresponding `Tab`. Must use the index of the `Tab` when
|
|
163
162
|
* no `value` was passed to `Tab`.
|
|
164
163
|
*/
|
|
165
|
-
value:
|
|
164
|
+
value: n.oneOfType([n.number, n.string]).isRequired
|
|
166
165
|
});
|
|
167
|
-
const
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
/* @__PURE__ */
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
/* @__PURE__ */ l(f, { label: "Item one", value: "1" }),
|
|
178
|
-
/* @__PURE__ */ l(f, { label: "Item two", value: "2" }),
|
|
179
|
-
/* @__PURE__ */ l(f, { label: "Item three", value: "3" })
|
|
180
|
-
]
|
|
181
|
-
}
|
|
182
|
-
),
|
|
183
|
-
/* @__PURE__ */ l(p, { value: "1", children: "Item one" }),
|
|
184
|
-
/* @__PURE__ */ l(p, { value: "2", children: "Item two" }),
|
|
185
|
-
/* @__PURE__ */ l(p, { value: "3", children: "Item three" })
|
|
186
|
-
] });
|
|
187
|
-
}, W = {
|
|
166
|
+
const _ = (e) => /* @__PURE__ */ T(v, { value: "1", children: [
|
|
167
|
+
/* @__PURE__ */ T(y, { ...e, "aria-label": "lab API tabs example", children: [
|
|
168
|
+
/* @__PURE__ */ s(f, { label: "Utilisateurs", value: "1" }),
|
|
169
|
+
/* @__PURE__ */ s(f, { label: "Groupes", value: "2" }),
|
|
170
|
+
/* @__PURE__ */ s(f, { label: "Demandes d'inscription", value: "3" })
|
|
171
|
+
] }),
|
|
172
|
+
/* @__PURE__ */ s(p, { value: "1", children: "Utilisateurs" }),
|
|
173
|
+
/* @__PURE__ */ s(p, { value: "2", children: "Groupes" }),
|
|
174
|
+
/* @__PURE__ */ s(p, { value: "3", children: "Demandes d'inscription" })
|
|
175
|
+
] }), H = {
|
|
188
176
|
title: "Components/TabList",
|
|
189
|
-
component:
|
|
190
|
-
|
|
191
|
-
allowScrollButtonsMobile: {
|
|
192
|
-
control: "boolean"
|
|
193
|
-
},
|
|
194
|
-
centered: {
|
|
195
|
-
control: "boolean"
|
|
196
|
-
},
|
|
197
|
-
indicatorColor: {
|
|
198
|
-
control: "radio",
|
|
199
|
-
options: ["primary", "secondary"]
|
|
200
|
-
},
|
|
201
|
-
orientation: {
|
|
202
|
-
control: "radio",
|
|
203
|
-
options: ["horizontal", "vertical"]
|
|
204
|
-
},
|
|
205
|
-
scrollButtons: {
|
|
206
|
-
control: "radio",
|
|
207
|
-
options: ["auto", !0, !1]
|
|
208
|
-
},
|
|
209
|
-
textColor: {
|
|
210
|
-
control: "radio",
|
|
211
|
-
options: ["inherit", "primary", "secondary"]
|
|
212
|
-
},
|
|
213
|
-
variant: {
|
|
214
|
-
control: "radio",
|
|
215
|
-
options: ["fullWidth", "scrollable", "standard"]
|
|
216
|
-
},
|
|
217
|
-
visibleScrollbar: {
|
|
218
|
-
control: "boolean"
|
|
219
|
-
}
|
|
220
|
-
}
|
|
221
|
-
}, A = {
|
|
177
|
+
component: _
|
|
178
|
+
}, z = {
|
|
222
179
|
args: {
|
|
223
|
-
|
|
224
|
-
centered: !1,
|
|
225
|
-
indicatorColor: "primary",
|
|
226
|
-
orientation: "horizontal",
|
|
227
|
-
scrollButtons: "auto",
|
|
228
|
-
textColor: "primary",
|
|
229
|
-
variant: "standard",
|
|
230
|
-
visibleScrollbar: !1
|
|
180
|
+
//handleChange: (event: SyntheticEvent, value: number) => true,
|
|
231
181
|
}
|
|
232
182
|
};
|
|
233
183
|
export {
|
|
234
|
-
|
|
235
|
-
|
|
184
|
+
z as Default,
|
|
185
|
+
H as default
|
|
236
186
|
};
|