@idds/react 1.4.17 → 1.4.19
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.es.js
CHANGED
|
@@ -1652,13 +1652,6 @@ function ButtonGroup({
|
|
|
1652
1652
|
);
|
|
1653
1653
|
}) });
|
|
1654
1654
|
}
|
|
1655
|
-
const VARIANT_MAP = {
|
|
1656
|
-
primary: "var(--ina-primary-500)",
|
|
1657
|
-
secondary: "var(--ina-secondary-500)",
|
|
1658
|
-
success: "var(--ina-success-500)",
|
|
1659
|
-
warning: "var(--ina-warning-500)",
|
|
1660
|
-
error: "var(--ina-error-500)"
|
|
1661
|
-
};
|
|
1662
1655
|
function CircleProgressBar({
|
|
1663
1656
|
progress = 0,
|
|
1664
1657
|
diameter = 20,
|
|
@@ -1668,62 +1661,56 @@ function CircleProgressBar({
|
|
|
1668
1661
|
className
|
|
1669
1662
|
}) {
|
|
1670
1663
|
const normalizedProgress = Math.min(100, Math.max(0, progress));
|
|
1671
|
-
const
|
|
1672
|
-
const strokeColor = isHex ? variant : VARIANT_MAP[variant] || VARIANT_MAP.primary;
|
|
1664
|
+
const isCustomColor = variant.startsWith("#");
|
|
1673
1665
|
const center = diameter / 2;
|
|
1674
1666
|
const radius = (diameter - strokeWidth) / 2;
|
|
1675
1667
|
const circumference = 2 * Math.PI * radius;
|
|
1676
1668
|
const strokeDashoffset = circumference - normalizedProgress / 100 * circumference;
|
|
1677
1669
|
const containerClasses = clsx(
|
|
1678
1670
|
"ina-circle-progress-bar",
|
|
1679
|
-
|
|
1671
|
+
!isCustomColor && `ina-circle-progress-bar--${variant}`,
|
|
1680
1672
|
className
|
|
1681
1673
|
);
|
|
1682
|
-
|
|
1683
|
-
"
|
|
1674
|
+
const style = {
|
|
1675
|
+
"--ina-circle-progress-size": `${diameter}px`,
|
|
1676
|
+
...trackColor && { "--ina-circle-progress-track-color": trackColor },
|
|
1677
|
+
...isCustomColor && { "--ina-circle-progress-color": variant }
|
|
1678
|
+
};
|
|
1679
|
+
return /* @__PURE__ */ jsx("div", { className: containerClasses, style, children: /* @__PURE__ */ jsxs(
|
|
1680
|
+
"svg",
|
|
1684
1681
|
{
|
|
1685
|
-
className:
|
|
1686
|
-
|
|
1687
|
-
|
|
1688
|
-
|
|
1689
|
-
|
|
1690
|
-
|
|
1691
|
-
|
|
1692
|
-
|
|
1693
|
-
|
|
1694
|
-
|
|
1695
|
-
|
|
1696
|
-
|
|
1697
|
-
|
|
1698
|
-
|
|
1699
|
-
|
|
1700
|
-
|
|
1701
|
-
|
|
1702
|
-
|
|
1703
|
-
|
|
1704
|
-
|
|
1705
|
-
|
|
1706
|
-
|
|
1707
|
-
|
|
1708
|
-
|
|
1709
|
-
|
|
1710
|
-
|
|
1711
|
-
|
|
1712
|
-
|
|
1713
|
-
|
|
1714
|
-
|
|
1715
|
-
strokeWidth,
|
|
1716
|
-
fill: "none",
|
|
1717
|
-
strokeLinecap: "round",
|
|
1718
|
-
strokeDasharray: circumference,
|
|
1719
|
-
strokeDashoffset
|
|
1720
|
-
}
|
|
1721
|
-
)
|
|
1722
|
-
]
|
|
1723
|
-
}
|
|
1724
|
-
)
|
|
1682
|
+
className: "ina-circle-progress-bar__svg",
|
|
1683
|
+
width: "100%",
|
|
1684
|
+
height: "100%",
|
|
1685
|
+
viewBox: `0 0 ${diameter} ${diameter}`,
|
|
1686
|
+
fill: "none",
|
|
1687
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
1688
|
+
children: [
|
|
1689
|
+
/* @__PURE__ */ jsx(
|
|
1690
|
+
"circle",
|
|
1691
|
+
{
|
|
1692
|
+
className: "ina-circle-progress-bar__track",
|
|
1693
|
+
cx: center,
|
|
1694
|
+
cy: center,
|
|
1695
|
+
r: radius,
|
|
1696
|
+
strokeWidth
|
|
1697
|
+
}
|
|
1698
|
+
),
|
|
1699
|
+
/* @__PURE__ */ jsx(
|
|
1700
|
+
"circle",
|
|
1701
|
+
{
|
|
1702
|
+
className: "ina-circle-progress-bar__progress",
|
|
1703
|
+
cx: center,
|
|
1704
|
+
cy: center,
|
|
1705
|
+
r: radius,
|
|
1706
|
+
strokeWidth,
|
|
1707
|
+
strokeDasharray: circumference,
|
|
1708
|
+
strokeDashoffset
|
|
1709
|
+
}
|
|
1710
|
+
)
|
|
1711
|
+
]
|
|
1725
1712
|
}
|
|
1726
|
-
);
|
|
1713
|
+
) });
|
|
1727
1714
|
}
|
|
1728
1715
|
function Checkbox({
|
|
1729
1716
|
id,
|