@conboai/storybook.components 0.3.71 → 0.3.72

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.
@@ -8,6 +8,7 @@ interface IMetroMap {
8
8
  onSelect?: (clusterId: string, subCluster: string) => void;
9
9
  isMultiSelect?: boolean;
10
10
  onHover?: (element: string) => void;
11
+ viewBox?: string;
11
12
  }
12
13
  interface IElement {
13
14
  tag: string;
@@ -26,6 +27,6 @@ interface IElement {
26
27
  children: IElement[];
27
28
  className?: string;
28
29
  }
29
- declare function MetroMap({ elements, onSelect, selectedCluster, minor, major, isMultiSelect, onHover }: IMetroMap): React.JSX.Element | null;
30
+ declare function MetroMap({ elements, onSelect, selectedCluster, minor, major, isMultiSelect, onHover, viewBox }: IMetroMap): React.JSX.Element | null;
30
31
  declare const _default: React.MemoExoticComponent<typeof MetroMap>;
31
32
  export default _default;
@@ -67144,40 +67144,42 @@ function Gle({
67144
67144
  minor: o,
67145
67145
  major: r,
67146
67146
  isMultiSelect: s = !1,
67147
- onHover: a
67147
+ onHover: a,
67148
+ viewBox: l
67148
67149
  }) {
67149
67150
  if (!t) return null;
67150
- const l = (c) => {
67151
- var p, w, C, v;
67152
- if (!c) return null;
67153
- const { tag: u, attributes: d, children: f } = c;
67154
- let A = d.fill;
67155
- (p = d == null ? void 0 : d.id) != null && p.includes("_fill") && (o != null && o.includes(pw(d.id, "_fill")) && (A = Yle), r != null && r.includes(pw(d.id, "_fill")) && (A = Nle));
67156
- let m = (w = d.id) != null && w.endsWith("_hover") ? "none" : "block";
67157
- (C = d.id) != null && C.includes("_selected") && (s ? m = !n || !zle(d.id, n) ? "none" : "block" : m = !n || !d.id.startsWith(n) ? "none" : "block");
67158
- const g = {
67159
- ...d,
67160
- fill: A,
67161
- key: d.id || Math.random(),
67151
+ const c = (u) => {
67152
+ var C, v, D, y;
67153
+ if (!u) return null;
67154
+ const { tag: d, attributes: f, children: A } = u, m = {};
67155
+ let g = f.fill;
67156
+ d === "svg" && (m.viewBox = l || f.viewBox), (C = f == null ? void 0 : f.id) != null && C.includes("_fill") && (o != null && o.includes(pw(f.id, "_fill")) && (g = Yle), r != null && r.includes(pw(f.id, "_fill")) && (g = Nle));
67157
+ let h = (v = f.id) != null && v.endsWith("_hover") ? "none" : "block";
67158
+ (D = f.id) != null && D.includes("_selected") && (s ? h = !n || !zle(f.id, n) ? "none" : "block" : h = !n || !f.id.startsWith(n) ? "none" : "block");
67159
+ const p = {
67160
+ ...f,
67161
+ ...m,
67162
+ fill: g,
67163
+ key: f.id || Math.random(),
67162
67164
  style: {
67163
67165
  pointerEvents: "none",
67164
- display: m
67166
+ display: h
67165
67167
  }
67166
67168
  };
67167
- return (v = d.id) != null && v.endsWith("_hover") && (g.className = "svg_hover_area"), "clusterid" in d && (g.className = "svg-clickable", g.onClick = () => {
67168
- let D = "";
67169
- const y = d.clusterid.match(/a2_(x\d+)/);
67170
- y && (D = y[1]), e && e(d.clusterid, D);
67171
- }, g.onMouseEnter = () => {
67172
- const D = d.id.split("_");
67173
- D && a && a(D[0]);
67169
+ return (y = f.id) != null && y.endsWith("_hover") && (p.className = "svg_hover_area"), "clusterid" in f && (p.className = "svg-clickable", p.onClick = () => {
67170
+ let B = "";
67171
+ const M = f.clusterid.match(/a2_(x\d+)/);
67172
+ M && (B = M[1]), e && e(f.clusterid, B);
67173
+ }, p.onMouseEnter = () => {
67174
+ const B = f.id.split("_");
67175
+ B && a && a(B[0]);
67174
67176
  }), cl(
67175
- u,
67176
- g,
67177
- f.map(l)
67177
+ d,
67178
+ p,
67179
+ A.map(c)
67178
67180
  );
67179
67181
  };
67180
- return /* @__PURE__ */ N.jsx(N.Fragment, { children: t && l(t) });
67182
+ return /* @__PURE__ */ N.jsx(N.Fragment, { children: t && c(t) });
67181
67183
  }
67182
67184
  const bye = xo(Gle), Ule = (t, e) => ({
67183
67185
  "&.MuiTextField-root": {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@conboai/storybook.components",
3
- "version": "0.3.71",
3
+ "version": "0.3.72",
4
4
  "main": "dist/storybook.components.mjs",
5
5
  "types": "dist/build/index.d.ts",
6
6
  "files": [