@selfdecode/sd-component-library 4.0.118 → 4.0.119-test2
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-library102.js +2 -2
- package/lib/sd-component-library103.js +3 -3
- package/lib/sd-component-library114.js +1 -1
- package/lib/sd-component-library119.js +1 -1
- package/lib/sd-component-library120.js +2 -2
- package/lib/sd-component-library122.js +1 -1
- package/lib/sd-component-library128.js +1 -1
- package/lib/sd-component-library129.js +1 -1
- package/lib/sd-component-library131.js +1 -1
- package/lib/sd-component-library16.js +1 -1
- package/lib/sd-component-library174.js +26 -22
- package/lib/sd-component-library174.js.map +1 -1
- package/lib/sd-component-library175.js +1 -1
- package/lib/sd-component-library198.js +3 -3
- package/lib/sd-component-library202.js +2 -57
- package/lib/sd-component-library202.js.map +1 -1
- package/lib/sd-component-library203.js +30 -3
- package/lib/sd-component-library203.js.map +1 -1
- package/lib/sd-component-library204.js +598 -24
- 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 +57 -5
- package/lib/sd-component-library206.js.map +1 -1
- package/lib/sd-component-library207.js +25 -5
- package/lib/sd-component-library207.js.map +1 -1
- package/lib/sd-component-library208.js +19 -2
- package/lib/sd-component-library208.js.map +1 -1
- package/lib/sd-component-library209.js +5 -30
- package/lib/sd-component-library209.js.map +1 -1
- package/lib/sd-component-library210.js +5 -599
- package/lib/sd-component-library210.js.map +1 -1
- package/lib/sd-component-library211.js +21 -18
- package/lib/sd-component-library211.js.map +1 -1
- package/lib/sd-component-library212.js +3 -64
- package/lib/sd-component-library212.js.map +1 -1
- package/lib/sd-component-library213.js +3 -23
- package/lib/sd-component-library213.js.map +1 -1
- package/lib/sd-component-library214.js +62 -19
- package/lib/sd-component-library214.js.map +1 -1
- package/lib/sd-component-library215.js +23 -3
- package/lib/sd-component-library215.js.map +1 -1
- package/lib/sd-component-library216.js +40 -3
- package/lib/sd-component-library216.js.map +1 -1
- package/lib/sd-component-library217.js +129 -3
- package/lib/sd-component-library217.js.map +1 -1
- package/lib/sd-component-library218.js +13 -31
- package/lib/sd-component-library218.js.map +1 -1
- package/lib/sd-component-library219.js +3 -19
- package/lib/sd-component-library219.js.map +1 -1
- package/lib/sd-component-library220.js +51 -19
- package/lib/sd-component-library220.js.map +1 -1
- package/lib/sd-component-library221.js +12 -26
- package/lib/sd-component-library221.js.map +1 -1
- package/lib/sd-component-library222.js +3 -33
- package/lib/sd-component-library222.js.map +1 -1
- package/lib/sd-component-library223.js +3 -3
- package/lib/sd-component-library223.js.map +1 -1
- package/lib/sd-component-library224.js +65 -64
- package/lib/sd-component-library224.js.map +1 -1
- package/lib/sd-component-library225.js +3 -43
- package/lib/sd-component-library225.js.map +1 -1
- package/lib/sd-component-library226.js +45 -42
- package/lib/sd-component-library226.js.map +1 -1
- package/lib/sd-component-library227.js +17 -13
- package/lib/sd-component-library227.js.map +1 -1
- package/lib/sd-component-library228.js +17 -20
- package/lib/sd-component-library228.js.map +1 -1
- package/lib/sd-component-library229.js +3 -109
- package/lib/sd-component-library229.js.map +1 -1
- package/lib/sd-component-library230.js +31 -47
- package/lib/sd-component-library230.js.map +1 -1
- package/lib/sd-component-library231.js +19 -24
- package/lib/sd-component-library231.js.map +1 -1
- package/lib/sd-component-library232.js +19 -52
- package/lib/sd-component-library232.js.map +1 -1
- package/lib/sd-component-library233.js +27 -47
- package/lib/sd-component-library233.js.map +1 -1
- package/lib/sd-component-library234.js +30 -72
- package/lib/sd-component-library234.js.map +1 -1
- package/lib/sd-component-library235.js +3 -129
- package/lib/sd-component-library235.js.map +1 -1
- package/lib/sd-component-library236.js +62 -45
- package/lib/sd-component-library236.js.map +1 -1
- package/lib/sd-component-library237.js +42 -7
- package/lib/sd-component-library237.js.map +1 -1
- package/lib/sd-component-library238.js +43 -41
- package/lib/sd-component-library238.js.map +1 -1
- package/lib/sd-component-library239.js +13 -27
- package/lib/sd-component-library239.js.map +1 -1
- package/lib/sd-component-library24.js +2 -2
- package/lib/sd-component-library240.js +128 -20
- package/lib/sd-component-library240.js.map +1 -1
- package/lib/sd-component-library241.js +47 -20
- package/lib/sd-component-library241.js.map +1 -1
- package/lib/sd-component-library242.js +8 -2
- package/lib/sd-component-library242.js.map +1 -1
- package/lib/sd-component-library244.js +21 -40
- package/lib/sd-component-library244.js.map +1 -1
- package/lib/sd-component-library245.js +108 -128
- package/lib/sd-component-library245.js.map +1 -1
- package/lib/sd-component-library246.js +47 -13
- package/lib/sd-component-library246.js.map +1 -1
- package/lib/sd-component-library247.js +24 -14
- package/lib/sd-component-library247.js.map +1 -1
- package/lib/sd-component-library248.js +53 -3
- package/lib/sd-component-library248.js.map +1 -1
- package/lib/sd-component-library249.js +21 -3
- package/lib/sd-component-library249.js.map +1 -1
- package/lib/sd-component-library25.js +2 -2
- package/lib/sd-component-library250.js +20 -3
- package/lib/sd-component-library250.js.map +1 -1
- package/lib/sd-component-library251.js +45 -49
- package/lib/sd-component-library251.js.map +1 -1
- package/lib/sd-component-library252.js +72 -62
- package/lib/sd-component-library252.js.map +1 -1
- package/lib/sd-component-library253.js +41 -3
- package/lib/sd-component-library253.js.map +1 -1
- package/lib/sd-component-library254.js +27 -46
- package/lib/sd-component-library254.js.map +1 -1
- package/lib/sd-component-library255.js +2 -17
- package/lib/sd-component-library255.js.map +1 -1
- package/lib/sd-component-library256.js +6 -6
- package/lib/sd-component-library26.js +1 -1
- package/lib/sd-component-library264.js +30 -51
- package/lib/sd-component-library264.js.map +1 -1
- package/lib/sd-component-library265.js +51 -30
- package/lib/sd-component-library265.js.map +1 -1
- package/lib/sd-component-library266.js +1 -1
- package/lib/sd-component-library276.js +49 -51
- package/lib/sd-component-library276.js.map +1 -1
- package/lib/sd-component-library277.js +48 -87
- package/lib/sd-component-library277.js.map +1 -1
- package/lib/sd-component-library278.js +52 -54
- package/lib/sd-component-library278.js.map +1 -1
- package/lib/sd-component-library279.js +91 -48
- package/lib/sd-component-library279.js.map +1 -1
- package/lib/sd-component-library282.js +2 -3
- package/lib/sd-component-library282.js.map +1 -1
- package/lib/sd-component-library283.js +2 -3
- package/lib/sd-component-library283.js.map +1 -1
- package/lib/sd-component-library284.js +70 -3
- package/lib/sd-component-library284.js.map +1 -1
- package/lib/sd-component-library285.js +102 -6
- package/lib/sd-component-library285.js.map +1 -1
- package/lib/sd-component-library286.js +106 -2
- package/lib/sd-component-library286.js.map +1 -1
- package/lib/sd-component-library287.js +10 -2
- package/lib/sd-component-library287.js.map +1 -1
- package/lib/sd-component-library288.js +6 -10
- package/lib/sd-component-library288.js.map +1 -1
- package/lib/sd-component-library289.js +2 -70
- package/lib/sd-component-library289.js.map +1 -1
- package/lib/sd-component-library290.js +35 -101
- package/lib/sd-component-library290.js.map +1 -1
- package/lib/sd-component-library291.js +14 -106
- package/lib/sd-component-library291.js.map +1 -1
- package/lib/sd-component-library292.js +2 -2
- package/lib/sd-component-library293.js +8 -36
- package/lib/sd-component-library293.js.map +1 -1
- package/lib/sd-component-library294.js +328 -14
- package/lib/sd-component-library294.js.map +1 -1
- package/lib/sd-component-library295.js +51 -2
- package/lib/sd-component-library295.js.map +1 -1
- package/lib/sd-component-library296.js +3 -8
- package/lib/sd-component-library296.js.map +1 -1
- package/lib/sd-component-library297.js +3 -328
- package/lib/sd-component-library297.js.map +1 -1
- package/lib/sd-component-library298.js +3 -51
- package/lib/sd-component-library298.js.map +1 -1
- package/lib/sd-component-library300.js +1 -1
- package/lib/sd-component-library301.js +1 -1
- package/lib/sd-component-library306.js +2 -9
- package/lib/sd-component-library306.js.map +1 -1
- package/lib/sd-component-library307.js +2 -5
- package/lib/sd-component-library307.js.map +1 -1
- package/lib/sd-component-library308.js +8 -3
- package/lib/sd-component-library308.js.map +1 -1
- package/lib/sd-component-library309.js +5 -19
- package/lib/sd-component-library309.js.map +1 -1
- package/lib/sd-component-library310.js +4 -3
- package/lib/sd-component-library310.js.map +1 -1
- package/lib/sd-component-library311.js +19 -2
- package/lib/sd-component-library311.js.map +1 -1
- package/lib/sd-component-library312.js +3 -2
- package/lib/sd-component-library312.js.map +1 -1
- package/lib/sd-component-library314.js +51 -86
- package/lib/sd-component-library314.js.map +1 -1
- package/lib/sd-component-library315.js +25 -50
- package/lib/sd-component-library315.js.map +1 -1
- package/lib/sd-component-library316.js +88 -20
- package/lib/sd-component-library316.js.map +1 -1
- package/lib/sd-component-library317.js +51 -5
- package/lib/sd-component-library317.js.map +1 -1
- package/lib/sd-component-library318.js +5 -4
- package/lib/sd-component-library318.js.map +1 -1
- package/lib/sd-component-library319.js +23 -33
- package/lib/sd-component-library319.js.map +1 -1
- package/lib/sd-component-library320.js +3 -57
- package/lib/sd-component-library320.js.map +1 -1
- package/lib/sd-component-library321.js +34 -25
- package/lib/sd-component-library321.js.map +1 -1
- package/lib/sd-component-library323.js +28 -89
- package/lib/sd-component-library323.js.map +1 -1
- package/lib/sd-component-library324.js +17 -25
- package/lib/sd-component-library324.js.map +1 -1
- package/lib/sd-component-library325.js +89 -20
- package/lib/sd-component-library325.js.map +1 -1
- package/lib/sd-component-library50.js +1 -1
- package/lib/sd-component-library51.js +1 -1
- package/lib/sd-component-library53.js +3 -3
- package/lib/sd-component-library54.js +2 -2
- package/lib/sd-component-library55.js +2 -2
- package/lib/sd-component-library59.js +49 -45
- package/lib/sd-component-library59.js.map +1 -1
- package/lib/sd-component-library6.js +1 -1
- package/lib/sd-component-library62.js +1 -1
- package/lib/sd-component-library63.js +2 -2
- package/lib/sd-component-library64.js +5 -5
- package/lib/sd-component-library65.js +1 -1
- package/lib/sd-component-library66.js +2 -2
- package/lib/sd-component-library67.js +1 -1
- package/lib/sd-component-library7.js +1 -1
- package/lib/sd-component-library72.js +2 -2
- package/lib/sd-component-library74.js +3 -3
- package/lib/sd-component-library76.js +2 -2
- package/lib/sd-component-library77.js +3 -3
- package/lib/sd-component-library78.js +1 -1
- package/lib/sd-component-library79.js +1 -1
- package/lib/sd-component-library81.js +1 -1
- package/lib/sd-component-library82.js +1 -1
- package/lib/sd-component-library88.js +6 -6
- package/lib/sd-component-library89.js +2 -2
- package/lib/sd-component-library90.js +1 -1
- package/lib/sd-component-library91.js +5 -5
- package/lib/sd-component-library92.js +1 -1
- package/lib/sd-component-library94.js +6 -6
- package/lib/sd-component-library95.js +1 -1
- package/lib/sd-component-library96.js +7 -7
- package/lib/sd-component-library97.js +1 -1
- package/package.json +1 -1
|
@@ -1,5 +1,22 @@
|
|
|
1
|
-
|
|
1
|
+
import e from "./sd-component-library291.js";
|
|
2
|
+
var n = process.env.NODE_ENV !== "production" ? e.oneOfType([e.number, e.shape({
|
|
3
|
+
enter: e.number,
|
|
4
|
+
exit: e.number,
|
|
5
|
+
appear: e.number
|
|
6
|
+
}).isRequired]) : null;
|
|
7
|
+
process.env.NODE_ENV !== "production" && e.oneOfType([e.string, e.shape({
|
|
8
|
+
enter: e.string,
|
|
9
|
+
exit: e.string,
|
|
10
|
+
active: e.string
|
|
11
|
+
}), e.shape({
|
|
12
|
+
enter: e.string,
|
|
13
|
+
enterDone: e.string,
|
|
14
|
+
enterActive: e.string,
|
|
15
|
+
exit: e.string,
|
|
16
|
+
exitDone: e.string,
|
|
17
|
+
exitActive: e.string
|
|
18
|
+
})]);
|
|
2
19
|
export {
|
|
3
|
-
|
|
20
|
+
n as timeoutsShape
|
|
4
21
|
};
|
|
5
22
|
//# sourceMappingURL=sd-component-library311.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sd-component-library311.js","sources":[],"sourcesContent":[],"names":[],"mappings":";"}
|
|
1
|
+
{"version":3,"file":"sd-component-library311.js","sources":["../node_modules/react-transition-group/esm/utils/PropTypes.js"],"sourcesContent":["import PropTypes from 'prop-types';\nexport var timeoutsShape = process.env.NODE_ENV !== 'production' ? PropTypes.oneOfType([PropTypes.number, PropTypes.shape({\n enter: PropTypes.number,\n exit: PropTypes.number,\n appear: PropTypes.number\n}).isRequired]) : null;\nexport var classNamesShape = process.env.NODE_ENV !== 'production' ? PropTypes.oneOfType([PropTypes.string, PropTypes.shape({\n enter: PropTypes.string,\n exit: PropTypes.string,\n active: PropTypes.string\n}), PropTypes.shape({\n enter: PropTypes.string,\n enterDone: PropTypes.string,\n enterActive: PropTypes.string,\n exit: PropTypes.string,\n exitDone: PropTypes.string,\n exitActive: PropTypes.string\n})]) : null;"],"names":["timeoutsShape","PropTypes"],"mappings":";AACU,IAACA,IAAgB,QAAQ,IAAI,aAAa,eAAeC,EAAU,UAAU,CAACA,EAAU,QAAQA,EAAU,MAAM;AAAA,EACxH,OAAOA,EAAU;AAAA,EACjB,MAAMA,EAAU;AAAA,EAChB,QAAQA,EAAU;AACpB,CAAC,EAAE,UAAU,CAAC,IAAI;AACW,QAAQ,IAAI,aAAa,gBAAeA,EAAU,UAAU,CAACA,EAAU,QAAQA,EAAU,MAAM;AAAA,EAC1H,OAAOA,EAAU;AAAA,EACjB,MAAMA,EAAU;AAAA,EAChB,QAAQA,EAAU;AACpB,CAAC,GAAGA,EAAU,MAAM;AAAA,EAClB,OAAOA,EAAU;AAAA,EACjB,WAAWA,EAAU;AAAA,EACrB,aAAaA,EAAU;AAAA,EACvB,MAAMA,EAAU;AAAA,EAChB,UAAUA,EAAU;AAAA,EACpB,YAAYA,EAAU;AACxB,CAAC,CAAC,CAAC;","x_google_ignoreList":[0]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sd-component-library312.js","sources":[],"sourcesContent":[],"names":[],"mappings":";"}
|
|
1
|
+
{"version":3,"file":"sd-component-library312.js","sources":["../node_modules/react-transition-group/esm/TransitionGroupContext.js"],"sourcesContent":["import React from 'react';\nexport default React.createContext(null);"],"names":["TransitionGroupContext","React"],"mappings":";AACA,MAAAA,IAAeC,EAAM,cAAc,IAAI;","x_google_ignoreList":[0]}
|
|
@@ -1,96 +1,61 @@
|
|
|
1
|
-
import { j as
|
|
2
|
-
import {
|
|
3
|
-
import { Box as
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
|
|
7
|
-
const
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
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,
|
|
1
|
+
import { j as e } from "./sd-component-library198.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-library153.js";
|
|
5
|
+
import { ThirteenRegular as i } from "./sd-component-library157.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,
|
|
51
17
|
{
|
|
52
18
|
sx: {
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
top: `${g}px`
|
|
19
|
+
p: "10px 16px",
|
|
20
|
+
cursor: "pointer"
|
|
56
21
|
},
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
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
|
-
}
|
|
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
|
|
75
32
|
},
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
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
|
-
)
|
|
33
|
+
s
|
|
34
|
+
)) })
|
|
35
|
+
]
|
|
90
36
|
}
|
|
91
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);
|
|
92
57
|
};
|
|
93
58
|
export {
|
|
94
|
-
|
|
59
|
+
b as AutocompleteOptionBox
|
|
95
60
|
};
|
|
96
61
|
//# sourceMappingURL=sd-component-library314.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sd-component-library314.js","sources":["../src/components/
|
|
1
|
+
{"version":3,"file":"sd-component-library314.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","Other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MAAM,EAAA,CAC5C,EACF,CAAA;AAAA,IAAA,GACF,IAECQ,gBAAAA,EAAA,IAAAY,GAAA,EAAgB,OAAO,CAAC,EAAE,GAAG,QAAQ,WACpC,UAAAZ,gBAAAA,EAAAA,IAAC,UAAK,OAAO,EAAE,YAAY,MAAM,GAAI,YAAQ,CAAA,GAC/C;AAAA,IAGDS,KACCT,gBAAAA,EAAA;AAAA,MAACY;AAAA,MAAA;AAAA,QACC,OAAM;AAAA,QACN,OAAO,CAAC,MAAM;AAAA,QACd,WAAU;AAAA,QACX,UAAA;AAAA,MAAA;AAAA,IAED;AAAA,EAAA,EAAA,GAhCOP,CAkCX;AAEJ;"}
|
|
@@ -1,54 +1,29 @@
|
|
|
1
|
-
import { j as
|
|
2
|
-
import
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
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
|
|
1
|
+
import { j as r } from "./sd-component-library198.js";
|
|
2
|
+
import { ResponsiveTextV2 as s } from "./sd-component-library152.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
|
|
36
19
|
}
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
color: u.colors.cl_lightGrey,
|
|
44
|
-
alpha: h,
|
|
45
|
-
horizontal: j(e)
|
|
46
|
-
}
|
|
47
|
-
)
|
|
48
|
-
] });
|
|
49
|
-
}
|
|
50
|
-
);
|
|
20
|
+
},
|
|
21
|
+
onClick: e,
|
|
22
|
+
children: o
|
|
23
|
+
}
|
|
24
|
+
);
|
|
25
|
+
};
|
|
51
26
|
export {
|
|
52
|
-
|
|
27
|
+
x as SearchAutocompleteRow
|
|
53
28
|
};
|
|
54
29
|
//# 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/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;"}
|
|
@@ -1,28 +1,96 @@
|
|
|
1
|
-
import { j as
|
|
2
|
-
import {
|
|
3
|
-
|
|
1
|
+
import { j as a } from "./sd-component-library198.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-library230.js";
|
|
5
|
+
import { getCoordinateForArc as $ } from "./sd-component-library93.js";
|
|
6
|
+
import { ResponsiveTextV2 as z } from "./sd-component-library152.js";
|
|
7
|
+
const D = (j) => {
|
|
4
8
|
const {
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
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,
|
|
19
51
|
{
|
|
20
|
-
|
|
21
|
-
|
|
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
|
+
)
|
|
22
90
|
}
|
|
23
91
|
);
|
|
24
92
|
};
|
|
25
93
|
export {
|
|
26
|
-
|
|
94
|
+
D as MatchedRangeLabelBox
|
|
27
95
|
};
|
|
28
96
|
//# sourceMappingURL=sd-component-library316.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sd-component-library316.js","sources":["../src/components/meters/outline-meter
|
|
1
|
+
{"version":3,"file":"sd-component-library316.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,CA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
3
|
-
|
|
4
|
-
};
|
|
1
|
+
import { j as t } from "./sd-component-library198.js";
|
|
2
|
+
import x from "react";
|
|
3
|
+
import u from "./sd-component-library197.js";
|
|
4
|
+
import { getIsHorizontal as j, getRangeProperties as p } from "./sd-component-library232.js";
|
|
5
|
+
import { OutlineMeterRange as M } from "./sd-component-library240.js";
|
|
6
|
+
import { LabelPointer as b } from "./sd-component-library327.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
|
+
);
|
|
5
51
|
export {
|
|
6
|
-
|
|
52
|
+
A as SmileyMeterRange
|
|
7
53
|
};
|
|
8
54
|
//# sourceMappingURL=sd-component-library317.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sd-component-library317.js","sources":["../src/components/meters/
|
|
1
|
+
{"version":3,"file":"sd-component-library317.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,7 +1,8 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
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
|
+
};
|
|
4
5
|
export {
|
|
5
|
-
|
|
6
|
+
p as getRangeProperties
|
|
6
7
|
};
|
|
7
8
|
//# sourceMappingURL=sd-component-library318.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sd-component-library318.js","sources":["../src/components/meters/multi-option-discrete-outline-meter/
|
|
1
|
+
{"version":3,"file":"sd-component-library318.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;"}
|