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
@@ -934,7 +934,7 @@ var IconButton_default = IconButton;
934
934
  // src/components/Quiz/Quiz.tsx
935
935
  import {
936
936
  forwardRef as forwardRef10,
937
- useEffect as useEffect7,
937
+ useEffect as useEffect8,
938
938
  useMemo,
939
939
  useId as useId8,
940
940
  useState as useState7,
@@ -2240,7 +2240,8 @@ import {
2240
2240
  forwardRef as forwardRef6,
2241
2241
  Fragment as Fragment4,
2242
2242
  useState as useState3,
2243
- useRef as useRef3
2243
+ useRef as useRef3,
2244
+ useEffect as useEffect5
2244
2245
  } from "react";
2245
2246
 
2246
2247
  // src/components/ProgressBar/ProgressBar.tsx
@@ -3566,6 +3567,8 @@ var CardAudio = forwardRef6(
3566
3567
  const [showSpeedMenu, setShowSpeedMenu] = useState3(false);
3567
3568
  const [playbackRate, setPlaybackRate] = useState3(1);
3568
3569
  const audioRef = useRef3(null);
3570
+ const volumeControlRef = useRef3(null);
3571
+ const speedMenuRef = useRef3(null);
3569
3572
  const formatTime = (time) => {
3570
3573
  const minutes = Math.floor(time / 60);
3571
3574
  const seconds = Math.floor(time % 60);
@@ -3617,9 +3620,11 @@ var CardAudio = forwardRef6(
3617
3620
  };
3618
3621
  const toggleVolumeControl = () => {
3619
3622
  setShowVolumeControl(!showVolumeControl);
3623
+ setShowSpeedMenu(false);
3620
3624
  };
3621
3625
  const toggleSpeedMenu = () => {
3622
3626
  setShowSpeedMenu(!showSpeedMenu);
3627
+ setShowVolumeControl(false);
3623
3628
  };
3624
3629
  const handleSpeedChange = (speed) => {
3625
3630
  setPlaybackRate(speed);
@@ -3637,6 +3642,20 @@ var CardAudio = forwardRef6(
3637
3642
  }
3638
3643
  return /* @__PURE__ */ jsx12(SpeakerHigh, { size: 24 });
3639
3644
  };
3645
+ useEffect5(() => {
3646
+ const handleClickOutside = (event) => {
3647
+ if (volumeControlRef.current && !volumeControlRef.current.contains(event.target)) {
3648
+ setShowVolumeControl(false);
3649
+ }
3650
+ if (speedMenuRef.current && !speedMenuRef.current.contains(event.target)) {
3651
+ setShowSpeedMenu(false);
3652
+ }
3653
+ };
3654
+ document.addEventListener("mousedown", handleClickOutside);
3655
+ return () => {
3656
+ document.removeEventListener("mousedown", handleClickOutside);
3657
+ };
3658
+ }, []);
3640
3659
  return /* @__PURE__ */ jsxs10(
3641
3660
  CardBase,
3642
3661
  {
@@ -3725,7 +3744,7 @@ var CardAudio = forwardRef6(
3725
3744
  }
3726
3745
  ) }),
3727
3746
  /* @__PURE__ */ jsx12("p", { className: "text-text-800 text-md font-medium min-w-[2.5rem]", children: formatTime(duration) }),
3728
- /* @__PURE__ */ jsxs10("div", { className: "relative h-6", children: [
3747
+ /* @__PURE__ */ jsxs10("div", { className: "relative h-6", ref: volumeControlRef, children: [
3729
3748
  /* @__PURE__ */ jsx12(
3730
3749
  "button",
3731
3750
  {
@@ -3787,7 +3806,7 @@ var CardAudio = forwardRef6(
3787
3806
  }
3788
3807
  )
3789
3808
  ] }),
3790
- /* @__PURE__ */ jsxs10("div", { className: "relative h-6", children: [
3809
+ /* @__PURE__ */ jsxs10("div", { className: "relative h-6", ref: speedMenuRef, children: [
3791
3810
  /* @__PURE__ */ jsx12(
3792
3811
  "button",
3793
3812
  {
@@ -4286,13 +4305,13 @@ var ProgressCircle = ({
4286
4305
  var ProgressCircle_default = ProgressCircle;
4287
4306
 
4288
4307
  // src/components/MultipleChoice/MultipleChoice.tsx
4289
- import { useEffect as useEffect6, useState as useState5 } from "react";
4308
+ import { useEffect as useEffect7, useState as useState5 } from "react";
4290
4309
 
4291
4310
  // src/components/CheckBox/CheckboxList.tsx
4292
4311
  import {
4293
4312
  forwardRef as forwardRef8,
4294
4313
  useId as useId6,
4295
- useEffect as useEffect5,
4314
+ useEffect as useEffect6,
4296
4315
  useRef as useRef4,
4297
4316
  Children as Children3,
4298
4317
  cloneElement as cloneElement3,
@@ -4564,18 +4583,18 @@ var CheckboxList = forwardRef8(
4564
4583
  );
4565
4584
  const store = storeRef.current;
4566
4585
  const { setValues } = useStore3(store, (s) => s);
4567
- useEffect5(() => {
4586
+ useEffect6(() => {
4568
4587
  const currentValues = store.getState().values;
4569
4588
  if (currentValues.length > 0 && onValuesChange) {
4570
4589
  onValuesChange(currentValues);
4571
4590
  }
4572
4591
  }, []);
4573
- useEffect5(() => {
4592
+ useEffect6(() => {
4574
4593
  if (propValues !== void 0) {
4575
4594
  setValues(propValues);
4576
4595
  }
4577
4596
  }, [propValues, setValues]);
4578
- useEffect5(() => {
4597
+ useEffect6(() => {
4579
4598
  store.setState({ disabled });
4580
4599
  }, [disabled, store]);
4581
4600
  return /* @__PURE__ */ jsx15(
@@ -4652,7 +4671,7 @@ var MultipleChoiceList = ({
4652
4671
  mode = "interactive"
4653
4672
  }) => {
4654
4673
  const [actualValue, setActualValue] = useState5(selectedValues);
4655
- useEffect6(() => {
4674
+ useEffect7(() => {
4656
4675
  setActualValue(selectedValues);
4657
4676
  }, [selectedValues]);
4658
4677
  const getStatusBadge2 = (status) => {
@@ -4936,7 +4955,7 @@ var getStatusStyles = (variantCorrect) => {
4936
4955
  };
4937
4956
  var Quiz = forwardRef10(({ children, className, variant = "default", ...props }, ref) => {
4938
4957
  const { setVariant } = useQuizStore();
4939
- useEffect7(() => {
4958
+ useEffect8(() => {
4940
4959
  setVariant(variant);
4941
4960
  }, [variant, setVariant]);
4942
4961
  return /* @__PURE__ */ jsx18("div", { ref, className: cn("flex flex-col", className), ...props, children });
@@ -4945,7 +4964,7 @@ var QuizHeaderResult = forwardRef10(
4945
4964
  ({ className, ...props }, ref) => {
4946
4965
  const { getQuestionResultByQuestionId, getCurrentQuestion } = useQuizStore();
4947
4966
  const [status, setStatus] = useState7(void 0);
4948
- useEffect7(() => {
4967
+ useEffect8(() => {
4949
4968
  const cq = getCurrentQuestion();
4950
4969
  if (!cq) {
4951
4970
  setStatus(void 0);
@@ -5296,7 +5315,7 @@ var QuizDissertative = ({ paddingBottom }) => {
5296
5315
  textareaRef.current.style.height = `${newHeight}px`;
5297
5316
  }
5298
5317
  }, []);
5299
- useEffect7(() => {
5318
+ useEffect8(() => {
5300
5319
  adjustTextareaHeight();
5301
5320
  }, [currentAnswer, adjustTextareaHeight]);
5302
5321
  if (!currentQuestion) {