@trackunit/react-components 1.5.28 → 1.5.30
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/index.cjs.js +6 -2
- package/index.esm.js +6 -2
- package/package.json +1 -1
- package/src/components/PageHeader/types.d.ts +1 -1
package/index.cjs.js
CHANGED
|
@@ -2899,7 +2899,11 @@ const TrendIndicator = ({ trend, unit, isSmallVariant }) => {
|
|
|
2899
2899
|
return (jsxRuntime.jsxs("div", { className: "flex flex-row items-center gap-1", "data-testid": "trend-indicator", children: [!isSmallVariant && trend.value ? (jsxRuntime.jsxs(Text, { dataTestId: "trend-value", size: "small", weight: "normal", children: [trend.value, " ", unit] })) : null, trend.variant?.icon ? jsxRuntime.jsx(Icon, { color: trend.variant.color, name: trend.variant.icon, size: "small" }) : null, trend.percentage ? (jsxRuntime.jsxs(Text, { className: cvaKPITrendPercentage({ color: trend.variant?.color }), size: "small", weight: "bold", children: [trend.percentage, "%"] })) : null] }));
|
|
2900
2900
|
};
|
|
2901
2901
|
|
|
2902
|
-
const cvaKPICard = cssClassVarianceUtilities.cvaMerge([
|
|
2902
|
+
const cvaKPICard = cssClassVarianceUtilities.cvaMerge([
|
|
2903
|
+
"inline-flex",
|
|
2904
|
+
"gap-1",
|
|
2905
|
+
"hover:shadow-none", // overwriting the Card hover shadow when wrapped in a KPICard
|
|
2906
|
+
], {
|
|
2903
2907
|
variants: {
|
|
2904
2908
|
minHeight: {
|
|
2905
2909
|
default: ["min-h-[78px]"],
|
|
@@ -3376,7 +3380,7 @@ const PageHeaderSecondaryActions = ({ actions, hasPrimaryAction, }) => {
|
|
|
3376
3380
|
return [danger, [...others, action]];
|
|
3377
3381
|
}
|
|
3378
3382
|
}, [[], []]);
|
|
3379
|
-
return (jsxRuntime.jsx(MoreMenu, { dataTestId: "secondary-actions-more-menu", iconButtonProps: { size: "small", variant: "
|
|
3383
|
+
return (jsxRuntime.jsx(MoreMenu, { dataTestId: "secondary-actions-more-menu", iconButtonProps: { size: "small", variant: "secondary" }, children: close => (jsxRuntime.jsxs(MenuList, { className: "min-w-[160px]", children: [otherActions.map((action, index) => (jsxRuntime.jsx(ActionRenderer, { action: action, externalOnClick: close, isMenuItem: true }, `${action.actionText}-${index}`))), dangerActions.length ? jsxRuntime.jsx(MenuDivider, {}) : null, dangerActions.map((action, index) => (jsxRuntime.jsx(ActionRenderer, { action: action, externalOnClick: close, isMenuItem: true }, `${action.actionText}-${index}`)))] })) }));
|
|
3380
3384
|
}
|
|
3381
3385
|
// Otherwise, render them inline as buttons
|
|
3382
3386
|
return (jsxRuntime.jsx("div", { className: "flex flex-row items-center gap-2", children: enabledActions
|
package/index.esm.js
CHANGED
|
@@ -2897,7 +2897,11 @@ const TrendIndicator = ({ trend, unit, isSmallVariant }) => {
|
|
|
2897
2897
|
return (jsxs("div", { className: "flex flex-row items-center gap-1", "data-testid": "trend-indicator", children: [!isSmallVariant && trend.value ? (jsxs(Text, { dataTestId: "trend-value", size: "small", weight: "normal", children: [trend.value, " ", unit] })) : null, trend.variant?.icon ? jsx(Icon, { color: trend.variant.color, name: trend.variant.icon, size: "small" }) : null, trend.percentage ? (jsxs(Text, { className: cvaKPITrendPercentage({ color: trend.variant?.color }), size: "small", weight: "bold", children: [trend.percentage, "%"] })) : null] }));
|
|
2898
2898
|
};
|
|
2899
2899
|
|
|
2900
|
-
const cvaKPICard = cvaMerge([
|
|
2900
|
+
const cvaKPICard = cvaMerge([
|
|
2901
|
+
"inline-flex",
|
|
2902
|
+
"gap-1",
|
|
2903
|
+
"hover:shadow-none", // overwriting the Card hover shadow when wrapped in a KPICard
|
|
2904
|
+
], {
|
|
2901
2905
|
variants: {
|
|
2902
2906
|
minHeight: {
|
|
2903
2907
|
default: ["min-h-[78px]"],
|
|
@@ -3374,7 +3378,7 @@ const PageHeaderSecondaryActions = ({ actions, hasPrimaryAction, }) => {
|
|
|
3374
3378
|
return [danger, [...others, action]];
|
|
3375
3379
|
}
|
|
3376
3380
|
}, [[], []]);
|
|
3377
|
-
return (jsx(MoreMenu, { dataTestId: "secondary-actions-more-menu", iconButtonProps: { size: "small", variant: "
|
|
3381
|
+
return (jsx(MoreMenu, { dataTestId: "secondary-actions-more-menu", iconButtonProps: { size: "small", variant: "secondary" }, children: close => (jsxs(MenuList, { className: "min-w-[160px]", children: [otherActions.map((action, index) => (jsx(ActionRenderer, { action: action, externalOnClick: close, isMenuItem: true }, `${action.actionText}-${index}`))), dangerActions.length ? jsx(MenuDivider, {}) : null, dangerActions.map((action, index) => (jsx(ActionRenderer, { action: action, externalOnClick: close, isMenuItem: true }, `${action.actionText}-${index}`)))] })) }));
|
|
3378
3382
|
}
|
|
3379
3383
|
// Otherwise, render them inline as buttons
|
|
3380
3384
|
return (jsx("div", { className: "flex flex-row items-center gap-2", children: enabledActions
|
package/package.json
CHANGED
|
@@ -26,7 +26,7 @@ export type PageHeaderSecondaryActionType = PageHeaderActionType & {
|
|
|
26
26
|
target?: HTMLAnchorElement["target"];
|
|
27
27
|
};
|
|
28
28
|
export type PageHeaderPrimaryActionType = PageHeaderActionType & {
|
|
29
|
-
variant: Extract<ButtonVariant, "primary" | "primary-danger">;
|
|
29
|
+
variant: Extract<ButtonVariant, "primary" | "primary-danger" | "secondary">;
|
|
30
30
|
};
|
|
31
31
|
interface BasePageHeaderProps extends CommonProps {
|
|
32
32
|
/**
|