fina-react-ds 1.0.40 → 1.0.43
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/alert-dialog.js +1 -166
- package/dist/components/alert.js +1 -73
- package/dist/components/avatar.js +1 -58
- package/dist/components/badge.js +1 -44
- package/dist/components/button.js +1 -153
- package/dist/components/calendar.js +1 -205
- package/dist/components/card.js +1 -99
- package/dist/components/checkbox.js +1 -34
- package/dist/components/data-loader.js +1 -24
- package/dist/components/date-picker.js +1 -64
- package/dist/components/dialog.js +1 -145
- package/dist/components/dropdown-menu.js +1 -248
- package/dist/components/file-uploader.js +1 -108
- package/dist/components/form-color-picker.js +1 -29
- package/dist/components/form-date.js +1 -30
- package/dist/components/form-file-uploader.js +1 -32
- package/dist/components/form-image-uploader.js +1 -40
- package/dist/components/form-input.js +1 -35
- package/dist/components/form-select.js +1 -51
- package/dist/components/form-switch.js +1 -35
- package/dist/components/form-textarea.js +1 -35
- package/dist/components/form.js +1 -110
- package/dist/components/hover-card.js +1 -43
- package/dist/components/image-uploader.js +1 -130
- package/dist/components/index.js +1 -200
- package/dist/components/input.js +1 -26
- package/dist/components/label.js +1 -32
- package/dist/components/mode-toggle.js +1 -26
- package/dist/components/pagination.js +1 -128
- package/dist/components/password-rules-checker.js +1 -44
- package/dist/components/popover.js +1 -50
- package/dist/components/select.js +1 -53
- package/dist/components/separator.js +1 -29
- package/dist/components/sheet.js +1 -160
- package/dist/components/sidebar.js +1 -624
- package/dist/components/simple-pagination.js +1 -34
- package/dist/components/simple-tooltip.js +1 -17
- package/dist/components/skeleton.js +1 -18
- package/dist/components/sonner.js +1 -24
- package/dist/components/switch.js +1 -34
- package/dist/components/table.js +1 -124
- package/dist/components/tabs.js +1 -73
- package/dist/components/textarea.js +1 -23
- package/dist/components/tooltip.js +1 -61
- package/dist/hooks/index.js +1 -4
- package/dist/hooks/use-mobile.js +1 -17
- package/dist/lib/arrays.js +1 -7
- package/dist/lib/dates.js +1 -21
- package/dist/lib/http.js +1 -56
- package/dist/lib/index.js +1 -27
- package/dist/lib/strings.js +1 -6
- package/dist/lib/utils.js +2 -31
- package/dist/lib/yup.js +1 -88
- package/dist/node_modules/.pnpm/date-fns@4.1.0/node_modules/date-fns/locale/_lib/buildFormatLongFn.js +1 -12
- package/dist/node_modules/.pnpm/date-fns@4.1.0/node_modules/date-fns/locale/_lib/buildLocalizeFn.js +1 -21
- package/dist/node_modules/.pnpm/date-fns@4.1.0/node_modules/date-fns/locale/_lib/buildMatchFn.js +1 -36
- package/dist/node_modules/.pnpm/date-fns@4.1.0/node_modules/date-fns/locale/_lib/buildMatchPatternFn.js +1 -18
- package/dist/node_modules/.pnpm/date-fns@4.1.0/node_modules/date-fns/locale/fr/_lib/formatDistance.js +1 -72
- package/dist/node_modules/.pnpm/date-fns@4.1.0/node_modules/date-fns/locale/fr/_lib/formatLong.js +1 -33
- package/dist/node_modules/.pnpm/date-fns@4.1.0/node_modules/date-fns/locale/fr/_lib/formatRelative.js +1 -13
- package/dist/node_modules/.pnpm/date-fns@4.1.0/node_modules/date-fns/locale/fr/_lib/localize.js +1 -123
- package/dist/node_modules/.pnpm/date-fns@4.1.0/node_modules/date-fns/locale/fr/_lib/match.js +1 -112
- package/dist/node_modules/.pnpm/date-fns@4.1.0/node_modules/date-fns/locale/fr.js +1 -21
- package/dist/providers/loader-provider.js +1 -34
- package/dist/providers/theme-provider.js +1 -45
- package/package.json +15 -9
- package/dist/index.js +0 -225
package/dist/lib/yup.js
CHANGED
|
@@ -1,88 +1 @@
|
|
|
1
|
-
var r
|
|
2
|
-
var t = (e, i) => r(e, "name", { value: i, configurable: !0 });
|
|
3
|
-
import * as a from "yup";
|
|
4
|
-
a.setLocale({
|
|
5
|
-
mixed: {
|
|
6
|
-
default: "Ce champ est invalide",
|
|
7
|
-
required: "Ce champ est obligatoire",
|
|
8
|
-
defined: "Ce champ doit être défini",
|
|
9
|
-
notNull: "Ce champ ne doit pas être nul",
|
|
10
|
-
oneOf: "Ce champ doit être l’un des suivants : ${values}",
|
|
11
|
-
notOneOf: "Ce champ ne doit pas être l’un des suivants : ${values}",
|
|
12
|
-
notType: /* @__PURE__ */ t(({ type: e }) => {
|
|
13
|
-
switch (e) {
|
|
14
|
-
case "array":
|
|
15
|
-
return "Ce champ doit être un tableau";
|
|
16
|
-
case "date":
|
|
17
|
-
return "Ce champ doit être un date";
|
|
18
|
-
case "number":
|
|
19
|
-
return "Ce champ doit être un nombre";
|
|
20
|
-
case "object":
|
|
21
|
-
return "Ce champ doit être un object";
|
|
22
|
-
case "string":
|
|
23
|
-
return "Ce champ doit être une chaîne de caractères";
|
|
24
|
-
case "boolean":
|
|
25
|
-
return "Ce champ doit être un booléen";
|
|
26
|
-
default:
|
|
27
|
-
return "Type invalide";
|
|
28
|
-
}
|
|
29
|
-
}, "notType")
|
|
30
|
-
},
|
|
31
|
-
string: {
|
|
32
|
-
length: "Ce champ doit contenir exactement ${length} caractères",
|
|
33
|
-
min: "Ce champ doit contenir au minimum ${min} caractères",
|
|
34
|
-
max: "Ce champ doit contenir au maximum ${max} caractères",
|
|
35
|
-
matches: "Ce champ doit correspondre au format requis",
|
|
36
|
-
email: "Veuillez saisir une adresse email valide",
|
|
37
|
-
url: "Veuillez saisir une URL valide",
|
|
38
|
-
uuid: "Veuillez saisir un UUID valide",
|
|
39
|
-
datetime: "Veuillez saisir une date et heure valide",
|
|
40
|
-
trim: "Ce champ ne doit pas contenir d’espaces vides",
|
|
41
|
-
lowercase: "Ce champ doit être en minuscules",
|
|
42
|
-
uppercase: "Ce champ doit être en majuscules"
|
|
43
|
-
},
|
|
44
|
-
number: {
|
|
45
|
-
min: "Ce champ doit être supérieur ou égal à ${min}",
|
|
46
|
-
max: "Ce champ doit être inférieur ou égal à ${max}",
|
|
47
|
-
lessThan: "Ce champ doit être inférieur à ${less}",
|
|
48
|
-
moreThan: "Ce champ doit être supérieur à ${more}",
|
|
49
|
-
positive: "Ce champ doit être un nombre positif",
|
|
50
|
-
negative: "Ce champ doit être un nombre négatif",
|
|
51
|
-
integer: "Ce champ doit être un nombre entier"
|
|
52
|
-
},
|
|
53
|
-
date: {
|
|
54
|
-
min: "Cette date doit être postérieure au ${min}",
|
|
55
|
-
max: "Cette date doit être antérieure au ${max}"
|
|
56
|
-
},
|
|
57
|
-
array: {
|
|
58
|
-
min: "Ce champ doit contenir au minimum ${min} éléments",
|
|
59
|
-
max: "Ce champ doit contenir au maximum ${max} éléments",
|
|
60
|
-
length: "Ce champ doit contenir exactement ${length} éléments"
|
|
61
|
-
}
|
|
62
|
-
});
|
|
63
|
-
const {
|
|
64
|
-
string: m,
|
|
65
|
-
number: o,
|
|
66
|
-
boolean: u,
|
|
67
|
-
date: c,
|
|
68
|
-
array: s,
|
|
69
|
-
object: d,
|
|
70
|
-
mixed: l,
|
|
71
|
-
ref: p,
|
|
72
|
-
lazy: h,
|
|
73
|
-
reach: C,
|
|
74
|
-
addMethod: b
|
|
75
|
-
} = a;
|
|
76
|
-
export {
|
|
77
|
-
b as addMethod,
|
|
78
|
-
s as array,
|
|
79
|
-
u as boolean,
|
|
80
|
-
c as date,
|
|
81
|
-
h as lazy,
|
|
82
|
-
l as mixed,
|
|
83
|
-
o as number,
|
|
84
|
-
d as object,
|
|
85
|
-
C as reach,
|
|
86
|
-
p as ref,
|
|
87
|
-
m as string
|
|
88
|
-
};
|
|
1
|
+
var r=Object.defineProperty;var t=(e,i)=>r(e,"name",{value:i,configurable:!0});import*as a from"yup";a.setLocale({mixed:{default:"Ce champ est invalide",required:"Ce champ est obligatoire",defined:"Ce champ doit être défini",notNull:"Ce champ ne doit pas être nul",oneOf:"Ce champ doit être l’un des suivants : ${values}",notOneOf:"Ce champ ne doit pas être l’un des suivants : ${values}",notType:t(({type:e})=>{switch(e){case"array":return"Ce champ doit être un tableau";case"date":return"Ce champ doit être un date";case"number":return"Ce champ doit être un nombre";case"object":return"Ce champ doit être un object";case"string":return"Ce champ doit être une chaîne de caractères";case"boolean":return"Ce champ doit être un booléen";default:return"Type invalide"}},"notType")},string:{length:"Ce champ doit contenir exactement ${length} caractères",min:"Ce champ doit contenir au minimum ${min} caractères",max:"Ce champ doit contenir au maximum ${max} caractères",matches:"Ce champ doit correspondre au format requis",email:"Veuillez saisir une adresse email valide",url:"Veuillez saisir une URL valide",uuid:"Veuillez saisir un UUID valide",datetime:"Veuillez saisir une date et heure valide",trim:"Ce champ ne doit pas contenir d’espaces vides",lowercase:"Ce champ doit être en minuscules",uppercase:"Ce champ doit être en majuscules"},number:{min:"Ce champ doit être supérieur ou égal à ${min}",max:"Ce champ doit être inférieur ou égal à ${max}",lessThan:"Ce champ doit être inférieur à ${less}",moreThan:"Ce champ doit être supérieur à ${more}",positive:"Ce champ doit être un nombre positif",negative:"Ce champ doit être un nombre négatif",integer:"Ce champ doit être un nombre entier"},date:{min:"Cette date doit être postérieure au ${min}",max:"Cette date doit être antérieure au ${max}"},array:{min:"Ce champ doit contenir au minimum ${min} éléments",max:"Ce champ doit contenir au maximum ${max} éléments",length:"Ce champ doit contenir exactement ${length} éléments"}});const{string:m,number:o,boolean:u,date:c,array:s,object:d,mixed:l,ref:p,lazy:h,reach:C,addMethod:b}=a;export{b as addMethod,s as array,u as boolean,c as date,h as lazy,l as mixed,o as number,d as object,C as reach,p as ref,m as string};
|
|
@@ -1,12 +1 @@
|
|
|
1
|
-
var r
|
|
2
|
-
var n = (t, d) => r(t, "name", { value: d, configurable: !0 });
|
|
3
|
-
function u(t) {
|
|
4
|
-
return (d = {}) => {
|
|
5
|
-
const o = d.width ? String(d.width) : t.defaultWidth;
|
|
6
|
-
return t.formats[o] || t.formats[t.defaultWidth];
|
|
7
|
-
};
|
|
8
|
-
}
|
|
9
|
-
n(u, "buildFormatLongFn");
|
|
10
|
-
export {
|
|
11
|
-
u as buildFormatLongFn
|
|
12
|
-
};
|
|
1
|
+
var r=Object.defineProperty;var n=(t,d)=>r(t,"name",{value:d,configurable:!0});function u(t){return(d={})=>{const o=d.width?String(d.width):t.defaultWidth;return t.formats[o]||t.formats[t.defaultWidth]}}n(u,"buildFormatLongFn");export{u as buildFormatLongFn};
|
package/dist/node_modules/.pnpm/date-fns@4.1.0/node_modules/date-fns/locale/_lib/buildLocalizeFn.js
CHANGED
|
@@ -1,21 +1 @@
|
|
|
1
|
-
var f
|
|
2
|
-
var u = (t, n) => f(t, "name", { value: n, configurable: !0 });
|
|
3
|
-
function o(t) {
|
|
4
|
-
return (n, e) => {
|
|
5
|
-
const a = e?.context ? String(e.context) : "standalone";
|
|
6
|
-
let i;
|
|
7
|
-
if (a === "formatting" && t.formattingValues) {
|
|
8
|
-
const d = t.defaultFormattingWidth || t.defaultWidth, l = e?.width ? String(e.width) : d;
|
|
9
|
-
i = t.formattingValues[l] || t.formattingValues[d];
|
|
10
|
-
} else {
|
|
11
|
-
const d = t.defaultWidth, l = e?.width ? String(e.width) : t.defaultWidth;
|
|
12
|
-
i = t.values[l] || t.values[d];
|
|
13
|
-
}
|
|
14
|
-
const c = t.argumentCallback ? t.argumentCallback(n) : n;
|
|
15
|
-
return i[c];
|
|
16
|
-
};
|
|
17
|
-
}
|
|
18
|
-
u(o, "buildLocalizeFn");
|
|
19
|
-
export {
|
|
20
|
-
o as buildLocalizeFn
|
|
21
|
-
};
|
|
1
|
+
var f=Object.defineProperty;var u=(t,n)=>f(t,"name",{value:n,configurable:!0});function o(t){return(n,e)=>{const a=e?.context?String(e.context):"standalone";let i;if(a==="formatting"&&t.formattingValues){const d=t.defaultFormattingWidth||t.defaultWidth,l=e?.width?String(e.width):d;i=t.formattingValues[l]||t.formattingValues[d]}else{const d=t.defaultWidth,l=e?.width?String(e.width):t.defaultWidth;i=t.values[l]||t.values[d]}const c=t.argumentCallback?t.argumentCallback(n):n;return i[c]}}u(o,"buildLocalizeFn");export{o as buildLocalizeFn};
|
package/dist/node_modules/.pnpm/date-fns@4.1.0/node_modules/date-fns/locale/_lib/buildMatchFn.js
CHANGED
|
@@ -1,36 +1 @@
|
|
|
1
|
-
var o = Object.
|
|
2
|
-
var r = (t, n) => o(t, "name", { value: n, configurable: !0 });
|
|
3
|
-
function m(t) {
|
|
4
|
-
return (n, e = {}) => {
|
|
5
|
-
const l = e.width, f = l && t.matchPatterns[l] || t.matchPatterns[t.defaultMatchWidth], d = n.match(f);
|
|
6
|
-
if (!d)
|
|
7
|
-
return null;
|
|
8
|
-
const c = d[0], u = l && t.parsePatterns[l] || t.parsePatterns[t.defaultParseWidth], h = Array.isArray(u) ? k(u, (i) => i.test(c)) : (
|
|
9
|
-
// [TODO] -- I challenge you to fix the type
|
|
10
|
-
P(u, (i) => i.test(c))
|
|
11
|
-
);
|
|
12
|
-
let a;
|
|
13
|
-
a = t.valueCallback ? t.valueCallback(h) : h, a = e.valueCallback ? (
|
|
14
|
-
// [TODO] -- I challenge you to fix the type
|
|
15
|
-
e.valueCallback(a)
|
|
16
|
-
) : a;
|
|
17
|
-
const s = n.slice(c.length);
|
|
18
|
-
return { value: a, rest: s };
|
|
19
|
-
};
|
|
20
|
-
}
|
|
21
|
-
r(m, "buildMatchFn");
|
|
22
|
-
function P(t, n) {
|
|
23
|
-
for (const e in t)
|
|
24
|
-
if (Object.prototype.hasOwnProperty.call(t, e) && n(t[e]))
|
|
25
|
-
return e;
|
|
26
|
-
}
|
|
27
|
-
r(P, "findKey");
|
|
28
|
-
function k(t, n) {
|
|
29
|
-
for (let e = 0; e < t.length; e++)
|
|
30
|
-
if (n(t[e]))
|
|
31
|
-
return e;
|
|
32
|
-
}
|
|
33
|
-
r(k, "findIndex");
|
|
34
|
-
export {
|
|
35
|
-
m as buildMatchFn
|
|
36
|
-
};
|
|
1
|
+
var o=Object.defineProperty;var r=(t,n)=>o(t,"name",{value:n,configurable:!0});function m(t){return(n,e={})=>{const l=e.width,f=l&&t.matchPatterns[l]||t.matchPatterns[t.defaultMatchWidth],d=n.match(f);if(!d)return null;const c=d[0],u=l&&t.parsePatterns[l]||t.parsePatterns[t.defaultParseWidth],h=Array.isArray(u)?k(u,i=>i.test(c)):P(u,i=>i.test(c));let a;a=t.valueCallback?t.valueCallback(h):h,a=e.valueCallback?e.valueCallback(a):a;const s=n.slice(c.length);return{value:a,rest:s}}}r(m,"buildMatchFn");function P(t,n){for(const e in t)if(Object.prototype.hasOwnProperty.call(t,e)&&n(t[e]))return e}r(P,"findKey");function k(t,n){for(let e=0;e<t.length;e++)if(n(t[e]))return e}r(k,"findIndex");export{m as buildMatchFn};
|
|
@@ -1,18 +1 @@
|
|
|
1
|
-
var b
|
|
2
|
-
var u = (t, l) => b(t, "name", { value: l, configurable: !0 });
|
|
3
|
-
function v(t) {
|
|
4
|
-
return (l, c = {}) => {
|
|
5
|
-
const n = l.match(t.matchPattern);
|
|
6
|
-
if (!n) return null;
|
|
7
|
-
const r = n[0], a = l.match(t.parsePattern);
|
|
8
|
-
if (!a) return null;
|
|
9
|
-
let e = t.valueCallback ? t.valueCallback(a[0]) : a[0];
|
|
10
|
-
e = c.valueCallback ? c.valueCallback(e) : e;
|
|
11
|
-
const h = l.slice(r.length);
|
|
12
|
-
return { value: e, rest: h };
|
|
13
|
-
};
|
|
14
|
-
}
|
|
15
|
-
u(v, "buildMatchPatternFn");
|
|
16
|
-
export {
|
|
17
|
-
v as buildMatchPatternFn
|
|
18
|
-
};
|
|
1
|
+
var b=Object.defineProperty;var u=(t,l)=>b(t,"name",{value:l,configurable:!0});function v(t){return(l,c={})=>{const n=l.match(t.matchPattern);if(!n)return null;const r=n[0],a=l.match(t.parsePattern);if(!a)return null;let e=t.valueCallback?t.valueCallback(a[0]):a[0];e=c.valueCallback?c.valueCallback(e):e;const h=l.slice(r.length);return{value:e,rest:h}}}u(v,"buildMatchPatternFn");export{v as buildMatchPatternFn};
|
|
@@ -1,72 +1 @@
|
|
|
1
|
-
var u
|
|
2
|
-
var r = (s, n) => u(s, "name", { value: n, configurable: !0 });
|
|
3
|
-
const i = {
|
|
4
|
-
lessThanXSeconds: {
|
|
5
|
-
one: "moins d’une seconde",
|
|
6
|
-
other: "moins de {{count}} secondes"
|
|
7
|
-
},
|
|
8
|
-
xSeconds: {
|
|
9
|
-
one: "1 seconde",
|
|
10
|
-
other: "{{count}} secondes"
|
|
11
|
-
},
|
|
12
|
-
halfAMinute: "30 secondes",
|
|
13
|
-
lessThanXMinutes: {
|
|
14
|
-
one: "moins d’une minute",
|
|
15
|
-
other: "moins de {{count}} minutes"
|
|
16
|
-
},
|
|
17
|
-
xMinutes: {
|
|
18
|
-
one: "1 minute",
|
|
19
|
-
other: "{{count}} minutes"
|
|
20
|
-
},
|
|
21
|
-
aboutXHours: {
|
|
22
|
-
one: "environ 1 heure",
|
|
23
|
-
other: "environ {{count}} heures"
|
|
24
|
-
},
|
|
25
|
-
xHours: {
|
|
26
|
-
one: "1 heure",
|
|
27
|
-
other: "{{count}} heures"
|
|
28
|
-
},
|
|
29
|
-
xDays: {
|
|
30
|
-
one: "1 jour",
|
|
31
|
-
other: "{{count}} jours"
|
|
32
|
-
},
|
|
33
|
-
aboutXWeeks: {
|
|
34
|
-
one: "environ 1 semaine",
|
|
35
|
-
other: "environ {{count}} semaines"
|
|
36
|
-
},
|
|
37
|
-
xWeeks: {
|
|
38
|
-
one: "1 semaine",
|
|
39
|
-
other: "{{count}} semaines"
|
|
40
|
-
},
|
|
41
|
-
aboutXMonths: {
|
|
42
|
-
one: "environ 1 mois",
|
|
43
|
-
other: "environ {{count}} mois"
|
|
44
|
-
},
|
|
45
|
-
xMonths: {
|
|
46
|
-
one: "1 mois",
|
|
47
|
-
other: "{{count}} mois"
|
|
48
|
-
},
|
|
49
|
-
aboutXYears: {
|
|
50
|
-
one: "environ 1 an",
|
|
51
|
-
other: "environ {{count}} ans"
|
|
52
|
-
},
|
|
53
|
-
xYears: {
|
|
54
|
-
one: "1 an",
|
|
55
|
-
other: "{{count}} ans"
|
|
56
|
-
},
|
|
57
|
-
overXYears: {
|
|
58
|
-
one: "plus d’un an",
|
|
59
|
-
other: "plus de {{count}} ans"
|
|
60
|
-
},
|
|
61
|
-
almostXYears: {
|
|
62
|
-
one: "presqu’un an",
|
|
63
|
-
other: "presque {{count}} ans"
|
|
64
|
-
}
|
|
65
|
-
}, c = /* @__PURE__ */ r((s, n, t) => {
|
|
66
|
-
let e;
|
|
67
|
-
const o = i[s];
|
|
68
|
-
return typeof o == "string" ? e = o : n === 1 ? e = o.one : e = o.other.replace("{{count}}", String(n)), t?.addSuffix ? t.comparison && t.comparison > 0 ? "dans " + e : "il y a " + e : e;
|
|
69
|
-
}, "formatDistance");
|
|
70
|
-
export {
|
|
71
|
-
c as formatDistance
|
|
72
|
-
};
|
|
1
|
+
var u=Object.defineProperty;var r=(s,n)=>u(s,"name",{value:n,configurable:!0});const i={lessThanXSeconds:{one:"moins d’une seconde",other:"moins de {{count}} secondes"},xSeconds:{one:"1 seconde",other:"{{count}} secondes"},halfAMinute:"30 secondes",lessThanXMinutes:{one:"moins d’une minute",other:"moins de {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"environ 1 heure",other:"environ {{count}} heures"},xHours:{one:"1 heure",other:"{{count}} heures"},xDays:{one:"1 jour",other:"{{count}} jours"},aboutXWeeks:{one:"environ 1 semaine",other:"environ {{count}} semaines"},xWeeks:{one:"1 semaine",other:"{{count}} semaines"},aboutXMonths:{one:"environ 1 mois",other:"environ {{count}} mois"},xMonths:{one:"1 mois",other:"{{count}} mois"},aboutXYears:{one:"environ 1 an",other:"environ {{count}} ans"},xYears:{one:"1 an",other:"{{count}} ans"},overXYears:{one:"plus d’un an",other:"plus de {{count}} ans"},almostXYears:{one:"presqu’un an",other:"presque {{count}} ans"}},c=r((s,n,t)=>{let e;const o=i[s];return typeof o=="string"?e=o:n===1?e=o.one:e=o.other.replace("{{count}}",String(n)),t?.addSuffix?t.comparison&&t.comparison>0?"dans "+e:"il y a "+e:e},"formatDistance");export{c as formatDistance};
|
package/dist/node_modules/.pnpm/date-fns@4.1.0/node_modules/date-fns/locale/fr/_lib/formatLong.js
CHANGED
|
@@ -1,33 +1 @@
|
|
|
1
|
-
import
|
|
2
|
-
const m = {
|
|
3
|
-
full: "EEEE d MMMM y",
|
|
4
|
-
long: "d MMMM y",
|
|
5
|
-
medium: "d MMM y",
|
|
6
|
-
short: "dd/MM/y"
|
|
7
|
-
}, d = {
|
|
8
|
-
full: "HH:mm:ss zzzz",
|
|
9
|
-
long: "HH:mm:ss z",
|
|
10
|
-
medium: "HH:mm:ss",
|
|
11
|
-
short: "HH:mm"
|
|
12
|
-
}, e = {
|
|
13
|
-
full: "{{date}} 'à' {{time}}",
|
|
14
|
-
long: "{{date}} 'à' {{time}}",
|
|
15
|
-
medium: "{{date}}, {{time}}",
|
|
16
|
-
short: "{{date}}, {{time}}"
|
|
17
|
-
}, a = {
|
|
18
|
-
date: t({
|
|
19
|
-
formats: m,
|
|
20
|
-
defaultWidth: "full"
|
|
21
|
-
}),
|
|
22
|
-
time: t({
|
|
23
|
-
formats: d,
|
|
24
|
-
defaultWidth: "full"
|
|
25
|
-
}),
|
|
26
|
-
dateTime: t({
|
|
27
|
-
formats: e,
|
|
28
|
-
defaultWidth: "full"
|
|
29
|
-
})
|
|
30
|
-
};
|
|
31
|
-
export {
|
|
32
|
-
a as formatLong
|
|
33
|
-
};
|
|
1
|
+
import{buildFormatLongFn as t}from"../../_lib/buildFormatLongFn.js";const m={full:"EEEE d MMMM y",long:"d MMMM y",medium:"d MMM y",short:"dd/MM/y"},d={full:"HH:mm:ss zzzz",long:"HH:mm:ss z",medium:"HH:mm:ss",short:"HH:mm"},e={full:"{{date}} 'à' {{time}}",long:"{{date}} 'à' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},a={date:t({formats:m,defaultWidth:"full"}),time:t({formats:d,defaultWidth:"full"}),dateTime:t({formats:e,defaultWidth:"full"})};export{a as formatLong};
|
|
@@ -1,13 +1 @@
|
|
|
1
|
-
var a
|
|
2
|
-
var o = (e, t) => a(e, "name", { value: t, configurable: !0 });
|
|
3
|
-
const r = {
|
|
4
|
-
lastWeek: "eeee 'dernier à' p",
|
|
5
|
-
yesterday: "'hier à' p",
|
|
6
|
-
today: "'aujourd’hui à' p",
|
|
7
|
-
tomorrow: "'demain à' p'",
|
|
8
|
-
nextWeek: "eeee 'prochain à' p",
|
|
9
|
-
other: "P"
|
|
10
|
-
}, d = /* @__PURE__ */ o((e, t, i, p) => r[e], "formatRelative");
|
|
11
|
-
export {
|
|
12
|
-
d as formatRelative
|
|
13
|
-
};
|
|
1
|
+
var a=Object.defineProperty;var o=(e,t)=>a(e,"name",{value:t,configurable:!0});const r={lastWeek:"eeee 'dernier à' p",yesterday:"'hier à' p",today:"'aujourd’hui à' p",tomorrow:"'demain à' p'",nextWeek:"eeee 'prochain à' p",other:"P"},d=o((e,t,i,p)=>r[e],"formatRelative");export{d as formatRelative};
|
package/dist/node_modules/.pnpm/date-fns@4.1.0/node_modules/date-fns/locale/fr/_lib/localize.js
CHANGED
|
@@ -1,123 +1 @@
|
|
|
1
|
-
var d
|
|
2
|
-
var t = (n, i) => d(n, "name", { value: i, configurable: !0 });
|
|
3
|
-
import { buildLocalizeFn as r } from "../../_lib/buildLocalizeFn.js";
|
|
4
|
-
const s = {
|
|
5
|
-
narrow: ["av. J.-C", "ap. J.-C"],
|
|
6
|
-
abbreviated: ["av. J.-C", "ap. J.-C"],
|
|
7
|
-
wide: ["avant Jésus-Christ", "après Jésus-Christ"]
|
|
8
|
-
}, u = {
|
|
9
|
-
narrow: ["T1", "T2", "T3", "T4"],
|
|
10
|
-
abbreviated: ["1er trim.", "2ème trim.", "3ème trim.", "4ème trim."],
|
|
11
|
-
wide: ["1er trimestre", "2ème trimestre", "3ème trimestre", "4ème trimestre"]
|
|
12
|
-
}, l = {
|
|
13
|
-
narrow: ["J", "F", "M", "A", "M", "J", "J", "A", "S", "O", "N", "D"],
|
|
14
|
-
abbreviated: [
|
|
15
|
-
"janv.",
|
|
16
|
-
"févr.",
|
|
17
|
-
"mars",
|
|
18
|
-
"avr.",
|
|
19
|
-
"mai",
|
|
20
|
-
"juin",
|
|
21
|
-
"juil.",
|
|
22
|
-
"août",
|
|
23
|
-
"sept.",
|
|
24
|
-
"oct.",
|
|
25
|
-
"nov.",
|
|
26
|
-
"déc."
|
|
27
|
-
],
|
|
28
|
-
wide: [
|
|
29
|
-
"janvier",
|
|
30
|
-
"février",
|
|
31
|
-
"mars",
|
|
32
|
-
"avril",
|
|
33
|
-
"mai",
|
|
34
|
-
"juin",
|
|
35
|
-
"juillet",
|
|
36
|
-
"août",
|
|
37
|
-
"septembre",
|
|
38
|
-
"octobre",
|
|
39
|
-
"novembre",
|
|
40
|
-
"décembre"
|
|
41
|
-
]
|
|
42
|
-
}, v = {
|
|
43
|
-
narrow: ["D", "L", "M", "M", "J", "V", "S"],
|
|
44
|
-
short: ["di", "lu", "ma", "me", "je", "ve", "sa"],
|
|
45
|
-
abbreviated: ["dim.", "lun.", "mar.", "mer.", "jeu.", "ven.", "sam."],
|
|
46
|
-
wide: [
|
|
47
|
-
"dimanche",
|
|
48
|
-
"lundi",
|
|
49
|
-
"mardi",
|
|
50
|
-
"mercredi",
|
|
51
|
-
"jeudi",
|
|
52
|
-
"vendredi",
|
|
53
|
-
"samedi"
|
|
54
|
-
]
|
|
55
|
-
}, c = {
|
|
56
|
-
narrow: {
|
|
57
|
-
am: "AM",
|
|
58
|
-
pm: "PM",
|
|
59
|
-
midnight: "minuit",
|
|
60
|
-
noon: "midi",
|
|
61
|
-
morning: "mat.",
|
|
62
|
-
afternoon: "ap.m.",
|
|
63
|
-
evening: "soir",
|
|
64
|
-
night: "mat."
|
|
65
|
-
},
|
|
66
|
-
abbreviated: {
|
|
67
|
-
am: "AM",
|
|
68
|
-
pm: "PM",
|
|
69
|
-
midnight: "minuit",
|
|
70
|
-
noon: "midi",
|
|
71
|
-
morning: "matin",
|
|
72
|
-
afternoon: "après-midi",
|
|
73
|
-
evening: "soir",
|
|
74
|
-
night: "matin"
|
|
75
|
-
},
|
|
76
|
-
wide: {
|
|
77
|
-
am: "AM",
|
|
78
|
-
pm: "PM",
|
|
79
|
-
midnight: "minuit",
|
|
80
|
-
noon: "midi",
|
|
81
|
-
morning: "du matin",
|
|
82
|
-
afternoon: "de l’après-midi",
|
|
83
|
-
evening: "du soir",
|
|
84
|
-
night: "du matin"
|
|
85
|
-
}
|
|
86
|
-
}, h = /* @__PURE__ */ t((n, i) => {
|
|
87
|
-
const a = Number(n), e = i?.unit;
|
|
88
|
-
if (a === 0) return "0";
|
|
89
|
-
const o = ["year", "week", "hour", "minute", "second"];
|
|
90
|
-
let m;
|
|
91
|
-
return a === 1 ? m = e && o.includes(e) ? "ère" : "er" : m = "ème", a + m;
|
|
92
|
-
}, "ordinalNumber"), M = ["MMM", "MMMM"], g = {
|
|
93
|
-
preprocessor: /* @__PURE__ */ t((n, i) => n.getDate() === 1 || !i.some(
|
|
94
|
-
(e) => e.isToken && M.includes(e.value)
|
|
95
|
-
) ? i : i.map(
|
|
96
|
-
(e) => e.isToken && e.value === "do" ? { isToken: !0, value: "d" } : e
|
|
97
|
-
), "preprocessor"),
|
|
98
|
-
ordinalNumber: h,
|
|
99
|
-
era: r({
|
|
100
|
-
values: s,
|
|
101
|
-
defaultWidth: "wide"
|
|
102
|
-
}),
|
|
103
|
-
quarter: r({
|
|
104
|
-
values: u,
|
|
105
|
-
defaultWidth: "wide",
|
|
106
|
-
argumentCallback: /* @__PURE__ */ t((n) => n - 1, "argumentCallback")
|
|
107
|
-
}),
|
|
108
|
-
month: r({
|
|
109
|
-
values: l,
|
|
110
|
-
defaultWidth: "wide"
|
|
111
|
-
}),
|
|
112
|
-
day: r({
|
|
113
|
-
values: v,
|
|
114
|
-
defaultWidth: "wide"
|
|
115
|
-
}),
|
|
116
|
-
dayPeriod: r({
|
|
117
|
-
values: c,
|
|
118
|
-
defaultWidth: "wide"
|
|
119
|
-
})
|
|
120
|
-
};
|
|
121
|
-
export {
|
|
122
|
-
g as localize
|
|
123
|
-
};
|
|
1
|
+
var d=Object.defineProperty;var t=(n,i)=>d(n,"name",{value:i,configurable:!0});import{buildLocalizeFn as r}from"../../_lib/buildLocalizeFn.js";const s={narrow:["av. J.-C","ap. J.-C"],abbreviated:["av. J.-C","ap. J.-C"],wide:["avant Jésus-Christ","après Jésus-Christ"]},u={narrow:["T1","T2","T3","T4"],abbreviated:["1er trim.","2ème trim.","3ème trim.","4ème trim."],wide:["1er trimestre","2ème trimestre","3ème trimestre","4ème trimestre"]},l={narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["janv.","févr.","mars","avr.","mai","juin","juil.","août","sept.","oct.","nov.","déc."],wide:["janvier","février","mars","avril","mai","juin","juillet","août","septembre","octobre","novembre","décembre"]},v={narrow:["D","L","M","M","J","V","S"],short:["di","lu","ma","me","je","ve","sa"],abbreviated:["dim.","lun.","mar.","mer.","jeu.","ven.","sam."],wide:["dimanche","lundi","mardi","mercredi","jeudi","vendredi","samedi"]},c={narrow:{am:"AM",pm:"PM",midnight:"minuit",noon:"midi",morning:"mat.",afternoon:"ap.m.",evening:"soir",night:"mat."},abbreviated:{am:"AM",pm:"PM",midnight:"minuit",noon:"midi",morning:"matin",afternoon:"après-midi",evening:"soir",night:"matin"},wide:{am:"AM",pm:"PM",midnight:"minuit",noon:"midi",morning:"du matin",afternoon:"de l’après-midi",evening:"du soir",night:"du matin"}},h=t((n,i)=>{const a=Number(n),e=i?.unit;if(a===0)return"0";const o=["year","week","hour","minute","second"];let m;return a===1?m=e&&o.includes(e)?"ère":"er":m="ème",a+m},"ordinalNumber"),M=["MMM","MMMM"],g={preprocessor:t((n,i)=>n.getDate()===1||!i.some(e=>e.isToken&&M.includes(e.value))?i:i.map(e=>e.isToken&&e.value==="do"?{isToken:!0,value:"d"}:e),"preprocessor"),ordinalNumber:h,era:r({values:s,defaultWidth:"wide"}),quarter:r({values:u,defaultWidth:"wide",argumentCallback:t(n=>n-1,"argumentCallback")}),month:r({values:l,defaultWidth:"wide"}),day:r({values:v,defaultWidth:"wide"}),dayPeriod:r({values:c,defaultWidth:"wide"})};export{g as localize};
|
package/dist/node_modules/.pnpm/date-fns@4.1.0/node_modules/date-fns/locale/fr/_lib/match.js
CHANGED
|
@@ -1,112 +1 @@
|
|
|
1
|
-
var r
|
|
2
|
-
var t = (a, e) => r(a, "name", { value: e, configurable: !0 });
|
|
3
|
-
import { buildMatchFn as i } from "../../_lib/buildMatchFn.js";
|
|
4
|
-
import { buildMatchPatternFn as n } from "../../_lib/buildMatchPatternFn.js";
|
|
5
|
-
const s = /^(\d+)(ième|ère|ème|er|e)?/i, d = /\d+/i, m = {
|
|
6
|
-
narrow: /^(av\.J\.C|ap\.J\.C|ap\.J\.-C)/i,
|
|
7
|
-
abbreviated: /^(av\.J\.-C|av\.J-C|apr\.J\.-C|apr\.J-C|ap\.J-C)/i,
|
|
8
|
-
wide: /^(avant Jésus-Christ|après Jésus-Christ)/i
|
|
9
|
-
}, o = {
|
|
10
|
-
any: [/^av/i, /^ap/i]
|
|
11
|
-
}, c = {
|
|
12
|
-
narrow: /^T?[1234]/i,
|
|
13
|
-
abbreviated: /^[1234](er|ème|e)? trim\.?/i,
|
|
14
|
-
wide: /^[1234](er|ème|e)? trimestre/i
|
|
15
|
-
}, u = {
|
|
16
|
-
any: [/1/i, /2/i, /3/i, /4/i]
|
|
17
|
-
}, h = {
|
|
18
|
-
narrow: /^[jfmasond]/i,
|
|
19
|
-
abbreviated: /^(janv|févr|mars|avr|mai|juin|juill|juil|août|sept|oct|nov|déc)\.?/i,
|
|
20
|
-
wide: /^(janvier|février|mars|avril|mai|juin|juillet|août|septembre|octobre|novembre|décembre)/i
|
|
21
|
-
}, l = {
|
|
22
|
-
narrow: [
|
|
23
|
-
/^j/i,
|
|
24
|
-
/^f/i,
|
|
25
|
-
/^m/i,
|
|
26
|
-
/^a/i,
|
|
27
|
-
/^m/i,
|
|
28
|
-
/^j/i,
|
|
29
|
-
/^j/i,
|
|
30
|
-
/^a/i,
|
|
31
|
-
/^s/i,
|
|
32
|
-
/^o/i,
|
|
33
|
-
/^n/i,
|
|
34
|
-
/^d/i
|
|
35
|
-
],
|
|
36
|
-
any: [
|
|
37
|
-
/^ja/i,
|
|
38
|
-
/^f/i,
|
|
39
|
-
/^mar/i,
|
|
40
|
-
/^av/i,
|
|
41
|
-
/^ma/i,
|
|
42
|
-
/^juin/i,
|
|
43
|
-
/^juil/i,
|
|
44
|
-
/^ao/i,
|
|
45
|
-
/^s/i,
|
|
46
|
-
/^o/i,
|
|
47
|
-
/^n/i,
|
|
48
|
-
/^d/i
|
|
49
|
-
]
|
|
50
|
-
}, P = {
|
|
51
|
-
narrow: /^[lmjvsd]/i,
|
|
52
|
-
short: /^(di|lu|ma|me|je|ve|sa)/i,
|
|
53
|
-
abbreviated: /^(dim|lun|mar|mer|jeu|ven|sam)\.?/i,
|
|
54
|
-
wide: /^(dimanche|lundi|mardi|mercredi|jeudi|vendredi|samedi)/i
|
|
55
|
-
}, p = {
|
|
56
|
-
narrow: [/^d/i, /^l/i, /^m/i, /^m/i, /^j/i, /^v/i, /^s/i],
|
|
57
|
-
any: [/^di/i, /^lu/i, /^ma/i, /^me/i, /^je/i, /^ve/i, /^sa/i]
|
|
58
|
-
}, v = {
|
|
59
|
-
narrow: /^(a|p|minuit|midi|mat\.?|ap\.?m\.?|soir|nuit)/i,
|
|
60
|
-
any: /^([ap]\.?\s?m\.?|du matin|de l'après[-\s]midi|du soir|de la nuit)/i
|
|
61
|
-
}, j = {
|
|
62
|
-
any: {
|
|
63
|
-
am: /^a/i,
|
|
64
|
-
pm: /^p/i,
|
|
65
|
-
midnight: /^min/i,
|
|
66
|
-
noon: /^mid/i,
|
|
67
|
-
morning: /mat/i,
|
|
68
|
-
afternoon: /ap/i,
|
|
69
|
-
evening: /soir/i,
|
|
70
|
-
night: /nuit/i
|
|
71
|
-
}
|
|
72
|
-
}, w = {
|
|
73
|
-
ordinalNumber: n({
|
|
74
|
-
matchPattern: s,
|
|
75
|
-
parsePattern: d,
|
|
76
|
-
valueCallback: /* @__PURE__ */ t((a) => parseInt(a), "valueCallback")
|
|
77
|
-
}),
|
|
78
|
-
era: i({
|
|
79
|
-
matchPatterns: m,
|
|
80
|
-
defaultMatchWidth: "wide",
|
|
81
|
-
parsePatterns: o,
|
|
82
|
-
defaultParseWidth: "any"
|
|
83
|
-
}),
|
|
84
|
-
quarter: i({
|
|
85
|
-
matchPatterns: c,
|
|
86
|
-
defaultMatchWidth: "wide",
|
|
87
|
-
parsePatterns: u,
|
|
88
|
-
defaultParseWidth: "any",
|
|
89
|
-
valueCallback: /* @__PURE__ */ t((a) => a + 1, "valueCallback")
|
|
90
|
-
}),
|
|
91
|
-
month: i({
|
|
92
|
-
matchPatterns: h,
|
|
93
|
-
defaultMatchWidth: "wide",
|
|
94
|
-
parsePatterns: l,
|
|
95
|
-
defaultParseWidth: "any"
|
|
96
|
-
}),
|
|
97
|
-
day: i({
|
|
98
|
-
matchPatterns: P,
|
|
99
|
-
defaultMatchWidth: "wide",
|
|
100
|
-
parsePatterns: p,
|
|
101
|
-
defaultParseWidth: "any"
|
|
102
|
-
}),
|
|
103
|
-
dayPeriod: i({
|
|
104
|
-
matchPatterns: v,
|
|
105
|
-
defaultMatchWidth: "any",
|
|
106
|
-
parsePatterns: j,
|
|
107
|
-
defaultParseWidth: "any"
|
|
108
|
-
})
|
|
109
|
-
};
|
|
110
|
-
export {
|
|
111
|
-
w as match
|
|
112
|
-
};
|
|
1
|
+
var r=Object.defineProperty;var t=(a,e)=>r(a,"name",{value:e,configurable:!0});import{buildMatchFn as i}from"../../_lib/buildMatchFn.js";import{buildMatchPatternFn as n}from"../../_lib/buildMatchPatternFn.js";const s=/^(\d+)(ième|ère|ème|er|e)?/i,d=/\d+/i,m={narrow:/^(av\.J\.C|ap\.J\.C|ap\.J\.-C)/i,abbreviated:/^(av\.J\.-C|av\.J-C|apr\.J\.-C|apr\.J-C|ap\.J-C)/i,wide:/^(avant Jésus-Christ|après Jésus-Christ)/i},o={any:[/^av/i,/^ap/i]},c={narrow:/^T?[1234]/i,abbreviated:/^[1234](er|ème|e)? trim\.?/i,wide:/^[1234](er|ème|e)? trimestre/i},u={any:[/1/i,/2/i,/3/i,/4/i]},h={narrow:/^[jfmasond]/i,abbreviated:/^(janv|févr|mars|avr|mai|juin|juill|juil|août|sept|oct|nov|déc)\.?/i,wide:/^(janvier|février|mars|avril|mai|juin|juillet|août|septembre|octobre|novembre|décembre)/i},l={narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^av/i,/^ma/i,/^juin/i,/^juil/i,/^ao/i,/^s/i,/^o/i,/^n/i,/^d/i]},P={narrow:/^[lmjvsd]/i,short:/^(di|lu|ma|me|je|ve|sa)/i,abbreviated:/^(dim|lun|mar|mer|jeu|ven|sam)\.?/i,wide:/^(dimanche|lundi|mardi|mercredi|jeudi|vendredi|samedi)/i},p={narrow:[/^d/i,/^l/i,/^m/i,/^m/i,/^j/i,/^v/i,/^s/i],any:[/^di/i,/^lu/i,/^ma/i,/^me/i,/^je/i,/^ve/i,/^sa/i]},v={narrow:/^(a|p|minuit|midi|mat\.?|ap\.?m\.?|soir|nuit)/i,any:/^([ap]\.?\s?m\.?|du matin|de l'après[-\s]midi|du soir|de la nuit)/i},j={any:{am:/^a/i,pm:/^p/i,midnight:/^min/i,noon:/^mid/i,morning:/mat/i,afternoon:/ap/i,evening:/soir/i,night:/nuit/i}},w={ordinalNumber:n({matchPattern:s,parsePattern:d,valueCallback:t(a=>parseInt(a),"valueCallback")}),era:i({matchPatterns:m,defaultMatchWidth:"wide",parsePatterns:o,defaultParseWidth:"any"}),quarter:i({matchPatterns:c,defaultMatchWidth:"wide",parsePatterns:u,defaultParseWidth:"any",valueCallback:t(a=>a+1,"valueCallback")}),month:i({matchPatterns:h,defaultMatchWidth:"wide",parsePatterns:l,defaultParseWidth:"any"}),day:i({matchPatterns:P,defaultMatchWidth:"wide",parsePatterns:p,defaultParseWidth:"any"}),dayPeriod:i({matchPatterns:v,defaultMatchWidth:"any",parsePatterns:j,defaultParseWidth:"any"})};export{w as match};
|
|
@@ -1,21 +1 @@
|
|
|
1
|
-
import
|
|
2
|
-
import { formatLong as t } from "./fr/_lib/formatLong.js";
|
|
3
|
-
import { formatRelative as r } from "./fr/_lib/formatRelative.js";
|
|
4
|
-
import { localize as a } from "./fr/_lib/localize.js";
|
|
5
|
-
import { match as m } from "./fr/_lib/match.js";
|
|
6
|
-
const s = {
|
|
7
|
-
code: "fr",
|
|
8
|
-
formatDistance: o,
|
|
9
|
-
formatLong: t,
|
|
10
|
-
formatRelative: r,
|
|
11
|
-
localize: a,
|
|
12
|
-
match: m,
|
|
13
|
-
options: {
|
|
14
|
-
weekStartsOn: 1,
|
|
15
|
-
firstWeekContainsDate: 4
|
|
16
|
-
}
|
|
17
|
-
};
|
|
18
|
-
export {
|
|
19
|
-
s as default,
|
|
20
|
-
s as fr
|
|
21
|
-
};
|
|
1
|
+
import{formatDistance as o}from"./fr/_lib/formatDistance.js";import{formatLong as t}from"./fr/_lib/formatLong.js";import{formatRelative as r}from"./fr/_lib/formatRelative.js";import{localize as a}from"./fr/_lib/localize.js";import{match as m}from"./fr/_lib/match.js";const s={code:"fr",formatDistance:o,formatLong:t,formatRelative:r,localize:a,match:m,options:{weekStartsOn:1,firstWeekContainsDate:4}};export{s as default,s as fr};
|
|
@@ -1,34 +1 @@
|
|
|
1
|
-
var l
|
|
2
|
-
var t = (e, o) => l(e, "name", { value: o, configurable: !0 });
|
|
3
|
-
import { jsxs as u, jsx as c } from "react/jsx-runtime";
|
|
4
|
-
import { useState as f, createContext as m, useContext as g } from "react";
|
|
5
|
-
import { toast as h } from "sonner";
|
|
6
|
-
const v = {
|
|
7
|
-
isLoading: !1,
|
|
8
|
-
loadingWithToast: /* @__PURE__ */ t(() => null, "loadingWithToast")
|
|
9
|
-
}, s = m(v);
|
|
10
|
-
function P({ children: e, ...o }) {
|
|
11
|
-
const [r, i] = f(!1), d = {
|
|
12
|
-
isLoading: r,
|
|
13
|
-
loadingWithToast: /* @__PURE__ */ t((a, n) => {
|
|
14
|
-
i(!0), n.loading || (n.loading = "Chargement en cours"), h.promise(a, n), a.finally(() => {
|
|
15
|
-
i(!1);
|
|
16
|
-
});
|
|
17
|
-
}, "loadingWithToast")
|
|
18
|
-
};
|
|
19
|
-
return /* @__PURE__ */ u(s.Provider, { ...o, value: d, children: [
|
|
20
|
-
e,
|
|
21
|
-
r && /* @__PURE__ */ c("div", { className: "fixed inset-0 z-9999 bg-transparent pointer-events-auto" })
|
|
22
|
-
] });
|
|
23
|
-
}
|
|
24
|
-
t(P, "LoaderProvider");
|
|
25
|
-
const w = /* @__PURE__ */ t(() => {
|
|
26
|
-
const e = g(s);
|
|
27
|
-
if (e === void 0)
|
|
28
|
-
throw new Error("useTheme must be used within a ThemeProvider");
|
|
29
|
-
return e;
|
|
30
|
-
}, "useLoader");
|
|
31
|
-
export {
|
|
32
|
-
P as LoaderProvider,
|
|
33
|
-
w as useLoader
|
|
34
|
-
};
|
|
1
|
+
var l=Object.defineProperty;var t=(e,o)=>l(e,"name",{value:o,configurable:!0});import{jsxs as u,jsx as c}from"react/jsx-runtime";import{useState as f,createContext as m,useContext as g}from"react";import{toast as h}from"sonner";const v={isLoading:!1,loadingWithToast:t(()=>null,"loadingWithToast")},s=m(v);function P({children:e,...o}){const[r,i]=f(!1),d={isLoading:r,loadingWithToast:t((a,n)=>{i(!0),n.loading||(n.loading="Chargement en cours"),h.promise(a,n),a.finally(()=>{i(!1)})},"loadingWithToast")};return u(s.Provider,{...o,value:d,children:[e,r&&c("div",{className:"fixed inset-0 z-9999 bg-transparent pointer-events-auto"})]})}t(P,"LoaderProvider");const w=t(()=>{const e=g(s);if(e===void 0)throw new Error("useTheme must be used within a ThemeProvider");return e},"useLoader");export{P as LoaderProvider,w as useLoader};
|