analytica-frontend-lib 1.0.80 → 1.0.82

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.
@@ -1709,6 +1709,112 @@ var CardTest = (0, import_react.forwardRef)(
1709
1709
  );
1710
1710
  }
1711
1711
  );
1712
+ var SIMULATION_TYPE_STYLES = {
1713
+ enem: {
1714
+ background: "bg-exam-1",
1715
+ badge: "exam1",
1716
+ text: "Enem"
1717
+ },
1718
+ prova: {
1719
+ background: "bg-exam-2",
1720
+ badge: "exam2",
1721
+ text: "Prova"
1722
+ },
1723
+ simulado: {
1724
+ background: "bg-exam-3",
1725
+ badge: "exam3",
1726
+ text: "Simulado"
1727
+ },
1728
+ vestibular: {
1729
+ background: "bg-exam-4",
1730
+ badge: "exam4",
1731
+ text: "Vestibular"
1732
+ }
1733
+ };
1734
+ var CardSimulationHistory = (0, import_react.forwardRef)(({ data, onSimulationClick, className, ...props }, ref) => {
1735
+ return /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
1736
+ "div",
1737
+ {
1738
+ ref,
1739
+ className: `w-full max-w-[992px] h-auto ${className}`,
1740
+ ...props,
1741
+ children: /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("div", { className: "flex flex-col gap-0", children: [
1742
+ data.map((section, sectionIndex) => /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("div", { className: "flex flex-col", children: /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(
1743
+ "div",
1744
+ {
1745
+ className: `
1746
+ flex flex-row justify-center items-start px-4 py-6 gap-2 w-full bg-white
1747
+ ${sectionIndex === 0 ? "rounded-t-3xl" : ""}
1748
+ `,
1749
+ children: [
1750
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
1751
+ Text_default,
1752
+ {
1753
+ size: "xs",
1754
+ weight: "bold",
1755
+ className: "text-text-800 w-11 flex-shrink-0",
1756
+ children: section.date
1757
+ }
1758
+ ),
1759
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("div", { className: "flex flex-col gap-2 flex-1", children: section.simulations.map((simulation) => {
1760
+ const typeStyles = SIMULATION_TYPE_STYLES[simulation.type];
1761
+ return /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
1762
+ CardBase,
1763
+ {
1764
+ layout: "horizontal",
1765
+ padding: "medium",
1766
+ minHeight: "none",
1767
+ cursor: "pointer",
1768
+ className: `
1769
+ ${typeStyles.background} rounded-xl hover:shadow-soft-shadow-2
1770
+ transition-shadow duration-200 h-auto min-h-[61px]
1771
+ `,
1772
+ onClick: () => onSimulationClick?.(simulation),
1773
+ children: /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("div", { className: "flex justify-between items-center w-full gap-2", children: [
1774
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("div", { className: "flex flex-col gap-2 flex-1 min-w-0", children: [
1775
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
1776
+ Text_default,
1777
+ {
1778
+ size: "lg",
1779
+ weight: "bold",
1780
+ className: "text-text-950 truncate",
1781
+ children: simulation.title
1782
+ }
1783
+ ),
1784
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("div", { className: "flex items-center gap-2", children: [
1785
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
1786
+ Badge_default,
1787
+ {
1788
+ variant: "examsOutlined",
1789
+ action: typeStyles.badge,
1790
+ size: "medium",
1791
+ children: typeStyles.text
1792
+ }
1793
+ ),
1794
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(Text_default, { size: "sm", className: "text-text-800 truncate", children: simulation.info })
1795
+ ] })
1796
+ ] }),
1797
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
1798
+ import_phosphor_react2.CaretRight,
1799
+ {
1800
+ size: 24,
1801
+ className: "text-text-800 flex-shrink-0",
1802
+ "data-testid": "caret-icon"
1803
+ }
1804
+ )
1805
+ ] })
1806
+ },
1807
+ simulation.id
1808
+ );
1809
+ }) })
1810
+ ]
1811
+ }
1812
+ ) }, section.date)),
1813
+ data.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("div", { className: "w-full h-6 bg-white rounded-b-3xl" })
1814
+ ] })
1815
+ }
1816
+ );
1817
+ });
1712
1818
 
1713
1819
  // src/components/Accordation/Accordation.tsx
1714
1820
  var import_phosphor_react3 = require("phosphor-react");