@memobit/libs 1.0.17 → 1.0.19

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.ts CHANGED
@@ -666,6 +666,7 @@ export declare type ControlPanelOption = {
666
666
  type: 'radio';
667
667
  value?: string | number;
668
668
  options: ControlPanelOptionItem[];
669
+ inline?: boolean;
669
670
  } | {
670
671
  id: string;
671
672
  label?: string;
@@ -2329,7 +2330,7 @@ declare interface SplitPanelProps {
2329
2330
  className?: string;
2330
2331
  }
2331
2332
 
2332
- export declare const StackedBar: ({ animated, height, normalize, orientation, segments, showLabels, showPercentage, thin, width, }: StackedBarProps) => JSX.Element;
2333
+ export declare const StackedBar: ({ animated, height, normalize, orientation, segments, separators, showLabels, showPercentage, thin, width, }: StackedBarProps) => JSX.Element;
2333
2334
 
2334
2335
  export declare type StackedBarOrientation = 'horizontal' | 'vertical';
2335
2336
 
@@ -2339,6 +2340,12 @@ export declare interface StackedBarProps {
2339
2340
  normalize?: boolean;
2340
2341
  orientation?: StackedBarOrientation;
2341
2342
  segments: StackedBarSegment[];
2343
+ /**
2344
+ * Draw a hairline between adjacent segments. Needed when a segment's colour encodes a *state*
2345
+ * rather than an identity, since two neighbours can then share a colour and visually merge into
2346
+ * one block. Opt-in, so existing bars keep their current look.
2347
+ */
2348
+ separators?: boolean;
2342
2349
  showLabels?: boolean;
2343
2350
  showPercentage?: boolean;
2344
2351
  thin?: boolean;
package/dist/index.esm.js CHANGED
@@ -13727,7 +13727,7 @@ var Gr = [{
13727
13727
  className: "control-panel__filter-title",
13728
13728
  children: n.label
13729
13729
  }), /* @__PURE__ */ e("div", {
13730
- className: "control-panel__filter-list",
13730
+ className: `control-panel__filter-list ${n.inline ? "control-panel__filter-list--inline" : ""}`,
13731
13731
  children: n.options.map((p) => {
13732
13732
  const g = n.value === p.value, w = () => c?.({
13733
13733
  optionId: n.id,
@@ -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, showLabels: o = !0, showPercentage: i = !0, thin: n = !1, width: d }) => {
23353
- const h = m1(() => {
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((w) => Math.max(0, w.value));
23356
- const g = s.reduce((w, v) => w + Math.max(0, v.value), 0);
23357
- return g === 0 ? s.map(() => 0) : s.map((w) => Math.max(0, w.value) / g * 100);
23358
- }, [s, l]), m = a === "vertical", p = {};
23359
- return c !== void 0 && (p.height = c), d !== void 0 && (p.width = d), /* @__PURE__ */ e("div", {
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
- n ? "stacked-bar--thin" : ""
23363
+ d ? "stacked-bar--thin" : "",
23364
+ o ? "stacked-bar--separators" : ""
23364
23365
  ].filter(Boolean).join(" "),
23365
- style: p,
23366
- children: s.map((g, w) => {
23367
- const v = h[w];
23368
- if (v <= 0) return null;
23369
- const u = g.state || "default", f = g.pattern || "solid", C = sl(g, v, i);
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
- t && f !== "solid" ? "stacked-bar__segment--animated" : ""
23375
+ `stacked-bar__segment--${C}`,
23376
+ t && C !== "solid" ? "stacked-bar__segment--animated" : ""
23376
23377
  ].filter(Boolean).join(" "),
23377
- style: m ? { height: `${v}%` } : { width: `${v}%` },
23378
- title: C,
23379
- children: o && /* @__PURE__ */ e("span", {
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: C
23382
+ children: x
23382
23383
  })
23383
- }, `stacked-bar-segment-${w}`);
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.17", Bi = 231, Ll = "64cf8ba", zl = "2026-07-01T14:08:46.911Z", Ri = "231", Vl = (t) => {
25432
+ }, _l = "1.0.19", Bi = 237, Ll = "b09e2e4", zl = "2026-07-12T16:04:18.732Z", Ri = "237", 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: 231,
25456
+ libBuildNumber: 237,
25456
25457
  libCommit: Ll,
25457
25458
  libBuildDate: zl
25458
25459
  };
package/dist/version.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
- "version": "1.0.17",
3
- "buildNumber": 231,
4
- "commit": "64cf8ba",
5
- "buildDate": "2026-07-01T14:08:46.911Z"
2
+ "version": "1.0.19",
3
+ "buildNumber": 237,
4
+ "commit": "b09e2e4",
5
+ "buildDate": "2026-07-12T16:04:18.732Z"
6
6
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@memobit/libs",
3
- "version": "1.0.17",
3
+ "version": "1.0.19",
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",