analytica-frontend-lib 1.0.35 → 1.0.37
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/ProgressBar/index.d.mts +60 -0
- package/dist/ProgressBar/index.d.ts +60 -0
- package/dist/ProgressBar/index.js +220 -0
- package/dist/ProgressBar/index.js.map +1 -0
- package/dist/ProgressBar/index.mjs +198 -0
- package/dist/ProgressBar/index.mjs.map +1 -0
- package/dist/ProgressCircle/index.d.mts +60 -0
- package/dist/ProgressCircle/index.d.ts +60 -0
- package/dist/ProgressCircle/index.js +244 -0
- package/dist/ProgressCircle/index.js.map +1 -0
- package/dist/ProgressCircle/index.mjs +222 -0
- package/dist/ProgressCircle/index.mjs.map +1 -0
- package/dist/Radio/index.d.mts +85 -0
- package/dist/Radio/index.d.ts +85 -0
- package/dist/Radio/index.js +299 -0
- package/dist/Radio/index.js.map +1 -0
- package/dist/Radio/index.mjs +283 -0
- package/dist/Radio/index.mjs.map +1 -0
- package/dist/index.css +244 -0
- package/dist/index.css.map +1 -1
- package/dist/index.d.mts +6 -59
- package/dist/index.d.ts +6 -59
- package/dist/index.js +343 -31
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +341 -31
- package/dist/index.mjs.map +1 -1
- package/dist/styles.css +244 -0
- package/dist/styles.css.map +1 -1
- package/package.json +3 -1
package/dist/index.mjs
CHANGED
|
@@ -1459,6 +1459,314 @@ var Chips = ({
|
|
|
1459
1459
|
};
|
|
1460
1460
|
var Chips_default = Chips;
|
|
1461
1461
|
|
|
1462
|
+
// src/components/ProgressBar/ProgressBar.tsx
|
|
1463
|
+
import { jsx as jsx18, jsxs as jsxs13 } from "react/jsx-runtime";
|
|
1464
|
+
var SIZE_CLASSES7 = {
|
|
1465
|
+
small: {
|
|
1466
|
+
container: "h-1",
|
|
1467
|
+
// 4px height (h-1 = 4px in Tailwind)
|
|
1468
|
+
bar: "h-1",
|
|
1469
|
+
// 4px height for the fill bar
|
|
1470
|
+
labelSize: "xs",
|
|
1471
|
+
spacing: "gap-2",
|
|
1472
|
+
// 8px gap between label and progress bar
|
|
1473
|
+
layout: "flex-col",
|
|
1474
|
+
// vertical layout for small
|
|
1475
|
+
borderRadius: "rounded-full"
|
|
1476
|
+
// 9999px border radius
|
|
1477
|
+
},
|
|
1478
|
+
medium: {
|
|
1479
|
+
container: "h-2",
|
|
1480
|
+
// 8px height (h-2 = 8px in Tailwind)
|
|
1481
|
+
bar: "h-2",
|
|
1482
|
+
// 8px height for the fill bar
|
|
1483
|
+
labelSize: "xs",
|
|
1484
|
+
// 12px font size (xs in Tailwind)
|
|
1485
|
+
spacing: "gap-2",
|
|
1486
|
+
// 8px gap between progress bar and label
|
|
1487
|
+
layout: "flex-row items-center",
|
|
1488
|
+
// horizontal layout for medium
|
|
1489
|
+
borderRadius: "rounded-lg"
|
|
1490
|
+
// 8px border radius
|
|
1491
|
+
}
|
|
1492
|
+
};
|
|
1493
|
+
var VARIANT_CLASSES2 = {
|
|
1494
|
+
blue: {
|
|
1495
|
+
background: "bg-background-300",
|
|
1496
|
+
// Background track color (#D5D4D4)
|
|
1497
|
+
fill: "bg-primary-700"
|
|
1498
|
+
// Blue for activity progress (#2271C4)
|
|
1499
|
+
},
|
|
1500
|
+
green: {
|
|
1501
|
+
background: "bg-background-300",
|
|
1502
|
+
// Background track color (#D5D4D4)
|
|
1503
|
+
fill: "bg-success-200"
|
|
1504
|
+
// Green for performance (#84D3A2)
|
|
1505
|
+
}
|
|
1506
|
+
};
|
|
1507
|
+
var ProgressBar = ({
|
|
1508
|
+
value,
|
|
1509
|
+
max = 100,
|
|
1510
|
+
size = "medium",
|
|
1511
|
+
variant = "blue",
|
|
1512
|
+
label,
|
|
1513
|
+
showPercentage = false,
|
|
1514
|
+
className = "",
|
|
1515
|
+
labelClassName = "",
|
|
1516
|
+
percentageClassName = ""
|
|
1517
|
+
}) => {
|
|
1518
|
+
const safeValue = isNaN(value) ? 0 : value;
|
|
1519
|
+
const clampedValue = Math.max(0, Math.min(safeValue, max));
|
|
1520
|
+
const percentage = max === 0 ? 0 : clampedValue / max * 100;
|
|
1521
|
+
const sizeClasses = SIZE_CLASSES7[size];
|
|
1522
|
+
const variantClasses = VARIANT_CLASSES2[variant];
|
|
1523
|
+
return /* @__PURE__ */ jsxs13(
|
|
1524
|
+
"div",
|
|
1525
|
+
{
|
|
1526
|
+
className: `flex ${sizeClasses.layout} ${sizeClasses.spacing} ${className}`,
|
|
1527
|
+
children: [
|
|
1528
|
+
size === "small" && (label || showPercentage) && /* @__PURE__ */ jsxs13("div", { className: "flex flex-row items-center justify-between w-full", children: [
|
|
1529
|
+
label && /* @__PURE__ */ jsx18(
|
|
1530
|
+
Text_default,
|
|
1531
|
+
{
|
|
1532
|
+
as: "div",
|
|
1533
|
+
size: sizeClasses.labelSize,
|
|
1534
|
+
weight: "medium",
|
|
1535
|
+
className: `text-text-950 ${labelClassName}`,
|
|
1536
|
+
children: label
|
|
1537
|
+
}
|
|
1538
|
+
),
|
|
1539
|
+
showPercentage && /* @__PURE__ */ jsxs13(
|
|
1540
|
+
Text_default,
|
|
1541
|
+
{
|
|
1542
|
+
size: sizeClasses.labelSize,
|
|
1543
|
+
weight: "medium",
|
|
1544
|
+
className: `text-text-700 text-center ${percentageClassName}`,
|
|
1545
|
+
children: [
|
|
1546
|
+
Math.round(percentage),
|
|
1547
|
+
"%"
|
|
1548
|
+
]
|
|
1549
|
+
}
|
|
1550
|
+
)
|
|
1551
|
+
] }),
|
|
1552
|
+
/* @__PURE__ */ jsxs13(
|
|
1553
|
+
"div",
|
|
1554
|
+
{
|
|
1555
|
+
className: `${size === "medium" ? "flex-grow" : "w-full"} ${sizeClasses.container} ${variantClasses.background} ${sizeClasses.borderRadius} overflow-hidden relative`,
|
|
1556
|
+
children: [
|
|
1557
|
+
/* @__PURE__ */ jsx18(
|
|
1558
|
+
"progress",
|
|
1559
|
+
{
|
|
1560
|
+
value: clampedValue,
|
|
1561
|
+
max,
|
|
1562
|
+
"aria-label": typeof label === "string" ? label : "Progress",
|
|
1563
|
+
className: "absolute inset-0 w-full h-full opacity-0"
|
|
1564
|
+
}
|
|
1565
|
+
),
|
|
1566
|
+
/* @__PURE__ */ jsx18(
|
|
1567
|
+
"div",
|
|
1568
|
+
{
|
|
1569
|
+
className: `${sizeClasses.bar} ${variantClasses.fill} ${sizeClasses.borderRadius} transition-all duration-300 ease-out shadow-hard-shadow-3`,
|
|
1570
|
+
style: { width: `${percentage}%` }
|
|
1571
|
+
}
|
|
1572
|
+
)
|
|
1573
|
+
]
|
|
1574
|
+
}
|
|
1575
|
+
),
|
|
1576
|
+
size === "medium" && showPercentage && /* @__PURE__ */ jsxs13(
|
|
1577
|
+
Text_default,
|
|
1578
|
+
{
|
|
1579
|
+
size: sizeClasses.labelSize,
|
|
1580
|
+
weight: "medium",
|
|
1581
|
+
className: `text-text-950 text-center flex-none w-[70px] ${percentageClassName}`,
|
|
1582
|
+
children: [
|
|
1583
|
+
Math.round(percentage),
|
|
1584
|
+
"%"
|
|
1585
|
+
]
|
|
1586
|
+
}
|
|
1587
|
+
),
|
|
1588
|
+
size === "medium" && label && !showPercentage && /* @__PURE__ */ jsx18(
|
|
1589
|
+
Text_default,
|
|
1590
|
+
{
|
|
1591
|
+
as: "div",
|
|
1592
|
+
size: sizeClasses.labelSize,
|
|
1593
|
+
weight: "medium",
|
|
1594
|
+
className: `text-text-950 flex-none ${labelClassName}`,
|
|
1595
|
+
children: label
|
|
1596
|
+
}
|
|
1597
|
+
)
|
|
1598
|
+
]
|
|
1599
|
+
}
|
|
1600
|
+
);
|
|
1601
|
+
};
|
|
1602
|
+
var ProgressBar_default = ProgressBar;
|
|
1603
|
+
|
|
1604
|
+
// src/components/ProgressCircle/ProgressCircle.tsx
|
|
1605
|
+
import { jsx as jsx19, jsxs as jsxs14 } from "react/jsx-runtime";
|
|
1606
|
+
var SIZE_CLASSES8 = {
|
|
1607
|
+
small: {
|
|
1608
|
+
container: "w-[90px] h-[90px]",
|
|
1609
|
+
// 90px circle from design specs
|
|
1610
|
+
strokeWidth: 4,
|
|
1611
|
+
// 4px stroke width - matches ProgressBar small (h-1)
|
|
1612
|
+
textSize: "2xl",
|
|
1613
|
+
// 24px for percentage (font-size: 24px)
|
|
1614
|
+
textWeight: "medium",
|
|
1615
|
+
// font-weight: 500
|
|
1616
|
+
labelSize: "2xs",
|
|
1617
|
+
// 10px for status label (closest to 8px design spec)
|
|
1618
|
+
labelWeight: "bold",
|
|
1619
|
+
// font-weight: 700
|
|
1620
|
+
spacing: "gap-1"
|
|
1621
|
+
// 4px gap between percentage and label
|
|
1622
|
+
},
|
|
1623
|
+
medium: {
|
|
1624
|
+
container: "w-[152px] h-[152px]",
|
|
1625
|
+
// 151.67px ≈ 152px circle from design specs
|
|
1626
|
+
strokeWidth: 8,
|
|
1627
|
+
// 8px stroke width - matches ProgressBar medium (h-2)
|
|
1628
|
+
textSize: "2xl",
|
|
1629
|
+
// 24px for percentage (font-size: 24px)
|
|
1630
|
+
textWeight: "medium",
|
|
1631
|
+
// font-weight: 500
|
|
1632
|
+
labelSize: "xs",
|
|
1633
|
+
// 12px for status label (font-size: 12px)
|
|
1634
|
+
labelWeight: "medium",
|
|
1635
|
+
// font-weight: 500 (changed from bold)
|
|
1636
|
+
spacing: "gap-1"
|
|
1637
|
+
// 4px gap between percentage and label
|
|
1638
|
+
}
|
|
1639
|
+
};
|
|
1640
|
+
var VARIANT_CLASSES3 = {
|
|
1641
|
+
blue: {
|
|
1642
|
+
background: "stroke-primary-100",
|
|
1643
|
+
// Light blue background (#BBDCF7)
|
|
1644
|
+
fill: "stroke-primary-700",
|
|
1645
|
+
// Blue for activity progress (#2271C4)
|
|
1646
|
+
textColor: "text-primary-700",
|
|
1647
|
+
// Blue text color (#2271C4)
|
|
1648
|
+
labelColor: "text-text-700"
|
|
1649
|
+
// Gray text for label (#525252)
|
|
1650
|
+
},
|
|
1651
|
+
green: {
|
|
1652
|
+
background: "stroke-background-300",
|
|
1653
|
+
// Gray background (#D5D4D4 - matches design)
|
|
1654
|
+
fill: "stroke-success-200",
|
|
1655
|
+
// Green for performance (#84D3A2 - matches design)
|
|
1656
|
+
textColor: "text-text-800",
|
|
1657
|
+
// Dark gray text (#404040 - matches design)
|
|
1658
|
+
labelColor: "text-text-600"
|
|
1659
|
+
// Medium gray text for label (#737373 - matches design)
|
|
1660
|
+
}
|
|
1661
|
+
};
|
|
1662
|
+
var ProgressCircle = ({
|
|
1663
|
+
value,
|
|
1664
|
+
max = 100,
|
|
1665
|
+
size = "small",
|
|
1666
|
+
variant = "blue",
|
|
1667
|
+
label,
|
|
1668
|
+
showPercentage = true,
|
|
1669
|
+
className = "",
|
|
1670
|
+
labelClassName = "",
|
|
1671
|
+
percentageClassName = ""
|
|
1672
|
+
}) => {
|
|
1673
|
+
const safeValue = isNaN(value) ? 0 : value;
|
|
1674
|
+
const clampedValue = Math.max(0, Math.min(safeValue, max));
|
|
1675
|
+
const percentage = max === 0 ? 0 : clampedValue / max * 100;
|
|
1676
|
+
const sizeClasses = SIZE_CLASSES8[size];
|
|
1677
|
+
const variantClasses = VARIANT_CLASSES3[variant];
|
|
1678
|
+
const radius = size === "small" ? 37 : 64;
|
|
1679
|
+
const circumference = 2 * Math.PI * radius;
|
|
1680
|
+
const strokeDashoffset = circumference - percentage / 100 * circumference;
|
|
1681
|
+
const center = size === "small" ? 45 : 76;
|
|
1682
|
+
const svgSize = size === "small" ? 90 : 152;
|
|
1683
|
+
return /* @__PURE__ */ jsxs14(
|
|
1684
|
+
"div",
|
|
1685
|
+
{
|
|
1686
|
+
className: `relative flex flex-col items-center justify-center ${sizeClasses.container} rounded-lg ${className}`,
|
|
1687
|
+
children: [
|
|
1688
|
+
/* @__PURE__ */ jsxs14(
|
|
1689
|
+
"svg",
|
|
1690
|
+
{
|
|
1691
|
+
className: "absolute inset-0 transform -rotate-90",
|
|
1692
|
+
width: svgSize,
|
|
1693
|
+
height: svgSize,
|
|
1694
|
+
viewBox: `0 0 ${svgSize} ${svgSize}`,
|
|
1695
|
+
"aria-hidden": "true",
|
|
1696
|
+
children: [
|
|
1697
|
+
/* @__PURE__ */ jsx19(
|
|
1698
|
+
"circle",
|
|
1699
|
+
{
|
|
1700
|
+
cx: center,
|
|
1701
|
+
cy: center,
|
|
1702
|
+
r: radius,
|
|
1703
|
+
fill: "none",
|
|
1704
|
+
strokeWidth: sizeClasses.strokeWidth,
|
|
1705
|
+
className: `${variantClasses.background} rounded-lg`
|
|
1706
|
+
}
|
|
1707
|
+
),
|
|
1708
|
+
/* @__PURE__ */ jsx19(
|
|
1709
|
+
"circle",
|
|
1710
|
+
{
|
|
1711
|
+
cx: center,
|
|
1712
|
+
cy: center,
|
|
1713
|
+
r: radius,
|
|
1714
|
+
fill: "none",
|
|
1715
|
+
strokeWidth: sizeClasses.strokeWidth,
|
|
1716
|
+
strokeLinecap: "round",
|
|
1717
|
+
strokeDasharray: circumference,
|
|
1718
|
+
strokeDashoffset,
|
|
1719
|
+
className: `${variantClasses.fill} transition-all duration-500 ease-out shadow-soft-shadow-3 rounded-lg`
|
|
1720
|
+
}
|
|
1721
|
+
)
|
|
1722
|
+
]
|
|
1723
|
+
}
|
|
1724
|
+
),
|
|
1725
|
+
/* @__PURE__ */ jsx19(
|
|
1726
|
+
"progress",
|
|
1727
|
+
{
|
|
1728
|
+
value: clampedValue,
|
|
1729
|
+
max,
|
|
1730
|
+
"aria-label": typeof label === "string" ? label : "Progress",
|
|
1731
|
+
className: "absolute opacity-0 w-0 h-0"
|
|
1732
|
+
}
|
|
1733
|
+
),
|
|
1734
|
+
/* @__PURE__ */ jsxs14(
|
|
1735
|
+
"div",
|
|
1736
|
+
{
|
|
1737
|
+
className: `relative z-10 flex flex-col items-center justify-center ${sizeClasses.spacing}`,
|
|
1738
|
+
children: [
|
|
1739
|
+
showPercentage && /* @__PURE__ */ jsxs14(
|
|
1740
|
+
Text_default,
|
|
1741
|
+
{
|
|
1742
|
+
size: sizeClasses.textSize,
|
|
1743
|
+
weight: sizeClasses.textWeight,
|
|
1744
|
+
className: `text-center ${variantClasses.textColor} ${percentageClassName}`,
|
|
1745
|
+
children: [
|
|
1746
|
+
Math.round(percentage),
|
|
1747
|
+
"%"
|
|
1748
|
+
]
|
|
1749
|
+
}
|
|
1750
|
+
),
|
|
1751
|
+
label && /* @__PURE__ */ jsx19(
|
|
1752
|
+
Text_default,
|
|
1753
|
+
{
|
|
1754
|
+
as: "span",
|
|
1755
|
+
size: sizeClasses.labelSize,
|
|
1756
|
+
weight: sizeClasses.labelWeight,
|
|
1757
|
+
className: `${variantClasses.labelColor} text-center uppercase tracking-wide ${labelClassName}`,
|
|
1758
|
+
children: label
|
|
1759
|
+
}
|
|
1760
|
+
)
|
|
1761
|
+
]
|
|
1762
|
+
}
|
|
1763
|
+
)
|
|
1764
|
+
]
|
|
1765
|
+
}
|
|
1766
|
+
);
|
|
1767
|
+
};
|
|
1768
|
+
var ProgressCircle_default = ProgressCircle;
|
|
1769
|
+
|
|
1462
1770
|
// src/components/DropdownMenu/DropdownMenu.tsx
|
|
1463
1771
|
import { SignOut, User } from "phosphor-react";
|
|
1464
1772
|
import {
|
|
@@ -1471,7 +1779,7 @@ import {
|
|
|
1471
1779
|
useState as useState5
|
|
1472
1780
|
} from "react";
|
|
1473
1781
|
import { create as create2, useStore } from "zustand";
|
|
1474
|
-
import { jsx as
|
|
1782
|
+
import { jsx as jsx20, jsxs as jsxs15 } from "react/jsx-runtime";
|
|
1475
1783
|
function createDropdownStore() {
|
|
1476
1784
|
return create2((set) => ({
|
|
1477
1785
|
open: false,
|
|
@@ -1562,13 +1870,13 @@ var DropdownMenu = ({ children, open, onOpenChange }) => {
|
|
|
1562
1870
|
store.setState({ open });
|
|
1563
1871
|
}
|
|
1564
1872
|
}, []);
|
|
1565
|
-
return /* @__PURE__ */
|
|
1873
|
+
return /* @__PURE__ */ jsx20("div", { className: "relative", ref: menuRef, children: injectStore(children, store) });
|
|
1566
1874
|
};
|
|
1567
1875
|
var DropdownMenuTrigger = forwardRef9(({ className, children, onClick, store: externalStore, ...props }, ref) => {
|
|
1568
1876
|
const store = useDropdownStore(externalStore);
|
|
1569
1877
|
const open = useStore(store, (s) => s.open);
|
|
1570
1878
|
const toggleOpen = () => store.setState({ open: !open });
|
|
1571
|
-
return /* @__PURE__ */
|
|
1879
|
+
return /* @__PURE__ */ jsx20(
|
|
1572
1880
|
"button",
|
|
1573
1881
|
{
|
|
1574
1882
|
ref,
|
|
@@ -1601,7 +1909,7 @@ var ALIGN_CLASSES = {
|
|
|
1601
1909
|
end: "right-0"
|
|
1602
1910
|
};
|
|
1603
1911
|
var MenuLabel = forwardRef9(({ className, inset, store: _store, ...props }, ref) => {
|
|
1604
|
-
return /* @__PURE__ */
|
|
1912
|
+
return /* @__PURE__ */ jsx20(
|
|
1605
1913
|
"div",
|
|
1606
1914
|
{
|
|
1607
1915
|
ref,
|
|
@@ -1638,7 +1946,7 @@ var MenuContent = forwardRef9(
|
|
|
1638
1946
|
const horizontal = ALIGN_CLASSES[align];
|
|
1639
1947
|
return `absolute ${vertical} ${horizontal}`;
|
|
1640
1948
|
};
|
|
1641
|
-
return /* @__PURE__ */
|
|
1949
|
+
return /* @__PURE__ */ jsx20(
|
|
1642
1950
|
"div",
|
|
1643
1951
|
{
|
|
1644
1952
|
ref,
|
|
@@ -1696,7 +2004,7 @@ var MenuItem = forwardRef9(
|
|
|
1696
2004
|
const getVariantProps = () => {
|
|
1697
2005
|
return variant === "profile" ? { "data-variant": "profile" } : {};
|
|
1698
2006
|
};
|
|
1699
|
-
return /* @__PURE__ */
|
|
2007
|
+
return /* @__PURE__ */ jsxs15(
|
|
1700
2008
|
"div",
|
|
1701
2009
|
{
|
|
1702
2010
|
ref,
|
|
@@ -1726,7 +2034,7 @@ var MenuItem = forwardRef9(
|
|
|
1726
2034
|
}
|
|
1727
2035
|
);
|
|
1728
2036
|
MenuItem.displayName = "MenuItem";
|
|
1729
|
-
var MenuSeparator = forwardRef9(({ className, store: _store, ...props }, ref) => /* @__PURE__ */
|
|
2037
|
+
var MenuSeparator = forwardRef9(({ className, store: _store, ...props }, ref) => /* @__PURE__ */ jsx20(
|
|
1730
2038
|
"div",
|
|
1731
2039
|
{
|
|
1732
2040
|
ref,
|
|
@@ -1739,7 +2047,7 @@ var ProfileMenuTrigger = forwardRef9(({ className, onClick, store: externalStore
|
|
|
1739
2047
|
const store = useDropdownStore(externalStore);
|
|
1740
2048
|
const open = useStore(store, (s) => s.open);
|
|
1741
2049
|
const toggleOpen = () => store.setState({ open: !open });
|
|
1742
|
-
return /* @__PURE__ */
|
|
2050
|
+
return /* @__PURE__ */ jsx20(
|
|
1743
2051
|
"button",
|
|
1744
2052
|
{
|
|
1745
2053
|
ref,
|
|
@@ -1751,13 +2059,13 @@ var ProfileMenuTrigger = forwardRef9(({ className, onClick, store: externalStore
|
|
|
1751
2059
|
},
|
|
1752
2060
|
"aria-expanded": open,
|
|
1753
2061
|
...props,
|
|
1754
|
-
children: /* @__PURE__ */
|
|
2062
|
+
children: /* @__PURE__ */ jsx20("span", { className: "size-6 rounded-full bg-background-100 flex items-center justify-center", children: /* @__PURE__ */ jsx20(User, { className: "text-background-950", size: 18 }) })
|
|
1755
2063
|
}
|
|
1756
2064
|
);
|
|
1757
2065
|
});
|
|
1758
2066
|
ProfileMenuTrigger.displayName = "ProfileMenuTrigger";
|
|
1759
2067
|
var ProfileMenuHeader = forwardRef9(({ className, name, email, store: _store, ...props }, ref) => {
|
|
1760
|
-
return /* @__PURE__ */
|
|
2068
|
+
return /* @__PURE__ */ jsxs15(
|
|
1761
2069
|
"div",
|
|
1762
2070
|
{
|
|
1763
2071
|
ref,
|
|
@@ -1768,10 +2076,10 @@ var ProfileMenuHeader = forwardRef9(({ className, name, email, store: _store, ..
|
|
|
1768
2076
|
`,
|
|
1769
2077
|
...props,
|
|
1770
2078
|
children: [
|
|
1771
|
-
/* @__PURE__ */
|
|
1772
|
-
/* @__PURE__ */
|
|
1773
|
-
/* @__PURE__ */
|
|
1774
|
-
/* @__PURE__ */
|
|
2079
|
+
/* @__PURE__ */ jsx20("span", { className: "size-16 bg-background-100 rounded-full flex items-center justify-center", children: /* @__PURE__ */ jsx20(User, { size: 34, className: "text-background-950" }) }),
|
|
2080
|
+
/* @__PURE__ */ jsxs15("div", { className: "flex flex-col ", children: [
|
|
2081
|
+
/* @__PURE__ */ jsx20("p", { className: "text-xl font-bold text-text-950", children: name }),
|
|
2082
|
+
/* @__PURE__ */ jsx20("p", { className: "text-md text-text-600", children: email })
|
|
1775
2083
|
] })
|
|
1776
2084
|
]
|
|
1777
2085
|
}
|
|
@@ -1779,7 +2087,7 @@ var ProfileMenuHeader = forwardRef9(({ className, name, email, store: _store, ..
|
|
|
1779
2087
|
});
|
|
1780
2088
|
ProfileMenuHeader.displayName = "ProfileMenuHeader";
|
|
1781
2089
|
var ProfileMenuSection = forwardRef9(({ className, children, store: _store, ...props }, ref) => {
|
|
1782
|
-
return /* @__PURE__ */
|
|
2090
|
+
return /* @__PURE__ */ jsx20(
|
|
1783
2091
|
"div",
|
|
1784
2092
|
{
|
|
1785
2093
|
ref,
|
|
@@ -1797,7 +2105,7 @@ var ProfileMenuFooter = forwardRef9(
|
|
|
1797
2105
|
({ className, disabled = false, onClick, store: externalStore, ...props }, ref) => {
|
|
1798
2106
|
const store = useDropdownStore(externalStore);
|
|
1799
2107
|
const setOpen = useStore(store, (s) => s.setOpen);
|
|
1800
|
-
return /* @__PURE__ */
|
|
2108
|
+
return /* @__PURE__ */ jsxs15(
|
|
1801
2109
|
"button",
|
|
1802
2110
|
{
|
|
1803
2111
|
ref,
|
|
@@ -1809,8 +2117,8 @@ var ProfileMenuFooter = forwardRef9(
|
|
|
1809
2117
|
},
|
|
1810
2118
|
...props,
|
|
1811
2119
|
children: [
|
|
1812
|
-
/* @__PURE__ */
|
|
1813
|
-
/* @__PURE__ */
|
|
2120
|
+
/* @__PURE__ */ jsx20("span", { className: "mr-2 flex items-center", children: /* @__PURE__ */ jsx20(SignOut, {}) }),
|
|
2121
|
+
/* @__PURE__ */ jsx20("span", { children: "Sair" })
|
|
1814
2122
|
]
|
|
1815
2123
|
}
|
|
1816
2124
|
);
|
|
@@ -1830,13 +2138,13 @@ import {
|
|
|
1830
2138
|
cloneElement as cloneElement2
|
|
1831
2139
|
} from "react";
|
|
1832
2140
|
import { CaretDown, Check as Check3 } from "phosphor-react";
|
|
1833
|
-
import { Fragment as Fragment2, jsx as
|
|
1834
|
-
var
|
|
2141
|
+
import { Fragment as Fragment2, jsx as jsx21, jsxs as jsxs16 } from "react/jsx-runtime";
|
|
2142
|
+
var VARIANT_CLASSES4 = {
|
|
1835
2143
|
outlined: "border-2 rounded-sm focus:border-primary-950",
|
|
1836
2144
|
underlined: "border-b-2 focus:border-primary-950",
|
|
1837
2145
|
rounded: "border-2 rounded-4xl focus:border-primary-950"
|
|
1838
2146
|
};
|
|
1839
|
-
var
|
|
2147
|
+
var SIZE_CLASSES9 = {
|
|
1840
2148
|
small: "text-sm",
|
|
1841
2149
|
medium: "text-md",
|
|
1842
2150
|
large: "text-lg"
|
|
@@ -1876,7 +2184,7 @@ function getLabelAsNode(children) {
|
|
|
1876
2184
|
}
|
|
1877
2185
|
const flattened = Children2.toArray(children);
|
|
1878
2186
|
if (flattened.length === 1) return flattened[0];
|
|
1879
|
-
return /* @__PURE__ */
|
|
2187
|
+
return /* @__PURE__ */ jsx21(Fragment2, { children: flattened });
|
|
1880
2188
|
}
|
|
1881
2189
|
var injectStore2 = (children, store) => {
|
|
1882
2190
|
return Children2.map(children, (child) => {
|
|
@@ -1974,8 +2282,8 @@ var Select = ({
|
|
|
1974
2282
|
onValueChange(value);
|
|
1975
2283
|
}
|
|
1976
2284
|
}, [value]);
|
|
1977
|
-
const sizeClasses =
|
|
1978
|
-
return /* @__PURE__ */
|
|
2285
|
+
const sizeClasses = SIZE_CLASSES9[size];
|
|
2286
|
+
return /* @__PURE__ */ jsx21("div", { className: `relative ${sizeClasses} w-[288px]`, ref: selectRef, children: injectStore2(children, store) });
|
|
1979
2287
|
};
|
|
1980
2288
|
var SelectValue = ({
|
|
1981
2289
|
placeholder,
|
|
@@ -1984,7 +2292,7 @@ var SelectValue = ({
|
|
|
1984
2292
|
const store = useSelectStore(externalStore);
|
|
1985
2293
|
const selectedLabel = useStore2(store, (s) => s.selectedLabel);
|
|
1986
2294
|
const value = useStore2(store, (s) => s.value);
|
|
1987
|
-
return /* @__PURE__ */
|
|
2295
|
+
return /* @__PURE__ */ jsx21("span", { className: "text-inherit", children: selectedLabel || placeholder || value });
|
|
1988
2296
|
};
|
|
1989
2297
|
var SelectTrigger = forwardRef10(
|
|
1990
2298
|
({
|
|
@@ -1998,8 +2306,8 @@ var SelectTrigger = forwardRef10(
|
|
|
1998
2306
|
const store = useSelectStore(externalStore);
|
|
1999
2307
|
const open = useStore2(store, (s) => s.open);
|
|
2000
2308
|
const toggleOpen = () => store.setState({ open: !open });
|
|
2001
|
-
const variantClasses =
|
|
2002
|
-
return /* @__PURE__ */
|
|
2309
|
+
const variantClasses = VARIANT_CLASSES4[variant];
|
|
2310
|
+
return /* @__PURE__ */ jsxs16(
|
|
2003
2311
|
"button",
|
|
2004
2312
|
{
|
|
2005
2313
|
ref,
|
|
@@ -2017,7 +2325,7 @@ var SelectTrigger = forwardRef10(
|
|
|
2017
2325
|
...props,
|
|
2018
2326
|
children: [
|
|
2019
2327
|
props.children,
|
|
2020
|
-
/* @__PURE__ */
|
|
2328
|
+
/* @__PURE__ */ jsx21(
|
|
2021
2329
|
CaretDown,
|
|
2022
2330
|
{
|
|
2023
2331
|
className: `h-[1em] w-[1em] opacity-50 transition-transform ${open ? "rotate-180" : ""}`
|
|
@@ -2042,7 +2350,7 @@ var SelectContent = forwardRef10(
|
|
|
2042
2350
|
const open = useStore2(store, (s) => s.open);
|
|
2043
2351
|
if (!open) return null;
|
|
2044
2352
|
const getPositionClasses = () => `absolute ${SIDE_CLASSES2[side]} ${ALIGN_CLASSES2[align]}`;
|
|
2045
|
-
return /* @__PURE__ */
|
|
2353
|
+
return /* @__PURE__ */ jsx21(
|
|
2046
2354
|
"div",
|
|
2047
2355
|
{
|
|
2048
2356
|
role: "menu",
|
|
@@ -2076,7 +2384,7 @@ var SelectItem = forwardRef10(
|
|
|
2076
2384
|
}
|
|
2077
2385
|
props.onClick?.(e);
|
|
2078
2386
|
};
|
|
2079
|
-
return /* @__PURE__ */
|
|
2387
|
+
return /* @__PURE__ */ jsxs16(
|
|
2080
2388
|
"div",
|
|
2081
2389
|
{
|
|
2082
2390
|
role: "menuitem",
|
|
@@ -2096,7 +2404,7 @@ var SelectItem = forwardRef10(
|
|
|
2096
2404
|
tabIndex: disabled ? -1 : 0,
|
|
2097
2405
|
...props,
|
|
2098
2406
|
children: [
|
|
2099
|
-
/* @__PURE__ */
|
|
2407
|
+
/* @__PURE__ */ jsx21("span", { className: "absolute right-2 flex h-3.5 w-3.5 items-center justify-center", children: selectedValue === value && /* @__PURE__ */ jsx21(Check3, { className: "" }) }),
|
|
2100
2408
|
children
|
|
2101
2409
|
]
|
|
2102
2410
|
}
|
|
@@ -2126,6 +2434,8 @@ export {
|
|
|
2126
2434
|
ProfileMenuHeader,
|
|
2127
2435
|
ProfileMenuSection,
|
|
2128
2436
|
ProfileMenuTrigger,
|
|
2437
|
+
ProgressBar_default as ProgressBar,
|
|
2438
|
+
ProgressCircle_default as ProgressCircle,
|
|
2129
2439
|
Radio_default as Radio,
|
|
2130
2440
|
Select_default as Select,
|
|
2131
2441
|
SelectContent,
|