analytica-frontend-lib 1.1.84 → 1.1.86

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
@@ -9240,7 +9240,7 @@ var Whiteboard = ({
9240
9240
  "div",
9241
9241
  {
9242
9242
  className: cn(
9243
- "flex items-center justify-center p-8 bg-background border border-gray-100 rounded-xl",
9243
+ "flex items-center justify-center p-8 bg-background border border-border-50 rounded-xl",
9244
9244
  className
9245
9245
  ),
9246
9246
  ...rest,
@@ -9252,7 +9252,7 @@ var Whiteboard = ({
9252
9252
  "div",
9253
9253
  {
9254
9254
  className: cn(
9255
- "flex flex-col bg-background border border-gray-100 p-4 gap-2 rounded-xl w-fit mx-auto",
9255
+ "flex flex-col bg-background border border-border-50 p-4 gap-2 rounded-xl w-fit mx-auto",
9256
9256
  className
9257
9257
  ),
9258
9258
  ...rest,
@@ -11535,80 +11535,83 @@ var Quiz = (0, import_react36.forwardRef)(({ children, className, variant = "def
11535
11535
  }, [variant, setVariant]);
11536
11536
  return /* @__PURE__ */ (0, import_jsx_runtime51.jsx)("div", { ref, className: cn("flex flex-col", className), ...props, children });
11537
11537
  });
11538
- var QuizTitle = (0, import_react36.forwardRef)(
11539
- ({ className, ...props }, ref) => {
11540
- const {
11541
- quiz,
11542
- currentQuestionIndex,
11543
- getTotalQuestions,
11544
- getQuizTitle,
11545
- timeElapsed,
11546
- formatTime: formatTime2,
11547
- isStarted
11548
- } = useQuizStore();
11549
- const [showExitConfirmation, setShowExitConfirmation] = (0, import_react36.useState)(false);
11550
- const totalQuestions = getTotalQuestions();
11551
- const quizTitle = getQuizTitle();
11552
- const handleBackClick = () => {
11553
- if (isStarted) {
11554
- setShowExitConfirmation(true);
11555
- } else {
11556
- window.history.back();
11557
- }
11558
- };
11559
- const handleConfirmExit = () => {
11560
- setShowExitConfirmation(false);
11538
+ var QuizTitle = (0, import_react36.forwardRef)(({ className, onBack, ...props }, ref) => {
11539
+ const {
11540
+ quiz,
11541
+ currentQuestionIndex,
11542
+ getTotalQuestions,
11543
+ getQuizTitle,
11544
+ timeElapsed,
11545
+ formatTime: formatTime2,
11546
+ isStarted
11547
+ } = useQuizStore();
11548
+ const [showExitConfirmation, setShowExitConfirmation] = (0, import_react36.useState)(false);
11549
+ const totalQuestions = getTotalQuestions();
11550
+ const quizTitle = getQuizTitle();
11551
+ const handleBackClick = () => {
11552
+ if (isStarted) {
11553
+ setShowExitConfirmation(true);
11554
+ } else {
11555
+ actionOnBack();
11556
+ }
11557
+ };
11558
+ const handleConfirmExit = () => {
11559
+ setShowExitConfirmation(false);
11560
+ actionOnBack();
11561
+ };
11562
+ const actionOnBack = () => {
11563
+ if (onBack) {
11564
+ onBack();
11565
+ } else {
11561
11566
  window.history.back();
11562
- };
11563
- const handleCancelExit = () => {
11564
- setShowExitConfirmation(false);
11565
- };
11566
- return /* @__PURE__ */ (0, import_jsx_runtime51.jsxs)(import_jsx_runtime51.Fragment, { children: [
11567
- /* @__PURE__ */ (0, import_jsx_runtime51.jsxs)(
11568
- "div",
11569
- {
11570
- ref,
11571
- className: cn(
11572
- "flex flex-row justify-between items-center relative p-2",
11573
- className
11574
- ),
11575
- ...props,
11576
- children: [
11577
- /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(
11578
- IconButton_default,
11579
- {
11580
- icon: /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(import_phosphor_react25.CaretLeft, { size: 24 }),
11581
- size: "md",
11582
- "aria-label": "Voltar",
11583
- onClick: handleBackClick
11584
- }
11585
- ),
11586
- /* @__PURE__ */ (0, import_jsx_runtime51.jsxs)("span", { className: "flex flex-col gap-2 text-center", children: [
11587
- /* @__PURE__ */ (0, import_jsx_runtime51.jsx)("p", { className: "text-text-950 font-bold text-md", children: quizTitle }),
11588
- /* @__PURE__ */ (0, import_jsx_runtime51.jsx)("p", { className: "text-text-600 text-xs", children: totalQuestions > 0 ? `${currentQuestionIndex + 1} de ${totalQuestions}` : "0 de 0" })
11589
- ] }),
11590
- /* @__PURE__ */ (0, import_jsx_runtime51.jsx)("span", { className: "flex flex-row items-center justify-center", children: /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(Badge_default, { variant: "outlined", action: "info", iconLeft: /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(import_phosphor_react25.Clock, {}), children: isStarted ? formatTime2(timeElapsed) : "00:00" }) })
11591
- ]
11592
- }
11593
- ),
11594
- /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(
11595
- AlertDialog,
11596
- {
11597
- isOpen: showExitConfirmation,
11598
- onChangeOpen: setShowExitConfirmation,
11599
- title: "Deseja sair?",
11600
- description: getExitConfirmationText(
11601
- quiz?.type || "SIMULADO" /* SIMULADO */
11567
+ }
11568
+ };
11569
+ const handleCancelExit = () => {
11570
+ setShowExitConfirmation(false);
11571
+ };
11572
+ return /* @__PURE__ */ (0, import_jsx_runtime51.jsxs)(import_jsx_runtime51.Fragment, { children: [
11573
+ /* @__PURE__ */ (0, import_jsx_runtime51.jsxs)(
11574
+ "div",
11575
+ {
11576
+ ref,
11577
+ className: cn(
11578
+ "flex flex-row justify-between items-center relative p-2",
11579
+ className
11580
+ ),
11581
+ ...props,
11582
+ children: [
11583
+ /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(
11584
+ IconButton_default,
11585
+ {
11586
+ icon: /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(import_phosphor_react25.CaretLeft, { size: 24 }),
11587
+ size: "md",
11588
+ "aria-label": "Voltar",
11589
+ onClick: handleBackClick
11590
+ }
11602
11591
  ),
11603
- cancelButtonLabel: "Voltar e revisar",
11604
- submitButtonLabel: "Sair Mesmo Assim",
11605
- onSubmit: handleConfirmExit,
11606
- onCancel: handleCancelExit
11607
- }
11608
- )
11609
- ] });
11610
- }
11611
- );
11592
+ /* @__PURE__ */ (0, import_jsx_runtime51.jsxs)("span", { className: "flex flex-col gap-2 text-center", children: [
11593
+ /* @__PURE__ */ (0, import_jsx_runtime51.jsx)("p", { className: "text-text-950 font-bold text-md", children: quizTitle }),
11594
+ /* @__PURE__ */ (0, import_jsx_runtime51.jsx)("p", { className: "text-text-600 text-xs", children: totalQuestions > 0 ? `${currentQuestionIndex + 1} de ${totalQuestions}` : "0 de 0" })
11595
+ ] }),
11596
+ /* @__PURE__ */ (0, import_jsx_runtime51.jsx)("span", { className: "flex flex-row items-center justify-center", children: /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(Badge_default, { variant: "outlined", action: "info", iconLeft: /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(import_phosphor_react25.Clock, {}), children: isStarted ? formatTime2(timeElapsed) : "00:00" }) })
11597
+ ]
11598
+ }
11599
+ ),
11600
+ /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(
11601
+ AlertDialog,
11602
+ {
11603
+ isOpen: showExitConfirmation,
11604
+ onChangeOpen: setShowExitConfirmation,
11605
+ title: "Deseja sair?",
11606
+ description: getExitConfirmationText(quiz?.type || "SIMULADO" /* SIMULADO */),
11607
+ cancelButtonLabel: "Voltar e revisar",
11608
+ submitButtonLabel: "Sair Mesmo Assim",
11609
+ onSubmit: handleConfirmExit,
11610
+ onCancel: handleCancelExit
11611
+ }
11612
+ )
11613
+ ] });
11614
+ });
11612
11615
  var QuizHeader = () => {
11613
11616
  const { getCurrentQuestion, currentQuestionIndex } = useQuizStore();
11614
11617
  const currentQuestion = getCurrentQuestion();