@axzydev/axzy_ui_system 1.8.6 → 1.8.7
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 +4 -3
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +6 -1
- package/dist/index.d.ts +6 -1
- package/dist/index.js +4 -3
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
- package/src/components/organisms/bento/bento.tsx +9 -3
package/dist/index.cjs
CHANGED
|
@@ -2436,10 +2436,11 @@ function ITBentoFeed({ groups, onItemClick, maxHeight = 330 }) {
|
|
|
2436
2436
|
) }, item.id)) })
|
|
2437
2437
|
] }, group.key)) });
|
|
2438
2438
|
}
|
|
2439
|
-
function ITBentoStatStrip({ items, activeId, onSelect, stack = false, className }) {
|
|
2439
|
+
function ITBentoStatStrip({ items, activeId, onSelect, stack = false, stackItems, className }) {
|
|
2440
2440
|
const [hovered, setHovered] = (0, import_react17.useState)(null);
|
|
2441
2441
|
const focus = hovered ?? activeId ?? null;
|
|
2442
|
-
const
|
|
2442
|
+
const parts = stackItems ?? items;
|
|
2443
|
+
const total = parts.reduce((acc, item) => acc + (typeof item.value === "number" ? item.value : 0), 0);
|
|
2443
2444
|
const clickable = typeof onSelect === "function";
|
|
2444
2445
|
return /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("div", { className: (0, import_clsx9.default)("it-bento-statstrip", className), children: [
|
|
2445
2446
|
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)("div", { className: "it-bento-statstrip__grid", style: { ["--it-bento-cols"]: Math.min(items.length, 4) }, children: items.map((item) => {
|
|
@@ -2468,7 +2469,7 @@ function ITBentoStatStrip({ items, activeId, onSelect, stack = false, className
|
|
|
2468
2469
|
item.id
|
|
2469
2470
|
);
|
|
2470
2471
|
}) }),
|
|
2471
|
-
stack && total > 0 && /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("div", { className: (0, import_clsx9.default)("it-bento-statstrip__stack", focus && "is-dim"), "aria-hidden": true, children:
|
|
2472
|
+
stack && total > 0 && /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("div", { className: (0, import_clsx9.default)("it-bento-statstrip__stack", focus && "is-dim"), "aria-hidden": true, children: parts.filter((item) => typeof item.value === "number" && item.value > 0).map((item) => /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
|
|
2472
2473
|
"i",
|
|
2473
2474
|
{
|
|
2474
2475
|
className: (0, import_clsx9.default)(item.id === focus && "is-on"),
|