analytica-frontend-lib 1.0.36 → 1.0.38
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/DropdownMenu/index.d.mts +16 -8
- package/dist/DropdownMenu/index.d.ts +16 -8
- package/dist/DropdownMenu/index.js +122 -45
- package/dist/DropdownMenu/index.js.map +1 -1
- package/dist/DropdownMenu/index.mjs +122 -45
- package/dist/DropdownMenu/index.mjs.map +1 -1
- 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/Select/index.d.mts +51 -0
- package/dist/Select/index.d.ts +51 -0
- package/dist/Select/index.js +323 -0
- package/dist/Select/index.js.map +1 -0
- package/dist/Select/index.mjs +300 -0
- package/dist/Select/index.mjs.map +1 -0
- package/dist/index.css +181 -9
- package/dist/index.css.map +1 -1
- package/dist/index.d.mts +4 -44
- package/dist/index.d.ts +4 -44
- package/dist/index.js +248 -62
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +247 -62
- package/dist/index.mjs.map +1 -1
- package/dist/styles.css +181 -9
- package/dist/styles.css.map +1 -1
- package/package.json +2 -1
package/dist/index.mjs
CHANGED
|
@@ -1601,6 +1601,172 @@ var ProgressBar = ({
|
|
|
1601
1601
|
};
|
|
1602
1602
|
var ProgressBar_default = ProgressBar;
|
|
1603
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
|
+
|
|
1604
1770
|
// src/components/DropdownMenu/DropdownMenu.tsx
|
|
1605
1771
|
import { SignOut, User } from "phosphor-react";
|
|
1606
1772
|
import {
|
|
@@ -1613,7 +1779,7 @@ import {
|
|
|
1613
1779
|
useState as useState5
|
|
1614
1780
|
} from "react";
|
|
1615
1781
|
import { create as create2, useStore } from "zustand";
|
|
1616
|
-
import { jsx as
|
|
1782
|
+
import { jsx as jsx20, jsxs as jsxs15 } from "react/jsx-runtime";
|
|
1617
1783
|
function createDropdownStore() {
|
|
1618
1784
|
return create2((set) => ({
|
|
1619
1785
|
open: false,
|
|
@@ -1704,28 +1870,34 @@ var DropdownMenu = ({ children, open, onOpenChange }) => {
|
|
|
1704
1870
|
store.setState({ open });
|
|
1705
1871
|
}
|
|
1706
1872
|
}, []);
|
|
1707
|
-
return /* @__PURE__ */
|
|
1873
|
+
return /* @__PURE__ */ jsx20("div", { className: "relative", ref: menuRef, children: injectStore(children, store) });
|
|
1708
1874
|
};
|
|
1709
|
-
var DropdownMenuTrigger =
|
|
1875
|
+
var DropdownMenuTrigger = ({
|
|
1876
|
+
className,
|
|
1877
|
+
children,
|
|
1878
|
+
onClick,
|
|
1879
|
+
store: externalStore,
|
|
1880
|
+
...props
|
|
1881
|
+
}) => {
|
|
1710
1882
|
const store = useDropdownStore(externalStore);
|
|
1711
1883
|
const open = useStore(store, (s) => s.open);
|
|
1712
1884
|
const toggleOpen = () => store.setState({ open: !open });
|
|
1713
|
-
return /* @__PURE__ */
|
|
1714
|
-
|
|
1885
|
+
return /* @__PURE__ */ jsx20(
|
|
1886
|
+
Button_default,
|
|
1715
1887
|
{
|
|
1716
|
-
|
|
1717
|
-
className: `border border-border-200 cursor-pointer bg-background-muted hover:bg-background-200 transition-colors px-4 py-2 rounded-sm ${className}`,
|
|
1888
|
+
variant: "outline",
|
|
1718
1889
|
onClick: (e) => {
|
|
1719
1890
|
e.stopPropagation();
|
|
1720
1891
|
toggleOpen();
|
|
1721
1892
|
if (onClick) onClick(e);
|
|
1722
1893
|
},
|
|
1723
1894
|
"aria-expanded": open,
|
|
1895
|
+
className: `${className}`,
|
|
1724
1896
|
...props,
|
|
1725
1897
|
children
|
|
1726
1898
|
}
|
|
1727
1899
|
);
|
|
1728
|
-
}
|
|
1900
|
+
};
|
|
1729
1901
|
DropdownMenuTrigger.displayName = "DropdownMenuTrigger";
|
|
1730
1902
|
var ITEM_SIZE_CLASSES = {
|
|
1731
1903
|
small: "text-sm",
|
|
@@ -1742,8 +1914,12 @@ var ALIGN_CLASSES = {
|
|
|
1742
1914
|
center: "left-1/2 -translate-x-1/2",
|
|
1743
1915
|
end: "right-0"
|
|
1744
1916
|
};
|
|
1917
|
+
var MENUCONTENT_VARIANT_CLASSES = {
|
|
1918
|
+
menu: "p-1",
|
|
1919
|
+
profile: "p-6"
|
|
1920
|
+
};
|
|
1745
1921
|
var MenuLabel = forwardRef9(({ className, inset, store: _store, ...props }, ref) => {
|
|
1746
|
-
return /* @__PURE__ */
|
|
1922
|
+
return /* @__PURE__ */ jsx20(
|
|
1747
1923
|
"div",
|
|
1748
1924
|
{
|
|
1749
1925
|
ref,
|
|
@@ -1758,6 +1934,7 @@ var MenuContent = forwardRef9(
|
|
|
1758
1934
|
className,
|
|
1759
1935
|
align = "start",
|
|
1760
1936
|
side = "bottom",
|
|
1937
|
+
variant = "menu",
|
|
1761
1938
|
sideOffset = 4,
|
|
1762
1939
|
children,
|
|
1763
1940
|
store: externalStore,
|
|
@@ -1780,15 +1957,17 @@ var MenuContent = forwardRef9(
|
|
|
1780
1957
|
const horizontal = ALIGN_CLASSES[align];
|
|
1781
1958
|
return `absolute ${vertical} ${horizontal}`;
|
|
1782
1959
|
};
|
|
1783
|
-
|
|
1960
|
+
const variantClasses = MENUCONTENT_VARIANT_CLASSES[variant];
|
|
1961
|
+
return /* @__PURE__ */ jsx20(
|
|
1784
1962
|
"div",
|
|
1785
1963
|
{
|
|
1786
1964
|
ref,
|
|
1787
1965
|
role: "menu",
|
|
1788
1966
|
className: `
|
|
1789
|
-
bg-background z-50 min-w-[210px] overflow-hidden rounded-md border bg-popover
|
|
1967
|
+
bg-background z-50 min-w-[210px] overflow-hidden rounded-md border bg-popover text-popover-foreground shadow-md border-border-100
|
|
1790
1968
|
${open ? "animate-in fade-in-0 zoom-in-95" : "animate-out fade-out-0 zoom-out-95"}
|
|
1791
1969
|
${getPositionClasses()}
|
|
1970
|
+
${variantClasses}
|
|
1792
1971
|
${className}
|
|
1793
1972
|
`,
|
|
1794
1973
|
style: {
|
|
@@ -1831,14 +2010,14 @@ var MenuItem = forwardRef9(
|
|
|
1831
2010
|
};
|
|
1832
2011
|
const getVariantClasses = () => {
|
|
1833
2012
|
if (variant === "profile") {
|
|
1834
|
-
return "relative flex flex-row justify-between select-none items-center gap-2 rounded-sm p-
|
|
2013
|
+
return "relative flex flex-row justify-between select-none items-center gap-2 rounded-sm p-4 text-sm outline-none transition-colors [&>svg]:size-6 [&>svg]:shrink-0";
|
|
1835
2014
|
}
|
|
1836
2015
|
return "relative flex select-none items-center gap-2 rounded-sm p-3 text-sm outline-none transition-colors [&>svg]:size-4 [&>svg]:shrink-0";
|
|
1837
2016
|
};
|
|
1838
2017
|
const getVariantProps = () => {
|
|
1839
2018
|
return variant === "profile" ? { "data-variant": "profile" } : {};
|
|
1840
2019
|
};
|
|
1841
|
-
return /* @__PURE__ */
|
|
2020
|
+
return /* @__PURE__ */ jsxs15(
|
|
1842
2021
|
"div",
|
|
1843
2022
|
{
|
|
1844
2023
|
ref,
|
|
@@ -1860,7 +2039,7 @@ var MenuItem = forwardRef9(
|
|
|
1860
2039
|
...props,
|
|
1861
2040
|
children: [
|
|
1862
2041
|
iconLeft,
|
|
1863
|
-
children,
|
|
2042
|
+
/* @__PURE__ */ jsx20("span", { className: "w-full text-md", children }),
|
|
1864
2043
|
iconRight
|
|
1865
2044
|
]
|
|
1866
2045
|
}
|
|
@@ -1868,7 +2047,7 @@ var MenuItem = forwardRef9(
|
|
|
1868
2047
|
}
|
|
1869
2048
|
);
|
|
1870
2049
|
MenuItem.displayName = "MenuItem";
|
|
1871
|
-
var MenuSeparator = forwardRef9(({ className, store: _store, ...props }, ref) => /* @__PURE__ */
|
|
2050
|
+
var MenuSeparator = forwardRef9(({ className, store: _store, ...props }, ref) => /* @__PURE__ */ jsx20(
|
|
1872
2051
|
"div",
|
|
1873
2052
|
{
|
|
1874
2053
|
ref,
|
|
@@ -1881,7 +2060,7 @@ var ProfileMenuTrigger = forwardRef9(({ className, onClick, store: externalStore
|
|
|
1881
2060
|
const store = useDropdownStore(externalStore);
|
|
1882
2061
|
const open = useStore(store, (s) => s.open);
|
|
1883
2062
|
const toggleOpen = () => store.setState({ open: !open });
|
|
1884
|
-
return /* @__PURE__ */
|
|
2063
|
+
return /* @__PURE__ */ jsx20(
|
|
1885
2064
|
"button",
|
|
1886
2065
|
{
|
|
1887
2066
|
ref,
|
|
@@ -1893,13 +2072,13 @@ var ProfileMenuTrigger = forwardRef9(({ className, onClick, store: externalStore
|
|
|
1893
2072
|
},
|
|
1894
2073
|
"aria-expanded": open,
|
|
1895
2074
|
...props,
|
|
1896
|
-
children: /* @__PURE__ */
|
|
2075
|
+
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 }) })
|
|
1897
2076
|
}
|
|
1898
2077
|
);
|
|
1899
2078
|
});
|
|
1900
2079
|
ProfileMenuTrigger.displayName = "ProfileMenuTrigger";
|
|
1901
2080
|
var ProfileMenuHeader = forwardRef9(({ className, name, email, store: _store, ...props }, ref) => {
|
|
1902
|
-
return /* @__PURE__ */
|
|
2081
|
+
return /* @__PURE__ */ jsxs15(
|
|
1903
2082
|
"div",
|
|
1904
2083
|
{
|
|
1905
2084
|
ref,
|
|
@@ -1910,10 +2089,10 @@ var ProfileMenuHeader = forwardRef9(({ className, name, email, store: _store, ..
|
|
|
1910
2089
|
`,
|
|
1911
2090
|
...props,
|
|
1912
2091
|
children: [
|
|
1913
|
-
/* @__PURE__ */
|
|
1914
|
-
/* @__PURE__ */
|
|
1915
|
-
/* @__PURE__ */
|
|
1916
|
-
/* @__PURE__ */
|
|
2092
|
+
/* @__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" }) }),
|
|
2093
|
+
/* @__PURE__ */ jsxs15("div", { className: "flex flex-col ", children: [
|
|
2094
|
+
/* @__PURE__ */ jsx20("p", { className: "text-xl font-bold text-text-950", children: name }),
|
|
2095
|
+
/* @__PURE__ */ jsx20("p", { className: "text-md text-text-600", children: email })
|
|
1917
2096
|
] })
|
|
1918
2097
|
]
|
|
1919
2098
|
}
|
|
@@ -1921,7 +2100,7 @@ var ProfileMenuHeader = forwardRef9(({ className, name, email, store: _store, ..
|
|
|
1921
2100
|
});
|
|
1922
2101
|
ProfileMenuHeader.displayName = "ProfileMenuHeader";
|
|
1923
2102
|
var ProfileMenuSection = forwardRef9(({ className, children, store: _store, ...props }, ref) => {
|
|
1924
|
-
return /* @__PURE__ */
|
|
2103
|
+
return /* @__PURE__ */ jsx20(
|
|
1925
2104
|
"div",
|
|
1926
2105
|
{
|
|
1927
2106
|
ref,
|
|
@@ -1935,29 +2114,33 @@ var ProfileMenuSection = forwardRef9(({ className, children, store: _store, ...p
|
|
|
1935
2114
|
);
|
|
1936
2115
|
});
|
|
1937
2116
|
ProfileMenuSection.displayName = "ProfileMenuSection";
|
|
1938
|
-
var ProfileMenuFooter =
|
|
1939
|
-
|
|
1940
|
-
|
|
1941
|
-
|
|
1942
|
-
|
|
1943
|
-
|
|
1944
|
-
|
|
1945
|
-
|
|
1946
|
-
|
|
1947
|
-
|
|
1948
|
-
|
|
1949
|
-
|
|
1950
|
-
|
|
1951
|
-
|
|
1952
|
-
|
|
1953
|
-
|
|
1954
|
-
|
|
1955
|
-
|
|
1956
|
-
|
|
1957
|
-
|
|
1958
|
-
|
|
1959
|
-
|
|
1960
|
-
)
|
|
2117
|
+
var ProfileMenuFooter = ({
|
|
2118
|
+
className,
|
|
2119
|
+
disabled = false,
|
|
2120
|
+
onClick,
|
|
2121
|
+
store: externalStore,
|
|
2122
|
+
...props
|
|
2123
|
+
}) => {
|
|
2124
|
+
const store = useDropdownStore(externalStore);
|
|
2125
|
+
const setOpen = useStore(store, (s) => s.setOpen);
|
|
2126
|
+
return /* @__PURE__ */ jsxs15(
|
|
2127
|
+
Button_default,
|
|
2128
|
+
{
|
|
2129
|
+
variant: "outline",
|
|
2130
|
+
className: `w-full ${className}`,
|
|
2131
|
+
disabled,
|
|
2132
|
+
onClick: (e) => {
|
|
2133
|
+
setOpen(false);
|
|
2134
|
+
onClick?.(e);
|
|
2135
|
+
},
|
|
2136
|
+
...props,
|
|
2137
|
+
children: [
|
|
2138
|
+
/* @__PURE__ */ jsx20("span", { className: "mr-2 flex items-center", children: /* @__PURE__ */ jsx20(SignOut, {}) }),
|
|
2139
|
+
/* @__PURE__ */ jsx20("span", { children: "Sair" })
|
|
2140
|
+
]
|
|
2141
|
+
}
|
|
2142
|
+
);
|
|
2143
|
+
};
|
|
1961
2144
|
ProfileMenuFooter.displayName = "ProfileMenuFooter";
|
|
1962
2145
|
var DropdownMenu_default = DropdownMenu;
|
|
1963
2146
|
|
|
@@ -1972,13 +2155,13 @@ import {
|
|
|
1972
2155
|
cloneElement as cloneElement2
|
|
1973
2156
|
} from "react";
|
|
1974
2157
|
import { CaretDown, Check as Check3 } from "phosphor-react";
|
|
1975
|
-
import { Fragment as Fragment2, jsx as
|
|
1976
|
-
var
|
|
2158
|
+
import { Fragment as Fragment2, jsx as jsx21, jsxs as jsxs16 } from "react/jsx-runtime";
|
|
2159
|
+
var VARIANT_CLASSES4 = {
|
|
1977
2160
|
outlined: "border-2 rounded-sm focus:border-primary-950",
|
|
1978
2161
|
underlined: "border-b-2 focus:border-primary-950",
|
|
1979
2162
|
rounded: "border-2 rounded-4xl focus:border-primary-950"
|
|
1980
2163
|
};
|
|
1981
|
-
var
|
|
2164
|
+
var SIZE_CLASSES9 = {
|
|
1982
2165
|
small: "text-sm",
|
|
1983
2166
|
medium: "text-md",
|
|
1984
2167
|
large: "text-lg"
|
|
@@ -2018,7 +2201,7 @@ function getLabelAsNode(children) {
|
|
|
2018
2201
|
}
|
|
2019
2202
|
const flattened = Children2.toArray(children);
|
|
2020
2203
|
if (flattened.length === 1) return flattened[0];
|
|
2021
|
-
return /* @__PURE__ */
|
|
2204
|
+
return /* @__PURE__ */ jsx21(Fragment2, { children: flattened });
|
|
2022
2205
|
}
|
|
2023
2206
|
var injectStore2 = (children, store) => {
|
|
2024
2207
|
return Children2.map(children, (child) => {
|
|
@@ -2116,8 +2299,8 @@ var Select = ({
|
|
|
2116
2299
|
onValueChange(value);
|
|
2117
2300
|
}
|
|
2118
2301
|
}, [value]);
|
|
2119
|
-
const sizeClasses =
|
|
2120
|
-
return /* @__PURE__ */
|
|
2302
|
+
const sizeClasses = SIZE_CLASSES9[size];
|
|
2303
|
+
return /* @__PURE__ */ jsx21("div", { className: `relative ${sizeClasses} w-[288px]`, ref: selectRef, children: injectStore2(children, store) });
|
|
2121
2304
|
};
|
|
2122
2305
|
var SelectValue = ({
|
|
2123
2306
|
placeholder,
|
|
@@ -2126,7 +2309,7 @@ var SelectValue = ({
|
|
|
2126
2309
|
const store = useSelectStore(externalStore);
|
|
2127
2310
|
const selectedLabel = useStore2(store, (s) => s.selectedLabel);
|
|
2128
2311
|
const value = useStore2(store, (s) => s.value);
|
|
2129
|
-
return /* @__PURE__ */
|
|
2312
|
+
return /* @__PURE__ */ jsx21("span", { className: "text-inherit", children: selectedLabel || placeholder || value });
|
|
2130
2313
|
};
|
|
2131
2314
|
var SelectTrigger = forwardRef10(
|
|
2132
2315
|
({
|
|
@@ -2140,15 +2323,16 @@ var SelectTrigger = forwardRef10(
|
|
|
2140
2323
|
const store = useSelectStore(externalStore);
|
|
2141
2324
|
const open = useStore2(store, (s) => s.open);
|
|
2142
2325
|
const toggleOpen = () => store.setState({ open: !open });
|
|
2143
|
-
const variantClasses =
|
|
2144
|
-
return /* @__PURE__ */
|
|
2326
|
+
const variantClasses = VARIANT_CLASSES4[variant];
|
|
2327
|
+
return /* @__PURE__ */ jsxs16(
|
|
2145
2328
|
"button",
|
|
2146
2329
|
{
|
|
2147
2330
|
ref,
|
|
2148
2331
|
className: `
|
|
2149
2332
|
flex h-9 min-w-[220px] w-full items-center justify-between border-border-300 px-3 py-2
|
|
2150
|
-
${invalid && "border-indicator-error"}
|
|
2151
|
-
${disabled ? "cursor-not-allowed text-text-400 pointer-events-none opacity-50" : "cursor-pointer hover:bg-background-50
|
|
2333
|
+
${invalid && "border-indicator-error text-text-600"}
|
|
2334
|
+
${disabled ? "cursor-not-allowed text-text-400 pointer-events-none opacity-50" : "cursor-pointer hover:bg-background-50 focus:bg-accent focus:text-accent-foreground hover:bg-accent hover:text-accent-foreground"}
|
|
2335
|
+
${!invalid && !disabled ? "text-text-700" : ""}
|
|
2152
2336
|
${variantClasses}
|
|
2153
2337
|
${className}
|
|
2154
2338
|
`,
|
|
@@ -2159,7 +2343,7 @@ var SelectTrigger = forwardRef10(
|
|
|
2159
2343
|
...props,
|
|
2160
2344
|
children: [
|
|
2161
2345
|
props.children,
|
|
2162
|
-
/* @__PURE__ */
|
|
2346
|
+
/* @__PURE__ */ jsx21(
|
|
2163
2347
|
CaretDown,
|
|
2164
2348
|
{
|
|
2165
2349
|
className: `h-[1em] w-[1em] opacity-50 transition-transform ${open ? "rotate-180" : ""}`
|
|
@@ -2183,8 +2367,8 @@ var SelectContent = forwardRef10(
|
|
|
2183
2367
|
const store = useSelectStore(externalStore);
|
|
2184
2368
|
const open = useStore2(store, (s) => s.open);
|
|
2185
2369
|
if (!open) return null;
|
|
2186
|
-
const getPositionClasses = () => `absolute ${SIDE_CLASSES2[side]} ${ALIGN_CLASSES2[align]}`;
|
|
2187
|
-
return /* @__PURE__ */
|
|
2370
|
+
const getPositionClasses = () => `w-full min-w-full absolute ${SIDE_CLASSES2[side]} ${ALIGN_CLASSES2[align]}`;
|
|
2371
|
+
return /* @__PURE__ */ jsx21(
|
|
2188
2372
|
"div",
|
|
2189
2373
|
{
|
|
2190
2374
|
role: "menu",
|
|
@@ -2218,7 +2402,7 @@ var SelectItem = forwardRef10(
|
|
|
2218
2402
|
}
|
|
2219
2403
|
props.onClick?.(e);
|
|
2220
2404
|
};
|
|
2221
|
-
return /* @__PURE__ */
|
|
2405
|
+
return /* @__PURE__ */ jsxs16(
|
|
2222
2406
|
"div",
|
|
2223
2407
|
{
|
|
2224
2408
|
role: "menuitem",
|
|
@@ -2238,7 +2422,7 @@ var SelectItem = forwardRef10(
|
|
|
2238
2422
|
tabIndex: disabled ? -1 : 0,
|
|
2239
2423
|
...props,
|
|
2240
2424
|
children: [
|
|
2241
|
-
/* @__PURE__ */
|
|
2425
|
+
/* @__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: "" }) }),
|
|
2242
2426
|
children
|
|
2243
2427
|
]
|
|
2244
2428
|
}
|
|
@@ -2269,6 +2453,7 @@ export {
|
|
|
2269
2453
|
ProfileMenuSection,
|
|
2270
2454
|
ProfileMenuTrigger,
|
|
2271
2455
|
ProgressBar_default as ProgressBar,
|
|
2456
|
+
ProgressCircle_default as ProgressCircle,
|
|
2272
2457
|
Radio_default as Radio,
|
|
2273
2458
|
Select_default as Select,
|
|
2274
2459
|
SelectContent,
|