ptechcore_ui 1.0.4 → 1.0.6

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/index.cjs CHANGED
@@ -29,14 +29,22 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
29
29
  // src/index.ts
30
30
  var index_exports = {};
31
31
  __export(index_exports, {
32
+ DateInput: () => DateInput,
33
+ FileInput: () => FileInput,
34
+ InputField: () => InputField,
35
+ Modal: () => Modals_default,
36
+ NumberInput: () => NumberInput,
32
37
  Pages: () => Pages_default,
33
38
  PrimaryButton: () => Buttons_default,
34
39
  RewiseLayout: () => ModernDoubleSidebarLayout_default,
35
40
  SecondaryButton: () => SecondaryButton,
41
+ SelectInput: () => SelectInput,
36
42
  SessionProvider: () => SessionProvider,
43
+ TextInput: () => TextInput,
37
44
  ThemeProvider: () => ThemeContext_default,
38
45
  ToastContainer: () => Toast_default,
39
46
  ToastProvider: () => ToastProvider,
47
+ UserServices: () => UserServices,
40
48
  useSession: () => useSession,
41
49
  useToast: () => useToast
42
50
  });
@@ -75,9 +83,189 @@ var SecondaryButton = ({
75
83
  );
76
84
  var Buttons_default = PrimaryButton;
77
85
 
86
+ // src/components/common/Modals.tsx
87
+ var import_jsx_runtime2 = require("react/jsx-runtime");
88
+ var Modal = ({ title, description, width, open, onClose, children }) => {
89
+ if (!open) return null;
90
+ return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("div", { className: "fixed inset-0 bg-black bg-opacity-50 flex items-center justify-center z-50", children: /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)("div", { className: `bg-white rounded-lg py-4 px-6 mx-4 w-[${width ? width : "60%"}]`, children: [
91
+ /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)("div", { className: "flex justify-between items-start mb-6", children: [
92
+ /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)("div", { children: [
93
+ /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("h3", { className: "text-xl font-semibold text-tuatara flex items-center space-x-2", children: /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("span", { children: title }) }),
94
+ description && /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("p", { className: "text-sm text-gray-600 mt-1", children: description })
95
+ ] }),
96
+ /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
97
+ "button",
98
+ {
99
+ onClick: onClose,
100
+ className: "text-gray-400 hover:text-gray-600 text-xl",
101
+ "aria-label": "Close modal",
102
+ children: "\u2715"
103
+ }
104
+ )
105
+ ] }),
106
+ children
107
+ ] }) });
108
+ };
109
+ var Modals_default = Modal;
110
+
111
+ // src/components/common/Inputs.tsx
112
+ var import_react_router_dom = require("react-router-dom");
113
+ var import_jsx_runtime3 = require("react/jsx-runtime");
114
+ var InputField = ({
115
+ label,
116
+ name,
117
+ type = "text",
118
+ value,
119
+ placeholder,
120
+ required = false,
121
+ disabled = false,
122
+ error,
123
+ onChange,
124
+ onBlur
125
+ }) => {
126
+ return /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("div", { className: "flex flex-col gap-1 w-full", children: [
127
+ label && /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("label", { htmlFor: name, className: "block text-gray-700 text-sm font-medium mb-2", children: [
128
+ label,
129
+ " ",
130
+ required && /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("span", { className: "text-red-500", children: "*" })
131
+ ] }),
132
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
133
+ "input",
134
+ {
135
+ id: name,
136
+ name,
137
+ type,
138
+ value,
139
+ placeholder,
140
+ required,
141
+ disabled,
142
+ onChange,
143
+ onBlur,
144
+ className: `w-full px-3 py-2 border border-[#D9D9D9] focus:ring-2 focus:ring-[#6A8A82]/20
145
+ ${error ? "border-red-500" : "border-gray-300"}
146
+ ${disabled ? "bg-gray-100 cursor-not-allowed" : ""}
147
+ `
148
+ }
149
+ ),
150
+ error && /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("p", { className: "text-xs text-red-500", children: error })
151
+ ] });
152
+ };
153
+ var TextInput = (props) => {
154
+ return /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(InputField, { ...props, type: "text" });
155
+ };
156
+ var NumberInput = (props) => {
157
+ return /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(InputField, { type: "number", ...props });
158
+ };
159
+ var DateInput = (props) => {
160
+ return /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(InputField, { type: "date", ...props });
161
+ };
162
+ var SelectInput = ({
163
+ label,
164
+ name,
165
+ value,
166
+ options,
167
+ defaultValue = "",
168
+ required = false,
169
+ disabled = false,
170
+ error,
171
+ className = "",
172
+ onChange,
173
+ onBlur
174
+ }) => {
175
+ return /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("div", { className: `${className} flex flex-col gap-1 w-full`, children: [
176
+ label && /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(
177
+ "label",
178
+ {
179
+ htmlFor: name,
180
+ className: "block text-gray-700 text-sm font-medium mb-2",
181
+ children: [
182
+ label,
183
+ " ",
184
+ required && /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("span", { className: "text-red-500", children: "*" })
185
+ ]
186
+ }
187
+ ),
188
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(
189
+ "select",
190
+ {
191
+ id: name,
192
+ name,
193
+ value: value ?? "",
194
+ required,
195
+ disabled,
196
+ onChange,
197
+ onBlur,
198
+ className: `w-full px-4 py-2 border rounded-lg text-sm
199
+ focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-transparent
200
+ ${error ? "border-red-500" : "border-gray-300"}
201
+ ${disabled ? "bg-gray-100 cursor-not-allowed" : ""}
202
+ `,
203
+ children: [
204
+ defaultValue !== void 0 && /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("option", { value: "", children: typeof defaultValue === "string" ? defaultValue : "S\xE9lectionnez une option" }),
205
+ options.map(({ label: label2, value: optionValue }) => /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("option", { value: optionValue, children: label2 }, optionValue))
206
+ ]
207
+ }
208
+ ),
209
+ error && /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("p", { className: "text-xs text-red-500", children: error })
210
+ ] });
211
+ };
212
+ var addressIpformMedia = "http://localhost:8000/media/";
213
+ var FileInput = ({
214
+ label,
215
+ name,
216
+ file,
217
+ required = false,
218
+ disabled = false,
219
+ readOnly = false,
220
+ error,
221
+ onChange
222
+ }) => {
223
+ return /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("div", { className: "flex flex-col gap-1 w-full", children: [
224
+ label && /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(
225
+ "label",
226
+ {
227
+ htmlFor: name,
228
+ className: "block text-gray-700 text-sm font-medium mb-2",
229
+ children: [
230
+ label,
231
+ " ",
232
+ required && /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("span", { className: "text-red-500", children: "*" }),
233
+ file && typeof file === "string" && /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("div", { children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
234
+ import_react_router_dom.Link,
235
+ {
236
+ to: addressIpformMedia + file,
237
+ target: "_blank",
238
+ className: "ml-2 text-blue-600 underline text-sm",
239
+ children: file.split("/").pop()
240
+ }
241
+ ) })
242
+ ]
243
+ }
244
+ ),
245
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
246
+ "input",
247
+ {
248
+ id: name,
249
+ type: "file",
250
+ name,
251
+ onChange,
252
+ readOnly,
253
+ disabled,
254
+ required,
255
+ className: `w-full px-4 py-2 border rounded-lg text-sm
256
+ focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-transparent
257
+ ${error ? "border-red-500" : "border-gray-300"}
258
+ ${disabled ? "bg-gray-100 cursor-not-allowed" : ""}
259
+ `
260
+ }
261
+ ),
262
+ error && /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("p", { className: "text-xs text-red-500", children: error })
263
+ ] });
264
+ };
265
+
78
266
  // src/components/layout/ModernDoubleSidebarLayout.tsx
79
267
  var import_react2 = __toESM(require("react"), 1);
80
- var import_react_router_dom = require("react-router-dom");
268
+ var import_react_router_dom2 = require("react-router-dom");
81
269
  var import_lucide_react = require("lucide-react");
82
270
 
83
271
  // src/utils/utils.ts
@@ -420,7 +608,7 @@ var getThemeCSSVariables = (theme) => {
420
608
  };
421
609
 
422
610
  // src/contexts/ThemeContext.tsx
423
- var import_jsx_runtime2 = require("react/jsx-runtime");
611
+ var import_jsx_runtime4 = require("react/jsx-runtime");
424
612
  var ThemeContext = (0, import_react.createContext)(void 0);
425
613
  var useTheme = () => {
426
614
  const context = (0, import_react.useContext)(ThemeContext);
@@ -451,15 +639,15 @@ var ThemeProvider = ({ children }) => {
451
639
  setThemeState(themes[type]);
452
640
  }
453
641
  };
454
- return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(ThemeContext.Provider, { value: { theme, themeType, setTheme }, children });
642
+ return /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(ThemeContext.Provider, { value: { theme, themeType, setTheme }, children });
455
643
  };
456
644
  var ThemeContext_default = ThemeProvider;
457
645
 
458
646
  // src/components/layout/ModernDoubleSidebarLayout.tsx
459
- var import_jsx_runtime3 = require("react/jsx-runtime");
647
+ var import_jsx_runtime5 = require("react/jsx-runtime");
460
648
  var RewiseLayout = ({ children, module_name = "Rewise", module_description = "Description du module", primaryMenuItems, secondaryMenuItems }) => {
461
- const location = (0, import_react_router_dom.useLocation)();
462
- const navigate = (0, import_react_router_dom.useNavigate)();
649
+ const location = (0, import_react_router_dom2.useLocation)();
650
+ const navigate = (0, import_react_router_dom2.useNavigate)();
463
651
  const { theme, themeType, setTheme } = useTheme();
464
652
  const [primaryCollapsed, setPrimaryCollapsed] = (0, import_react2.useState)(false);
465
653
  const [secondaryCollapsed, setSecondaryCollapsed] = (0, import_react2.useState)(false);
@@ -542,8 +730,8 @@ var RewiseLayout = ({ children, module_name = "Rewise", module_description = "De
542
730
  (prev) => prev.map((n) => n.id === id ? { ...n, read: true } : n)
543
731
  );
544
732
  };
545
- return /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("div", { className: "flex h-screen bg-[var(--color-background)] overflow-hidden", children: [
546
- /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
733
+ return /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("div", { className: "flex h-screen bg-[var(--color-background)] overflow-hidden", children: [
734
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
547
735
  "a",
548
736
  {
549
737
  href: "#main-content",
@@ -551,7 +739,7 @@ var RewiseLayout = ({ children, module_name = "Rewise", module_description = "De
551
739
  children: "Aller au contenu principal"
552
740
  }
553
741
  ),
554
- /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(
742
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(
555
743
  "aside",
556
744
  {
557
745
  className: cn(
@@ -561,38 +749,38 @@ var RewiseLayout = ({ children, module_name = "Rewise", module_description = "De
561
749
  role: "navigation",
562
750
  "aria-label": "Navigation principale",
563
751
  children: [
564
- /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("div", { className: "h-16 flex items-center justify-between px-4 border-b border-[var(--color-sidebar-border)]", children: [
565
- /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("div", { className: cn(
752
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("div", { className: "h-16 flex items-center justify-between px-4 border-b border-[var(--color-sidebar-border)]", children: [
753
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("div", { className: cn(
566
754
  "flex items-center gap-3",
567
755
  primaryCollapsed && "justify-center"
568
756
  ), children: [
569
- /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("div", { className: "w-10 h-10 bg-[var(--color-primary)] rounded-lg flex items-center justify-center", children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("span", { className: "text-[var(--color-background)] font-bold text-xl", children: "W" }) }),
570
- !primaryCollapsed && /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("div", { children: [
571
- /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("h1", { className: "text-[var(--color-sidebar-text)] font-bold text-lg", children: module_name }),
572
- /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("p", { className: "text-[var(--color-sidebar-text-secondary)] text-xs", children: module_description })
757
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("div", { className: "w-10 h-10 bg-[var(--color-primary)] rounded-lg flex items-center justify-center", children: /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("span", { className: "text-[var(--color-background)] font-bold text-xl", children: "W" }) }),
758
+ !primaryCollapsed && /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("div", { children: [
759
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("h1", { className: "text-[var(--color-sidebar-text)] font-bold text-lg", children: module_name }),
760
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("p", { className: "text-[var(--color-sidebar-text-secondary)] text-xs", children: module_description })
573
761
  ] })
574
762
  ] }),
575
- /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
763
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
576
764
  "button",
577
765
  {
578
766
  onClick: () => setPrimaryCollapsed(!primaryCollapsed),
579
767
  className: "text-[var(--color-sidebar-text-secondary)] hover:text-[var(--color-sidebar-text)] transition-colors",
580
768
  "aria-label": primaryCollapsed ? "D\xE9velopper le menu" : "R\xE9duire le menu",
581
769
  "aria-expanded": !primaryCollapsed,
582
- children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_lucide_react.ChevronLeft, { className: cn(
770
+ children: /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(import_lucide_react.ChevronLeft, { className: cn(
583
771
  "w-5 h-5 transition-transform",
584
772
  primaryCollapsed && "rotate-180"
585
773
  ) })
586
774
  }
587
775
  )
588
776
  ] }),
589
- /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
777
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
590
778
  "nav",
591
779
  {
592
780
  className: "flex-1 py-4 overflow-y-auto",
593
781
  role: "menubar",
594
782
  "aria-label": "Modules principaux",
595
- children: primaryMenuItems.map((item) => /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(
783
+ children: primaryMenuItems.map((item) => /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(
596
784
  "button",
597
785
  {
598
786
  onClick: () => {
@@ -612,48 +800,48 @@ var RewiseLayout = ({ children, module_name = "Rewise", module_description = "De
612
800
  "aria-label": item.ariaLabel || item.label,
613
801
  "aria-current": isModuleActive(item.id) ? "page" : void 0,
614
802
  children: [
615
- /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("div", { className: cn(
803
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("div", { className: cn(
616
804
  "transition-colors",
617
805
  isModuleActive(item.id) ? "text-[var(--color-primary)]" : "text-[var(--color-sidebar-text-secondary)] group-hover:text-[var(--color-sidebar-text)]"
618
806
  ), children: item.icon }),
619
- !primaryCollapsed && /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(import_jsx_runtime3.Fragment, { children: [
620
- /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("span", { className: cn(
807
+ !primaryCollapsed && /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(import_jsx_runtime5.Fragment, { children: [
808
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("span", { className: cn(
621
809
  "flex-1 text-left text-sm font-medium transition-colors",
622
810
  isModuleActive(item.id) ? "text-[var(--color-sidebar-text)]" : "text-[var(--color-sidebar-text-secondary)] group-hover:text-[var(--color-sidebar-text)]"
623
811
  ), children: item.label }),
624
- item.badge && /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("span", { className: "px-2 py-0.5 text-xs bg-[var(--color-primary)] text-[var(--color-background)] rounded-full", children: item.badge })
812
+ item.badge && /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("span", { className: "px-2 py-0.5 text-xs bg-[var(--color-primary)] text-[var(--color-background)] rounded-full", children: item.badge })
625
813
  ] }),
626
- primaryCollapsed && /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("div", { className: "absolute left-full ml-2 px-2 py-1 bg-[var(--color-sidebar-active)] text-[var(--color-sidebar-text)] text-xs rounded opacity-0 group-hover:opacity-100 pointer-events-none whitespace-nowrap z-50", children: item.label })
814
+ primaryCollapsed && /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("div", { className: "absolute left-full ml-2 px-2 py-1 bg-[var(--color-sidebar-active)] text-[var(--color-sidebar-text)] text-xs rounded opacity-0 group-hover:opacity-100 pointer-events-none whitespace-nowrap z-50", children: item.label })
627
815
  ]
628
816
  },
629
817
  item.id
630
818
  ))
631
819
  }
632
820
  ),
633
- /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("div", { className: "p-4 border-t border-[var(--color-sidebar-border)]", children: /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("div", { className: cn(
821
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("div", { className: "p-4 border-t border-[var(--color-sidebar-border)]", children: /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("div", { className: cn(
634
822
  "flex items-center gap-3",
635
823
  primaryCollapsed && "justify-center"
636
824
  ), children: [
637
- /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("div", { className: "w-10 h-10 bg-[var(--color-sidebar-avatar-bg)] rounded-full flex items-center justify-center", children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_lucide_react.User, { className: "w-5 h-5 text-[var(--color-sidebar-text-secondary)]" }) }),
638
- !primaryCollapsed && /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("div", { className: "flex-1", children: [
639
- /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("p", { className: "text-sm font-medium text-[var(--color-sidebar-text)]", children: "Admin" }),
640
- /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("p", { className: "text-xs text-[var(--color-sidebar-text-secondary)]", children: "admin@wisebook.com" })
825
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("div", { className: "w-10 h-10 bg-[var(--color-sidebar-avatar-bg)] rounded-full flex items-center justify-center", children: /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(import_lucide_react.User, { className: "w-5 h-5 text-[var(--color-sidebar-text-secondary)]" }) }),
826
+ !primaryCollapsed && /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("div", { className: "flex-1", children: [
827
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("p", { className: "text-sm font-medium text-[var(--color-sidebar-text)]", children: "Admin" }),
828
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("p", { className: "text-xs text-[var(--color-sidebar-text-secondary)]", children: "admin@wisebook.com" })
641
829
  ] })
642
830
  ] }) })
643
831
  ]
644
832
  }
645
833
  ),
646
- secondaryMenuItems[selectedModule] && /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(import_jsx_runtime3.Fragment, { children: [
647
- secondaryCollapsed && /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
834
+ secondaryMenuItems[selectedModule] && /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(import_jsx_runtime5.Fragment, { children: [
835
+ secondaryCollapsed && /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
648
836
  "button",
649
837
  {
650
838
  onClick: () => setSecondaryCollapsed(false),
651
839
  className: "hidden lg:flex items-center justify-center w-12 h-full bg-[var(--color-background)] border-r border-[var(--color-border)] hover:bg-[var(--color-surface-hover)] transition-colors",
652
840
  "aria-label": "Ouvrir le sous-menu",
653
- children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_lucide_react.ChevronRight, { className: "w-5 h-5 text-[var(--color-text-tertiary)]" })
841
+ children: /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(import_lucide_react.ChevronRight, { className: "w-5 h-5 text-[var(--color-text-tertiary)]" })
654
842
  }
655
843
  ),
656
- /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(
844
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(
657
845
  "aside",
658
846
  {
659
847
  className: cn(
@@ -663,28 +851,28 @@ var RewiseLayout = ({ children, module_name = "Rewise", module_description = "De
663
851
  role: "navigation",
664
852
  "aria-label": "Navigation secondaire",
665
853
  children: [
666
- /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("div", { className: "h-16 flex items-center justify-between px-4 border-b border-[var(--color-border)]", children: [
667
- /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("h2", { className: "text-sm font-semibold text-[var(--color-text-secondary)] uppercase tracking-wider whitespace-nowrap", children: primaryMenuItems.find((item) => item.id === selectedModule)?.label }),
668
- /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
854
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("div", { className: "h-16 flex items-center justify-between px-4 border-b border-[var(--color-border)]", children: [
855
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("h2", { className: "text-sm font-semibold text-[var(--color-text-secondary)] uppercase tracking-wider whitespace-nowrap", children: primaryMenuItems.find((item) => item.id === selectedModule)?.label }),
856
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
669
857
  "button",
670
858
  {
671
859
  onClick: () => setSecondaryCollapsed(!secondaryCollapsed),
672
860
  className: "text-[var(--color-text-tertiary)] hover:text-[var(--color-text-primary)] flex-shrink-0",
673
861
  "aria-label": secondaryCollapsed ? "D\xE9velopper le sous-menu" : "R\xE9duire le sous-menu",
674
- children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_lucide_react.ChevronLeft, { className: cn(
862
+ children: /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(import_lucide_react.ChevronLeft, { className: cn(
675
863
  "w-4 h-4 transition-transform",
676
864
  secondaryCollapsed && "rotate-180"
677
865
  ) })
678
866
  }
679
867
  )
680
868
  ] }),
681
- /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
869
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
682
870
  "nav",
683
871
  {
684
872
  className: "flex-1 py-4 overflow-y-auto",
685
873
  role: "menu",
686
874
  "aria-label": "Sous-navigation",
687
- children: secondaryMenuItems[selectedModule]?.map((item) => /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(
875
+ children: secondaryMenuItems[selectedModule]?.map((item) => /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(
688
876
  "button",
689
877
  {
690
878
  onClick: () => item.path && navigate(item.path),
@@ -696,15 +884,15 @@ var RewiseLayout = ({ children, module_name = "Rewise", module_description = "De
696
884
  role: "menuitem",
697
885
  "aria-current": isActive(item.path || "") ? "page" : void 0,
698
886
  children: [
699
- item.icon && /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("div", { className: cn(
887
+ item.icon && /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("div", { className: cn(
700
888
  "transition-colors",
701
889
  isActive(item.path || "") ? "text-[var(--color-primary)]" : "text-[var(--color-text-tertiary)]"
702
890
  ), children: item.icon }),
703
- /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("span", { className: cn(
891
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("span", { className: cn(
704
892
  "flex-1 text-left text-sm",
705
893
  isActive(item.path || "") ? "text-[var(--color-primary)] font-medium" : "text-[var(--color-text-secondary)]"
706
894
  ), children: item.label }),
707
- item.badge && /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("span", { className: "px-2 py-0.5 text-xs bg-[var(--color-primary)] text-white rounded-full", children: item.badge })
895
+ item.badge && /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("span", { className: "px-2 py-0.5 text-xs bg-[var(--color-primary)] text-white rounded-full", children: item.badge })
708
896
  ]
709
897
  },
710
898
  item.id
@@ -715,13 +903,13 @@ var RewiseLayout = ({ children, module_name = "Rewise", module_description = "De
715
903
  }
716
904
  )
717
905
  ] }),
718
- mobileMenuOpen && /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
906
+ mobileMenuOpen && /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
719
907
  "div",
720
908
  {
721
909
  className: "fixed inset-0 bg-black bg-opacity-50 z-50 lg:hidden",
722
910
  onClick: () => setMobileMenuOpen(false),
723
911
  "aria-hidden": "true",
724
- children: /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(
912
+ children: /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(
725
913
  "aside",
726
914
  {
727
915
  className: "w-80 h-full bg-[var(--color-sidebar-bg)]",
@@ -729,26 +917,26 @@ var RewiseLayout = ({ children, module_name = "Rewise", module_description = "De
729
917
  role: "navigation",
730
918
  "aria-label": "Navigation mobile",
731
919
  children: [
732
- /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("div", { className: "h-16 flex items-center justify-between px-4 border-b border-[var(--color-sidebar-border)]", children: [
733
- /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("div", { className: "flex items-center gap-3", children: [
734
- /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("div", { className: "w-10 h-10 bg-[var(--color-primary)] rounded-lg flex items-center justify-center", children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("span", { className: "text-[var(--color-background)] font-bold text-xl", children: "W" }) }),
735
- /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("div", { children: [
736
- /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("h1", { className: "text-white font-bold text-lg", children: "WiseBook" }),
737
- /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("p", { className: "text-gray-400 text-xs", children: "ERP Next-Gen" })
920
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("div", { className: "h-16 flex items-center justify-between px-4 border-b border-[var(--color-sidebar-border)]", children: [
921
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("div", { className: "flex items-center gap-3", children: [
922
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("div", { className: "w-10 h-10 bg-[var(--color-primary)] rounded-lg flex items-center justify-center", children: /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("span", { className: "text-[var(--color-background)] font-bold text-xl", children: "W" }) }),
923
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("div", { children: [
924
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("h1", { className: "text-white font-bold text-lg", children: "WiseBook" }),
925
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("p", { className: "text-gray-400 text-xs", children: "ERP Next-Gen" })
738
926
  ] })
739
927
  ] }),
740
- /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
928
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
741
929
  "button",
742
930
  {
743
931
  onClick: () => setMobileMenuOpen(false),
744
932
  className: "text-[var(--color-sidebar-text-secondary)]",
745
933
  "aria-label": "Fermer le menu",
746
- children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_lucide_react.X, { className: "w-6 h-6" })
934
+ children: /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(import_lucide_react.X, { className: "w-6 h-6" })
747
935
  }
748
936
  )
749
937
  ] }),
750
- /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("nav", { className: "py-4", role: "menubar", children: primaryMenuItems.map((item) => /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("div", { children: [
751
- /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(
938
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("nav", { className: "py-4", role: "menubar", children: primaryMenuItems.map((item) => /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("div", { children: [
939
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(
752
940
  "button",
753
941
  {
754
942
  onClick: () => {
@@ -767,19 +955,19 @@ var RewiseLayout = ({ children, module_name = "Rewise", module_description = "De
767
955
  role: "menuitem",
768
956
  "aria-current": isModuleActive(item.id) ? "page" : void 0,
769
957
  children: [
770
- /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("div", { className: cn(
958
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("div", { className: cn(
771
959
  "transition-colors",
772
960
  isModuleActive(item.id) ? "text-[var(--color-primary)]" : "text-[var(--color-sidebar-text-secondary)]"
773
961
  ), children: item.icon }),
774
- /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("span", { className: cn(
962
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("span", { className: cn(
775
963
  "flex-1 text-left text-sm font-medium",
776
964
  isModuleActive(item.id) ? "text-[var(--color-sidebar-text)]" : "text-[var(--color-sidebar-text-secondary)]"
777
965
  ), children: item.label }),
778
- item.badge && /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("span", { className: "px-2 py-0.5 text-xs bg-[var(--color-primary)] text-[var(--color-background)] rounded-full", children: item.badge })
966
+ item.badge && /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("span", { className: "px-2 py-0.5 text-xs bg-[var(--color-primary)] text-[var(--color-background)] rounded-full", children: item.badge })
779
967
  ]
780
968
  }
781
969
  ),
782
- isModuleActive(item.id) && secondaryMenuItems[item.id] && /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("div", { className: "bg-[var(--color-sidebar-submenu-bg)] py-2", children: secondaryMenuItems[item.id].map((subItem) => /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(
970
+ isModuleActive(item.id) && secondaryMenuItems[item.id] && /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("div", { className: "bg-[var(--color-sidebar-submenu-bg)] py-2", children: secondaryMenuItems[item.id].map((subItem) => /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(
783
971
  "button",
784
972
  {
785
973
  onClick: () => {
@@ -795,7 +983,7 @@ var RewiseLayout = ({ children, module_name = "Rewise", module_description = "De
795
983
  ),
796
984
  children: [
797
985
  subItem.icon,
798
- /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("span", { className: cn(
986
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("span", { className: cn(
799
987
  isActive(subItem.path || "") ? "text-[var(--color-primary)]" : "text-[var(--color-sidebar-text-secondary)]"
800
988
  ), children: subItem.label })
801
989
  ]
@@ -808,31 +996,31 @@ var RewiseLayout = ({ children, module_name = "Rewise", module_description = "De
808
996
  )
809
997
  }
810
998
  ),
811
- /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("div", { className: "flex-1 flex flex-col overflow-hidden", children: [
812
- /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(
999
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("div", { className: "flex-1 flex flex-col overflow-hidden", children: [
1000
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(
813
1001
  "header",
814
1002
  {
815
1003
  className: "h-14 bg-[var(--color-background)] border-b border-[var(--color-border)] flex items-center justify-between px-3 lg:px-4",
816
1004
  role: "banner",
817
1005
  children: [
818
- /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("div", { className: "flex items-center gap-4 flex-1", children: [
819
- /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
1006
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("div", { className: "flex items-center gap-4 flex-1", children: [
1007
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
820
1008
  "button",
821
1009
  {
822
1010
  onClick: () => setMobileMenuOpen(true),
823
1011
  className: "lg:hidden text-[var(--color-text-primary)]",
824
1012
  "aria-label": "Ouvrir le menu mobile",
825
- children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_lucide_react.Menu, { className: "w-6 h-6" })
1013
+ children: /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(import_lucide_react.Menu, { className: "w-6 h-6" })
826
1014
  }
827
1015
  ),
828
- /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
1016
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
829
1017
  "nav",
830
1018
  {
831
1019
  className: "hidden sm:flex items-center gap-2 text-sm",
832
1020
  "aria-label": "Fil d'Ariane",
833
- children: getBreadcrumbs().map((crumb, index) => /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(import_react2.default.Fragment, { children: [
834
- index > 0 && /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_lucide_react.ChevronRight, { className: "w-4 h-4 text-[var(--color-text-tertiary)]" }),
835
- /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
1021
+ children: getBreadcrumbs().map((crumb, index) => /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(import_react2.default.Fragment, { children: [
1022
+ index > 0 && /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(import_lucide_react.ChevronRight, { className: "w-4 h-4 text-[var(--color-text-tertiary)]" }),
1023
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
836
1024
  "button",
837
1025
  {
838
1026
  onClick: () => navigate(crumb.path),
@@ -846,9 +1034,9 @@ var RewiseLayout = ({ children, module_name = "Rewise", module_description = "De
846
1034
  ] }, crumb.path))
847
1035
  }
848
1036
  ),
849
- /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("div", { className: "relative max-w-md flex-1 hidden lg:block", children: [
850
- /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_lucide_react.Search, { className: "absolute left-3 top-1/2 -translate-y-1/2 text-[var(--color-text-tertiary)] w-5 h-5" }),
851
- /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
1037
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("div", { className: "relative max-w-md flex-1 hidden lg:block", children: [
1038
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(import_lucide_react.Search, { className: "absolute left-3 top-1/2 -translate-y-1/2 text-[var(--color-text-tertiary)] w-5 h-5" }),
1039
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
852
1040
  "input",
853
1041
  {
854
1042
  id: "global-search",
@@ -862,9 +1050,9 @@ var RewiseLayout = ({ children, module_name = "Rewise", module_description = "De
862
1050
  )
863
1051
  ] })
864
1052
  ] }),
865
- /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("div", { className: "flex items-center gap-3", children: [
866
- /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("div", { className: "relative", children: [
867
- /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
1053
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("div", { className: "flex items-center gap-3", children: [
1054
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("div", { className: "relative", children: [
1055
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
868
1056
  "button",
869
1057
  {
870
1058
  onClick: () => setShowThemeMenu(!showThemeMenu),
@@ -872,18 +1060,18 @@ var RewiseLayout = ({ children, module_name = "Rewise", module_description = "De
872
1060
  title: "Changer le th\xE8me",
873
1061
  "aria-label": "S\xE9lecteur de th\xE8me",
874
1062
  "aria-expanded": showThemeMenu,
875
- children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_lucide_react.Palette, { className: "w-5 h-5 text-[var(--color-text-secondary)]" })
1063
+ children: /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(import_lucide_react.Palette, { className: "w-5 h-5 text-[var(--color-text-secondary)]" })
876
1064
  }
877
1065
  ),
878
- showThemeMenu && /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
1066
+ showThemeMenu && /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
879
1067
  "div",
880
1068
  {
881
1069
  className: "absolute right-0 mt-2 w-64 bg-[var(--color-background)] rounded-lg shadow-xl border border-[var(--color-border)] z-50",
882
1070
  role: "menu",
883
1071
  "aria-label": "S\xE9lection du th\xE8me",
884
- children: /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("div", { className: "p-2", children: [
885
- /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("p", { className: "px-3 py-2 text-xs font-semibold text-[var(--color-text-tertiary)] uppercase", children: "Th\xE8mes disponibles" }),
886
- /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(
1072
+ children: /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("div", { className: "p-2", children: [
1073
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("p", { className: "px-3 py-2 text-xs font-semibold text-[var(--color-text-tertiary)] uppercase", children: "Th\xE8mes disponibles" }),
1074
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(
887
1075
  "button",
888
1076
  {
889
1077
  onClick: () => handleThemeChange("elegant"),
@@ -893,15 +1081,15 @@ var RewiseLayout = ({ children, module_name = "Rewise", module_description = "De
893
1081
  ),
894
1082
  role: "menuitem",
895
1083
  children: [
896
- /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("div", { className: "w-10 h-10 rounded-lg bg-gradient-to-br from-[var(--color-primary)] to-[var(--color-accent)]" }),
897
- /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("div", { className: "text-left", children: [
898
- /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("p", { className: "text-sm font-medium", children: "\xC9l\xE9gance Sobre" }),
899
- /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("p", { className: "text-xs text-[var(--color-text-tertiary)]", children: "Finance traditionnelle" })
1084
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("div", { className: "w-10 h-10 rounded-lg bg-gradient-to-br from-[var(--color-primary)] to-[var(--color-accent)]" }),
1085
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("div", { className: "text-left", children: [
1086
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("p", { className: "text-sm font-medium", children: "\xC9l\xE9gance Sobre" }),
1087
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("p", { className: "text-xs text-[var(--color-text-tertiary)]", children: "Finance traditionnelle" })
900
1088
  ] })
901
1089
  ]
902
1090
  }
903
1091
  ),
904
- /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(
1092
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(
905
1093
  "button",
906
1094
  {
907
1095
  onClick: () => handleThemeChange("fintech"),
@@ -911,15 +1099,15 @@ var RewiseLayout = ({ children, module_name = "Rewise", module_description = "De
911
1099
  ),
912
1100
  role: "menuitem",
913
1101
  children: [
914
- /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("div", { className: "w-10 h-10 rounded-lg bg-gradient-to-br from-[var(--color-success)] to-[var(--color-text-primary)]" }),
915
- /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("div", { className: "text-left", children: [
916
- /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("p", { className: "text-sm font-medium", children: "Modern Fintech" }),
917
- /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("p", { className: "text-xs text-[var(--color-text-tertiary)]", children: "Tableau de bord moderne" })
1102
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("div", { className: "w-10 h-10 rounded-lg bg-gradient-to-br from-[var(--color-success)] to-[var(--color-text-primary)]" }),
1103
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("div", { className: "text-left", children: [
1104
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("p", { className: "text-sm font-medium", children: "Modern Fintech" }),
1105
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("p", { className: "text-xs text-[var(--color-text-tertiary)]", children: "Tableau de bord moderne" })
918
1106
  ] })
919
1107
  ]
920
1108
  }
921
1109
  ),
922
- /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(
1110
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(
923
1111
  "button",
924
1112
  {
925
1113
  onClick: () => handleThemeChange("minimalist"),
@@ -929,10 +1117,10 @@ var RewiseLayout = ({ children, module_name = "Rewise", module_description = "De
929
1117
  ),
930
1118
  role: "menuitem",
931
1119
  children: [
932
- /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("div", { className: "w-10 h-10 rounded-lg bg-gradient-to-br from-[var(--color-text-secondary)] to-[var(--color-accent)]" }),
933
- /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("div", { className: "text-left", children: [
934
- /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("p", { className: "text-sm font-medium", children: "Minimaliste Premium" }),
935
- /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("p", { className: "text-xs text-[var(--color-text-tertiary)]", children: "\xC9l\xE9gance minimaliste" })
1120
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("div", { className: "w-10 h-10 rounded-lg bg-gradient-to-br from-[var(--color-text-secondary)] to-[var(--color-accent)]" }),
1121
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("div", { className: "text-left", children: [
1122
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("p", { className: "text-sm font-medium", children: "Minimaliste Premium" }),
1123
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("p", { className: "text-xs text-[var(--color-text-tertiary)]", children: "\xC9l\xE9gance minimaliste" })
936
1124
  ] })
937
1125
  ]
938
1126
  }
@@ -941,12 +1129,12 @@ var RewiseLayout = ({ children, module_name = "Rewise", module_description = "De
941
1129
  }
942
1130
  )
943
1131
  ] }),
944
- /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("div", { className: "flex items-center px-3 py-1.5 bg-[var(--color-surface)] rounded-lg border border-[var(--color-border)]", children: [
945
- /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_lucide_react.DollarSign, { className: "w-4 h-4 text-[var(--color-primary)] mr-2" }),
946
- /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("span", { className: "text-sm font-medium text-[var(--color-text-primary)]", children: "FCFA" })
1132
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("div", { className: "flex items-center px-3 py-1.5 bg-[var(--color-surface)] rounded-lg border border-[var(--color-border)]", children: [
1133
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(import_lucide_react.DollarSign, { className: "w-4 h-4 text-[var(--color-primary)] mr-2" }),
1134
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("span", { className: "text-sm font-medium text-[var(--color-text-primary)]", children: "FCFA" })
947
1135
  ] }),
948
- /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("div", { className: "relative", children: [
949
- /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(
1136
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("div", { className: "relative", children: [
1137
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(
950
1138
  "button",
951
1139
  {
952
1140
  className: "relative p-2 hover:bg-[var(--color-surface-hover)] rounded-lg transition-colors",
@@ -954,20 +1142,20 @@ var RewiseLayout = ({ children, module_name = "Rewise", module_description = "De
954
1142
  "aria-label": `Notifications ${notifications.filter((n) => !n.read).length > 0 ? `(${notifications.filter((n) => !n.read).length} non lues)` : ""}`,
955
1143
  "aria-expanded": showNotifications,
956
1144
  children: [
957
- /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_lucide_react.Bell, { className: "w-5 h-5 text-[var(--color-text-secondary)]" }),
958
- notifications.filter((n) => !n.read).length > 0 && /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("span", { className: "absolute top-1 right-1 w-2 h-2 bg-[var(--color-error)] rounded-full" })
1145
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(import_lucide_react.Bell, { className: "w-5 h-5 text-[var(--color-text-secondary)]" }),
1146
+ notifications.filter((n) => !n.read).length > 0 && /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("span", { className: "absolute top-1 right-1 w-2 h-2 bg-[var(--color-error)] rounded-full" })
959
1147
  ]
960
1148
  }
961
1149
  ),
962
- showNotifications && /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(
1150
+ showNotifications && /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(
963
1151
  "div",
964
1152
  {
965
1153
  className: "absolute right-0 mt-2 w-80 bg-[var(--color-background)] rounded-lg shadow-xl border border-[var(--color-border)] z-50 max-h-96 overflow-y-auto",
966
1154
  role: "region",
967
1155
  "aria-label": "Centre de notifications",
968
1156
  children: [
969
- /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("div", { className: "p-4 border-b border-[var(--color-border)]", children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("h3", { className: "font-semibold text-[var(--color-text-primary)]", children: "Notifications" }) }),
970
- /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("div", { className: "divide-y divide-[var(--color-border)]", children: notifications.map((notif) => /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
1157
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("div", { className: "p-4 border-b border-[var(--color-border)]", children: /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("h3", { className: "font-semibold text-[var(--color-text-primary)]", children: "Notifications" }) }),
1158
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("div", { className: "divide-y divide-[var(--color-border)]", children: notifications.map((notif) => /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
971
1159
  "div",
972
1160
  {
973
1161
  className: cn(
@@ -975,18 +1163,18 @@ var RewiseLayout = ({ children, module_name = "Rewise", module_description = "De
975
1163
  !notif.read && "bg-[var(--color-primary-light)] bg-opacity-10"
976
1164
  ),
977
1165
  onClick: () => markNotificationAsRead(notif.id),
978
- children: /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("div", { className: "flex items-start gap-3", children: [
979
- /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("div", { className: cn(
1166
+ children: /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("div", { className: "flex items-start gap-3", children: [
1167
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("div", { className: cn(
980
1168
  "w-2 h-2 rounded-full mt-2",
981
1169
  notif.type === "error" && "bg-[var(--color-error)]",
982
1170
  notif.type === "warning" && "bg-[var(--color-warning)]",
983
1171
  notif.type === "success" && "bg-[var(--color-success)]",
984
1172
  notif.type === "info" && "bg-[var(--color-info)]"
985
1173
  ) }),
986
- /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("div", { className: "flex-1", children: [
987
- /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("p", { className: "text-sm font-medium text-[var(--color-text-primary)]", children: notif.title }),
988
- /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("p", { className: "text-xs text-[var(--color-text-secondary)] mt-1", children: notif.message }),
989
- /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("p", { className: "text-xs text-[var(--color-text-tertiary)] mt-2", children: notif.timestamp.toLocaleTimeString() })
1174
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("div", { className: "flex-1", children: [
1175
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("p", { className: "text-sm font-medium text-[var(--color-text-primary)]", children: notif.title }),
1176
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("p", { className: "text-xs text-[var(--color-text-secondary)] mt-1", children: notif.message }),
1177
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("p", { className: "text-xs text-[var(--color-text-tertiary)] mt-2", children: notif.timestamp.toLocaleTimeString() })
990
1178
  ] })
991
1179
  ] })
992
1180
  },
@@ -996,36 +1184,36 @@ var RewiseLayout = ({ children, module_name = "Rewise", module_description = "De
996
1184
  }
997
1185
  )
998
1186
  ] }),
999
- /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("div", { className: "relative", children: [
1000
- /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
1187
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("div", { className: "relative", children: [
1188
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
1001
1189
  "button",
1002
1190
  {
1003
1191
  onClick: () => setShowUserMenu(!showUserMenu),
1004
1192
  className: "flex items-center gap-2 p-2 hover:bg-[var(--color-surface-hover)] rounded-lg transition-colors",
1005
1193
  "aria-label": "Menu utilisateur",
1006
1194
  "aria-expanded": showUserMenu,
1007
- children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("div", { className: "w-8 h-8 bg-[var(--color-primary)] rounded-full flex items-center justify-center", children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_lucide_react.User, { className: "w-4 h-4 text-[var(--color-background)]" }) })
1195
+ children: /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("div", { className: "w-8 h-8 bg-[var(--color-primary)] rounded-full flex items-center justify-center", children: /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(import_lucide_react.User, { className: "w-4 h-4 text-[var(--color-background)]" }) })
1008
1196
  }
1009
1197
  ),
1010
- showUserMenu && /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
1198
+ showUserMenu && /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
1011
1199
  "div",
1012
1200
  {
1013
1201
  className: "absolute right-0 mt-2 w-56 bg-[var(--color-background)] rounded-lg shadow-xl border border-[var(--color-border)] z-50",
1014
1202
  role: "menu",
1015
1203
  "aria-label": "Menu utilisateur",
1016
- children: /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("div", { className: "p-2", children: [
1017
- /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(
1204
+ children: /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("div", { className: "p-2", children: [
1205
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(
1018
1206
  "button",
1019
1207
  {
1020
1208
  className: "w-full flex items-center gap-3 px-3 py-2 rounded-lg hover:bg-[var(--color-surface-hover)] transition-colors",
1021
1209
  role: "menuitem",
1022
1210
  children: [
1023
- /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_lucide_react.User, { className: "w-4 h-4" }),
1024
- /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("span", { className: "text-sm", children: "Mon profil" })
1211
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(import_lucide_react.User, { className: "w-4 h-4" }),
1212
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("span", { className: "text-sm", children: "Mon profil" })
1025
1213
  ]
1026
1214
  }
1027
1215
  ),
1028
- /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(
1216
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(
1029
1217
  "button",
1030
1218
  {
1031
1219
  onClick: () => {
@@ -1035,31 +1223,31 @@ var RewiseLayout = ({ children, module_name = "Rewise", module_description = "De
1035
1223
  className: "w-full flex items-center gap-3 px-3 py-2 rounded-lg hover:bg-[var(--color-surface-hover)] transition-colors",
1036
1224
  role: "menuitem",
1037
1225
  children: [
1038
- /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_lucide_react.Settings, { className: "w-4 h-4" }),
1039
- /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("span", { className: "text-sm", children: "Param\xE8tres" })
1226
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(import_lucide_react.Settings, { className: "w-4 h-4" }),
1227
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("span", { className: "text-sm", children: "Param\xE8tres" })
1040
1228
  ]
1041
1229
  }
1042
1230
  ),
1043
- /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(
1231
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(
1044
1232
  "button",
1045
1233
  {
1046
1234
  className: "w-full flex items-center gap-3 px-3 py-2 rounded-lg hover:bg-[var(--color-surface-hover)] transition-colors",
1047
1235
  role: "menuitem",
1048
1236
  children: [
1049
- /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_lucide_react.HelpCircle, { className: "w-4 h-4" }),
1050
- /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("span", { className: "text-sm", children: "Aide" })
1237
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(import_lucide_react.HelpCircle, { className: "w-4 h-4" }),
1238
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("span", { className: "text-sm", children: "Aide" })
1051
1239
  ]
1052
1240
  }
1053
1241
  ),
1054
- /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("hr", { className: "my-2 border-[var(--color-border)]" }),
1055
- /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(
1242
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("hr", { className: "my-2 border-[var(--color-border)]" }),
1243
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(
1056
1244
  "button",
1057
1245
  {
1058
1246
  className: "w-full flex items-center gap-3 px-3 py-2 rounded-lg hover:bg-[var(--color-surface-hover)] text-[var(--color-error)] transition-colors",
1059
1247
  role: "menuitem",
1060
1248
  children: [
1061
- /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_lucide_react.LogOut, { className: "w-4 h-4" }),
1062
- /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("span", { className: "text-sm", children: "D\xE9connexion" })
1249
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(import_lucide_react.LogOut, { className: "w-4 h-4" }),
1250
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("span", { className: "text-sm", children: "D\xE9connexion" })
1063
1251
  ]
1064
1252
  }
1065
1253
  )
@@ -1071,13 +1259,13 @@ var RewiseLayout = ({ children, module_name = "Rewise", module_description = "De
1071
1259
  ]
1072
1260
  }
1073
1261
  ),
1074
- /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
1262
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
1075
1263
  "main",
1076
1264
  {
1077
1265
  id: "main-content",
1078
1266
  className: "flex-1 overflow-y-auto bg-[var(--color-background)]",
1079
1267
  role: "main",
1080
- children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("div", { className: "p-3 lg:p-4", children })
1268
+ children: /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("div", { className: "p-3 lg:p-4", children })
1081
1269
  }
1082
1270
  )
1083
1271
  ] })
@@ -1090,7 +1278,7 @@ var import_react4 = require("react");
1090
1278
 
1091
1279
  // src/contexts/ToastContext.tsx
1092
1280
  var import_react3 = require("react");
1093
- var import_jsx_runtime4 = require("react/jsx-runtime");
1281
+ var import_jsx_runtime6 = require("react/jsx-runtime");
1094
1282
  var ToastContext = (0, import_react3.createContext)(void 0);
1095
1283
  var useToast = () => {
1096
1284
  const context = (0, import_react3.useContext)(ToastContext);
@@ -1142,12 +1330,12 @@ var ToastProvider = ({ children }) => {
1142
1330
  warning,
1143
1331
  info
1144
1332
  };
1145
- return /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(ToastContext.Provider, { value, children });
1333
+ return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(ToastContext.Provider, { value, children });
1146
1334
  };
1147
1335
 
1148
1336
  // src/components/ui/Toast.tsx
1149
1337
  var import_lucide_react2 = require("lucide-react");
1150
- var import_jsx_runtime5 = require("react/jsx-runtime");
1338
+ var import_jsx_runtime7 = require("react/jsx-runtime");
1151
1339
  var ToastItem = ({ toast }) => {
1152
1340
  const { removeToast } = useToast();
1153
1341
  const [isVisible, setIsVisible] = (0, import_react4.useState)(false);
@@ -1165,13 +1353,13 @@ var ToastItem = ({ toast }) => {
1165
1353
  const getIcon = () => {
1166
1354
  switch (toast.type) {
1167
1355
  case "success":
1168
- return /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(import_lucide_react2.CheckCircle, { className: "w-5 h-5 text-green-600" });
1356
+ return /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(import_lucide_react2.CheckCircle, { className: "w-5 h-5 text-green-600" });
1169
1357
  case "error":
1170
- return /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(import_lucide_react2.XCircle, { className: "w-5 h-5 text-red-600" });
1358
+ return /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(import_lucide_react2.XCircle, { className: "w-5 h-5 text-red-600" });
1171
1359
  case "warning":
1172
- return /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(import_lucide_react2.AlertTriangle, { className: "w-5 h-5 text-yellow-600" });
1360
+ return /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(import_lucide_react2.AlertTriangle, { className: "w-5 h-5 text-yellow-600" });
1173
1361
  case "info":
1174
- return /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(import_lucide_react2.Info, { className: "w-5 h-5 text-blue-600" });
1362
+ return /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(import_lucide_react2.Info, { className: "w-5 h-5 text-blue-600" });
1175
1363
  }
1176
1364
  };
1177
1365
  const getBackgroundColor = () => {
@@ -1186,7 +1374,7 @@ var ToastItem = ({ toast }) => {
1186
1374
  return "bg-blue-50 border-blue-200";
1187
1375
  }
1188
1376
  };
1189
- return /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(
1377
+ return /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)(
1190
1378
  "div",
1191
1379
  {
1192
1380
  className: `
@@ -1197,14 +1385,14 @@ var ToastItem = ({ toast }) => {
1197
1385
  flex items-start space-x-3
1198
1386
  `,
1199
1387
  children: [
1200
- /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("div", { className: "flex-shrink-0", children: getIcon() }),
1201
- /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("div", { className: "flex-1 min-w-0", children: /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("p", { className: "text-sm text-gray-900 font-medium", children: toast.message }) }),
1202
- /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
1388
+ /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("div", { className: "flex-shrink-0", children: getIcon() }),
1389
+ /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("div", { className: "flex-1 min-w-0", children: /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("p", { className: "text-sm text-gray-900 font-medium", children: toast.message }) }),
1390
+ /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
1203
1391
  "button",
1204
1392
  {
1205
1393
  onClick: handleClose,
1206
1394
  className: "flex-shrink-0 ml-4 text-gray-400 hover:text-gray-600 transition-colors",
1207
- children: /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(import_lucide_react2.X, { className: "w-4 h-4" })
1395
+ children: /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(import_lucide_react2.X, { className: "w-4 h-4" })
1208
1396
  }
1209
1397
  )
1210
1398
  ]
@@ -1213,7 +1401,7 @@ var ToastItem = ({ toast }) => {
1213
1401
  };
1214
1402
  var ToastContainer = () => {
1215
1403
  const { toasts } = useToast();
1216
- return /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("div", { className: "fixed top-4 right-4 z-50 space-y-3", children: toasts.map((toast) => /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(ToastItem, { toast }, toast.id)) });
1404
+ return /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("div", { className: "fixed top-4 right-4 z-50 space-y-3", children: toasts.map((toast) => /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(ToastItem, { toast }, toast.id)) });
1217
1405
  };
1218
1406
  var Toast_default = ToastContainer;
1219
1407
 
@@ -1224,10 +1412,66 @@ var import_react5 = require("react");
1224
1412
  var ADDRESS_IP = "localhost:8000";
1225
1413
  var ADDRESS_IP_URL = `http://${ADDRESS_IP}/`;
1226
1414
  var API_URL = `${ADDRESS_IP_URL}api`;
1415
+ var FetchApi = class {
1416
+ static async post(url, payload, token) {
1417
+ const headers = {
1418
+ "Content-Type": "application/json"
1419
+ };
1420
+ if (token) {
1421
+ headers["Authorization"] = `Token ${token}`;
1422
+ }
1423
+ const res = await fetch(url, {
1424
+ method: "POST",
1425
+ headers,
1426
+ body: payload ? JSON.stringify(payload) : void 0
1427
+ });
1428
+ if (!res.ok) throw new Error(await res.text());
1429
+ return res.json();
1430
+ }
1431
+ static async get(url, token) {
1432
+ const headers = {};
1433
+ if (token) {
1434
+ headers["Authorization"] = `Token ${token}`;
1435
+ }
1436
+ const res = await fetch(url, {
1437
+ method: "GET",
1438
+ headers
1439
+ });
1440
+ if (!res.ok) throw new Error(await res.text());
1441
+ return res.json();
1442
+ }
1443
+ static async put(url, payload, token) {
1444
+ const headers = {
1445
+ "Content-Type": "application/json"
1446
+ };
1447
+ if (token) {
1448
+ headers["Authorization"] = `Token ${token}`;
1449
+ }
1450
+ const res = await fetch(url, {
1451
+ method: "PUT",
1452
+ headers,
1453
+ body: payload ? JSON.stringify(payload) : void 0
1454
+ });
1455
+ if (!res.ok) throw new Error(await res.text());
1456
+ return res.json();
1457
+ }
1458
+ static async delete(url, token) {
1459
+ const headers = {};
1460
+ if (token) {
1461
+ headers["Authorization"] = `Token ${token}`;
1462
+ }
1463
+ const res = await fetch(url, {
1464
+ method: "DELETE",
1465
+ headers
1466
+ });
1467
+ if (!res.ok) throw new Error(await res.text());
1468
+ return res.json();
1469
+ }
1470
+ };
1227
1471
 
1228
1472
  // src/services/AuthServices.ts
1229
1473
  var API_BASE_URL = `${API_URL}/core/auth/`;
1230
- var FetchApi = class {
1474
+ var FetchApi2 = class {
1231
1475
  static async post(url, payload, token) {
1232
1476
  const headers = {
1233
1477
  "Content-Type": "application/json"
@@ -1257,17 +1501,17 @@ var FetchApi = class {
1257
1501
  }
1258
1502
  };
1259
1503
  var AuthServices = {
1260
- sendOtp: (payload) => FetchApi.post(`${API_BASE_URL}send-otp/`, payload),
1261
- verifyOtp: (payload) => FetchApi.post(`${API_BASE_URL}verify-otp/`, payload),
1262
- completeRegistration: (payload) => FetchApi.post(`${API_BASE_URL}complete-registration/`, payload),
1263
- addUser: (payload) => FetchApi.post(`${API_BASE_URL}add-user/`, payload),
1264
- login: (payload) => FetchApi.post(`${API_BASE_URL}login/`, payload),
1265
- getUserInformations: (token) => FetchApi.get(`${API_BASE_URL}user-informations/`, token),
1266
- logout: () => FetchApi.post(`${API_BASE_URL}logout/`)
1504
+ sendOtp: (payload) => FetchApi2.post(`${API_BASE_URL}send-otp/`, payload),
1505
+ verifyOtp: (payload) => FetchApi2.post(`${API_BASE_URL}verify-otp/`, payload),
1506
+ completeRegistration: (payload) => FetchApi2.post(`${API_BASE_URL}complete-registration/`, payload),
1507
+ addUser: (payload) => FetchApi2.post(`${API_BASE_URL}add-user/`, payload),
1508
+ login: (payload) => FetchApi2.post(`${API_BASE_URL}login/`, payload),
1509
+ getUserInformations: (token) => FetchApi2.get(`${API_BASE_URL}user-informations/`, token),
1510
+ logout: () => FetchApi2.post(`${API_BASE_URL}logout/`)
1267
1511
  };
1268
1512
 
1269
1513
  // src/contexts/SessionContext.tsx
1270
- var import_jsx_runtime6 = require("react/jsx-runtime");
1514
+ var import_jsx_runtime8 = require("react/jsx-runtime");
1271
1515
  var SessionContext = (0, import_react5.createContext)(void 0);
1272
1516
  var useSession = () => {
1273
1517
  const context = (0, import_react5.useContext)(SessionContext);
@@ -1307,7 +1551,7 @@ var SessionProvider = ({ children }) => {
1307
1551
  setLoggedUser(null);
1308
1552
  }
1309
1553
  }, [token]);
1310
- return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(SessionContext.Provider, { value: {
1554
+ return /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(SessionContext.Provider, { value: {
1311
1555
  isAuthenticated: !!token,
1312
1556
  loggedUser,
1313
1557
  token,
@@ -1319,7 +1563,7 @@ var SessionProvider = ({ children }) => {
1319
1563
  // src/components/common/Pages.tsx
1320
1564
  var import_lucide_react3 = require("lucide-react");
1321
1565
  var import_react6 = require("react");
1322
- var import_jsx_runtime7 = require("react/jsx-runtime");
1566
+ var import_jsx_runtime9 = require("react/jsx-runtime");
1323
1567
  var Pages = ({
1324
1568
  title = "",
1325
1569
  description = "",
@@ -1329,17 +1573,17 @@ var Pages = ({
1329
1573
  children
1330
1574
  }) => {
1331
1575
  const [sidebarOpen, setSidebarOpen] = (0, import_react6.useState)(false);
1332
- return /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("div", { className: "flex h-full bg-gray-50", children: [
1333
- /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("div", { className: "flex-1 flex flex-col", children: [
1334
- /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("div", { className: "bg-white border-b border-gray-200 p-6", children: [
1335
- /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("div", { className: "flex items-center justify-between", children: [
1336
- /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("div", { className: "flex items-center space-x-4", children: /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("div", { children: [
1337
- /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("h1", { className: "text-2xl font-bold text-gray-900", children: title }),
1338
- /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("p", { className: "text-sm text-gray-600", children: description })
1576
+ return /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)("div", { className: "flex h-full bg-gray-50", children: [
1577
+ /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)("div", { className: "flex-1 flex flex-col", children: [
1578
+ /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)("div", { className: "bg-white border-b border-gray-200 p-6", children: [
1579
+ /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)("div", { className: "flex items-center justify-between", children: [
1580
+ /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("div", { className: "flex items-center space-x-4", children: /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)("div", { children: [
1581
+ /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("h1", { className: "text-2xl font-bold text-gray-900", children: title }),
1582
+ /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("p", { className: "text-sm text-gray-600", children: description })
1339
1583
  ] }) }),
1340
- /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("div", { className: "flex items-center space-x-3", children: sideAction })
1584
+ /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("div", { className: "flex items-center space-x-3", children: sideAction })
1341
1585
  ] }),
1342
- tabs.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("div", { className: "flex space-x-1 mt-4 overflow-x-auto", children: tabs.map((tab) => /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
1586
+ tabs.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("div", { className: "flex space-x-1 mt-4 overflow-x-auto", children: tabs.map((tab) => /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
1343
1587
  "button",
1344
1588
  {
1345
1589
  className: `px-4 py-2 text-sm rounded-lg transition-all whitespace-nowrap ${tab.id === "manual" ? "bg-[#6A8A82] text-white shadow-md" : "text-gray-600 hover:bg-gray-100"}`,
@@ -1348,43 +1592,43 @@ var Pages = ({
1348
1592
  tab.id
1349
1593
  )) })
1350
1594
  ] }),
1351
- /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("div", { className: "flex-1 p-6 space-y-6", children })
1595
+ /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("div", { className: "flex-1 p-6 space-y-6", children })
1352
1596
  ] }),
1353
- sidebar && /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("div", { className: `${sidebarOpen ? "w-80" : "w-16"} bg-[var(--color-surface)] border-r border-[var(--color-border)] transition-all duration-300 flex flex-col`, children: [
1354
- /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("div", { className: "p-4 ", children: /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("div", { className: "flex items-center justify-between", children: [
1355
- /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("h2", { className: `font-semibold text-[var(--color-text-primary)] ${!sidebarOpen && "hidden"}`, children: "Classes SYSCOHADA" }),
1356
- /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
1597
+ sidebar && /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)("div", { className: `${sidebarOpen ? "w-80" : "w-16"} bg-[var(--color-surface)] border-r border-[var(--color-border)] transition-all duration-300 flex flex-col`, children: [
1598
+ /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("div", { className: "p-4 ", children: /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)("div", { className: "flex items-center justify-between", children: [
1599
+ /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("h2", { className: `font-semibold text-[var(--color-text-primary)] ${!sidebarOpen && "hidden"}`, children: "Classes SYSCOHADA" }),
1600
+ /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
1357
1601
  "button",
1358
1602
  {
1359
1603
  onClick: () => setSidebarOpen(!sidebarOpen),
1360
1604
  className: "p-2 hover:bg-[var(--color-surface-hover)] rounded-lg transition-colors",
1361
1605
  "aria-label": sidebarOpen ? "R\xE9duire" : "Ouvrir",
1362
- children: sidebarOpen ? /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(import_lucide_react3.ChevronLeft, { className: "w-5 h-5" }) : /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(import_lucide_react3.Menu, { className: "w-5 h-5" })
1606
+ children: sidebarOpen ? /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(import_lucide_react3.ChevronLeft, { className: "w-5 h-5" }) : /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(import_lucide_react3.Menu, { className: "w-5 h-5" })
1363
1607
  }
1364
1608
  )
1365
1609
  ] }) }),
1366
- /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("div", { className: "flex-1 overflow-y-auto py-2", children: /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
1610
+ /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("div", { className: "flex-1 overflow-y-auto py-2", children: /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
1367
1611
  "button",
1368
1612
  {
1369
1613
  onClick: () => {
1370
1614
  },
1371
1615
  className: `w-full flex items-center gap-3 px-4 py-3 transition-all relative group hover:bg-[var(--color-surface-hover)]`,
1372
- children: /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
1616
+ children: /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
1373
1617
  "div",
1374
1618
  {
1375
1619
  className: `flex-shrink-0 w-10 h-10 rounded-lg flex items-center justify-center transition-colors bg-[var(--color-background)]`,
1376
- children: /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("span", { className: "font-bold text-lg", children: 1 })
1620
+ children: /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("span", { className: "font-bold text-lg", children: 1 })
1377
1621
  }
1378
1622
  )
1379
1623
  }
1380
1624
  ) }),
1381
- sidebarOpen && /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("div", { className: "p-4 border-t border-[var(--color-border)]", children: /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("div", { className: "space-y-2", children: [
1382
- /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("button", { className: "w-full px-3 py-2 bg-[var(--color-background)] rounded-lg text-sm text-[var(--color-text-secondary)] hover:bg-[var(--color-surface-hover)] transition-colors flex items-center gap-2", children: [
1383
- /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(import_lucide_react3.Download, { className: "w-4 h-4" }),
1625
+ sidebarOpen && /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("div", { className: "p-4 border-t border-[var(--color-border)]", children: /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)("div", { className: "space-y-2", children: [
1626
+ /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)("button", { className: "w-full px-3 py-2 bg-[var(--color-background)] rounded-lg text-sm text-[var(--color-text-secondary)] hover:bg-[var(--color-surface-hover)] transition-colors flex items-center gap-2", children: [
1627
+ /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(import_lucide_react3.Download, { className: "w-4 h-4" }),
1384
1628
  "Exporter le plan"
1385
1629
  ] }),
1386
- /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("button", { className: "w-full px-3 py-2 bg-[var(--color-background)] rounded-lg text-sm text-[var(--color-text-secondary)] hover:bg-[var(--color-surface-hover)] transition-colors flex items-center gap-2", children: [
1387
- /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(import_lucide_react3.Settings, { className: "w-4 h-4" }),
1630
+ /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)("button", { className: "w-full px-3 py-2 bg-[var(--color-background)] rounded-lg text-sm text-[var(--color-text-secondary)] hover:bg-[var(--color-surface-hover)] transition-colors flex items-center gap-2", children: [
1631
+ /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(import_lucide_react3.Settings, { className: "w-4 h-4" }),
1388
1632
  "Configuration"
1389
1633
  ] })
1390
1634
  ] }) })
@@ -1392,16 +1636,44 @@ var Pages = ({
1392
1636
  ] });
1393
1637
  };
1394
1638
  var Pages_default = Pages;
1639
+
1640
+ // src/services/UserServices.ts
1641
+ var API_BASE_URL2 = `${API_URL}/core/auth/`;
1642
+ var USERS_API_URL = `${API_URL}/core/users/`;
1643
+ var UserServices = {
1644
+ // Créer un nouvel utilisateur
1645
+ addUser: (data, token) => FetchApi.post(`${USERS_API_URL}`, data, token),
1646
+ // Obtenir tous les utilisateurs
1647
+ getUsers: (token) => FetchApi.get(`${USERS_API_URL}`, token),
1648
+ // Obtenir un utilisateur par ID
1649
+ getUser: (id, token) => FetchApi.get(`${USERS_API_URL}${id}/`, token),
1650
+ // Mettre à jour un utilisateur
1651
+ updateUser: (id, data, token) => FetchApi.put(`${USERS_API_URL}${id}/`, data, token),
1652
+ // Supprimer un utilisateur
1653
+ deleteUser: (id, token) => FetchApi.delete(`${USERS_API_URL}${id}/`, token),
1654
+ // Obtenir les utilisateurs d'une entité
1655
+ getEntityUsers: (entityId, token) => FetchApi.get(`${API_URL}/core/entities/${entityId}/users/`, token),
1656
+ // Ajouter un utilisateur à une entité
1657
+ addUserToEntity: (entityId, userId, token) => FetchApi.post(`${API_URL}/core/entities/${entityId}/users/`, { user_id: userId }, token)
1658
+ };
1395
1659
  // Annotate the CommonJS export names for ESM import in node:
1396
1660
  0 && (module.exports = {
1661
+ DateInput,
1662
+ FileInput,
1663
+ InputField,
1664
+ Modal,
1665
+ NumberInput,
1397
1666
  Pages,
1398
1667
  PrimaryButton,
1399
1668
  RewiseLayout,
1400
1669
  SecondaryButton,
1670
+ SelectInput,
1401
1671
  SessionProvider,
1672
+ TextInput,
1402
1673
  ThemeProvider,
1403
1674
  ToastContainer,
1404
1675
  ToastProvider,
1676
+ UserServices,
1405
1677
  useSession,
1406
1678
  useToast
1407
1679
  });