@selfdecode/sd-component-library 4.0.143 → 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 -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-library111.js +1 -1
- package/lib/sd-component-library117.js +1 -1
- package/lib/sd-component-library118.js +1 -1
- package/lib/sd-component-library120.js +1 -1
- package/lib/sd-component-library121.js +1 -1
- package/lib/sd-component-library126.js +1 -1
- package/lib/sd-component-library127.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-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 -2
- package/lib/sd-component-library201.js.map +1 -1
- package/lib/sd-component-library202.js +590 -21
- package/lib/sd-component-library202.js.map +1 -1
- package/lib/sd-component-library203.js +56 -595
- package/lib/sd-component-library203.js.map +1 -1
- package/lib/sd-component-library207.js +18 -21
- package/lib/sd-component-library207.js.map +1 -1
- package/lib/sd-component-library208.js +64 -3
- package/lib/sd-component-library208.js.map +1 -1
- package/lib/sd-component-library209.js +23 -3
- package/lib/sd-component-library209.js.map +1 -1
- package/lib/sd-component-library210.js +39 -17
- package/lib/sd-component-library210.js.map +1 -1
- package/lib/sd-component-library211.js +19 -62
- package/lib/sd-component-library211.js.map +1 -1
- package/lib/sd-component-library212.js +3 -23
- 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 +128 -13
- 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 +14 -3
- package/lib/sd-component-library216.js.map +1 -1
- package/lib/sd-component-library217.js +3 -129
- package/lib/sd-component-library217.js.map +1 -1
- package/lib/sd-component-library218.js +3 -13
- package/lib/sd-component-library218.js.map +1 -1
- package/lib/sd-component-library219.js +3 -65
- package/lib/sd-component-library219.js.map +1 -1
- package/lib/sd-component-library220.js +52 -3
- package/lib/sd-component-library220.js.map +1 -1
- package/lib/sd-component-library221.js +46 -3
- package/lib/sd-component-library221.js.map +1 -1
- package/lib/sd-component-library222.js +54 -41
- package/lib/sd-component-library222.js.map +1 -1
- package/lib/sd-component-library223.js +3 -46
- package/lib/sd-component-library223.js.map +1 -1
- package/lib/sd-component-library230.js +1 -1
- package/lib/sd-component-library231.js +1 -1
- package/lib/sd-component-library233.js +64 -129
- package/lib/sd-component-library233.js.map +1 -1
- package/lib/sd-component-library235.js +36 -40
- package/lib/sd-component-library235.js.map +1 -1
- package/lib/sd-component-library236.js +12 -7
- package/lib/sd-component-library236.js.map +1 -1
- package/lib/sd-component-library237.js +21 -21
- package/lib/sd-component-library237.js.map +1 -1
- package/lib/sd-component-library238.js +109 -20
- package/lib/sd-component-library238.js.map +1 -1
- package/lib/sd-component-library239.js +45 -46
- package/lib/sd-component-library239.js.map +1 -1
- package/lib/sd-component-library240.js +23 -74
- package/lib/sd-component-library240.js.map +1 -1
- package/lib/sd-component-library241.js +53 -2
- package/lib/sd-component-library241.js.map +1 -1
- package/lib/sd-component-library242.js +20 -63
- package/lib/sd-component-library242.js.map +1 -1
- package/lib/sd-component-library243.js +20 -43
- package/lib/sd-component-library243.js.map +1 -1
- package/lib/sd-component-library244.js +47 -12
- package/lib/sd-component-library244.js.map +1 -1
- package/lib/sd-component-library245.js +41 -21
- package/lib/sd-component-library245.js.map +1 -1
- package/lib/sd-component-library246.js +22 -104
- package/lib/sd-component-library246.js.map +1 -1
- package/lib/sd-component-library247.js +2 -47
- package/lib/sd-component-library247.js.map +1 -1
- package/lib/sd-component-library248.js +74 -23
- package/lib/sd-component-library248.js.map +1 -1
- package/lib/sd-component-library249.js +25 -49
- package/lib/sd-component-library249.js.map +1 -1
- package/lib/sd-component-library250.js +3 -325
- package/lib/sd-component-library250.js.map +1 -1
- package/lib/sd-component-library251.js +24 -5
- package/lib/sd-component-library251.js.map +1 -1
- package/lib/sd-component-library252.js +3 -41
- package/lib/sd-component-library252.js.map +1 -1
- package/lib/sd-component-library253.js +324 -26
- package/lib/sd-component-library253.js.map +1 -1
- package/lib/sd-component-library254.js +5 -29
- 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 -24
- 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 +43 -21
- package/lib/sd-component-library258.js.map +1 -1
- package/lib/sd-component-library259.js +8 -22
- 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 -9
- package/lib/sd-component-library265.js.map +1 -1
- package/lib/sd-component-library266.js +72 -47
- package/lib/sd-component-library266.js.map +1 -1
- package/lib/sd-component-library267.js +25 -85
- package/lib/sd-component-library267.js.map +1 -1
- package/lib/sd-component-library268.js +19 -90
- package/lib/sd-component-library268.js.map +1 -1
- package/lib/sd-component-library269.js +120 -25
- package/lib/sd-component-library269.js.map +1 -1
- package/lib/sd-component-library270.js +117 -16
- package/lib/sd-component-library270.js.map +1 -1
- package/lib/sd-component-library271.js +10 -125
- package/lib/sd-component-library271.js.map +1 -1
- package/lib/sd-component-library272.js +39 -111
- package/lib/sd-component-library272.js.map +1 -1
- package/lib/sd-component-library273.js +9 -10
- package/lib/sd-component-library273.js.map +1 -1
- package/lib/sd-component-library274.js +49 -48
- 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-library296.js +88 -20
- package/lib/sd-component-library296.js.map +1 -1
- package/lib/sd-component-library297.js +50 -34
- package/lib/sd-component-library297.js.map +1 -1
- package/lib/sd-component-library298.js +4 -92
- package/lib/sd-component-library298.js.map +1 -1
- package/lib/sd-component-library299.js +25 -51
- package/lib/sd-component-library299.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-library303.js +1 -1
- package/lib/sd-component-library315.js +1 -1
- package/lib/sd-component-library317.js +6 -90
- package/lib/sd-component-library317.js.map +1 -1
- package/lib/sd-component-library318.js +90 -6
- package/lib/sd-component-library318.js.map +1 -1
- package/lib/sd-component-library48.js +1 -1
- package/lib/sd-component-library49.js +1 -1
- package/lib/sd-component-library51.js +3 -3
- package/lib/sd-component-library52.js +2 -2
- package/lib/sd-component-library53.js +2 -2
- package/lib/sd-component-library60.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 +1 -1
- package/lib/sd-component-library70.js +2 -2
- package/lib/sd-component-library72.js +3 -3
- 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-library81.js +9 -7
- package/lib/sd-component-library81.js.map +1 -1
- package/lib/sd-component-library89.js +3 -3
- package/lib/sd-component-library92.js +3 -3
- package/lib/sd-component-library94.js +5 -5
- package/lib/sd-component-library98.js +2 -2
- package/lib/sd-component-library99.js +3 -3
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sd-component-library240.js","sources":["../src/components/meters/
|
|
1
|
+
{"version":3,"file":"sd-component-library240.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,5 +1,56 @@
|
|
|
1
|
-
|
|
1
|
+
import { j as s } from "./sd-component-library197.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-library227.js";
|
|
5
|
+
import { ResponsiveTextV2 as v } from "./sd-component-library150.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`
|
|
36
|
+
}
|
|
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
|
+
) });
|
|
52
|
+
};
|
|
2
53
|
export {
|
|
3
|
-
|
|
54
|
+
C as BaseMeterLabelBox
|
|
4
55
|
};
|
|
5
56
|
//# 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/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,67 +1,24 @@
|
|
|
1
|
-
import { j as
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
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
|
|
1
|
+
import { j as x } from "./sd-component-library197.js";
|
|
2
|
+
import { Box as n } from "rebass";
|
|
3
|
+
const $ = ({
|
|
4
|
+
idx: o,
|
|
5
|
+
color: t,
|
|
6
|
+
total: i,
|
|
7
|
+
segmentHeight: r
|
|
8
|
+
}) => {
|
|
9
|
+
const s = `${o === 0 ? r / 2 : 0}px`, a = `${o === i - 1 ? r / 2 : 0}px`;
|
|
10
|
+
return /* @__PURE__ */ x.jsx(
|
|
11
|
+
n,
|
|
12
|
+
{
|
|
13
|
+
bg: t,
|
|
14
|
+
height: r,
|
|
15
|
+
sx: {
|
|
16
|
+
borderRadius: `${s} ${[...Array(2)].fill(a).join(" ")} ${s}`
|
|
47
17
|
}
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
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
|
-
}
|
|
18
|
+
}
|
|
19
|
+
);
|
|
20
|
+
};
|
|
64
21
|
export {
|
|
65
|
-
|
|
22
|
+
$ as LinearGaugeSegment
|
|
66
23
|
};
|
|
67
24
|
//# 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/linear-gauge-meter-partials/linear-gauge-segment/linear-gauge-segment.tsx"],"sourcesContent":["import React from \"react\";\n\nimport { Box } from \"rebass\";\n\nimport { LinearGaugeSegmentProps as Props } from \"./interfaces\";\n\nexport const LinearGaugeSegment: React.FC<Props> = ({\n idx,\n color,\n total,\n segmentHeight,\n}) => {\n const leftRadius = `${idx === 0 ? segmentHeight / 2 : 0}px`;\n const rightRadius = `${idx === total - 1 ? segmentHeight / 2 : 0}px`;\n\n return (\n <Box\n bg={color}\n height={segmentHeight}\n sx={{\n borderRadius: `${leftRadius} ${[...Array(2)]\n .fill(rightRadius)\n .join(\" \")} ${leftRadius}`,\n }}\n />\n );\n};\n"],"names":["LinearGaugeSegment","idx","color","total","segmentHeight","leftRadius","rightRadius","jsx","Box"],"mappings":";;AAMO,MAAMA,IAAsC,CAAC;AAAA,EAClD,KAAAC;AAAA,EACA,OAAAC;AAAA,EACA,OAAAC;AAAA,EACA,eAAAC;AACF,MAAM;AACJ,QAAMC,IAAa,GAAGJ,MAAQ,IAAIG,IAAgB,IAAI,CAAC,MACjDE,IAAc,GAAGL,MAAQE,IAAQ,IAAIC,IAAgB,IAAI,CAAC;AAG9D,SAAAG,gBAAAA,EAAA;AAAA,IAACC;AAAA,IAAA;AAAA,MACC,IAAIN;AAAA,MACJ,QAAQE;AAAA,MACR,IAAI;AAAA,QACF,cAAc,GAAGC,CAAU,IAAI,CAAC,GAAG,MAAM,CAAC,CAAC,EACxC,KAAKC,CAAW,EAChB,KAAK,GAAG,CAAC,IAAID,CAAU;AAAA,MAC5B;AAAA,IAAA;AAAA,EAAA;AAGN;"}
|
|
@@ -1,46 +1,23 @@
|
|
|
1
|
-
import { j as
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
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
|
-
}
|
|
1
|
+
import { j as o } from "./sd-component-library197.js";
|
|
2
|
+
import { ResponsiveTextV2 as r } from "./sd-component-library150.js";
|
|
3
|
+
const m = ({
|
|
4
|
+
text: e,
|
|
5
|
+
color: t,
|
|
6
|
+
...i
|
|
7
|
+
}) => /* @__PURE__ */ o.jsx(
|
|
8
|
+
r,
|
|
9
|
+
{
|
|
10
|
+
height: "12px",
|
|
11
|
+
fontSizeWeight: [10, "semi-bold"],
|
|
12
|
+
color: t,
|
|
13
|
+
mx: "auto",
|
|
14
|
+
maxWidth: "100%",
|
|
15
|
+
textAlign: "center",
|
|
16
|
+
...i,
|
|
17
|
+
children: e
|
|
18
|
+
}
|
|
19
|
+
);
|
|
43
20
|
export {
|
|
44
|
-
|
|
21
|
+
m as LinearGaugeLabel
|
|
45
22
|
};
|
|
46
23
|
//# 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/linear-gauge-meter-partials/linear-gauge-label/linear-gauge-label.tsx"],"sourcesContent":["import React from \"react\";\n\nimport { ResponsiveTextV2 } from \"../../../texts\";\nimport { LinearGaugeLabelProps as Props } from \"./interfaces\";\n\nexport const LinearGaugeLabel: React.FC<Props> = ({\n text,\n color,\n ...restOfProps\n}) => {\n return (\n <ResponsiveTextV2\n height=\"12px\"\n fontSizeWeight={[10, \"semi-bold\"]}\n color={color}\n mx=\"auto\"\n maxWidth=\"100%\"\n textAlign=\"center\"\n {...restOfProps}\n >\n {text}\n </ResponsiveTextV2>\n );\n};\n"],"names":["LinearGaugeLabel","text","color","restOfProps","jsx","ResponsiveTextV2"],"mappings":";;AAKO,MAAMA,IAAoC,CAAC;AAAA,EAChD,MAAAC;AAAA,EACA,OAAAC;AAAA,EACA,GAAGC;AACL,MAEIC,gBAAAA,EAAA;AAAA,EAACC;AAAA,EAAA;AAAA,IACC,QAAO;AAAA,IACP,gBAAgB,CAAC,IAAI,WAAW;AAAA,IAChC,OAAAH;AAAA,IACA,IAAG;AAAA,IACH,UAAS;AAAA,IACT,WAAU;AAAA,IACT,GAAGC;AAAA,IAEH,UAAAF;AAAA,EAAA;AAAA;"}
|
|
@@ -1,16 +1,51 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
1
|
+
import { getCoordinateForArc as s } from "./sd-component-library91.js";
|
|
2
|
+
const v = (r) => {
|
|
3
|
+
const a = `Received ${r.map(
|
|
4
|
+
({ start: e, end: t }) => `(${e},${t})`
|
|
5
|
+
)}`, n = (e) => console.error(e, a);
|
|
6
|
+
if (r.some(
|
|
7
|
+
({ start: e, end: t }) => [e, t].some((o) => o < 0 || o > 1)
|
|
8
|
+
))
|
|
9
|
+
return n("Segment values should be between 0 and 1"), !1;
|
|
10
|
+
if (r.reduce(
|
|
11
|
+
(e, { start: t }) => e + (t === 0 ? 1 : 0),
|
|
12
|
+
0
|
|
13
|
+
) !== 1)
|
|
14
|
+
return n("One segment should start from 0"), !1;
|
|
15
|
+
if (r.reduce((e, { end: t }) => e + (t === 1 ? 1 : 0), 0) !== 1)
|
|
16
|
+
return n("One segment should end by 1"), !1;
|
|
17
|
+
if (r.some(({ start: e, end: t }) => e >= t))
|
|
18
|
+
return n("Segment start should be smaller than end"), !1;
|
|
19
|
+
for (let e = 1; e < r.length; e++) {
|
|
20
|
+
const t = r[e];
|
|
21
|
+
if (r[e - 1].end !== t.start)
|
|
22
|
+
return n("Previous segment end should be equal to next segment start"), !1;
|
|
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
|
+
};
|
|
12
46
|
};
|
|
13
47
|
export {
|
|
14
|
-
|
|
48
|
+
v as areSegmentsValid,
|
|
49
|
+
x as getSegmentCoordinates
|
|
15
50
|
};
|
|
16
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,24 +1,44 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
1
|
+
import { j as n } from "./sd-component-library197.js";
|
|
2
|
+
import g from "./sd-component-library196.js";
|
|
3
|
+
import { getSegmentCoordinates as I } from "./sd-component-library244.js";
|
|
4
|
+
const w = ({
|
|
5
|
+
segment: e,
|
|
6
|
+
size: o,
|
|
7
|
+
segmentWidth: s,
|
|
8
|
+
outlineWidth: c,
|
|
9
|
+
isMatching: a
|
|
10
|
+
}) => {
|
|
11
|
+
const { color: d } = e, t = o / 2, $ = t - s, {
|
|
12
|
+
startX: l,
|
|
13
|
+
startY: m,
|
|
14
|
+
arc: i,
|
|
15
|
+
startInnerY: p,
|
|
16
|
+
startInnerX: h,
|
|
17
|
+
endInnerY: u,
|
|
18
|
+
endInnerX: x,
|
|
19
|
+
endX: f,
|
|
20
|
+
endY: j
|
|
21
|
+
} = I(e, t, s), r = o / 2;
|
|
22
|
+
return /* @__PURE__ */ n.jsxs("g", { children: [
|
|
23
|
+
/* @__PURE__ */ n.jsx(
|
|
24
|
+
"path",
|
|
25
|
+
{
|
|
26
|
+
d: `M${r},${r} L${l},${m} A${t},${t} 0 ${i > 180 ? "1" : "0"},1 ${f},${j}Z`,
|
|
27
|
+
fill: a ? d : g.colors.cl_lightGrey,
|
|
28
|
+
strokeWidth: c,
|
|
29
|
+
stroke: "white"
|
|
30
|
+
}
|
|
31
|
+
),
|
|
32
|
+
/* @__PURE__ */ n.jsx(
|
|
33
|
+
"path",
|
|
34
|
+
{
|
|
35
|
+
d: `M${r},${r} L${h},${p} A${$},${$} 0 ${i > 180 ? "1" : "0"},1 ${x},${u}Z`,
|
|
36
|
+
fill: "white"
|
|
37
|
+
}
|
|
38
|
+
)
|
|
39
|
+
] });
|
|
40
|
+
};
|
|
18
41
|
export {
|
|
19
|
-
|
|
20
|
-
I as getFractionColor,
|
|
21
|
-
h as isLabelActive,
|
|
22
|
-
T as mapAdjacent
|
|
42
|
+
w as CompactDonutGaugeSegment
|
|
23
43
|
};
|
|
24
44
|
//# 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/compact-donut-gauge/partials/compact-donut-gauge-segment/compact-donut-gauge-segment.tsx"],"sourcesContent":["import React from \"react\";\n\nimport theme from \"../../../../../core/theme\";\nimport { getSegmentCoordinates } from \"../../../donut-diagram/utils\";\nimport { CompactDonutGaugeSegmentProps as Props } from \"./interfaces\";\n\nexport const CompactDonutGaugeSegment: React.FC<Props> = ({\n segment,\n size: diameter,\n segmentWidth,\n outlineWidth,\n isMatching,\n}) => {\n const { color } = segment;\n\n const radius = diameter / 2;\n const innerRadius = radius - segmentWidth;\n\n const {\n startX,\n startY,\n arc,\n startInnerY,\n startInnerX,\n endInnerY,\n endInnerX,\n endX,\n endY,\n } = getSegmentCoordinates(segment, radius, segmentWidth);\n\n const center = diameter / 2;\n\n return (\n <g>\n {/* colored sector */}\n <path\n d={`M${center},${center} L${startX},${startY} A${radius},${radius} 0 ${\n arc > 180 ? \"1\" : \"0\"\n },1 ${endX},${endY}Z`}\n fill={isMatching ? color : theme.colors[\"cl_lightGrey\"]}\n strokeWidth={outlineWidth}\n stroke=\"white\"\n />\n\n {/* white inner sector */}\n <path\n d={`M${center},${center} L${startInnerX},${startInnerY} A${innerRadius},${innerRadius} 0 ${\n arc > 180 ? \"1\" : \"0\"\n },1 ${endInnerX},${endInnerY}Z`}\n fill=\"white\"\n />\n </g>\n );\n};\n"],"names":["CompactDonutGaugeSegment","segment","diameter","segmentWidth","outlineWidth","isMatching","color","radius","innerRadius","startX","startY","arc","startInnerY","startInnerX","endInnerY","endInnerX","endX","endY","getSegmentCoordinates","center","jsx","theme"],"mappings":";;;AAMO,MAAMA,IAA4C,CAAC;AAAA,EACxD,SAAAC;AAAA,EACA,MAAMC;AAAA,EACN,cAAAC;AAAA,EACA,cAAAC;AAAA,EACA,YAAAC;AACF,MAAM;AACE,QAAA,EAAE,OAAAC,EAAU,IAAAL,GAEZM,IAASL,IAAW,GACpBM,IAAcD,IAASJ,GAEvB;AAAA,IACJ,QAAAM;AAAA,IACA,QAAAC;AAAA,IACA,KAAAC;AAAA,IACA,aAAAC;AAAA,IACA,aAAAC;AAAA,IACA,WAAAC;AAAA,IACA,WAAAC;AAAA,IACA,MAAAC;AAAA,IACA,MAAAC;AAAA,EACE,IAAAC,EAAsBjB,GAASM,GAAQJ,CAAY,GAEjDgB,IAASjB,IAAW;AAE1B,gCACG,KAEC,EAAA,UAAA;AAAA,IAAAkB,gBAAAA,EAAA;AAAA,MAAC;AAAA,MAAA;AAAA,QACC,GAAG,IAAID,CAAM,IAAIA,CAAM,KAAKV,CAAM,IAAIC,CAAM,KAAKH,CAAM,IAAIA,CAAM,MAC/DI,IAAM,MAAM,MAAM,GACpB,MAAMK,CAAI,IAAIC,CAAI;AAAA,QAClB,MAAMZ,IAAaC,IAAQe,EAAM,OAAO;AAAA,QACxC,aAAajB;AAAA,QACb,QAAO;AAAA,MAAA;AAAA,IACT;AAAA,IAGAgB,gBAAAA,EAAA;AAAA,MAAC;AAAA,MAAA;AAAA,QACC,GAAG,IAAID,CAAM,IAAIA,CAAM,KAAKN,CAAW,IAAID,CAAW,KAAKJ,CAAW,IAAIA,CAAW,MACnFG,IAAM,MAAM,MAAM,GACpB,MAAMI,CAAS,IAAID,CAAS;AAAA,QAC5B,MAAK;AAAA,MAAA;AAAA,IACP;AAAA,EACF,EAAA,CAAA;AAEJ;"}
|
|
@@ -1,112 +1,30 @@
|
|
|
1
1
|
import { j as t } from "./sd-component-library197.js";
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
innerPointRadius: W,
|
|
16
|
-
pointStrokeWidth: C,
|
|
17
|
-
gaugeWidth: e,
|
|
18
|
-
pointColor: $
|
|
19
|
-
} = G, c = d / n, x = (d + 1) / n, k = i >= c && i <= x, R = (360 - l) / 2, r = I / 2, g = R + l * c, j = R + l * x, { x: u, y: h } = A(
|
|
20
|
-
r,
|
|
21
|
-
g
|
|
22
|
-
), { x: m, y } = A(
|
|
23
|
-
r,
|
|
24
|
-
j
|
|
25
|
-
);
|
|
26
|
-
if (v || !k)
|
|
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: [
|
|
2
|
+
import { FlexCenter as s } from "./sd-component-library34.js";
|
|
3
|
+
import { ResponsiveTextV2 as i } from "./sd-component-library150.js";
|
|
4
|
+
const l = ({
|
|
5
|
+
segment: { start: n, end: r, color: e },
|
|
6
|
+
size: o
|
|
7
|
+
}) => /* @__PURE__ */ t.jsx("foreignObject", { x: 0, y: 0, width: o, height: o, children: /* @__PURE__ */ t.jsx(s, { height: "100%", children: /* @__PURE__ */ t.jsxs(
|
|
8
|
+
i,
|
|
9
|
+
{
|
|
10
|
+
fontSizeWeight: [20, "bold"],
|
|
11
|
+
color: e,
|
|
12
|
+
sx: { position: "relative" },
|
|
13
|
+
children: [
|
|
14
|
+
Math.round((r - n) * 100),
|
|
65
15
|
/* @__PURE__ */ t.jsx(
|
|
66
|
-
|
|
16
|
+
i,
|
|
67
17
|
{
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
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"
|
|
18
|
+
fontSizeWeight: [10, "bold"],
|
|
19
|
+
color: e,
|
|
20
|
+
sx: { position: "absolute", top: "4px", left: "100%" },
|
|
21
|
+
children: "%"
|
|
104
22
|
}
|
|
105
23
|
)
|
|
106
|
-
]
|
|
107
|
-
|
|
108
|
-
};
|
|
24
|
+
]
|
|
25
|
+
}
|
|
26
|
+
) }) });
|
|
109
27
|
export {
|
|
110
|
-
|
|
28
|
+
l as CompactDonutGaugeValueIndicator
|
|
111
29
|
};
|
|
112
30
|
//# sourceMappingURL=sd-component-library246.js.map
|