zuii 1.4.20 → 1.4.22
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/Card/react/index.js +13 -13
- package/dist/components/Card/style/index.css +1 -1
- package/dist/components/Form/react/FileInput.d.ts +22 -50
- package/dist/components/Form/react/FileInput.js +84 -0
- package/dist/components/Form/react/index.js +32 -30
- package/dist/components/Form/style/index.css +1 -1
- package/dist/components/Grid/react/index.js +1 -1
- package/dist/components/Group/style/index.css +1 -1
- package/dist/components/Slider/js/slider.d.ts +10 -1
- package/dist/components/Slider/js/slider.js +27 -10
- package/dist/components/Slider/react/index.js +18 -17
- package/dist/node_modules/.pnpm/@uppy_locales@5.1.1/node_modules/@uppy/locales/lib/en_US.js +236 -0
- package/dist/node_modules/.pnpm/@uppy_locales@5.1.1/node_modules/@uppy/locales/lib/fr_FR.js +193 -0
- package/dist/node_modules/.pnpm/@uppy_react@5.2.0_@uppy_core@5.2.0_@uppy_dashboard@5.1.1_@uppy_core@5.2.0__@uppy_image-editor_4567vrulez5sapld32rywmrijm/node_modules/@uppy/react/lib/Dashboard.js +47 -0
- package/dist/node_modules/.pnpm/@uppy_react@5.2.0_@uppy_core@5.2.0_@uppy_dashboard@5.1.1_@uppy_core@5.2.0__@uppy_image-editor_4567vrulez5sapld32rywmrijm/node_modules/@uppy/react/lib/getHTMLProps.js +234 -0
- package/dist/node_modules/.pnpm/@uppy_react@5.2.0_@uppy_core@5.2.0_@uppy_dashboard@5.1.1_@uppy_core@5.2.0__@uppy_image-editor_4567vrulez5sapld32rywmrijm/node_modules/@uppy/react/lib/nonHtmlPropsHaveChanged.js +8 -0
- package/dist/templates/Forms/Forms-elements.tsx +7 -0
- package/package.json +3 -1
- package/dist/components/Form/react/index.d.ts +0 -74
|
@@ -1,20 +1,20 @@
|
|
|
1
1
|
import { jsx as e } from "react/jsx-runtime";
|
|
2
|
-
import { Card as
|
|
2
|
+
import { Card as m } from "react-bootstrap";
|
|
3
3
|
import '../style/index.css';/* empty css */
|
|
4
|
-
const
|
|
4
|
+
const t = ({
|
|
5
5
|
className: a = "",
|
|
6
6
|
children: r,
|
|
7
7
|
...i
|
|
8
|
-
}) => /* @__PURE__ */ e(
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
8
|
+
}) => /* @__PURE__ */ e(m, { className: `${a}`.trim(), ...i, children: r });
|
|
9
|
+
t.Img = ({ className: a = "", ...r }) => /* @__PURE__ */ e("div", { className: "card__img-wrapper", children: /* @__PURE__ */ e(m.Img, { className: `card__img ${a}`.trim(), ...r }) });
|
|
10
|
+
t.Header = ({ className: a = "", ...r }) => /* @__PURE__ */ e(m.Header, { className: `card__header ${a}`.trim(), ...r });
|
|
11
|
+
t.Title = ({ className: a = "", ...r }) => /* @__PURE__ */ e(m.Title, { className: `card__title ${a}`.trim(), ...r });
|
|
12
|
+
t.Subtitle = ({ className: a = "", ...r }) => /* @__PURE__ */ e(m.Subtitle, { className: `card__subtitle ${a}`.trim(), ...r });
|
|
13
|
+
t.Body = ({ className: a = "", ...r }) => /* @__PURE__ */ e(m.Body, { className: `card__body ${a}`.trim(), ...r });
|
|
14
|
+
t.Text = ({ className: a = "", ...r }) => /* @__PURE__ */ e(m.Text, { className: `card__text ${a}`.trim(), ...r });
|
|
15
|
+
t.Link = ({ className: a = "", ...r }) => /* @__PURE__ */ e(m.Link, { className: `card__link ${a}`.trim(), ...r });
|
|
16
|
+
t.Footer = ({ className: a = "", ...r }) => /* @__PURE__ */ e(m.Footer, { className: `card__footer ${a}`.trim(), ...r });
|
|
17
|
+
t.ImgOverlay = ({ className: a = "", ...r }) => /* @__PURE__ */ e(m.ImgOverlay, { className: `card__img-overlay ${a}`.trim(), ...r });
|
|
18
18
|
export {
|
|
19
|
-
|
|
19
|
+
t as Card
|
|
20
20
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
@layer components{.card{--card-border-radius: var(--radius-base);--card-inner-border-radius: var(--radius-base)}}
|
|
1
|
+
@layer components{*:has(>.card){container-type:inline-size;container-name:card}.card{--card-border-radius: var(--radius-base);--card-inner-border-radius: var(--radius-base)}}
|
|
@@ -1,59 +1,31 @@
|
|
|
1
1
|
/**
|
|
2
|
-
*
|
|
2
|
+
* Propriétés du composant FileInput.
|
|
3
3
|
*/
|
|
4
|
-
|
|
5
|
-
/**
|
|
6
|
-
* ID unique pour l'instance Uppy.
|
|
7
|
-
*/
|
|
8
|
-
id?: string;
|
|
9
|
-
/**
|
|
10
|
-
* Nom du champ pour le formulaire.
|
|
11
|
-
*/
|
|
4
|
+
interface FileInputProps {
|
|
5
|
+
/** Nom du champ. */
|
|
12
6
|
name?: string;
|
|
13
|
-
/**
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
/**
|
|
26
|
-
* Callback appelé lors de la complétion du téléchargement.
|
|
27
|
-
* @param {any} result - Le résultat du téléchargement.
|
|
28
|
-
*/
|
|
7
|
+
/** Langue du composant ('fr' ou 'en'). */
|
|
8
|
+
lang?: 'fr' | 'en';
|
|
9
|
+
/** Restrictions de téléchargement. */
|
|
10
|
+
restrictions?: {
|
|
11
|
+
/** Nombre maximum de fichiers. */
|
|
12
|
+
maxNumberOfFiles?: number;
|
|
13
|
+
/** Taille maximum d'un fichier en octets. */
|
|
14
|
+
maxFileSize?: number;
|
|
15
|
+
/** Types de fichiers autorisés. */
|
|
16
|
+
allowedFileTypes?: string[];
|
|
17
|
+
};
|
|
18
|
+
/** Callback appelé lors de la fin du téléchargement. */
|
|
29
19
|
onComplete?: (result: any) => void;
|
|
30
|
-
/**
|
|
31
|
-
|
|
32
|
-
* @param {Error} error - L'erreur survenue.
|
|
33
|
-
*/
|
|
34
|
-
onError?: (error: Error) => void;
|
|
35
|
-
/**
|
|
36
|
-
* Hauteur du dashboard Uppy en pixels.
|
|
37
|
-
*/
|
|
38
|
-
height?: number;
|
|
39
|
-
/**
|
|
40
|
-
* Classe CSS personnalisée.
|
|
41
|
-
*/
|
|
42
|
-
className?: string;
|
|
43
|
-
/**
|
|
44
|
-
* Afficher les détails de progression.
|
|
45
|
-
*/
|
|
46
|
-
hideProgressDetails?: boolean;
|
|
47
|
-
/**
|
|
48
|
-
* Afficher le logo Uppy.
|
|
49
|
-
*/
|
|
50
|
-
proudlyDisplayPoweredByUppy?: boolean;
|
|
20
|
+
/** Callback appelé en cas d'erreur. */
|
|
21
|
+
onError?: (error: any) => void;
|
|
51
22
|
}
|
|
52
23
|
/**
|
|
53
|
-
* Composant FileInput utilisant
|
|
54
|
-
*
|
|
24
|
+
* Composant FileInput utilisant Uppy.js pour le téléchargement de fichiers.
|
|
25
|
+
* Affiche le Dashboard Uppy complet par défaut.
|
|
55
26
|
*
|
|
56
27
|
* @param {FileInputProps} props - Les propriétés du composant.
|
|
57
|
-
* @returns {JSX.Element} Le composant FileInput.
|
|
28
|
+
* @returns {JSX.Element} Le composant FileInput rendu.
|
|
58
29
|
*/
|
|
59
|
-
export declare const FileInput: ({
|
|
30
|
+
export declare const FileInput: ({ name, lang, restrictions, onComplete, onError }: FileInputProps) => import("react/jsx-runtime").JSX.Element;
|
|
31
|
+
export {};
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
import { jsx as f, jsxs as y } from "react/jsx-runtime";
|
|
2
|
+
import { useRef as g, useState as F, useEffect as b } from "react";
|
|
3
|
+
import x from "@uppy/core";
|
|
4
|
+
import { UppyContextProvider as v } from "@uppy/react";
|
|
5
|
+
import w from "../../../node_modules/.pnpm/@uppy_react@5.2.0_@uppy_core@5.2.0_@uppy_dashboard@5.1.1_@uppy_core@5.2.0__@uppy_image-editor_4567vrulez5sapld32rywmrijm/node_modules/@uppy/react/lib/Dashboard.js";
|
|
6
|
+
import N from "@uppy/compressor";
|
|
7
|
+
import _ from "@uppy/image-editor";
|
|
8
|
+
import U from "../../../node_modules/.pnpm/@uppy_locales@5.1.1/node_modules/@uppy/locales/lib/fr_FR.js";
|
|
9
|
+
import D from "../../../node_modules/.pnpm/@uppy_locales@5.1.1/node_modules/@uppy/locales/lib/en_US.js";
|
|
10
|
+
const M = ({
|
|
11
|
+
name: o,
|
|
12
|
+
lang: u,
|
|
13
|
+
restrictions: m,
|
|
14
|
+
onComplete: i,
|
|
15
|
+
onError: n
|
|
16
|
+
}) => {
|
|
17
|
+
const l = {
|
|
18
|
+
maxNumberOfFiles: null,
|
|
19
|
+
maxFileSize: null,
|
|
20
|
+
allowedFileTypes: null,
|
|
21
|
+
...m
|
|
22
|
+
}, a = g(null), c = (u || (typeof document < "u" ? document.documentElement.lang : "fr") || "fr").startsWith("en") ? D : U, [e] = F(() => {
|
|
23
|
+
const r = new x({
|
|
24
|
+
locale: c,
|
|
25
|
+
restrictions: l
|
|
26
|
+
});
|
|
27
|
+
return r.use(N), r.use(_), r;
|
|
28
|
+
});
|
|
29
|
+
b(() => {
|
|
30
|
+
i && e.on("complete", i), n && e.on("error", n);
|
|
31
|
+
const r = () => {
|
|
32
|
+
if (!a.current) return;
|
|
33
|
+
const t = new DataTransfer();
|
|
34
|
+
e.getFiles().forEach((s) => {
|
|
35
|
+
if (s.data instanceof File)
|
|
36
|
+
t.items.add(s.data);
|
|
37
|
+
else if (s.data instanceof Blob) {
|
|
38
|
+
const h = new File([s.data], s.name, { type: s.data.type });
|
|
39
|
+
t.items.add(h);
|
|
40
|
+
}
|
|
41
|
+
}), a.current.files = t.files, a.current.dispatchEvent(new Event("change", { bubbles: !0 }));
|
|
42
|
+
}, d = [
|
|
43
|
+
"file-added",
|
|
44
|
+
"file-removed",
|
|
45
|
+
"files-added",
|
|
46
|
+
"file-editor:complete",
|
|
47
|
+
"preprocess-complete",
|
|
48
|
+
"postprocess-complete"
|
|
49
|
+
];
|
|
50
|
+
return d.forEach((t) => e.on(t, r)), () => {
|
|
51
|
+
i && e.off("complete", i), n && e.off("error", n), d.forEach((t) => e.off(t, r));
|
|
52
|
+
};
|
|
53
|
+
}, [e, i, n]);
|
|
54
|
+
const p = l.maxNumberOfFiles === null || l.maxNumberOfFiles === void 0 || l.maxNumberOfFiles > 1;
|
|
55
|
+
return /* @__PURE__ */ f(v, { uppy: e, children: /* @__PURE__ */ y("div", { className: "file-input__wrapper", id: o, children: [
|
|
56
|
+
/* @__PURE__ */ f("div", { className: "file-input__content", children: /* @__PURE__ */ f(
|
|
57
|
+
w,
|
|
58
|
+
{
|
|
59
|
+
uppy: e,
|
|
60
|
+
width: "100%",
|
|
61
|
+
height: 300,
|
|
62
|
+
hideProgressDetails: !1,
|
|
63
|
+
hideUploadButton: !0,
|
|
64
|
+
proudlyDisplayPoweredByUppy: !1,
|
|
65
|
+
locale: {
|
|
66
|
+
strings: c.strings
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
) }),
|
|
70
|
+
o && /* @__PURE__ */ f(
|
|
71
|
+
"input",
|
|
72
|
+
{
|
|
73
|
+
ref: a,
|
|
74
|
+
type: "file",
|
|
75
|
+
name: p ? `${o}[]` : o,
|
|
76
|
+
multiple: p,
|
|
77
|
+
style: { display: "none" }
|
|
78
|
+
}
|
|
79
|
+
)
|
|
80
|
+
] }) });
|
|
81
|
+
};
|
|
82
|
+
export {
|
|
83
|
+
M as FileInput
|
|
84
|
+
};
|
|
@@ -3,35 +3,36 @@ import { Form as r, InputGroup as C } from "react-bootstrap";
|
|
|
3
3
|
import { Icon as c } from "../../Icon/react/index.js";
|
|
4
4
|
import d from "../../../node_modules/.pnpm/react-bootstrap@2.10.10_@types_react@19.2.10_react-dom@19.2.4_react@19.2.4__react@19.2.4/node_modules/react-bootstrap/esm/FloatingLabel.js";
|
|
5
5
|
import '../style/index.css';/* empty css */
|
|
6
|
-
import { NumberInput as
|
|
7
|
-
import { TelInput as
|
|
8
|
-
import { PasswordInput as
|
|
9
|
-
import { PasswordConfirm as
|
|
6
|
+
import { NumberInput as F } from "./NumberInput.js";
|
|
7
|
+
import { TelInput as h } from "./TelInput.js";
|
|
8
|
+
import { PasswordInput as I } from "./PasswordInput.js";
|
|
9
|
+
import { PasswordConfirm as b } from "./PasswordConfirm.js";
|
|
10
10
|
import { RangeInput as w } from "./RangeInput.js";
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
14
|
-
import {
|
|
15
|
-
|
|
11
|
+
import { FileInput as N } from "./FileInput.js";
|
|
12
|
+
import { Select as _ } from "./Select.js";
|
|
13
|
+
import { handleNumericKeyDown as x } from "../js/number.js";
|
|
14
|
+
import { FormColor as y } from "./FormColor.js";
|
|
15
|
+
import { FormDate as D } from "./FormDate.js";
|
|
16
|
+
const g = ({
|
|
16
17
|
label: n,
|
|
17
|
-
floating:
|
|
18
|
+
floating: a,
|
|
18
19
|
icon: m,
|
|
19
|
-
children:
|
|
20
|
+
children: l,
|
|
20
21
|
onKeyDown: i,
|
|
21
22
|
...e
|
|
22
23
|
}) => {
|
|
23
|
-
const f = (
|
|
24
|
-
e.type === "number" &&
|
|
25
|
-
},
|
|
26
|
-
return
|
|
24
|
+
const f = (u) => {
|
|
25
|
+
e.type === "number" && x(u), i && i(u);
|
|
26
|
+
}, p = e.type === "number" ? "decimal" : void 0;
|
|
27
|
+
return a && n ? /* @__PURE__ */ t(d, { label: n, controlId: e.id || e.name, children: /* @__PURE__ */ s("div", { className: "form__input", children: [
|
|
27
28
|
m && /* @__PURE__ */ t(c, { name: m, size: "sm" }),
|
|
28
29
|
/* @__PURE__ */ t(
|
|
29
30
|
r.Control,
|
|
30
31
|
{
|
|
31
32
|
...e,
|
|
32
33
|
onKeyDown: f,
|
|
33
|
-
inputMode:
|
|
34
|
-
children:
|
|
34
|
+
inputMode: p,
|
|
35
|
+
children: l
|
|
35
36
|
}
|
|
36
37
|
)
|
|
37
38
|
] }) }) : /* @__PURE__ */ s("div", { className: "form__input", children: [
|
|
@@ -41,38 +42,39 @@ const D = ({
|
|
|
41
42
|
{
|
|
42
43
|
...e,
|
|
43
44
|
onKeyDown: f,
|
|
44
|
-
inputMode:
|
|
45
|
-
children:
|
|
45
|
+
inputMode: p,
|
|
46
|
+
children: l
|
|
46
47
|
}
|
|
47
48
|
)
|
|
48
49
|
] });
|
|
49
50
|
}, o = ({
|
|
50
51
|
titre: n,
|
|
51
|
-
className:
|
|
52
|
+
className: a = "",
|
|
52
53
|
children: m,
|
|
53
|
-
...
|
|
54
|
+
...l
|
|
54
55
|
}) => {
|
|
55
56
|
const i = "form";
|
|
56
|
-
return /* @__PURE__ */ s(r, { className: `${i} ${
|
|
57
|
+
return /* @__PURE__ */ s(r, { className: `${i} ${a}`.trim(), ...l, children: [
|
|
57
58
|
n && /* @__PURE__ */ t("h1", { className: `${i}__title`, children: n }),
|
|
58
59
|
m
|
|
59
60
|
] });
|
|
60
61
|
};
|
|
61
62
|
o.Group = r.Group;
|
|
62
|
-
o.Control =
|
|
63
|
+
o.Control = g;
|
|
63
64
|
o.Label = r.Label;
|
|
64
65
|
o.Text = r.Text;
|
|
65
66
|
o.Check = r.Check;
|
|
66
|
-
o.Select =
|
|
67
|
+
o.Select = _;
|
|
67
68
|
o.InputGroup = C;
|
|
68
|
-
o.Number =
|
|
69
|
-
o.Tel =
|
|
70
|
-
o.Password =
|
|
71
|
-
o.PasswordConfirm =
|
|
69
|
+
o.Number = F;
|
|
70
|
+
o.Tel = h;
|
|
71
|
+
o.Password = I;
|
|
72
|
+
o.PasswordConfirm = b;
|
|
72
73
|
o.Range = w;
|
|
74
|
+
o.File = N;
|
|
73
75
|
o.FloatingLabel = d;
|
|
74
|
-
o.Color =
|
|
75
|
-
o.Date =
|
|
76
|
+
o.Color = y;
|
|
77
|
+
o.Date = D;
|
|
76
78
|
export {
|
|
77
79
|
o as Form
|
|
78
80
|
};
|