analytica-frontend-lib 1.0.72 → 1.0.73
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/Accordation/index.js +119 -0
- package/dist/Accordation/index.js.map +1 -1
- package/dist/Accordation/index.mjs +119 -0
- package/dist/Accordation/index.mjs.map +1 -1
- package/dist/Card/index.d.mts +10 -1
- package/dist/Card/index.d.ts +10 -1
- package/dist/Card/index.js +121 -0
- package/dist/Card/index.js.map +1 -1
- package/dist/Card/index.mjs +120 -0
- package/dist/Card/index.mjs.map +1 -1
- package/dist/index.css +48 -0
- package/dist/index.css.map +1 -1
- package/dist/index.js +119 -0
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +119 -0
- package/dist/index.mjs.map +1 -1
- package/dist/styles.css +48 -0
- package/dist/styles.css.map +1 -1
- package/package.json +1 -1
package/dist/Card/index.mjs
CHANGED
|
@@ -1573,6 +1573,125 @@ var CardSimulado = forwardRef(
|
|
|
1573
1573
|
);
|
|
1574
1574
|
}
|
|
1575
1575
|
);
|
|
1576
|
+
var CardTest = forwardRef(
|
|
1577
|
+
({
|
|
1578
|
+
title,
|
|
1579
|
+
duration,
|
|
1580
|
+
questionsCount,
|
|
1581
|
+
additionalInfo,
|
|
1582
|
+
selected = false,
|
|
1583
|
+
onSelect,
|
|
1584
|
+
className = "",
|
|
1585
|
+
...props
|
|
1586
|
+
}, ref) => {
|
|
1587
|
+
const handleClick = () => {
|
|
1588
|
+
if (onSelect) {
|
|
1589
|
+
onSelect(!selected);
|
|
1590
|
+
}
|
|
1591
|
+
};
|
|
1592
|
+
const handleKeyDown = (event) => {
|
|
1593
|
+
if ((event.key === "Enter" || event.key === " ") && onSelect) {
|
|
1594
|
+
event.preventDefault();
|
|
1595
|
+
onSelect(!selected);
|
|
1596
|
+
}
|
|
1597
|
+
};
|
|
1598
|
+
const isSelectable = !!onSelect;
|
|
1599
|
+
const getQuestionsText = (count) => {
|
|
1600
|
+
const singular = count === 1 ? "quest\xE3o" : "quest\xF5es";
|
|
1601
|
+
return `${count} ${singular}`;
|
|
1602
|
+
};
|
|
1603
|
+
const displayInfo = questionsCount ? getQuestionsText(questionsCount) : additionalInfo || "";
|
|
1604
|
+
const baseClasses = "flex flex-row items-center p-4 gap-2 w-full max-w-full bg-background shadow-soft-shadow-1 rounded-xl isolate border-0 text-left";
|
|
1605
|
+
const interactiveClasses = isSelectable ? "cursor-pointer focus:outline-none focus:ring-2 focus:ring-primary-950 focus:ring-offset-2" : "";
|
|
1606
|
+
const selectedClasses = selected ? "ring-2 ring-primary-950 ring-offset-2" : "";
|
|
1607
|
+
if (isSelectable) {
|
|
1608
|
+
return /* @__PURE__ */ jsx5(
|
|
1609
|
+
"button",
|
|
1610
|
+
{
|
|
1611
|
+
ref,
|
|
1612
|
+
type: "button",
|
|
1613
|
+
className: `${baseClasses} ${interactiveClasses} ${selectedClasses} ${className}`.trim(),
|
|
1614
|
+
onClick: handleClick,
|
|
1615
|
+
onKeyDown: handleKeyDown,
|
|
1616
|
+
"aria-pressed": selected,
|
|
1617
|
+
...props,
|
|
1618
|
+
children: /* @__PURE__ */ jsxs4("div", { className: "flex flex-col justify-between gap-[27px] flex-grow min-h-[67px] w-full min-w-0", children: [
|
|
1619
|
+
/* @__PURE__ */ jsx5(
|
|
1620
|
+
Text_default,
|
|
1621
|
+
{
|
|
1622
|
+
size: "md",
|
|
1623
|
+
weight: "bold",
|
|
1624
|
+
className: "text-text-950 tracking-[0.2px] leading-[19px] truncate",
|
|
1625
|
+
children: title
|
|
1626
|
+
}
|
|
1627
|
+
),
|
|
1628
|
+
/* @__PURE__ */ jsxs4("div", { className: "flex flex-row justify-start items-end gap-4 w-full", children: [
|
|
1629
|
+
duration && /* @__PURE__ */ jsxs4("div", { className: "flex flex-row items-center gap-1 flex-shrink-0", children: [
|
|
1630
|
+
/* @__PURE__ */ jsx5(Clock, { size: 16, className: "text-text-700" }),
|
|
1631
|
+
/* @__PURE__ */ jsx5(
|
|
1632
|
+
Text_default,
|
|
1633
|
+
{
|
|
1634
|
+
size: "sm",
|
|
1635
|
+
className: "text-text-700 leading-[21px] whitespace-nowrap",
|
|
1636
|
+
children: duration
|
|
1637
|
+
}
|
|
1638
|
+
)
|
|
1639
|
+
] }),
|
|
1640
|
+
/* @__PURE__ */ jsx5(
|
|
1641
|
+
Text_default,
|
|
1642
|
+
{
|
|
1643
|
+
size: "sm",
|
|
1644
|
+
className: "text-text-700 leading-[21px] flex-grow truncate",
|
|
1645
|
+
children: displayInfo
|
|
1646
|
+
}
|
|
1647
|
+
)
|
|
1648
|
+
] })
|
|
1649
|
+
] })
|
|
1650
|
+
}
|
|
1651
|
+
);
|
|
1652
|
+
}
|
|
1653
|
+
return /* @__PURE__ */ jsx5(
|
|
1654
|
+
"div",
|
|
1655
|
+
{
|
|
1656
|
+
ref,
|
|
1657
|
+
className: `${baseClasses} ${className}`.trim(),
|
|
1658
|
+
...props,
|
|
1659
|
+
children: /* @__PURE__ */ jsxs4("div", { className: "flex flex-col justify-between gap-[27px] flex-grow min-h-[67px] w-full min-w-0", children: [
|
|
1660
|
+
/* @__PURE__ */ jsx5(
|
|
1661
|
+
Text_default,
|
|
1662
|
+
{
|
|
1663
|
+
size: "md",
|
|
1664
|
+
weight: "bold",
|
|
1665
|
+
className: "text-text-950 tracking-[0.2px] leading-[19px] truncate",
|
|
1666
|
+
children: title
|
|
1667
|
+
}
|
|
1668
|
+
),
|
|
1669
|
+
/* @__PURE__ */ jsxs4("div", { className: "flex flex-row justify-start items-end gap-4 w-full", children: [
|
|
1670
|
+
duration && /* @__PURE__ */ jsxs4("div", { className: "flex flex-row items-center gap-1 flex-shrink-0", children: [
|
|
1671
|
+
/* @__PURE__ */ jsx5(Clock, { size: 16, className: "text-text-700" }),
|
|
1672
|
+
/* @__PURE__ */ jsx5(
|
|
1673
|
+
Text_default,
|
|
1674
|
+
{
|
|
1675
|
+
size: "sm",
|
|
1676
|
+
className: "text-text-700 leading-[21px] whitespace-nowrap",
|
|
1677
|
+
children: duration
|
|
1678
|
+
}
|
|
1679
|
+
)
|
|
1680
|
+
] }),
|
|
1681
|
+
/* @__PURE__ */ jsx5(
|
|
1682
|
+
Text_default,
|
|
1683
|
+
{
|
|
1684
|
+
size: "sm",
|
|
1685
|
+
className: "text-text-700 leading-[21px] flex-grow truncate min-w-0",
|
|
1686
|
+
children: displayInfo
|
|
1687
|
+
}
|
|
1688
|
+
)
|
|
1689
|
+
] })
|
|
1690
|
+
] })
|
|
1691
|
+
}
|
|
1692
|
+
);
|
|
1693
|
+
}
|
|
1694
|
+
);
|
|
1576
1695
|
export {
|
|
1577
1696
|
CardActivitiesResults,
|
|
1578
1697
|
CardAudio,
|
|
@@ -1586,6 +1705,7 @@ export {
|
|
|
1586
1705
|
CardSimulado,
|
|
1587
1706
|
CardStatus,
|
|
1588
1707
|
CardSupport,
|
|
1708
|
+
CardTest,
|
|
1589
1709
|
CardTopic
|
|
1590
1710
|
};
|
|
1591
1711
|
//# sourceMappingURL=index.mjs.map
|