@selfdecode/sd-component-library 4.0.81 → 4.0.82
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/core/functions.d.ts +2 -0
- package/lib/sd-component-library.js +392 -390
- package/lib/sd-component-library101.js +4 -4
- package/lib/sd-component-library107.js +1 -1
- package/lib/sd-component-library112.js +1 -1
- package/lib/sd-component-library113.js +2 -2
- package/lib/sd-component-library115.js +1 -1
- package/lib/sd-component-library121.js +1 -1
- package/lib/sd-component-library122.js +1 -1
- package/lib/sd-component-library124.js +1 -1
- package/lib/sd-component-library15.js +1 -1
- package/lib/sd-component-library161.js +1 -1
- package/lib/sd-component-library166.js +1 -1
- package/lib/sd-component-library194.js +57 -3
- package/lib/sd-component-library194.js.map +1 -1
- package/lib/sd-component-library198.js +3 -25
- package/lib/sd-component-library198.js.map +1 -1
- package/lib/sd-component-library199.js +20 -14
- package/lib/sd-component-library199.js.map +1 -1
- package/lib/sd-component-library200.js +19 -5
- package/lib/sd-component-library200.js.map +1 -1
- package/lib/sd-component-library201.js +3 -3
- package/lib/sd-component-library201.js.map +1 -1
- package/lib/sd-component-library202.js +5 -57
- package/lib/sd-component-library202.js.map +1 -1
- package/lib/sd-component-library216.js +3 -46
- package/lib/sd-component-library216.js.map +1 -1
- package/lib/sd-component-library217.js +52 -3
- package/lib/sd-component-library217.js.map +1 -1
- package/lib/sd-component-library218.js +54 -41
- package/lib/sd-component-library218.js.map +1 -1
- package/lib/sd-component-library219.js +3 -16
- package/lib/sd-component-library219.js.map +1 -1
- package/lib/sd-component-library220.js +45 -64
- package/lib/sd-component-library220.js.map +1 -1
- package/lib/sd-component-library221.js +16 -3
- package/lib/sd-component-library221.js.map +1 -1
- package/lib/sd-component-library222.js +26 -3
- package/lib/sd-component-library222.js.map +1 -1
- package/lib/sd-component-library223.js +3 -26
- package/lib/sd-component-library223.js.map +1 -1
- package/lib/sd-component-library225.js +19 -129
- package/lib/sd-component-library225.js.map +1 -1
- package/lib/sd-component-library226.js +19 -42
- package/lib/sd-component-library226.js.map +1 -1
- package/lib/sd-component-library227.js +28 -47
- package/lib/sd-component-library227.js.map +1 -1
- package/lib/sd-component-library228.js +32 -7
- package/lib/sd-component-library228.js.map +1 -1
- package/lib/sd-component-library229.js +3 -3
- 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 +62 -46
- package/lib/sd-component-library234.js.map +1 -1
- package/lib/sd-component-library235.js +41 -73
- package/lib/sd-component-library235.js.map +1 -1
- package/lib/sd-component-library236.js +13 -64
- package/lib/sd-component-library236.js.map +1 -1
- package/lib/sd-component-library237.js +21 -43
- package/lib/sd-component-library237.js.map +1 -1
- package/lib/sd-component-library238.js +107 -11
- package/lib/sd-component-library238.js.map +1 -1
- package/lib/sd-component-library239.js +42 -24
- package/lib/sd-component-library239.js.map +1 -1
- package/lib/sd-component-library24.js +2 -2
- package/lib/sd-component-library240.js +24 -3
- package/lib/sd-component-library240.js.map +1 -1
- package/lib/sd-component-library241.js +48 -19
- package/lib/sd-component-library241.js.map +1 -1
- package/lib/sd-component-library242.js +48 -3
- package/lib/sd-component-library242.js.map +1 -1
- package/lib/sd-component-library243.js +74 -324
- package/lib/sd-component-library243.js.map +1 -1
- package/lib/sd-component-library244.js +41 -5
- package/lib/sd-component-library244.js.map +1 -1
- package/lib/sd-component-library245.js +27 -2
- package/lib/sd-component-library245.js.map +1 -1
- package/lib/sd-component-library248.js +2 -21
- package/lib/sd-component-library248.js.map +1 -1
- package/lib/sd-component-library249.js +323 -107
- package/lib/sd-component-library249.js.map +1 -1
- package/lib/sd-component-library25.js +1 -1
- package/lib/sd-component-library250.js +5 -47
- package/lib/sd-component-library250.js.map +1 -1
- package/lib/sd-component-library251.js +28 -23
- package/lib/sd-component-library251.js.map +1 -1
- package/lib/sd-component-library252.js +3 -53
- package/lib/sd-component-library252.js.map +1 -1
- package/lib/sd-component-library253.js +17 -18
- package/lib/sd-component-library253.js.map +1 -1
- package/lib/sd-component-library254.js +3 -22
- package/lib/sd-component-library254.js.map +1 -1
- package/lib/sd-component-library255.js +23 -39
- package/lib/sd-component-library255.js.map +1 -1
- package/lib/sd-component-library256.js +20 -25
- package/lib/sd-component-library256.js.map +1 -1
- package/lib/sd-component-library257.js +51 -30
- package/lib/sd-component-library257.js.map +1 -1
- package/lib/sd-component-library258.js +30 -51
- package/lib/sd-component-library258.js.map +1 -1
- package/lib/sd-component-library259.js +1 -1
- package/lib/sd-component-library309.js +51 -25
- package/lib/sd-component-library309.js.map +1 -1
- package/lib/sd-component-library310.js +91 -33
- package/lib/sd-component-library310.js.map +1 -1
- package/lib/sd-component-library311.js +25 -51
- package/lib/sd-component-library311.js.map +1 -1
- package/lib/sd-component-library312.js +33 -91
- package/lib/sd-component-library312.js.map +1 -1
- package/lib/sd-component-library4.js +15 -10
- package/lib/sd-component-library4.js.map +1 -1
- package/lib/sd-component-library5.js +1 -1
- package/lib/sd-component-library59.js +1 -1
- package/lib/sd-component-library6.js +1 -1
- package/lib/sd-component-library60.js +1 -1
- package/lib/sd-component-library69.js +2 -2
- package/lib/sd-component-library70.js +3 -3
- package/lib/sd-component-library71.js +1 -1
- package/lib/sd-component-library72.js +1 -1
- package/lib/sd-component-library74.js +1 -1
- package/lib/sd-component-library75.js +1 -1
- package/lib/sd-component-library80.js +1 -1
- package/lib/sd-component-library81.js +5 -5
- package/lib/sd-component-library82.js +1 -1
- package/lib/sd-component-library83.js +1 -1
- package/lib/sd-component-library84.js +4 -4
- package/lib/sd-component-library87.js +5 -5
- package/lib/sd-component-library89.js +6 -6
- package/lib/sd-component-library93.js +2 -2
- package/lib/sd-component-library94.js +3 -3
- package/lib/sd-component-library96.js +1 -1
- package/lib/sd-component-library97.js +2 -2
- package/lib/sd-component-library99.js +4 -4
- package/package.json +1 -1
|
@@ -1,54 +1,33 @@
|
|
|
1
|
-
import { j as
|
|
2
|
-
import
|
|
3
|
-
import {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
sx: {
|
|
31
|
-
borderStyle: "none solid",
|
|
32
|
-
borderColor: "cl_lightGrey",
|
|
33
|
-
borderWidth: "1px"
|
|
34
|
-
}
|
|
35
|
-
}
|
|
36
|
-
),
|
|
37
|
-
/* @__PURE__ */ r.jsx(
|
|
38
|
-
x,
|
|
39
|
-
{
|
|
40
|
-
title: o.title,
|
|
41
|
-
onClick: c(o),
|
|
42
|
-
isLast: e === t.length - 1
|
|
43
|
-
},
|
|
44
|
-
o.id
|
|
45
|
-
)
|
|
46
|
-
] }, o.id))
|
|
47
|
-
]
|
|
48
|
-
}
|
|
49
|
-
);
|
|
50
|
-
};
|
|
1
|
+
import { j as e } from "./sd-component-library190.js";
|
|
2
|
+
import { FlexCenterSpaceBetween as p } from "./sd-component-library35.js";
|
|
3
|
+
import { ResponsiveTextV2 as t } from "./sd-component-library144.js";
|
|
4
|
+
const h = ({
|
|
5
|
+
title: i,
|
|
6
|
+
secondaryText: r,
|
|
7
|
+
textTransform: o,
|
|
8
|
+
...n
|
|
9
|
+
}) => /* @__PURE__ */ e.jsxs(
|
|
10
|
+
p,
|
|
11
|
+
{
|
|
12
|
+
width: "100%",
|
|
13
|
+
p: "12px 16px",
|
|
14
|
+
bg: "white",
|
|
15
|
+
sx: { cursor: "pointer" },
|
|
16
|
+
...n,
|
|
17
|
+
children: [
|
|
18
|
+
/* @__PURE__ */ e.jsx(
|
|
19
|
+
t,
|
|
20
|
+
{
|
|
21
|
+
fontSizeWeight: [16, "regular"],
|
|
22
|
+
textTransform: o,
|
|
23
|
+
children: i
|
|
24
|
+
}
|
|
25
|
+
),
|
|
26
|
+
r && /* @__PURE__ */ e.jsx(t, { fontSizeWeight: [14, "regular"], children: r })
|
|
27
|
+
]
|
|
28
|
+
}
|
|
29
|
+
);
|
|
51
30
|
export {
|
|
52
|
-
|
|
31
|
+
h as CustomOptionBox
|
|
53
32
|
};
|
|
54
33
|
//# sourceMappingURL=sd-component-library258.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sd-component-library258.js","sources":["../src/components/selectors/
|
|
1
|
+
{"version":3,"file":"sd-component-library258.js","sources":["../src/components/selectors/custom-selector/partials/custom-option-box/custom-option-box.tsx"],"sourcesContent":["import React from \"react\";\n\nimport { FlexCenterSpaceBetween } from \"../../../../containers\";\nimport { ResponsiveTextV2 } from \"../../../../texts\";\nimport { CustomOptionBoxProps as Props } from \"./interfaces\";\n\nexport const CustomOptionBox: React.FC<Props> = ({\n title,\n secondaryText,\n textTransform,\n ...props\n}) => {\n return (\n <FlexCenterSpaceBetween\n width=\"100%\"\n p=\"12px 16px\"\n bg=\"white\"\n sx={{ cursor: \"pointer\" }}\n {...props}\n >\n <ResponsiveTextV2\n fontSizeWeight={[16, \"regular\"]}\n textTransform={textTransform}\n >\n {title}\n </ResponsiveTextV2>\n\n {secondaryText && (\n <ResponsiveTextV2 fontSizeWeight={[14, \"regular\"]}>\n {secondaryText}\n </ResponsiveTextV2>\n )}\n </FlexCenterSpaceBetween>\n );\n};\n"],"names":["CustomOptionBox","title","secondaryText","textTransform","props","jsxs","FlexCenterSpaceBetween","jsx","ResponsiveTextV2"],"mappings":";;;AAMO,MAAMA,IAAmC,CAAC;AAAA,EAC/C,OAAAC;AAAA,EACA,eAAAC;AAAA,EACA,eAAAC;AAAA,EACA,GAAGC;AACL,MAEIC,gBAAAA,EAAA;AAAA,EAACC;AAAA,EAAA;AAAA,IACC,OAAM;AAAA,IACN,GAAE;AAAA,IACF,IAAG;AAAA,IACH,IAAI,EAAE,QAAQ,UAAU;AAAA,IACvB,GAAGF;AAAA,IAEJ,UAAA;AAAA,MAAAG,gBAAAA,EAAA;AAAA,QAACC;AAAA,QAAA;AAAA,UACC,gBAAgB,CAAC,IAAI,SAAS;AAAA,UAC9B,eAAAL;AAAA,UAEC,UAAAF;AAAA,QAAA;AAAA,MACH;AAAA,MAECC,2BACEM,GAAiB,EAAA,gBAAgB,CAAC,IAAI,SAAS,GAC7C,UACHN,GAAA;AAAA,IAAA;AAAA,EAAA;AAAA;"}
|
|
@@ -2,7 +2,7 @@ import { j as t } from "./sd-component-library190.js";
|
|
|
2
2
|
import { Select as A } from "@rebass/forms";
|
|
3
3
|
import { Box as T } from "rebass";
|
|
4
4
|
import { getNoTranslateClass as p } from "./sd-component-library107.js";
|
|
5
|
-
import { BaseLabel as Z } from "./sd-component-
|
|
5
|
+
import { BaseLabel as Z } from "./sd-component-library221.js";
|
|
6
6
|
import { MaxMaxContainer as q } from "./sd-component-library41.js";
|
|
7
7
|
import { ResponsiveTextV2 as D } from "./sd-component-library144.js";
|
|
8
8
|
const X = ({
|
|
@@ -1,28 +1,54 @@
|
|
|
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
|
-
|
|
1
|
+
import { j as t } from "./sd-component-library190.js";
|
|
2
|
+
import x from "react";
|
|
3
|
+
import u from "./sd-component-library189.js";
|
|
4
|
+
import { getIsHorizontal as j, getRangeProperties as p } from "./sd-component-library226.js";
|
|
5
|
+
import { OutlineMeterRange as M } from "./sd-component-library230.js";
|
|
6
|
+
import { LabelPointer as b } from "./sd-component-library320.js";
|
|
7
|
+
const A = x.forwardRef(
|
|
8
|
+
(e, r) => {
|
|
9
|
+
const {
|
|
10
|
+
segmented: o,
|
|
11
|
+
diameter: n,
|
|
12
|
+
arc: a,
|
|
13
|
+
totalRanges: i,
|
|
14
|
+
distanceBetweenRanges: s,
|
|
15
|
+
start: m,
|
|
16
|
+
end: c,
|
|
17
|
+
idx: d,
|
|
18
|
+
hideLabels: l,
|
|
19
|
+
isMatchedRange: g
|
|
20
|
+
} = e, f = !o, R = n / 2, { rangeArcMiddle: h } = p(
|
|
21
|
+
a,
|
|
22
|
+
i,
|
|
23
|
+
s,
|
|
24
|
+
d,
|
|
25
|
+
m,
|
|
26
|
+
c
|
|
27
|
+
);
|
|
28
|
+
return /* @__PURE__ */ t.jsxs(t.Fragment, { children: [
|
|
29
|
+
/* @__PURE__ */ t.jsx(
|
|
30
|
+
M,
|
|
31
|
+
{
|
|
32
|
+
...e,
|
|
33
|
+
hideLabels: !0,
|
|
34
|
+
connected: f,
|
|
35
|
+
ref: r
|
|
36
|
+
}
|
|
37
|
+
),
|
|
38
|
+
!l && !g && /* @__PURE__ */ t.jsx(
|
|
39
|
+
b,
|
|
40
|
+
{
|
|
41
|
+
...e,
|
|
42
|
+
radius: R,
|
|
43
|
+
color: u.colors.cl_lightGrey,
|
|
44
|
+
alpha: h,
|
|
45
|
+
horizontal: j(e)
|
|
46
|
+
}
|
|
47
|
+
)
|
|
48
|
+
] });
|
|
49
|
+
}
|
|
50
|
+
);
|
|
25
51
|
export {
|
|
26
|
-
|
|
52
|
+
A as SmileyMeterRange
|
|
27
53
|
};
|
|
28
54
|
//# sourceMappingURL=sd-component-library309.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sd-component-library309.js","sources":["../src/components/meters/
|
|
1
|
+
{"version":3,"file":"sd-component-library309.js","sources":["../src/components/meters/smiley-meter-v2/partials/smiley-meter-range/smiley-meter-range.tsx"],"sourcesContent":["import React from \"react\";\n\nimport theme from \"../../../../../core/theme\";\nimport { LabelPointer } from \"../../../common-outline-meter-partials\";\nimport { OutlineMeterRange } from \"../../../outline-meter/partials/outline-meter-range\";\nimport { getIsHorizontal, getRangeProperties } from \"../../utils\";\nimport { SmileyMeterRangeProps as Props } from \"./interfaces\";\n\nexport const SmileyMeterRange = React.forwardRef<SVGCircleElement, Props>(\n (props, pointRef) => {\n const {\n segmented,\n diameter,\n arc,\n totalRanges,\n distanceBetweenRanges,\n start,\n end,\n idx,\n hideLabels,\n isMatchedRange,\n } = props;\n\n const needConnection = !segmented;\n\n const radius = diameter / 2;\n\n const { rangeArcMiddle: alpha } = getRangeProperties(\n arc,\n totalRanges,\n distanceBetweenRanges,\n idx,\n start,\n end\n );\n\n return (\n <>\n <OutlineMeterRange\n {...props}\n hideLabels\n connected={needConnection}\n ref={pointRef}\n />\n\n {!hideLabels && !isMatchedRange && (\n <LabelPointer\n {...props}\n radius={radius}\n color={theme.colors.cl_lightGrey}\n alpha={alpha}\n horizontal={getIsHorizontal(props)}\n />\n )}\n </>\n );\n }\n);\n"],"names":["SmileyMeterRange","React","props","pointRef","segmented","diameter","arc","totalRanges","distanceBetweenRanges","start","end","idx","hideLabels","isMatchedRange","needConnection","radius","alpha","getRangeProperties","jsxs","Fragment","jsx","OutlineMeterRange","LabelPointer","theme","getIsHorizontal"],"mappings":";;;;;;AAQO,MAAMA,IAAmBC,EAAM;AAAA,EACpC,CAACC,GAAOC,MAAa;AACb,UAAA;AAAA,MACJ,WAAAC;AAAA,MACA,UAAAC;AAAA,MACA,KAAAC;AAAA,MACA,aAAAC;AAAA,MACA,uBAAAC;AAAA,MACA,OAAAC;AAAA,MACA,KAAAC;AAAA,MACA,KAAAC;AAAA,MACA,YAAAC;AAAA,MACA,gBAAAC;AAAA,IACE,IAAAX,GAEEY,IAAiB,CAACV,GAElBW,IAASV,IAAW,GAEpB,EAAE,gBAAgBW,EAAA,IAAUC;AAAA,MAChCX;AAAA,MACAC;AAAA,MACAC;AAAA,MACAG;AAAA,MACAF;AAAA,MACAC;AAAA,IAAA;AAGF,WAEIQ,gBAAAA,EAAA,KAAAC,YAAA,EAAA,UAAA;AAAA,MAAAC,gBAAAA,EAAA;AAAA,QAACC;AAAA,QAAA;AAAA,UACE,GAAGnB;AAAA,UACJ,YAAU;AAAA,UACV,WAAWY;AAAA,UACX,KAAKX;AAAA,QAAA;AAAA,MACP;AAAA,MAEC,CAACS,KAAc,CAACC,KACfO,gBAAAA,EAAA;AAAA,QAACE;AAAA,QAAA;AAAA,UACE,GAAGpB;AAAA,UACJ,QAAAa;AAAA,UACA,OAAOQ,EAAM,OAAO;AAAA,UACpB,OAAAP;AAAA,UACA,YAAYQ,EAAgBtB,CAAK;AAAA,QAAA;AAAA,MACnC;AAAA,IAEJ,EAAA,CAAA;AAAA,EAEJ;AACF;"}
|
|
@@ -1,38 +1,96 @@
|
|
|
1
|
-
import { j as
|
|
2
|
-
|
|
1
|
+
import { j as a } from "./sd-component-library190.js";
|
|
2
|
+
import { useState as S, useCallback as B } from "react";
|
|
3
|
+
import { Box as Y } from "rebass";
|
|
4
|
+
import { labelPaddingX as c, labelWidth as W } from "./sd-component-library224.js";
|
|
5
|
+
import { getCoordinateForArc as $ } from "./sd-component-library86.js";
|
|
6
|
+
import { ResponsiveTextV2 as z } from "./sd-component-library144.js";
|
|
7
|
+
const D = (j) => {
|
|
3
8
|
const {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
9
|
+
label: d,
|
|
10
|
+
color: p,
|
|
11
|
+
alpha: e,
|
|
12
|
+
radius: r,
|
|
13
|
+
horizontal: v,
|
|
14
|
+
pointerLength: m,
|
|
15
|
+
round: y,
|
|
16
|
+
pointY: i
|
|
17
|
+
} = j, [h, C] = S(0), [f, R] = S(0), T = B((t) => {
|
|
18
|
+
if (t) {
|
|
19
|
+
const { height: o, y: l } = t.getBoundingClientRect();
|
|
20
|
+
C(o), R(l);
|
|
21
|
+
}
|
|
22
|
+
}, []);
|
|
23
|
+
let { x: b, y: g } = $(
|
|
24
|
+
r + m,
|
|
25
|
+
e,
|
|
26
|
+
r
|
|
27
|
+
);
|
|
28
|
+
const s = e === 180, n = e < 180, u = e > 180;
|
|
29
|
+
if (v) {
|
|
30
|
+
const { x: t, y: o } = $(
|
|
31
|
+
r,
|
|
32
|
+
e,
|
|
33
|
+
r
|
|
34
|
+
);
|
|
35
|
+
b = t + m * (n ? -1 : 1), g = o;
|
|
36
|
+
}
|
|
37
|
+
if (!d)
|
|
38
|
+
return null;
|
|
39
|
+
let x = y || s ? `${c}px` : void 0;
|
|
40
|
+
if (!x && i) {
|
|
41
|
+
const t = f - h, o = f;
|
|
42
|
+
x = [
|
|
43
|
+
n || i > t,
|
|
44
|
+
u || i > t,
|
|
45
|
+
u || i < o,
|
|
46
|
+
n || i < o
|
|
47
|
+
].map((l) => l ? `${c}px` : "0").join(" ");
|
|
48
|
+
}
|
|
49
|
+
return /* @__PURE__ */ a.jsx(
|
|
50
|
+
Y,
|
|
51
|
+
{
|
|
52
|
+
sx: {
|
|
53
|
+
position: "absolute",
|
|
54
|
+
left: `${b}px`,
|
|
55
|
+
top: `${g}px`
|
|
56
|
+
},
|
|
57
|
+
children: /* @__PURE__ */ a.jsx(
|
|
58
|
+
Y,
|
|
59
|
+
{
|
|
60
|
+
sx: {
|
|
61
|
+
boxSizing: "content-box",
|
|
62
|
+
position: "relative",
|
|
63
|
+
top: `calc(-${h}px)`,
|
|
64
|
+
left: s ? "-50%" : n ? "-100%" : void 0,
|
|
65
|
+
py: "7px",
|
|
66
|
+
px: `${c}px`,
|
|
67
|
+
borderColor: p,
|
|
68
|
+
borderWidth: "2px",
|
|
69
|
+
borderStyle: "solid",
|
|
70
|
+
borderRadius: x,
|
|
71
|
+
bg: "cl_white",
|
|
72
|
+
"& > div": {
|
|
73
|
+
maxWidth: s ? void 0 : `${W}px`
|
|
74
|
+
}
|
|
75
|
+
},
|
|
76
|
+
ref: T,
|
|
77
|
+
children: /* @__PURE__ */ a.jsx(
|
|
78
|
+
z,
|
|
79
|
+
{
|
|
80
|
+
fontSizeWeight: [[12, "semi-bold"]],
|
|
81
|
+
width: "max-content",
|
|
82
|
+
color: p !== "#CCD0DB" ? p : "cl_darkGrey",
|
|
83
|
+
textTransform: "uppercase",
|
|
84
|
+
letterSpacing: "1.8px",
|
|
85
|
+
children: d
|
|
86
|
+
}
|
|
87
|
+
)
|
|
88
|
+
}
|
|
89
|
+
)
|
|
90
|
+
}
|
|
91
|
+
);
|
|
34
92
|
};
|
|
35
93
|
export {
|
|
36
|
-
|
|
94
|
+
D as MatchedRangeLabelBox
|
|
37
95
|
};
|
|
38
96
|
//# sourceMappingURL=sd-component-library310.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sd-component-library310.js","sources":["../src/components/meters/outline-meter
|
|
1
|
+
{"version":3,"file":"sd-component-library310.js","sources":["../src/components/meters/common-outline-meter-partials/matched-range-label-box/matched-range-label-box.tsx"],"sourcesContent":["import React, { useCallback, useState } from \"react\";\n\nimport { Box } from \"rebass\";\n\nimport { ResponsiveTextV2 } from \"../../../texts/responsive-text-v2\";\nimport { labelPaddingX, labelWidth } from \"../../outline-meter/contants\";\nimport { getCoordinateForArc } from \"../../outline-meter/utils\";\nimport { MatchedRangeLabelBoxProps as Props } from \"./interfaces\";\n\nexport const MatchedRangeLabelBox: React.FC<Props> = (props) => {\n const {\n label,\n color,\n alpha,\n radius,\n horizontal,\n pointerLength,\n round,\n pointY,\n } = props;\n\n const [textHeight, setTextHeight] = useState(0);\n const [textY, setTextY] = useState(0);\n\n const ref = useCallback((node: HTMLElement) => {\n if (node) {\n const { height, y } = node.getBoundingClientRect();\n setTextHeight(height);\n setTextY(y);\n }\n }, []);\n\n let { x: pointerEndX, y: pointerEndY } = getCoordinateForArc(\n radius + pointerLength,\n alpha,\n radius\n );\n\n const isOnTop = alpha === 180;\n const isOnLeft = alpha < 180;\n const isOnRight = alpha > 180;\n\n if (horizontal) {\n const { x: pointerStartX, y: pointerStartY } = getCoordinateForArc(\n radius,\n alpha,\n radius\n );\n\n pointerEndX = pointerStartX + pointerLength * (isOnLeft ? -1 : 1);\n pointerEndY = pointerStartY;\n }\n\n if (!label) return null;\n\n let borderRadius = round || isOnTop ? `${labelPaddingX}px` : undefined;\n if (!borderRadius && pointY) {\n const textTopY = textY - textHeight;\n const textBottomY = textY;\n\n borderRadius = [\n isOnLeft || pointY > textTopY,\n isOnRight || pointY > textTopY,\n isOnRight || pointY < textBottomY,\n isOnLeft || pointY < textBottomY,\n ]\n .map((flag) => (flag ? `${labelPaddingX}px` : \"0\"))\n .join(\" \");\n }\n\n return (\n <Box\n sx={{\n position: \"absolute\",\n left: `${pointerEndX}px`,\n top: `${pointerEndY}px`,\n }}\n >\n <Box\n sx={{\n boxSizing: \"content-box\",\n position: \"relative\",\n top: `calc(-${textHeight}px)`,\n left: isOnTop ? \"-50%\" : isOnLeft ? \"-100%\" : undefined,\n py: \"7px\",\n px: `${labelPaddingX}px`,\n borderColor: color,\n borderWidth: \"2px\",\n borderStyle: \"solid\",\n borderRadius,\n bg: \"cl_white\",\n \"& > div\": {\n maxWidth: isOnTop ? undefined : `${labelWidth}px`,\n },\n }}\n ref={ref}\n >\n <ResponsiveTextV2\n fontSizeWeight={[[12, \"semi-bold\"]]}\n width=\"max-content\"\n color={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":["MatchedRangeLabelBox","props","label","color","alpha","radius","horizontal","pointerLength","round","pointY","textHeight","setTextHeight","useState","textY","setTextY","ref","useCallback","node","height","y","pointerEndX","pointerEndY","getCoordinateForArc","isOnTop","isOnLeft","isOnRight","pointerStartX","pointerStartY","borderRadius","labelPaddingX","textTopY","textBottomY","flag","jsx","Box","labelWidth","ResponsiveTextV2"],"mappings":";;;;;;AASa,MAAAA,IAAwC,CAACC,MAAU;AACxD,QAAA;AAAA,IACJ,OAAAC;AAAA,IACA,OAAAC;AAAA,IACA,OAAAC;AAAA,IACA,QAAAC;AAAA,IACA,YAAAC;AAAA,IACA,eAAAC;AAAA,IACA,OAAAC;AAAA,IACA,QAAAC;AAAA,EACE,IAAAR,GAEE,CAACS,GAAYC,CAAa,IAAIC,EAAS,CAAC,GACxC,CAACC,GAAOC,CAAQ,IAAIF,EAAS,CAAC,GAE9BG,IAAMC,EAAY,CAACC,MAAsB;AAC7C,QAAIA,GAAM;AACR,YAAM,EAAE,QAAAC,GAAQ,GAAAC,EAAE,IAAIF,EAAK,sBAAsB;AACjD,MAAAN,EAAcO,CAAM,GACpBJ,EAASK,CAAC;AAAA,IACZ;AAAA,EACF,GAAG,CAAE,CAAA;AAEL,MAAI,EAAE,GAAGC,GAAa,GAAGC,EAAgB,IAAAC;AAAA,IACvCjB,IAASE;AAAA,IACTH;AAAA,IACAC;AAAA,EAAA;AAGF,QAAMkB,IAAUnB,MAAU,KACpBoB,IAAWpB,IAAQ,KACnBqB,IAAYrB,IAAQ;AAE1B,MAAIE,GAAY;AACd,UAAM,EAAE,GAAGoB,GAAe,GAAGC,EAAkB,IAAAL;AAAA,MAC7CjB;AAAA,MACAD;AAAA,MACAC;AAAA,IAAA;AAGY,IAAAe,IAAAM,IAAgBnB,KAAiBiB,IAAW,KAAK,IACjDH,IAAAM;AAAA,EAChB;AAEA,MAAI,CAACzB;AAAc,WAAA;AAEnB,MAAI0B,IAAepB,KAASe,IAAU,GAAGM,CAAa,OAAO;AACzD,MAAA,CAACD,KAAgBnB,GAAQ;AAC3B,UAAMqB,IAAWjB,IAAQH,GACnBqB,IAAclB;AAEL,IAAAe,IAAA;AAAA,MACbJ,KAAYf,IAASqB;AAAA,MACrBL,KAAahB,IAASqB;AAAA,MACtBL,KAAahB,IAASsB;AAAA,MACtBP,KAAYf,IAASsB;AAAA,IACvB,EACG,IAAI,CAACC,MAAUA,IAAO,GAAGH,CAAa,OAAO,GAAI,EACjD,KAAK,GAAG;AAAA,EACb;AAGE,SAAAI,gBAAAA,EAAA;AAAA,IAACC;AAAA,IAAA;AAAA,MACC,IAAI;AAAA,QACF,UAAU;AAAA,QACV,MAAM,GAAGd,CAAW;AAAA,QACpB,KAAK,GAAGC,CAAW;AAAA,MACrB;AAAA,MAEA,UAAAY,gBAAAA,EAAA;AAAA,QAACC;AAAA,QAAA;AAAA,UACC,IAAI;AAAA,YACF,WAAW;AAAA,YACX,UAAU;AAAA,YACV,KAAK,SAASxB,CAAU;AAAA,YACxB,MAAMa,IAAU,SAASC,IAAW,UAAU;AAAA,YAC9C,IAAI;AAAA,YACJ,IAAI,GAAGK,CAAa;AAAA,YACpB,aAAa1B;AAAA,YACb,aAAa;AAAA,YACb,aAAa;AAAA,YACb,cAAAyB;AAAA,YACA,IAAI;AAAA,YACJ,WAAW;AAAA,cACT,UAAUL,IAAU,SAAY,GAAGY,CAAU;AAAA,YAC/C;AAAA,UACF;AAAA,UACA,KAAApB;AAAA,UAEA,UAAAkB,gBAAAA,EAAA;AAAA,YAACG;AAAA,YAAA;AAAA,cACC,gBAAgB,CAAC,CAAC,IAAI,WAAW,CAAC;AAAA,cAClC,OAAM;AAAA,cACN,OAAOjC,MAAU,YAAYA,IAAQ;AAAA,cACrC,eAAc;AAAA,cACd,eAAc;AAAA,cAEb,UAAAD;AAAA,YAAA;AAAA,UACH;AAAA,QAAA;AAAA,MACF;AAAA,IAAA;AAAA,EAAA;AAGN;"}
|
|
@@ -1,54 +1,28 @@
|
|
|
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
|
-
m,
|
|
26
|
-
c
|
|
27
|
-
);
|
|
28
|
-
return /* @__PURE__ */ t.jsxs(t.Fragment, { children: [
|
|
29
|
-
/* @__PURE__ */ t.jsx(
|
|
30
|
-
M,
|
|
31
|
-
{
|
|
32
|
-
...e,
|
|
33
|
-
hideLabels: !0,
|
|
34
|
-
connected: f,
|
|
35
|
-
ref: r
|
|
36
|
-
}
|
|
37
|
-
),
|
|
38
|
-
!l && !g && /* @__PURE__ */ t.jsx(
|
|
39
|
-
b,
|
|
40
|
-
{
|
|
41
|
-
...e,
|
|
42
|
-
radius: R,
|
|
43
|
-
color: u.colors.cl_lightGrey,
|
|
44
|
-
alpha: h,
|
|
45
|
-
horizontal: j(e)
|
|
46
|
-
}
|
|
47
|
-
)
|
|
48
|
-
] });
|
|
49
|
-
}
|
|
50
|
-
);
|
|
1
|
+
import { j as x } from "./sd-component-library190.js";
|
|
2
|
+
import { getInnerX as u, degToRad as r, getInnerY as i } from "./sd-component-library86.js";
|
|
3
|
+
const j = (p) => {
|
|
4
|
+
const {
|
|
5
|
+
startX: $,
|
|
6
|
+
startY: e,
|
|
7
|
+
endX: a,
|
|
8
|
+
endY: d,
|
|
9
|
+
radius: n,
|
|
10
|
+
color: A,
|
|
11
|
+
width: t,
|
|
12
|
+
roundStart: l = !0,
|
|
13
|
+
roundEnd: I = !0,
|
|
14
|
+
startAlpha: o,
|
|
15
|
+
endAlpha: s
|
|
16
|
+
} = p, c = s - o, m = u($, r(o), t), X = i(e, r(o), t), Y = u(a, r(s), t), h = i(d, r(s), t);
|
|
17
|
+
return /* @__PURE__ */ x.jsx(
|
|
18
|
+
"path",
|
|
19
|
+
{
|
|
20
|
+
d: `M${$},${e} A${n},${n} 0 ${c > 180 ? "1" : "0"},1 ${a},${d} ${I ? `A${t / 2},${t / 2} 0 0,1 ` : "L"}${Y},${h} A${n - t},${n - t} 0 ${c > 180 ? "1" : "0"},0 ${m},${X} ${l ? `A${t / 2},${t / 2} 0 0,1 ` : "L"}${$},${e}`,
|
|
21
|
+
fill: A
|
|
22
|
+
}
|
|
23
|
+
);
|
|
24
|
+
};
|
|
51
25
|
export {
|
|
52
|
-
|
|
26
|
+
j as BaseOutlineArc
|
|
53
27
|
};
|
|
54
28
|
//# sourceMappingURL=sd-component-library311.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sd-component-library311.js","sources":["../src/components/meters/
|
|
1
|
+
{"version":3,"file":"sd-component-library311.js","sources":["../src/components/meters/outline-meter/partials/base-outline-arc/base-outline-arc.tsx"],"sourcesContent":["import React from \"react\";\n\nimport { degToRad, getInnerX, getInnerY } from \"../../utils\";\nimport { BaseOutlineArcProps as Props } from \"./interfaces\";\n\nexport const BaseOutlineArc: React.FC<Props> = (props) => {\n const {\n startX,\n startY,\n endX,\n endY,\n radius,\n color,\n width,\n roundStart = true,\n roundEnd = true,\n startAlpha,\n endAlpha,\n } = props;\n\n const arc = endAlpha - startAlpha;\n\n const startInnerX = getInnerX(startX, degToRad(startAlpha), width);\n const startInnerY = getInnerY(startY, degToRad(startAlpha), width);\n\n const endInnerX = getInnerX(endX, degToRad(endAlpha), width);\n const endInnerY = getInnerY(endY, degToRad(endAlpha), width);\n\n return (\n <path\n d={`M${startX},${startY} A${radius},${radius} 0 ${\n arc > 180 ? \"1\" : \"0\"\n },1 ${endX},${endY} ${\n roundEnd ? `A${width / 2},${width / 2} 0 0,1 ` : \"L\"\n }${endInnerX},${endInnerY} A${radius - width},${radius - width} 0 ${\n arc > 180 ? \"1\" : \"0\"\n },0 ${startInnerX},${startInnerY} ${\n roundStart ? `A${width / 2},${width / 2} 0 0,1 ` : \"L\"\n }${startX},${startY}`}\n fill={color}\n />\n );\n};\n"],"names":["BaseOutlineArc","props","startX","startY","endX","endY","radius","color","width","roundStart","roundEnd","startAlpha","endAlpha","arc","startInnerX","getInnerX","degToRad","startInnerY","getInnerY","endInnerX","endInnerY","jsx"],"mappings":";;AAKa,MAAAA,IAAkC,CAACC,MAAU;AAClD,QAAA;AAAA,IACJ,QAAAC;AAAA,IACA,QAAAC;AAAA,IACA,MAAAC;AAAA,IACA,MAAAC;AAAA,IACA,QAAAC;AAAA,IACA,OAAAC;AAAA,IACA,OAAAC;AAAA,IACA,YAAAC,IAAa;AAAA,IACb,UAAAC,IAAW;AAAA,IACX,YAAAC;AAAA,IACA,UAAAC;AAAA,EACE,IAAAX,GAEEY,IAAMD,IAAWD,GAEjBG,IAAcC,EAAUb,GAAQc,EAASL,CAAU,GAAGH,CAAK,GAC3DS,IAAcC,EAAUf,GAAQa,EAASL,CAAU,GAAGH,CAAK,GAE3DW,IAAYJ,EAAUX,GAAMY,EAASJ,CAAQ,GAAGJ,CAAK,GACrDY,IAAYF,EAAUb,GAAMW,EAASJ,CAAQ,GAAGJ,CAAK;AAGzD,SAAAa,gBAAAA,EAAA;AAAA,IAAC;AAAA,IAAA;AAAA,MACC,GAAG,IAAInB,CAAM,IAAIC,CAAM,KAAKG,CAAM,IAAIA,CAAM,MAC1CO,IAAM,MAAM,MAAM,GACpB,MAAMT,CAAI,IAAIC,CAAI,IAChBK,IAAW,IAAIF,IAAQ,CAAC,IAAIA,IAAQ,CAAC,YAAY,GACnD,GAAGW,CAAS,IAAIC,CAAS,KAAKd,IAASE,CAAK,IAAIF,IAASE,CAAK,MAC5DK,IAAM,MAAM,MAAM,GACpB,MAAMC,CAAW,IAAIG,CAAW,IAC9BR,IAAa,IAAID,IAAQ,CAAC,IAAIA,IAAQ,CAAC,YAAY,GACrD,GAAGN,CAAM,IAAIC,CAAM;AAAA,MACnB,MAAMI;AAAA,IAAA;AAAA,EAAA;AAGZ;"}
|
|
@@ -1,96 +1,38 @@
|
|
|
1
|
-
import { j as
|
|
2
|
-
|
|
3
|
-
import { Box as Y } from "rebass";
|
|
4
|
-
import { labelPaddingX as c, labelWidth as W } from "./sd-component-library224.js";
|
|
5
|
-
import { getCoordinateForArc as $ } from "./sd-component-library86.js";
|
|
6
|
-
import { ResponsiveTextV2 as z } from "./sd-component-library144.js";
|
|
7
|
-
const D = (j) => {
|
|
1
|
+
import { j as t } from "./sd-component-library190.js";
|
|
2
|
+
const h = (n) => {
|
|
8
3
|
const {
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
let x = y || s ? `${c}px` : void 0;
|
|
40
|
-
if (!x && i) {
|
|
41
|
-
const t = f - h, o = f;
|
|
42
|
-
x = [
|
|
43
|
-
n || i > t,
|
|
44
|
-
u || i > t,
|
|
45
|
-
u || i < o,
|
|
46
|
-
n || i < o
|
|
47
|
-
].map((l) => l ? `${c}px` : "0").join(" ");
|
|
48
|
-
}
|
|
49
|
-
return /* @__PURE__ */ a.jsx(
|
|
50
|
-
Y,
|
|
51
|
-
{
|
|
52
|
-
sx: {
|
|
53
|
-
position: "absolute",
|
|
54
|
-
left: `${b}px`,
|
|
55
|
-
top: `${g}px`
|
|
56
|
-
},
|
|
57
|
-
children: /* @__PURE__ */ a.jsx(
|
|
58
|
-
Y,
|
|
59
|
-
{
|
|
60
|
-
sx: {
|
|
61
|
-
boxSizing: "content-box",
|
|
62
|
-
position: "relative",
|
|
63
|
-
top: `calc(-${h}px)`,
|
|
64
|
-
left: s ? "-50%" : n ? "-100%" : void 0,
|
|
65
|
-
py: "7px",
|
|
66
|
-
px: `${c}px`,
|
|
67
|
-
borderColor: p,
|
|
68
|
-
borderWidth: "2px",
|
|
69
|
-
borderStyle: "solid",
|
|
70
|
-
borderRadius: x,
|
|
71
|
-
bg: "cl_white",
|
|
72
|
-
"& > div": {
|
|
73
|
-
maxWidth: s ? void 0 : `${W}px`
|
|
74
|
-
}
|
|
75
|
-
},
|
|
76
|
-
ref: T,
|
|
77
|
-
children: /* @__PURE__ */ a.jsx(
|
|
78
|
-
z,
|
|
79
|
-
{
|
|
80
|
-
fontSizeWeight: [[12, "semi-bold"]],
|
|
81
|
-
width: "max-content",
|
|
82
|
-
color: p !== "#CCD0DB" ? p : "cl_darkGrey",
|
|
83
|
-
textTransform: "uppercase",
|
|
84
|
-
letterSpacing: "1.8px",
|
|
85
|
-
children: d
|
|
86
|
-
}
|
|
87
|
-
)
|
|
88
|
-
}
|
|
89
|
-
)
|
|
90
|
-
}
|
|
91
|
-
);
|
|
4
|
+
color: s,
|
|
5
|
+
innerCircleRadius: $,
|
|
6
|
+
innerCircleStrokeWidth: d,
|
|
7
|
+
dx: i,
|
|
8
|
+
dy: r,
|
|
9
|
+
radius: e,
|
|
10
|
+
tipX: l,
|
|
11
|
+
tipY: o,
|
|
12
|
+
needleWidth: c
|
|
13
|
+
} = n;
|
|
14
|
+
return /* @__PURE__ */ t.jsxs("g", { children: [
|
|
15
|
+
/* @__PURE__ */ t.jsx(
|
|
16
|
+
"path",
|
|
17
|
+
{
|
|
18
|
+
d: `M${l - i},${o - r} A${c / 2},${c / 2} 0 0,0 ${l + i},${o + r} L${e + i},${e + r} L${e - i},${e - r} Z`,
|
|
19
|
+
fill: s
|
|
20
|
+
}
|
|
21
|
+
),
|
|
22
|
+
/* @__PURE__ */ t.jsx(
|
|
23
|
+
"circle",
|
|
24
|
+
{
|
|
25
|
+
cx: e,
|
|
26
|
+
cy: e,
|
|
27
|
+
r: $ + d,
|
|
28
|
+
strokeWidth: d,
|
|
29
|
+
stroke: s,
|
|
30
|
+
fill: "white"
|
|
31
|
+
}
|
|
32
|
+
)
|
|
33
|
+
] });
|
|
92
34
|
};
|
|
93
35
|
export {
|
|
94
|
-
|
|
36
|
+
h as BaseNeedle
|
|
95
37
|
};
|
|
96
38
|
//# sourceMappingURL=sd-component-library312.js.map
|