analytica-frontend-lib 1.1.21 → 1.1.22

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.d.mts CHANGED
@@ -45,6 +45,7 @@ export { useUrlAuthentication } from './Auth/useUrlAuthentication/index.mjs';
45
45
  export { useApiConfig } from './Auth/useApiConfig/index.mjs';
46
46
  export { Quiz, QuizAlternative, QuizConnectDots, QuizContent, QuizDissertative, QuizFooter, QuizHeader, QuizHeaderResult, QuizImageQuestion, QuizListResult, QuizListResultByMateria, QuizMultipleChoice, QuizQuestionList, QuizResultHeaderTitle, QuizResultPerformance, QuizResultTitle, QuizTitle, QuizTrueOrFalse, getStatusBadge } from './Quiz/index.mjs';
47
47
  export { ANSWER_STATUS, Activity, Lesson, QUESTION_DIFFICULTY, QUESTION_STATUS, QUESTION_TYPE, Question, QuestionResult, QuizState, Simulated, UserAnswerItem, useQuizStore } from './Quiz/useQuizStore/index.mjs';
48
+ export { default as LoadingModal } from './LoadingModal/index.mjs';
48
49
  import 'react/jsx-runtime';
49
50
 
50
51
  /**
package/dist/index.d.ts CHANGED
@@ -45,6 +45,7 @@ export { useUrlAuthentication } from './Auth/useUrlAuthentication/index.js';
45
45
  export { useApiConfig } from './Auth/useApiConfig/index.js';
46
46
  export { Quiz, QuizAlternative, QuizConnectDots, QuizContent, QuizDissertative, QuizFooter, QuizHeader, QuizHeaderResult, QuizImageQuestion, QuizListResult, QuizListResultByMateria, QuizMultipleChoice, QuizQuestionList, QuizResultHeaderTitle, QuizResultPerformance, QuizResultTitle, QuizTitle, QuizTrueOrFalse, getStatusBadge } from './Quiz/index.js';
47
47
  export { ANSWER_STATUS, Activity, Lesson, QUESTION_DIFFICULTY, QUESTION_STATUS, QUESTION_TYPE, Question, QuestionResult, QuizState, Simulated, UserAnswerItem, useQuizStore } from './Quiz/useQuizStore/index.js';
48
+ export { default as LoadingModal } from './LoadingModal/index.js';
48
49
  import 'react/jsx-runtime';
49
50
 
50
51
  /**
package/dist/index.js CHANGED
@@ -64,6 +64,7 @@ __export(src_exports, {
64
64
  IconRender: () => IconRender_default,
65
65
  IconRoundedButton: () => IconRoundedButton_default,
66
66
  Input: () => Input_default,
67
+ LoadingModal: () => loadingModal_default,
67
68
  Menu: () => Menu_default,
68
69
  MenuContent: () => MenuContent,
69
70
  MenuItem: () => MenuItem,
@@ -5215,7 +5216,7 @@ var CardSimulationHistory = (0, import_react14.forwardRef)(({ data, onSimulation
5215
5216
  ),
5216
5217
  onClick: () => onSimulationClick?.(simulation),
5217
5218
  children: /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)("div", { className: "flex justify-between items-center w-full gap-2", children: [
5218
- /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)("div", { className: "flex flex-col gap-2 flex-1 min-w-0", children: [
5219
+ /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)("div", { className: "flex flex-wrap flex-col justify-between sm:flex-row gap-2 flex-1 min-w-0", children: [
5219
5220
  /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
5220
5221
  Text_default,
5221
5222
  {
@@ -8595,18 +8596,7 @@ var Quiz = (0, import_react28.forwardRef)(({ children, className, variant = "def
8595
8596
  (0, import_react28.useEffect)(() => {
8596
8597
  setVariant(variant);
8597
8598
  }, [variant, setVariant]);
8598
- return /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(
8599
- "div",
8600
- {
8601
- ref,
8602
- className: cn(
8603
- "w-full max-w-[1000px] flex flex-col mx-auto h-full relative not-lg:px-6",
8604
- className
8605
- ),
8606
- ...props,
8607
- children
8608
- }
8609
- );
8599
+ return /* @__PURE__ */ (0, import_jsx_runtime39.jsx)("div", { ref, className: cn("flex flex-col", className), ...props, children });
8610
8600
  });
8611
8601
  var QuizHeaderResult = (0, import_react28.forwardRef)(
8612
8602
  ({ className, ...props }, ref) => {
@@ -9946,7 +9936,7 @@ var QuizListResultByMateria = ({
9946
9936
  const { getQuestionsGroupedBySubject, getQuestionIndex } = useQuizStore();
9947
9937
  const groupedQuestions = getQuestionsGroupedBySubject();
9948
9938
  const answeredQuestions = groupedQuestions[subject] || [];
9949
- return /* @__PURE__ */ (0, import_jsx_runtime39.jsxs)("div", { className: "w-full max-w-[1000px] flex flex-col mx-auto h-full relative not-lg:px-6", children: [
9939
+ return /* @__PURE__ */ (0, import_jsx_runtime39.jsxs)("div", { className: "flex flex-col", children: [
9950
9940
  /* @__PURE__ */ (0, import_jsx_runtime39.jsx)("div", { className: "flex flex-row pt-4 justify-between", children: /* @__PURE__ */ (0, import_jsx_runtime39.jsx)("p", { className: "text-text-950 font-bold text-2xl", children: answeredQuestions?.[0]?.knowledgeMatrix?.[0]?.subject?.name ?? "Sem mat\xE9ria" }) }),
9951
9941
  /* @__PURE__ */ (0, import_jsx_runtime39.jsxs)("section", { className: "flex flex-col ", children: [
9952
9942
  /* @__PURE__ */ (0, import_jsx_runtime39.jsx)("p", { className: "pt-6 pb-4 text-text-950 font-bold text-lg", children: "Resultado das quest\xF5es" }),
@@ -9974,6 +9964,61 @@ var QuizListResultByMateria = ({
9974
9964
  ] })
9975
9965
  ] });
9976
9966
  };
9967
+
9968
+ // src/components/LoadingModal/loadingModal.tsx
9969
+ var import_react29 = require("react");
9970
+ var import_jsx_runtime40 = require("react/jsx-runtime");
9971
+ var LoadingModal = (0, import_react29.forwardRef)(
9972
+ ({ open, title = "Titulo...", subtitle = "Subtitulo...", ...props }, ref) => {
9973
+ if (!open) return null;
9974
+ return /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
9975
+ "div",
9976
+ {
9977
+ ref,
9978
+ "aria-modal": "true",
9979
+ "aria-labelledby": "loading-modal-title",
9980
+ "aria-describedby": "loading-modal-subtitle",
9981
+ className: "fixed inset-0 z-50 flex items-center justify-center bg-background/90 backdrop-blur-xs",
9982
+ ...props,
9983
+ children: /* @__PURE__ */ (0, import_jsx_runtime40.jsxs)("div", { className: "w-full max-w-[364px] flex flex-col items-center justify-center gap-14", children: [
9984
+ /* @__PURE__ */ (0, import_jsx_runtime40.jsx)("span", { className: "animate-spin", "aria-hidden": "true", children: /* @__PURE__ */ (0, import_jsx_runtime40.jsxs)(
9985
+ "svg",
9986
+ {
9987
+ width: "102",
9988
+ height: "102",
9989
+ viewBox: "0 0 102 102",
9990
+ fill: "none",
9991
+ xmlns: "http://www.w3.org/2000/svg",
9992
+ "aria-hidden": "true",
9993
+ focusable: false,
9994
+ children: [
9995
+ /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
9996
+ "path",
9997
+ {
9998
+ d: "M101.5 51C101.5 78.8904 78.8904 101.5 51 101.5C23.1096 101.5 0.5 78.8904 0.5 51C0.5 23.1096 23.1096 0.5 51 0.5C78.8904 0.5 101.5 23.1096 101.5 51ZM8.62286 51C8.62286 74.4043 27.5957 93.3771 51 93.3771C74.4043 93.3771 93.3771 74.4043 93.3771 51C93.3771 27.5957 74.4043 8.62286 51 8.62286C27.5957 8.62286 8.62286 27.5957 8.62286 51Z",
9999
+ className: "fill-primary-100"
10000
+ }
10001
+ ),
10002
+ /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
10003
+ "path",
10004
+ {
10005
+ d: "M97.4386 51C99.6816 51 101.517 52.8213 101.337 55.0571C100.754 62.2833 98.6212 69.3162 95.0643 75.6696C90.8444 83.207 84.7616 89.536 77.3975 94.0514C70.0333 98.5668 61.6339 101.118 53.0024 101.46C44.371 101.803 35.7959 99.9255 28.0971 96.0078C20.3982 92.0902 13.833 86.2631 9.02917 79.0838C4.22529 71.9045 1.34332 63.6129 0.658804 55.0017C-0.0257159 46.3906 1.51009 37.7479 5.1194 29.8997C8.16173 23.2845 12.5915 17.4202 18.0904 12.6959C19.7917 11.2341 22.3444 11.6457 23.6647 13.459C24.9851 15.2723 24.5702 17.7988 22.8916 19.2866C18.5048 23.1747 14.9608 27.9413 12.4992 33.2937C9.47048 39.8794 8.1817 47.132 8.75612 54.3581C9.33053 61.5841 11.7489 68.542 15.7801 74.5666C19.8113 80.5911 25.3205 85.4809 31.781 88.7684C38.2414 92.0559 45.4372 93.6312 52.6804 93.3438C59.9235 93.0564 66.9718 90.9158 73.1515 87.1267C79.3311 83.3375 84.4355 78.0266 87.9766 71.7015C90.8546 66.561 92.6217 60.8903 93.1827 55.0553C93.3973 52.8225 95.1955 51 97.4386 51Z",
10006
+ className: "fill-primary-600"
10007
+ }
10008
+ )
10009
+ ]
10010
+ }
10011
+ ) }),
10012
+ /* @__PURE__ */ (0, import_jsx_runtime40.jsxs)("span", { className: "flex flex-col gap-4 text-center", children: [
10013
+ /* @__PURE__ */ (0, import_jsx_runtime40.jsx)("p", { id: "loading-modal-title", className: "text-text-950 text-lg", children: title }),
10014
+ /* @__PURE__ */ (0, import_jsx_runtime40.jsx)("p", { id: "loading-modal-subtitle", className: "text-text-600 text-lg", children: subtitle })
10015
+ ] })
10016
+ ] })
10017
+ }
10018
+ );
10019
+ }
10020
+ );
10021
+ var loadingModal_default = LoadingModal;
9977
10022
  // Annotate the CommonJS export names for ESM import in node:
9978
10023
  0 && (module.exports = {
9979
10024
  ANSWER_STATUS,
@@ -10010,6 +10055,7 @@ var QuizListResultByMateria = ({
10010
10055
  IconRender,
10011
10056
  IconRoundedButton,
10012
10057
  Input,
10058
+ LoadingModal,
10013
10059
  Menu,
10014
10060
  MenuContent,
10015
10061
  MenuItem,