@selfdecode/sd-component-library 4.0.93 → 4.0.95
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-number-input.stories.d.ts +1 -1
- package/lib/components/forms-v2/form-v2-input/interfaces.d.ts +1 -0
- package/lib/components/forms-v2/form-v2-selector/form-v2-selector.stories.d.ts +0 -1
- package/lib/sd-component-library100.js +3 -3
- package/lib/sd-component-library101.js +2 -2
- package/lib/sd-component-library102.js +3 -3
- package/lib/sd-component-library103.js +2 -2
- package/lib/sd-component-library113.js +1 -1
- package/lib/sd-component-library118.js +1 -1
- package/lib/sd-component-library119.js +2 -2
- package/lib/sd-component-library121.js +1 -1
- package/lib/sd-component-library127.js +1 -1
- package/lib/sd-component-library128.js +1 -1
- package/lib/sd-component-library130.js +1 -1
- package/lib/sd-component-library15.js +1 -1
- package/lib/sd-component-library167.js +1 -1
- package/lib/sd-component-library168.js +1 -1
- package/lib/sd-component-library171.js +1 -1
- package/lib/sd-component-library172.js +4 -4
- package/lib/sd-component-library173.js +1 -1
- package/lib/sd-component-library196.js +3 -3
- package/lib/sd-component-library200.js +25 -2
- package/lib/sd-component-library200.js.map +1 -1
- package/lib/sd-component-library201.js +2 -30
- package/lib/sd-component-library201.js.map +1 -1
- package/lib/sd-component-library202.js +21 -590
- package/lib/sd-component-library202.js.map +1 -1
- package/lib/sd-component-library203.js +599 -57
- package/lib/sd-component-library203.js.map +1 -1
- package/lib/sd-component-library204.js +14 -20
- package/lib/sd-component-library204.js.map +1 -1
- package/lib/sd-component-library205.js +5 -19
- package/lib/sd-component-library205.js.map +1 -1
- package/lib/sd-component-library206.js +3 -3
- package/lib/sd-component-library206.js.map +1 -1
- package/lib/sd-component-library207.js +57 -5
- package/lib/sd-component-library207.js.map +1 -1
- package/lib/sd-component-library210.js +21 -3
- package/lib/sd-component-library210.js.map +1 -1
- package/lib/sd-component-library211.js +3 -21
- package/lib/sd-component-library211.js.map +1 -1
- package/lib/sd-component-library212.js +1 -1
- package/lib/sd-component-library212.js.map +1 -1
- package/lib/sd-component-library213.js +64 -3
- package/lib/sd-component-library213.js.map +1 -1
- package/lib/sd-component-library214.js +19 -60
- package/lib/sd-component-library214.js.map +1 -1
- package/lib/sd-component-library215.js +37 -20
- package/lib/sd-component-library215.js.map +1 -1
- package/lib/sd-component-library216.js +127 -38
- package/lib/sd-component-library216.js.map +1 -1
- package/lib/sd-component-library217.js +13 -129
- package/lib/sd-component-library217.js.map +1 -1
- package/lib/sd-component-library218.js +14 -13
- package/lib/sd-component-library218.js.map +1 -1
- package/lib/sd-component-library219.js +3 -14
- package/lib/sd-component-library219.js.map +1 -1
- package/lib/sd-component-library220.js +2 -2
- package/lib/sd-component-library220.js.map +1 -1
- package/lib/sd-component-library221.js +2 -2
- 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 +54 -41
- package/lib/sd-component-library223.js.map +1 -1
- package/lib/sd-component-library224.js +3 -65
- package/lib/sd-component-library224.js.map +1 -1
- package/lib/sd-component-library225.js +46 -3
- package/lib/sd-component-library225.js.map +1 -1
- package/lib/sd-component-library226.js +17 -46
- package/lib/sd-component-library226.js.map +1 -1
- package/lib/sd-component-library227.js +26 -17
- package/lib/sd-component-library227.js.map +1 -1
- package/lib/sd-component-library228.js +3 -26
- package/lib/sd-component-library228.js.map +1 -1
- package/lib/sd-component-library23.js +2 -2
- package/lib/sd-component-library231.js +3 -3
- package/lib/sd-component-library233.js +1 -1
- package/lib/sd-component-library234.js +1 -1
- package/lib/sd-component-library235.js +21 -3
- package/lib/sd-component-library235.js.map +1 -1
- package/lib/sd-component-library236.js +94 -114
- package/lib/sd-component-library236.js.map +1 -1
- package/lib/sd-component-library238.js +39 -39
- package/lib/sd-component-library238.js.map +1 -1
- package/lib/sd-component-library239.js +23 -7
- package/lib/sd-component-library239.js.map +1 -1
- package/lib/sd-component-library24.js +2 -2
- package/lib/sd-component-library240.js +51 -62
- package/lib/sd-component-library240.js.map +1 -1
- package/lib/sd-component-library241.js +62 -41
- package/lib/sd-component-library241.js.map +1 -1
- package/lib/sd-component-library242.js +43 -13
- package/lib/sd-component-library242.js.map +1 -1
- package/lib/sd-component-library243.js +13 -21
- package/lib/sd-component-library243.js.map +1 -1
- package/lib/sd-component-library244.js +114 -94
- package/lib/sd-component-library244.js.map +1 -1
- package/lib/sd-component-library245.js +39 -39
- package/lib/sd-component-library245.js.map +1 -1
- package/lib/sd-component-library246.js +7 -23
- package/lib/sd-component-library246.js.map +1 -1
- package/lib/sd-component-library247.js +47 -52
- package/lib/sd-component-library247.js.map +1 -1
- package/lib/sd-component-library248.js +39 -46
- package/lib/sd-component-library248.js.map +1 -1
- package/lib/sd-component-library249.js +26 -74
- package/lib/sd-component-library249.js.map +1 -1
- package/lib/sd-component-library25.js +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 +323 -19
- package/lib/sd-component-library252.js.map +1 -1
- package/lib/sd-component-library253.js +5 -20
- package/lib/sd-component-library253.js.map +1 -1
- package/lib/sd-component-library254.js +3 -2
- package/lib/sd-component-library254.js.map +1 -1
- package/lib/sd-component-library255.js +2 -325
- package/lib/sd-component-library255.js.map +1 -1
- package/lib/sd-component-library256.js +75 -5
- package/lib/sd-component-library256.js.map +1 -1
- package/lib/sd-component-library263.js +51 -30
- package/lib/sd-component-library263.js.map +1 -1
- package/lib/sd-component-library264.js +30 -51
- package/lib/sd-component-library264.js.map +1 -1
- package/lib/sd-component-library265.js +1 -1
- package/lib/sd-component-library274.js +9 -49
- package/lib/sd-component-library274.js.map +1 -1
- package/lib/sd-component-library275.js +51 -9
- package/lib/sd-component-library275.js.map +1 -1
- package/lib/sd-component-library276.js +90 -2
- package/lib/sd-component-library276.js.map +1 -1
- package/lib/sd-component-library277.js +92 -2
- package/lib/sd-component-library277.js.map +1 -1
- package/lib/sd-component-library278.js +49 -51
- package/lib/sd-component-library278.js.map +1 -1
- package/lib/sd-component-library279.js +2 -90
- 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-library290.js +4 -4
- package/lib/sd-component-library291.js +3 -2
- package/lib/sd-component-library291.js.map +1 -1
- package/lib/sd-component-library292.js +3 -8
- package/lib/sd-component-library292.js.map +1 -1
- package/lib/sd-component-library293.js +3 -328
- package/lib/sd-component-library293.js.map +1 -1
- package/lib/sd-component-library294.js +2 -51
- package/lib/sd-component-library294.js.map +1 -1
- package/lib/sd-component-library295.js +8 -3
- package/lib/sd-component-library295.js.map +1 -1
- package/lib/sd-component-library296.js +328 -3
- package/lib/sd-component-library296.js.map +1 -1
- package/lib/sd-component-library297.js +51 -3
- package/lib/sd-component-library297.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-library316.js +47 -89
- package/lib/sd-component-library316.js.map +1 -1
- package/lib/sd-component-library5.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-library57.js +26 -23
- package/lib/sd-component-library57.js.map +1 -1
- package/lib/sd-component-library58.js +17 -17
- package/lib/sd-component-library58.js.map +1 -1
- package/lib/sd-component-library59.js +41 -34
- package/lib/sd-component-library59.js.map +1 -1
- package/lib/sd-component-library6.js +1 -1
- package/lib/sd-component-library61.js +1 -1
- package/lib/sd-component-library65.js +1 -1
- package/lib/sd-component-library66.js +1 -1
- package/lib/sd-component-library71.js +2 -2
- package/lib/sd-component-library73.js +3 -3
- package/lib/sd-component-library75.js +2 -2
- package/lib/sd-component-library76.js +3 -3
- package/lib/sd-component-library77.js +1 -1
- package/lib/sd-component-library78.js +1 -1
- package/lib/sd-component-library80.js +1 -1
- package/lib/sd-component-library81.js +1 -1
- package/lib/sd-component-library86.js +1 -1
- package/lib/sd-component-library89.js +1 -1
- package/lib/sd-component-library90.js +3 -3
- package/lib/sd-component-library93.js +3 -3
- package/lib/sd-component-library95.js +5 -5
- package/lib/sd-component-library99.js +2 -2
- package/package.json +1 -1
|
@@ -1,6 +1,54 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
1
|
+
import { __require as u } from "./sd-component-library302.js";
|
|
2
|
+
var o, p;
|
|
3
|
+
function g() {
|
|
4
|
+
if (p)
|
|
5
|
+
return o;
|
|
6
|
+
p = 1;
|
|
7
|
+
var c = u();
|
|
8
|
+
function n() {
|
|
9
|
+
}
|
|
10
|
+
function i() {
|
|
11
|
+
}
|
|
12
|
+
return i.resetWarningCache = n, o = function() {
|
|
13
|
+
function e(h, y, m, f, l, s) {
|
|
14
|
+
if (s !== c) {
|
|
15
|
+
var a = new Error(
|
|
16
|
+
"Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types"
|
|
17
|
+
);
|
|
18
|
+
throw a.name = "Invariant Violation", a;
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
e.isRequired = e;
|
|
22
|
+
function r() {
|
|
23
|
+
return e;
|
|
24
|
+
}
|
|
25
|
+
var t = {
|
|
26
|
+
array: e,
|
|
27
|
+
bigint: e,
|
|
28
|
+
bool: e,
|
|
29
|
+
func: e,
|
|
30
|
+
number: e,
|
|
31
|
+
object: e,
|
|
32
|
+
string: e,
|
|
33
|
+
symbol: e,
|
|
34
|
+
any: e,
|
|
35
|
+
arrayOf: r,
|
|
36
|
+
element: e,
|
|
37
|
+
elementType: e,
|
|
38
|
+
instanceOf: r,
|
|
39
|
+
node: e,
|
|
40
|
+
objectOf: r,
|
|
41
|
+
oneOf: r,
|
|
42
|
+
oneOfType: r,
|
|
43
|
+
shape: r,
|
|
44
|
+
exact: r,
|
|
45
|
+
checkPropTypes: i,
|
|
46
|
+
resetWarningCache: n
|
|
47
|
+
};
|
|
48
|
+
return t.PropTypes = t, t;
|
|
49
|
+
}, o;
|
|
50
|
+
}
|
|
3
51
|
export {
|
|
4
|
-
|
|
52
|
+
g as __require
|
|
5
53
|
};
|
|
6
54
|
//# sourceMappingURL=sd-component-library297.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sd-component-library297.js","sources":["../
|
|
1
|
+
{"version":3,"file":"sd-component-library297.js","sources":["../node_modules/prop-types/factoryWithThrowingShims.js"],"sourcesContent":["/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n'use strict';\n\nvar ReactPropTypesSecret = require('./lib/ReactPropTypesSecret');\n\nfunction emptyFunction() {}\nfunction emptyFunctionWithReset() {}\nemptyFunctionWithReset.resetWarningCache = emptyFunction;\n\nmodule.exports = function() {\n function shim(props, propName, componentName, location, propFullName, secret) {\n if (secret === ReactPropTypesSecret) {\n // It is still safe when called from React.\n return;\n }\n var err = new Error(\n 'Calling PropTypes validators directly is not supported by the `prop-types` package. ' +\n 'Use PropTypes.checkPropTypes() to call them. ' +\n 'Read more at http://fb.me/use-check-prop-types'\n );\n err.name = 'Invariant Violation';\n throw err;\n };\n shim.isRequired = shim;\n function getShim() {\n return shim;\n };\n // Important!\n // Keep this list in sync with production version in `./factoryWithTypeCheckers.js`.\n var ReactPropTypes = {\n array: shim,\n bigint: shim,\n bool: shim,\n func: shim,\n number: shim,\n object: shim,\n string: shim,\n symbol: shim,\n\n any: shim,\n arrayOf: getShim,\n element: shim,\n elementType: shim,\n instanceOf: getShim,\n node: shim,\n objectOf: getShim,\n oneOf: getShim,\n oneOfType: getShim,\n shape: getShim,\n exact: getShim,\n\n checkPropTypes: emptyFunctionWithReset,\n resetWarningCache: emptyFunction\n };\n\n ReactPropTypes.PropTypes = ReactPropTypes;\n\n return ReactPropTypes;\n};\n"],"names":["ReactPropTypesSecret","require$$0","emptyFunction","emptyFunctionWithReset","factoryWithThrowingShims","shim","props","propName","componentName","location","propFullName","secret","err","getShim","ReactPropTypes"],"mappings":";;;;;;AASA,MAAIA,IAAuBC;AAE3B,WAASC,IAAgB;AAAA,EAAE;AAC3B,WAASC,IAAyB;AAAA,EAAE;AACpC,SAAAA,EAAuB,oBAAoBD,GAE3CE,IAAiB,WAAW;AAC1B,aAASC,EAAKC,GAAOC,GAAUC,GAAeC,GAAUC,GAAcC,GAAQ;AAC5E,UAAIA,MAAWX,GAIf;AAAA,YAAIY,IAAM,IAAI;AAAA,UACZ;AAAA,QAGN;AACI,cAAAA,EAAI,OAAO,uBACLA;AAAA;AAAA,IACV;AACE,IAAAP,EAAK,aAAaA;AAClB,aAASQ,IAAU;AACjB,aAAOR;AAAA,IAEX;AAEE,QAAIS,IAAiB;AAAA,MACnB,OAAOT;AAAA,MACP,QAAQA;AAAA,MACR,MAAMA;AAAA,MACN,MAAMA;AAAA,MACN,QAAQA;AAAA,MACR,QAAQA;AAAA,MACR,QAAQA;AAAA,MACR,QAAQA;AAAA,MAER,KAAKA;AAAA,MACL,SAASQ;AAAA,MACT,SAASR;AAAA,MACT,aAAaA;AAAA,MACb,YAAYQ;AAAA,MACZ,MAAMR;AAAA,MACN,UAAUQ;AAAA,MACV,OAAOA;AAAA,MACP,WAAWA;AAAA,MACX,OAAOA;AAAA,MACP,OAAOA;AAAA,MAEP,gBAAgBV;AAAA,MAChB,mBAAmBD;AAAA,IACvB;AAEE,WAAAY,EAAe,YAAYA,GAEpBA;AAAA;;","x_google_ignoreList":[0]}
|
|
@@ -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-library196.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-library92.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
|
|
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;"}
|
|
@@ -1,96 +1,54 @@
|
|
|
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
|
-
|
|
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
|
|
1
|
+
import { j as t } from "./sd-component-library196.js";
|
|
2
|
+
import x from "react";
|
|
3
|
+
import u from "./sd-component-library195.js";
|
|
4
|
+
import { getIsHorizontal as j, getRangeProperties as p } from "./sd-component-library232.js";
|
|
5
|
+
import { OutlineMeterRange as M } from "./sd-component-library244.js";
|
|
6
|
+
import { LabelPointer as b } from "./sd-component-library326.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
|
|
34
27
|
);
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
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,
|
|
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,
|
|
59
40
|
{
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
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
|
-
)
|
|
41
|
+
...e,
|
|
42
|
+
radius: R,
|
|
43
|
+
color: u.colors.cl_lightGrey,
|
|
44
|
+
alpha: h,
|
|
45
|
+
horizontal: j(e)
|
|
88
46
|
}
|
|
89
47
|
)
|
|
90
|
-
}
|
|
91
|
-
|
|
92
|
-
|
|
48
|
+
] });
|
|
49
|
+
}
|
|
50
|
+
);
|
|
93
51
|
export {
|
|
94
|
-
|
|
52
|
+
A as SmileyMeterRange
|
|
95
53
|
};
|
|
96
54
|
//# sourceMappingURL=sd-component-library316.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sd-component-library316.js","sources":["../src/components/meters/
|
|
1
|
+
{"version":3,"file":"sd-component-library316.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;"}
|
|
@@ -2,7 +2,7 @@ import { j as e } from "./sd-component-library196.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-library254.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-library196.js";
|
|
2
|
-
import { BaseBooleanFeedback as m } from "./sd-component-
|
|
2
|
+
import { BaseBooleanFeedback as m } from "./sd-component-library210.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-library211.js";
|
|
5
|
+
import { ReactComponent as u } from "./sd-component-library212.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-library196.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-library213.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-library214.js";
|
|
6
6
|
const C = ({
|
|
7
7
|
questionText: t,
|
|
8
8
|
options: a,
|
|
@@ -2,9 +2,9 @@ import { j as o } from "./sd-component-library196.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-library213.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-library214.js";
|
|
8
8
|
import { FrMaxContainer as x } from "./sd-component-library38.js";
|
|
9
9
|
import { ReactComponent as B } from "./sd-component-library176.js";
|
|
10
10
|
const D = ({
|
|
@@ -1,35 +1,38 @@
|
|
|
1
|
-
import { j as
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
|
|
1
|
+
import { j as p } from "./sd-component-library196.js";
|
|
2
|
+
import { isInteger as N } from "lodash-es";
|
|
3
|
+
import { FormV2Input as a, FormV2InputWithContainer as c } from "./sd-component-library56.js";
|
|
4
|
+
import { InvalidInputError as u } from "./sd-component-library69.js";
|
|
5
|
+
const d = (r, n, s, t) => (i) => {
|
|
6
|
+
const e = N(t) && t >= 1 ? t : void 0;
|
|
5
7
|
if (!new RegExp(
|
|
6
|
-
`^${r && r < 0 ? "-?" : ""}(\\d*${
|
|
8
|
+
`^${r && r < 0 ? "-?" : ""}(\\d*${s ? "" : `(\\.\\d${e ? `{0,${e}}` : "*"})?`})$`,
|
|
7
9
|
"g"
|
|
8
|
-
).exec(
|
|
9
|
-
throw new
|
|
10
|
-
const
|
|
11
|
-
if (Number.isNaN(
|
|
10
|
+
).exec(i))
|
|
11
|
+
throw new u();
|
|
12
|
+
const o = +i;
|
|
13
|
+
if (Number.isNaN(o))
|
|
12
14
|
return !0;
|
|
13
|
-
if (r &&
|
|
14
|
-
throw new
|
|
15
|
+
if (r && o < r || n && o > n)
|
|
16
|
+
throw new u();
|
|
15
17
|
return !0;
|
|
16
|
-
},
|
|
18
|
+
}, f = ({
|
|
17
19
|
value: r,
|
|
18
20
|
onChange: n,
|
|
19
|
-
min:
|
|
20
|
-
max:
|
|
21
|
-
onlyInteger:
|
|
22
|
-
inputMode:
|
|
23
|
-
|
|
21
|
+
min: s = 0,
|
|
22
|
+
max: t = 1 / 0,
|
|
23
|
+
onlyInteger: i = !1,
|
|
24
|
+
inputMode: e = "numeric",
|
|
25
|
+
maxDecimalPlaces: o,
|
|
26
|
+
...I
|
|
24
27
|
}) => ({
|
|
25
28
|
value: `${r !== 0 ? r ?? "" : 1 / r === -1 / 0 ? "-0" : "0"}`,
|
|
26
|
-
onChange: (
|
|
27
|
-
validateValue:
|
|
28
|
-
inputMode:
|
|
29
|
-
...
|
|
30
|
-
}),
|
|
29
|
+
onChange: (m) => n(!m.trim() || Number.isNaN(+m) ? void 0 : +m),
|
|
30
|
+
validateValue: d(s, t, i, o),
|
|
31
|
+
inputMode: e,
|
|
32
|
+
...I
|
|
33
|
+
}), h = (r) => /* @__PURE__ */ p.jsx(a, { ...f(r) }), x = (r) => /* @__PURE__ */ p.jsx(c, { ...f(r) });
|
|
31
34
|
export {
|
|
32
|
-
|
|
35
|
+
h as FormV2NumberInput,
|
|
33
36
|
x as FormV2NumberInputWithContainer
|
|
34
37
|
};
|
|
35
38
|
//# 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-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\"]
|
|
1
|
+
{"version":3,"file":"sd-component-library57.js","sources":["../src/components/forms-v2/form-v2-input/form-v2-number-input.tsx"],"sourcesContent":["import React from \"react\";\n\nimport { isInteger } from \"lodash-es\";\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 (\n min: Props[\"min\"],\n max: Props[\"max\"],\n onlyInteger?: Props[\"onlyInteger\"],\n maxDecimalPlaces?: Props[\"maxDecimalPlaces\"]\n ) =>\n (value: string): boolean => {\n const maxDecimalPlacesLimit =\n isInteger(maxDecimalPlaces) && maxDecimalPlaces! >= 1\n ? maxDecimalPlaces\n : undefined;\n\n if (\n !new RegExp(\n `^${min && min < 0 ? \"-?\" : \"\"}(\\\\d*${\n onlyInteger\n ? \"\"\n : `(\\\\.\\\\d${\n maxDecimalPlacesLimit ? `\\{0,${maxDecimalPlacesLimit}\\}` : \"*\"\n })?`\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 maxDecimalPlaces,\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, maxDecimalPlaces),\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","maxDecimalPlaces","value","maxDecimalPlacesLimit","isInteger","InvalidInputError","newValue","transformProps","onChange","inputMode","props","FormV2NumberInput","jsx","FormV2Input","FormV2NumberInputWithContainer","FormV2InputWithContainer"],"mappings":";;;;AAYA,MAAMA,IACJ,CACEC,GACAC,GACAC,GACAC,MAEF,CAACC,MAA2B;AAC1B,QAAMC,IACJC,EAAUH,CAAgB,KAAKA,KAAqB,IAChDA,IACA;AAEN,MACE,CAAC,IAAI;AAAA,IACH,IAAIH,KAAOA,IAAM,IAAI,OAAO,EAAE,QAC5BE,IACI,KACA,UACEG,IAAwB,MAAOA,CAAqB,MAAO,GAC7D,IACN;AAAA,IACA;AAAA,EAAA,EACA,KAAKD,CAAK;AAEZ,UAAM,IAAIG,EAAkB;AAE9B,QAAMC,IAAW,CAACJ;AAGd,MAAA,OAAO,MAAMI,CAAQ;AAAU,WAAA;AAEnC,MAAKR,KAAOQ,IAAWR,KAASC,KAAOO,IAAWP;AAChD,UAAM,IAAIM,EAAkB;AAEvB,SAAA;AACT,GAEIE,IAAiB,CAAC;AAAA,EACtB,OAAAL;AAAA,EACA,UAAAM;AAAA,EACA,KAAAV,IAAM;AAAA,EACN,KAAAC,IAAM;AAAA,EACN,aAAAC,IAAc;AAAA,EACd,WAAAS,IAAY;AAAA,EACZ,kBAAAR;AAAA,EACA,GAAGS;AACL,OAAgC;AAAA,EAC9B,OAAO,GAAGR,MAAU,IAAIA,KAAS,KAAK,IAAIA,MAAU,SAAY,OAAO,GAAG;AAAA,EAC1E,UAAU,CAACA,MACTM,EAAS,CAACN,EAAM,KAAU,KAAA,OAAO,MAAM,CAACA,CAAK,IAAI,SAAY,CAACA,CAAK;AAAA,EACrE,eAAeL,EAAqBC,GAAKC,GAAKC,GAAaC,CAAgB;AAAA,EAC3E,WAAAQ;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;"}
|