@selfdecode/sd-component-library 4.0.85 → 4.0.87
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/components/forms-v2/form-v2-input/form-v2-input.d.ts +3 -1
- package/lib/components/forms-v2/form-v2-input/form-v2-number-input.d.ts +1 -9
- package/lib/components/forms-v2/form-v2-input/index.d.ts +1 -0
- package/lib/components/forms-v2/form-v2-input/interfaces.d.ts +9 -2
- package/lib/components/forms-v2/form-v2-selector/index.d.ts +1 -0
- package/lib/components/forms-v2/input-container/index.d.ts +1 -1
- package/lib/components/forms-v2/input-label/index.d.ts +1 -1
- package/lib/sd-component-library100.js +2 -2
- package/lib/sd-component-library101.js +3 -3
- package/lib/sd-component-library102.js +2 -2
- package/lib/sd-component-library117.js +1 -1
- package/lib/sd-component-library118.js +1 -1
- package/lib/sd-component-library120.js +1 -1
- package/lib/sd-component-library121.js +1 -1
- package/lib/sd-component-library126.js +1 -1
- package/lib/sd-component-library127.js +1 -1
- package/lib/sd-component-library129.js +1 -1
- package/lib/sd-component-library132.js +3 -3
- package/lib/sd-component-library133.js +1 -1
- package/lib/sd-component-library135.js +2 -2
- package/lib/sd-component-library15.js +1 -1
- package/lib/sd-component-library166.js +1 -1
- package/lib/sd-component-library171.js +1 -1
- package/lib/sd-component-library199.js +57 -3
- package/lib/sd-component-library199.js.map +1 -1
- package/lib/sd-component-library200.js +3 -57
- package/lib/sd-component-library200.js.map +1 -1
- package/lib/sd-component-library204.js +59 -19
- package/lib/sd-component-library204.js.map +1 -1
- package/lib/sd-component-library205.js +20 -14
- package/lib/sd-component-library205.js.map +1 -1
- package/lib/sd-component-library206.js +19 -5
- package/lib/sd-component-library206.js.map +1 -1
- package/lib/sd-component-library207.js +3 -3
- package/lib/sd-component-library207.js.map +1 -1
- package/lib/sd-component-library208.js +5 -18
- package/lib/sd-component-library208.js.map +1 -1
- package/lib/sd-component-library209.js +20 -64
- package/lib/sd-component-library209.js.map +1 -1
- package/lib/sd-component-library210.js +3 -21
- package/lib/sd-component-library210.js.map +1 -1
- package/lib/sd-component-library211.js +1 -1
- package/lib/sd-component-library211.js.map +1 -1
- package/lib/sd-component-library212.js +64 -3
- package/lib/sd-component-library212.js.map +1 -1
- package/lib/sd-component-library213.js +19 -60
- package/lib/sd-component-library213.js.map +1 -1
- package/lib/sd-component-library214.js +18 -23
- package/lib/sd-component-library214.js.map +1 -1
- package/lib/sd-component-library216.js +128 -13
- package/lib/sd-component-library216.js.map +1 -1
- package/lib/sd-component-library217.js +13 -3
- package/lib/sd-component-library217.js.map +1 -1
- package/lib/sd-component-library218.js +14 -3
- package/lib/sd-component-library218.js.map +1 -1
- package/lib/sd-component-library219.js +3 -129
- package/lib/sd-component-library219.js.map +1 -1
- package/lib/sd-component-library220.js +3 -13
- package/lib/sd-component-library220.js.map +1 -1
- package/lib/sd-component-library221.js +3 -65
- package/lib/sd-component-library221.js.map +1 -1
- package/lib/sd-component-library222.js +52 -3
- package/lib/sd-component-library222.js.map +1 -1
- package/lib/sd-component-library223.js +65 -3
- package/lib/sd-component-library223.js.map +1 -1
- package/lib/sd-component-library224.js +3 -52
- package/lib/sd-component-library224.js.map +1 -1
- package/lib/sd-component-library229.js +3 -3
- package/lib/sd-component-library23.js +2 -2
- package/lib/sd-component-library231.js +1 -1
- package/lib/sd-component-library232.js +1 -1
- package/lib/sd-component-library24.js +2 -2
- package/lib/sd-component-library240.js +1 -1
- package/lib/sd-component-library247.js +60 -26
- package/lib/sd-component-library247.js.map +1 -1
- package/lib/sd-component-library248.js +41 -27
- package/lib/sd-component-library248.js.map +1 -1
- package/lib/sd-component-library249.js +27 -21
- package/lib/sd-component-library249.js.map +1 -1
- package/lib/sd-component-library25.js +1 -1
- package/lib/sd-component-library250.js +20 -19
- package/lib/sd-component-library250.js.map +1 -1
- package/lib/sd-component-library251.js +20 -2
- package/lib/sd-component-library251.js.map +1 -1
- package/lib/sd-component-library252.js +2 -26
- package/lib/sd-component-library252.js.map +1 -1
- package/lib/sd-component-library253.js +24 -323
- package/lib/sd-component-library253.js.map +1 -1
- package/lib/sd-component-library254.js +325 -5
- package/lib/sd-component-library254.js.map +1 -1
- package/lib/sd-component-library255.js +5 -75
- package/lib/sd-component-library255.js.map +1 -1
- package/lib/sd-component-library262.js +27 -27
- package/lib/sd-component-library262.js.map +1 -1
- package/lib/sd-component-library263.js +43 -13
- package/lib/sd-component-library263.js.map +1 -1
- package/lib/sd-component-library264.js +118 -112
- package/lib/sd-component-library264.js.map +1 -1
- package/lib/sd-component-library265.js +57 -105
- package/lib/sd-component-library265.js.map +1 -1
- package/lib/sd-component-library266.js +75 -9
- package/lib/sd-component-library266.js.map +1 -1
- package/lib/sd-component-library267.js +30 -50
- package/lib/sd-component-library267.js.map +1 -1
- package/lib/sd-component-library268.js +20 -29
- package/lib/sd-component-library268.js.map +1 -1
- package/lib/sd-component-library269.js +118 -44
- package/lib/sd-component-library269.js.map +1 -1
- package/lib/sd-component-library270.js +104 -113
- package/lib/sd-component-library270.js.map +1 -1
- package/lib/sd-component-library271.js +9 -73
- package/lib/sd-component-library271.js.map +1 -1
- package/lib/sd-component-library272.js +42 -68
- package/lib/sd-component-library272.js.map +1 -1
- package/lib/sd-component-library289.js +4 -4
- package/lib/sd-component-library290.js +2 -3
- package/lib/sd-component-library290.js.map +1 -1
- package/lib/sd-component-library291.js +8 -3
- package/lib/sd-component-library291.js.map +1 -1
- package/lib/sd-component-library292.js +328 -3
- package/lib/sd-component-library292.js.map +1 -1
- package/lib/sd-component-library293.js +51 -2
- package/lib/sd-component-library293.js.map +1 -1
- package/lib/sd-component-library294.js +3 -8
- package/lib/sd-component-library294.js.map +1 -1
- package/lib/sd-component-library295.js +3 -328
- package/lib/sd-component-library295.js.map +1 -1
- package/lib/sd-component-library296.js +3 -51
- package/lib/sd-component-library296.js.map +1 -1
- package/lib/sd-component-library314.js +47 -89
- package/lib/sd-component-library314.js.map +1 -1
- package/lib/sd-component-library315.js +89 -47
- package/lib/sd-component-library315.js.map +1 -1
- package/lib/sd-component-library32.js +1 -1
- package/lib/sd-component-library33.js +1 -1
- package/lib/sd-component-library49.js +1 -1
- package/lib/sd-component-library5.js +1 -1
- package/lib/sd-component-library50.js +1 -1
- package/lib/sd-component-library52.js +3 -3
- package/lib/sd-component-library53.js +2 -2
- package/lib/sd-component-library54.js +2 -2
- package/lib/sd-component-library55.js +84 -57
- package/lib/sd-component-library55.js.map +1 -1
- package/lib/sd-component-library56.js.map +1 -1
- package/lib/sd-component-library6.js +1 -1
- package/lib/sd-component-library70.js +2 -2
- package/lib/sd-component-library72.js +3 -3
- package/lib/sd-component-library74.js +2 -2
- package/lib/sd-component-library75.js +3 -3
- package/lib/sd-component-library79.js +1 -1
- package/lib/sd-component-library85.js +1 -1
- package/lib/sd-component-library98.js +1 -1
- package/lib/sd-component-library99.js +2 -2
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sd-component-library314.js","sources":["../src/components/meters/
|
|
1
|
+
{"version":3,"file":"sd-component-library314.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,54 +1,96 @@
|
|
|
1
|
-
import { j as
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
const
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
1
|
+
import { j as a } from "./sd-component-library195.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-library228.js";
|
|
5
|
+
import { getCoordinateForArc as $ } from "./sd-component-library91.js";
|
|
6
|
+
import { ResponsiveTextV2 as z } from "./sd-component-library149.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
|
|
27
34
|
);
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
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,
|
|
40
59
|
{
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
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
|
+
)
|
|
46
88
|
}
|
|
47
89
|
)
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
90
|
+
}
|
|
91
|
+
);
|
|
92
|
+
};
|
|
51
93
|
export {
|
|
52
|
-
|
|
94
|
+
D as MatchedRangeLabelBox
|
|
53
95
|
};
|
|
54
96
|
//# sourceMappingURL=sd-component-library315.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sd-component-library315.js","sources":["../src/components/meters/
|
|
1
|
+
{"version":3,"file":"sd-component-library315.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;"}
|
|
@@ -2,7 +2,7 @@ import { j as e } from "./sd-component-library195.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-library200.js";
|
|
6
6
|
const Z = (p) => {
|
|
7
7
|
const {
|
|
8
8
|
width: x = ["100%"],
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { j as t } from "./sd-component-library195.js";
|
|
2
|
-
import { BaseBooleanFeedback as m } from "./sd-component-
|
|
2
|
+
import { BaseBooleanFeedback as m } from "./sd-component-library209.js";
|
|
3
3
|
import { IconButton as n } from "./sd-component-library22.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-library210.js";
|
|
5
|
+
import { ReactComponent as u } from "./sd-component-library211.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-library195.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-library212.js";
|
|
4
4
|
import { BaseGridContainer as j } from "./sd-component-library36.js";
|
|
5
|
-
import { BaseFeedbackButton as k } from "./sd-component-
|
|
5
|
+
import { BaseFeedbackButton as k } from "./sd-component-library213.js";
|
|
6
6
|
const C = ({
|
|
7
7
|
questionText: t,
|
|
8
8
|
options: a,
|
|
@@ -2,9 +2,9 @@ import { j as o } from "./sd-component-library195.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-library212.js";
|
|
6
6
|
import { GridContainerV2 as y } from "./sd-component-library39.js";
|
|
7
|
-
import { BaseFeedbackButton as a } from "./sd-component-
|
|
7
|
+
import { BaseFeedbackButton as a } from "./sd-component-library213.js";
|
|
8
8
|
import { FrMaxContainer as x } from "./sd-component-library38.js";
|
|
9
9
|
import { ReactComponent as B } from "./sd-component-library175.js";
|
|
10
10
|
const D = ({
|
|
@@ -1,86 +1,113 @@
|
|
|
1
|
-
import { j as
|
|
2
|
-
import { useState as
|
|
3
|
-
import { Input as
|
|
4
|
-
import { InputContainer as
|
|
5
|
-
import { InvalidInputError as
|
|
6
|
-
const
|
|
7
|
-
const
|
|
1
|
+
import { j as i } from "./sd-component-library195.js";
|
|
2
|
+
import { useState as d, useEffect as g, useCallback as w } from "react";
|
|
3
|
+
import { Input as j } from "@rebass/forms";
|
|
4
|
+
import { InputContainer as v } from "./sd-component-library58.js";
|
|
5
|
+
import { InvalidInputError as I } from "./sd-component-library68.js";
|
|
6
|
+
const V = (t, a, s) => (o) => {
|
|
7
|
+
const n = o.target.value;
|
|
8
8
|
try {
|
|
9
|
-
const r = n
|
|
10
|
-
t(
|
|
9
|
+
const r = s(n);
|
|
10
|
+
t(n), r && a(n);
|
|
11
11
|
} catch (r) {
|
|
12
|
-
if (!(r instanceof
|
|
12
|
+
if (!(r instanceof I))
|
|
13
13
|
throw r;
|
|
14
14
|
}
|
|
15
|
-
},
|
|
15
|
+
}, y = ({
|
|
16
16
|
value: t,
|
|
17
17
|
onChange: a,
|
|
18
|
-
validateValue:
|
|
18
|
+
validateValue: s = () => !0,
|
|
19
19
|
focusInput: o,
|
|
20
|
-
...
|
|
20
|
+
...n
|
|
21
21
|
}) => {
|
|
22
|
-
const [r,
|
|
23
|
-
|
|
24
|
-
t !== void 0 &&
|
|
22
|
+
const [r, l] = d(t);
|
|
23
|
+
g(() => {
|
|
24
|
+
t !== void 0 && l(t);
|
|
25
25
|
}, [t]);
|
|
26
|
-
const
|
|
27
|
-
(
|
|
28
|
-
o && (
|
|
26
|
+
const p = w(
|
|
27
|
+
(e) => {
|
|
28
|
+
o && (e == null || e.focus());
|
|
29
29
|
},
|
|
30
30
|
[o]
|
|
31
31
|
);
|
|
32
|
-
return /* @__PURE__ */
|
|
33
|
-
|
|
32
|
+
return /* @__PURE__ */ i.jsx(
|
|
33
|
+
j,
|
|
34
34
|
{
|
|
35
35
|
variant: "_inputs.textInput.primary",
|
|
36
36
|
p: "14px 0",
|
|
37
|
-
onChange:
|
|
37
|
+
onChange: V(l, a, s),
|
|
38
38
|
value: r,
|
|
39
|
-
...
|
|
40
|
-
ref:
|
|
39
|
+
...n,
|
|
40
|
+
ref: p
|
|
41
41
|
}
|
|
42
42
|
);
|
|
43
|
-
},
|
|
43
|
+
}, m = "16px", D = ({
|
|
44
44
|
value: t,
|
|
45
45
|
onChange: a,
|
|
46
|
-
id:
|
|
46
|
+
id: s,
|
|
47
47
|
disabled: o,
|
|
48
|
-
validateValue:
|
|
48
|
+
validateValue: n,
|
|
49
49
|
onFocus: r,
|
|
50
|
-
onBlur:
|
|
51
|
-
placeholder:
|
|
52
|
-
autoFocus:
|
|
53
|
-
onKeyPress:
|
|
54
|
-
focusInput:
|
|
55
|
-
maxLength:
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
50
|
+
onBlur: l,
|
|
51
|
+
placeholder: p,
|
|
52
|
+
autoFocus: e,
|
|
53
|
+
onKeyPress: x,
|
|
54
|
+
focusInput: f,
|
|
55
|
+
maxLength: h,
|
|
56
|
+
showCheckMark: c,
|
|
57
|
+
...u
|
|
58
|
+
}) => /* @__PURE__ */ i.jsxs(
|
|
59
|
+
v,
|
|
59
60
|
{
|
|
60
|
-
id:
|
|
61
|
+
id: s,
|
|
61
62
|
cursor: o ? "not-allowed" : "pointer",
|
|
62
|
-
...
|
|
63
|
-
children:
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
63
|
+
...u,
|
|
64
|
+
children: [
|
|
65
|
+
/* @__PURE__ */ i.jsx(
|
|
66
|
+
y,
|
|
67
|
+
{
|
|
68
|
+
value: t,
|
|
69
|
+
onChange: a,
|
|
70
|
+
validateValue: n,
|
|
71
|
+
id: s,
|
|
72
|
+
disabled: o,
|
|
73
|
+
placeholder: p,
|
|
74
|
+
onFocus: r,
|
|
75
|
+
onBlur: l,
|
|
76
|
+
autoFocus: e,
|
|
77
|
+
onKeyPress: x,
|
|
78
|
+
focusInput: f,
|
|
79
|
+
maxLength: h,
|
|
80
|
+
pr: c ? m : void 0
|
|
81
|
+
}
|
|
82
|
+
),
|
|
83
|
+
c && /* @__PURE__ */ i.jsx(
|
|
84
|
+
"svg",
|
|
85
|
+
{
|
|
86
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
87
|
+
width: m,
|
|
88
|
+
height: "11.931",
|
|
89
|
+
viewBox: "0 0 16 11.931",
|
|
90
|
+
fill: "#3DEB24",
|
|
91
|
+
style: {
|
|
92
|
+
position: "absolute",
|
|
93
|
+
right: 0,
|
|
94
|
+
bottom: "16px",
|
|
95
|
+
transform: "translateY(-50%)"
|
|
96
|
+
},
|
|
97
|
+
children: /* @__PURE__ */ i.jsx(
|
|
98
|
+
"path",
|
|
99
|
+
{
|
|
100
|
+
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",
|
|
101
|
+
transform: "translate(0 -4.577)"
|
|
102
|
+
}
|
|
103
|
+
)
|
|
104
|
+
}
|
|
105
|
+
)
|
|
106
|
+
]
|
|
80
107
|
}
|
|
81
108
|
);
|
|
82
109
|
export {
|
|
83
|
-
|
|
84
|
-
|
|
110
|
+
y as FormV2Input,
|
|
111
|
+
D as FormV2InputWithContainer
|
|
85
112
|
};
|
|
86
113
|
//# sourceMappingURL=sd-component-library55.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sd-component-library55.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 { 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 const [displayedValue, setDisplayedValue] = useState(value);\n\n useEffect(() => {\n value !== undefined && setDisplayedValue(value);\n }, [value]);\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.textInput.primary\"\n p=\"14px 0\"\n onChange={getOnChangeCallback(setDisplayedValue, onChange, validateValue)}\n value={displayedValue}\n {...props}\n ref={ref}\n />\n );\n};\n\nexport const FormV2InputWithContainer: React.FC<\n Props & InputContainerProps\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 ...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 }}\n />\n </InputContainer>\n);\n"],"names":["getOnChangeCallback","setDisplayedValue","onChange","validateValue","event","newValue","isValid","error","InvalidInputError","FormV2Input","value","focusInput","props","displayedValue","useState","useEffect","ref","useCallback","input","jsx","RebassInput","FormV2InputWithContainer","id","disabled","onFocus","onBlur","placeholder","autoFocus","onKeyPress","maxLength","containerProps","InputContainer"],"mappings":";;;;;AAQA,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,UAAAR;AAAA,EACA,eAAAC,IAAgB,MAAM;AAAA,EACtB,YAAAQ;AAAA,EACA,GAAGC;AACL,MAAM;AACJ,QAAM,CAACC,GAAgBZ,CAAiB,IAAIa,EAASJ,CAAK;AAE1D,EAAAK,EAAU,MAAM;AACJ,IAAAL,MAAA,UAAaT,EAAkBS,CAAK;AAAA,EAAA,GAC7C,CAACA,CAAK,CAAC;AAEV,QAAMM,IAAMC;AAAA,IACV,CAACC,MAAmC;AAClC,MAAAP,MAAcO,KAAA,QAAAA,EAAO;AAAA,IACvB;AAAA,IACA,CAACP,CAAU;AAAA,EAAA;AAIX,SAAAQ,gBAAAA,EAAA;AAAA,IAACC;AAAAA,IAAA;AAAA,MACC,SAAQ;AAAA,MACR,GAAE;AAAA,MACF,UAAUpB,EAAoBC,GAAmBC,GAAUC,CAAa;AAAA,MACxE,OAAOU;AAAA,MACN,GAAGD;AAAA,MACJ,KAAAI;AAAA,IAAA;AAAA,EAAA;AAGN,
|
|
1
|
+
{"version":3,"file":"sd-component-library55.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 { 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 const [displayedValue, setDisplayedValue] = useState(value);\n\n useEffect(() => {\n value !== undefined && setDisplayedValue(value);\n }, [value]);\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.textInput.primary\"\n p=\"14px 0\"\n onChange={getOnChangeCallback(setDisplayedValue, onChange, validateValue)}\n value={displayedValue}\n {...props}\n ref={ref}\n />\n );\n};\n\nconst checkMarkWidth = \"16px\";\n\nexport const FormV2InputWithContainer: React.FC<\n Omit<Props, \"pr\"> & InputContainerProps & { showCheckMark?: boolean }\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 ...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 }}\n pr={showCheckMark ? checkMarkWidth : undefined}\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: 0,\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 </InputContainer>\n);\n"],"names":["getOnChangeCallback","setDisplayedValue","onChange","validateValue","event","newValue","isValid","error","InvalidInputError","FormV2Input","value","focusInput","props","displayedValue","useState","useEffect","ref","useCallback","input","jsx","RebassInput","checkMarkWidth","FormV2InputWithContainer","id","disabled","onFocus","onBlur","placeholder","autoFocus","onKeyPress","maxLength","showCheckMark","containerProps","jsxs","InputContainer"],"mappings":";;;;;AAQA,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,UAAAR;AAAA,EACA,eAAAC,IAAgB,MAAM;AAAA,EACtB,YAAAQ;AAAA,EACA,GAAGC;AACL,MAAM;AACJ,QAAM,CAACC,GAAgBZ,CAAiB,IAAIa,EAASJ,CAAK;AAE1D,EAAAK,EAAU,MAAM;AACJ,IAAAL,MAAA,UAAaT,EAAkBS,CAAK;AAAA,EAAA,GAC7C,CAACA,CAAK,CAAC;AAEV,QAAMM,IAAMC;AAAA,IACV,CAACC,MAAmC;AAClC,MAAAP,MAAcO,KAAA,QAAAA,EAAO;AAAA,IACvB;AAAA,IACA,CAACP,CAAU;AAAA,EAAA;AAIX,SAAAQ,gBAAAA,EAAA;AAAA,IAACC;AAAAA,IAAA;AAAA,MACC,SAAQ;AAAA,MACR,GAAE;AAAA,MACF,UAAUpB,EAAoBC,GAAmBC,GAAUC,CAAa;AAAA,MACxE,OAAOU;AAAA,MACN,GAAGD;AAAA,MACJ,KAAAI;AAAA,IAAA;AAAA,EAAA;AAGN,GAEMK,IAAiB,QAEVC,IAET,CAAC;AAAA,EACH,OAAAZ;AAAA,EACA,UAAAR;AAAA,EACA,IAAAqB;AAAA,EACA,UAAAC;AAAA,EACA,eAAArB;AAAA,EACA,SAAAsB;AAAA,EACA,QAAAC;AAAA,EACA,aAAAC;AAAA,EACA,WAAAC;AAAA,EACA,YAAAC;AAAA,EACA,YAAAlB;AAAA,EACA,WAAAmB;AAAA,EACA,eAAAC;AAAA,EACA,GAAGC;AACL,MACEC,gBAAAA,EAAA;AAAA,EAACC;AAAA,EAAA;AAAA,IACC,IAAAX;AAAA,IACA,QAAQC,IAAW,gBAAgB;AAAA,IAClC,GAAGQ;AAAA,IAEJ,UAAA;AAAA,MAAAb,gBAAAA,EAAA;AAAA,QAACV;AAAA,QAAA;AAAA,UAEG,OAAAC;AAAA,UACA,UAAAR;AAAA,UACA,eAAAC;AAAA,UACA,IAAAoB;AAAA,UACA,UAAAC;AAAA,UACA,aAAAG;AAAA,UACA,SAAAF;AAAA,UACA,QAAAC;AAAA,UACA,WAAAE;AAAA,UACA,YAAAC;AAAA,UACA,YAAAlB;AAAA,UACA,WAAAmB;AAAA,UAEF,IAAIC,IAAgBV,IAAiB;AAAA,QAAA;AAAA,MACvC;AAAA,MAECU,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,OAAO;AAAA,YACP,QAAQ;AAAA,YACR,WAAW;AAAA,UACb;AAAA,UAEA,UAAAF,gBAAAA,EAAA;AAAA,YAAC;AAAA,YAAA;AAAA,cACC,GAAE;AAAA,cACF,WAAU;AAAA,YAAA;AAAA,UACZ;AAAA,QAAA;AAAA,MACF;AAAA,IAAA;AAAA,EAAA;AAEJ;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sd-component-library56.js","sources":["../src/components/forms-v2/form-v2-input/form-v2-number-input.tsx"],"sourcesContent":["import React from \"react\";\n\nimport { InvalidInputError } from \"../../inputs\";\nimport { InputContainerProps } from \"../input-container\";\nimport { FormV2Input, FormV2InputWithContainer } from \"./form-v2-input\";\nimport {
|
|
1
|
+
{"version":3,"file":"sd-component-library56.js","sources":["../src/components/forms-v2/form-v2-input/form-v2-number-input.tsx"],"sourcesContent":["import React from \"react\";\n\nimport { InvalidInputError } from \"../../inputs\";\nimport { InputContainerProps } from \"../input-container\";\nimport { FormV2Input, FormV2InputWithContainer } from \"./form-v2-input\";\nimport {\n FormV2InputProps,\n FormV2NumberInputProps as Props,\n} from \"./interfaces\";\n\nconst getValidatorFunction =\n (min: Props[\"min\"], max: Props[\"max\"], onlyInteger?: Props[\"onlyInteger\"]) =>\n (value: string): boolean => {\n if (\n !new RegExp(\n `^${min && min < 0 ? \"-?\" : \"\"}(\\\\d*${\n onlyInteger ? \"\" : \"(\\\\.\\\\d*)?\"\n })$`,\n \"g\"\n ).exec(value)\n )\n throw new InvalidInputError();\n\n const newValue = +value;\n\n // user hasn't finished negative number or fraction\n if (Number.isNaN(newValue)) return true;\n\n if ((min && newValue < min) || (max && newValue > max))\n throw new InvalidInputError();\n\n return true;\n };\n\nconst transformProps = ({\n value,\n onChange,\n min = 0,\n max = Infinity,\n onlyInteger = false,\n inputMode = \"numeric\",\n ...props\n}: Props): FormV2InputProps => ({\n value: `${value !== 0 ? value ?? \"\" : 1 / value === -Infinity ? \"-0\" : \"0\"}`,\n onChange: (value: string) =>\n onChange(!value.trim() || Number.isNaN(+value) ? undefined : +value),\n validateValue: getValidatorFunction(min, max, onlyInteger),\n inputMode,\n ...props,\n});\n\nexport const FormV2NumberInput: React.FC<Props> = (props) => (\n <FormV2Input {...transformProps(props)} />\n);\n\nexport const FormV2NumberInputWithContainer: React.FC<\n Props & InputContainerProps\n> = (props) => <FormV2InputWithContainer {...transformProps(props)} />;\n"],"names":["getValidatorFunction","min","max","onlyInteger","value","InvalidInputError","newValue","transformProps","onChange","inputMode","props","FormV2NumberInput","jsx","FormV2Input","FormV2NumberInputWithContainer","FormV2InputWithContainer"],"mappings":";;;AAUA,MAAMA,IACJ,CAACC,GAAmBC,GAAmBC,MACvC,CAACC,MAA2B;AAC1B,MACE,CAAC,IAAI;AAAA,IACH,IAAIH,KAAOA,IAAM,IAAI,OAAO,EAAE,QAC5BE,IAAc,KAAK,YACrB;AAAA,IACA;AAAA,EAAA,EACA,KAAKC,CAAK;AAEZ,UAAM,IAAIC,EAAkB;AAE9B,QAAMC,IAAW,CAACF;AAGd,MAAA,OAAO,MAAME,CAAQ;AAAU,WAAA;AAEnC,MAAKL,KAAOK,IAAWL,KAASC,KAAOI,IAAWJ;AAChD,UAAM,IAAIG,EAAkB;AAEvB,SAAA;AACT,GAEIE,IAAiB,CAAC;AAAA,EACtB,OAAAH;AAAA,EACA,UAAAI;AAAA,EACA,KAAAP,IAAM;AAAA,EACN,KAAAC,IAAM;AAAA,EACN,aAAAC,IAAc;AAAA,EACd,WAAAM,IAAY;AAAA,EACZ,GAAGC;AACL,OAAgC;AAAA,EAC9B,OAAO,GAAGN,MAAU,IAAIA,KAAS,KAAK,IAAIA,MAAU,SAAY,OAAO,GAAG;AAAA,EAC1E,UAAU,CAACA,MACTI,EAAS,CAACJ,EAAM,KAAU,KAAA,OAAO,MAAM,CAACA,CAAK,IAAI,SAAY,CAACA,CAAK;AAAA,EACrE,eAAeJ,EAAqBC,GAAKC,GAAKC,CAAW;AAAA,EACzD,WAAAM;AAAA,EACA,GAAGC;AACL,IAEaC,IAAqC,CAACD,MACjDE,gBAAAA,MAACC,KAAa,GAAGN,EAAeG,CAAK,GAAG,GAG7BI,IAET,CAACJ,MAAUE,gBAAAA,EAAA,IAACG,KAA0B,GAAGR,EAAeG,CAAK,EAAG,CAAA;"}
|
|
@@ -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-library9.js";
|
|
6
6
|
import { MaxFrContainer as E } from "./sd-component-library40.js";
|
|
7
|
-
import { ReactComponent as S } from "./sd-component-
|
|
7
|
+
import { ReactComponent as S } from "./sd-component-library200.js";
|
|
8
8
|
const $ = (d) => {
|
|
9
9
|
const {
|
|
10
10
|
header: s,
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { j as n } from "./sd-component-library195.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-library194.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-library39.js";
|
|
7
7
|
import { BaseTextV2 as T } from "./sd-component-library137.js";
|
|
8
8
|
import { HorizontalDivider as B } from "./sd-component-library49.js";
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { j as i } from "./sd-component-library195.js";
|
|
2
2
|
import u from "react";
|
|
3
3
|
import { Flex as R } from "rebass";
|
|
4
|
-
import { CircleButton as a } from "./sd-component-
|
|
5
|
-
import { ReactComponent as _ } from "./sd-component-
|
|
4
|
+
import { CircleButton as a } from "./sd-component-library218.js";
|
|
5
|
+
import { ReactComponent as _ } from "./sd-component-library219.js";
|
|
6
6
|
import { NumberInput as I } from "./sd-component-library71.js";
|
|
7
|
-
import { ReactComponent as M } from "./sd-component-
|
|
7
|
+
import { ReactComponent as M } from "./sd-component-library220.js";
|
|
8
8
|
function m(d, t) {
|
|
9
9
|
return (r, o) => {
|
|
10
10
|
t == null || t(r, o), d(r);
|
|
@@ -2,8 +2,8 @@ import { j as t } from "./sd-component-library195.js";
|
|
|
2
2
|
import { useState as d } from "react";
|
|
3
3
|
import { OutsideClickBox as g } from "./sd-component-library11.js";
|
|
4
4
|
import { SecondaryTextInput as j } from "./sd-component-library77.js";
|
|
5
|
-
import { ReactComponent as v } from "./sd-component-
|
|
6
|
-
import { SearchAutocompleteResultsBox as C } from "./sd-component-
|
|
5
|
+
import { ReactComponent as v } from "./sd-component-library221.js";
|
|
6
|
+
import { SearchAutocompleteResultsBox as C } from "./sd-component-library222.js";
|
|
7
7
|
const F = (s) => {
|
|
8
8
|
const {
|
|
9
9
|
searchValue: r,
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { j as s } from "./sd-component-library195.js";
|
|
2
2
|
import { useState as V } from "react";
|
|
3
3
|
import { useDependantState as q } from "./sd-component-library3.js";
|
|
4
|
-
import { SearchBox as z } from "./sd-component-
|
|
4
|
+
import { SearchBox as z } from "./sd-component-library223.js";
|
|
5
5
|
import { OutsideClickBox as G } from "./sd-component-library11.js";
|
|
6
6
|
import { PrimaryTextInput as H } from "./sd-component-library73.js";
|
|
7
|
-
import { ReactComponent as J } from "./sd-component-
|
|
8
|
-
import { ReactComponent as M } from "./sd-component-
|
|
7
|
+
import { ReactComponent as J } from "./sd-component-library221.js";
|
|
8
|
+
import { ReactComponent as M } from "./sd-component-library224.js";
|
|
9
9
|
function f(i, o, e, t) {
|
|
10
10
|
t == null || t(i, o), e(i);
|
|
11
11
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { j as r } from "./sd-component-library195.js";
|
|
2
2
|
import { Box as p } from "rebass";
|
|
3
3
|
import { PrimaryTextInput as x } from "./sd-component-library73.js";
|
|
4
|
-
import { ReactComponent as m } from "./sd-component-
|
|
4
|
+
import { ReactComponent as m } from "./sd-component-library221.js";
|
|
5
5
|
const j = ({
|
|
6
6
|
placeholder: s = "Enter your Search",
|
|
7
7
|
searchStyle: a,
|
|
@@ -5,7 +5,7 @@ import { useHover as R } from "./sd-component-library3.js";
|
|
|
5
5
|
import { getResponsiveClick as H } from "./sd-component-library4.js";
|
|
6
6
|
import { OutsideClickBox as W } from "./sd-component-library11.js";
|
|
7
7
|
import { ReactComponent as $ } from "./sd-component-library186.js";
|
|
8
|
-
import { ActionBox as A } from "./sd-component-
|
|
8
|
+
import { ActionBox as A } from "./sd-component-library253.js";
|
|
9
9
|
import { FlexCenter as M } from "./sd-component-library35.js";
|
|
10
10
|
import { HorizontalDivider as a } from "./sd-component-library49.js";
|
|
11
11
|
const G = (d) => {
|
|
@@ -2,7 +2,7 @@ import { j as o } from "./sd-component-library195.js";
|
|
|
2
2
|
import { Box as j } from "rebass";
|
|
3
3
|
import { isPDFFlow as g } from "./sd-component-library4.js";
|
|
4
4
|
import { areSegmentsValid as v } from "./sd-component-library246.js";
|
|
5
|
-
import { Segment as w } from "./sd-component-
|
|
5
|
+
import { Segment as w } from "./sd-component-library247.js";
|
|
6
6
|
const E = ({
|
|
7
7
|
segments: x,
|
|
8
8
|
outlineWidth: e = 2,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { j as n } from "./sd-component-library195.js";
|
|
2
2
|
import { areSegmentsValid as h } from "./sd-component-library246.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-library248.js";
|
|
4
|
+
import { CompactDonutGaugeValueIndicator as f } from "./sd-component-library249.js";
|
|
5
5
|
const C = ({
|
|
6
6
|
segments: e,
|
|
7
7
|
size: r = 70,
|