@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,51 +1,27 @@
|
|
|
1
|
-
import {
|
|
2
|
-
const
|
|
3
|
-
const
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
if (r[e - 1].end !== t.start)
|
|
22
|
-
return n("Previous segment end should be equal to next segment start"), !1;
|
|
23
|
-
}
|
|
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
|
|
1
|
+
import { j as p } from "./sd-component-library195.js";
|
|
2
|
+
const m = (a) => {
|
|
3
|
+
const { position: s, diameter: t, rangeY: e, rangeX: n, distanceFromRanges: r, isInRange: o } = a;
|
|
4
|
+
if (o)
|
|
5
|
+
return null;
|
|
6
|
+
const { startX: d, startY: i, endX: X, endY: Y } = s === "left" ? {
|
|
7
|
+
startX: n || 0,
|
|
8
|
+
startY: e || t / 2 - 0.5,
|
|
9
|
+
endX: -r,
|
|
10
|
+
endY: t / 2 - 0.5
|
|
11
|
+
} : s === "top" ? {
|
|
12
|
+
startX: n || t / 2,
|
|
13
|
+
startY: e || 0,
|
|
14
|
+
endX: t / 2,
|
|
15
|
+
endY: -r
|
|
16
|
+
} : {
|
|
17
|
+
startX: n || t,
|
|
18
|
+
startY: e || t / 2 - 0.5,
|
|
19
|
+
endX: t + r,
|
|
20
|
+
endY: t / 2 - 0.5
|
|
45
21
|
};
|
|
22
|
+
return /* @__PURE__ */ p.jsx("path", { d: `M${d},${i} L${X},${Y}`, stroke: "#CCD0DB" });
|
|
46
23
|
};
|
|
47
24
|
export {
|
|
48
|
-
|
|
49
|
-
x as getSegmentCoordinates
|
|
25
|
+
m as OutlineMeterLabelPointer
|
|
50
26
|
};
|
|
51
27
|
//# sourceMappingURL=sd-component-library242.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sd-component-library242.js","sources":["../src/components/meters/
|
|
1
|
+
{"version":3,"file":"sd-component-library242.js","sources":["../src/components/meters/outline-meter/partials/outline-meter-label-pointer/outline-meter-label-pointer.tsx"],"sourcesContent":["import React from \"react\";\n\nimport { OutlineMeterLabelPointerProps as Props } from \"./interfaces\";\n\nexport const OutlineMeterLabelPointer: React.FC<Props> = (props) => {\n const { position, diameter, rangeY, rangeX, distanceFromRanges, isInRange } =\n props;\n\n if (isInRange) return null;\n\n const { startX, startY, endX, endY } =\n position === \"left\"\n ? {\n startX: rangeX || 0,\n startY: rangeY || diameter / 2 - 0.5,\n endX: -distanceFromRanges,\n endY: diameter / 2 - 0.5,\n }\n : position === \"top\"\n ? {\n startX: rangeX || diameter / 2,\n startY: rangeY || 0,\n endX: diameter / 2,\n endY: -distanceFromRanges,\n }\n : {\n startX: rangeX || diameter,\n startY: rangeY || diameter / 2 - 0.5,\n endX: diameter + distanceFromRanges,\n endY: diameter / 2 - 0.5,\n };\n\n return (\n <path d={`M${startX},${startY} L${endX},${endY}`} stroke={\"#CCD0DB\"} />\n );\n};\n"],"names":["OutlineMeterLabelPointer","props","position","diameter","rangeY","rangeX","distanceFromRanges","isInRange","startX","startY","endX","endY","jsx"],"mappings":";AAIa,MAAAA,IAA4C,CAACC,MAAU;AAClE,QAAM,EAAE,UAAAC,GAAU,UAAAC,GAAU,QAAAC,GAAQ,QAAAC,GAAQ,oBAAAC,GAAoB,WAAAC,EAC9D,IAAAN;AAEE,MAAAM;AAAkB,WAAA;AAEtB,QAAM,EAAE,QAAAC,GAAQ,QAAAC,GAAQ,MAAAC,GAAM,MAAAC,EAAK,IACjCT,MAAa,SACT;AAAA,IACE,QAAQG,KAAU;AAAA,IAClB,QAAQD,KAAUD,IAAW,IAAI;AAAA,IACjC,MAAM,CAACG;AAAA,IACP,MAAMH,IAAW,IAAI;AAAA,EAAA,IAEvBD,MAAa,QACb;AAAA,IACE,QAAQG,KAAUF,IAAW;AAAA,IAC7B,QAAQC,KAAU;AAAA,IAClB,MAAMD,IAAW;AAAA,IACjB,MAAM,CAACG;AAAA,EAAA,IAET;AAAA,IACE,QAAQD,KAAUF;AAAA,IAClB,QAAQC,KAAUD,IAAW,IAAI;AAAA,IACjC,MAAMA,IAAWG;AAAA,IACjB,MAAMH,IAAW,IAAI;AAAA,EAAA;AAG7B,SACGS,gBAAAA,EAAAA,IAAA,QAAA,EAAK,GAAG,IAAIJ,CAAM,IAAIC,CAAM,KAAKC,CAAI,IAAIC,CAAI,IAAI,QAAQ,UAAW,CAAA;AAEzE;"}
|
|
@@ -1,78 +1,56 @@
|
|
|
1
|
-
import { j as
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
const
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
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`
|
|
1
|
+
import { j as s } from "./sd-component-library195.js";
|
|
2
|
+
import { useRef as g, useState as $, useEffect as b } from "react";
|
|
3
|
+
import { Box as l } from "rebass";
|
|
4
|
+
import { labelPaddingX as o, labelWidth as u } from "./sd-component-library230.js";
|
|
5
|
+
import { ResponsiveTextV2 as v } from "./sd-component-library149.js";
|
|
6
|
+
const C = (x) => {
|
|
7
|
+
const {
|
|
8
|
+
position: t,
|
|
9
|
+
diameter: r,
|
|
10
|
+
label: d,
|
|
11
|
+
distanceFromLabelToRanges: p,
|
|
12
|
+
isInRange: e,
|
|
13
|
+
color: n
|
|
14
|
+
} = x, i = g(), [c, a] = $(0);
|
|
15
|
+
b(() => {
|
|
16
|
+
i.current && a(i.current.getBoundingClientRect().height);
|
|
17
|
+
}, [i]);
|
|
18
|
+
const h = t === "right" ? `${r + p}px` : t === "top" ? `${r / 2}px` : void 0, m = t === "left" ? `${r + p}px` : void 0, f = t === "left" || t === "right" ? `${r / 2}px` : `${-p}px`;
|
|
19
|
+
return /* @__PURE__ */ s.jsx(l, { sx: { position: "absolute", left: h, top: f, right: m }, children: /* @__PURE__ */ s.jsx(
|
|
20
|
+
l,
|
|
21
|
+
{
|
|
22
|
+
sx: {
|
|
23
|
+
position: "relative",
|
|
24
|
+
top: `-${c}px`,
|
|
25
|
+
left: t === "top" ? "-50%" : void 0,
|
|
26
|
+
py: "7px",
|
|
27
|
+
px: e ? `${o}px` : "0",
|
|
28
|
+
borderColor: e ? n : "cl_lightGrey",
|
|
29
|
+
borderWidth: e ? "2px" : "1pt",
|
|
30
|
+
borderStyle: e ? "solid" : "none",
|
|
31
|
+
borderBottomStyle: !e && t === "top" ? "none" : "solid",
|
|
32
|
+
borderRadius: e ? `${o}px ${o}px ${t !== "left" ? `${o}px` : "0"} ${t !== "right" ? `${o}px` : "0"}` : "0",
|
|
33
|
+
bg: "cl_white",
|
|
34
|
+
"& > div": {
|
|
35
|
+
maxWidth: t === "top" ? void 0 : `${u}px`
|
|
59
36
|
}
|
|
60
|
-
}
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
37
|
+
},
|
|
38
|
+
ref: i,
|
|
39
|
+
children: /* @__PURE__ */ s.jsx(
|
|
40
|
+
v,
|
|
41
|
+
{
|
|
42
|
+
width: "max-content",
|
|
43
|
+
fontSizeWeight: [[12, "semi-bold"]],
|
|
44
|
+
color: e && n !== "#CCD0DB" ? n : "cl_darkGrey",
|
|
45
|
+
textTransform: "uppercase",
|
|
46
|
+
letterSpacing: "1.8px",
|
|
47
|
+
children: d
|
|
48
|
+
}
|
|
49
|
+
)
|
|
50
|
+
}
|
|
51
|
+
) });
|
|
74
52
|
};
|
|
75
53
|
export {
|
|
76
|
-
|
|
54
|
+
C as BaseMeterLabelBox
|
|
77
55
|
};
|
|
78
56
|
//# sourceMappingURL=sd-component-library243.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sd-component-library243.js","sources":["../src/components/meters/
|
|
1
|
+
{"version":3,"file":"sd-component-library243.js","sources":["../src/components/meters/outline-meter/partials/base-meter-label-box/base-meter-label-box.tsx"],"sourcesContent":["import React, { useEffect, useRef, useState } from \"react\";\n\nimport { Box } from \"rebass\";\n\nimport { ResponsiveTextV2 } from \"../../../../texts/responsive-text-v2\";\nimport { labelPaddingX, labelWidth } from \"../../contants\";\nimport { BaseMeterLabelBoxProps as Props } from \"./interfaces\";\n\nexport const BaseMeterLabelBox: React.FC<Props> = (props) => {\n const {\n position,\n diameter,\n label,\n distanceFromLabelToRanges,\n isInRange,\n color,\n } = props;\n const ref = useRef<HTMLElement>();\n const [textHeight, setTextHeight] = useState(0);\n\n useEffect(() => {\n if (ref.current) setTextHeight(ref.current.getBoundingClientRect().height);\n }, [ref]);\n\n const left =\n position === \"right\"\n ? `${diameter + distanceFromLabelToRanges}px`\n : position === \"top\"\n ? `${diameter / 2}px`\n : undefined;\n const right =\n position === \"left\"\n ? `${diameter + distanceFromLabelToRanges}px`\n : undefined;\n const top =\n position === \"left\" || position === \"right\"\n ? `${diameter / 2}px`\n : `${-distanceFromLabelToRanges}px`;\n\n return (\n <Box sx={{ position: \"absolute\", left, top, right }}>\n <Box\n sx={{\n position: \"relative\",\n top: `-${textHeight}px`,\n left: position === \"top\" ? \"-50%\" : undefined,\n py: \"7px\",\n px: isInRange ? `${labelPaddingX}px` : \"0\",\n borderColor: isInRange ? color : \"cl_lightGrey\",\n borderWidth: isInRange ? \"2px\" : \"1pt\",\n borderStyle: isInRange ? \"solid\" : \"none\",\n borderBottomStyle:\n !isInRange && position === \"top\" ? \"none\" : \"solid\",\n borderRadius: isInRange\n ? `${labelPaddingX}px ${labelPaddingX}px ${\n position !== \"left\" ? `${labelPaddingX}px` : \"0\"\n } ${position !== \"right\" ? `${labelPaddingX}px` : \"0\"}`\n : \"0\",\n bg: \"cl_white\",\n \"& > div\": {\n maxWidth: position === \"top\" ? undefined : `${labelWidth}px`,\n },\n }}\n ref={ref}\n >\n <ResponsiveTextV2\n width=\"max-content\"\n fontSizeWeight={[[12, \"semi-bold\"]]}\n color={isInRange && color !== \"#CCD0DB\" ? color : \"cl_darkGrey\"}\n textTransform=\"uppercase\"\n letterSpacing=\"1.8px\"\n >\n {label}\n </ResponsiveTextV2>\n </Box>\n </Box>\n );\n};\n"],"names":["BaseMeterLabelBox","props","position","diameter","label","distanceFromLabelToRanges","isInRange","color","ref","useRef","textHeight","setTextHeight","useState","useEffect","left","right","top","jsx","Box","labelPaddingX","labelWidth","ResponsiveTextV2"],"mappings":";;;;;AAQa,MAAAA,IAAqC,CAACC,MAAU;AACrD,QAAA;AAAA,IACJ,UAAAC;AAAA,IACA,UAAAC;AAAA,IACA,OAAAC;AAAA,IACA,2BAAAC;AAAA,IACA,WAAAC;AAAA,IACA,OAAAC;AAAA,EACE,IAAAN,GACEO,IAAMC,KACN,CAACC,GAAYC,CAAa,IAAIC,EAAS,CAAC;AAE9C,EAAAC,EAAU,MAAM;AACd,IAAIL,EAAI,WAASG,EAAcH,EAAI,QAAQ,sBAAsB,EAAE,MAAM;AAAA,EAAA,GACxE,CAACA,CAAG,CAAC;AAER,QAAMM,IACJZ,MAAa,UACT,GAAGC,IAAWE,CAAyB,OACvCH,MAAa,QACb,GAAGC,IAAW,CAAC,OACf,QACAY,IACJb,MAAa,SACT,GAAGC,IAAWE,CAAyB,OACvC,QACAW,IACJd,MAAa,UAAUA,MAAa,UAChC,GAAGC,IAAW,CAAC,OACf,GAAG,CAACE,CAAyB;AAGjC,SAAAY,gBAAAA,MAACC,KAAI,IAAI,EAAE,UAAU,YAAY,MAAAJ,GAAM,KAAAE,GAAK,OAAAD,EAC1C,GAAA,UAAAE,gBAAAA,EAAA;AAAA,IAACC;AAAA,IAAA;AAAA,MACC,IAAI;AAAA,QACF,UAAU;AAAA,QACV,KAAK,IAAIR,CAAU;AAAA,QACnB,MAAMR,MAAa,QAAQ,SAAS;AAAA,QACpC,IAAI;AAAA,QACJ,IAAII,IAAY,GAAGa,CAAa,OAAO;AAAA,QACvC,aAAab,IAAYC,IAAQ;AAAA,QACjC,aAAaD,IAAY,QAAQ;AAAA,QACjC,aAAaA,IAAY,UAAU;AAAA,QACnC,mBACE,CAACA,KAAaJ,MAAa,QAAQ,SAAS;AAAA,QAC9C,cAAcI,IACV,GAAGa,CAAa,MAAMA,CAAa,MACjCjB,MAAa,SAAS,GAAGiB,CAAa,OAAO,GAC/C,IAAIjB,MAAa,UAAU,GAAGiB,CAAa,OAAO,GAAG,KACrD;AAAA,QACJ,IAAI;AAAA,QACJ,WAAW;AAAA,UACT,UAAUjB,MAAa,QAAQ,SAAY,GAAGkB,CAAU;AAAA,QAC1D;AAAA,MACF;AAAA,MACA,KAAAZ;AAAA,MAEA,UAAAS,gBAAAA,EAAA;AAAA,QAACI;AAAA,QAAA;AAAA,UACC,OAAM;AAAA,UACN,gBAAgB,CAAC,CAAC,IAAI,WAAW,CAAC;AAAA,UAClC,OAAOf,KAAaC,MAAU,YAAYA,IAAQ;AAAA,UAClD,eAAc;AAAA,UACd,eAAc;AAAA,UAEb,UAAAH;AAAA,QAAA;AAAA,MACH;AAAA,IAAA;AAAA,EAEJ,EAAA,CAAA;AAEJ;"}
|
|
@@ -1,44 +1,67 @@
|
|
|
1
|
-
import { j as
|
|
2
|
-
import
|
|
3
|
-
import {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
1
|
+
import { j as a } from "./sd-component-library195.js";
|
|
2
|
+
import { getCoordinateForArc as i } from "./sd-component-library91.js";
|
|
3
|
+
import { defaultTextBottomMargin as X } from "./sd-component-library229.js";
|
|
4
|
+
import { getRangeProperties as Y } from "./sd-component-library318.js";
|
|
5
|
+
import { BaseOutlineArc as b } from "./sd-component-library316.js";
|
|
6
|
+
import { DiscreteMeterLabelPointer as w } from "./sd-component-library319.js";
|
|
7
|
+
function z(s) {
|
|
8
|
+
const {
|
|
9
|
+
color: n,
|
|
10
|
+
idx: c,
|
|
11
|
+
gaugeWidth: d,
|
|
12
|
+
diameter: g,
|
|
13
|
+
arc: m,
|
|
14
|
+
distanceBetweenRanges: l,
|
|
15
|
+
totalRanges: p,
|
|
16
|
+
showLabel: h,
|
|
17
|
+
label: o,
|
|
18
|
+
isMatchedRange: x,
|
|
19
|
+
pointerWidth: f,
|
|
20
|
+
pointerLength: A,
|
|
21
|
+
horizontal: u
|
|
22
|
+
} = s, t = g / 2, { rangeArcStart: r, rangeArcEnd: e } = Y(
|
|
23
|
+
m,
|
|
24
|
+
p,
|
|
25
|
+
l,
|
|
26
|
+
c
|
|
27
|
+
), { x: R, y: j } = i(
|
|
28
|
+
t,
|
|
29
|
+
r
|
|
30
|
+
), { x: B, y: E } = i(
|
|
31
|
+
t,
|
|
32
|
+
e
|
|
33
|
+
), M = (r + e) / 2;
|
|
34
|
+
return /* @__PURE__ */ a.jsxs("g", { children: [
|
|
35
|
+
/* @__PURE__ */ a.jsx(
|
|
36
|
+
b,
|
|
25
37
|
{
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
38
|
+
startX: R,
|
|
39
|
+
startY: j,
|
|
40
|
+
endX: B,
|
|
41
|
+
endY: E,
|
|
42
|
+
startAlpha: r,
|
|
43
|
+
endAlpha: e,
|
|
44
|
+
color: n,
|
|
45
|
+
radius: t,
|
|
46
|
+
width: d
|
|
30
47
|
}
|
|
31
48
|
),
|
|
32
|
-
/* @__PURE__ */
|
|
33
|
-
|
|
49
|
+
h && o && !x && /* @__PURE__ */ a.jsx(
|
|
50
|
+
w,
|
|
34
51
|
{
|
|
35
|
-
|
|
36
|
-
|
|
52
|
+
alpha: M,
|
|
53
|
+
pointerLength: A,
|
|
54
|
+
pointerWidth: f,
|
|
55
|
+
radius: t,
|
|
56
|
+
color: n,
|
|
57
|
+
textBottomMargin: X,
|
|
58
|
+
label: o,
|
|
59
|
+
horizontal: u
|
|
37
60
|
}
|
|
38
61
|
)
|
|
39
62
|
] });
|
|
40
|
-
}
|
|
63
|
+
}
|
|
41
64
|
export {
|
|
42
|
-
|
|
65
|
+
z as DiscreteRange
|
|
43
66
|
};
|
|
44
67
|
//# sourceMappingURL=sd-component-library244.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sd-component-library244.js","sources":["../src/components/meters/
|
|
1
|
+
{"version":3,"file":"sd-component-library244.js","sources":["../src/components/meters/multi-option-discrete-outline-meter/partials/discrete-range/discrete-range.tsx"],"sourcesContent":["import React, { PropsWithChildren } from \"react\";\n\nimport { BaseOutlineArc } from \"../../../outline-meter/partials/base-outline-arc\";\nimport { getCoordinateForArc } from \"../../../outline-meter/utils\";\nimport { defaultTextBottomMargin } from \"../../constants\";\nimport { getRangeProperties } from \"../../utils\";\nimport { DiscreteMeterLabelPointer } from \"../discrete-meter-label-pointer\";\nimport { DiscreteRangeProps as Props } from \"./interfaces\";\n\nexport function DiscreteRange<T>(props: PropsWithChildren<Props<T>>) {\n const {\n color,\n idx,\n gaugeWidth,\n diameter,\n arc,\n distanceBetweenRanges,\n totalRanges,\n showLabel,\n label,\n isMatchedRange,\n pointerWidth,\n pointerLength,\n horizontal,\n } = props;\n\n const radius = diameter / 2;\n\n const { rangeArcStart, rangeArcEnd } = getRangeProperties(\n arc,\n totalRanges,\n distanceBetweenRanges,\n idx\n );\n\n const { x: rangeStartX, y: rangeStartY } = getCoordinateForArc(\n radius,\n rangeArcStart\n );\n const { x: rangeEndX, y: rangeEndY } = getCoordinateForArc(\n radius,\n rangeArcEnd\n );\n\n const middleArcAlpha = (rangeArcStart + rangeArcEnd) / 2;\n\n return (\n <g>\n <BaseOutlineArc\n startX={rangeStartX}\n startY={rangeStartY}\n endX={rangeEndX}\n endY={rangeEndY}\n startAlpha={rangeArcStart}\n endAlpha={rangeArcEnd}\n color={color}\n radius={radius}\n width={gaugeWidth}\n />\n\n {showLabel && label && !isMatchedRange && (\n <DiscreteMeterLabelPointer\n alpha={middleArcAlpha}\n pointerLength={pointerLength}\n pointerWidth={pointerWidth}\n radius={radius}\n color={color}\n textBottomMargin={defaultTextBottomMargin}\n label={label}\n horizontal={horizontal}\n />\n )}\n </g>\n );\n}\n"],"names":["DiscreteRange","props","color","idx","gaugeWidth","diameter","arc","distanceBetweenRanges","totalRanges","showLabel","label","isMatchedRange","pointerWidth","pointerLength","horizontal","radius","rangeArcStart","rangeArcEnd","getRangeProperties","rangeStartX","rangeStartY","getCoordinateForArc","rangeEndX","rangeEndY","middleArcAlpha","jsx","BaseOutlineArc","DiscreteMeterLabelPointer","defaultTextBottomMargin"],"mappings":";;;;;;AASO,SAASA,EAAiBC,GAAoC;AAC7D,QAAA;AAAA,IACJ,OAAAC;AAAA,IACA,KAAAC;AAAA,IACA,YAAAC;AAAA,IACA,UAAAC;AAAA,IACA,KAAAC;AAAA,IACA,uBAAAC;AAAA,IACA,aAAAC;AAAA,IACA,WAAAC;AAAA,IACA,OAAAC;AAAA,IACA,gBAAAC;AAAA,IACA,cAAAC;AAAA,IACA,eAAAC;AAAA,IACA,YAAAC;AAAA,EACE,IAAAb,GAEEc,IAASV,IAAW,GAEpB,EAAE,eAAAW,GAAe,aAAAC,EAAA,IAAgBC;AAAA,IACrCZ;AAAA,IACAE;AAAA,IACAD;AAAA,IACAJ;AAAA,EAAA,GAGI,EAAE,GAAGgB,GAAa,GAAGC,EAAgB,IAAAC;AAAA,IACzCN;AAAA,IACAC;AAAA,EAAA,GAEI,EAAE,GAAGM,GAAW,GAAGC,EAAc,IAAAF;AAAA,IACrCN;AAAA,IACAE;AAAA,EAAA,GAGIO,KAAkBR,IAAgBC,KAAe;AAEvD,gCACG,KACC,EAAA,UAAA;AAAA,IAAAQ,gBAAAA,EAAA;AAAA,MAACC;AAAA,MAAA;AAAA,QACC,QAAQP;AAAA,QACR,QAAQC;AAAA,QACR,MAAME;AAAA,QACN,MAAMC;AAAA,QACN,YAAYP;AAAA,QACZ,UAAUC;AAAA,QACV,OAAAf;AAAA,QACA,QAAAa;AAAA,QACA,OAAOX;AAAA,MAAA;AAAA,IACT;AAAA,IAECK,KAAaC,KAAS,CAACC,KACtBc,gBAAAA,EAAA;AAAA,MAACE;AAAA,MAAA;AAAA,QACC,OAAOH;AAAA,QACP,eAAAX;AAAA,QACA,cAAAD;AAAA,QACA,QAAAG;AAAA,QACA,OAAAb;AAAA,QACA,kBAAkB0B;AAAA,QAClB,OAAAlB;AAAA,QACA,YAAAI;AAAA,MAAA;AAAA,IACF;AAAA,EAEJ,EAAA,CAAA;AAEJ;"}
|
|
@@ -1,30 +1,46 @@
|
|
|
1
|
-
import { j as
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
1
|
+
import { j as M } from "./sd-component-library195.js";
|
|
2
|
+
import { getInnerX as T, getInnerY as W, degToRad as r, getCoordinateForArc as y } from "./sd-component-library91.js";
|
|
3
|
+
import { BaseNeedle as B } from "./sd-component-library317.js";
|
|
4
|
+
function E(p) {
|
|
5
|
+
const {
|
|
6
|
+
needleColor: u,
|
|
7
|
+
options: n,
|
|
8
|
+
value: h,
|
|
9
|
+
needleWidth: e,
|
|
10
|
+
innerCircleRadius: m,
|
|
11
|
+
innerCircleStrokeWidth: x,
|
|
12
|
+
diameter: R,
|
|
13
|
+
arc: a,
|
|
14
|
+
distanceBetweenRanges: c,
|
|
15
|
+
distanceFromRange: s,
|
|
16
|
+
gaugeWidth: i
|
|
17
|
+
} = p, o = n.findIndex(
|
|
18
|
+
(F) => h === F.value
|
|
19
|
+
), d = R / 2, f = (360 - a) / 2, l = a - (n.length - 1) * c, g = o / n.length, v = (o + 1) / n.length, A = l * (v - g), t = f + c * o + l * g + A / 2, { x: C, y: I } = y(d, t), S = T(
|
|
20
|
+
C,
|
|
21
|
+
r(t),
|
|
22
|
+
s + i + e / 2
|
|
23
|
+
), X = W(
|
|
24
|
+
I,
|
|
25
|
+
r(t),
|
|
26
|
+
s + i + e / 2
|
|
27
|
+
), Y = e / 2 * Math.cos(r(t)), j = e / 2 * Math.sin(r(t));
|
|
28
|
+
return /* @__PURE__ */ M.jsx(
|
|
29
|
+
B,
|
|
30
|
+
{
|
|
31
|
+
dx: Y,
|
|
32
|
+
dy: j,
|
|
33
|
+
color: u,
|
|
34
|
+
radius: d,
|
|
35
|
+
tipX: S,
|
|
36
|
+
tipY: X,
|
|
37
|
+
innerCircleStrokeWidth: x,
|
|
38
|
+
innerCircleRadius: m,
|
|
39
|
+
needleWidth: e
|
|
40
|
+
}
|
|
41
|
+
);
|
|
42
|
+
}
|
|
27
43
|
export {
|
|
28
|
-
|
|
44
|
+
E as DiscreteMeterNeedle
|
|
29
45
|
};
|
|
30
46
|
//# sourceMappingURL=sd-component-library245.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sd-component-library245.js","sources":["../src/components/meters/
|
|
1
|
+
{"version":3,"file":"sd-component-library245.js","sources":["../src/components/meters/multi-option-discrete-outline-meter/partials/discrete-meter-needle/discrete-meter-needle.tsx"],"sourcesContent":["import React, { PropsWithChildren } from \"react\";\n\nimport { BaseNeedle } from \"../../../outline-meter/partials/base-needle\";\nimport {\n degToRad,\n getCoordinateForArc,\n getInnerX,\n getInnerY,\n} from \"../../../outline-meter/utils\";\nimport { DiscreteMeterNeedleProps as Props } from \"./interfaces\";\n\nexport function DiscreteMeterNeedle<T>(props: PropsWithChildren<Props<T>>) {\n const {\n needleColor,\n options,\n value,\n needleWidth,\n innerCircleRadius,\n innerCircleStrokeWidth,\n diameter,\n arc,\n distanceBetweenRanges,\n distanceFromRange,\n gaugeWidth,\n } = props;\n\n const matchingRangeIndex = options.findIndex(\n (option) => value === option.value\n );\n\n const radius = diameter / 2;\n\n const arcStart = (360 - arc) / 2;\n const arcForRanges = arc - (options.length - 1) * distanceBetweenRanges;\n\n const start = matchingRangeIndex / options.length;\n const end = (matchingRangeIndex + 1) / options.length;\n\n const rangeArc = arcForRanges * (end - start);\n\n const rangeArcStart =\n arcStart +\n distanceBetweenRanges * matchingRangeIndex +\n arcForRanges * start;\n\n const valueAlpha = rangeArcStart + rangeArc / 2;\n const { x: valueX, y: valueY } = getCoordinateForArc(radius, valueAlpha);\n\n const needleTipX = getInnerX(\n valueX,\n degToRad(valueAlpha),\n distanceFromRange + gaugeWidth + needleWidth / 2\n );\n const needleTipY = getInnerY(\n valueY,\n degToRad(valueAlpha),\n distanceFromRange + gaugeWidth + needleWidth / 2\n );\n\n const dx = (needleWidth / 2) * Math.cos(degToRad(valueAlpha));\n const dy = (needleWidth / 2) * Math.sin(degToRad(valueAlpha));\n\n return (\n <BaseNeedle\n dx={dx}\n dy={dy}\n color={needleColor}\n radius={radius}\n tipX={needleTipX}\n tipY={needleTipY}\n innerCircleStrokeWidth={innerCircleStrokeWidth}\n innerCircleRadius={innerCircleRadius}\n needleWidth={needleWidth}\n />\n );\n}\n"],"names":["DiscreteMeterNeedle","props","needleColor","options","value","needleWidth","innerCircleRadius","innerCircleStrokeWidth","diameter","arc","distanceBetweenRanges","distanceFromRange","gaugeWidth","matchingRangeIndex","option","radius","arcStart","arcForRanges","start","end","rangeArc","valueAlpha","valueX","valueY","getCoordinateForArc","needleTipX","getInnerX","degToRad","needleTipY","getInnerY","dx","dy","jsx","BaseNeedle"],"mappings":";;;AAWO,SAASA,EAAuBC,GAAoC;AACnE,QAAA;AAAA,IACJ,aAAAC;AAAA,IACA,SAAAC;AAAA,IACA,OAAAC;AAAA,IACA,aAAAC;AAAA,IACA,mBAAAC;AAAA,IACA,wBAAAC;AAAA,IACA,UAAAC;AAAA,IACA,KAAAC;AAAA,IACA,uBAAAC;AAAA,IACA,mBAAAC;AAAA,IACA,YAAAC;AAAA,EACE,IAAAX,GAEEY,IAAqBV,EAAQ;AAAA,IACjC,CAACW,MAAWV,MAAUU,EAAO;AAAA,EAAA,GAGzBC,IAASP,IAAW,GAEpBQ,KAAY,MAAMP,KAAO,GACzBQ,IAAeR,KAAON,EAAQ,SAAS,KAAKO,GAE5CQ,IAAQL,IAAqBV,EAAQ,QACrCgB,KAAON,IAAqB,KAAKV,EAAQ,QAEzCiB,IAAWH,KAAgBE,IAAMD,IAOjCG,IAJJL,IACAN,IAAwBG,IACxBI,IAAeC,IAEkBE,IAAW,GACxC,EAAE,GAAGE,GAAQ,GAAGC,MAAWC,EAAoBT,GAAQM,CAAU,GAEjEI,IAAaC;AAAA,IACjBJ;AAAA,IACAK,EAASN,CAAU;AAAA,IACnBV,IAAoBC,IAAaP,IAAc;AAAA,EAAA,GAE3CuB,IAAaC;AAAA,IACjBN;AAAA,IACAI,EAASN,CAAU;AAAA,IACnBV,IAAoBC,IAAaP,IAAc;AAAA,EAAA,GAG3CyB,IAAMzB,IAAc,IAAK,KAAK,IAAIsB,EAASN,CAAU,CAAC,GACtDU,IAAM1B,IAAc,IAAK,KAAK,IAAIsB,EAASN,CAAU,CAAC;AAG1D,SAAAW,gBAAAA,EAAA;AAAA,IAACC;AAAA,IAAA;AAAA,MACC,IAAAH;AAAA,MACA,IAAAC;AAAA,MACA,OAAO7B;AAAA,MACP,QAAAa;AAAA,MACA,MAAMU;AAAA,MACN,MAAMG;AAAA,MACN,wBAAArB;AAAA,MACA,mBAAAD;AAAA,MACA,aAAAD;AAAA,IAAA;AAAA,EAAA;AAGN;"}
|
|
@@ -1,24 +1,16 @@
|
|
|
1
|
-
import { j as
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
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(
|
|
1
|
+
import { j as g } from "./sd-component-library195.js";
|
|
2
|
+
import { getRangeProperties as d } from "./sd-component-library318.js";
|
|
3
|
+
import { MatchedRangeLabelBox as x } from "./sd-component-library314.js";
|
|
4
|
+
const h = (e) => {
|
|
5
|
+
const { idx: t, totalRanges: a, distanceBetweenRanges: r, arc: n } = e, { rangeArcStart: o, rangeArcEnd: s } = d(
|
|
11
6
|
n,
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
}
|
|
18
|
-
}
|
|
19
|
-
);
|
|
7
|
+
a,
|
|
8
|
+
r,
|
|
9
|
+
t
|
|
10
|
+
), c = Math.round((o + s) / 2);
|
|
11
|
+
return /* @__PURE__ */ g.jsx(x, { ...e, alpha: c, round: !0 });
|
|
20
12
|
};
|
|
21
13
|
export {
|
|
22
|
-
|
|
14
|
+
h as MatchedRangeLabelBox
|
|
23
15
|
};
|
|
24
16
|
//# sourceMappingURL=sd-component-library246.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sd-component-library246.js","sources":["../src/components/meters/
|
|
1
|
+
{"version":3,"file":"sd-component-library246.js","sources":["../src/components/meters/multi-option-discrete-outline-meter/partials/matched-range-label-box/matched-range-label-box.tsx"],"sourcesContent":["import React from \"react\";\n\nimport { MatchedRangeLabelBox as LabelBox } from \"../../../common-outline-meter-partials\";\nimport { getRangeProperties } from \"../../utils\";\nimport { MatchedRangeLabelBoxProps as Props } from \"./interfaces\";\n\nexport const MatchedRangeLabelBox: React.FC<Props> = (props) => {\n const { idx, totalRanges, distanceBetweenRanges, arc } = props;\n\n const { rangeArcStart, rangeArcEnd } = getRangeProperties(\n arc,\n totalRanges,\n distanceBetweenRanges,\n idx\n );\n\n const alpha = Math.round((rangeArcStart + rangeArcEnd) / 2);\n\n return <LabelBox {...props} alpha={alpha} round />;\n};\n"],"names":["MatchedRangeLabelBox","props","idx","totalRanges","distanceBetweenRanges","arc","rangeArcStart","rangeArcEnd","getRangeProperties","alpha","LabelBox"],"mappings":";;;AAMa,MAAAA,IAAwC,CAACC,MAAU;AAC9D,QAAM,EAAE,KAAAC,GAAK,aAAAC,GAAa,uBAAAC,GAAuB,KAAAC,MAAQJ,GAEnD,EAAE,eAAAK,GAAe,aAAAC,EAAA,IAAgBC;AAAA,IACrCH;AAAA,IACAF;AAAA,IACAC;AAAA,IACAF;AAAA,EAAA,GAGIO,IAAQ,KAAK,OAAOH,IAAgBC,KAAe,CAAC;AAE1D,+BAAQG,GAAU,EAAA,GAAGT,GAAO,OAAAQ,GAAc,OAAK,GAAC,CAAA;AAClD;"}
|