@selfdecode/sd-component-library 4.0.85 → 4.0.87
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/forms-v2/form-v2-input/form-v2-input.d.ts +3 -1
- package/lib/components/forms-v2/form-v2-input/form-v2-number-input.d.ts +1 -9
- package/lib/components/forms-v2/form-v2-input/index.d.ts +1 -0
- package/lib/components/forms-v2/form-v2-input/interfaces.d.ts +9 -2
- package/lib/components/forms-v2/form-v2-selector/index.d.ts +1 -0
- package/lib/components/forms-v2/input-container/index.d.ts +1 -1
- package/lib/components/forms-v2/input-label/index.d.ts +1 -1
- 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-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-library132.js +3 -3
- package/lib/sd-component-library133.js +1 -1
- package/lib/sd-component-library135.js +2 -2
- package/lib/sd-component-library15.js +1 -1
- package/lib/sd-component-library166.js +1 -1
- package/lib/sd-component-library171.js +1 -1
- package/lib/sd-component-library199.js +57 -3
- package/lib/sd-component-library199.js.map +1 -1
- package/lib/sd-component-library200.js +3 -57
- package/lib/sd-component-library200.js.map +1 -1
- package/lib/sd-component-library204.js +59 -19
- package/lib/sd-component-library204.js.map +1 -1
- package/lib/sd-component-library205.js +20 -14
- package/lib/sd-component-library205.js.map +1 -1
- package/lib/sd-component-library206.js +19 -5
- package/lib/sd-component-library206.js.map +1 -1
- package/lib/sd-component-library207.js +3 -3
- package/lib/sd-component-library207.js.map +1 -1
- package/lib/sd-component-library208.js +5 -18
- package/lib/sd-component-library208.js.map +1 -1
- package/lib/sd-component-library209.js +20 -64
- package/lib/sd-component-library209.js.map +1 -1
- package/lib/sd-component-library210.js +3 -21
- package/lib/sd-component-library210.js.map +1 -1
- package/lib/sd-component-library211.js +1 -1
- package/lib/sd-component-library211.js.map +1 -1
- package/lib/sd-component-library212.js +64 -3
- package/lib/sd-component-library212.js.map +1 -1
- package/lib/sd-component-library213.js +19 -60
- package/lib/sd-component-library213.js.map +1 -1
- package/lib/sd-component-library214.js +18 -23
- package/lib/sd-component-library214.js.map +1 -1
- package/lib/sd-component-library216.js +128 -13
- package/lib/sd-component-library216.js.map +1 -1
- package/lib/sd-component-library217.js +13 -3
- package/lib/sd-component-library217.js.map +1 -1
- package/lib/sd-component-library218.js +14 -3
- package/lib/sd-component-library218.js.map +1 -1
- package/lib/sd-component-library219.js +3 -129
- package/lib/sd-component-library219.js.map +1 -1
- package/lib/sd-component-library220.js +3 -13
- package/lib/sd-component-library220.js.map +1 -1
- package/lib/sd-component-library221.js +3 -65
- package/lib/sd-component-library221.js.map +1 -1
- package/lib/sd-component-library222.js +52 -3
- package/lib/sd-component-library222.js.map +1 -1
- package/lib/sd-component-library223.js +65 -3
- package/lib/sd-component-library223.js.map +1 -1
- package/lib/sd-component-library224.js +3 -52
- package/lib/sd-component-library224.js.map +1 -1
- package/lib/sd-component-library229.js +3 -3
- package/lib/sd-component-library23.js +2 -2
- package/lib/sd-component-library231.js +1 -1
- package/lib/sd-component-library232.js +1 -1
- package/lib/sd-component-library24.js +2 -2
- package/lib/sd-component-library240.js +1 -1
- package/lib/sd-component-library247.js +60 -26
- package/lib/sd-component-library247.js.map +1 -1
- package/lib/sd-component-library248.js +41 -27
- package/lib/sd-component-library248.js.map +1 -1
- package/lib/sd-component-library249.js +27 -21
- package/lib/sd-component-library249.js.map +1 -1
- package/lib/sd-component-library25.js +1 -1
- package/lib/sd-component-library250.js +20 -19
- package/lib/sd-component-library250.js.map +1 -1
- package/lib/sd-component-library251.js +20 -2
- package/lib/sd-component-library251.js.map +1 -1
- package/lib/sd-component-library252.js +2 -26
- package/lib/sd-component-library252.js.map +1 -1
- package/lib/sd-component-library253.js +24 -323
- package/lib/sd-component-library253.js.map +1 -1
- package/lib/sd-component-library254.js +325 -5
- package/lib/sd-component-library254.js.map +1 -1
- package/lib/sd-component-library255.js +5 -75
- package/lib/sd-component-library255.js.map +1 -1
- package/lib/sd-component-library262.js +27 -27
- package/lib/sd-component-library262.js.map +1 -1
- package/lib/sd-component-library263.js +43 -13
- package/lib/sd-component-library263.js.map +1 -1
- package/lib/sd-component-library264.js +118 -112
- package/lib/sd-component-library264.js.map +1 -1
- package/lib/sd-component-library265.js +57 -105
- package/lib/sd-component-library265.js.map +1 -1
- package/lib/sd-component-library266.js +75 -9
- package/lib/sd-component-library266.js.map +1 -1
- package/lib/sd-component-library267.js +30 -50
- package/lib/sd-component-library267.js.map +1 -1
- package/lib/sd-component-library268.js +20 -29
- package/lib/sd-component-library268.js.map +1 -1
- package/lib/sd-component-library269.js +118 -44
- package/lib/sd-component-library269.js.map +1 -1
- package/lib/sd-component-library270.js +104 -113
- package/lib/sd-component-library270.js.map +1 -1
- package/lib/sd-component-library271.js +9 -73
- package/lib/sd-component-library271.js.map +1 -1
- package/lib/sd-component-library272.js +42 -68
- package/lib/sd-component-library272.js.map +1 -1
- package/lib/sd-component-library289.js +4 -4
- package/lib/sd-component-library290.js +2 -3
- package/lib/sd-component-library290.js.map +1 -1
- package/lib/sd-component-library291.js +8 -3
- package/lib/sd-component-library291.js.map +1 -1
- package/lib/sd-component-library292.js +328 -3
- package/lib/sd-component-library292.js.map +1 -1
- package/lib/sd-component-library293.js +51 -2
- package/lib/sd-component-library293.js.map +1 -1
- package/lib/sd-component-library294.js +3 -8
- package/lib/sd-component-library294.js.map +1 -1
- package/lib/sd-component-library295.js +3 -328
- package/lib/sd-component-library295.js.map +1 -1
- package/lib/sd-component-library296.js +3 -51
- package/lib/sd-component-library296.js.map +1 -1
- package/lib/sd-component-library314.js +47 -89
- package/lib/sd-component-library314.js.map +1 -1
- package/lib/sd-component-library315.js +89 -47
- package/lib/sd-component-library315.js.map +1 -1
- package/lib/sd-component-library32.js +1 -1
- package/lib/sd-component-library33.js +1 -1
- package/lib/sd-component-library49.js +1 -1
- package/lib/sd-component-library5.js +1 -1
- package/lib/sd-component-library50.js +1 -1
- package/lib/sd-component-library52.js +3 -3
- package/lib/sd-component-library53.js +2 -2
- package/lib/sd-component-library54.js +2 -2
- package/lib/sd-component-library55.js +84 -57
- package/lib/sd-component-library55.js.map +1 -1
- package/lib/sd-component-library56.js.map +1 -1
- package/lib/sd-component-library6.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-library79.js +1 -1
- package/lib/sd-component-library85.js +1 -1
- package/lib/sd-component-library98.js +1 -1
- package/lib/sd-component-library99.js +2 -2
- package/package.json +1 -1
|
@@ -1,6 +1,55 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
1
|
+
import { j as o } from "./sd-component-library195.js";
|
|
2
|
+
import n from "react";
|
|
3
|
+
import { Box as t } from "rebass";
|
|
4
|
+
import { HorizontalDivider as i } from "./sd-component-library49.js";
|
|
5
|
+
import { SearchAutocompleteRow as a } from "./sd-component-library313.js";
|
|
6
|
+
const g = (l) => {
|
|
7
|
+
const { results: p, onSelect: s, rowHeight: e, rowsDisplayed: x } = l, c = (r) => () => s(r);
|
|
8
|
+
return /* @__PURE__ */ o.jsxs(
|
|
9
|
+
t,
|
|
10
|
+
{
|
|
11
|
+
sx: {
|
|
12
|
+
top: "calc(100% - 2px)",
|
|
13
|
+
left: 0,
|
|
14
|
+
position: "absolute",
|
|
15
|
+
width: "100%",
|
|
16
|
+
cursor: "pointer",
|
|
17
|
+
zIndex: 1
|
|
18
|
+
},
|
|
19
|
+
children: [
|
|
20
|
+
/* @__PURE__ */ o.jsx(i, { color: "cl_purple", height: "2px" }),
|
|
21
|
+
/* @__PURE__ */ o.jsx(
|
|
22
|
+
t,
|
|
23
|
+
{
|
|
24
|
+
sx: {
|
|
25
|
+
overflowY: "auto",
|
|
26
|
+
maxHeight: `${x * (e + 1) - 1}px`,
|
|
27
|
+
borderWidth: "1px",
|
|
28
|
+
borderStyle: "solid",
|
|
29
|
+
borderColor: "cl_lightGrey",
|
|
30
|
+
borderRadius: "0 0 3px 3px",
|
|
31
|
+
borderTopStyle: "none",
|
|
32
|
+
boxShadow: "2px 3px 10px rgba(211,223,255,0.25)",
|
|
33
|
+
bg: "cl_white"
|
|
34
|
+
},
|
|
35
|
+
children: p.map((r, d) => /* @__PURE__ */ o.jsxs(n.Fragment, { children: [
|
|
36
|
+
d !== 0 && /* @__PURE__ */ o.jsx(i, { color: "cl_headerLine" }),
|
|
37
|
+
/* @__PURE__ */ o.jsx(
|
|
38
|
+
a,
|
|
39
|
+
{
|
|
40
|
+
...r,
|
|
41
|
+
onClick: c(r),
|
|
42
|
+
height: e
|
|
43
|
+
}
|
|
44
|
+
)
|
|
45
|
+
] }, r.id))
|
|
46
|
+
}
|
|
47
|
+
)
|
|
48
|
+
]
|
|
49
|
+
}
|
|
50
|
+
);
|
|
51
|
+
};
|
|
3
52
|
export {
|
|
4
|
-
|
|
53
|
+
g as SearchAutocompleteResultsBox
|
|
5
54
|
};
|
|
6
55
|
//# 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-autocomplete-input/partials/search-autocomplete-results-box/search-autocomplete-results-box.tsx"],"sourcesContent":["import React from \"react\";\n\nimport { Box } from \"rebass\";\n\nimport { HorizontalDivider } from \"../../../../dividers/horizontal-divider\";\nimport { SearchAutocompleteOption } from \"../../interfaces\";\nimport { SearchAutocompleteRow } from \"../search-autocomplete-row\";\nimport { SearchAutocompleteResultsBoxProps as Props } from \"./interfaces\";\n\nexport const SearchAutocompleteResultsBox = <\n T extends { id: string } = { id: string }\n>(\n props: Props<T>\n) => {\n const { results, onSelect, rowHeight, rowsDisplayed } = props;\n\n const onClick = (result: SearchAutocompleteOption<T>) => () =>\n onSelect(result);\n\n return (\n <Box\n sx={{\n top: \"calc(100% - 2px)\",\n left: 0,\n position: \"absolute\",\n width: \"100%\",\n cursor: \"pointer\",\n zIndex: 1,\n }}\n >\n <HorizontalDivider color=\"cl_purple\" height=\"2px\" />\n\n <Box\n sx={{\n overflowY: \"auto\",\n maxHeight: `${rowsDisplayed * (rowHeight + 1) - 1}px`,\n borderWidth: \"1px\",\n borderStyle: \"solid\",\n borderColor: \"cl_lightGrey\",\n borderRadius: \"0 0 3px 3px\",\n borderTopStyle: \"none\",\n boxShadow: \"2px 3px 10px rgba(211,223,255,0.25)\",\n bg: \"cl_white\",\n }}\n >\n {results.map((result, idx) => (\n <React.Fragment key={result.id}>\n {idx !== 0 && <HorizontalDivider color=\"cl_headerLine\" />}\n\n <SearchAutocompleteRow\n {...result}\n onClick={onClick(result)}\n height={rowHeight}\n />\n </React.Fragment>\n ))}\n </Box>\n </Box>\n );\n};\n"],"names":["SearchAutocompleteResultsBox","props","results","onSelect","rowHeight","rowsDisplayed","onClick","result","jsxs","Box","jsx","HorizontalDivider","idx","React","SearchAutocompleteRow"],"mappings":";;;;;AASa,MAAAA,IAA+B,CAG1CC,MACG;AACH,QAAM,EAAE,SAAAC,GAAS,UAAAC,GAAU,WAAAC,GAAW,eAAAC,MAAkBJ,GAElDK,IAAU,CAACC,MAAwC,MACvDJ,EAASI,CAAM;AAGf,SAAAC,gBAAAA,EAAA;AAAA,IAACC;AAAA,IAAA;AAAA,MACC,IAAI;AAAA,QACF,KAAK;AAAA,QACL,MAAM;AAAA,QACN,UAAU;AAAA,QACV,OAAO;AAAA,QACP,QAAQ;AAAA,QACR,QAAQ;AAAA,MACV;AAAA,MAEA,UAAA;AAAA,QAAAC,gBAAAA,EAAA,IAACC,GAAkB,EAAA,OAAM,aAAY,QAAO,OAAM;AAAA,QAElDD,gBAAAA,EAAA;AAAA,UAACD;AAAA,UAAA;AAAA,YACC,IAAI;AAAA,cACF,WAAW;AAAA,cACX,WAAW,GAAGJ,KAAiBD,IAAY,KAAK,CAAC;AAAA,cACjD,aAAa;AAAA,cACb,aAAa;AAAA,cACb,aAAa;AAAA,cACb,cAAc;AAAA,cACd,gBAAgB;AAAA,cAChB,WAAW;AAAA,cACX,IAAI;AAAA,YACN;AAAA,YAEC,UAAAF,EAAQ,IAAI,CAACK,GAAQK,MACnBJ,gBAAAA,EAAAA,KAAAK,EAAM,UAAN,EACE,UAAA;AAAA,cAAAD,MAAQ,KAAKF,gBAAAA,EAAA,IAACC,GAAkB,EAAA,OAAM,iBAAgB;AAAA,cAEvDD,gBAAAA,EAAA;AAAA,gBAACI;AAAA,gBAAA;AAAA,kBACE,GAAGP;AAAA,kBACJ,SAASD,EAAQC,CAAM;AAAA,kBACvB,QAAQH;AAAA,gBAAA;AAAA,cACV;AAAA,YAAA,KAPmBG,EAAO,EAQ5B,CACD;AAAA,UAAA;AAAA,QACH;AAAA,MAAA;AAAA,IAAA;AAAA,EAAA;AAGN;"}
|
|
@@ -1,6 +1,68 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
1
|
+
import { j as o } from "./sd-component-library195.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-library162.js";
|
|
6
|
+
import { PrimaryBadge as s } from "./sd-component-library8.js";
|
|
7
|
+
import { HorizontalDivider as c } from "./sd-component-library49.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
|
+
};
|
|
3
65
|
export {
|
|
4
|
-
|
|
66
|
+
S as SearchBox
|
|
5
67
|
};
|
|
6
68
|
//# sourceMappingURL=sd-component-library223.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sd-component-library223.js","sources":["../src/components/inputs/search-input/
|
|
1
|
+
{"version":3,"file":"sd-component-library223.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,CAAC;AAAA,EACzC,eAAAC;AAAA,EACA,gBAAAC;AAAA,EACA,eAAAC;AACF,MACEC,gBAAAA,EAAA;AAAA,EAACC;AAAA,EAAA;AAAA,IACC,IAAI;AAAA,MACF,UAAU;AAAA,MACV,KAAK;AAAA,MACL,IAAI;AAAA,MACJ,OAAO;AAAA,MACP,cAAc,CAAC,KAAK,iBAAiB;AAAA,MACrC,aAAa;AAAA,MACb,aAAa;AAAA,MACb,gBAAgB;AAAA,MAChB,aAAa;AAAA,MACb,WAAW;AAAA,IACb;AAAA,IAEC,UAAAJ,EAAc,IAAI,CAACK,GAAQC,MACzBC,gBAAAA,EAAAA,KAAAC,EAAM,UAAN,EACE,UAAA;AAAA,MAAAP,0BACEQ,GAAK,EAAA,IAAIJ,EAAO,KAAK,OAAO,EAAE,gBAAgB,OAAO,GACpD,gCAACK,GAAe,EAAA,GAAGL,GAAQ,eAAAH,EAAA,CAA8B,EAC3D,CAAA,IAEAC,gBAAAA,EAAA;AAAA,QAACO;AAAA,QAAA;AAAA,UACE,GAAGL;AAAA,UACJ,eAAAH;AAAA,UACA,SAAS,MACN,OAAO,SAAS,OAAO,6BAA6BG,EAAO,GAAG;AAAA,QAAA;AAAA,MAEnE;AAAA,MAEDC,IAAQ,MAAMN,EAAc,UAC1BG,gBAAAA,EAAA,IAAAQ,GAAA,EAAkB,OAAM,gBAAe;AAAA,IAAA,EAAA,GAfvB,GAAGL,CAAK,IAAID,EAAO,GAAG,EAiB3C,CACD;AAAA,EAAA;AACH,GAOIK,IAAwC,CAAC;AAAA,EAC7C,eAAAR;AAAA,EACA,SAASU;AAAA,EACT,GAAGP;AACL,MAAM;AACJ,QAAMQ,IAAU,MAAM;AACpB,IAAAX,KAAA,QAAAA,EAAgBG,IACEO,KAAA,QAAAA;AAAA,EAAA;AAIlB,SAAAL,gBAAAA,EAAA;AAAA,IAACO;AAAA,IAAA;AAAA,MACC,eAAe,CAAC,kBAAkB,KAAK;AAAA,MACvC,gBAAgB;AAAA,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,55 +1,6 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
3
|
-
import { Box as t } from "rebass";
|
|
4
|
-
import { HorizontalDivider as i } from "./sd-component-library49.js";
|
|
5
|
-
import { SearchAutocompleteRow as a } from "./sd-component-library313.js";
|
|
6
|
-
const g = (l) => {
|
|
7
|
-
const { results: p, onSelect: s, rowHeight: e, rowsDisplayed: x } = l, c = (r) => () => s(r);
|
|
8
|
-
return /* @__PURE__ */ o.jsxs(
|
|
9
|
-
t,
|
|
10
|
-
{
|
|
11
|
-
sx: {
|
|
12
|
-
top: "calc(100% - 2px)",
|
|
13
|
-
left: 0,
|
|
14
|
-
position: "absolute",
|
|
15
|
-
width: "100%",
|
|
16
|
-
cursor: "pointer",
|
|
17
|
-
zIndex: 1
|
|
18
|
-
},
|
|
19
|
-
children: [
|
|
20
|
-
/* @__PURE__ */ o.jsx(i, { color: "cl_purple", height: "2px" }),
|
|
21
|
-
/* @__PURE__ */ o.jsx(
|
|
22
|
-
t,
|
|
23
|
-
{
|
|
24
|
-
sx: {
|
|
25
|
-
overflowY: "auto",
|
|
26
|
-
maxHeight: `${x * (e + 1) - 1}px`,
|
|
27
|
-
borderWidth: "1px",
|
|
28
|
-
borderStyle: "solid",
|
|
29
|
-
borderColor: "cl_lightGrey",
|
|
30
|
-
borderRadius: "0 0 3px 3px",
|
|
31
|
-
borderTopStyle: "none",
|
|
32
|
-
boxShadow: "2px 3px 10px rgba(211,223,255,0.25)",
|
|
33
|
-
bg: "cl_white"
|
|
34
|
-
},
|
|
35
|
-
children: p.map((r, d) => /* @__PURE__ */ o.jsxs(n.Fragment, { children: [
|
|
36
|
-
d !== 0 && /* @__PURE__ */ o.jsx(i, { color: "cl_headerLine" }),
|
|
37
|
-
/* @__PURE__ */ o.jsx(
|
|
38
|
-
a,
|
|
39
|
-
{
|
|
40
|
-
...r,
|
|
41
|
-
onClick: c(r),
|
|
42
|
-
height: e
|
|
43
|
-
}
|
|
44
|
-
)
|
|
45
|
-
] }, r.id))
|
|
46
|
-
}
|
|
47
|
-
)
|
|
48
|
-
]
|
|
49
|
-
}
|
|
50
|
-
);
|
|
51
|
-
};
|
|
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)" }));
|
|
52
3
|
export {
|
|
53
|
-
|
|
4
|
+
a as ReactComponent
|
|
54
5
|
};
|
|
55
6
|
//# sourceMappingURL=sd-component-library224.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sd-component-library224.js","sources":["../src/components/inputs/search-
|
|
1
|
+
{"version":3,"file":"sd-component-library224.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,8 +1,8 @@
|
|
|
1
1
|
import { j as t } from "./sd-component-library195.js";
|
|
2
2
|
import { SmileyGaugeColor as e } from "./sd-component-library230.js";
|
|
3
|
-
import { ReactComponent as o } from "./sd-component-
|
|
4
|
-
import { ReactComponent as m } from "./sd-component-
|
|
5
|
-
import { ReactComponent as i } from "./sd-component-
|
|
3
|
+
import { ReactComponent as o } from "./sd-component-library294.js";
|
|
4
|
+
import { ReactComponent as m } from "./sd-component-library295.js";
|
|
5
|
+
import { ReactComponent as i } from "./sd-component-library296.js";
|
|
6
6
|
const S = 10, c = 80, p = 100, y = 87, R = 30, d = 3, f = 2, g = 4, u = /* @__PURE__ */ new Map([
|
|
7
7
|
[e.GREEN, /* @__PURE__ */ t.jsx(o, {})],
|
|
8
8
|
[e.ORANGE, /* @__PURE__ */ t.jsx(m, {})],
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { j as o } from "./sd-component-library195.js";
|
|
2
|
-
import { LogoButton as e } from "./sd-component-
|
|
3
|
-
import { ReactComponent as r } from "./sd-component-
|
|
2
|
+
import { LogoButton as e } from "./sd-component-library206.js";
|
|
3
|
+
import { ReactComponent as r } from "./sd-component-library207.js";
|
|
4
4
|
const s = (t) => /* @__PURE__ */ o.jsx(
|
|
5
5
|
e,
|
|
6
6
|
{
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { j as a } from "./sd-component-library195.js";
|
|
2
2
|
import R, { createElement as g } from "react";
|
|
3
3
|
import { isValueInRange as f } from "./sd-component-library91.js";
|
|
4
|
-
import { SmileyMeterRange as d } from "./sd-component-
|
|
4
|
+
import { SmileyMeterRange as d } from "./sd-component-library314.js";
|
|
5
5
|
const j = R.forwardRef(
|
|
6
6
|
(r, m) => {
|
|
7
7
|
const { value: s, ranges: n, distanceFromRanges: c } = r, o = n.findIndex(
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { j as h } from "./sd-component-library195.js";
|
|
2
2
|
import { getRangeProperties as p } from "./sd-component-library230.js";
|
|
3
|
-
import { MatchedRangeLabelBox as u } from "./sd-component-
|
|
3
|
+
import { MatchedRangeLabelBox as u } from "./sd-component-library315.js";
|
|
4
4
|
const b = (e) => {
|
|
5
5
|
const {
|
|
6
6
|
range: a,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { j as o } from "./sd-component-library195.js";
|
|
2
|
-
import { LogoButton as e } from "./sd-component-
|
|
3
|
-
import { ReactComponent as r } from "./sd-component-
|
|
2
|
+
import { LogoButton as e } from "./sd-component-library206.js";
|
|
3
|
+
import { ReactComponent as r } from "./sd-component-library208.js";
|
|
4
4
|
const p = (t) => /* @__PURE__ */ o.jsx(
|
|
5
5
|
e,
|
|
6
6
|
{
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { j as g } from "./sd-component-library195.js";
|
|
2
2
|
import { getRangeProperties as d } from "./sd-component-library318.js";
|
|
3
|
-
import { MatchedRangeLabelBox as x } from "./sd-component-
|
|
3
|
+
import { MatchedRangeLabelBox as x } from "./sd-component-library315.js";
|
|
4
4
|
const h = (e) => {
|
|
5
5
|
const { idx: t, totalRanges: a, distanceBetweenRanges: r, arc: n } = e, { rangeArcStart: o, rangeArcEnd: s } = d(
|
|
6
6
|
n,
|
|
@@ -1,44 +1,78 @@
|
|
|
1
1
|
import { j as n } from "./sd-component-library195.js";
|
|
2
|
-
import
|
|
3
|
-
import {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
2
|
+
import { useHover as Z } from "./sd-component-library3.js";
|
|
3
|
+
import { getCoordinateForArc as l } from "./sd-component-library91.js";
|
|
4
|
+
import { getSegmentCoordinates as O } from "./sd-component-library246.js";
|
|
5
|
+
import { SegmentLabel as q } from "./sd-component-library323.js";
|
|
6
|
+
const h = 300, G = ({
|
|
7
|
+
segment: o,
|
|
8
|
+
segmentWidth: $,
|
|
9
|
+
outlineWidth: f,
|
|
10
|
+
size: i,
|
|
11
|
+
mobile: a,
|
|
12
|
+
...c
|
|
10
13
|
}) => {
|
|
11
|
-
const { color:
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
} =
|
|
22
|
-
|
|
14
|
+
const { start: p, end: x, color: u } = o, { labelOffset: j } = c, t = i / 2, d = t - $, {
|
|
15
|
+
startInnerX: k,
|
|
16
|
+
startInnerY: A,
|
|
17
|
+
endInnerX: M,
|
|
18
|
+
endInnerY: X,
|
|
19
|
+
endX: Y,
|
|
20
|
+
endY: v,
|
|
21
|
+
startY: S,
|
|
22
|
+
startX: g,
|
|
23
|
+
arc: e
|
|
24
|
+
} = O(o, t, $), r = i / 2, H = Math.round(p * 360), I = Math.round(x * 360), { isHover: L, hoverCallbacks: w } = Z(), m = L && !a, s = Math.sqrt(2) * (t + j), { x: y, y: C } = l(
|
|
25
|
+
s,
|
|
26
|
+
H,
|
|
27
|
+
t
|
|
28
|
+
), { x: E, y: R } = l(
|
|
29
|
+
s,
|
|
30
|
+
I,
|
|
31
|
+
t
|
|
32
|
+
);
|
|
33
|
+
return /* @__PURE__ */ n.jsxs("g", { ...a ? {} : w, children: [
|
|
23
34
|
/* @__PURE__ */ n.jsx(
|
|
24
35
|
"path",
|
|
25
36
|
{
|
|
26
|
-
d: `M${r},${r} L${
|
|
27
|
-
fill:
|
|
28
|
-
|
|
37
|
+
d: `M${r},${r} L${y},${C} A${s},${s} 0 ${e > 180 ? "1" : "0"},1 ${E},${R}Z`,
|
|
38
|
+
fill: "transparent"
|
|
39
|
+
}
|
|
40
|
+
),
|
|
41
|
+
/* @__PURE__ */ n.jsx(
|
|
42
|
+
"path",
|
|
43
|
+
{
|
|
44
|
+
d: `M${r},${r} L${g},${S} A${t},${t} 0 ${e > 180 ? "1" : "0"},1 ${Y},${v}Z`,
|
|
45
|
+
fill: u,
|
|
46
|
+
strokeWidth: f,
|
|
29
47
|
stroke: "white"
|
|
30
48
|
}
|
|
31
49
|
),
|
|
32
50
|
/* @__PURE__ */ n.jsx(
|
|
33
51
|
"path",
|
|
34
52
|
{
|
|
35
|
-
d: `M${r},${r} L${
|
|
36
|
-
fill: "white"
|
|
53
|
+
d: `M${r},${r} L${k},${A} A${d},${d} 0 ${e > 180 ? "1" : "0"},1 ${M},${X}Z`,
|
|
54
|
+
fill: "white",
|
|
55
|
+
style: {
|
|
56
|
+
transform: `scale(${m ? 0.8 : 1}`,
|
|
57
|
+
transformOrigin: "center",
|
|
58
|
+
transition: `all ${h}ms`
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
),
|
|
62
|
+
/* @__PURE__ */ n.jsx(
|
|
63
|
+
q,
|
|
64
|
+
{
|
|
65
|
+
segment: o,
|
|
66
|
+
radius: t,
|
|
67
|
+
animationDuration: h,
|
|
68
|
+
isHover: m,
|
|
69
|
+
mobile: a,
|
|
70
|
+
...c
|
|
37
71
|
}
|
|
38
72
|
)
|
|
39
73
|
] });
|
|
40
74
|
};
|
|
41
75
|
export {
|
|
42
|
-
|
|
76
|
+
G as Segment
|
|
43
77
|
};
|
|
44
78
|
//# sourceMappingURL=sd-component-library247.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sd-component-library247.js","sources":["../src/components/meters/
|
|
1
|
+
{"version":3,"file":"sd-component-library247.js","sources":["../src/components/meters/donut-diagram/partials/segment/segment.tsx"],"sourcesContent":["import React from \"react\";\n\nimport { useHover } from \"../../../../../core/custom-hooks\";\nimport { getCoordinateForArc } from \"../../../outline-meter/utils\";\nimport { getSegmentCoordinates } from \"../../utils\";\nimport { SegmentLabel } from \"../segment-label\";\nimport { SegmentProps as Props } from \"./interfaces\";\n\nconst animationDuration = 300;\n\nexport const Segment: React.FC<Props> = ({\n segment,\n segmentWidth,\n outlineWidth,\n size: diameter,\n mobile,\n ...labelProps\n}) => {\n const { start, end, color } = segment;\n const { labelOffset } = labelProps;\n\n const radius = diameter / 2;\n const innerRadius = radius - segmentWidth;\n\n const {\n startInnerX,\n startInnerY,\n endInnerX,\n endInnerY,\n endX,\n endY,\n startY,\n startX,\n arc,\n } = getSegmentCoordinates(segment, radius, segmentWidth);\n\n const center = diameter / 2;\n\n const startAlpha = Math.round(start * 360);\n const endAlpha = Math.round(end * 360);\n\n const { isHover, hoverCallbacks } = useHover();\n const showHover = isHover && !mobile;\n\n const maxRadius = Math.sqrt(2) * (radius + labelOffset);\n\n const { x: maskStartX, y: maskStartY } = getCoordinateForArc(\n maxRadius,\n startAlpha,\n radius\n );\n\n const { x: maskEndX, y: maskEndY } = getCoordinateForArc(\n maxRadius,\n endAlpha,\n radius\n );\n\n return (\n <g {...(mobile ? {} : hoverCallbacks)}>\n {/* mask */}\n <path\n d={`M${center},${center} L${maskStartX},${maskStartY} A${maxRadius},${maxRadius} 0 ${\n arc > 180 ? \"1\" : \"0\"\n },1 ${maskEndX},${maskEndY}Z`}\n fill=\"transparent\"\n />\n\n {/* colored sector */}\n <path\n d={`M${center},${center} L${startX},${startY} A${radius},${radius} 0 ${\n arc > 180 ? \"1\" : \"0\"\n },1 ${endX},${endY}Z`}\n fill={color}\n strokeWidth={outlineWidth}\n stroke=\"white\"\n />\n\n {/* white inner sector */}\n <path\n d={`M${center},${center} L${startInnerX},${startInnerY} A${innerRadius},${innerRadius} 0 ${\n arc > 180 ? \"1\" : \"0\"\n },1 ${endInnerX},${endInnerY}Z`}\n fill=\"white\"\n style={{\n transform: `scale(${showHover ? 0.8 : 1}`,\n transformOrigin: \"center\",\n transition: `all ${animationDuration}ms`,\n }}\n />\n\n <SegmentLabel\n segment={segment}\n radius={radius}\n animationDuration={animationDuration}\n isHover={showHover}\n mobile={mobile}\n {...labelProps}\n />\n </g>\n );\n};\n"],"names":["animationDuration","Segment","segment","segmentWidth","outlineWidth","diameter","mobile","labelProps","start","end","color","labelOffset","radius","innerRadius","startInnerX","startInnerY","endInnerX","endInnerY","endX","endY","startY","startX","arc","getSegmentCoordinates","center","startAlpha","endAlpha","isHover","hoverCallbacks","useHover","showHover","maxRadius","maskStartX","maskStartY","getCoordinateForArc","maskEndX","maskEndY","jsx","SegmentLabel"],"mappings":";;;;;AAQA,MAAMA,IAAoB,KAEbC,IAA2B,CAAC;AAAA,EACvC,SAAAC;AAAA,EACA,cAAAC;AAAA,EACA,cAAAC;AAAA,EACA,MAAMC;AAAA,EACN,QAAAC;AAAA,EACA,GAAGC;AACL,MAAM;AACJ,QAAM,EAAE,OAAAC,GAAO,KAAAC,GAAK,OAAAC,EAAA,IAAUR,GACxB,EAAE,aAAAS,EAAgB,IAAAJ,GAElBK,IAASP,IAAW,GACpBQ,IAAcD,IAAST,GAEvB;AAAA,IACJ,aAAAW;AAAA,IACA,aAAAC;AAAA,IACA,WAAAC;AAAA,IACA,WAAAC;AAAA,IACA,MAAAC;AAAA,IACA,MAAAC;AAAA,IACA,QAAAC;AAAA,IACA,QAAAC;AAAA,IACA,KAAAC;AAAA,EACE,IAAAC,EAAsBrB,GAASU,GAAQT,CAAY,GAEjDqB,IAASnB,IAAW,GAEpBoB,IAAa,KAAK,MAAMjB,IAAQ,GAAG,GACnCkB,IAAW,KAAK,MAAMjB,IAAM,GAAG,GAE/B,EAAE,SAAAkB,GAAS,gBAAAC,EAAe,IAAIC,EAAS,GACvCC,IAAYH,KAAW,CAACrB,GAExByB,IAAY,KAAK,KAAK,CAAC,KAAKnB,IAASD,IAErC,EAAE,GAAGqB,GAAY,GAAGC,EAAe,IAAAC;AAAA,IACvCH;AAAA,IACAN;AAAA,IACAb;AAAA,EAAA,GAGI,EAAE,GAAGuB,GAAU,GAAGC,EAAa,IAAAF;AAAA,IACnCH;AAAA,IACAL;AAAA,IACAd;AAAA,EAAA;AAGF,gCACG,KAAG,EAAA,GAAIN,IAAS,KAAKsB,GAEpB,UAAA;AAAA,IAAAS,gBAAAA,EAAA;AAAA,MAAC;AAAA,MAAA;AAAA,QACC,GAAG,IAAIb,CAAM,IAAIA,CAAM,KAAKQ,CAAU,IAAIC,CAAU,KAAKF,CAAS,IAAIA,CAAS,MAC7ET,IAAM,MAAM,MAAM,GACpB,MAAMa,CAAQ,IAAIC,CAAQ;AAAA,QAC1B,MAAK;AAAA,MAAA;AAAA,IACP;AAAA,IAGAC,gBAAAA,EAAA;AAAA,MAAC;AAAA,MAAA;AAAA,QACC,GAAG,IAAIb,CAAM,IAAIA,CAAM,KAAKH,CAAM,IAAID,CAAM,KAAKR,CAAM,IAAIA,CAAM,MAC/DU,IAAM,MAAM,MAAM,GACpB,MAAMJ,CAAI,IAAIC,CAAI;AAAA,QAClB,MAAMT;AAAA,QACN,aAAaN;AAAA,QACb,QAAO;AAAA,MAAA;AAAA,IACT;AAAA,IAGAiC,gBAAAA,EAAA;AAAA,MAAC;AAAA,MAAA;AAAA,QACC,GAAG,IAAIb,CAAM,IAAIA,CAAM,KAAKV,CAAW,IAAIC,CAAW,KAAKF,CAAW,IAAIA,CAAW,MACnFS,IAAM,MAAM,MAAM,GACpB,MAAMN,CAAS,IAAIC,CAAS;AAAA,QAC5B,MAAK;AAAA,QACL,OAAO;AAAA,UACL,WAAW,SAASa,IAAY,MAAM,CAAC;AAAA,UACvC,iBAAiB;AAAA,UACjB,YAAY,OAAO9B,CAAiB;AAAA,QACtC;AAAA,MAAA;AAAA,IACF;AAAA,IAEAqC,gBAAAA,EAAA;AAAA,MAACC;AAAA,MAAA;AAAA,QACC,SAAApC;AAAA,QACA,QAAAU;AAAA,QACA,mBAAAZ;AAAA,QACA,SAAS8B;AAAA,QACT,QAAAxB;AAAA,QACC,GAAGC;AAAA,MAAA;AAAA,IACN;AAAA,EACF,EAAA,CAAA;AAEJ;"}
|
|
@@ -1,30 +1,44 @@
|
|
|
1
|
-
import { j as
|
|
2
|
-
import
|
|
3
|
-
import {
|
|
4
|
-
const
|
|
5
|
-
segment:
|
|
6
|
-
size: o
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
1
|
+
import { j as n } from "./sd-component-library195.js";
|
|
2
|
+
import g from "./sd-component-library194.js";
|
|
3
|
+
import { getSegmentCoordinates as I } from "./sd-component-library246.js";
|
|
4
|
+
const w = ({
|
|
5
|
+
segment: e,
|
|
6
|
+
size: o,
|
|
7
|
+
segmentWidth: s,
|
|
8
|
+
outlineWidth: c,
|
|
9
|
+
isMatching: a
|
|
10
|
+
}) => {
|
|
11
|
+
const { color: d } = e, t = o / 2, $ = t - s, {
|
|
12
|
+
startX: l,
|
|
13
|
+
startY: m,
|
|
14
|
+
arc: i,
|
|
15
|
+
startInnerY: p,
|
|
16
|
+
startInnerX: h,
|
|
17
|
+
endInnerY: u,
|
|
18
|
+
endInnerX: x,
|
|
19
|
+
endX: f,
|
|
20
|
+
endY: j
|
|
21
|
+
} = I(e, t, s), r = o / 2;
|
|
22
|
+
return /* @__PURE__ */ n.jsxs("g", { children: [
|
|
23
|
+
/* @__PURE__ */ n.jsx(
|
|
24
|
+
"path",
|
|
25
|
+
{
|
|
26
|
+
d: `M${r},${r} L${l},${m} A${t},${t} 0 ${i > 180 ? "1" : "0"},1 ${f},${j}Z`,
|
|
27
|
+
fill: a ? d : g.colors.cl_lightGrey,
|
|
28
|
+
strokeWidth: c,
|
|
29
|
+
stroke: "white"
|
|
30
|
+
}
|
|
31
|
+
),
|
|
32
|
+
/* @__PURE__ */ n.jsx(
|
|
33
|
+
"path",
|
|
34
|
+
{
|
|
35
|
+
d: `M${r},${r} L${h},${p} A${$},${$} 0 ${i > 180 ? "1" : "0"},1 ${x},${u}Z`,
|
|
36
|
+
fill: "white"
|
|
37
|
+
}
|
|
38
|
+
)
|
|
39
|
+
] });
|
|
40
|
+
};
|
|
27
41
|
export {
|
|
28
|
-
|
|
42
|
+
w as CompactDonutGaugeSegment
|
|
29
43
|
};
|
|
30
44
|
//# sourceMappingURL=sd-component-library248.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sd-component-library248.js","sources":["../src/components/meters/compact-donut-gauge/partials/compact-donut-gauge-
|
|
1
|
+
{"version":3,"file":"sd-component-library248.js","sources":["../src/components/meters/compact-donut-gauge/partials/compact-donut-gauge-segment/compact-donut-gauge-segment.tsx"],"sourcesContent":["import React from \"react\";\n\nimport theme from \"../../../../../core/theme\";\nimport { getSegmentCoordinates } from \"../../../donut-diagram/utils\";\nimport { CompactDonutGaugeSegmentProps as Props } from \"./interfaces\";\n\nexport const CompactDonutGaugeSegment: React.FC<Props> = ({\n segment,\n size: diameter,\n segmentWidth,\n outlineWidth,\n isMatching,\n}) => {\n const { color } = segment;\n\n const radius = diameter / 2;\n const innerRadius = radius - segmentWidth;\n\n const {\n startX,\n startY,\n arc,\n startInnerY,\n startInnerX,\n endInnerY,\n endInnerX,\n endX,\n endY,\n } = getSegmentCoordinates(segment, radius, segmentWidth);\n\n const center = diameter / 2;\n\n return (\n <g>\n {/* colored sector */}\n <path\n d={`M${center},${center} L${startX},${startY} A${radius},${radius} 0 ${\n arc > 180 ? \"1\" : \"0\"\n },1 ${endX},${endY}Z`}\n fill={isMatching ? color : theme.colors[\"cl_lightGrey\"]}\n strokeWidth={outlineWidth}\n stroke=\"white\"\n />\n\n {/* white inner sector */}\n <path\n d={`M${center},${center} L${startInnerX},${startInnerY} A${innerRadius},${innerRadius} 0 ${\n arc > 180 ? \"1\" : \"0\"\n },1 ${endInnerX},${endInnerY}Z`}\n fill=\"white\"\n />\n </g>\n );\n};\n"],"names":["CompactDonutGaugeSegment","segment","diameter","segmentWidth","outlineWidth","isMatching","color","radius","innerRadius","startX","startY","arc","startInnerY","startInnerX","endInnerY","endInnerX","endX","endY","getSegmentCoordinates","center","jsx","theme"],"mappings":";;;AAMO,MAAMA,IAA4C,CAAC;AAAA,EACxD,SAAAC;AAAA,EACA,MAAMC;AAAA,EACN,cAAAC;AAAA,EACA,cAAAC;AAAA,EACA,YAAAC;AACF,MAAM;AACE,QAAA,EAAE,OAAAC,EAAU,IAAAL,GAEZM,IAASL,IAAW,GACpBM,IAAcD,IAASJ,GAEvB;AAAA,IACJ,QAAAM;AAAA,IACA,QAAAC;AAAA,IACA,KAAAC;AAAA,IACA,aAAAC;AAAA,IACA,aAAAC;AAAA,IACA,WAAAC;AAAA,IACA,WAAAC;AAAA,IACA,MAAAC;AAAA,IACA,MAAAC;AAAA,EACE,IAAAC,EAAsBjB,GAASM,GAAQJ,CAAY,GAEjDgB,IAASjB,IAAW;AAE1B,gCACG,KAEC,EAAA,UAAA;AAAA,IAAAkB,gBAAAA,EAAA;AAAA,MAAC;AAAA,MAAA;AAAA,QACC,GAAG,IAAID,CAAM,IAAIA,CAAM,KAAKV,CAAM,IAAIC,CAAM,KAAKH,CAAM,IAAIA,CAAM,MAC/DI,IAAM,MAAM,MAAM,GACpB,MAAMK,CAAI,IAAIC,CAAI;AAAA,QAClB,MAAMZ,IAAaC,IAAQe,EAAM,OAAO;AAAA,QACxC,aAAajB;AAAA,QACb,QAAO;AAAA,MAAA;AAAA,IACT;AAAA,IAGAgB,gBAAAA,EAAA;AAAA,MAAC;AAAA,MAAA;AAAA,QACC,GAAG,IAAID,CAAM,IAAIA,CAAM,KAAKN,CAAW,IAAID,CAAW,KAAKJ,CAAW,IAAIA,CAAW,MACnFG,IAAM,MAAM,MAAM,GACpB,MAAMI,CAAS,IAAID,CAAS;AAAA,QAC5B,MAAK;AAAA,MAAA;AAAA,IACP;AAAA,EACF,EAAA,CAAA;AAEJ;"}
|
|
@@ -1,24 +1,30 @@
|
|
|
1
|
-
import { j as
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
color:
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
{
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
}
|
|
1
|
+
import { j as t } from "./sd-component-library195.js";
|
|
2
|
+
import { FlexCenter as s } from "./sd-component-library35.js";
|
|
3
|
+
import { ResponsiveTextV2 as i } from "./sd-component-library149.js";
|
|
4
|
+
const l = ({
|
|
5
|
+
segment: { start: n, end: r, color: e },
|
|
6
|
+
size: o
|
|
7
|
+
}) => /* @__PURE__ */ t.jsx("foreignObject", { x: 0, y: 0, width: o, height: o, children: /* @__PURE__ */ t.jsx(s, { height: "100%", children: /* @__PURE__ */ t.jsxs(
|
|
8
|
+
i,
|
|
9
|
+
{
|
|
10
|
+
fontSizeWeight: [20, "bold"],
|
|
11
|
+
color: e,
|
|
12
|
+
sx: { position: "relative" },
|
|
13
|
+
children: [
|
|
14
|
+
Math.round((r - n) * 100),
|
|
15
|
+
/* @__PURE__ */ t.jsx(
|
|
16
|
+
i,
|
|
17
|
+
{
|
|
18
|
+
fontSizeWeight: [10, "bold"],
|
|
19
|
+
color: e,
|
|
20
|
+
sx: { position: "absolute", top: "4px", left: "100%" },
|
|
21
|
+
children: "%"
|
|
22
|
+
}
|
|
23
|
+
)
|
|
24
|
+
]
|
|
25
|
+
}
|
|
26
|
+
) }) });
|
|
21
27
|
export {
|
|
22
|
-
|
|
28
|
+
l as CompactDonutGaugeValueIndicator
|
|
23
29
|
};
|
|
24
30
|
//# sourceMappingURL=sd-component-library249.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sd-component-library249.js","sources":["../src/components/meters/
|
|
1
|
+
{"version":3,"file":"sd-component-library249.js","sources":["../src/components/meters/compact-donut-gauge/partials/compact-donut-gauge-value-indicator/compact-donut-gauge-value-indicator.tsx"],"sourcesContent":["import React from \"react\";\n\nimport { Flex } from \"rebass\";\n\nimport { FlexCenter } from \"../../../../containers\";\nimport { ResponsiveTextV2 } from \"../../../../texts\";\nimport { CompactDonutGaugeValueIndicatorProps as Props } from \"./interfaces\";\n\nexport const CompactDonutGaugeValueIndicator: React.FC<Props> = ({\n segment: { start, end, color },\n size,\n}) => {\n return (\n <foreignObject x={0} y={0} width={size} height={size}>\n <FlexCenter height=\"100%\">\n <ResponsiveTextV2\n fontSizeWeight={[20, \"bold\"]}\n color={color}\n sx={{ position: \"relative\" }}\n >\n {Math.round((end - start) * 100)}\n\n <ResponsiveTextV2\n fontSizeWeight={[10, \"bold\"]}\n color={color}\n sx={{ position: \"absolute\", top: \"4px\", left: \"100%\" }}\n >\n %\n </ResponsiveTextV2>\n </ResponsiveTextV2>\n </FlexCenter>\n </foreignObject>\n );\n};\n"],"names":["CompactDonutGaugeValueIndicator","start","end","color","size","jsx","FlexCenter","jsxs","ResponsiveTextV2"],"mappings":";;;AAQO,MAAMA,IAAmD,CAAC;AAAA,EAC/D,SAAS,EAAE,OAAAC,GAAO,KAAAC,GAAK,OAAAC,EAAM;AAAA,EAC7B,MAAAC;AACF,MAEKC,gBAAAA,EAAAA,IAAA,iBAAA,EAAc,GAAG,GAAG,GAAG,GAAG,OAAOD,GAAM,QAAQA,GAC9C,UAACC,gBAAAA,MAAAC,GAAA,EAAW,QAAO,QACjB,UAAAC,gBAAAA,EAAA;AAAA,EAACC;AAAA,EAAA;AAAA,IACC,gBAAgB,CAAC,IAAI,MAAM;AAAA,IAC3B,OAAAL;AAAA,IACA,IAAI,EAAE,UAAU,WAAW;AAAA,IAE1B,UAAA;AAAA,MAAK,KAAA,OAAOD,IAAMD,KAAS,GAAG;AAAA,MAE/BI,gBAAAA,EAAA;AAAA,QAACG;AAAA,QAAA;AAAA,UACC,gBAAgB,CAAC,IAAI,MAAM;AAAA,UAC3B,OAAAL;AAAA,UACA,IAAI,EAAE,UAAU,YAAY,KAAK,OAAO,MAAM,OAAO;AAAA,UACtD,UAAA;AAAA,QAAA;AAAA,MAED;AAAA,IAAA;AAAA,EAAA;AAAA,EAEJ,CAAA,EACF,CAAA;"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { j as r } from "./sd-component-library195.js";
|
|
2
2
|
import { Link as O } from "react-router-dom";
|
|
3
3
|
import { Button as Q, Flex as T } from "rebass";
|
|
4
|
-
import { LoadingSpinner as U } from "./sd-component-
|
|
4
|
+
import { LoadingSpinner as U } from "./sd-component-library205.js";
|
|
5
5
|
function V(t, e, o) {
|
|
6
6
|
return (n) => {
|
|
7
7
|
t == null || t(n), e && (`#${e}` !== window.location.hash && (o != null && o.replace(
|