@krosoft/react 0.0.356 → 0.0.357

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (63) hide show
  1. package/README.md +17 -0
  2. package/dist/{AppActions-DNYn0HUi.js → AppActions-DhI7gUdH.js} +9 -9
  3. package/dist/{AppSubTitle-DG0JQO_2.js → AppSubTitle-Il_qgP4I.js} +2 -2
  4. package/dist/{AppTitle-BmIuUBxu.js → AppTitle-Dcz860yY.js} +1 -1
  5. package/dist/{ErrorAlert-DssOWPCS.js → ErrorAlert-B6v1MVRR.js} +1 -1
  6. package/dist/{GenericForm-0RClRCcd.js → GenericForm-CH6e_xTW.js} +22 -22
  7. package/dist/{ImageInput-CPOTYevx.js → ImageInput-Dq4RVy4c.js} +2 -2
  8. package/dist/{MultiSelect-a_kQHMOe.js → MultiSelect-T2G5xVtD.js} +3 -3
  9. package/dist/{SearchInput-BDlQAl-9.js → SearchInput-CjpiwvDs.js} +4 -4
  10. package/dist/{behavior-SAdHU_Ew.js → behavior-CSwLI_GG.js} +1 -1
  11. package/dist/{cards-B3X4sUq3.js → cards-zcPRJrU_.js} +2 -2
  12. package/dist/{charts-vsA1ZPoV.js → charts-53H0FPPD.js} +1 -1
  13. package/dist/components/core/cards/index.js +1 -1
  14. package/dist/components/core/charts/index.js +1 -1
  15. package/dist/components/core/dialogs/index.js +3 -3
  16. package/dist/components/core/filters/index.js +117 -116
  17. package/dist/components/core/forms/index.js +1 -1
  18. package/dist/components/core/index.js +18 -18
  19. package/dist/components/core/inputs/index.js +4 -4
  20. package/dist/components/core/language/index.js +1 -1
  21. package/dist/components/core/layouts/index.js +8 -8
  22. package/dist/components/core/navbar/index.js +1 -1
  23. package/dist/components/core/states/index.js +2 -2
  24. package/dist/components/core/table/index.js +49 -48
  25. package/dist/components/core/tabs/index.js +5 -5
  26. package/dist/components/core/theme/index.js +1 -1
  27. package/dist/components/index.js +22 -21
  28. package/dist/components/ui/index.js +6 -5
  29. package/dist/{dialogs-BwxuV1sI.js → dialogs-Cc0rZDqp.js} +18 -18
  30. package/dist/hooks/behavior/index.js +1 -1
  31. package/dist/hooks/index.js +5 -5
  32. package/dist/hooks/ui/index.js +4 -4
  33. package/dist/i18n/index.js +1 -1
  34. package/dist/i18n/krosoftLocales.d.ts +36 -0
  35. package/dist/i18n/krosoftLocales.d.ts.map +1 -1
  36. package/dist/{i18n-IJZY85S7.js → i18n-4vaVzTli.js} +36 -0
  37. package/dist/{inputs-CFHt4Asu.js → inputs-CCNet0vi.js} +4 -4
  38. package/dist/{language-C_T5CI5F.js → language-DH9zG-XJ.js} +2 -2
  39. package/dist/{navbar-B__jqT_n.js → navbar-a8FGZilA.js} +3 -3
  40. package/dist/pwa/index.js +1 -1
  41. package/dist/seasonal/SeasonalEffects.d.ts +20 -0
  42. package/dist/seasonal/SeasonalEffects.d.ts.map +1 -0
  43. package/dist/seasonal/SeasonalEffectsSettings.d.ts +13 -0
  44. package/dist/seasonal/SeasonalEffectsSettings.d.ts.map +1 -0
  45. package/dist/seasonal/index.d.ts +5 -0
  46. package/dist/seasonal/index.d.ts.map +1 -0
  47. package/dist/seasonal/index.js +120 -0
  48. package/dist/seasonal/seasons.d.ts +5 -0
  49. package/dist/seasonal/seasons.d.ts.map +1 -0
  50. package/dist/seasonal/useSeasonalEffects.d.ts +25 -0
  51. package/dist/seasonal/useSeasonalEffects.d.ts.map +1 -0
  52. package/dist/seasonal/useStoredToggle.d.ts +3 -0
  53. package/dist/seasonal/useStoredToggle.d.ts.map +1 -0
  54. package/dist/{sheet-C_t76Ttr.js → sheet-DjBA9WGR.js} +1 -1
  55. package/dist/{states-DHlx93fV.js → states-CaW0ib8X.js} +2 -2
  56. package/dist/switch-DzZwmpBG.js +25 -0
  57. package/dist/{theme-CQeUAOst.js → theme-h2e-zfkV.js} +2 -2
  58. package/dist/{ui-DkYZe7sQ.js → ui-DdOKgsjM.js} +414 -432
  59. package/dist/{ui-upSp3vBd.js → ui-DgZ6ZX8o.js} +3 -3
  60. package/dist/{useDocumentTitle-TS5jFguv.js → useDocumentTitle-BYBTo7Ho.js} +1 -1
  61. package/dist/{useLanguage-hjza5s3o.js → useLanguage-CKnwpudX.js} +1 -1
  62. package/dist/{useTheme-dRbDEXab.js → useTheme-8vZc97M6.js} +1 -1
  63. package/package.json +6 -1
@@ -140,6 +140,24 @@ export declare const krosoftLocales: {
140
140
  updateAction: string;
141
141
  updateDismiss: string;
142
142
  };
143
+ seasonal: {
144
+ snow: {
145
+ label: string;
146
+ description: string;
147
+ toastEnabled: string;
148
+ toastDisabled: string;
149
+ messageEnabled: string;
150
+ messageDisabled: string;
151
+ };
152
+ halloween: {
153
+ label: string;
154
+ description: string;
155
+ toastEnabled: string;
156
+ toastDisabled: string;
157
+ messageEnabled: string;
158
+ messageDisabled: string;
159
+ };
160
+ };
143
161
  };
144
162
  en: {
145
163
  actions: {
@@ -275,6 +293,24 @@ export declare const krosoftLocales: {
275
293
  updateAction: string;
276
294
  updateDismiss: string;
277
295
  };
296
+ seasonal: {
297
+ snow: {
298
+ label: string;
299
+ description: string;
300
+ toastEnabled: string;
301
+ toastDisabled: string;
302
+ messageEnabled: string;
303
+ messageDisabled: string;
304
+ };
305
+ halloween: {
306
+ label: string;
307
+ description: string;
308
+ toastEnabled: string;
309
+ toastDisabled: string;
310
+ messageEnabled: string;
311
+ messageDisabled: string;
312
+ };
313
+ };
278
314
  };
279
315
  };
280
316
  /** Sous-ensemble d'i18next dont on a besoin : évite d'imposer le type complet de l'instance. */
@@ -1 +1 @@
1
- {"version":3,"file":"krosoftLocales.d.ts","sourceRoot":"","sources":["../../src/i18n/krosoftLocales.ts"],"names":[],"mappings":"AAGA;;;;GAIG;AACH,eAAO,MAAM,iBAAiB,YAAY,CAAC;AAE3C,8FAA8F;AAC9F,eAAO,MAAM,cAAc;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAAa,CAAC;AAEzC,gGAAgG;AAChG,UAAU,QAAQ;IAChB,iBAAiB,CAAC,EAAE,CAAC,GAAG,EAAE,MAAM,EAAE,EAAE,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,EAAE,IAAI,CAAC,EAAE,OAAO,EAAE,SAAS,CAAC,EAAE,OAAO,KAAK,OAAO,CAAC;IACjH,iBAAiB,CAAC,EAAE,CAAC,GAAG,EAAE,MAAM,EAAE,EAAE,EAAE,MAAM,KAAK,OAAO,CAAC;CAC1D;AAED;;;;;;;;;;;;;;;;;GAiBG;AACH,eAAO,MAAM,sBAAsB,GAAI,MAAM,QAAQ,EAAE,gBAAuB;IAAE,SAAS,CAAC,EAAE,OAAO,CAAA;CAAO,KAAG,IAM5G,CAAC"}
1
+ {"version":3,"file":"krosoftLocales.d.ts","sourceRoot":"","sources":["../../src/i18n/krosoftLocales.ts"],"names":[],"mappings":"AAGA;;;;GAIG;AACH,eAAO,MAAM,iBAAiB,YAAY,CAAC;AAE3C,8FAA8F;AAC9F,eAAO,MAAM,cAAc;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAAa,CAAC;AAEzC,gGAAgG;AAChG,UAAU,QAAQ;IAChB,iBAAiB,CAAC,EAAE,CAAC,GAAG,EAAE,MAAM,EAAE,EAAE,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,EAAE,IAAI,CAAC,EAAE,OAAO,EAAE,SAAS,CAAC,EAAE,OAAO,KAAK,OAAO,CAAC;IACjH,iBAAiB,CAAC,EAAE,CAAC,GAAG,EAAE,MAAM,EAAE,EAAE,EAAE,MAAM,KAAK,OAAO,CAAC;CAC1D;AAED;;;;;;;;;;;;;;;;;GAiBG;AACH,eAAO,MAAM,sBAAsB,GAAI,MAAM,QAAQ,EAAE,gBAAuB;IAAE,SAAS,CAAC,EAAE,OAAO,CAAA;CAAO,KAAG,IAM5G,CAAC"}
@@ -133,6 +133,24 @@ var r = {
133
133
  updateAvailable: "A new version is available.",
134
134
  updateAction: "Refresh",
135
135
  updateDismiss: "Dismiss"
136
+ },
137
+ seasonal: {
138
+ snow: {
139
+ label: "Snow effect",
140
+ description: "Show snowflakes in December",
141
+ toastEnabled: "❄️ Snow effect enabled",
142
+ toastDisabled: "❄️ Snow effect disabled",
143
+ messageEnabled: "Snowflakes are now visible.",
144
+ messageDisabled: "Snowflakes have been hidden."
145
+ },
146
+ halloween: {
147
+ label: "Halloween effect",
148
+ description: "Show pumpkins and bats from October 25 to November 2",
149
+ toastEnabled: "🎃 Halloween effect enabled",
150
+ toastDisabled: "🎃 Halloween effect disabled",
151
+ messageEnabled: "The pumpkins are out.",
152
+ messageDisabled: "The pumpkins have been put away."
153
+ }
136
154
  }
137
155
  }, i = {
138
156
  actions: {
@@ -267,6 +285,24 @@ var r = {
267
285
  updateAvailable: "Une nouvelle version est disponible.",
268
286
  updateAction: "Actualiser",
269
287
  updateDismiss: "Ignorer"
288
+ },
289
+ seasonal: {
290
+ snow: {
291
+ label: "Effet neige",
292
+ description: "Afficher les flocons de neige en décembre",
293
+ toastEnabled: "❄️ Effet neige activé",
294
+ toastDisabled: "❄️ Effet neige désactivé",
295
+ messageEnabled: "Les flocons de neige sont maintenant visibles.",
296
+ messageDisabled: "Les flocons de neige ont été masqués."
297
+ },
298
+ halloween: {
299
+ label: "Effet Halloween",
300
+ description: "Afficher citrouilles et chauves-souris du 25 octobre au 2 novembre",
301
+ toastEnabled: "🎃 Effet Halloween activé",
302
+ toastDisabled: "🎃 Effet Halloween désactivé",
303
+ messageEnabled: "Les citrouilles sont de sortie.",
304
+ messageDisabled: "Les citrouilles ont été rangées."
305
+ }
270
306
  }
271
307
  }, a = "krosoft", o = {
272
308
  fr: i,
@@ -1,8 +1,8 @@
1
1
  import { t as e } from "./tailwind.helper-CJaRYBmL.js";
2
- import { t } from "./i18n-IJZY85S7.js";
3
- import "./ImageInput-CPOTYevx.js";
4
- import "./MultiSelect-a_kQHMOe.js";
5
- import "./SearchInput-BDlQAl-9.js";
2
+ import { t } from "./i18n-4vaVzTli.js";
3
+ import "./ImageInput-Dq4RVy4c.js";
4
+ import "./MultiSelect-T2G5xVtD.js";
5
+ import "./SearchInput-CjpiwvDs.js";
6
6
  import { useRef as n, useState as r } from "react";
7
7
  import { Fragment as i, jsx as a, jsxs as o } from "react/jsx-runtime";
8
8
  import { Heart as s, Loader2 as c, Star as l, UploadIcon as u } from "lucide-react";
@@ -1,7 +1,7 @@
1
- import { t as e } from "./i18n-IJZY85S7.js";
1
+ import { t as e } from "./i18n-4vaVzTli.js";
2
2
  import { c as t, i as n, n as r, r as i, t as a } from "./tooltip-_geGvbS7.js";
3
3
  import { i as o, l as s, n as c, t as l, u } from "./select-KWMg2_7Z.js";
4
- import { t as d } from "./useLanguage-hjza5s3o.js";
4
+ import { t as d } from "./useLanguage-CKnwpudX.js";
5
5
  import "react";
6
6
  import { jsx as f, jsxs as p } from "react/jsx-runtime";
7
7
  import { LanguagesIcon as m } from "lucide-react";
@@ -1,9 +1,9 @@
1
1
  import { t as e } from "./tailwind.helper-CJaRYBmL.js";
2
- import { t } from "./i18n-IJZY85S7.js";
2
+ import { t } from "./i18n-4vaVzTli.js";
3
3
  import { c as n, i as r, n as i, r as a, t as o } from "./tooltip-_geGvbS7.js";
4
- import { C as s, S as c, b as l, d as u, g as d, h as f, i as p, l as m, m as h, p as g, r as _, t as v, v as y, x as b, y as x } from "./sheet-C_t76Ttr.js";
4
+ import { C as s, S as c, b as l, d as u, g as d, h as f, i as p, l as m, m as h, p as g, r as _, t as v, v as y, x as b, y as x } from "./sheet-DjBA9WGR.js";
5
5
  import { t as S } from "./skeleton-D6Ga4BLw.js";
6
- import { l as C } from "./behavior-SAdHU_Ew.js";
6
+ import { l as C } from "./behavior-CSwLI_GG.js";
7
7
  import "./hooks/index.js";
8
8
  import * as w from "react";
9
9
  import { Fragment as T, jsx as E, jsxs as D } from "react/jsx-runtime";
package/dist/pwa/index.js CHANGED
@@ -1,4 +1,4 @@
1
- import { t as e } from "../i18n-IJZY85S7.js";
1
+ import { t as e } from "../i18n-4vaVzTli.js";
2
2
  import { useEffect as t } from "react";
3
3
  import { toast as n } from "sonner";
4
4
  import { useRegisterSW as r } from "virtual:pwa-register/react";
@@ -0,0 +1,20 @@
1
+ import React from "react";
2
+ export interface SeasonalEffectProps {
3
+ /** Préfixe des clés localStorage de l'application, identique à celui de `SeasonalEffectsSettings`. */
4
+ storagePrefix?: string;
5
+ }
6
+ /** Flocons de neige en décembre, sauf si l'utilisateur les a désactivés. */
7
+ export declare const SnowEffect: ({ storagePrefix }: SeasonalEffectProps) => React.JSX.Element | null;
8
+ /** Citrouilles et chauves-souris du 25 octobre au 2 novembre, sauf si l'utilisateur les a désactivées. */
9
+ export declare const HalloweenEffect: ({ storagePrefix }: SeasonalEffectProps) => React.JSX.Element | null;
10
+ /**
11
+ * Tous les effets saisonniers, à monter une fois à la racine de l'application.
12
+ *
13
+ * ```tsx
14
+ * import { SeasonalEffects } from "@krosoft/react/seasonal";
15
+ *
16
+ * <SeasonalEffects storagePrefix={import.meta.env.VITE_LOCALSTORAGE_KEY} />
17
+ * ```
18
+ */
19
+ export declare const SeasonalEffects: ({ storagePrefix }: SeasonalEffectProps) => React.JSX.Element;
20
+ //# sourceMappingURL=SeasonalEffects.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SeasonalEffects.d.ts","sourceRoot":"","sources":["../../src/seasonal/SeasonalEffects.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAkB,MAAM,OAAO,CAAC;AAiCvC,MAAM,WAAW,mBAAmB;IAClC,sGAAsG;IACtG,aAAa,CAAC,EAAE,MAAM,CAAC;CACxB;AAED,4EAA4E;AAC5E,eAAO,MAAM,UAAU,GAAI,mBAAmB,mBAAmB,KAAG,KAAK,CAAC,GAAG,CAAC,OAAO,GAAG,IAQvF,CAAC;AASF,0GAA0G;AAC1G,eAAO,MAAM,eAAe,GAAI,mBAAmB,mBAAmB,KAAG,KAAK,CAAC,GAAG,CAAC,OAAO,GAAG,IAQ5F,CAAC;AAEF;;;;;;;;GAQG;AACH,eAAO,MAAM,eAAe,GAAI,mBAAmB,mBAAmB,KAAG,KAAK,CAAC,GAAG,CAAC,OAKlF,CAAC"}
@@ -0,0 +1,13 @@
1
+ import React from "react";
2
+ import type { SeasonalEffectProps } from "./SeasonalEffects";
3
+ export interface SeasonalEffectsSettingsProps extends SeasonalEffectProps {
4
+ className?: string;
5
+ }
6
+ /**
7
+ * Interrupteurs des effets saisonniers, à poser dans la page profil. Chaque changement
8
+ * affiche un toast : l'application doit monter `<Toaster />`.
9
+ *
10
+ * L'effet neige reste réglable toute l'année ; l'effet Halloween n'apparaît que pendant sa période.
11
+ */
12
+ export declare const SeasonalEffectsSettings: ({ storagePrefix, className }: SeasonalEffectsSettingsProps) => React.JSX.Element;
13
+ //# sourceMappingURL=SeasonalEffectsSettings.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SeasonalEffectsSettings.d.ts","sourceRoot":"","sources":["../../src/seasonal/SeasonalEffectsSettings.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,MAAM,OAAO,CAAC;AAM1B,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,mBAAmB,CAAC;AAwB7D,MAAM,WAAW,4BAA6B,SAAQ,mBAAmB;IACvE,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED;;;;;GAKG;AACH,eAAO,MAAM,uBAAuB,GAAI,8BAA4C,4BAA4B,KAAG,KAAK,CAAC,GAAG,CAAC,OA4C5H,CAAC"}
@@ -0,0 +1,5 @@
1
+ export * from "./seasons";
2
+ export * from "./useSeasonalEffects";
3
+ export * from "./SeasonalEffects";
4
+ export * from "./SeasonalEffectsSettings";
5
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/seasonal/index.ts"],"names":[],"mappings":"AAAA,cAAc,WAAW,CAAC;AAC1B,cAAc,sBAAsB,CAAC;AACrC,cAAc,mBAAmB,CAAC;AAClC,cAAc,2BAA2B,CAAC"}
@@ -0,0 +1,120 @@
1
+ import { t as e } from "../i18n-4vaVzTli.js";
2
+ import { n as t, t as n } from "../switch-DzZwmpBG.js";
3
+ import { t as r } from "../useNotifications-CyhTruIG.js";
4
+ import { useCallback as i, useMemo as a, useSyncExternalStore as o } from "react";
5
+ import { Fragment as s, jsx as c, jsxs as l } from "react/jsx-runtime";
6
+ import { GhostIcon as u, SnowflakeIcon as d } from "lucide-react";
7
+ import f from "react-snowfall";
8
+ //#region src/seasonal/seasons.ts
9
+ var p = (e = /* @__PURE__ */ new Date()) => e.getMonth() === 11, m = (e = /* @__PURE__ */ new Date()) => {
10
+ let t = e.getMonth(), n = e.getDate();
11
+ return t === 9 && n >= 25 || t === 10 && n <= 2;
12
+ }, h = "krosoft-seasonal-change", g = (e) => {
13
+ try {
14
+ return localStorage.getItem(e) !== "false";
15
+ } catch {
16
+ return !0;
17
+ }
18
+ }, _ = (e) => (window.addEventListener("storage", e), window.addEventListener(h, e), () => {
19
+ window.removeEventListener("storage", e), window.removeEventListener(h, e);
20
+ }), v = (e) => {
21
+ let t = i(() => g(e), [e]);
22
+ return [o(_, t, () => !0), i((t) => {
23
+ try {
24
+ localStorage.setItem(e, String(t));
25
+ } catch {}
26
+ window.dispatchEvent(new Event(h));
27
+ }, [e])];
28
+ }, y = (e = "") => {
29
+ let [t, n] = v(`${e}snow-effect-enabled`);
30
+ return {
31
+ isSnowSeason: p(),
32
+ isSnowEnabled: t,
33
+ setSnowEnabled: n
34
+ };
35
+ }, b = (e = "") => {
36
+ let [t, n] = v(`${e}halloween-effect-enabled`);
37
+ return {
38
+ isHalloweenSeason: m(),
39
+ isHalloweenEnabled: t,
40
+ setHalloweenEnabled: n
41
+ };
42
+ }, x = [
43
+ "🎃",
44
+ "🦇",
45
+ "👻",
46
+ "🕷️",
47
+ "🍬"
48
+ ], S = 64, C = {
49
+ position: "fixed",
50
+ width: "100vw",
51
+ height: "100vh",
52
+ top: 0,
53
+ left: 0,
54
+ zIndex: 9999,
55
+ pointerEvents: "none"
56
+ }, w = (e) => {
57
+ let t = document.createElement("canvas");
58
+ t.width = S, t.height = S;
59
+ let n = t.getContext("2d");
60
+ return n && (n.font = `${String(S * .8)}px serif`, n.textAlign = "center", n.textBaseline = "middle", n.fillText(e, S / 2, S / 2)), t;
61
+ }, T = ({ storagePrefix: e }) => {
62
+ let { isSnowSeason: t, isSnowEnabled: n } = y(e);
63
+ return !t || !n ? null : /* @__PURE__ */ c(f, { style: C });
64
+ }, E = () => {
65
+ let e = a(() => x.map(w), []);
66
+ return /* @__PURE__ */ c(f, {
67
+ images: e,
68
+ snowflakeCount: 25,
69
+ radius: [10, 18],
70
+ speed: [.5, 1.5],
71
+ wind: [-.5, 1],
72
+ rotationSpeed: [-1, 1],
73
+ style: C
74
+ });
75
+ }, D = ({ storagePrefix: e }) => {
76
+ let { isHalloweenSeason: t, isHalloweenEnabled: n } = b(e);
77
+ return !t || !n ? null : /* @__PURE__ */ c(E, {});
78
+ }, O = ({ storagePrefix: e }) => /* @__PURE__ */ l(s, { children: [/* @__PURE__ */ c(T, { storagePrefix: e }), /* @__PURE__ */ c(D, { storagePrefix: e })] }), k = ({ id: e, label: r, description: i, icon: a, checked: o, onCheckedChange: s }) => /* @__PURE__ */ l("div", {
79
+ className: "space-y-2",
80
+ children: [/* @__PURE__ */ c(t, {
81
+ htmlFor: e,
82
+ children: r
83
+ }), /* @__PURE__ */ l("div", {
84
+ className: "flex items-center justify-between gap-4",
85
+ children: [/* @__PURE__ */ l("div", {
86
+ className: "flex items-center gap-2 text-sm text-muted-foreground",
87
+ children: [/* @__PURE__ */ c(a, { className: "size-4" }), /* @__PURE__ */ c("span", { children: i })]
88
+ }), /* @__PURE__ */ c(n, {
89
+ id: e,
90
+ checked: o,
91
+ onCheckedChange: s
92
+ })]
93
+ })]
94
+ }), A = ({ storagePrefix: t, className: n = "space-y-6" }) => {
95
+ let { t: i } = e(), { showSuccess: a } = r(), { isSnowEnabled: o, setSnowEnabled: s } = y(t), { isHalloweenSeason: f, isHalloweenEnabled: p, setHalloweenEnabled: m } = b(t);
96
+ return /* @__PURE__ */ l("div", {
97
+ className: n,
98
+ children: [/* @__PURE__ */ c(k, {
99
+ id: "seasonal-snow",
100
+ label: i("seasonal.snow.label"),
101
+ description: i("seasonal.snow.description"),
102
+ icon: d,
103
+ checked: o,
104
+ onCheckedChange: (e) => {
105
+ s(e), a(i(e ? "seasonal.snow.toastEnabled" : "seasonal.snow.toastDisabled"), i(e ? "seasonal.snow.messageEnabled" : "seasonal.snow.messageDisabled"));
106
+ }
107
+ }), f && /* @__PURE__ */ c(k, {
108
+ id: "seasonal-halloween",
109
+ label: i("seasonal.halloween.label"),
110
+ description: i("seasonal.halloween.description"),
111
+ icon: u,
112
+ checked: p,
113
+ onCheckedChange: (e) => {
114
+ m(e), a(i(e ? "seasonal.halloween.toastEnabled" : "seasonal.halloween.toastDisabled"), i(e ? "seasonal.halloween.messageEnabled" : "seasonal.halloween.messageDisabled"));
115
+ }
116
+ })]
117
+ });
118
+ };
119
+ //#endregion
120
+ export { D as HalloweenEffect, O as SeasonalEffects, A as SeasonalEffectsSettings, T as SnowEffect, m as isHalloweenSeason, p as isSnowSeason, b as useHalloweenEffect, y as useSnowEffect };
@@ -0,0 +1,5 @@
1
+ /** Période de l'effet neige : tout le mois de décembre. */
2
+ export declare const isSnowSeason: (date?: Date) => boolean;
3
+ /** Période de l'effet Halloween : du 25 octobre au 2 novembre inclus. */
4
+ export declare const isHalloweenSeason: (date?: Date) => boolean;
5
+ //# sourceMappingURL=seasons.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"seasons.d.ts","sourceRoot":"","sources":["../../src/seasonal/seasons.ts"],"names":[],"mappings":"AAAA,2DAA2D;AAC3D,eAAO,MAAM,YAAY,GAAI,OAAM,IAAiB,KAAG,OAAiC,CAAC;AAEzF,yEAAyE;AACzE,eAAO,MAAM,iBAAiB,GAAI,OAAM,IAAiB,KAAG,OAI3D,CAAC"}
@@ -0,0 +1,25 @@
1
+ export interface UseSnowEffectResult {
2
+ isSnowSeason: boolean;
3
+ isSnowEnabled: boolean;
4
+ setSnowEnabled: (enabled: boolean) => void;
5
+ }
6
+ export interface UseHalloweenEffectResult {
7
+ isHalloweenSeason: boolean;
8
+ isHalloweenEnabled: boolean;
9
+ setHalloweenEnabled: (enabled: boolean) => void;
10
+ }
11
+ /**
12
+ * Préférence utilisateur de l'effet neige.
13
+ *
14
+ * @param storagePrefix préfixe des clés localStorage de l'application (ex. `VITE_LOCALSTORAGE_KEY`) ;
15
+ * la clé finale est `{storagePrefix}snow-effect-enabled`.
16
+ */
17
+ export declare const useSnowEffect: (storagePrefix?: string) => UseSnowEffectResult;
18
+ /**
19
+ * Préférence utilisateur de l'effet Halloween.
20
+ *
21
+ * @param storagePrefix préfixe des clés localStorage de l'application ;
22
+ * la clé finale est `{storagePrefix}halloween-effect-enabled`.
23
+ */
24
+ export declare const useHalloweenEffect: (storagePrefix?: string) => UseHalloweenEffectResult;
25
+ //# sourceMappingURL=useSeasonalEffects.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useSeasonalEffects.d.ts","sourceRoot":"","sources":["../../src/seasonal/useSeasonalEffects.ts"],"names":[],"mappings":"AAGA,MAAM,WAAW,mBAAmB;IAClC,YAAY,EAAE,OAAO,CAAC;IACtB,aAAa,EAAE,OAAO,CAAC;IACvB,cAAc,EAAE,CAAC,OAAO,EAAE,OAAO,KAAK,IAAI,CAAC;CAC5C;AAED,MAAM,WAAW,wBAAwB;IACvC,iBAAiB,EAAE,OAAO,CAAC;IAC3B,kBAAkB,EAAE,OAAO,CAAC;IAC5B,mBAAmB,EAAE,CAAC,OAAO,EAAE,OAAO,KAAK,IAAI,CAAC;CACjD;AAED;;;;;GAKG;AACH,eAAO,MAAM,aAAa,GAAI,sBAAkB,KAAG,mBAGlD,CAAC;AAEF;;;;;GAKG;AACH,eAAO,MAAM,kBAAkB,GAAI,sBAAkB,KAAG,wBAGvD,CAAC"}
@@ -0,0 +1,3 @@
1
+ /** Préférence booléenne persistée dans le localStorage, partagée entre composants et onglets. */
2
+ export declare const useStoredToggle: (storageKey: string) => [boolean, (enabled: boolean) => void];
3
+ //# sourceMappingURL=useStoredToggle.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useStoredToggle.d.ts","sourceRoot":"","sources":["../../src/seasonal/useStoredToggle.ts"],"names":[],"mappings":"AAuBA,iGAAiG;AACjG,eAAO,MAAM,eAAe,GAAI,YAAY,MAAM,KAAG,CAAC,OAAO,EAAE,CAAC,OAAO,EAAE,OAAO,KAAK,IAAI,CAiBxF,CAAC"}
@@ -1,6 +1,6 @@
1
1
  import { t as e } from "./tailwind.helper-CJaRYBmL.js";
2
2
  import "./helpers/index.js";
3
- import { t } from "./i18n-IJZY85S7.js";
3
+ import { t } from "./i18n-4vaVzTli.js";
4
4
  import { a as n } from "./tooltip-_geGvbS7.js";
5
5
  import * as r from "react";
6
6
  import { jsx as i, jsxs as a } from "react/jsx-runtime";
@@ -1,5 +1,5 @@
1
- import { t as e } from "./i18n-IJZY85S7.js";
2
- import "./ErrorAlert-DssOWPCS.js";
1
+ import { t as e } from "./i18n-4vaVzTli.js";
2
+ import "./ErrorAlert-B6v1MVRR.js";
3
3
  import { jsx as t, jsxs as n } from "react/jsx-runtime";
4
4
  import { Loader2Icon as r } from "lucide-react";
5
5
  //#region src/components/core/states/ErrorState.tsx
@@ -0,0 +1,25 @@
1
+ import { t as e } from "./tailwind.helper-CJaRYBmL.js";
2
+ import "./helpers/index.js";
3
+ import * as t from "react";
4
+ import { jsx as n } from "react/jsx-runtime";
5
+ import { cva as r } from "class-variance-authority";
6
+ import * as i from "@radix-ui/react-label";
7
+ import * as a from "@radix-ui/react-switch";
8
+ //#region src/components/ui/label.tsx
9
+ var o = r("text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"), s = t.forwardRef(({ className: t, ...r }, a) => /* @__PURE__ */ n(i.Root, {
10
+ ref: a,
11
+ className: e(o(), t),
12
+ ...r
13
+ }));
14
+ s.displayName = "Label";
15
+ //#endregion
16
+ //#region src/components/ui/switch.tsx
17
+ var c = t.forwardRef(({ className: t, ...r }, i) => /* @__PURE__ */ n(a.Root, {
18
+ className: e("peer inline-flex h-6 w-11 shrink-0 cursor-pointer items-center rounded-full border-2 border-transparent transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-primary data-[state=unchecked]:bg-input", t),
19
+ ...r,
20
+ ref: i,
21
+ children: /* @__PURE__ */ n(a.Thumb, { className: e("pointer-events-none block h-5 w-5 rounded-full bg-background shadow-lg ring-0 transition-transform data-[state=checked]:translate-x-5 data-[state=unchecked]:translate-x-0") })
22
+ }));
23
+ c.displayName = a.Root.displayName;
24
+ //#endregion
25
+ export { s as n, c as t };
@@ -1,7 +1,7 @@
1
- import { t as e } from "./i18n-IJZY85S7.js";
1
+ import { t as e } from "./i18n-4vaVzTli.js";
2
2
  import { c as t, i as n, n as r, r as i, t as a } from "./tooltip-_geGvbS7.js";
3
3
  import { i as o, l as s, n as c, t as l, u } from "./select-KWMg2_7Z.js";
4
- import { t as d } from "./useTheme-dRbDEXab.js";
4
+ import { t as d } from "./useTheme-8vZc97M6.js";
5
5
  import "react";
6
6
  import { jsx as f, jsxs as p } from "react/jsx-runtime";
7
7
  //#region src/components/core/theme/ThemeSelector.tsx