@selfdecode/sd-component-library 4.0.142 → 4.0.144
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/components/wrapper/functions.d.ts +1 -1
- package/lib/components/wrapper/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-library112.js +1 -1
- package/lib/sd-component-library118.js +1 -1
- package/lib/sd-component-library126.js +1 -1
- package/lib/sd-component-library127.js +1 -1
- package/lib/sd-component-library16.js +1 -1
- package/lib/sd-component-library167.js +1 -1
- package/lib/sd-component-library172.js +1 -1
- package/lib/sd-component-library197.js +3 -3
- package/lib/sd-component-library198.js +57 -57
- package/lib/sd-component-library198.js.map +1 -1
- package/lib/sd-component-library2.js +14 -4
- package/lib/sd-component-library2.js.map +1 -1
- package/lib/sd-component-library202.js +2 -57
- package/lib/sd-component-library202.js.map +1 -1
- package/lib/sd-component-library203.js +30 -2
- package/lib/sd-component-library203.js.map +1 -1
- package/lib/sd-component-library204.js +590 -21
- package/lib/sd-component-library204.js.map +1 -1
- package/lib/sd-component-library205.js +25 -598
- package/lib/sd-component-library205.js.map +1 -1
- package/lib/sd-component-library206.js +55 -24
- package/lib/sd-component-library206.js.map +1 -1
- package/lib/sd-component-library210.js +40 -21
- package/lib/sd-component-library210.js.map +1 -1
- package/lib/sd-component-library211.js +129 -3
- package/lib/sd-component-library211.js.map +1 -1
- package/lib/sd-component-library212.js +13 -3
- package/lib/sd-component-library212.js.map +1 -1
- package/lib/sd-component-library213.js +14 -26
- package/lib/sd-component-library213.js.map +1 -1
- package/lib/sd-component-library214.js +3 -3
- package/lib/sd-component-library214.js.map +1 -1
- package/lib/sd-component-library215.js +3 -31
- package/lib/sd-component-library215.js.map +1 -1
- package/lib/sd-component-library216.js +65 -19
- package/lib/sd-component-library216.js.map +1 -1
- package/lib/sd-component-library217.js +3 -20
- package/lib/sd-component-library217.js.map +1 -1
- package/lib/sd-component-library218.js +3 -28
- package/lib/sd-component-library218.js.map +1 -1
- package/lib/sd-component-library219.js +44 -31
- 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 +15 -127
- package/lib/sd-component-library221.js.map +1 -1
- package/lib/sd-component-library222.js +19 -41
- package/lib/sd-component-library222.js.map +1 -1
- package/lib/sd-component-library223.js +3 -47
- package/lib/sd-component-library223.js.map +1 -1
- package/lib/sd-component-library224.js +3 -8
- package/lib/sd-component-library224.js.map +1 -1
- package/lib/sd-component-library225.js +3 -64
- package/lib/sd-component-library225.js.map +1 -1
- package/lib/sd-component-library226.js +31 -43
- package/lib/sd-component-library226.js.map +1 -1
- package/lib/sd-component-library227.js +19 -13
- package/lib/sd-component-library227.js.map +1 -1
- package/lib/sd-component-library228.js +20 -21
- package/lib/sd-component-library228.js.map +1 -1
- package/lib/sd-component-library229.js +26 -107
- package/lib/sd-component-library229.js.map +1 -1
- package/lib/sd-component-library230.js +27 -41
- package/lib/sd-component-library230.js.map +1 -1
- package/lib/sd-component-library231.js +129 -24
- package/lib/sd-component-library231.js.map +1 -1
- package/lib/sd-component-library232.js +40 -50
- package/lib/sd-component-library232.js.map +1 -1
- package/lib/sd-component-library233.js +45 -46
- package/lib/sd-component-library233.js.map +1 -1
- package/lib/sd-component-library234.js +7 -74
- package/lib/sd-component-library234.js.map +1 -1
- package/lib/sd-component-library235.js +3 -41
- package/lib/sd-component-library235.js.map +1 -1
- package/lib/sd-component-library236.js +20 -26
- package/lib/sd-component-library236.js.map +1 -1
- package/lib/sd-component-library237.js +107 -19
- package/lib/sd-component-library237.js.map +1 -1
- package/lib/sd-component-library238.js +47 -20
- package/lib/sd-component-library238.js.map +1 -1
- package/lib/sd-component-library239.js +24 -2
- package/lib/sd-component-library239.js.map +1 -1
- package/lib/sd-component-library24.js +1 -1
- package/lib/sd-component-library240.js +49 -36
- package/lib/sd-component-library240.js.map +1 -1
- package/lib/sd-component-library241.js +63 -128
- package/lib/sd-component-library241.js.map +1 -1
- package/lib/sd-component-library242.js +43 -13
- package/lib/sd-component-library242.js.map +1 -1
- package/lib/sd-component-library243.js +13 -14
- package/lib/sd-component-library243.js.map +1 -1
- package/lib/sd-component-library244.js +48 -3
- package/lib/sd-component-library244.js.map +1 -1
- package/lib/sd-component-library245.js +41 -3
- package/lib/sd-component-library245.js.map +1 -1
- package/lib/sd-component-library246.js +27 -3
- package/lib/sd-component-library246.js.map +1 -1
- package/lib/sd-component-library247.js +16 -47
- package/lib/sd-component-library247.js.map +1 -1
- package/lib/sd-component-library248.js +16 -61
- package/lib/sd-component-library248.js.map +1 -1
- package/lib/sd-component-library249.js +75 -3
- package/lib/sd-component-library249.js.map +1 -1
- package/lib/sd-component-library250.js +2 -46
- package/lib/sd-component-library250.js.map +1 -1
- package/lib/sd-component-library251.js +324 -16
- package/lib/sd-component-library251.js.map +1 -1
- package/lib/sd-component-library252.js +5 -325
- package/lib/sd-component-library252.js.map +1 -1
- package/lib/sd-component-library253.js +26 -5
- package/lib/sd-component-library253.js.map +1 -1
- package/lib/sd-component-library261.js +1 -1
- package/lib/sd-component-library262.js +1 -1
- package/lib/sd-component-library264.js +1 -1
- package/lib/sd-component-library277.js +2 -6
- package/lib/sd-component-library277.js.map +1 -1
- package/lib/sd-component-library278.js +2 -3
- package/lib/sd-component-library278.js.map +1 -1
- package/lib/sd-component-library279.js +9 -2
- package/lib/sd-component-library279.js.map +1 -1
- package/lib/sd-component-library280.js +70 -3
- package/lib/sd-component-library280.js.map +1 -1
- package/lib/sd-component-library281.js +102 -2
- package/lib/sd-component-library281.js.map +1 -1
- package/lib/sd-component-library282.js +106 -2
- package/lib/sd-component-library282.js.map +1 -1
- package/lib/sd-component-library283.js +6 -70
- package/lib/sd-component-library283.js.map +1 -1
- package/lib/sd-component-library284.js +2 -102
- package/lib/sd-component-library284.js.map +1 -1
- package/lib/sd-component-library285.js +34 -104
- package/lib/sd-component-library285.js.map +1 -1
- package/lib/sd-component-library286.js +14 -10
- package/lib/sd-component-library286.js.map +1 -1
- package/lib/sd-component-library287.js +3 -2
- package/lib/sd-component-library287.js.map +1 -1
- package/lib/sd-component-library288.js +3 -36
- package/lib/sd-component-library288.js.map +1 -1
- package/lib/sd-component-library289.js +3 -14
- package/lib/sd-component-library289.js.map +1 -1
- package/lib/sd-component-library291.js +3 -3
- package/lib/sd-component-library292.js +4 -4
- package/lib/sd-component-library293.js +1 -1
- package/lib/sd-component-library294.js +58 -2
- package/lib/sd-component-library294.js.map +1 -1
- package/lib/sd-component-library295.js +25 -76
- package/lib/sd-component-library295.js.map +1 -1
- package/lib/sd-component-library296.js +89 -89
- package/lib/sd-component-library296.js.map +1 -1
- package/lib/sd-component-library297.js +50 -52
- package/lib/sd-component-library297.js.map +1 -1
- package/lib/sd-component-library298.js +35 -9
- package/lib/sd-component-library298.js.map +1 -1
- package/lib/sd-component-library299.js +25 -5
- package/lib/sd-component-library299.js.map +1 -1
- package/lib/sd-component-library300.js +5 -53
- package/lib/sd-component-library300.js.map +1 -1
- package/lib/sd-component-library301.js +4 -9
- package/lib/sd-component-library301.js.map +1 -1
- package/lib/sd-component-library302.js +8 -4
- package/lib/sd-component-library302.js.map +1 -1
- package/lib/sd-component-library303.js +5 -4
- package/lib/sd-component-library303.js.map +1 -1
- package/lib/sd-component-library304.js +4 -19
- package/lib/sd-component-library304.js.map +1 -1
- package/lib/sd-component-library305.js +19 -3
- package/lib/sd-component-library305.js.map +1 -1
- package/lib/sd-component-library306.js +3 -2
- package/lib/sd-component-library306.js.map +1 -1
- package/lib/sd-component-library307.js +34 -2
- package/lib/sd-component-library307.js.map +1 -1
- package/lib/sd-component-library308.js +2 -6
- package/lib/sd-component-library308.js.map +1 -1
- package/lib/sd-component-library309.js +76 -24
- package/lib/sd-component-library309.js.map +1 -1
- package/lib/sd-component-library310.js +92 -50
- package/lib/sd-component-library310.js.map +1 -1
- package/lib/sd-component-library311.js +52 -34
- package/lib/sd-component-library311.js.map +1 -1
- package/lib/sd-component-library312.js +9 -5
- package/lib/sd-component-library312.js.map +1 -1
- package/lib/sd-component-library313.js +5 -93
- package/lib/sd-component-library313.js.map +1 -1
- package/lib/sd-component-library314.js +53 -4
- package/lib/sd-component-library314.js.map +1 -1
- package/lib/sd-component-library315.js +20 -49
- package/lib/sd-component-library315.js.map +1 -1
- package/lib/sd-component-library316.js +15 -20
- package/lib/sd-component-library316.js.map +1 -1
- package/lib/sd-component-library317.js +6 -34
- package/lib/sd-component-library317.js.map +1 -1
- package/lib/sd-component-library319.js +31 -28
- package/lib/sd-component-library319.js.map +1 -1
- package/lib/sd-component-library320.js +2 -21
- package/lib/sd-component-library320.js.map +1 -1
- package/lib/sd-component-library321.js +2 -32
- package/lib/sd-component-library321.js.map +1 -1
- package/lib/sd-component-library51.js +3 -3
- package/lib/sd-component-library60.js +1 -1
- package/lib/sd-component-library61.js +2 -2
- package/lib/sd-component-library62.js +5 -5
- 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-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-library80.js +1 -1
- package/lib/sd-component-library81.js +9 -7
- package/lib/sd-component-library81.js.map +1 -1
- package/lib/sd-component-library85.js +1 -1
- package/lib/sd-component-library86.js +6 -6
- package/lib/sd-component-library87.js +2 -2
- package/lib/sd-component-library88.js +1 -1
- package/lib/sd-component-library89.js +5 -5
- package/lib/sd-component-library90.js +1 -1
- package/lib/sd-component-library92.js +6 -6
- package/lib/sd-component-library93.js +1 -1
- package/lib/sd-component-library94.js +7 -7
- package/lib/sd-component-library95.js +1 -1
- package/lib/sd-component-library98.js +2 -2
- package/lib/sd-component-library99.js +3 -3
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sd-component-library244.js","sources":["../src/components/
|
|
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,6 +1,44 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
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
|
+
};
|
|
3
41
|
export {
|
|
4
|
-
|
|
42
|
+
w as CompactDonutGaugeSegment
|
|
5
43
|
};
|
|
6
44
|
//# sourceMappingURL=sd-component-library245.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sd-component-library245.js","sources":["../src/components/
|
|
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,6 +1,30 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
1
|
+
import { j as t } from "./sd-component-library197.js";
|
|
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),
|
|
15
|
+
/* @__PURE__ */ t.jsx(
|
|
16
|
+
i,
|
|
17
|
+
{
|
|
18
|
+
fontSizeWeight: [10, "bold"],
|
|
19
|
+
color: e,
|
|
20
|
+
sx: { position: "absolute", top: "4px", left: "100%" },
|
|
21
|
+
children: "%"
|
|
22
|
+
}
|
|
23
|
+
)
|
|
24
|
+
]
|
|
25
|
+
}
|
|
26
|
+
) }) });
|
|
3
27
|
export {
|
|
4
|
-
|
|
28
|
+
l as CompactDonutGaugeValueIndicator
|
|
5
29
|
};
|
|
6
30
|
//# sourceMappingURL=sd-component-library246.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sd-component-library246.js","sources":["../src/components/
|
|
1
|
+
{"version":3,"file":"sd-component-library246.js","sources":["../src/components/meters/compact-donut-gauge/partials/compact-donut-gauge-value-indicator/compact-donut-gauge-value-indicator.tsx"],"sourcesContent":["import React from \"react\";\n\nimport { Flex } from \"rebass\";\n\nimport { FlexCenter } from \"../../../../containers\";\nimport { ResponsiveTextV2 } from \"../../../../texts\";\nimport { CompactDonutGaugeValueIndicatorProps as Props } from \"./interfaces\";\n\nexport const CompactDonutGaugeValueIndicator: React.FC<Props> = ({\n segment: { start, end, color },\n size,\n}) => {\n return (\n <foreignObject x={0} y={0} width={size} height={size}>\n <FlexCenter height=\"100%\">\n <ResponsiveTextV2\n fontSizeWeight={[20, \"bold\"]}\n color={color}\n sx={{ position: \"relative\" }}\n >\n {Math.round((end - start) * 100)}\n\n <ResponsiveTextV2\n fontSizeWeight={[10, \"bold\"]}\n color={color}\n sx={{ position: \"absolute\", top: \"4px\", left: \"100%\" }}\n >\n %\n </ResponsiveTextV2>\n </ResponsiveTextV2>\n </FlexCenter>\n </foreignObject>\n );\n};\n"],"names":["CompactDonutGaugeValueIndicator","start","end","color","size","jsx","FlexCenter","jsxs","ResponsiveTextV2"],"mappings":";;;AAQO,MAAMA,IAAmD,CAAC;AAAA,EAC/D,SAAS,EAAE,OAAAC,GAAO,KAAAC,GAAK,OAAAC,EAAM;AAAA,EAC7B,MAAAC;AACF,MAEKC,gBAAAA,EAAAA,IAAA,iBAAA,EAAc,GAAG,GAAG,GAAG,GAAG,OAAOD,GAAM,QAAQA,GAC9C,UAACC,gBAAAA,MAAAC,GAAA,EAAW,QAAO,QACjB,UAAAC,gBAAAA,EAAA;AAAA,EAACC;AAAA,EAAA;AAAA,IACC,gBAAgB,CAAC,IAAI,MAAM;AAAA,IAC3B,OAAAL;AAAA,IACA,IAAI,EAAE,UAAU,WAAW;AAAA,IAE1B,UAAA;AAAA,MAAK,KAAA,OAAOD,IAAMD,KAAS,GAAG;AAAA,MAE/BI,gBAAAA,EAAA;AAAA,QAACG;AAAA,QAAA;AAAA,UACC,gBAAgB,CAAC,IAAI,MAAM;AAAA,UAC3B,OAAAL;AAAA,UACA,IAAI,EAAE,UAAU,YAAY,KAAK,OAAO,MAAM,OAAO;AAAA,UACtD,UAAA;AAAA,QAAA;AAAA,MAED;AAAA,IAAA;AAAA,EAAA;AAAA,EAEJ,CAAA,EACF,CAAA;"}
|
|
@@ -1,55 +1,24 @@
|
|
|
1
|
-
import { j as
|
|
2
|
-
import n from "
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
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,
|
|
10
12
|
{
|
|
13
|
+
bg: t,
|
|
14
|
+
height: r,
|
|
11
15
|
sx: {
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
position: "absolute",
|
|
15
|
-
width: "100%",
|
|
16
|
-
cursor: "pointer",
|
|
17
|
-
zIndex: 1
|
|
18
|
-
},
|
|
19
|
-
children: [
|
|
20
|
-
/* @__PURE__ */ o.jsx(i, { color: "cl_purple", height: "2px" }),
|
|
21
|
-
/* @__PURE__ */ o.jsx(
|
|
22
|
-
t,
|
|
23
|
-
{
|
|
24
|
-
sx: {
|
|
25
|
-
overflowY: "auto",
|
|
26
|
-
maxHeight: `${x * (e + 1) - 1}px`,
|
|
27
|
-
borderWidth: "1px",
|
|
28
|
-
borderStyle: "solid",
|
|
29
|
-
borderColor: "cl_lightGrey",
|
|
30
|
-
borderRadius: "0 0 3px 3px",
|
|
31
|
-
borderTopStyle: "none",
|
|
32
|
-
boxShadow: "2px 3px 10px rgba(211,223,255,0.25)",
|
|
33
|
-
bg: "cl_white"
|
|
34
|
-
},
|
|
35
|
-
children: p.map((r, d) => /* @__PURE__ */ o.jsxs(n.Fragment, { children: [
|
|
36
|
-
d !== 0 && /* @__PURE__ */ o.jsx(i, { color: "cl_headerLine" }),
|
|
37
|
-
/* @__PURE__ */ o.jsx(
|
|
38
|
-
a,
|
|
39
|
-
{
|
|
40
|
-
...r,
|
|
41
|
-
onClick: c(r),
|
|
42
|
-
height: e
|
|
43
|
-
}
|
|
44
|
-
)
|
|
45
|
-
] }, r.id))
|
|
46
|
-
}
|
|
47
|
-
)
|
|
48
|
-
]
|
|
16
|
+
borderRadius: `${s} ${[...Array(2)].fill(a).join(" ")} ${s}`
|
|
17
|
+
}
|
|
49
18
|
}
|
|
50
19
|
);
|
|
51
20
|
};
|
|
52
21
|
export {
|
|
53
|
-
|
|
22
|
+
$ as LinearGaugeSegment
|
|
54
23
|
};
|
|
55
24
|
//# sourceMappingURL=sd-component-library247.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sd-component-library247.js","sources":["../src/components/
|
|
1
|
+
{"version":3,"file":"sd-component-library247.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,68 +1,23 @@
|
|
|
1
1
|
import { j as o } from "./sd-component-library197.js";
|
|
2
|
-
import
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
import { HorizontalDivider as c } from "./sd-component-library48.js";
|
|
8
|
-
const S = ({
|
|
9
|
-
searchResults: t,
|
|
10
|
-
useRouterLinks: i,
|
|
11
|
-
onResultClick: r
|
|
2
|
+
import { ResponsiveTextV2 as r } from "./sd-component-library150.js";
|
|
3
|
+
const m = ({
|
|
4
|
+
text: e,
|
|
5
|
+
color: t,
|
|
6
|
+
...i
|
|
12
7
|
}) => /* @__PURE__ */ o.jsx(
|
|
13
|
-
|
|
8
|
+
r,
|
|
14
9
|
{
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
borderTopStyle: "none",
|
|
24
|
-
borderColor: "#C8CCE5",
|
|
25
|
-
boxShadow: "2px 3px 10px rgba(211,223,255,0.25)"
|
|
26
|
-
},
|
|
27
|
-
children: t.map((e, p) => /* @__PURE__ */ o.jsxs(d.Fragment, { children: [
|
|
28
|
-
i ? /* @__PURE__ */ o.jsx(m, { to: e.url, style: { textDecoration: "none" }, children: /* @__PURE__ */ o.jsx(x, { ...e, onResultClick: r }) }) : /* @__PURE__ */ o.jsx(
|
|
29
|
-
x,
|
|
30
|
-
{
|
|
31
|
-
...e,
|
|
32
|
-
onResultClick: r,
|
|
33
|
-
onClick: () => window.location.href = `https://www.selfdecode.com${e.url}`
|
|
34
|
-
}
|
|
35
|
-
),
|
|
36
|
-
p + 1 !== t.length && /* @__PURE__ */ o.jsx(c, { color: "cl_lightGrey" })
|
|
37
|
-
] }, `${p}-${e.url}`))
|
|
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
|
|
38
18
|
}
|
|
39
|
-
)
|
|
40
|
-
onResultClick: t,
|
|
41
|
-
onClick: i,
|
|
42
|
-
...r
|
|
43
|
-
}) => {
|
|
44
|
-
const e = () => {
|
|
45
|
-
t == null || t(r), i == null || i();
|
|
46
|
-
};
|
|
47
|
-
return /* @__PURE__ */ o.jsxs(
|
|
48
|
-
f,
|
|
49
|
-
{
|
|
50
|
-
flexDirection: ["column-reverse", "row"],
|
|
51
|
-
justifyContent: "space-between",
|
|
52
|
-
sx: {
|
|
53
|
-
p: "10px 16px",
|
|
54
|
-
cursor: "pointer",
|
|
55
|
-
":hover": { bg: "#eff4ff" }
|
|
56
|
-
},
|
|
57
|
-
onClick: e,
|
|
58
|
-
children: [
|
|
59
|
-
/* @__PURE__ */ o.jsx(h, { fontSize: 16, children: r.text }),
|
|
60
|
-
!!r.type && /* @__PURE__ */ o.jsx(n, { width: "max-content", mb: ["8px", "0"], children: /* @__PURE__ */ o.jsx(s, { children: r.type }) })
|
|
61
|
-
]
|
|
62
|
-
}
|
|
63
|
-
);
|
|
64
|
-
};
|
|
19
|
+
);
|
|
65
20
|
export {
|
|
66
|
-
|
|
21
|
+
m as LinearGaugeLabel
|
|
67
22
|
};
|
|
68
23
|
//# sourceMappingURL=sd-component-library248.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sd-component-library248.js","sources":["../src/components/
|
|
1
|
+
{"version":3,"file":"sd-component-library248.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,6 +1,78 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
1
|
+
import { j as n } from "./sd-component-library197.js";
|
|
2
|
+
import { useHover as Z } from "./sd-component-library3.js";
|
|
3
|
+
import { getCoordinateForArc as l } from "./sd-component-library91.js";
|
|
4
|
+
import { getSegmentCoordinates as O } from "./sd-component-library244.js";
|
|
5
|
+
import { SegmentLabel as q } from "./sd-component-library318.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
|
|
32
|
+
);
|
|
33
|
+
return /* @__PURE__ */ n.jsxs("g", { ...a ? {} : w, children: [
|
|
34
|
+
/* @__PURE__ */ n.jsx(
|
|
35
|
+
"path",
|
|
36
|
+
{
|
|
37
|
+
d: `M${r},${r} L${y},${C} A${s},${s} 0 ${e > 180 ? "1" : "0"},1 ${E},${R}Z`,
|
|
38
|
+
fill: "transparent"
|
|
39
|
+
}
|
|
40
|
+
),
|
|
41
|
+
/* @__PURE__ */ n.jsx(
|
|
42
|
+
"path",
|
|
43
|
+
{
|
|
44
|
+
d: `M${r},${r} L${g},${S} A${t},${t} 0 ${e > 180 ? "1" : "0"},1 ${Y},${v}Z`,
|
|
45
|
+
fill: u,
|
|
46
|
+
strokeWidth: f,
|
|
47
|
+
stroke: "white"
|
|
48
|
+
}
|
|
49
|
+
),
|
|
50
|
+
/* @__PURE__ */ n.jsx(
|
|
51
|
+
"path",
|
|
52
|
+
{
|
|
53
|
+
d: `M${r},${r} L${k},${A} A${d},${d} 0 ${e > 180 ? "1" : "0"},1 ${M},${X}Z`,
|
|
54
|
+
fill: "white",
|
|
55
|
+
style: {
|
|
56
|
+
transform: `scale(${m ? 0.8 : 1}`,
|
|
57
|
+
transformOrigin: "center",
|
|
58
|
+
transition: `all ${h}ms`
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
),
|
|
62
|
+
/* @__PURE__ */ n.jsx(
|
|
63
|
+
q,
|
|
64
|
+
{
|
|
65
|
+
segment: o,
|
|
66
|
+
radius: t,
|
|
67
|
+
animationDuration: h,
|
|
68
|
+
isHover: m,
|
|
69
|
+
mobile: a,
|
|
70
|
+
...c
|
|
71
|
+
}
|
|
72
|
+
)
|
|
73
|
+
] });
|
|
74
|
+
};
|
|
3
75
|
export {
|
|
4
|
-
|
|
76
|
+
G as Segment
|
|
5
77
|
};
|
|
6
78
|
//# sourceMappingURL=sd-component-library249.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sd-component-library249.js","sources":["../src/components/
|
|
1
|
+
{"version":3,"file":"sd-component-library249.js","sources":["../src/components/meters/donut-diagram/partials/segment/segment.tsx"],"sourcesContent":["import React from \"react\";\n\nimport { useHover } from \"../../../../../core/custom-hooks\";\nimport { getCoordinateForArc } from \"../../../outline-meter/utils\";\nimport { getSegmentCoordinates } from \"../../utils\";\nimport { SegmentLabel } from \"../segment-label\";\nimport { SegmentProps as Props } from \"./interfaces\";\n\nconst animationDuration = 300;\n\nexport const Segment: React.FC<Props> = ({\n segment,\n segmentWidth,\n outlineWidth,\n size: diameter,\n mobile,\n ...labelProps\n}) => {\n const { start, end, color } = segment;\n const { labelOffset } = labelProps;\n\n const radius = diameter / 2;\n const innerRadius = radius - segmentWidth;\n\n const {\n startInnerX,\n startInnerY,\n endInnerX,\n endInnerY,\n endX,\n endY,\n startY,\n startX,\n arc,\n } = getSegmentCoordinates(segment, radius, segmentWidth);\n\n const center = diameter / 2;\n\n const startAlpha = Math.round(start * 360);\n const endAlpha = Math.round(end * 360);\n\n const { isHover, hoverCallbacks } = useHover();\n const showHover = isHover && !mobile;\n\n const maxRadius = Math.sqrt(2) * (radius + labelOffset);\n\n const { x: maskStartX, y: maskStartY } = getCoordinateForArc(\n maxRadius,\n startAlpha,\n radius\n );\n\n const { x: maskEndX, y: maskEndY } = getCoordinateForArc(\n maxRadius,\n endAlpha,\n radius\n );\n\n return (\n <g {...(mobile ? {} : hoverCallbacks)}>\n {/* mask */}\n <path\n d={`M${center},${center} L${maskStartX},${maskStartY} A${maxRadius},${maxRadius} 0 ${\n arc > 180 ? \"1\" : \"0\"\n },1 ${maskEndX},${maskEndY}Z`}\n fill=\"transparent\"\n />\n\n {/* colored sector */}\n <path\n d={`M${center},${center} L${startX},${startY} A${radius},${radius} 0 ${\n arc > 180 ? \"1\" : \"0\"\n },1 ${endX},${endY}Z`}\n fill={color}\n strokeWidth={outlineWidth}\n stroke=\"white\"\n />\n\n {/* white inner sector */}\n <path\n d={`M${center},${center} L${startInnerX},${startInnerY} A${innerRadius},${innerRadius} 0 ${\n arc > 180 ? \"1\" : \"0\"\n },1 ${endInnerX},${endInnerY}Z`}\n fill=\"white\"\n style={{\n transform: `scale(${showHover ? 0.8 : 1}`,\n transformOrigin: \"center\",\n transition: `all ${animationDuration}ms`,\n }}\n />\n\n <SegmentLabel\n segment={segment}\n radius={radius}\n animationDuration={animationDuration}\n isHover={showHover}\n mobile={mobile}\n {...labelProps}\n />\n </g>\n );\n};\n"],"names":["animationDuration","Segment","segment","segmentWidth","outlineWidth","diameter","mobile","labelProps","start","end","color","labelOffset","radius","innerRadius","startInnerX","startInnerY","endInnerX","endInnerY","endX","endY","startY","startX","arc","getSegmentCoordinates","center","startAlpha","endAlpha","isHover","hoverCallbacks","useHover","showHover","maxRadius","maskStartX","maskStartY","getCoordinateForArc","maskEndX","maskEndY","jsx","SegmentLabel"],"mappings":";;;;;AAQA,MAAMA,IAAoB,KAEbC,IAA2B,CAAC;AAAA,EACvC,SAAAC;AAAA,EACA,cAAAC;AAAA,EACA,cAAAC;AAAA,EACA,MAAMC;AAAA,EACN,QAAAC;AAAA,EACA,GAAGC;AACL,MAAM;AACJ,QAAM,EAAE,OAAAC,GAAO,KAAAC,GAAK,OAAAC,EAAA,IAAUR,GACxB,EAAE,aAAAS,EAAgB,IAAAJ,GAElBK,IAASP,IAAW,GACpBQ,IAAcD,IAAST,GAEvB;AAAA,IACJ,aAAAW;AAAA,IACA,aAAAC;AAAA,IACA,WAAAC;AAAA,IACA,WAAAC;AAAA,IACA,MAAAC;AAAA,IACA,MAAAC;AAAA,IACA,QAAAC;AAAA,IACA,QAAAC;AAAA,IACA,KAAAC;AAAA,EACE,IAAAC,EAAsBrB,GAASU,GAAQT,CAAY,GAEjDqB,IAASnB,IAAW,GAEpBoB,IAAa,KAAK,MAAMjB,IAAQ,GAAG,GACnCkB,IAAW,KAAK,MAAMjB,IAAM,GAAG,GAE/B,EAAE,SAAAkB,GAAS,gBAAAC,EAAe,IAAIC,EAAS,GACvCC,IAAYH,KAAW,CAACrB,GAExByB,IAAY,KAAK,KAAK,CAAC,KAAKnB,IAASD,IAErC,EAAE,GAAGqB,GAAY,GAAGC,EAAe,IAAAC;AAAA,IACvCH;AAAA,IACAN;AAAA,IACAb;AAAA,EAAA,GAGI,EAAE,GAAGuB,GAAU,GAAGC,EAAa,IAAAF;AAAA,IACnCH;AAAA,IACAL;AAAA,IACAd;AAAA,EAAA;AAGF,gCACG,KAAG,EAAA,GAAIN,IAAS,KAAKsB,GAEpB,UAAA;AAAA,IAAAS,gBAAAA,EAAA;AAAA,MAAC;AAAA,MAAA;AAAA,QACC,GAAG,IAAIb,CAAM,IAAIA,CAAM,KAAKQ,CAAU,IAAIC,CAAU,KAAKF,CAAS,IAAIA,CAAS,MAC7ET,IAAM,MAAM,MAAM,GACpB,MAAMa,CAAQ,IAAIC,CAAQ;AAAA,QAC1B,MAAK;AAAA,MAAA;AAAA,IACP;AAAA,IAGAC,gBAAAA,EAAA;AAAA,MAAC;AAAA,MAAA;AAAA,QACC,GAAG,IAAIb,CAAM,IAAIA,CAAM,KAAKH,CAAM,IAAID,CAAM,KAAKR,CAAM,IAAIA,CAAM,MAC/DU,IAAM,MAAM,MAAM,GACpB,MAAMJ,CAAI,IAAIC,CAAI;AAAA,QAClB,MAAMT;AAAA,QACN,aAAaN;AAAA,QACb,QAAO;AAAA,MAAA;AAAA,IACT;AAAA,IAGAiC,gBAAAA,EAAA;AAAA,MAAC;AAAA,MAAA;AAAA,QACC,GAAG,IAAIb,CAAM,IAAIA,CAAM,KAAKV,CAAW,IAAIC,CAAW,KAAKF,CAAW,IAAIA,CAAW,MACnFS,IAAM,MAAM,MAAM,GACpB,MAAMN,CAAS,IAAIC,CAAS;AAAA,QAC5B,MAAK;AAAA,QACL,OAAO;AAAA,UACL,WAAW,SAASa,IAAY,MAAM,CAAC;AAAA,UACvC,iBAAiB;AAAA,UACjB,YAAY,OAAO9B,CAAiB;AAAA,QACtC;AAAA,MAAA;AAAA,IACF;AAAA,IAEAqC,gBAAAA,EAAA;AAAA,MAACC;AAAA,MAAA;AAAA,QACC,SAAApC;AAAA,QACA,QAAAU;AAAA,QACA,mBAAAZ;AAAA,QACA,SAAS8B;AAAA,QACT,QAAAxB;AAAA,QACC,GAAGC;AAAA,MAAA;AAAA,IACN;AAAA,EACF,EAAA,CAAA;AAEJ;"}
|
|
@@ -1,49 +1,5 @@
|
|
|
1
|
-
|
|
2
|
-
import { Flex as c } from "rebass";
|
|
3
|
-
import { BaseTextV2 as m } from "./sd-component-library138.js";
|
|
4
|
-
import { ResponsiveTextV2 as p } from "./sd-component-library150.js";
|
|
5
|
-
const u = (t) => {
|
|
6
|
-
const {
|
|
7
|
-
label: o,
|
|
8
|
-
errorMessage: l,
|
|
9
|
-
labelMargin: s,
|
|
10
|
-
secondLabel: e,
|
|
11
|
-
secondLabelTextTransform: n,
|
|
12
|
-
labelSx: a,
|
|
13
|
-
labelColor: i = "cl_darkGrey",
|
|
14
|
-
...x
|
|
15
|
-
} = t;
|
|
16
|
-
return o ? /* @__PURE__ */ r.jsxs(c, { sx: { cursor: "default" }, ...x, children: [
|
|
17
|
-
/* @__PURE__ */ r.jsx(
|
|
18
|
-
m,
|
|
19
|
-
{
|
|
20
|
-
color: l ? "cl_red" : i,
|
|
21
|
-
sx: {
|
|
22
|
-
fontSize: 12,
|
|
23
|
-
fontWeight: 600,
|
|
24
|
-
m: s,
|
|
25
|
-
letterSpacing: "1px",
|
|
26
|
-
textTransform: "uppercase",
|
|
27
|
-
...a
|
|
28
|
-
},
|
|
29
|
-
children: o
|
|
30
|
-
}
|
|
31
|
-
),
|
|
32
|
-
e && /* @__PURE__ */ r.jsx(
|
|
33
|
-
p,
|
|
34
|
-
{
|
|
35
|
-
letterSpacing: "1px",
|
|
36
|
-
ml: e.ml || "3px",
|
|
37
|
-
color: e.color || "cl_grey",
|
|
38
|
-
fontSizeWeight: e.fontSizeWeight || [[10, "semi-bold"]],
|
|
39
|
-
textTransform: n,
|
|
40
|
-
...e,
|
|
41
|
-
children: e.text
|
|
42
|
-
}
|
|
43
|
-
)
|
|
44
|
-
] }) : null;
|
|
45
|
-
};
|
|
1
|
+
const i = ({ start: g, end: t }, c) => c >= g && (t === 1 ? c <= t : c < t);
|
|
46
2
|
export {
|
|
47
|
-
|
|
3
|
+
i as isMatchingRange
|
|
48
4
|
};
|
|
49
5
|
//# sourceMappingURL=sd-component-library250.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sd-component-library250.js","sources":["../src/components/
|
|
1
|
+
{"version":3,"file":"sd-component-library250.js","sources":["../src/components/meters/linear-numeric-gauge-meter/utils.ts"],"sourcesContent":["import { LinearNumericGaugeMeterSegment } from \"./interfaces\";\n\nexport const isMatchingRange = (\n { start, end }: Pick<LinearNumericGaugeMeterSegment, \"start\" | \"end\">,\n value: number\n) => value >= start && (end === 1 ? value <= end : value < end);\n"],"names":["isMatchingRange","start","end","value"],"mappings":"AAEO,MAAMA,IAAkB,CAC7B,EAAE,OAAAC,GAAO,KAAAC,EAAI,GACbC,MACGA,KAASF,MAAUC,MAAQ,IAAIC,KAASD,IAAMC,IAAQD;"}
|