@selfdecode/sd-component-library 4.0.144 → 4.0.146
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/links/link/interfaces.d.ts +1 -1
- package/lib/sd-component-library101.js +1 -1
- package/lib/sd-component-library102.js +2 -2
- package/lib/sd-component-library104.js +2 -2
- package/lib/sd-component-library106.js +2 -2
- package/lib/sd-component-library112.js +1 -1
- package/lib/sd-component-library118.js +1 -1
- package/lib/sd-component-library126.js +1 -1
- package/lib/sd-component-library127.js +1 -1
- package/lib/sd-component-library129.js +1 -1
- package/lib/sd-component-library167.js +1 -1
- package/lib/sd-component-library172.js +1 -1
- package/lib/sd-component-library197.js +3 -3
- package/lib/sd-component-library201.js +2 -3
- package/lib/sd-component-library201.js.map +1 -1
- package/lib/sd-component-library202.js +30 -2
- package/lib/sd-component-library202.js.map +1 -1
- package/lib/sd-component-library203.js +590 -21
- package/lib/sd-component-library203.js.map +1 -1
- package/lib/sd-component-library204.js +3 -599
- package/lib/sd-component-library204.js.map +1 -1
- package/lib/sd-component-library208.js +19 -62
- 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 +3 -40
- package/lib/sd-component-library210.js.map +1 -1
- package/lib/sd-component-library211.js +62 -127
- package/lib/sd-component-library211.js.map +1 -1
- package/lib/sd-component-library212.js +23 -13
- package/lib/sd-component-library212.js.map +1 -1
- package/lib/sd-component-library213.js +40 -14
- package/lib/sd-component-library213.js.map +1 -1
- package/lib/sd-component-library214.js +129 -3
- package/lib/sd-component-library214.js.map +1 -1
- package/lib/sd-component-library215.js +13 -3
- package/lib/sd-component-library215.js.map +1 -1
- package/lib/sd-component-library216.js +12 -63
- package/lib/sd-component-library216.js.map +1 -1
- package/lib/sd-component-library217.js +2 -2
- package/lib/sd-component-library217.js.map +1 -1
- package/lib/sd-component-library218.js +2 -2
- package/lib/sd-component-library218.js.map +1 -1
- package/lib/sd-component-library219.js +3 -46
- package/lib/sd-component-library219.js.map +1 -1
- package/lib/sd-component-library221.js +61 -13
- package/lib/sd-component-library221.js.map +1 -1
- package/lib/sd-component-library222.js +3 -21
- 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-library224.js +17 -3
- package/lib/sd-component-library224.js.map +1 -1
- package/lib/sd-component-library225.js +26 -3
- package/lib/sd-component-library225.js.map +1 -1
- package/lib/sd-component-library226.js +3 -31
- package/lib/sd-component-library226.js.map +1 -1
- package/lib/sd-component-library227.js +31 -19
- package/lib/sd-component-library227.js.map +1 -1
- package/lib/sd-component-library228.js +19 -20
- package/lib/sd-component-library228.js.map +1 -1
- package/lib/sd-component-library229.js +20 -28
- package/lib/sd-component-library229.js.map +1 -1
- package/lib/sd-component-library230.js +27 -32
- package/lib/sd-component-library230.js.map +1 -1
- package/lib/sd-component-library231.js +32 -128
- package/lib/sd-component-library231.js.map +1 -1
- package/lib/sd-component-library232.js +3 -43
- package/lib/sd-component-library232.js.map +1 -1
- package/lib/sd-component-library233.js +128 -46
- package/lib/sd-component-library233.js.map +1 -1
- package/lib/sd-component-library234.js +42 -7
- package/lib/sd-component-library234.js.map +1 -1
- package/lib/sd-component-library235.js +47 -3
- package/lib/sd-component-library235.js.map +1 -1
- package/lib/sd-component-library236.js +8 -21
- package/lib/sd-component-library236.js.map +1 -1
- package/lib/sd-component-library237.js +58 -103
- package/lib/sd-component-library237.js.map +1 -1
- package/lib/sd-component-library238.js +37 -41
- package/lib/sd-component-library238.js.map +1 -1
- package/lib/sd-component-library239.js +12 -23
- package/lib/sd-component-library239.js.map +1 -1
- package/lib/sd-component-library240.js +21 -53
- package/lib/sd-component-library240.js.map +1 -1
- package/lib/sd-component-library241.js +103 -58
- package/lib/sd-component-library241.js.map +1 -1
- package/lib/sd-component-library242.js +41 -37
- package/lib/sd-component-library242.js.map +1 -1
- package/lib/sd-component-library243.js +23 -12
- 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-library249.js +2 -75
- package/lib/sd-component-library249.js.map +1 -1
- package/lib/sd-component-library250.js +41 -2
- package/lib/sd-component-library250.js.map +1 -1
- package/lib/sd-component-library251.js +26 -324
- package/lib/sd-component-library251.js.map +1 -1
- package/lib/sd-component-library252.js +325 -5
- package/lib/sd-component-library252.js.map +1 -1
- package/lib/sd-component-library253.js +5 -26
- package/lib/sd-component-library253.js.map +1 -1
- package/lib/sd-component-library254.js +25 -21
- package/lib/sd-component-library254.js.map +1 -1
- package/lib/sd-component-library256.js +24 -22
- package/lib/sd-component-library256.js.map +1 -1
- package/lib/sd-component-library258.js +21 -25
- package/lib/sd-component-library258.js.map +1 -1
- package/lib/sd-component-library259.js +22 -24
- package/lib/sd-component-library259.js.map +1 -1
- package/lib/sd-component-library262.js +1 -1
- package/lib/sd-component-library279.js +70 -10
- package/lib/sd-component-library279.js.map +1 -1
- package/lib/sd-component-library280.js +101 -69
- package/lib/sd-component-library280.js.map +1 -1
- package/lib/sd-component-library281.js +95 -91
- package/lib/sd-component-library281.js.map +1 -1
- package/lib/sd-component-library282.js +10 -106
- package/lib/sd-component-library282.js.map +1 -1
- package/lib/sd-component-library286.js +4 -4
- package/lib/sd-component-library290.js +58 -2
- package/lib/sd-component-library290.js.map +1 -1
- package/lib/sd-component-library291.js +2 -8
- package/lib/sd-component-library291.js.map +1 -1
- package/lib/sd-component-library292.js +7 -327
- package/lib/sd-component-library292.js.map +1 -1
- package/lib/sd-component-library293.js +325 -48
- package/lib/sd-component-library293.js.map +1 -1
- package/lib/sd-component-library294.js +49 -56
- package/lib/sd-component-library294.js.map +1 -1
- package/lib/sd-component-library296.js +1 -1
- package/lib/sd-component-library297.js +2 -2
- package/lib/sd-component-library298.js +23 -33
- package/lib/sd-component-library298.js.map +1 -1
- package/lib/sd-component-library299.js +33 -23
- package/lib/sd-component-library299.js.map +1 -1
- package/lib/sd-component-library300.js +9 -5
- package/lib/sd-component-library300.js.map +1 -1
- package/lib/sd-component-library301.js +5 -4
- package/lib/sd-component-library301.js.map +1 -1
- package/lib/sd-component-library302.js +3 -8
- package/lib/sd-component-library302.js.map +1 -1
- package/lib/sd-component-library303.js +19 -5
- package/lib/sd-component-library303.js.map +1 -1
- package/lib/sd-component-library304.js +3 -4
- package/lib/sd-component-library304.js.map +1 -1
- package/lib/sd-component-library305.js +5 -19
- package/lib/sd-component-library305.js.map +1 -1
- package/lib/sd-component-library306.js +4 -3
- package/lib/sd-component-library306.js.map +1 -1
- package/lib/sd-component-library315.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-library62.js +3 -3
- package/lib/sd-component-library63.js +1 -1
- package/lib/sd-component-library64.js +2 -2
- package/lib/sd-component-library65.js +1 -1
- package/lib/sd-component-library7.js +1 -1
- package/lib/sd-component-library70.js +2 -2
- package/lib/sd-component-library72.js +3 -3
- package/lib/sd-component-library74.js +1 -1
- package/lib/sd-component-library75.js +3 -3
- package/lib/sd-component-library76.js +1 -1
- package/lib/sd-component-library77.js +1 -1
- package/lib/sd-component-library79.js +1 -1
- package/lib/sd-component-library80.js +1 -1
- package/lib/sd-component-library81.js +1 -1
- package/lib/sd-component-library81.js.map +1 -1
- package/lib/sd-component-library85.js +1 -1
- package/lib/sd-component-library86.js +6 -6
- package/lib/sd-component-library87.js +2 -2
- package/lib/sd-component-library88.js +1 -1
- package/lib/sd-component-library89.js +5 -5
- package/lib/sd-component-library90.js +1 -1
- package/lib/sd-component-library92.js +6 -6
- package/lib/sd-component-library93.js +1 -1
- package/lib/sd-component-library94.js +7 -7
- package/lib/sd-component-library95.js +1 -1
- package/lib/sd-component-library98.js +2 -2
- package/lib/sd-component-library99.js +3 -3
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sd-component-library221.js","sources":["../src/components/
|
|
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,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,24 +1,6 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
3
|
-
import { TwentyFourBold as s } from "./sd-component-library161.js";
|
|
4
|
-
import { MaxMaxContainer as c } from "./sd-component-library40.js";
|
|
5
|
-
const b = (o) => {
|
|
6
|
-
const {
|
|
7
|
-
title: i,
|
|
8
|
-
renderNegativeOption: a,
|
|
9
|
-
renderPositiveOption: n,
|
|
10
|
-
onPositiveFeedback: r,
|
|
11
|
-
onNegativeFeedback: d
|
|
12
|
-
} = o;
|
|
13
|
-
return /* @__PURE__ */ e.jsxs(t, { "data-testid": "base-boolean-feedback", children: [
|
|
14
|
-
/* @__PURE__ */ e.jsx(s, { "data-testid": "feedback-title", children: i }),
|
|
15
|
-
/* @__PURE__ */ e.jsxs(c, { mt: ["20px"], gap: ["20px"], children: [
|
|
16
|
-
/* @__PURE__ */ e.jsx(t, { "data-testid": "positive-option-container", children: n(r) }),
|
|
17
|
-
/* @__PURE__ */ e.jsx(t, { "data-testid": "negative-option-container", children: a(d) })
|
|
18
|
-
] })
|
|
19
|
-
] });
|
|
20
|
-
};
|
|
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)" }));
|
|
21
3
|
export {
|
|
22
|
-
|
|
4
|
+
a as ReactComponent
|
|
23
5
|
};
|
|
24
6
|
//# sourceMappingURL=sd-component-library222.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sd-component-library222.js","sources":["../src/components/
|
|
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/
|
|
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,20 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
1
|
+
import { j as o } from "./sd-component-library197.js";
|
|
2
|
+
import { Label as s } from "@rebass/forms";
|
|
3
|
+
const l = ({
|
|
4
|
+
variant: a,
|
|
5
|
+
label: t,
|
|
6
|
+
...e
|
|
7
|
+
}) => /* @__PURE__ */ o.jsx(
|
|
8
|
+
s,
|
|
9
|
+
{
|
|
10
|
+
"data-testid": "base-label",
|
|
11
|
+
...e,
|
|
12
|
+
sx: { fontFamily: "proxima-nova" },
|
|
13
|
+
variant: `_labels.${a}`,
|
|
14
|
+
children: t
|
|
15
|
+
}
|
|
16
|
+
);
|
|
3
17
|
export {
|
|
4
|
-
|
|
18
|
+
l as BaseLabel
|
|
5
19
|
};
|
|
6
20
|
//# sourceMappingURL=sd-component-library224.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sd-component-library224.js","sources":["../src/components/
|
|
1
|
+
{"version":3,"file":"sd-component-library224.js","sources":["../src/components/labels/base-label/base-label.tsx"],"sourcesContent":["import React from \"react\";\n\nimport { Label } from \"@rebass/forms\";\n\nimport { BaseLabelProps } from \"./interfaces\";\n\nexport const BaseLabel: React.FC<BaseLabelProps> = ({\n variant,\n label,\n ...props\n}) => (\n <Label\n data-testid=\"base-label\"\n {...props}\n sx={{ fontFamily: \"proxima-nova\" }}\n variant={`_labels.${variant}`}\n >\n {label}\n </Label>\n);\n"],"names":["BaseLabel","variant","label","props","jsx","Label"],"mappings":";;AAMO,MAAMA,IAAsC,CAAC;AAAA,EAClD,SAAAC;AAAA,EACA,OAAAC;AAAA,EACA,GAAGC;AACL,MACEC,gBAAAA,EAAA;AAAA,EAACC;AAAA,EAAA;AAAA,IACC,eAAY;AAAA,IACX,GAAGF;AAAA,IACJ,IAAI,EAAE,YAAY,eAAe;AAAA,IACjC,SAAS,WAAWF,CAAO;AAAA,IAE1B,UAAAC;AAAA,EAAA;AACH;"}
|
|
@@ -1,6 +1,29 @@
|
|
|
1
|
-
|
|
1
|
+
import { j as n } from "./sd-component-library197.js";
|
|
2
|
+
import { ResponsiveTextV2 as p } from "./sd-component-library150.js";
|
|
3
|
+
const c = (t) => {
|
|
4
|
+
const { text: o, onClick: e, px: r = "10px", py: i = "15px" } = t;
|
|
5
|
+
return /* @__PURE__ */ n.jsx(
|
|
6
|
+
p,
|
|
7
|
+
{
|
|
8
|
+
fontSizeWeight: [[16, "regular"]],
|
|
9
|
+
sx: {
|
|
10
|
+
display: "flex",
|
|
11
|
+
justifyContent: "end",
|
|
12
|
+
px: r,
|
|
13
|
+
py: i,
|
|
14
|
+
cursor: "pointer",
|
|
15
|
+
textTransform: "capitalize",
|
|
16
|
+
opacity: 0.7,
|
|
17
|
+
":hover": {
|
|
18
|
+
opacity: 1
|
|
19
|
+
}
|
|
20
|
+
},
|
|
21
|
+
onClick: e,
|
|
22
|
+
children: o
|
|
23
|
+
}
|
|
24
|
+
);
|
|
25
|
+
};
|
|
2
26
|
export {
|
|
3
|
-
|
|
4
|
-
o as defaultTextBottomMargin
|
|
27
|
+
c as ActionBox
|
|
5
28
|
};
|
|
6
29
|
//# sourceMappingURL=sd-component-library225.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sd-component-library225.js","sources":["../src/components/
|
|
1
|
+
{"version":3,"file":"sd-component-library225.js","sources":["../src/components/tooltips/actions-tooltip/partials/action-box/action-box.tsx"],"sourcesContent":["import React from \"react\";\n\nimport { Box, Flex } from \"rebass\";\n\nimport { ResponsiveTextV2 } from \"../../../../texts/responsive-text-v2\";\nimport { ActionBoxProps as Props } from \"./interfaces\";\n\nexport const ActionBox: React.FC<Props> = (props) => {\n const { text, onClick, px = \"10px\", py = \"15px\" } = props;\n\n return (\n <ResponsiveTextV2\n fontSizeWeight={[[16, \"regular\"]]}\n sx={{\n display: \"flex\",\n justifyContent: \"end\",\n px,\n py,\n cursor: \"pointer\",\n textTransform: \"capitalize\",\n opacity: 0.7,\n \":hover\": {\n opacity: 1,\n },\n }}\n onClick={onClick}\n >\n {text}\n </ResponsiveTextV2>\n );\n};\n"],"names":["ActionBox","props","text","onClick","px","py","jsx","ResponsiveTextV2"],"mappings":";;AAOa,MAAAA,IAA6B,CAACC,MAAU;AACnD,QAAM,EAAE,MAAAC,GAAM,SAAAC,GAAS,IAAAC,IAAK,QAAQ,IAAAC,IAAK,OAAW,IAAAJ;AAGlD,SAAAK,gBAAAA,EAAA;AAAA,IAACC;AAAA,IAAA;AAAA,MACC,gBAAgB,CAAC,CAAC,IAAI,SAAS,CAAC;AAAA,MAChC,IAAI;AAAA,QACF,SAAS;AAAA,QACT,gBAAgB;AAAA,QAChB,IAAAH;AAAA,QACA,IAAAC;AAAA,QACA,QAAQ;AAAA,QACR,eAAe;AAAA,QACf,SAAS;AAAA,QACT,UAAU;AAAA,UACR,SAAS;AAAA,QACX;AAAA,MACF;AAAA,MACA,SAAAF;AAAA,MAEC,UAAAD;AAAA,IAAA;AAAA,EAAA;AAGP;"}
|
|
@@ -1,34 +1,6 @@
|
|
|
1
|
-
const
|
|
1
|
+
const t = 1, o = 13;
|
|
2
2
|
export {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
h as defaultDashWidth,
|
|
6
|
-
n as defaultDistanceBetweenRanges,
|
|
7
|
-
M as defaultDistanceFromLabelToRanges,
|
|
8
|
-
d as defaultDistanceFromRangesToNeedle,
|
|
9
|
-
m as defaultDistanceFromRangesToScale,
|
|
10
|
-
a as defaultGaugeWidth,
|
|
11
|
-
t as defaultHeight,
|
|
12
|
-
i as defaultInnerCircleRadius,
|
|
13
|
-
c as defaultInnerCircleStrokeWidth,
|
|
14
|
-
o as defaultInnerPointRadius,
|
|
15
|
-
W as defaultMaskBorderRadius,
|
|
16
|
-
r as defaultNeedleWidth,
|
|
17
|
-
u as defaultNumberOfDashes,
|
|
18
|
-
l as defaultPointStrokeWidth,
|
|
19
|
-
e as defaultWidth,
|
|
20
|
-
R as labelPaddingX,
|
|
21
|
-
g as labelWidth,
|
|
22
|
-
B as smallMeterDistanceBetweenRanges,
|
|
23
|
-
C as smallMeterDistanceFromRangesToNeedle,
|
|
24
|
-
P as smallMeterGaugeWidth,
|
|
25
|
-
k as smallMeterHeight,
|
|
26
|
-
S as smallMeterInnerCircleRadius,
|
|
27
|
-
b as smallMeterInnerCircleStrokeWidth,
|
|
28
|
-
T as smallMeterMaskBorderRadius,
|
|
29
|
-
F as smallMeterNeedleWidth,
|
|
30
|
-
N as smallMeterPointRadius,
|
|
31
|
-
I as smallMeterPointStrokeWidth,
|
|
32
|
-
D as smallMeterWidth
|
|
3
|
+
t as defaultPointerWidth,
|
|
4
|
+
o as defaultTextBottomMargin
|
|
33
5
|
};
|
|
34
6
|
//# sourceMappingURL=sd-component-library226.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sd-component-library226.js","sources":["../src/components/meters/outline-meter/
|
|
1
|
+
{"version":3,"file":"sd-component-library226.js","sources":["../src/components/meters/multi-option-discrete-outline-meter/constants.ts"],"sourcesContent":["export const defaultPointerWidth = 1;\nexport const defaultTextBottomMargin = 13;\n"],"names":["defaultPointerWidth","defaultTextBottomMargin"],"mappings":"AAAO,MAAMA,IAAsB,GACtBC,IAA0B;"}
|
|
@@ -1,22 +1,34 @@
|
|
|
1
|
-
|
|
2
|
-
import { SmileyGaugeColor as e } from "./sd-component-library228.js";
|
|
3
|
-
import { ReactComponent as o } from "./sd-component-library287.js";
|
|
4
|
-
import { ReactComponent as m } from "./sd-component-library288.js";
|
|
5
|
-
import { ReactComponent as i } from "./sd-component-library289.js";
|
|
6
|
-
const S = 10, c = 80, p = 100, y = 87, R = 30, d = 3, f = 2, g = 4, u = /* @__PURE__ */ new Map([
|
|
7
|
-
[e.GREEN, /* @__PURE__ */ t.jsx(o, {})],
|
|
8
|
-
[e.ORANGE, /* @__PURE__ */ t.jsx(m, {})],
|
|
9
|
-
[e.RED, /* @__PURE__ */ t.jsx(i, {})]
|
|
10
|
-
]);
|
|
1
|
+
const e = 250, t = 220, s = 270, n = 10, a = 6, l = 4.5, o = 1.5, d = 18, c = 4, i = 6.5, r = 8, u = 40, f = 6, h = 1.5, m = 32, M = 20, g = 100, R = 14, W = 100, D = 100, k = 87, I = 3, N = 1.5, P = 4, S = 6, b = 3, B = 10, C = 18, F = 7, T = 100;
|
|
11
2
|
export {
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
d as
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
3
|
+
s as defaultArc,
|
|
4
|
+
f as defaultDashHeight,
|
|
5
|
+
h as defaultDashWidth,
|
|
6
|
+
n as defaultDistanceBetweenRanges,
|
|
7
|
+
M as defaultDistanceFromLabelToRanges,
|
|
8
|
+
d as defaultDistanceFromRangesToNeedle,
|
|
9
|
+
m as defaultDistanceFromRangesToScale,
|
|
10
|
+
a as defaultGaugeWidth,
|
|
11
|
+
t as defaultHeight,
|
|
12
|
+
i as defaultInnerCircleRadius,
|
|
13
|
+
c as defaultInnerCircleStrokeWidth,
|
|
14
|
+
o as defaultInnerPointRadius,
|
|
15
|
+
W as defaultMaskBorderRadius,
|
|
16
|
+
r as defaultNeedleWidth,
|
|
17
|
+
u as defaultNumberOfDashes,
|
|
18
|
+
l as defaultPointStrokeWidth,
|
|
19
|
+
e as defaultWidth,
|
|
20
|
+
R as labelPaddingX,
|
|
21
|
+
g as labelWidth,
|
|
22
|
+
B as smallMeterDistanceBetweenRanges,
|
|
23
|
+
C as smallMeterDistanceFromRangesToNeedle,
|
|
24
|
+
P as smallMeterGaugeWidth,
|
|
25
|
+
k as smallMeterHeight,
|
|
26
|
+
S as smallMeterInnerCircleRadius,
|
|
27
|
+
b as smallMeterInnerCircleStrokeWidth,
|
|
28
|
+
T as smallMeterMaskBorderRadius,
|
|
29
|
+
F as smallMeterNeedleWidth,
|
|
30
|
+
N as smallMeterPointRadius,
|
|
31
|
+
I as smallMeterPointStrokeWidth,
|
|
32
|
+
D as smallMeterWidth
|
|
21
33
|
};
|
|
22
34
|
//# sourceMappingURL=sd-component-library227.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sd-component-library227.js","sources":["../src/components/meters/
|
|
1
|
+
{"version":3,"file":"sd-component-library227.js","sources":["../src/components/meters/outline-meter/contants.ts"],"sourcesContent":["/**\n * Default values for outline meters\n */\nexport const defaultWidth = 250;\nexport const defaultHeight = 220;\nexport const defaultArc = 270;\nexport const defaultDistanceBetweenRanges = 10;\nexport const defaultGaugeWidth = 6;\nexport const defaultPointStrokeWidth = 4.5;\nexport const defaultInnerPointRadius = 1.5;\nexport const defaultDistanceFromRangesToNeedle = 18;\nexport const defaultInnerCircleStrokeWidth = 4;\nexport const defaultInnerCircleRadius = 6.5;\nexport const defaultNeedleWidth = 8;\nexport const defaultNumberOfDashes = 40;\nexport const defaultDashHeight = 6;\nexport const defaultDashWidth = 1.5;\nexport const defaultDistanceFromRangesToScale = 32;\nexport const defaultDistanceFromLabelToRanges = 20;\nexport const labelWidth = 100;\nexport const labelPaddingX = 14;\nexport const defaultMaskBorderRadius = 100;\n\n/**\n * Small Outline meter default values\n */\nexport const smallMeterWidth = 100;\nexport const smallMeterHeight = 87;\nexport const smallMeterPointStrokeWidth = 3;\nexport const smallMeterPointRadius = 1.5;\nexport const smallMeterGaugeWidth = 4;\nexport const smallMeterInnerCircleRadius = 6;\nexport const smallMeterInnerCircleStrokeWidth = 3;\nexport const smallMeterDistanceBetweenRanges = 10;\nexport const smallMeterDistanceFromRangesToNeedle = 18;\nexport const smallMeterNeedleWidth = 7;\nexport const smallMeterMaskBorderRadius = 100;\n"],"names":["defaultWidth","defaultHeight","defaultArc","defaultDistanceBetweenRanges","defaultGaugeWidth","defaultPointStrokeWidth","defaultInnerPointRadius","defaultDistanceFromRangesToNeedle","defaultInnerCircleStrokeWidth","defaultInnerCircleRadius","defaultNeedleWidth","defaultNumberOfDashes","defaultDashHeight","defaultDashWidth","defaultDistanceFromRangesToScale","defaultDistanceFromLabelToRanges","labelWidth","labelPaddingX","defaultMaskBorderRadius","smallMeterWidth","smallMeterHeight","smallMeterPointStrokeWidth","smallMeterPointRadius","smallMeterGaugeWidth","smallMeterInnerCircleRadius","smallMeterInnerCircleStrokeWidth","smallMeterDistanceBetweenRanges","smallMeterDistanceFromRangesToNeedle","smallMeterNeedleWidth","smallMeterMaskBorderRadius"],"mappings":"AAGO,MAAMA,IAAe,KACfC,IAAgB,KAChBC,IAAa,KACbC,IAA+B,IAC/BC,IAAoB,GACpBC,IAA0B,KAC1BC,IAA0B,KAC1BC,IAAoC,IACpCC,IAAgC,GAChCC,IAA2B,KAC3BC,IAAqB,GACrBC,IAAwB,IACxBC,IAAoB,GACpBC,IAAmB,KACnBC,IAAmC,IACnCC,IAAmC,IACnCC,IAAa,KACbC,IAAgB,IAChBC,IAA0B,KAK1BC,IAAkB,KAClBC,IAAmB,IACnBC,IAA6B,GAC7BC,IAAwB,KACxBC,IAAuB,GACvBC,IAA8B,GAC9BC,IAAmC,GACnCC,IAAkC,IAClCC,IAAuC,IACvCC,IAAwB,GACxBC,IAA6B;"}
|
|
@@ -1,23 +1,22 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
};
|
|
12
|
-
}, R = (r) => {
|
|
13
|
-
const { start: t, end: n } = r;
|
|
14
|
-
return t === 0 ? n < 0.6 : n === 1 ? t > 0.4 : !1;
|
|
15
|
-
};
|
|
1
|
+
import { j as t } from "./sd-component-library197.js";
|
|
2
|
+
import { SmileyGaugeColor as e } from "./sd-component-library229.js";
|
|
3
|
+
import { ReactComponent as o } from "./sd-component-library287.js";
|
|
4
|
+
import { ReactComponent as m } from "./sd-component-library288.js";
|
|
5
|
+
import { ReactComponent as i } from "./sd-component-library289.js";
|
|
6
|
+
const S = 10, c = 80, p = 100, y = 87, R = 30, d = 3, f = 2, g = 4, u = /* @__PURE__ */ new Map([
|
|
7
|
+
[e.GREEN, /* @__PURE__ */ t.jsx(o, {})],
|
|
8
|
+
[e.ORANGE, /* @__PURE__ */ t.jsx(m, {})],
|
|
9
|
+
[e.RED, /* @__PURE__ */ t.jsx(i, {})]
|
|
10
|
+
]);
|
|
16
11
|
export {
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
f as
|
|
12
|
+
u as COLOR_TO_ICON_MAP,
|
|
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
|
|
22
21
|
};
|
|
23
22
|
//# sourceMappingURL=sd-component-library228.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sd-component-library228.js","sources":["../src/components/meters/smiley-meter-v2/
|
|
1
|
+
{"version":3,"file":"sd-component-library228.js","sources":["../src/components/meters/smiley-meter-v2/constants.tsx"],"sourcesContent":["import React from \"react\";\n\nimport { HappySmileyIcon, NeutralSmileyIcon, SadSmileyIcon } from \"./assets\";\n\n/**\n * Large Smiley meter v2 default values.\n */\nimport { SmileyGaugeColor } from \"./utils\";\n\nexport const defaultDistanceBetweenRanges = 10;\nexport const defaultSmileyWidth = 80;\n\n/**\n * Small Smiley meter v2 default values.\n */\nexport const smallSmileyMeterWidth = 100;\nexport const smallSmileyMeterHeight = 87;\nexport const smallSmileyWidth = 30;\nexport const smallSmileyInnerPointStrokeWidth = 3;\nexport const smallSmileyInnerPointRadius = 2;\nexport const smallSmileyGaugeWidth = 4;\n\nexport const COLOR_TO_ICON_MAP = new Map<SmileyGaugeColor, React.ReactNode>([\n [SmileyGaugeColor.GREEN, <HappySmileyIcon />],\n [SmileyGaugeColor.ORANGE, <NeutralSmileyIcon />],\n [SmileyGaugeColor.RED, <SadSmileyIcon />],\n]);\n"],"names":["defaultDistanceBetweenRanges","defaultSmileyWidth","smallSmileyMeterWidth","smallSmileyMeterHeight","smallSmileyWidth","smallSmileyInnerPointStrokeWidth","smallSmileyInnerPointRadius","smallSmileyGaugeWidth","COLOR_TO_ICON_MAP","SmileyGaugeColor","jsx","HappySmileyIcon","NeutralSmileyIcon","SadSmileyIcon"],"mappings":";;;;;AASO,MAAMA,IAA+B,IAC/BC,IAAqB,IAKrBC,IAAwB,KACxBC,IAAyB,IACzBC,IAAmB,IACnBC,IAAmC,GACnCC,IAA8B,GAC9BC,IAAwB,GAExBC,wBAAwB,IAAuC;AAAA,EAC1E,CAACC,EAAiB,OAAOC,gBAAAA,EAAA,IAACC,IAAgB,CAAA,CAAE;AAAA,EAC5C,CAACF,EAAiB,QAAQC,gBAAAA,EAAA,IAACE,IAAkB,CAAA,CAAE;AAAA,EAC/C,CAACH,EAAiB,KAAKC,gBAAAA,EAAA,IAACG,IAAc,CAAA,CAAE;AAC1C,CAAC;"}
|
|
@@ -1,31 +1,23 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
(r,
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
...e,
|
|
17
|
-
...r,
|
|
18
|
-
idx: t,
|
|
19
|
-
totalRanges: n.length,
|
|
20
|
-
pointerLength: c,
|
|
21
|
-
key: `${e.start}-${e.end}-${t}`,
|
|
22
|
-
isMatchedRange: o === t,
|
|
23
|
-
ref: m
|
|
24
|
-
}
|
|
25
|
-
)) });
|
|
26
|
-
}
|
|
27
|
-
);
|
|
1
|
+
import { isCorrectOutlineMeterConfig as l } from "./sd-component-library91.js";
|
|
2
|
+
var a = /* @__PURE__ */ ((r) => (r.GREEN = "#00B466", r.ORANGE = "#FF9900", r.RED = "#FF0000", r))(a || {});
|
|
3
|
+
const u = (r) => !r.some(
|
|
4
|
+
({ color: t }) => !Object.values(a).includes(t)
|
|
5
|
+
), f = (r, t) => l(r, t) && u(t), A = (r, t, n, i, o, d) => {
|
|
6
|
+
const c = r - (t - 1) * n, e = (360 - r) / 2 + n * i + c * o, s = e + c * (d - o), g = (e + s) / 2;
|
|
7
|
+
return {
|
|
8
|
+
rangeArcStart: e,
|
|
9
|
+
rangeArcEnd: s,
|
|
10
|
+
rangeArcMiddle: g
|
|
11
|
+
};
|
|
12
|
+
}, R = (r) => {
|
|
13
|
+
const { start: t, end: n } = r;
|
|
14
|
+
return t === 0 ? n < 0.6 : n === 1 ? t > 0.4 : !1;
|
|
15
|
+
};
|
|
28
16
|
export {
|
|
29
|
-
|
|
17
|
+
a as SmileyGaugeColor,
|
|
18
|
+
u as areColorsValid,
|
|
19
|
+
R as getIsHorizontal,
|
|
20
|
+
A as getRangeProperties,
|
|
21
|
+
f as isCorrectSmileyMeterConfig
|
|
30
22
|
};
|
|
31
23
|
//# sourceMappingURL=sd-component-library229.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sd-component-library229.js","sources":["../src/components/meters/smiley-meter-v2/
|
|
1
|
+
{"version":3,"file":"sd-component-library229.js","sources":["../src/components/meters/smiley-meter-v2/utils.ts"],"sourcesContent":["import { OutlineMeterRangeConfig } from \"../outline-meter\";\nimport { isCorrectOutlineMeterConfig } from \"../outline-meter/utils\";\nimport { SmileyMeterRange } from \"./interfaces\";\n\nexport enum SmileyGaugeColor {\n GREEN = \"#00B466\",\n ORANGE = \"#FF9900\",\n RED = \"#FF0000\",\n}\n\nexport const areColorsValid = (ranges: OutlineMeterRangeConfig[]) =>\n !ranges.some(\n ({ color }) => !Object.values(SmileyGaugeColor).includes(color as any)\n );\n\nexport const isCorrectSmileyMeterConfig = (\n value: number,\n ranges: OutlineMeterRangeConfig[]\n): ranges is SmileyMeterRange[] => {\n return isCorrectOutlineMeterConfig(value, ranges) && areColorsValid(ranges);\n};\n\nexport const getRangeProperties = (\n arc: number,\n totalRanges: number,\n distanceBetweenRanges: number,\n idx: number,\n start: number,\n end: number\n) => {\n const arcForRanges = arc - (totalRanges - 1) * distanceBetweenRanges;\n const arcStart = (360 - arc) / 2; // deg\n const rangeArcStart =\n arcStart + distanceBetweenRanges * idx + arcForRanges * start;\n const rangeArcEnd = rangeArcStart + arcForRanges * (end - start);\n\n const rangeArcMiddle = (rangeArcStart + rangeArcEnd) / 2;\n return {\n rangeArcStart,\n rangeArcEnd,\n rangeArcMiddle,\n };\n};\n\nexport const getIsHorizontal = (range: SmileyMeterRange) => {\n const { start, end } = range;\n return start === 0 ? end < 0.6 : end === 1 ? start > 0.4 : false;\n};\n"],"names":["SmileyGaugeColor","areColorsValid","ranges","color","isCorrectSmileyMeterConfig","value","isCorrectOutlineMeterConfig","getRangeProperties","arc","totalRanges","distanceBetweenRanges","idx","start","end","arcForRanges","rangeArcStart","rangeArcEnd","rangeArcMiddle","getIsHorizontal","range"],"mappings":";AAIY,IAAAA,sBAAAA,OACVA,EAAA,QAAQ,WACRA,EAAA,SAAS,WACTA,EAAA,MAAM,WAHIA,IAAAA,KAAA,CAAA,CAAA;AAML,MAAMC,IAAiB,CAACC,MAC7B,CAACA,EAAO;AAAA,EACN,CAAC,EAAE,OAAAC,EAAY,MAAA,CAAC,OAAO,OAAOH,CAAgB,EAAE,SAASG,CAAY;AACvE,GAEWC,IAA6B,CACxCC,GACAH,MAEOI,EAA4BD,GAAOH,CAAM,KAAKD,EAAeC,CAAM,GAG/DK,IAAqB,CAChCC,GACAC,GACAC,GACAC,GACAC,GACAC,MACG;AACG,QAAAC,IAAeN,KAAOC,IAAc,KAAKC,GAEzCK,KADY,MAAMP,KAAO,IAElBE,IAAwBC,IAAMG,IAAeF,GACpDI,IAAcD,IAAgBD,KAAgBD,IAAMD,IAEpDK,KAAkBF,IAAgBC,KAAe;AAChD,SAAA;AAAA,IACL,eAAAD;AAAA,IACA,aAAAC;AAAA,IACA,gBAAAC;AAAA,EAAA;AAEJ,GAEaC,IAAkB,CAACC,MAA4B;AACpD,QAAA,EAAE,OAAAP,GAAO,KAAAC,EAAQ,IAAAM;AACvB,SAAOP,MAAU,IAAIC,IAAM,MAAMA,MAAQ,IAAID,IAAQ,MAAM;AAC7D;"}
|
|
@@ -1,36 +1,31 @@
|
|
|
1
|
-
import { j as
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
idx: s,
|
|
11
|
-
diameter: d,
|
|
12
|
-
segmented: c,
|
|
13
|
-
counterClockWise: i
|
|
14
|
-
} = e, { start: g, end: l } = a, m = d / 2, { rangeArcMiddle: x } = p(
|
|
15
|
-
n,
|
|
16
|
-
o,
|
|
17
|
-
r,
|
|
18
|
-
s,
|
|
19
|
-
g,
|
|
20
|
-
l
|
|
21
|
-
), t = Math.round(x);
|
|
22
|
-
return /* @__PURE__ */ h.jsx(
|
|
23
|
-
u,
|
|
24
|
-
{
|
|
1
|
+
import { j as a } from "./sd-component-library197.js";
|
|
2
|
+
import R, { createElement as g } from "react";
|
|
3
|
+
import { isValueInRange as f } from "./sd-component-library91.js";
|
|
4
|
+
import { SmileyMeterRange as d } from "./sd-component-library297.js";
|
|
5
|
+
const j = R.forwardRef(
|
|
6
|
+
(r, m) => {
|
|
7
|
+
const { value: s, ranges: n, distanceFromRanges: c } = r, o = n.findIndex(
|
|
8
|
+
({ start: e, end: t, bounds: l }) => f(s, e, t, l)
|
|
9
|
+
), i = n.map((e, t) => ({
|
|
25
10
|
...e,
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
11
|
+
color: t < o ? n[o].color : e.color
|
|
12
|
+
}));
|
|
13
|
+
return /* @__PURE__ */ a.jsx(a.Fragment, { children: i.map((e, t) => /* @__PURE__ */ g(
|
|
14
|
+
d,
|
|
15
|
+
{
|
|
16
|
+
...e,
|
|
17
|
+
...r,
|
|
18
|
+
idx: t,
|
|
19
|
+
totalRanges: n.length,
|
|
20
|
+
pointerLength: c,
|
|
21
|
+
key: `${e.start}-${e.end}-${t}`,
|
|
22
|
+
isMatchedRange: o === t,
|
|
23
|
+
ref: m
|
|
24
|
+
}
|
|
25
|
+
)) });
|
|
26
|
+
}
|
|
27
|
+
);
|
|
33
28
|
export {
|
|
34
|
-
|
|
29
|
+
j as SmileyMeterRanges
|
|
35
30
|
};
|
|
36
31
|
//# sourceMappingURL=sd-component-library230.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sd-component-library230.js","sources":["../src/components/meters/smiley-meter-v2/partials/
|
|
1
|
+
{"version":3,"file":"sd-component-library230.js","sources":["../src/components/meters/smiley-meter-v2/partials/smiley-meter-ranges/smiley-meter-ranges.tsx"],"sourcesContent":["import React from \"react\";\n\nimport { isValueInRange } from \"../../../outline-meter/utils\";\nimport { SmileyMeterRange } from \"../smiley-meter-range\";\nimport { SmileyMeterRangesProps as Props } from \"./interfaces\";\n\nexport const SmileyMeterRanges = React.forwardRef<SVGCircleElement, Props>(\n (props, pointRef) => {\n const { value, ranges, distanceFromRanges } = props;\n\n const matchingRangeIndex = ranges.findIndex(({ start, end, bounds }) =>\n isValueInRange(value, start, end, bounds)\n );\n const newRanges = ranges.map((range, idx) => ({\n ...range,\n color:\n idx < matchingRangeIndex\n ? ranges[matchingRangeIndex].color\n : range.color,\n }));\n\n return (\n <>\n {newRanges.map((range, idx) => (\n <SmileyMeterRange\n {...range}\n {...props}\n idx={idx}\n totalRanges={ranges.length}\n pointerLength={distanceFromRanges}\n key={`${range.start}-${range.end}-${idx}`}\n isMatchedRange={matchingRangeIndex === idx}\n ref={pointRef}\n />\n ))}\n </>\n );\n }\n);\n"],"names":["SmileyMeterRanges","React","props","pointRef","value","ranges","distanceFromRanges","matchingRangeIndex","start","end","bounds","isValueInRange","newRanges","range","idx","jsx","Fragment","createElement","SmileyMeterRange"],"mappings":";;;;AAMO,MAAMA,IAAoBC,EAAM;AAAA,EACrC,CAACC,GAAOC,MAAa;AACnB,UAAM,EAAE,OAAAC,GAAO,QAAAC,GAAQ,oBAAAC,EAAA,IAAuBJ,GAExCK,IAAqBF,EAAO;AAAA,MAAU,CAAC,EAAE,OAAAG,GAAO,KAAAC,GAAK,QAAAC,QACzDC,EAAeP,GAAOI,GAAOC,GAAKC,CAAM;AAAA,IAAA,GAEpCE,IAAYP,EAAO,IAAI,CAACQ,GAAOC,OAAS;AAAA,MAC5C,GAAGD;AAAA,MACH,OACEC,IAAMP,IACFF,EAAOE,CAAkB,EAAE,QAC3BM,EAAM;AAAA,IACZ,EAAA;AAEF,WAEKE,gBAAAA,EAAA,IAAAC,EAAA,UAAA,EAAA,UAAAJ,EAAU,IAAI,CAACC,GAAOC,MACrB,gBAAAG;AAAA,MAACC;AAAA,MAAA;AAAA,QACE,GAAGL;AAAA,QACH,GAAGX;AAAA,QACJ,KAAAY;AAAA,QACA,aAAaT,EAAO;AAAA,QACpB,eAAeC;AAAA,QACf,KAAK,GAAGO,EAAM,KAAK,IAAIA,EAAM,GAAG,IAAIC,CAAG;AAAA,QACvC,gBAAgBP,MAAuBO;AAAA,QACvC,KAAKX;AAAA,MAAA;AAAA,IAER,CAAA,EACH,CAAA;AAAA,EAEJ;AACF;"}
|