@axzydev/axzy_ui_system 1.7.1 → 1.7.3
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.cjs +32 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +7 -1
- package/dist/index.d.ts +7 -1
- package/dist/index.js +32 -1
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
- package/src/components/atoms/segmented-control/segmented-control.tsx +3 -0
- package/src/components/molecules/card/card.tsx +12 -0
- package/src/components/molecules/stat-card/stat-card.props.ts +7 -0
- package/src/components/molecules/stat-card/stat-card.tsx +28 -0
package/dist/index.d.cts
CHANGED
|
@@ -3495,6 +3495,12 @@ interface ITStatCardProps {
|
|
|
3495
3495
|
value: string | number;
|
|
3496
3496
|
/** Optional trend indicator text (e.g. "+12%", "-3"). */
|
|
3497
3497
|
trend?: string;
|
|
3498
|
+
/** Optional secondary line under the value (context, not a trend). */
|
|
3499
|
+
hint?: string;
|
|
3500
|
+
/** Optional progress 0–100 rendered under the hint. */
|
|
3501
|
+
progress?: number;
|
|
3502
|
+
/** Semantic color for the progress bar. @default "primary" */
|
|
3503
|
+
progressColor?: ColorsTypes;
|
|
3498
3504
|
/** Direction of the trend, used to color the trend badge. */
|
|
3499
3505
|
trendDirection?: "up" | "down" | "neutral";
|
|
3500
3506
|
/** Icon element rendered next to the label in the top-right corner. */
|
|
@@ -3519,7 +3525,7 @@ interface ITStatCardProps {
|
|
|
3519
3525
|
* @example
|
|
3520
3526
|
* <ITStatCard label="Users" value={1042} trend="-3%" trendDirection="down" onClick={() => navigate("/users")} />
|
|
3521
3527
|
*/
|
|
3522
|
-
declare function ITStatCard({ label, value, trend, trendDirection, icon, color, className, style, onClick, }: ITStatCardProps): react_jsx_runtime.JSX.Element;
|
|
3528
|
+
declare function ITStatCard({ label, value, trend, trendDirection, hint, progress, progressColor, icon, color, className, style, onClick, }: ITStatCardProps): react_jsx_runtime.JSX.Element;
|
|
3523
3529
|
|
|
3524
3530
|
interface ITLineBarDatum {
|
|
3525
3531
|
/** Etiqueta del eje (p. ej. «May»). */
|
package/dist/index.d.ts
CHANGED
|
@@ -3495,6 +3495,12 @@ interface ITStatCardProps {
|
|
|
3495
3495
|
value: string | number;
|
|
3496
3496
|
/** Optional trend indicator text (e.g. "+12%", "-3"). */
|
|
3497
3497
|
trend?: string;
|
|
3498
|
+
/** Optional secondary line under the value (context, not a trend). */
|
|
3499
|
+
hint?: string;
|
|
3500
|
+
/** Optional progress 0–100 rendered under the hint. */
|
|
3501
|
+
progress?: number;
|
|
3502
|
+
/** Semantic color for the progress bar. @default "primary" */
|
|
3503
|
+
progressColor?: ColorsTypes;
|
|
3498
3504
|
/** Direction of the trend, used to color the trend badge. */
|
|
3499
3505
|
trendDirection?: "up" | "down" | "neutral";
|
|
3500
3506
|
/** Icon element rendered next to the label in the top-right corner. */
|
|
@@ -3519,7 +3525,7 @@ interface ITStatCardProps {
|
|
|
3519
3525
|
* @example
|
|
3520
3526
|
* <ITStatCard label="Users" value={1042} trend="-3%" trendDirection="down" onClick={() => navigate("/users")} />
|
|
3521
3527
|
*/
|
|
3522
|
-
declare function ITStatCard({ label, value, trend, trendDirection, icon, color, className, style, onClick, }: ITStatCardProps): react_jsx_runtime.JSX.Element;
|
|
3528
|
+
declare function ITStatCard({ label, value, trend, trendDirection, hint, progress, progressColor, icon, color, className, style, onClick, }: ITStatCardProps): react_jsx_runtime.JSX.Element;
|
|
3523
3529
|
|
|
3524
3530
|
interface ITLineBarDatum {
|
|
3525
3531
|
/** Etiqueta del eje (p. ej. «May»). */
|
package/dist/index.js
CHANGED
|
@@ -1527,6 +1527,14 @@ function ITCard({
|
|
|
1527
1527
|
onClick,
|
|
1528
1528
|
onMouseEnter: () => onClick && setIsHovered(true),
|
|
1529
1529
|
onMouseLeave: () => onClick && setIsHovered(false),
|
|
1530
|
+
role: onClick ? "button" : void 0,
|
|
1531
|
+
tabIndex: onClick ? 0 : void 0,
|
|
1532
|
+
onKeyDown: onClick ? (e) => {
|
|
1533
|
+
if (e.key === "Enter" || e.key === " ") {
|
|
1534
|
+
e.preventDefault();
|
|
1535
|
+
onClick();
|
|
1536
|
+
}
|
|
1537
|
+
} : void 0,
|
|
1530
1538
|
className: clsx2("overflow-hidden flex flex-col", className),
|
|
1531
1539
|
style: containerStyle,
|
|
1532
1540
|
children: [
|
|
@@ -8251,6 +8259,7 @@ function ITSegmentedControl({
|
|
|
8251
8259
|
return /* @__PURE__ */ jsx59(
|
|
8252
8260
|
"div",
|
|
8253
8261
|
{
|
|
8262
|
+
role: "group",
|
|
8254
8263
|
className: clsx40(
|
|
8255
8264
|
"inline-flex rounded-xl bg-slate-100 dark:bg-slate-800 border border-slate-200 dark:border-slate-700",
|
|
8256
8265
|
container,
|
|
@@ -8262,6 +8271,8 @@ function ITSegmentedControl({
|
|
|
8262
8271
|
return /* @__PURE__ */ jsxs41(
|
|
8263
8272
|
"button",
|
|
8264
8273
|
{
|
|
8274
|
+
type: "button",
|
|
8275
|
+
"aria-pressed": isActive,
|
|
8265
8276
|
onClick: () => !disabled && onChange(opt.value),
|
|
8266
8277
|
disabled,
|
|
8267
8278
|
className: clsx40(
|
|
@@ -8924,6 +8935,9 @@ function ITStatCard({
|
|
|
8924
8935
|
value,
|
|
8925
8936
|
trend,
|
|
8926
8937
|
trendDirection = trend && trend.startsWith("-") ? "down" : "neutral",
|
|
8938
|
+
hint,
|
|
8939
|
+
progress,
|
|
8940
|
+
progressColor = "primary",
|
|
8927
8941
|
icon,
|
|
8928
8942
|
color = "bg-primary-50 dark:bg-primary-950/20",
|
|
8929
8943
|
className,
|
|
@@ -8938,6 +8952,12 @@ function ITStatCard({
|
|
|
8938
8952
|
onClick,
|
|
8939
8953
|
role: onClick ? "button" : void 0,
|
|
8940
8954
|
tabIndex: onClick ? 0 : void 0,
|
|
8955
|
+
onKeyDown: onClick ? (e) => {
|
|
8956
|
+
if (e.key === "Enter" || e.key === " ") {
|
|
8957
|
+
e.preventDefault();
|
|
8958
|
+
onClick();
|
|
8959
|
+
}
|
|
8960
|
+
} : void 0,
|
|
8941
8961
|
children: [
|
|
8942
8962
|
/* @__PURE__ */ jsxs44("div", { className: "flex items-start justify-between mb-1", children: [
|
|
8943
8963
|
/* @__PURE__ */ jsx63(ITText, { as: "span", className: "text-xs font-medium text-slate-400 dark:text-slate-500", children: label }),
|
|
@@ -8946,7 +8966,18 @@ function ITStatCard({
|
|
|
8946
8966
|
/* @__PURE__ */ jsxs44("div", { className: "flex items-baseline gap-2", children: [
|
|
8947
8967
|
/* @__PURE__ */ jsx63(ITText, { as: "span", className: "text-2xl font-bold text-slate-800 dark:text-white", children: value }),
|
|
8948
8968
|
trend && /* @__PURE__ */ jsx63(ITText, { as: "span", className: clsx44("text-[11px] font-semibold px-1.5 py-0.5 rounded-md", trendColors[trendDirection]), children: trend })
|
|
8949
|
-
] })
|
|
8969
|
+
] }),
|
|
8970
|
+
hint && /* @__PURE__ */ jsx63(ITText, { as: "p", className: "mt-1 text-[11px] leading-snug text-slate-500 dark:text-slate-400", children: hint }),
|
|
8971
|
+
progress !== void 0 && /* @__PURE__ */ jsx63(
|
|
8972
|
+
ITProgress,
|
|
8973
|
+
{
|
|
8974
|
+
value: progress,
|
|
8975
|
+
max: 100,
|
|
8976
|
+
color: progressColor,
|
|
8977
|
+
size: "sm",
|
|
8978
|
+
className: "mt-2"
|
|
8979
|
+
}
|
|
8980
|
+
)
|
|
8950
8981
|
]
|
|
8951
8982
|
}
|
|
8952
8983
|
);
|