analytica-frontend-lib 1.1.60 → 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.js CHANGED
@@ -6610,82 +6610,82 @@ var import_phosphor_react17 = require("phosphor-react");
6610
6610
  var import_jsx_runtime39 = require("react/jsx-runtime");
6611
6611
  var SubjectInfo = {
6612
6612
  ["F\xEDsica" /* FISICA */]: {
6613
- icon: /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(import_phosphor_react17.Atom, { size: 17 }),
6613
+ icon: /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(import_phosphor_react17.Atom, { size: 17, color: "currentColor" }),
6614
6614
  colorClass: "bg-subject-1",
6615
6615
  name: "F\xEDsica" /* FISICA */
6616
6616
  },
6617
6617
  ["Hist\xF3ria" /* HISTORIA */]: {
6618
- icon: /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(import_phosphor_react17.Scroll, { size: 17 }),
6618
+ icon: /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(import_phosphor_react17.Scroll, { size: 17, color: "currentColor" }),
6619
6619
  colorClass: "bg-subject-2",
6620
6620
  name: "Hist\xF3ria" /* HISTORIA */
6621
6621
  },
6622
6622
  ["Literatura" /* LITERATURA */]: {
6623
- icon: /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(BookOpenText, { size: 17, color: "#000000" }),
6623
+ icon: /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(BookOpenText, { size: 17, color: "currentColor" }),
6624
6624
  colorClass: "bg-subject-3",
6625
6625
  name: "Literatura" /* LITERATURA */
6626
6626
  },
6627
6627
  ["Geografia" /* GEOGRAFIA */]: {
6628
- icon: /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(import_phosphor_react17.GlobeHemisphereWest, { size: 17 }),
6628
+ icon: /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(import_phosphor_react17.GlobeHemisphereWest, { size: 17, color: "currentColor" }),
6629
6629
  colorClass: "bg-subject-4",
6630
6630
  name: "Geografia" /* GEOGRAFIA */
6631
6631
  },
6632
6632
  ["Biologia" /* BIOLOGIA */]: {
6633
- icon: /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(Microscope, { size: 17, color: "#000000" }),
6633
+ icon: /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(Microscope, { size: 17, color: "currentColor" }),
6634
6634
  colorClass: "bg-subject-5",
6635
6635
  name: "Biologia" /* BIOLOGIA */
6636
6636
  },
6637
6637
  ["Portugu\xEAs" /* PORTUGUES */]: {
6638
- icon: /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(ChatPT2, { size: 17, color: "#000000" }),
6638
+ icon: /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(ChatPT2, { size: 17, color: "currentColor" }),
6639
6639
  colorClass: "bg-subject-6",
6640
6640
  name: "Portugu\xEAs" /* PORTUGUES */
6641
6641
  },
6642
6642
  ["Qu\xEDmica" /* QUIMICA */]: {
6643
- icon: /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(import_phosphor_react17.Flask, { size: 17 }),
6643
+ icon: /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(import_phosphor_react17.Flask, { size: 17, color: "currentColor" }),
6644
6644
  colorClass: "bg-subject-7",
6645
6645
  name: "Qu\xEDmica" /* QUIMICA */
6646
6646
  },
6647
6647
  ["Artes" /* ARTES */]: {
6648
- icon: /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(import_phosphor_react17.Palette, { size: 17 }),
6648
+ icon: /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(import_phosphor_react17.Palette, { size: 17, color: "currentColor" }),
6649
6649
  colorClass: "bg-subject-8",
6650
6650
  name: "Artes" /* ARTES */
6651
6651
  },
6652
6652
  ["Matem\xE1tica" /* MATEMATICA */]: {
6653
- icon: /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(import_phosphor_react17.MathOperations, { size: 17 }),
6653
+ icon: /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(import_phosphor_react17.MathOperations, { size: 17, color: "currentColor" }),
6654
6654
  colorClass: "bg-subject-9",
6655
6655
  name: "Matem\xE1tica" /* MATEMATICA */
6656
6656
  },
6657
6657
  ["Filosofia" /* FILOSOFIA */]: {
6658
- icon: /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(HeadCircuit, { size: 17, color: "#000000" }),
6658
+ icon: /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(HeadCircuit, { size: 17, color: "currentColor" }),
6659
6659
  colorClass: "bg-subject-10",
6660
6660
  name: "Filosofia" /* FILOSOFIA */
6661
6661
  },
6662
6662
  ["Espanhol" /* ESPANHOL */]: {
6663
- icon: /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(ChatES2, { size: 17, color: "#000000" }),
6663
+ icon: /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(ChatES2, { size: 17, color: "currentColor" }),
6664
6664
  colorClass: "bg-subject-11",
6665
6665
  name: "Espanhol" /* ESPANHOL */
6666
6666
  },
6667
6667
  ["Reda\xE7\xE3o" /* REDACAO */]: {
6668
- icon: /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(import_phosphor_react17.ArticleNyTimes, { size: 17 }),
6668
+ icon: /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(import_phosphor_react17.ArticleNyTimes, { size: 17, color: "currentColor" }),
6669
6669
  colorClass: "bg-subject-12",
6670
6670
  name: "Reda\xE7\xE3o" /* REDACAO */
6671
6671
  },
6672
6672
  ["Sociologia" /* SOCIOLOGIA */]: {
6673
- icon: /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(import_phosphor_react17.Person, { size: 17 }),
6673
+ icon: /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(import_phosphor_react17.Person, { size: 17, color: "currentColor" }),
6674
6674
  colorClass: "bg-subject-13",
6675
6675
  name: "Sociologia" /* SOCIOLOGIA */
6676
6676
  },
6677
6677
  ["Ingl\xEAs" /* INGLES */]: {
6678
- icon: /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(ChatEN2, { size: 17, color: "#000000" }),
6678
+ icon: /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(ChatEN2, { size: 17, color: "currentColor" }),
6679
6679
  colorClass: "bg-subject-14",
6680
6680
  name: "Ingl\xEAs" /* INGLES */
6681
6681
  },
6682
6682
  ["Ed. F\xEDsica" /* EDUCACAO_FISICA */]: {
6683
- icon: /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(import_phosphor_react17.DribbbleLogo, { size: 17 }),
6683
+ icon: /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(import_phosphor_react17.DribbbleLogo, { size: 17, color: "currentColor" }),
6684
6684
  colorClass: "bg-subject-15",
6685
6685
  name: "Ed. F\xEDsica" /* EDUCACAO_FISICA */
6686
6686
  },
6687
6687
  ["Trilhas" /* TRILHAS */]: {
6688
- icon: /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(import_phosphor_react17.BookBookmark, { size: 17 }),
6688
+ icon: /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(import_phosphor_react17.BookBookmark, { size: 17, color: "currentColor" }),
6689
6689
  colorClass: "bg-subject-16",
6690
6690
  name: "Trilhas" /* TRILHAS */
6691
6691
  }
@@ -11505,6 +11505,7 @@ var NotificationCenter = ({
11505
11505
  getActionLabel,
11506
11506
  onFetchNotifications,
11507
11507
  onMarkAllAsRead,
11508
+ onOpenChange,
11508
11509
  emptyStateImage,
11509
11510
  emptyStateTitle,
11510
11511
  emptyStateDescription,
@@ -11520,6 +11521,13 @@ var NotificationCenter = ({
11520
11521
  const handleDesktopClick = () => {
11521
11522
  onToggleActive?.();
11522
11523
  };
11524
+ const handleOpenChange = (open) => {
11525
+ const controlledByParent = typeof isActive === "boolean" && typeof onToggleActive === "function";
11526
+ onOpenChange?.(open);
11527
+ if (controlledByParent && !onOpenChange && !open && isActive) {
11528
+ onToggleActive?.();
11529
+ }
11530
+ };
11523
11531
  (0, import_react32.useEffect)(() => {
11524
11532
  if (isActive) {
11525
11533
  onFetchNotifications?.();
@@ -11597,72 +11605,78 @@ var NotificationCenter = ({
11597
11605
  ] });
11598
11606
  }
11599
11607
  return /* @__PURE__ */ (0, import_jsx_runtime49.jsxs)(import_jsx_runtime49.Fragment, { children: [
11600
- /* @__PURE__ */ (0, import_jsx_runtime49.jsxs)(DropdownMenu_default, { children: [
11601
- /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(DropdownMenuTrigger, { className: "text-primary cursor-pointer", children: /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
11602
- IconButton_default,
11603
- {
11604
- active: isActive,
11605
- onClick: handleDesktopClick,
11606
- icon: /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
11607
- import_phosphor_react23.Bell,
11608
+ /* @__PURE__ */ (0, import_jsx_runtime49.jsxs)(
11609
+ DropdownMenu_default,
11610
+ {
11611
+ ...typeof isActive === "boolean" ? { open: isActive, onOpenChange: handleOpenChange } : { onOpenChange: handleOpenChange },
11612
+ children: [
11613
+ /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(DropdownMenuTrigger, { className: "text-primary cursor-pointer", children: /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
11614
+ IconButton_default,
11608
11615
  {
11609
- size: 24,
11610
- className: isActive ? "text-primary-950" : "text-primary"
11611
- }
11612
- ),
11613
- className
11614
- }
11615
- ) }),
11616
- /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
11617
- DropdownMenuContent,
11618
- {
11619
- className: "min-w-[320px] max-w-[400px] max-h-[500px] overflow-hidden",
11620
- side: "bottom",
11621
- align: "end",
11622
- children: /* @__PURE__ */ (0, import_jsx_runtime49.jsxs)("div", { className: "flex flex-col", children: [
11623
- /* @__PURE__ */ (0, import_jsx_runtime49.jsxs)("div", { className: "px-4 py-3 border-b border-border-200", children: [
11624
- /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
11625
- NotificationHeader,
11616
+ active: isActive,
11617
+ onClick: handleDesktopClick,
11618
+ icon: /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
11619
+ import_phosphor_react23.Bell,
11626
11620
  {
11627
- unreadCount,
11628
- variant: "dropdown"
11621
+ size: 24,
11622
+ className: isActive ? "text-primary-950" : "text-primary"
11629
11623
  }
11630
11624
  ),
11631
- unreadCount > 0 && onMarkAllAsRead && /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
11632
- "button",
11633
- {
11634
- type: "button",
11635
- onClick: onMarkAllAsRead,
11636
- className: "text-sm font-medium text-info-600 hover:text-info-700 cursor-pointer mt-2",
11637
- children: "Marcar todas como lidas"
11638
- }
11639
- )
11640
- ] }),
11641
- /* @__PURE__ */ (0, import_jsx_runtime49.jsx)("div", { className: "max-h-[350px] overflow-y-auto", children: /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
11642
- NotificationList,
11643
- {
11644
- groupedNotifications,
11645
- loading,
11646
- error,
11647
- onRetry,
11648
- onMarkAsReadById,
11649
- onDeleteById,
11650
- onNavigateById,
11651
- onGlobalNotificationClick: (notification) => {
11652
- setGlobalNotificationModal({
11653
- isOpen: true,
11654
- notification
11655
- });
11656
- },
11657
- getActionLabel,
11658
- renderEmpty: renderEmptyState,
11659
- emptyStateImage
11660
- }
11661
- ) })
11662
- ] })
11663
- }
11664
- )
11665
- ] }),
11625
+ className
11626
+ }
11627
+ ) }),
11628
+ /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
11629
+ DropdownMenuContent,
11630
+ {
11631
+ className: "min-w-[320px] max-w-[400px] max-h-[500px] overflow-hidden",
11632
+ side: "bottom",
11633
+ align: "end",
11634
+ children: /* @__PURE__ */ (0, import_jsx_runtime49.jsxs)("div", { className: "flex flex-col", children: [
11635
+ /* @__PURE__ */ (0, import_jsx_runtime49.jsxs)("div", { className: "px-4 py-3 border-b border-border-200", children: [
11636
+ /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
11637
+ NotificationHeader,
11638
+ {
11639
+ unreadCount,
11640
+ variant: "dropdown"
11641
+ }
11642
+ ),
11643
+ unreadCount > 0 && onMarkAllAsRead && /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
11644
+ "button",
11645
+ {
11646
+ type: "button",
11647
+ onClick: onMarkAllAsRead,
11648
+ className: "text-sm font-medium text-info-600 hover:text-info-700 cursor-pointer mt-2",
11649
+ children: "Marcar todas como lidas"
11650
+ }
11651
+ )
11652
+ ] }),
11653
+ /* @__PURE__ */ (0, import_jsx_runtime49.jsx)("div", { className: "max-h-[350px] overflow-y-auto", children: /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
11654
+ NotificationList,
11655
+ {
11656
+ groupedNotifications,
11657
+ loading,
11658
+ error,
11659
+ onRetry,
11660
+ onMarkAsReadById,
11661
+ onDeleteById,
11662
+ onNavigateById,
11663
+ onGlobalNotificationClick: (notification) => {
11664
+ setGlobalNotificationModal({
11665
+ isOpen: true,
11666
+ notification
11667
+ });
11668
+ },
11669
+ getActionLabel,
11670
+ renderEmpty: renderEmptyState,
11671
+ emptyStateImage
11672
+ }
11673
+ ) })
11674
+ ] })
11675
+ }
11676
+ )
11677
+ ]
11678
+ }
11679
+ ),
11666
11680
  /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
11667
11681
  Modal_default,
11668
11682
  {