@selfdecode/sd-component-library 4.0.101 → 4.0.103
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/inputs/autocomplete-input/interfaces.d.ts +1 -1
- package/lib/components/inputs/date-inputs/primary-date-input/interfaces.d.ts +5 -4
- 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-library15.js +1 -1
- package/lib/sd-component-library168.js +1 -1
- package/lib/sd-component-library206.js +56 -18
- package/lib/sd-component-library206.js.map +1 -1
- package/lib/sd-component-library207.js +19 -5
- package/lib/sd-component-library207.js.map +1 -1
- package/lib/sd-component-library208.js +3 -3
- package/lib/sd-component-library208.js.map +1 -1
- package/lib/sd-component-library209.js +5 -57
- package/lib/sd-component-library209.js.map +1 -1
- package/lib/sd-component-library219.js +14 -3
- package/lib/sd-component-library219.js.map +1 -1
- package/lib/sd-component-library220.js +3 -52
- package/lib/sd-component-library220.js.map +1 -1
- package/lib/sd-component-library221.js +3 -14
- package/lib/sd-component-library221.js.map +1 -1
- package/lib/sd-component-library222.js +2 -2
- package/lib/sd-component-library222.js.map +1 -1
- package/lib/sd-component-library223.js +52 -3
- package/lib/sd-component-library223.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-library229.js +31 -3
- package/lib/sd-component-library229.js.map +1 -1
- package/lib/sd-component-library23.js +2 -2
- package/lib/sd-component-library230.js +19 -31
- package/lib/sd-component-library230.js.map +1 -1
- package/lib/sd-component-library231.js +20 -19
- package/lib/sd-component-library231.js.map +1 -1
- package/lib/sd-component-library232.js +28 -20
- package/lib/sd-component-library232.js.map +1 -1
- package/lib/sd-component-library233.js +32 -27
- package/lib/sd-component-library233.js.map +1 -1
- package/lib/sd-component-library234.js +3 -33
- package/lib/sd-component-library234.js.map +1 -1
- package/lib/sd-component-library235.js +129 -3
- package/lib/sd-component-library235.js.map +1 -1
- package/lib/sd-component-library236.js +43 -129
- package/lib/sd-component-library236.js.map +1 -1
- package/lib/sd-component-library237.js +45 -41
- package/lib/sd-component-library237.js.map +1 -1
- package/lib/sd-component-library238.js +7 -46
- package/lib/sd-component-library238.js.map +1 -1
- package/lib/sd-component-library239.js +64 -8
- package/lib/sd-component-library239.js.map +1 -1
- package/lib/sd-component-library24.js +2 -2
- package/lib/sd-component-library240.js +41 -62
- package/lib/sd-component-library240.js.map +1 -1
- package/lib/sd-component-library241.js +13 -43
- package/lib/sd-component-library241.js.map +1 -1
- package/lib/sd-component-library242.js +21 -13
- package/lib/sd-component-library242.js.map +1 -1
- package/lib/sd-component-library243.js +109 -21
- package/lib/sd-component-library243.js.map +1 -1
- package/lib/sd-component-library244.js +44 -106
- package/lib/sd-component-library244.js.map +1 -1
- package/lib/sd-component-library245.js +23 -46
- package/lib/sd-component-library245.js.map +1 -1
- package/lib/sd-component-library246.js +52 -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 +73 -46
- package/lib/sd-component-library248.js.map +1 -1
- package/lib/sd-component-library249.js +26 -60
- package/lib/sd-component-library249.js.map +1 -1
- package/lib/sd-component-library250.js +27 -41
- package/lib/sd-component-library250.js.map +1 -1
- package/lib/sd-component-library251.js +21 -27
- package/lib/sd-component-library251.js.map +1 -1
- package/lib/sd-component-library252.js +19 -20
- package/lib/sd-component-library252.js.map +1 -1
- package/lib/sd-component-library253.js +2 -20
- package/lib/sd-component-library253.js.map +1 -1
- package/lib/sd-component-library254.js +26 -2
- package/lib/sd-component-library254.js.map +1 -1
- package/lib/sd-component-library281.js +10 -2
- package/lib/sd-component-library281.js.map +1 -1
- package/lib/sd-component-library282.js +2 -2
- package/lib/sd-component-library283.js +2 -70
- package/lib/sd-component-library283.js.map +1 -1
- package/lib/sd-component-library284.js +69 -101
- package/lib/sd-component-library284.js.map +1 -1
- package/lib/sd-component-library285.js +91 -95
- package/lib/sd-component-library285.js.map +1 -1
- package/lib/sd-component-library286.js +106 -10
- package/lib/sd-component-library286.js.map +1 -1
- package/lib/sd-component-library315.js +47 -89
- package/lib/sd-component-library315.js.map +1 -1
- package/lib/sd-component-library316.js +34 -50
- package/lib/sd-component-library316.js.map +1 -1
- package/lib/sd-component-library317.js +23 -33
- package/lib/sd-component-library317.js.map +1 -1
- package/lib/sd-component-library318.js +88 -20
- package/lib/sd-component-library318.js.map +1 -1
- package/lib/sd-component-library322.js +1 -1
- package/lib/sd-component-library61.js +37 -35
- package/lib/sd-component-library61.js.map +1 -1
- package/lib/sd-component-library62.js +1 -1
- package/lib/sd-component-library63.js +4 -4
- package/lib/sd-component-library64.js +1 -1
- package/lib/sd-component-library65.js +1 -1
- package/lib/sd-component-library66.js +26 -24
- package/lib/sd-component-library66.js.map +1 -1
- package/lib/sd-component-library73.js +3 -3
- package/lib/sd-component-library75.js +2 -2
- package/lib/sd-component-library76.js +1 -1
- package/lib/sd-component-library80.js +1 -1
- package/lib/sd-component-library86.js +1 -1
- package/lib/sd-component-library87.js +6 -6
- package/lib/sd-component-library88.js +2 -2
- package/lib/sd-component-library89.js +1 -1
- package/lib/sd-component-library90.js +5 -5
- package/lib/sd-component-library91.js +1 -1
- package/lib/sd-component-library93.js +6 -6
- package/lib/sd-component-library94.js +1 -1
- package/lib/sd-component-library95.js +7 -7
- package/lib/sd-component-library96.js +1 -1
- package/lib/sd-component-library99.js +2 -2
- package/package.json +2 -2
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sd-component-library318.js","sources":["../src/components/meters/outline-meter
|
|
1
|
+
{"version":3,"file":"sd-component-library318.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,G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AAC;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,5 +1,5 @@
|
|
|
1
1
|
import { j as e } from "./sd-component-library197.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-library145.js";
|
|
4
4
|
import { FourteenSb as p } from "./sd-component-library146.js";
|
|
5
5
|
import { BaseGridContainer as i } from "./sd-component-library36.js";
|
|
@@ -1,51 +1,52 @@
|
|
|
1
1
|
import { j as p } from "./sd-component-library197.js";
|
|
2
|
-
import { useState as d, useRef as
|
|
3
|
-
import { Box as
|
|
4
|
-
import { useOnClickOutside as
|
|
5
|
-
import { SecondaryTextInput as
|
|
6
|
-
import { ResultsBox as
|
|
7
|
-
function
|
|
2
|
+
import { useState as d, useRef as w, useCallback as I, useMemo as L } from "react";
|
|
3
|
+
import { Box as V } from "rebass";
|
|
4
|
+
import { useOnClickOutside as _ } from "./sd-component-library3.js";
|
|
5
|
+
import { SecondaryTextInput as $ } from "./sd-component-library78.js";
|
|
6
|
+
import { ResultsBox as A } from "./sd-component-library216.js";
|
|
7
|
+
function P(i, l, a) {
|
|
8
8
|
const o = (c) => {
|
|
9
|
-
const t = c.toLowerCase().indexOf(
|
|
9
|
+
const t = c.toLowerCase().indexOf(a.toLowerCase());
|
|
10
10
|
return t === -1 ? Number.POSITIVE_INFINITY : t;
|
|
11
11
|
};
|
|
12
|
-
return o(i) - o(
|
|
12
|
+
return o(i) - o(l);
|
|
13
13
|
}
|
|
14
|
-
function
|
|
14
|
+
function H(i) {
|
|
15
15
|
const {
|
|
16
|
-
label:
|
|
17
|
-
placeholder:
|
|
16
|
+
label: l,
|
|
17
|
+
placeholder: a,
|
|
18
18
|
options: o,
|
|
19
19
|
width: c,
|
|
20
20
|
onSelect: t,
|
|
21
21
|
errorMessage: x,
|
|
22
22
|
hideErrorText: R,
|
|
23
|
-
onSearch:
|
|
23
|
+
onSearch: b,
|
|
24
24
|
initialValue: h = "",
|
|
25
25
|
onFocus: m,
|
|
26
|
-
errorBackground:
|
|
26
|
+
errorBackground: O,
|
|
27
27
|
focusInput: j,
|
|
28
28
|
autoFocus: T = !1,
|
|
29
|
-
translateContent: k = !0
|
|
29
|
+
translateContent: k = !0,
|
|
30
|
+
labelSx: v
|
|
30
31
|
} = i, [s, g] = d(h), [f, y] = d(
|
|
31
32
|
() => !!h
|
|
32
|
-
), [
|
|
33
|
-
|
|
34
|
-
}, []),
|
|
35
|
-
|
|
33
|
+
), [B, S] = d(!0), C = w(null), M = I(() => {
|
|
34
|
+
S(!1);
|
|
35
|
+
}, []), E = (e) => {
|
|
36
|
+
S(!0), m == null || m(e);
|
|
36
37
|
};
|
|
37
|
-
|
|
38
|
-
const u =
|
|
38
|
+
_(C, M);
|
|
39
|
+
const u = L(() => {
|
|
39
40
|
if (s && !f)
|
|
40
41
|
return o.map((e) => ({
|
|
41
42
|
...e,
|
|
42
|
-
synonyms: e.synonyms.sort((n, r) =>
|
|
43
|
+
synonyms: e.synonyms.sort((n, r) => P(n, r, s))
|
|
43
44
|
}));
|
|
44
|
-
}, [s, o, f]),
|
|
45
|
+
}, [s, o, f]), F = I(
|
|
45
46
|
(e) => {
|
|
46
47
|
g(e);
|
|
47
48
|
const n = u.find(
|
|
48
|
-
(r) => !!r.synonyms.find((
|
|
49
|
+
(r) => !!r.synonyms.find((N) => N === e)
|
|
49
50
|
);
|
|
50
51
|
t == null || t(
|
|
51
52
|
n.value,
|
|
@@ -55,36 +56,37 @@ function G(i) {
|
|
|
55
56
|
[t, u]
|
|
56
57
|
);
|
|
57
58
|
return /* @__PURE__ */ p.jsxs(
|
|
58
|
-
|
|
59
|
+
V,
|
|
59
60
|
{
|
|
60
61
|
sx: { position: "relative", bg: "inherit", width: c },
|
|
61
|
-
ref:
|
|
62
|
+
ref: C,
|
|
62
63
|
"data-test": "autocomplete-input",
|
|
63
64
|
children: [
|
|
64
65
|
/* @__PURE__ */ p.jsx(
|
|
65
|
-
|
|
66
|
+
$,
|
|
66
67
|
{
|
|
67
68
|
onChange: (e, n) => {
|
|
68
|
-
f && (t(null), y(!1)), g(`${e}`),
|
|
69
|
+
f && (t(null), y(!1)), g(`${e}`), b(`${e}`);
|
|
69
70
|
},
|
|
70
71
|
value: s,
|
|
71
|
-
label:
|
|
72
|
-
placeholder:
|
|
72
|
+
label: l,
|
|
73
|
+
placeholder: a,
|
|
73
74
|
labelMargin: ["0"],
|
|
75
|
+
labelSx: v,
|
|
74
76
|
errorMessage: x || void 0,
|
|
75
77
|
hideErrorText: R,
|
|
76
|
-
onFocus:
|
|
78
|
+
onFocus: E,
|
|
77
79
|
focusInput: j,
|
|
78
80
|
autoFocus: T,
|
|
79
|
-
errorBackground:
|
|
81
|
+
errorBackground: O
|
|
80
82
|
}
|
|
81
83
|
),
|
|
82
|
-
u &&
|
|
83
|
-
|
|
84
|
+
u && B && /* @__PURE__ */ p.jsx(
|
|
85
|
+
A,
|
|
84
86
|
{
|
|
85
87
|
value: s,
|
|
86
88
|
results: u,
|
|
87
|
-
onSelect:
|
|
89
|
+
onSelect: F,
|
|
88
90
|
translateContent: k
|
|
89
91
|
}
|
|
90
92
|
)
|
|
@@ -93,6 +95,6 @@ function G(i) {
|
|
|
93
95
|
);
|
|
94
96
|
}
|
|
95
97
|
export {
|
|
96
|
-
|
|
98
|
+
H as AutocompleteInput
|
|
97
99
|
};
|
|
98
100
|
//# sourceMappingURL=sd-component-library61.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sd-component-library61.js","sources":["../src/components/inputs/autocomplete-input/autocomplete-input.tsx"],"sourcesContent":["import React, {\n PropsWithChildren,\n useCallback,\n useMemo,\n useRef,\n useState,\n} from \"react\";\n\nimport { Box } from \"rebass\";\n\nimport { useOnClickOutside } from \"../../../core/custom-hooks\";\nimport { SecondaryTextInput } from \"../secondary-text-input\";\nimport { AutocompleteInputProps as Props } from \"./interfaces\";\nimport { ResultsBox } from \"./partials/results-box\";\n\n/**\n * Sort synonyms. Synonyms in which the search value appear first show up first.\n * Synonyms which do not contain the search string will come up last.\n */\nfunction compareWithValue(a: string, b: string, value: string): number {\n const getValueToCompare = (text: string) => {\n const index = text.toLowerCase().indexOf(value.toLowerCase());\n if (index === -1) return Number.POSITIVE_INFINITY;\n return index;\n };\n\n return getValueToCompare(a) - getValueToCompare(b);\n}\n\nexport function AutocompleteInput<T>(props: PropsWithChildren<Props<T>>) {\n const {\n label,\n placeholder,\n options,\n width,\n onSelect,\n errorMessage,\n hideErrorText,\n onSearch,\n initialValue = \"\",\n onFocus: handleFocus,\n errorBackground,\n focusInput,\n autoFocus = false,\n translateContent = true,\n } = props;\n const [value, setValue] = useState(initialValue);\n const [optionSelected, setOptionSelected] = useState(() =>\n Boolean(initialValue)\n );\n const [showResults, setShowResults] = useState(true);\n const ref = useRef<HTMLElement | null>(null);\n\n const onClickOutside = useCallback(() => {\n setShowResults(false);\n }, []);\n\n const onFocus: Props<T>[\"onFocus\"] = (event) => {\n setShowResults(true);\n handleFocus?.(event);\n };\n\n useOnClickOutside(ref, onClickOutside);\n\n /* Sorted list of results that match the query. */\n const matchingResults = useMemo(() => {\n if (value && !optionSelected) {\n return options.map((option) => ({\n ...option,\n synonyms: option.synonyms.sort((a, b) => compareWithValue(a, b, value)),\n }));\n }\n }, [value, options, optionSelected]);\n\n const handleSelect = useCallback(\n (newValue: string) => {\n setValue(newValue);\n const matchingResult = matchingResults!.find(\n (result) => !!result.synonyms.find((synonym) => synonym === newValue)\n )!;\n onSelect?.(\n matchingResult.value,\n matchingResult.synonyms.find((synonym) => synonym === newValue)\n );\n setOptionSelected(true);\n },\n [onSelect, matchingResults]\n );\n\n return (\n <Box\n sx={{ position: \"relative\", bg: \"inherit\", width }}\n ref={ref}\n data-test=\"autocomplete-input\"\n >\n <SecondaryTextInput\n onChange={(newValue, _) => {\n if (optionSelected) {\n onSelect(null);\n setOptionSelected(false);\n }\n setValue(`${newValue}`);\n onSearch(`${newValue}`);\n }}\n value={value}\n label={label}\n placeholder={placeholder}\n labelMargin={[\"0\"]}\n errorMessage={errorMessage ? errorMessage : undefined}\n hideErrorText={hideErrorText}\n onFocus={onFocus}\n focusInput={focusInput}\n autoFocus={autoFocus}\n errorBackground={errorBackground}\n />\n {matchingResults && showResults && (\n <ResultsBox\n value={value}\n results={matchingResults}\n onSelect={handleSelect}\n translateContent={translateContent}\n />\n )}\n </Box>\n );\n}\n"],"names":["compareWithValue","a","b","value","getValueToCompare","text","index","AutocompleteInput","props","label","placeholder","options","width","onSelect","errorMessage","hideErrorText","onSearch","initialValue","handleFocus","errorBackground","focusInput","autoFocus","translateContent","setValue","useState","optionSelected","setOptionSelected","showResults","setShowResults","ref","useRef","onClickOutside","useCallback","onFocus","event","useOnClickOutside","matchingResults","useMemo","option","handleSelect","newValue","matchingResult","result","synonym","jsxs","Box","jsx","SecondaryTextInput","_","ResultsBox"],"mappings":";;;;;;AAmBA,SAASA,EAAiBC,GAAWC,GAAWC,GAAuB;AAC/D,QAAAC,IAAoB,CAACC,MAAiB;AAC1C,UAAMC,IAAQD,EAAK,YAAA,EAAc,QAAQF,EAAM,aAAa;AAC5D,WAAIG,MAAU,KAAW,OAAO,oBACzBA;AAAA,EAAA;AAGT,SAAOF,EAAkBH,CAAC,IAAIG,EAAkBF,CAAC;AACnD;AAEO,SAASK,EAAqBC,GAAoC;AACjE,QAAA;AAAA,IACJ,OAAAC;AAAA,IACA,aAAAC;AAAA,IACA,SAAAC;AAAA,IACA,OAAAC;AAAA,IACA,UAAAC;AAAA,IACA,cAAAC;AAAA,IACA,eAAAC;AAAA,IACA,UAAAC;AAAA,IACA,cAAAC,IAAe;AAAA,IACf,SAASC;AAAA,IACT,iBAAAC;AAAA,IACA,YAAAC;AAAA,IACA,WAAAC,IAAY;AAAA,IACZ,kBAAAC,IAAmB;AAAA,
|
|
1
|
+
{"version":3,"file":"sd-component-library61.js","sources":["../src/components/inputs/autocomplete-input/autocomplete-input.tsx"],"sourcesContent":["import React, {\n PropsWithChildren,\n useCallback,\n useMemo,\n useRef,\n useState,\n} from \"react\";\n\nimport { Box } from \"rebass\";\n\nimport { useOnClickOutside } from \"../../../core/custom-hooks\";\nimport { SecondaryTextInput } from \"../secondary-text-input\";\nimport { AutocompleteInputProps as Props } from \"./interfaces\";\nimport { ResultsBox } from \"./partials/results-box\";\n\n/**\n * Sort synonyms. Synonyms in which the search value appear first show up first.\n * Synonyms which do not contain the search string will come up last.\n */\nfunction compareWithValue(a: string, b: string, value: string): number {\n const getValueToCompare = (text: string) => {\n const index = text.toLowerCase().indexOf(value.toLowerCase());\n if (index === -1) return Number.POSITIVE_INFINITY;\n return index;\n };\n\n return getValueToCompare(a) - getValueToCompare(b);\n}\n\nexport function AutocompleteInput<T>(props: PropsWithChildren<Props<T>>) {\n const {\n label,\n placeholder,\n options,\n width,\n onSelect,\n errorMessage,\n hideErrorText,\n onSearch,\n initialValue = \"\",\n onFocus: handleFocus,\n errorBackground,\n focusInput,\n autoFocus = false,\n translateContent = true,\n labelSx,\n } = props;\n const [value, setValue] = useState(initialValue);\n const [optionSelected, setOptionSelected] = useState(() =>\n Boolean(initialValue)\n );\n const [showResults, setShowResults] = useState(true);\n const ref = useRef<HTMLElement | null>(null);\n\n const onClickOutside = useCallback(() => {\n setShowResults(false);\n }, []);\n\n const onFocus: Props<T>[\"onFocus\"] = (event) => {\n setShowResults(true);\n handleFocus?.(event);\n };\n\n useOnClickOutside(ref, onClickOutside);\n\n /* Sorted list of results that match the query. */\n const matchingResults = useMemo(() => {\n if (value && !optionSelected) {\n return options.map((option) => ({\n ...option,\n synonyms: option.synonyms.sort((a, b) => compareWithValue(a, b, value)),\n }));\n }\n }, [value, options, optionSelected]);\n\n const handleSelect = useCallback(\n (newValue: string) => {\n setValue(newValue);\n const matchingResult = matchingResults!.find(\n (result) => !!result.synonyms.find((synonym) => synonym === newValue)\n )!;\n onSelect?.(\n matchingResult.value,\n matchingResult.synonyms.find((synonym) => synonym === newValue)\n );\n setOptionSelected(true);\n },\n [onSelect, matchingResults]\n );\n\n return (\n <Box\n sx={{ position: \"relative\", bg: \"inherit\", width }}\n ref={ref}\n data-test=\"autocomplete-input\"\n >\n <SecondaryTextInput\n onChange={(newValue, _) => {\n if (optionSelected) {\n onSelect(null);\n setOptionSelected(false);\n }\n setValue(`${newValue}`);\n onSearch(`${newValue}`);\n }}\n value={value}\n label={label}\n placeholder={placeholder}\n labelMargin={[\"0\"]}\n labelSx={labelSx}\n errorMessage={errorMessage ? errorMessage : undefined}\n hideErrorText={hideErrorText}\n onFocus={onFocus}\n focusInput={focusInput}\n autoFocus={autoFocus}\n errorBackground={errorBackground}\n />\n {matchingResults && showResults && (\n <ResultsBox\n value={value}\n results={matchingResults}\n onSelect={handleSelect}\n translateContent={translateContent}\n />\n )}\n </Box>\n );\n}\n"],"names":["compareWithValue","a","b","value","getValueToCompare","text","index","AutocompleteInput","props","label","placeholder","options","width","onSelect","errorMessage","hideErrorText","onSearch","initialValue","handleFocus","errorBackground","focusInput","autoFocus","translateContent","labelSx","setValue","useState","optionSelected","setOptionSelected","showResults","setShowResults","ref","useRef","onClickOutside","useCallback","onFocus","event","useOnClickOutside","matchingResults","useMemo","option","handleSelect","newValue","matchingResult","result","synonym","jsxs","Box","jsx","SecondaryTextInput","_","ResultsBox"],"mappings":";;;;;;AAmBA,SAASA,EAAiBC,GAAWC,GAAWC,GAAuB;AAC/D,QAAAC,IAAoB,CAACC,MAAiB;AAC1C,UAAMC,IAAQD,EAAK,YAAA,EAAc,QAAQF,EAAM,aAAa;AAC5D,WAAIG,MAAU,KAAW,OAAO,oBACzBA;AAAA,EAAA;AAGT,SAAOF,EAAkBH,CAAC,IAAIG,EAAkBF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CAAQ;AAAA,MAAA;AAEtE,MAAA5B,KAAA,QAAAA;AAAA,QACE6B,EAAe;AAAA,QACfA,EAAe,SAAS,KAAK,CAACE,MAAYA,MAAYH,CAAQ;AAAA,SAEhEd,EAAkB,EAAI;AAAA,IACxB;AAAA,IACA,CAACd,GAAUwB,CAAe;AAAA,EAAA;AAI1B,SAAAQ,gBAAAA,EAAA;AAAA,IAACC;AAAA,IAAA;AAAA,MACC,IAAI,EAAE,UAAU,YAAY,IAAI,WAAW,OAAAlC,EAAM;AAAA,MACjD,KAAAkB;AAAA,MACA,aAAU;AAAA,MAEV,UAAA;AAAA,QAAAiB,gBAAAA,EAAA;AAAA,UAACC;AAAA,UAAA;AAAA,YACC,UAAU,CAACP,GAAUQ,MAAM;AACzB,cAAIvB,MACFb,EAAS,IAAI,GACbc,EAAkB,EAAK,IAEhBH,EAAA,GAAGiB,CAAQ,EAAE,GACbzB,EAAA,GAAGyB,CAAQ,EAAE;AAAA,YACxB;AAAA,YACA,OAAAtC;AAAA,YACA,OAAAM;AAAA,YACA,aAAAC;AAAA,YACA,aAAa,CAAC,GAAG;AAAA,YACjB,SAAAa;AAAA,YACA,cAAcT,KAA8B;AAAA,YAC5C,eAAAC;AAAA,YACA,SAAAmB;AAAA,YACA,YAAAd;AAAA,YACA,WAAAC;AAAA,YACA,iBAAAF;AAAA,UAAA;AAAA,QACF;AAAA,QACCkB,KAAmBT,KAClBmB,gBAAAA,EAAA;AAAA,UAACG;AAAA,UAAA;AAAA,YACC,OAAA/C;AAAA,YACA,SAASkC;AAAA,YACT,UAAUG;AAAA,YACV,kBAAAlB;AAAA,UAAA;AAAA,QACF;AAAA,MAAA;AAAA,IAAA;AAAA,EAAA;AAIR;"}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { j as e } from "./sd-component-library197.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-library281.js";
|
|
5
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-library154.js";
|
|
8
8
|
const B = (a) => {
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { j as t } from "./sd-component-library197.js";
|
|
2
2
|
import { useState as v, useRef as w } from "react";
|
|
3
|
-
import "./sd-component-library281.js";
|
|
4
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-library197.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-library62.js";
|
|
5
|
-
import { ReactComponent as S } from "./sd-component-
|
|
5
|
+
import { ReactComponent as S } from "./sd-component-library281.js";
|
|
6
6
|
import { Button as D } from "./sd-component-library25.js";
|
|
7
7
|
import { FrMaxContainer as b } from "./sd-component-library38.js";
|
|
8
8
|
const k = (r) => {
|
|
@@ -2,7 +2,7 @@ import { j as e } from "./sd-component-library197.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-
|
|
5
|
+
import { ReactComponent as z } from "./sd-component-library281.js";
|
|
6
6
|
import { BaseLabel as E } from "./sd-component-library227.js";
|
|
7
7
|
import { OutsideClickBox as J } from "./sd-component-library11.js";
|
|
8
8
|
import { BaseDateRangeInput as L } from "./sd-component-library63.js";
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import { j as e } from "./sd-component-library197.js";
|
|
2
|
-
import { useState as x, useRef as
|
|
3
|
-
import { format as
|
|
4
|
-
import { random as
|
|
2
|
+
import { useState as x, useRef as F, useMemo as R, useEffect as f } from "react";
|
|
3
|
+
import { format as k } from "date-fns";
|
|
4
|
+
import { random as G } from "lodash-es";
|
|
5
5
|
import { Box as r } from "rebass";
|
|
6
|
-
import { BaseDateInput as
|
|
7
|
-
import { BaseLabel as
|
|
8
|
-
import { ReactComponent as
|
|
9
|
-
import { FrMaxContainer as
|
|
10
|
-
import { ResponsiveText as
|
|
11
|
-
const
|
|
6
|
+
import { BaseDateInput as I } from "./sd-component-library62.js";
|
|
7
|
+
import { BaseLabel as M } from "./sd-component-library227.js";
|
|
8
|
+
import { ReactComponent as A } from "./sd-component-library188.js";
|
|
9
|
+
import { FrMaxContainer as L } from "./sd-component-library38.js";
|
|
10
|
+
import { ResponsiveText as P } from "./sd-component-library149.js";
|
|
11
|
+
const N = (u) => {
|
|
12
12
|
const {
|
|
13
13
|
label: l,
|
|
14
14
|
selectedDate: t,
|
|
@@ -23,10 +23,11 @@ const K = (u) => {
|
|
|
23
23
|
labelMargin: S,
|
|
24
24
|
errorMessage: a,
|
|
25
25
|
errorBackground: v,
|
|
26
|
-
onFocus: d
|
|
27
|
-
|
|
26
|
+
onFocus: d,
|
|
27
|
+
sx: B
|
|
28
|
+
} = u, [n, s] = x(!1), E = (o) => {
|
|
28
29
|
h(o), s(!1);
|
|
29
|
-
}, [i, c] = x(!1), m =
|
|
30
|
+
}, [i, c] = x(!1), m = F(), _ = R(() => -1 * G(1, 1e5), []), p = () => {
|
|
30
31
|
var o;
|
|
31
32
|
(o = m.current) != null && o.contains(document.activeElement) ? c(!0) : c(!1);
|
|
32
33
|
};
|
|
@@ -38,17 +39,18 @@ const K = (u) => {
|
|
|
38
39
|
r,
|
|
39
40
|
{
|
|
40
41
|
ref: m,
|
|
41
|
-
tabIndex:
|
|
42
|
+
tabIndex: _,
|
|
42
43
|
sx: {
|
|
43
|
-
outline: "none"
|
|
44
|
+
outline: "none",
|
|
45
|
+
...B
|
|
44
46
|
},
|
|
45
47
|
"data-testid": "primary-date-input",
|
|
46
48
|
children: /* @__PURE__ */ e.jsx(
|
|
47
|
-
|
|
49
|
+
I,
|
|
48
50
|
{
|
|
49
51
|
showCalendar: i && n,
|
|
50
52
|
selectedDate: t,
|
|
51
|
-
onDateSelect:
|
|
53
|
+
onDateSelect: E,
|
|
52
54
|
alignCalendar: y,
|
|
53
55
|
maxDate: C,
|
|
54
56
|
minDate: w,
|
|
@@ -62,8 +64,8 @@ const K = (u) => {
|
|
|
62
64
|
rowGap: b
|
|
63
65
|
},
|
|
64
66
|
children: [
|
|
65
|
-
l
|
|
66
|
-
|
|
67
|
+
l && /* @__PURE__ */ e.jsx(
|
|
68
|
+
M,
|
|
67
69
|
{
|
|
68
70
|
"data-testid": "primary-date-input-label",
|
|
69
71
|
variant: `${D}${a ? "Error" : ""}`,
|
|
@@ -71,7 +73,7 @@ const K = (u) => {
|
|
|
71
73
|
height: [""],
|
|
72
74
|
m: S
|
|
73
75
|
}
|
|
74
|
-
)
|
|
76
|
+
),
|
|
75
77
|
/* @__PURE__ */ e.jsx(
|
|
76
78
|
r,
|
|
77
79
|
{
|
|
@@ -85,7 +87,7 @@ const K = (u) => {
|
|
|
85
87
|
width: "max-content",
|
|
86
88
|
backgroundColor: v ? "rgba(255, 0, 0, 0.05)" : ""
|
|
87
89
|
},
|
|
88
|
-
children: /* @__PURE__ */ e.jsxs(
|
|
90
|
+
children: /* @__PURE__ */ e.jsxs(L, { children: [
|
|
89
91
|
/* @__PURE__ */ e.jsx(
|
|
90
92
|
r,
|
|
91
93
|
{
|
|
@@ -95,7 +97,7 @@ const K = (u) => {
|
|
|
95
97
|
borderColor: a ? "cl_red" : "cl_lightGrey"
|
|
96
98
|
},
|
|
97
99
|
children: /* @__PURE__ */ e.jsx(
|
|
98
|
-
|
|
100
|
+
P,
|
|
99
101
|
{
|
|
100
102
|
fontSizeWeight: [
|
|
101
103
|
[16, "regular"],
|
|
@@ -104,7 +106,7 @@ const K = (u) => {
|
|
|
104
106
|
textAlign: "left",
|
|
105
107
|
cursor: "pointer",
|
|
106
108
|
color: t ? "cl_darkGrey" : "cl_grey",
|
|
107
|
-
children: t ?
|
|
109
|
+
children: t ? k(t, "P") : g
|
|
108
110
|
}
|
|
109
111
|
)
|
|
110
112
|
}
|
|
@@ -120,7 +122,7 @@ const K = (u) => {
|
|
|
120
122
|
borderColor: a ? "cl_red" : "cl_lightGrey"
|
|
121
123
|
},
|
|
122
124
|
children: /* @__PURE__ */ e.jsx(
|
|
123
|
-
|
|
125
|
+
A,
|
|
124
126
|
{
|
|
125
127
|
style: {
|
|
126
128
|
width: "100%",
|
|
@@ -142,6 +144,6 @@ const K = (u) => {
|
|
|
142
144
|
);
|
|
143
145
|
};
|
|
144
146
|
export {
|
|
145
|
-
|
|
147
|
+
N as PrimaryDateInput
|
|
146
148
|
};
|
|
147
149
|
//# sourceMappingURL=sd-component-library66.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sd-component-library66.js","sources":["../src/components/inputs/date-inputs/primary-date-input/primary-date-input.tsx"],"sourcesContent":["import React, { useEffect, useMemo, useRef, useState } from \"react\";\n\nimport { format } from \"date-fns\";\nimport { random } from \"lodash-es\";\nimport { Box } from \"rebass\";\n\nimport { FrMaxContainer } from \"../../../containers\";\nimport { ShortDownArrowIcon } from \"../../../icons/short-dropdown-arrow-icon\";\nimport { BaseLabel } from \"../../../labels/base-label\";\nimport { ResponsiveText } from \"../../../texts\";\nimport { BaseDateInput } from \"../base-date-input\";\nimport { PrimaryDateInputProps as Props } from \"./interfaces\";\n\nexport const PrimaryDateInput: React.FC<Props> = (props) => {\n const {\n label,\n selectedDate,\n onDateSelect,\n defaultPlaceholder,\n gap = [\"12px\"],\n width = [\"180px\"],\n alignCalendar = \"left\",\n maxDate,\n minDate,\n labelVariant = \"selectors.secondary\",\n labelMargin,\n errorMessage,\n errorBackground,\n onFocus,\n } = props;\n\n const [showCalendar, setShowCalendar] = useState(false);\n\n const handleDateSelect = (date: Date) => {\n onDateSelect(date);\n setShowCalendar(false);\n };\n\n const [hasFocus, setHasFocus] = useState(false);\n const boxRef = useRef<HTMLDivElement>();\n // Use a random negative tab index to make collisions very unlikely\n const tabIndex = useMemo(() => -1 * random(1, 100000), []);\n\n /**\n * When focus changes on the document, determine if it's inside this component\n */\n const onFocusChange = () => {\n if (boxRef.current?.contains(document.activeElement)) {\n setHasFocus(true);\n } else {\n setHasFocus(false);\n }\n };\n\n useEffect(() => {\n document.addEventListener(\"focusin\", onFocusChange);\n return () => {\n document.removeEventListener(\"focusin\", onFocusChange);\n };\n }, []);\n\n // Hide calendar if focus is lost\n useEffect(() => {\n if (!hasFocus) setShowCalendar(false);\n }, [hasFocus]);\n\n return (\n <Box\n ref={boxRef}\n tabIndex={tabIndex}\n sx={{\n outline: \"none\",\n }}\n data-testid=\"primary-date-input\"\n >\n <BaseDateInput\n showCalendar={hasFocus && showCalendar}\n selectedDate={selectedDate}\n onDateSelect={handleDateSelect}\n alignCalendar={alignCalendar}\n maxDate={maxDate}\n minDate={minDate}\n width={width}\n >\n <Box\n sx={{\n display: \"grid\",\n gridTemplateColumns: \"1fr\",\n rowGap: gap,\n }}\n >\n {label
|
|
1
|
+
{"version":3,"file":"sd-component-library66.js","sources":["../src/components/inputs/date-inputs/primary-date-input/primary-date-input.tsx"],"sourcesContent":["import React, { useEffect, useMemo, useRef, useState } from \"react\";\n\nimport { format } from \"date-fns\";\nimport { random } from \"lodash-es\";\nimport { Box } from \"rebass\";\n\nimport { FrMaxContainer } from \"../../../containers\";\nimport { ShortDownArrowIcon } from \"../../../icons/short-dropdown-arrow-icon\";\nimport { BaseLabel } from \"../../../labels/base-label\";\nimport { ResponsiveText } from \"../../../texts\";\nimport { BaseDateInput } from \"../base-date-input\";\nimport { PrimaryDateInputProps as Props } from \"./interfaces\";\n\nexport const PrimaryDateInput: React.FC<Props> = (props) => {\n const {\n label,\n selectedDate,\n onDateSelect,\n defaultPlaceholder,\n gap = [\"12px\"],\n width = [\"180px\"],\n alignCalendar = \"left\",\n maxDate,\n minDate,\n labelVariant = \"selectors.secondary\",\n labelMargin,\n errorMessage,\n errorBackground,\n onFocus,\n sx,\n } = props;\n\n const [showCalendar, setShowCalendar] = useState(false);\n\n const handleDateSelect = (date: Date) => {\n onDateSelect(date);\n setShowCalendar(false);\n };\n\n const [hasFocus, setHasFocus] = useState(false);\n const boxRef = useRef<HTMLDivElement>();\n // Use a random negative tab index to make collisions very unlikely\n const tabIndex = useMemo(() => -1 * random(1, 100000), []);\n\n /**\n * When focus changes on the document, determine if it's inside this component\n */\n const onFocusChange = () => {\n if (boxRef.current?.contains(document.activeElement)) {\n setHasFocus(true);\n } else {\n setHasFocus(false);\n }\n };\n\n useEffect(() => {\n document.addEventListener(\"focusin\", onFocusChange);\n return () => {\n document.removeEventListener(\"focusin\", onFocusChange);\n };\n }, []);\n\n // Hide calendar if focus is lost\n useEffect(() => {\n if (!hasFocus) setShowCalendar(false);\n }, [hasFocus]);\n\n return (\n <Box\n ref={boxRef}\n tabIndex={tabIndex}\n sx={{\n outline: \"none\",\n ...sx,\n }}\n data-testid=\"primary-date-input\"\n >\n <BaseDateInput\n showCalendar={hasFocus && showCalendar}\n selectedDate={selectedDate}\n onDateSelect={handleDateSelect}\n alignCalendar={alignCalendar}\n maxDate={maxDate}\n minDate={minDate}\n width={width}\n >\n <Box\n sx={{\n display: \"grid\",\n gridTemplateColumns: \"1fr\",\n rowGap: gap,\n }}\n >\n {label && (\n <BaseLabel\n data-testid=\"primary-date-input-label\"\n variant={`${labelVariant}${errorMessage ? \"Error\" : \"\"}`}\n label={label}\n height={[\"\"]}\n m={labelMargin}\n />\n )}\n\n <Box\n data-testid=\"primary-date-input-field\"\n onClick={() => {\n setShowCalendar(!showCalendar);\n if (!showCalendar) {\n !!onFocus && onFocus();\n }\n }}\n width=\"100%\"\n sx={{\n cursor: \"pointer\",\n width: \"max-content\",\n backgroundColor: errorBackground ? \"rgba(255, 0, 0, 0.05)\" : \"\",\n }}\n >\n <FrMaxContainer>\n <Box\n sx={{\n paddingY: \"14px\",\n borderBottom: \"solid 2px\",\n borderColor: errorMessage ? \"cl_red\" : \"cl_lightGrey\",\n }}\n >\n <ResponsiveText\n fontSizeWeight={[\n [16, \"regular\"],\n [18, \"regular\"],\n ]}\n textAlign=\"left\"\n cursor=\"pointer\"\n color={selectedDate ? \"cl_darkGrey\" : \"cl_grey\"}\n >\n {selectedDate\n ? format(selectedDate, \"P\")\n : defaultPlaceholder}\n </ResponsiveText>\n </Box>\n <Box\n sx={{\n width: [\"10px\"],\n height: [\"50px\", \"52px\"],\n display: \"flex\",\n borderBottom: \"solid 2px\",\n borderColor: errorMessage ? \"cl_red\" : \"cl_lightGrey\",\n }}\n >\n <ShortDownArrowIcon\n style={{\n width: \"100%\",\n fill: \"#434A54\",\n }}\n />\n </Box>\n </FrMaxContainer>\n </Box>\n </Box>\n </BaseDateInput>\n </Box>\n );\n};\n"],"names":["PrimaryDateInput","props","label","selectedDate","onDateSelect","defaultPlaceholder","gap","width","alignCalendar","maxDate","minDate","labelVariant","labelMargin","errorMessage","errorBackground","onFocus","sx","showCalendar","setShowCalendar","useState","handleDateSelect","date","hasFocus","setHasFocus","boxRef","useRef","tabIndex","useMemo","random","onFocusChange","_a","useEffect","jsx","Box","BaseDateInput","jsxs","BaseLabel","FrMaxContainer","ResponsiveText","format","ShortDownArrowIcon"],"mappings":";;;;;;;;;;AAaa,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,gBAAgB;AAAA,8BAErC,UACGA,IAAAoC,EAAOpC,GAAc,GAAG,IACxBE;AAAA,4BAAA;AAAA,0BACN;AAAA,wBAAA;AAAA,sBACF;AAAA,sBACA2B,gBAAAA,EAAA;AAAA,wBAACC;AAAA,wBAAA;AAAA,0BACC,IAAI;AAAA,4BACF,OAAO,CAAC,MAAM;AAAA,4BACd,QAAQ,CAAC,QAAQ,MAAM;AAAA,4BACvB,SAAS;AAAA,4BACT,cAAc;AAAA,4BACd,aAAapB,IAAe,WAAW;AAAA,0BACzC;AAAA,0BAEA,UAAAmB,gBAAAA,EAAA;AAAA,4BAACQ;AAAAA,4BAAA;AAAA,8BACC,OAAO;AAAA,gCACL,OAAO;AAAA,gCACP,MAAM;AAAA,8BACR;AAAA,4BAAA;AAAA,0BACF;AAAA,wBAAA;AAAA,sBACF;AAAA,oBAAA,GACF;AAAA,kBAAA;AAAA,gBACF;AAAA,cAAA;AAAA,YAAA;AAAA,UACF;AAAA,QAAA;AAAA,MACF;AAAA,IAAA;AAAA,EAAA;AAGN;"}
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { j as i } from "./sd-component-library197.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-library219.js";
|
|
5
|
+
import { ReactComponent as _ } from "./sd-component-library220.js";
|
|
6
6
|
import { NumberInput as I } from "./sd-component-library72.js";
|
|
7
|
-
import { ReactComponent as M } from "./sd-component-
|
|
7
|
+
import { ReactComponent as M } from "./sd-component-library221.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-library197.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-library78.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-library222.js";
|
|
6
|
+
import { SearchAutocompleteResultsBox as C } from "./sd-component-library223.js";
|
|
7
7
|
const F = (s) => {
|
|
8
8
|
const {
|
|
9
9
|
searchValue: r,
|
|
@@ -4,7 +4,7 @@ import { useDependantState as q } from "./sd-component-library3.js";
|
|
|
4
4
|
import { SearchBox as z } from "./sd-component-library224.js";
|
|
5
5
|
import { OutsideClickBox as G } from "./sd-component-library11.js";
|
|
6
6
|
import { PrimaryTextInput as H } from "./sd-component-library74.js";
|
|
7
|
-
import { ReactComponent as J } from "./sd-component-
|
|
7
|
+
import { ReactComponent as J } from "./sd-component-library222.js";
|
|
8
8
|
import { ReactComponent as M } from "./sd-component-library225.js";
|
|
9
9
|
function f(i, o, e, t) {
|
|
10
10
|
t == null || t(i, o), e(i);
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { j as r } from "./sd-component-library197.js";
|
|
2
2
|
import { Box as p } from "rebass";
|
|
3
3
|
import { PrimaryTextInput as x } from "./sd-component-library74.js";
|
|
4
|
-
import { ReactComponent as m } from "./sd-component-
|
|
4
|
+
import { ReactComponent as m } from "./sd-component-library222.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-library188.js";
|
|
8
|
-
import { ActionBox as A } from "./sd-component-
|
|
8
|
+
import { ActionBox as A } from "./sd-component-library254.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) => {
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { j as e } from "./sd-component-library197.js";
|
|
2
2
|
import { Box as R } from "rebass";
|
|
3
3
|
import { useElementCoordinates as _ } from "./sd-component-library3.js";
|
|
4
|
-
import { defaultPointerWidth as z, defaultTextBottomMargin as X } from "./sd-component-
|
|
5
|
-
import { labelWidth as Y, defaultDistanceFromLabelToRanges as W, labelPaddingX as A, defaultWidth as D, defaultHeight as E, defaultArc as G, defaultPointStrokeWidth as H, defaultInnerPointRadius as V, defaultGaugeWidth as q, defaultMaskBorderRadius as N } from "./sd-component-
|
|
4
|
+
import { defaultPointerWidth as z, defaultTextBottomMargin as X } from "./sd-component-library228.js";
|
|
5
|
+
import { labelWidth as Y, defaultDistanceFromLabelToRanges as W, labelPaddingX as A, defaultWidth as D, defaultHeight as E, defaultArc as G, defaultPointStrokeWidth as H, defaultInnerPointRadius as V, defaultGaugeWidth as q, defaultMaskBorderRadius as N } from "./sd-component-library229.js";
|
|
6
6
|
import { isValueInRange as J } from "./sd-component-library92.js";
|
|
7
|
-
import { COLOR_TO_ICON_MAP as K, defaultSmileyWidth as Q, defaultDistanceBetweenRanges as U } from "./sd-component-
|
|
8
|
-
import { isCorrectSmileyMeterConfig as Z, getIsHorizontal as ee } from "./sd-component-
|
|
9
|
-
import { SmileyMeterRanges as te } from "./sd-component-
|
|
10
|
-
import { MatchedRangeLabelBox as ie } from "./sd-component-
|
|
7
|
+
import { COLOR_TO_ICON_MAP as K, defaultSmileyWidth as Q, defaultDistanceBetweenRanges as U } from "./sd-component-library230.js";
|
|
8
|
+
import { isCorrectSmileyMeterConfig as Z, getIsHorizontal as ee } from "./sd-component-library231.js";
|
|
9
|
+
import { SmileyMeterRanges as te } from "./sd-component-library232.js";
|
|
10
|
+
import { MatchedRangeLabelBox as ie } from "./sd-component-library233.js";
|
|
11
11
|
import { FlexCenter as oe } from "./sd-component-library35.js";
|
|
12
12
|
const xe = ($) => {
|
|
13
13
|
const {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { j as s } from "./sd-component-library197.js";
|
|
2
|
-
import { smallMeterMaskBorderRadius as n } from "./sd-component-
|
|
3
|
-
import { smallSmileyMeterWidth as d, smallSmileyMeterHeight as h, smallSmileyGaugeWidth as S, smallSmileyWidth as u, smallSmileyInnerPointRadius as y, smallSmileyInnerPointStrokeWidth as g } from "./sd-component-
|
|
2
|
+
import { smallMeterMaskBorderRadius as n } from "./sd-component-library229.js";
|
|
3
|
+
import { smallSmileyMeterWidth as d, smallSmileyMeterHeight as h, smallSmileyGaugeWidth as S, smallSmileyWidth as u, smallSmileyInnerPointRadius as y, smallSmileyInnerPointStrokeWidth as g } from "./sd-component-library230.js";
|
|
4
4
|
import { SmileyMeterV2 as W } from "./sd-component-library87.js";
|
|
5
5
|
const k = (e) => {
|
|
6
6
|
const {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { j as l } from "./sd-component-library197.js";
|
|
2
2
|
import { Box as f } from "rebass";
|
|
3
|
-
import { ReactComponent as d } from "./sd-component-
|
|
3
|
+
import { ReactComponent as d } from "./sd-component-library234.js";
|
|
4
4
|
import { BaseGridContainer as h } from "./sd-component-library36.js";
|
|
5
5
|
const F = [
|
|
6
6
|
"#5CA13A",
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { j as r } from "./sd-component-library197.js";
|
|
2
2
|
import { Box as H } from "rebass";
|
|
3
|
-
import { labelWidth as I, defaultDistanceFromLabelToRanges as p, labelPaddingX as X, defaultArc as A, defaultWidth as E, defaultHeight as G, defaultDistanceBetweenRanges as Y, defaultGaugeWidth as q, defaultPointStrokeWidth as y, defaultInnerPointRadius as z, defaultDistanceFromRangesToNeedle as J, defaultInnerCircleStrokeWidth as K, defaultInnerCircleRadius as Q, defaultNeedleWidth as U, defaultNumberOfDashes as V, defaultDashHeight as Z, defaultDashWidth as _, defaultDistanceFromRangesToScale as ee, defaultMaskBorderRadius as te } from "./sd-component-
|
|
3
|
+
import { labelWidth as I, defaultDistanceFromLabelToRanges as p, labelPaddingX as X, defaultArc as A, defaultWidth as E, defaultHeight as G, defaultDistanceBetweenRanges as Y, defaultGaugeWidth as q, defaultPointStrokeWidth as y, defaultInnerPointRadius as z, defaultDistanceFromRangesToNeedle as J, defaultInnerCircleStrokeWidth as K, defaultInnerCircleRadius as Q, defaultNeedleWidth as U, defaultNumberOfDashes as V, defaultDashHeight as Z, defaultDashWidth as _, defaultDistanceFromRangesToScale as ee, defaultMaskBorderRadius as te } from "./sd-component-library229.js";
|
|
4
4
|
import { isCorrectOutlineMeterConfig as ae } from "./sd-component-library92.js";
|
|
5
|
-
import { OutlineMeterRange as re } from "./sd-component-
|
|
6
|
-
import { OutlineMeterScale as ie } from "./sd-component-
|
|
7
|
-
import { OutlineMeterNeedle as se } from "./sd-component-
|
|
8
|
-
import { OutlineMeterLabelBox as oe } from "./sd-component-
|
|
5
|
+
import { OutlineMeterRange as re } from "./sd-component-library235.js";
|
|
6
|
+
import { OutlineMeterScale as ie } from "./sd-component-library236.js";
|
|
7
|
+
import { OutlineMeterNeedle as se } from "./sd-component-library237.js";
|
|
8
|
+
import { OutlineMeterLabelBox as oe } from "./sd-component-library238.js";
|
|
9
9
|
const ge = (R) => {
|
|
10
10
|
const {
|
|
11
11
|
marginTop: x = "50px",
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { j as u } from "./sd-component-library197.js";
|
|
2
|
-
import { smallMeterWidth as g, smallMeterHeight as c, smallMeterPointStrokeWidth as R, smallMeterPointRadius as W, smallMeterInnerCircleStrokeWidth as k, smallMeterInnerCircleRadius as S, smallMeterGaugeWidth as p, smallMeterDistanceBetweenRanges as f, smallMeterDistanceFromRangesToNeedle as w, smallMeterNeedleWidth as x, smallMeterMaskBorderRadius as B } from "./sd-component-
|
|
2
|
+
import { smallMeterWidth as g, smallMeterHeight as c, smallMeterPointStrokeWidth as R, smallMeterPointRadius as W, smallMeterInnerCircleStrokeWidth as k, smallMeterInnerCircleRadius as S, smallMeterGaugeWidth as p, smallMeterDistanceBetweenRanges as f, smallMeterDistanceFromRangesToNeedle as w, smallMeterNeedleWidth as x, smallMeterMaskBorderRadius as B } from "./sd-component-library229.js";
|
|
3
3
|
import { OutlineMeter as C } from "./sd-component-library90.js";
|
|
4
4
|
const T = (e) => {
|
|
5
5
|
const {
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { j as o } from "./sd-component-library197.js";
|
|
2
2
|
import { Box as y } from "rebass";
|
|
3
|
-
import { labelWidth as E, defaultDistanceFromLabelToRanges as R, labelPaddingX as G, defaultArc as P, defaultWidth as X, defaultHeight as Y, defaultDistanceBetweenRanges as A, defaultGaugeWidth as V, defaultDistanceFromRangesToNeedle as _, defaultInnerCircleStrokeWidth as q, defaultInnerCircleRadius as J, defaultNeedleWidth as K, defaultNumberOfDashes as Q, defaultDashHeight as U, defaultDashWidth as Z, defaultDistanceFromRangesToScale as ee, defaultMaskBorderRadius as te } from "./sd-component-
|
|
4
|
-
import { defaultPointerWidth as ae } from "./sd-component-
|
|
5
|
-
import { DiscreteRange as oe } from "./sd-component-
|
|
6
|
-
import { OutlineMeterScale as le } from "./sd-component-
|
|
7
|
-
import { DiscreteMeterNeedle as re } from "./sd-component-
|
|
8
|
-
import { MatchedRangeLabelBox as ne } from "./sd-component-
|
|
3
|
+
import { labelWidth as E, defaultDistanceFromLabelToRanges as R, labelPaddingX as G, defaultArc as P, defaultWidth as X, defaultHeight as Y, defaultDistanceBetweenRanges as A, defaultGaugeWidth as V, defaultDistanceFromRangesToNeedle as _, defaultInnerCircleStrokeWidth as q, defaultInnerCircleRadius as J, defaultNeedleWidth as K, defaultNumberOfDashes as Q, defaultDashHeight as U, defaultDashWidth as Z, defaultDistanceFromRangesToScale as ee, defaultMaskBorderRadius as te } from "./sd-component-library229.js";
|
|
4
|
+
import { defaultPointerWidth as ae } from "./sd-component-library228.js";
|
|
5
|
+
import { DiscreteRange as oe } from "./sd-component-library239.js";
|
|
6
|
+
import { OutlineMeterScale as le } from "./sd-component-library236.js";
|
|
7
|
+
import { DiscreteMeterNeedle as re } from "./sd-component-library240.js";
|
|
8
|
+
import { MatchedRangeLabelBox as ne } from "./sd-component-library241.js";
|
|
9
9
|
function fe(x) {
|
|
10
10
|
const {
|
|
11
11
|
marginTop: b = "50px",
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { j as o } from "./sd-component-library197.js";
|
|
2
|
-
import { smallMeterWidth as u, smallMeterHeight as M, smallMeterInnerCircleStrokeWidth as c, smallMeterInnerCircleRadius as h, smallMeterGaugeWidth as g, smallMeterDistanceBetweenRanges as R, smallMeterDistanceFromRangesToNeedle as W, smallMeterNeedleWidth as p, smallMeterMaskBorderRadius as f } from "./sd-component-
|
|
2
|
+
import { smallMeterWidth as u, smallMeterHeight as M, smallMeterInnerCircleStrokeWidth as c, smallMeterInnerCircleRadius as h, smallMeterGaugeWidth as g, smallMeterDistanceBetweenRanges as R, smallMeterDistanceFromRangesToNeedle as W, smallMeterNeedleWidth as p, smallMeterMaskBorderRadius as f } from "./sd-component-library229.js";
|
|
3
3
|
import { MultiOptionDiscreteOutlineMeter as k } from "./sd-component-library93.js";
|
|
4
4
|
function C(e) {
|
|
5
5
|
const {
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { j as r } from "./sd-component-library197.js";
|
|
2
2
|
import { Box as H } from "rebass";
|
|
3
|
-
import { defaultWidth as V, defaultHeight as X, labelWidth as Y, defaultDistanceFromLabelToRanges as p, labelPaddingX as z, defaultGaugeWidth as E, defaultInnerPointRadius as _, defaultPointStrokeWidth as q, defaultArc as J, defaultDistanceFromRangesToScale as K, defaultDashHeight as Q, defaultDashWidth as U, defaultNumberOfDashes as Z, defaultNeedleWidth as ee, defaultInnerCircleRadius as te, defaultInnerCircleStrokeWidth as re, defaultDistanceFromRangesToNeedle as ae, defaultMaskBorderRadius as oe } from "./sd-component-
|
|
4
|
-
import { mapAdjacent as ie, isLabelActive as x, flipPosition as R } from "./sd-component-
|
|
5
|
-
import { GradientMeterRange as ne } from "./sd-component-
|
|
6
|
-
import { OutlineMeterScale as se } from "./sd-component-
|
|
7
|
-
import { GradientMeterNeedle as de } from "./sd-component-
|
|
8
|
-
import { OutlineMeterLabelPointer as le } from "./sd-component-
|
|
9
|
-
import { BaseMeterLabelBox as ue } from "./sd-component-
|
|
3
|
+
import { defaultWidth as V, defaultHeight as X, labelWidth as Y, defaultDistanceFromLabelToRanges as p, labelPaddingX as z, defaultGaugeWidth as E, defaultInnerPointRadius as _, defaultPointStrokeWidth as q, defaultArc as J, defaultDistanceFromRangesToScale as K, defaultDashHeight as Q, defaultDashWidth as U, defaultNumberOfDashes as Z, defaultNeedleWidth as ee, defaultInnerCircleRadius as te, defaultInnerCircleStrokeWidth as re, defaultDistanceFromRangesToNeedle as ae, defaultMaskBorderRadius as oe } from "./sd-component-library229.js";
|
|
4
|
+
import { mapAdjacent as ie, isLabelActive as x, flipPosition as R } from "./sd-component-library242.js";
|
|
5
|
+
import { GradientMeterRange as ne } from "./sd-component-library243.js";
|
|
6
|
+
import { OutlineMeterScale as se } from "./sd-component-library236.js";
|
|
7
|
+
import { GradientMeterNeedle as de } from "./sd-component-library244.js";
|
|
8
|
+
import { OutlineMeterLabelPointer as le } from "./sd-component-library245.js";
|
|
9
|
+
import { BaseMeterLabelBox as ue } from "./sd-component-library246.js";
|
|
10
10
|
const je = (b) => {
|
|
11
11
|
const {
|
|
12
12
|
width: o = V,
|