@memobit/libs 1.0.17 → 1.0.18
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.css +1 -1
- package/dist/index.d.ts +7 -1
- package/dist/index.esm.js +23 -22
- package/dist/version.json +4 -4
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -2329,7 +2329,7 @@ declare interface SplitPanelProps {
|
|
|
2329
2329
|
className?: string;
|
|
2330
2330
|
}
|
|
2331
2331
|
|
|
2332
|
-
export declare const StackedBar: ({ animated, height, normalize, orientation, segments, showLabels, showPercentage, thin, width, }: StackedBarProps) => JSX.Element;
|
|
2332
|
+
export declare const StackedBar: ({ animated, height, normalize, orientation, segments, separators, showLabels, showPercentage, thin, width, }: StackedBarProps) => JSX.Element;
|
|
2333
2333
|
|
|
2334
2334
|
export declare type StackedBarOrientation = 'horizontal' | 'vertical';
|
|
2335
2335
|
|
|
@@ -2339,6 +2339,12 @@ export declare interface StackedBarProps {
|
|
|
2339
2339
|
normalize?: boolean;
|
|
2340
2340
|
orientation?: StackedBarOrientation;
|
|
2341
2341
|
segments: StackedBarSegment[];
|
|
2342
|
+
/**
|
|
2343
|
+
* Draw a hairline between adjacent segments. Needed when a segment's colour encodes a *state*
|
|
2344
|
+
* rather than an identity, since two neighbours can then share a colour and visually merge into
|
|
2345
|
+
* one block. Opt-in, so existing bars keep their current look.
|
|
2346
|
+
*/
|
|
2347
|
+
separators?: boolean;
|
|
2342
2348
|
showLabels?: boolean;
|
|
2343
2349
|
showPercentage?: boolean;
|
|
2344
2350
|
thin?: boolean;
|
package/dist/index.esm.js
CHANGED
|
@@ -23349,38 +23349,39 @@ var ti = ({ variant: t = "text", animation: c = "pulse", width: l, height: a, bo
|
|
|
23349
23349
|
}, sl = (t, c, l) => {
|
|
23350
23350
|
const a = `${V0(c)}%`;
|
|
23351
23351
|
return t.label && l ? `${t.label} - ${a}` : t.label ? t.label : a;
|
|
23352
|
-
}, li = ({ animated: t = !1, height: c, normalize: l = !0, orientation: a = "horizontal", segments: s,
|
|
23353
|
-
const
|
|
23352
|
+
}, li = ({ animated: t = !1, height: c, normalize: l = !0, orientation: a = "horizontal", segments: s, separators: o = !1, showLabels: i = !0, showPercentage: n = !0, thin: d = !1, width: h }) => {
|
|
23353
|
+
const m = m1(() => {
|
|
23354
23354
|
if (s.length === 0) return [];
|
|
23355
|
-
if (!l) return s.map((
|
|
23356
|
-
const
|
|
23357
|
-
return
|
|
23358
|
-
}, [s, l]),
|
|
23359
|
-
return c !== void 0 && (
|
|
23355
|
+
if (!l) return s.map((v) => Math.max(0, v.value));
|
|
23356
|
+
const w = s.reduce((v, u) => v + Math.max(0, u.value), 0);
|
|
23357
|
+
return w === 0 ? s.map(() => 0) : s.map((v) => Math.max(0, v.value) / w * 100);
|
|
23358
|
+
}, [s, l]), p = a === "vertical", g = {};
|
|
23359
|
+
return c !== void 0 && (g.height = c), h !== void 0 && (g.width = h), /* @__PURE__ */ e("div", {
|
|
23360
23360
|
className: [
|
|
23361
23361
|
"stacked-bar",
|
|
23362
23362
|
`stacked-bar--${a}`,
|
|
23363
|
-
|
|
23363
|
+
d ? "stacked-bar--thin" : "",
|
|
23364
|
+
o ? "stacked-bar--separators" : ""
|
|
23364
23365
|
].filter(Boolean).join(" "),
|
|
23365
|
-
style:
|
|
23366
|
-
children: s.map((
|
|
23367
|
-
const
|
|
23368
|
-
if (
|
|
23369
|
-
const
|
|
23366
|
+
style: g,
|
|
23367
|
+
children: s.map((w, v) => {
|
|
23368
|
+
const u = m[v];
|
|
23369
|
+
if (u <= 0) return null;
|
|
23370
|
+
const f = w.state || "default", C = w.pattern || "solid", x = sl(w, u, n);
|
|
23370
23371
|
return /* @__PURE__ */ e("div", {
|
|
23371
23372
|
className: [
|
|
23372
23373
|
"stacked-bar__segment",
|
|
23373
|
-
`stacked-bar__segment--${u}`,
|
|
23374
23374
|
`stacked-bar__segment--${f}`,
|
|
23375
|
-
|
|
23375
|
+
`stacked-bar__segment--${C}`,
|
|
23376
|
+
t && C !== "solid" ? "stacked-bar__segment--animated" : ""
|
|
23376
23377
|
].filter(Boolean).join(" "),
|
|
23377
|
-
style:
|
|
23378
|
-
title:
|
|
23379
|
-
children:
|
|
23378
|
+
style: p ? { height: `${u}%` } : { width: `${u}%` },
|
|
23379
|
+
title: x,
|
|
23380
|
+
children: i && /* @__PURE__ */ e("span", {
|
|
23380
23381
|
className: "stacked-bar__segment-label",
|
|
23381
|
-
children:
|
|
23382
|
+
children: x
|
|
23382
23383
|
})
|
|
23383
|
-
}, `stacked-bar-segment-${
|
|
23384
|
+
}, `stacked-bar-segment-${v}`);
|
|
23384
23385
|
})
|
|
23385
23386
|
});
|
|
23386
23387
|
}, ai = ({ items: t, dividers: c = !0, align: l = "left", size: a = "medium", className: s = "" }) => t.length === 0 ? null : /* @__PURE__ */ e("div", {
|
|
@@ -25428,7 +25429,7 @@ var _i = (t, c, l) => {
|
|
|
25428
25429
|
} catch {
|
|
25429
25430
|
return t.trim();
|
|
25430
25431
|
}
|
|
25431
|
-
}, _l = "1.0.
|
|
25432
|
+
}, _l = "1.0.18", Bi = 234, Ll = "de1b606", zl = "2026-07-10T11:04:36.025Z", Ri = "234", Vl = (t) => {
|
|
25432
25433
|
const c = document.getElementById("mb-version-toast");
|
|
25433
25434
|
if (c) {
|
|
25434
25435
|
c.remove();
|
|
@@ -25452,7 +25453,7 @@ var _i = (t, c, l) => {
|
|
|
25452
25453
|
const c = {
|
|
25453
25454
|
...t,
|
|
25454
25455
|
lib: _l,
|
|
25455
|
-
libBuildNumber:
|
|
25456
|
+
libBuildNumber: 234,
|
|
25456
25457
|
libCommit: Ll,
|
|
25457
25458
|
libBuildDate: zl
|
|
25458
25459
|
};
|
package/dist/version.json
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@memobit/libs",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.18",
|
|
4
4
|
"description": "React component library powering the Memobit apps — 100+ components, 470+ icons, 70+ themes, helpers and hooks. TypeScript-first, ESM-only, React 19.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"react",
|