analytica-frontend-lib 1.1.53 → 1.1.55

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 (51) hide show
  1. package/dist/DropdownMenu/index.d.mts +5 -1
  2. package/dist/DropdownMenu/index.d.ts +5 -1
  3. package/dist/DropdownMenu/index.js +606 -37
  4. package/dist/DropdownMenu/index.js.map +1 -1
  5. package/dist/DropdownMenu/index.mjs +605 -37
  6. package/dist/DropdownMenu/index.mjs.map +1 -1
  7. package/dist/Modal/index.d.mts +14 -5
  8. package/dist/Modal/index.d.ts +14 -5
  9. package/dist/Modal/index.js +216 -31
  10. package/dist/Modal/index.js.map +1 -1
  11. package/dist/Modal/index.mjs +217 -32
  12. package/dist/Modal/index.mjs.map +1 -1
  13. package/dist/Modal/utils/videoUtils/index.d.mts +28 -0
  14. package/dist/Modal/utils/videoUtils/index.d.ts +28 -0
  15. package/dist/Modal/utils/videoUtils/index.js +76 -0
  16. package/dist/Modal/utils/videoUtils/index.js.map +1 -0
  17. package/dist/Modal/utils/videoUtils/index.mjs +49 -0
  18. package/dist/Modal/utils/videoUtils/index.mjs.map +1 -0
  19. package/dist/NotificationCard/index.js +716 -295
  20. package/dist/NotificationCard/index.js.map +1 -1
  21. package/dist/NotificationCard/index.mjs +713 -292
  22. package/dist/NotificationCard/index.mjs.map +1 -1
  23. package/dist/Quiz/index.js +154 -26
  24. package/dist/Quiz/index.js.map +1 -1
  25. package/dist/Quiz/index.mjs +166 -38
  26. package/dist/Quiz/index.mjs.map +1 -1
  27. package/dist/Search/index.js +625 -58
  28. package/dist/Search/index.js.map +1 -1
  29. package/dist/Search/index.mjs +628 -61
  30. package/dist/Search/index.mjs.map +1 -1
  31. package/dist/ThemeToggle/index.d.mts +8 -49
  32. package/dist/ThemeToggle/index.d.ts +8 -49
  33. package/dist/ThemeToggle/index.js +128 -114
  34. package/dist/ThemeToggle/index.js.map +1 -1
  35. package/dist/ThemeToggle/index.mjs +119 -105
  36. package/dist/ThemeToggle/index.mjs.map +1 -1
  37. package/dist/hooks/useTheme/index.d.mts +1 -1
  38. package/dist/hooks/useTheme/index.d.ts +1 -1
  39. package/dist/hooks/useTheme/index.js.map +1 -1
  40. package/dist/hooks/useTheme/index.mjs.map +1 -1
  41. package/dist/index.css +10 -39
  42. package/dist/index.css.map +1 -1
  43. package/dist/index.d.mts +3 -3
  44. package/dist/index.d.ts +3 -3
  45. package/dist/index.js +995 -825
  46. package/dist/index.js.map +1 -1
  47. package/dist/index.mjs +1083 -914
  48. package/dist/index.mjs.map +1 -1
  49. package/dist/styles.css +10 -39
  50. package/dist/styles.css.map +1 -1
  51. package/package.json +2 -1
@@ -24,8 +24,8 @@ __export(NotificationCard_exports, {
24
24
  default: () => NotificationCard_default
25
25
  });
26
26
  module.exports = __toCommonJS(NotificationCard_exports);
27
- var import_phosphor_react4 = require("phosphor-react");
28
- var import_react6 = require("react");
27
+ var import_phosphor_react5 = require("phosphor-react");
28
+ var import_react9 = require("react");
29
29
 
30
30
  // src/utils/utils.ts
31
31
  var import_clsx = require("clsx");
@@ -35,8 +35,8 @@ function cn(...inputs) {
35
35
  }
36
36
 
37
37
  // src/components/DropdownMenu/DropdownMenu.tsx
38
- var import_phosphor_react = require("phosphor-react");
39
- var import_react = require("react");
38
+ var import_phosphor_react3 = require("phosphor-react");
39
+ var import_react5 = require("react");
40
40
  var import_zustand = require("zustand");
41
41
 
42
42
  // src/components/Button/Button.tsx
@@ -97,8 +97,495 @@ var Button = ({
97
97
  };
98
98
  var Button_default = Button;
99
99
 
100
- // src/components/DropdownMenu/DropdownMenu.tsx
100
+ // src/components/Text/Text.tsx
101
101
  var import_jsx_runtime2 = require("react/jsx-runtime");
102
+ var Text = ({
103
+ children,
104
+ size = "md",
105
+ weight = "normal",
106
+ color = "text-text-950",
107
+ as,
108
+ className = "",
109
+ ...props
110
+ }) => {
111
+ let sizeClasses = "";
112
+ let weightClasses = "";
113
+ const sizeClassMap = {
114
+ "2xs": "text-2xs",
115
+ xs: "text-xs",
116
+ sm: "text-sm",
117
+ md: "text-md",
118
+ lg: "text-lg",
119
+ xl: "text-xl",
120
+ "2xl": "text-2xl",
121
+ "3xl": "text-3xl",
122
+ "4xl": "text-4xl",
123
+ "5xl": "text-5xl",
124
+ "6xl": "text-6xl"
125
+ };
126
+ sizeClasses = sizeClassMap[size] ?? sizeClassMap.md;
127
+ const weightClassMap = {
128
+ hairline: "font-hairline",
129
+ light: "font-light",
130
+ normal: "font-normal",
131
+ medium: "font-medium",
132
+ semibold: "font-semibold",
133
+ bold: "font-bold",
134
+ extrabold: "font-extrabold",
135
+ black: "font-black"
136
+ };
137
+ weightClasses = weightClassMap[weight] ?? weightClassMap.normal;
138
+ const baseClasses = "font-primary";
139
+ const Component = as ?? "p";
140
+ return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
141
+ Component,
142
+ {
143
+ className: cn(baseClasses, sizeClasses, weightClasses, color, className),
144
+ ...props,
145
+ children
146
+ }
147
+ );
148
+ };
149
+ var Text_default = Text;
150
+
151
+ // src/components/Modal/Modal.tsx
152
+ var import_react = require("react");
153
+ var import_phosphor_react = require("phosphor-react");
154
+
155
+ // src/components/Modal/utils/videoUtils.ts
156
+ var isYouTubeUrl = (url) => {
157
+ const youtubeRegex = /^(https?:\/\/)?((www|m|music)\.)?(youtube\.com|youtu\.be|youtube-nocookie\.com)\/.+/i;
158
+ return youtubeRegex.test(url);
159
+ };
160
+ var isValidYouTubeHost = (host) => {
161
+ if (host === "youtu.be") return "youtu.be";
162
+ const isValidYouTubeCom = host === "youtube.com" || host.endsWith(".youtube.com") && /^(www|m|music)\.youtube\.com$/.test(host);
163
+ if (isValidYouTubeCom) return "youtube";
164
+ const isValidNoCookie = host === "youtube-nocookie.com" || host.endsWith(".youtube-nocookie.com") && /^(www|m|music)\.youtube-nocookie\.com$/.test(host);
165
+ if (isValidNoCookie) return "nocookie";
166
+ return null;
167
+ };
168
+ var extractYoutuBeId = (pathname) => {
169
+ const firstSeg = pathname.split("/").filter(Boolean)[0];
170
+ return firstSeg || null;
171
+ };
172
+ var extractYouTubeId = (pathname, searchParams) => {
173
+ const parts = pathname.split("/").filter(Boolean);
174
+ const [first, second] = parts;
175
+ if (first === "embed" && second) return second;
176
+ if (first === "shorts" && second) return second;
177
+ if (first === "live" && second) return second;
178
+ const v = searchParams.get("v");
179
+ if (v) return v;
180
+ return null;
181
+ };
182
+ var getYouTubeVideoId = (url) => {
183
+ try {
184
+ const u = new URL(url);
185
+ const hostType = isValidYouTubeHost(u.hostname.toLowerCase());
186
+ if (!hostType) return null;
187
+ if (hostType === "youtu.be") {
188
+ return extractYoutuBeId(u.pathname);
189
+ }
190
+ return extractYouTubeId(u.pathname, u.searchParams);
191
+ } catch {
192
+ return null;
193
+ }
194
+ };
195
+ var getYouTubeEmbedUrl = (videoId) => {
196
+ return `https://www.youtube-nocookie.com/embed/${videoId}?autoplay=0&rel=0&modestbranding=1`;
197
+ };
198
+
199
+ // src/components/Modal/Modal.tsx
200
+ var import_jsx_runtime3 = require("react/jsx-runtime");
201
+ var SIZE_CLASSES2 = {
202
+ xs: "max-w-[360px]",
203
+ sm: "max-w-[420px]",
204
+ md: "max-w-[510px]",
205
+ lg: "max-w-[640px]",
206
+ xl: "max-w-[970px]"
207
+ };
208
+ var Modal = ({
209
+ isOpen,
210
+ onClose,
211
+ title,
212
+ children,
213
+ size = "md",
214
+ className = "",
215
+ closeOnEscape = true,
216
+ footer,
217
+ hideCloseButton = false,
218
+ variant = "default",
219
+ description,
220
+ image,
221
+ imageAlt,
222
+ actionLink,
223
+ actionLabel
224
+ }) => {
225
+ const titleId = (0, import_react.useId)();
226
+ (0, import_react.useEffect)(() => {
227
+ if (!isOpen || !closeOnEscape) return;
228
+ const handleEscape = (event) => {
229
+ if (event.key === "Escape") {
230
+ onClose();
231
+ }
232
+ };
233
+ document.addEventListener("keydown", handleEscape);
234
+ return () => document.removeEventListener("keydown", handleEscape);
235
+ }, [isOpen, closeOnEscape, onClose]);
236
+ (0, import_react.useEffect)(() => {
237
+ const originalOverflow = document.body.style.overflow;
238
+ if (isOpen) {
239
+ document.body.style.overflow = "hidden";
240
+ } else {
241
+ document.body.style.overflow = originalOverflow;
242
+ }
243
+ return () => {
244
+ document.body.style.overflow = originalOverflow;
245
+ };
246
+ }, [isOpen]);
247
+ if (!isOpen) return null;
248
+ const sizeClasses = SIZE_CLASSES2[size];
249
+ const baseClasses = "bg-secondary-50 rounded-3xl shadow-hard-shadow-2 border border-border-100 w-full mx-4";
250
+ const dialogResetClasses = "p-0 m-0 border-none outline-none max-h-none static";
251
+ const modalClasses = cn(
252
+ baseClasses,
253
+ sizeClasses,
254
+ dialogResetClasses,
255
+ className
256
+ );
257
+ const normalizeUrl = (href) => /^https?:\/\//i.test(href) ? href : `https://${href}`;
258
+ const handleActionClick = () => {
259
+ if (actionLink) {
260
+ window.open(normalizeUrl(actionLink), "_blank", "noopener,noreferrer");
261
+ }
262
+ };
263
+ if (variant === "activity") {
264
+ return /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("div", { className: "fixed inset-0 z-50 flex items-center justify-center bg-black/60 backdrop-blur-xs border-none p-0 m-0 w-full cursor-default", children: /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(
265
+ "dialog",
266
+ {
267
+ className: modalClasses,
268
+ "aria-labelledby": titleId,
269
+ "aria-modal": "true",
270
+ open: true,
271
+ children: [
272
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("div", { className: "flex justify-end p-6 pb-0", children: !hideCloseButton && /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
273
+ "button",
274
+ {
275
+ onClick: onClose,
276
+ className: "p-1 text-text-500 hover:text-text-700 hover:bg-background-50 rounded-md transition-colors focus:outline-none focus:ring-2 focus:ring-indicator-info focus:ring-offset-2",
277
+ "aria-label": "Fechar modal",
278
+ children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_phosphor_react.X, { size: 18 })
279
+ }
280
+ ) }),
281
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("div", { className: "flex flex-col items-center px-6 pb-6 gap-5", children: [
282
+ image && /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("div", { className: "flex justify-center", children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
283
+ "img",
284
+ {
285
+ src: image,
286
+ alt: imageAlt ?? "",
287
+ className: "w-[122px] h-[122px] object-contain"
288
+ }
289
+ ) }),
290
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
291
+ "h2",
292
+ {
293
+ id: titleId,
294
+ className: "text-lg font-semibold text-text-950 text-center",
295
+ children: title
296
+ }
297
+ ),
298
+ description && /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("p", { className: "text-sm font-normal text-text-400 text-center max-w-md leading-[21px]", children: description }),
299
+ actionLink && /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("div", { className: "w-full", children: [
300
+ (() => {
301
+ const normalized = normalizeUrl(actionLink);
302
+ const isYT = isYouTubeUrl(normalized);
303
+ if (!isYT) return null;
304
+ const id = getYouTubeVideoId(normalized);
305
+ if (!id) {
306
+ return /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
307
+ Button_default,
308
+ {
309
+ variant: "solid",
310
+ action: "primary",
311
+ size: "large",
312
+ className: "w-full",
313
+ onClick: handleActionClick,
314
+ children: actionLabel || "Iniciar Atividade"
315
+ }
316
+ );
317
+ }
318
+ return /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
319
+ "iframe",
320
+ {
321
+ src: getYouTubeEmbedUrl(id),
322
+ className: "w-full aspect-video rounded-lg",
323
+ allowFullScreen: true,
324
+ allow: "accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture",
325
+ title: "V\xEDdeo YouTube"
326
+ }
327
+ );
328
+ })(),
329
+ !isYouTubeUrl(normalizeUrl(actionLink)) && /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
330
+ Button_default,
331
+ {
332
+ variant: "solid",
333
+ action: "primary",
334
+ size: "large",
335
+ className: "w-full",
336
+ onClick: handleActionClick,
337
+ children: actionLabel || "Iniciar Atividade"
338
+ }
339
+ )
340
+ ] })
341
+ ] })
342
+ ]
343
+ }
344
+ ) });
345
+ }
346
+ return /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("div", { className: "fixed inset-0 z-50 flex items-center justify-center bg-black/60 backdrop-blur-xs border-none p-0 m-0 w-full cursor-default", children: /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(
347
+ "dialog",
348
+ {
349
+ className: modalClasses,
350
+ "aria-labelledby": titleId,
351
+ "aria-modal": "true",
352
+ open: true,
353
+ children: [
354
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("div", { className: "flex items-center justify-between px-6 py-6", children: [
355
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("h2", { id: titleId, className: "text-lg font-semibold text-text-950", children: title }),
356
+ !hideCloseButton && /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
357
+ "button",
358
+ {
359
+ onClick: onClose,
360
+ className: "p-1 text-text-500 hover:text-text-700 hover:bg-background-50 rounded-md transition-colors focus:outline-none focus:ring-2 focus:ring-indicator-info focus:ring-offset-2",
361
+ "aria-label": "Fechar modal",
362
+ children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_phosphor_react.X, { size: 18 })
363
+ }
364
+ )
365
+ ] }),
366
+ children && /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("div", { className: "px-6 pb-6", children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("div", { className: "text-text-500 font-normal text-sm leading-6", children }) }),
367
+ footer && /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("div", { className: "flex justify-end gap-3 px-6 pb-6", children: footer })
368
+ ]
369
+ }
370
+ ) });
371
+ };
372
+ var Modal_default = Modal;
373
+
374
+ // src/components/ThemeToggle/ThemeToggle.tsx
375
+ var import_phosphor_react2 = require("phosphor-react");
376
+ var import_react4 = require("react");
377
+
378
+ // src/components/SelectionButton/SelectionButton.tsx
379
+ var import_react2 = require("react");
380
+ var import_jsx_runtime4 = require("react/jsx-runtime");
381
+ var SelectionButton = (0, import_react2.forwardRef)(
382
+ ({ icon, label, selected = false, className = "", disabled, ...props }, ref) => {
383
+ const baseClasses = [
384
+ "inline-flex",
385
+ "items-center",
386
+ "justify-start",
387
+ "gap-2",
388
+ "p-4",
389
+ "rounded-xl",
390
+ "cursor-pointer",
391
+ "border",
392
+ "border-border-50",
393
+ "bg-background",
394
+ "text-sm",
395
+ "text-text-700",
396
+ "font-bold",
397
+ "shadow-soft-shadow-1",
398
+ "hover:bg-background-100",
399
+ "focus-visible:outline-none",
400
+ "focus-visible:ring-2",
401
+ "focus-visible:ring-indicator-info",
402
+ "focus-visible:ring-offset-0",
403
+ "focus-visible:shadow-none",
404
+ "active:ring-2",
405
+ "active:ring-primary-950",
406
+ "active:ring-offset-0",
407
+ "active:shadow-none",
408
+ "disabled:opacity-50",
409
+ "disabled:cursor-not-allowed"
410
+ ];
411
+ const stateClasses = selected ? ["ring-primary-950", "ring-2", "ring-offset-0", "shadow-none"] : [];
412
+ const allClasses = [...baseClasses, ...stateClasses].join(" ");
413
+ return /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(
414
+ "button",
415
+ {
416
+ ref,
417
+ type: "button",
418
+ className: cn(allClasses, className),
419
+ disabled,
420
+ "aria-pressed": selected,
421
+ ...props,
422
+ children: [
423
+ /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("span", { className: "flex items-center justify-center w-6 h-6", children: icon }),
424
+ /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("span", { children: label })
425
+ ]
426
+ }
427
+ );
428
+ }
429
+ );
430
+ SelectionButton.displayName = "SelectionButton";
431
+ var SelectionButton_default = SelectionButton;
432
+
433
+ // src/hooks/useTheme.ts
434
+ var import_react3 = require("react");
435
+ var useTheme = () => {
436
+ const [themeMode, setThemeMode] = (0, import_react3.useState)("system");
437
+ const [isDark, setIsDark] = (0, import_react3.useState)(false);
438
+ const themeModeRef = (0, import_react3.useRef)("system");
439
+ const applyTheme = (0, import_react3.useCallback)((mode) => {
440
+ const htmlElement = document.documentElement;
441
+ const originalTheme = htmlElement.getAttribute("data-original-theme");
442
+ if (mode === "dark") {
443
+ htmlElement.setAttribute("data-theme", "dark");
444
+ setIsDark(true);
445
+ } else if (mode === "light") {
446
+ if (originalTheme) {
447
+ htmlElement.setAttribute("data-theme", originalTheme);
448
+ }
449
+ setIsDark(false);
450
+ } else if (mode === "system") {
451
+ const isSystemDark = window.matchMedia(
452
+ "(prefers-color-scheme: dark)"
453
+ ).matches;
454
+ if (isSystemDark) {
455
+ htmlElement.setAttribute("data-theme", "dark");
456
+ setIsDark(true);
457
+ } else if (originalTheme) {
458
+ htmlElement.setAttribute("data-theme", originalTheme);
459
+ setIsDark(false);
460
+ }
461
+ }
462
+ }, []);
463
+ const toggleTheme = (0, import_react3.useCallback)(() => {
464
+ let newMode;
465
+ if (themeMode === "light") {
466
+ newMode = "dark";
467
+ } else if (themeMode === "dark") {
468
+ newMode = "light";
469
+ } else {
470
+ newMode = "dark";
471
+ }
472
+ setThemeMode(newMode);
473
+ themeModeRef.current = newMode;
474
+ applyTheme(newMode);
475
+ localStorage.setItem("theme-mode", newMode);
476
+ }, [themeMode, applyTheme]);
477
+ const setTheme = (0, import_react3.useCallback)(
478
+ (mode) => {
479
+ setThemeMode(mode);
480
+ themeModeRef.current = mode;
481
+ applyTheme(mode);
482
+ localStorage.setItem("theme-mode", mode);
483
+ },
484
+ [applyTheme]
485
+ );
486
+ (0, import_react3.useEffect)(() => {
487
+ const htmlElement = document.documentElement;
488
+ const currentTheme = htmlElement.getAttribute("data-theme");
489
+ if (currentTheme && !htmlElement.getAttribute("data-original-theme")) {
490
+ htmlElement.setAttribute("data-original-theme", currentTheme);
491
+ }
492
+ const savedThemeMode = localStorage.getItem("theme-mode");
493
+ const initialMode = savedThemeMode || "system";
494
+ if (!savedThemeMode) {
495
+ localStorage.setItem("theme-mode", "system");
496
+ }
497
+ setThemeMode(initialMode);
498
+ themeModeRef.current = initialMode;
499
+ applyTheme(initialMode);
500
+ const mediaQuery = window.matchMedia("(prefers-color-scheme: dark)");
501
+ const handleSystemThemeChange = () => {
502
+ if (themeModeRef.current === "system") {
503
+ applyTheme("system");
504
+ }
505
+ };
506
+ mediaQuery.addEventListener("change", handleSystemThemeChange);
507
+ return () => {
508
+ mediaQuery.removeEventListener("change", handleSystemThemeChange);
509
+ };
510
+ }, [applyTheme]);
511
+ return {
512
+ themeMode,
513
+ isDark,
514
+ toggleTheme,
515
+ setTheme
516
+ };
517
+ };
518
+
519
+ // src/components/ThemeToggle/ThemeToggle.tsx
520
+ var import_jsx_runtime5 = require("react/jsx-runtime");
521
+ var ThemeToggle = ({
522
+ variant = "default",
523
+ onToggle
524
+ }) => {
525
+ const { themeMode, setTheme } = useTheme();
526
+ const [tempTheme, setTempTheme] = (0, import_react4.useState)(themeMode);
527
+ (0, import_react4.useEffect)(() => {
528
+ setTempTheme(themeMode);
529
+ }, [themeMode]);
530
+ const problemTypes = [
531
+ {
532
+ id: "light",
533
+ title: "Claro",
534
+ icon: /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(import_phosphor_react2.Sun, { size: 24 })
535
+ },
536
+ {
537
+ id: "dark",
538
+ title: "Escuro",
539
+ icon: /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(import_phosphor_react2.Moon, { size: 24 })
540
+ },
541
+ {
542
+ id: "system",
543
+ title: "Sistema",
544
+ icon: /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
545
+ "svg",
546
+ {
547
+ width: "25",
548
+ height: "25",
549
+ viewBox: "0 0 25 25",
550
+ fill: "none",
551
+ xmlns: "http://www.w3.org/2000/svg",
552
+ children: /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
553
+ "path",
554
+ {
555
+ d: "M12.5 2.75C15.085 2.75276 17.5637 3.78054 19.3916 5.6084C21.2195 7.43628 22.2473 9.915 22.25 12.5C22.25 14.4284 21.6778 16.3136 20.6064 17.917C19.5352 19.5201 18.0128 20.7699 16.2314 21.5078C14.4499 22.2458 12.489 22.4387 10.5977 22.0625C8.70642 21.6863 6.96899 20.758 5.60547 19.3945C4.24197 18.031 3.31374 16.2936 2.9375 14.4023C2.56129 12.511 2.75423 10.5501 3.49219 8.76855C4.23012 6.98718 5.47982 5.46483 7.08301 4.39355C8.68639 3.32221 10.5716 2.75 12.5 2.75ZM11.75 4.28516C9.70145 4.47452 7.7973 5.42115 6.41016 6.94043C5.02299 8.4599 4.25247 10.4426 4.25 12.5C4.25247 14.5574 5.02299 16.5401 6.41016 18.0596C7.7973 19.5789 9.70145 20.5255 11.75 20.7148V4.28516Z",
556
+ fill: "#525252"
557
+ }
558
+ )
559
+ }
560
+ )
561
+ }
562
+ ];
563
+ const handleThemeSelect = (selectedTheme) => {
564
+ if (variant === "with-save") {
565
+ setTempTheme(selectedTheme);
566
+ } else {
567
+ setTheme(selectedTheme);
568
+ }
569
+ if (onToggle) {
570
+ onToggle(selectedTheme);
571
+ }
572
+ };
573
+ const currentTheme = variant === "with-save" ? tempTheme : themeMode;
574
+ return /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("div", { className: "flex flex-row gap-2 sm:gap-4 py-2", children: problemTypes.map((type) => /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
575
+ SelectionButton_default,
576
+ {
577
+ icon: type.icon,
578
+ label: type.title,
579
+ selected: currentTheme === type.id,
580
+ onClick: () => handleThemeSelect(type.id),
581
+ className: "w-full p-2 sm:p-4"
582
+ },
583
+ type.id
584
+ )) });
585
+ };
586
+
587
+ // src/components/DropdownMenu/DropdownMenu.tsx
588
+ var import_jsx_runtime6 = require("react/jsx-runtime");
102
589
  function createDropdownStore() {
103
590
  return (0, import_zustand.create)((set) => ({
104
591
  open: false,
@@ -114,8 +601,8 @@ var useDropdownStore = (externalStore) => {
114
601
  return externalStore;
115
602
  };
116
603
  var injectStore = (children, store) => {
117
- return import_react.Children.map(children, (child) => {
118
- if ((0, import_react.isValidElement)(child)) {
604
+ return import_react5.Children.map(children, (child) => {
605
+ if ((0, import_react5.isValidElement)(child)) {
119
606
  const typedChild = child;
120
607
  const newProps = {
121
608
  store
@@ -123,7 +610,7 @@ var injectStore = (children, store) => {
123
610
  if (typedChild.props.children) {
124
611
  newProps.children = injectStore(typedChild.props.children, store);
125
612
  }
126
- return (0, import_react.cloneElement)(typedChild, newProps);
613
+ return (0, import_react5.cloneElement)(typedChild, newProps);
127
614
  }
128
615
  return child;
129
616
  });
@@ -133,14 +620,14 @@ var DropdownMenu = ({
133
620
  open: propOpen,
134
621
  onOpenChange
135
622
  }) => {
136
- const storeRef = (0, import_react.useRef)(null);
623
+ const storeRef = (0, import_react5.useRef)(null);
137
624
  storeRef.current ??= createDropdownStore();
138
625
  const store = storeRef.current;
139
626
  const { open, setOpen: storeSetOpen } = (0, import_zustand.useStore)(store, (s) => s);
140
627
  const setOpen = (newOpen) => {
141
628
  storeSetOpen(newOpen);
142
629
  };
143
- const menuRef = (0, import_react.useRef)(null);
630
+ const menuRef = (0, import_react5.useRef)(null);
144
631
  const handleArrowDownOrArrowUp = (event) => {
145
632
  const menuContent = menuRef.current?.querySelector('[role="menu"]');
146
633
  if (menuContent) {
@@ -174,7 +661,7 @@ var DropdownMenu = ({
174
661
  setOpen(false);
175
662
  }
176
663
  };
177
- (0, import_react.useEffect)(() => {
664
+ (0, import_react5.useEffect)(() => {
178
665
  if (open) {
179
666
  document.addEventListener("mousedown", handleClickOutside);
180
667
  document.addEventListener("keydown", handleDownkey);
@@ -184,16 +671,16 @@ var DropdownMenu = ({
184
671
  document.removeEventListener("keydown", handleDownkey);
185
672
  };
186
673
  }, [open]);
187
- (0, import_react.useEffect)(() => {
674
+ (0, import_react5.useEffect)(() => {
188
675
  setOpen(open);
189
676
  onOpenChange?.(open);
190
677
  }, [open, onOpenChange]);
191
- (0, import_react.useEffect)(() => {
678
+ (0, import_react5.useEffect)(() => {
192
679
  if (propOpen) {
193
680
  setOpen(propOpen);
194
681
  }
195
682
  }, [propOpen]);
196
- return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("div", { className: "relative", ref: menuRef, children: injectStore(children, store) });
683
+ return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("div", { className: "relative", ref: menuRef, children: injectStore(children, store) });
197
684
  };
198
685
  var DropdownMenuTrigger = ({
199
686
  className,
@@ -205,7 +692,7 @@ var DropdownMenuTrigger = ({
205
692
  const store = useDropdownStore(externalStore);
206
693
  const open = (0, import_zustand.useStore)(store, (s) => s.open);
207
694
  const toggleOpen = () => store.setState({ open: !open });
208
- return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
695
+ return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
209
696
  "button",
210
697
  {
211
698
  onClick: (e) => {
@@ -240,8 +727,8 @@ var MENUCONTENT_VARIANT_CLASSES = {
240
727
  menu: "p-1",
241
728
  profile: "p-6"
242
729
  };
243
- var MenuLabel = (0, import_react.forwardRef)(({ className, inset, store: _store, ...props }, ref) => {
244
- return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
730
+ var MenuLabel = (0, import_react5.forwardRef)(({ className, inset, store: _store, ...props }, ref) => {
731
+ return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
245
732
  "div",
246
733
  {
247
734
  ref,
@@ -251,7 +738,7 @@ var MenuLabel = (0, import_react.forwardRef)(({ className, inset, store: _store,
251
738
  );
252
739
  });
253
740
  MenuLabel.displayName = "MenuLabel";
254
- var DropdownMenuContent = (0, import_react.forwardRef)(
741
+ var DropdownMenuContent = (0, import_react5.forwardRef)(
255
742
  ({
256
743
  className,
257
744
  align = "start",
@@ -264,8 +751,8 @@ var DropdownMenuContent = (0, import_react.forwardRef)(
264
751
  }, ref) => {
265
752
  const store = useDropdownStore(externalStore);
266
753
  const open = (0, import_zustand.useStore)(store, (s) => s.open);
267
- const [isVisible, setIsVisible] = (0, import_react.useState)(open);
268
- (0, import_react.useEffect)(() => {
754
+ const [isVisible, setIsVisible] = (0, import_react5.useState)(open);
755
+ (0, import_react5.useEffect)(() => {
269
756
  if (open) {
270
757
  setIsVisible(true);
271
758
  } else {
@@ -280,7 +767,7 @@ var DropdownMenuContent = (0, import_react.forwardRef)(
280
767
  return `absolute ${vertical} ${horizontal}`;
281
768
  };
282
769
  const variantClasses = MENUCONTENT_VARIANT_CLASSES[variant];
283
- return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
770
+ return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
284
771
  "div",
285
772
  {
286
773
  ref,
@@ -305,7 +792,7 @@ var DropdownMenuContent = (0, import_react.forwardRef)(
305
792
  }
306
793
  );
307
794
  DropdownMenuContent.displayName = "DropdownMenuContent";
308
- var DropdownMenuItem = (0, import_react.forwardRef)(
795
+ var DropdownMenuItem = (0, import_react5.forwardRef)(
309
796
  ({
310
797
  className,
311
798
  size = "small",
@@ -339,7 +826,7 @@ var DropdownMenuItem = (0, import_react.forwardRef)(
339
826
  const getVariantProps = () => {
340
827
  return variant === "profile" ? { "data-variant": "profile" } : {};
341
828
  };
342
- return /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(
829
+ return /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(
343
830
  "div",
344
831
  {
345
832
  ref,
@@ -361,7 +848,7 @@ var DropdownMenuItem = (0, import_react.forwardRef)(
361
848
  ...props,
362
849
  children: [
363
850
  iconLeft,
364
- /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("span", { className: "w-full text-md", children }),
851
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("div", { className: "w-full", children }),
365
852
  iconRight
366
853
  ]
367
854
  }
@@ -369,7 +856,7 @@ var DropdownMenuItem = (0, import_react.forwardRef)(
369
856
  }
370
857
  );
371
858
  DropdownMenuItem.displayName = "DropdownMenuItem";
372
- var DropdownMenuSeparator = (0, import_react.forwardRef)(({ className, store: _store, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
859
+ var DropdownMenuSeparator = (0, import_react5.forwardRef)(({ className, store: _store, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
373
860
  "div",
374
861
  {
375
862
  ref,
@@ -378,11 +865,11 @@ var DropdownMenuSeparator = (0, import_react.forwardRef)(({ className, store: _s
378
865
  }
379
866
  ));
380
867
  DropdownMenuSeparator.displayName = "DropdownMenuSeparator";
381
- var ProfileMenuTrigger = (0, import_react.forwardRef)(({ className, onClick, store: externalStore, ...props }, ref) => {
868
+ var ProfileMenuTrigger = (0, import_react5.forwardRef)(({ className, onClick, store: externalStore, ...props }, ref) => {
382
869
  const store = useDropdownStore(externalStore);
383
870
  const open = (0, import_zustand.useStore)(store, (s) => s.open);
384
871
  const toggleOpen = () => store.setState({ open: !open });
385
- return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
872
+ return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
386
873
  "button",
387
874
  {
388
875
  ref,
@@ -397,13 +884,13 @@ var ProfileMenuTrigger = (0, import_react.forwardRef)(({ className, onClick, sto
397
884
  },
398
885
  "aria-expanded": open,
399
886
  ...props,
400
- children: /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("span", { className: "size-6 rounded-full bg-primary-100 flex items-center justify-center", children: /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(import_phosphor_react.User, { className: "text-primary-950", size: 18 }) })
887
+ children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("span", { className: "size-6 rounded-full bg-primary-100 flex items-center justify-center", children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_phosphor_react3.User, { className: "text-primary-950", size: 18 }) })
401
888
  }
402
889
  );
403
890
  });
404
891
  ProfileMenuTrigger.displayName = "ProfileMenuTrigger";
405
- var ProfileMenuHeader = (0, import_react.forwardRef)(({ className, name, email, store: _store, ...props }, ref) => {
406
- return /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(
892
+ var ProfileMenuHeader = (0, import_react5.forwardRef)(({ className, name, email, store: _store, ...props }, ref) => {
893
+ return /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(
407
894
  "div",
408
895
  {
409
896
  ref,
@@ -411,18 +898,98 @@ var ProfileMenuHeader = (0, import_react.forwardRef)(({ className, name, email,
411
898
  className: cn("flex flex-row gap-4 items-center", className),
412
899
  ...props,
413
900
  children: [
414
- /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("span", { className: "size-16 bg-primary-100 rounded-full flex items-center justify-center", children: /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(import_phosphor_react.User, { size: 34, className: "text-primary-950" }) }),
415
- /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)("div", { className: "flex flex-col ", children: [
416
- /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("p", { className: "text-xl font-bold text-text-950", children: name }),
417
- /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("p", { className: "text-md text-text-600", children: email })
901
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("span", { className: "size-16 bg-primary-100 rounded-full flex items-center justify-center", children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_phosphor_react3.User, { size: 34, className: "text-primary-950" }) }),
902
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("div", { className: "flex flex-col ", children: [
903
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(Text_default, { size: "xl", weight: "bold", color: "text-text-950", children: name }),
904
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(Text_default, { size: "md", color: "text-text-600", children: email })
418
905
  ] })
419
906
  ]
420
907
  }
421
908
  );
422
909
  });
423
910
  ProfileMenuHeader.displayName = "ProfileMenuHeader";
424
- var ProfileMenuSection = (0, import_react.forwardRef)(({ className, children, store: _store, ...props }, ref) => {
425
- return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("div", { ref, className: cn("flex flex-col p-2", className), ...props, children });
911
+ var ProfileToggleTheme = ({ ...props }) => {
912
+ const { themeMode, setTheme } = useTheme();
913
+ const [modalThemeToggle, setModalThemeToggle] = (0, import_react5.useState)(false);
914
+ const [selectedTheme, setSelectedTheme] = (0, import_react5.useState)(themeMode);
915
+ const handleClick = (e) => {
916
+ e.preventDefault();
917
+ e.stopPropagation();
918
+ setModalThemeToggle(true);
919
+ };
920
+ const handleSave = () => {
921
+ setTheme(selectedTheme);
922
+ setModalThemeToggle(false);
923
+ };
924
+ return /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(import_jsx_runtime6.Fragment, { children: [
925
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(
926
+ "div",
927
+ {
928
+ role: "menuitem",
929
+ "data-variant": "profile",
930
+ className: "relative flex flex-row justify-between select-none items-center gap-2 rounded-sm p-4 text-sm outline-none transition-colors [&>svg]:size-6 [&>svg]:shrink-0 cursor-pointer hover:bg-background-50 text-text-700 focus:bg-accent focus:text-accent-foreground hover:bg-accent hover:text-accent-foreground",
931
+ onClick: handleClick,
932
+ onKeyDown: (e) => {
933
+ if (e.key === "Enter" || e.key === " ") {
934
+ e.preventDefault();
935
+ e.stopPropagation();
936
+ setModalThemeToggle(true);
937
+ }
938
+ },
939
+ tabIndex: 0,
940
+ ...props,
941
+ children: [
942
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
943
+ "svg",
944
+ {
945
+ width: "25",
946
+ height: "25",
947
+ viewBox: "0 0 25 25",
948
+ fill: "none",
949
+ xmlns: "http://www.w3.org/2000/svg",
950
+ children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
951
+ "path",
952
+ {
953
+ d: "M12.5 2.75C15.085 2.75276 17.5637 3.78054 19.3916 5.6084C21.2195 7.43628 22.2473 9.915 22.25 12.5C22.25 14.4284 21.6778 16.3136 20.6064 17.917C19.5352 19.5201 18.0128 20.7699 16.2314 21.5078C14.4499 22.2458 12.489 22.4387 10.5977 22.0625C8.70642 21.6863 6.96899 20.758 5.60547 19.3945C4.24197 18.031 3.31374 16.2936 2.9375 14.4023C2.56129 12.511 2.75423 10.5501 3.49219 8.76855C4.23012 6.98718 5.47982 5.46483 7.08301 4.39355C8.68639 3.32221 10.5716 2.75 12.5 2.75ZM11.75 4.28516C9.70145 4.47452 7.7973 5.42115 6.41016 6.94043C5.02299 8.4599 4.25247 10.4426 4.25 12.5C4.25247 14.5574 5.02299 16.5401 6.41016 18.0596C7.7973 19.5789 9.70145 20.5255 11.75 20.7148V4.28516Z",
954
+ fill: "#525252"
955
+ }
956
+ )
957
+ }
958
+ ),
959
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(Text_default, { className: "w-full", size: "md", children: "Apar\xEAncia" }),
960
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_phosphor_react3.CaretRight, {})
961
+ ]
962
+ }
963
+ ),
964
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
965
+ Modal_default,
966
+ {
967
+ isOpen: modalThemeToggle,
968
+ onClose: () => setModalThemeToggle(false),
969
+ title: "Apar\xEAncia",
970
+ size: "md",
971
+ footer: /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("div", { className: "flex gap-3", children: [
972
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
973
+ Button_default,
974
+ {
975
+ variant: "outline",
976
+ onClick: () => setModalThemeToggle(false),
977
+ children: "Cancelar"
978
+ }
979
+ ),
980
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(Button_default, { variant: "solid", onClick: () => handleSave(), children: "Salvar" })
981
+ ] }),
982
+ children: /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("div", { className: "flex flex-col", children: [
983
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("p", { className: "text-sm text-text-500", children: "Escolha o tema:" }),
984
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(ThemeToggle, { variant: "with-save", onToggle: setSelectedTheme })
985
+ ] })
986
+ }
987
+ )
988
+ ] });
989
+ };
990
+ ProfileToggleTheme.displayName = "ProfileToggleTheme";
991
+ var ProfileMenuSection = (0, import_react5.forwardRef)(({ className, children, store: _store, ...props }, ref) => {
992
+ return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("div", { ref, className: cn("flex flex-col p-2", className), ...props, children });
426
993
  });
427
994
  ProfileMenuSection.displayName = "ProfileMenuSection";
428
995
  var ProfileMenuFooter = ({
@@ -434,7 +1001,7 @@ var ProfileMenuFooter = ({
434
1001
  }) => {
435
1002
  const store = useDropdownStore(externalStore);
436
1003
  const setOpen = (0, import_zustand.useStore)(store, (s) => s.setOpen);
437
- return /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(
1004
+ return /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(
438
1005
  Button_default,
439
1006
  {
440
1007
  variant: "outline",
@@ -446,8 +1013,8 @@ var ProfileMenuFooter = ({
446
1013
  },
447
1014
  ...props,
448
1015
  children: [
449
- /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("span", { className: "mr-2 flex items-center", children: /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(import_phosphor_react.SignOut, {}) }),
450
- /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("span", { children: "Sair" })
1016
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("span", { className: "mr-2 flex items-center", children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_phosphor_react3.SignOut, {}) }),
1017
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(Text_default, { children: "Sair" })
451
1018
  ]
452
1019
  }
453
1020
  );
@@ -456,8 +1023,8 @@ ProfileMenuFooter.displayName = "ProfileMenuFooter";
456
1023
  var DropdownMenu_default = DropdownMenu;
457
1024
 
458
1025
  // src/components/Skeleton/Skeleton.tsx
459
- var import_react2 = require("react");
460
- var import_jsx_runtime3 = require("react/jsx-runtime");
1026
+ var import_react6 = require("react");
1027
+ var import_jsx_runtime7 = require("react/jsx-runtime");
461
1028
  var SKELETON_ANIMATION_CLASSES = {
462
1029
  pulse: "animate-pulse",
463
1030
  none: ""
@@ -474,7 +1041,7 @@ var SPACING_CLASSES = {
474
1041
  medium: "space-y-2",
475
1042
  large: "space-y-3"
476
1043
  };
477
- var Skeleton = (0, import_react2.forwardRef)(
1044
+ var Skeleton = (0, import_react6.forwardRef)(
478
1045
  ({
479
1046
  variant = "text",
480
1047
  width,
@@ -494,13 +1061,13 @@ var Skeleton = (0, import_react2.forwardRef)(
494
1061
  height: typeof height === "number" ? `${height}px` : height
495
1062
  };
496
1063
  if (variant === "text" && lines > 1) {
497
- return /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
1064
+ return /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
498
1065
  "div",
499
1066
  {
500
1067
  ref,
501
1068
  className: cn("flex flex-col", spacingClass, className),
502
1069
  ...props,
503
- children: Array.from({ length: lines }, (_, index) => /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
1070
+ children: Array.from({ length: lines }, (_, index) => /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
504
1071
  "div",
505
1072
  {
506
1073
  className: cn(variantClass, animationClass),
@@ -511,7 +1078,7 @@ var Skeleton = (0, import_react2.forwardRef)(
511
1078
  }
512
1079
  );
513
1080
  }
514
- return /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
1081
+ return /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
515
1082
  "div",
516
1083
  {
517
1084
  ref,
@@ -523,13 +1090,13 @@ var Skeleton = (0, import_react2.forwardRef)(
523
1090
  );
524
1091
  }
525
1092
  );
526
- var SkeletonText = (0, import_react2.forwardRef)(
527
- (props, ref) => /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(Skeleton, { ref, variant: "text", ...props })
1093
+ var SkeletonText = (0, import_react6.forwardRef)(
1094
+ (props, ref) => /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(Skeleton, { ref, variant: "text", ...props })
528
1095
  );
529
- var SkeletonCircle = (0, import_react2.forwardRef)((props, ref) => /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(Skeleton, { ref, variant: "circular", ...props }));
530
- var SkeletonRectangle = (0, import_react2.forwardRef)((props, ref) => /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(Skeleton, { ref, variant: "rectangular", ...props }));
531
- var SkeletonRounded = (0, import_react2.forwardRef)((props, ref) => /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(Skeleton, { ref, variant: "rounded", ...props }));
532
- var SkeletonCard = (0, import_react2.forwardRef)(
1096
+ var SkeletonCircle = (0, import_react6.forwardRef)((props, ref) => /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(Skeleton, { ref, variant: "circular", ...props }));
1097
+ var SkeletonRectangle = (0, import_react6.forwardRef)((props, ref) => /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(Skeleton, { ref, variant: "rectangular", ...props }));
1098
+ var SkeletonRounded = (0, import_react6.forwardRef)((props, ref) => /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(Skeleton, { ref, variant: "rounded", ...props }));
1099
+ var SkeletonCard = (0, import_react6.forwardRef)(
533
1100
  ({
534
1101
  showAvatar = true,
535
1102
  showTitle = true,
@@ -539,7 +1106,7 @@ var SkeletonCard = (0, import_react2.forwardRef)(
539
1106
  className = "",
540
1107
  ...props
541
1108
  }, ref) => {
542
- return /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(
1109
+ return /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)(
543
1110
  "div",
544
1111
  {
545
1112
  ref,
@@ -549,23 +1116,23 @@ var SkeletonCard = (0, import_react2.forwardRef)(
549
1116
  ),
550
1117
  ...props,
551
1118
  children: [
552
- /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("div", { className: "flex items-start space-x-3", children: [
553
- showAvatar && /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(SkeletonCircle, { width: 40, height: 40 }),
554
- /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("div", { className: "flex-1 space-y-2", children: [
555
- showTitle && /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(SkeletonText, { width: "60%", height: 20 }),
556
- showDescription && /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(SkeletonText, { lines, spacing: "small" })
1119
+ /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("div", { className: "flex items-start space-x-3", children: [
1120
+ showAvatar && /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(SkeletonCircle, { width: 40, height: 40 }),
1121
+ /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("div", { className: "flex-1 space-y-2", children: [
1122
+ showTitle && /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(SkeletonText, { width: "60%", height: 20 }),
1123
+ showDescription && /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(SkeletonText, { lines, spacing: "small" })
557
1124
  ] })
558
1125
  ] }),
559
- showActions && /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("div", { className: "flex justify-end space-x-2 mt-4", children: [
560
- /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(SkeletonRectangle, { width: 80, height: 32 }),
561
- /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(SkeletonRectangle, { width: 80, height: 32 })
1126
+ showActions && /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("div", { className: "flex justify-end space-x-2 mt-4", children: [
1127
+ /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(SkeletonRectangle, { width: 80, height: 32 }),
1128
+ /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(SkeletonRectangle, { width: 80, height: 32 })
562
1129
  ] })
563
1130
  ]
564
1131
  }
565
1132
  );
566
1133
  }
567
1134
  );
568
- var SkeletonList = (0, import_react2.forwardRef)(
1135
+ var SkeletonList = (0, import_react6.forwardRef)(
569
1136
  ({
570
1137
  items = 3,
571
1138
  showAvatar = true,
@@ -575,19 +1142,19 @@ var SkeletonList = (0, import_react2.forwardRef)(
575
1142
  className = "",
576
1143
  ...props
577
1144
  }, ref) => {
578
- return /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("div", { ref, className: cn("space-y-3", className), ...props, children: Array.from({ length: items }, (_, index) => /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("div", { className: "flex items-start space-x-3 p-3", children: [
579
- showAvatar && /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(SkeletonCircle, { width: 32, height: 32 }),
580
- /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("div", { className: "flex-1 space-y-2", children: [
581
- showTitle && /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(SkeletonText, { width: "40%", height: 16 }),
582
- showDescription && /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(SkeletonText, { lines, spacing: "small" })
1145
+ return /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("div", { ref, className: cn("space-y-3", className), ...props, children: Array.from({ length: items }, (_, index) => /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("div", { className: "flex items-start space-x-3 p-3", children: [
1146
+ showAvatar && /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(SkeletonCircle, { width: 32, height: 32 }),
1147
+ /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("div", { className: "flex-1 space-y-2", children: [
1148
+ showTitle && /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(SkeletonText, { width: "40%", height: 16 }),
1149
+ showDescription && /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(SkeletonText, { lines, spacing: "small" })
583
1150
  ] })
584
1151
  ] }, index)) });
585
1152
  }
586
1153
  );
587
- var SkeletonTable = (0, import_react2.forwardRef)(
1154
+ var SkeletonTable = (0, import_react6.forwardRef)(
588
1155
  ({ rows = 5, columns = 4, showHeader = true, className = "", ...props }, ref) => {
589
- return /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("div", { ref, className: cn("w-full", className), ...props, children: [
590
- showHeader && /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("div", { className: "flex space-x-2 mb-3", children: Array.from({ length: columns }, (_, index) => /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
1156
+ return /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("div", { ref, className: cn("w-full", className), ...props, children: [
1157
+ showHeader && /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("div", { className: "flex space-x-2 mb-3", children: Array.from({ length: columns }, (_, index) => /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
591
1158
  SkeletonText,
592
1159
  {
593
1160
  width: `${100 / columns}%`,
@@ -595,7 +1162,7 @@ var SkeletonTable = (0, import_react2.forwardRef)(
595
1162
  },
596
1163
  index
597
1164
  )) }),
598
- /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("div", { className: "space-y-2", children: Array.from({ length: rows }, (_, rowIndex) => /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("div", { className: "flex space-x-2", children: Array.from({ length: columns }, (_2, colIndex) => /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
1165
+ /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("div", { className: "space-y-2", children: Array.from({ length: rows }, (_, rowIndex) => /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("div", { className: "flex space-x-2", children: Array.from({ length: columns }, (_2, colIndex) => /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
599
1166
  SkeletonText,
600
1167
  {
601
1168
  width: `${100 / columns}%`,
@@ -608,9 +1175,9 @@ var SkeletonTable = (0, import_react2.forwardRef)(
608
1175
  );
609
1176
 
610
1177
  // src/components/IconButton/IconButton.tsx
611
- var import_react3 = require("react");
612
- var import_jsx_runtime4 = require("react/jsx-runtime");
613
- var IconButton = (0, import_react3.forwardRef)(
1178
+ var import_react7 = require("react");
1179
+ var import_jsx_runtime8 = require("react/jsx-runtime");
1180
+ var IconButton = (0, import_react7.forwardRef)(
614
1181
  ({ icon, size = "md", active = false, className = "", disabled, ...props }, ref) => {
615
1182
  const baseClasses = [
616
1183
  "inline-flex",
@@ -642,7 +1209,7 @@ var IconButton = (0, import_react3.forwardRef)(
642
1209
  ...activeClasses
643
1210
  ].join(" ");
644
1211
  const ariaLabel = props["aria-label"] ?? "Bot\xE3o de a\xE7\xE3o";
645
- return /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
1212
+ return /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
646
1213
  "button",
647
1214
  {
648
1215
  ref,
@@ -652,7 +1219,7 @@ var IconButton = (0, import_react3.forwardRef)(
652
1219
  "aria-pressed": active,
653
1220
  "aria-label": ariaLabel,
654
1221
  ...props,
655
- children: /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("span", { className: "flex items-center justify-center", children: icon })
1222
+ children: /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("span", { className: "flex items-center justify-center", children: icon })
656
1223
  }
657
1224
  );
658
1225
  }
@@ -660,154 +1227,9 @@ var IconButton = (0, import_react3.forwardRef)(
660
1227
  IconButton.displayName = "IconButton";
661
1228
  var IconButton_default = IconButton;
662
1229
 
663
- // src/components/Modal/Modal.tsx
664
- var import_react4 = require("react");
665
- var import_phosphor_react2 = require("phosphor-react");
666
- var import_jsx_runtime5 = require("react/jsx-runtime");
667
- var SIZE_CLASSES2 = {
668
- xs: "max-w-[360px]",
669
- sm: "max-w-[420px]",
670
- md: "max-w-[510px]",
671
- lg: "max-w-[640px]",
672
- xl: "max-w-[970px]"
673
- };
674
- var Modal = ({
675
- isOpen,
676
- onClose,
677
- title,
678
- children,
679
- size = "md",
680
- className = "",
681
- closeOnBackdropClick = true,
682
- closeOnEscape = true,
683
- footer,
684
- hideCloseButton = false
685
- }) => {
686
- (0, import_react4.useEffect)(() => {
687
- if (!isOpen || !closeOnEscape) return;
688
- const handleEscape = (event) => {
689
- if (event.key === "Escape") {
690
- onClose();
691
- }
692
- };
693
- document.addEventListener("keydown", handleEscape);
694
- return () => document.removeEventListener("keydown", handleEscape);
695
- }, [isOpen, closeOnEscape, onClose]);
696
- (0, import_react4.useEffect)(() => {
697
- const originalOverflow = document.body.style.overflow;
698
- if (isOpen) {
699
- document.body.style.overflow = "hidden";
700
- } else {
701
- document.body.style.overflow = originalOverflow;
702
- }
703
- return () => {
704
- document.body.style.overflow = originalOverflow;
705
- };
706
- }, [isOpen]);
707
- const handleBackdropClick = (event) => {
708
- if (closeOnBackdropClick && event.target === event.currentTarget) {
709
- onClose();
710
- }
711
- };
712
- const handleBackdropKeyDown = (event) => {
713
- if (closeOnBackdropClick && (event.key === "Enter" || event.key === " ")) {
714
- onClose();
715
- }
716
- };
717
- if (!isOpen) return null;
718
- const sizeClasses = SIZE_CLASSES2[size];
719
- const baseClasses = "bg-secondary-50 rounded-3xl shadow-hard-shadow-2 border border-border-100 w-full mx-4";
720
- const dialogResetClasses = "p-0 m-0 border-none outline-none max-h-none static";
721
- const modalClasses = cn(
722
- baseClasses,
723
- sizeClasses,
724
- dialogResetClasses,
725
- className
726
- );
727
- return /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
728
- "div",
729
- {
730
- className: "fixed inset-0 z-50 flex items-center justify-center bg-black/60 backdrop-blur-xs",
731
- onClick: handleBackdropClick,
732
- onKeyDown: handleBackdropKeyDown,
733
- role: "button",
734
- tabIndex: closeOnBackdropClick ? 0 : -1,
735
- "aria-label": "Fechar modal clicando no fundo",
736
- children: /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("dialog", { className: modalClasses, "aria-labelledby": "modal-title", open: true, children: [
737
- /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("div", { className: "flex items-center justify-between px-6 py-6", children: [
738
- /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("h2", { id: "modal-title", className: "text-lg font-semibold text-text-950", children: title }),
739
- !hideCloseButton && /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
740
- "button",
741
- {
742
- onClick: onClose,
743
- className: "p-1 text-text-500 hover:text-text-700 hover:bg-background-50 rounded-md transition-colors focus:outline-none focus:ring-2 focus:ring-indicator-info focus:ring-offset-2",
744
- "aria-label": "Fechar modal",
745
- children: /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(import_phosphor_react2.X, { size: 18 })
746
- }
747
- )
748
- ] }),
749
- /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("div", { className: "px-6 pb-6", children: /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("div", { className: "text-text-500 font-normal text-sm leading-6", children }) }),
750
- footer && /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("div", { className: "flex justify-end gap-3 px-6 pb-6", children: footer })
751
- ] })
752
- }
753
- );
754
- };
755
- var Modal_default = Modal;
756
-
757
- // src/components/Text/Text.tsx
758
- var import_jsx_runtime6 = require("react/jsx-runtime");
759
- var Text = ({
760
- children,
761
- size = "md",
762
- weight = "normal",
763
- color = "text-text-950",
764
- as,
765
- className = "",
766
- ...props
767
- }) => {
768
- let sizeClasses = "";
769
- let weightClasses = "";
770
- const sizeClassMap = {
771
- "2xs": "text-2xs",
772
- xs: "text-xs",
773
- sm: "text-sm",
774
- md: "text-md",
775
- lg: "text-lg",
776
- xl: "text-xl",
777
- "2xl": "text-2xl",
778
- "3xl": "text-3xl",
779
- "4xl": "text-4xl",
780
- "5xl": "text-5xl",
781
- "6xl": "text-6xl"
782
- };
783
- sizeClasses = sizeClassMap[size] ?? sizeClassMap.md;
784
- const weightClassMap = {
785
- hairline: "font-hairline",
786
- light: "font-light",
787
- normal: "font-normal",
788
- medium: "font-medium",
789
- semibold: "font-semibold",
790
- bold: "font-bold",
791
- extrabold: "font-extrabold",
792
- black: "font-black"
793
- };
794
- weightClasses = weightClassMap[weight] ?? weightClassMap.normal;
795
- const baseClasses = "font-primary";
796
- const Component = as ?? "p";
797
- return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
798
- Component,
799
- {
800
- className: cn(baseClasses, sizeClasses, weightClasses, color, className),
801
- ...props,
802
- children
803
- }
804
- );
805
- };
806
- var Text_default = Text;
807
-
808
1230
  // src/components/Badge/Badge.tsx
809
- var import_phosphor_react3 = require("phosphor-react");
810
- var import_jsx_runtime7 = require("react/jsx-runtime");
1231
+ var import_phosphor_react4 = require("phosphor-react");
1232
+ var import_jsx_runtime9 = require("react/jsx-runtime");
811
1233
  var VARIANT_ACTION_CLASSES2 = {
812
1234
  solid: {
813
1235
  error: "bg-error-background text-error-700 focus-visible:outline-none",
@@ -869,14 +1291,14 @@ var Badge = ({
869
1291
  const baseClasses = "inline-flex items-center justify-center rounded-xs font-normal gap-1 relative";
870
1292
  const baseClassesIcon = "flex items-center";
871
1293
  if (variant === "notification") {
872
- return /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)(
1294
+ return /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)(
873
1295
  "div",
874
1296
  {
875
1297
  className: cn(baseClasses, variantClasses, sizeClasses, className),
876
1298
  ...props,
877
1299
  children: [
878
- /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(import_phosphor_react3.Bell, { size: 24, className: "text-current", "aria-hidden": "true" }),
879
- notificationActive && /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
1300
+ /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(import_phosphor_react4.Bell, { size: 24, className: "text-current", "aria-hidden": "true" }),
1301
+ notificationActive && /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
880
1302
  "span",
881
1303
  {
882
1304
  "data-testid": "notification-dot",
@@ -887,15 +1309,15 @@ var Badge = ({
887
1309
  }
888
1310
  );
889
1311
  }
890
- return /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)(
1312
+ return /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)(
891
1313
  "div",
892
1314
  {
893
1315
  className: cn(baseClasses, variantClasses, sizeClasses, className),
894
1316
  ...props,
895
1317
  children: [
896
- iconLeft && /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("span", { className: cn(baseClassesIcon, sizeClassesIcon), children: iconLeft }),
1318
+ iconLeft && /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("span", { className: cn(baseClassesIcon, sizeClassesIcon), children: iconLeft }),
897
1319
  children,
898
- iconRight && /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("span", { className: cn(baseClassesIcon, sizeClassesIcon), children: iconRight })
1320
+ iconRight && /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("span", { className: cn(baseClassesIcon, sizeClassesIcon), children: iconRight })
899
1321
  ]
900
1322
  }
901
1323
  );
@@ -903,7 +1325,7 @@ var Badge = ({
903
1325
  var Badge_default = Badge;
904
1326
 
905
1327
  // src/hooks/useMobile.ts
906
- var import_react5 = require("react");
1328
+ var import_react8 = require("react");
907
1329
  var MOBILE_WIDTH = 500;
908
1330
  var TABLET_WIDTH = 931;
909
1331
  var DEFAULT_WIDTH = 1200;
@@ -918,9 +1340,9 @@ var getDeviceType = () => {
918
1340
  return width < TABLET_WIDTH ? "responsive" : "desktop";
919
1341
  };
920
1342
  var useMobile = () => {
921
- const [isMobile, setIsMobile] = (0, import_react5.useState)(false);
922
- const [isTablet, setIsTablet] = (0, import_react5.useState)(false);
923
- (0, import_react5.useEffect)(() => {
1343
+ const [isMobile, setIsMobile] = (0, import_react8.useState)(false);
1344
+ const [isTablet, setIsTablet] = (0, import_react8.useState)(false);
1345
+ (0, import_react8.useEffect)(() => {
924
1346
  const checkScreenSize = () => {
925
1347
  const width = getWindowWidth();
926
1348
  setIsMobile(width < MOBILE_WIDTH);
@@ -992,14 +1414,14 @@ var formatTimeAgo = (date) => {
992
1414
  };
993
1415
 
994
1416
  // src/components/NotificationCard/NotificationCard.tsx
995
- var import_jsx_runtime8 = require("react/jsx-runtime");
1417
+ var import_jsx_runtime10 = require("react/jsx-runtime");
996
1418
  var NotificationEmpty = ({
997
1419
  emptyStateImage,
998
1420
  emptyStateTitle = "Nenhuma notifica\xE7\xE3o no momento",
999
1421
  emptyStateDescription = "Voc\xEA est\xE1 em dia com todas as novidades. Volte depois para conferir atualiza\xE7\xF5es!"
1000
1422
  }) => {
1001
- return /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("div", { className: "flex flex-col items-center justify-center gap-4 p-6 w-full", children: [
1002
- emptyStateImage && /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("div", { className: "w-20 h-20 flex items-center justify-center", children: /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
1423
+ return /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)("div", { className: "flex flex-col items-center justify-center gap-4 p-6 w-full", children: [
1424
+ emptyStateImage && /* @__PURE__ */ (0, import_jsx_runtime10.jsx)("div", { className: "w-20 h-20 flex items-center justify-center", children: /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
1003
1425
  "img",
1004
1426
  {
1005
1427
  src: emptyStateImage,
@@ -1009,23 +1431,23 @@ var NotificationEmpty = ({
1009
1431
  className: "object-contain"
1010
1432
  }
1011
1433
  ) }),
1012
- /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("h3", { className: "text-xl font-semibold text-text-950 text-center leading-[23px]", children: emptyStateTitle }),
1013
- /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("p", { className: "text-sm font-normal text-text-400 text-center max-w-[316px] leading-[21px]", children: emptyStateDescription })
1434
+ /* @__PURE__ */ (0, import_jsx_runtime10.jsx)("h3", { className: "text-xl font-semibold text-text-950 text-center leading-[23px]", children: emptyStateTitle }),
1435
+ /* @__PURE__ */ (0, import_jsx_runtime10.jsx)("p", { className: "text-sm font-normal text-text-400 text-center max-w-[316px] leading-[21px]", children: emptyStateDescription })
1014
1436
  ] });
1015
1437
  };
1016
1438
  var NotificationHeader = ({
1017
1439
  unreadCount,
1018
1440
  variant = "modal"
1019
1441
  }) => {
1020
- return /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("div", { className: "flex items-center justify-between gap-2", children: [
1021
- variant === "modal" ? /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(Text_default, { size: "sm", weight: "bold", className: "text-text-950", children: "Notifica\xE7\xF5es" }) : /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("h3", { className: "text-sm font-semibold text-text-950", children: "Notifica\xE7\xF5es" }),
1022
- unreadCount > 0 && /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
1442
+ return /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)("div", { className: "flex items-center justify-between gap-2", children: [
1443
+ variant === "modal" ? /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(Text_default, { size: "sm", weight: "bold", className: "text-text-950", children: "Notifica\xE7\xF5es" }) : /* @__PURE__ */ (0, import_jsx_runtime10.jsx)("h3", { className: "text-sm font-semibold text-text-950", children: "Notifica\xE7\xF5es" }),
1444
+ unreadCount > 0 && /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
1023
1445
  Badge_default,
1024
1446
  {
1025
1447
  variant: "solid",
1026
1448
  action: "info",
1027
1449
  size: "small",
1028
- iconLeft: /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(import_phosphor_react4.Bell, { size: 12, "aria-hidden": "true", focusable: "false" }),
1450
+ iconLeft: /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(import_phosphor_react5.Bell, { size: 12, "aria-hidden": "true", focusable: "false" }),
1029
1451
  className: "border-0",
1030
1452
  children: unreadCount === 1 ? "1 n\xE3o lida" : `${unreadCount} n\xE3o lidas`
1031
1453
  }
@@ -1061,7 +1483,7 @@ var SingleNotificationCard = ({
1061
1483
  onNavigate();
1062
1484
  }
1063
1485
  };
1064
- return /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)(
1486
+ return /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)(
1065
1487
  "div",
1066
1488
  {
1067
1489
  className: cn(
@@ -1070,20 +1492,20 @@ var SingleNotificationCard = ({
1070
1492
  className
1071
1493
  ),
1072
1494
  children: [
1073
- /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("div", { className: "flex items-center gap-2 w-full", children: [
1074
- !isRead && /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("div", { className: "w-[7px] h-[7px] bg-info-300 rounded-full flex-shrink-0" }),
1075
- /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("h3", { className: "font-bold text-sm leading-4 text-text-950 flex-grow", children: title }),
1076
- /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)(DropdownMenu_default, { children: [
1077
- /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
1495
+ /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)("div", { className: "flex items-center gap-2 w-full", children: [
1496
+ !isRead && /* @__PURE__ */ (0, import_jsx_runtime10.jsx)("div", { className: "w-[7px] h-[7px] bg-info-300 rounded-full flex-shrink-0" }),
1497
+ /* @__PURE__ */ (0, import_jsx_runtime10.jsx)("h3", { className: "font-bold text-sm leading-4 text-text-950 flex-grow", children: title }),
1498
+ /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)(DropdownMenu_default, { children: [
1499
+ /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
1078
1500
  DropdownMenuTrigger,
1079
1501
  {
1080
1502
  className: "flex-shrink-0 inline-flex items-center justify-center font-medium bg-transparent text-text-950 cursor-pointer hover:bg-info-50 w-6 h-6 rounded-lg",
1081
1503
  "aria-label": "Menu de a\xE7\xF5es",
1082
- children: /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(import_phosphor_react4.DotsThreeVertical, { size: 24 })
1504
+ children: /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(import_phosphor_react5.DotsThreeVertical, { size: 24 })
1083
1505
  }
1084
1506
  ),
1085
- /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)(DropdownMenuContent, { align: "end", className: "min-w-[160px]", children: [
1086
- !isRead && /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
1507
+ /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)(DropdownMenuContent, { align: "end", className: "min-w-[160px]", children: [
1508
+ !isRead && /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
1087
1509
  DropdownMenuItem,
1088
1510
  {
1089
1511
  onClick: handleMarkAsRead,
@@ -1091,14 +1513,14 @@ var SingleNotificationCard = ({
1091
1513
  children: "Marcar como lida"
1092
1514
  }
1093
1515
  ),
1094
- /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(DropdownMenuItem, { onClick: handleDelete, className: "text-error-600", children: "Deletar" })
1516
+ /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(DropdownMenuItem, { onClick: handleDelete, className: "text-error-600", children: "Deletar" })
1095
1517
  ] })
1096
1518
  ] })
1097
1519
  ] }),
1098
- /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("p", { className: "text-sm leading-[21px] text-text-800 w-full", children: message }),
1099
- /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("div", { className: "flex items-center justify-between w-full", children: [
1100
- /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("span", { className: "text-sm font-medium text-text-400", children: time }),
1101
- onNavigate && actionLabel && /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
1520
+ /* @__PURE__ */ (0, import_jsx_runtime10.jsx)("p", { className: "text-sm leading-[21px] text-text-800 w-full", children: message }),
1521
+ /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)("div", { className: "flex items-center justify-between w-full", children: [
1522
+ /* @__PURE__ */ (0, import_jsx_runtime10.jsx)("span", { className: "text-sm font-medium text-text-400", children: time }),
1523
+ onNavigate && actionLabel && /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
1102
1524
  "button",
1103
1525
  {
1104
1526
  type: "button",
@@ -1125,9 +1547,9 @@ var NotificationList = ({
1125
1547
  className
1126
1548
  }) => {
1127
1549
  if (error) {
1128
- return /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("div", { className: "flex flex-col items-center gap-4 p-6 w-full", children: [
1129
- /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("p", { className: "text-sm text-error-600", children: error }),
1130
- onRetry && /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
1550
+ return /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)("div", { className: "flex flex-col items-center gap-4 p-6 w-full", children: [
1551
+ /* @__PURE__ */ (0, import_jsx_runtime10.jsx)("p", { className: "text-sm text-error-600", children: error }),
1552
+ onRetry && /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
1131
1553
  "button",
1132
1554
  {
1133
1555
  type: "button",
@@ -1139,8 +1561,8 @@ var NotificationList = ({
1139
1561
  ] });
1140
1562
  }
1141
1563
  if (loading) {
1142
- return /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("div", { className: "flex flex-col gap-0 w-full", children: ["skeleton-first", "skeleton-second", "skeleton-third"].map(
1143
- (skeletonId) => /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
1564
+ return /* @__PURE__ */ (0, import_jsx_runtime10.jsx)("div", { className: "flex flex-col gap-0 w-full", children: ["skeleton-first", "skeleton-second", "skeleton-third"].map(
1565
+ (skeletonId) => /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
1144
1566
  SkeletonCard,
1145
1567
  {
1146
1568
  className: "p-4 border-b border-border-200"
@@ -1150,11 +1572,11 @@ var NotificationList = ({
1150
1572
  ) });
1151
1573
  }
1152
1574
  if (!groupedNotifications || groupedNotifications.length === 0) {
1153
- return renderEmpty ? /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("div", { className: "w-full", children: renderEmpty() }) : /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(NotificationEmpty, {});
1575
+ return renderEmpty ? /* @__PURE__ */ (0, import_jsx_runtime10.jsx)("div", { className: "w-full", children: renderEmpty() }) : /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(NotificationEmpty, {});
1154
1576
  }
1155
- return /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("div", { className: cn("flex flex-col gap-0 w-full", className), children: groupedNotifications.map((group, idx) => /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("div", { className: "flex flex-col", children: [
1156
- /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("div", { className: "flex items-end px-4 py-6 pb-4", children: /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("h4", { className: "text-lg font-bold text-text-500 flex-grow", children: group.label }) }),
1157
- group.notifications.map((notification) => /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
1577
+ return /* @__PURE__ */ (0, import_jsx_runtime10.jsx)("div", { className: cn("flex flex-col gap-0 w-full", className), children: groupedNotifications.map((group, idx) => /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)("div", { className: "flex flex-col", children: [
1578
+ /* @__PURE__ */ (0, import_jsx_runtime10.jsx)("div", { className: "flex items-end px-4 py-6 pb-4", children: /* @__PURE__ */ (0, import_jsx_runtime10.jsx)("h4", { className: "text-lg font-bold text-text-500 flex-grow", children: group.label }) }),
1579
+ group.notifications.map((notification) => /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
1158
1580
  SingleNotificationCard,
1159
1581
  {
1160
1582
  title: notification.title,
@@ -1195,7 +1617,7 @@ var NotificationCenter = ({
1195
1617
  className
1196
1618
  }) => {
1197
1619
  const { isMobile } = useMobile();
1198
- const [isModalOpen, setIsModalOpen] = (0, import_react6.useState)(false);
1620
+ const [isModalOpen, setIsModalOpen] = (0, import_react9.useState)(false);
1199
1621
  const handleMobileClick = () => {
1200
1622
  setIsModalOpen(true);
1201
1623
  onFetchNotifications?.();
@@ -1203,7 +1625,7 @@ var NotificationCenter = ({
1203
1625
  const handleDesktopClick = () => {
1204
1626
  onToggleActive?.();
1205
1627
  };
1206
- (0, import_react6.useEffect)(() => {
1628
+ (0, import_react9.useEffect)(() => {
1207
1629
  if (isActive) {
1208
1630
  onFetchNotifications?.();
1209
1631
  }
@@ -1212,7 +1634,7 @@ var NotificationCenter = ({
1212
1634
  onCleanup?.();
1213
1635
  onNavigateById?.(entityType, entityId);
1214
1636
  };
1215
- const renderEmptyState = () => /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
1637
+ const renderEmptyState = () => /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
1216
1638
  NotificationEmpty,
1217
1639
  {
1218
1640
  emptyStateImage,
@@ -1221,17 +1643,17 @@ var NotificationCenter = ({
1221
1643
  }
1222
1644
  );
1223
1645
  if (isMobile) {
1224
- return /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)(import_jsx_runtime8.Fragment, { children: [
1225
- /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
1646
+ return /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)(import_jsx_runtime10.Fragment, { children: [
1647
+ /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
1226
1648
  IconButton_default,
1227
1649
  {
1228
1650
  active: isModalOpen,
1229
1651
  onClick: handleMobileClick,
1230
- icon: /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(import_phosphor_react4.Bell, { size: 24, className: "text-primary" }),
1652
+ icon: /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(import_phosphor_react5.Bell, { size: 24, className: "text-primary" }),
1231
1653
  className
1232
1654
  }
1233
1655
  ),
1234
- /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
1656
+ /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
1235
1657
  Modal_default,
1236
1658
  {
1237
1659
  isOpen: isModalOpen,
@@ -1239,12 +1661,11 @@ var NotificationCenter = ({
1239
1661
  title: "Notifica\xE7\xF5es",
1240
1662
  size: "md",
1241
1663
  hideCloseButton: false,
1242
- closeOnBackdropClick: true,
1243
1664
  closeOnEscape: true,
1244
- children: /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("div", { className: "flex flex-col h-full max-h-[80vh]", children: [
1245
- /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("div", { className: "px-0 pb-3 border-b border-border-200", children: [
1246
- /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(NotificationHeader, { unreadCount, variant: "modal" }),
1247
- unreadCount > 0 && onMarkAllAsRead && /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
1665
+ children: /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)("div", { className: "flex flex-col h-full max-h-[80vh]", children: [
1666
+ /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)("div", { className: "px-0 pb-3 border-b border-border-200", children: [
1667
+ /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(NotificationHeader, { unreadCount, variant: "modal" }),
1668
+ unreadCount > 0 && onMarkAllAsRead && /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
1248
1669
  "button",
1249
1670
  {
1250
1671
  type: "button",
@@ -1254,7 +1675,7 @@ var NotificationCenter = ({
1254
1675
  }
1255
1676
  )
1256
1677
  ] }),
1257
- /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("div", { className: "flex-1 overflow-y-auto", children: /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
1678
+ /* @__PURE__ */ (0, import_jsx_runtime10.jsx)("div", { className: "flex-1 overflow-y-auto", children: /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
1258
1679
  NotificationList,
1259
1680
  {
1260
1681
  groupedNotifications,
@@ -1277,14 +1698,14 @@ var NotificationCenter = ({
1277
1698
  )
1278
1699
  ] });
1279
1700
  }
1280
- return /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)(DropdownMenu_default, { children: [
1281
- /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(DropdownMenuTrigger, { className: "text-primary cursor-pointer", children: /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
1701
+ return /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)(DropdownMenu_default, { children: [
1702
+ /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(DropdownMenuTrigger, { className: "text-primary cursor-pointer", children: /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
1282
1703
  IconButton_default,
1283
1704
  {
1284
1705
  active: isActive,
1285
1706
  onClick: handleDesktopClick,
1286
- icon: /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
1287
- import_phosphor_react4.Bell,
1707
+ icon: /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
1708
+ import_phosphor_react5.Bell,
1288
1709
  {
1289
1710
  size: 24,
1290
1711
  className: isActive ? "text-primary-950" : "text-primary"
@@ -1293,16 +1714,16 @@ var NotificationCenter = ({
1293
1714
  className
1294
1715
  }
1295
1716
  ) }),
1296
- /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
1717
+ /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
1297
1718
  DropdownMenuContent,
1298
1719
  {
1299
1720
  className: "min-w-[320px] max-w-[400px] max-h-[500px] overflow-hidden",
1300
1721
  side: "bottom",
1301
1722
  align: "end",
1302
- children: /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("div", { className: "flex flex-col", children: [
1303
- /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("div", { className: "px-4 py-3 border-b border-border-200", children: [
1304
- /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(NotificationHeader, { unreadCount, variant: "dropdown" }),
1305
- unreadCount > 0 && onMarkAllAsRead && /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
1723
+ children: /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)("div", { className: "flex flex-col", children: [
1724
+ /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)("div", { className: "px-4 py-3 border-b border-border-200", children: [
1725
+ /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(NotificationHeader, { unreadCount, variant: "dropdown" }),
1726
+ unreadCount > 0 && onMarkAllAsRead && /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
1306
1727
  "button",
1307
1728
  {
1308
1729
  type: "button",
@@ -1312,7 +1733,7 @@ var NotificationCenter = ({
1312
1733
  }
1313
1734
  )
1314
1735
  ] }),
1315
- /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("div", { className: "max-h-[350px] overflow-y-auto", children: /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
1736
+ /* @__PURE__ */ (0, import_jsx_runtime10.jsx)("div", { className: "max-h-[350px] overflow-y-auto", children: /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
1316
1737
  NotificationList,
1317
1738
  {
1318
1739
  groupedNotifications,
@@ -1334,7 +1755,7 @@ var NotificationCenter = ({
1334
1755
  var NotificationCard = (props) => {
1335
1756
  switch (props.mode) {
1336
1757
  case "single":
1337
- return /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
1758
+ return /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
1338
1759
  SingleNotificationCard,
1339
1760
  {
1340
1761
  title: props.title,
@@ -1349,7 +1770,7 @@ var NotificationCard = (props) => {
1349
1770
  }
1350
1771
  );
1351
1772
  case "list":
1352
- return /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
1773
+ return /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
1353
1774
  NotificationList,
1354
1775
  {
1355
1776
  groupedNotifications: props.groupedNotifications ?? (props.notifications ? [
@@ -1370,9 +1791,9 @@ var NotificationCard = (props) => {
1370
1791
  }
1371
1792
  );
1372
1793
  case "center":
1373
- return /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(NotificationCenter, { ...props });
1794
+ return /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(NotificationCenter, { ...props });
1374
1795
  default:
1375
- return /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("div", { className: "flex flex-col items-center gap-4 p-6 w-full", children: /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("p", { className: "text-sm text-text-600", children: "Modo de notifica\xE7\xE3o n\xE3o reconhecido" }) });
1796
+ return /* @__PURE__ */ (0, import_jsx_runtime10.jsx)("div", { className: "flex flex-col items-center gap-4 p-6 w-full", children: /* @__PURE__ */ (0, import_jsx_runtime10.jsx)("p", { className: "text-sm text-text-600", children: "Modo de notifica\xE7\xE3o n\xE3o reconhecido" }) });
1376
1797
  }
1377
1798
  };
1378
1799
  var LegacyNotificationCard = (props) => {
@@ -1381,10 +1802,10 @@ var LegacyNotificationCard = (props) => {
1381
1802
  mode: "center",
1382
1803
  ...props
1383
1804
  };
1384
- return /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(NotificationCenter, { ...centerProps });
1805
+ return /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(NotificationCenter, { ...centerProps });
1385
1806
  }
1386
1807
  if (props.groupedNotifications !== void 0 || props.notifications !== void 0 || props.loading || props.error) {
1387
- return /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
1808
+ return /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
1388
1809
  NotificationList,
1389
1810
  {
1390
1811
  groupedNotifications: props.groupedNotifications ?? (props.notifications ? [
@@ -1421,7 +1842,7 @@ var LegacyNotificationCard = (props) => {
1421
1842
  emptyStateTitle: props.emptyStateTitle,
1422
1843
  emptyStateDescription: props.emptyStateDescription
1423
1844
  };
1424
- return /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
1845
+ return /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
1425
1846
  SingleNotificationCard,
1426
1847
  {
1427
1848
  title: singleProps.title,
@@ -1436,7 +1857,7 @@ var LegacyNotificationCard = (props) => {
1436
1857
  }
1437
1858
  );
1438
1859
  }
1439
- return /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("div", { className: "flex flex-col items-center gap-4 p-6 w-full", children: /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("p", { className: "text-sm text-text-600", children: "Nenhuma notifica\xE7\xE3o configurada" }) });
1860
+ return /* @__PURE__ */ (0, import_jsx_runtime10.jsx)("div", { className: "flex flex-col items-center gap-4 p-6 w-full", children: /* @__PURE__ */ (0, import_jsx_runtime10.jsx)("p", { className: "text-sm text-text-600", children: "Nenhuma notifica\xE7\xE3o configurada" }) });
1440
1861
  };
1441
1862
  var NotificationCard_default = NotificationCard;
1442
1863
  // Annotate the CommonJS export names for ESM import in node: