@selfdecode/sd-component-library 4.0.121 → 4.0.123
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/interfaces.d.ts +1 -1
- package/lib/components/inputs/input/interfaces.d.ts +1 -1
- package/lib/components/inputs/primary-number-input/interfaces.d.ts +3 -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-library103.js +3 -3
- package/lib/sd-component-library104.js +2 -2
- package/lib/sd-component-library106.js +2 -2
- package/lib/sd-component-library108.js +2 -2
- package/lib/sd-component-library114.js +1 -1
- package/lib/sd-component-library120.js +1 -1
- package/lib/sd-component-library128.js +1 -1
- package/lib/sd-component-library129.js +1 -1
- package/lib/sd-component-library131.js +1 -1
- package/lib/sd-component-library135.js +3 -3
- package/lib/sd-component-library136.js +1 -1
- package/lib/sd-component-library16.js +1 -1
- package/lib/sd-component-library169.js +1 -1
- package/lib/sd-component-library174.js +4 -4
- package/lib/sd-component-library175.js +1 -1
- package/lib/sd-component-library198.js +3 -3
- package/lib/sd-component-library202.js +3 -2
- package/lib/sd-component-library202.js.map +1 -1
- package/lib/sd-component-library203.js +2 -30
- package/lib/sd-component-library203.js.map +1 -1
- package/lib/sd-component-library204.js +21 -590
- package/lib/sd-component-library204.js.map +1 -1
- package/lib/sd-component-library205.js +599 -57
- package/lib/sd-component-library205.js.map +1 -1
- package/lib/sd-component-library206.js +57 -3
- package/lib/sd-component-library206.js.map +1 -1
- package/lib/sd-component-library212.js +19 -62
- package/lib/sd-component-library212.js.map +1 -1
- package/lib/sd-component-library213.js +3 -23
- package/lib/sd-component-library213.js.map +1 -1
- package/lib/sd-component-library214.js +3 -40
- package/lib/sd-component-library214.js.map +1 -1
- package/lib/sd-component-library215.js +40 -14
- package/lib/sd-component-library215.js.map +1 -1
- package/lib/sd-component-library216.js +129 -3
- 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 -52
- package/lib/sd-component-library219.js.map +1 -1
- package/lib/sd-component-library220.js +3 -65
- package/lib/sd-component-library220.js.map +1 -1
- package/lib/sd-component-library221.js +1 -1
- package/lib/sd-component-library221.js.map +1 -1
- package/lib/sd-component-library222.js +50 -127
- package/lib/sd-component-library222.js.map +1 -1
- package/lib/sd-component-library223.js +65 -13
- package/lib/sd-component-library223.js.map +1 -1
- package/lib/sd-component-library224.js +3 -46
- package/lib/sd-component-library224.js.map +1 -1
- package/lib/sd-component-library225.js +44 -19
- package/lib/sd-component-library225.js.map +1 -1
- package/lib/sd-component-library226.js +17 -3
- package/lib/sd-component-library226.js.map +1 -1
- package/lib/sd-component-library227.js +64 -3
- package/lib/sd-component-library227.js.map +1 -1
- package/lib/sd-component-library228.js +23 -17
- package/lib/sd-component-library228.js.map +1 -1
- package/lib/sd-component-library231.js +3 -3
- package/lib/sd-component-library234.js +1 -1
- package/lib/sd-component-library235.js +26 -3
- package/lib/sd-component-library235.js.map +1 -1
- package/lib/sd-component-library236.js +3 -129
- package/lib/sd-component-library236.js.map +1 -1
- package/lib/sd-component-library237.js +62 -41
- package/lib/sd-component-library237.js.map +1 -1
- package/lib/sd-component-library238.js +41 -45
- package/lib/sd-component-library238.js.map +1 -1
- package/lib/sd-component-library239.js +43 -8
- package/lib/sd-component-library239.js.map +1 -1
- package/lib/sd-component-library240.js +13 -64
- package/lib/sd-component-library240.js.map +1 -1
- package/lib/sd-component-library241.js +128 -42
- package/lib/sd-component-library241.js.map +1 -1
- package/lib/sd-component-library242.js +46 -12
- package/lib/sd-component-library242.js.map +1 -1
- package/lib/sd-component-library243.js +8 -21
- package/lib/sd-component-library243.js.map +1 -1
- package/lib/sd-component-library244.js +21 -109
- package/lib/sd-component-library244.js.map +1 -1
- package/lib/sd-component-library245.js +106 -44
- package/lib/sd-component-library245.js.map +1 -1
- package/lib/sd-component-library246.js +46 -23
- package/lib/sd-component-library246.js.map +1 -1
- package/lib/sd-component-library247.js +23 -52
- package/lib/sd-component-library247.js.map +1 -1
- package/lib/sd-component-library248.js +52 -47
- package/lib/sd-component-library248.js.map +1 -1
- package/lib/sd-component-library249.js +46 -73
- package/lib/sd-component-library249.js.map +1 -1
- package/lib/sd-component-library250.js +60 -26
- package/lib/sd-component-library250.js.map +1 -1
- package/lib/sd-component-library251.js +41 -27
- package/lib/sd-component-library251.js.map +1 -1
- package/lib/sd-component-library252.js +27 -21
- package/lib/sd-component-library252.js.map +1 -1
- package/lib/sd-component-library253.js +20 -19
- package/lib/sd-component-library253.js.map +1 -1
- package/lib/sd-component-library254.js +20 -2
- package/lib/sd-component-library254.js.map +1 -1
- package/lib/sd-component-library255.js +323 -24
- package/lib/sd-component-library255.js.map +1 -1
- package/lib/sd-component-library256.js +5 -325
- package/lib/sd-component-library256.js.map +1 -1
- package/lib/sd-component-library257.js +2 -5
- package/lib/sd-component-library257.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-library260.js +22 -24
- package/lib/sd-component-library260.js.map +1 -1
- package/lib/sd-component-library262.js +25 -21
- package/lib/sd-component-library262.js.map +1 -1
- package/lib/sd-component-library263.js +24 -22
- package/lib/sd-component-library263.js.map +1 -1
- package/lib/sd-component-library266.js +1 -1
- package/lib/sd-component-library269.js +122 -30
- package/lib/sd-component-library269.js.map +1 -1
- package/lib/sd-component-library270.js +29 -20
- package/lib/sd-component-library270.js.map +1 -1
- package/lib/sd-component-library271.js +17 -121
- package/lib/sd-component-library271.js.map +1 -1
- package/lib/sd-component-library272.js +112 -109
- package/lib/sd-component-library272.js.map +1 -1
- package/lib/sd-component-library276.js +51 -2
- package/lib/sd-component-library276.js.map +1 -1
- package/lib/sd-component-library277.js +90 -2
- package/lib/sd-component-library277.js.map +1 -1
- package/lib/sd-component-library278.js +89 -48
- package/lib/sd-component-library278.js.map +1 -1
- package/lib/sd-component-library279.js +48 -89
- package/lib/sd-component-library279.js.map +1 -1
- package/lib/sd-component-library280.js +2 -92
- package/lib/sd-component-library280.js.map +1 -1
- package/lib/sd-component-library281.js +2 -49
- package/lib/sd-component-library281.js.map +1 -1
- package/lib/sd-component-library282.js +2 -6
- package/lib/sd-component-library282.js.map +1 -1
- package/lib/sd-component-library283.js +2 -10
- package/lib/sd-component-library283.js.map +1 -1
- package/lib/sd-component-library284.js +70 -2
- package/lib/sd-component-library284.js.map +1 -1
- package/lib/sd-component-library285.js +102 -2
- package/lib/sd-component-library285.js.map +1 -1
- package/lib/sd-component-library286.js +105 -69
- package/lib/sd-component-library286.js.map +1 -1
- package/lib/sd-component-library287.js +9 -101
- package/lib/sd-component-library287.js.map +1 -1
- package/lib/sd-component-library288.js +6 -106
- package/lib/sd-component-library288.js.map +1 -1
- package/lib/sd-component-library291.js +5 -5
- package/lib/sd-component-library292.js +2 -3
- package/lib/sd-component-library292.js.map +1 -1
- package/lib/sd-component-library293.js +8 -3
- package/lib/sd-component-library293.js.map +1 -1
- package/lib/sd-component-library294.js +328 -3
- package/lib/sd-component-library294.js.map +1 -1
- package/lib/sd-component-library295.js +51 -2
- package/lib/sd-component-library295.js.map +1 -1
- package/lib/sd-component-library296.js +3 -8
- package/lib/sd-component-library296.js.map +1 -1
- package/lib/sd-component-library297.js +3 -328
- package/lib/sd-component-library297.js.map +1 -1
- package/lib/sd-component-library298.js +3 -51
- package/lib/sd-component-library298.js.map +1 -1
- package/lib/sd-component-library315.js +20 -87
- package/lib/sd-component-library315.js.map +1 -1
- package/lib/sd-component-library316.js +87 -20
- package/lib/sd-component-library316.js.map +1 -1
- package/lib/sd-component-library317.js +1 -1
- package/lib/sd-component-library323.js +1 -1
- package/lib/sd-component-library53.js +3 -3
- package/lib/sd-component-library54.js +2 -2
- package/lib/sd-component-library55.js +2 -2
- package/lib/sd-component-library57.js +65 -63
- package/lib/sd-component-library57.js.map +1 -1
- package/lib/sd-component-library6.js +1 -1
- package/lib/sd-component-library62.js +1 -1
- package/lib/sd-component-library63.js +2 -2
- package/lib/sd-component-library64.js +5 -5
- package/lib/sd-component-library65.js +1 -1
- package/lib/sd-component-library66.js +2 -2
- package/lib/sd-component-library67.js +1 -1
- package/lib/sd-component-library7.js +1 -1
- package/lib/sd-component-library71.js +13 -11
- package/lib/sd-component-library71.js.map +1 -1
- package/lib/sd-component-library72.js +2 -2
- package/lib/sd-component-library74.js +20 -19
- package/lib/sd-component-library74.js.map +1 -1
- package/lib/sd-component-library76.js +2 -2
- package/lib/sd-component-library77.js +3 -3
- package/lib/sd-component-library78.js +1 -1
- package/lib/sd-component-library79.js +1 -1
- package/lib/sd-component-library81.js +1 -1
- package/lib/sd-component-library82.js +1 -1
- package/lib/sd-component-library87.js +1 -1
- package/lib/sd-component-library90.js +1 -1
- package/lib/sd-component-library91.js +4 -4
- package/lib/sd-component-library94.js +4 -4
- package/lib/sd-component-library96.js +6 -6
- package/package.json +1 -1
|
@@ -1,29 +1,96 @@
|
|
|
1
|
-
import { j as
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
1
|
+
import { j as a } from "./sd-component-library198.js";
|
|
2
|
+
import { useState as S, useCallback as B } from "react";
|
|
3
|
+
import { Box as Y } from "rebass";
|
|
4
|
+
import { labelPaddingX as c, labelWidth as W } from "./sd-component-library230.js";
|
|
5
|
+
import { getCoordinateForArc as $ } from "./sd-component-library93.js";
|
|
6
|
+
import { ResponsiveTextV2 as z } from "./sd-component-library152.js";
|
|
7
|
+
const D = (j) => {
|
|
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,
|
|
7
51
|
{
|
|
8
|
-
fontSizeWeight: [[16, "regular"]],
|
|
9
52
|
sx: {
|
|
10
|
-
position: "
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
display: "flex",
|
|
14
|
-
justifyContent: "flex-start",
|
|
15
|
-
alignItems: "center",
|
|
16
|
-
opacity: 0.8,
|
|
17
|
-
":hover": {
|
|
18
|
-
opacity: 1
|
|
19
|
-
}
|
|
53
|
+
position: "absolute",
|
|
54
|
+
left: `${b}px`,
|
|
55
|
+
top: `${g}px`
|
|
20
56
|
},
|
|
21
|
-
|
|
22
|
-
|
|
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
|
+
)
|
|
23
90
|
}
|
|
24
91
|
);
|
|
25
92
|
};
|
|
26
93
|
export {
|
|
27
|
-
|
|
94
|
+
D as MatchedRangeLabelBox
|
|
28
95
|
};
|
|
29
96
|
//# sourceMappingURL=sd-component-library316.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sd-component-library316.js","sources":["../src/components/
|
|
1
|
+
{"version":3,"file":"sd-component-library316.js","sources":["../src/components/meters/common-outline-meter-partials/matched-range-label-box/matched-range-label-box.tsx"],"sourcesContent":["import React, { useCallback, useState } from \"react\";\n\nimport { Box } from \"rebass\";\n\nimport { ResponsiveTextV2 } from \"../../../texts/responsive-text-v2\";\nimport { labelPaddingX, labelWidth } from \"../../outline-meter/contants\";\nimport { getCoordinateForArc } from \"../../outline-meter/utils\";\nimport { MatchedRangeLabelBoxProps as Props } from \"./interfaces\";\n\nexport const MatchedRangeLabelBox: React.FC<Props> = (props) => {\n const {\n label,\n color,\n alpha,\n radius,\n horizontal,\n pointerLength,\n round,\n pointY,\n } = props;\n\n const [textHeight, setTextHeight] = useState(0);\n const [textY, setTextY] = useState(0);\n\n const ref = useCallback((node: HTMLElement) => {\n if (node) {\n const { height, y } = node.getBoundingClientRect();\n setTextHeight(height);\n setTextY(y);\n }\n }, []);\n\n let { x: pointerEndX, y: pointerEndY } = getCoordinateForArc(\n radius + pointerLength,\n alpha,\n radius\n );\n\n const isOnTop = alpha === 180;\n const isOnLeft = alpha < 180;\n const isOnRight = alpha > 180;\n\n if (horizontal) {\n const { x: pointerStartX, y: pointerStartY } = getCoordinateForArc(\n radius,\n alpha,\n radius\n );\n\n pointerEndX = pointerStartX + pointerLength * (isOnLeft ? -1 : 1);\n pointerEndY = pointerStartY;\n }\n\n if (!label) return null;\n\n let borderRadius = round || isOnTop ? `${labelPaddingX}px` : undefined;\n if (!borderRadius && pointY) {\n const textTopY = textY - textHeight;\n const textBottomY = textY;\n\n borderRadius = [\n isOnLeft || pointY > textTopY,\n isOnRight || pointY > textTopY,\n isOnRight || pointY < textBottomY,\n isOnLeft || pointY < textBottomY,\n ]\n .map((flag) => (flag ? `${labelPaddingX}px` : \"0\"))\n .join(\" \");\n }\n\n return (\n <Box\n sx={{\n position: \"absolute\",\n left: `${pointerEndX}px`,\n top: `${pointerEndY}px`,\n }}\n >\n <Box\n sx={{\n boxSizing: \"content-box\",\n position: \"relative\",\n top: `calc(-${textHeight}px)`,\n left: isOnTop ? \"-50%\" : isOnLeft ? \"-100%\" : undefined,\n py: \"7px\",\n px: `${labelPaddingX}px`,\n borderColor: color,\n borderWidth: \"2px\",\n borderStyle: \"solid\",\n borderRadius,\n bg: \"cl_white\",\n \"& > div\": {\n maxWidth: isOnTop ? undefined : `${labelWidth}px`,\n },\n }}\n ref={ref}\n >\n <ResponsiveTextV2\n fontSizeWeight={[[12, \"semi-bold\"]]}\n width=\"max-content\"\n color={color !== \"#CCD0DB\" ? color : \"cl_darkGrey\"}\n textTransform=\"uppercase\"\n letterSpacing=\"1.8px\"\n >\n {label}\n </ResponsiveTextV2>\n </Box>\n </Box>\n );\n};\n"],"names":["MatchedRangeLabelBox","props","label","color","alpha","radius","horizontal","pointerLength","round","pointY","textHeight","setTextHeight","useState","textY","setTextY","ref","useCallback","node","height","y","pointerEndX","pointerEndY","getCoordinateForArc","isOnTop","isOnLeft","isOnRight","pointerStartX","pointerStartY","borderRadius","labelPaddingX","textTopY","textBottomY","flag","jsx","Box","labelWidth","ResponsiveTextV2"],"mappings":";;;;;;AASa,MAAAA,IAAwC,CAACC,MAAU;AACxD,QAAA;AAAA,IACJ,OAAAC;AAAA,IACA,OAAAC;AAAA,IACA,OAAAC;AAAA,IACA,QAAAC;AAAA,IACA,YAAAC;AAAA,IACA,eAAAC;AAAA,IACA,OAAAC;AAAA,IACA,QAAAC;AAAA,EACE,IAAAR,GAEE,CAACS,GAAYC,CAAa,IAAIC,EAAS,CAAC,GACxC,CAACC,GAAOC,CAAQ,IAAIF,EAAS,CAAC,GAE9BG,IAAMC,EAAY,CAACC,MAAsB;AAC7C,QAAIA,GAAM;AACR,YAAM,EAAE,QAAAC,GAAQ,GAAAC,EAAE,IAAIF,EAAK,sBAAsB;AACjD,MAAAN,EAAcO,CAAM,GACpBJ,EAASK,CAAC;AAAA,IACZ;AAAA,EACF,GAAG,CAAE,CAAA;AAEL,MAAI,EAAE,GAAGC,GAAa,GAAGC,EAAgB,IAAAC;AAAA,IACvCjB,IAASE;AAAA,IACTH;AAAA,IACAC;AAAA,EAAA;AAGF,QAAMkB,IAAUnB,MAAU,KACpBoB,IAAWpB,IAAQ,KACnBqB,IAAYrB,IAAQ;AAE1B,MAAIE,GAAY;AACd,UAAM,EAAE,GAAGoB,GAAe,GAAGC,EAAkB,IAAAL;AAAA,MAC7CjB;AAAA,MACAD;AAAA,MACAC;AAAA,IAAA;AAGY,IAAAe,IAAAM,IAAgBnB,KAAiBiB,IAAW,KAAK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YAAA;AAAA,UACH;AAAA,QAAA;AAAA,MACF;AAAA,IAAA;AAAA,EAAA;AAGN;"}
|
|
@@ -2,7 +2,7 @@ import { j as t } from "./sd-component-library198.js";
|
|
|
2
2
|
import x from "react";
|
|
3
3
|
import u from "./sd-component-library197.js";
|
|
4
4
|
import { getIsHorizontal as j, getRangeProperties as p } from "./sd-component-library232.js";
|
|
5
|
-
import { OutlineMeterRange as M } from "./sd-component-
|
|
5
|
+
import { OutlineMeterRange as M } from "./sd-component-library241.js";
|
|
6
6
|
import { LabelPointer as b } from "./sd-component-library327.js";
|
|
7
7
|
const A = x.forwardRef(
|
|
8
8
|
(e, r) => {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { j as e } from "./sd-component-library198.js";
|
|
2
|
-
import { getSelectedRangeText as l } from "./sd-component-
|
|
2
|
+
import { getSelectedRangeText as l } from "./sd-component-library284.js";
|
|
3
3
|
import { FourteenRegular as n } from "./sd-component-library146.js";
|
|
4
4
|
import { FourteenSb as p } from "./sd-component-library147.js";
|
|
5
5
|
import { BaseGridContainer as i } from "./sd-component-library37.js";
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { j as t } from "./sd-component-library198.js";
|
|
2
|
-
import { BaseBooleanFeedback as m } from "./sd-component-
|
|
2
|
+
import { BaseBooleanFeedback as m } from "./sd-component-library212.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-library213.js";
|
|
5
|
+
import { ReactComponent as u } from "./sd-component-library214.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,
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { j as e } from "./sd-component-library198.js";
|
|
2
2
|
import { useHover as x } from "./sd-component-library3.js";
|
|
3
|
-
import { BaseFeedbackContainer as f } from "./sd-component-
|
|
3
|
+
import { BaseFeedbackContainer as f } from "./sd-component-library227.js";
|
|
4
4
|
import { BaseGridContainer as j } from "./sd-component-library37.js";
|
|
5
|
-
import { BaseFeedbackButton as k } from "./sd-component-
|
|
5
|
+
import { BaseFeedbackButton as k } from "./sd-component-library228.js";
|
|
6
6
|
const C = ({
|
|
7
7
|
questionText: t,
|
|
8
8
|
options: a,
|
|
@@ -2,9 +2,9 @@ import { j as o } from "./sd-component-library198.js";
|
|
|
2
2
|
import { Box as l } from "rebass";
|
|
3
3
|
import { useHover as k, useBreakPoints as g } from "./sd-component-library3.js";
|
|
4
4
|
import { isTouchScreen as C } from "./sd-component-library4.js";
|
|
5
|
-
import { BaseFeedbackContainer as S } from "./sd-component-
|
|
5
|
+
import { BaseFeedbackContainer as S } from "./sd-component-library227.js";
|
|
6
6
|
import { GridContainerV2 as y } from "./sd-component-library40.js";
|
|
7
|
-
import { BaseFeedbackButton as a } from "./sd-component-
|
|
7
|
+
import { BaseFeedbackButton as a } from "./sd-component-library228.js";
|
|
8
8
|
import { FrMaxContainer as x } from "./sd-component-library39.js";
|
|
9
9
|
import { ReactComponent as B } from "./sd-component-library178.js";
|
|
10
10
|
const D = ({
|
|
@@ -1,44 +1,46 @@
|
|
|
1
|
-
import { j as
|
|
1
|
+
import { j as i } from "./sd-component-library198.js";
|
|
2
2
|
import { useState as C, useEffect as V, useCallback as y } from "react";
|
|
3
3
|
import { Input as B } from "@rebass/forms";
|
|
4
|
-
import { translatedTextSuffix as
|
|
4
|
+
import { translatedTextSuffix as d } from "./sd-component-library5.js";
|
|
5
5
|
import { InputContainer as I } from "./sd-component-library60.js";
|
|
6
6
|
import { InvalidInputError as E } from "./sd-component-library70.js";
|
|
7
|
-
const W = (
|
|
8
|
-
const
|
|
7
|
+
const W = (a, n, s) => (r) => {
|
|
8
|
+
const e = r.target.value;
|
|
9
9
|
try {
|
|
10
|
-
const
|
|
11
|
-
|
|
12
|
-
} catch (
|
|
13
|
-
if (!(
|
|
14
|
-
throw
|
|
10
|
+
const o = s(e);
|
|
11
|
+
a(e), o && n(e);
|
|
12
|
+
} catch (o) {
|
|
13
|
+
if (!(o instanceof E))
|
|
14
|
+
throw o;
|
|
15
15
|
}
|
|
16
16
|
}, S = ({
|
|
17
|
-
value:
|
|
18
|
-
onChange:
|
|
19
|
-
validateValue:
|
|
20
|
-
focusInput:
|
|
21
|
-
|
|
17
|
+
value: a,
|
|
18
|
+
onChange: n,
|
|
19
|
+
validateValue: s = () => !0,
|
|
20
|
+
focusInput: r,
|
|
21
|
+
className: e = "",
|
|
22
|
+
...o
|
|
22
23
|
}) => {
|
|
23
|
-
let t =
|
|
24
|
-
|
|
25
|
-
|
|
24
|
+
let t = a;
|
|
25
|
+
const c = e;
|
|
26
|
+
t.endsWith(d) && (t = t.slice(0, -d.length), c.concat("no-translate"));
|
|
27
|
+
const [p, m] = C(t);
|
|
26
28
|
V(() => {
|
|
27
|
-
t !== void 0 &&
|
|
29
|
+
t !== void 0 && m(t);
|
|
28
30
|
}, [t]);
|
|
29
|
-
const
|
|
31
|
+
const f = y(
|
|
30
32
|
(l) => {
|
|
31
|
-
|
|
33
|
+
r && (l == null || l.focus());
|
|
32
34
|
},
|
|
33
|
-
[
|
|
35
|
+
[r]
|
|
34
36
|
);
|
|
35
|
-
return /* @__PURE__ */
|
|
37
|
+
return /* @__PURE__ */ i.jsx(
|
|
36
38
|
B,
|
|
37
39
|
{
|
|
38
40
|
variant: "_inputs.v2",
|
|
39
|
-
onChange: W(
|
|
40
|
-
value:
|
|
41
|
-
...
|
|
41
|
+
onChange: W(m, n, s),
|
|
42
|
+
value: p,
|
|
43
|
+
...o,
|
|
42
44
|
sx: {
|
|
43
45
|
":focus": {
|
|
44
46
|
borderBottomStyle: "solid",
|
|
@@ -47,72 +49,72 @@ const W = (s, a, e) => (o) => {
|
|
|
47
49
|
outline: "none"
|
|
48
50
|
}
|
|
49
51
|
},
|
|
50
|
-
className:
|
|
51
|
-
ref:
|
|
52
|
+
className: c,
|
|
53
|
+
ref: f
|
|
52
54
|
}
|
|
53
55
|
);
|
|
54
|
-
},
|
|
55
|
-
value:
|
|
56
|
-
onChange:
|
|
57
|
-
id:
|
|
58
|
-
disabled:
|
|
59
|
-
validateValue:
|
|
60
|
-
onFocus:
|
|
61
|
-
onBlur:
|
|
62
|
-
placeholder:
|
|
63
|
-
autoFocus:
|
|
64
|
-
onKeyPress:
|
|
65
|
-
focusInput:
|
|
66
|
-
maxLength:
|
|
56
|
+
}, h = "16px", A = ({
|
|
57
|
+
value: a,
|
|
58
|
+
onChange: n,
|
|
59
|
+
id: s,
|
|
60
|
+
disabled: r,
|
|
61
|
+
validateValue: e,
|
|
62
|
+
onFocus: o,
|
|
63
|
+
onBlur: t,
|
|
64
|
+
placeholder: c,
|
|
65
|
+
autoFocus: p,
|
|
66
|
+
onKeyPress: m,
|
|
67
|
+
focusInput: f,
|
|
68
|
+
maxLength: l,
|
|
67
69
|
showCheckMark: u,
|
|
68
|
-
checkmarkRight:
|
|
70
|
+
checkmarkRight: x = "0px",
|
|
69
71
|
children: v,
|
|
70
72
|
inputPr: g,
|
|
71
73
|
inputMode: w,
|
|
72
74
|
type: b,
|
|
73
75
|
...j
|
|
74
|
-
}) => /* @__PURE__ */
|
|
76
|
+
}) => /* @__PURE__ */ i.jsxs(
|
|
75
77
|
I,
|
|
76
78
|
{
|
|
77
|
-
id:
|
|
78
|
-
cursor:
|
|
79
|
+
id: s,
|
|
80
|
+
cursor: r ? "not-allowed" : "pointer",
|
|
79
81
|
...j,
|
|
80
82
|
children: [
|
|
81
|
-
/* @__PURE__ */
|
|
83
|
+
/* @__PURE__ */ i.jsx(
|
|
82
84
|
S,
|
|
83
85
|
{
|
|
84
|
-
value:
|
|
85
|
-
onChange:
|
|
86
|
-
validateValue:
|
|
87
|
-
id:
|
|
88
|
-
disabled:
|
|
89
|
-
placeholder:
|
|
90
|
-
onFocus:
|
|
91
|
-
onBlur:
|
|
92
|
-
autoFocus:
|
|
93
|
-
onKeyPress:
|
|
94
|
-
focusInput:
|
|
95
|
-
maxLength:
|
|
86
|
+
value: a,
|
|
87
|
+
onChange: n,
|
|
88
|
+
validateValue: e,
|
|
89
|
+
id: s,
|
|
90
|
+
disabled: r,
|
|
91
|
+
placeholder: c,
|
|
92
|
+
onFocus: o,
|
|
93
|
+
onBlur: t,
|
|
94
|
+
autoFocus: p,
|
|
95
|
+
onKeyPress: m,
|
|
96
|
+
focusInput: f,
|
|
97
|
+
maxLength: l,
|
|
96
98
|
inputMode: w,
|
|
97
99
|
type: b,
|
|
98
|
-
pr: g ?? (u ? `calc(${
|
|
100
|
+
pr: g ?? (u ? `calc(${h} + ${x} + 2px)` : void 0)
|
|
99
101
|
}
|
|
100
102
|
),
|
|
101
|
-
u && /* @__PURE__ */
|
|
103
|
+
u && /* @__PURE__ */ i.jsx(
|
|
102
104
|
"svg",
|
|
103
105
|
{
|
|
104
106
|
xmlns: "http://www.w3.org/2000/svg",
|
|
105
|
-
width:
|
|
107
|
+
width: h,
|
|
106
108
|
height: "11.931",
|
|
107
109
|
viewBox: "0 0 16 11.931",
|
|
108
110
|
fill: "#3DEB24",
|
|
109
111
|
style: {
|
|
110
112
|
position: "absolute",
|
|
111
|
-
right:
|
|
113
|
+
right: x,
|
|
112
114
|
bottom: "16px",
|
|
113
115
|
transform: "translateY(-50%)"
|
|
114
116
|
},
|
|
115
|
-
children: /* @__PURE__ */
|
|
117
|
+
children: /* @__PURE__ */ i.jsx(
|
|
116
118
|
"path",
|
|
117
119
|
{
|
|
118
120
|
d: "M5.434,16.274l-5.2-5.2a.8.8,0,0,1,0-1.131L1.366,8.812a.8.8,0,0,1,1.131,0l3.5,3.5,7.5-7.5a.8.8,0,0,1,1.131,0l1.131,1.131a.8.8,0,0,1,0,1.131l-9.2,9.2A.8.8,0,0,1,5.434,16.274Z",
|
|
@@ -127,6 +129,6 @@ const W = (s, a, e) => (o) => {
|
|
|
127
129
|
);
|
|
128
130
|
export {
|
|
129
131
|
S as FormV2Input,
|
|
130
|
-
|
|
132
|
+
A as FormV2InputWithContainer
|
|
131
133
|
};
|
|
132
134
|
//# sourceMappingURL=sd-component-library57.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sd-component-library57.js","sources":["../src/components/forms-v2/form-v2-input/form-v2-input.tsx"],"sourcesContent":["import React, { useCallback, useEffect, useState } from \"react\";\n\nimport { Input as RebassInput } from \"@rebass/forms\";\n\nimport { translatedTextSuffix } from \"../../../core/constants\";\nimport { InvalidInputError } from \"../../inputs\";\nimport { InputContainer, InputContainerProps } from \"../input-container\";\nimport { FormV2InputProps as Props } from \"./interfaces\";\n\nconst getOnChangeCallback =\n (\n setDisplayedValue: (newValue: string) => void,\n onChange: Props[\"onChange\"],\n validateValue: Required<Props>[\"validateValue\"]\n ) =>\n (event: React.ChangeEvent<HTMLInputElement>) => {\n const newValue = event.target.value;\n try {\n const isValid = validateValue(newValue);\n setDisplayedValue(newValue);\n isValid && onChange(newValue);\n } catch (error) {\n if (!(error instanceof InvalidInputError)) throw error;\n }\n };\n\nexport const FormV2Input: React.FC<Props> = ({\n value,\n onChange,\n validateValue = () => true,\n focusInput,\n ...props\n}) => {\n let valueToUse = value;\n
|
|
1
|
+
{"version":3,"file":"sd-component-library57.js","sources":["../src/components/forms-v2/form-v2-input/form-v2-input.tsx"],"sourcesContent":["import React, { useCallback, useEffect, useState } from \"react\";\n\nimport { Input as RebassInput } from \"@rebass/forms\";\n\nimport { translatedTextSuffix } from \"../../../core/constants\";\nimport { InvalidInputError } from \"../../inputs\";\nimport { InputContainer, InputContainerProps } from \"../input-container\";\nimport { FormV2InputProps as Props } from \"./interfaces\";\n\nconst getOnChangeCallback =\n (\n setDisplayedValue: (newValue: string) => void,\n onChange: Props[\"onChange\"],\n validateValue: Required<Props>[\"validateValue\"]\n ) =>\n (event: React.ChangeEvent<HTMLInputElement>) => {\n const newValue = event.target.value;\n try {\n const isValid = validateValue(newValue);\n setDisplayedValue(newValue);\n isValid && onChange(newValue);\n } catch (error) {\n if (!(error instanceof InvalidInputError)) throw error;\n }\n };\n\nexport const FormV2Input: React.FC<Props> = ({\n value,\n onChange,\n validateValue = () => true,\n focusInput,\n className = \"\",\n ...props\n}) => {\n let valueToUse = value;\n const finalClassName = className;\n\n if (valueToUse.endsWith(translatedTextSuffix)) {\n valueToUse = valueToUse.slice(0, -translatedTextSuffix.length);\n finalClassName.concat(\"no-translate\");\n }\n\n const [displayedValue, setDisplayedValue] = useState(valueToUse);\n\n useEffect(() => {\n valueToUse !== undefined && setDisplayedValue(valueToUse);\n }, [valueToUse]);\n\n const ref = useCallback(\n (input: HTMLInputElement | null) => {\n focusInput && input?.focus();\n },\n [focusInput]\n );\n\n return (\n <RebassInput\n variant=\"_inputs.v2\"\n onChange={getOnChangeCallback(setDisplayedValue, onChange, validateValue)}\n value={displayedValue}\n {...props}\n sx={{\n \":focus\": {\n borderBottomStyle: \"solid\",\n borderBottomWidth: \"2px\",\n borderBottomColor: \"cl_blue\",\n outline: \"none\",\n },\n }}\n className={finalClassName}\n ref={ref}\n />\n );\n};\n\nconst checkMarkWidth = \"16px\";\n\nexport const FormV2InputWithContainer: React.FC<\n Omit<Props, \"pr\"> &\n InputContainerProps & {\n showCheckMark?: boolean;\n checkmarkRight?: string;\n inputPr?: Props[\"pr\"];\n }\n> = ({\n value,\n onChange,\n id,\n disabled,\n validateValue,\n onFocus,\n onBlur,\n placeholder,\n autoFocus,\n onKeyPress,\n focusInput,\n maxLength,\n showCheckMark,\n checkmarkRight = \"0px\",\n children,\n inputPr,\n inputMode,\n type,\n ...containerProps\n}) => (\n <InputContainer\n id={id}\n cursor={disabled ? \"not-allowed\" : \"pointer\"}\n {...containerProps}\n >\n <FormV2Input\n {...{\n value,\n onChange,\n validateValue,\n id,\n disabled,\n placeholder,\n onFocus,\n onBlur,\n autoFocus,\n onKeyPress,\n focusInput,\n maxLength,\n inputMode,\n type,\n }}\n pr={\n inputPr ??\n (showCheckMark\n ? `calc(${checkMarkWidth} + ${checkmarkRight} + 2px)`\n : undefined)\n }\n />\n\n {showCheckMark && (\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n width={checkMarkWidth}\n height=\"11.931\"\n viewBox=\"0 0 16 11.931\"\n fill=\"#3DEB24\"\n style={{\n position: \"absolute\",\n right: checkmarkRight,\n bottom: \"16px\",\n transform: \"translateY(-50%)\",\n }}\n >\n <path\n d=\"M5.434,16.274l-5.2-5.2a.8.8,0,0,1,0-1.131L1.366,8.812a.8.8,0,0,1,1.131,0l3.5,3.5,7.5-7.5a.8.8,0,0,1,1.131,0l1.131,1.131a.8.8,0,0,1,0,1.131l-9.2,9.2A.8.8,0,0,1,5.434,16.274Z\"\n transform=\"translate(0 -4.577)\"\n />\n </svg>\n )}\n\n {children}\n </InputContainer>\n);\n"],"names":["getOnChangeCallback","setDisplayedValue","onChange","validateValue","event","newValue","isValid","error","InvalidInputError","FormV2Input","value","focusInput","className","props","valueToUse","finalClassName","translatedTextSuffix","displayedValue","useState","useEffect","ref","useCallback","input","jsx","RebassInput","checkMarkWidth","FormV2InputWithContainer","id","disabled","onFocus","onBlur","placeholder","autoFocus","onKeyPress","maxLength","showCheckMark","checkmarkRight","children","inputPr","inputMode","type","containerProps","jsxs","InputContainer"],"mappings":";;;;;;AASA,MAAMA,IACJ,CACEC,GACAC,GACAC,MAEF,CAACC,MAA+C;AACxC,QAAAC,IAAWD,EAAM,OAAO;AAC1B,MAAA;AACI,UAAAE,IAAUH,EAAcE,CAAQ;AACtC,IAAAJ,EAAkBI,CAAQ,GAC1BC,KAAWJ,EAASG,CAAQ;AAAA,WACrBE,GAAO;AACd,QAAI,EAAEA,aAAiBC;AAA0B,YAAAD;AAAA,EACnD;AACF,GAEWE,IAA+B,CAAC;AAAA,EAC3C,OAAAC;AAAA,EACA,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,UAAAC;AAAA,EACA,SAAAC;AAAA,EACA,WAAAC;AAAA,EACA,MAAAC;AAAA,EACA,GAAGC;AACL,MACEC,gBAAAA,EAAA;AAAA,EAACC;AAAA,EAAA;AAAA,IACC,IAAAhB;AAAA,IACA,QAAQC,IAAW,gBAAgB;AAAA,IAClC,GAAGa;AAAA,IAEJ,UAAA;AAAA,MAAAlB,gBAAAA,EAAA;AAAA,QAACd;AAAA,QAAA;AAAA,UAEG,OAAAC;AAAA,UACA,UAAAR;AAAA,UACA,eAAAC;AAAA,UACA,IAAAwB;AAAA,UACA,UAAAC;AAAA,UACA,aAAAG;AAAA,UACA,SAAAF;AAAA,UACA,QAAAC;AAAA,UACA,WAAAE;AAAA,UACA,YAAAC;AAAA,UACA,YAAAtB;AAAA,UACA,WAAAuB;AAAA,UACA,WAAAK;AAAA,UACA,MAAAC;AAAA,UAEF,IACEF,MACCH,IACG,QAAQV,CAAc,MAAMW,CAAc,YAC1C;AAAA,QAAA;AAAA,MAER;AAAA,MAECD,KACCZ,gBAAAA,EAAA;AAAA,QAAC;AAAA,QAAA;AAAA,UACC,OAAM;AAAA,UACN,OAAOE;AAAA,UACP,QAAO;AAAA,UACP,SAAQ;AAAA,UACR,MAAK;AAAA,UACL,OAAO;AAAA,YACL,UAAU;AAAA,YACV,OAAOW;AAAA,YACP,QAAQ;AAAA,YACR,WAAW;AAAA,UACb;AAAA,UAEA,UAAAb,gBAAAA,EAAA;AAAA,YAAC;AAAA,YAAA;AAAA,cACC,GAAE;AAAA,cACF,WAAU;AAAA,YAAA;AAAA,UACZ;AAAA,QAAA;AAAA,MACF;AAAA,MAGDc;AAAA,IAAA;AAAA,EAAA;AACH;"}
|
|
@@ -2,7 +2,7 @@ import { j as e } from "./sd-component-library198.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-library202.js";
|
|
6
6
|
const Z = (p) => {
|
|
7
7
|
const {
|
|
8
8
|
width: x = ["100%"],
|
|
@@ -3,7 +3,7 @@ import { useState as d, useRef as w, useCallback as I, useMemo as L } from "reac
|
|
|
3
3
|
import { Box as V } from "rebass";
|
|
4
4
|
import { useOnClickOutside as _ } from "./sd-component-library3.js";
|
|
5
5
|
import { SecondaryTextInput as $ } from "./sd-component-library79.js";
|
|
6
|
-
import { ResultsBox as A } from "./sd-component-
|
|
6
|
+
import { ResultsBox as A } from "./sd-component-library215.js";
|
|
7
7
|
function P(i, l, a) {
|
|
8
8
|
const o = (c) => {
|
|
9
9
|
const t = c.toLowerCase().indexOf(a.toLowerCase());
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { j as e } from "./sd-component-library198.js";
|
|
2
2
|
import { useCallback as p, useMemo as u } from "react";
|
|
3
3
|
import { Calendar as g } from "react-date-range";
|
|
4
|
-
import "./sd-component-
|
|
5
|
-
import "./sd-component-
|
|
4
|
+
import "./sd-component-library282.js";
|
|
5
|
+
import "./sd-component-library283.js";
|
|
6
6
|
import { Box as o } from "rebass";
|
|
7
7
|
import { TenSb as b } from "./sd-component-library155.js";
|
|
8
8
|
const B = (a) => {
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { j as t } from "./sd-component-library198.js";
|
|
2
2
|
import { useState as v, useRef as w } from "react";
|
|
3
|
-
import "./sd-component-
|
|
4
|
-
import "./sd-component-
|
|
3
|
+
import "./sd-component-library282.js";
|
|
4
|
+
import "./sd-component-library283.js";
|
|
5
5
|
import { Box as s } from "rebass";
|
|
6
6
|
import { useBreakPoints as M, useDependantState as y } from "./sd-component-library3.js";
|
|
7
|
-
import { getStaticRanges as E } from "./sd-component-
|
|
8
|
-
import { BaseDateRangeInputMobile as O } from "./sd-component-
|
|
9
|
-
import { BaseDateRangeInputDesktop as P } from "./sd-component-
|
|
7
|
+
import { getStaticRanges as E } from "./sd-component-library284.js";
|
|
8
|
+
import { BaseDateRangeInputMobile as O } from "./sd-component-library285.js";
|
|
9
|
+
import { BaseDateRangeInputDesktop as P } from "./sd-component-library286.js";
|
|
10
10
|
const J = (n) => {
|
|
11
11
|
const {
|
|
12
12
|
color: d = "#9E1CB5",
|
|
@@ -2,7 +2,7 @@ import { j as t } from "./sd-component-library198.js";
|
|
|
2
2
|
import { useState as u } from "react";
|
|
3
3
|
import { Flex as g } from "rebass";
|
|
4
4
|
import { BaseDateInput as C } from "./sd-component-library63.js";
|
|
5
|
-
import { ReactComponent as S } from "./sd-component-
|
|
5
|
+
import { ReactComponent as S } from "./sd-component-library287.js";
|
|
6
6
|
import { Button as D } from "./sd-component-library26.js";
|
|
7
7
|
import { FrMaxContainer as b } from "./sd-component-library39.js";
|
|
8
8
|
const k = (r) => {
|
|
@@ -2,8 +2,8 @@ import { j as e } from "./sd-component-library198.js";
|
|
|
2
2
|
import { useState as I, useCallback as M, useMemo as v } from "react";
|
|
3
3
|
import { Box as F, Flex as O } from "rebass";
|
|
4
4
|
import { useBreakPoints as W } from "./sd-component-library3.js";
|
|
5
|
-
import { ReactComponent as z } from "./sd-component-
|
|
6
|
-
import { BaseLabel as E } from "./sd-component-
|
|
5
|
+
import { ReactComponent as z } from "./sd-component-library287.js";
|
|
6
|
+
import { BaseLabel as E } from "./sd-component-library226.js";
|
|
7
7
|
import { OutsideClickBox as J } from "./sd-component-library12.js";
|
|
8
8
|
import { BaseDateRangeInput as L } from "./sd-component-library64.js";
|
|
9
9
|
import { IconButton as X } from "./sd-component-library23.js";
|
|
@@ -4,7 +4,7 @@ import { format as k } from "date-fns";
|
|
|
4
4
|
import { random as G } from "lodash-es";
|
|
5
5
|
import { Box as r } from "rebass";
|
|
6
6
|
import { BaseDateInput as I } from "./sd-component-library63.js";
|
|
7
|
-
import { BaseLabel as M } from "./sd-component-
|
|
7
|
+
import { BaseLabel as M } from "./sd-component-library226.js";
|
|
8
8
|
import { ReactComponent as A } from "./sd-component-library189.js";
|
|
9
9
|
import { FrMaxContainer as L } from "./sd-component-library39.js";
|
|
10
10
|
import { ResponsiveText as P } from "./sd-component-library150.js";
|
|
@@ -4,7 +4,7 @@ import { Box as i, Flex as b } from "rebass";
|
|
|
4
4
|
import { isPDFFlow as v } from "./sd-component-library4.js";
|
|
5
5
|
import { SecondaryBadge as C } from "./sd-component-library10.js";
|
|
6
6
|
import { MaxFrContainer as E } from "./sd-component-library41.js";
|
|
7
|
-
import { ReactComponent as S } from "./sd-component-
|
|
7
|
+
import { ReactComponent as S } from "./sd-component-library202.js";
|
|
8
8
|
const $ = (d) => {
|
|
9
9
|
const {
|
|
10
10
|
header: s,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { j as w } from "./sd-component-library198.js";
|
|
2
|
-
import { useRef as
|
|
3
|
-
import { Input as
|
|
2
|
+
import { useRef as E, useState as K, useEffect as g } from "react";
|
|
3
|
+
import { Input as N } from "@rebass/forms";
|
|
4
4
|
import { translatedTextSuffix as x } from "./sd-component-library5.js";
|
|
5
5
|
import { InvalidInputError as P } from "./sd-component-library70.js";
|
|
6
6
|
function M(t, s, n) {
|
|
@@ -31,11 +31,13 @@ const B = (t) => {
|
|
|
31
31
|
inputMode: y,
|
|
32
32
|
autoFocus: v = !1,
|
|
33
33
|
errorBackground: I = !1,
|
|
34
|
-
sx:
|
|
34
|
+
sx: C,
|
|
35
|
+
className: R = ""
|
|
35
36
|
} = t;
|
|
36
|
-
let e = s
|
|
37
|
-
|
|
38
|
-
|
|
37
|
+
let e = s;
|
|
38
|
+
const c = R;
|
|
39
|
+
e.endsWith(x) && (e = e.slice(0, -x.length), c.concat("no-translate"));
|
|
40
|
+
const u = E(null), [l, m] = K(e);
|
|
39
41
|
g(() => {
|
|
40
42
|
m(e);
|
|
41
43
|
}, [e]), g(() => {
|
|
@@ -45,7 +47,7 @@ const B = (t) => {
|
|
|
45
47
|
d.key in f && f[d.key]();
|
|
46
48
|
};
|
|
47
49
|
return /* @__PURE__ */ w.jsx(
|
|
48
|
-
|
|
50
|
+
N,
|
|
49
51
|
{
|
|
50
52
|
"data-testid": "base-input",
|
|
51
53
|
...t,
|
|
@@ -55,16 +57,16 @@ const B = (t) => {
|
|
|
55
57
|
padding: o,
|
|
56
58
|
width: r,
|
|
57
59
|
backgroundColor: I ? "rgba(255, 0, 0, 0.05)" : "",
|
|
58
|
-
...
|
|
60
|
+
...C
|
|
59
61
|
},
|
|
60
|
-
value:
|
|
62
|
+
value: l,
|
|
61
63
|
autoFocus: v,
|
|
62
64
|
type: i,
|
|
63
|
-
onChange: M(
|
|
65
|
+
onChange: M(l, m, a),
|
|
64
66
|
onKeyPress: j,
|
|
65
67
|
ref: u,
|
|
66
68
|
inputMode: y,
|
|
67
|
-
className:
|
|
69
|
+
className: c
|
|
68
70
|
}
|
|
69
71
|
);
|
|
70
72
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sd-component-library71.js","sources":["../src/components/inputs/input/input.tsx"],"sourcesContent":["import React, { useEffect, useRef, useState } from \"react\";\n\nimport { Input as RebassInput } from \"@rebass/forms\";\n\nimport { InvalidInputError } from \".\";\nimport { translatedTextSuffix } from \"../../../core/constants\";\nimport { InputProps as Props } from \"./interfaces\";\n\n/**\n * Validate and update the input field's value.\n *\n * @param oldValue The previous input value.\n * @param setValue The new input value.\n * @param callback The callback funciton to run when input changes.\n */\nfunction changeWrapper(\n oldValue: string,\n setValue: React.Dispatch<React.SetStateAction<string>>,\n callback?: (newValue: string, oldValue: string) => void\n): (event: React.ChangeEvent<HTMLInputElement>) => void {\n return (event: React.ChangeEvent<HTMLInputElement>) => {\n const newValue = event.target.value;\n let exceptionRaised = false;\n try {\n callback?.(newValue, oldValue);\n } catch (error) {\n exceptionRaised = true;\n if (!(error instanceof InvalidInputError)) {\n throw error;\n }\n } finally {\n !exceptionRaised && setValue(newValue);\n exceptionRaised && setValue(oldValue);\n }\n };\n}\n\n/**\n * Base input component. Other input components should be built from this.\n */\nexport const Input: React.FC<Props> = (props) => {\n const {\n value = \"\",\n textAlign,\n type,\n padding,\n width = \"100%\",\n onChange,\n onKeyPress = {},\n focusInput = false,\n variant,\n inputMode,\n autoFocus = false,\n errorBackground = false,\n sx,\n } = props;\n\n let valueToUse = value;\n
|
|
1
|
+
{"version":3,"file":"sd-component-library71.js","sources":["../src/components/inputs/input/input.tsx"],"sourcesContent":["import React, { useEffect, useRef, useState } from \"react\";\n\nimport { Input as RebassInput } from \"@rebass/forms\";\n\nimport { InvalidInputError } from \".\";\nimport { translatedTextSuffix } from \"../../../core/constants\";\nimport { InputProps as Props } from \"./interfaces\";\n\n/**\n * Validate and update the input field's value.\n *\n * @param oldValue The previous input value.\n * @param setValue The new input value.\n * @param callback The callback funciton to run when input changes.\n */\nfunction changeWrapper(\n oldValue: string,\n setValue: React.Dispatch<React.SetStateAction<string>>,\n callback?: (newValue: string, oldValue: string) => void\n): (event: React.ChangeEvent<HTMLInputElement>) => void {\n return (event: React.ChangeEvent<HTMLInputElement>) => {\n const newValue = event.target.value;\n let exceptionRaised = false;\n try {\n callback?.(newValue, oldValue);\n } catch (error) {\n exceptionRaised = true;\n if (!(error instanceof InvalidInputError)) {\n throw error;\n }\n } finally {\n !exceptionRaised && setValue(newValue);\n exceptionRaised && setValue(oldValue);\n }\n };\n}\n\n/**\n * Base input component. Other input components should be built from this.\n */\nexport const Input: React.FC<Props> = (props) => {\n const {\n value = \"\",\n textAlign,\n type,\n padding,\n width = \"100%\",\n onChange,\n onKeyPress = {},\n focusInput = false,\n variant,\n inputMode,\n autoFocus = false,\n errorBackground = false,\n sx,\n className = \"\",\n } = props;\n\n let valueToUse = value;\n const finalClassName = className;\n\n if (valueToUse.endsWith(translatedTextSuffix)) {\n valueToUse = valueToUse.slice(0, -translatedTextSuffix.length);\n finalClassName.concat(\"no-translate\");\n }\n\n const inputRef = useRef<HTMLInputElement>(null);\n\n const [mValue, setMValue] = useState(valueToUse);\n\n useEffect(() => {\n setMValue(valueToUse);\n }, [valueToUse]);\n\n useEffect(() => {\n if (!focusInput || !inputRef.current) return;\n\n inputRef.current.focus();\n }, [inputRef, focusInput]);\n\n const handleOnKeyPress = (e: React.KeyboardEvent<HTMLInputElement>) => {\n if (e.key in onKeyPress) {\n onKeyPress[e.key]();\n }\n };\n\n return (\n <RebassInput\n data-testid=\"base-input\"\n {...props}\n variant={`_inputs.${variant}`}\n sx={{\n textAlign,\n padding,\n width,\n backgroundColor: errorBackground ? \"rgba(255, 0, 0, 0.05)\" : \"\",\n ...sx,\n }}\n value={mValue}\n autoFocus={autoFocus}\n type={type}\n onChange={changeWrapper(mValue, setMValue, onChange)}\n onKeyPress={handleOnKeyPress}\n ref={inputRef}\n inputMode={inputMode}\n className={finalClassName}\n />\n );\n};\n"],"names":["changeWrapper","oldValue","setValue","callback","event","newValue","exceptionRaised","error","InvalidInputError","Input","props","value","textAlign","type","padding","width","onChange","onKeyPress","focusInput","variant","inputMode","autoFocus","errorBackground","sx","className","valueToUse","finalClassName","translatedTextSuffix","inputRef","useRef","mValue","setMValue","useState","useEffect","handleOnKeyPress","e","jsx","RebassInput"],"mappings":";;;;;AAeA,SAASA,EACPC,GACAC,GACAC,GACsD;AACtD,SAAO,CAACC,MAA+C;AAC/C,UAAAC,IAAWD,EAAM,OAAO;AAC9B,QAAIE,IAAkB;AAClB,QAAA;AACF,MAAAH,KAAA,QAAAA,EAAWE,GAAUJ;AAAA,aACdM,GAAO;AAEV,UADcD,IAAA,IACd,EAAEC,aAAiBC;AACf,cAAAD;AAAA,IACR,UACA;AACC,OAAAD,KAAmBJ,EAASG,CAAQ,GACrCC,KAAmBJ,EAASD,CAAQ;AAAA,IACtC;AAAA,EAAA;AAEJ;AAKa,MAAAQ,IAAyB,CAACC,MAAU;AACzC,QAAA;AAAA,IACJ,OAAAC,IAAQ;AAAA,IACR,WAAAC;AAAA,IACA,MAAAC;AAAA,IACA,SAAAC;AAAA,IACA,OAAAC,IAAQ;AAAA,IACR,UAAAC;AAAA,I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
|
1
1
|
import { j as n } from "./sd-component-library198.js";
|
|
2
2
|
import { useState as z } from "react";
|
|
3
|
-
import D from "./sd-component-
|
|
3
|
+
import D from "./sd-component-library216.js";
|
|
4
4
|
import u from "./sd-component-library197.js";
|
|
5
|
-
import { escapeWrapper as F, unescapeWrapper as d } from "./sd-component-
|
|
5
|
+
import { escapeWrapper as F, unescapeWrapper as d } from "./sd-component-library217.js";
|
|
6
6
|
import { GridContainerV2 as G } from "./sd-component-library40.js";
|
|
7
7
|
import { BaseTextV2 as T } from "./sd-component-library140.js";
|
|
8
8
|
import { HorizontalDivider as B } from "./sd-component-library50.js";
|