@facter/ds-core 1.7.0 → 1.7.1
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.d.mts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +25 -30
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +25 -30
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -2573,7 +2573,7 @@ interface StatsCardChartProps extends React$1.HTMLAttributes<HTMLDivElement> {
|
|
|
2573
2573
|
data: ChartDataPoint[];
|
|
2574
2574
|
height?: number;
|
|
2575
2575
|
}
|
|
2576
|
-
declare function StatsCardChart({ data, height, className, ...props }: StatsCardChartProps): react_jsx_runtime.JSX.Element;
|
|
2576
|
+
declare function StatsCardChart({ data, height, className, ...props }: StatsCardChartProps): react_jsx_runtime.JSX.Element | null;
|
|
2577
2577
|
interface StatsCardContentProps extends React$1.HTMLAttributes<HTMLDivElement> {
|
|
2578
2578
|
}
|
|
2579
2579
|
declare function StatsCardContent({ className, children, ...props }: StatsCardContentProps): react_jsx_runtime.JSX.Element;
|
package/dist/index.d.ts
CHANGED
|
@@ -2573,7 +2573,7 @@ interface StatsCardChartProps extends React$1.HTMLAttributes<HTMLDivElement> {
|
|
|
2573
2573
|
data: ChartDataPoint[];
|
|
2574
2574
|
height?: number;
|
|
2575
2575
|
}
|
|
2576
|
-
declare function StatsCardChart({ data, height, className, ...props }: StatsCardChartProps): react_jsx_runtime.JSX.Element;
|
|
2576
|
+
declare function StatsCardChart({ data, height, className, ...props }: StatsCardChartProps): react_jsx_runtime.JSX.Element | null;
|
|
2577
2577
|
interface StatsCardContentProps extends React$1.HTMLAttributes<HTMLDivElement> {
|
|
2578
2578
|
}
|
|
2579
2579
|
declare function StatsCardContent({ className, children, ...props }: StatsCardContentProps): react_jsx_runtime.JSX.Element;
|
package/dist/index.js
CHANGED
|
@@ -7759,13 +7759,13 @@ var colorConfigs = {
|
|
|
7759
7759
|
}
|
|
7760
7760
|
};
|
|
7761
7761
|
var rootVariants2 = classVarianceAuthority.cva(
|
|
7762
|
-
"relative overflow-hidden bg-card shadow-sm border border-border
|
|
7762
|
+
"relative overflow-hidden bg-card shadow-sm border border-border",
|
|
7763
7763
|
{
|
|
7764
7764
|
variants: {
|
|
7765
7765
|
variant: {
|
|
7766
|
-
default: "rounded-2xl",
|
|
7767
|
-
compact: "rounded-xl",
|
|
7768
|
-
mini: "rounded-xl"
|
|
7766
|
+
default: "rounded-2xl h-full",
|
|
7767
|
+
compact: "rounded-xl h-full",
|
|
7768
|
+
mini: "rounded-xl w-fit"
|
|
7769
7769
|
}
|
|
7770
7770
|
},
|
|
7771
7771
|
defaultVariants: {
|
|
@@ -7785,9 +7785,9 @@ function StatsCardRoot({
|
|
|
7785
7785
|
/* @__PURE__ */ jsxRuntime.jsx("div", { className: cn("absolute inset-0 bg-gradient-to-br pointer-events-none", config.bgGradient) }),
|
|
7786
7786
|
/* @__PURE__ */ jsxRuntime.jsx("div", { className: cn(
|
|
7787
7787
|
"relative flex h-full",
|
|
7788
|
-
variant === "
|
|
7789
|
-
variant === "
|
|
7790
|
-
variant === "
|
|
7788
|
+
variant === "default" && "flex-col",
|
|
7789
|
+
variant === "compact" && "flex-row items-center p-3 gap-3",
|
|
7790
|
+
variant === "mini" && "flex-row items-center p-3 gap-3"
|
|
7791
7791
|
), children })
|
|
7792
7792
|
] }) });
|
|
7793
7793
|
}
|
|
@@ -7799,8 +7799,7 @@ function StatsCardHeader({ className, children, ...props }) {
|
|
|
7799
7799
|
className: cn(
|
|
7800
7800
|
"flex items-center justify-between",
|
|
7801
7801
|
variant === "default" && "p-4 pb-2",
|
|
7802
|
-
variant === "mini" && "
|
|
7803
|
-
variant === "compact" && "flex-1 min-w-0",
|
|
7802
|
+
(variant === "compact" || variant === "mini") && "flex-1 min-w-0",
|
|
7804
7803
|
className
|
|
7805
7804
|
),
|
|
7806
7805
|
...props,
|
|
@@ -7809,29 +7808,26 @@ function StatsCardHeader({ className, children, ...props }) {
|
|
|
7809
7808
|
);
|
|
7810
7809
|
}
|
|
7811
7810
|
function StatsCardIcon({ icon: Icon2, className, ...props }) {
|
|
7812
|
-
const { config
|
|
7811
|
+
const { config } = useStatsCard();
|
|
7813
7812
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
7814
7813
|
"div",
|
|
7815
7814
|
{
|
|
7816
7815
|
className: cn(
|
|
7817
|
-
"rounded-lg",
|
|
7816
|
+
"rounded-lg p-2",
|
|
7818
7817
|
config.iconBg,
|
|
7819
|
-
variant === "mini" ? "p-1.5" : "p-2",
|
|
7820
7818
|
className
|
|
7821
7819
|
),
|
|
7822
7820
|
...props,
|
|
7823
|
-
children: /* @__PURE__ */ jsxRuntime.jsx(Icon2, { className:
|
|
7821
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(Icon2, { className: "w-4 h-4" })
|
|
7824
7822
|
}
|
|
7825
7823
|
);
|
|
7826
7824
|
}
|
|
7827
7825
|
function StatsCardTitle({ className, children, ...props }) {
|
|
7828
|
-
const { variant } = useStatsCard();
|
|
7829
7826
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
7830
7827
|
"h3",
|
|
7831
7828
|
{
|
|
7832
7829
|
className: cn(
|
|
7833
|
-
"font-medium text-gray-700",
|
|
7834
|
-
variant === "mini" ? "text-xs leading-tight" : "text-sm",
|
|
7830
|
+
"font-medium text-gray-700 text-sm",
|
|
7835
7831
|
className
|
|
7836
7832
|
),
|
|
7837
7833
|
...props,
|
|
@@ -7840,13 +7836,11 @@ function StatsCardTitle({ className, children, ...props }) {
|
|
|
7840
7836
|
);
|
|
7841
7837
|
}
|
|
7842
7838
|
function StatsCardSubtitle({ className, children, ...props }) {
|
|
7843
|
-
const { variant } = useStatsCard();
|
|
7844
7839
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
7845
7840
|
"p",
|
|
7846
7841
|
{
|
|
7847
7842
|
className: cn(
|
|
7848
|
-
"text-gray-400",
|
|
7849
|
-
variant === "mini" ? "text-[9px] leading-tight" : "text-[10px]",
|
|
7843
|
+
"text-gray-400 text-[10px]",
|
|
7850
7844
|
className
|
|
7851
7845
|
),
|
|
7852
7846
|
...props,
|
|
@@ -7861,7 +7855,8 @@ function StatsCardValue({ className, children, ...props }) {
|
|
|
7861
7855
|
{
|
|
7862
7856
|
className: cn(
|
|
7863
7857
|
"font-light tracking-tight text-gray-900",
|
|
7864
|
-
variant === "
|
|
7858
|
+
variant === "default" && "text-4xl",
|
|
7859
|
+
(variant === "compact" || variant === "mini") && "text-2xl",
|
|
7865
7860
|
className
|
|
7866
7861
|
),
|
|
7867
7862
|
...props,
|
|
@@ -7870,33 +7865,34 @@ function StatsCardValue({ className, children, ...props }) {
|
|
|
7870
7865
|
);
|
|
7871
7866
|
}
|
|
7872
7867
|
function StatsCardChange({ type = "positive", className, children, ...props }) {
|
|
7873
|
-
const { config
|
|
7868
|
+
const { config } = useStatsCard();
|
|
7874
7869
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: cn("flex items-center gap-0.5", className), ...props, children: [
|
|
7875
7870
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
7876
7871
|
"svg",
|
|
7877
7872
|
{
|
|
7878
|
-
className: cn(
|
|
7873
|
+
className: cn("w-2.5 h-2.5", config.textColor),
|
|
7879
7874
|
viewBox: "0 0 12 12",
|
|
7880
7875
|
fill: "currentColor",
|
|
7881
7876
|
children: /* @__PURE__ */ jsxRuntime.jsx("path", { d: type === "negative" ? "M6 10L10 5H2L6 10Z" : "M6 2L10 7H2L6 2Z" })
|
|
7882
7877
|
}
|
|
7883
7878
|
),
|
|
7884
7879
|
/* @__PURE__ */ jsxRuntime.jsx("span", { className: cn(
|
|
7885
|
-
"font-medium",
|
|
7886
|
-
config.textColor
|
|
7887
|
-
variant === "mini" ? "text-[9px]" : "text-[10px]"
|
|
7880
|
+
"font-medium text-[10px]",
|
|
7881
|
+
config.textColor
|
|
7888
7882
|
), children })
|
|
7889
7883
|
] });
|
|
7890
7884
|
}
|
|
7891
7885
|
function StatsCardChart({ data, height, className, ...props }) {
|
|
7892
7886
|
const { config, variant } = useStatsCard();
|
|
7893
7887
|
const gradientId = React49__namespace.useId();
|
|
7894
|
-
|
|
7888
|
+
if (variant === "mini") {
|
|
7889
|
+
return null;
|
|
7890
|
+
}
|
|
7891
|
+
const chartHeight = height ?? (variant === "compact" ? 40 : 70);
|
|
7895
7892
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
7896
7893
|
"div",
|
|
7897
7894
|
{
|
|
7898
7895
|
className: cn(
|
|
7899
|
-
variant === "mini" && "mt-auto h-10",
|
|
7900
7896
|
variant === "compact" && "w-16 h-10 shrink-0",
|
|
7901
7897
|
variant === "default" && "flex-1 relative mt-auto",
|
|
7902
7898
|
className
|
|
@@ -7932,10 +7928,10 @@ function StatsCardChart({ data, height, className, ...props }) {
|
|
|
7932
7928
|
fill: `url(#${gradientId})`,
|
|
7933
7929
|
dot: false,
|
|
7934
7930
|
activeDot: {
|
|
7935
|
-
r:
|
|
7931
|
+
r: 3,
|
|
7936
7932
|
fill: config.lineColor,
|
|
7937
7933
|
stroke: "white",
|
|
7938
|
-
strokeWidth:
|
|
7934
|
+
strokeWidth: 2
|
|
7939
7935
|
}
|
|
7940
7936
|
}
|
|
7941
7937
|
)
|
|
@@ -7949,7 +7945,6 @@ function StatsCardContent({ className, children, ...props }) {
|
|
|
7949
7945
|
"div",
|
|
7950
7946
|
{
|
|
7951
7947
|
className: cn(
|
|
7952
|
-
variant === "mini" && "mb-2",
|
|
7953
7948
|
variant === "default" && "mt-2",
|
|
7954
7949
|
className
|
|
7955
7950
|
),
|