analytica-frontend-lib 1.1.60 → 1.1.62

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (51) hide show
  1. package/dist/Accordation/index.js +230 -211
  2. package/dist/Accordation/index.js.map +1 -1
  3. package/dist/Accordation/index.mjs +199 -180
  4. package/dist/Accordation/index.mjs.map +1 -1
  5. package/dist/Card/index.js +220 -201
  6. package/dist/Card/index.js.map +1 -1
  7. package/dist/Card/index.mjs +193 -174
  8. package/dist/Card/index.mjs.map +1 -1
  9. package/dist/DropdownMenu/index.js.map +1 -1
  10. package/dist/DropdownMenu/index.mjs.map +1 -1
  11. package/dist/IconRender/index.d.mts +2 -2
  12. package/dist/IconRender/index.d.ts +2 -2
  13. package/dist/IconRender/index.js +37 -18
  14. package/dist/IconRender/index.js.map +1 -1
  15. package/dist/IconRender/index.mjs +37 -18
  16. package/dist/IconRender/index.mjs.map +1 -1
  17. package/dist/NotificationCard/index.d.mts +1 -1
  18. package/dist/NotificationCard/index.d.ts +1 -1
  19. package/dist/NotificationCard/index.js +76 -62
  20. package/dist/NotificationCard/index.js.map +1 -1
  21. package/dist/NotificationCard/index.mjs +76 -62
  22. package/dist/NotificationCard/index.mjs.map +1 -1
  23. package/dist/{NotificationCard-DpSGkWEa.d.mts → NotificationCard-4GgB0Nsf.d.mts} +5 -0
  24. package/dist/{NotificationCard-DpSGkWEa.d.ts → NotificationCard-4GgB0Nsf.d.ts} +5 -0
  25. package/dist/Quiz/index.js +495 -476
  26. package/dist/Quiz/index.js.map +1 -1
  27. package/dist/Quiz/index.mjs +412 -393
  28. package/dist/Quiz/index.mjs.map +1 -1
  29. package/dist/Search/index.js.map +1 -1
  30. package/dist/Search/index.mjs.map +1 -1
  31. package/dist/SubjectInfo/index.d.mts +1 -1
  32. package/dist/SubjectInfo/index.d.ts +1 -1
  33. package/dist/SubjectInfo/index.js +24 -20
  34. package/dist/SubjectInfo/index.js.map +1 -1
  35. package/dist/SubjectInfo/index.mjs +24 -19
  36. package/dist/SubjectInfo/index.mjs.map +1 -1
  37. package/dist/{SubjectInfo-DZvZ5alE.d.mts → SubjectInfo-Dvt0OodP.d.mts} +2 -2
  38. package/dist/{SubjectInfo-DZvZ5alE.d.ts → SubjectInfo-Dvt0OodP.d.ts} +2 -2
  39. package/dist/ThemeToggle/index.js.map +1 -1
  40. package/dist/ThemeToggle/index.mjs.map +1 -1
  41. package/dist/index.css +15 -0
  42. package/dist/index.css.map +1 -1
  43. package/dist/index.d.mts +3 -3
  44. package/dist/index.d.ts +3 -3
  45. package/dist/index.js +562 -633
  46. package/dist/index.js.map +1 -1
  47. package/dist/index.mjs +477 -547
  48. package/dist/index.mjs.map +1 -1
  49. package/dist/styles.css +15 -0
  50. package/dist/styles.css.map +1 -1
  51. package/package.json +1 -1
@@ -1641,6 +1641,7 @@ var NotificationCenter = ({
1641
1641
  getActionLabel,
1642
1642
  onFetchNotifications,
1643
1643
  onMarkAllAsRead,
1644
+ onOpenChange,
1644
1645
  emptyStateImage,
1645
1646
  emptyStateTitle,
1646
1647
  emptyStateDescription,
@@ -1656,6 +1657,13 @@ var NotificationCenter = ({
1656
1657
  const handleDesktopClick = () => {
1657
1658
  onToggleActive?.();
1658
1659
  };
1660
+ const handleOpenChange = (open) => {
1661
+ const controlledByParent = typeof isActive === "boolean" && typeof onToggleActive === "function";
1662
+ onOpenChange?.(open);
1663
+ if (controlledByParent && !onOpenChange && !open && isActive) {
1664
+ onToggleActive?.();
1665
+ }
1666
+ };
1659
1667
  useEffect6(() => {
1660
1668
  if (isActive) {
1661
1669
  onFetchNotifications?.();
@@ -1733,72 +1741,78 @@ var NotificationCenter = ({
1733
1741
  ] });
1734
1742
  }
1735
1743
  return /* @__PURE__ */ jsxs7(Fragment2, { children: [
1736
- /* @__PURE__ */ jsxs7(DropdownMenu_default, { children: [
1737
- /* @__PURE__ */ jsx10(DropdownMenuTrigger, { className: "text-primary cursor-pointer", children: /* @__PURE__ */ jsx10(
1738
- IconButton_default,
1739
- {
1740
- active: isActive,
1741
- onClick: handleDesktopClick,
1742
- icon: /* @__PURE__ */ jsx10(
1743
- Bell2,
1744
+ /* @__PURE__ */ jsxs7(
1745
+ DropdownMenu_default,
1746
+ {
1747
+ ...typeof isActive === "boolean" ? { open: isActive, onOpenChange: handleOpenChange } : { onOpenChange: handleOpenChange },
1748
+ children: [
1749
+ /* @__PURE__ */ jsx10(DropdownMenuTrigger, { className: "text-primary cursor-pointer", children: /* @__PURE__ */ jsx10(
1750
+ IconButton_default,
1744
1751
  {
1745
- size: 24,
1746
- className: isActive ? "text-primary-950" : "text-primary"
1747
- }
1748
- ),
1749
- className
1750
- }
1751
- ) }),
1752
- /* @__PURE__ */ jsx10(
1753
- DropdownMenuContent,
1754
- {
1755
- className: "min-w-[320px] max-w-[400px] max-h-[500px] overflow-hidden",
1756
- side: "bottom",
1757
- align: "end",
1758
- children: /* @__PURE__ */ jsxs7("div", { className: "flex flex-col", children: [
1759
- /* @__PURE__ */ jsxs7("div", { className: "px-4 py-3 border-b border-border-200", children: [
1760
- /* @__PURE__ */ jsx10(
1761
- NotificationHeader,
1752
+ active: isActive,
1753
+ onClick: handleDesktopClick,
1754
+ icon: /* @__PURE__ */ jsx10(
1755
+ Bell2,
1762
1756
  {
1763
- unreadCount,
1764
- variant: "dropdown"
1757
+ size: 24,
1758
+ className: isActive ? "text-primary-950" : "text-primary"
1765
1759
  }
1766
1760
  ),
1767
- unreadCount > 0 && onMarkAllAsRead && /* @__PURE__ */ jsx10(
1768
- "button",
1769
- {
1770
- type: "button",
1771
- onClick: onMarkAllAsRead,
1772
- className: "text-sm font-medium text-info-600 hover:text-info-700 cursor-pointer mt-2",
1773
- children: "Marcar todas como lidas"
1774
- }
1775
- )
1776
- ] }),
1777
- /* @__PURE__ */ jsx10("div", { className: "max-h-[350px] overflow-y-auto", children: /* @__PURE__ */ jsx10(
1778
- NotificationList,
1779
- {
1780
- groupedNotifications,
1781
- loading,
1782
- error,
1783
- onRetry,
1784
- onMarkAsReadById,
1785
- onDeleteById,
1786
- onNavigateById,
1787
- onGlobalNotificationClick: (notification) => {
1788
- setGlobalNotificationModal({
1789
- isOpen: true,
1790
- notification
1791
- });
1792
- },
1793
- getActionLabel,
1794
- renderEmpty: renderEmptyState,
1795
- emptyStateImage
1796
- }
1797
- ) })
1798
- ] })
1799
- }
1800
- )
1801
- ] }),
1761
+ className
1762
+ }
1763
+ ) }),
1764
+ /* @__PURE__ */ jsx10(
1765
+ DropdownMenuContent,
1766
+ {
1767
+ className: "min-w-[320px] max-w-[400px] max-h-[500px] overflow-hidden",
1768
+ side: "bottom",
1769
+ align: "end",
1770
+ children: /* @__PURE__ */ jsxs7("div", { className: "flex flex-col", children: [
1771
+ /* @__PURE__ */ jsxs7("div", { className: "px-4 py-3 border-b border-border-200", children: [
1772
+ /* @__PURE__ */ jsx10(
1773
+ NotificationHeader,
1774
+ {
1775
+ unreadCount,
1776
+ variant: "dropdown"
1777
+ }
1778
+ ),
1779
+ unreadCount > 0 && onMarkAllAsRead && /* @__PURE__ */ jsx10(
1780
+ "button",
1781
+ {
1782
+ type: "button",
1783
+ onClick: onMarkAllAsRead,
1784
+ className: "text-sm font-medium text-info-600 hover:text-info-700 cursor-pointer mt-2",
1785
+ children: "Marcar todas como lidas"
1786
+ }
1787
+ )
1788
+ ] }),
1789
+ /* @__PURE__ */ jsx10("div", { className: "max-h-[350px] overflow-y-auto", children: /* @__PURE__ */ jsx10(
1790
+ NotificationList,
1791
+ {
1792
+ groupedNotifications,
1793
+ loading,
1794
+ error,
1795
+ onRetry,
1796
+ onMarkAsReadById,
1797
+ onDeleteById,
1798
+ onNavigateById,
1799
+ onGlobalNotificationClick: (notification) => {
1800
+ setGlobalNotificationModal({
1801
+ isOpen: true,
1802
+ notification
1803
+ });
1804
+ },
1805
+ getActionLabel,
1806
+ renderEmpty: renderEmptyState,
1807
+ emptyStateImage
1808
+ }
1809
+ ) })
1810
+ ] })
1811
+ }
1812
+ )
1813
+ ]
1814
+ }
1815
+ ),
1802
1816
  /* @__PURE__ */ jsx10(
1803
1817
  Modal_default,
1804
1818
  {