@selfdecode/sd-component-library 4.0.146 → 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 +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-library129.js +1 -1
- package/lib/sd-component-library134.js +1 -1
- package/lib/sd-component-library136.js +2 -2
- package/lib/sd-component-library16.js +1 -1
- package/lib/sd-component-library197.js +3 -3
- package/lib/sd-component-library201.js +3 -2
- package/lib/sd-component-library201.js.map +1 -1
- package/lib/sd-component-library202.js +2 -30
- package/lib/sd-component-library202.js.map +1 -1
- package/lib/sd-component-library203.js +21 -590
- 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-library205.js +55 -24
- package/lib/sd-component-library205.js.map +1 -1
- package/lib/sd-component-library206.js +24 -55
- package/lib/sd-component-library206.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 -21
- package/lib/sd-component-library208.js.map +1 -1
- package/lib/sd-component-library209.js +1 -1
- package/lib/sd-component-library209.js.map +1 -1
- package/lib/sd-component-library210.js +18 -3
- package/lib/sd-component-library210.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 +64 -129
- package/lib/sd-component-library233.js.map +1 -1
- package/lib/sd-component-library234.js +41 -41
- package/lib/sd-component-library234.js.map +1 -1
- package/lib/sd-component-library235.js +12 -46
- package/lib/sd-component-library235.js.map +1 -1
- package/lib/sd-component-library236.js +19 -8
- package/lib/sd-component-library236.js.map +1 -1
- package/lib/sd-component-library237.js +20 -64
- package/lib/sd-component-library237.js.map +1 -1
- package/lib/sd-component-library238.js +28 -43
- package/lib/sd-component-library238.js.map +1 -1
- package/lib/sd-component-library239.js +30 -10
- 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-library241.js +1 -1
- package/lib/sd-component-library242.js +1 -1
- package/lib/sd-component-library247.js +38 -18
- package/lib/sd-component-library247.js.map +1 -1
- package/lib/sd-component-library248.js +25 -18
- package/lib/sd-component-library248.js.map +1 -1
- package/lib/sd-component-library250.js +18 -38
- package/lib/sd-component-library250.js.map +1 -1
- package/lib/sd-component-library251.js +18 -25
- package/lib/sd-component-library251.js.map +1 -1
- package/lib/sd-component-library252.js +5 -5
- package/lib/sd-component-library260.js +51 -30
- package/lib/sd-component-library260.js.map +1 -1
- package/lib/sd-component-library261.js +30 -51
- package/lib/sd-component-library261.js.map +1 -1
- package/lib/sd-component-library268.js +9 -121
- package/lib/sd-component-library268.js.map +1 -1
- package/lib/sd-component-library269.js +49 -9
- package/lib/sd-component-library269.js.map +1 -1
- package/lib/sd-component-library270.js +111 -39
- package/lib/sd-component-library270.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 -25
- package/lib/sd-component-library298.js.map +1 -1
- package/lib/sd-component-library299.js +5 -35
- package/lib/sd-component-library299.js.map +1 -1
- package/lib/sd-component-library300.js +3 -8
- package/lib/sd-component-library300.js.map +1 -1
- package/lib/sd-component-library301.js +19 -5
- package/lib/sd-component-library301.js.map +1 -1
- package/lib/sd-component-library302.js +3 -4
- package/lib/sd-component-library302.js.map +1 -1
- package/lib/sd-component-library303.js +5 -19
- package/lib/sd-component-library303.js.map +1 -1
- package/lib/sd-component-library304.js +4 -3
- package/lib/sd-component-library304.js.map +1 -1
- package/lib/sd-component-library305.js +92 -4
- package/lib/sd-component-library305.js.map +1 -1
- package/lib/sd-component-library306.js +51 -4
- 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-library6.js +1 -1
- package/lib/sd-component-library7.js +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 +5 -5
- package/lib/sd-component-library94.js +1 -1
- package/lib/sd-component-library99.js +2 -2
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sd-component-library302.js","sources":["../node_modules/react-transition-group/esm/
|
|
1
|
+
{"version":3,"file":"sd-component-library302.js","sources":["../node_modules/react-transition-group/esm/TransitionGroupContext.js"],"sourcesContent":["import React from 'react';\nexport default React.createContext(null);"],"names":["TransitionGroupContext","React"],"mappings":";AACA,MAAAA,IAAeC,EAAM,cAAc,IAAI;","x_google_ignoreList":[0]}
|
|
@@ -1,22 +1,8 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
appear: e.number
|
|
6
|
-
}).isRequired]) : null;
|
|
7
|
-
process.env.NODE_ENV !== "production" && e.oneOfType([e.string, e.shape({
|
|
8
|
-
enter: e.string,
|
|
9
|
-
exit: e.string,
|
|
10
|
-
active: e.string
|
|
11
|
-
}), e.shape({
|
|
12
|
-
enter: e.string,
|
|
13
|
-
enterDone: e.string,
|
|
14
|
-
enterActive: e.string,
|
|
15
|
-
exit: e.string,
|
|
16
|
-
exitDone: e.string,
|
|
17
|
-
exitActive: e.string
|
|
18
|
-
})]);
|
|
1
|
+
const p = (c, r, n, t) => {
|
|
2
|
+
const o = c - (r - 1) * n, s = t / r, e = (t + 1) / r, a = (360 - c) / 2 + n * t + o * s, S = a + o * (e - s);
|
|
3
|
+
return { rangeArcStart: a, rangeArcEnd: S };
|
|
4
|
+
};
|
|
19
5
|
export {
|
|
20
|
-
|
|
6
|
+
p as getRangeProperties
|
|
21
7
|
};
|
|
22
8
|
//# sourceMappingURL=sd-component-library303.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sd-component-library303.js","sources":["../
|
|
1
|
+
{"version":3,"file":"sd-component-library303.js","sources":["../src/components/meters/multi-option-discrete-outline-meter/utils.ts"],"sourcesContent":["export const getRangeProperties = (\n arc: number,\n totalRanges: number,\n distanceBetweenRanges: number,\n idx: number\n) => {\n const arcForRanges = arc - (totalRanges - 1) * distanceBetweenRanges;\n\n const start = idx / totalRanges;\n const end = (idx + 1) / totalRanges;\n\n const arcStart = (360 - arc) / 2; // deg\n\n const rangeArcStart =\n arcStart + distanceBetweenRanges * idx + arcForRanges * start;\n\n const rangeArcEnd = rangeArcStart + arcForRanges * (end - start);\n\n return { rangeArcStart, rangeArcEnd };\n};\n"],"names":["getRangeProperties","arc","totalRanges","distanceBetweenRanges","idx","arcForRanges","start","end","rangeArcStart","rangeArcEnd"],"mappings":"AAAO,MAAMA,IAAqB,CAChCC,GACAC,GACAC,GACAC,MACG;AACG,QAAAC,IAAeJ,KAAOC,IAAc,KAAKC,GAEzCG,IAAQF,IAAMF,GACdK,KAAOH,IAAM,KAAKF,GAIlBM,KAFY,MAAMP,KAAO,IAGlBE,IAAwBC,IAAMC,IAAeC,GAEpDG,IAAcD,IAAgBH,KAAgBE,IAAMD;AAEnD,SAAA,EAAE,eAAAE,GAAe,aAAAC;AAC1B;"}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
1
|
+
import { j as e } from "./sd-component-library197.js";
|
|
2
|
+
import { LabelPointer as t } from "./sd-component-library322.js";
|
|
3
|
+
const s = (r) => /* @__PURE__ */ e.jsx(t, { ...r });
|
|
3
4
|
export {
|
|
4
|
-
|
|
5
|
+
s as DiscreteMeterLabelPointer
|
|
5
6
|
};
|
|
6
7
|
//# sourceMappingURL=sd-component-library304.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sd-component-library304.js","sources":["../
|
|
1
|
+
{"version":3,"file":"sd-component-library304.js","sources":["../src/components/meters/multi-option-discrete-outline-meter/partials/discrete-meter-label-pointer/discrete-meter-label-pointer.tsx"],"sourcesContent":["import React from \"react\";\n\nimport { LabelPointer } from \"../../../common-outline-meter-partials\";\nimport { DiscreteMeterLabelPointerProps as Props } from \"./interfaces\";\n\nexport const DiscreteMeterLabelPointer: React.FC<Props> = (props) => {\n return <LabelPointer {...props} />;\n};\n"],"names":["DiscreteMeterLabelPointer","props","jsx","LabelPointer"],"mappings":";;AAKa,MAAAA,IAA6C,CAACC,MAClDC,gBAAAA,EAAA,IAACC,GAAc,EAAA,GAAGF,EAAO,CAAA;"}
|
|
@@ -1,8 +1,96 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
import { j as a } from "./sd-component-library197.js";
|
|
2
|
+
import { useState as S, useCallback as B } from "react";
|
|
3
|
+
import { Box as Y } from "rebass";
|
|
4
|
+
import { labelPaddingX as c, labelWidth as W } from "./sd-component-library227.js";
|
|
5
|
+
import { getCoordinateForArc as $ } from "./sd-component-library91.js";
|
|
6
|
+
import { ResponsiveTextV2 as z } from "./sd-component-library150.js";
|
|
7
|
+
const D = (j) => {
|
|
8
|
+
const {
|
|
9
|
+
label: d,
|
|
10
|
+
color: p,
|
|
11
|
+
alpha: e,
|
|
12
|
+
radius: r,
|
|
13
|
+
horizontal: v,
|
|
14
|
+
pointerLength: m,
|
|
15
|
+
round: y,
|
|
16
|
+
pointY: i
|
|
17
|
+
} = j, [h, C] = S(0), [f, R] = S(0), T = B((t) => {
|
|
18
|
+
if (t) {
|
|
19
|
+
const { height: o, y: l } = t.getBoundingClientRect();
|
|
20
|
+
C(o), R(l);
|
|
21
|
+
}
|
|
22
|
+
}, []);
|
|
23
|
+
let { x: b, y: g } = $(
|
|
24
|
+
r + m,
|
|
25
|
+
e,
|
|
26
|
+
r
|
|
27
|
+
);
|
|
28
|
+
const s = e === 180, n = e < 180, u = e > 180;
|
|
29
|
+
if (v) {
|
|
30
|
+
const { x: t, y: o } = $(
|
|
31
|
+
r,
|
|
32
|
+
e,
|
|
33
|
+
r
|
|
34
|
+
);
|
|
35
|
+
b = t + m * (n ? -1 : 1), g = o;
|
|
36
|
+
}
|
|
37
|
+
if (!d)
|
|
38
|
+
return null;
|
|
39
|
+
let x = y || s ? `${c}px` : void 0;
|
|
40
|
+
if (!x && i) {
|
|
41
|
+
const t = f - h, o = f;
|
|
42
|
+
x = [
|
|
43
|
+
n || i > t,
|
|
44
|
+
u || i > t,
|
|
45
|
+
u || i < o,
|
|
46
|
+
n || i < o
|
|
47
|
+
].map((l) => l ? `${c}px` : "0").join(" ");
|
|
48
|
+
}
|
|
49
|
+
return /* @__PURE__ */ a.jsx(
|
|
50
|
+
Y,
|
|
51
|
+
{
|
|
52
|
+
sx: {
|
|
53
|
+
position: "absolute",
|
|
54
|
+
left: `${b}px`,
|
|
55
|
+
top: `${g}px`
|
|
56
|
+
},
|
|
57
|
+
children: /* @__PURE__ */ a.jsx(
|
|
58
|
+
Y,
|
|
59
|
+
{
|
|
60
|
+
sx: {
|
|
61
|
+
boxSizing: "content-box",
|
|
62
|
+
position: "relative",
|
|
63
|
+
top: `calc(-${h}px)`,
|
|
64
|
+
left: s ? "-50%" : n ? "-100%" : void 0,
|
|
65
|
+
py: "7px",
|
|
66
|
+
px: `${c}px`,
|
|
67
|
+
borderColor: p,
|
|
68
|
+
borderWidth: "2px",
|
|
69
|
+
borderStyle: "solid",
|
|
70
|
+
borderRadius: x,
|
|
71
|
+
bg: "cl_white",
|
|
72
|
+
"& > div": {
|
|
73
|
+
maxWidth: s ? void 0 : `${W}px`
|
|
74
|
+
}
|
|
75
|
+
},
|
|
76
|
+
ref: T,
|
|
77
|
+
children: /* @__PURE__ */ a.jsx(
|
|
78
|
+
z,
|
|
79
|
+
{
|
|
80
|
+
fontSizeWeight: [[12, "semi-bold"]],
|
|
81
|
+
width: "max-content",
|
|
82
|
+
color: p !== "#CCD0DB" ? p : "cl_darkGrey",
|
|
83
|
+
textTransform: "uppercase",
|
|
84
|
+
letterSpacing: "1.8px",
|
|
85
|
+
children: d
|
|
86
|
+
}
|
|
87
|
+
)
|
|
88
|
+
}
|
|
89
|
+
)
|
|
90
|
+
}
|
|
91
|
+
);
|
|
4
92
|
};
|
|
5
93
|
export {
|
|
6
|
-
|
|
94
|
+
D as MatchedRangeLabelBox
|
|
7
95
|
};
|
|
8
96
|
//# sourceMappingURL=sd-component-library305.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sd-component-library305.js","sources":["../src/components/meters/
|
|
1
|
+
{"version":3,"file":"sd-component-library305.js","sources":["../src/components/meters/common-outline-meter-partials/matched-range-label-box/matched-range-label-box.tsx"],"sourcesContent":["import React, { useCallback, useState } from \"react\";\n\nimport { Box } from \"rebass\";\n\nimport { ResponsiveTextV2 } from \"../../../texts/responsive-text-v2\";\nimport { labelPaddingX, labelWidth } from \"../../outline-meter/contants\";\nimport { getCoordinateForArc } from \"../../outline-meter/utils\";\nimport { MatchedRangeLabelBoxProps as Props } from \"./interfaces\";\n\nexport const MatchedRangeLabelBox: React.FC<Props> = (props) => {\n const {\n label,\n color,\n alpha,\n radius,\n horizontal,\n pointerLength,\n round,\n pointY,\n } = props;\n\n const [textHeight, setTextHeight] = useState(0);\n const [textY, setTextY] = useState(0);\n\n const ref = useCallback((node: HTMLElement) => {\n if (node) {\n const { height, y } = node.getBoundingClientRect();\n setTextHeight(height);\n setTextY(y);\n }\n }, []);\n\n let { x: pointerEndX, y: pointerEndY } = getCoordinateForArc(\n radius + pointerLength,\n alpha,\n radius\n );\n\n const isOnTop = alpha === 180;\n const isOnLeft = alpha < 180;\n const isOnRight = alpha > 180;\n\n if (horizontal) {\n const { x: pointerStartX, y: pointerStartY } = getCoordinateForArc(\n radius,\n alpha,\n radius\n );\n\n pointerEndX = pointerStartX + pointerLength * (isOnLeft ? -1 : 1);\n pointerEndY = pointerStartY;\n }\n\n if (!label) return null;\n\n let borderRadius = round || isOnTop ? `${labelPaddingX}px` : undefined;\n if (!borderRadius && pointY) {\n const textTopY = textY - textHeight;\n const textBottomY = textY;\n\n borderRadius = [\n isOnLeft || pointY > textTopY,\n isOnRight || pointY > textTopY,\n isOnRight || pointY < textBottomY,\n isOnLeft || pointY < textBottomY,\n ]\n .map((flag) => (flag ? `${labelPaddingX}px` : \"0\"))\n .join(\" \");\n }\n\n return (\n <Box\n sx={{\n position: \"absolute\",\n left: `${pointerEndX}px`,\n top: `${pointerEndY}px`,\n }}\n >\n <Box\n sx={{\n boxSizing: \"content-box\",\n position: \"relative\",\n top: `calc(-${textHeight}px)`,\n left: isOnTop ? \"-50%\" : isOnLeft ? \"-100%\" : undefined,\n py: \"7px\",\n px: `${labelPaddingX}px`,\n borderColor: color,\n borderWidth: \"2px\",\n borderStyle: \"solid\",\n borderRadius,\n bg: \"cl_white\",\n \"& > div\": {\n maxWidth: isOnTop ? undefined : `${labelWidth}px`,\n },\n }}\n ref={ref}\n >\n <ResponsiveTextV2\n fontSizeWeight={[[12, \"semi-bold\"]]}\n width=\"max-content\"\n color={color !== \"#CCD0DB\" ? color : \"cl_darkGrey\"}\n textTransform=\"uppercase\"\n letterSpacing=\"1.8px\"\n >\n {label}\n </ResponsiveTextV2>\n </Box>\n </Box>\n );\n};\n"],"names":["MatchedRangeLabelBox","props","label","color","alpha","radius","horizontal","pointerLength","round","pointY","textHeight","setTextHeight","useState","textY","setTextY","ref","useCallback","node","height","y","pointerEndX","pointerEndY","getCoordinateForArc","isOnTop","isOnLeft","isOnRight","pointerStartX","pointerStartY","borderRadius","labelPaddingX","textTopY","textBottomY","flag","jsx","Box","labelWidth","ResponsiveTextV2"],"mappings":";;;;;;AASa,MAAAA,IAAwC,CAACC,MAAU;AACxD,QAAA;AAAA,IACJ,OAAAC;AAAA,IACA,OAAAC;AAAA,IACA,OAAAC;AAAA,IACA,QAAAC;AAAA,IACA,YAAAC;AAAA,IACA,eAAAC;AAAA,IACA,OAAAC;AAAA,IACA,QAAAC;AAAA,EACE,IAAAR,GAEE,CAACS,GAAYC,CAAa,IAAIC,EAAS,CAAC,GACxC,CAACC,GAAOC,CAAQ,IAAIF,EAAS,CAAC,GAE9BG,IAAMC,EAAY,CAACC,MAAsB;AAC7C,QAAIA,GAAM;AACR,YAAM,EAAE,QAAAC,GAAQ,GAAAC,EAAE,IAAIF,EAAK,sBAAsB;AACjD,MAAAN,EAAcO,CAAM,GACpBJ,EAASK,CAAC;AAAA,IACZ;AAAA,EACF,GAAG,CAAE,CAAA;AAEL,MAAI,EAAE,GAAGC,GAAa,GAAGC,EAAgB,IAAAC;AAAA,IACvCjB,IAASE;AAAA,IACTH;AAAA,IACAC;AAAA,EAAA;AAGF,QAAMkB,IAAUnB,MAAU,KACpBoB,IAAWpB,IAAQ,KACnBqB,IAAYrB,IAAQ;AAE1B,MAAIE,GAAY;AACd,UAAM,EAAE,GAAGoB,GAAe,GAAGC,EAAkB,IAAAL;AAAA,MAC7CjB;AAAA,MACAD;AAAA,MACAC;AAAA,IAAA;AAGY,IAAAe,IAAAM,IAAgBnB,KAAiBiB,IAAW,KAAK,IACjDH,IAAAM;AAAA,EAChB;AAEA,MAAI,CAACzB;AAAc,WAAA;AAEnB,MAAI0B,IAAepB,KAASe,IAAU,GAAGM,CAAa,OAAO;AACzD,MAAA,CAACD,KAAgBnB,GAAQ;AAC3B,UAAMqB,IAAWjB,IAAQH,GACnBqB,IAAclB;AAEL,IAAAe,IAAA;AAAA,MACbJ,KAAYf,IAASqB;AAAA,MACrBL,KAAahB,IAASqB;AAAA,MACtBL,KAAahB,IAASsB;AAAA,MACtBP,KAAYf,IAASsB;AAAA,IACvB,EACG,IAAI,CAACC,MAAUA,IAAO,GAAGH,CAAa,OAAO,GAAI,EACjD,KAAK,GAAG;AAAA,EACb;AAGE,SAAAI,gBAAAA,EAAA;AAAA,IAACC;AAAA,IAAA;AAAA,MACC,IAAI;AAAA,QACF,UAAU;AAAA,QACV,MAAM,GAAGd,CAAW;AAAA,QACpB,KAAK,GAAGC,CAAW;AAAA,MACrB;AAAA,MAEA,UAAAY,gBAAAA,EAAA;AAAA,QAACC;AAAA,QAAA;AAAA,UACC,IAAI;AAAA,YACF,WAAW;AAAA,YACX,UAAU;AAAA,YACV,KAAK,SAASxB,CAAU;AAAA,YACxB,MAAMa,IAAU,SAASC,IAAW,UAAU;AAAA,YAC9C,IAAI;AAAA,YACJ,IAAI,GAAGK,CAAa;AAAA,YACpB,aAAa1B;AAAA,YACb,aAAa;AAAA,YACb,aAAa;AAAA,YACb,cAAAyB;AAAA,YACA,IAAI;AAAA,YACJ,WAAW;AAAA,cACT,UAAUL,IAAU,SAAY,GAAGY,CAAU;AAAA,YAC/C;AAAA,UACF;AAAA,UACA,KAAApB;AAAA,UAEA,UAAAkB,gBAAAA,EAAA;AAAA,YAACG;AAAA,YAAA;AAAA,cACC,gBAAgB,CAAC,CAAC,IAAI,WAAW,CAAC;AAAA,cAClC,OAAM;AAAA,cACN,OAAOjC,MAAU,YAAYA,IAAQ;AAAA,cACrC,eAAc;AAAA,cACd,eAAc;AAAA,cAEb,UAAAD;AAAA,YAAA;AAAA,UACH;AAAA,QAAA;AAAA,MACF;AAAA,IAAA;AAAA,EAAA;AAGN;"}
|
|
@@ -1,7 +1,54 @@
|
|
|
1
|
-
import { j as
|
|
2
|
-
import
|
|
3
|
-
|
|
1
|
+
import { j as t } from "./sd-component-library197.js";
|
|
2
|
+
import x from "react";
|
|
3
|
+
import u from "./sd-component-library196.js";
|
|
4
|
+
import { getIsHorizontal as j, getRangeProperties as p } from "./sd-component-library237.js";
|
|
5
|
+
import { OutlineMeterRange as M } from "./sd-component-library228.js";
|
|
6
|
+
import { LabelPointer as b } from "./sd-component-library322.js";
|
|
7
|
+
const A = x.forwardRef(
|
|
8
|
+
(e, r) => {
|
|
9
|
+
const {
|
|
10
|
+
segmented: o,
|
|
11
|
+
diameter: n,
|
|
12
|
+
arc: a,
|
|
13
|
+
totalRanges: i,
|
|
14
|
+
distanceBetweenRanges: s,
|
|
15
|
+
start: m,
|
|
16
|
+
end: c,
|
|
17
|
+
idx: d,
|
|
18
|
+
hideLabels: l,
|
|
19
|
+
isMatchedRange: g
|
|
20
|
+
} = e, f = !o, R = n / 2, { rangeArcMiddle: h } = p(
|
|
21
|
+
a,
|
|
22
|
+
i,
|
|
23
|
+
s,
|
|
24
|
+
d,
|
|
25
|
+
m,
|
|
26
|
+
c
|
|
27
|
+
);
|
|
28
|
+
return /* @__PURE__ */ t.jsxs(t.Fragment, { children: [
|
|
29
|
+
/* @__PURE__ */ t.jsx(
|
|
30
|
+
M,
|
|
31
|
+
{
|
|
32
|
+
...e,
|
|
33
|
+
hideLabels: !0,
|
|
34
|
+
connected: f,
|
|
35
|
+
ref: r
|
|
36
|
+
}
|
|
37
|
+
),
|
|
38
|
+
!l && !g && /* @__PURE__ */ t.jsx(
|
|
39
|
+
b,
|
|
40
|
+
{
|
|
41
|
+
...e,
|
|
42
|
+
radius: R,
|
|
43
|
+
color: u.colors.cl_lightGrey,
|
|
44
|
+
alpha: h,
|
|
45
|
+
horizontal: j(e)
|
|
46
|
+
}
|
|
47
|
+
)
|
|
48
|
+
] });
|
|
49
|
+
}
|
|
50
|
+
);
|
|
4
51
|
export {
|
|
5
|
-
|
|
52
|
+
A as SmileyMeterRange
|
|
6
53
|
};
|
|
7
54
|
//# sourceMappingURL=sd-component-library306.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sd-component-library306.js","sources":["../src/components/meters/
|
|
1
|
+
{"version":3,"file":"sd-component-library306.js","sources":["../src/components/meters/smiley-meter-v2/partials/smiley-meter-range/smiley-meter-range.tsx"],"sourcesContent":["import React from \"react\";\n\nimport theme from \"../../../../../core/theme\";\nimport { LabelPointer } from \"../../../common-outline-meter-partials\";\nimport { OutlineMeterRange } from \"../../../outline-meter/partials/outline-meter-range\";\nimport { getIsHorizontal, getRangeProperties } from \"../../utils\";\nimport { SmileyMeterRangeProps as Props } from \"./interfaces\";\n\nexport const SmileyMeterRange = React.forwardRef<SVGCircleElement, Props>(\n (props, pointRef) => {\n const {\n segmented,\n diameter,\n arc,\n totalRanges,\n distanceBetweenRanges,\n start,\n end,\n idx,\n hideLabels,\n isMatchedRange,\n } = props;\n\n const needConnection = !segmented;\n\n const radius = diameter / 2;\n\n const { rangeArcMiddle: alpha } = getRangeProperties(\n arc,\n totalRanges,\n distanceBetweenRanges,\n idx,\n start,\n end\n );\n\n return (\n <>\n <OutlineMeterRange\n {...props}\n hideLabels\n connected={needConnection}\n ref={pointRef}\n />\n\n {!hideLabels && !isMatchedRange && (\n <LabelPointer\n {...props}\n radius={radius}\n color={theme.colors.cl_lightGrey}\n alpha={alpha}\n horizontal={getIsHorizontal(props)}\n />\n )}\n </>\n );\n }\n);\n"],"names":["SmileyMeterRange","React","props","pointRef","segmented","diameter","arc","totalRanges","distanceBetweenRanges","start","end","idx","hideLabels","isMatchedRange","needConnection","radius","alpha","getRangeProperties","jsxs","Fragment","jsx","OutlineMeterRange","LabelPointer","theme","getIsHorizontal"],"mappings":";;;;;;AAQO,MAAMA,IAAmBC,EAAM;AAAA,EACpC,CAACC,GAAOC,MAAa;AACb,UAAA;AAAA,MACJ,WAAAC;AAAA,MACA,UAAAC;AAAA,MACA,KAAAC;AAAA,MACA,aAAAC;AAAA,MACA,uBAAAC;AAAA,MACA,OAAAC;AAAA,MACA,KAAAC;AAAA,MACA,KAAAC;AAAA,MACA,YAAAC;AAAA,MACA,gBAAAC;AAAA,IACE,IAAAX,GAEEY,IAAiB,CAACV,GAElBW,IAASV,IAAW,GAEpB,EAAE,gBAAgBW,EAAA,IAAUC;AAAA,MAChCX;AAAA,MACAC;AAAA,MACAC;AAAA,MACAG;AAAA,MACAF;AAAA,MACAC;AAAA,IAAA;AAGF,WAEIQ,gBAAAA,EAAA,KAAAC,YAAA,EAAA,UAAA;AAAA,MAAAC,gBAAAA,EAAA;AAAA,QAACC;AAAA,QAAA;AAAA,UACE,GAAGnB;AAAA,UACJ,YAAU;AAAA,UACV,WAAWY;AAAA,UACX,KAAKX;AAAA,QAAA;AAAA,MACP;AAAA,MAEC,CAACS,KAAc,CAACC,KACfO,gBAAAA,EAAA;AAAA,QAACE;AAAA,QAAA;AAAA,UACE,GAAGpB;AAAA,UACJ,QAAAa;AAAA,UACA,OAAOQ,EAAM,OAAO;AAAA,UACpB,OAAAP;AAAA,UACA,YAAYQ,EAAgBtB,CAAK;AAAA,QAAA;AAAA,MACnC;AAAA,IAEJ,EAAA,CAAA;AAAA,EAEJ;AACF;"}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { j as t } from "./sd-component-library197.js";
|
|
2
|
-
import { BaseBooleanFeedback as m } from "./sd-component-
|
|
2
|
+
import { BaseBooleanFeedback as m } from "./sd-component-library207.js";
|
|
3
3
|
import { IconButton as n } from "./sd-component-library23.js";
|
|
4
|
-
import { ReactComponent as c } from "./sd-component-
|
|
5
|
-
import { ReactComponent as u } from "./sd-component-
|
|
4
|
+
import { ReactComponent as c } from "./sd-component-library208.js";
|
|
5
|
+
import { ReactComponent as u } from "./sd-component-library209.js";
|
|
6
6
|
const f = (i) => {
|
|
7
7
|
const { title: s, onPositiveFeedback: r, onNegativeFeedback: d, optionSelected: e } = i, a = (o) => /* @__PURE__ */ t.jsx(n, { onClick: o, "data-testid": "thumbs-up-button", children: /* @__PURE__ */ t.jsx(
|
|
8
8
|
c,
|
|
@@ -2,7 +2,7 @@ import { j as e } from "./sd-component-library197.js";
|
|
|
2
2
|
import { useRef as T, useState as q, useCallback as J } from "react";
|
|
3
3
|
import { Box as o } from "rebass";
|
|
4
4
|
import { useResize as K } from "./sd-component-library3.js";
|
|
5
|
-
import { ReactComponent as L } from "./sd-component-
|
|
5
|
+
import { ReactComponent as L } from "./sd-component-library201.js";
|
|
6
6
|
const Z = (p) => {
|
|
7
7
|
const {
|
|
8
8
|
width: x = ["100%"],
|
|
@@ -3,7 +3,7 @@ import { useState as u, useCallback as g, useEffect as j } from "react";
|
|
|
3
3
|
import { Box as n, Flex as w } from "rebass";
|
|
4
4
|
import { SecondaryBadge as b } from "./sd-component-library10.js";
|
|
5
5
|
import { MaxFrContainer as C } from "./sd-component-library39.js";
|
|
6
|
-
import { ReactComponent as v } from "./sd-component-
|
|
6
|
+
import { ReactComponent as v } from "./sd-component-library201.js";
|
|
7
7
|
const D = (a) => {
|
|
8
8
|
const {
|
|
9
9
|
header: d,
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { j as e } from "./sd-component-library197.js";
|
|
2
2
|
import { Box as R } from "rebass";
|
|
3
3
|
import { useElementCoordinates as _ } from "./sd-component-library3.js";
|
|
4
|
-
import { defaultPointerWidth as z, defaultTextBottomMargin as X } from "./sd-component-
|
|
4
|
+
import { defaultPointerWidth as z, defaultTextBottomMargin as X } from "./sd-component-library232.js";
|
|
5
5
|
import { labelWidth as Y, defaultDistanceFromLabelToRanges as W, labelPaddingX as A, defaultWidth as D, defaultHeight as E, defaultArc as G, defaultPointStrokeWidth as H, defaultInnerPointRadius as V, defaultGaugeWidth as q, defaultMaskBorderRadius as N } from "./sd-component-library227.js";
|
|
6
6
|
import { isValueInRange as J } from "./sd-component-library91.js";
|
|
7
|
-
import { COLOR_TO_ICON_MAP as K, defaultSmileyWidth as Q, defaultDistanceBetweenRanges as U } from "./sd-component-
|
|
8
|
-
import { isCorrectSmileyMeterConfig as Z, getIsHorizontal as ee } from "./sd-component-
|
|
9
|
-
import { SmileyMeterRanges as te } from "./sd-component-
|
|
10
|
-
import { MatchedRangeLabelBox as ie } from "./sd-component-
|
|
7
|
+
import { COLOR_TO_ICON_MAP as K, defaultSmileyWidth as Q, defaultDistanceBetweenRanges as U } from "./sd-component-library236.js";
|
|
8
|
+
import { isCorrectSmileyMeterConfig as Z, getIsHorizontal as ee } from "./sd-component-library237.js";
|
|
9
|
+
import { SmileyMeterRanges as te } from "./sd-component-library238.js";
|
|
10
|
+
import { MatchedRangeLabelBox as ie } from "./sd-component-library239.js";
|
|
11
11
|
import { FlexCenter as oe } from "./sd-component-library34.js";
|
|
12
12
|
const xe = ($) => {
|
|
13
13
|
const {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { j as s } from "./sd-component-library197.js";
|
|
2
2
|
import { smallMeterMaskBorderRadius as n } from "./sd-component-library227.js";
|
|
3
|
-
import { smallSmileyMeterWidth as d, smallSmileyMeterHeight as h, smallSmileyGaugeWidth as S, smallSmileyWidth as u, smallSmileyInnerPointRadius as y, smallSmileyInnerPointStrokeWidth as g } from "./sd-component-
|
|
3
|
+
import { smallSmileyMeterWidth as d, smallSmileyMeterHeight as h, smallSmileyGaugeWidth as S, smallSmileyWidth as u, smallSmileyInnerPointRadius as y, smallSmileyInnerPointStrokeWidth as g } from "./sd-component-library236.js";
|
|
4
4
|
import { SmileyMeterV2 as W } from "./sd-component-library86.js";
|
|
5
5
|
const k = (e) => {
|
|
6
6
|
const {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { j as l } from "./sd-component-library197.js";
|
|
2
2
|
import { Box as f } from "rebass";
|
|
3
|
-
import { ReactComponent as d } from "./sd-component-
|
|
3
|
+
import { ReactComponent as d } from "./sd-component-library226.js";
|
|
4
4
|
import { BaseGridContainer as h } from "./sd-component-library35.js";
|
|
5
5
|
const F = [
|
|
6
6
|
"#5CA13A",
|
|
@@ -2,10 +2,10 @@ import { j as r } from "./sd-component-library197.js";
|
|
|
2
2
|
import { Box as H } from "rebass";
|
|
3
3
|
import { labelWidth as I, defaultDistanceFromLabelToRanges as p, labelPaddingX as X, defaultArc as A, defaultWidth as E, defaultHeight as G, defaultDistanceBetweenRanges as Y, defaultGaugeWidth as q, defaultPointStrokeWidth as y, defaultInnerPointRadius as z, defaultDistanceFromRangesToNeedle as J, defaultInnerCircleStrokeWidth as K, defaultInnerCircleRadius as Q, defaultNeedleWidth as U, defaultNumberOfDashes as V, defaultDashHeight as Z, defaultDashWidth as _, defaultDistanceFromRangesToScale as ee, defaultMaskBorderRadius as te } from "./sd-component-library227.js";
|
|
4
4
|
import { isCorrectOutlineMeterConfig as ae } from "./sd-component-library91.js";
|
|
5
|
-
import { OutlineMeterRange as re } from "./sd-component-
|
|
6
|
-
import { OutlineMeterScale as ie } from "./sd-component-
|
|
7
|
-
import { OutlineMeterNeedle as se } from "./sd-component-
|
|
8
|
-
import { OutlineMeterLabelBox as oe } from "./sd-component-
|
|
5
|
+
import { OutlineMeterRange as re } from "./sd-component-library228.js";
|
|
6
|
+
import { OutlineMeterScale as ie } from "./sd-component-library229.js";
|
|
7
|
+
import { OutlineMeterNeedle as se } from "./sd-component-library230.js";
|
|
8
|
+
import { OutlineMeterLabelBox as oe } from "./sd-component-library231.js";
|
|
9
9
|
const ge = (R) => {
|
|
10
10
|
const {
|
|
11
11
|
marginTop: x = "50px",
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { j as o } from "./sd-component-library197.js";
|
|
2
2
|
import { Box as y } from "rebass";
|
|
3
3
|
import { labelWidth as E, defaultDistanceFromLabelToRanges as R, labelPaddingX as G, defaultArc as P, defaultWidth as X, defaultHeight as Y, defaultDistanceBetweenRanges as A, defaultGaugeWidth as V, defaultDistanceFromRangesToNeedle as _, defaultInnerCircleStrokeWidth as q, defaultInnerCircleRadius as J, defaultNeedleWidth as K, defaultNumberOfDashes as Q, defaultDashHeight as U, defaultDashWidth as Z, defaultDistanceFromRangesToScale as ee, defaultMaskBorderRadius as te } from "./sd-component-library227.js";
|
|
4
|
-
import { defaultPointerWidth as ae } from "./sd-component-
|
|
5
|
-
import { DiscreteRange as oe } from "./sd-component-
|
|
6
|
-
import { OutlineMeterScale as le } from "./sd-component-
|
|
7
|
-
import { DiscreteMeterNeedle as re } from "./sd-component-
|
|
8
|
-
import { MatchedRangeLabelBox as ne } from "./sd-component-
|
|
4
|
+
import { defaultPointerWidth as ae } from "./sd-component-library232.js";
|
|
5
|
+
import { DiscreteRange as oe } from "./sd-component-library233.js";
|
|
6
|
+
import { OutlineMeterScale as le } from "./sd-component-library229.js";
|
|
7
|
+
import { DiscreteMeterNeedle as re } from "./sd-component-library234.js";
|
|
8
|
+
import { MatchedRangeLabelBox as ne } from "./sd-component-library235.js";
|
|
9
9
|
function fe(x) {
|
|
10
10
|
const {
|
|
11
11
|
marginTop: b = "50px",
|
|
@@ -3,7 +3,7 @@ import { Box as H } from "rebass";
|
|
|
3
3
|
import { defaultWidth as V, defaultHeight as X, labelWidth as Y, defaultDistanceFromLabelToRanges as p, labelPaddingX as z, defaultGaugeWidth as E, defaultInnerPointRadius as _, defaultPointStrokeWidth as q, defaultArc as J, defaultDistanceFromRangesToScale as K, defaultDashHeight as Q, defaultDashWidth as U, defaultNumberOfDashes as Z, defaultNeedleWidth as ee, defaultInnerCircleRadius as te, defaultInnerCircleStrokeWidth as re, defaultDistanceFromRangesToNeedle as ae, defaultMaskBorderRadius as oe } from "./sd-component-library227.js";
|
|
4
4
|
import { mapAdjacent as ie, isLabelActive as x, flipPosition as R } from "./sd-component-library240.js";
|
|
5
5
|
import { GradientMeterRange as ne } from "./sd-component-library241.js";
|
|
6
|
-
import { OutlineMeterScale as se } from "./sd-component-
|
|
6
|
+
import { OutlineMeterScale as se } from "./sd-component-library229.js";
|
|
7
7
|
import { GradientMeterNeedle as de } from "./sd-component-library242.js";
|
|
8
8
|
import { OutlineMeterLabelPointer as le } from "./sd-component-library243.js";
|
|
9
9
|
import { BaseMeterLabelBox as ue } from "./sd-component-library244.js";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { j as n } from "./sd-component-library197.js";
|
|
2
2
|
import { areSegmentsValid as h } from "./sd-component-library245.js";
|
|
3
|
-
import { CompactDonutGaugeSegment as x } from "./sd-component-
|
|
4
|
-
import { CompactDonutGaugeValueIndicator as f } from "./sd-component-
|
|
3
|
+
import { CompactDonutGaugeSegment as x } from "./sd-component-library247.js";
|
|
4
|
+
import { CompactDonutGaugeValueIndicator as f } from "./sd-component-library248.js";
|
|
5
5
|
const C = ({
|
|
6
6
|
segments: e,
|
|
7
7
|
size: r = 70,
|