@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.
Files changed (29) hide show
  1. package/dist/Delete-Bb_PhA6v.cjs +1 -0
  2. package/dist/Delete-Dip-1l7n.js +8 -0
  3. package/dist/components/Dropzone/Dropzone.cjs.js +1 -5
  4. package/dist/components/Dropzone/Dropzone.es.js +24 -2162
  5. package/dist/components/FileList/FileListItem.cjs.js +1 -1
  6. package/dist/components/FileList/FileListItem.es.js +20 -21
  7. package/dist/components/ImagePicker/ImagePicker.cjs.js +1 -0
  8. package/dist/components/ImagePicker/ImagePicker.d.ts +12 -0
  9. package/dist/components/ImagePicker/ImagePicker.es.js +176 -0
  10. package/dist/components/ImagePicker/index.cjs.js +1 -0
  11. package/dist/components/ImagePicker/index.d.ts +2 -0
  12. package/dist/components/ImagePicker/index.es.js +4 -0
  13. package/dist/components/PasswordInput/PasswordInput.cjs.js +1 -1
  14. package/dist/components/PasswordInput/PasswordInput.es.js +3 -2
  15. package/dist/components/index.cjs.js +1 -1
  16. package/dist/components/index.d.ts +1 -0
  17. package/dist/components/index.es.js +173 -171
  18. package/dist/components/stories/Dialog.stories.cjs.js +1 -1
  19. package/dist/components/stories/Dialog.stories.es.js +17 -37
  20. package/dist/components/stories/ImagePicker.stories.cjs.js +1 -0
  21. package/dist/components/stories/ImagePicker.stories.d.ts +6 -0
  22. package/dist/components/stories/ImagePicker.stories.es.js +50 -0
  23. package/dist/components/stories/TabList.stories.cjs.js +1 -1
  24. package/dist/components/stories/TabList.stories.es.js +89 -139
  25. package/dist/index-BtGBke8y.js +2141 -0
  26. package/dist/index-CEgiY5tJ.cjs +5 -0
  27. package/dist/index.cjs.js +1 -1
  28. package/dist/index.es.js +173 -171
  29. package/package.json +1 -1
@@ -1,32 +1,31 @@
1
- import { jsx as l, jsxs as v } from "react/jsx-runtime";
1
+ import { jsx as s, jsxs as T } from "react/jsx-runtime";
2
2
  import * as r from "react";
3
- import { useState as w } from "react";
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 S, c as V } from "../../DefaultPropsProvider-BYFwNPLt.js";
7
- import { u as $ } from "../../useThemeProps-B9UyPpzT.js";
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 j() {
11
- const [e, t] = r.useState(null);
9
+ function $() {
10
+ const [e, o] = r.useState(null);
12
11
  return r.useEffect(() => {
13
- t(`mui-p-${Math.round(Math.random() * 1e5)}`);
12
+ o(`mui-p-${Math.round(Math.random() * 1e5)}`);
14
13
  }, []), e;
15
14
  }
16
- function h(e) {
15
+ function v(e) {
17
16
  const {
18
- children: t,
19
- value: n
20
- } = e, a = j(), i = r.useMemo(() => ({
17
+ children: o,
18
+ value: t
19
+ } = e, a = $(), c = r.useMemo(() => ({
21
20
  idPrefix: a,
22
- value: n
23
- }), [a, n]);
24
- return /* @__PURE__ */ l(b.Provider, {
25
- value: i,
26
- children: t
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" && (h.propTypes = {
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: o.node,
36
+ children: n.node,
38
37
  /**
39
38
  * The value of the currently selected `Tab`.
40
39
  */
41
- value: o.oneOfType([o.number, o.string]).isRequired
40
+ value: n.oneOfType([n.number, n.string]).isRequired
42
41
  });
43
- function T() {
42
+ function h() {
44
43
  return r.useContext(b);
45
44
  }
46
- function y(e, t) {
45
+ function P(e, o) {
47
46
  const {
48
- idPrefix: n
47
+ idPrefix: t
49
48
  } = e;
50
- return n === null ? null : `${e.idPrefix}-P-${t}`;
49
+ return t === null ? null : `${e.idPrefix}-P-${o}`;
51
50
  }
52
- function x(e, t) {
51
+ function x(e, o) {
53
52
  const {
54
- idPrefix: n
53
+ idPrefix: t
55
54
  } = e;
56
- return n === null ? null : `${e.idPrefix}-T-${t}`;
55
+ return t === null ? null : `${e.idPrefix}-T-${o}`;
57
56
  }
58
- const C = /* @__PURE__ */ r.forwardRef(function(t, n) {
57
+ const y = /* @__PURE__ */ r.forwardRef(function(o, t) {
59
58
  const {
60
59
  children: a,
61
- ...i
62
- } = t, s = T();
63
- if (s === null)
60
+ ...c
61
+ } = o, i = h();
62
+ if (i === null)
64
63
  throw new TypeError("No TabContext provided");
65
- const c = r.Children.map(a, (u) => /* @__PURE__ */ r.isValidElement(u) ? /* @__PURE__ */ r.cloneElement(u, {
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": y(s, u.props.value),
68
- id: x(s, u.props.value)
66
+ "aria-controls": P(i, u.props.value),
67
+ id: x(i, u.props.value)
69
68
  }) : null);
70
- return /* @__PURE__ */ l(R, {
71
- ...i,
72
- ref: n,
73
- value: s.value,
74
- children: c
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" && (C.propTypes = {
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: o.node
84
+ children: n.node
86
85
  });
87
- function D(e) {
88
- return M("MuiTabPanel", e);
86
+ function j(e) {
87
+ return O("MuiTabPanel", e);
89
88
  }
90
- I("MuiTabPanel", ["root", "hidden"]);
91
- const U = (e) => {
89
+ M("MuiTabPanel", ["root", "hidden"]);
90
+ const V = (e) => {
92
91
  const {
93
- classes: t,
94
- hidden: n
92
+ classes: o,
93
+ hidden: t
95
94
  } = e;
96
- return V({
97
- root: ["root", n && "hidden"]
98
- }, D, t);
99
- }, B = S("div", {
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, t) => t.root
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(t, n) {
108
- const a = $({
109
- props: t,
106
+ })), p = /* @__PURE__ */ r.forwardRef(function(o, t) {
107
+ const a = I({
108
+ props: o,
110
109
  name: "MuiTabPanel"
111
110
  }), {
112
- children: i,
113
- className: s,
114
- value: c,
111
+ children: c,
112
+ className: i,
113
+ value: l,
115
114
  keepMounted: u = !1,
116
- ...P
115
+ ...C
117
116
  } = a, m = {
118
117
  ...a
119
- }, g = U(m), d = T();
118
+ }, N = V(m), d = h();
120
119
  if (d === null)
121
120
  throw new TypeError("No TabContext provided");
122
- const N = y(d, c), E = x(d, c);
123
- return /* @__PURE__ */ l(B, {
124
- "aria-labelledby": E,
125
- className: O(g.root, s),
126
- hidden: c !== d.value,
127
- id: N,
128
- ref: n,
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
- ...P,
132
- children: (u || c === d.value) && i
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: o.node,
142
+ children: n.node,
144
143
  /**
145
144
  * Override or extend the styles applied to the component.
146
145
  */
147
- classes: o.object,
146
+ classes: n.object,
148
147
  /**
149
148
  * @ignore
150
149
  */
151
- className: o.string,
150
+ className: n.string,
152
151
  /**
153
152
  * Always keep the children in the DOM.
154
153
  * @default false
155
154
  */
156
- keepMounted: o.bool,
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: o.oneOfType([o.arrayOf(o.oneOfType([o.func, o.object, o.bool])), o.func, o.object]),
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: o.oneOfType([o.number, o.string]).isRequired
164
+ value: n.oneOfType([n.number, n.string]).isRequired
166
165
  });
167
- const L = (e) => {
168
- const [t, n] = w("1");
169
- return /* @__PURE__ */ v(h, { value: t, children: [
170
- /* @__PURE__ */ v(
171
- C,
172
- {
173
- ...e,
174
- onChange: (i, s) => n(s),
175
- "aria-label": "lib tablist example",
176
- children: [
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: L,
190
- argTypes: {
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
- allowScrollButtonsMobile: !1,
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
- A as Default,
235
- W as default
184
+ z as Default,
185
+ H as default
236
186
  };