@selfdecode/sd-component-library 4.0.89 → 4.0.91
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/containers/flex-containers/flex-containers.d.ts +6 -6
- package/lib/components/containers/grid-containers/grid-align-content-start/grid-align-content-start.d.ts +1 -1
- package/lib/components/containers/grid-containers/grid-center/grid-center.d.ts +1 -1
- package/lib/components/containers/grid-containers/grid-container-v2/grid-container-v2.d.ts +1 -1
- package/lib/components/texts/mixed-texts.d.ts +2 -2
- package/lib/components/texts/responsive-texts.d.ts +6 -6
- package/lib/components/texts/transformed-texts.d.ts +3 -3
- package/lib/components/texts/weighted-texts.d.ts +3 -3
- package/lib/core/theme.d.ts +19 -0
- package/lib/sd-component-library100.js +2 -2
- package/lib/sd-component-library101.js +3 -3
- package/lib/sd-component-library104.js +2 -2
- package/lib/sd-component-library112.js +1 -1
- package/lib/sd-component-library117.js +1 -1
- package/lib/sd-component-library118.js +2 -2
- package/lib/sd-component-library120.js +1 -1
- package/lib/sd-component-library121.js +1 -1
- package/lib/sd-component-library126.js +2 -2
- package/lib/sd-component-library127.js +2 -2
- package/lib/sd-component-library129.js +1 -1
- package/lib/sd-component-library132.js +3 -3
- package/lib/sd-component-library133.js +1 -1
- package/lib/sd-component-library135.js +2 -2
- package/lib/sd-component-library15.js +1 -1
- package/lib/sd-component-library166.js +1 -1
- package/lib/sd-component-library194.js +19 -0
- package/lib/sd-component-library194.js.map +1 -1
- package/lib/sd-component-library195.js +3 -3
- package/lib/sd-component-library199.js +57 -2
- package/lib/sd-component-library199.js.map +1 -1
- package/lib/sd-component-library200.js +65 -30
- package/lib/sd-component-library200.js.map +1 -1
- package/lib/sd-component-library201.js +2 -599
- package/lib/sd-component-library201.js.map +1 -1
- package/lib/sd-component-library202.js +30 -3
- package/lib/sd-component-library202.js.map +1 -1
- package/lib/sd-component-library203.js +598 -24
- package/lib/sd-component-library203.js.map +1 -1
- package/lib/sd-component-library204.js +20 -56
- package/lib/sd-component-library204.js.map +1 -1
- package/lib/sd-component-library205.js +3 -19
- package/lib/sd-component-library205.js.map +1 -1
- package/lib/sd-component-library206.js +3 -5
- package/lib/sd-component-library206.js.map +1 -1
- package/lib/sd-component-library207.js +3 -5
- package/lib/sd-component-library207.js.map +1 -1
- package/lib/sd-component-library208.js +51 -52
- package/lib/sd-component-library208.js.map +1 -1
- package/lib/sd-component-library209.js +23 -18
- package/lib/sd-component-library209.js.map +1 -1
- package/lib/sd-component-library210.js +31 -55
- package/lib/sd-component-library210.js.map +1 -1
- package/lib/sd-component-library211.js +127 -21
- package/lib/sd-component-library211.js.map +1 -1
- package/lib/sd-component-library212.js +13 -40
- package/lib/sd-component-library212.js.map +1 -1
- package/lib/sd-component-library213.js +3 -21
- package/lib/sd-component-library213.js.map +1 -1
- package/lib/sd-component-library214.js +52 -3
- package/lib/sd-component-library214.js.map +1 -1
- package/lib/sd-component-library215.js +65 -3
- package/lib/sd-component-library215.js.map +1 -1
- package/lib/sd-component-library216.js +3 -129
- package/lib/sd-component-library216.js.map +1 -1
- package/lib/sd-component-library217.js +46 -13
- package/lib/sd-component-library217.js.map +1 -1
- package/lib/sd-component-library221.js +17 -3
- package/lib/sd-component-library221.js.map +1 -1
- package/lib/sd-component-library222.js +19 -45
- package/lib/sd-component-library222.js.map +1 -1
- package/lib/sd-component-library223.js +3 -65
- package/lib/sd-component-library223.js.map +1 -1
- package/lib/sd-component-library224.js +31 -3
- package/lib/sd-component-library224.js.map +1 -1
- package/lib/sd-component-library225.js +19 -46
- package/lib/sd-component-library225.js.map +1 -1
- package/lib/sd-component-library226.js +20 -17
- package/lib/sd-component-library226.js.map +1 -1
- package/lib/sd-component-library227.js +28 -26
- package/lib/sd-component-library227.js.map +1 -1
- package/lib/sd-component-library228.js +33 -3
- package/lib/sd-component-library228.js.map +1 -1
- package/lib/sd-component-library229.js +3 -31
- package/lib/sd-component-library229.js.map +1 -1
- package/lib/sd-component-library23.js +2 -2
- package/lib/sd-component-library230.js +129 -19
- package/lib/sd-component-library230.js.map +1 -1
- package/lib/sd-component-library231.js +42 -19
- package/lib/sd-component-library231.js.map +1 -1
- package/lib/sd-component-library232.js +47 -28
- package/lib/sd-component-library232.js.map +1 -1
- package/lib/sd-component-library233.js +7 -32
- package/lib/sd-component-library233.js.map +1 -1
- package/lib/sd-component-library234.js +64 -129
- package/lib/sd-component-library234.js.map +1 -1
- package/lib/sd-component-library235.js +41 -41
- package/lib/sd-component-library235.js.map +1 -1
- package/lib/sd-component-library236.js +12 -46
- package/lib/sd-component-library236.js.map +1 -1
- package/lib/sd-component-library237.js +21 -8
- package/lib/sd-component-library237.js.map +1 -1
- package/lib/sd-component-library238.js +109 -3
- package/lib/sd-component-library238.js.map +1 -1
- package/lib/sd-component-library239.js +47 -21
- package/lib/sd-component-library239.js.map +1 -1
- package/lib/sd-component-library24.js +2 -2
- package/lib/sd-component-library240.js +23 -108
- package/lib/sd-component-library240.js.map +1 -1
- package/lib/sd-component-library241.js +49 -43
- package/lib/sd-component-library241.js.map +1 -1
- package/lib/sd-component-library242.js +46 -22
- package/lib/sd-component-library242.js.map +1 -1
- package/lib/sd-component-library243.js +73 -51
- package/lib/sd-component-library243.js.map +1 -1
- package/lib/sd-component-library244.js +39 -46
- package/lib/sd-component-library244.js.map +1 -1
- package/lib/sd-component-library245.js +26 -74
- package/lib/sd-component-library245.js.map +1 -1
- package/lib/sd-component-library246.js +20 -63
- package/lib/sd-component-library246.js.map +1 -1
- package/lib/sd-component-library247.js +20 -43
- package/lib/sd-component-library247.js.map +1 -1
- package/lib/sd-component-library248.js +2 -13
- package/lib/sd-component-library248.js.map +1 -1
- package/lib/sd-component-library249.js +24 -40
- package/lib/sd-component-library249.js.map +1 -1
- package/lib/sd-component-library25.js +1 -1
- package/lib/sd-component-library250.js +19 -27
- package/lib/sd-component-library250.js.map +1 -1
- package/lib/sd-component-library251.js +5 -21
- package/lib/sd-component-library251.js.map +1 -1
- package/lib/sd-component-library252.js +5 -20
- package/lib/sd-component-library252.js.map +1 -1
- package/lib/sd-component-library253.js +18 -2
- package/lib/sd-component-library253.js.map +1 -1
- package/lib/sd-component-library260.js +30 -29
- package/lib/sd-component-library260.js.map +1 -1
- package/lib/sd-component-library261.js +45 -18
- package/lib/sd-component-library261.js.map +1 -1
- package/lib/sd-component-library262.js +131 -30
- package/lib/sd-component-library262.js.map +1 -1
- package/lib/sd-component-library263.js +68 -15
- package/lib/sd-component-library263.js.map +1 -1
- package/lib/sd-component-library264.js +66 -115
- package/lib/sd-component-library264.js.map +1 -1
- package/lib/sd-component-library265.js +25 -118
- package/lib/sd-component-library265.js.map +1 -1
- package/lib/sd-component-library266.js +23 -9
- package/lib/sd-component-library266.js.map +1 -1
- package/lib/sd-component-library267.js +30 -50
- package/lib/sd-component-library267.js.map +1 -1
- package/lib/sd-component-library268.js +20 -29
- package/lib/sd-component-library268.js.map +1 -1
- package/lib/sd-component-library269.js +118 -44
- package/lib/sd-component-library269.js.map +1 -1
- package/lib/sd-component-library270.js +104 -113
- package/lib/sd-component-library270.js.map +1 -1
- package/lib/sd-component-library271.js +9 -73
- package/lib/sd-component-library271.js.map +1 -1
- package/lib/sd-component-library272.js +42 -68
- package/lib/sd-component-library272.js.map +1 -1
- package/lib/sd-component-library289.js +4 -4
- package/lib/sd-component-library290.js +3 -2
- package/lib/sd-component-library290.js.map +1 -1
- package/lib/sd-component-library291.js +3 -8
- package/lib/sd-component-library291.js.map +1 -1
- package/lib/sd-component-library292.js +3 -328
- package/lib/sd-component-library292.js.map +1 -1
- package/lib/sd-component-library293.js +2 -51
- package/lib/sd-component-library293.js.map +1 -1
- package/lib/sd-component-library294.js +8 -2
- package/lib/sd-component-library294.js.map +1 -1
- package/lib/sd-component-library295.js +324 -73
- package/lib/sd-component-library295.js.map +1 -1
- package/lib/sd-component-library296.js +48 -90
- package/lib/sd-component-library296.js.map +1 -1
- package/lib/sd-component-library297.js +2 -53
- package/lib/sd-component-library297.js.map +1 -1
- package/lib/sd-component-library298.js +76 -8
- package/lib/sd-component-library298.js.map +1 -1
- package/lib/sd-component-library299.js +92 -4
- package/lib/sd-component-library299.js.map +1 -1
- package/lib/sd-component-library300.js +48 -48
- package/lib/sd-component-library300.js.map +1 -1
- package/lib/sd-component-library301.js +9 -3
- package/lib/sd-component-library301.js.map +1 -1
- package/lib/sd-component-library302.js +5 -3
- package/lib/sd-component-library302.js.map +1 -1
- package/lib/sd-component-library303.js +53 -3
- package/lib/sd-component-library303.js.map +1 -1
- package/lib/sd-component-library314.js +50 -34
- package/lib/sd-component-library314.js.map +1 -1
- package/lib/sd-component-library315.js +88 -20
- package/lib/sd-component-library315.js.map +1 -1
- package/lib/sd-component-library316.js +33 -91
- package/lib/sd-component-library316.js.map +1 -1
- package/lib/sd-component-library317.js +25 -51
- package/lib/sd-component-library317.js.map +1 -1
- package/lib/sd-component-library32.js +1 -1
- package/lib/sd-component-library33.js +1 -1
- package/lib/sd-component-library49.js +1 -1
- package/lib/sd-component-library5.js +1 -1
- package/lib/sd-component-library50.js +1 -1
- package/lib/sd-component-library52.js +3 -3
- package/lib/sd-component-library53.js +2 -2
- package/lib/sd-component-library54.js +2 -2
- package/lib/sd-component-library55.js +72 -65
- package/lib/sd-component-library55.js.map +1 -1
- package/lib/sd-component-library57.js +26 -25
- package/lib/sd-component-library57.js.map +1 -1
- package/lib/sd-component-library58.js +18 -17
- package/lib/sd-component-library58.js.map +1 -1
- package/lib/sd-component-library6.js +1 -1
- package/lib/sd-component-library60.js +1 -1
- package/lib/sd-component-library64.js +1 -1
- package/lib/sd-component-library65.js +1 -1
- package/lib/sd-component-library70.js +2 -2
- package/lib/sd-component-library74.js +2 -2
- package/lib/sd-component-library75.js +3 -3
- package/lib/sd-component-library76.js +1 -1
- package/lib/sd-component-library77.js +1 -1
- package/lib/sd-component-library79.js +1 -1
- package/lib/sd-component-library80.js +1 -1
- package/lib/sd-component-library85.js +1 -1
- package/lib/sd-component-library86.js +6 -6
- package/lib/sd-component-library87.js +2 -2
- package/lib/sd-component-library88.js +1 -1
- package/lib/sd-component-library89.js +5 -5
- package/lib/sd-component-library90.js +1 -1
- package/lib/sd-component-library92.js +6 -6
- package/lib/sd-component-library93.js +1 -1
- package/lib/sd-component-library94.js +7 -7
- package/lib/sd-component-library95.js +1 -1
- package/lib/sd-component-library98.js +2 -2
- package/lib/sd-component-library99.js +3 -3
- package/package.json +1 -1
|
@@ -1,20 +1,23 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
const
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
);
|
|
1
|
+
import { isCorrectOutlineMeterConfig as l } from "./sd-component-library91.js";
|
|
2
|
+
var a = /* @__PURE__ */ ((r) => (r.GREEN = "#00B466", r.ORANGE = "#FF9900", r.RED = "#FF0000", r))(a || {});
|
|
3
|
+
const u = (r) => !r.some(
|
|
4
|
+
({ color: t }) => !Object.values(a).includes(t)
|
|
5
|
+
), f = (r, t) => l(r, t) && u(t), A = (r, t, n, i, o, d) => {
|
|
6
|
+
const c = r - (t - 1) * n, e = (360 - r) / 2 + n * i + c * o, s = e + c * (d - o), g = (e + s) / 2;
|
|
7
|
+
return {
|
|
8
|
+
rangeArcStart: e,
|
|
9
|
+
rangeArcEnd: s,
|
|
10
|
+
rangeArcMiddle: g
|
|
11
|
+
};
|
|
12
|
+
}, R = (r) => {
|
|
13
|
+
const { start: t, end: n } = r;
|
|
14
|
+
return t === 0 ? n < 0.6 : n === 1 ? t > 0.4 : !1;
|
|
15
|
+
};
|
|
17
16
|
export {
|
|
18
|
-
|
|
17
|
+
a as SmileyGaugeColor,
|
|
18
|
+
u as areColorsValid,
|
|
19
|
+
R as getIsHorizontal,
|
|
20
|
+
A as getRangeProperties,
|
|
21
|
+
f as isCorrectSmileyMeterConfig
|
|
19
22
|
};
|
|
20
23
|
//# sourceMappingURL=sd-component-library226.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sd-component-library226.js","sources":["../src/components/
|
|
1
|
+
{"version":3,"file":"sd-component-library226.js","sources":["../src/components/meters/smiley-meter-v2/utils.ts"],"sourcesContent":["import { OutlineMeterRangeConfig } from \"../outline-meter\";\nimport { isCorrectOutlineMeterConfig } from \"../outline-meter/utils\";\nimport { SmileyMeterRange } from \"./interfaces\";\n\nexport enum SmileyGaugeColor {\n GREEN = \"#00B466\",\n ORANGE = \"#FF9900\",\n RED = \"#FF0000\",\n}\n\nexport const areColorsValid = (ranges: OutlineMeterRangeConfig[]) =>\n !ranges.some(\n ({ color }) => !Object.values(SmileyGaugeColor).includes(color as any)\n );\n\nexport const isCorrectSmileyMeterConfig = (\n value: number,\n ranges: OutlineMeterRangeConfig[]\n): ranges is SmileyMeterRange[] => {\n return isCorrectOutlineMeterConfig(value, ranges) && areColorsValid(ranges);\n};\n\nexport const getRangeProperties = (\n arc: number,\n totalRanges: number,\n distanceBetweenRanges: number,\n idx: number,\n start: number,\n end: number\n) => {\n const arcForRanges = arc - (totalRanges - 1) * distanceBetweenRanges;\n const arcStart = (360 - arc) / 2; // deg\n const rangeArcStart =\n arcStart + distanceBetweenRanges * idx + arcForRanges * start;\n const rangeArcEnd = rangeArcStart + arcForRanges * (end - start);\n\n const rangeArcMiddle = (rangeArcStart + rangeArcEnd) / 2;\n return {\n rangeArcStart,\n rangeArcEnd,\n rangeArcMiddle,\n };\n};\n\nexport const getIsHorizontal = (range: SmileyMeterRange) => {\n const { start, end } = range;\n return start === 0 ? end < 0.6 : end === 1 ? start > 0.4 : false;\n};\n"],"names":["SmileyGaugeColor","areColorsValid","ranges","color","isCorrectSmileyMeterConfig","value","isCorrectOutlineMeterConfig","getRangeProperties","arc","totalRanges","distanceBetweenRanges","idx","start","end","arcForRanges","rangeArcStart","rangeArcEnd","rangeArcMiddle","getIsHorizontal","range"],"mappings":";AAIY,IAAAA,sBAAAA,OACVA,EAAA,QAAQ,WACRA,EAAA,SAAS,WACTA,EAAA,MAAM,WAHIA,IAAAA,KAAA,CAAA,CAAA;AAML,MAAMC,IAAiB,CAACC,MAC7B,CAACA,EAAO;AAAA,EACN,CAAC,EAAE,OAAAC,EAAY,MAAA,CAAC,OAAO,OAAOH,CAAgB,EAAE,SAASG,CAAY;AACvE,GAEWC,IAA6B,CACxCC,GACAH,MAEOI,EAA4BD,GAAOH,CAAM,KAAKD,EAAeC,CAAM,GAG/DK,IAAqB,CAChCC,GACAC,GACAC,GACAC,GACAC,GACAC,MACG;AACG,QAAAC,IAAeN,KAAOC,IAAc,KAAKC,GAEzCK,KADY,MAAMP,KAAO,IAElBE,IAAwBC,IAAMG,IAAeF,GACpDI,IAAcD,IAAgBD,KAAgBD,IAAMD,IAEpDK,KAAkBF,IAAgBC,KAAe;AAChD,SAAA;AAAA,IACL,eAAAD;AAAA,IACA,aAAAC;AAAA,IACA,gBAAAC;AAAA,EAAA;AAEJ,GAEaC,IAAkB,CAACC,MAA4B;AACpD,QAAA,EAAE,OAAAP,GAAO,KAAAC,EAAQ,IAAAM;AACvB,SAAOP,MAAU,IAAIC,IAAM,MAAMA,MAAQ,IAAID,IAAQ,MAAM;AAC7D;"}
|
|
@@ -1,29 +1,31 @@
|
|
|
1
|
-
import { j as
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
{
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
};
|
|
1
|
+
import { j as a } from "./sd-component-library195.js";
|
|
2
|
+
import R, { createElement as g } from "react";
|
|
3
|
+
import { isValueInRange as f } from "./sd-component-library91.js";
|
|
4
|
+
import { SmileyMeterRange as d } from "./sd-component-library314.js";
|
|
5
|
+
const j = R.forwardRef(
|
|
6
|
+
(r, m) => {
|
|
7
|
+
const { value: s, ranges: n, distanceFromRanges: c } = r, o = n.findIndex(
|
|
8
|
+
({ start: e, end: t, bounds: l }) => f(s, e, t, l)
|
|
9
|
+
), i = n.map((e, t) => ({
|
|
10
|
+
...e,
|
|
11
|
+
color: t < o ? n[o].color : e.color
|
|
12
|
+
}));
|
|
13
|
+
return /* @__PURE__ */ a.jsx(a.Fragment, { children: i.map((e, t) => /* @__PURE__ */ g(
|
|
14
|
+
d,
|
|
15
|
+
{
|
|
16
|
+
...e,
|
|
17
|
+
...r,
|
|
18
|
+
idx: t,
|
|
19
|
+
totalRanges: n.length,
|
|
20
|
+
pointerLength: c,
|
|
21
|
+
key: `${e.start}-${e.end}-${t}`,
|
|
22
|
+
isMatchedRange: o === t,
|
|
23
|
+
ref: m
|
|
24
|
+
}
|
|
25
|
+
)) });
|
|
26
|
+
}
|
|
27
|
+
);
|
|
26
28
|
export {
|
|
27
|
-
|
|
29
|
+
j as SmileyMeterRanges
|
|
28
30
|
};
|
|
29
31
|
//# sourceMappingURL=sd-component-library227.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sd-component-library227.js","sources":["../src/components/
|
|
1
|
+
{"version":3,"file":"sd-component-library227.js","sources":["../src/components/meters/smiley-meter-v2/partials/smiley-meter-ranges/smiley-meter-ranges.tsx"],"sourcesContent":["import React from \"react\";\n\nimport { isValueInRange } from \"../../../outline-meter/utils\";\nimport { SmileyMeterRange } from \"../smiley-meter-range\";\nimport { SmileyMeterRangesProps as Props } from \"./interfaces\";\n\nexport const SmileyMeterRanges = React.forwardRef<SVGCircleElement, Props>(\n (props, pointRef) => {\n const { value, ranges, distanceFromRanges } = props;\n\n const matchingRangeIndex = ranges.findIndex(({ start, end, bounds }) =>\n isValueInRange(value, start, end, bounds)\n );\n const newRanges = ranges.map((range, idx) => ({\n ...range,\n color:\n idx < matchingRangeIndex\n ? ranges[matchingRangeIndex].color\n : range.color,\n }));\n\n return (\n <>\n {newRanges.map((range, idx) => (\n <SmileyMeterRange\n {...range}\n {...props}\n idx={idx}\n totalRanges={ranges.length}\n pointerLength={distanceFromRanges}\n key={`${range.start}-${range.end}-${idx}`}\n isMatchedRange={matchingRangeIndex === idx}\n ref={pointRef}\n />\n ))}\n </>\n );\n }\n);\n"],"names":["SmileyMeterRanges","React","props","pointRef","value","ranges","distanceFromRanges","matchingRangeIndex","start","end","bounds","isValueInRange","newRanges","range","idx","jsx","Fragment","createElement","SmileyMeterRange"],"mappings":";;;;AAMO,MAAMA,IAAoBC,EAAM;AAAA,EACrC,CAACC,GAAOC,MAAa;AACnB,UAAM,EAAE,OAAAC,GAAO,QAAAC,GAAQ,oBAAAC,EAAA,IAAuBJ,GAExCK,IAAqBF,EAAO;AAAA,MAAU,CAAC,EAAE,OAAAG,GAAO,KAAAC,GAAK,QAAAC,QACzDC,EAAeP,GAAOI,GAAOC,GAAKC,CAAM;AAAA,IAAA,GAEpCE,IAAYP,EAAO,IAAI,CAACQ,GAAOC,OAAS;AAAA,MAC5C,GAAGD;AAAA,MACH,OACEC,IAAMP,IACFF,EAAOE,CAAkB,EAAE,QAC3BM,EAAM;AAAA,IACZ,EAAA;AAEF,WAEKE,gBAAAA,EAAA,IAAAC,EAAA,UAAA,EAAA,UAAAJ,EAAU,IAAI,CAACC,GAAOC,MACrB,gBAAAG;AAAA,MAACC;AAAA,MAAA;AAAA,QACE,GAAGL;AAAA,QACH,GAAGX;AAAA,QACJ,KAAAY;AAAA,QACA,aAAaT,EAAO;AAAA,QACpB,eAAeC;AAAA,QACf,KAAK,GAAGO,EAAM,KAAK,IAAIA,EAAM,GAAG,IAAIC,CAAG;AAAA,QACvC,gBAAgBP,MAAuBO;AAAA,QACvC,KAAKX;AAAA,MAAA;AAAA,IAER,CAAA,EACH,CAAA;AAAA,EAEJ;AACF;"}
|
|
@@ -1,6 +1,36 @@
|
|
|
1
|
-
|
|
1
|
+
import { j as h } from "./sd-component-library195.js";
|
|
2
|
+
import { getRangeProperties as p } from "./sd-component-library226.js";
|
|
3
|
+
import { MatchedRangeLabelBox as u } from "./sd-component-library315.js";
|
|
4
|
+
const b = (e) => {
|
|
5
|
+
const {
|
|
6
|
+
range: a,
|
|
7
|
+
arc: n,
|
|
8
|
+
totalRanges: o,
|
|
9
|
+
distanceBetweenRanges: r,
|
|
10
|
+
idx: s,
|
|
11
|
+
diameter: d,
|
|
12
|
+
segmented: c,
|
|
13
|
+
counterClockWise: i
|
|
14
|
+
} = e, { start: g, end: l } = a, m = d / 2, { rangeArcMiddle: x } = p(
|
|
15
|
+
n,
|
|
16
|
+
o,
|
|
17
|
+
r,
|
|
18
|
+
s,
|
|
19
|
+
g,
|
|
20
|
+
l
|
|
21
|
+
), t = Math.round(x);
|
|
22
|
+
return /* @__PURE__ */ h.jsx(
|
|
23
|
+
u,
|
|
24
|
+
{
|
|
25
|
+
...e,
|
|
26
|
+
...a,
|
|
27
|
+
alpha: i ? 360 - t : t,
|
|
28
|
+
radius: m,
|
|
29
|
+
round: c
|
|
30
|
+
}
|
|
31
|
+
);
|
|
32
|
+
};
|
|
2
33
|
export {
|
|
3
|
-
|
|
4
|
-
o as defaultTextBottomMargin
|
|
34
|
+
b as MatchedRangeLabelBox
|
|
5
35
|
};
|
|
6
36
|
//# sourceMappingURL=sd-component-library228.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sd-component-library228.js","sources":["../src/components/meters/
|
|
1
|
+
{"version":3,"file":"sd-component-library228.js","sources":["../src/components/meters/smiley-meter-v2/partials/matched-range-label-box/matched-range-label-box.tsx"],"sourcesContent":["import React from \"react\";\n\nimport { MatchedRangeLabelBox as LabelBox } from \"../../../common-outline-meter-partials\";\nimport { getRangeProperties } from \"../../utils\";\nimport { MatchedRangeBoxProps as Props } from \"./interfaces\";\n\nexport const MatchedRangeLabelBox: React.FC<Props> = (props) => {\n const {\n range,\n arc,\n totalRanges,\n distanceBetweenRanges,\n idx,\n diameter,\n segmented,\n counterClockWise,\n } = props;\n const { start, end } = range;\n\n const radius = diameter / 2;\n const { rangeArcMiddle: alpha } = getRangeProperties(\n arc,\n totalRanges,\n distanceBetweenRanges,\n idx,\n start,\n end\n );\n\n const roundedAlpha = Math.round(alpha);\n\n return (\n <LabelBox\n {...props}\n {...range}\n alpha={counterClockWise ? 360 - roundedAlpha : roundedAlpha}\n radius={radius}\n round={segmented}\n />\n );\n};\n"],"names":["MatchedRangeLabelBox","props","range","arc","totalRanges","distanceBetweenRanges","idx","diameter","segmented","counterClockWise","start","end","radius","alpha","getRangeProperties","roundedAlpha","jsx","LabelBox"],"mappings":";;;AAMa,MAAAA,IAAwC,CAACC,MAAU;AACxD,QAAA;AAAA,IACJ,OAAAC;AAAA,IACA,KAAAC;AAAA,IACA,aAAAC;AAAA,IACA,uBAAAC;AAAA,IACA,KAAAC;AAAA,IACA,UAAAC;AAAA,IACA,WAAAC;AAAA,IACA,kBAAAC;AAAA,EACE,IAAAR,GACE,EAAE,OAAAS,GAAO,KAAAC,EAAQ,IAAAT,GAEjBU,IAASL,IAAW,GACpB,EAAE,gBAAgBM,EAAA,IAAUC;AAAA,IAChCX;AAAA,IACAC;AAAA,IACAC;AAAA,IACAC;AAAA,IACAI;AAAA,IACAC;AAAA,EAAA,GAGII,IAAe,KAAK,MAAMF,CAAK;AAGnC,SAAAG,gBAAAA,EAAA;AAAA,IAACC;AAAAA,IAAA;AAAA,MACE,GAAGhB;AAAA,MACH,GAAGC;AAAA,MACJ,OAAOO,IAAmB,MAAMM,IAAeA;AAAA,MAC/C,QAAAH;AAAA,MACA,OAAOJ;AAAA,IAAA;AAAA,EAAA;AAGb;"}
|
|
@@ -1,34 +1,6 @@
|
|
|
1
|
-
|
|
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" }))));
|
|
2
3
|
export {
|
|
3
|
-
|
|
4
|
-
f as defaultDashHeight,
|
|
5
|
-
h as defaultDashWidth,
|
|
6
|
-
n as defaultDistanceBetweenRanges,
|
|
7
|
-
M as defaultDistanceFromLabelToRanges,
|
|
8
|
-
d as defaultDistanceFromRangesToNeedle,
|
|
9
|
-
m as defaultDistanceFromRangesToScale,
|
|
10
|
-
a as defaultGaugeWidth,
|
|
11
|
-
t as defaultHeight,
|
|
12
|
-
i as defaultInnerCircleRadius,
|
|
13
|
-
c as defaultInnerCircleStrokeWidth,
|
|
14
|
-
o as defaultInnerPointRadius,
|
|
15
|
-
W as defaultMaskBorderRadius,
|
|
16
|
-
r as defaultNeedleWidth,
|
|
17
|
-
u as defaultNumberOfDashes,
|
|
18
|
-
l as defaultPointStrokeWidth,
|
|
19
|
-
e as defaultWidth,
|
|
20
|
-
R as labelPaddingX,
|
|
21
|
-
g as labelWidth,
|
|
22
|
-
B as smallMeterDistanceBetweenRanges,
|
|
23
|
-
C as smallMeterDistanceFromRangesToNeedle,
|
|
24
|
-
P as smallMeterGaugeWidth,
|
|
25
|
-
k as smallMeterHeight,
|
|
26
|
-
S as smallMeterInnerCircleRadius,
|
|
27
|
-
b as smallMeterInnerCircleStrokeWidth,
|
|
28
|
-
T as smallMeterMaskBorderRadius,
|
|
29
|
-
F as smallMeterNeedleWidth,
|
|
30
|
-
N as smallMeterPointRadius,
|
|
31
|
-
I as smallMeterPointStrokeWidth,
|
|
32
|
-
D as smallMeterWidth
|
|
4
|
+
t as ReactComponent
|
|
33
5
|
};
|
|
34
6
|
//# sourceMappingURL=sd-component-library229.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sd-component-library229.js","sources":["../src/components/meters/
|
|
1
|
+
{"version":3,"file":"sd-component-library229.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,6 +1,6 @@
|
|
|
1
1
|
import { j as o } from "./sd-component-library195.js";
|
|
2
|
-
import { LogoButton as e } from "./sd-component-
|
|
3
|
-
import { ReactComponent as r } from "./sd-component-
|
|
2
|
+
import { LogoButton as e } from "./sd-component-library250.js";
|
|
3
|
+
import { ReactComponent as r } from "./sd-component-library251.js";
|
|
4
4
|
const s = (t) => /* @__PURE__ */ o.jsx(
|
|
5
5
|
e,
|
|
6
6
|
{
|
|
@@ -1,22 +1,132 @@
|
|
|
1
|
-
import { j as
|
|
2
|
-
import
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
const
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
1
|
+
import { j as e } from "./sd-component-library195.js";
|
|
2
|
+
import U from "react";
|
|
3
|
+
import { isValueInRange as Z, inValueHigherThanRange as F, getCoordinateForArc as d, getInnerX as $, getInnerY as tt, degToRad as L } from "./sd-component-library91.js";
|
|
4
|
+
import { BaseOutlineArc as X } from "./sd-component-library317.js";
|
|
5
|
+
import { OutlineMeterLabelPointer as O } from "./sd-component-library240.js";
|
|
6
|
+
const st = U.forwardRef(
|
|
7
|
+
(D, M) => {
|
|
8
|
+
const {
|
|
9
|
+
start: n,
|
|
10
|
+
end: r,
|
|
11
|
+
color: x,
|
|
12
|
+
bounds: R,
|
|
13
|
+
diameter: o,
|
|
14
|
+
arc: v,
|
|
15
|
+
distanceBetweenRanges: l,
|
|
16
|
+
totalRanges: y,
|
|
17
|
+
value: g,
|
|
18
|
+
gaugeWidth: s,
|
|
19
|
+
segmented: f,
|
|
20
|
+
idx: m,
|
|
21
|
+
pointStrokeWidth: I,
|
|
22
|
+
innerPointRadius: T,
|
|
23
|
+
distanceFromRanges: b,
|
|
24
|
+
label: w,
|
|
25
|
+
labelPosition: V,
|
|
26
|
+
hideLabels: E,
|
|
27
|
+
connected: _
|
|
28
|
+
} = D, S = "#CCD0DB", A = v - (y - 1) * l, H = A * (r - n), Y = Z(g, n, r, R), q = (360 - v) / 2, t = o / 2, a = q + l * m + A * n, C = _ && F(g, r, R), i = a + A * (r - n) + (C ? l : 0), { x: P, y: j } = d(
|
|
29
|
+
t,
|
|
30
|
+
a
|
|
31
|
+
), { x: W, y: k } = d(
|
|
32
|
+
t,
|
|
33
|
+
i
|
|
34
|
+
), u = V || m === 0 ? "left" : m === y - 1 ? "right" : "top";
|
|
35
|
+
if (f || !Y) {
|
|
36
|
+
const J = f && Y || !f && F(g, r, R) ? x : S, B = C ? i - l : i, { y: K } = d(
|
|
37
|
+
t,
|
|
38
|
+
B
|
|
39
|
+
), { x: N, y: Q } = d(
|
|
40
|
+
t,
|
|
41
|
+
(a + B) / 2
|
|
42
|
+
);
|
|
43
|
+
return /* @__PURE__ */ e.jsxs("g", { children: [
|
|
44
|
+
/* @__PURE__ */ e.jsx(
|
|
45
|
+
X,
|
|
46
|
+
{
|
|
47
|
+
startX: P,
|
|
48
|
+
startY: j,
|
|
49
|
+
endX: W,
|
|
50
|
+
endY: k,
|
|
51
|
+
startAlpha: a,
|
|
52
|
+
endAlpha: i,
|
|
53
|
+
color: J,
|
|
54
|
+
radius: t,
|
|
55
|
+
width: s
|
|
56
|
+
}
|
|
57
|
+
),
|
|
58
|
+
!E && w && /* @__PURE__ */ e.jsx(
|
|
59
|
+
O,
|
|
60
|
+
{
|
|
61
|
+
diameter: o,
|
|
62
|
+
position: u,
|
|
63
|
+
distanceFromRanges: b,
|
|
64
|
+
isInRange: Y,
|
|
65
|
+
...u === "right" && j > o / 2 || u === "left" && K > o / 2 ? {
|
|
66
|
+
rangeX: N,
|
|
67
|
+
rangeY: Q
|
|
68
|
+
} : void 0
|
|
69
|
+
}
|
|
70
|
+
)
|
|
71
|
+
] });
|
|
72
|
+
}
|
|
73
|
+
const c = a + (g - n) / (r - n) * H, { x: h, y: p } = d(t, c), z = $(h, L(c), s), G = tt(p, L(c), s);
|
|
74
|
+
return /* @__PURE__ */ e.jsxs("g", { children: [
|
|
75
|
+
/* @__PURE__ */ e.jsx(
|
|
76
|
+
X,
|
|
77
|
+
{
|
|
78
|
+
startX: P,
|
|
79
|
+
startY: j,
|
|
80
|
+
endX: h,
|
|
81
|
+
endY: p,
|
|
82
|
+
startAlpha: a,
|
|
83
|
+
endAlpha: c,
|
|
84
|
+
color: x,
|
|
85
|
+
radius: t,
|
|
86
|
+
width: s,
|
|
87
|
+
roundEnd: !1
|
|
88
|
+
}
|
|
89
|
+
),
|
|
90
|
+
/* @__PURE__ */ e.jsx(
|
|
91
|
+
X,
|
|
92
|
+
{
|
|
93
|
+
startX: h,
|
|
94
|
+
startY: p,
|
|
95
|
+
endX: W,
|
|
96
|
+
endY: k,
|
|
97
|
+
startAlpha: c,
|
|
98
|
+
endAlpha: i,
|
|
99
|
+
color: S,
|
|
100
|
+
radius: t,
|
|
101
|
+
width: s,
|
|
102
|
+
roundStart: !1
|
|
103
|
+
}
|
|
104
|
+
),
|
|
105
|
+
/* @__PURE__ */ e.jsx(
|
|
106
|
+
"circle",
|
|
107
|
+
{
|
|
108
|
+
cx: (h + z) / 2,
|
|
109
|
+
cy: (p + G) / 2,
|
|
110
|
+
r: I + T,
|
|
111
|
+
strokeWidth: I,
|
|
112
|
+
stroke: x,
|
|
113
|
+
fill: "white",
|
|
114
|
+
ref: M
|
|
115
|
+
}
|
|
116
|
+
),
|
|
117
|
+
!E && w && /* @__PURE__ */ e.jsx(
|
|
118
|
+
O,
|
|
119
|
+
{
|
|
120
|
+
diameter: o,
|
|
121
|
+
isInRange: !0,
|
|
122
|
+
position: u,
|
|
123
|
+
distanceFromRanges: b
|
|
124
|
+
}
|
|
125
|
+
)
|
|
126
|
+
] });
|
|
127
|
+
}
|
|
128
|
+
);
|
|
11
129
|
export {
|
|
12
|
-
|
|
13
|
-
S as defaultDistanceBetweenRanges,
|
|
14
|
-
c as defaultSmileyWidth,
|
|
15
|
-
g as smallSmileyGaugeWidth,
|
|
16
|
-
f as smallSmileyInnerPointRadius,
|
|
17
|
-
d as smallSmileyInnerPointStrokeWidth,
|
|
18
|
-
y as smallSmileyMeterHeight,
|
|
19
|
-
p as smallSmileyMeterWidth,
|
|
20
|
-
R as smallSmileyWidth
|
|
130
|
+
st as OutlineMeterRange
|
|
21
131
|
};
|
|
22
132
|
//# sourceMappingURL=sd-component-library230.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sd-component-library230.js","sources":["../src/components/meters/
|
|
1
|
+
{"version":3,"file":"sd-component-library230.js","sources":["../src/components/meters/outline-meter/partials/outline-meter-range/outline-meter-range.tsx"],"sourcesContent":["import React from \"react\";\n\nimport {\n degToRad,\n getCoordinateForArc,\n getInnerX,\n getInnerY,\n inValueHigherThanRange,\n isValueInRange,\n} from \"../../utils\";\nimport { BaseOutlineArc } from \"../base-outline-arc\";\nimport { OutlineMeterLabelPointer } from \"../outline-meter-label-pointer\";\nimport { OutlineMeterRangeProps as Props } from \"./interfaces\";\n\nexport const OutlineMeterRange = React.forwardRef<SVGCircleElement, Props>(\n (props, pointRef) => {\n const {\n start,\n end,\n color,\n bounds,\n diameter,\n arc,\n distanceBetweenRanges,\n totalRanges,\n value,\n gaugeWidth,\n segmented,\n idx,\n pointStrokeWidth,\n innerPointRadius,\n distanceFromRanges,\n label,\n labelPosition,\n hideLabels,\n connected,\n } = props;\n\n const grey = \"#CCD0DB\";\n\n /* Arc value (in degrees) used for all ranges. */\n const arcForRanges = arc - (totalRanges - 1) * distanceBetweenRanges;\n\n /* Arc value for the current range. */\n const rangeArc = arcForRanges * (end - start);\n const valueWithinRange = isValueInRange(value, start, end, bounds);\n\n const arcStart = (360 - arc) / 2; // deg\n\n const radius = diameter / 2;\n\n const rangeArcStart =\n arcStart + distanceBetweenRanges * idx + arcForRanges * start;\n const needConnection =\n connected && inValueHigherThanRange(value, end, bounds);\n const rangeArcEnd =\n rangeArcStart +\n arcForRanges * (end - start) +\n (needConnection ? distanceBetweenRanges : 0);\n\n const { x: rangeStartX, y: rangeStartY } = getCoordinateForArc(\n radius,\n rangeArcStart\n );\n const { x: rangeEndX, y: rangeEndY } = getCoordinateForArc(\n radius,\n rangeArcEnd\n );\n\n const calculatedLabelPosition =\n labelPosition || idx === 0\n ? \"left\"\n : idx === totalRanges - 1\n ? \"right\"\n : \"top\";\n\n /* When range will be filled completely. */\n if (segmented || !valueWithinRange) {\n const fillColor =\n (segmented && valueWithinRange) ||\n (!segmented && inValueHigherThanRange(value, end, bounds))\n ? color\n : grey;\n\n const adjustedRangeArcEnd = needConnection\n ? rangeArcEnd - distanceBetweenRanges\n : rangeArcEnd;\n const { y: adjustedRangeY } = getCoordinateForArc(\n radius,\n adjustedRangeArcEnd\n );\n const { x: rangeX, y: rangeY } = getCoordinateForArc(\n radius,\n (rangeArcStart + adjustedRangeArcEnd) / 2\n );\n return (\n <g>\n <BaseOutlineArc\n startX={rangeStartX}\n startY={rangeStartY}\n endX={rangeEndX}\n endY={rangeEndY}\n startAlpha={rangeArcStart}\n endAlpha={rangeArcEnd}\n color={fillColor}\n radius={radius}\n width={gaugeWidth}\n />\n {!hideLabels && label && (\n <OutlineMeterLabelPointer\n diameter={diameter}\n position={calculatedLabelPosition}\n distanceFromRanges={distanceFromRanges}\n isInRange={valueWithinRange}\n {...((calculatedLabelPosition === \"right\" &&\n rangeStartY > diameter / 2) ||\n (calculatedLabelPosition === \"left\" &&\n adjustedRangeY > diameter / 2)\n ? {\n rangeX,\n rangeY,\n }\n : undefined)}\n />\n )}\n </g>\n );\n }\n\n const valueAlpha =\n rangeArcStart + ((value - start) / (end - start)) * rangeArc;\n\n const { x: valueX, y: valueY } = getCoordinateForArc(radius, valueAlpha);\n const valueInnerX = getInnerX(valueX, degToRad(valueAlpha), gaugeWidth);\n const valueInnerY = getInnerY(valueY, degToRad(valueAlpha), gaugeWidth);\n\n return (\n <g>\n <BaseOutlineArc\n startX={rangeStartX}\n startY={rangeStartY}\n endX={valueX}\n endY={valueY}\n startAlpha={rangeArcStart}\n endAlpha={valueAlpha}\n color={color}\n radius={radius}\n width={gaugeWidth}\n roundEnd={false}\n />\n <BaseOutlineArc\n startX={valueX}\n startY={valueY}\n endX={rangeEndX}\n endY={rangeEndY}\n startAlpha={valueAlpha}\n endAlpha={rangeArcEnd}\n color={grey}\n radius={radius}\n width={gaugeWidth}\n roundStart={false}\n />\n <circle\n cx={(valueX + valueInnerX) / 2}\n cy={(valueY + valueInnerY) / 2}\n r={pointStrokeWidth + innerPointRadius}\n strokeWidth={pointStrokeWidth}\n stroke={color}\n fill=\"white\"\n ref={pointRef}\n />\n {!hideLabels && label && (\n <OutlineMeterLabelPointer\n diameter={diameter}\n isInRange\n position={calculatedLabelPosition}\n distanceFromRanges={distanceFromRanges}\n />\n )}\n </g>\n );\n }\n);\n"],"names":["OutlineMeterRange","React","props","pointRef","start","end","color","bounds","diameter","arc","distanceBetweenRanges","totalRanges","value","gaugeWidth","segmented","idx","pointStrokeWidth","innerPointRadius","distanceFromRanges","label","labelPosition","hideLabels","connected","grey","arcForRanges","rangeArc","valueWithinRange","isValueInRange","arcStart","radius","rangeArcStart","needConnection","inValueHigherThanRange","rangeArcEnd","rangeStartX","rangeStartY","getCoordinateForArc","rangeEndX","rangeEndY","calculatedLabelPosition","fillColor","adjustedRangeArcEnd","adjustedRangeY","rangeX","rangeY","jsx","BaseOutlineArc","OutlineMeterLabelPointer","valueAlpha","valueX","valueY","valueInnerX","getInnerX","degToRad","valueInnerY","getInnerY"],"mappings":"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"}
|
|
@@ -1,23 +1,46 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
const
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
return
|
|
1
|
+
import { j as i } from "./sd-component-library195.js";
|
|
2
|
+
import { getInnerX as m, getInnerY as g, getCoordinateForArc as C, degToRad as F } from "./sd-component-library91.js";
|
|
3
|
+
const X = (p) => {
|
|
4
|
+
const {
|
|
5
|
+
diameter: l,
|
|
6
|
+
arc: a,
|
|
7
|
+
color: u = "#CCD0DB",
|
|
8
|
+
dashHeight: e,
|
|
9
|
+
dashWidth: x,
|
|
10
|
+
numberOfDashes: r,
|
|
11
|
+
distanceFromRangesToScale: t,
|
|
12
|
+
gaugeWidth: o
|
|
13
|
+
} = p, R = l / 2, j = (360 - a) / 2, D = a / (r - 1);
|
|
14
|
+
return /* @__PURE__ */ i.jsx("g", { children: [...Array(r)].map((I, n) => {
|
|
15
|
+
const c = j + n * D, { x: d, y: h } = C(R, c), s = F(c), T = m(
|
|
16
|
+
d,
|
|
17
|
+
s,
|
|
18
|
+
o + t
|
|
19
|
+
), $ = g(
|
|
20
|
+
h,
|
|
21
|
+
s,
|
|
22
|
+
o + t
|
|
23
|
+
), f = m(
|
|
24
|
+
d,
|
|
25
|
+
s,
|
|
26
|
+
o + t + e
|
|
27
|
+
), B = g(
|
|
28
|
+
h,
|
|
29
|
+
s,
|
|
30
|
+
o + t + e
|
|
31
|
+
);
|
|
32
|
+
return /* @__PURE__ */ i.jsx(
|
|
33
|
+
"path",
|
|
34
|
+
{
|
|
35
|
+
d: `M${T},${$} L${f},${B}`,
|
|
36
|
+
stroke: u,
|
|
37
|
+
strokeWidth: x
|
|
38
|
+
},
|
|
39
|
+
n
|
|
40
|
+
);
|
|
41
|
+
}) });
|
|
15
42
|
};
|
|
16
43
|
export {
|
|
17
|
-
|
|
18
|
-
u as areColorsValid,
|
|
19
|
-
R as getIsHorizontal,
|
|
20
|
-
A as getRangeProperties,
|
|
21
|
-
f as isCorrectSmileyMeterConfig
|
|
44
|
+
X as OutlineMeterScale
|
|
22
45
|
};
|
|
23
46
|
//# sourceMappingURL=sd-component-library231.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sd-component-library231.js","sources":["../src/components/meters/
|
|
1
|
+
{"version":3,"file":"sd-component-library231.js","sources":["../src/components/meters/outline-meter/partials/outline-meter-scale/outline-meter-scale.tsx"],"sourcesContent":["import React from \"react\";\n\nimport {\n degToRad,\n getCoordinateForArc,\n getInnerX,\n getInnerY,\n} from \"../../utils\";\nimport { OutlineMeterScaleProps as Props } from \"./interfaces\";\n\nexport const OutlineMeterScale: React.FC<Props> = (props) => {\n const {\n diameter,\n arc,\n color = \"#CCD0DB\",\n dashHeight,\n dashWidth,\n numberOfDashes,\n distanceFromRangesToScale: distanceFromRanges,\n gaugeWidth,\n } = props;\n const radius = diameter / 2;\n\n const arcStart = (360 - arc) / 2; // deg\n const degPerDash = arc / (numberOfDashes - 1);\n\n return (\n <g>\n {[...Array(numberOfDashes)].map((_, idx) => {\n const alpha = arcStart + idx * degPerDash;\n const { x, y } = getCoordinateForArc(radius, alpha);\n const alphaInRad = degToRad(alpha);\n const dashTopX = getInnerX(\n x,\n alphaInRad,\n gaugeWidth + distanceFromRanges\n );\n const dashTopY = getInnerY(\n y,\n alphaInRad,\n gaugeWidth + distanceFromRanges\n );\n const dashBottomX = getInnerX(\n x,\n alphaInRad,\n gaugeWidth + distanceFromRanges + dashHeight\n );\n const dashBottomY = getInnerY(\n y,\n alphaInRad,\n gaugeWidth + distanceFromRanges + dashHeight\n );\n return (\n <path\n key={idx}\n d={`M${dashTopX},${dashTopY} L${dashBottomX},${dashBottomY}`}\n stroke={color}\n strokeWidth={dashWidth}\n />\n );\n })}\n </g>\n );\n};\n"],"names":["OutlineMeterScale","props","diameter","arc","color","dashHeight","dashWidth","numberOfDashes","distanceFromRanges","gaugeWidth","radius","arcStart","degPerDash","jsx","_","idx","alpha","x","y","getCoordinateForArc","alphaInRad","degToRad","dashTopX","getInnerX","dashTopY","getInnerY","dashBottomX","dashBottomY"],"mappings":";;AAUa,MAAAA,IAAqC,CAACC,MAAU;AACrD,QAAA;AAAA,IACJ,UAAAC;AAAA,IACA,KAAAC;AAAA,IACA,OAAAC,IAAQ;AAAA,IACR,YAAAC;AAAA,IACA,WAAAC;AAAA,IACA,gBAAAC;AAAA,IACA,2BAA2BC;AAAA,IAC3B,YAAAC;AAAA,EACE,IAAAR,GACES,IAASR,IAAW,GAEpBS,KAAY,MAAMR,KAAO,GACzBS,IAAaT,KAAOI,IAAiB;AAGzC,SAAAM,gBAAAA,MAAC,KACE,EAAA,UAAA,CAAC,GAAG,MAAMN,CAAc,CAAC,EAAE,IAAI,CAACO,GAAGC,MAAQ;AACpC,UAAAC,IAAQL,IAAWI,IAAMH,GACzB,EAAE,GAAAK,GAAG,GAAAC,EAAA,IAAMC,EAAoBT,GAAQM,CAAK,GAC5CI,IAAaC,EAASL,CAAK,GAC3BM,IAAWC;AAAA,MACfN;AAAA,MACAG;AAAA,MACAX,IAAaD;AAAA,IAAA,GAETgB,IAAWC;AAAA,MACfP;AAAA,MACAE;AAAA,MACAX,IAAaD;AAAA,IAAA,GAETkB,IAAcH;AAAA,MAClBN;AAAA,MACAG;AAAA,MACAX,IAAaD,IAAqBH;AAAA,IAAA,GAE9BsB,IAAcF;AAAA,MAClBP;AAAA,MACAE;AAAA,MACAX,IAAaD,IAAqBH;AAAA,IAAA;AAGlC,WAAAQ,gBAAAA,EAAA;AAAA,MAAC;AAAA,MAAA;AAAA,QAEC,GAAG,IAAIS,CAAQ,IAAIE,CAAQ,KAAKE,CAAW,IAAIC,CAAW;AAAA,QAC1D,QAAQvB;AAAA,QACR,aAAaE;AAAA,MAAA;AAAA,MAHRS;AAAA,IAAA;AAAA,EAMV,CAAA,EACH,CAAA;AAEJ;"}
|
|
@@ -1,31 +1,50 @@
|
|
|
1
|
-
import { j as
|
|
2
|
-
import
|
|
3
|
-
import {
|
|
4
|
-
|
|
5
|
-
const
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
)
|
|
26
|
-
|
|
27
|
-
)
|
|
1
|
+
import { j as k } from "./sd-component-library195.js";
|
|
2
|
+
import { isValueInRange as w, getInnerX as E, getInnerY as O, degToRad as r, getCoordinateForArc as V } from "./sd-component-library91.js";
|
|
3
|
+
import { BaseNeedle as b } from "./sd-component-library316.js";
|
|
4
|
+
const G = (x) => {
|
|
5
|
+
const {
|
|
6
|
+
diameter: f,
|
|
7
|
+
value: c,
|
|
8
|
+
arc: i,
|
|
9
|
+
ranges: o,
|
|
10
|
+
useSegmentedBehavior: v,
|
|
11
|
+
innerCircleRadius: I,
|
|
12
|
+
innerCircleStrokeWidth: A,
|
|
13
|
+
distanceFromRange: d,
|
|
14
|
+
needleWidth: e,
|
|
15
|
+
needleColor: C,
|
|
16
|
+
distanceBetweenRanges: l,
|
|
17
|
+
gaugeWidth: g
|
|
18
|
+
} = x, a = o.find(
|
|
19
|
+
({ start: s, end: y, bounds: N }) => w(c, s, y, N)
|
|
20
|
+
);
|
|
21
|
+
if (!a)
|
|
22
|
+
return null;
|
|
23
|
+
const u = f / 2, S = (360 - i) / 2, m = i - (o.length - 1) * l, { start: t, end: h, color: X } = a, Y = o.findIndex((s) => s === a), p = m * (h - t), R = S + l * Y + m * t, n = v ? R + p / 2 : R + (c - t) / (h - t) * p, { x: j, y: B } = V(u, n), F = E(
|
|
24
|
+
j,
|
|
25
|
+
r(n),
|
|
26
|
+
d + g + e / 2
|
|
27
|
+
), M = O(
|
|
28
|
+
B,
|
|
29
|
+
r(n),
|
|
30
|
+
d + g + e / 2
|
|
31
|
+
), T = e / 2 * Math.cos(r(n)), W = e / 2 * Math.sin(r(n));
|
|
32
|
+
return /* @__PURE__ */ k.jsx(
|
|
33
|
+
b,
|
|
34
|
+
{
|
|
35
|
+
dx: T,
|
|
36
|
+
dy: W,
|
|
37
|
+
color: C || X,
|
|
38
|
+
radius: u,
|
|
39
|
+
tipX: F,
|
|
40
|
+
tipY: M,
|
|
41
|
+
innerCircleStrokeWidth: A,
|
|
42
|
+
innerCircleRadius: I,
|
|
43
|
+
needleWidth: e
|
|
44
|
+
}
|
|
45
|
+
);
|
|
46
|
+
};
|
|
28
47
|
export {
|
|
29
|
-
|
|
48
|
+
G as OutlineMeterNeedle
|
|
30
49
|
};
|
|
31
50
|
//# sourceMappingURL=sd-component-library232.js.map
|