@selfdecode/sd-component-library 4.0.141 → 4.0.142
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/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-library106.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-library129.js +1 -1
- package/lib/sd-component-library133.js +3 -3
- package/lib/sd-component-library134.js +1 -1
- package/lib/sd-component-library136.js +2 -2
- package/lib/sd-component-library16.js +1 -1
- package/lib/sd-component-library167.js +1 -1
- package/lib/sd-component-library197.js +3 -3
- package/lib/sd-component-library201.js +3 -2
- package/lib/sd-component-library201.js.map +1 -1
- package/lib/sd-component-library202.js +57 -30
- package/lib/sd-component-library202.js.map +1 -1
- package/lib/sd-component-library203.js +2 -599
- package/lib/sd-component-library203.js.map +1 -1
- package/lib/sd-component-library204.js +30 -26
- package/lib/sd-component-library204.js.map +1 -1
- package/lib/sd-component-library205.js +599 -18
- package/lib/sd-component-library205.js.map +1 -1
- package/lib/sd-component-library206.js +19 -57
- package/lib/sd-component-library206.js.map +1 -1
- package/lib/sd-component-library207.js +18 -23
- package/lib/sd-component-library207.js.map +1 -1
- package/lib/sd-component-library208.js +62 -19
- package/lib/sd-component-library208.js.map +1 -1
- package/lib/sd-component-library209.js +23 -3
- package/lib/sd-component-library209.js.map +1 -1
- package/lib/sd-component-library210.js +21 -3
- package/lib/sd-component-library210.js.map +1 -1
- package/lib/sd-component-library211.js +3 -40
- package/lib/sd-component-library211.js.map +1 -1
- package/lib/sd-component-library212.js +3 -129
- package/lib/sd-component-library212.js.map +1 -1
- package/lib/sd-component-library213.js +26 -13
- package/lib/sd-component-library213.js.map +1 -1
- package/lib/sd-component-library214.js +3 -14
- package/lib/sd-component-library214.js.map +1 -1
- package/lib/sd-component-library215.js +31 -3
- package/lib/sd-component-library215.js.map +1 -1
- package/lib/sd-component-library216.js +19 -3
- package/lib/sd-component-library216.js.map +1 -1
- package/lib/sd-component-library217.js +20 -3
- package/lib/sd-component-library217.js.map +1 -1
- package/lib/sd-component-library218.js +28 -52
- package/lib/sd-component-library218.js.map +1 -1
- package/lib/sd-component-library219.js +29 -61
- package/lib/sd-component-library219.js.map +1 -1
- package/lib/sd-component-library220.js +3 -3
- package/lib/sd-component-library220.js.map +1 -1
- package/lib/sd-component-library221.js +129 -46
- package/lib/sd-component-library221.js.map +1 -1
- package/lib/sd-component-library222.js +43 -17
- package/lib/sd-component-library222.js.map +1 -1
- package/lib/sd-component-library223.js +43 -22
- package/lib/sd-component-library223.js.map +1 -1
- package/lib/sd-component-library224.js +7 -56
- package/lib/sd-component-library224.js.map +1 -1
- package/lib/sd-component-library225.js +64 -3
- package/lib/sd-component-library225.js.map +1 -1
- package/lib/sd-component-library226.js +43 -3
- package/lib/sd-component-library226.js.map +1 -1
- package/lib/sd-component-library227.js +13 -3
- package/lib/sd-component-library227.js.map +1 -1
- package/lib/sd-component-library228.js +21 -31
- package/lib/sd-component-library228.js.map +1 -1
- package/lib/sd-component-library229.js +108 -18
- package/lib/sd-component-library229.js.map +1 -1
- package/lib/sd-component-library230.js +46 -19
- package/lib/sd-component-library230.js.map +1 -1
- package/lib/sd-component-library231.js +24 -28
- package/lib/sd-component-library231.js.map +1 -1
- package/lib/sd-component-library232.js +49 -29
- package/lib/sd-component-library232.js.map +1 -1
- package/lib/sd-component-library233.js +47 -128
- package/lib/sd-component-library233.js.map +1 -1
- package/lib/sd-component-library234.js +72 -40
- package/lib/sd-component-library234.js.map +1 -1
- package/lib/sd-component-library235.js +39 -45
- package/lib/sd-component-library235.js.map +1 -1
- package/lib/sd-component-library236.js +27 -8
- package/lib/sd-component-library236.js.map +1 -1
- package/lib/sd-component-library237.js +20 -63
- package/lib/sd-component-library237.js.map +1 -1
- package/lib/sd-component-library238.js +20 -43
- package/lib/sd-component-library238.js.map +1 -1
- package/lib/sd-component-library239.js +2 -13
- package/lib/sd-component-library239.js.map +1 -1
- package/lib/sd-component-library24.js +1 -1
- package/lib/sd-component-library240.js +40 -21
- package/lib/sd-component-library240.js.map +1 -1
- package/lib/sd-component-library241.js +128 -108
- package/lib/sd-component-library241.js.map +1 -1
- package/lib/sd-component-library242.js +13 -47
- package/lib/sd-component-library242.js.map +1 -1
- package/lib/sd-component-library243.js +14 -24
- package/lib/sd-component-library243.js.map +1 -1
- package/lib/sd-component-library244.js +3 -53
- package/lib/sd-component-library244.js.map +1 -1
- package/lib/sd-component-library245.js +3 -48
- package/lib/sd-component-library245.js.map +1 -1
- package/lib/sd-component-library246.js +3 -41
- package/lib/sd-component-library246.js.map +1 -1
- package/lib/sd-component-library247.js +52 -27
- package/lib/sd-component-library247.js.map +1 -1
- package/lib/sd-component-library248.js +62 -72
- package/lib/sd-component-library248.js.map +1 -1
- package/lib/sd-component-library249.js +3 -21
- package/lib/sd-component-library249.js.map +1 -1
- package/lib/sd-component-library250.js +46 -20
- package/lib/sd-component-library250.js.map +1 -1
- package/lib/sd-component-library251.js +17 -2
- package/lib/sd-component-library251.js.map +1 -1
- package/lib/sd-component-library252.js +6 -6
- package/lib/sd-component-library254.js +21 -25
- package/lib/sd-component-library254.js.map +1 -1
- package/lib/sd-component-library256.js +22 -24
- package/lib/sd-component-library256.js.map +1 -1
- package/lib/sd-component-library258.js +25 -21
- package/lib/sd-component-library258.js.map +1 -1
- package/lib/sd-component-library259.js +24 -22
- package/lib/sd-component-library259.js.map +1 -1
- package/lib/sd-component-library262.js +1 -1
- package/lib/sd-component-library265.js +30 -122
- package/lib/sd-component-library265.js.map +1 -1
- package/lib/sd-component-library266.js +20 -9
- package/lib/sd-component-library266.js.map +1 -1
- package/lib/sd-component-library267.js +116 -41
- package/lib/sd-component-library267.js.map +1 -1
- package/lib/sd-component-library268.js +122 -30
- package/lib/sd-component-library268.js.map +1 -1
- package/lib/sd-component-library269.js +9 -20
- package/lib/sd-component-library269.js.map +1 -1
- package/lib/sd-component-library270.js +41 -116
- package/lib/sd-component-library270.js.map +1 -1
- package/lib/sd-component-library278.js +3 -2
- package/lib/sd-component-library278.js.map +1 -1
- package/lib/sd-component-library279.js +3 -2
- package/lib/sd-component-library279.js.map +1 -1
- package/lib/sd-component-library280.js +3 -70
- package/lib/sd-component-library280.js.map +1 -1
- package/lib/sd-component-library281.js +2 -102
- package/lib/sd-component-library281.js.map +1 -1
- package/lib/sd-component-library282.js +2 -106
- package/lib/sd-component-library282.js.map +1 -1
- package/lib/sd-component-library283.js +70 -10
- package/lib/sd-component-library283.js.map +1 -1
- package/lib/sd-component-library284.js +102 -2
- package/lib/sd-component-library284.js.map +1 -1
- package/lib/sd-component-library285.js +104 -34
- package/lib/sd-component-library285.js.map +1 -1
- package/lib/sd-component-library286.js +10 -14
- package/lib/sd-component-library286.js.map +1 -1
- package/lib/sd-component-library287.js +2 -2
- package/lib/sd-component-library288.js +36 -8
- package/lib/sd-component-library288.js.map +1 -1
- package/lib/sd-component-library289.js +14 -328
- package/lib/sd-component-library289.js.map +1 -1
- package/lib/sd-component-library290.js +2 -51
- package/lib/sd-component-library290.js.map +1 -1
- package/lib/sd-component-library291.js +8 -2
- package/lib/sd-component-library291.js.map +1 -1
- package/lib/sd-component-library292.js +324 -73
- package/lib/sd-component-library292.js.map +1 -1
- package/lib/sd-component-library293.js +48 -90
- package/lib/sd-component-library293.js.map +1 -1
- package/lib/sd-component-library294.js +2 -53
- package/lib/sd-component-library294.js.map +1 -1
- package/lib/sd-component-library295.js +76 -8
- package/lib/sd-component-library295.js.map +1 -1
- package/lib/sd-component-library296.js +92 -4
- package/lib/sd-component-library296.js.map +1 -1
- package/lib/sd-component-library297.js +48 -48
- package/lib/sd-component-library297.js.map +1 -1
- package/lib/sd-component-library298.js +9 -3
- package/lib/sd-component-library298.js.map +1 -1
- package/lib/sd-component-library299.js +5 -3
- package/lib/sd-component-library299.js.map +1 -1
- package/lib/sd-component-library300.js +53 -3
- package/lib/sd-component-library300.js.map +1 -1
- package/lib/sd-component-library301.js +9 -2
- package/lib/sd-component-library301.js.map +1 -1
- package/lib/sd-component-library302.js +5 -2
- package/lib/sd-component-library302.js.map +1 -1
- package/lib/sd-component-library303.js +3 -8
- package/lib/sd-component-library303.js.map +1 -1
- package/lib/sd-component-library304.js +19 -5
- package/lib/sd-component-library304.js.map +1 -1
- package/lib/sd-component-library305.js +3 -4
- package/lib/sd-component-library305.js.map +1 -1
- package/lib/sd-component-library306.js +2 -19
- package/lib/sd-component-library306.js.map +1 -1
- package/lib/sd-component-library307.js +2 -3
- package/lib/sd-component-library307.js.map +1 -1
- package/lib/sd-component-library309.js +21 -54
- package/lib/sd-component-library309.js.map +1 -1
- package/lib/sd-component-library310.js +50 -25
- package/lib/sd-component-library310.js.map +1 -1
- package/lib/sd-component-library311.js +33 -91
- package/lib/sd-component-library311.js.map +1 -1
- package/lib/sd-component-library312.js +5 -51
- package/lib/sd-component-library312.js.map +1 -1
- package/lib/sd-component-library313.js +91 -33
- package/lib/sd-component-library313.js.map +1 -1
- package/lib/sd-component-library314.js +4 -25
- package/lib/sd-component-library314.js.map +1 -1
- package/lib/sd-component-library315.js +57 -4
- package/lib/sd-component-library315.js.map +1 -1
- package/lib/sd-component-library316.js +26 -4
- package/lib/sd-component-library316.js.map +1 -1
- package/lib/sd-component-library318.js +89 -28
- package/lib/sd-component-library318.js.map +1 -1
- package/lib/sd-component-library319.js +25 -17
- package/lib/sd-component-library319.js.map +1 -1
- package/lib/sd-component-library320.js +20 -89
- package/lib/sd-component-library320.js.map +1 -1
- package/lib/sd-component-library48.js +1 -1
- package/lib/sd-component-library49.js +1 -1
- package/lib/sd-component-library51.js +3 -3
- package/lib/sd-component-library52.js +2 -2
- package/lib/sd-component-library53.js +2 -2
- package/lib/sd-component-library6.js +1 -1
- 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-library7.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-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,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-library228.js";
|
|
5
|
-
import { getCoordinateForArc as $ } from "./sd-component-library91.js";
|
|
6
|
-
import { ResponsiveTextV2 as z } from "./sd-component-library150.js";
|
|
7
|
-
const D = (j) => {
|
|
1
|
+
import { j as t } from "./sd-component-library197.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-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-needle/base-needle.tsx"],"sourcesContent":["import React from \"react\";\n\nimport { BaseNeedleProps as Props } from \"./interfaces\";\n\nexport const BaseNeedle: React.FC<Props> = (props) => {\n const {\n color,\n innerCircleRadius,\n innerCircleStrokeWidth,\n dx,\n dy,\n radius,\n tipX,\n tipY,\n needleWidth,\n } = props;\n\n return (\n <g>\n <path\n d={`M${tipX - dx},${tipY - dy} A${needleWidth / 2},${\n needleWidth / 2\n } 0 0,0 ${tipX + dx},${tipY + dy} L${radius + dx},${radius + dy} L${\n radius - dx\n },${radius - dy} Z`}\n fill={color}\n />\n <circle\n cx={radius}\n cy={radius}\n r={innerCircleRadius + innerCircleStrokeWidth}\n strokeWidth={innerCircleStrokeWidth}\n stroke={color}\n fill=\"white\"\n />\n </g>\n );\n};\n"],"names":["BaseNeedle","props","color","innerCircleRadius","innerCircleStrokeWidth","dx","dy","radius","tipX","tipY","needleWidth","jsx"],"mappings":";AAIa,MAAAA,IAA8B,CAACC,MAAU;AAC9C,QAAA;AAAA,IACJ,OAAAC;AAAA,IACA,mBAAAC;AAAA,IACA,wBAAAC;AAAA,IACA,IAAAC;AAAA,IACA,IAAAC;AAAA,IACA,QAAAC;AAAA,IACA,MAAAC;AAAA,IACA,MAAAC;AAAA,IACA,aAAAC;AAAA,EACE,IAAAT;AAEJ,gCACG,KACC,EAAA,UAAA;AAAA,IAAAU,gBAAAA,EAAA;AAAA,MAAC;AAAA,MAAA;AAAA,QACC,GAAG,IAAIH,IAAOH,CAAE,IAAII,IAAOH,CAAE,KAAKI,IAAc,CAAC,IAC/CA,IAAc,CAChB,UAAUF,IAAOH,CAAE,IAAII,IAAOH,CAAE,KAAKC,IAASF,CAAE,IAAIE,IAASD,CAAE,KAC7DC,IAASF,CACX,IAAIE,IAASD,CAAE;AAAA,QACf,MAAMJ;AAAA,MAAA;AAAA,IACR;AAAA,IACAS,gBAAAA,EAAA;AAAA,MAAC;AAAA,MAAA;AAAA,QACC,IAAIJ;AAAA,QACJ,IAAIA;AAAA,QACJ,GAAGJ,IAAoBC;AAAA,QACvB,aAAaA;AAAA,QACb,QAAQF;AAAA,QACR,MAAK;AAAA,MAAA;AAAA,IACP;AAAA,EACF,EAAA,CAAA;AAEJ;"}
|
|
@@ -1,54 +1,8 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
import { OutlineMeterRange as M } from "./sd-component-library233.js";
|
|
6
|
-
import { LabelPointer as b } from "./sd-component-library322.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
|
-
);
|
|
1
|
+
const p = (c, r, n, t) => {
|
|
2
|
+
const o = c - (r - 1) * n, s = t / r, e = (t + 1) / r, a = (360 - c) / 2 + n * t + o * s, S = a + o * (e - s);
|
|
3
|
+
return { rangeArcStart: a, rangeArcEnd: S };
|
|
4
|
+
};
|
|
51
5
|
export {
|
|
52
|
-
|
|
6
|
+
p as getRangeProperties
|
|
53
7
|
};
|
|
54
8
|
//# sourceMappingURL=sd-component-library312.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sd-component-library312.js","sources":["../src/components/meters/
|
|
1
|
+
{"version":3,"file":"sd-component-library312.js","sources":["../src/components/meters/multi-option-discrete-outline-meter/utils.ts"],"sourcesContent":["export const getRangeProperties = (\n arc: number,\n totalRanges: number,\n distanceBetweenRanges: number,\n idx: number\n) => {\n const arcForRanges = arc - (totalRanges - 1) * distanceBetweenRanges;\n\n const start = idx / totalRanges;\n const end = (idx + 1) / totalRanges;\n\n const arcStart = (360 - arc) / 2; // deg\n\n const rangeArcStart =\n arcStart + distanceBetweenRanges * idx + arcForRanges * start;\n\n const rangeArcEnd = rangeArcStart + arcForRanges * (end - start);\n\n return { rangeArcStart, rangeArcEnd };\n};\n"],"names":["getRangeProperties","arc","totalRanges","distanceBetweenRanges","idx","arcForRanges","start","end","rangeArcStart","rangeArcEnd"],"mappings":"AAAO,MAAMA,IAAqB,CAChCC,GACAC,GACAC,GACAC,MACG;AACG,QAAAC,IAAeJ,KAAOC,IAAc,KAAKC,GAEzCG,IAAQF,IAAMF,GACdK,KAAOH,IAAM,KAAKF,GAIlBM,KAFY,MAAMP,KAAO,IAGlBE,IAAwBC,IAAMC,IAAeC,GAEpDG,IAAcD,IAAgBH,KAAgBE,IAAMD;AAEnD,SAAA,EAAE,eAAAE,GAAe,aAAAC;AAC1B;"}
|
|
@@ -1,38 +1,96 @@
|
|
|
1
|
-
import { j as
|
|
2
|
-
|
|
1
|
+
import { j as a } from "./sd-component-library197.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-library215.js";
|
|
5
|
+
import { getCoordinateForArc as $ } from "./sd-component-library91.js";
|
|
6
|
+
import { ResponsiveTextV2 as z } from "./sd-component-library150.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-library313.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sd-component-library313.js","sources":["../src/components/meters/outline-meter
|
|
1
|
+
{"version":3,"file":"sd-component-library313.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,28 +1,7 @@
|
|
|
1
|
-
import { j as
|
|
2
|
-
import {
|
|
3
|
-
const
|
|
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
|
-
};
|
|
1
|
+
import { j as e } from "./sd-component-library197.js";
|
|
2
|
+
import { LabelPointer as t } from "./sd-component-library322.js";
|
|
3
|
+
const s = (r) => /* @__PURE__ */ e.jsx(t, { ...r });
|
|
25
4
|
export {
|
|
26
|
-
|
|
5
|
+
s as DiscreteMeterLabelPointer
|
|
27
6
|
};
|
|
28
7
|
//# sourceMappingURL=sd-component-library314.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sd-component-library314.js","sources":["../src/components/meters/outline-meter/partials/
|
|
1
|
+
{"version":3,"file":"sd-component-library314.js","sources":["../src/components/meters/multi-option-discrete-outline-meter/partials/discrete-meter-label-pointer/discrete-meter-label-pointer.tsx"],"sourcesContent":["import React from \"react\";\n\nimport { LabelPointer } from \"../../../common-outline-meter-partials\";\nimport { DiscreteMeterLabelPointerProps as Props } from \"./interfaces\";\n\nexport const DiscreteMeterLabelPointer: React.FC<Props> = (props) => {\n return <LabelPointer {...props} />;\n};\n"],"names":["DiscreteMeterLabelPointer","props","jsx","LabelPointer"],"mappings":";;AAKa,MAAAA,IAA6C,CAACC,MAClDC,gBAAAA,EAAA,IAACC,GAAc,EAAA,GAAGF,EAAO,CAAA;"}
|
|
@@ -1,8 +1,61 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
import { j as e } from "./sd-component-library197.js";
|
|
2
|
+
import { useMemo as h } from "react";
|
|
3
|
+
import { Flex as p, Box as j } from "rebass";
|
|
4
|
+
import { SixteenRegular as l } from "./sd-component-library151.js";
|
|
5
|
+
import { ThirteenRegular as i } from "./sd-component-library155.js";
|
|
6
|
+
function b(o) {
|
|
7
|
+
const { synonyms: t, value: r, onSelect: c } = o, n = h(() => t[0], [t]), x = h(() => t.slice(1), [t]), a = h(() => {
|
|
8
|
+
const s = n.toLowerCase().indexOf(r.toLowerCase());
|
|
9
|
+
return /* @__PURE__ */ e.jsxs(p, { children: [
|
|
10
|
+
/* @__PURE__ */ e.jsx(l, { width: [""], cursor: "inherit", children: /* @__PURE__ */ e.jsx("span", { style: { whiteSpace: "pre" }, children: n.substring(0, s) }) }),
|
|
11
|
+
/* @__PURE__ */ e.jsx(l, { width: [""], color: "cl_purple", cursor: "inherit", children: /* @__PURE__ */ e.jsx("span", { style: { whiteSpace: "pre" }, children: n.substring(s, s + r.length) }) }),
|
|
12
|
+
/* @__PURE__ */ e.jsx(l, { width: [""], cursor: "inherit", children: /* @__PURE__ */ e.jsx("span", { style: { whiteSpace: "pre" }, children: n.substring(s + r.length) }) })
|
|
13
|
+
] });
|
|
14
|
+
}, [n, r]);
|
|
15
|
+
return /* @__PURE__ */ e.jsxs(
|
|
16
|
+
j,
|
|
17
|
+
{
|
|
18
|
+
sx: {
|
|
19
|
+
p: "10px 16px",
|
|
20
|
+
cursor: "pointer"
|
|
21
|
+
},
|
|
22
|
+
onClick: (s) => c(n),
|
|
23
|
+
"data-test": "result-box",
|
|
24
|
+
children: [
|
|
25
|
+
a,
|
|
26
|
+
/* @__PURE__ */ e.jsx(p, { flexWrap: "wrap", children: x.map((s, d, u) => /* @__PURE__ */ e.jsx(
|
|
27
|
+
m,
|
|
28
|
+
{
|
|
29
|
+
value: r,
|
|
30
|
+
synonym: s,
|
|
31
|
+
appendSlash: d !== u.length - 1
|
|
32
|
+
},
|
|
33
|
+
s
|
|
34
|
+
)) })
|
|
35
|
+
]
|
|
36
|
+
}
|
|
37
|
+
);
|
|
38
|
+
}
|
|
39
|
+
const m = (o) => {
|
|
40
|
+
const { value: t, synonym: r, appendSlash: c } = o, n = r.toLowerCase().indexOf(t.toLowerCase());
|
|
41
|
+
return /* @__PURE__ */ e.jsxs(p, { children: [
|
|
42
|
+
n !== -1 ? /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
|
|
43
|
+
/* @__PURE__ */ e.jsx(i, { width: [""], cursor: "inherit", children: /* @__PURE__ */ e.jsx("span", { style: { whiteSpace: "pre" }, children: r.substring(0, n) }) }),
|
|
44
|
+
/* @__PURE__ */ e.jsx(i, { width: [""], color: "cl_purple", cursor: "inherit", children: /* @__PURE__ */ e.jsx("span", { style: { whiteSpace: "pre" }, children: r.substring(n, n + t.length) }) }),
|
|
45
|
+
/* @__PURE__ */ e.jsx(i, { width: [""], cursor: "inherit", children: /* @__PURE__ */ e.jsx("span", { style: { whiteSpace: "pre" }, children: r.substring(n + t.length) }) })
|
|
46
|
+
] }) : /* @__PURE__ */ e.jsx(i, { width: [""], cursor: "inherit", children: /* @__PURE__ */ e.jsx("span", { style: { whiteSpace: "pre" }, children: r }) }),
|
|
47
|
+
c && /* @__PURE__ */ e.jsx(
|
|
48
|
+
i,
|
|
49
|
+
{
|
|
50
|
+
color: "cl_darkGrey",
|
|
51
|
+
width: ["12px"],
|
|
52
|
+
textAlign: "center",
|
|
53
|
+
children: "/"
|
|
54
|
+
}
|
|
55
|
+
)
|
|
56
|
+
] }, r);
|
|
4
57
|
};
|
|
5
58
|
export {
|
|
6
|
-
|
|
59
|
+
b as AutocompleteOptionBox
|
|
7
60
|
};
|
|
8
61
|
//# sourceMappingURL=sd-component-library315.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sd-component-library315.js","sources":["../src/components/
|
|
1
|
+
{"version":3,"file":"sd-component-library315.js","sources":["../src/components/inputs/autocomplete-input/partials/autocomplete-option-box/autocomplete-option-box.tsx"],"sourcesContent":["import React, { PropsWithChildren, useMemo } from \"react\";\n\nimport { Box, Flex } from \"rebass\";\n\nimport { SixteenRegular } from \"../../../../texts/sixteen-regular\";\nimport { ThirteenRegular } from \"../../../../texts/thirteen-regular\";\nimport { AutocompleteOptionBox as Props } from \"./interfaces\";\n\nexport function AutocompleteOptionBox<T>(props: PropsWithChildren<Props<T>>) {\n const { synonyms, value, onSelect } = props;\n\n /* Synonym that first matches the query */\n const matchingSynonym = useMemo(() => synonyms[0], [synonyms]);\n /* List of synonyms to be displayed below the matching synonym */\n const otherSynonyms = useMemo(() => synonyms.slice(1), [synonyms]);\n\n const renderMatchingSynonym = useMemo(() => {\n const startIndex = matchingSynonym\n .toLowerCase()\n .indexOf(value.toLowerCase());\n\n return (\n <Flex>\n <SixteenRegular width={[\"\"]} cursor={\"inherit\"}>\n <span style={{ whiteSpace: \"pre\" }}>\n {matchingSynonym.substring(0, startIndex)}\n </span>\n </SixteenRegular>\n <SixteenRegular width={[\"\"]} color=\"cl_purple\" cursor={\"inherit\"}>\n <span style={{ whiteSpace: \"pre\" }}>\n {matchingSynonym.substring(startIndex, startIndex + value.length)}\n </span>\n </SixteenRegular>\n <SixteenRegular width={[\"\"]} cursor={\"inherit\"}>\n <span style={{ whiteSpace: \"pre\" }}>\n {matchingSynonym.substring(startIndex + value.length)}\n </span>\n </SixteenRegular>\n </Flex>\n );\n }, [matchingSynonym, value]);\n\n return (\n <Box\n sx={{\n p: \"10px 16px\",\n cursor: \"pointer\",\n }}\n onClick={(x) => onSelect(matchingSynonym)}\n data-test=\"result-box\"\n >\n {renderMatchingSynonym}\n <Flex flexWrap=\"wrap\">\n {otherSynonyms.map((synonym, idx, arr) => (\n <OtherSynonym\n key={synonym}\n value={value}\n synonym={synonym}\n appendSlash={idx !== arr.length - 1}\n />\n ))}\n </Flex>\n </Box>\n );\n}\n\nconst OtherSynonym: React.FC<{\n value: string;\n synonym: string;\n appendSlash: boolean;\n}> = (props) => {\n const { value, synonym, appendSlash } = props;\n const matchIdx = synonym.toLowerCase().indexOf(value.toLowerCase());\n\n return (\n <Flex key={synonym}>\n {matchIdx !== -1 ? (\n <>\n <ThirteenRegular width={[\"\"]} cursor={\"inherit\"}>\n <span style={{ whiteSpace: \"pre\" }}>\n {synonym.substring(0, matchIdx)}\n </span>\n </ThirteenRegular>\n <ThirteenRegular width={[\"\"]} color=\"cl_purple\" cursor={\"inherit\"}>\n <span style={{ whiteSpace: \"pre\" }}>\n {synonym.substring(matchIdx, matchIdx + value.length)}\n </span>\n </ThirteenRegular>\n <ThirteenRegular width={[\"\"]} cursor={\"inherit\"}>\n <span style={{ whiteSpace: \"pre\" }}>\n {synonym.substring(matchIdx + value.length)}\n </span>\n </ThirteenRegular>\n </>\n ) : (\n <ThirteenRegular width={[\"\"]} cursor={\"inherit\"}>\n <span style={{ whiteSpace: \"pre\" }}>{synonym}</span>\n </ThirteenRegular>\n )}\n\n {appendSlash && (\n <ThirteenRegular\n color=\"cl_darkGrey\"\n width={[\"12px\"]}\n textAlign=\"center\"\n >\n /\n </ThirteenRegular>\n )}\n </Flex>\n );\n};\n"],"names":["AutocompleteOptionBox","props","synonyms","value","onSelect","matchingSynonym","useMemo","otherSynonyms","renderMatchingSynonym","startIndex","Flex","jsx","SixteenRegular","jsxs","Box","x","synonym","idx","arr","OtherSynonym","appendSlash","matchIdx","Fragment","ThirteenRegular"],"mappings":"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"}
|
|
@@ -1,7 +1,29 @@
|
|
|
1
|
-
import { j as
|
|
2
|
-
import {
|
|
3
|
-
const
|
|
1
|
+
import { j as r } from "./sd-component-library197.js";
|
|
2
|
+
import { ResponsiveTextV2 as s } from "./sd-component-library150.js";
|
|
3
|
+
const x = (t) => {
|
|
4
|
+
const { onClick: e, title: o, height: i } = t;
|
|
5
|
+
return /* @__PURE__ */ r.jsx(
|
|
6
|
+
s,
|
|
7
|
+
{
|
|
8
|
+
fontSizeWeight: [[16, "regular"]],
|
|
9
|
+
sx: {
|
|
10
|
+
position: "relative",
|
|
11
|
+
height: `${i}px`,
|
|
12
|
+
px: "15px",
|
|
13
|
+
display: "flex",
|
|
14
|
+
justifyContent: "flex-start",
|
|
15
|
+
alignItems: "center",
|
|
16
|
+
opacity: 0.8,
|
|
17
|
+
":hover": {
|
|
18
|
+
opacity: 1
|
|
19
|
+
}
|
|
20
|
+
},
|
|
21
|
+
onClick: e,
|
|
22
|
+
children: o
|
|
23
|
+
}
|
|
24
|
+
);
|
|
25
|
+
};
|
|
4
26
|
export {
|
|
5
|
-
|
|
27
|
+
x as SearchAutocompleteRow
|
|
6
28
|
};
|
|
7
29
|
//# sourceMappingURL=sd-component-library316.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sd-component-library316.js","sources":["../src/components/
|
|
1
|
+
{"version":3,"file":"sd-component-library316.js","sources":["../src/components/inputs/search-autocomplete-input/partials/search-autocomplete-row/search-autocomplete-row.tsx"],"sourcesContent":["import React from \"react\";\n\nimport { ResponsiveTextV2 } from \"../../../../texts/responsive-text-v2\";\nimport { SearchAutocompleteRowProps as Props } from \"./interfaces\";\n\nexport const SearchAutocompleteRow = <\n T extends { id: string } = { id: string }\n>(\n props: Props<T>\n) => {\n const { onClick, title, height } = props;\n\n return (\n <ResponsiveTextV2\n fontSizeWeight={[[16, \"regular\"]]}\n sx={{\n position: \"relative\",\n height: `${height}px`,\n px: \"15px\",\n display: \"flex\",\n justifyContent: \"flex-start\",\n alignItems: \"center\",\n opacity: 0.8,\n \":hover\": {\n opacity: 1,\n },\n }}\n onClick={onClick}\n >\n {title}\n </ResponsiveTextV2>\n );\n};\n"],"names":["SearchAutocompleteRow","props","onClick","title","height","jsx","ResponsiveTextV2"],"mappings":";;AAKa,MAAAA,IAAwB,CAGnCC,MACG;AACH,QAAM,EAAE,SAAAC,GAAS,OAAAC,GAAO,QAAAC,EAAA,IAAWH;AAGjC,SAAAI,gBAAAA,EAAA;AAAA,IAACC;AAAA,IAAA;AAAA,MACC,gBAAgB,CAAC,CAAC,IAAI,SAAS,CAAC;AAAA,MAChC,IAAI;AAAA,QACF,UAAU;AAAA,QACV,QAAQ,GAAGF,CAAM;AAAA,QACjB,IAAI;AAAA,QACJ,SAAS;AAAA,QACT,gBAAgB;AAAA,QAChB,YAAY;AAAA,QACZ,SAAS;AAAA,QACT,UAAU;AAAA,UACR,SAAS;AAAA,QACX;AAAA,MACF;AAAA,MACA,SAAAF;AAAA,MAEC,UAAAC;AAAA,IAAA;AAAA,EAAA;AAGP;"}
|