analytica-frontend-lib 1.1.59 → 1.1.61

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.mjs CHANGED
@@ -6531,82 +6531,82 @@ import {
6531
6531
  import { jsx as jsx39 } from "react/jsx-runtime";
6532
6532
  var SubjectInfo = {
6533
6533
  ["F\xEDsica" /* FISICA */]: {
6534
- icon: /* @__PURE__ */ jsx39(Atom, { size: 17 }),
6534
+ icon: /* @__PURE__ */ jsx39(Atom, { size: 17, color: "currentColor" }),
6535
6535
  colorClass: "bg-subject-1",
6536
6536
  name: "F\xEDsica" /* FISICA */
6537
6537
  },
6538
6538
  ["Hist\xF3ria" /* HISTORIA */]: {
6539
- icon: /* @__PURE__ */ jsx39(Scroll, { size: 17 }),
6539
+ icon: /* @__PURE__ */ jsx39(Scroll, { size: 17, color: "currentColor" }),
6540
6540
  colorClass: "bg-subject-2",
6541
6541
  name: "Hist\xF3ria" /* HISTORIA */
6542
6542
  },
6543
6543
  ["Literatura" /* LITERATURA */]: {
6544
- icon: /* @__PURE__ */ jsx39(BookOpenText, { size: 17, color: "#000000" }),
6544
+ icon: /* @__PURE__ */ jsx39(BookOpenText, { size: 17, color: "currentColor" }),
6545
6545
  colorClass: "bg-subject-3",
6546
6546
  name: "Literatura" /* LITERATURA */
6547
6547
  },
6548
6548
  ["Geografia" /* GEOGRAFIA */]: {
6549
- icon: /* @__PURE__ */ jsx39(GlobeHemisphereWest, { size: 17 }),
6549
+ icon: /* @__PURE__ */ jsx39(GlobeHemisphereWest, { size: 17, color: "currentColor" }),
6550
6550
  colorClass: "bg-subject-4",
6551
6551
  name: "Geografia" /* GEOGRAFIA */
6552
6552
  },
6553
6553
  ["Biologia" /* BIOLOGIA */]: {
6554
- icon: /* @__PURE__ */ jsx39(Microscope, { size: 17, color: "#000000" }),
6554
+ icon: /* @__PURE__ */ jsx39(Microscope, { size: 17, color: "currentColor" }),
6555
6555
  colorClass: "bg-subject-5",
6556
6556
  name: "Biologia" /* BIOLOGIA */
6557
6557
  },
6558
6558
  ["Portugu\xEAs" /* PORTUGUES */]: {
6559
- icon: /* @__PURE__ */ jsx39(ChatPT2, { size: 17, color: "#000000" }),
6559
+ icon: /* @__PURE__ */ jsx39(ChatPT2, { size: 17, color: "currentColor" }),
6560
6560
  colorClass: "bg-subject-6",
6561
6561
  name: "Portugu\xEAs" /* PORTUGUES */
6562
6562
  },
6563
6563
  ["Qu\xEDmica" /* QUIMICA */]: {
6564
- icon: /* @__PURE__ */ jsx39(Flask, { size: 17 }),
6564
+ icon: /* @__PURE__ */ jsx39(Flask, { size: 17, color: "currentColor" }),
6565
6565
  colorClass: "bg-subject-7",
6566
6566
  name: "Qu\xEDmica" /* QUIMICA */
6567
6567
  },
6568
6568
  ["Artes" /* ARTES */]: {
6569
- icon: /* @__PURE__ */ jsx39(Palette, { size: 17 }),
6569
+ icon: /* @__PURE__ */ jsx39(Palette, { size: 17, color: "currentColor" }),
6570
6570
  colorClass: "bg-subject-8",
6571
6571
  name: "Artes" /* ARTES */
6572
6572
  },
6573
6573
  ["Matem\xE1tica" /* MATEMATICA */]: {
6574
- icon: /* @__PURE__ */ jsx39(MathOperations, { size: 17 }),
6574
+ icon: /* @__PURE__ */ jsx39(MathOperations, { size: 17, color: "currentColor" }),
6575
6575
  colorClass: "bg-subject-9",
6576
6576
  name: "Matem\xE1tica" /* MATEMATICA */
6577
6577
  },
6578
6578
  ["Filosofia" /* FILOSOFIA */]: {
6579
- icon: /* @__PURE__ */ jsx39(HeadCircuit, { size: 17, color: "#000000" }),
6579
+ icon: /* @__PURE__ */ jsx39(HeadCircuit, { size: 17, color: "currentColor" }),
6580
6580
  colorClass: "bg-subject-10",
6581
6581
  name: "Filosofia" /* FILOSOFIA */
6582
6582
  },
6583
6583
  ["Espanhol" /* ESPANHOL */]: {
6584
- icon: /* @__PURE__ */ jsx39(ChatES2, { size: 17, color: "#000000" }),
6584
+ icon: /* @__PURE__ */ jsx39(ChatES2, { size: 17, color: "currentColor" }),
6585
6585
  colorClass: "bg-subject-11",
6586
6586
  name: "Espanhol" /* ESPANHOL */
6587
6587
  },
6588
6588
  ["Reda\xE7\xE3o" /* REDACAO */]: {
6589
- icon: /* @__PURE__ */ jsx39(ArticleNyTimes, { size: 17 }),
6589
+ icon: /* @__PURE__ */ jsx39(ArticleNyTimes, { size: 17, color: "currentColor" }),
6590
6590
  colorClass: "bg-subject-12",
6591
6591
  name: "Reda\xE7\xE3o" /* REDACAO */
6592
6592
  },
6593
6593
  ["Sociologia" /* SOCIOLOGIA */]: {
6594
- icon: /* @__PURE__ */ jsx39(Person, { size: 17 }),
6594
+ icon: /* @__PURE__ */ jsx39(Person, { size: 17, color: "currentColor" }),
6595
6595
  colorClass: "bg-subject-13",
6596
6596
  name: "Sociologia" /* SOCIOLOGIA */
6597
6597
  },
6598
6598
  ["Ingl\xEAs" /* INGLES */]: {
6599
- icon: /* @__PURE__ */ jsx39(ChatEN2, { size: 17, color: "#000000" }),
6599
+ icon: /* @__PURE__ */ jsx39(ChatEN2, { size: 17, color: "currentColor" }),
6600
6600
  colorClass: "bg-subject-14",
6601
6601
  name: "Ingl\xEAs" /* INGLES */
6602
6602
  },
6603
6603
  ["Ed. F\xEDsica" /* EDUCACAO_FISICA */]: {
6604
- icon: /* @__PURE__ */ jsx39(DribbbleLogo, { size: 17 }),
6604
+ icon: /* @__PURE__ */ jsx39(DribbbleLogo, { size: 17, color: "currentColor" }),
6605
6605
  colorClass: "bg-subject-15",
6606
6606
  name: "Ed. F\xEDsica" /* EDUCACAO_FISICA */
6607
6607
  },
6608
6608
  ["Trilhas" /* TRILHAS */]: {
6609
- icon: /* @__PURE__ */ jsx39(BookBookmark, { size: 17 }),
6609
+ icon: /* @__PURE__ */ jsx39(BookBookmark, { size: 17, color: "currentColor" }),
6610
6610
  colorClass: "bg-subject-16",
6611
6611
  name: "Trilhas" /* TRILHAS */
6612
6612
  }
@@ -11479,6 +11479,7 @@ var NotificationCenter = ({
11479
11479
  getActionLabel,
11480
11480
  onFetchNotifications,
11481
11481
  onMarkAllAsRead,
11482
+ onOpenChange,
11482
11483
  emptyStateImage,
11483
11484
  emptyStateTitle,
11484
11485
  emptyStateDescription,
@@ -11494,6 +11495,13 @@ var NotificationCenter = ({
11494
11495
  const handleDesktopClick = () => {
11495
11496
  onToggleActive?.();
11496
11497
  };
11498
+ const handleOpenChange = (open) => {
11499
+ const controlledByParent = typeof isActive === "boolean" && typeof onToggleActive === "function";
11500
+ onOpenChange?.(open);
11501
+ if (controlledByParent && !onOpenChange && !open && isActive) {
11502
+ onToggleActive?.();
11503
+ }
11504
+ };
11497
11505
  useEffect19(() => {
11498
11506
  if (isActive) {
11499
11507
  onFetchNotifications?.();
@@ -11571,72 +11579,78 @@ var NotificationCenter = ({
11571
11579
  ] });
11572
11580
  }
11573
11581
  return /* @__PURE__ */ jsxs37(Fragment11, { children: [
11574
- /* @__PURE__ */ jsxs37(DropdownMenu_default, { children: [
11575
- /* @__PURE__ */ jsx49(DropdownMenuTrigger, { className: "text-primary cursor-pointer", children: /* @__PURE__ */ jsx49(
11576
- IconButton_default,
11577
- {
11578
- active: isActive,
11579
- onClick: handleDesktopClick,
11580
- icon: /* @__PURE__ */ jsx49(
11581
- Bell2,
11582
+ /* @__PURE__ */ jsxs37(
11583
+ DropdownMenu_default,
11584
+ {
11585
+ ...typeof isActive === "boolean" ? { open: isActive, onOpenChange: handleOpenChange } : { onOpenChange: handleOpenChange },
11586
+ children: [
11587
+ /* @__PURE__ */ jsx49(DropdownMenuTrigger, { className: "text-primary cursor-pointer", children: /* @__PURE__ */ jsx49(
11588
+ IconButton_default,
11582
11589
  {
11583
- size: 24,
11584
- className: isActive ? "text-primary-950" : "text-primary"
11585
- }
11586
- ),
11587
- className
11588
- }
11589
- ) }),
11590
- /* @__PURE__ */ jsx49(
11591
- DropdownMenuContent,
11592
- {
11593
- className: "min-w-[320px] max-w-[400px] max-h-[500px] overflow-hidden",
11594
- side: "bottom",
11595
- align: "end",
11596
- children: /* @__PURE__ */ jsxs37("div", { className: "flex flex-col", children: [
11597
- /* @__PURE__ */ jsxs37("div", { className: "px-4 py-3 border-b border-border-200", children: [
11598
- /* @__PURE__ */ jsx49(
11599
- NotificationHeader,
11590
+ active: isActive,
11591
+ onClick: handleDesktopClick,
11592
+ icon: /* @__PURE__ */ jsx49(
11593
+ Bell2,
11600
11594
  {
11601
- unreadCount,
11602
- variant: "dropdown"
11595
+ size: 24,
11596
+ className: isActive ? "text-primary-950" : "text-primary"
11603
11597
  }
11604
11598
  ),
11605
- unreadCount > 0 && onMarkAllAsRead && /* @__PURE__ */ jsx49(
11606
- "button",
11607
- {
11608
- type: "button",
11609
- onClick: onMarkAllAsRead,
11610
- className: "text-sm font-medium text-info-600 hover:text-info-700 cursor-pointer mt-2",
11611
- children: "Marcar todas como lidas"
11612
- }
11613
- )
11614
- ] }),
11615
- /* @__PURE__ */ jsx49("div", { className: "max-h-[350px] overflow-y-auto", children: /* @__PURE__ */ jsx49(
11616
- NotificationList,
11617
- {
11618
- groupedNotifications,
11619
- loading,
11620
- error,
11621
- onRetry,
11622
- onMarkAsReadById,
11623
- onDeleteById,
11624
- onNavigateById,
11625
- onGlobalNotificationClick: (notification) => {
11626
- setGlobalNotificationModal({
11627
- isOpen: true,
11628
- notification
11629
- });
11630
- },
11631
- getActionLabel,
11632
- renderEmpty: renderEmptyState,
11633
- emptyStateImage
11634
- }
11635
- ) })
11636
- ] })
11637
- }
11638
- )
11639
- ] }),
11599
+ className
11600
+ }
11601
+ ) }),
11602
+ /* @__PURE__ */ jsx49(
11603
+ DropdownMenuContent,
11604
+ {
11605
+ className: "min-w-[320px] max-w-[400px] max-h-[500px] overflow-hidden",
11606
+ side: "bottom",
11607
+ align: "end",
11608
+ children: /* @__PURE__ */ jsxs37("div", { className: "flex flex-col", children: [
11609
+ /* @__PURE__ */ jsxs37("div", { className: "px-4 py-3 border-b border-border-200", children: [
11610
+ /* @__PURE__ */ jsx49(
11611
+ NotificationHeader,
11612
+ {
11613
+ unreadCount,
11614
+ variant: "dropdown"
11615
+ }
11616
+ ),
11617
+ unreadCount > 0 && onMarkAllAsRead && /* @__PURE__ */ jsx49(
11618
+ "button",
11619
+ {
11620
+ type: "button",
11621
+ onClick: onMarkAllAsRead,
11622
+ className: "text-sm font-medium text-info-600 hover:text-info-700 cursor-pointer mt-2",
11623
+ children: "Marcar todas como lidas"
11624
+ }
11625
+ )
11626
+ ] }),
11627
+ /* @__PURE__ */ jsx49("div", { className: "max-h-[350px] overflow-y-auto", children: /* @__PURE__ */ jsx49(
11628
+ NotificationList,
11629
+ {
11630
+ groupedNotifications,
11631
+ loading,
11632
+ error,
11633
+ onRetry,
11634
+ onMarkAsReadById,
11635
+ onDeleteById,
11636
+ onNavigateById,
11637
+ onGlobalNotificationClick: (notification) => {
11638
+ setGlobalNotificationModal({
11639
+ isOpen: true,
11640
+ notification
11641
+ });
11642
+ },
11643
+ getActionLabel,
11644
+ renderEmpty: renderEmptyState,
11645
+ emptyStateImage
11646
+ }
11647
+ ) })
11648
+ ] })
11649
+ }
11650
+ )
11651
+ ]
11652
+ }
11653
+ ),
11640
11654
  /* @__PURE__ */ jsx49(
11641
11655
  Modal_default,
11642
11656
  {
@@ -11746,7 +11760,7 @@ var createUseNotifications = (apiClient) => {
11746
11760
  );
11747
11761
  const getActionLabel = useCallback6(
11748
11762
  (entityType) => {
11749
- if (!entityType) return void 0;
11763
+ if (!entityType) return "Ver mais";
11750
11764
  switch (entityType.toUpperCase()) {
11751
11765
  case "ACTIVITY" /* ACTIVITY */:
11752
11766
  return "Ver atividade";