@selfdecode/sd-component-library 4.0.113 → 4.0.115
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/forms-v2/form-v2-input/form-v2-input.d.ts +1 -0
- package/lib/components/links/link/interfaces.d.ts +2 -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-library103.js +2 -2
- package/lib/sd-component-library104.js +2 -2
- package/lib/sd-component-library106.js +4 -4
- package/lib/sd-component-library108.js +4 -4
- package/lib/sd-component-library114.js +1 -1
- package/lib/sd-component-library119.js +1 -1
- package/lib/sd-component-library120.js +2 -2
- package/lib/sd-component-library122.js +1 -1
- package/lib/sd-component-library123.js +1 -1
- package/lib/sd-component-library128.js +2 -2
- package/lib/sd-component-library129.js +2 -2
- package/lib/sd-component-library131.js +1 -1
- package/lib/sd-component-library135.js +3 -3
- package/lib/sd-component-library136.js +1 -1
- package/lib/sd-component-library138.js +2 -2
- package/lib/sd-component-library169.js +1 -1
- package/lib/sd-component-library174.js +4 -4
- package/lib/sd-component-library175.js +1 -1
- package/lib/sd-component-library198.js +3 -3
- package/lib/sd-component-library202.js +3 -2
- package/lib/sd-component-library202.js.map +1 -1
- package/lib/sd-component-library203.js +2 -30
- package/lib/sd-component-library203.js.map +1 -1
- package/lib/sd-component-library204.js +21 -590
- package/lib/sd-component-library204.js.map +1 -1
- package/lib/sd-component-library205.js +599 -3
- package/lib/sd-component-library205.js.map +1 -1
- package/lib/sd-component-library207.js +24 -17
- package/lib/sd-component-library207.js.map +1 -1
- package/lib/sd-component-library208.js +15 -60
- package/lib/sd-component-library208.js.map +1 -1
- package/lib/sd-component-library209.js +5 -23
- package/lib/sd-component-library209.js.map +1 -1
- package/lib/sd-component-library210.js +5 -21
- package/lib/sd-component-library210.js.map +1 -1
- package/lib/sd-component-library211.js +18 -3
- package/lib/sd-component-library211.js.map +1 -1
- package/lib/sd-component-library212.js +21 -3
- package/lib/sd-component-library212.js.map +1 -1
- package/lib/sd-component-library213.js +3 -40
- package/lib/sd-component-library213.js.map +1 -1
- package/lib/sd-component-library214.js +3 -129
- package/lib/sd-component-library214.js.map +1 -1
- package/lib/sd-component-library215.js +40 -13
- package/lib/sd-component-library215.js.map +1 -1
- package/lib/sd-component-library216.js +128 -13
- package/lib/sd-component-library216.js.map +1 -1
- package/lib/sd-component-library217.js +13 -3
- package/lib/sd-component-library217.js.map +1 -1
- package/lib/sd-component-library218.js +14 -3
- package/lib/sd-component-library218.js.map +1 -1
- package/lib/sd-component-library219.js +2 -2
- package/lib/sd-component-library219.js.map +1 -1
- package/lib/sd-component-library220.js +3 -52
- package/lib/sd-component-library220.js.map +1 -1
- package/lib/sd-component-library221.js +3 -65
- package/lib/sd-component-library221.js.map +1 -1
- package/lib/sd-component-library222.js +52 -3
- package/lib/sd-component-library222.js.map +1 -1
- package/lib/sd-component-library224.js +61 -13
- package/lib/sd-component-library224.js.map +1 -1
- package/lib/sd-component-library225.js +3 -26
- package/lib/sd-component-library225.js.map +1 -1
- package/lib/sd-component-library226.js +17 -3
- package/lib/sd-component-library226.js.map +1 -1
- package/lib/sd-component-library227.js +64 -31
- package/lib/sd-component-library227.js.map +1 -1
- package/lib/sd-component-library228.js +23 -19
- package/lib/sd-component-library228.js.map +1 -1
- package/lib/sd-component-library229.js +25 -19
- package/lib/sd-component-library229.js.map +1 -1
- package/lib/sd-component-library230.js +3 -28
- package/lib/sd-component-library230.js.map +1 -1
- package/lib/sd-component-library231.js +31 -33
- package/lib/sd-component-library231.js.map +1 -1
- package/lib/sd-component-library232.js +19 -3
- package/lib/sd-component-library232.js.map +1 -1
- package/lib/sd-component-library233.js +20 -129
- package/lib/sd-component-library233.js.map +1 -1
- package/lib/sd-component-library234.js +26 -41
- package/lib/sd-component-library234.js.map +1 -1
- package/lib/sd-component-library235.js +28 -42
- package/lib/sd-component-library235.js.map +1 -1
- package/lib/sd-component-library236.js +129 -8
- package/lib/sd-component-library236.js.map +1 -1
- package/lib/sd-component-library237.js +41 -62
- package/lib/sd-component-library237.js.map +1 -1
- package/lib/sd-component-library238.js +40 -36
- package/lib/sd-component-library238.js.map +1 -1
- package/lib/sd-component-library239.js +7 -12
- package/lib/sd-component-library239.js.map +1 -1
- package/lib/sd-component-library24.js +2 -2
- package/lib/sd-component-library240.js +64 -21
- package/lib/sd-component-library240.js.map +1 -1
- package/lib/sd-component-library241.js +41 -107
- package/lib/sd-component-library241.js.map +1 -1
- package/lib/sd-component-library242.js +12 -46
- package/lib/sd-component-library242.js.map +1 -1
- package/lib/sd-component-library243.js +3 -24
- package/lib/sd-component-library243.js.map +1 -1
- package/lib/sd-component-library244.js +47 -52
- package/lib/sd-component-library244.js.map +1 -1
- package/lib/sd-component-library245.js +73 -46
- package/lib/sd-component-library245.js.map +1 -1
- package/lib/sd-component-library246.js +21 -75
- package/lib/sd-component-library246.js.map +1 -1
- package/lib/sd-component-library247.js +103 -35
- package/lib/sd-component-library247.js.map +1 -1
- package/lib/sd-component-library248.js +47 -27
- package/lib/sd-component-library248.js.map +1 -1
- package/lib/sd-component-library249.js +23 -20
- package/lib/sd-component-library249.js.map +1 -1
- package/lib/sd-component-library25.js +2 -2
- package/lib/sd-component-library250.js +53 -20
- package/lib/sd-component-library250.js.map +1 -1
- package/lib/sd-component-library252.js +16 -20
- package/lib/sd-component-library252.js.map +1 -1
- package/lib/sd-component-library253.js +20 -19
- package/lib/sd-component-library253.js.map +1 -1
- package/lib/sd-component-library254.js +41 -5
- package/lib/sd-component-library254.js.map +1 -1
- package/lib/sd-component-library255.js +27 -5
- package/lib/sd-component-library255.js.map +1 -1
- package/lib/sd-component-library256.js +323 -27
- package/lib/sd-component-library256.js.map +1 -1
- package/lib/sd-component-library257.js +5 -3
- package/lib/sd-component-library257.js.map +1 -1
- package/lib/sd-component-library258.js +25 -20
- package/lib/sd-component-library258.js.map +1 -1
- package/lib/sd-component-library259.js +1 -1
- package/lib/sd-component-library259.js.map +1 -1
- package/lib/sd-component-library26.js +1 -1
- package/lib/sd-component-library260.js +17 -18
- package/lib/sd-component-library260.js.map +1 -1
- package/lib/sd-component-library261.js +3 -22
- package/lib/sd-component-library261.js.map +1 -1
- package/lib/sd-component-library262.js +23 -323
- package/lib/sd-component-library262.js.map +1 -1
- package/lib/sd-component-library263.js +22 -5
- package/lib/sd-component-library263.js.map +1 -1
- package/lib/sd-component-library264.js +27 -27
- package/lib/sd-component-library264.js.map +1 -1
- package/lib/sd-component-library265.js +43 -13
- package/lib/sd-component-library265.js.map +1 -1
- package/lib/sd-component-library266.js +118 -112
- package/lib/sd-component-library266.js.map +1 -1
- package/lib/sd-component-library267.js +57 -105
- package/lib/sd-component-library267.js.map +1 -1
- package/lib/sd-component-library268.js +75 -9
- package/lib/sd-component-library268.js.map +1 -1
- package/lib/sd-component-library269.js +111 -39
- package/lib/sd-component-library269.js.map +1 -1
- package/lib/sd-component-library270.js +10 -30
- package/lib/sd-component-library270.js.map +1 -1
- package/lib/sd-component-library271.js +45 -46
- package/lib/sd-component-library271.js.map +1 -1
- package/lib/sd-component-library272.js +30 -131
- package/lib/sd-component-library272.js.map +1 -1
- package/lib/sd-component-library273.js +15 -68
- package/lib/sd-component-library273.js.map +1 -1
- package/lib/sd-component-library274.js +115 -66
- package/lib/sd-component-library274.js.map +1 -1
- package/lib/sd-component-library276.js +51 -49
- package/lib/sd-component-library276.js.map +1 -1
- package/lib/sd-component-library277.js +87 -48
- package/lib/sd-component-library277.js.map +1 -1
- package/lib/sd-component-library278.js +54 -52
- package/lib/sd-component-library278.js.map +1 -1
- package/lib/sd-component-library279.js +48 -91
- package/lib/sd-component-library279.js.map +1 -1
- package/lib/sd-component-library291.js +4 -4
- package/lib/sd-component-library292.js +2 -3
- package/lib/sd-component-library292.js.map +1 -1
- package/lib/sd-component-library293.js +8 -3
- package/lib/sd-component-library293.js.map +1 -1
- package/lib/sd-component-library294.js +328 -3
- package/lib/sd-component-library294.js.map +1 -1
- package/lib/sd-component-library295.js +51 -2
- package/lib/sd-component-library295.js.map +1 -1
- package/lib/sd-component-library296.js +3 -8
- package/lib/sd-component-library296.js.map +1 -1
- package/lib/sd-component-library297.js +3 -328
- package/lib/sd-component-library297.js.map +1 -1
- package/lib/sd-component-library298.js +3 -51
- package/lib/sd-component-library298.js.map +1 -1
- package/lib/sd-component-library314.js +52 -20
- package/lib/sd-component-library314.js.map +1 -1
- package/lib/sd-component-library315.js +20 -52
- package/lib/sd-component-library315.js.map +1 -1
- package/lib/sd-component-library316.js +20 -88
- package/lib/sd-component-library316.js.map +1 -1
- package/lib/sd-component-library317.js +2 -2
- package/lib/sd-component-library318.js +92 -4
- package/lib/sd-component-library318.js.map +1 -1
- package/lib/sd-component-library319.js +33 -23
- package/lib/sd-component-library319.js.map +1 -1
- package/lib/sd-component-library320.js +34 -4
- package/lib/sd-component-library320.js.map +1 -1
- package/lib/sd-component-library321.js +4 -34
- package/lib/sd-component-library321.js.map +1 -1
- package/lib/sd-component-library322.js +4 -34
- package/lib/sd-component-library322.js.map +1 -1
- package/lib/sd-component-library325.js +32 -90
- package/lib/sd-component-library325.js.map +1 -1
- package/lib/sd-component-library326.js +90 -32
- package/lib/sd-component-library326.js.map +1 -1
- package/lib/sd-component-library50.js +1 -1
- package/lib/sd-component-library51.js +1 -1
- package/lib/sd-component-library53.js +3 -3
- package/lib/sd-component-library54.js +2 -2
- package/lib/sd-component-library55.js +2 -2
- package/lib/sd-component-library57.js +29 -26
- package/lib/sd-component-library57.js.map +1 -1
- package/lib/sd-component-library6.js +1 -1
- package/lib/sd-component-library62.js +1 -1
- package/lib/sd-component-library66.js +1 -1
- package/lib/sd-component-library67.js +1 -1
- package/lib/sd-component-library7.js +1 -1
- package/lib/sd-component-library72.js +2 -2
- package/lib/sd-component-library74.js +3 -3
- package/lib/sd-component-library76.js +2 -2
- package/lib/sd-component-library77.js +3 -3
- package/lib/sd-component-library81.js +1 -1
- package/lib/sd-component-library82.js +1 -1
- package/lib/sd-component-library83.js +28 -26
- package/lib/sd-component-library83.js.map +1 -1
- package/lib/sd-component-library87.js +1 -1
- package/lib/sd-component-library88.js +6 -6
- package/lib/sd-component-library89.js +2 -2
- package/lib/sd-component-library90.js +1 -1
- package/lib/sd-component-library91.js +5 -5
- package/lib/sd-component-library92.js +1 -1
- package/lib/sd-component-library94.js +6 -6
- package/lib/sd-component-library95.js +1 -1
- package/lib/sd-component-library96.js +7 -7
- package/lib/sd-component-library97.js +1 -1
- package/package.json +1 -1
|
@@ -1,112 +1,46 @@
|
|
|
1
|
-
import { j as
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
|
|
5
|
-
const w = "#CCD0DB", q = (G) => {
|
|
1
|
+
import { j as M } from "./sd-component-library198.js";
|
|
2
|
+
import { getInnerX as T, getInnerY as W, degToRad as r, getCoordinateForArc as y } from "./sd-component-library93.js";
|
|
3
|
+
import { BaseNeedle as B } from "./sd-component-library319.js";
|
|
4
|
+
function E(p) {
|
|
6
5
|
const {
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
arc:
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
gaugeWidth:
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
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
|
+
}
|
|
25
41
|
);
|
|
26
|
-
|
|
27
|
-
return /* @__PURE__ */ t.jsx(
|
|
28
|
-
X,
|
|
29
|
-
{
|
|
30
|
-
startX: u,
|
|
31
|
-
startY: h,
|
|
32
|
-
endX: m,
|
|
33
|
-
endY: y,
|
|
34
|
-
startAlpha: g,
|
|
35
|
-
endAlpha: j,
|
|
36
|
-
color: v || i > x ? `url(#gradient-${f}-${Y})` : w,
|
|
37
|
-
radius: r,
|
|
38
|
-
width: e
|
|
39
|
-
}
|
|
40
|
-
);
|
|
41
|
-
const o = g + (i - c) / (x - c) * l / n, { x: a, y: s } = A(r, o), F = H(a, E(o), e), B = M(s, E(o), e), D = d >= n / 2, S = d + 1 === n / 2 + 0.5, z = S ? (a - u) / (m - u) : (s - h) / (y - h), p = O(z, f, Y);
|
|
42
|
-
return /* @__PURE__ */ t.jsxs(t.Fragment, { children: [
|
|
43
|
-
/* @__PURE__ */ t.jsx("defs", { children: /* @__PURE__ */ t.jsxs(
|
|
44
|
-
"linearGradient",
|
|
45
|
-
{
|
|
46
|
-
id: `value-gradient-${p}`,
|
|
47
|
-
...D ? {
|
|
48
|
-
x1: 0,
|
|
49
|
-
y1: 0,
|
|
50
|
-
x2: 0,
|
|
51
|
-
y2: 1
|
|
52
|
-
} : S ? { x1: 0, y1: 0, x2: 1, y2: 0 } : {
|
|
53
|
-
x1: 0,
|
|
54
|
-
y1: 1,
|
|
55
|
-
x2: 0,
|
|
56
|
-
y2: 0
|
|
57
|
-
},
|
|
58
|
-
children: [
|
|
59
|
-
/* @__PURE__ */ t.jsx("stop", { stopColor: f, offset: "0%" }),
|
|
60
|
-
/* @__PURE__ */ t.jsx("stop", { stopColor: p, offset: "100%" })
|
|
61
|
-
]
|
|
62
|
-
}
|
|
63
|
-
) }),
|
|
64
|
-
/* @__PURE__ */ t.jsxs("g", { children: [
|
|
65
|
-
/* @__PURE__ */ t.jsx(
|
|
66
|
-
X,
|
|
67
|
-
{
|
|
68
|
-
startX: u,
|
|
69
|
-
startY: h,
|
|
70
|
-
endX: a,
|
|
71
|
-
endY: s,
|
|
72
|
-
startAlpha: g,
|
|
73
|
-
endAlpha: o,
|
|
74
|
-
color: `url(#value-gradient-${p})`,
|
|
75
|
-
radius: r,
|
|
76
|
-
width: e,
|
|
77
|
-
roundEnd: !1
|
|
78
|
-
}
|
|
79
|
-
),
|
|
80
|
-
/* @__PURE__ */ t.jsx(
|
|
81
|
-
X,
|
|
82
|
-
{
|
|
83
|
-
startX: a,
|
|
84
|
-
startY: s,
|
|
85
|
-
endX: m,
|
|
86
|
-
endY: y,
|
|
87
|
-
startAlpha: o,
|
|
88
|
-
endAlpha: j,
|
|
89
|
-
color: w,
|
|
90
|
-
radius: r,
|
|
91
|
-
width: e,
|
|
92
|
-
roundStart: !1
|
|
93
|
-
}
|
|
94
|
-
),
|
|
95
|
-
/* @__PURE__ */ t.jsx(
|
|
96
|
-
"circle",
|
|
97
|
-
{
|
|
98
|
-
cx: (a + F) / 2,
|
|
99
|
-
cy: (s + B) / 2,
|
|
100
|
-
r: C + W,
|
|
101
|
-
strokeWidth: C,
|
|
102
|
-
stroke: $ || p,
|
|
103
|
-
fill: "white"
|
|
104
|
-
}
|
|
105
|
-
)
|
|
106
|
-
] })
|
|
107
|
-
] });
|
|
108
|
-
};
|
|
42
|
+
}
|
|
109
43
|
export {
|
|
110
|
-
|
|
44
|
+
E as DiscreteMeterNeedle
|
|
111
45
|
};
|
|
112
46
|
//# sourceMappingURL=sd-component-library241.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sd-component-library241.js","sources":["../src/components/meters/
|
|
1
|
+
{"version":3,"file":"sd-component-library241.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,50 +1,16 @@
|
|
|
1
|
-
import { j as
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
|
|
5
|
-
const
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
arc: a,
|
|
13
|
-
value: l,
|
|
14
|
-
gaugeWidth: g,
|
|
15
|
-
diameter: v,
|
|
16
|
-
needleColor: S
|
|
17
|
-
} = R, s = v / 2, e = r.length, t = Math.floor(l * e), y = r[t][0], A = r[t][1], u = (360 - a) / 2, m = u + a * t / e, E = u + a * (t + 1) / e, p = t / e, M = (t + 1) / e, { x: h, y: x } = i(
|
|
18
|
-
s,
|
|
19
|
-
m
|
|
20
|
-
), { x: j, y: F } = i(
|
|
21
|
-
s,
|
|
22
|
-
E
|
|
23
|
-
), o = m + (l - p) / (M - p) * a / r.length, { x: C, y: f } = i(s, o), G = k(
|
|
24
|
-
C,
|
|
25
|
-
c(o),
|
|
26
|
-
d + g + n / 2
|
|
27
|
-
), I = B(
|
|
28
|
-
f,
|
|
29
|
-
c(o),
|
|
30
|
-
d + g + n / 2
|
|
31
|
-
), T = n / 2 * Math.cos(c(o)), W = n / 2 * Math.sin(c(o)), z = t + 1 === e / 2 + 0.5 ? (C - h) / (j - h) : (f - x) / (F - x), H = b(z, y, A);
|
|
32
|
-
return /* @__PURE__ */ N.jsx(
|
|
33
|
-
q,
|
|
34
|
-
{
|
|
35
|
-
radius: s,
|
|
36
|
-
innerCircleRadius: X,
|
|
37
|
-
innerCircleStrokeWidth: Y,
|
|
38
|
-
needleWidth: n,
|
|
39
|
-
color: S || H,
|
|
40
|
-
dx: T,
|
|
41
|
-
dy: W,
|
|
42
|
-
tipX: G,
|
|
43
|
-
tipY: I
|
|
44
|
-
}
|
|
45
|
-
);
|
|
1
|
+
import { j as g } from "./sd-component-library198.js";
|
|
2
|
+
import { getRangeProperties as d } from "./sd-component-library321.js";
|
|
3
|
+
import { MatchedRangeLabelBox as x } from "./sd-component-library318.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 });
|
|
46
12
|
};
|
|
47
13
|
export {
|
|
48
|
-
|
|
14
|
+
h as MatchedRangeLabelBox
|
|
49
15
|
};
|
|
50
16
|
//# 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/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;"}
|
|
@@ -1,27 +1,6 @@
|
|
|
1
|
-
import
|
|
2
|
-
const
|
|
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
|
|
21
|
-
};
|
|
22
|
-
return /* @__PURE__ */ p.jsx("path", { d: `M${d},${i} L${X},${Y}`, stroke: "#CCD0DB" });
|
|
23
|
-
};
|
|
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" }))));
|
|
24
3
|
export {
|
|
25
|
-
|
|
4
|
+
t as ReactComponent
|
|
26
5
|
};
|
|
27
6
|
//# 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/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,56 +1,51 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
|
|
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
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
letterSpacing: "1.8px",
|
|
47
|
-
children: d
|
|
48
|
-
}
|
|
49
|
-
)
|
|
50
|
-
}
|
|
51
|
-
) });
|
|
1
|
+
import { getCoordinateForArc as s } from "./sd-component-library93.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;
|
|
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
|
|
45
|
+
};
|
|
52
46
|
};
|
|
53
47
|
export {
|
|
54
|
-
|
|
48
|
+
v as areSegmentsValid,
|
|
49
|
+
x as getSegmentCoordinates
|
|
55
50
|
};
|
|
56
51
|
//# 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/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;AAExE,MACED,EAAS;AAAA,IAAK,CAAC,EAAE,OAAAE,GAAO,KAAAC,QACtB,CAACD,GAAOC,CAAG,EAAE,KAAK,CAACG,MAAUA,IAAQ,KAAKA,IAAQ,CAAC;AAAA,EAAA;AAGrD,WAAAF,EAAU,0CAA0C,GAC7C;AAGT,MACEJ,EAAS;AAAA,IACP,CAACO,GAAK,EAAE,OAAAL,QAAYK,KAAOL,MAAU,IAAI,IAAI;AAAA,IAC7C;AAAA,QACI;AAEN,WAAAE,EAAU,iCAAiC,GACpC;AAGT,MACEJ,EAAS,OAAe,CAACO,GAAK,EAAE,KAAAJ,EAAI,MAAMI,KAAOJ,MAAQ,IAAI,IAAI,IAAI,CAAC,MACtE;AAEA,WAAAC,EAAU,6BAA6B,GAChC;AAGL,MAAAJ,EAAS,KAAK,CAAC,EAAE,OAAAE,GAAO,KAAAC,QAAUD,KAASC,CAAG;AAChD,WAAAC,EAAU,0CAA0C,GAC7C;AAGT,WAASI,IAAI,GAAGA,IAAIR,EAAS,QAAQQ,KAAK;AAClC,UAAAC,IAAiBT,EAASQ,CAAC;AAE7B,QADgBR,EAASQ,IAAI,CAAC,EAClB,QAAQC,EAAe;AACrC,aAAAL,EAAU,4DAA4D,GAC/D;AAAA,EAEX;AAEO,SAAA;AACT,GAEaM,IAAwB,CACnC,EAAE,OAAAR,GAAO,KAAAC,EAAI,GACbQ,GACAC,MACG;AACH,QAAMC,IAAcF,IAASC,GAEvBE,IAAa,KAAK,MAAMZ,IAAQ,GAAG,GACnCa,IAAW,KAAK,MAAMZ,IAAM,GAAG,GAC/Ba,IAAMD,IAAWD,GAEjB,EAAE,GAAGG,GAAQ,GAAGC,MAAWC,EAAoBR,GAAQG,CAAU,GACjE,EAAE,GAAGM,GAAa,GAAGC,EAAgB,IAAAF;AAAA,IACzCN;AAAA,IACAC;AAAA,IACAH;AAAA,EAAA,GAGI,EAAE,GAAGW,GAAM,GAAGC,MAASJ,EAAoBR,GAAQI,CAAQ,GAC3D,EAAE,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,51 +1,78 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
t
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
t
|
|
32
|
-
c,
|
|
33
|
-
n
|
|
1
|
+
import { j as n } from "./sd-component-library198.js";
|
|
2
|
+
import { useHover as Z } from "./sd-component-library3.js";
|
|
3
|
+
import { getCoordinateForArc as l } from "./sd-component-library93.js";
|
|
4
|
+
import { getSegmentCoordinates as O } from "./sd-component-library244.js";
|
|
5
|
+
import { SegmentLabel as q } from "./sd-component-library326.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
|
|
34
32
|
);
|
|
35
|
-
return {
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
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
|
+
] });
|
|
46
74
|
};
|
|
47
75
|
export {
|
|
48
|
-
|
|
49
|
-
x as getSegmentCoordinates
|
|
76
|
+
G as Segment
|
|
50
77
|
};
|
|
51
78
|
//# sourceMappingURL=sd-component-library245.js.map
|