@selfdecode/sd-component-library 4.0.91 → 4.0.92
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/lib/core/theme.d.ts +1 -0
- package/lib/sd-component-library100.js +2 -2
- package/lib/sd-component-library101.js +3 -3
- package/lib/sd-component-library102.js +2 -2
- package/lib/sd-component-library104.js +4 -4
- package/lib/sd-component-library106.js +4 -4
- package/lib/sd-component-library112.js +1 -1
- package/lib/sd-component-library117.js +1 -1
- package/lib/sd-component-library118.js +2 -2
- package/lib/sd-component-library120.js +1 -1
- package/lib/sd-component-library121.js +1 -1
- package/lib/sd-component-library126.js +2 -2
- package/lib/sd-component-library127.js +2 -2
- package/lib/sd-component-library129.js +1 -1
- package/lib/sd-component-library132.js +3 -3
- package/lib/sd-component-library133.js +1 -1
- package/lib/sd-component-library135.js +2 -2
- package/lib/sd-component-library15.js +1 -1
- package/lib/sd-component-library166.js +1 -1
- package/lib/sd-component-library167.js +1 -1
- package/lib/sd-component-library170.js +1 -1
- package/lib/sd-component-library171.js +4 -4
- package/lib/sd-component-library172.js +1 -1
- package/lib/sd-component-library194.js +1 -0
- package/lib/sd-component-library194.js.map +1 -1
- package/lib/sd-component-library195.js +3 -3
- package/lib/sd-component-library199.js +2 -57
- package/lib/sd-component-library199.js.map +1 -1
- package/lib/sd-component-library200.js +30 -65
- package/lib/sd-component-library200.js.map +1 -1
- package/lib/sd-component-library201.js +599 -2
- package/lib/sd-component-library201.js.map +1 -1
- package/lib/sd-component-library202.js +3 -30
- package/lib/sd-component-library202.js.map +1 -1
- package/lib/sd-component-library203.js +57 -599
- package/lib/sd-component-library203.js.map +1 -1
- package/lib/sd-component-library204.js +24 -20
- package/lib/sd-component-library204.js.map +1 -1
- package/lib/sd-component-library205.js +19 -3
- package/lib/sd-component-library205.js.map +1 -1
- package/lib/sd-component-library206.js +5 -3
- package/lib/sd-component-library206.js.map +1 -1
- package/lib/sd-component-library207.js +5 -3
- package/lib/sd-component-library207.js.map +1 -1
- package/lib/sd-component-library208.js +52 -51
- package/lib/sd-component-library208.js.map +1 -1
- package/lib/sd-component-library209.js +18 -23
- package/lib/sd-component-library209.js.map +1 -1
- package/lib/sd-component-library210.js +21 -40
- package/lib/sd-component-library210.js.map +1 -1
- package/lib/sd-component-library211.js +3 -129
- package/lib/sd-component-library211.js.map +1 -1
- package/lib/sd-component-library212.js +3 -13
- package/lib/sd-component-library212.js.map +1 -1
- package/lib/sd-component-library213.js +64 -3
- package/lib/sd-component-library213.js.map +1 -1
- package/lib/sd-component-library214.js +19 -48
- package/lib/sd-component-library214.js.map +1 -1
- package/lib/sd-component-library215.js +34 -59
- package/lib/sd-component-library215.js.map +1 -1
- package/lib/sd-component-library216.js +129 -3
- package/lib/sd-component-library216.js.map +1 -1
- package/lib/sd-component-library217.js +13 -46
- package/lib/sd-component-library217.js.map +1 -1
- package/lib/sd-component-library221.js +61 -13
- package/lib/sd-component-library221.js.map +1 -1
- package/lib/sd-component-library222.js +3 -26
- package/lib/sd-component-library222.js.map +1 -1
- package/lib/sd-component-library223.js +3 -3
- package/lib/sd-component-library223.js.map +1 -1
- package/lib/sd-component-library224.js +52 -31
- package/lib/sd-component-library224.js.map +1 -1
- package/lib/sd-component-library225.js +46 -19
- package/lib/sd-component-library225.js.map +1 -1
- package/lib/sd-component-library226.js +17 -20
- package/lib/sd-component-library226.js.map +1 -1
- package/lib/sd-component-library227.js +26 -28
- package/lib/sd-component-library227.js.map +1 -1
- package/lib/sd-component-library228.js +3 -33
- package/lib/sd-component-library228.js.map +1 -1
- package/lib/sd-component-library229.js +3 -3
- package/lib/sd-component-library229.js.map +1 -1
- package/lib/sd-component-library23.js +2 -2
- package/lib/sd-component-library230.js +31 -129
- package/lib/sd-component-library230.js.map +1 -1
- package/lib/sd-component-library231.js +19 -43
- package/lib/sd-component-library231.js.map +1 -1
- package/lib/sd-component-library232.js +19 -46
- package/lib/sd-component-library232.js.map +1 -1
- package/lib/sd-component-library233.js +28 -8
- package/lib/sd-component-library233.js.map +1 -1
- package/lib/sd-component-library234.js +32 -63
- package/lib/sd-component-library234.js.map +1 -1
- package/lib/sd-component-library235.js +128 -42
- package/lib/sd-component-library235.js.map +1 -1
- package/lib/sd-component-library236.js +42 -12
- package/lib/sd-component-library236.js.map +1 -1
- package/lib/sd-component-library237.js +47 -21
- package/lib/sd-component-library237.js.map +1 -1
- package/lib/sd-component-library238.js +7 -108
- package/lib/sd-component-library238.js.map +1 -1
- package/lib/sd-component-library239.js +21 -47
- package/lib/sd-component-library239.js.map +1 -1
- package/lib/sd-component-library24.js +2 -2
- package/lib/sd-component-library240.js +108 -23
- package/lib/sd-component-library240.js.map +1 -1
- package/lib/sd-component-library241.js +43 -49
- package/lib/sd-component-library241.js.map +1 -1
- package/lib/sd-component-library242.js +22 -46
- package/lib/sd-component-library242.js.map +1 -1
- package/lib/sd-component-library243.js +51 -73
- package/lib/sd-component-library243.js.map +1 -1
- package/lib/sd-component-library244.js +57 -34
- package/lib/sd-component-library244.js.map +1 -1
- package/lib/sd-component-library245.js +43 -27
- package/lib/sd-component-library245.js.map +1 -1
- package/lib/sd-component-library246.js +11 -19
- package/lib/sd-component-library246.js.map +1 -1
- package/lib/sd-component-library247.js +47 -19
- package/lib/sd-component-library247.js.map +1 -1
- package/lib/sd-component-library248.js +41 -2
- package/lib/sd-component-library248.js.map +1 -1
- package/lib/sd-component-library249.js +26 -24
- package/lib/sd-component-library249.js.map +1 -1
- package/lib/sd-component-library25.js +1 -1
- package/lib/sd-component-library250.js +73 -17
- package/lib/sd-component-library250.js.map +1 -1
- package/lib/sd-component-library251.js +2 -5
- package/lib/sd-component-library251.js.map +1 -1
- package/lib/sd-component-library252.js +21 -5
- package/lib/sd-component-library252.js.map +1 -1
- package/lib/sd-component-library253.js +13 -11
- package/lib/sd-component-library253.js.map +1 -1
- package/lib/sd-component-library254.js +27 -323
- package/lib/sd-component-library254.js.map +1 -1
- package/lib/sd-component-library255.js +3 -5
- package/lib/sd-component-library255.js.map +1 -1
- package/lib/sd-component-library256.js +17 -18
- package/lib/sd-component-library256.js.map +1 -1
- package/lib/sd-component-library257.js +1 -1
- package/lib/sd-component-library257.js.map +1 -1
- package/lib/sd-component-library258.js +324 -21
- package/lib/sd-component-library258.js.map +1 -1
- package/lib/sd-component-library259.js +5 -3
- package/lib/sd-component-library259.js.map +1 -1
- package/lib/sd-component-library260.js +25 -30
- package/lib/sd-component-library260.js.map +1 -1
- package/lib/sd-component-library261.js +21 -50
- package/lib/sd-component-library261.js.map +1 -1
- package/lib/sd-component-library262.js +104 -113
- package/lib/sd-component-library262.js.map +1 -1
- package/lib/sd-component-library263.js +30 -74
- package/lib/sd-component-library263.js.map +1 -1
- package/lib/sd-component-library264.js +15 -70
- package/lib/sd-component-library264.js.map +1 -1
- package/lib/sd-component-library265.js +122 -26
- package/lib/sd-component-library265.js.map +1 -1
- package/lib/sd-component-library266.js +9 -23
- package/lib/sd-component-library266.js.map +1 -1
- package/lib/sd-component-library267.js +50 -30
- package/lib/sd-component-library267.js.map +1 -1
- package/lib/sd-component-library268.js +9 -21
- package/lib/sd-component-library268.js.map +1 -1
- package/lib/sd-component-library269.js +44 -118
- package/lib/sd-component-library269.js.map +1 -1
- package/lib/sd-component-library270.js +88 -120
- package/lib/sd-component-library270.js.map +1 -1
- package/lib/sd-component-library271.js +92 -10
- package/lib/sd-component-library271.js.map +1 -1
- package/lib/sd-component-library272.js +49 -50
- package/lib/sd-component-library272.js.map +1 -1
- package/lib/sd-component-library273.js +2 -9
- package/lib/sd-component-library273.js.map +1 -1
- package/lib/sd-component-library274.js +2 -51
- package/lib/sd-component-library274.js.map +1 -1
- package/lib/sd-component-library275.js +28 -88
- package/lib/sd-component-library275.js.map +1 -1
- package/lib/sd-component-library276.js +45 -86
- package/lib/sd-component-library276.js.map +1 -1
- package/lib/sd-component-library277.js +131 -49
- package/lib/sd-component-library277.js.map +1 -1
- package/lib/sd-component-library278.js +74 -2
- package/lib/sd-component-library278.js.map +1 -1
- package/lib/sd-component-library279.js +76 -2
- package/lib/sd-component-library279.js.map +1 -1
- package/lib/sd-component-library289.js +4 -4
- package/lib/sd-component-library290.js +2 -3
- package/lib/sd-component-library290.js.map +1 -1
- package/lib/sd-component-library291.js +8 -3
- package/lib/sd-component-library291.js.map +1 -1
- package/lib/sd-component-library292.js +328 -3
- package/lib/sd-component-library292.js.map +1 -1
- package/lib/sd-component-library293.js +51 -2
- package/lib/sd-component-library293.js.map +1 -1
- package/lib/sd-component-library294.js +3 -8
- package/lib/sd-component-library294.js.map +1 -1
- package/lib/sd-component-library295.js +3 -328
- package/lib/sd-component-library295.js.map +1 -1
- package/lib/sd-component-library296.js +3 -51
- package/lib/sd-component-library296.js.map +1 -1
- package/lib/sd-component-library314.js +89 -47
- package/lib/sd-component-library314.js.map +1 -1
- package/lib/sd-component-library315.js +47 -89
- package/lib/sd-component-library315.js.map +1 -1
- package/lib/sd-component-library316.js +23 -33
- package/lib/sd-component-library316.js.map +1 -1
- package/lib/sd-component-library317.js +33 -23
- package/lib/sd-component-library317.js.map +1 -1
- package/lib/sd-component-library32.js +1 -1
- package/lib/sd-component-library33.js +1 -1
- package/lib/sd-component-library49.js +1 -1
- package/lib/sd-component-library5.js +1 -1
- package/lib/sd-component-library50.js +1 -1
- package/lib/sd-component-library52.js +3 -3
- package/lib/sd-component-library53.js +2 -2
- package/lib/sd-component-library54.js +2 -2
- package/lib/sd-component-library57.js +44 -44
- package/lib/sd-component-library57.js.map +1 -1
- package/lib/sd-component-library6.js +1 -1
- package/lib/sd-component-library60.js +1 -1
- package/lib/sd-component-library64.js +1 -1
- package/lib/sd-component-library65.js +1 -1
- package/lib/sd-component-library70.js +2 -2
- package/lib/sd-component-library74.js +2 -2
- package/lib/sd-component-library75.js +3 -3
- package/lib/sd-component-library76.js +1 -1
- package/lib/sd-component-library77.js +1 -1
- package/lib/sd-component-library79.js +1 -1
- package/lib/sd-component-library80.js +1 -1
- package/lib/sd-component-library85.js +1 -1
- package/lib/sd-component-library86.js +6 -6
- package/lib/sd-component-library87.js +2 -2
- package/lib/sd-component-library88.js +1 -1
- package/lib/sd-component-library89.js +5 -5
- package/lib/sd-component-library90.js +1 -1
- package/lib/sd-component-library92.js +6 -6
- package/lib/sd-component-library93.js +1 -1
- package/lib/sd-component-library94.js +7 -7
- package/lib/sd-component-library95.js +1 -1
- package/lib/sd-component-library98.js +2 -2
- package/lib/sd-component-library99.js +3 -3
- package/package.json +1 -1
|
@@ -1,23 +1,51 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
const
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
}) =>
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
1
|
+
import { getCoordinateForArc as s } from "./sd-component-library91.js";
|
|
2
|
+
const v = (r) => {
|
|
3
|
+
const a = `Received ${r.map(
|
|
4
|
+
({ start: e, end: t }) => `(${e},${t})`
|
|
5
|
+
)}`, n = (e) => console.error(e, a);
|
|
6
|
+
if (r.some(
|
|
7
|
+
({ start: e, end: t }) => [e, t].some((o) => o < 0 || o > 1)
|
|
8
|
+
))
|
|
9
|
+
return n("Segment values should be between 0 and 1"), !1;
|
|
10
|
+
if (r.reduce(
|
|
11
|
+
(e, { start: t }) => e + (t === 0 ? 1 : 0),
|
|
12
|
+
0
|
|
13
|
+
) !== 1)
|
|
14
|
+
return n("One segment should start from 0"), !1;
|
|
15
|
+
if (r.reduce((e, { end: t }) => e + (t === 1 ? 1 : 0), 0) !== 1)
|
|
16
|
+
return n("One segment should end by 1"), !1;
|
|
17
|
+
if (r.some(({ start: e, end: t }) => e >= t))
|
|
18
|
+
return n("Segment start should be smaller than end"), !1;
|
|
19
|
+
for (let e = 1; e < r.length; e++) {
|
|
20
|
+
const t = r[e];
|
|
21
|
+
if (r[e - 1].end !== t.start)
|
|
22
|
+
return n("Previous segment end should be equal to next segment start"), !1;
|
|
18
23
|
}
|
|
19
|
-
|
|
24
|
+
return !0;
|
|
25
|
+
}, x = ({ start: r, end: a }, n, e) => {
|
|
26
|
+
const t = n - e, o = Math.round(r * 360), c = Math.round(a * 360), d = c - o, { x: l, y: u } = s(n, o), { x: f, y: m } = s(
|
|
27
|
+
t,
|
|
28
|
+
o,
|
|
29
|
+
n
|
|
30
|
+
), { x: h, y: i } = s(n, c), { x: g, y: S } = s(
|
|
31
|
+
t,
|
|
32
|
+
c,
|
|
33
|
+
n
|
|
34
|
+
);
|
|
35
|
+
return {
|
|
36
|
+
startX: l,
|
|
37
|
+
startY: u,
|
|
38
|
+
endX: h,
|
|
39
|
+
endY: i,
|
|
40
|
+
startInnerX: f,
|
|
41
|
+
startInnerY: m,
|
|
42
|
+
endInnerX: g,
|
|
43
|
+
endInnerY: S,
|
|
44
|
+
arc: d
|
|
45
|
+
};
|
|
46
|
+
};
|
|
20
47
|
export {
|
|
21
|
-
|
|
48
|
+
v as areSegmentsValid,
|
|
49
|
+
x as getSegmentCoordinates
|
|
22
50
|
};
|
|
23
51
|
//# sourceMappingURL=sd-component-library247.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sd-component-library247.js","sources":["../src/components/meters/
|
|
1
|
+
{"version":3,"file":"sd-component-library247.js","sources":["../src/components/meters/donut-diagram/utils.ts"],"sourcesContent":["import { getCoordinateForArc } from \"../outline-meter/utils\";\nimport { DonutSegment } from \"./interfaces\";\n\nexport const areSegmentsValid = (\n segments: Pick<DonutSegment, \"start\" | \"end\">[]\n): boolean => {\n const receivedSegments = `Received ${segments.map(\n ({ start, end }) => `(${start},${end})`\n )}`;\n const showError = (text: string) => console.error(text, receivedSegments);\n\n if (\n segments.some(({ start, end }) =>\n [start, end].some((point) => point < 0 || point > 1)\n )\n ) {\n showError(\"Segment values should be between 0 and 1\");\n return false;\n }\n\n if (\n segments.reduce<number>(\n (acc, { start }) => acc + (start === 0 ? 1 : 0),\n 0\n ) !== 1\n ) {\n showError(\"One segment should start from 0\");\n return false;\n }\n\n if (\n segments.reduce<number>((acc, { end }) => acc + (end === 1 ? 1 : 0), 0) !==\n 1\n ) {\n showError(\"One segment should end by 1\");\n return false;\n }\n\n if (segments.some(({ start, end }) => start >= end)) {\n showError(\"Segment start should be smaller than end\");\n return false;\n }\n\n for (let i = 1; i < segments.length; i++) {\n const currentSegment = segments[i];\n const prevSegment = segments[i - 1];\n if (prevSegment.end !== currentSegment.start) {\n showError(\"Previous segment end should be equal to next segment start\");\n return false;\n }\n }\n\n return true;\n};\n\nexport const getSegmentCoordinates = (\n { start, end }: Pick<DonutSegment, \"start\" | \"end\">,\n radius: number,\n segmentWidth: number\n) => {\n const innerRadius = radius - segmentWidth;\n\n const startAlpha = Math.round(start * 360);\n const endAlpha = Math.round(end * 360);\n const arc = endAlpha - startAlpha;\n\n const { x: startX, y: startY } = getCoordinateForArc(radius, startAlpha);\n const { x: startInnerX, y: startInnerY } = getCoordinateForArc(\n innerRadius,\n startAlpha,\n radius\n );\n\n const { x: endX, y: endY } = getCoordinateForArc(radius, endAlpha);\n const { x: endInnerX, y: endInnerY } = getCoordinateForArc(\n innerRadius,\n endAlpha,\n radius\n );\n return {\n startX,\n startY,\n endX,\n endY,\n startInnerX,\n startInnerY,\n endInnerX,\n endInnerY,\n arc,\n };\n};\n"],"names":["areSegmentsValid","segments","receivedSegments","start","end","showError","text","point","acc","i","currentSegment","getSegmentCoordinates","radius","segmentWidth","innerRadius","startAlpha","endAlpha","arc","startX","startY","getCoordinateForArc","startInnerX","startInnerY","endX","endY","endInnerX","endInnerY"],"mappings":";AAGa,MAAAA,IAAmB,CAC9BC,MACY;AACN,QAAAC,IAAmB,YAAYD,EAAS;AAAA,IAC5C,CAAC,EAAE,OAAAE,GAAO,KAAAC,QAAU,IAAID,CAAK,IAAIC,CAAG;AAAA,EACrC,CAAA,IACKC,IAAY,CAACC,MAAiB,QAAQ,MAAMA,GAAMJ,CAAgB;A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GAAGS,GAAW,GAAGC,EAAc,IAAAN;AAAA,IACrCN;AAAA,IACAE;AAAA,IACAJ;AAAA,EAAA;AAEK,SAAA;AAAA,IACL,QAAAM;AAAA,IACA,QAAAC;AAAA,IACA,MAAAI;AAAA,IACA,MAAAC;AAAA,IACA,aAAAH;AAAA,IACA,aAAAC;AAAA,IACA,WAAAG;AAAA,IACA,WAAAC;AAAA,IACA,KAAAT;AAAA,EAAA;AAEJ;"}
|
|
@@ -1,5 +1,44 @@
|
|
|
1
|
-
|
|
1
|
+
import { j as n } from "./sd-component-library195.js";
|
|
2
|
+
import g from "./sd-component-library194.js";
|
|
3
|
+
import { getSegmentCoordinates as I } from "./sd-component-library247.js";
|
|
4
|
+
const w = ({
|
|
5
|
+
segment: e,
|
|
6
|
+
size: o,
|
|
7
|
+
segmentWidth: s,
|
|
8
|
+
outlineWidth: c,
|
|
9
|
+
isMatching: a
|
|
10
|
+
}) => {
|
|
11
|
+
const { color: d } = e, t = o / 2, $ = t - s, {
|
|
12
|
+
startX: l,
|
|
13
|
+
startY: m,
|
|
14
|
+
arc: i,
|
|
15
|
+
startInnerY: p,
|
|
16
|
+
startInnerX: h,
|
|
17
|
+
endInnerY: u,
|
|
18
|
+
endInnerX: x,
|
|
19
|
+
endX: f,
|
|
20
|
+
endY: j
|
|
21
|
+
} = I(e, t, s), r = o / 2;
|
|
22
|
+
return /* @__PURE__ */ n.jsxs("g", { children: [
|
|
23
|
+
/* @__PURE__ */ n.jsx(
|
|
24
|
+
"path",
|
|
25
|
+
{
|
|
26
|
+
d: `M${r},${r} L${l},${m} A${t},${t} 0 ${i > 180 ? "1" : "0"},1 ${f},${j}Z`,
|
|
27
|
+
fill: a ? d : g.colors.cl_lightGrey,
|
|
28
|
+
strokeWidth: c,
|
|
29
|
+
stroke: "white"
|
|
30
|
+
}
|
|
31
|
+
),
|
|
32
|
+
/* @__PURE__ */ n.jsx(
|
|
33
|
+
"path",
|
|
34
|
+
{
|
|
35
|
+
d: `M${r},${r} L${h},${p} A${$},${$} 0 ${i > 180 ? "1" : "0"},1 ${x},${u}Z`,
|
|
36
|
+
fill: "white"
|
|
37
|
+
}
|
|
38
|
+
)
|
|
39
|
+
] });
|
|
40
|
+
};
|
|
2
41
|
export {
|
|
3
|
-
|
|
42
|
+
w as CompactDonutGaugeSegment
|
|
4
43
|
};
|
|
5
44
|
//# sourceMappingURL=sd-component-library248.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sd-component-library248.js","sources":["../src/components/meters/
|
|
1
|
+
{"version":3,"file":"sd-component-library248.js","sources":["../src/components/meters/compact-donut-gauge/partials/compact-donut-gauge-segment/compact-donut-gauge-segment.tsx"],"sourcesContent":["import React from \"react\";\n\nimport theme from \"../../../../../core/theme\";\nimport { getSegmentCoordinates } from \"../../../donut-diagram/utils\";\nimport { CompactDonutGaugeSegmentProps as Props } from \"./interfaces\";\n\nexport const CompactDonutGaugeSegment: React.FC<Props> = ({\n segment,\n size: diameter,\n segmentWidth,\n outlineWidth,\n isMatching,\n}) => {\n const { color } = segment;\n\n const radius = diameter / 2;\n const innerRadius = radius - segmentWidth;\n\n const {\n startX,\n startY,\n arc,\n startInnerY,\n startInnerX,\n endInnerY,\n endInnerX,\n endX,\n endY,\n } = getSegmentCoordinates(segment, radius, segmentWidth);\n\n const center = diameter / 2;\n\n return (\n <g>\n {/* colored sector */}\n <path\n d={`M${center},${center} L${startX},${startY} A${radius},${radius} 0 ${\n arc > 180 ? \"1\" : \"0\"\n },1 ${endX},${endY}Z`}\n fill={isMatching ? color : theme.colors[\"cl_lightGrey\"]}\n strokeWidth={outlineWidth}\n stroke=\"white\"\n />\n\n {/* white inner sector */}\n <path\n d={`M${center},${center} L${startInnerX},${startInnerY} A${innerRadius},${innerRadius} 0 ${\n arc > 180 ? \"1\" : \"0\"\n },1 ${endInnerX},${endInnerY}Z`}\n fill=\"white\"\n />\n </g>\n );\n};\n"],"names":["CompactDonutGaugeSegment","segment","diameter","segmentWidth","outlineWidth","isMatching","color","radius","innerRadius","startX","startY","arc","startInnerY","startInnerX","endInnerY","endInnerX","endX","endY","getSegmentCoordinates","center","jsx","theme"],"mappings":";;;AAMO,MAAMA,IAA4C,CAAC;AAAA,EACxD,SAAAC;AAAA,EACA,MAAMC;AAAA,EACN,cAAAC;AAAA,EACA,cAAAC;AAAA,EACA,YAAAC;AACF,MAAM;AACE,QAAA,EAAE,OAAAC,EAAU,IAAAL,GAEZM,IAASL,IAAW,GACpBM,IAAcD,IAASJ,GAEvB;AAAA,IACJ,QAAAM;AAAA,IACA,QAAAC;AAAA,IACA,KAAAC;AAAA,IACA,aAAAC;AAAA,IACA,aAAAC;AAAA,IACA,WAAAC;AAAA,IACA,WAAAC;AAAA,IACA,MAAAC;AAAA,IACA,MAAAC;AAAA,EACE,IAAAC,EAAsBjB,GAASM,GAAQJ,CAAY,GAEjDgB,IAASjB,IAAW;AAE1B,gCACG,KAEC,EAAA,UAAA;AAAA,IAAAkB,gBAAAA,EAAA;AAAA,MAAC;AAAA,MAAA;AAAA,QACC,GAAG,IAAID,CAAM,IAAIA,CAAM,KAAKV,CAAM,IAAIC,CAAM,KAAKH,CAAM,IAAIA,CAAM,MAC/DI,IAAM,MAAM,MAAM,GACpB,MAAMK,CAAI,IAAIC,CAAI;AAAA,QAClB,MAAMZ,IAAaC,IAAQe,EAAM,OAAO;AAAA,QACxC,aAAajB;AAAA,QACb,QAAO;AAAA,MAAA;AAAA,IACT;AAAA,IAGAgB,gBAAAA,EAAA;AAAA,MAAC;AAAA,MAAA;AAAA,QACC,GAAG,IAAID,CAAM,IAAIA,CAAM,KAAKN,CAAW,IAAID,CAAW,KAAKJ,CAAW,IAAIA,CAAW,MACnFG,IAAM,MAAM,MAAM,GACpB,MAAMI,CAAS,IAAID,CAAS;AAAA,QAC5B,MAAK;AAAA,MAAA;AAAA,IACP;AAAA,EACF,EAAA,CAAA;AAEJ;"}
|
|
@@ -1,28 +1,30 @@
|
|
|
1
|
-
import { j as
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
const l = (
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
1
|
+
import { j as t } from "./sd-component-library195.js";
|
|
2
|
+
import { FlexCenter as s } from "./sd-component-library35.js";
|
|
3
|
+
import { ResponsiveTextV2 as i } from "./sd-component-library149.js";
|
|
4
|
+
const l = ({
|
|
5
|
+
segment: { start: n, end: r, color: e },
|
|
6
|
+
size: o
|
|
7
|
+
}) => /* @__PURE__ */ t.jsx("foreignObject", { x: 0, y: 0, width: o, height: o, children: /* @__PURE__ */ t.jsx(s, { height: "100%", children: /* @__PURE__ */ t.jsxs(
|
|
8
|
+
i,
|
|
9
|
+
{
|
|
10
|
+
fontSizeWeight: [20, "bold"],
|
|
11
|
+
color: e,
|
|
12
|
+
sx: { position: "relative" },
|
|
13
|
+
children: [
|
|
14
|
+
Math.round((r - n) * 100),
|
|
15
|
+
/* @__PURE__ */ t.jsx(
|
|
16
|
+
i,
|
|
17
|
+
{
|
|
18
|
+
fontSizeWeight: [10, "bold"],
|
|
19
|
+
color: e,
|
|
20
|
+
sx: { position: "absolute", top: "4px", left: "100%" },
|
|
21
|
+
children: "%"
|
|
18
22
|
}
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
);
|
|
24
|
-
};
|
|
23
|
+
)
|
|
24
|
+
]
|
|
25
|
+
}
|
|
26
|
+
) }) });
|
|
25
27
|
export {
|
|
26
|
-
l as
|
|
28
|
+
l as CompactDonutGaugeValueIndicator
|
|
27
29
|
};
|
|
28
30
|
//# sourceMappingURL=sd-component-library249.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sd-component-library249.js","sources":["../src/components/
|
|
1
|
+
{"version":3,"file":"sd-component-library249.js","sources":["../src/components/meters/compact-donut-gauge/partials/compact-donut-gauge-value-indicator/compact-donut-gauge-value-indicator.tsx"],"sourcesContent":["import React from \"react\";\n\nimport { Flex } from \"rebass\";\n\nimport { FlexCenter } from \"../../../../containers\";\nimport { ResponsiveTextV2 } from \"../../../../texts\";\nimport { CompactDonutGaugeValueIndicatorProps as Props } from \"./interfaces\";\n\nexport const CompactDonutGaugeValueIndicator: React.FC<Props> = ({\n segment: { start, end, color },\n size,\n}) => {\n return (\n <foreignObject x={0} y={0} width={size} height={size}>\n <FlexCenter height=\"100%\">\n <ResponsiveTextV2\n fontSizeWeight={[20, \"bold\"]}\n color={color}\n sx={{ position: \"relative\" }}\n >\n {Math.round((end - start) * 100)}\n\n <ResponsiveTextV2\n fontSizeWeight={[10, \"bold\"]}\n color={color}\n sx={{ position: \"absolute\", top: \"4px\", left: \"100%\" }}\n >\n %\n </ResponsiveTextV2>\n </ResponsiveTextV2>\n </FlexCenter>\n </foreignObject>\n );\n};\n"],"names":["CompactDonutGaugeValueIndicator","start","end","color","size","jsx","FlexCenter","jsxs","ResponsiveTextV2"],"mappings":";;;AAQO,MAAMA,IAAmD,CAAC;AAAA,EAC/D,SAAS,EAAE,OAAAC,GAAO,KAAAC,GAAK,OAAAC,EAAM;AAAA,EAC7B,MAAAC;AACF,MAEKC,gBAAAA,EAAAA,IAAA,iBAAA,EAAc,GAAG,GAAG,GAAG,GAAG,OAAOD,GAAM,QAAQA,GAC9C,UAACC,gBAAAA,MAAAC,GAAA,EAAW,QAAO,QACjB,UAAAC,gBAAAA,EAAA;AAAA,EAACC;AAAA,EAAA;AAAA,IACC,gBAAgB,CAAC,IAAI,MAAM;AAAA,IAC3B,OAAAL;AAAA,IACA,IAAI,EAAE,UAAU,WAAW;AAAA,IAE1B,UAAA;AAAA,MAAK,KAAA,OAAOD,IAAMD,KAAS,GAAG;AAAA,MAE/BI,gBAAAA,EAAA;AAAA,QAACG;AAAA,QAAA;AAAA,UACC,gBAAgB,CAAC,IAAI,MAAM;AAAA,UAC3B,OAAAL;AAAA,UACA,IAAI,EAAE,UAAU,YAAY,KAAK,OAAO,MAAM,OAAO;AAAA,UACtD,UAAA;AAAA,QAAA;AAAA,MAED;AAAA,IAAA;AAAA,EAAA;AAAA,EAEJ,CAAA,EACF,CAAA;"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { j as r } from "./sd-component-library195.js";
|
|
2
2
|
import { Link as O } from "react-router-dom";
|
|
3
3
|
import { Button as Q, Flex as T } from "rebass";
|
|
4
|
-
import { LoadingSpinner as U } from "./sd-component-
|
|
4
|
+
import { LoadingSpinner as U } from "./sd-component-library204.js";
|
|
5
5
|
function V(t, e, o) {
|
|
6
6
|
return (n) => {
|
|
7
7
|
t == null || t(n), e && (`#${e}` !== window.location.hash && (o != null && o.replace(
|
|
@@ -1,22 +1,78 @@
|
|
|
1
|
-
import { j as
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
1
|
+
import { j as n } from "./sd-component-library195.js";
|
|
2
|
+
import { useHover as Z } from "./sd-component-library3.js";
|
|
3
|
+
import { getCoordinateForArc as l } from "./sd-component-library91.js";
|
|
4
|
+
import { getSegmentCoordinates as O } from "./sd-component-library247.js";
|
|
5
|
+
import { SegmentLabel as q } from "./sd-component-library323.js";
|
|
6
|
+
const h = 300, G = ({
|
|
7
|
+
segment: o,
|
|
8
|
+
segmentWidth: $,
|
|
9
|
+
outlineWidth: f,
|
|
10
|
+
size: i,
|
|
11
|
+
mobile: a,
|
|
12
|
+
...c
|
|
13
|
+
}) => {
|
|
14
|
+
const { start: p, end: x, color: u } = o, { labelOffset: j } = c, t = i / 2, d = t - $, {
|
|
15
|
+
startInnerX: k,
|
|
16
|
+
startInnerY: A,
|
|
17
|
+
endInnerX: M,
|
|
18
|
+
endInnerY: X,
|
|
19
|
+
endX: Y,
|
|
20
|
+
endY: v,
|
|
21
|
+
startY: S,
|
|
22
|
+
startX: g,
|
|
23
|
+
arc: e
|
|
24
|
+
} = O(o, t, $), r = i / 2, H = Math.round(p * 360), I = Math.round(x * 360), { isHover: L, hoverCallbacks: w } = Z(), m = L && !a, s = Math.sqrt(2) * (t + j), { x: y, y: C } = l(
|
|
25
|
+
s,
|
|
26
|
+
H,
|
|
27
|
+
t
|
|
28
|
+
), { x: E, y: R } = l(
|
|
29
|
+
s,
|
|
30
|
+
I,
|
|
31
|
+
t
|
|
17
32
|
);
|
|
33
|
+
return /* @__PURE__ */ n.jsxs("g", { ...a ? {} : w, children: [
|
|
34
|
+
/* @__PURE__ */ n.jsx(
|
|
35
|
+
"path",
|
|
36
|
+
{
|
|
37
|
+
d: `M${r},${r} L${y},${C} A${s},${s} 0 ${e > 180 ? "1" : "0"},1 ${E},${R}Z`,
|
|
38
|
+
fill: "transparent"
|
|
39
|
+
}
|
|
40
|
+
),
|
|
41
|
+
/* @__PURE__ */ n.jsx(
|
|
42
|
+
"path",
|
|
43
|
+
{
|
|
44
|
+
d: `M${r},${r} L${g},${S} A${t},${t} 0 ${e > 180 ? "1" : "0"},1 ${Y},${v}Z`,
|
|
45
|
+
fill: u,
|
|
46
|
+
strokeWidth: f,
|
|
47
|
+
stroke: "white"
|
|
48
|
+
}
|
|
49
|
+
),
|
|
50
|
+
/* @__PURE__ */ n.jsx(
|
|
51
|
+
"path",
|
|
52
|
+
{
|
|
53
|
+
d: `M${r},${r} L${k},${A} A${d},${d} 0 ${e > 180 ? "1" : "0"},1 ${M},${X}Z`,
|
|
54
|
+
fill: "white",
|
|
55
|
+
style: {
|
|
56
|
+
transform: `scale(${m ? 0.8 : 1}`,
|
|
57
|
+
transformOrigin: "center",
|
|
58
|
+
transition: `all ${h}ms`
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
),
|
|
62
|
+
/* @__PURE__ */ n.jsx(
|
|
63
|
+
q,
|
|
64
|
+
{
|
|
65
|
+
segment: o,
|
|
66
|
+
radius: t,
|
|
67
|
+
animationDuration: h,
|
|
68
|
+
isHover: m,
|
|
69
|
+
mobile: a,
|
|
70
|
+
...c
|
|
71
|
+
}
|
|
72
|
+
)
|
|
73
|
+
] });
|
|
18
74
|
};
|
|
19
75
|
export {
|
|
20
|
-
|
|
76
|
+
G as Segment
|
|
21
77
|
};
|
|
22
78
|
//# sourceMappingURL=sd-component-library250.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sd-component-library250.js","sources":["../src/components/
|
|
1
|
+
{"version":3,"file":"sd-component-library250.js","sources":["../src/components/meters/donut-diagram/partials/segment/segment.tsx"],"sourcesContent":["import React from \"react\";\n\nimport { useHover } from \"../../../../../core/custom-hooks\";\nimport { getCoordinateForArc } from \"../../../outline-meter/utils\";\nimport { getSegmentCoordinates } from \"../../utils\";\nimport { SegmentLabel } from \"../segment-label\";\nimport { SegmentProps as Props } from \"./interfaces\";\n\nconst animationDuration = 300;\n\nexport const Segment: React.FC<Props> = ({\n segment,\n segmentWidth,\n outlineWidth,\n size: diameter,\n mobile,\n ...labelProps\n}) => {\n const { start, end, color } = segment;\n const { labelOffset } = labelProps;\n\n const radius = diameter / 2;\n const innerRadius = radius - segmentWidth;\n\n const {\n startInnerX,\n startInnerY,\n endInnerX,\n endInnerY,\n endX,\n endY,\n startY,\n startX,\n arc,\n } = getSegmentCoordinates(segment, radius, segmentWidth);\n\n const center = diameter / 2;\n\n const startAlpha = Math.round(start * 360);\n const endAlpha = Math.round(end * 360);\n\n const { isHover, hoverCallbacks } = useHover();\n const showHover = isHover && !mobile;\n\n const maxRadius = Math.sqrt(2) * (radius + labelOffset);\n\n const { x: maskStartX, y: maskStartY } = getCoordinateForArc(\n maxRadius,\n startAlpha,\n radius\n );\n\n const { x: maskEndX, y: maskEndY } = getCoordinateForArc(\n maxRadius,\n endAlpha,\n radius\n );\n\n return (\n <g {...(mobile ? {} : hoverCallbacks)}>\n {/* mask */}\n <path\n d={`M${center},${center} L${maskStartX},${maskStartY} A${maxRadius},${maxRadius} 0 ${\n arc > 180 ? \"1\" : \"0\"\n },1 ${maskEndX},${maskEndY}Z`}\n fill=\"transparent\"\n />\n\n {/* colored sector */}\n <path\n d={`M${center},${center} L${startX},${startY} A${radius},${radius} 0 ${\n arc > 180 ? \"1\" : \"0\"\n },1 ${endX},${endY}Z`}\n fill={color}\n strokeWidth={outlineWidth}\n stroke=\"white\"\n />\n\n {/* white inner sector */}\n <path\n d={`M${center},${center} L${startInnerX},${startInnerY} A${innerRadius},${innerRadius} 0 ${\n arc > 180 ? \"1\" : \"0\"\n },1 ${endInnerX},${endInnerY}Z`}\n fill=\"white\"\n style={{\n transform: `scale(${showHover ? 0.8 : 1}`,\n transformOrigin: \"center\",\n transition: `all ${animationDuration}ms`,\n }}\n />\n\n <SegmentLabel\n segment={segment}\n radius={radius}\n animationDuration={animationDuration}\n isHover={showHover}\n mobile={mobile}\n {...labelProps}\n />\n </g>\n );\n};\n"],"names":["animationDuration","Segment","segment","segmentWidth","outlineWidth","diameter","mobile","labelProps","start","end","color","labelOffset","radius","innerRadius","startInnerX","startInnerY","endInnerX","endInnerY","endX","endY","startY","startX","arc","getSegmentCoordinates","center","startAlpha","endAlpha","isHover","hoverCallbacks","useHover","showHover","maxRadius","maskStartX","maskStartY","getCoordinateForArc","maskEndX","maskEndY","jsx","SegmentLabel"],"mappings":";;;;;AAQA,MAAMA,IAAoB,KAEbC,IAA2B,CAAC;AAAA,EACvC,SAAAC;AAAA,EACA,cAAAC;AAAA,EACA,cAAAC;AAAA,EACA,MAAMC;AAAA,EACN,QAAAC;AAAA,EACA,GAAGC;AACL,MAAM;AACJ,QAAM,EAAE,OAAAC,GAAO,KAAAC,GAAK,OAAAC,EAAA,IAAUR,GACxB,EAAE,aAAAS,EAAgB,IAAAJ,GAElBK,IAASP,IAAW,GACpBQ,IAAcD,IAAST,GAEvB;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T;AAAA,IAGAiC,gBAAAA,EAAA;AAAA,MAAC;AAAA,MAAA;AAAA,QACC,GAAG,IAAIb,CAAM,IAAIA,CAAM,KAAKV,CAAW,IAAIC,CAAW,KAAKF,CAAW,IAAIA,CAAW,MACnFS,IAAM,MAAM,MAAM,GACpB,MAAMN,CAAS,IAAIC,CAAS;AAAA,QAC5B,MAAK;AAAA,QACL,OAAO;AAAA,UACL,WAAW,SAASa,IAAY,MAAM,CAAC;AAAA,UACvC,iBAAiB;AAAA,UACjB,YAAY,OAAO9B,CAAiB;AAAA,QACtC;AAAA,MAAA;AAAA,IACF;AAAA,IAEAqC,gBAAAA,EAAA;AAAA,MAACC;AAAA,MAAA;AAAA,QACC,SAAApC;AAAA,QACA,QAAAU;AAAA,QACA,mBAAAZ;AAAA,QACA,SAAS8B;AAAA,QACT,QAAAxB;AAAA,QACC,GAAGC;AAAA,MAAA;AAAA,IACN;AAAA,EACF,EAAA,CAAA;AAEJ;"}
|
|
@@ -1,8 +1,5 @@
|
|
|
1
|
-
|
|
2
|
-
const l = (h) => /* @__PURE__ */ c.createElement("svg", { id: "Layer_1", xmlns: "http://www.w3.org/2000/svg", xmlnsXlink: "http://www.w3.org/1999/xlink", x: "0px", y: "0px", viewBox: "0 0 139.5 48.1", style: {
|
|
3
|
-
enableBackground: "new 0 0 139.5 48.1"
|
|
4
|
-
}, xmlSpace: "preserve", ...h }, /* @__PURE__ */ c.createElement("path", { fill: "#A2A2A2", d: "M138,30.7C138,30.7,138,30.7,138,30.7C138,30.8,138,30.8,138,30.7C138,30.8,138,30.8,138,30.7 C138,30.8,138,30.8,138,30.7C138,30.8,138,30.8,138,30.7C138,30.8,138,30.8,138,30.7l-0.2,0.1v0.5c0,0,0,0,0,0s0,0,0,0c0,0,0,0,0,0 c0,0,0,0,0,0s0,0,0,0c0,0,0,0,0,0c0,0,0,0,0,0s0,0,0,0v-0.5h-0.2c0,0,0,0,0,0c0,0,0,0,0,0c0,0,0,0,0,0c0,0,0,0,0,0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1.7c0.7,0,1.2-0.5,1.2-1.2c0-0.7-0.5-1.2-1.2-1.2h-1.7V5.6z M40,9 h4.5V8.1H41V6h3.4V5.2H41V3.2h3.5V2.3H40V9z M49.1,9h-2.4V2.3h2.4c2.1,0,3.5,1.4,3.5,3.3C52.6,7.6,51.2,9,49.1,9z M47.7,8.1h1.4 c1.5,0,2.4-1.1,2.4-2.4c0-1.4-0.9-2.5-2.4-2.5h-1.4V8.1z M61.6,9h-3.2V2.3h3.1c1.2,0,1.9,0.7,1.9,1.7c0,0.8-0.5,1.4-1.2,1.5 c0.7,0.1,1.3,0.8,1.3,1.6C63.5,8.2,62.8,9,61.6,9z M59.4,5.2h1.9c0.7,0,1-0.4,1-1s-0.4-1-1-1h-1.9V5.2z M61.3,8.1 c0.7,0,1.1-0.4,1.1-1c0-0.5-0.4-1-1.1-1h-2v2.1H61.3z M69.8,2.3l-1.9,3l-2-3h-1.1l2.6,3.9V9h1V6.2L71,2.3H69.8z" }));
|
|
1
|
+
const i = ({ start: g, end: t }, c) => c >= g && (t === 1 ? c <= t : c < t);
|
|
5
2
|
export {
|
|
6
|
-
|
|
3
|
+
i as isMatchingRange
|
|
7
4
|
};
|
|
8
5
|
//# sourceMappingURL=sd-component-library251.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sd-component-library251.js","sources":["../src/components/
|
|
1
|
+
{"version":3,"file":"sd-component-library251.js","sources":["../src/components/meters/linear-numeric-gauge-meter/utils.ts"],"sourcesContent":["import { LinearNumericGaugeMeterSegment } from \"./interfaces\";\n\nexport const isMatchingRange = (\n { start, end }: Pick<LinearNumericGaugeMeterSegment, \"start\" | \"end\">,\n value: number\n) => value >= start && (end === 1 ? value <= end : value < end);\n"],"names":["isMatchingRange","start","end","value"],"mappings":"AAEO,MAAMA,IAAkB,CAC7B,EAAE,OAAAC,GAAO,KAAAC,EAAI,GACbC,MACGA,KAASF,MAAUC,MAAQ,IAAIC,KAASD,IAAMC,IAAQD;"}
|
|
@@ -1,8 +1,24 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
1
|
+
import { j as x } from "./sd-component-library195.js";
|
|
2
|
+
import { Box as n } from "rebass";
|
|
3
|
+
const $ = ({
|
|
4
|
+
idx: o,
|
|
5
|
+
color: t,
|
|
6
|
+
total: i,
|
|
7
|
+
segmentHeight: r
|
|
8
|
+
}) => {
|
|
9
|
+
const s = `${o === 0 ? r / 2 : 0}px`, a = `${o === i - 1 ? r / 2 : 0}px`;
|
|
10
|
+
return /* @__PURE__ */ x.jsx(
|
|
11
|
+
n,
|
|
12
|
+
{
|
|
13
|
+
bg: t,
|
|
14
|
+
height: r,
|
|
15
|
+
sx: {
|
|
16
|
+
borderRadius: `${s} ${[...Array(2)].fill(a).join(" ")} ${s}`
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
);
|
|
20
|
+
};
|
|
5
21
|
export {
|
|
6
|
-
|
|
22
|
+
$ as LinearGaugeSegment
|
|
7
23
|
};
|
|
8
24
|
//# sourceMappingURL=sd-component-library252.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sd-component-library252.js","sources":["../src/components/
|
|
1
|
+
{"version":3,"file":"sd-component-library252.js","sources":["../src/components/meters/linear-gauge-meter-partials/linear-gauge-segment/linear-gauge-segment.tsx"],"sourcesContent":["import React from \"react\";\n\nimport { Box } from \"rebass\";\n\nimport { LinearGaugeSegmentProps as Props } from \"./interfaces\";\n\nexport const LinearGaugeSegment: React.FC<Props> = ({\n idx,\n color,\n total,\n segmentHeight,\n}) => {\n const leftRadius = `${idx === 0 ? segmentHeight / 2 : 0}px`;\n const rightRadius = `${idx === total - 1 ? segmentHeight / 2 : 0}px`;\n\n return (\n <Box\n bg={color}\n height={segmentHeight}\n sx={{\n borderRadius: `${leftRadius} ${[...Array(2)]\n .fill(rightRadius)\n .join(\" \")} ${leftRadius}`,\n }}\n />\n );\n};\n"],"names":["LinearGaugeSegment","idx","color","total","segmentHeight","leftRadius","rightRadius","jsx","Box"],"mappings":";;AAMO,MAAMA,IAAsC,CAAC;AAAA,EAClD,KAAAC;AAAA,EACA,OAAAC;AAAA,EACA,OAAAC;AAAA,EACA,eAAAC;AACF,MAAM;AACJ,QAAMC,IAAa,GAAGJ,MAAQ,IAAIG,IAAgB,IAAI,CAAC,MACjDE,IAAc,GAAGL,MAAQE,IAAQ,IAAIC,IAAgB,IAAI,CAAC;AAG9D,SAAAG,gBAAAA,EAAA;AAAA,IAACC;AAAA,IAAA;AAAA,MACC,IAAIN;AAAA,MACJ,QAAQE;AAAA,MACR,IAAI;AAAA,QACF,cAAc,GAAGC,CAAU,IAAI,CAAC,GAAG,MAAM,CAAC,CAAC,EACxC,KAAKC,CAAW,EAChB,KAAK,GAAG,CAAC,IAAID,CAAU;AAAA,MAC5B;AAAA,IAAA;AAAA,EAAA;AAGN;"}
|
|
@@ -1,21 +1,23 @@
|
|
|
1
1
|
import { j as o } from "./sd-component-library195.js";
|
|
2
|
-
import {
|
|
2
|
+
import { ResponsiveTextV2 as r } from "./sd-component-library149.js";
|
|
3
3
|
const m = ({
|
|
4
|
-
|
|
5
|
-
|
|
4
|
+
text: e,
|
|
5
|
+
color: t,
|
|
6
6
|
...i
|
|
7
7
|
}) => /* @__PURE__ */ o.jsx(
|
|
8
|
-
|
|
8
|
+
r,
|
|
9
9
|
{
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
10
|
+
height: "12px",
|
|
11
|
+
fontSizeWeight: [10, "semi-bold"],
|
|
12
|
+
color: t,
|
|
13
|
+
mx: "auto",
|
|
14
|
+
maxWidth: "100%",
|
|
15
|
+
textAlign: "center",
|
|
16
|
+
...i,
|
|
17
|
+
children: e
|
|
16
18
|
}
|
|
17
19
|
);
|
|
18
20
|
export {
|
|
19
|
-
m as
|
|
21
|
+
m as LinearGaugeLabel
|
|
20
22
|
};
|
|
21
23
|
//# sourceMappingURL=sd-component-library253.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sd-component-library253.js","sources":["../src/components/
|
|
1
|
+
{"version":3,"file":"sd-component-library253.js","sources":["../src/components/meters/linear-gauge-meter-partials/linear-gauge-label/linear-gauge-label.tsx"],"sourcesContent":["import React from \"react\";\n\nimport { ResponsiveTextV2 } from \"../../../texts\";\nimport { LinearGaugeLabelProps as Props } from \"./interfaces\";\n\nexport const LinearGaugeLabel: React.FC<Props> = ({\n text,\n color,\n ...restOfProps\n}) => {\n return (\n <ResponsiveTextV2\n height=\"12px\"\n fontSizeWeight={[10, \"semi-bold\"]}\n color={color}\n mx=\"auto\"\n maxWidth=\"100%\"\n textAlign=\"center\"\n {...restOfProps}\n >\n {text}\n </ResponsiveTextV2>\n );\n};\n"],"names":["LinearGaugeLabel","text","color","restOfProps","jsx","ResponsiveTextV2"],"mappings":";;AAKO,MAAMA,IAAoC,CAAC;AAAA,EAChD,MAAAC;AAAA,EACA,OAAAC;AAAA,EACA,GAAGC;AACL,MAEIC,gBAAAA,EAAA;AAAA,EAACC;AAAA,EAAA;AAAA,IACC,QAAO;AAAA,IACP,gBAAgB,CAAC,IAAI,WAAW;AAAA,IAChC,OAAAH;AAAA,IACA,IAAG;AAAA,IACH,UAAS;AAAA,IACT,WAAU;AAAA,IACT,GAAGC;AAAA,IAEH,UAAAF;AAAA,EAAA;AAAA;"}
|