zuii 1.4.16 → 1.4.18
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/_virtual/fr.js +5 -0
- package/dist/_virtual/fr2.js +4 -0
- package/dist/components/Badge/style/index.css +1 -1
- package/dist/components/Card/js/card.d.ts +4 -0
- package/dist/components/Card/react/index.d.ts +29 -0
- package/dist/components/Card/react/index.js +20 -0
- package/dist/components/Card/style/index.css +1 -0
- package/dist/components/Color/react/index.js +9 -5
- package/dist/components/Errorpage/react/index.js +11 -7
- package/dist/components/Form/js/color.d.ts +11 -0
- package/dist/components/Form/js/color.js +36 -0
- package/dist/components/Form/js/date.d.ts +35 -0
- package/dist/components/Form/js/date.js +40 -0
- package/dist/components/Form/js/tel-input.d.ts +12 -0
- package/dist/components/Form/js/tel-input.js +18 -0
- package/dist/components/Form/react/FormColor.d.ts +37 -0
- package/dist/components/Form/react/FormColor.js +62 -0
- package/dist/components/Form/react/FormDate.d.ts +48 -0
- package/dist/components/Form/react/FormDate.js +57 -0
- package/dist/components/Form/react/NumberInput.js +2 -3
- package/dist/components/Form/react/PasswordConfirm.d.ts +5 -1
- package/dist/components/Form/react/PasswordConfirm.js +43 -40
- package/dist/components/Form/react/PasswordInput.js +21 -21
- package/dist/components/Form/react/RangeInput.js +2 -3
- package/dist/components/Form/react/Select.d.ts +9 -1
- package/dist/components/Form/react/Select.js +91 -67
- package/dist/components/Form/react/TelInput.js +34 -26
- package/dist/components/Form/react/index.d.ts +7 -2
- package/dist/components/Form/react/index.js +28 -24
- package/dist/components/Form/style/index.css +1 -1
- package/dist/components/Grid/react/index.d.ts +13 -2
- package/dist/components/Grid/react/index.js +39 -34
- package/dist/components/Grid/style/index.css +1 -1
- package/dist/components/Loader/js/loader.d.ts +5 -1
- package/dist/components/Loader/react/index.d.ts +5 -1
- package/dist/components/Loader/react/index.js +22 -18
- package/dist/components/Loader/style/index.css +1 -1
- package/dist/components/Menu/js/menu.d.ts +6 -0
- package/dist/components/Menu/js/menu.js +19 -0
- package/dist/components/Menu/react/index.d.ts +34 -0
- package/dist/components/Menu/react/index.js +44 -0
- package/dist/components/Menu/style/index.css +1 -0
- package/dist/components/Nav/react/index.js +5 -1
- package/dist/components/Placeholder/style/index.css +1 -1
- package/dist/components/Slider/js/slider.d.ts +11 -0
- package/dist/components/Slider/js/slider.js +14 -0
- package/dist/components/Slider/react/index.d.ts +40 -0
- package/dist/components/Slider/react/index.js +27 -0
- package/dist/components/Slider/style/index.css +1 -0
- package/dist/components/Tab/react/index.js +48 -42
- package/dist/components/Tab/style/index.css +1 -1
- package/dist/index.d.ts +3 -0
- package/dist/index.js +25 -18
- package/dist/node_modules/.pnpm/flatpickr@4.6.13/node_modules/flatpickr/dist/l10n/fr.js +71 -0
- package/dist/templates/Cards/Cards.d.ts +4 -0
- package/dist/templates/Cards/Cards.tsx +55 -0
- package/dist/templates/Forms/Forms-elements.tsx +9 -4
- package/dist/templates/Loaders/Loaders.tsx +5 -0
- package/dist/templates/Sliders/Sliders.d.ts +4 -0
- package/dist/templates/Sliders/Sliders.tsx +150 -0
- package/dist/templates/index.d.ts +2 -0
- package/dist/templates/index.ts +2 -0
- package/package.json +5 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
@layer components{.badge{--badge-border-radius: var(--border-radius-pill);--badge-font-size: var(--font-size-xs);font-size:var(--badge-font-size);line-height:initial;margin:.2rem;border:1px solid transparent;height:fit-content;display:flex;gap:var(--spacing-xs);align-items:center}.badge--primary{--color: color-mix(in srgb, var(--primary), var(--bg-tint-color, var(--dark)) var(--bg-tint, 0%));background-color:var(--color);color:var(--primary-contrast);border-color:var(--primary)}.badge--secondary{--color: color-mix(in srgb, var(--secondary), var(--bg-tint-color, var(--dark)) var(--bg-tint, 0%));background-color:var(--color);color:var(--secondary-contrast);border-color:var(--secondary)}.badge--accent{--color: color-mix(in srgb, var(--accent), var(--bg-tint-color, var(--dark)) var(--bg-tint, 0%));background-color:var(--color);color:var(--accent-contrast);border-color:var(--accent)}.badge--tertiary{--color: color-mix(in srgb, var(--tertiary), var(--bg-tint-color, var(--dark)) var(--bg-tint, 0%));background-color:var(--color);color:var(--tertiary-contrast);border-color:var(--tertiary)}.badge--success{--color: color-mix(in srgb, var(--success), var(--bg-tint-color, var(--dark)) var(--bg-tint, 0%));background-color:var(--color);color:var(--success-contrast);border-color:var(--success)}.badge--danger{--color: color-mix(in srgb, var(--danger), var(--bg-tint-color, var(--dark)) var(--bg-tint, 0%));background-color:var(--color);color:var(--danger-contrast);border-color:var(--danger)}.badge--warning{--color: color-mix(in srgb, var(--warning), var(--bg-tint-color, var(--dark)) var(--bg-tint, 0%));background-color:var(--color);color:var(--warning-contrast);border-color:var(--warning)}.badge--info{--color: color-mix(in srgb, var(--info), var(--bg-tint-color, var(--dark)) var(--bg-tint, 0%));background-color:var(--color);color:var(--info-contrast);border-color:var(--info)}.badge--light{--color: color-mix(in srgb, var(--light), var(--bg-tint-color, var(--dark)) var(--bg-tint, 0%));background-color:var(--color);color:var(--light-contrast);border-color:var(--light)}.badge--dark{--color: color-mix(in srgb, var(--dark), var(--bg-tint-color, var(--dark)) var(--bg-tint, 0%));background-color:var(--color);color:var(--dark-contrast);border-color:var(--dark)}.badge--outline{--bg-opacity: 0;background-color:transparent;color:inherit}.badge--outline-primary{border-color:#296782;color:#296782}.badge--outline-secondary,.badge--outline-accent{border-color:#49b4e8;color:#49b4e8}.badge--outline-tertiary{border-color:#f5524d;color:#f5524d}.badge--outline-success{border-color:#73d3b6;color:#73d3b6}.badge--outline-danger{border-color:#ea5f5f;color:#ea5f5f}.badge--outline-warning{border-color:#f5d762;color:#f5d762}.badge--outline-info{border-color:#73b6d3;color:#73b6d3}.badge--outline-light{border-color:#fff;color:#fff}.badge--outline-dark{border-color:#000;color:#000}.badge--xs{--badge-padding-x: .5em;--badge-padding-y: .3em;--badge-font-size: .5em}.badge--sm{--badge-padding-x: .5em;--badge-padding-y: .3em;--badge-font-size: .6em}.badge--md{--badge-padding-x: .65em;--badge-padding-y: .35em;--badge-font-size: .7rem}.badge--lg{--badge-padding-x: .7em;--badge-padding-y: .45em;--badge-font-size: .8rem}.badge--xl{--badge-padding-x: .75em;--badge-padding-y: .55em;--badge-font-size: .9rem}.badge__content{display:inline-block}}
|
|
1
|
+
@layer components{.badge{--badge-border-radius: var(--border-radius-pill);--badge-font-size: var(--font-size-xs);font-size:var(--badge-font-size);line-height:initial;margin:.2rem;border:1px solid transparent;height:fit-content;display:flex;gap:var(--spacing-xs);align-items:center;color:red}.badge--primary{--color: color-mix(in srgb, var(--primary), var(--bg-tint-color, var(--dark)) var(--bg-tint, 0%));background-color:var(--color);color:var(--primary-contrast);border-color:var(--primary)}.badge--secondary{--color: color-mix(in srgb, var(--secondary), var(--bg-tint-color, var(--dark)) var(--bg-tint, 0%));background-color:var(--color);color:var(--secondary-contrast);border-color:var(--secondary)}.badge--accent{--color: color-mix(in srgb, var(--accent), var(--bg-tint-color, var(--dark)) var(--bg-tint, 0%));background-color:var(--color);color:var(--accent-contrast);border-color:var(--accent)}.badge--tertiary{--color: color-mix(in srgb, var(--tertiary), var(--bg-tint-color, var(--dark)) var(--bg-tint, 0%));background-color:var(--color);color:var(--tertiary-contrast);border-color:var(--tertiary)}.badge--success{--color: color-mix(in srgb, var(--success), var(--bg-tint-color, var(--dark)) var(--bg-tint, 0%));background-color:var(--color);color:var(--success-contrast);border-color:var(--success)}.badge--danger{--color: color-mix(in srgb, var(--danger), var(--bg-tint-color, var(--dark)) var(--bg-tint, 0%));background-color:var(--color);color:var(--danger-contrast);border-color:var(--danger)}.badge--warning{--color: color-mix(in srgb, var(--warning), var(--bg-tint-color, var(--dark)) var(--bg-tint, 0%));background-color:var(--color);color:var(--warning-contrast);border-color:var(--warning)}.badge--info{--color: color-mix(in srgb, var(--info), var(--bg-tint-color, var(--dark)) var(--bg-tint, 0%));background-color:var(--color);color:var(--info-contrast);border-color:var(--info)}.badge--light{--color: color-mix(in srgb, var(--light), var(--bg-tint-color, var(--dark)) var(--bg-tint, 0%));background-color:var(--color);color:var(--light-contrast);border-color:var(--light)}.badge--dark{--color: color-mix(in srgb, var(--dark), var(--bg-tint-color, var(--dark)) var(--bg-tint, 0%));background-color:var(--color);color:var(--dark-contrast);border-color:var(--dark)}.badge--outline{--bg-opacity: 0;background-color:transparent;color:inherit}.badge--outline-primary{border-color:#296782;color:#296782}.badge--outline-secondary,.badge--outline-accent{border-color:#49b4e8;color:#49b4e8}.badge--outline-tertiary{border-color:#f5524d;color:#f5524d}.badge--outline-success{border-color:#73d3b6;color:#73d3b6}.badge--outline-danger{border-color:#ea5f5f;color:#ea5f5f}.badge--outline-warning{border-color:#f5d762;color:#f5d762}.badge--outline-info{border-color:#73b6d3;color:#73b6d3}.badge--outline-light{border-color:#fff;color:#fff}.badge--outline-dark{border-color:#000;color:#000}.badge--grey{--badge-color: var(--gray-500);border-color:var(--gray-500);color:var(--gray-500)}.badge--xs{--badge-padding-x: .5em;--badge-padding-y: .3em;--badge-font-size: .5em}.badge--sm{--badge-padding-x: .5em;--badge-padding-y: .3em;--badge-font-size: .6em}.badge--md{--badge-padding-x: .65em;--badge-padding-y: .35em;--badge-font-size: .7rem}.badge--lg{--badge-padding-x: .7em;--badge-padding-y: .45em;--badge-font-size: .8rem}.badge--xl{--badge-padding-x: .75em;--badge-padding-y: .55em;--badge-font-size: .9rem}.badge__content{display:inline-block}}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { CardProps } from 'react-bootstrap';
|
|
2
|
+
/**
|
|
3
|
+
* Propriétés du composant Card.
|
|
4
|
+
*/
|
|
5
|
+
export interface Props extends CardProps {
|
|
6
|
+
/**
|
|
7
|
+
* Classe CSS additionnelle.
|
|
8
|
+
*/
|
|
9
|
+
className?: string;
|
|
10
|
+
}
|
|
11
|
+
/**
|
|
12
|
+
* Composant Card principal.
|
|
13
|
+
* Basé sur React Bootstrap.
|
|
14
|
+
*
|
|
15
|
+
* @param {Props} props - Les propriétés du composant.
|
|
16
|
+
* @returns {JSX.Element} Le rendu du composant.
|
|
17
|
+
*/
|
|
18
|
+
export declare const Card: {
|
|
19
|
+
({ className, children, ...props }: Props): import("react/jsx-runtime").JSX.Element;
|
|
20
|
+
Img({ className, ...props }: any): import("react/jsx-runtime").JSX.Element;
|
|
21
|
+
Header({ className, ...props }: any): import("react/jsx-runtime").JSX.Element;
|
|
22
|
+
Title({ className, ...props }: any): import("react/jsx-runtime").JSX.Element;
|
|
23
|
+
Subtitle({ className, ...props }: any): import("react/jsx-runtime").JSX.Element;
|
|
24
|
+
Body({ className, ...props }: any): import("react/jsx-runtime").JSX.Element;
|
|
25
|
+
Text({ className, ...props }: any): import("react/jsx-runtime").JSX.Element;
|
|
26
|
+
Link({ className, ...props }: any): import("react/jsx-runtime").JSX.Element;
|
|
27
|
+
Footer({ className, ...props }: any): import("react/jsx-runtime").JSX.Element;
|
|
28
|
+
ImgOverlay({ className, ...props }: any): import("react/jsx-runtime").JSX.Element;
|
|
29
|
+
};
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { jsx as e } from "react/jsx-runtime";
|
|
2
|
+
import { Card as t } from "react-bootstrap";
|
|
3
|
+
import '../style/index.css';/* empty css */
|
|
4
|
+
const m = ({
|
|
5
|
+
className: a = "",
|
|
6
|
+
children: r,
|
|
7
|
+
...i
|
|
8
|
+
}) => /* @__PURE__ */ e(t, { className: `${a}`.trim(), ...i, children: r });
|
|
9
|
+
m.Img = ({ className: a = "", ...r }) => /* @__PURE__ */ e(t.Img, { className: `card__img ${a}`.trim(), ...r });
|
|
10
|
+
m.Header = ({ className: a = "", ...r }) => /* @__PURE__ */ e(t.Header, { className: `card__header ${a}`.trim(), ...r });
|
|
11
|
+
m.Title = ({ className: a = "", ...r }) => /* @__PURE__ */ e(t.Title, { className: `card__title ${a}`.trim(), ...r });
|
|
12
|
+
m.Subtitle = ({ className: a = "", ...r }) => /* @__PURE__ */ e(t.Subtitle, { className: `card__subtitle ${a}`.trim(), ...r });
|
|
13
|
+
m.Body = ({ className: a = "", ...r }) => /* @__PURE__ */ e(t.Body, { className: `card__body ${a}`.trim(), ...r });
|
|
14
|
+
m.Text = ({ className: a = "", ...r }) => /* @__PURE__ */ e(t.Text, { className: `card__text ${a}`.trim(), ...r });
|
|
15
|
+
m.Link = ({ className: a = "", ...r }) => /* @__PURE__ */ e(t.Link, { className: `card__link ${a}`.trim(), ...r });
|
|
16
|
+
m.Footer = ({ className: a = "", ...r }) => /* @__PURE__ */ e(t.Footer, { className: `card__footer ${a}`.trim(), ...r });
|
|
17
|
+
m.ImgOverlay = ({ className: a = "", ...r }) => /* @__PURE__ */ e(t.ImgOverlay, { className: `card__img-overlay ${a}`.trim(), ...r });
|
|
18
|
+
export {
|
|
19
|
+
m as Card
|
|
20
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
@layer components{.card{--card-border-radius: var(--radius-base);--card-inner-border-radius: var(--radius-base)}}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsxs as i, jsx as o } from "react/jsx-runtime";
|
|
2
|
-
import { tokens as
|
|
3
|
-
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 "../../../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 */
|
|
4
4
|
/* empty css */
|
|
5
5
|
import "react-bootstrap";
|
|
6
6
|
/* empty css */
|
|
@@ -33,8 +33,12 @@ import "react-router-dom";
|
|
|
33
33
|
/* empty css */
|
|
34
34
|
/* empty css */
|
|
35
35
|
/* empty css */
|
|
36
|
-
|
|
37
|
-
|
|
36
|
+
import "../../Menu/react/index.js";
|
|
37
|
+
import "@splidejs/react-splide";
|
|
38
|
+
/* empty css */
|
|
39
|
+
import "../../Card/react/index.js";
|
|
40
|
+
const R = ({ name: r }) => {
|
|
41
|
+
const p = m.brands[r];
|
|
38
42
|
return /* @__PURE__ */ i(t, { children: [
|
|
39
43
|
/* @__PURE__ */ o("div", { className: `color bg-${r} p-4`, children: /* @__PURE__ */ i(t, { vertical: !0, center: !0, children: [
|
|
40
44
|
/* @__PURE__ */ o("span", { className: "color__name", children: r }),
|
|
@@ -57,5 +61,5 @@ const M = ({ name: r }) => {
|
|
|
57
61
|
] });
|
|
58
62
|
};
|
|
59
63
|
export {
|
|
60
|
-
|
|
64
|
+
R as Color
|
|
61
65
|
};
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { jsx as r, jsxs as i } from "react/jsx-runtime";
|
|
2
|
-
import { useNavigate as
|
|
3
|
-
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 */
|
|
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 */
|
|
4
4
|
/* empty css */
|
|
5
|
-
import { Button as
|
|
5
|
+
import { Button as e } from "../../Button/react/index.js";
|
|
6
6
|
import { Icon as a } from "../../Icon/react/index.js";
|
|
7
7
|
import { Group as o } from "../../Group/react/index.js";
|
|
8
8
|
/* empty css */
|
|
@@ -32,8 +32,12 @@ import "../../Auth/react/index.js";
|
|
|
32
32
|
/* empty css */
|
|
33
33
|
/* empty css */
|
|
34
34
|
/* empty css */
|
|
35
|
-
|
|
36
|
-
|
|
35
|
+
import "../../Menu/react/index.js";
|
|
36
|
+
import "@splidejs/react-splide";
|
|
37
|
+
/* empty css */
|
|
38
|
+
import "../../Card/react/index.js";
|
|
39
|
+
const T = ({ code: t = 404 }) => {
|
|
40
|
+
const m = p();
|
|
37
41
|
return /* @__PURE__ */ r("main", { className: "error-page", children: /* @__PURE__ */ r("div", { className: "error-page__container ", children: /* @__PURE__ */ i("div", { className: "container", children: [
|
|
38
42
|
/* @__PURE__ */ i(o, { className: "text-secondary mb-4", children: [
|
|
39
43
|
/* @__PURE__ */ r(a, { name: "icon-triangle-alert", size: "4xl" }),
|
|
@@ -44,9 +48,9 @@ const K = ({ code: t = 404 }) => {
|
|
|
44
48
|
] }),
|
|
45
49
|
/* @__PURE__ */ r("h2", { children: "Oups ! Page non trouvée" }),
|
|
46
50
|
/* @__PURE__ */ r("p", { children: "La page que vous recherchez semble avoir disparu dans le néant numérique." }),
|
|
47
|
-
/* @__PURE__ */ r(o, { className: "mt-4", children: /* @__PURE__ */ r(
|
|
51
|
+
/* @__PURE__ */ r(o, { className: "mt-4", children: /* @__PURE__ */ r(e, { onClick: () => m("/"), variant: "primary", children: "Retour à l'accueil" }) })
|
|
48
52
|
] }) }) });
|
|
49
53
|
};
|
|
50
54
|
export {
|
|
51
|
-
|
|
55
|
+
T as Errorpage
|
|
52
56
|
};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { default as Pickr } from '@simonwep/pickr';
|
|
2
|
+
/**
|
|
3
|
+
* Initialise une instance de Pickr pour la sélection de couleur.
|
|
4
|
+
*
|
|
5
|
+
* @param {HTMLElement} element - L'élément sur lequel attacher le picker.
|
|
6
|
+
* @param {string} defaultValue - La couleur par défaut (HEX).
|
|
7
|
+
* @param {string[]} swatches - Liste des couleurs prédéfinies.
|
|
8
|
+
* @param {(color: string) => void} onChange - Callback appelé lors du changement de couleur.
|
|
9
|
+
* @returns {Pickr} L'instance de Pickr créée.
|
|
10
|
+
*/
|
|
11
|
+
export declare const initColorPicker: (element: HTMLElement, defaultValue: string, swatches: string[], onChange: (color: string) => void) => Pickr;
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import i from "@simonwep/pickr";
|
|
2
|
+
const l = (t, n, r, o) => {
|
|
3
|
+
const e = new i({
|
|
4
|
+
el: t,
|
|
5
|
+
useAsButton: !0,
|
|
6
|
+
theme: "nano",
|
|
7
|
+
i18n: {
|
|
8
|
+
"btn:save": "Enregistrer",
|
|
9
|
+
"btn:cancel": "Annuler",
|
|
10
|
+
"btn:clear": "Vider"
|
|
11
|
+
},
|
|
12
|
+
swatches: r,
|
|
13
|
+
default: n,
|
|
14
|
+
components: {
|
|
15
|
+
preview: !0,
|
|
16
|
+
opacity: !1,
|
|
17
|
+
hue: !0,
|
|
18
|
+
interaction: {
|
|
19
|
+
hex: !0,
|
|
20
|
+
rgba: !1,
|
|
21
|
+
hsla: !1,
|
|
22
|
+
hsva: !1,
|
|
23
|
+
cmyk: !1,
|
|
24
|
+
input: !0,
|
|
25
|
+
save: !1
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
});
|
|
29
|
+
return e.on("change", (a) => {
|
|
30
|
+
const s = a.toHEXA().toString();
|
|
31
|
+
o(s);
|
|
32
|
+
}), e;
|
|
33
|
+
};
|
|
34
|
+
export {
|
|
35
|
+
l as initColorPicker
|
|
36
|
+
};
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { CustomLocale } from 'flatpickr/dist/types/locale';
|
|
2
|
+
/**
|
|
3
|
+
* Map des locales supportées pour Flatpickr.
|
|
4
|
+
*/
|
|
5
|
+
export declare const localeMap: {
|
|
6
|
+
fr: CustomLocale;
|
|
7
|
+
en: string;
|
|
8
|
+
};
|
|
9
|
+
/**
|
|
10
|
+
* Détermine le séparateur de plage en fonction de la locale.
|
|
11
|
+
*
|
|
12
|
+
* @param {string} localeCode - Le code de la locale (ex: 'fr', 'en').
|
|
13
|
+
* @returns {string} Le séparateur utilisé pour les plages de dates.
|
|
14
|
+
*/
|
|
15
|
+
export declare const getRangeSeparator: (localeCode: string) => string;
|
|
16
|
+
/**
|
|
17
|
+
* Initialise une instance de Flatpickr.
|
|
18
|
+
*
|
|
19
|
+
* @param {HTMLElement} element - L'élément sur lequel attacher le picker (input caché).
|
|
20
|
+
* @param {any} options - Options de configuration de Flatpickr.
|
|
21
|
+
* @param {HTMLElement | null} positionElement - Élément d'ancrage pour le positionnement.
|
|
22
|
+
* @param {(dateStr: string) => void} onChange - Callback appelé lors du changement de date.
|
|
23
|
+
* @returns {any} L'instance de Flatpickr.
|
|
24
|
+
*/
|
|
25
|
+
export declare const initDatePicker: (element: HTMLElement, options: any | undefined, positionElement: (HTMLElement | null) | undefined, onChange: (dateStr: string) => void) => any;
|
|
26
|
+
/**
|
|
27
|
+
* Calcule la valeur formatée pour l'input caché (soumission de formulaire).
|
|
28
|
+
* Supporte les dates simples et les plages de dates.
|
|
29
|
+
*
|
|
30
|
+
* @param {string} inputVal - La valeur actuelle affichée dans l'input visible.
|
|
31
|
+
* @param {string} separator - Le séparateur de plage utilisé.
|
|
32
|
+
* @param {any} flatpickrInstance - L'instance active de Flatpickr.
|
|
33
|
+
* @returns {string} La valeur formatée pour la soumission.
|
|
34
|
+
*/
|
|
35
|
+
export declare const formatHiddenDateValue: (inputVal: string, separator: string, flatpickrInstance: any) => string;
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import a from "flatpickr";
|
|
2
|
+
import { f as i } from "../../../_virtual/fr.js";
|
|
3
|
+
const u = {
|
|
4
|
+
fr: i.French,
|
|
5
|
+
en: "default"
|
|
6
|
+
}, g = (t) => u[t]?.rangeSeparator || " to ", F = (t, e = {}, o = null, r) => {
|
|
7
|
+
const n = {
|
|
8
|
+
...{
|
|
9
|
+
dateFormat: "d/m/Y",
|
|
10
|
+
altFormat: "Y-m-d",
|
|
11
|
+
locale: "en"
|
|
12
|
+
},
|
|
13
|
+
...e,
|
|
14
|
+
locale: u[e.locale] || "en"
|
|
15
|
+
};
|
|
16
|
+
return a(t, {
|
|
17
|
+
...n,
|
|
18
|
+
allowInput: !0,
|
|
19
|
+
altInput: !1,
|
|
20
|
+
positionElement: o || void 0,
|
|
21
|
+
static: !0,
|
|
22
|
+
onChange: (d, l) => {
|
|
23
|
+
r(l);
|
|
24
|
+
}
|
|
25
|
+
});
|
|
26
|
+
}, S = (t, e, o) => {
|
|
27
|
+
if (!t || !o) return "";
|
|
28
|
+
try {
|
|
29
|
+
const [r, c] = t.split(e), { dateFormat: n, altFormat: d } = o.config, l = r ? a.parseDate(r, n) : null, m = c ? a.parseDate(c, n) : null, s = l ? a.formatDate(l, d) : "", f = m ? a.formatDate(m, d) : "";
|
|
30
|
+
return s && f ? `${s} / ${f}` : s || "";
|
|
31
|
+
} catch {
|
|
32
|
+
return "";
|
|
33
|
+
}
|
|
34
|
+
};
|
|
35
|
+
export {
|
|
36
|
+
S as formatHiddenDateValue,
|
|
37
|
+
g as getRangeSeparator,
|
|
38
|
+
F as initDatePicker,
|
|
39
|
+
u as localeMap
|
|
40
|
+
};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Détermine le code pays par défaut en fonction de la langue du document.
|
|
3
|
+
* @returns {string} Le code pays (ex: "fr", "gb").
|
|
4
|
+
*/
|
|
5
|
+
export declare const getDefaultCountry: () => string;
|
|
6
|
+
/**
|
|
7
|
+
* Initialise un observateur pour détecter les changements de langue du site.
|
|
8
|
+
* @param {boolean} initialCountry - Si un pays initial est déjà défini (pour ignorer l'auto-détection).
|
|
9
|
+
* @param {(country: string) => void} callback - Fonction appelée quand le pays change.
|
|
10
|
+
* @returns {MutationObserver | null} L'instance de l'observateur ou null.
|
|
11
|
+
*/
|
|
12
|
+
export declare const watchLanguageChange: (initialCountry: any, callback: (country: string) => void) => MutationObserver | null;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
const r = () => {
|
|
2
|
+
if (typeof document > "u") return "fr";
|
|
3
|
+
const t = document.documentElement.lang.toLowerCase();
|
|
4
|
+
return t.startsWith("fr") ? "fr" : t.startsWith("en") ? "gb" : "fr";
|
|
5
|
+
}, u = (t, n) => {
|
|
6
|
+
if (t || typeof document > "u") return null;
|
|
7
|
+
const e = new MutationObserver(() => {
|
|
8
|
+
n(r());
|
|
9
|
+
});
|
|
10
|
+
return e.observe(document.documentElement, {
|
|
11
|
+
attributes: !0,
|
|
12
|
+
attributeFilter: ["lang"]
|
|
13
|
+
}), e;
|
|
14
|
+
};
|
|
15
|
+
export {
|
|
16
|
+
r as getDefaultCountry,
|
|
17
|
+
u as watchLanguageChange
|
|
18
|
+
};
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Propriétés du composant FormColor.
|
|
3
|
+
*/
|
|
4
|
+
export interface FormColorProps {
|
|
5
|
+
/**
|
|
6
|
+
* Valeur actuelle de la couleur (format HEX).
|
|
7
|
+
*/
|
|
8
|
+
value?: string;
|
|
9
|
+
/**
|
|
10
|
+
* Callback lors du changement de couleur.
|
|
11
|
+
* @param {string} value - La nouvelle couleur au format HEX.
|
|
12
|
+
*/
|
|
13
|
+
onChange?: (value: string) => void;
|
|
14
|
+
/**
|
|
15
|
+
* Désactiver le composant.
|
|
16
|
+
*/
|
|
17
|
+
disabled?: boolean;
|
|
18
|
+
/**
|
|
19
|
+
* Nom du champ pour le formulaire.
|
|
20
|
+
*/
|
|
21
|
+
name?: string;
|
|
22
|
+
/**
|
|
23
|
+
* Classe CSS additionnelle.
|
|
24
|
+
*/
|
|
25
|
+
className?: string;
|
|
26
|
+
/**
|
|
27
|
+
* Couleurs prédéfinies (swatches).
|
|
28
|
+
*/
|
|
29
|
+
swatches?: string[];
|
|
30
|
+
}
|
|
31
|
+
/**
|
|
32
|
+
* Composant de sélection de couleur premium basé sur Pickr.
|
|
33
|
+
*
|
|
34
|
+
* @param {FormColorProps} props - Les propriétés du composant.
|
|
35
|
+
* @returns {JSX.Element} Le composant FormColor rendu.
|
|
36
|
+
*/
|
|
37
|
+
export declare const FormColor: ({ value, onChange, disabled, name, className, swatches, }: FormColorProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
import { jsxs as d, jsx as f } from "react/jsx-runtime";
|
|
2
|
+
import { useRef as s, useState as C, useEffect as u } from "react";
|
|
3
|
+
import { initColorPicker as a } from "../js/color.js";
|
|
4
|
+
const A = ({
|
|
5
|
+
value: r,
|
|
6
|
+
onChange: o,
|
|
7
|
+
disabled: l = !1,
|
|
8
|
+
name: p,
|
|
9
|
+
className: m = "",
|
|
10
|
+
swatches: F = [
|
|
11
|
+
"#F44336",
|
|
12
|
+
"#E91E63",
|
|
13
|
+
"#9C27B4",
|
|
14
|
+
"#673AB7",
|
|
15
|
+
"#3F51B5",
|
|
16
|
+
"#2196F3",
|
|
17
|
+
"#03A9F4",
|
|
18
|
+
"#00BCD4",
|
|
19
|
+
"#009688",
|
|
20
|
+
"#4CAF50",
|
|
21
|
+
"#8BC34A",
|
|
22
|
+
"#CDDC39",
|
|
23
|
+
"#FFEB3B",
|
|
24
|
+
"#FFC107"
|
|
25
|
+
]
|
|
26
|
+
}) => {
|
|
27
|
+
const e = s(null), t = s(null), [n, i] = C(r || "");
|
|
28
|
+
return u(() => (e.current && (t.current = a(
|
|
29
|
+
e.current,
|
|
30
|
+
r || "#ffffff",
|
|
31
|
+
F,
|
|
32
|
+
(c) => {
|
|
33
|
+
i(c), o && o(c);
|
|
34
|
+
}
|
|
35
|
+
)), () => {
|
|
36
|
+
t.current && t.current.destroy();
|
|
37
|
+
}), []), u(() => {
|
|
38
|
+
r !== void 0 && r !== n && (i(r), t.current && t.current.setColor(r));
|
|
39
|
+
}, [r]), /* @__PURE__ */ d("div", { className: `form__input form__input--color ${m}`.trim(), children: [
|
|
40
|
+
/* @__PURE__ */ f(
|
|
41
|
+
"div",
|
|
42
|
+
{
|
|
43
|
+
ref: e,
|
|
44
|
+
className: "color-selection",
|
|
45
|
+
style: { backgroundColor: n || "transparent" }
|
|
46
|
+
}
|
|
47
|
+
),
|
|
48
|
+
/* @__PURE__ */ f(
|
|
49
|
+
"input",
|
|
50
|
+
{
|
|
51
|
+
type: "hidden",
|
|
52
|
+
name: p,
|
|
53
|
+
value: n,
|
|
54
|
+
disabled: l,
|
|
55
|
+
readOnly: !0
|
|
56
|
+
}
|
|
57
|
+
)
|
|
58
|
+
] });
|
|
59
|
+
};
|
|
60
|
+
export {
|
|
61
|
+
A as FormColor
|
|
62
|
+
};
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import { ForwardRefExoticComponent, RefAttributes } from 'react';
|
|
2
|
+
/**
|
|
3
|
+
* Propriétés du composant FormDate.
|
|
4
|
+
*/
|
|
5
|
+
export interface FormDateProps {
|
|
6
|
+
/**
|
|
7
|
+
* Options spécifiques pour flatpickr.
|
|
8
|
+
*/
|
|
9
|
+
flatpickrOptions?: any;
|
|
10
|
+
/**
|
|
11
|
+
* Valeur actuelle de la date.
|
|
12
|
+
*/
|
|
13
|
+
value?: string;
|
|
14
|
+
/**
|
|
15
|
+
* Callback lors du changement de date.
|
|
16
|
+
* @param {string} dateStr - La date sélectionnée au format texte.
|
|
17
|
+
*/
|
|
18
|
+
onChange?: (dateStr: string) => void;
|
|
19
|
+
/**
|
|
20
|
+
* Texte d'aide si vide.
|
|
21
|
+
*/
|
|
22
|
+
placeholder?: string;
|
|
23
|
+
/**
|
|
24
|
+
* Nom du champ pour le formulaire.
|
|
25
|
+
*/
|
|
26
|
+
name?: string;
|
|
27
|
+
/**
|
|
28
|
+
* Classe CSS additionnelle.
|
|
29
|
+
*/
|
|
30
|
+
className?: string;
|
|
31
|
+
/**
|
|
32
|
+
* Icône à afficher (par défaut: "icon-calendar").
|
|
33
|
+
*/
|
|
34
|
+
icon?: string;
|
|
35
|
+
/**
|
|
36
|
+
* Désactiver le champ.
|
|
37
|
+
*/
|
|
38
|
+
disabled?: boolean;
|
|
39
|
+
}
|
|
40
|
+
/**
|
|
41
|
+
* Composant de sélection de date premium basé sur Flatpickr.
|
|
42
|
+
*
|
|
43
|
+
* @param {FormDateProps} props - Les propriétés du composant.
|
|
44
|
+
* @param {React.Ref<HTMLInputElement>} ref - Référence vers l'input visible.
|
|
45
|
+
* @returns {JSX.Element} Le composant FormDate rendu.
|
|
46
|
+
*
|
|
47
|
+
*/
|
|
48
|
+
export declare const FormDate: ForwardRefExoticComponent<FormDateProps & RefAttributes<HTMLInputElement>>;
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
import { jsxs as V, jsx as t } from "react/jsx-runtime";
|
|
2
|
+
import { forwardRef as j, useRef as a, useState as C, useMemo as F, useEffect as d } from "react";
|
|
3
|
+
import { Form as P } from "react-bootstrap";
|
|
4
|
+
import { Icon as _ } from "../../Icon/react/index.js";
|
|
5
|
+
import { getRangeSeparator as b, initDatePicker as g, formatHiddenDateValue as k } from "../js/date.js";
|
|
6
|
+
const S = j(({
|
|
7
|
+
flatpickrOptions: n,
|
|
8
|
+
value: e = "",
|
|
9
|
+
onChange: c,
|
|
10
|
+
placeholder: p,
|
|
11
|
+
name: R,
|
|
12
|
+
className: h = "",
|
|
13
|
+
icon: u,
|
|
14
|
+
disabled: f = !1,
|
|
15
|
+
...y
|
|
16
|
+
}, I) => {
|
|
17
|
+
const x = I, o = a(null), i = a(null), r = a(null), [s, m] = C(e || ""), D = F(() => b(n?.locale), [n?.locale]);
|
|
18
|
+
d(() => {
|
|
19
|
+
if (o.current)
|
|
20
|
+
return r.current = g(
|
|
21
|
+
o.current,
|
|
22
|
+
n,
|
|
23
|
+
i.current,
|
|
24
|
+
(l) => {
|
|
25
|
+
m(l), c?.(l);
|
|
26
|
+
}
|
|
27
|
+
), () => r.current?.destroy();
|
|
28
|
+
}, [n, c]), d(() => {
|
|
29
|
+
e !== void 0 && e !== s && (m(e || ""), r.current?.setDate(e || "", !1));
|
|
30
|
+
}, [e]);
|
|
31
|
+
const N = () => {
|
|
32
|
+
f || r.current?.open();
|
|
33
|
+
};
|
|
34
|
+
return /* @__PURE__ */ V("div", { className: `form__input ${h}`.trim(), children: [
|
|
35
|
+
u && /* @__PURE__ */ t(_, { name: u, size: "sm" }),
|
|
36
|
+
/* @__PURE__ */ t(
|
|
37
|
+
P.Control,
|
|
38
|
+
{
|
|
39
|
+
...y,
|
|
40
|
+
ref: x,
|
|
41
|
+
autoComplete: "off",
|
|
42
|
+
value: s,
|
|
43
|
+
onClick: N,
|
|
44
|
+
readOnly: !0,
|
|
45
|
+
disabled: f,
|
|
46
|
+
placeholder: p,
|
|
47
|
+
className: "form-date-control"
|
|
48
|
+
}
|
|
49
|
+
),
|
|
50
|
+
/* @__PURE__ */ t("span", { ref: i, className: "form-date-anchor" }),
|
|
51
|
+
/* @__PURE__ */ t("input", { ref: o, style: { display: "none" }, tabIndex: -1, "aria-hidden": "true" }),
|
|
52
|
+
/* @__PURE__ */ t("input", { type: "hidden", name: R, value: k(s, D, r.current) })
|
|
53
|
+
] });
|
|
54
|
+
});
|
|
55
|
+
export {
|
|
56
|
+
S as FormDate
|
|
57
|
+
};
|
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
import { jsxs as I, jsx as n } from "react/jsx-runtime";
|
|
2
2
|
import { InputGroup as m, Form as _ } from "react-bootstrap";
|
|
3
|
-
import '../style/index.css';/* empty css */
|
|
4
3
|
import { calculateDecrement as $, calculateIncrement as b } from "../js/form.js";
|
|
5
4
|
import { Icon as i } from "../../Icon/react/index.js";
|
|
6
|
-
const
|
|
5
|
+
const D = ({
|
|
7
6
|
value: s = 0,
|
|
8
7
|
onChange: e,
|
|
9
8
|
min: r,
|
|
@@ -51,5 +50,5 @@ const T = ({
|
|
|
51
50
|
] });
|
|
52
51
|
};
|
|
53
52
|
export {
|
|
54
|
-
|
|
53
|
+
D as NumberInput
|
|
55
54
|
};
|
|
@@ -28,6 +28,10 @@ export interface PasswordConfirmProps {
|
|
|
28
28
|
* Si l'input est désactivé.
|
|
29
29
|
*/
|
|
30
30
|
disabled?: boolean;
|
|
31
|
+
/**
|
|
32
|
+
* Message d'erreur personnalisé (utile pour la traduction).
|
|
33
|
+
*/
|
|
34
|
+
errorMessage?: string;
|
|
31
35
|
}
|
|
32
36
|
/**
|
|
33
37
|
* Composant PasswordConfirm avec validation en temps réel.
|
|
@@ -35,4 +39,4 @@ export interface PasswordConfirmProps {
|
|
|
35
39
|
* @param {PasswordConfirmProps} props - Les propriétés du composant.
|
|
36
40
|
* @returns {JSX.Element} Le composant PasswordConfirm rendu.
|
|
37
41
|
*/
|
|
38
|
-
export declare const PasswordConfirm: ({ passwordToMatch, value, onChange, className, placeholder, disabled, }: PasswordConfirmProps) => import("react/jsx-runtime").JSX.Element;
|
|
42
|
+
export declare const PasswordConfirm: ({ passwordToMatch, value, onChange, className, placeholder, disabled, errorMessage, }: PasswordConfirmProps) => import("react/jsx-runtime").JSX.Element;
|