analytica-frontend-lib 1.1.54 → 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.
@@ -1,6 +1,6 @@
1
1
  // src/components/NotificationCard/NotificationCard.tsx
2
2
  import { DotsThreeVertical, Bell as Bell2 } from "phosphor-react";
3
- import { useState as useState3, useEffect as useEffect4 } from "react";
3
+ import { useState as useState5, useEffect as useEffect6 } from "react";
4
4
 
5
5
  // src/utils/utils.ts
6
6
  import { clsx } from "clsx";
@@ -10,15 +10,15 @@ function cn(...inputs) {
10
10
  }
11
11
 
12
12
  // src/components/DropdownMenu/DropdownMenu.tsx
13
- import { SignOut, User } from "phosphor-react";
13
+ import { CaretRight, SignOut, User } from "phosphor-react";
14
14
  import {
15
- forwardRef,
16
- useEffect,
17
- useRef,
15
+ forwardRef as forwardRef2,
16
+ useEffect as useEffect4,
17
+ useRef as useRef2,
18
18
  isValidElement,
19
19
  Children,
20
20
  cloneElement,
21
- useState
21
+ useState as useState3
22
22
  } from "react";
23
23
  import { create, useStore } from "zustand";
24
24
 
@@ -80,8 +80,495 @@ var Button = ({
80
80
  };
81
81
  var Button_default = Button;
82
82
 
83
+ // src/components/Text/Text.tsx
84
+ import { jsx as jsx2 } from "react/jsx-runtime";
85
+ var Text = ({
86
+ children,
87
+ size = "md",
88
+ weight = "normal",
89
+ color = "text-text-950",
90
+ as,
91
+ className = "",
92
+ ...props
93
+ }) => {
94
+ let sizeClasses = "";
95
+ let weightClasses = "";
96
+ const sizeClassMap = {
97
+ "2xs": "text-2xs",
98
+ xs: "text-xs",
99
+ sm: "text-sm",
100
+ md: "text-md",
101
+ lg: "text-lg",
102
+ xl: "text-xl",
103
+ "2xl": "text-2xl",
104
+ "3xl": "text-3xl",
105
+ "4xl": "text-4xl",
106
+ "5xl": "text-5xl",
107
+ "6xl": "text-6xl"
108
+ };
109
+ sizeClasses = sizeClassMap[size] ?? sizeClassMap.md;
110
+ const weightClassMap = {
111
+ hairline: "font-hairline",
112
+ light: "font-light",
113
+ normal: "font-normal",
114
+ medium: "font-medium",
115
+ semibold: "font-semibold",
116
+ bold: "font-bold",
117
+ extrabold: "font-extrabold",
118
+ black: "font-black"
119
+ };
120
+ weightClasses = weightClassMap[weight] ?? weightClassMap.normal;
121
+ const baseClasses = "font-primary";
122
+ const Component = as ?? "p";
123
+ return /* @__PURE__ */ jsx2(
124
+ Component,
125
+ {
126
+ className: cn(baseClasses, sizeClasses, weightClasses, color, className),
127
+ ...props,
128
+ children
129
+ }
130
+ );
131
+ };
132
+ var Text_default = Text;
133
+
134
+ // src/components/Modal/Modal.tsx
135
+ import { useEffect, useId } from "react";
136
+ import { X } from "phosphor-react";
137
+
138
+ // src/components/Modal/utils/videoUtils.ts
139
+ var isYouTubeUrl = (url) => {
140
+ const youtubeRegex = /^(https?:\/\/)?((www|m|music)\.)?(youtube\.com|youtu\.be|youtube-nocookie\.com)\/.+/i;
141
+ return youtubeRegex.test(url);
142
+ };
143
+ var isValidYouTubeHost = (host) => {
144
+ if (host === "youtu.be") return "youtu.be";
145
+ const isValidYouTubeCom = host === "youtube.com" || host.endsWith(".youtube.com") && /^(www|m|music)\.youtube\.com$/.test(host);
146
+ if (isValidYouTubeCom) return "youtube";
147
+ const isValidNoCookie = host === "youtube-nocookie.com" || host.endsWith(".youtube-nocookie.com") && /^(www|m|music)\.youtube-nocookie\.com$/.test(host);
148
+ if (isValidNoCookie) return "nocookie";
149
+ return null;
150
+ };
151
+ var extractYoutuBeId = (pathname) => {
152
+ const firstSeg = pathname.split("/").filter(Boolean)[0];
153
+ return firstSeg || null;
154
+ };
155
+ var extractYouTubeId = (pathname, searchParams) => {
156
+ const parts = pathname.split("/").filter(Boolean);
157
+ const [first, second] = parts;
158
+ if (first === "embed" && second) return second;
159
+ if (first === "shorts" && second) return second;
160
+ if (first === "live" && second) return second;
161
+ const v = searchParams.get("v");
162
+ if (v) return v;
163
+ return null;
164
+ };
165
+ var getYouTubeVideoId = (url) => {
166
+ try {
167
+ const u = new URL(url);
168
+ const hostType = isValidYouTubeHost(u.hostname.toLowerCase());
169
+ if (!hostType) return null;
170
+ if (hostType === "youtu.be") {
171
+ return extractYoutuBeId(u.pathname);
172
+ }
173
+ return extractYouTubeId(u.pathname, u.searchParams);
174
+ } catch {
175
+ return null;
176
+ }
177
+ };
178
+ var getYouTubeEmbedUrl = (videoId) => {
179
+ return `https://www.youtube-nocookie.com/embed/${videoId}?autoplay=0&rel=0&modestbranding=1`;
180
+ };
181
+
182
+ // src/components/Modal/Modal.tsx
183
+ import { jsx as jsx3, jsxs as jsxs2 } from "react/jsx-runtime";
184
+ var SIZE_CLASSES2 = {
185
+ xs: "max-w-[360px]",
186
+ sm: "max-w-[420px]",
187
+ md: "max-w-[510px]",
188
+ lg: "max-w-[640px]",
189
+ xl: "max-w-[970px]"
190
+ };
191
+ var Modal = ({
192
+ isOpen,
193
+ onClose,
194
+ title,
195
+ children,
196
+ size = "md",
197
+ className = "",
198
+ closeOnEscape = true,
199
+ footer,
200
+ hideCloseButton = false,
201
+ variant = "default",
202
+ description,
203
+ image,
204
+ imageAlt,
205
+ actionLink,
206
+ actionLabel
207
+ }) => {
208
+ const titleId = useId();
209
+ useEffect(() => {
210
+ if (!isOpen || !closeOnEscape) return;
211
+ const handleEscape = (event) => {
212
+ if (event.key === "Escape") {
213
+ onClose();
214
+ }
215
+ };
216
+ document.addEventListener("keydown", handleEscape);
217
+ return () => document.removeEventListener("keydown", handleEscape);
218
+ }, [isOpen, closeOnEscape, onClose]);
219
+ useEffect(() => {
220
+ const originalOverflow = document.body.style.overflow;
221
+ if (isOpen) {
222
+ document.body.style.overflow = "hidden";
223
+ } else {
224
+ document.body.style.overflow = originalOverflow;
225
+ }
226
+ return () => {
227
+ document.body.style.overflow = originalOverflow;
228
+ };
229
+ }, [isOpen]);
230
+ if (!isOpen) return null;
231
+ const sizeClasses = SIZE_CLASSES2[size];
232
+ const baseClasses = "bg-secondary-50 rounded-3xl shadow-hard-shadow-2 border border-border-100 w-full mx-4";
233
+ const dialogResetClasses = "p-0 m-0 border-none outline-none max-h-none static";
234
+ const modalClasses = cn(
235
+ baseClasses,
236
+ sizeClasses,
237
+ dialogResetClasses,
238
+ className
239
+ );
240
+ const normalizeUrl = (href) => /^https?:\/\//i.test(href) ? href : `https://${href}`;
241
+ const handleActionClick = () => {
242
+ if (actionLink) {
243
+ window.open(normalizeUrl(actionLink), "_blank", "noopener,noreferrer");
244
+ }
245
+ };
246
+ if (variant === "activity") {
247
+ return /* @__PURE__ */ jsx3("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__ */ jsxs2(
248
+ "dialog",
249
+ {
250
+ className: modalClasses,
251
+ "aria-labelledby": titleId,
252
+ "aria-modal": "true",
253
+ open: true,
254
+ children: [
255
+ /* @__PURE__ */ jsx3("div", { className: "flex justify-end p-6 pb-0", children: !hideCloseButton && /* @__PURE__ */ jsx3(
256
+ "button",
257
+ {
258
+ onClick: onClose,
259
+ 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",
260
+ "aria-label": "Fechar modal",
261
+ children: /* @__PURE__ */ jsx3(X, { size: 18 })
262
+ }
263
+ ) }),
264
+ /* @__PURE__ */ jsxs2("div", { className: "flex flex-col items-center px-6 pb-6 gap-5", children: [
265
+ image && /* @__PURE__ */ jsx3("div", { className: "flex justify-center", children: /* @__PURE__ */ jsx3(
266
+ "img",
267
+ {
268
+ src: image,
269
+ alt: imageAlt ?? "",
270
+ className: "w-[122px] h-[122px] object-contain"
271
+ }
272
+ ) }),
273
+ /* @__PURE__ */ jsx3(
274
+ "h2",
275
+ {
276
+ id: titleId,
277
+ className: "text-lg font-semibold text-text-950 text-center",
278
+ children: title
279
+ }
280
+ ),
281
+ description && /* @__PURE__ */ jsx3("p", { className: "text-sm font-normal text-text-400 text-center max-w-md leading-[21px]", children: description }),
282
+ actionLink && /* @__PURE__ */ jsxs2("div", { className: "w-full", children: [
283
+ (() => {
284
+ const normalized = normalizeUrl(actionLink);
285
+ const isYT = isYouTubeUrl(normalized);
286
+ if (!isYT) return null;
287
+ const id = getYouTubeVideoId(normalized);
288
+ if (!id) {
289
+ return /* @__PURE__ */ jsx3(
290
+ Button_default,
291
+ {
292
+ variant: "solid",
293
+ action: "primary",
294
+ size: "large",
295
+ className: "w-full",
296
+ onClick: handleActionClick,
297
+ children: actionLabel || "Iniciar Atividade"
298
+ }
299
+ );
300
+ }
301
+ return /* @__PURE__ */ jsx3(
302
+ "iframe",
303
+ {
304
+ src: getYouTubeEmbedUrl(id),
305
+ className: "w-full aspect-video rounded-lg",
306
+ allowFullScreen: true,
307
+ allow: "accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture",
308
+ title: "V\xEDdeo YouTube"
309
+ }
310
+ );
311
+ })(),
312
+ !isYouTubeUrl(normalizeUrl(actionLink)) && /* @__PURE__ */ jsx3(
313
+ Button_default,
314
+ {
315
+ variant: "solid",
316
+ action: "primary",
317
+ size: "large",
318
+ className: "w-full",
319
+ onClick: handleActionClick,
320
+ children: actionLabel || "Iniciar Atividade"
321
+ }
322
+ )
323
+ ] })
324
+ ] })
325
+ ]
326
+ }
327
+ ) });
328
+ }
329
+ return /* @__PURE__ */ jsx3("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__ */ jsxs2(
330
+ "dialog",
331
+ {
332
+ className: modalClasses,
333
+ "aria-labelledby": titleId,
334
+ "aria-modal": "true",
335
+ open: true,
336
+ children: [
337
+ /* @__PURE__ */ jsxs2("div", { className: "flex items-center justify-between px-6 py-6", children: [
338
+ /* @__PURE__ */ jsx3("h2", { id: titleId, className: "text-lg font-semibold text-text-950", children: title }),
339
+ !hideCloseButton && /* @__PURE__ */ jsx3(
340
+ "button",
341
+ {
342
+ onClick: onClose,
343
+ 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",
344
+ "aria-label": "Fechar modal",
345
+ children: /* @__PURE__ */ jsx3(X, { size: 18 })
346
+ }
347
+ )
348
+ ] }),
349
+ children && /* @__PURE__ */ jsx3("div", { className: "px-6 pb-6", children: /* @__PURE__ */ jsx3("div", { className: "text-text-500 font-normal text-sm leading-6", children }) }),
350
+ footer && /* @__PURE__ */ jsx3("div", { className: "flex justify-end gap-3 px-6 pb-6", children: footer })
351
+ ]
352
+ }
353
+ ) });
354
+ };
355
+ var Modal_default = Modal;
356
+
357
+ // src/components/ThemeToggle/ThemeToggle.tsx
358
+ import { Moon, Sun } from "phosphor-react";
359
+ import { useState as useState2, useEffect as useEffect3 } from "react";
360
+
361
+ // src/components/SelectionButton/SelectionButton.tsx
362
+ import { forwardRef } from "react";
363
+ import { jsx as jsx4, jsxs as jsxs3 } from "react/jsx-runtime";
364
+ var SelectionButton = forwardRef(
365
+ ({ icon, label, selected = false, className = "", disabled, ...props }, ref) => {
366
+ const baseClasses = [
367
+ "inline-flex",
368
+ "items-center",
369
+ "justify-start",
370
+ "gap-2",
371
+ "p-4",
372
+ "rounded-xl",
373
+ "cursor-pointer",
374
+ "border",
375
+ "border-border-50",
376
+ "bg-background",
377
+ "text-sm",
378
+ "text-text-700",
379
+ "font-bold",
380
+ "shadow-soft-shadow-1",
381
+ "hover:bg-background-100",
382
+ "focus-visible:outline-none",
383
+ "focus-visible:ring-2",
384
+ "focus-visible:ring-indicator-info",
385
+ "focus-visible:ring-offset-0",
386
+ "focus-visible:shadow-none",
387
+ "active:ring-2",
388
+ "active:ring-primary-950",
389
+ "active:ring-offset-0",
390
+ "active:shadow-none",
391
+ "disabled:opacity-50",
392
+ "disabled:cursor-not-allowed"
393
+ ];
394
+ const stateClasses = selected ? ["ring-primary-950", "ring-2", "ring-offset-0", "shadow-none"] : [];
395
+ const allClasses = [...baseClasses, ...stateClasses].join(" ");
396
+ return /* @__PURE__ */ jsxs3(
397
+ "button",
398
+ {
399
+ ref,
400
+ type: "button",
401
+ className: cn(allClasses, className),
402
+ disabled,
403
+ "aria-pressed": selected,
404
+ ...props,
405
+ children: [
406
+ /* @__PURE__ */ jsx4("span", { className: "flex items-center justify-center w-6 h-6", children: icon }),
407
+ /* @__PURE__ */ jsx4("span", { children: label })
408
+ ]
409
+ }
410
+ );
411
+ }
412
+ );
413
+ SelectionButton.displayName = "SelectionButton";
414
+ var SelectionButton_default = SelectionButton;
415
+
416
+ // src/hooks/useTheme.ts
417
+ import { useEffect as useEffect2, useState, useCallback, useRef } from "react";
418
+ var useTheme = () => {
419
+ const [themeMode, setThemeMode] = useState("system");
420
+ const [isDark, setIsDark] = useState(false);
421
+ const themeModeRef = useRef("system");
422
+ const applyTheme = useCallback((mode) => {
423
+ const htmlElement = document.documentElement;
424
+ const originalTheme = htmlElement.getAttribute("data-original-theme");
425
+ if (mode === "dark") {
426
+ htmlElement.setAttribute("data-theme", "dark");
427
+ setIsDark(true);
428
+ } else if (mode === "light") {
429
+ if (originalTheme) {
430
+ htmlElement.setAttribute("data-theme", originalTheme);
431
+ }
432
+ setIsDark(false);
433
+ } else if (mode === "system") {
434
+ const isSystemDark = window.matchMedia(
435
+ "(prefers-color-scheme: dark)"
436
+ ).matches;
437
+ if (isSystemDark) {
438
+ htmlElement.setAttribute("data-theme", "dark");
439
+ setIsDark(true);
440
+ } else if (originalTheme) {
441
+ htmlElement.setAttribute("data-theme", originalTheme);
442
+ setIsDark(false);
443
+ }
444
+ }
445
+ }, []);
446
+ const toggleTheme = useCallback(() => {
447
+ let newMode;
448
+ if (themeMode === "light") {
449
+ newMode = "dark";
450
+ } else if (themeMode === "dark") {
451
+ newMode = "light";
452
+ } else {
453
+ newMode = "dark";
454
+ }
455
+ setThemeMode(newMode);
456
+ themeModeRef.current = newMode;
457
+ applyTheme(newMode);
458
+ localStorage.setItem("theme-mode", newMode);
459
+ }, [themeMode, applyTheme]);
460
+ const setTheme = useCallback(
461
+ (mode) => {
462
+ setThemeMode(mode);
463
+ themeModeRef.current = mode;
464
+ applyTheme(mode);
465
+ localStorage.setItem("theme-mode", mode);
466
+ },
467
+ [applyTheme]
468
+ );
469
+ useEffect2(() => {
470
+ const htmlElement = document.documentElement;
471
+ const currentTheme = htmlElement.getAttribute("data-theme");
472
+ if (currentTheme && !htmlElement.getAttribute("data-original-theme")) {
473
+ htmlElement.setAttribute("data-original-theme", currentTheme);
474
+ }
475
+ const savedThemeMode = localStorage.getItem("theme-mode");
476
+ const initialMode = savedThemeMode || "system";
477
+ if (!savedThemeMode) {
478
+ localStorage.setItem("theme-mode", "system");
479
+ }
480
+ setThemeMode(initialMode);
481
+ themeModeRef.current = initialMode;
482
+ applyTheme(initialMode);
483
+ const mediaQuery = window.matchMedia("(prefers-color-scheme: dark)");
484
+ const handleSystemThemeChange = () => {
485
+ if (themeModeRef.current === "system") {
486
+ applyTheme("system");
487
+ }
488
+ };
489
+ mediaQuery.addEventListener("change", handleSystemThemeChange);
490
+ return () => {
491
+ mediaQuery.removeEventListener("change", handleSystemThemeChange);
492
+ };
493
+ }, [applyTheme]);
494
+ return {
495
+ themeMode,
496
+ isDark,
497
+ toggleTheme,
498
+ setTheme
499
+ };
500
+ };
501
+
502
+ // src/components/ThemeToggle/ThemeToggle.tsx
503
+ import { jsx as jsx5 } from "react/jsx-runtime";
504
+ var ThemeToggle = ({
505
+ variant = "default",
506
+ onToggle
507
+ }) => {
508
+ const { themeMode, setTheme } = useTheme();
509
+ const [tempTheme, setTempTheme] = useState2(themeMode);
510
+ useEffect3(() => {
511
+ setTempTheme(themeMode);
512
+ }, [themeMode]);
513
+ const problemTypes = [
514
+ {
515
+ id: "light",
516
+ title: "Claro",
517
+ icon: /* @__PURE__ */ jsx5(Sun, { size: 24 })
518
+ },
519
+ {
520
+ id: "dark",
521
+ title: "Escuro",
522
+ icon: /* @__PURE__ */ jsx5(Moon, { size: 24 })
523
+ },
524
+ {
525
+ id: "system",
526
+ title: "Sistema",
527
+ icon: /* @__PURE__ */ jsx5(
528
+ "svg",
529
+ {
530
+ width: "25",
531
+ height: "25",
532
+ viewBox: "0 0 25 25",
533
+ fill: "none",
534
+ xmlns: "http://www.w3.org/2000/svg",
535
+ children: /* @__PURE__ */ jsx5(
536
+ "path",
537
+ {
538
+ 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",
539
+ fill: "#525252"
540
+ }
541
+ )
542
+ }
543
+ )
544
+ }
545
+ ];
546
+ const handleThemeSelect = (selectedTheme) => {
547
+ if (variant === "with-save") {
548
+ setTempTheme(selectedTheme);
549
+ } else {
550
+ setTheme(selectedTheme);
551
+ }
552
+ if (onToggle) {
553
+ onToggle(selectedTheme);
554
+ }
555
+ };
556
+ const currentTheme = variant === "with-save" ? tempTheme : themeMode;
557
+ return /* @__PURE__ */ jsx5("div", { className: "flex flex-row gap-2 sm:gap-4 py-2", children: problemTypes.map((type) => /* @__PURE__ */ jsx5(
558
+ SelectionButton_default,
559
+ {
560
+ icon: type.icon,
561
+ label: type.title,
562
+ selected: currentTheme === type.id,
563
+ onClick: () => handleThemeSelect(type.id),
564
+ className: "w-full p-2 sm:p-4"
565
+ },
566
+ type.id
567
+ )) });
568
+ };
569
+
83
570
  // src/components/DropdownMenu/DropdownMenu.tsx
84
- import { jsx as jsx2, jsxs as jsxs2 } from "react/jsx-runtime";
571
+ import { Fragment, jsx as jsx6, jsxs as jsxs4 } from "react/jsx-runtime";
85
572
  function createDropdownStore() {
86
573
  return create((set) => ({
87
574
  open: false,
@@ -116,14 +603,14 @@ var DropdownMenu = ({
116
603
  open: propOpen,
117
604
  onOpenChange
118
605
  }) => {
119
- const storeRef = useRef(null);
606
+ const storeRef = useRef2(null);
120
607
  storeRef.current ??= createDropdownStore();
121
608
  const store = storeRef.current;
122
609
  const { open, setOpen: storeSetOpen } = useStore(store, (s) => s);
123
610
  const setOpen = (newOpen) => {
124
611
  storeSetOpen(newOpen);
125
612
  };
126
- const menuRef = useRef(null);
613
+ const menuRef = useRef2(null);
127
614
  const handleArrowDownOrArrowUp = (event) => {
128
615
  const menuContent = menuRef.current?.querySelector('[role="menu"]');
129
616
  if (menuContent) {
@@ -157,7 +644,7 @@ var DropdownMenu = ({
157
644
  setOpen(false);
158
645
  }
159
646
  };
160
- useEffect(() => {
647
+ useEffect4(() => {
161
648
  if (open) {
162
649
  document.addEventListener("mousedown", handleClickOutside);
163
650
  document.addEventListener("keydown", handleDownkey);
@@ -167,759 +654,565 @@ var DropdownMenu = ({
167
654
  document.removeEventListener("keydown", handleDownkey);
168
655
  };
169
656
  }, [open]);
170
- useEffect(() => {
657
+ useEffect4(() => {
171
658
  setOpen(open);
172
659
  onOpenChange?.(open);
173
660
  }, [open, onOpenChange]);
174
- useEffect(() => {
661
+ useEffect4(() => {
175
662
  if (propOpen) {
176
663
  setOpen(propOpen);
177
664
  }
178
665
  }, [propOpen]);
179
- return /* @__PURE__ */ jsx2("div", { className: "relative", ref: menuRef, children: injectStore(children, store) });
666
+ return /* @__PURE__ */ jsx6("div", { className: "relative", ref: menuRef, children: injectStore(children, store) });
180
667
  };
181
668
  var DropdownMenuTrigger = ({
182
669
  className,
183
- children,
184
- onClick,
185
- store: externalStore,
186
- ...props
187
- }) => {
188
- const store = useDropdownStore(externalStore);
189
- const open = useStore(store, (s) => s.open);
190
- const toggleOpen = () => store.setState({ open: !open });
191
- return /* @__PURE__ */ jsx2(
192
- "button",
193
- {
194
- onClick: (e) => {
195
- e.stopPropagation();
196
- toggleOpen();
197
- if (onClick) onClick(e);
198
- },
199
- "aria-expanded": open,
200
- className: cn(className),
201
- ...props,
202
- children
203
- }
204
- );
205
- };
206
- DropdownMenuTrigger.displayName = "DropdownMenuTrigger";
207
- var ITEM_SIZE_CLASSES = {
208
- small: "text-sm",
209
- medium: "text-md"
210
- };
211
- var SIDE_CLASSES = {
212
- top: "bottom-full",
213
- right: "top-full",
214
- bottom: "top-full",
215
- left: "top-full"
216
- };
217
- var ALIGN_CLASSES = {
218
- start: "left-0",
219
- center: "left-1/2 -translate-x-1/2",
220
- end: "right-0"
221
- };
222
- var MENUCONTENT_VARIANT_CLASSES = {
223
- menu: "p-1",
224
- profile: "p-6"
225
- };
226
- var MenuLabel = forwardRef(({ className, inset, store: _store, ...props }, ref) => {
227
- return /* @__PURE__ */ jsx2(
228
- "div",
229
- {
230
- ref,
231
- className: cn("text-sm w-full", inset ? "pl-8" : "", className),
232
- ...props
233
- }
234
- );
235
- });
236
- MenuLabel.displayName = "MenuLabel";
237
- var DropdownMenuContent = forwardRef(
238
- ({
239
- className,
240
- align = "start",
241
- side = "bottom",
242
- variant = "menu",
243
- sideOffset = 4,
244
- children,
245
- store: externalStore,
246
- ...props
247
- }, ref) => {
248
- const store = useDropdownStore(externalStore);
249
- const open = useStore(store, (s) => s.open);
250
- const [isVisible, setIsVisible] = useState(open);
251
- useEffect(() => {
252
- if (open) {
253
- setIsVisible(true);
254
- } else {
255
- const timer = setTimeout(() => setIsVisible(false), 200);
256
- return () => clearTimeout(timer);
257
- }
258
- }, [open]);
259
- if (!isVisible) return null;
260
- const getPositionClasses = () => {
261
- const vertical = SIDE_CLASSES[side];
262
- const horizontal = ALIGN_CLASSES[align];
263
- return `absolute ${vertical} ${horizontal}`;
264
- };
265
- const variantClasses = MENUCONTENT_VARIANT_CLASSES[variant];
266
- return /* @__PURE__ */ jsx2(
267
- "div",
268
- {
269
- ref,
270
- role: "menu",
271
- className: `
272
- bg-background z-50 min-w-[210px] overflow-hidden rounded-md border bg-popover text-popover-foreground shadow-md border-border-100
273
- ${open ? "animate-in fade-in-0 zoom-in-95" : "animate-out fade-out-0 zoom-out-95"}
274
- ${getPositionClasses()}
275
- ${variantClasses}
276
- ${className}
277
- `,
278
- style: {
279
- marginTop: side === "bottom" ? sideOffset : void 0,
280
- marginBottom: side === "top" ? sideOffset : void 0,
281
- marginLeft: side === "right" ? sideOffset : void 0,
282
- marginRight: side === "left" ? sideOffset : void 0
283
- },
284
- ...props,
285
- children
286
- }
287
- );
288
- }
289
- );
290
- DropdownMenuContent.displayName = "DropdownMenuContent";
291
- var DropdownMenuItem = forwardRef(
292
- ({
293
- className,
294
- size = "small",
295
- children,
296
- iconRight,
297
- iconLeft,
298
- disabled = false,
299
- onClick,
300
- variant = "menu",
301
- store: externalStore,
302
- ...props
303
- }, ref) => {
304
- const store = useDropdownStore(externalStore);
305
- const setOpen = useStore(store, (s) => s.setOpen);
306
- const sizeClasses = ITEM_SIZE_CLASSES[size];
307
- const handleClick = (e) => {
308
- if (disabled) {
309
- e.preventDefault();
310
- e.stopPropagation();
311
- return;
312
- }
313
- onClick?.(e);
314
- setOpen(false);
315
- };
316
- const getVariantClasses = () => {
317
- if (variant === "profile") {
318
- return "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";
319
- }
320
- return "relative flex select-none items-center gap-2 rounded-sm p-3 text-sm outline-none transition-colors [&>svg]:size-4 [&>svg]:shrink-0";
321
- };
322
- const getVariantProps = () => {
323
- return variant === "profile" ? { "data-variant": "profile" } : {};
324
- };
325
- return /* @__PURE__ */ jsxs2(
326
- "div",
327
- {
328
- ref,
329
- role: "menuitem",
330
- ...getVariantProps(),
331
- "aria-disabled": disabled,
332
- className: `
333
- focus-visible:bg-background-50
334
- ${getVariantClasses()}
335
- ${sizeClasses}
336
- ${className}
337
- ${disabled ? "cursor-not-allowed text-text-400" : "cursor-pointer hover:bg-background-50 text-text-700 focus:bg-accent focus:text-accent-foreground hover:bg-accent hover:text-accent-foreground"}
338
- `,
339
- onClick: handleClick,
340
- onKeyDown: (e) => {
341
- if (e.key === "Enter" || e.key === " ") handleClick(e);
342
- },
343
- tabIndex: disabled ? -1 : 0,
344
- ...props,
345
- children: [
346
- iconLeft,
347
- /* @__PURE__ */ jsx2("span", { className: "w-full text-md", children }),
348
- iconRight
349
- ]
350
- }
351
- );
352
- }
353
- );
354
- DropdownMenuItem.displayName = "DropdownMenuItem";
355
- var DropdownMenuSeparator = forwardRef(({ className, store: _store, ...props }, ref) => /* @__PURE__ */ jsx2(
356
- "div",
357
- {
358
- ref,
359
- className: cn("my-1 h-px bg-border-200", className),
360
- ...props
361
- }
362
- ));
363
- DropdownMenuSeparator.displayName = "DropdownMenuSeparator";
364
- var ProfileMenuTrigger = forwardRef(({ className, onClick, store: externalStore, ...props }, ref) => {
365
- const store = useDropdownStore(externalStore);
366
- const open = useStore(store, (s) => s.open);
367
- const toggleOpen = () => store.setState({ open: !open });
368
- return /* @__PURE__ */ jsx2(
369
- "button",
370
- {
371
- ref,
372
- className: cn(
373
- "rounded-lg size-10 bg-primary-50 flex items-center justify-center cursor-pointer",
374
- className
375
- ),
376
- onClick: (e) => {
377
- e.stopPropagation();
378
- toggleOpen();
379
- onClick?.(e);
380
- },
381
- "aria-expanded": open,
382
- ...props,
383
- children: /* @__PURE__ */ jsx2("span", { className: "size-6 rounded-full bg-primary-100 flex items-center justify-center", children: /* @__PURE__ */ jsx2(User, { className: "text-primary-950", size: 18 }) })
384
- }
385
- );
386
- });
387
- ProfileMenuTrigger.displayName = "ProfileMenuTrigger";
388
- var ProfileMenuHeader = forwardRef(({ className, name, email, store: _store, ...props }, ref) => {
389
- return /* @__PURE__ */ jsxs2(
390
- "div",
391
- {
392
- ref,
393
- "data-component": "ProfileMenuHeader",
394
- className: cn("flex flex-row gap-4 items-center", className),
395
- ...props,
396
- children: [
397
- /* @__PURE__ */ jsx2("span", { className: "size-16 bg-primary-100 rounded-full flex items-center justify-center", children: /* @__PURE__ */ jsx2(User, { size: 34, className: "text-primary-950" }) }),
398
- /* @__PURE__ */ jsxs2("div", { className: "flex flex-col ", children: [
399
- /* @__PURE__ */ jsx2("p", { className: "text-xl font-bold text-text-950", children: name }),
400
- /* @__PURE__ */ jsx2("p", { className: "text-md text-text-600", children: email })
401
- ] })
402
- ]
403
- }
404
- );
405
- });
406
- ProfileMenuHeader.displayName = "ProfileMenuHeader";
407
- var ProfileMenuSection = forwardRef(({ className, children, store: _store, ...props }, ref) => {
408
- return /* @__PURE__ */ jsx2("div", { ref, className: cn("flex flex-col p-2", className), ...props, children });
409
- });
410
- ProfileMenuSection.displayName = "ProfileMenuSection";
411
- var ProfileMenuFooter = ({
412
- className,
413
- disabled = false,
670
+ children,
414
671
  onClick,
415
672
  store: externalStore,
416
673
  ...props
417
674
  }) => {
418
675
  const store = useDropdownStore(externalStore);
419
- const setOpen = useStore(store, (s) => s.setOpen);
420
- return /* @__PURE__ */ jsxs2(
421
- Button_default,
676
+ const open = useStore(store, (s) => s.open);
677
+ const toggleOpen = () => store.setState({ open: !open });
678
+ return /* @__PURE__ */ jsx6(
679
+ "button",
422
680
  {
423
- variant: "outline",
424
- className: cn("w-full", className),
425
- disabled,
426
681
  onClick: (e) => {
427
- setOpen(false);
428
- onClick?.(e);
682
+ e.stopPropagation();
683
+ toggleOpen();
684
+ if (onClick) onClick(e);
429
685
  },
686
+ "aria-expanded": open,
687
+ className: cn(className),
430
688
  ...props,
431
- children: [
432
- /* @__PURE__ */ jsx2("span", { className: "mr-2 flex items-center", children: /* @__PURE__ */ jsx2(SignOut, {}) }),
433
- /* @__PURE__ */ jsx2("span", { children: "Sair" })
434
- ]
689
+ children
435
690
  }
436
691
  );
437
692
  };
438
- ProfileMenuFooter.displayName = "ProfileMenuFooter";
439
- var DropdownMenu_default = DropdownMenu;
440
-
441
- // src/components/Skeleton/Skeleton.tsx
442
- import { forwardRef as forwardRef2 } from "react";
443
- import { jsx as jsx3, jsxs as jsxs3 } from "react/jsx-runtime";
444
- var SKELETON_ANIMATION_CLASSES = {
445
- pulse: "animate-pulse",
446
- none: ""
693
+ DropdownMenuTrigger.displayName = "DropdownMenuTrigger";
694
+ var ITEM_SIZE_CLASSES = {
695
+ small: "text-sm",
696
+ medium: "text-md"
447
697
  };
448
- var SKELETON_VARIANT_CLASSES = {
449
- text: "h-4 bg-background-200 rounded",
450
- circular: "bg-background-200 rounded-full",
451
- rectangular: "bg-background-200",
452
- rounded: "bg-background-200 rounded-lg"
698
+ var SIDE_CLASSES = {
699
+ top: "bottom-full",
700
+ right: "top-full",
701
+ bottom: "top-full",
702
+ left: "top-full"
453
703
  };
454
- var SPACING_CLASSES = {
455
- none: "",
456
- small: "space-y-1",
457
- medium: "space-y-2",
458
- large: "space-y-3"
704
+ var ALIGN_CLASSES = {
705
+ start: "left-0",
706
+ center: "left-1/2 -translate-x-1/2",
707
+ end: "right-0"
708
+ };
709
+ var MENUCONTENT_VARIANT_CLASSES = {
710
+ menu: "p-1",
711
+ profile: "p-6"
459
712
  };
460
- var Skeleton = forwardRef2(
713
+ var MenuLabel = forwardRef2(({ className, inset, store: _store, ...props }, ref) => {
714
+ return /* @__PURE__ */ jsx6(
715
+ "div",
716
+ {
717
+ ref,
718
+ className: cn("text-sm w-full", inset ? "pl-8" : "", className),
719
+ ...props
720
+ }
721
+ );
722
+ });
723
+ MenuLabel.displayName = "MenuLabel";
724
+ var DropdownMenuContent = forwardRef2(
461
725
  ({
462
- variant = "text",
463
- width,
464
- height,
465
- animation = "pulse",
466
- lines = 1,
467
- spacing = "none",
468
- className = "",
726
+ className,
727
+ align = "start",
728
+ side = "bottom",
729
+ variant = "menu",
730
+ sideOffset = 4,
469
731
  children,
732
+ store: externalStore,
470
733
  ...props
471
734
  }, ref) => {
472
- const animationClass = SKELETON_ANIMATION_CLASSES[animation];
473
- const variantClass = SKELETON_VARIANT_CLASSES[variant];
474
- const spacingClass = SPACING_CLASSES[spacing];
475
- const style = {
476
- width: typeof width === "number" ? `${width}px` : width,
477
- height: typeof height === "number" ? `${height}px` : height
735
+ const store = useDropdownStore(externalStore);
736
+ const open = useStore(store, (s) => s.open);
737
+ const [isVisible, setIsVisible] = useState3(open);
738
+ useEffect4(() => {
739
+ if (open) {
740
+ setIsVisible(true);
741
+ } else {
742
+ const timer = setTimeout(() => setIsVisible(false), 200);
743
+ return () => clearTimeout(timer);
744
+ }
745
+ }, [open]);
746
+ if (!isVisible) return null;
747
+ const getPositionClasses = () => {
748
+ const vertical = SIDE_CLASSES[side];
749
+ const horizontal = ALIGN_CLASSES[align];
750
+ return `absolute ${vertical} ${horizontal}`;
478
751
  };
479
- if (variant === "text" && lines > 1) {
480
- return /* @__PURE__ */ jsx3(
481
- "div",
482
- {
483
- ref,
484
- className: cn("flex flex-col", spacingClass, className),
485
- ...props,
486
- children: Array.from({ length: lines }, (_, index) => /* @__PURE__ */ jsx3(
487
- "div",
488
- {
489
- className: cn(variantClass, animationClass),
490
- style: index === lines - 1 ? { width: "60%" } : void 0
491
- },
492
- index
493
- ))
494
- }
495
- );
496
- }
497
- return /* @__PURE__ */ jsx3(
752
+ const variantClasses = MENUCONTENT_VARIANT_CLASSES[variant];
753
+ return /* @__PURE__ */ jsx6(
498
754
  "div",
499
755
  {
500
756
  ref,
501
- className: cn(variantClass, animationClass, className),
502
- style,
757
+ role: "menu",
758
+ className: `
759
+ bg-background z-50 min-w-[210px] overflow-hidden rounded-md border bg-popover text-popover-foreground shadow-md border-border-100
760
+ ${open ? "animate-in fade-in-0 zoom-in-95" : "animate-out fade-out-0 zoom-out-95"}
761
+ ${getPositionClasses()}
762
+ ${variantClasses}
763
+ ${className}
764
+ `,
765
+ style: {
766
+ marginTop: side === "bottom" ? sideOffset : void 0,
767
+ marginBottom: side === "top" ? sideOffset : void 0,
768
+ marginLeft: side === "right" ? sideOffset : void 0,
769
+ marginRight: side === "left" ? sideOffset : void 0
770
+ },
503
771
  ...props,
504
772
  children
505
773
  }
506
774
  );
507
775
  }
508
776
  );
509
- var SkeletonText = forwardRef2(
510
- (props, ref) => /* @__PURE__ */ jsx3(Skeleton, { ref, variant: "text", ...props })
511
- );
512
- var SkeletonCircle = forwardRef2((props, ref) => /* @__PURE__ */ jsx3(Skeleton, { ref, variant: "circular", ...props }));
513
- var SkeletonRectangle = forwardRef2((props, ref) => /* @__PURE__ */ jsx3(Skeleton, { ref, variant: "rectangular", ...props }));
514
- var SkeletonRounded = forwardRef2((props, ref) => /* @__PURE__ */ jsx3(Skeleton, { ref, variant: "rounded", ...props }));
515
- var SkeletonCard = forwardRef2(
777
+ DropdownMenuContent.displayName = "DropdownMenuContent";
778
+ var DropdownMenuItem = forwardRef2(
516
779
  ({
517
- showAvatar = true,
518
- showTitle = true,
519
- showDescription = true,
520
- showActions = true,
521
- lines = 2,
522
- className = "",
780
+ className,
781
+ size = "small",
782
+ children,
783
+ iconRight,
784
+ iconLeft,
785
+ disabled = false,
786
+ onClick,
787
+ variant = "menu",
788
+ store: externalStore,
523
789
  ...props
524
790
  }, ref) => {
525
- return /* @__PURE__ */ jsxs3(
526
- "div",
527
- {
528
- ref,
529
- className: cn(
530
- "w-full p-4 bg-background border border-border-200 rounded-lg",
531
- className
532
- ),
533
- ...props,
534
- children: [
535
- /* @__PURE__ */ jsxs3("div", { className: "flex items-start space-x-3", children: [
536
- showAvatar && /* @__PURE__ */ jsx3(SkeletonCircle, { width: 40, height: 40 }),
537
- /* @__PURE__ */ jsxs3("div", { className: "flex-1 space-y-2", children: [
538
- showTitle && /* @__PURE__ */ jsx3(SkeletonText, { width: "60%", height: 20 }),
539
- showDescription && /* @__PURE__ */ jsx3(SkeletonText, { lines, spacing: "small" })
540
- ] })
541
- ] }),
542
- showActions && /* @__PURE__ */ jsxs3("div", { className: "flex justify-end space-x-2 mt-4", children: [
543
- /* @__PURE__ */ jsx3(SkeletonRectangle, { width: 80, height: 32 }),
544
- /* @__PURE__ */ jsx3(SkeletonRectangle, { width: 80, height: 32 })
545
- ] })
546
- ]
791
+ const store = useDropdownStore(externalStore);
792
+ const setOpen = useStore(store, (s) => s.setOpen);
793
+ const sizeClasses = ITEM_SIZE_CLASSES[size];
794
+ const handleClick = (e) => {
795
+ if (disabled) {
796
+ e.preventDefault();
797
+ e.stopPropagation();
798
+ return;
547
799
  }
548
- );
549
- }
550
- );
551
- var SkeletonList = forwardRef2(
552
- ({
553
- items = 3,
554
- showAvatar = true,
555
- showTitle = true,
556
- showDescription = true,
557
- lines = 1,
558
- className = "",
559
- ...props
560
- }, ref) => {
561
- return /* @__PURE__ */ jsx3("div", { ref, className: cn("space-y-3", className), ...props, children: Array.from({ length: items }, (_, index) => /* @__PURE__ */ jsxs3("div", { className: "flex items-start space-x-3 p-3", children: [
562
- showAvatar && /* @__PURE__ */ jsx3(SkeletonCircle, { width: 32, height: 32 }),
563
- /* @__PURE__ */ jsxs3("div", { className: "flex-1 space-y-2", children: [
564
- showTitle && /* @__PURE__ */ jsx3(SkeletonText, { width: "40%", height: 16 }),
565
- showDescription && /* @__PURE__ */ jsx3(SkeletonText, { lines, spacing: "small" })
566
- ] })
567
- ] }, index)) });
568
- }
569
- );
570
- var SkeletonTable = forwardRef2(
571
- ({ rows = 5, columns = 4, showHeader = true, className = "", ...props }, ref) => {
572
- return /* @__PURE__ */ jsxs3("div", { ref, className: cn("w-full", className), ...props, children: [
573
- showHeader && /* @__PURE__ */ jsx3("div", { className: "flex space-x-2 mb-3", children: Array.from({ length: columns }, (_, index) => /* @__PURE__ */ jsx3(
574
- SkeletonText,
575
- {
576
- width: `${100 / columns}%`,
577
- height: 20
578
- },
579
- index
580
- )) }),
581
- /* @__PURE__ */ jsx3("div", { className: "space-y-2", children: Array.from({ length: rows }, (_, rowIndex) => /* @__PURE__ */ jsx3("div", { className: "flex space-x-2", children: Array.from({ length: columns }, (_2, colIndex) => /* @__PURE__ */ jsx3(
582
- SkeletonText,
583
- {
584
- width: `${100 / columns}%`,
585
- height: 16
586
- },
587
- colIndex
588
- )) }, rowIndex)) })
589
- ] });
590
- }
591
- );
592
-
593
- // src/components/IconButton/IconButton.tsx
594
- import { forwardRef as forwardRef3 } from "react";
595
- import { jsx as jsx4 } from "react/jsx-runtime";
596
- var IconButton = forwardRef3(
597
- ({ icon, size = "md", active = false, className = "", disabled, ...props }, ref) => {
598
- const baseClasses = [
599
- "inline-flex",
600
- "items-center",
601
- "justify-center",
602
- "rounded-lg",
603
- "font-medium",
604
- "bg-transparent",
605
- "text-text-950",
606
- "cursor-pointer",
607
- "hover:bg-primary-600",
608
- "hover:text-text",
609
- "focus-visible:outline-none",
610
- "focus-visible:ring-2",
611
- "focus-visible:ring-offset-0",
612
- "focus-visible:ring-indicator-info",
613
- "disabled:opacity-50",
614
- "disabled:cursor-not-allowed",
615
- "disabled:pointer-events-none"
616
- ];
617
- const sizeClasses = {
618
- sm: ["w-6", "h-6", "text-sm"],
619
- md: ["w-10", "h-10", "text-base"]
800
+ onClick?.(e);
801
+ setOpen(false);
620
802
  };
621
- const activeClasses = active ? ["!bg-primary-50", "!text-primary-950", "hover:!bg-primary-100"] : [];
622
- const allClasses = [
623
- ...baseClasses,
624
- ...sizeClasses[size],
625
- ...activeClasses
626
- ].join(" ");
627
- const ariaLabel = props["aria-label"] ?? "Bot\xE3o de a\xE7\xE3o";
628
- return /* @__PURE__ */ jsx4(
629
- "button",
803
+ const getVariantClasses = () => {
804
+ if (variant === "profile") {
805
+ return "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";
806
+ }
807
+ return "relative flex select-none items-center gap-2 rounded-sm p-3 text-sm outline-none transition-colors [&>svg]:size-4 [&>svg]:shrink-0";
808
+ };
809
+ const getVariantProps = () => {
810
+ return variant === "profile" ? { "data-variant": "profile" } : {};
811
+ };
812
+ return /* @__PURE__ */ jsxs4(
813
+ "div",
630
814
  {
631
- ref,
632
- type: "button",
633
- className: cn(allClasses, className),
634
- disabled,
635
- "aria-pressed": active,
636
- "aria-label": ariaLabel,
815
+ ref,
816
+ role: "menuitem",
817
+ ...getVariantProps(),
818
+ "aria-disabled": disabled,
819
+ className: `
820
+ focus-visible:bg-background-50
821
+ ${getVariantClasses()}
822
+ ${sizeClasses}
823
+ ${className}
824
+ ${disabled ? "cursor-not-allowed text-text-400" : "cursor-pointer hover:bg-background-50 text-text-700 focus:bg-accent focus:text-accent-foreground hover:bg-accent hover:text-accent-foreground"}
825
+ `,
826
+ onClick: handleClick,
827
+ onKeyDown: (e) => {
828
+ if (e.key === "Enter" || e.key === " ") handleClick(e);
829
+ },
830
+ tabIndex: disabled ? -1 : 0,
637
831
  ...props,
638
- children: /* @__PURE__ */ jsx4("span", { className: "flex items-center justify-center", children: icon })
832
+ children: [
833
+ iconLeft,
834
+ /* @__PURE__ */ jsx6("div", { className: "w-full", children }),
835
+ iconRight
836
+ ]
639
837
  }
640
838
  );
641
839
  }
642
840
  );
643
- IconButton.displayName = "IconButton";
644
- var IconButton_default = IconButton;
645
-
646
- // src/components/Modal/Modal.tsx
647
- import { useEffect as useEffect2, useId } from "react";
648
- import { X } from "phosphor-react";
649
-
650
- // src/components/Modal/utils/videoUtils.ts
651
- var isYouTubeUrl = (url) => {
652
- const youtubeRegex = /^(https?:\/\/)?((www|m|music)\.)?(youtube\.com|youtu\.be|youtube-nocookie\.com)\/.+/i;
653
- return youtubeRegex.test(url);
654
- };
655
- var isValidYouTubeHost = (host) => {
656
- if (host === "youtu.be") return "youtu.be";
657
- const isValidYouTubeCom = host === "youtube.com" || host.endsWith(".youtube.com") && /^(www|m|music)\.youtube\.com$/.test(host);
658
- if (isValidYouTubeCom) return "youtube";
659
- const isValidNoCookie = host === "youtube-nocookie.com" || host.endsWith(".youtube-nocookie.com") && /^(www|m|music)\.youtube-nocookie\.com$/.test(host);
660
- if (isValidNoCookie) return "nocookie";
661
- return null;
662
- };
663
- var extractYoutuBeId = (pathname) => {
664
- const firstSeg = pathname.split("/").filter(Boolean)[0];
665
- return firstSeg || null;
666
- };
667
- var extractYouTubeId = (pathname, searchParams) => {
668
- const parts = pathname.split("/").filter(Boolean);
669
- const [first, second] = parts;
670
- if (first === "embed" && second) return second;
671
- if (first === "shorts" && second) return second;
672
- if (first === "live" && second) return second;
673
- const v = searchParams.get("v");
674
- if (v) return v;
675
- return null;
676
- };
677
- var getYouTubeVideoId = (url) => {
678
- try {
679
- const u = new URL(url);
680
- const hostType = isValidYouTubeHost(u.hostname.toLowerCase());
681
- if (!hostType) return null;
682
- if (hostType === "youtu.be") {
683
- return extractYoutuBeId(u.pathname);
684
- }
685
- return extractYouTubeId(u.pathname, u.searchParams);
686
- } catch {
687
- return null;
841
+ DropdownMenuItem.displayName = "DropdownMenuItem";
842
+ var DropdownMenuSeparator = forwardRef2(({ className, store: _store, ...props }, ref) => /* @__PURE__ */ jsx6(
843
+ "div",
844
+ {
845
+ ref,
846
+ className: cn("my-1 h-px bg-border-200", className),
847
+ ...props
688
848
  }
689
- };
690
- var getYouTubeEmbedUrl = (videoId) => {
691
- return `https://www.youtube-nocookie.com/embed/${videoId}?autoplay=0&rel=0&modestbranding=1`;
692
- };
693
-
694
- // src/components/Modal/Modal.tsx
695
- import { jsx as jsx5, jsxs as jsxs4 } from "react/jsx-runtime";
696
- var SIZE_CLASSES2 = {
697
- xs: "max-w-[360px]",
698
- sm: "max-w-[420px]",
699
- md: "max-w-[510px]",
700
- lg: "max-w-[640px]",
701
- xl: "max-w-[970px]"
702
- };
703
- var Modal = ({
704
- isOpen,
705
- onClose,
706
- title,
707
- children,
708
- size = "md",
709
- className = "",
710
- closeOnEscape = true,
711
- footer,
712
- hideCloseButton = false,
713
- variant = "default",
714
- description,
715
- image,
716
- imageAlt,
717
- actionLink,
718
- actionLabel
719
- }) => {
720
- const titleId = useId();
721
- useEffect2(() => {
722
- if (!isOpen || !closeOnEscape) return;
723
- const handleEscape = (event) => {
724
- if (event.key === "Escape") {
725
- onClose();
726
- }
727
- };
728
- document.addEventListener("keydown", handleEscape);
729
- return () => document.removeEventListener("keydown", handleEscape);
730
- }, [isOpen, closeOnEscape, onClose]);
731
- useEffect2(() => {
732
- const originalOverflow = document.body.style.overflow;
733
- if (isOpen) {
734
- document.body.style.overflow = "hidden";
735
- } else {
736
- document.body.style.overflow = originalOverflow;
849
+ ));
850
+ DropdownMenuSeparator.displayName = "DropdownMenuSeparator";
851
+ var ProfileMenuTrigger = forwardRef2(({ className, onClick, store: externalStore, ...props }, ref) => {
852
+ const store = useDropdownStore(externalStore);
853
+ const open = useStore(store, (s) => s.open);
854
+ const toggleOpen = () => store.setState({ open: !open });
855
+ return /* @__PURE__ */ jsx6(
856
+ "button",
857
+ {
858
+ ref,
859
+ className: cn(
860
+ "rounded-lg size-10 bg-primary-50 flex items-center justify-center cursor-pointer",
861
+ className
862
+ ),
863
+ onClick: (e) => {
864
+ e.stopPropagation();
865
+ toggleOpen();
866
+ onClick?.(e);
867
+ },
868
+ "aria-expanded": open,
869
+ ...props,
870
+ children: /* @__PURE__ */ jsx6("span", { className: "size-6 rounded-full bg-primary-100 flex items-center justify-center", children: /* @__PURE__ */ jsx6(User, { className: "text-primary-950", size: 18 }) })
737
871
  }
738
- return () => {
739
- document.body.style.overflow = originalOverflow;
740
- };
741
- }, [isOpen]);
742
- if (!isOpen) return null;
743
- const sizeClasses = SIZE_CLASSES2[size];
744
- const baseClasses = "bg-secondary-50 rounded-3xl shadow-hard-shadow-2 border border-border-100 w-full mx-4";
745
- const dialogResetClasses = "p-0 m-0 border-none outline-none max-h-none static";
746
- const modalClasses = cn(
747
- baseClasses,
748
- sizeClasses,
749
- dialogResetClasses,
750
- className
751
872
  );
752
- const normalizeUrl = (href) => /^https?:\/\//i.test(href) ? href : `https://${href}`;
753
- const handleActionClick = () => {
754
- if (actionLink) {
755
- window.open(normalizeUrl(actionLink), "_blank", "noopener,noreferrer");
873
+ });
874
+ ProfileMenuTrigger.displayName = "ProfileMenuTrigger";
875
+ var ProfileMenuHeader = forwardRef2(({ className, name, email, store: _store, ...props }, ref) => {
876
+ return /* @__PURE__ */ jsxs4(
877
+ "div",
878
+ {
879
+ ref,
880
+ "data-component": "ProfileMenuHeader",
881
+ className: cn("flex flex-row gap-4 items-center", className),
882
+ ...props,
883
+ children: [
884
+ /* @__PURE__ */ jsx6("span", { className: "size-16 bg-primary-100 rounded-full flex items-center justify-center", children: /* @__PURE__ */ jsx6(User, { size: 34, className: "text-primary-950" }) }),
885
+ /* @__PURE__ */ jsxs4("div", { className: "flex flex-col ", children: [
886
+ /* @__PURE__ */ jsx6(Text_default, { size: "xl", weight: "bold", color: "text-text-950", children: name }),
887
+ /* @__PURE__ */ jsx6(Text_default, { size: "md", color: "text-text-600", children: email })
888
+ ] })
889
+ ]
756
890
  }
891
+ );
892
+ });
893
+ ProfileMenuHeader.displayName = "ProfileMenuHeader";
894
+ var ProfileToggleTheme = ({ ...props }) => {
895
+ const { themeMode, setTheme } = useTheme();
896
+ const [modalThemeToggle, setModalThemeToggle] = useState3(false);
897
+ const [selectedTheme, setSelectedTheme] = useState3(themeMode);
898
+ const handleClick = (e) => {
899
+ e.preventDefault();
900
+ e.stopPropagation();
901
+ setModalThemeToggle(true);
757
902
  };
758
- if (variant === "activity") {
759
- return /* @__PURE__ */ jsx5("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__ */ jsxs4(
760
- "dialog",
903
+ const handleSave = () => {
904
+ setTheme(selectedTheme);
905
+ setModalThemeToggle(false);
906
+ };
907
+ return /* @__PURE__ */ jsxs4(Fragment, { children: [
908
+ /* @__PURE__ */ jsxs4(
909
+ "div",
761
910
  {
762
- className: modalClasses,
763
- "aria-labelledby": titleId,
764
- "aria-modal": "true",
765
- open: true,
911
+ role: "menuitem",
912
+ "data-variant": "profile",
913
+ 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",
914
+ onClick: handleClick,
915
+ onKeyDown: (e) => {
916
+ if (e.key === "Enter" || e.key === " ") {
917
+ e.preventDefault();
918
+ e.stopPropagation();
919
+ setModalThemeToggle(true);
920
+ }
921
+ },
922
+ tabIndex: 0,
923
+ ...props,
766
924
  children: [
767
- /* @__PURE__ */ jsx5("div", { className: "flex justify-end p-6 pb-0", children: !hideCloseButton && /* @__PURE__ */ jsx5(
768
- "button",
925
+ /* @__PURE__ */ jsx6(
926
+ "svg",
769
927
  {
770
- onClick: onClose,
771
- 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",
772
- "aria-label": "Fechar modal",
773
- children: /* @__PURE__ */ jsx5(X, { size: 18 })
774
- }
775
- ) }),
776
- /* @__PURE__ */ jsxs4("div", { className: "flex flex-col items-center px-6 pb-6 gap-5", children: [
777
- image && /* @__PURE__ */ jsx5("div", { className: "flex justify-center", children: /* @__PURE__ */ jsx5(
778
- "img",
779
- {
780
- src: image,
781
- alt: imageAlt ?? "",
782
- className: "w-[122px] h-[122px] object-contain"
783
- }
784
- ) }),
785
- /* @__PURE__ */ jsx5(
786
- "h2",
787
- {
788
- id: titleId,
789
- className: "text-lg font-semibold text-text-950 text-center",
790
- children: title
791
- }
792
- ),
793
- description && /* @__PURE__ */ jsx5("p", { className: "text-sm font-normal text-text-400 text-center max-w-md leading-[21px]", children: description }),
794
- actionLink && /* @__PURE__ */ jsxs4("div", { className: "w-full", children: [
795
- (() => {
796
- const normalized = normalizeUrl(actionLink);
797
- const isYT = isYouTubeUrl(normalized);
798
- if (!isYT) return null;
799
- const id = getYouTubeVideoId(normalized);
800
- if (!id) {
801
- return /* @__PURE__ */ jsx5(
802
- Button_default,
803
- {
804
- variant: "solid",
805
- action: "primary",
806
- size: "large",
807
- className: "w-full",
808
- onClick: handleActionClick,
809
- children: actionLabel || "Iniciar Atividade"
810
- }
811
- );
812
- }
813
- return /* @__PURE__ */ jsx5(
814
- "iframe",
815
- {
816
- src: getYouTubeEmbedUrl(id),
817
- className: "w-full aspect-video rounded-lg",
818
- allowFullScreen: true,
819
- allow: "accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture",
820
- title: "V\xEDdeo YouTube"
821
- }
822
- );
823
- })(),
824
- !isYouTubeUrl(normalizeUrl(actionLink)) && /* @__PURE__ */ jsx5(
825
- Button_default,
928
+ width: "25",
929
+ height: "25",
930
+ viewBox: "0 0 25 25",
931
+ fill: "none",
932
+ xmlns: "http://www.w3.org/2000/svg",
933
+ children: /* @__PURE__ */ jsx6(
934
+ "path",
826
935
  {
827
- variant: "solid",
828
- action: "primary",
829
- size: "large",
830
- className: "w-full",
831
- onClick: handleActionClick,
832
- children: actionLabel || "Iniciar Atividade"
936
+ 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",
937
+ fill: "#525252"
833
938
  }
834
939
  )
835
- ] })
836
- ] })
940
+ }
941
+ ),
942
+ /* @__PURE__ */ jsx6(Text_default, { className: "w-full", size: "md", children: "Apar\xEAncia" }),
943
+ /* @__PURE__ */ jsx6(CaretRight, {})
837
944
  ]
838
945
  }
839
- ) });
840
- }
841
- return /* @__PURE__ */ jsx5("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__ */ jsxs4(
842
- "dialog",
843
- {
844
- className: modalClasses,
845
- "aria-labelledby": titleId,
846
- "aria-modal": "true",
847
- open: true,
848
- children: [
849
- /* @__PURE__ */ jsxs4("div", { className: "flex items-center justify-between px-6 py-6", children: [
850
- /* @__PURE__ */ jsx5("h2", { id: titleId, className: "text-lg font-semibold text-text-950", children: title }),
851
- !hideCloseButton && /* @__PURE__ */ jsx5(
852
- "button",
853
- {
854
- onClick: onClose,
855
- 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",
856
- "aria-label": "Fechar modal",
857
- children: /* @__PURE__ */ jsx5(X, { size: 18 })
946
+ ),
947
+ /* @__PURE__ */ jsx6(
948
+ Modal_default,
949
+ {
950
+ isOpen: modalThemeToggle,
951
+ onClose: () => setModalThemeToggle(false),
952
+ title: "Apar\xEAncia",
953
+ size: "md",
954
+ footer: /* @__PURE__ */ jsxs4("div", { className: "flex gap-3", children: [
955
+ /* @__PURE__ */ jsx6(
956
+ Button_default,
957
+ {
958
+ variant: "outline",
959
+ onClick: () => setModalThemeToggle(false),
960
+ children: "Cancelar"
858
961
  }
859
- )
962
+ ),
963
+ /* @__PURE__ */ jsx6(Button_default, { variant: "solid", onClick: () => handleSave(), children: "Salvar" })
860
964
  ] }),
861
- children && /* @__PURE__ */ jsx5("div", { className: "px-6 pb-6", children: /* @__PURE__ */ jsx5("div", { className: "text-text-500 font-normal text-sm leading-6", children }) }),
862
- footer && /* @__PURE__ */ jsx5("div", { className: "flex justify-end gap-3 px-6 pb-6", children: footer })
863
- ]
864
- }
865
- ) });
965
+ children: /* @__PURE__ */ jsxs4("div", { className: "flex flex-col", children: [
966
+ /* @__PURE__ */ jsx6("p", { className: "text-sm text-text-500", children: "Escolha o tema:" }),
967
+ /* @__PURE__ */ jsx6(ThemeToggle, { variant: "with-save", onToggle: setSelectedTheme })
968
+ ] })
969
+ }
970
+ )
971
+ ] });
866
972
  };
867
- var Modal_default = Modal;
868
-
869
- // src/components/Text/Text.tsx
870
- import { jsx as jsx6 } from "react/jsx-runtime";
871
- var Text = ({
872
- children,
873
- size = "md",
874
- weight = "normal",
875
- color = "text-text-950",
876
- as,
877
- className = "",
973
+ ProfileToggleTheme.displayName = "ProfileToggleTheme";
974
+ var ProfileMenuSection = forwardRef2(({ className, children, store: _store, ...props }, ref) => {
975
+ return /* @__PURE__ */ jsx6("div", { ref, className: cn("flex flex-col p-2", className), ...props, children });
976
+ });
977
+ ProfileMenuSection.displayName = "ProfileMenuSection";
978
+ var ProfileMenuFooter = ({
979
+ className,
980
+ disabled = false,
981
+ onClick,
982
+ store: externalStore,
878
983
  ...props
879
984
  }) => {
880
- let sizeClasses = "";
881
- let weightClasses = "";
882
- const sizeClassMap = {
883
- "2xs": "text-2xs",
884
- xs: "text-xs",
885
- sm: "text-sm",
886
- md: "text-md",
887
- lg: "text-lg",
888
- xl: "text-xl",
889
- "2xl": "text-2xl",
890
- "3xl": "text-3xl",
891
- "4xl": "text-4xl",
892
- "5xl": "text-5xl",
893
- "6xl": "text-6xl"
894
- };
895
- sizeClasses = sizeClassMap[size] ?? sizeClassMap.md;
896
- const weightClassMap = {
897
- hairline: "font-hairline",
898
- light: "font-light",
899
- normal: "font-normal",
900
- medium: "font-medium",
901
- semibold: "font-semibold",
902
- bold: "font-bold",
903
- extrabold: "font-extrabold",
904
- black: "font-black"
905
- };
906
- weightClasses = weightClassMap[weight] ?? weightClassMap.normal;
907
- const baseClasses = "font-primary";
908
- const Component = as ?? "p";
909
- return /* @__PURE__ */ jsx6(
910
- Component,
985
+ const store = useDropdownStore(externalStore);
986
+ const setOpen = useStore(store, (s) => s.setOpen);
987
+ return /* @__PURE__ */ jsxs4(
988
+ Button_default,
911
989
  {
912
- className: cn(baseClasses, sizeClasses, weightClasses, color, className),
990
+ variant: "outline",
991
+ className: cn("w-full", className),
992
+ disabled,
993
+ onClick: (e) => {
994
+ setOpen(false);
995
+ onClick?.(e);
996
+ },
913
997
  ...props,
914
- children
998
+ children: [
999
+ /* @__PURE__ */ jsx6("span", { className: "mr-2 flex items-center", children: /* @__PURE__ */ jsx6(SignOut, {}) }),
1000
+ /* @__PURE__ */ jsx6(Text_default, { children: "Sair" })
1001
+ ]
915
1002
  }
916
1003
  );
917
1004
  };
918
- var Text_default = Text;
1005
+ ProfileMenuFooter.displayName = "ProfileMenuFooter";
1006
+ var DropdownMenu_default = DropdownMenu;
1007
+
1008
+ // src/components/Skeleton/Skeleton.tsx
1009
+ import { forwardRef as forwardRef3 } from "react";
1010
+ import { jsx as jsx7, jsxs as jsxs5 } from "react/jsx-runtime";
1011
+ var SKELETON_ANIMATION_CLASSES = {
1012
+ pulse: "animate-pulse",
1013
+ none: ""
1014
+ };
1015
+ var SKELETON_VARIANT_CLASSES = {
1016
+ text: "h-4 bg-background-200 rounded",
1017
+ circular: "bg-background-200 rounded-full",
1018
+ rectangular: "bg-background-200",
1019
+ rounded: "bg-background-200 rounded-lg"
1020
+ };
1021
+ var SPACING_CLASSES = {
1022
+ none: "",
1023
+ small: "space-y-1",
1024
+ medium: "space-y-2",
1025
+ large: "space-y-3"
1026
+ };
1027
+ var Skeleton = forwardRef3(
1028
+ ({
1029
+ variant = "text",
1030
+ width,
1031
+ height,
1032
+ animation = "pulse",
1033
+ lines = 1,
1034
+ spacing = "none",
1035
+ className = "",
1036
+ children,
1037
+ ...props
1038
+ }, ref) => {
1039
+ const animationClass = SKELETON_ANIMATION_CLASSES[animation];
1040
+ const variantClass = SKELETON_VARIANT_CLASSES[variant];
1041
+ const spacingClass = SPACING_CLASSES[spacing];
1042
+ const style = {
1043
+ width: typeof width === "number" ? `${width}px` : width,
1044
+ height: typeof height === "number" ? `${height}px` : height
1045
+ };
1046
+ if (variant === "text" && lines > 1) {
1047
+ return /* @__PURE__ */ jsx7(
1048
+ "div",
1049
+ {
1050
+ ref,
1051
+ className: cn("flex flex-col", spacingClass, className),
1052
+ ...props,
1053
+ children: Array.from({ length: lines }, (_, index) => /* @__PURE__ */ jsx7(
1054
+ "div",
1055
+ {
1056
+ className: cn(variantClass, animationClass),
1057
+ style: index === lines - 1 ? { width: "60%" } : void 0
1058
+ },
1059
+ index
1060
+ ))
1061
+ }
1062
+ );
1063
+ }
1064
+ return /* @__PURE__ */ jsx7(
1065
+ "div",
1066
+ {
1067
+ ref,
1068
+ className: cn(variantClass, animationClass, className),
1069
+ style,
1070
+ ...props,
1071
+ children
1072
+ }
1073
+ );
1074
+ }
1075
+ );
1076
+ var SkeletonText = forwardRef3(
1077
+ (props, ref) => /* @__PURE__ */ jsx7(Skeleton, { ref, variant: "text", ...props })
1078
+ );
1079
+ var SkeletonCircle = forwardRef3((props, ref) => /* @__PURE__ */ jsx7(Skeleton, { ref, variant: "circular", ...props }));
1080
+ var SkeletonRectangle = forwardRef3((props, ref) => /* @__PURE__ */ jsx7(Skeleton, { ref, variant: "rectangular", ...props }));
1081
+ var SkeletonRounded = forwardRef3((props, ref) => /* @__PURE__ */ jsx7(Skeleton, { ref, variant: "rounded", ...props }));
1082
+ var SkeletonCard = forwardRef3(
1083
+ ({
1084
+ showAvatar = true,
1085
+ showTitle = true,
1086
+ showDescription = true,
1087
+ showActions = true,
1088
+ lines = 2,
1089
+ className = "",
1090
+ ...props
1091
+ }, ref) => {
1092
+ return /* @__PURE__ */ jsxs5(
1093
+ "div",
1094
+ {
1095
+ ref,
1096
+ className: cn(
1097
+ "w-full p-4 bg-background border border-border-200 rounded-lg",
1098
+ className
1099
+ ),
1100
+ ...props,
1101
+ children: [
1102
+ /* @__PURE__ */ jsxs5("div", { className: "flex items-start space-x-3", children: [
1103
+ showAvatar && /* @__PURE__ */ jsx7(SkeletonCircle, { width: 40, height: 40 }),
1104
+ /* @__PURE__ */ jsxs5("div", { className: "flex-1 space-y-2", children: [
1105
+ showTitle && /* @__PURE__ */ jsx7(SkeletonText, { width: "60%", height: 20 }),
1106
+ showDescription && /* @__PURE__ */ jsx7(SkeletonText, { lines, spacing: "small" })
1107
+ ] })
1108
+ ] }),
1109
+ showActions && /* @__PURE__ */ jsxs5("div", { className: "flex justify-end space-x-2 mt-4", children: [
1110
+ /* @__PURE__ */ jsx7(SkeletonRectangle, { width: 80, height: 32 }),
1111
+ /* @__PURE__ */ jsx7(SkeletonRectangle, { width: 80, height: 32 })
1112
+ ] })
1113
+ ]
1114
+ }
1115
+ );
1116
+ }
1117
+ );
1118
+ var SkeletonList = forwardRef3(
1119
+ ({
1120
+ items = 3,
1121
+ showAvatar = true,
1122
+ showTitle = true,
1123
+ showDescription = true,
1124
+ lines = 1,
1125
+ className = "",
1126
+ ...props
1127
+ }, ref) => {
1128
+ return /* @__PURE__ */ jsx7("div", { ref, className: cn("space-y-3", className), ...props, children: Array.from({ length: items }, (_, index) => /* @__PURE__ */ jsxs5("div", { className: "flex items-start space-x-3 p-3", children: [
1129
+ showAvatar && /* @__PURE__ */ jsx7(SkeletonCircle, { width: 32, height: 32 }),
1130
+ /* @__PURE__ */ jsxs5("div", { className: "flex-1 space-y-2", children: [
1131
+ showTitle && /* @__PURE__ */ jsx7(SkeletonText, { width: "40%", height: 16 }),
1132
+ showDescription && /* @__PURE__ */ jsx7(SkeletonText, { lines, spacing: "small" })
1133
+ ] })
1134
+ ] }, index)) });
1135
+ }
1136
+ );
1137
+ var SkeletonTable = forwardRef3(
1138
+ ({ rows = 5, columns = 4, showHeader = true, className = "", ...props }, ref) => {
1139
+ return /* @__PURE__ */ jsxs5("div", { ref, className: cn("w-full", className), ...props, children: [
1140
+ showHeader && /* @__PURE__ */ jsx7("div", { className: "flex space-x-2 mb-3", children: Array.from({ length: columns }, (_, index) => /* @__PURE__ */ jsx7(
1141
+ SkeletonText,
1142
+ {
1143
+ width: `${100 / columns}%`,
1144
+ height: 20
1145
+ },
1146
+ index
1147
+ )) }),
1148
+ /* @__PURE__ */ jsx7("div", { className: "space-y-2", children: Array.from({ length: rows }, (_, rowIndex) => /* @__PURE__ */ jsx7("div", { className: "flex space-x-2", children: Array.from({ length: columns }, (_2, colIndex) => /* @__PURE__ */ jsx7(
1149
+ SkeletonText,
1150
+ {
1151
+ width: `${100 / columns}%`,
1152
+ height: 16
1153
+ },
1154
+ colIndex
1155
+ )) }, rowIndex)) })
1156
+ ] });
1157
+ }
1158
+ );
1159
+
1160
+ // src/components/IconButton/IconButton.tsx
1161
+ import { forwardRef as forwardRef4 } from "react";
1162
+ import { jsx as jsx8 } from "react/jsx-runtime";
1163
+ var IconButton = forwardRef4(
1164
+ ({ icon, size = "md", active = false, className = "", disabled, ...props }, ref) => {
1165
+ const baseClasses = [
1166
+ "inline-flex",
1167
+ "items-center",
1168
+ "justify-center",
1169
+ "rounded-lg",
1170
+ "font-medium",
1171
+ "bg-transparent",
1172
+ "text-text-950",
1173
+ "cursor-pointer",
1174
+ "hover:bg-primary-600",
1175
+ "hover:text-text",
1176
+ "focus-visible:outline-none",
1177
+ "focus-visible:ring-2",
1178
+ "focus-visible:ring-offset-0",
1179
+ "focus-visible:ring-indicator-info",
1180
+ "disabled:opacity-50",
1181
+ "disabled:cursor-not-allowed",
1182
+ "disabled:pointer-events-none"
1183
+ ];
1184
+ const sizeClasses = {
1185
+ sm: ["w-6", "h-6", "text-sm"],
1186
+ md: ["w-10", "h-10", "text-base"]
1187
+ };
1188
+ const activeClasses = active ? ["!bg-primary-50", "!text-primary-950", "hover:!bg-primary-100"] : [];
1189
+ const allClasses = [
1190
+ ...baseClasses,
1191
+ ...sizeClasses[size],
1192
+ ...activeClasses
1193
+ ].join(" ");
1194
+ const ariaLabel = props["aria-label"] ?? "Bot\xE3o de a\xE7\xE3o";
1195
+ return /* @__PURE__ */ jsx8(
1196
+ "button",
1197
+ {
1198
+ ref,
1199
+ type: "button",
1200
+ className: cn(allClasses, className),
1201
+ disabled,
1202
+ "aria-pressed": active,
1203
+ "aria-label": ariaLabel,
1204
+ ...props,
1205
+ children: /* @__PURE__ */ jsx8("span", { className: "flex items-center justify-center", children: icon })
1206
+ }
1207
+ );
1208
+ }
1209
+ );
1210
+ IconButton.displayName = "IconButton";
1211
+ var IconButton_default = IconButton;
919
1212
 
920
1213
  // src/components/Badge/Badge.tsx
921
1214
  import { Bell } from "phosphor-react";
922
- import { jsx as jsx7, jsxs as jsxs5 } from "react/jsx-runtime";
1215
+ import { jsx as jsx9, jsxs as jsxs6 } from "react/jsx-runtime";
923
1216
  var VARIANT_ACTION_CLASSES2 = {
924
1217
  solid: {
925
1218
  error: "bg-error-background text-error-700 focus-visible:outline-none",
@@ -981,14 +1274,14 @@ var Badge = ({
981
1274
  const baseClasses = "inline-flex items-center justify-center rounded-xs font-normal gap-1 relative";
982
1275
  const baseClassesIcon = "flex items-center";
983
1276
  if (variant === "notification") {
984
- return /* @__PURE__ */ jsxs5(
1277
+ return /* @__PURE__ */ jsxs6(
985
1278
  "div",
986
1279
  {
987
1280
  className: cn(baseClasses, variantClasses, sizeClasses, className),
988
1281
  ...props,
989
1282
  children: [
990
- /* @__PURE__ */ jsx7(Bell, { size: 24, className: "text-current", "aria-hidden": "true" }),
991
- notificationActive && /* @__PURE__ */ jsx7(
1283
+ /* @__PURE__ */ jsx9(Bell, { size: 24, className: "text-current", "aria-hidden": "true" }),
1284
+ notificationActive && /* @__PURE__ */ jsx9(
992
1285
  "span",
993
1286
  {
994
1287
  "data-testid": "notification-dot",
@@ -999,15 +1292,15 @@ var Badge = ({
999
1292
  }
1000
1293
  );
1001
1294
  }
1002
- return /* @__PURE__ */ jsxs5(
1295
+ return /* @__PURE__ */ jsxs6(
1003
1296
  "div",
1004
1297
  {
1005
1298
  className: cn(baseClasses, variantClasses, sizeClasses, className),
1006
1299
  ...props,
1007
1300
  children: [
1008
- iconLeft && /* @__PURE__ */ jsx7("span", { className: cn(baseClassesIcon, sizeClassesIcon), children: iconLeft }),
1301
+ iconLeft && /* @__PURE__ */ jsx9("span", { className: cn(baseClassesIcon, sizeClassesIcon), children: iconLeft }),
1009
1302
  children,
1010
- iconRight && /* @__PURE__ */ jsx7("span", { className: cn(baseClassesIcon, sizeClassesIcon), children: iconRight })
1303
+ iconRight && /* @__PURE__ */ jsx9("span", { className: cn(baseClassesIcon, sizeClassesIcon), children: iconRight })
1011
1304
  ]
1012
1305
  }
1013
1306
  );
@@ -1015,7 +1308,7 @@ var Badge = ({
1015
1308
  var Badge_default = Badge;
1016
1309
 
1017
1310
  // src/hooks/useMobile.ts
1018
- import { useState as useState2, useEffect as useEffect3 } from "react";
1311
+ import { useState as useState4, useEffect as useEffect5 } from "react";
1019
1312
  var MOBILE_WIDTH = 500;
1020
1313
  var TABLET_WIDTH = 931;
1021
1314
  var DEFAULT_WIDTH = 1200;
@@ -1030,9 +1323,9 @@ var getDeviceType = () => {
1030
1323
  return width < TABLET_WIDTH ? "responsive" : "desktop";
1031
1324
  };
1032
1325
  var useMobile = () => {
1033
- const [isMobile, setIsMobile] = useState2(false);
1034
- const [isTablet, setIsTablet] = useState2(false);
1035
- useEffect3(() => {
1326
+ const [isMobile, setIsMobile] = useState4(false);
1327
+ const [isTablet, setIsTablet] = useState4(false);
1328
+ useEffect5(() => {
1036
1329
  const checkScreenSize = () => {
1037
1330
  const width = getWindowWidth();
1038
1331
  setIsMobile(width < MOBILE_WIDTH);
@@ -1104,14 +1397,14 @@ var formatTimeAgo = (date) => {
1104
1397
  };
1105
1398
 
1106
1399
  // src/components/NotificationCard/NotificationCard.tsx
1107
- import { Fragment, jsx as jsx8, jsxs as jsxs6 } from "react/jsx-runtime";
1400
+ import { Fragment as Fragment2, jsx as jsx10, jsxs as jsxs7 } from "react/jsx-runtime";
1108
1401
  var NotificationEmpty = ({
1109
1402
  emptyStateImage,
1110
1403
  emptyStateTitle = "Nenhuma notifica\xE7\xE3o no momento",
1111
1404
  emptyStateDescription = "Voc\xEA est\xE1 em dia com todas as novidades. Volte depois para conferir atualiza\xE7\xF5es!"
1112
1405
  }) => {
1113
- return /* @__PURE__ */ jsxs6("div", { className: "flex flex-col items-center justify-center gap-4 p-6 w-full", children: [
1114
- emptyStateImage && /* @__PURE__ */ jsx8("div", { className: "w-20 h-20 flex items-center justify-center", children: /* @__PURE__ */ jsx8(
1406
+ return /* @__PURE__ */ jsxs7("div", { className: "flex flex-col items-center justify-center gap-4 p-6 w-full", children: [
1407
+ emptyStateImage && /* @__PURE__ */ jsx10("div", { className: "w-20 h-20 flex items-center justify-center", children: /* @__PURE__ */ jsx10(
1115
1408
  "img",
1116
1409
  {
1117
1410
  src: emptyStateImage,
@@ -1121,23 +1414,23 @@ var NotificationEmpty = ({
1121
1414
  className: "object-contain"
1122
1415
  }
1123
1416
  ) }),
1124
- /* @__PURE__ */ jsx8("h3", { className: "text-xl font-semibold text-text-950 text-center leading-[23px]", children: emptyStateTitle }),
1125
- /* @__PURE__ */ jsx8("p", { className: "text-sm font-normal text-text-400 text-center max-w-[316px] leading-[21px]", children: emptyStateDescription })
1417
+ /* @__PURE__ */ jsx10("h3", { className: "text-xl font-semibold text-text-950 text-center leading-[23px]", children: emptyStateTitle }),
1418
+ /* @__PURE__ */ jsx10("p", { className: "text-sm font-normal text-text-400 text-center max-w-[316px] leading-[21px]", children: emptyStateDescription })
1126
1419
  ] });
1127
1420
  };
1128
1421
  var NotificationHeader = ({
1129
1422
  unreadCount,
1130
1423
  variant = "modal"
1131
1424
  }) => {
1132
- return /* @__PURE__ */ jsxs6("div", { className: "flex items-center justify-between gap-2", children: [
1133
- variant === "modal" ? /* @__PURE__ */ jsx8(Text_default, { size: "sm", weight: "bold", className: "text-text-950", children: "Notifica\xE7\xF5es" }) : /* @__PURE__ */ jsx8("h3", { className: "text-sm font-semibold text-text-950", children: "Notifica\xE7\xF5es" }),
1134
- unreadCount > 0 && /* @__PURE__ */ jsx8(
1425
+ return /* @__PURE__ */ jsxs7("div", { className: "flex items-center justify-between gap-2", children: [
1426
+ variant === "modal" ? /* @__PURE__ */ jsx10(Text_default, { size: "sm", weight: "bold", className: "text-text-950", children: "Notifica\xE7\xF5es" }) : /* @__PURE__ */ jsx10("h3", { className: "text-sm font-semibold text-text-950", children: "Notifica\xE7\xF5es" }),
1427
+ unreadCount > 0 && /* @__PURE__ */ jsx10(
1135
1428
  Badge_default,
1136
1429
  {
1137
1430
  variant: "solid",
1138
1431
  action: "info",
1139
1432
  size: "small",
1140
- iconLeft: /* @__PURE__ */ jsx8(Bell2, { size: 12, "aria-hidden": "true", focusable: "false" }),
1433
+ iconLeft: /* @__PURE__ */ jsx10(Bell2, { size: 12, "aria-hidden": "true", focusable: "false" }),
1141
1434
  className: "border-0",
1142
1435
  children: unreadCount === 1 ? "1 n\xE3o lida" : `${unreadCount} n\xE3o lidas`
1143
1436
  }
@@ -1173,7 +1466,7 @@ var SingleNotificationCard = ({
1173
1466
  onNavigate();
1174
1467
  }
1175
1468
  };
1176
- return /* @__PURE__ */ jsxs6(
1469
+ return /* @__PURE__ */ jsxs7(
1177
1470
  "div",
1178
1471
  {
1179
1472
  className: cn(
@@ -1182,20 +1475,20 @@ var SingleNotificationCard = ({
1182
1475
  className
1183
1476
  ),
1184
1477
  children: [
1185
- /* @__PURE__ */ jsxs6("div", { className: "flex items-center gap-2 w-full", children: [
1186
- !isRead && /* @__PURE__ */ jsx8("div", { className: "w-[7px] h-[7px] bg-info-300 rounded-full flex-shrink-0" }),
1187
- /* @__PURE__ */ jsx8("h3", { className: "font-bold text-sm leading-4 text-text-950 flex-grow", children: title }),
1188
- /* @__PURE__ */ jsxs6(DropdownMenu_default, { children: [
1189
- /* @__PURE__ */ jsx8(
1478
+ /* @__PURE__ */ jsxs7("div", { className: "flex items-center gap-2 w-full", children: [
1479
+ !isRead && /* @__PURE__ */ jsx10("div", { className: "w-[7px] h-[7px] bg-info-300 rounded-full flex-shrink-0" }),
1480
+ /* @__PURE__ */ jsx10("h3", { className: "font-bold text-sm leading-4 text-text-950 flex-grow", children: title }),
1481
+ /* @__PURE__ */ jsxs7(DropdownMenu_default, { children: [
1482
+ /* @__PURE__ */ jsx10(
1190
1483
  DropdownMenuTrigger,
1191
1484
  {
1192
1485
  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",
1193
1486
  "aria-label": "Menu de a\xE7\xF5es",
1194
- children: /* @__PURE__ */ jsx8(DotsThreeVertical, { size: 24 })
1487
+ children: /* @__PURE__ */ jsx10(DotsThreeVertical, { size: 24 })
1195
1488
  }
1196
1489
  ),
1197
- /* @__PURE__ */ jsxs6(DropdownMenuContent, { align: "end", className: "min-w-[160px]", children: [
1198
- !isRead && /* @__PURE__ */ jsx8(
1490
+ /* @__PURE__ */ jsxs7(DropdownMenuContent, { align: "end", className: "min-w-[160px]", children: [
1491
+ !isRead && /* @__PURE__ */ jsx10(
1199
1492
  DropdownMenuItem,
1200
1493
  {
1201
1494
  onClick: handleMarkAsRead,
@@ -1203,14 +1496,14 @@ var SingleNotificationCard = ({
1203
1496
  children: "Marcar como lida"
1204
1497
  }
1205
1498
  ),
1206
- /* @__PURE__ */ jsx8(DropdownMenuItem, { onClick: handleDelete, className: "text-error-600", children: "Deletar" })
1499
+ /* @__PURE__ */ jsx10(DropdownMenuItem, { onClick: handleDelete, className: "text-error-600", children: "Deletar" })
1207
1500
  ] })
1208
1501
  ] })
1209
1502
  ] }),
1210
- /* @__PURE__ */ jsx8("p", { className: "text-sm leading-[21px] text-text-800 w-full", children: message }),
1211
- /* @__PURE__ */ jsxs6("div", { className: "flex items-center justify-between w-full", children: [
1212
- /* @__PURE__ */ jsx8("span", { className: "text-sm font-medium text-text-400", children: time }),
1213
- onNavigate && actionLabel && /* @__PURE__ */ jsx8(
1503
+ /* @__PURE__ */ jsx10("p", { className: "text-sm leading-[21px] text-text-800 w-full", children: message }),
1504
+ /* @__PURE__ */ jsxs7("div", { className: "flex items-center justify-between w-full", children: [
1505
+ /* @__PURE__ */ jsx10("span", { className: "text-sm font-medium text-text-400", children: time }),
1506
+ onNavigate && actionLabel && /* @__PURE__ */ jsx10(
1214
1507
  "button",
1215
1508
  {
1216
1509
  type: "button",
@@ -1237,9 +1530,9 @@ var NotificationList = ({
1237
1530
  className
1238
1531
  }) => {
1239
1532
  if (error) {
1240
- return /* @__PURE__ */ jsxs6("div", { className: "flex flex-col items-center gap-4 p-6 w-full", children: [
1241
- /* @__PURE__ */ jsx8("p", { className: "text-sm text-error-600", children: error }),
1242
- onRetry && /* @__PURE__ */ jsx8(
1533
+ return /* @__PURE__ */ jsxs7("div", { className: "flex flex-col items-center gap-4 p-6 w-full", children: [
1534
+ /* @__PURE__ */ jsx10("p", { className: "text-sm text-error-600", children: error }),
1535
+ onRetry && /* @__PURE__ */ jsx10(
1243
1536
  "button",
1244
1537
  {
1245
1538
  type: "button",
@@ -1251,8 +1544,8 @@ var NotificationList = ({
1251
1544
  ] });
1252
1545
  }
1253
1546
  if (loading) {
1254
- return /* @__PURE__ */ jsx8("div", { className: "flex flex-col gap-0 w-full", children: ["skeleton-first", "skeleton-second", "skeleton-third"].map(
1255
- (skeletonId) => /* @__PURE__ */ jsx8(
1547
+ return /* @__PURE__ */ jsx10("div", { className: "flex flex-col gap-0 w-full", children: ["skeleton-first", "skeleton-second", "skeleton-third"].map(
1548
+ (skeletonId) => /* @__PURE__ */ jsx10(
1256
1549
  SkeletonCard,
1257
1550
  {
1258
1551
  className: "p-4 border-b border-border-200"
@@ -1262,11 +1555,11 @@ var NotificationList = ({
1262
1555
  ) });
1263
1556
  }
1264
1557
  if (!groupedNotifications || groupedNotifications.length === 0) {
1265
- return renderEmpty ? /* @__PURE__ */ jsx8("div", { className: "w-full", children: renderEmpty() }) : /* @__PURE__ */ jsx8(NotificationEmpty, {});
1558
+ return renderEmpty ? /* @__PURE__ */ jsx10("div", { className: "w-full", children: renderEmpty() }) : /* @__PURE__ */ jsx10(NotificationEmpty, {});
1266
1559
  }
1267
- return /* @__PURE__ */ jsx8("div", { className: cn("flex flex-col gap-0 w-full", className), children: groupedNotifications.map((group, idx) => /* @__PURE__ */ jsxs6("div", { className: "flex flex-col", children: [
1268
- /* @__PURE__ */ jsx8("div", { className: "flex items-end px-4 py-6 pb-4", children: /* @__PURE__ */ jsx8("h4", { className: "text-lg font-bold text-text-500 flex-grow", children: group.label }) }),
1269
- group.notifications.map((notification) => /* @__PURE__ */ jsx8(
1560
+ return /* @__PURE__ */ jsx10("div", { className: cn("flex flex-col gap-0 w-full", className), children: groupedNotifications.map((group, idx) => /* @__PURE__ */ jsxs7("div", { className: "flex flex-col", children: [
1561
+ /* @__PURE__ */ jsx10("div", { className: "flex items-end px-4 py-6 pb-4", children: /* @__PURE__ */ jsx10("h4", { className: "text-lg font-bold text-text-500 flex-grow", children: group.label }) }),
1562
+ group.notifications.map((notification) => /* @__PURE__ */ jsx10(
1270
1563
  SingleNotificationCard,
1271
1564
  {
1272
1565
  title: notification.title,
@@ -1307,7 +1600,7 @@ var NotificationCenter = ({
1307
1600
  className
1308
1601
  }) => {
1309
1602
  const { isMobile } = useMobile();
1310
- const [isModalOpen, setIsModalOpen] = useState3(false);
1603
+ const [isModalOpen, setIsModalOpen] = useState5(false);
1311
1604
  const handleMobileClick = () => {
1312
1605
  setIsModalOpen(true);
1313
1606
  onFetchNotifications?.();
@@ -1315,7 +1608,7 @@ var NotificationCenter = ({
1315
1608
  const handleDesktopClick = () => {
1316
1609
  onToggleActive?.();
1317
1610
  };
1318
- useEffect4(() => {
1611
+ useEffect6(() => {
1319
1612
  if (isActive) {
1320
1613
  onFetchNotifications?.();
1321
1614
  }
@@ -1324,7 +1617,7 @@ var NotificationCenter = ({
1324
1617
  onCleanup?.();
1325
1618
  onNavigateById?.(entityType, entityId);
1326
1619
  };
1327
- const renderEmptyState = () => /* @__PURE__ */ jsx8(
1620
+ const renderEmptyState = () => /* @__PURE__ */ jsx10(
1328
1621
  NotificationEmpty,
1329
1622
  {
1330
1623
  emptyStateImage,
@@ -1333,17 +1626,17 @@ var NotificationCenter = ({
1333
1626
  }
1334
1627
  );
1335
1628
  if (isMobile) {
1336
- return /* @__PURE__ */ jsxs6(Fragment, { children: [
1337
- /* @__PURE__ */ jsx8(
1629
+ return /* @__PURE__ */ jsxs7(Fragment2, { children: [
1630
+ /* @__PURE__ */ jsx10(
1338
1631
  IconButton_default,
1339
1632
  {
1340
1633
  active: isModalOpen,
1341
1634
  onClick: handleMobileClick,
1342
- icon: /* @__PURE__ */ jsx8(Bell2, { size: 24, className: "text-primary" }),
1635
+ icon: /* @__PURE__ */ jsx10(Bell2, { size: 24, className: "text-primary" }),
1343
1636
  className
1344
1637
  }
1345
1638
  ),
1346
- /* @__PURE__ */ jsx8(
1639
+ /* @__PURE__ */ jsx10(
1347
1640
  Modal_default,
1348
1641
  {
1349
1642
  isOpen: isModalOpen,
@@ -1352,10 +1645,10 @@ var NotificationCenter = ({
1352
1645
  size: "md",
1353
1646
  hideCloseButton: false,
1354
1647
  closeOnEscape: true,
1355
- children: /* @__PURE__ */ jsxs6("div", { className: "flex flex-col h-full max-h-[80vh]", children: [
1356
- /* @__PURE__ */ jsxs6("div", { className: "px-0 pb-3 border-b border-border-200", children: [
1357
- /* @__PURE__ */ jsx8(NotificationHeader, { unreadCount, variant: "modal" }),
1358
- unreadCount > 0 && onMarkAllAsRead && /* @__PURE__ */ jsx8(
1648
+ children: /* @__PURE__ */ jsxs7("div", { className: "flex flex-col h-full max-h-[80vh]", children: [
1649
+ /* @__PURE__ */ jsxs7("div", { className: "px-0 pb-3 border-b border-border-200", children: [
1650
+ /* @__PURE__ */ jsx10(NotificationHeader, { unreadCount, variant: "modal" }),
1651
+ unreadCount > 0 && onMarkAllAsRead && /* @__PURE__ */ jsx10(
1359
1652
  "button",
1360
1653
  {
1361
1654
  type: "button",
@@ -1365,7 +1658,7 @@ var NotificationCenter = ({
1365
1658
  }
1366
1659
  )
1367
1660
  ] }),
1368
- /* @__PURE__ */ jsx8("div", { className: "flex-1 overflow-y-auto", children: /* @__PURE__ */ jsx8(
1661
+ /* @__PURE__ */ jsx10("div", { className: "flex-1 overflow-y-auto", children: /* @__PURE__ */ jsx10(
1369
1662
  NotificationList,
1370
1663
  {
1371
1664
  groupedNotifications,
@@ -1388,13 +1681,13 @@ var NotificationCenter = ({
1388
1681
  )
1389
1682
  ] });
1390
1683
  }
1391
- return /* @__PURE__ */ jsxs6(DropdownMenu_default, { children: [
1392
- /* @__PURE__ */ jsx8(DropdownMenuTrigger, { className: "text-primary cursor-pointer", children: /* @__PURE__ */ jsx8(
1684
+ return /* @__PURE__ */ jsxs7(DropdownMenu_default, { children: [
1685
+ /* @__PURE__ */ jsx10(DropdownMenuTrigger, { className: "text-primary cursor-pointer", children: /* @__PURE__ */ jsx10(
1393
1686
  IconButton_default,
1394
1687
  {
1395
1688
  active: isActive,
1396
1689
  onClick: handleDesktopClick,
1397
- icon: /* @__PURE__ */ jsx8(
1690
+ icon: /* @__PURE__ */ jsx10(
1398
1691
  Bell2,
1399
1692
  {
1400
1693
  size: 24,
@@ -1404,16 +1697,16 @@ var NotificationCenter = ({
1404
1697
  className
1405
1698
  }
1406
1699
  ) }),
1407
- /* @__PURE__ */ jsx8(
1700
+ /* @__PURE__ */ jsx10(
1408
1701
  DropdownMenuContent,
1409
1702
  {
1410
1703
  className: "min-w-[320px] max-w-[400px] max-h-[500px] overflow-hidden",
1411
1704
  side: "bottom",
1412
1705
  align: "end",
1413
- children: /* @__PURE__ */ jsxs6("div", { className: "flex flex-col", children: [
1414
- /* @__PURE__ */ jsxs6("div", { className: "px-4 py-3 border-b border-border-200", children: [
1415
- /* @__PURE__ */ jsx8(NotificationHeader, { unreadCount, variant: "dropdown" }),
1416
- unreadCount > 0 && onMarkAllAsRead && /* @__PURE__ */ jsx8(
1706
+ children: /* @__PURE__ */ jsxs7("div", { className: "flex flex-col", children: [
1707
+ /* @__PURE__ */ jsxs7("div", { className: "px-4 py-3 border-b border-border-200", children: [
1708
+ /* @__PURE__ */ jsx10(NotificationHeader, { unreadCount, variant: "dropdown" }),
1709
+ unreadCount > 0 && onMarkAllAsRead && /* @__PURE__ */ jsx10(
1417
1710
  "button",
1418
1711
  {
1419
1712
  type: "button",
@@ -1423,7 +1716,7 @@ var NotificationCenter = ({
1423
1716
  }
1424
1717
  )
1425
1718
  ] }),
1426
- /* @__PURE__ */ jsx8("div", { className: "max-h-[350px] overflow-y-auto", children: /* @__PURE__ */ jsx8(
1719
+ /* @__PURE__ */ jsx10("div", { className: "max-h-[350px] overflow-y-auto", children: /* @__PURE__ */ jsx10(
1427
1720
  NotificationList,
1428
1721
  {
1429
1722
  groupedNotifications,
@@ -1445,7 +1738,7 @@ var NotificationCenter = ({
1445
1738
  var NotificationCard = (props) => {
1446
1739
  switch (props.mode) {
1447
1740
  case "single":
1448
- return /* @__PURE__ */ jsx8(
1741
+ return /* @__PURE__ */ jsx10(
1449
1742
  SingleNotificationCard,
1450
1743
  {
1451
1744
  title: props.title,
@@ -1460,7 +1753,7 @@ var NotificationCard = (props) => {
1460
1753
  }
1461
1754
  );
1462
1755
  case "list":
1463
- return /* @__PURE__ */ jsx8(
1756
+ return /* @__PURE__ */ jsx10(
1464
1757
  NotificationList,
1465
1758
  {
1466
1759
  groupedNotifications: props.groupedNotifications ?? (props.notifications ? [
@@ -1481,9 +1774,9 @@ var NotificationCard = (props) => {
1481
1774
  }
1482
1775
  );
1483
1776
  case "center":
1484
- return /* @__PURE__ */ jsx8(NotificationCenter, { ...props });
1777
+ return /* @__PURE__ */ jsx10(NotificationCenter, { ...props });
1485
1778
  default:
1486
- return /* @__PURE__ */ jsx8("div", { className: "flex flex-col items-center gap-4 p-6 w-full", children: /* @__PURE__ */ jsx8("p", { className: "text-sm text-text-600", children: "Modo de notifica\xE7\xE3o n\xE3o reconhecido" }) });
1779
+ return /* @__PURE__ */ jsx10("div", { className: "flex flex-col items-center gap-4 p-6 w-full", children: /* @__PURE__ */ jsx10("p", { className: "text-sm text-text-600", children: "Modo de notifica\xE7\xE3o n\xE3o reconhecido" }) });
1487
1780
  }
1488
1781
  };
1489
1782
  var LegacyNotificationCard = (props) => {
@@ -1492,10 +1785,10 @@ var LegacyNotificationCard = (props) => {
1492
1785
  mode: "center",
1493
1786
  ...props
1494
1787
  };
1495
- return /* @__PURE__ */ jsx8(NotificationCenter, { ...centerProps });
1788
+ return /* @__PURE__ */ jsx10(NotificationCenter, { ...centerProps });
1496
1789
  }
1497
1790
  if (props.groupedNotifications !== void 0 || props.notifications !== void 0 || props.loading || props.error) {
1498
- return /* @__PURE__ */ jsx8(
1791
+ return /* @__PURE__ */ jsx10(
1499
1792
  NotificationList,
1500
1793
  {
1501
1794
  groupedNotifications: props.groupedNotifications ?? (props.notifications ? [
@@ -1532,7 +1825,7 @@ var LegacyNotificationCard = (props) => {
1532
1825
  emptyStateTitle: props.emptyStateTitle,
1533
1826
  emptyStateDescription: props.emptyStateDescription
1534
1827
  };
1535
- return /* @__PURE__ */ jsx8(
1828
+ return /* @__PURE__ */ jsx10(
1536
1829
  SingleNotificationCard,
1537
1830
  {
1538
1831
  title: singleProps.title,
@@ -1547,7 +1840,7 @@ var LegacyNotificationCard = (props) => {
1547
1840
  }
1548
1841
  );
1549
1842
  }
1550
- return /* @__PURE__ */ jsx8("div", { className: "flex flex-col items-center gap-4 p-6 w-full", children: /* @__PURE__ */ jsx8("p", { className: "text-sm text-text-600", children: "Nenhuma notifica\xE7\xE3o configurada" }) });
1843
+ return /* @__PURE__ */ jsx10("div", { className: "flex flex-col items-center gap-4 p-6 w-full", children: /* @__PURE__ */ jsx10("p", { className: "text-sm text-text-600", children: "Nenhuma notifica\xE7\xE3o configurada" }) });
1551
1844
  };
1552
1845
  var NotificationCard_default = NotificationCard;
1553
1846
  export {