@selfdecode/sd-component-library 4.0.144 → 4.0.145
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/components/links/link/interfaces.d.ts +1 -1
- 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-library111.js +1 -1
- 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-library133.js +3 -3
- package/lib/sd-component-library134.js +1 -1
- package/lib/sd-component-library136.js +2 -2
- package/lib/sd-component-library16.js +1 -1
- package/lib/sd-component-library167.js +1 -1
- package/lib/sd-component-library168.js +1 -1
- package/lib/sd-component-library171.js +1 -1
- package/lib/sd-component-library172.js +4 -4
- package/lib/sd-component-library197.js +3 -3
- package/lib/sd-component-library200.js +2 -60
- package/lib/sd-component-library200.js.map +1 -1
- package/lib/sd-component-library201.js +30 -3
- package/lib/sd-component-library201.js.map +1 -1
- package/lib/sd-component-library202.js +599 -2
- package/lib/sd-component-library202.js.map +1 -1
- package/lib/sd-component-library203.js +60 -30
- package/lib/sd-component-library203.js.map +1 -1
- package/lib/sd-component-library204.js +3 -599
- package/lib/sd-component-library204.js.map +1 -1
- package/lib/sd-component-library205.js +55 -24
- package/lib/sd-component-library205.js.map +1 -1
- package/lib/sd-component-library206.js +24 -55
- package/lib/sd-component-library206.js.map +1 -1
- package/lib/sd-component-library210.js +1 -1
- package/lib/sd-component-library211.js +20 -128
- 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 +3 -14
- package/lib/sd-component-library213.js.map +1 -1
- package/lib/sd-component-library214.js +129 -3
- package/lib/sd-component-library214.js.map +1 -1
- package/lib/sd-component-library215.js +13 -3
- package/lib/sd-component-library215.js.map +1 -1
- package/lib/sd-component-library216.js +12 -63
- package/lib/sd-component-library216.js.map +1 -1
- package/lib/sd-component-library217.js +2 -2
- package/lib/sd-component-library217.js.map +1 -1
- package/lib/sd-component-library218.js +2 -2
- package/lib/sd-component-library218.js.map +1 -1
- package/lib/sd-component-library219.js +3 -46
- package/lib/sd-component-library219.js.map +1 -1
- package/lib/sd-component-library221.js +46 -17
- package/lib/sd-component-library221.js.map +1 -1
- package/lib/sd-component-library222.js +64 -20
- package/lib/sd-component-library222.js.map +1 -1
- package/lib/sd-component-library223.js +2 -2
- package/lib/sd-component-library223.js.map +1 -1
- package/lib/sd-component-library224.js +17 -3
- package/lib/sd-component-library224.js.map +1 -1
- package/lib/sd-component-library225.js +26 -3
- package/lib/sd-component-library225.js.map +1 -1
- package/lib/sd-component-library226.js +3 -31
- package/lib/sd-component-library226.js.map +1 -1
- package/lib/sd-component-library227.js +31 -19
- package/lib/sd-component-library227.js.map +1 -1
- package/lib/sd-component-library228.js +19 -20
- package/lib/sd-component-library228.js.map +1 -1
- package/lib/sd-component-library229.js +20 -28
- package/lib/sd-component-library229.js.map +1 -1
- package/lib/sd-component-library230.js +27 -32
- package/lib/sd-component-library230.js.map +1 -1
- package/lib/sd-component-library231.js +32 -128
- package/lib/sd-component-library231.js.map +1 -1
- package/lib/sd-component-library232.js +3 -43
- package/lib/sd-component-library232.js.map +1 -1
- package/lib/sd-component-library233.js +62 -45
- package/lib/sd-component-library233.js.map +1 -1
- package/lib/sd-component-library234.js +42 -7
- package/lib/sd-component-library234.js.map +1 -1
- package/lib/sd-component-library235.js +43 -3
- package/lib/sd-component-library235.js.map +1 -1
- package/lib/sd-component-library236.js +13 -21
- package/lib/sd-component-library236.js.map +1 -1
- package/lib/sd-component-library237.js +21 -109
- package/lib/sd-component-library237.js.map +1 -1
- package/lib/sd-component-library238.js +106 -44
- package/lib/sd-component-library238.js.map +1 -1
- package/lib/sd-component-library239.js +46 -23
- package/lib/sd-component-library239.js.map +1 -1
- package/lib/sd-component-library24.js +1 -1
- package/lib/sd-component-library240.js +23 -52
- package/lib/sd-component-library240.js.map +1 -1
- package/lib/sd-component-library241.js +51 -62
- package/lib/sd-component-library241.js.map +1 -1
- package/lib/sd-component-library242.js +18 -40
- package/lib/sd-component-library242.js.map +1 -1
- package/lib/sd-component-library243.js +20 -13
- package/lib/sd-component-library243.js.map +1 -1
- package/lib/sd-component-library247.js +2 -21
- package/lib/sd-component-library247.js.map +1 -1
- package/lib/sd-component-library248.js +75 -20
- package/lib/sd-component-library248.js.map +1 -1
- package/lib/sd-component-library249.js +26 -72
- package/lib/sd-component-library249.js.map +1 -1
- package/lib/sd-component-library250.js +3 -2
- package/lib/sd-component-library250.js.map +1 -1
- package/lib/sd-component-library251.js +22 -323
- package/lib/sd-component-library251.js.map +1 -1
- package/lib/sd-component-library252.js +3 -5
- package/lib/sd-component-library252.js.map +1 -1
- package/lib/sd-component-library253.js +323 -24
- package/lib/sd-component-library253.js.map +1 -1
- package/lib/sd-component-library254.js +5 -25
- package/lib/sd-component-library254.js.map +1 -1
- package/lib/sd-component-library255.js +2 -3
- package/lib/sd-component-library255.js.map +1 -1
- package/lib/sd-component-library256.js +2 -22
- package/lib/sd-component-library256.js.map +1 -1
- package/lib/sd-component-library257.js +129 -3
- package/lib/sd-component-library257.js.map +1 -1
- package/lib/sd-component-library258.js +42 -24
- package/lib/sd-component-library258.js.map +1 -1
- package/lib/sd-component-library259.js +7 -23
- 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 +30 -134
- package/lib/sd-component-library262.js.map +1 -1
- package/lib/sd-component-library263.js +119 -59
- package/lib/sd-component-library263.js.map +1 -1
- package/lib/sd-component-library264.js +38 -63
- package/lib/sd-component-library264.js.map +1 -1
- package/lib/sd-component-library265.js +74 -30
- package/lib/sd-component-library265.js.map +1 -1
- package/lib/sd-component-library266.js +70 -15
- package/lib/sd-component-library266.js.map +1 -1
- package/lib/sd-component-library267.js +25 -120
- package/lib/sd-component-library267.js.map +1 -1
- package/lib/sd-component-library268.js +16 -117
- package/lib/sd-component-library268.js.map +1 -1
- package/lib/sd-component-library269.js +125 -10
- package/lib/sd-component-library269.js.map +1 -1
- package/lib/sd-component-library270.js +111 -39
- package/lib/sd-component-library270.js.map +1 -1
- package/lib/sd-component-library271.js +10 -9
- package/lib/sd-component-library271.js.map +1 -1
- package/lib/sd-component-library272.js +48 -49
- package/lib/sd-component-library272.js.map +1 -1
- package/lib/sd-component-library273.js +8 -89
- package/lib/sd-component-library273.js.map +1 -1
- package/lib/sd-component-library274.js +48 -89
- package/lib/sd-component-library274.js.map +1 -1
- package/lib/sd-component-library275.js +90 -2
- package/lib/sd-component-library275.js.map +1 -1
- package/lib/sd-component-library276.js +92 -2
- package/lib/sd-component-library276.js.map +1 -1
- package/lib/sd-component-library279.js +70 -10
- package/lib/sd-component-library279.js.map +1 -1
- package/lib/sd-component-library280.js +101 -69
- package/lib/sd-component-library280.js.map +1 -1
- package/lib/sd-component-library281.js +95 -91
- package/lib/sd-component-library281.js.map +1 -1
- package/lib/sd-component-library282.js +10 -106
- package/lib/sd-component-library282.js.map +1 -1
- package/lib/sd-component-library286.js +4 -4
- package/lib/sd-component-library290.js +58 -2
- package/lib/sd-component-library290.js.map +1 -1
- package/lib/sd-component-library291.js +2 -8
- package/lib/sd-component-library291.js.map +1 -1
- package/lib/sd-component-library292.js +7 -327
- package/lib/sd-component-library292.js.map +1 -1
- package/lib/sd-component-library293.js +325 -48
- package/lib/sd-component-library293.js.map +1 -1
- package/lib/sd-component-library294.js +49 -56
- package/lib/sd-component-library294.js.map +1 -1
- package/lib/sd-component-library296.js +1 -1
- package/lib/sd-component-library297.js +2 -2
- package/lib/sd-component-library298.js +4 -34
- package/lib/sd-component-library298.js.map +1 -1
- package/lib/sd-component-library300.js +4 -5
- package/lib/sd-component-library300.js.map +1 -1
- package/lib/sd-component-library301.js +35 -4
- package/lib/sd-component-library301.js.map +1 -1
- package/lib/sd-component-library315.js +1 -1
- package/lib/sd-component-library51.js +3 -3
- package/lib/sd-component-library6.js +1 -1
- package/lib/sd-component-library62.js +3 -3
- package/lib/sd-component-library63.js +1 -1
- package/lib/sd-component-library64.js +2 -2
- package/lib/sd-component-library65.js +1 -1
- package/lib/sd-component-library7.js +1 -1
- package/lib/sd-component-library70.js +2 -2
- package/lib/sd-component-library72.js +3 -3
- package/lib/sd-component-library74.js +1 -1
- 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 +1 -1
- package/package.json +1 -1
|
@@ -1,132 +1,36 @@
|
|
|
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
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
a
|
|
31
|
-
), { x: W, y: k } = d(
|
|
32
|
-
t,
|
|
33
|
-
i
|
|
34
|
-
), u = V || m === 0 ? "left" : m === y - 1 ? "right" : "top";
|
|
35
|
-
if (f || !Y) {
|
|
36
|
-
const J = f && Y || !f && F(g, r, R) ? x : S, B = C ? i - l : i, { y: K } = d(
|
|
37
|
-
t,
|
|
38
|
-
B
|
|
39
|
-
), { x: N, y: Q } = d(
|
|
40
|
-
t,
|
|
41
|
-
(a + B) / 2
|
|
42
|
-
);
|
|
43
|
-
return /* @__PURE__ */ e.jsxs("g", { children: [
|
|
44
|
-
/* @__PURE__ */ e.jsx(
|
|
45
|
-
X,
|
|
46
|
-
{
|
|
47
|
-
startX: P,
|
|
48
|
-
startY: j,
|
|
49
|
-
endX: W,
|
|
50
|
-
endY: k,
|
|
51
|
-
startAlpha: a,
|
|
52
|
-
endAlpha: i,
|
|
53
|
-
color: J,
|
|
54
|
-
radius: t,
|
|
55
|
-
width: s
|
|
56
|
-
}
|
|
57
|
-
),
|
|
58
|
-
!E && w && /* @__PURE__ */ e.jsx(
|
|
59
|
-
O,
|
|
60
|
-
{
|
|
61
|
-
diameter: o,
|
|
62
|
-
position: u,
|
|
63
|
-
distanceFromRanges: b,
|
|
64
|
-
isInRange: Y,
|
|
65
|
-
...u === "right" && j > o / 2 || u === "left" && K > o / 2 ? {
|
|
66
|
-
rangeX: N,
|
|
67
|
-
rangeY: Q
|
|
68
|
-
} : void 0
|
|
69
|
-
}
|
|
70
|
-
)
|
|
71
|
-
] });
|
|
1
|
+
import { j as h } from "./sd-component-library197.js";
|
|
2
|
+
import { getRangeProperties as p } from "./sd-component-library229.js";
|
|
3
|
+
import { MatchedRangeLabelBox as u } from "./sd-component-library296.js";
|
|
4
|
+
const b = (e) => {
|
|
5
|
+
const {
|
|
6
|
+
range: a,
|
|
7
|
+
arc: n,
|
|
8
|
+
totalRanges: o,
|
|
9
|
+
distanceBetweenRanges: r,
|
|
10
|
+
idx: s,
|
|
11
|
+
diameter: d,
|
|
12
|
+
segmented: c,
|
|
13
|
+
counterClockWise: i
|
|
14
|
+
} = e, { start: g, end: l } = a, m = d / 2, { rangeArcMiddle: x } = p(
|
|
15
|
+
n,
|
|
16
|
+
o,
|
|
17
|
+
r,
|
|
18
|
+
s,
|
|
19
|
+
g,
|
|
20
|
+
l
|
|
21
|
+
), t = Math.round(x);
|
|
22
|
+
return /* @__PURE__ */ h.jsx(
|
|
23
|
+
u,
|
|
24
|
+
{
|
|
25
|
+
...e,
|
|
26
|
+
...a,
|
|
27
|
+
alpha: i ? 360 - t : t,
|
|
28
|
+
radius: m,
|
|
29
|
+
round: c
|
|
72
30
|
}
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
/* @__PURE__ */ e.jsx(
|
|
76
|
-
X,
|
|
77
|
-
{
|
|
78
|
-
startX: P,
|
|
79
|
-
startY: j,
|
|
80
|
-
endX: h,
|
|
81
|
-
endY: p,
|
|
82
|
-
startAlpha: a,
|
|
83
|
-
endAlpha: c,
|
|
84
|
-
color: x,
|
|
85
|
-
radius: t,
|
|
86
|
-
width: s,
|
|
87
|
-
roundEnd: !1
|
|
88
|
-
}
|
|
89
|
-
),
|
|
90
|
-
/* @__PURE__ */ e.jsx(
|
|
91
|
-
X,
|
|
92
|
-
{
|
|
93
|
-
startX: h,
|
|
94
|
-
startY: p,
|
|
95
|
-
endX: W,
|
|
96
|
-
endY: k,
|
|
97
|
-
startAlpha: c,
|
|
98
|
-
endAlpha: i,
|
|
99
|
-
color: S,
|
|
100
|
-
radius: t,
|
|
101
|
-
width: s,
|
|
102
|
-
roundStart: !1
|
|
103
|
-
}
|
|
104
|
-
),
|
|
105
|
-
/* @__PURE__ */ e.jsx(
|
|
106
|
-
"circle",
|
|
107
|
-
{
|
|
108
|
-
cx: (h + z) / 2,
|
|
109
|
-
cy: (p + G) / 2,
|
|
110
|
-
r: I + T,
|
|
111
|
-
strokeWidth: I,
|
|
112
|
-
stroke: x,
|
|
113
|
-
fill: "white",
|
|
114
|
-
ref: M
|
|
115
|
-
}
|
|
116
|
-
),
|
|
117
|
-
!E && w && /* @__PURE__ */ e.jsx(
|
|
118
|
-
O,
|
|
119
|
-
{
|
|
120
|
-
diameter: o,
|
|
121
|
-
isInRange: !0,
|
|
122
|
-
position: u,
|
|
123
|
-
distanceFromRanges: b
|
|
124
|
-
}
|
|
125
|
-
)
|
|
126
|
-
] });
|
|
127
|
-
}
|
|
128
|
-
);
|
|
31
|
+
);
|
|
32
|
+
};
|
|
129
33
|
export {
|
|
130
|
-
|
|
34
|
+
b as MatchedRangeLabelBox
|
|
131
35
|
};
|
|
132
36
|
//# sourceMappingURL=sd-component-library231.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sd-component-library231.js","sources":["../src/components/meters/
|
|
1
|
+
{"version":3,"file":"sd-component-library231.js","sources":["../src/components/meters/smiley-meter-v2/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 { MatchedRangeBoxProps as Props } from \"./interfaces\";\n\nexport const MatchedRangeLabelBox: React.FC<Props> = (props) => {\n const {\n range,\n arc,\n totalRanges,\n distanceBetweenRanges,\n idx,\n diameter,\n segmented,\n counterClockWise,\n } = props;\n const { start, end } = range;\n\n const radius = diameter / 2;\n const { rangeArcMiddle: alpha } = getRangeProperties(\n arc,\n totalRanges,\n distanceBetweenRanges,\n idx,\n start,\n end\n );\n\n const roundedAlpha = Math.round(alpha);\n\n return (\n <LabelBox\n {...props}\n {...range}\n alpha={counterClockWise ? 360 - roundedAlpha : roundedAlpha}\n radius={radius}\n round={segmented}\n />\n );\n};\n"],"names":["MatchedRangeLabelBox","props","range","arc","totalRanges","distanceBetweenRanges","idx","diameter","segmented","counterClockWise","start","end","radius","alpha","getRangeProperties","roundedAlpha","jsx","LabelBox"],"mappings":";;;AAMa,MAAAA,IAAwC,CAACC,MAAU;AACxD,QAAA;AAAA,IACJ,OAAAC;AAAA,IACA,KAAAC;AAAA,IACA,aAAAC;AAAA,IACA,uBAAAC;AAAA,IACA,KAAAC;AAAA,IACA,UAAAC;AAAA,IACA,WAAAC;AAAA,IACA,kBAAAC;AAAA,EACE,IAAAR,GACE,EAAE,OAAAS,GAAO,KAAAC,EAAQ,IAAAT,GAEjBU,IAASL,IAAW,GACpB,EAAE,gBAAgBM,EAAA,IAAUC;AAAA,IAChCX;AAAA,IACAC;AAAA,IACAC;AAAA,IACAC;AAAA,IACAI;AAAA,IACAC;AAAA,EAAA,GAGII,IAAe,KAAK,MAAMF,CAAK;AAGnC,SAAAG,gBAAAA,EAAA;AAAA,IAACC;AAAAA,IAAA;AAAA,MACE,GAAGhB;AAAA,MACH,GAAGC;AAAA,MACJ,OAAOO,IAAmB,MAAMM,IAAeA;AAAA,MAC/C,QAAAH;AAAA,MACA,OAAOJ;AAAA,IAAA;AAAA,EAAA;AAGb;"}
|
|
@@ -1,46 +1,6 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
3
|
-
const X = (p) => {
|
|
4
|
-
const {
|
|
5
|
-
diameter: l,
|
|
6
|
-
arc: a,
|
|
7
|
-
color: u = "#CCD0DB",
|
|
8
|
-
dashHeight: e,
|
|
9
|
-
dashWidth: x,
|
|
10
|
-
numberOfDashes: r,
|
|
11
|
-
distanceFromRangesToScale: t,
|
|
12
|
-
gaugeWidth: o
|
|
13
|
-
} = p, R = l / 2, j = (360 - a) / 2, D = a / (r - 1);
|
|
14
|
-
return /* @__PURE__ */ i.jsx("g", { children: [...Array(r)].map((I, n) => {
|
|
15
|
-
const c = j + n * D, { x: d, y: h } = C(R, c), s = F(c), T = m(
|
|
16
|
-
d,
|
|
17
|
-
s,
|
|
18
|
-
o + t
|
|
19
|
-
), $ = g(
|
|
20
|
-
h,
|
|
21
|
-
s,
|
|
22
|
-
o + t
|
|
23
|
-
), f = m(
|
|
24
|
-
d,
|
|
25
|
-
s,
|
|
26
|
-
o + t + e
|
|
27
|
-
), B = g(
|
|
28
|
-
h,
|
|
29
|
-
s,
|
|
30
|
-
o + t + e
|
|
31
|
-
);
|
|
32
|
-
return /* @__PURE__ */ i.jsx(
|
|
33
|
-
"path",
|
|
34
|
-
{
|
|
35
|
-
d: `M${T},${$} L${f},${B}`,
|
|
36
|
-
stroke: u,
|
|
37
|
-
strokeWidth: x
|
|
38
|
-
},
|
|
39
|
-
n
|
|
40
|
-
);
|
|
41
|
-
}) });
|
|
42
|
-
};
|
|
1
|
+
import * as e from "react";
|
|
2
|
+
const t = (a) => /* @__PURE__ */ e.createElement("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 16.04 33.79", ...a }, /* @__PURE__ */ e.createElement("g", null, /* @__PURE__ */ e.createElement("g", null, /* @__PURE__ */ e.createElement("path", { className: "first-half", d: "M8,0V6.37H8A3.19,3.19,0,0,1,8,0ZM1,8.24a4,4,0,0,0-1,2.7V19.5a1.64,1.64,0,0,0,.45,1.28v0a1.49,1.49,0,0,0,2.12,0A1.64,1.64,0,0,0,3,19.5V12.11h.7L3.67,31.64c0,.07,0,.14,0,.21a1.92,1.92,0,0,0,1.91,1.93h.12a2,2,0,0,0,1.88-2.12V21.75H8V7H3.72A3.57,3.57,0,0,0,1,8.24Z" }), /* @__PURE__ */ e.createElement("path", { className: "second-half", d: "M8,6.38H8V0H8A3.19,3.19,0,0,1,8,6.38Zm7.07,1.86A3.59,3.59,0,0,0,12.32,7H8V21.75h.41v9.93a1.36,1.36,0,0,0,0,.35,1.95,1.95,0,1,0,3.88-.39V12.1h.63v7.4a1.68,1.68,0,0,0,.46,1.29,1.58,1.58,0,0,0,2.18,0A1.69,1.69,0,0,0,16,19.5V10.94A4.09,4.09,0,0,0,15.07,8.24Z" }))));
|
|
43
3
|
export {
|
|
44
|
-
|
|
4
|
+
t as ReactComponent
|
|
45
5
|
};
|
|
46
6
|
//# sourceMappingURL=sd-component-library232.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sd-component-library232.js","sources":["../src/components/meters/
|
|
1
|
+
{"version":3,"file":"sd-component-library232.js","sources":["../src/components/meters/people-meter/assets/person.svg"],"sourcesContent":["export default \"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAxNi4wNCAzMy43OSI+CiAgICA8Zz4KICAgICAgICA8Zz4KICAgICAgICAgICAgPHBhdGggY2xhc3M9ImZpcnN0LWhhbGYiCiAgICAgICAgICAgICAgICBkPSJNOCwwVjYuMzdIOEEzLjE5LDMuMTksMCwwLDEsOCwwWk0xLDguMjRhNCw0LDAsMCwwLTEsMi43VjE5LjVhMS42NCwxLjY0LDAsMCwwLC40NSwxLjI4djBhMS40OSwxLjQ5LDAsMCwwLDIuMTIsMEExLjY0LDEuNjQsMCwwLDAsMywxOS41VjEyLjExaC43TDMuNjcsMzEuNjRjMCwuMDcsMCwuMTQsMCwuMjFhMS45MiwxLjkyLDAsMCwwLDEuOTEsMS45M2guMTJhMiwyLDAsMCwwLDEuODgtMi4xMlYyMS43NUg4VjdIMy43MkEzLjU3LDMuNTcsMCwwLDAsMSw4LjI0WiIgLz4KICAgICAgICAgICAgPHBhdGggY2xhc3M9InNlY29uZC1oYWxmIgogICAgICAgICAgICAgICAgZD0iTTgsNi4zOEg4VjBIOEEzLjE5LDMuMTksMCwwLDEsOCw2LjM4Wm03LjA3LDEuODZBMy41OSwzLjU5LDAsMCwwLDEyLjMyLDdIOFYyMS43NWguNDF2OS45M2ExLjM2LDEuMzYsMCwwLDAsMCwuMzUsMS45NSwxLjk1LDAsMSwwLDMuODgtLjM5VjEyLjFoLjYzdjcuNGExLjY4LDEuNjgsMCwwLDAsLjQ2LDEuMjksMS41OCwxLjU4LDAsMCwwLDIuMTgsMEExLjY5LDEuNjksMCwwLDAsMTYsMTkuNVYxMC45NEE0LjA5LDQuMDksMCwwLDAsMTUuMDcsOC4yNFoiIC8+CiAgICAgICAgPC9nPgogICAgPC9nPgo8L3N2Zz4K\""],"names":["SvgPerson","props","React"],"mappings":";AACK,MAACA,IAAY,CAACC,MAA0B,gBAAAC,EAAM,cAAc,OAAO,EAAE,OAAO,8BAA8B,SAAS,mBAAmB,GAAGD,EAAO,GAAkB,gBAAAC,EAAM,cAAc,KAAK,MAAsB,gBAAAA,EAAM,cAAc,KAAK,MAAsB,gBAAAA,EAAM,cAAc,QAAQ,EAAE,WAAW,cAAc,GAAG,uQAAwQ,CAAA,GAAmB,gBAAAA,EAAM,cAAc,QAAQ,EAAE,WAAW,eAAe,GAAG,iQAAkQ,CAAA,CAAC,CAAC,CAAC;"}
|
|
@@ -1,50 +1,67 @@
|
|
|
1
|
-
import { j as
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
|
|
1
|
+
import { j as a } from "./sd-component-library197.js";
|
|
2
|
+
import { getCoordinateForArc as i } from "./sd-component-library91.js";
|
|
3
|
+
import { defaultTextBottomMargin as X } from "./sd-component-library226.js";
|
|
4
|
+
import { getRangeProperties as Y } from "./sd-component-library298.js";
|
|
5
|
+
import { BaseOutlineArc as b } from "./sd-component-library299.js";
|
|
6
|
+
import { DiscreteMeterLabelPointer as w } from "./sd-component-library300.js";
|
|
7
|
+
function z(s) {
|
|
5
8
|
const {
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
innerCircleRadius: I,
|
|
12
|
-
innerCircleStrokeWidth: A,
|
|
13
|
-
distanceFromRange: d,
|
|
14
|
-
needleWidth: e,
|
|
15
|
-
needleColor: C,
|
|
9
|
+
color: n,
|
|
10
|
+
idx: c,
|
|
11
|
+
gaugeWidth: d,
|
|
12
|
+
diameter: g,
|
|
13
|
+
arc: m,
|
|
16
14
|
distanceBetweenRanges: l,
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
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,
|
|
37
|
+
{
|
|
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
|
|
47
|
+
}
|
|
48
|
+
),
|
|
49
|
+
h && o && !x && /* @__PURE__ */ a.jsx(
|
|
50
|
+
w,
|
|
51
|
+
{
|
|
52
|
+
alpha: M,
|
|
53
|
+
pointerLength: A,
|
|
54
|
+
pointerWidth: f,
|
|
55
|
+
radius: t,
|
|
56
|
+
color: n,
|
|
57
|
+
textBottomMargin: X,
|
|
58
|
+
label: o,
|
|
59
|
+
horizontal: u
|
|
60
|
+
}
|
|
61
|
+
)
|
|
62
|
+
] });
|
|
63
|
+
}
|
|
47
64
|
export {
|
|
48
|
-
|
|
65
|
+
z as DiscreteRange
|
|
49
66
|
};
|
|
50
67
|
//# sourceMappingURL=sd-component-library233.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sd-component-library233.js","sources":["../src/components/meters/outline-meter/partials/
|
|
1
|
+
{"version":3,"file":"sd-component-library233.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,11 +1,46 @@
|
|
|
1
|
-
import { j as
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
const
|
|
5
|
-
|
|
6
|
-
|
|
1
|
+
import { j as i } from "./sd-component-library197.js";
|
|
2
|
+
import { getInnerX as m, getInnerY as g, getCoordinateForArc as C, degToRad as F } from "./sd-component-library91.js";
|
|
3
|
+
const X = (p) => {
|
|
4
|
+
const {
|
|
5
|
+
diameter: l,
|
|
6
|
+
arc: a,
|
|
7
|
+
color: u = "#CCD0DB",
|
|
8
|
+
dashHeight: e,
|
|
9
|
+
dashWidth: x,
|
|
10
|
+
numberOfDashes: r,
|
|
11
|
+
distanceFromRangesToScale: t,
|
|
12
|
+
gaugeWidth: o
|
|
13
|
+
} = p, R = l / 2, j = (360 - a) / 2, D = a / (r - 1);
|
|
14
|
+
return /* @__PURE__ */ i.jsx("g", { children: [...Array(r)].map((I, n) => {
|
|
15
|
+
const c = j + n * D, { x: d, y: h } = C(R, c), s = F(c), T = m(
|
|
16
|
+
d,
|
|
17
|
+
s,
|
|
18
|
+
o + t
|
|
19
|
+
), $ = g(
|
|
20
|
+
h,
|
|
21
|
+
s,
|
|
22
|
+
o + t
|
|
23
|
+
), f = m(
|
|
24
|
+
d,
|
|
25
|
+
s,
|
|
26
|
+
o + t + e
|
|
27
|
+
), B = g(
|
|
28
|
+
h,
|
|
29
|
+
s,
|
|
30
|
+
o + t + e
|
|
31
|
+
);
|
|
32
|
+
return /* @__PURE__ */ i.jsx(
|
|
33
|
+
"path",
|
|
34
|
+
{
|
|
35
|
+
d: `M${T},${$} L${f},${B}`,
|
|
36
|
+
stroke: u,
|
|
37
|
+
strokeWidth: x
|
|
38
|
+
},
|
|
39
|
+
n
|
|
40
|
+
);
|
|
41
|
+
}) });
|
|
7
42
|
};
|
|
8
43
|
export {
|
|
9
|
-
|
|
44
|
+
X as OutlineMeterScale
|
|
10
45
|
};
|
|
11
46
|
//# sourceMappingURL=sd-component-library234.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sd-component-library234.js","sources":["../src/components/meters/outline-meter/partials/outline-meter-
|
|
1
|
+
{"version":3,"file":"sd-component-library234.js","sources":["../src/components/meters/outline-meter/partials/outline-meter-scale/outline-meter-scale.tsx"],"sourcesContent":["import React from \"react\";\n\nimport {\n degToRad,\n getCoordinateForArc,\n getInnerX,\n getInnerY,\n} from \"../../utils\";\nimport { OutlineMeterScaleProps as Props } from \"./interfaces\";\n\nexport const OutlineMeterScale: React.FC<Props> = (props) => {\n const {\n diameter,\n arc,\n color = \"#CCD0DB\",\n dashHeight,\n dashWidth,\n numberOfDashes,\n distanceFromRangesToScale: distanceFromRanges,\n gaugeWidth,\n } = props;\n const radius = diameter / 2;\n\n const arcStart = (360 - arc) / 2; // deg\n const degPerDash = arc / (numberOfDashes - 1);\n\n return (\n <g>\n {[...Array(numberOfDashes)].map((_, idx) => {\n const alpha = arcStart + idx * degPerDash;\n const { x, y } = getCoordinateForArc(radius, alpha);\n const alphaInRad = degToRad(alpha);\n const dashTopX = getInnerX(\n x,\n alphaInRad,\n gaugeWidth + distanceFromRanges\n );\n const dashTopY = getInnerY(\n y,\n alphaInRad,\n gaugeWidth + distanceFromRanges\n );\n const dashBottomX = getInnerX(\n x,\n alphaInRad,\n gaugeWidth + distanceFromRanges + dashHeight\n );\n const dashBottomY = getInnerY(\n y,\n alphaInRad,\n gaugeWidth + distanceFromRanges + dashHeight\n );\n return (\n <path\n key={idx}\n d={`M${dashTopX},${dashTopY} L${dashBottomX},${dashBottomY}`}\n stroke={color}\n strokeWidth={dashWidth}\n />\n );\n })}\n </g>\n );\n};\n"],"names":["OutlineMeterScale","props","diameter","arc","color","dashHeight","dashWidth","numberOfDashes","distanceFromRanges","gaugeWidth","radius","arcStart","degPerDash","jsx","_","idx","alpha","x","y","getCoordinateForArc","alphaInRad","degToRad","dashTopX","getInnerX","dashTopY","getInnerY","dashBottomX","dashBottomY"],"mappings":";;AAUa,MAAAA,IAAqC,CAACC,MAAU;AACrD,QAAA;AAAA,IACJ,UAAAC;AAAA,IACA,KAAAC;AAAA,IACA,OAAAC,IAAQ;AAAA,IACR,YAAAC;AAAA,IACA,WAAAC;AAAA,IACA,gBAAAC;AAAA,IACA,2BAA2BC;AAAA,IAC3B,YAAAC;AAAA,EACE,IAAAR,GACES,IAASR,IAAW,GAEpBS,KAAY,MAAMR,KAAO,GACzBS,IAAaT,KAAOI,IAAiB;AAGzC,SAAAM,gBAAAA,MAAC,KACE,EAAA,UAAA,CAAC,GAAG,MAAMN,CAAc,CAAC,EAAE,IAAI,CAACO,GAAGC,MAAQ;AACpC,UAAAC,IAAQL,IAAWI,IAAMH,GACzB,EAAE,GAAAK,GAAG,GAAAC,EAAA,IAAMC,EAAoBT,GAAQM,CAAK,GAC5CI,IAAaC,EAASL,CAAK,GAC3BM,IAAWC;AAAA,MACfN;AAAA,MACAG;AAAA,MACAX,IAAaD;AAAA,IAAA,GAETgB,IAAWC;AAAA,MACfP;AAAA,MACAE;AAAA,MACAX,IAAaD;AAAA,IAAA,GAETkB,IAAcH;AAAA,MAClBN;AAAA,MACAG;AAAA,MACAX,IAAaD,IAAqBH;AAAA,IAAA,GAE9BsB,IAAcF;AAAA,MAClBP;AAAA,MACAE;AAAA,MACAX,IAAaD,IAAqBH;AAAA,IAAA;AAGlC,WAAAQ,gBAAAA,EAAA;AAAA,MAAC;AAAA,MAAA;AAAA,QAEC,GAAG,IAAIS,CAAQ,IAAIE,CAAQ,KAAKE,CAAW,IAAIC,CAAW;AAAA,QAC1D,QAAQvB;AAAA,QACR,aAAaE;AAAA,MAAA;AAAA,MAHRS;AAAA,IAAA;AAAA,EAMV,CAAA,EACH,CAAA;AAEJ;"}
|
|
@@ -1,6 +1,46 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
1
|
+
import { j as M } from "./sd-component-library197.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-library301.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
|
+
}
|
|
3
43
|
export {
|
|
4
|
-
|
|
44
|
+
E as DiscreteMeterNeedle
|
|
5
45
|
};
|
|
6
46
|
//# sourceMappingURL=sd-component-library235.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sd-component-library235.js","sources":["../src/components/meters/
|
|
1
|
+
{"version":3,"file":"sd-component-library235.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
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
return "";
|
|
14
|
-
}, u = (t, n, e) => "#" + (16777216 + (t << 16) + (n << 8) + e).toString(16).slice(1), a = (t) => {
|
|
15
|
-
const n = t.match(/^#([0-9a-f]{2})([0-9a-f]{2})([0-9a-f]{2})$/i);
|
|
16
|
-
return n ? n.slice(1).map((e) => parseInt(e, 16)) : null;
|
|
17
|
-
}, h = (t, n, e) => Math.floor(t * n) === (e === "left" ? 0 : e === "right" ? n - 1 : 1), _ = (t) => t === "left" ? "right" : t === "top" ? "top" : "left";
|
|
1
|
+
import { j as g } from "./sd-component-library197.js";
|
|
2
|
+
import { getRangeProperties as d } from "./sd-component-library298.js";
|
|
3
|
+
import { MatchedRangeLabelBox as x } from "./sd-component-library296.js";
|
|
4
|
+
const h = (e) => {
|
|
5
|
+
const { idx: t, totalRanges: a, distanceBetweenRanges: r, arc: n } = e, { rangeArcStart: o, rangeArcEnd: s } = d(
|
|
6
|
+
n,
|
|
7
|
+
a,
|
|
8
|
+
r,
|
|
9
|
+
t
|
|
10
|
+
), c = Math.round((o + s) / 2);
|
|
11
|
+
return /* @__PURE__ */ g.jsx(x, { ...e, alpha: c, round: !0 });
|
|
12
|
+
};
|
|
18
13
|
export {
|
|
19
|
-
|
|
20
|
-
I as getFractionColor,
|
|
21
|
-
h as isLabelActive,
|
|
22
|
-
T as mapAdjacent
|
|
14
|
+
h as MatchedRangeLabelBox
|
|
23
15
|
};
|
|
24
16
|
//# sourceMappingURL=sd-component-library236.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sd-component-library236.js","sources":["../src/components/meters/
|
|
1
|
+
{"version":3,"file":"sd-component-library236.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;"}
|