zuii 1.4.33 → 1.5.0
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/Color/react/index.d.ts +1 -1
- package/dist/components/Color/react/index.js +5 -4
- package/dist/components/Errorpage/react/index.js +4 -3
- package/dist/components/Form/react/Select.js +48 -40
- package/dist/components/Form/style/index.css +1 -1
- package/dist/components/Nav/react/index.js +3 -2
- package/dist/index.d.ts +2 -1
- package/dist/index.js +21 -19
- package/dist/packages/cookie-consent/src/react/index.js +11 -0
- package/dist/packages/cookie-consent/src/style/index.css +1 -0
- package/dist/templates/Buttons/Buttons.tsx +1 -1
- package/dist/templates/Colors/Colors.tsx +1 -1
- package/dist/templates/Cookie-Consents/Cookie-Consents.d.ts +4 -0
- package/dist/templates/Cookie-Consents/Cookie-Consents.tsx +18 -0
- package/dist/templates/Forms/Forms-elements.tsx +7 -1
- package/dist/templates/Icons/Icons.tsx +1 -1
- package/dist/templates/Radius/Radius.tsx +1 -1
- package/dist/templates/index.d.ts +1 -0
- package/dist/templates/index.ts +1 -0
- package/package.json +7 -4
- package/dist/core/styles/tokens.d.ts +0 -1690
- package/dist/core/utils/contrast.d.ts +0 -19
- package/dist/core/utils/getName.d.ts +0 -52
- /package/dist/{core → packages/core/src}/styles/main.css +0 -0
- /package/dist/{core → packages/core/src}/styles/tokens.js +0 -0
- /package/dist/{core → packages/core/src}/utils/getName.js +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsxs as i, jsx as o } from "react/jsx-runtime";
|
|
2
|
-
import { tokens as m } from "../../../core/styles/tokens.js";
|
|
3
|
-
import '../../Slider/style/index.css';import '../../Grid/style/index.css';import '../../Loader/style/index.css';import '../../Errorpage/style/index.css';import '../../Lang-selector/style/index.css';import '../../../node_modules/.pnpm/flag-icons@7.5.0/node_modules/flag-icons/css/flag-icons.min.css';import '../../Placeholder/style/index.css';import '../../Logo/style/index.css';import '../../Radius/style/index.css';import '../../Shadow/style/index.css';import '../../Context-menu/style/index.css';import '../../Divider/style/index.css';import '../../Badge/style/index.css';import '../../Avatar/style/index.css';import '../../Button/style/index.css';import '../style/index.css';import '../../../core/styles/main.css';/* empty css
|
|
2
|
+
import { tokens as m } from "../../../packages/core/src/styles/tokens.js";
|
|
3
|
+
import '../../../packages/cookie-consent/src/style/index.css';import '../../Slider/style/index.css';import '../../Grid/style/index.css';import '../../Loader/style/index.css';import '../../Errorpage/style/index.css';import '../../Lang-selector/style/index.css';import '../../../node_modules/.pnpm/flag-icons@7.5.0/node_modules/flag-icons/css/flag-icons.min.css';import '../../Placeholder/style/index.css';import '../../Logo/style/index.css';import '../../Radius/style/index.css';import '../../Shadow/style/index.css';import '../../Context-menu/style/index.css';import '../../Divider/style/index.css';import '../../Badge/style/index.css';import '../../Avatar/style/index.css';import '../../Button/style/index.css';import '../style/index.css';import '../../../packages/core/src/styles/main.css';/* empty css */
|
|
4
4
|
/* empty css */
|
|
5
5
|
import "react-bootstrap";
|
|
6
6
|
/* empty css */
|
|
@@ -37,7 +37,8 @@ import "../../Menu/react/index.js";
|
|
|
37
37
|
import "@splidejs/react-splide";
|
|
38
38
|
/* empty css */
|
|
39
39
|
import "../../Card/react/index.js";
|
|
40
|
-
|
|
40
|
+
/* empty css */
|
|
41
|
+
const S = ({ name: r }) => {
|
|
41
42
|
const p = m.brands[r];
|
|
42
43
|
return /* @__PURE__ */ i(t, { children: [
|
|
43
44
|
/* @__PURE__ */ o("div", { className: `color bg-${r} p-4`, children: /* @__PURE__ */ i(t, { vertical: !0, center: !0, children: [
|
|
@@ -61,5 +62,5 @@ const R = ({ name: r }) => {
|
|
|
61
62
|
] });
|
|
62
63
|
};
|
|
63
64
|
export {
|
|
64
|
-
|
|
65
|
+
S as Color
|
|
65
66
|
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsx as r, jsxs as i } from "react/jsx-runtime";
|
|
2
2
|
import { useNavigate as p } from "react-router-dom";
|
|
3
|
-
import '../../Slider/style/index.css';import '../../Grid/style/index.css';import '../../Loader/style/index.css';import '../style/index.css';import '../../Lang-selector/style/index.css';import '../../../node_modules/.pnpm/flag-icons@7.5.0/node_modules/flag-icons/css/flag-icons.min.css';import '../../Placeholder/style/index.css';import '../../Logo/style/index.css';import '../../Radius/style/index.css';import '../../Shadow/style/index.css';import '../../Context-menu/style/index.css';import '../../Divider/style/index.css';import '../../Badge/style/index.css';import '../../Avatar/style/index.css';import '../../Color/style/index.css';import '../../../core/styles/main.css';/* empty css
|
|
3
|
+
import '../../../packages/cookie-consent/src/style/index.css';import '../../Slider/style/index.css';import '../../Grid/style/index.css';import '../../Loader/style/index.css';import '../style/index.css';import '../../Lang-selector/style/index.css';import '../../../node_modules/.pnpm/flag-icons@7.5.0/node_modules/flag-icons/css/flag-icons.min.css';import '../../Placeholder/style/index.css';import '../../Logo/style/index.css';import '../../Radius/style/index.css';import '../../Shadow/style/index.css';import '../../Context-menu/style/index.css';import '../../Divider/style/index.css';import '../../Badge/style/index.css';import '../../Avatar/style/index.css';import '../../Color/style/index.css';import '../../../packages/core/src/styles/main.css';/* empty css */
|
|
4
4
|
/* empty css */
|
|
5
5
|
import { Button as e } from "../../Button/react/index.js";
|
|
6
6
|
import { Icon as a } from "../../Icon/react/index.js";
|
|
@@ -36,7 +36,8 @@ import "../../Menu/react/index.js";
|
|
|
36
36
|
import "@splidejs/react-splide";
|
|
37
37
|
/* empty css */
|
|
38
38
|
import "../../Card/react/index.js";
|
|
39
|
-
|
|
39
|
+
/* empty css */
|
|
40
|
+
const U = ({ code: t = 404 }) => {
|
|
40
41
|
const m = p();
|
|
41
42
|
return /* @__PURE__ */ r("main", { className: "error-page", children: /* @__PURE__ */ r("div", { className: "error-page__container ", children: /* @__PURE__ */ i("div", { className: "container", children: [
|
|
42
43
|
/* @__PURE__ */ i(o, { className: "text-secondary mb-4", children: [
|
|
@@ -52,5 +53,5 @@ const T = ({ code: t = 404 }) => {
|
|
|
52
53
|
] }) }) });
|
|
53
54
|
};
|
|
54
55
|
export {
|
|
55
|
-
|
|
56
|
+
U as Errorpage
|
|
56
57
|
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import { useRef as
|
|
3
|
-
import { initSelect as
|
|
4
|
-
import { Icon as
|
|
1
|
+
import { jsxs as g, jsx as S } from "react/jsx-runtime";
|
|
2
|
+
import { useRef as l, useEffect as u } from "react";
|
|
3
|
+
import { initSelect as R } from "../js/select.js";
|
|
4
|
+
import { Icon as E } from "../../Icon/react/index.js";
|
|
5
5
|
const V = {
|
|
6
6
|
fr: {
|
|
7
7
|
placeholder: "Sélectionnez une option",
|
|
@@ -9,8 +9,8 @@ const V = {
|
|
|
9
9
|
noChoicesText: "Aucun choix disponible",
|
|
10
10
|
uniqueItemText: "Seules les valeurs uniques peuvent être ajoutées",
|
|
11
11
|
customAddItemText: "Seules les valeurs correspondant à un critère spécifique peuvent être ajoutées",
|
|
12
|
-
addItemText: (
|
|
13
|
-
maxItemText: (
|
|
12
|
+
addItemText: (t) => `Appuyez sur Entrée pour ajouter **${t}**`,
|
|
13
|
+
maxItemText: (t) => `Seulement ${t} options peuvent être sélectionnées`
|
|
14
14
|
},
|
|
15
15
|
en: {
|
|
16
16
|
placeholder: "Select an option",
|
|
@@ -18,73 +18,81 @@ const V = {
|
|
|
18
18
|
noChoicesText: "No choices to choose from",
|
|
19
19
|
uniqueItemText: "Only unique values can be added",
|
|
20
20
|
customAddItemText: "Only values matching specific conditions can be added",
|
|
21
|
-
addItemText: (
|
|
22
|
-
maxItemText: (
|
|
21
|
+
addItemText: (t) => `Press Enter to add **${t}**`,
|
|
22
|
+
maxItemText: (t) => `Only ${t} options can be selected`
|
|
23
23
|
}
|
|
24
24
|
}, L = ({
|
|
25
|
-
options:
|
|
26
|
-
value:
|
|
25
|
+
options: t,
|
|
26
|
+
value: r,
|
|
27
27
|
onChange: a,
|
|
28
|
-
multiple:
|
|
28
|
+
multiple: i = !1,
|
|
29
29
|
placeholder: x = "Sélectionnez une option",
|
|
30
30
|
disabled: A = !1,
|
|
31
31
|
searchable: y = !0,
|
|
32
|
-
className:
|
|
32
|
+
className: b = "",
|
|
33
33
|
name: v,
|
|
34
34
|
variant: h = "default",
|
|
35
35
|
icon: T,
|
|
36
|
-
lang:
|
|
36
|
+
lang: I
|
|
37
37
|
}) => {
|
|
38
|
-
const o =
|
|
39
|
-
|
|
38
|
+
const o = l(null), n = l(null), d = l(a), f = l(r), N = I || (typeof document < "u" ? document.documentElement.lang : "fr") || "fr", m = V[N.startsWith("en") ? "en" : "fr"], p = x === "Sélectionnez une option" ? m.placeholder : x;
|
|
39
|
+
u(() => {
|
|
40
40
|
d.current = a;
|
|
41
|
-
}, [a]),
|
|
42
|
-
f.current =
|
|
43
|
-
}, [
|
|
44
|
-
const O = JSON.stringify(
|
|
45
|
-
return
|
|
41
|
+
}, [a]), u(() => {
|
|
42
|
+
f.current = r;
|
|
43
|
+
}, [r]);
|
|
44
|
+
const O = JSON.stringify(t);
|
|
45
|
+
return u(() => {
|
|
46
46
|
if (o.current) {
|
|
47
47
|
o.current.innerHTML = "";
|
|
48
|
-
const
|
|
49
|
-
value:
|
|
50
|
-
label:
|
|
51
|
-
selected: Array.isArray(
|
|
48
|
+
const e = r ?? f.current, c = t.map((s) => ({
|
|
49
|
+
value: s.value,
|
|
50
|
+
label: s.text,
|
|
51
|
+
selected: Array.isArray(e) ? e.includes(s.value) : e === s.value,
|
|
52
52
|
customProperties: {
|
|
53
|
-
flag:
|
|
53
|
+
flag: s.flag
|
|
54
54
|
}
|
|
55
55
|
}));
|
|
56
|
-
|
|
56
|
+
i || c.unshift({
|
|
57
57
|
value: "",
|
|
58
58
|
label: p,
|
|
59
|
-
selected:
|
|
59
|
+
selected: e === void 0 || e === "",
|
|
60
60
|
placeholder: !0
|
|
61
|
-
}),
|
|
62
|
-
choices:
|
|
63
|
-
removeItemButton:
|
|
61
|
+
}), n.current = R(o.current, {
|
|
62
|
+
choices: c,
|
|
63
|
+
removeItemButton: i,
|
|
64
64
|
placeholderValue: p,
|
|
65
65
|
searchEnabled: y,
|
|
66
66
|
silent: !0,
|
|
67
67
|
variant: h,
|
|
68
68
|
...m
|
|
69
|
-
}, (
|
|
70
|
-
f.current =
|
|
69
|
+
}, (s) => {
|
|
70
|
+
f.current = s, d.current && d.current(s);
|
|
71
71
|
});
|
|
72
72
|
}
|
|
73
73
|
return () => {
|
|
74
|
-
|
|
74
|
+
n.current && (n.current.destroy(), n.current = null);
|
|
75
75
|
};
|
|
76
|
-
}, [O,
|
|
77
|
-
if (
|
|
78
|
-
const
|
|
79
|
-
JSON.stringify(
|
|
76
|
+
}, [O, i, p, h, y, m]), u(() => {
|
|
77
|
+
if (n.current && r !== void 0) {
|
|
78
|
+
const e = n.current.getValue(!0), c = Array.isArray(r) ? r : [r], s = Array.isArray(e) ? e : [e];
|
|
79
|
+
JSON.stringify(c.sort()) !== JSON.stringify(s.sort()) && n.current.setChoiceByValue(r);
|
|
80
80
|
}
|
|
81
|
-
}, [
|
|
82
|
-
|
|
81
|
+
}, [r]), u(() => {
|
|
82
|
+
const e = o.current?.closest("fieldset");
|
|
83
|
+
if (e) {
|
|
84
|
+
const c = new MutationObserver(() => {
|
|
85
|
+
n && (e.disabled ? n.current.disable() : n.current.enable());
|
|
86
|
+
});
|
|
87
|
+
return c.observe(e, { attributes: !0 }), () => c.disconnect();
|
|
88
|
+
}
|
|
89
|
+
}, []), /* @__PURE__ */ g("div", { className: `form__input ${b}`.trim(), children: [
|
|
90
|
+
T && /* @__PURE__ */ S(E, { name: T, size: "sm" }),
|
|
83
91
|
/* @__PURE__ */ S(
|
|
84
92
|
"select",
|
|
85
93
|
{
|
|
86
94
|
ref: o,
|
|
87
|
-
multiple:
|
|
95
|
+
multiple: i,
|
|
88
96
|
disabled: A,
|
|
89
97
|
className: "select",
|
|
90
98
|
name: v
|