@selfdecode/sd-component-library 4.0.145 → 4.0.147
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/components/buttons/button/interfaces.d.ts +1 -0
- package/lib/sd-component-library100.js +2 -2
- package/lib/sd-component-library101.js +3 -3
- package/lib/sd-component-library102.js +2 -2
- package/lib/sd-component-library104.js +4 -4
- package/lib/sd-component-library106.js +4 -4
- package/lib/sd-component-library111.js +1 -1
- package/lib/sd-component-library117.js +1 -1
- package/lib/sd-component-library118.js +1 -1
- package/lib/sd-component-library120.js +1 -1
- package/lib/sd-component-library121.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-library136.js +2 -2
- package/lib/sd-component-library168.js +1 -1
- package/lib/sd-component-library171.js +1 -1
- package/lib/sd-component-library172.js +4 -4
- package/lib/sd-component-library197.js +3 -3
- package/lib/sd-component-library200.js +60 -2
- package/lib/sd-component-library200.js.map +1 -1
- package/lib/sd-component-library201.js +3 -30
- package/lib/sd-component-library201.js.map +1 -1
- package/lib/sd-component-library202.js +2 -599
- package/lib/sd-component-library202.js.map +1 -1
- package/lib/sd-component-library203.js +30 -60
- package/lib/sd-component-library203.js.map +1 -1
- package/lib/sd-component-library204.js +599 -3
- package/lib/sd-component-library204.js.map +1 -1
- package/lib/sd-component-library207.js +21 -18
- package/lib/sd-component-library207.js.map +1 -1
- package/lib/sd-component-library208.js +3 -64
- package/lib/sd-component-library208.js.map +1 -1
- package/lib/sd-component-library209.js +3 -23
- package/lib/sd-component-library209.js.map +1 -1
- package/lib/sd-component-library210.js +17 -39
- package/lib/sd-component-library210.js.map +1 -1
- package/lib/sd-component-library211.js +62 -19
- package/lib/sd-component-library211.js.map +1 -1
- package/lib/sd-component-library212.js +23 -3
- package/lib/sd-component-library212.js.map +1 -1
- package/lib/sd-component-library213.js +40 -3
- package/lib/sd-component-library213.js.map +1 -1
- package/lib/sd-component-library221.js +64 -45
- package/lib/sd-component-library221.js.map +1 -1
- package/lib/sd-component-library222.js +3 -65
- package/lib/sd-component-library222.js.map +1 -1
- package/lib/sd-component-library223.js +46 -3
- package/lib/sd-component-library223.js.map +1 -1
- package/lib/sd-component-library226.js +3 -3
- package/lib/sd-component-library226.js.map +1 -1
- package/lib/sd-component-library228.js +129 -19
- package/lib/sd-component-library228.js.map +1 -1
- package/lib/sd-component-library229.js +42 -19
- package/lib/sd-component-library229.js.map +1 -1
- package/lib/sd-component-library230.js +47 -28
- package/lib/sd-component-library230.js.map +1 -1
- package/lib/sd-component-library231.js +7 -32
- package/lib/sd-component-library231.js.map +1 -1
- package/lib/sd-component-library232.js +3 -3
- package/lib/sd-component-library232.js.map +1 -1
- package/lib/sd-component-library233.js +4 -4
- package/lib/sd-component-library234.js +41 -41
- package/lib/sd-component-library234.js.map +1 -1
- package/lib/sd-component-library235.js +13 -43
- package/lib/sd-component-library235.js.map +1 -1
- package/lib/sd-component-library236.js +19 -13
- package/lib/sd-component-library236.js.map +1 -1
- package/lib/sd-component-library237.js +20 -21
- package/lib/sd-component-library237.js.map +1 -1
- package/lib/sd-component-library238.js +26 -107
- package/lib/sd-component-library238.js.map +1 -1
- package/lib/sd-component-library239.js +27 -41
- package/lib/sd-component-library239.js.map +1 -1
- package/lib/sd-component-library24.js +57 -53
- package/lib/sd-component-library24.js.map +1 -1
- package/lib/sd-component-library240.js +21 -24
- package/lib/sd-component-library240.js.map +1 -1
- package/lib/sd-component-library241.js +103 -47
- package/lib/sd-component-library241.js.map +1 -1
- package/lib/sd-component-library242.js +43 -17
- package/lib/sd-component-library242.js.map +1 -1
- package/lib/sd-component-library243.js +24 -20
- package/lib/sd-component-library243.js.map +1 -1
- package/lib/sd-component-library244.js +52 -47
- package/lib/sd-component-library244.js.map +1 -1
- package/lib/sd-component-library245.js +46 -39
- package/lib/sd-component-library245.js.map +1 -1
- package/lib/sd-component-library246.js +74 -26
- package/lib/sd-component-library246.js.map +1 -1
- package/lib/sd-component-library247.js +41 -2
- package/lib/sd-component-library247.js.map +1 -1
- package/lib/sd-component-library248.js +26 -74
- package/lib/sd-component-library248.js.map +1 -1
- package/lib/sd-component-library249.js +2 -29
- package/lib/sd-component-library249.js.map +1 -1
- package/lib/sd-component-library250.js +21 -3
- package/lib/sd-component-library250.js.map +1 -1
- package/lib/sd-component-library251.js +20 -24
- package/lib/sd-component-library251.js.map +1 -1
- package/lib/sd-component-library252.js +325 -3
- package/lib/sd-component-library252.js.map +1 -1
- package/lib/sd-component-library253.js +5 -325
- package/lib/sd-component-library253.js.map +1 -1
- package/lib/sd-component-library254.js +29 -5
- package/lib/sd-component-library254.js.map +1 -1
- package/lib/sd-component-library255.js +3 -2
- package/lib/sd-component-library255.js.map +1 -1
- package/lib/sd-component-library256.js +24 -2
- package/lib/sd-component-library256.js.map +1 -1
- package/lib/sd-component-library257.js +3 -129
- package/lib/sd-component-library257.js.map +1 -1
- package/lib/sd-component-library258.js +21 -43
- package/lib/sd-component-library258.js.map +1 -1
- package/lib/sd-component-library259.js +22 -8
- package/lib/sd-component-library259.js.map +1 -1
- package/lib/sd-component-library260.js +44 -18
- package/lib/sd-component-library260.js.map +1 -1
- package/lib/sd-component-library261.js +26 -18
- package/lib/sd-component-library261.js.map +1 -1
- package/lib/sd-component-library262.js +134 -30
- package/lib/sd-component-library262.js.map +1 -1
- package/lib/sd-component-library263.js +59 -119
- package/lib/sd-component-library263.js.map +1 -1
- package/lib/sd-component-library264.js +63 -38
- package/lib/sd-component-library264.js.map +1 -1
- package/lib/sd-component-library265.js +30 -74
- package/lib/sd-component-library265.js.map +1 -1
- package/lib/sd-component-library266.js +15 -70
- package/lib/sd-component-library266.js.map +1 -1
- package/lib/sd-component-library267.js +120 -25
- package/lib/sd-component-library267.js.map +1 -1
- package/lib/sd-component-library268.js +9 -20
- package/lib/sd-component-library268.js.map +1 -1
- package/lib/sd-component-library269.js +41 -116
- package/lib/sd-component-library269.js.map +1 -1
- package/lib/sd-component-library271.js +9 -10
- package/lib/sd-component-library271.js.map +1 -1
- package/lib/sd-component-library272.js +49 -48
- package/lib/sd-component-library272.js.map +1 -1
- package/lib/sd-component-library273.js +89 -8
- package/lib/sd-component-library273.js.map +1 -1
- package/lib/sd-component-library274.js +89 -48
- package/lib/sd-component-library274.js.map +1 -1
- package/lib/sd-component-library275.js +2 -90
- package/lib/sd-component-library275.js.map +1 -1
- package/lib/sd-component-library276.js +2 -92
- package/lib/sd-component-library276.js.map +1 -1
- package/lib/sd-component-library296.js +33 -91
- package/lib/sd-component-library296.js.map +1 -1
- package/lib/sd-component-library297.js +25 -51
- package/lib/sd-component-library297.js.map +1 -1
- package/lib/sd-component-library298.js +9 -5
- package/lib/sd-component-library298.js.map +1 -1
- package/lib/sd-component-library299.js +5 -25
- package/lib/sd-component-library299.js.map +1 -1
- package/lib/sd-component-library300.js +4 -4
- package/lib/sd-component-library300.js.map +1 -1
- package/lib/sd-component-library301.js +19 -35
- package/lib/sd-component-library301.js.map +1 -1
- package/lib/sd-component-library302.js +3 -9
- package/lib/sd-component-library302.js.map +1 -1
- package/lib/sd-component-library303.js +5 -5
- package/lib/sd-component-library303.js.map +1 -1
- package/lib/sd-component-library304.js +4 -4
- package/lib/sd-component-library304.js.map +1 -1
- package/lib/sd-component-library305.js +93 -19
- package/lib/sd-component-library305.js.map +1 -1
- package/lib/sd-component-library306.js +51 -3
- package/lib/sd-component-library306.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-library7.js +1 -1
- package/lib/sd-component-library75.js +2 -2
- package/lib/sd-component-library76.js +1 -1
- package/lib/sd-component-library77.js +1 -1
- package/lib/sd-component-library81.js +1 -1
- package/lib/sd-component-library81.js.map +1 -1
- package/lib/sd-component-library86.js +5 -5
- package/lib/sd-component-library87.js +1 -1
- package/lib/sd-component-library88.js +1 -1
- package/lib/sd-component-library89.js +4 -4
- package/lib/sd-component-library92.js +4 -4
- package/lib/sd-component-library94.js +6 -6
- package/lib/sd-component-library98.js +2 -2
- package/lib/sd-component-library99.js +3 -3
- package/package.json +1 -1
|
@@ -1,6 +1,43 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
1
|
+
import { j as o } from "./sd-component-library197.js";
|
|
2
|
+
import p from "react";
|
|
3
|
+
import { Box as a } from "rebass";
|
|
4
|
+
import { AutocompleteOptionBox as n } from "./sd-component-library290.js";
|
|
5
|
+
import { HorizontalDivider as d } from "./sd-component-library48.js";
|
|
6
|
+
function f(s) {
|
|
7
|
+
const { results: t, value: i, onSelect: l, translateContent: x = !0 } = s;
|
|
8
|
+
return /* @__PURE__ */ o.jsx(
|
|
9
|
+
a,
|
|
10
|
+
{
|
|
11
|
+
sx: {
|
|
12
|
+
position: "absolute",
|
|
13
|
+
top: "100%",
|
|
14
|
+
bg: "white",
|
|
15
|
+
width: "100%",
|
|
16
|
+
borderRadius: "0px 0px 3px 3px",
|
|
17
|
+
borderWidth: "1px",
|
|
18
|
+
borderStyle: "solid",
|
|
19
|
+
borderColor: "#C8CCE5",
|
|
20
|
+
boxShadow: "2px 3px 10px rgba(211,223,255,0.25)",
|
|
21
|
+
zIndex: 100
|
|
22
|
+
},
|
|
23
|
+
className: x ? void 0 : "no-translate",
|
|
24
|
+
"data-test": "results-box",
|
|
25
|
+
children: t.map(({ synonyms: r }, e) => /* @__PURE__ */ o.jsxs(p.Fragment, { children: [
|
|
26
|
+
/* @__PURE__ */ o.jsx(
|
|
27
|
+
n,
|
|
28
|
+
{
|
|
29
|
+
value: i,
|
|
30
|
+
synonyms: r,
|
|
31
|
+
onSelect: l
|
|
32
|
+
},
|
|
33
|
+
r.join()
|
|
34
|
+
),
|
|
35
|
+
e !== t.length - 1 && /* @__PURE__ */ o.jsx(d, { color: "cl_lightGrey" })
|
|
36
|
+
] }, e))
|
|
37
|
+
}
|
|
38
|
+
);
|
|
39
|
+
}
|
|
3
40
|
export {
|
|
4
|
-
|
|
41
|
+
f as ResultsBox
|
|
5
42
|
};
|
|
6
43
|
//# sourceMappingURL=sd-component-library213.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sd-component-library213.js","sources":["../src/components/
|
|
1
|
+
{"version":3,"file":"sd-component-library213.js","sources":["../src/components/inputs/autocomplete-input/partials/results-box/results-box.tsx"],"sourcesContent":["import React, { PropsWithChildren } from \"react\";\n\nimport { Box } from \"rebass\";\n\nimport { HorizontalDivider } from \"../../../../dividers/horizontal-divider\";\nimport { AutocompleteOptionBox } from \"../autocomplete-option-box\";\nimport { ResultsBoxProps as Props } from \"./interfaces\";\n\nexport function ResultsBox<T>(props: PropsWithChildren<Props<T>>) {\n const { results, value, onSelect, translateContent = true } = props;\n\n return (\n <Box\n sx={{\n position: \"absolute\",\n top: \"100%\",\n bg: \"white\",\n width: \"100%\",\n borderRadius: \"0px 0px 3px 3px\",\n borderWidth: \"1px\",\n borderStyle: \"solid\",\n borderColor: \"#C8CCE5\",\n boxShadow: \"2px 3px 10px rgba(211,223,255,0.25)\",\n zIndex: 100,\n }}\n className={!translateContent ? \"no-translate\" : undefined}\n data-test=\"results-box\"\n >\n {results.map(({ synonyms }, idx) => (\n <React.Fragment key={idx}>\n <AutocompleteOptionBox\n value={value}\n synonyms={synonyms}\n key={synonyms.join()}\n onSelect={onSelect}\n />\n {idx !== results.length - 1 && (\n <HorizontalDivider color=\"cl_lightGrey\" />\n )}\n </React.Fragment>\n ))}\n </Box>\n );\n}\n"],"names":["ResultsBox","props","results","value","onSelect","translateContent","jsx","Box","synonyms","idx","jsxs","React","AutocompleteOptionBox","HorizontalDivider"],"mappings":";;;;;AAQO,SAASA,EAAcC,GAAoC;AAChE,QAAM,EAAE,SAAAC,GAAS,OAAA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|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
1
|
+
import { j as o } from "./sd-component-library197.js";
|
|
2
|
+
import d from "react";
|
|
3
|
+
import { Link as m } from "react-router-dom";
|
|
4
|
+
import { Box as n, Flex as f } from "rebass";
|
|
5
|
+
import { RegularText as h } from "./sd-component-library163.js";
|
|
6
|
+
import { PrimaryBadge as s } from "./sd-component-library9.js";
|
|
7
|
+
import { HorizontalDivider as c } from "./sd-component-library48.js";
|
|
8
|
+
const S = ({
|
|
9
|
+
searchResults: t,
|
|
10
|
+
useRouterLinks: i,
|
|
11
|
+
onResultClick: r
|
|
12
|
+
}) => /* @__PURE__ */ o.jsx(
|
|
13
|
+
n,
|
|
14
|
+
{
|
|
15
|
+
sx: {
|
|
16
|
+
position: "absolute",
|
|
17
|
+
top: "100%",
|
|
18
|
+
bg: "white",
|
|
19
|
+
width: "100%",
|
|
20
|
+
borderRadius: ["0", "0px 0px 3px 3px"],
|
|
21
|
+
borderWidth: "1px",
|
|
22
|
+
borderStyle: "solid",
|
|
23
|
+
borderTopStyle: "none",
|
|
24
|
+
borderColor: "#C8CCE5",
|
|
25
|
+
boxShadow: "2px 3px 10px rgba(211,223,255,0.25)"
|
|
26
|
+
},
|
|
27
|
+
children: t.map((e, p) => /* @__PURE__ */ o.jsxs(d.Fragment, { children: [
|
|
28
|
+
i ? /* @__PURE__ */ o.jsx(m, { to: e.url, style: { textDecoration: "none" }, children: /* @__PURE__ */ o.jsx(x, { ...e, onResultClick: r }) }) : /* @__PURE__ */ o.jsx(
|
|
29
|
+
x,
|
|
30
|
+
{
|
|
31
|
+
...e,
|
|
32
|
+
onResultClick: r,
|
|
33
|
+
onClick: () => window.location.href = `https://www.selfdecode.com${e.url}`
|
|
34
|
+
}
|
|
35
|
+
),
|
|
36
|
+
p + 1 !== t.length && /* @__PURE__ */ o.jsx(c, { color: "cl_lightGrey" })
|
|
37
|
+
] }, `${p}-${e.url}`))
|
|
38
|
+
}
|
|
39
|
+
), x = ({
|
|
40
|
+
onResultClick: t,
|
|
41
|
+
onClick: i,
|
|
42
|
+
...r
|
|
43
|
+
}) => {
|
|
44
|
+
const e = () => {
|
|
45
|
+
t == null || t(r), i == null || i();
|
|
46
|
+
};
|
|
47
|
+
return /* @__PURE__ */ o.jsxs(
|
|
48
|
+
f,
|
|
49
|
+
{
|
|
50
|
+
flexDirection: ["column-reverse", "row"],
|
|
51
|
+
justifyContent: "space-between",
|
|
52
|
+
sx: {
|
|
53
|
+
p: "10px 16px",
|
|
54
|
+
cursor: "pointer",
|
|
55
|
+
":hover": { bg: "#eff4ff" }
|
|
56
|
+
},
|
|
57
|
+
onClick: e,
|
|
58
|
+
children: [
|
|
59
|
+
/* @__PURE__ */ o.jsx(h, { fontSize: 16, children: r.text }),
|
|
60
|
+
!!r.type && /* @__PURE__ */ o.jsx(n, { width: "max-content", mb: ["8px", "0"], children: /* @__PURE__ */ o.jsx(s, { children: r.type }) })
|
|
61
|
+
]
|
|
62
|
+
}
|
|
63
|
+
);
|
|
45
64
|
};
|
|
46
65
|
export {
|
|
47
|
-
|
|
66
|
+
S as SearchBox
|
|
48
67
|
};
|
|
49
68
|
//# sourceMappingURL=sd-component-library221.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sd-component-library221.js","sources":["../src/components/inputs/
|
|
1
|
+
{"version":3,"file":"sd-component-library221.js","sources":["../src/components/inputs/search-input/search-box.tsx"],"sourcesContent":["import React from \"react\";\nimport { Link } from \"react-router-dom\";\n\nimport { Box, Flex } from \"rebass\";\n\nimport { PrimaryBadge } from \"../../badges\";\nimport { HorizontalDivider } from \"../../dividers\";\nimport { RegularText } from \"../../texts\";\nimport { SearchInputProps, SearchResult } from \"./index\";\n\ntype Props = Required<Pick<SearchInputProps, \"searchResults\">> &\n Pick<SearchInputProps, \"useRouterLinks\" | \"onResultClick\">;\n\nexport const SearchBox: React.FC<Props> = ({\n searchResults,\n useRouterLinks,\n onResultClick,\n}) => (\n <Box\n sx={{\n position: \"absolute\",\n top: \"100%\",\n bg: \"white\",\n width: \"100%\",\n borderRadius: [\"0\", \"0px 0px 3px 3px\"],\n borderWidth: \"1px\",\n borderStyle: \"solid\",\n borderTopStyle: \"none\",\n borderColor: \"#C8CCE5\",\n boxShadow: \"2px 3px 10px rgba(211,223,255,0.25)\",\n }}\n >\n {searchResults.map((result, index) => (\n <React.Fragment key={`${index}-${result.url}`}>\n {useRouterLinks ? (\n <Link to={result.url} style={{ textDecoration: \"none\" }}>\n <ResultContent {...result} onResultClick={onResultClick} />\n </Link>\n ) : (\n <ResultContent\n {...result}\n onResultClick={onResultClick}\n onClick={() =>\n (window.location.href = `https://www.selfdecode.com${result.url}`)\n }\n />\n )}\n {index + 1 !== searchResults.length && (\n <HorizontalDivider color=\"cl_lightGrey\" />\n )}\n </React.Fragment>\n ))}\n </Box>\n);\n\ntype ContentProps = SearchResult & { onClick?: () => void } & Pick<\n Props,\n \"onResultClick\"\n >;\nconst ResultContent: React.FC<ContentProps> = ({\n onResultClick,\n onClick: onClickExternal,\n ...result\n}) => {\n const onClick = () => {\n onResultClick?.(result);\n onClickExternal?.();\n };\n\n return (\n <Flex\n flexDirection={[\"column-reverse\", \"row\"]}\n justifyContent={\"space-between\"}\n sx={{\n p: \"10px 16px\",\n cursor: \"pointer\",\n \":hover\": { bg: \"#eff4ff\" },\n }}\n onClick={onClick}\n >\n <RegularText fontSize={16}>{result.text}</RegularText>\n\n {!!result.type && (\n <Box width={\"max-content\"} mb={[\"8px\", \"0\"]}>\n <PrimaryBadge>{result.type}</PrimaryBadge>\n </Box>\n )}\n </Flex>\n );\n};\n"],"names":["SearchBox","searchResults","useRouterLinks","onResultClick","jsx","Box","result","index","jsxs","React","Link","ResultContent","HorizontalDivider","onClickExternal","onClick","Flex","RegularText","PrimaryBadge"],"mappings":";;;;;;;AAaO,MAAMA,IAA6B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MAChB,IAAI;AAAA,QACF,GAAG;AAAA,QACH,QAAQ;AAAA,QACR,UAAU,EAAE,IAAI,UAAU;AAAA,MAC5B;AAAA,MACA,SAAAD;AAAA,MAEA,UAAA;AAAA,QAAAV,gBAAAA,EAAA,IAACY,GAAY,EAAA,UAAU,IAAK,UAAAV,EAAO,MAAK;AAAA,QAEvC,CAAC,CAACA,EAAO,QACRF,gBAAAA,EAAA,IAACC,KAAI,OAAO,eAAe,IAAI,CAAC,OAAO,GAAG,GACxC,gCAACY,GAAc,EAAA,UAAAX,EAAO,KAAK,CAAA,GAC7B;AAAA,MAAA;AAAA,IAAA;AAAA,EAAA;AAIR;"}
|
|
@@ -1,68 +1,6 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
3
|
-
import { Link as m } from "react-router-dom";
|
|
4
|
-
import { Box as n, Flex as f } from "rebass";
|
|
5
|
-
import { RegularText as h } from "./sd-component-library163.js";
|
|
6
|
-
import { PrimaryBadge as s } from "./sd-component-library9.js";
|
|
7
|
-
import { HorizontalDivider as c } from "./sd-component-library48.js";
|
|
8
|
-
const S = ({
|
|
9
|
-
searchResults: t,
|
|
10
|
-
useRouterLinks: i,
|
|
11
|
-
onResultClick: r
|
|
12
|
-
}) => /* @__PURE__ */ o.jsx(
|
|
13
|
-
n,
|
|
14
|
-
{
|
|
15
|
-
sx: {
|
|
16
|
-
position: "absolute",
|
|
17
|
-
top: "100%",
|
|
18
|
-
bg: "white",
|
|
19
|
-
width: "100%",
|
|
20
|
-
borderRadius: ["0", "0px 0px 3px 3px"],
|
|
21
|
-
borderWidth: "1px",
|
|
22
|
-
borderStyle: "solid",
|
|
23
|
-
borderTopStyle: "none",
|
|
24
|
-
borderColor: "#C8CCE5",
|
|
25
|
-
boxShadow: "2px 3px 10px rgba(211,223,255,0.25)"
|
|
26
|
-
},
|
|
27
|
-
children: t.map((e, p) => /* @__PURE__ */ o.jsxs(d.Fragment, { children: [
|
|
28
|
-
i ? /* @__PURE__ */ o.jsx(m, { to: e.url, style: { textDecoration: "none" }, children: /* @__PURE__ */ o.jsx(x, { ...e, onResultClick: r }) }) : /* @__PURE__ */ o.jsx(
|
|
29
|
-
x,
|
|
30
|
-
{
|
|
31
|
-
...e,
|
|
32
|
-
onResultClick: r,
|
|
33
|
-
onClick: () => window.location.href = `https://www.selfdecode.com${e.url}`
|
|
34
|
-
}
|
|
35
|
-
),
|
|
36
|
-
p + 1 !== t.length && /* @__PURE__ */ o.jsx(c, { color: "cl_lightGrey" })
|
|
37
|
-
] }, `${p}-${e.url}`))
|
|
38
|
-
}
|
|
39
|
-
), x = ({
|
|
40
|
-
onResultClick: t,
|
|
41
|
-
onClick: i,
|
|
42
|
-
...r
|
|
43
|
-
}) => {
|
|
44
|
-
const e = () => {
|
|
45
|
-
t == null || t(r), i == null || i();
|
|
46
|
-
};
|
|
47
|
-
return /* @__PURE__ */ o.jsxs(
|
|
48
|
-
f,
|
|
49
|
-
{
|
|
50
|
-
flexDirection: ["column-reverse", "row"],
|
|
51
|
-
justifyContent: "space-between",
|
|
52
|
-
sx: {
|
|
53
|
-
p: "10px 16px",
|
|
54
|
-
cursor: "pointer",
|
|
55
|
-
":hover": { bg: "#eff4ff" }
|
|
56
|
-
},
|
|
57
|
-
onClick: e,
|
|
58
|
-
children: [
|
|
59
|
-
/* @__PURE__ */ o.jsx(h, { fontSize: 16, children: r.text }),
|
|
60
|
-
!!r.type && /* @__PURE__ */ o.jsx(n, { width: "max-content", mb: ["8px", "0"], children: /* @__PURE__ */ o.jsx(s, { children: r.type }) })
|
|
61
|
-
]
|
|
62
|
-
}
|
|
63
|
-
);
|
|
64
|
-
};
|
|
1
|
+
import * as t from "react";
|
|
2
|
+
const a = (e) => /* @__PURE__ */ t.createElement("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 10 10", ...e }, /* @__PURE__ */ t.createElement("path", { d: "M10037.5,1055.48l-1,1.02-4-3.97-4,3.97-1-1.02,4-3.98-4-3.98,1-1.02,4,3.97,4-3.97,1,1.02-4,3.98Z", transform: "translate(-10027.5 -1046.5)" }));
|
|
65
3
|
export {
|
|
66
|
-
|
|
4
|
+
a as ReactComponent
|
|
67
5
|
};
|
|
68
6
|
//# sourceMappingURL=sd-component-library222.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sd-component-library222.js","sources":["../src/components/inputs/search-input/
|
|
1
|
+
{"version":3,"file":"sd-component-library222.js","sources":["../src/components/inputs/search-input/assets/x.svg"],"sourcesContent":["export default \"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAxMCAxMCI+CiAgPHBhdGggZD0iTTEwMDM3LjUsMTA1NS40OGwtMSwxLjAyLTQtMy45Ny00LDMuOTctMS0xLjAyLDQtMy45OC00LTMuOTgsMS0xLjAyLDQsMy45Nyw0LTMuOTcsMSwxLjAyLTQsMy45OFoiIHRyYW5zZm9ybT0idHJhbnNsYXRlKC0xMDAyNy41IC0xMDQ2LjUpIi8+Cjwvc3ZnPgo=\""],"names":["SvgX","props","React"],"mappings":";AACK,MAACA,IAAO,CAACC,MAA0B,gBAAAC,EAAM,cAAc,OAAO,EAAE,OAAO,8BAA8B,SAAS,aAAa,GAAGD,EAAO,GAAkB,gBAAAC,EAAM,cAAc,QAAQ,EAAE,GAAG,mGAAmG,WAAW,+BAA+B,CAAC;"}
|
|
@@ -1,6 +1,49 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
1
|
+
import { j as r } from "./sd-component-library197.js";
|
|
2
|
+
import { Flex as c } from "rebass";
|
|
3
|
+
import { BaseTextV2 as m } from "./sd-component-library138.js";
|
|
4
|
+
import { ResponsiveTextV2 as p } from "./sd-component-library150.js";
|
|
5
|
+
const u = (t) => {
|
|
6
|
+
const {
|
|
7
|
+
label: o,
|
|
8
|
+
errorMessage: l,
|
|
9
|
+
labelMargin: s,
|
|
10
|
+
secondLabel: e,
|
|
11
|
+
secondLabelTextTransform: n,
|
|
12
|
+
labelSx: a,
|
|
13
|
+
labelColor: i = "cl_darkGrey",
|
|
14
|
+
...x
|
|
15
|
+
} = t;
|
|
16
|
+
return o ? /* @__PURE__ */ r.jsxs(c, { sx: { cursor: "default" }, ...x, children: [
|
|
17
|
+
/* @__PURE__ */ r.jsx(
|
|
18
|
+
m,
|
|
19
|
+
{
|
|
20
|
+
color: l ? "cl_red" : i,
|
|
21
|
+
sx: {
|
|
22
|
+
fontSize: 12,
|
|
23
|
+
fontWeight: 600,
|
|
24
|
+
m: s,
|
|
25
|
+
letterSpacing: "1px",
|
|
26
|
+
textTransform: "uppercase",
|
|
27
|
+
...a
|
|
28
|
+
},
|
|
29
|
+
children: o
|
|
30
|
+
}
|
|
31
|
+
),
|
|
32
|
+
e && /* @__PURE__ */ r.jsx(
|
|
33
|
+
p,
|
|
34
|
+
{
|
|
35
|
+
letterSpacing: "1px",
|
|
36
|
+
ml: e.ml || "3px",
|
|
37
|
+
color: e.color || "cl_grey",
|
|
38
|
+
fontSizeWeight: e.fontSizeWeight || [[10, "semi-bold"]],
|
|
39
|
+
textTransform: n,
|
|
40
|
+
...e,
|
|
41
|
+
children: e.text
|
|
42
|
+
}
|
|
43
|
+
)
|
|
44
|
+
] }) : null;
|
|
45
|
+
};
|
|
3
46
|
export {
|
|
4
|
-
|
|
47
|
+
u as SecondaryInputLabels
|
|
5
48
|
};
|
|
6
49
|
//# sourceMappingURL=sd-component-library223.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sd-component-library223.js","sources":["../src/components/inputs/
|
|
1
|
+
{"version":3,"file":"sd-component-library223.js","sources":["../src/components/inputs/secondary-text-input/partials/secondary-input-labels/secondary-input-labels.tsx"],"sourcesContent":["import React from \"react\";\n\nimport { Flex } from \"rebass\";\n\nimport { BaseTextV2, ResponsiveTextV2 } from \"../../../../texts\";\nimport { SecondaryInputLabelsProps as Props } from \"./interfaces\";\n\nexport const SecondaryInputLabels: React.FC<Props> = (props) => {\n const {\n label,\n errorMessage,\n labelMargin,\n secondLabel,\n secondLabelTextTransform,\n labelSx,\n labelColor = \"cl_darkGrey\",\n ...restOfProps\n } = props;\n\n if (!label) return null;\n\n return (\n <Flex sx={{ cursor: \"default\" }} {...restOfProps}>\n <BaseTextV2\n color={errorMessage ? \"cl_red\" : labelColor}\n sx={{\n fontSize: 12,\n fontWeight: 600,\n m: labelMargin,\n letterSpacing: \"1px\",\n textTransform: \"uppercase\",\n ...labelSx,\n }}\n >\n {label}\n </BaseTextV2>\n\n {secondLabel && (\n <ResponsiveTextV2\n letterSpacing=\"1px\"\n ml={secondLabel.ml || \"3px\"}\n color={secondLabel.color || \"cl_grey\"}\n fontSizeWeight={secondLabel.fontSizeWeight || [[10, \"semi-bold\"]]}\n textTransform={secondLabelTextTransform}\n {...secondLabel}\n >\n {secondLabel.text}\n </ResponsiveTextV2>\n )}\n </Flex>\n );\n};\n"],"names":["SecondaryInputLabels","props","label","errorMessage","labelMargin","secondLabel","secondLabelTextTransform","labelSx","labelColor","restOfProps","jsxs","Flex","jsx","BaseTextV2","ResponsiveTextV2"],"mappings":";;;;AAOa,MAAAA,IAAwC,CAACC,MAAU;AACxD,QAAA;AAAA,IACJ,OAAAC;AAAA,IACA,cAAAC;AAAA,IACA,aAAAC;AAAA,IACA,aAAAC;AAAA,IACA,0BAAAC;AAAA,IACA,SAAAC;AAAA,IACA,YAAAC,IAAa;AAAA,IACb,GAAGC;AAAA,EACD,IAAAR;AAEJ,SAAKC,IAGHQ,gBAAAA,EAAA,KAACC,KAAK,IAAI,EAAE,QAAQ,UAAU,GAAI,GAAGF,GACnC,UAAA;AAAA,IAAAG,gBAAAA,EAAA;AAAA,MAACC;AAAA,MAAA;AAAA,QACC,OAAOV,IAAe,WAAWK;AAAA,QACjC,IAAI;AAAA,UACF,UAAU;AAAA,UACV,YAAY;AAAA,UACZ,GAAGJ;AAAA,UACH,eAAe;AAAA,UACf,eAAe;AAAA,UACf,GAAGG;AAAA,QACL;AAAA,QAEC,UAAAL;AAAA,MAAA;AAAA,IACH;AAAA,IAECG,KACCO,gBAAAA,EAAA;AAAA,MAACE;AAAA,MAAA;AAAA,QACC,eAAc;AAAA,QACd,IAAIT,EAAY,MAAM;AAAA,QACtB,OAAOA,EAAY,SAAS;AAAA,QAC5B,gBAAgBA,EAAY,kBAAkB,CAAC,CAAC,IAAI,WAAW,CAAC;AAAA,QAChE,eAAeC;AAAA,QACd,GAAGD;AAAA,QAEH,UAAYA,EAAA;AAAA,MAAA;AAAA,IACf;AAAA,EAEJ,EAAA,CAAA,IA9BiB;AAgCrB;"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
|
|
1
|
+
import * as e from "react";
|
|
2
|
+
const t = (a) => /* @__PURE__ */ e.createElement("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 16.04 33.79", ...a }, /* @__PURE__ */ e.createElement("g", null, /* @__PURE__ */ e.createElement("g", null, /* @__PURE__ */ e.createElement("path", { className: "first-half", d: "M8,0V6.37H8A3.19,3.19,0,0,1,8,0ZM1,8.24a4,4,0,0,0-1,2.7V19.5a1.64,1.64,0,0,0,.45,1.28v0a1.49,1.49,0,0,0,2.12,0A1.64,1.64,0,0,0,3,19.5V12.11h.7L3.67,31.64c0,.07,0,.14,0,.21a1.92,1.92,0,0,0,1.91,1.93h.12a2,2,0,0,0,1.88-2.12V21.75H8V7H3.72A3.57,3.57,0,0,0,1,8.24Z" }), /* @__PURE__ */ e.createElement("path", { className: "second-half", d: "M8,6.38H8V0H8A3.19,3.19,0,0,1,8,6.38Zm7.07,1.86A3.59,3.59,0,0,0,12.32,7H8V21.75h.41v9.93a1.36,1.36,0,0,0,0,.35,1.95,1.95,0,1,0,3.88-.39V12.1h.63v7.4a1.68,1.68,0,0,0,.46,1.29,1.58,1.58,0,0,0,2.18,0A1.69,1.69,0,0,0,16,19.5V10.94A4.09,4.09,0,0,0,15.07,8.24Z" }))));
|
|
2
3
|
export {
|
|
3
|
-
t as
|
|
4
|
-
o as defaultTextBottomMargin
|
|
4
|
+
t as ReactComponent
|
|
5
5
|
};
|
|
6
6
|
//# sourceMappingURL=sd-component-library226.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sd-component-library226.js","sources":["../src/components/meters/
|
|
1
|
+
{"version":3,"file":"sd-component-library226.js","sources":["../src/components/meters/people-meter/assets/person.svg"],"sourcesContent":["export default \"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAxNi4wNCAzMy43OSI+CiAgICA8Zz4KICAgICAgICA8Zz4KICAgICAgICAgICAgPHBhdGggY2xhc3M9ImZpcnN0LWhhbGYiCiAgICAgICAgICAgICAgICBkPSJNOCwwVjYuMzdIOEEzLjE5LDMuMTksMCwwLDEsOCwwWk0xLDguMjRhNCw0LDAsMCwwLTEsMi43VjE5LjVhMS42NCwxLjY0LDAsMCwwLC40NSwxLjI4djBhMS40OSwxLjQ5LDAsMCwwLDIuMTIsMEExLjY0LDEuNjQsMCwwLDAsMywxOS41VjEyLjExaC43TDMuNjcsMzEuNjRjMCwuMDcsMCwuMTQsMCwuMjFhMS45MiwxLjkyLDAsMCwwLDEuOTEsMS45M2guMTJhMiwyLDAsMCwwLDEuODgtMi4xMlYyMS43NUg4VjdIMy43MkEzLjU3LDMuNTcsMCwwLDAsMSw4LjI0WiIgLz4KICAgICAgICAgICAgPHBhdGggY2xhc3M9InNlY29uZC1oYWxmIgogICAgICAgICAgICAgICAgZD0iTTgsNi4zOEg4VjBIOEEzLjE5LDMuMTksMCwwLDEsOCw2LjM4Wm03LjA3LDEuODZBMy41OSwzLjU5LDAsMCwwLDEyLjMyLDdIOFYyMS43NWguNDF2OS45M2ExLjM2LDEuMzYsMCwwLDAsMCwuMzUsMS45NSwxLjk1LDAsMSwwLDMuODgtLjM5VjEyLjFoLjYzdjcuNGExLjY4LDEuNjgsMCwwLDAsLjQ2LDEuMjksMS41OCwxLjU4LDAsMCwwLDIuMTgsMEExLjY5LDEuNjksMCwwLDAsMTYsMTkuNVYxMC45NEE0LjA5LDQuMDksMCwwLDAsMTUuMDcsOC4yNFoiIC8+CiAgICAgICAgPC9nPgogICAgPC9nPgo8L3N2Zz4K\""],"names":["SvgPerson","props","React"],"mappings":";AACK,MAACA,IAAY,CAACC,MAA0B,gBAAAC,EAAM,cAAc,OAAO,EAAE,OAAO,8BAA8B,SAAS,mBAAmB,GAAGD,EAAO,GAAkB,gBAAAC,EAAM,cAAc,KAAK,MAAsB,gBAAAA,EAAM,cAAc,KAAK,MAAsB,gBAAAA,EAAM,cAAc,QAAQ,EAAE,WAAW,cAAc,GAAG,uQAAwQ,CAAA,GAAmB,gBAAAA,EAAM,cAAc,QAAQ,EAAE,WAAW,eAAe,GAAG,iQAAkQ,CAAA,CAAC,CAAC,CAAC;"}
|
|
@@ -1,22 +1,132 @@
|
|
|
1
|
-
import { j as
|
|
2
|
-
import
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
const
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
1
|
+
import { j as e } from "./sd-component-library197.js";
|
|
2
|
+
import U from "react";
|
|
3
|
+
import { isValueInRange as Z, inValueHigherThanRange as F, getCoordinateForArc as d, getInnerX as $, getInnerY as tt, degToRad as L } from "./sd-component-library91.js";
|
|
4
|
+
import { BaseOutlineArc as X } from "./sd-component-library297.js";
|
|
5
|
+
import { OutlineMeterLabelPointer as O } from "./sd-component-library243.js";
|
|
6
|
+
const st = U.forwardRef(
|
|
7
|
+
(D, M) => {
|
|
8
|
+
const {
|
|
9
|
+
start: n,
|
|
10
|
+
end: r,
|
|
11
|
+
color: x,
|
|
12
|
+
bounds: R,
|
|
13
|
+
diameter: o,
|
|
14
|
+
arc: v,
|
|
15
|
+
distanceBetweenRanges: l,
|
|
16
|
+
totalRanges: y,
|
|
17
|
+
value: g,
|
|
18
|
+
gaugeWidth: s,
|
|
19
|
+
segmented: f,
|
|
20
|
+
idx: m,
|
|
21
|
+
pointStrokeWidth: I,
|
|
22
|
+
innerPointRadius: T,
|
|
23
|
+
distanceFromRanges: b,
|
|
24
|
+
label: w,
|
|
25
|
+
labelPosition: V,
|
|
26
|
+
hideLabels: E,
|
|
27
|
+
connected: _
|
|
28
|
+
} = D, S = "#CCD0DB", A = v - (y - 1) * l, H = A * (r - n), Y = Z(g, n, r, R), q = (360 - v) / 2, t = o / 2, a = q + l * m + A * n, C = _ && F(g, r, R), i = a + A * (r - n) + (C ? l : 0), { x: P, y: j } = d(
|
|
29
|
+
t,
|
|
30
|
+
a
|
|
31
|
+
), { x: W, y: k } = d(
|
|
32
|
+
t,
|
|
33
|
+
i
|
|
34
|
+
), u = V || m === 0 ? "left" : m === y - 1 ? "right" : "top";
|
|
35
|
+
if (f || !Y) {
|
|
36
|
+
const J = f && Y || !f && F(g, r, R) ? x : S, B = C ? i - l : i, { y: K } = d(
|
|
37
|
+
t,
|
|
38
|
+
B
|
|
39
|
+
), { x: N, y: Q } = d(
|
|
40
|
+
t,
|
|
41
|
+
(a + B) / 2
|
|
42
|
+
);
|
|
43
|
+
return /* @__PURE__ */ e.jsxs("g", { children: [
|
|
44
|
+
/* @__PURE__ */ e.jsx(
|
|
45
|
+
X,
|
|
46
|
+
{
|
|
47
|
+
startX: P,
|
|
48
|
+
startY: j,
|
|
49
|
+
endX: W,
|
|
50
|
+
endY: k,
|
|
51
|
+
startAlpha: a,
|
|
52
|
+
endAlpha: i,
|
|
53
|
+
color: J,
|
|
54
|
+
radius: t,
|
|
55
|
+
width: s
|
|
56
|
+
}
|
|
57
|
+
),
|
|
58
|
+
!E && w && /* @__PURE__ */ e.jsx(
|
|
59
|
+
O,
|
|
60
|
+
{
|
|
61
|
+
diameter: o,
|
|
62
|
+
position: u,
|
|
63
|
+
distanceFromRanges: b,
|
|
64
|
+
isInRange: Y,
|
|
65
|
+
...u === "right" && j > o / 2 || u === "left" && K > o / 2 ? {
|
|
66
|
+
rangeX: N,
|
|
67
|
+
rangeY: Q
|
|
68
|
+
} : void 0
|
|
69
|
+
}
|
|
70
|
+
)
|
|
71
|
+
] });
|
|
72
|
+
}
|
|
73
|
+
const c = a + (g - n) / (r - n) * H, { x: h, y: p } = d(t, c), z = $(h, L(c), s), G = tt(p, L(c), s);
|
|
74
|
+
return /* @__PURE__ */ e.jsxs("g", { children: [
|
|
75
|
+
/* @__PURE__ */ e.jsx(
|
|
76
|
+
X,
|
|
77
|
+
{
|
|
78
|
+
startX: P,
|
|
79
|
+
startY: j,
|
|
80
|
+
endX: h,
|
|
81
|
+
endY: p,
|
|
82
|
+
startAlpha: a,
|
|
83
|
+
endAlpha: c,
|
|
84
|
+
color: x,
|
|
85
|
+
radius: t,
|
|
86
|
+
width: s,
|
|
87
|
+
roundEnd: !1
|
|
88
|
+
}
|
|
89
|
+
),
|
|
90
|
+
/* @__PURE__ */ e.jsx(
|
|
91
|
+
X,
|
|
92
|
+
{
|
|
93
|
+
startX: h,
|
|
94
|
+
startY: p,
|
|
95
|
+
endX: W,
|
|
96
|
+
endY: k,
|
|
97
|
+
startAlpha: c,
|
|
98
|
+
endAlpha: i,
|
|
99
|
+
color: S,
|
|
100
|
+
radius: t,
|
|
101
|
+
width: s,
|
|
102
|
+
roundStart: !1
|
|
103
|
+
}
|
|
104
|
+
),
|
|
105
|
+
/* @__PURE__ */ e.jsx(
|
|
106
|
+
"circle",
|
|
107
|
+
{
|
|
108
|
+
cx: (h + z) / 2,
|
|
109
|
+
cy: (p + G) / 2,
|
|
110
|
+
r: I + T,
|
|
111
|
+
strokeWidth: I,
|
|
112
|
+
stroke: x,
|
|
113
|
+
fill: "white",
|
|
114
|
+
ref: M
|
|
115
|
+
}
|
|
116
|
+
),
|
|
117
|
+
!E && w && /* @__PURE__ */ e.jsx(
|
|
118
|
+
O,
|
|
119
|
+
{
|
|
120
|
+
diameter: o,
|
|
121
|
+
isInRange: !0,
|
|
122
|
+
position: u,
|
|
123
|
+
distanceFromRanges: b
|
|
124
|
+
}
|
|
125
|
+
)
|
|
126
|
+
] });
|
|
127
|
+
}
|
|
128
|
+
);
|
|
11
129
|
export {
|
|
12
|
-
|
|
13
|
-
S as defaultDistanceBetweenRanges,
|
|
14
|
-
c as defaultSmileyWidth,
|
|
15
|
-
g as smallSmileyGaugeWidth,
|
|
16
|
-
f as smallSmileyInnerPointRadius,
|
|
17
|
-
d as smallSmileyInnerPointStrokeWidth,
|
|
18
|
-
y as smallSmileyMeterHeight,
|
|
19
|
-
p as smallSmileyMeterWidth,
|
|
20
|
-
R as smallSmileyWidth
|
|
130
|
+
st as OutlineMeterRange
|
|
21
131
|
};
|
|
22
132
|
//# sourceMappingURL=sd-component-library228.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sd-component-library228.js","sources":["../src/components/meters/
|
|
1
|
+
{"version":3,"file":"sd-component-library228.js","sources":["../src/components/meters/outline-meter/partials/outline-meter-range/outline-meter-range.tsx"],"sourcesContent":["import React from \"react\";\n\nimport {\n degToRad,\n getCoordinateForArc,\n getInnerX,\n getInnerY,\n inValueHigherThanRange,\n isValueInRange,\n} from \"../../utils\";\nimport { BaseOutlineArc } from \"../base-outline-arc\";\nimport { OutlineMeterLabelPointer } from \"../outline-meter-label-pointer\";\nimport { OutlineMeterRangeProps as Props } from \"./interfaces\";\n\nexport const OutlineMeterRange = React.forwardRef<SVGCircleElement, Props>(\n (props, pointRef) => {\n const {\n start,\n end,\n color,\n bounds,\n diameter,\n arc,\n distanceBetweenRanges,\n totalRanges,\n value,\n gaugeWidth,\n segmented,\n idx,\n pointStrokeWidth,\n innerPointRadius,\n distanceFromRanges,\n label,\n labelPosition,\n hideLabels,\n connected,\n } = props;\n\n const grey = \"#CCD0DB\";\n\n /* Arc value (in degrees) used for all ranges. */\n const arcForRanges = arc - (totalRanges - 1) * distanceBetweenRanges;\n\n /* Arc value for the current range. */\n const rangeArc = arcForRanges * (end - start);\n const valueWithinRange = isValueInRange(value, start, end, bounds);\n\n const arcStart = (360 - arc) / 2; // deg\n\n const radius = diameter / 2;\n\n const rangeArcStart =\n arcStart + distanceBetweenRanges * idx + arcForRanges * start;\n const needConnection =\n connected && inValueHigherThanRange(value, end, bounds);\n const rangeArcEnd =\n rangeArcStart +\n arcForRanges * (end - start) +\n (needConnection ? distanceBetweenRanges : 0);\n\n const { x: rangeStartX, y: rangeStartY } = getCoordinateForArc(\n radius,\n rangeArcStart\n );\n const { x: rangeEndX, y: rangeEndY } = getCoordinateForArc(\n radius,\n rangeArcEnd\n );\n\n const calculatedLabelPosition =\n labelPosition || idx === 0\n ? \"left\"\n : idx === totalRanges - 1\n ? \"right\"\n : \"top\";\n\n /* When range will be filled completely. */\n if (segmented || !valueWithinRange) {\n const fillColor =\n (segmented && valueWithinRange) ||\n (!segmented && inValueHigherThanRange(value, end, bounds))\n ? color\n : grey;\n\n const adjustedRangeArcEnd = needConnection\n ? rangeArcEnd - distanceBetweenRanges\n : rangeArcEnd;\n const { y: adjustedRangeY } = getCoordinateForArc(\n radius,\n adjustedRangeArcEnd\n );\n const { x: rangeX, y: rangeY } = getCoordinateForArc(\n radius,\n (rangeArcStart + adjustedRangeArcEnd) / 2\n );\n return (\n <g>\n <BaseOutlineArc\n startX={rangeStartX}\n startY={rangeStartY}\n endX={rangeEndX}\n endY={rangeEndY}\n startAlpha={rangeArcStart}\n endAlpha={rangeArcEnd}\n color={fillColor}\n radius={radius}\n width={gaugeWidth}\n />\n {!hideLabels && label && (\n <OutlineMeterLabelPointer\n diameter={diameter}\n position={calculatedLabelPosition}\n distanceFromRanges={distanceFromRanges}\n isInRange={valueWithinRange}\n {...((calculatedLabelPosition === \"right\" &&\n rangeStartY > diameter / 2) ||\n (calculatedLabelPosition === \"left\" &&\n adjustedRangeY > diameter / 2)\n ? {\n rangeX,\n rangeY,\n }\n : undefined)}\n />\n )}\n </g>\n );\n }\n\n const valueAlpha =\n rangeArcStart + ((value - start) / (end - start)) * rangeArc;\n\n const { x: valueX, y: valueY } = getCoordinateForArc(radius, valueAlpha);\n const valueInnerX = getInnerX(valueX, degToRad(valueAlpha), gaugeWidth);\n const valueInnerY = getInnerY(valueY, degToRad(valueAlpha), gaugeWidth);\n\n return (\n <g>\n <BaseOutlineArc\n startX={rangeStartX}\n startY={rangeStartY}\n endX={valueX}\n endY={valueY}\n startAlpha={rangeArcStart}\n endAlpha={valueAlpha}\n color={color}\n radius={radius}\n width={gaugeWidth}\n roundEnd={false}\n />\n <BaseOutlineArc\n startX={valueX}\n startY={valueY}\n endX={rangeEndX}\n endY={rangeEndY}\n startAlpha={valueAlpha}\n endAlpha={rangeArcEnd}\n color={grey}\n radius={radius}\n width={gaugeWidth}\n roundStart={false}\n />\n <circle\n cx={(valueX + valueInnerX) / 2}\n cy={(valueY + valueInnerY) / 2}\n r={pointStrokeWidth + innerPointRadius}\n strokeWidth={pointStrokeWidth}\n stroke={color}\n fill=\"white\"\n ref={pointRef}\n />\n {!hideLabels && label && (\n <OutlineMeterLabelPointer\n diameter={diameter}\n isInRange\n position={calculatedLabelPosition}\n distanceFromRanges={distanceFromRanges}\n />\n )}\n </g>\n );\n }\n);\n"],"names":["OutlineMeterRange","React","props","pointRef","start","end","color","bounds","diameter","arc","distanceBetweenRanges","totalRanges","value","gaugeWidth","segmented","idx","pointStrokeWidth","innerPointRadius","distanceFromRanges","label","labelPosition","hideLabels","connected","grey","arcForRanges","rangeArc","valueWithinRange","isValueInRange","arcStart","radius","rangeArcStart","needConnection","inValueHigherThanRange","rangeArcEnd","rangeStartX","rangeStartY","getCoordinateForArc","rangeEndX","rangeEndY","calculatedLabelPosition","fillColor","adjustedRangeArcEnd","adjustedRangeY","rangeX","rangeY","jsx","BaseOutlineArc","OutlineMeterLabelPointer","valueAlpha","valueX","valueY","valueInnerX","getInnerX","degToRad","valueInnerY","getInnerY"],"mappings":";;;;;AAcO,MAAMA,KAAoBC,EAAM;AAAA,EACrC,CAACC,GAAOC,MAAa;AACb,UAAA;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AAAA,EAAA;AAAA,QAACC;AAAA,QAAA;AAAA,UACC,QAAQG;AAAA,UACR,QAAQC;AAAA,UACR,MAAMb;AAAA,UACN,MAAMC;AAAA,UACN,YAAYU;AAAA,UACZ,UAAUf;AAAA,UACV,OAAOV;AAAA,UACP,QAAAM;AAAA,UACA,OAAOhB;AAAA,UACP,YAAY;AAAA,QAAA;AAAA,MACd;AAAA,MACAgC,gBAAAA,EAAA;AAAA,QAAC;AAAA,QAAA;AAAA,UACC,KAAKI,IAASE,KAAe;AAAA,UAC7B,KAAKD,IAASI,KAAe;AAAA,UAC7B,GAAGtC,IAAmBC;AAAA,UACtB,aAAaD;AAAA,UACb,QAAQV;AAAA,UACR,MAAK;AAAA,UACL,KAAKH;AAAA,QAAA;AAAA,MACP;AAAA,MACC,CAACkB,KAAcF,KACd0B,gBAAAA,EAAA;AAAA,QAACE;AAAA,QAAA;AAAA,UACC,UAAAvC;AAAA,UACA,WAAS;AAAA,UACT,UAAU+B;AAAA,UACV,oBAAArB;AAAA,QAAA;AAAA,MACF;AAAA,IAEJ,EAAA,CAAA;AAAA,EAEJ;AACF;"}
|
|
@@ -1,23 +1,46 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
const
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
return
|
|
1
|
+
import { j as i } from "./sd-component-library197.js";
|
|
2
|
+
import { getInnerX as m, getInnerY as g, getCoordinateForArc as C, degToRad as F } from "./sd-component-library91.js";
|
|
3
|
+
const X = (p) => {
|
|
4
|
+
const {
|
|
5
|
+
diameter: l,
|
|
6
|
+
arc: a,
|
|
7
|
+
color: u = "#CCD0DB",
|
|
8
|
+
dashHeight: e,
|
|
9
|
+
dashWidth: x,
|
|
10
|
+
numberOfDashes: r,
|
|
11
|
+
distanceFromRangesToScale: t,
|
|
12
|
+
gaugeWidth: o
|
|
13
|
+
} = p, R = l / 2, j = (360 - a) / 2, D = a / (r - 1);
|
|
14
|
+
return /* @__PURE__ */ i.jsx("g", { children: [...Array(r)].map((I, n) => {
|
|
15
|
+
const c = j + n * D, { x: d, y: h } = C(R, c), s = F(c), T = m(
|
|
16
|
+
d,
|
|
17
|
+
s,
|
|
18
|
+
o + t
|
|
19
|
+
), $ = g(
|
|
20
|
+
h,
|
|
21
|
+
s,
|
|
22
|
+
o + t
|
|
23
|
+
), f = m(
|
|
24
|
+
d,
|
|
25
|
+
s,
|
|
26
|
+
o + t + e
|
|
27
|
+
), B = g(
|
|
28
|
+
h,
|
|
29
|
+
s,
|
|
30
|
+
o + t + e
|
|
31
|
+
);
|
|
32
|
+
return /* @__PURE__ */ i.jsx(
|
|
33
|
+
"path",
|
|
34
|
+
{
|
|
35
|
+
d: `M${T},${$} L${f},${B}`,
|
|
36
|
+
stroke: u,
|
|
37
|
+
strokeWidth: x
|
|
38
|
+
},
|
|
39
|
+
n
|
|
40
|
+
);
|
|
41
|
+
}) });
|
|
15
42
|
};
|
|
16
43
|
export {
|
|
17
|
-
|
|
18
|
-
u as areColorsValid,
|
|
19
|
-
R as getIsHorizontal,
|
|
20
|
-
A as getRangeProperties,
|
|
21
|
-
f as isCorrectSmileyMeterConfig
|
|
44
|
+
X as OutlineMeterScale
|
|
22
45
|
};
|
|
23
46
|
//# sourceMappingURL=sd-component-library229.js.map
|