analytica-frontend-lib 1.1.57 → 1.1.59

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 (47) hide show
  1. package/dist/Accordation/index.js +20 -2
  2. package/dist/Accordation/index.js.map +1 -1
  3. package/dist/Accordation/index.mjs +22 -3
  4. package/dist/Accordation/index.mjs.map +1 -1
  5. package/dist/Card/index.js +20 -2
  6. package/dist/Card/index.js.map +1 -1
  7. package/dist/Card/index.mjs +22 -3
  8. package/dist/Card/index.mjs.map +1 -1
  9. package/dist/DropdownMenu/index.js +1 -1
  10. package/dist/DropdownMenu/index.js.map +1 -1
  11. package/dist/DropdownMenu/index.mjs +1 -1
  12. package/dist/DropdownMenu/index.mjs.map +1 -1
  13. package/dist/NotificationCard/index.js +1 -1
  14. package/dist/NotificationCard/index.js.map +1 -1
  15. package/dist/NotificationCard/index.mjs +1 -1
  16. package/dist/NotificationCard/index.mjs.map +1 -1
  17. package/dist/Quiz/index.js +20 -2
  18. package/dist/Quiz/index.js.map +1 -1
  19. package/dist/Quiz/index.mjs +32 -13
  20. package/dist/Quiz/index.mjs.map +1 -1
  21. package/dist/Search/index.js +1 -1
  22. package/dist/Search/index.js.map +1 -1
  23. package/dist/Search/index.mjs +1 -1
  24. package/dist/Search/index.mjs.map +1 -1
  25. package/dist/SubjectInfo/index.d.mts +2 -0
  26. package/dist/SubjectInfo/index.d.ts +2 -0
  27. package/dist/SubjectInfo/index.js +313 -0
  28. package/dist/SubjectInfo/index.js.map +1 -0
  29. package/dist/SubjectInfo/index.mjs +293 -0
  30. package/dist/SubjectInfo/index.mjs.map +1 -0
  31. package/dist/SubjectInfo-DZvZ5alE.d.mts +37 -0
  32. package/dist/SubjectInfo-DZvZ5alE.d.ts +37 -0
  33. package/dist/VideoPlayer/index.js +20 -1
  34. package/dist/VideoPlayer/index.js.map +1 -1
  35. package/dist/VideoPlayer/index.mjs +20 -1
  36. package/dist/VideoPlayer/index.mjs.map +1 -1
  37. package/dist/index.css +73 -12
  38. package/dist/index.css.map +1 -1
  39. package/dist/index.d.mts +1 -0
  40. package/dist/index.d.ts +1 -0
  41. package/dist/index.js +727 -382
  42. package/dist/index.js.map +1 -1
  43. package/dist/index.mjs +758 -407
  44. package/dist/index.mjs.map +1 -1
  45. package/dist/styles.css +73 -12
  46. package/dist/styles.css.map +1 -1
  47. package/package.json +2 -1
@@ -3570,6 +3570,8 @@ var CardAudio = (0, import_react7.forwardRef)(
3570
3570
  const [showSpeedMenu, setShowSpeedMenu] = (0, import_react7.useState)(false);
3571
3571
  const [playbackRate, setPlaybackRate] = (0, import_react7.useState)(1);
3572
3572
  const audioRef = (0, import_react7.useRef)(null);
3573
+ const volumeControlRef = (0, import_react7.useRef)(null);
3574
+ const speedMenuRef = (0, import_react7.useRef)(null);
3573
3575
  const formatTime = (time) => {
3574
3576
  const minutes = Math.floor(time / 60);
3575
3577
  const seconds = Math.floor(time % 60);
@@ -3621,9 +3623,11 @@ var CardAudio = (0, import_react7.forwardRef)(
3621
3623
  };
3622
3624
  const toggleVolumeControl = () => {
3623
3625
  setShowVolumeControl(!showVolumeControl);
3626
+ setShowSpeedMenu(false);
3624
3627
  };
3625
3628
  const toggleSpeedMenu = () => {
3626
3629
  setShowSpeedMenu(!showSpeedMenu);
3630
+ setShowVolumeControl(false);
3627
3631
  };
3628
3632
  const handleSpeedChange = (speed) => {
3629
3633
  setPlaybackRate(speed);
@@ -3641,6 +3645,20 @@ var CardAudio = (0, import_react7.forwardRef)(
3641
3645
  }
3642
3646
  return /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(import_phosphor_react5.SpeakerHigh, { size: 24 });
3643
3647
  };
3648
+ (0, import_react7.useEffect)(() => {
3649
+ const handleClickOutside = (event) => {
3650
+ if (volumeControlRef.current && !volumeControlRef.current.contains(event.target)) {
3651
+ setShowVolumeControl(false);
3652
+ }
3653
+ if (speedMenuRef.current && !speedMenuRef.current.contains(event.target)) {
3654
+ setShowSpeedMenu(false);
3655
+ }
3656
+ };
3657
+ document.addEventListener("mousedown", handleClickOutside);
3658
+ return () => {
3659
+ document.removeEventListener("mousedown", handleClickOutside);
3660
+ };
3661
+ }, []);
3644
3662
  return /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)(
3645
3663
  CardBase,
3646
3664
  {
@@ -3729,7 +3747,7 @@ var CardAudio = (0, import_react7.forwardRef)(
3729
3747
  }
3730
3748
  ) }),
3731
3749
  /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("p", { className: "text-text-800 text-md font-medium min-w-[2.5rem]", children: formatTime(duration) }),
3732
- /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("div", { className: "relative h-6", children: [
3750
+ /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("div", { className: "relative h-6", ref: volumeControlRef, children: [
3733
3751
  /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
3734
3752
  "button",
3735
3753
  {
@@ -3791,7 +3809,7 @@ var CardAudio = (0, import_react7.forwardRef)(
3791
3809
  }
3792
3810
  )
3793
3811
  ] }),
3794
- /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("div", { className: "relative h-6", children: [
3812
+ /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("div", { className: "relative h-6", ref: speedMenuRef, children: [
3795
3813
  /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
3796
3814
  "button",
3797
3815
  {