@selfdecode/sd-component-library 4.0.135 → 4.0.136
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/modals/modal/interfaces.d.ts +2 -1
- package/lib/sd-component-library101.js +1 -1
- package/lib/sd-component-library102.js +58 -55
- package/lib/sd-component-library102.js.map +1 -1
- package/lib/sd-component-library112.js +1 -1
- package/lib/sd-component-library118.js +1 -1
- package/lib/sd-component-library126.js +2 -2
- package/lib/sd-component-library127.js +2 -2
- package/lib/sd-component-library129.js +1 -1
- package/lib/sd-component-library16.js +1 -1
- package/lib/sd-component-library167.js +1 -1
- package/lib/sd-component-library204.js +26 -3
- package/lib/sd-component-library204.js.map +1 -1
- package/lib/sd-component-library205.js +55 -24
- package/lib/sd-component-library205.js.map +1 -1
- package/lib/sd-component-library215.js +65 -3
- package/lib/sd-component-library215.js.map +1 -1
- package/lib/sd-component-library216.js +3 -52
- package/lib/sd-component-library216.js.map +1 -1
- package/lib/sd-component-library217.js +3 -65
- package/lib/sd-component-library217.js.map +1 -1
- package/lib/sd-component-library218.js +46 -3
- package/lib/sd-component-library218.js.map +1 -1
- package/lib/sd-component-library222.js +17 -46
- package/lib/sd-component-library222.js.map +1 -1
- package/lib/sd-component-library223.js +50 -55
- package/lib/sd-component-library223.js.map +1 -1
- package/lib/sd-component-library224.js +3 -17
- package/lib/sd-component-library224.js.map +1 -1
- package/lib/sd-component-library225.js +3 -26
- package/lib/sd-component-library225.js.map +1 -1
- package/lib/sd-component-library226.js +31 -3
- package/lib/sd-component-library226.js.map +1 -1
- package/lib/sd-component-library227.js +19 -31
- package/lib/sd-component-library227.js.map +1 -1
- package/lib/sd-component-library228.js +20 -19
- package/lib/sd-component-library228.js.map +1 -1
- package/lib/sd-component-library229.js +28 -20
- package/lib/sd-component-library229.js.map +1 -1
- package/lib/sd-component-library230.js +32 -27
- package/lib/sd-component-library230.js.map +1 -1
- package/lib/sd-component-library231.js +3 -33
- package/lib/sd-component-library231.js.map +1 -1
- package/lib/sd-component-library232.js +129 -3
- package/lib/sd-component-library232.js.map +1 -1
- package/lib/sd-component-library233.js +43 -129
- package/lib/sd-component-library233.js.map +1 -1
- package/lib/sd-component-library234.js +45 -41
- package/lib/sd-component-library234.js.map +1 -1
- package/lib/sd-component-library235.js +7 -46
- package/lib/sd-component-library235.js.map +1 -1
- package/lib/sd-component-library236.js +64 -8
- package/lib/sd-component-library236.js.map +1 -1
- package/lib/sd-component-library237.js +41 -62
- package/lib/sd-component-library237.js.map +1 -1
- package/lib/sd-component-library238.js +13 -43
- package/lib/sd-component-library238.js.map +1 -1
- package/lib/sd-component-library239.js +21 -13
- package/lib/sd-component-library239.js.map +1 -1
- package/lib/sd-component-library24.js +1 -1
- package/lib/sd-component-library240.js +109 -21
- package/lib/sd-component-library240.js.map +1 -1
- package/lib/sd-component-library241.js +44 -106
- package/lib/sd-component-library241.js.map +1 -1
- package/lib/sd-component-library242.js +23 -46
- package/lib/sd-component-library242.js.map +1 -1
- package/lib/sd-component-library243.js +52 -23
- package/lib/sd-component-library243.js.map +1 -1
- package/lib/sd-component-library244.js +47 -52
- package/lib/sd-component-library244.js.map +1 -1
- package/lib/sd-component-library245.js +73 -46
- package/lib/sd-component-library245.js.map +1 -1
- package/lib/sd-component-library246.js +26 -60
- package/lib/sd-component-library246.js.map +1 -1
- package/lib/sd-component-library247.js +27 -41
- package/lib/sd-component-library247.js.map +1 -1
- package/lib/sd-component-library248.js +2 -27
- package/lib/sd-component-library248.js.map +1 -1
- package/lib/sd-component-library251.js +26 -2
- package/lib/sd-component-library251.js.map +1 -1
- package/lib/sd-component-library262.js +1 -1
- package/lib/sd-component-library263.js +54 -52
- package/lib/sd-component-library263.js.map +1 -1
- package/lib/sd-component-library264.js +52 -54
- package/lib/sd-component-library264.js.map +1 -1
- package/lib/sd-component-library311.js +92 -4
- package/lib/sd-component-library311.js.map +1 -1
- package/lib/sd-component-library312.js +47 -89
- package/lib/sd-component-library312.js.map +1 -1
- package/lib/sd-component-library313.js +23 -33
- package/lib/sd-component-library313.js.map +1 -1
- package/lib/sd-component-library314.js +33 -23
- package/lib/sd-component-library314.js.map +1 -1
- package/lib/sd-component-library315.js +5 -4
- package/lib/sd-component-library315.js.map +1 -1
- package/lib/sd-component-library316.js +4 -51
- package/lib/sd-component-library316.js.map +1 -1
- package/lib/sd-component-library6.js +1 -1
- package/lib/sd-component-library64.js +1 -1
- package/lib/sd-component-library65.js +1 -1
- package/lib/sd-component-library7.js +1 -1
- package/lib/sd-component-library74.js +2 -2
- package/lib/sd-component-library75.js +3 -3
- package/lib/sd-component-library76.js +1 -1
- package/lib/sd-component-library77.js +1 -1
- package/lib/sd-component-library79.js +1 -1
- package/lib/sd-component-library80.js +1 -1
- package/lib/sd-component-library85.js +1 -1
- package/lib/sd-component-library86.js +6 -6
- package/lib/sd-component-library87.js +2 -2
- package/lib/sd-component-library88.js +1 -1
- package/lib/sd-component-library89.js +5 -5
- package/lib/sd-component-library90.js +1 -1
- package/lib/sd-component-library92.js +6 -6
- package/lib/sd-component-library93.js +1 -1
- package/lib/sd-component-library94.js +7 -7
- package/lib/sd-component-library95.js +1 -1
- package/lib/sd-component-library98.js +2 -2
- package/lib/sd-component-library99.js +3 -3
- package/package.json +1 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { j as e } from "./sd-component-library197.js";
|
|
2
|
-
import { isMatchingRange as u } from "./sd-component-
|
|
2
|
+
import { isMatchingRange as u } from "./sd-component-library248.js";
|
|
3
3
|
import { GridCenter as c } from "./sd-component-library41.js";
|
|
4
4
|
import { GridContainerV2 as f } from "./sd-component-library38.js";
|
|
5
5
|
import { LinearGaugeSegment as d } from "./sd-component-library249.js";
|
|
@@ -1,55 +1,56 @@
|
|
|
1
1
|
import { j as t } from "./sd-component-library197.js";
|
|
2
|
-
import { useRef as
|
|
3
|
-
import { Box as
|
|
4
|
-
import { useBodyScrollLock as
|
|
5
|
-
import { isIOS as
|
|
6
|
-
import
|
|
2
|
+
import { useRef as R, useState as T, useEffect as E } from "react";
|
|
3
|
+
import { Box as d } from "rebass";
|
|
4
|
+
import { useBodyScrollLock as L } from "./sd-component-library3.js";
|
|
5
|
+
import { isIOS as X, generateTestLocator as c } from "./sd-component-library4.js";
|
|
6
|
+
import $ from "./sd-component-library252.js";
|
|
7
7
|
import { OutsideClickBox as z } from "./sd-component-library12.js";
|
|
8
8
|
import { ReactComponent as A } from "./sd-component-library253.js";
|
|
9
9
|
import { FlexCenter as F } from "./sd-component-library34.js";
|
|
10
10
|
import { Button as H } from "./sd-component-library24.js";
|
|
11
|
-
const
|
|
11
|
+
const a = 500, K = (p) => {
|
|
12
12
|
const {
|
|
13
|
-
variant:
|
|
13
|
+
variant: x,
|
|
14
14
|
children: l,
|
|
15
|
-
containerBg:
|
|
16
|
-
xIconColor:
|
|
17
|
-
showXIcon:
|
|
18
|
-
onClickX:
|
|
19
|
-
coverBg:
|
|
20
|
-
width:
|
|
15
|
+
containerBg: m,
|
|
16
|
+
xIconColor: u,
|
|
17
|
+
showXIcon: h = !0,
|
|
18
|
+
onClickX: o,
|
|
19
|
+
coverBg: f = "rgba(69,104,249, 0.4)",
|
|
20
|
+
width: g = "auto",
|
|
21
21
|
isOpen: i,
|
|
22
|
-
borderRadius:
|
|
23
|
-
outerPadding:
|
|
24
|
-
innerPadding:
|
|
25
|
-
popUpHeight:
|
|
26
|
-
containerSx:
|
|
27
|
-
innerSx:
|
|
28
|
-
closeOnClickOutside:
|
|
29
|
-
mountOnEnter:
|
|
30
|
-
unmountOnExit:
|
|
31
|
-
intermediateContainerSx:
|
|
32
|
-
|
|
33
|
-
|
|
22
|
+
borderRadius: w = ["5px"],
|
|
23
|
+
outerPadding: C = ["30px", "auto", "150px"],
|
|
24
|
+
innerPadding: k = ["40px 20px", "50px"],
|
|
25
|
+
popUpHeight: v = "100%",
|
|
26
|
+
containerSx: S,
|
|
27
|
+
innerSx: b,
|
|
28
|
+
closeOnClickOutside: j = !1,
|
|
29
|
+
mountOnEnter: y = !0,
|
|
30
|
+
unmountOnExit: O,
|
|
31
|
+
intermediateContainerSx: B,
|
|
32
|
+
testLocatorId: n
|
|
33
|
+
} = p, r = R(null), [I, s] = T(null);
|
|
34
|
+
return E(() => {
|
|
34
35
|
let e;
|
|
35
|
-
return i ?
|
|
36
|
-
|
|
37
|
-
},
|
|
38
|
-
}, [i, l]),
|
|
39
|
-
|
|
36
|
+
return i ? s(l) : e = setTimeout(() => {
|
|
37
|
+
s(null);
|
|
38
|
+
}, a), () => clearTimeout(e);
|
|
39
|
+
}, [i, l]), L(r.current, i && !X()), /* @__PURE__ */ t.jsx(
|
|
40
|
+
$,
|
|
40
41
|
{
|
|
41
|
-
nodeRef:
|
|
42
|
+
nodeRef: r,
|
|
42
43
|
in: i,
|
|
43
44
|
timeout: {
|
|
44
45
|
enter: 0,
|
|
45
|
-
exit:
|
|
46
|
+
exit: a
|
|
46
47
|
},
|
|
47
|
-
mountOnEnter:
|
|
48
|
-
unmountOnExit:
|
|
48
|
+
mountOnEnter: y,
|
|
49
|
+
unmountOnExit: O,
|
|
49
50
|
children: (e) => (
|
|
50
51
|
/** This most outer container is the background */
|
|
51
52
|
/* @__PURE__ */ t.jsx(
|
|
52
|
-
|
|
53
|
+
d,
|
|
53
54
|
{
|
|
54
55
|
sx: {
|
|
55
56
|
width: "100vw",
|
|
@@ -61,59 +62,61 @@ const r = 500, G = (d) => {
|
|
|
61
62
|
top: 0,
|
|
62
63
|
left: 0,
|
|
63
64
|
bottom: 0,
|
|
64
|
-
backgroundColor:
|
|
65
|
+
backgroundColor: f,
|
|
65
66
|
opacity: e === "entered" ? 1 : 0,
|
|
66
|
-
transition: `opacity ${
|
|
67
|
+
transition: `opacity ${a}ms ease-in-out`,
|
|
67
68
|
display: ["entering", "entered", "exiting"].includes(e) ? "block" : "none",
|
|
68
|
-
...
|
|
69
|
+
...S
|
|
69
70
|
},
|
|
70
|
-
|
|
71
|
+
...n ? c(`${n}-outer-container`) : {},
|
|
72
|
+
ref: r,
|
|
71
73
|
children: /* @__PURE__ */ t.jsx(
|
|
72
74
|
F,
|
|
73
75
|
{
|
|
74
76
|
sx: {
|
|
75
77
|
position: "relative",
|
|
76
78
|
width: "100%",
|
|
77
|
-
height:
|
|
79
|
+
height: v
|
|
78
80
|
},
|
|
79
81
|
children: /* @__PURE__ */ t.jsxs(
|
|
80
|
-
|
|
82
|
+
d,
|
|
81
83
|
{
|
|
82
84
|
sx: {
|
|
83
85
|
maxWidth: "100vw",
|
|
84
86
|
zIndex: "180",
|
|
85
87
|
margin: "auto",
|
|
86
88
|
whiteSpace: "nowrap",
|
|
87
|
-
padding:
|
|
88
|
-
...
|
|
89
|
+
padding: C,
|
|
90
|
+
...B
|
|
89
91
|
},
|
|
90
92
|
"data-testid": "modal",
|
|
91
93
|
children: [
|
|
92
94
|
/* @__PURE__ */ t.jsx(
|
|
93
95
|
z,
|
|
94
96
|
{
|
|
95
|
-
variant: `_modals.inner.${
|
|
97
|
+
variant: `_modals.inner.${x}`,
|
|
96
98
|
sx: {
|
|
97
|
-
width:
|
|
98
|
-
borderRadius:
|
|
99
|
+
width: g,
|
|
100
|
+
borderRadius: w,
|
|
99
101
|
whiteSpace: "normal",
|
|
100
102
|
textAlign: "center",
|
|
101
103
|
display: "inline-block",
|
|
102
104
|
alignSelf: "top",
|
|
103
|
-
backgroundColor:
|
|
104
|
-
padding:
|
|
105
|
-
...
|
|
105
|
+
backgroundColor: m || "white",
|
|
106
|
+
padding: k,
|
|
107
|
+
...b
|
|
106
108
|
},
|
|
107
109
|
onClickOutside: () => {
|
|
108
|
-
|
|
110
|
+
j && o && o();
|
|
109
111
|
},
|
|
110
|
-
|
|
112
|
+
...n ? c(`${n}-inner-container`) : {},
|
|
113
|
+
children: I
|
|
111
114
|
}
|
|
112
115
|
),
|
|
113
|
-
|
|
116
|
+
h && /* @__PURE__ */ t.jsx(
|
|
114
117
|
H,
|
|
115
118
|
{
|
|
116
|
-
onClick:
|
|
119
|
+
onClick: o,
|
|
117
120
|
"data-testid": "x-icon",
|
|
118
121
|
sx: {
|
|
119
122
|
p: 0,
|
|
@@ -129,7 +132,7 @@ const r = 500, G = (d) => {
|
|
|
129
132
|
A,
|
|
130
133
|
{
|
|
131
134
|
style: {
|
|
132
|
-
fill:
|
|
135
|
+
fill: u || "#4568F9",
|
|
133
136
|
width: "20px",
|
|
134
137
|
height: "20px"
|
|
135
138
|
}
|
|
@@ -149,6 +152,6 @@ const r = 500, G = (d) => {
|
|
|
149
152
|
);
|
|
150
153
|
};
|
|
151
154
|
export {
|
|
152
|
-
|
|
155
|
+
K as Modal
|
|
153
156
|
};
|
|
154
157
|
//# sourceMappingURL=sd-component-library102.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sd-component-library102.js","sources":["../src/components/modals/modal/modal.tsx"],"sourcesContent":["import React, { useEffect, useRef, useState } from \"react\";\nimport { Transition } from \"react-transition-group\";\n\nimport { Box } from \"rebass\";\n\nimport { useBodyScrollLock } from \"../../../core/custom-hooks\";\nimport { isIOS } from \"../../../core/functions\";\nimport { OutsideClickBox } from \"../../boxes\";\nimport { Button } from \"../../buttons\";\nimport { FlexCenter } from \"../../containers\";\nimport { XIcon } from \"./assets\";\nimport { ModalProps } from \"./interfaces\";\n\nconst animationDuration = 500; // milliseconds\n\n/**\n * The modal container.\n */\nexport const Modal: React.FC<ModalProps> = (props) => {\n const {\n variant,\n children,\n containerBg,\n xIconColor,\n showXIcon = true,\n onClickX,\n coverBg = \"rgba(69,104,249, 0.4)\",\n width = \"auto\",\n isOpen,\n borderRadius = [\"5px\"],\n outerPadding = [\"30px\", \"auto\", \"150px\"],\n innerPadding = [\"40px 20px\", \"50px\"],\n popUpHeight = \"100%\",\n containerSx,\n innerSx,\n closeOnClickOutside = false,\n mountOnEnter = true,\n unmountOnExit,\n intermediateContainerSx,\n } = props;\n\n const ref = useRef<HTMLDivElement>(null);\n\n const [content, setContent] = useState<React.ReactNode>(null);\n\n useEffect(() => {\n let timer: NodeJS.Timeout;\n if (isOpen) {\n setContent(children);\n } else {\n timer = setTimeout(() => {\n setContent(null);\n }, animationDuration);\n }\n return () => clearTimeout(timer);\n }, [isOpen, children]);\n\n useBodyScrollLock(ref.current, isOpen && !isIOS());\n\n return (\n <Transition\n nodeRef={ref}\n in={isOpen}\n timeout={{\n enter: 0,\n exit: animationDuration,\n }}\n mountOnEnter={mountOnEnter}\n unmountOnExit={unmountOnExit}\n >\n {(state) => (\n /** This most outer container is the background */\n <Box\n sx={{\n width: \"100vw\",\n minHeight: \"100vh\",\n zIndex: \"150\",\n position: \"fixed\",\n overflowX: \"hidden\",\n overflowY: \"scroll\",\n top: 0,\n left: 0,\n bottom: 0,\n backgroundColor: coverBg,\n opacity: state === \"entered\" ? 1 : 0,\n transition: `opacity ${animationDuration}ms ease-in-out`,\n display: [\"entering\", \"entered\", \"exiting\"].includes(state)\n ? \"block\"\n : \"none\",\n ...containerSx,\n }}\n ref={ref}\n >\n {/** This following container is the frame of the whole screen, used\n * as an in-between relative-position container for the popup */}\n <FlexCenter\n sx={{\n position: \"relative\",\n width: \"100%\",\n height: popUpHeight,\n }}\n >\n {/** This following container is the complete popup,\n * as in contents and the X close icon */}\n <Box\n sx={{\n maxWidth: \"100vw\",\n zIndex: \"180\",\n margin: \"auto\",\n whiteSpace: \"nowrap\",\n padding: outerPadding,\n ...intermediateContainerSx,\n }}\n data-testid=\"modal\"\n >\n {/** This following container and its content is\n * the actual content of the popup */}\n <OutsideClickBox\n variant={`_modals.inner.${variant}`}\n sx={{\n width,\n borderRadius,\n whiteSpace: \"normal\",\n textAlign: \"center\",\n display: \"inline-block\",\n alignSelf: \"top\",\n backgroundColor: containerBg || \"white\",\n padding: innerPadding,\n ...innerSx,\n }}\n onClickOutside={() => {\n if (closeOnClickOutside && onClickX) {\n onClickX();\n }\n }}\n >\n {content}\n </OutsideClickBox>\n\n {/** This following container and its content is the X button */}\n {showXIcon && (\n <Button\n onClick={onClickX}\n data-testid=\"x-icon\"\n sx={{\n p: 0,\n bg: \"cl_transparent\",\n display: \"inline-block\",\n verticalAlign: \"top\",\n width: \"20px\",\n height: \"20px\",\n marginLeft: \"6px\",\n marginTop: \"4px\",\n }}\n >\n <XIcon\n style={{\n fill: xIconColor || \"#4568F9\",\n width: \"20px\",\n height: \"20px\",\n }}\n />\n </Button>\n )}\n </Box>\n </FlexCenter>\n </Box>\n )}\n </Transition>\n );\n};\n"],"names":["animationDuration","Modal","props","variant","children","containerBg","xIconColor","showXIcon","onClickX","coverBg","width","isOpen","borderRadius","outerPadding","innerPadding","popUpHeight","containerSx","innerSx","closeOnClickOutside","mountOnEnter","unmountOnExit","intermediateContainerSx","ref","useRef","content","setContent","useState","useEffect","timer","useBodyScrollLock","isIOS","jsx","Transition","state","Box","FlexCenter","jsxs","OutsideClickBox","Button","XIcon"],"mappings":";;;;;;;;;;AAaA,MAAMA,IAAoB,KAKbC,IAA8B,CAACC,MAAU;AAC9C,QAAA;AAAA,IACJ,SAAAC;AAAA,IACA,UAAAC;AAAA,IACA,aAAAC;AAAA,IACA,YAAAC;AAAA,IACA,WAAAC,IAAY;AAAA,IACZ,UAAAC;AAAA,IACA,SAAAC,IAAU;AAAA,IACV,OAAAC,IAAQ;AAAA,IACR,QAAAC;AAAA,IACA,cAAAC,IAAe,CAAC,KAAK;AAAA,IACrB,cAAAC,IAAe,CAAC,QAAQ,QAAQ,OAAO;AAAA,IACvC,cAAAC,IAAe,CAAC,aAAa,MAAM;AAAA,IACnC,aAAAC,IAAc;AAAA,IACd,aAAAC;AAAA,IACA,SAAAC;AAAA,IACA,qBAAAC,IAAsB;AAAA,IACtB,cAAAC,IAAe;AAAA,IACf,eAAAC;AAAA,IACA,yBAAAC;AAAA,EACE,
|
|
1
|
+
{"version":3,"file":"sd-component-library102.js","sources":["../src/components/modals/modal/modal.tsx"],"sourcesContent":["import React, { useEffect, useRef, useState } from \"react\";\nimport { Transition } from \"react-transition-group\";\n\nimport { Box } from \"rebass\";\n\nimport { useBodyScrollLock } from \"../../../core/custom-hooks\";\nimport { generateTestLocator, isIOS } from \"../../../core/functions\";\nimport { OutsideClickBox } from \"../../boxes\";\nimport { Button } from \"../../buttons\";\nimport { FlexCenter } from \"../../containers\";\nimport { XIcon } from \"./assets\";\nimport { ModalProps } from \"./interfaces\";\n\nconst animationDuration = 500; // milliseconds\n\n/**\n * The modal container.\n */\nexport const Modal: React.FC<ModalProps> = (props) => {\n const {\n variant,\n children,\n containerBg,\n xIconColor,\n showXIcon = true,\n onClickX,\n coverBg = \"rgba(69,104,249, 0.4)\",\n width = \"auto\",\n isOpen,\n borderRadius = [\"5px\"],\n outerPadding = [\"30px\", \"auto\", \"150px\"],\n innerPadding = [\"40px 20px\", \"50px\"],\n popUpHeight = \"100%\",\n containerSx,\n innerSx,\n closeOnClickOutside = false,\n mountOnEnter = true,\n unmountOnExit,\n intermediateContainerSx,\n testLocatorId,\n } = props;\n\n const ref = useRef<HTMLDivElement>(null);\n\n const [content, setContent] = useState<React.ReactNode>(null);\n\n useEffect(() => {\n let timer: NodeJS.Timeout;\n if (isOpen) {\n setContent(children);\n } else {\n timer = setTimeout(() => {\n setContent(null);\n }, animationDuration);\n }\n return () => clearTimeout(timer);\n }, [isOpen, children]);\n\n useBodyScrollLock(ref.current, isOpen && !isIOS());\n\n return (\n <Transition\n nodeRef={ref}\n in={isOpen}\n timeout={{\n enter: 0,\n exit: animationDuration,\n }}\n mountOnEnter={mountOnEnter}\n unmountOnExit={unmountOnExit}\n >\n {(state) => (\n /** This most outer container is the background */\n <Box\n sx={{\n width: \"100vw\",\n minHeight: \"100vh\",\n zIndex: \"150\",\n position: \"fixed\",\n overflowX: \"hidden\",\n overflowY: \"scroll\",\n top: 0,\n left: 0,\n bottom: 0,\n backgroundColor: coverBg,\n opacity: state === \"entered\" ? 1 : 0,\n transition: `opacity ${animationDuration}ms ease-in-out`,\n display: [\"entering\", \"entered\", \"exiting\"].includes(state)\n ? \"block\"\n : \"none\",\n ...containerSx,\n }}\n {...(testLocatorId\n ? generateTestLocator(`${testLocatorId}-outer-container`)\n : {})}\n ref={ref}\n >\n {/** This following container is the frame of the whole screen, used\n * as an in-between relative-position container for the popup */}\n <FlexCenter\n sx={{\n position: \"relative\",\n width: \"100%\",\n height: popUpHeight,\n }}\n >\n {/** This following container is the complete popup,\n * as in contents and the X close icon */}\n <Box\n sx={{\n maxWidth: \"100vw\",\n zIndex: \"180\",\n margin: \"auto\",\n whiteSpace: \"nowrap\",\n padding: outerPadding,\n ...intermediateContainerSx,\n }}\n data-testid=\"modal\"\n >\n {/** This following container and its content is\n * the actual content of the popup */}\n <OutsideClickBox\n variant={`_modals.inner.${variant}`}\n sx={{\n width,\n borderRadius,\n whiteSpace: \"normal\",\n textAlign: \"center\",\n display: \"inline-block\",\n alignSelf: \"top\",\n backgroundColor: containerBg || \"white\",\n padding: innerPadding,\n ...innerSx,\n }}\n onClickOutside={() => {\n if (closeOnClickOutside && onClickX) {\n onClickX();\n }\n }}\n {...(testLocatorId\n ? generateTestLocator(`${testLocatorId}-inner-container`)\n : {})}\n >\n {content}\n </OutsideClickBox>\n\n {/** This following container and its content is the X button */}\n {showXIcon && (\n <Button\n onClick={onClickX}\n data-testid=\"x-icon\"\n sx={{\n p: 0,\n bg: \"cl_transparent\",\n display: \"inline-block\",\n verticalAlign: \"top\",\n width: \"20px\",\n height: \"20px\",\n marginLeft: \"6px\",\n marginTop: \"4px\",\n }}\n >\n <XIcon\n style={{\n fill: xIconColor || \"#4568F9\",\n width: \"20px\",\n height: \"20px\",\n }}\n />\n </Button>\n )}\n </Box>\n </FlexCenter>\n </Box>\n )}\n </Transition>\n );\n};\n"],"names":["animationDuration","Modal","props","variant","children","containerBg","xIconColor","showXIcon","onClickX","coverBg","width","isOpen","borderRadius","outerPadding","innerPadding","popUpHeight","containerSx","innerSx","closeOnClickOutside","mountOnEnter","unmountOnExit","intermediateContainerSx","testLocatorId","ref","useRef","content","setContent","useState","useEffect","timer","useBodyScrollLock","isIOS","jsx","Transition","state","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GAAIc,IACDc,EAAoB,GAAGd,CAAa,kBAAkB,IACtD,CAAC;AAAA,0BAEJ,UAAAG;AAAA,wBAAA;AAAA,sBACH;AAAA,sBAGClB,KACCyB,gBAAAA,EAAA;AAAA,wBAACQ;AAAA,wBAAA;AAAA,0BACC,SAAShC;AAAA,0BACT,eAAY;AAAA,0BACZ,IAAI;AAAA,4BACF,GAAG;AAAA,4BACH,IAAI;AAAA,4BACJ,SAAS;AAAA,4BACT,eAAe;AAAA,4BACf,OAAO;AAAA,4BACP,QAAQ;AAAA,4BACR,YAAY;AAAA,4BACZ,WAAW;AAAA,0BACb;AAAA,0BAEA,UAAAwB,gBAAAA,EAAA;AAAA,4BAACS;AAAAA,4BAAA;AAAA,8BACC,OAAO;AAAA,gCACL,MAAMnC,KAAc;AAAA,gCACpB,OAAO;AAAA,gCACP,QAAQ;AAAA,8BACV;AAAA,4BAAA;AAAA,0BACF;AAAA,wBAAA;AAAA,sBACF;AAAA,oBAAA;AAAA,kBAAA;AAAA,gBAEJ;AAAA,cAAA;AAAA,YACF;AAAA,UAAA;AAAA,QACF;AAAA;AAAA,IAAA;AAAA,EAAA;AAIR;"}
|
|
@@ -3,7 +3,7 @@ import { useMemo as P } from "react";
|
|
|
3
3
|
import { Select as Z } from "@rebass/forms";
|
|
4
4
|
import { Box as q } from "rebass";
|
|
5
5
|
import { useDependantState as G } from "./sd-component-library3.js";
|
|
6
|
-
import { BaseLabel as J } from "./sd-component-
|
|
6
|
+
import { BaseLabel as J } from "./sd-component-library222.js";
|
|
7
7
|
import { MaxMaxContainer as K } from "./sd-component-library40.js";
|
|
8
8
|
import { ResponsiveTextV2 as Q } from "./sd-component-library150.js";
|
|
9
9
|
const U = (s, r, t, d, a, n) => {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { j as o } from "./sd-component-library197.js";
|
|
2
2
|
import { useState as x } from "react";
|
|
3
|
-
import { BaseLabel as f } from "./sd-component-
|
|
3
|
+
import { BaseLabel as f } from "./sd-component-library222.js";
|
|
4
4
|
import { OutsideClickBox as u } from "./sd-component-library12.js";
|
|
5
5
|
import { ReactComponent as h } from "./sd-component-library188.js";
|
|
6
6
|
import { SecondaryCustomSelectorOptionsBox as S } from "./sd-component-library261.js";
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { j as o } from "./sd-component-library197.js";
|
|
2
2
|
import { useState as x } from "react";
|
|
3
|
-
import { BaseLabel as f } from "./sd-component-
|
|
3
|
+
import { BaseLabel as f } from "./sd-component-library222.js";
|
|
4
4
|
import { ReactComponent as u } from "./sd-component-library188.js";
|
|
5
|
-
import { CustomScrollableOptionsBox as h } from "./sd-component-
|
|
5
|
+
import { CustomScrollableOptionsBox as h } from "./sd-component-library264.js";
|
|
6
6
|
import { GridContainerV2 as S } from "./sd-component-library38.js";
|
|
7
7
|
import { OutsideClickBox as b } from "./sd-component-library12.js";
|
|
8
8
|
import { ResponsiveTextV2 as C } from "./sd-component-library150.js";
|
|
@@ -2,9 +2,9 @@ import { j as o } from "./sd-component-library197.js";
|
|
|
2
2
|
import { useState as x } from "react";
|
|
3
3
|
import { Flex as i } from "rebass";
|
|
4
4
|
import { OutsideClickBox as d } from "./sd-component-library12.js";
|
|
5
|
-
import { BaseLabel as u } from "./sd-component-
|
|
5
|
+
import { BaseLabel as u } from "./sd-component-library222.js";
|
|
6
6
|
import { ReactComponent as f } from "./sd-component-library188.js";
|
|
7
|
-
import { CustomScrollableOptionsBox as h } from "./sd-component-
|
|
7
|
+
import { CustomScrollableOptionsBox as h } from "./sd-component-library263.js";
|
|
8
8
|
import { ResponsiveTextV2 as b } from "./sd-component-library150.js";
|
|
9
9
|
const w = (t) => {
|
|
10
10
|
const { leftSlot: s, label: l, value: n, width: c } = t, [e, r] = x(!1), p = () => r(!1), a = () => r((m) => !m);
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { j as t } from "./sd-component-library197.js";
|
|
2
2
|
import { IconButton as s } from "./sd-component-library23.js";
|
|
3
|
-
import { ReactComponent as c } from "./sd-component-
|
|
3
|
+
import { ReactComponent as c } from "./sd-component-library224.js";
|
|
4
4
|
import { EighteenBold as p } from "./sd-component-library141.js";
|
|
5
5
|
import { GridCenter as g } from "./sd-component-library41.js";
|
|
6
6
|
const C = ({
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { j as i } from "./sd-component-library197.js";
|
|
2
|
-
import { renderUpToFiveCrumbs as o, renderMoreThanFiveCrumbs as m } from "./sd-component-
|
|
2
|
+
import { renderUpToFiveCrumbs as o, renderMoreThanFiveCrumbs as m } from "./sd-component-library205.js";
|
|
3
3
|
import { GridCenter as d } from "./sd-component-library41.js";
|
|
4
4
|
const h = ({
|
|
5
5
|
textTransform: t,
|
|
@@ -4,7 +4,7 @@ import { Flex as s, Box as i } from "rebass";
|
|
|
4
4
|
import { useHover as m } from "./sd-component-library3.js";
|
|
5
5
|
import { ReactComponent as b } from "./sd-component-library188.js";
|
|
6
6
|
import { TriangularPointerIcon as u } from "./sd-component-library191.js";
|
|
7
|
-
import { ActionBox as g } from "./sd-component-
|
|
7
|
+
import { ActionBox as g } from "./sd-component-library251.js";
|
|
8
8
|
import { HorizontalDivider as n } from "./sd-component-library48.js";
|
|
9
9
|
const B = (x) => {
|
|
10
10
|
const {
|
|
@@ -1,6 +1,29 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
1
|
+
import { j as o } from "./sd-component-library197.js";
|
|
2
|
+
import { Box as m } from "rebass";
|
|
3
|
+
import { generateTestLocator as p } from "./sd-component-library4.js";
|
|
4
|
+
import { ReactComponent as f } from "./sd-component-library182.js";
|
|
5
|
+
const h = (t) => {
|
|
6
|
+
const { width: n, height: r, fill: e, stroke: i, icon: s } = t, a = s || f;
|
|
7
|
+
return /* @__PURE__ */ o.jsx(
|
|
8
|
+
m,
|
|
9
|
+
{
|
|
10
|
+
sx: {
|
|
11
|
+
width: n || 25,
|
|
12
|
+
height: r || 25,
|
|
13
|
+
fill: e || "purple",
|
|
14
|
+
stroke: i || "none",
|
|
15
|
+
animation: "rotation 2s infinite linear",
|
|
16
|
+
"@keyframes rotation ": {
|
|
17
|
+
from: { transform: "rotate(0deg)" },
|
|
18
|
+
to: { transform: "rotate(359deg)" }
|
|
19
|
+
}
|
|
20
|
+
},
|
|
21
|
+
...p("loading-spinner"),
|
|
22
|
+
children: /* @__PURE__ */ o.jsx(a, {})
|
|
23
|
+
}
|
|
24
|
+
);
|
|
25
|
+
};
|
|
3
26
|
export {
|
|
4
|
-
|
|
27
|
+
h as LoadingSpinner
|
|
5
28
|
};
|
|
6
29
|
//# sourceMappingURL=sd-component-library204.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sd-component-library204.js","sources":["../src/components/
|
|
1
|
+
{"version":3,"file":"sd-component-library204.js","sources":["../src/components/animations/loading-spinner/loading-spinner.tsx"],"sourcesContent":["import React from \"react\";\n\nimport { Box } from \"rebass\";\n\nimport { generateTestLocator } from \"../../../core/functions\";\nimport { RescanIcon } from \"../../icons\";\nimport { LoadingSpinnerProps as Props } from \"./interfaces\";\n\nexport const LoadingSpinner: React.FC<Props> = (props) => {\n const { width, height, fill, stroke, icon } = props;\n\n const IconComponent = icon || RescanIcon;\n\n return (\n <Box\n sx={{\n width: width || 25,\n height: height || 25,\n fill: fill || \"purple\",\n stroke: stroke || \"none\",\n animation: \"rotation 2s infinite linear\",\n\n \"@keyframes rotation \": {\n from: { transform: \"rotate(0deg)\" },\n to: { transform: \"rotate(359deg)\" },\n },\n }}\n {...generateTestLocator(\"loading-spinner\")}\n >\n <IconComponent />\n </Box>\n );\n};\n"],"names":["LoadingSpinner","props","width","height","fill","stroke","icon","IconComponent","RescanIcon","jsx","Box","generateTestLocator"],"mappings":";;;;AAQa,MAAAA,IAAkC,CAACC,MAAU;AACxD,QAAM,EAAE,OAAAC,GAAO,QAAAC,GAAQ,MAAAC,GAAM,QAAAC,GAAQ,MAAAC,EAAS,IAAAL,GAExCM,IAAgBD,KAAQE;AAG5B,SAAAC,gBAAAA,EAAA;AAAA,IAACC;AAAA,IAAA;AAAA,MACC,IAAI;AAAA,QACF,OAAOR,KAAS;AAAA,QAChB,QAAQC,KAAU;AAAA,QAClB,MAAMC,KAAQ;AAAA,QACd,QAAQC,KAAU;AAAA,QAClB,WAAW;AAAA,QAEX,wBAAwB;AAAA,UACtB,MAAM,EAAE,WAAW,eAAe;AAAA,UAClC,IAAI,EAAE,WAAW,iBAAiB;AAAA,QACpC;AAAA,MACF;AAAA,MACC,GAAGM,EAAoB,iBAAiB;AAAA,MAEzC,gCAACJ,GAAc,EAAA;AAAA,IAAA;AAAA,EAAA;AAGrB;"}
|
|
@@ -1,29 +1,60 @@
|
|
|
1
|
-
import { j as
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
1
|
+
import { j as t } from "./sd-component-library197.js";
|
|
2
|
+
import { Crumb as c } from "./sd-component-library17.js";
|
|
3
|
+
const l = (s, h, p) => s.map(({ title: e, dontTranslate: r, onClick: u }, o) => /* @__PURE__ */ t.jsx(
|
|
4
|
+
c,
|
|
5
|
+
{
|
|
6
|
+
variant: h,
|
|
7
|
+
crumb: { title: e, dontTranslate: r },
|
|
8
|
+
isLast: o === s.length - 1,
|
|
9
|
+
textTransform: p,
|
|
10
|
+
onClick: u
|
|
11
|
+
},
|
|
12
|
+
e + o
|
|
13
|
+
)), a = (s, h, p) => {
|
|
14
|
+
const e = [];
|
|
15
|
+
return s.slice(0, 2).forEach(({ title: r, dontTranslate: u, onClick: o }, m) => {
|
|
16
|
+
e.push(
|
|
17
|
+
/* @__PURE__ */ t.jsx(
|
|
18
|
+
c,
|
|
19
|
+
{
|
|
20
|
+
variant: h,
|
|
21
|
+
crumb: { title: r, dontTranslate: u },
|
|
22
|
+
isLast: !1,
|
|
23
|
+
textTransform: p,
|
|
24
|
+
onClick: o
|
|
25
|
+
},
|
|
26
|
+
r + m
|
|
27
|
+
)
|
|
28
|
+
);
|
|
29
|
+
}), e.push(
|
|
30
|
+
/* @__PURE__ */ t.jsx(
|
|
31
|
+
c,
|
|
32
|
+
{
|
|
33
|
+
variant: h,
|
|
34
|
+
crumb: { title: "..." },
|
|
35
|
+
isLast: !1,
|
|
36
|
+
textTransform: p
|
|
20
37
|
},
|
|
21
|
-
...
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
38
|
+
"..."
|
|
39
|
+
)
|
|
40
|
+
), s.slice(s.length - 2, s.length).forEach(({ title: r, onClick: u, dontTranslate: o }, m) => {
|
|
41
|
+
e.push(
|
|
42
|
+
/* @__PURE__ */ t.jsx(
|
|
43
|
+
c,
|
|
44
|
+
{
|
|
45
|
+
variant: h,
|
|
46
|
+
crumb: { title: r, dontTranslate: o },
|
|
47
|
+
isLast: m === 1,
|
|
48
|
+
textTransform: p,
|
|
49
|
+
onClick: u
|
|
50
|
+
},
|
|
51
|
+
r + m
|
|
52
|
+
)
|
|
53
|
+
);
|
|
54
|
+
}), e;
|
|
25
55
|
};
|
|
26
56
|
export {
|
|
27
|
-
|
|
57
|
+
a as renderMoreThanFiveCrumbs,
|
|
58
|
+
l as renderUpToFiveCrumbs
|
|
28
59
|
};
|
|
29
60
|
//# sourceMappingURL=sd-component-library205.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sd-component-library205.js","sources":["../src/components/
|
|
1
|
+
{"version":3,"file":"sd-component-library205.js","sources":["../src/components/breadcrumbs/breadcrumb/functions.tsx"],"sourcesContent":["import React, { CSSProperties } from \"react\";\n\nimport { Crumb, CrumbType } from \"./crumb\";\n\nexport const renderUpToFiveCrumbs = (\n crumbs: CrumbType[],\n variant: string | undefined,\n textTransform: CSSProperties[\"textTransform\"]\n) => {\n return crumbs.map(({ title, dontTranslate, onClick }, index: number) => (\n <Crumb\n variant={variant}\n crumb={{ title, dontTranslate }}\n isLast={index === crumbs.length - 1}\n key={title + index}\n textTransform={textTransform}\n onClick={onClick}\n />\n ));\n};\n\nexport const renderMoreThanFiveCrumbs = (\n crumbs: CrumbType[],\n variant: string | undefined,\n textTransform: CSSProperties[\"textTransform\"]\n) => {\n const elements: JSX.Element[] = [];\n\n crumbs\n .slice(0, 2)\n .forEach(({ title, dontTranslate, onClick }, index: number): void => {\n elements.push(\n <Crumb\n variant={variant}\n crumb={{ title, dontTranslate }}\n isLast={false}\n key={title + index}\n textTransform={textTransform}\n onClick={onClick}\n />\n );\n });\n elements.push(\n <Crumb\n variant={variant}\n crumb={{ title: \"...\" }}\n isLast={false}\n textTransform={textTransform}\n key=\"...\"\n />\n );\n\n crumbs\n .slice(crumbs.length - 2, crumbs.length)\n .forEach(({ title, onClick, dontTranslate }, index: number): void => {\n elements.push(\n <Crumb\n variant={variant}\n crumb={{ title, dontTranslate }}\n isLast={index === 1}\n key={title + index}\n textTransform={textTransform}\n onClick={onClick}\n />\n );\n });\n return elements;\n};\n"],"names":["renderUpToFiveCrumbs","crumbs","variant","textTransform","title","dontTranslate","onClick","index","jsx","Crumb","renderMoreThanFiveCrumbs","elements"],"mappings":";;AAIO,MAAMA,IAAuB,CAClCC,GACAC,GACAC,MAEOF,EAAO,IAAI,CAAC,EAAE,OAAAG,GAAO,eAAAC,GAAe,SAAAC,EAAA,GAAWC,MACpDC,gBAAAA,EAAA;AAAA,EAACC;AAAA,EAAA;AAAA,IACC,SAAAP;AAAA,IACA,OAAO,EAAE,OAAAE,GAAO,eAAAC,EAAc;AAAA,IAC9B,QAAQE,MAAUN,EAAO,SAAS;AAAA,IAElC,eAAAE;AAAA,IACA,SAAAG;AAAA,EAAA;AAAA,EAFKF,IAAQG;AAAA,CAIhB,GAGUG,IAA2B,CACtCT,GACAC,GACAC,MACG;AACH,QAAMQ,IAA0B,CAAA;AAG7B,SAAAV,EAAA,MAAM,GAAG,CAAC,EACV,QAAQ,CAAC,EAAE,OAAAG,GAAO,eAAAC,GAAe,SAAAC,EAAQ,GAAGC,MAAwB;AAC1D,IAAAI,EAAA;AAAA,MACPH,gBAAAA,EAAA;AAAA,QAACC;AAAA,QAAA;AAAA,UACC,SAAAP;AAAA,UACA,OAAO,EAAE,OAAAE,GAAO,eAAAC,EAAc;AAAA,UAC9B,QAAQ;AAAA,UAER,eAAAF;AAAA,UACA,SAAAG;AAAA,QAAA;AAAA,QAFKF,IAAQG;AAAA,MAGf;AAAA,IAAA;AAAA,EACF,CACD,GACMI,EAAA;AAAA,IACPH,gBAAAA,EAAA;AAAA,MAACC;AAAA,MAAA;AAAA,QACC,SAAAP;AAAA,QACA,OAAO,EAAE,OAAO,MAAM;AAAA,QACtB,QAAQ;AAAA,QACR,eAAAC;AAAA,MAAA;AAAA,MACI;AAAA,IACN;AAAA,EAAA,GAGFF,EACG,MAAMA,EAAO,SAAS,GAAGA,EAAO,MAAM,EACtC,QAAQ,CAAC,EAAE,OAAAG,GAAO,SAAAE,GAAS,eAAAD,EAAA,GAAiBE,MAAwB;AAC1D,IAAAI,EAAA;AAAA,MACPH,gBAAAA,EAAA;AAAA,QAACC;AAAA,QAAA;AAAA,UACC,SAAAP;AAAA,UACA,OAAO,EAAE,OAAAE,GAAO,eAAAC,EAAc;AAAA,UAC9B,QAAQE,MAAU;AAAA,UAElB,eAAAJ;AAAA,UACA,SAAAG;AAAA,QAAA;AAAA,QAFKF,IAAQG;AAAA,MAGf;AAAA,IAAA;AAAA,EACF,CACD,GACII;AACT;"}
|
|
@@ -1,6 +1,68 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
1
|
+
import { j as o } from "./sd-component-library197.js";
|
|
2
|
+
import d from "react";
|
|
3
|
+
import { Link as m } from "react-router-dom";
|
|
4
|
+
import { Box as n, Flex as f } from "rebass";
|
|
5
|
+
import { RegularText as h } from "./sd-component-library163.js";
|
|
6
|
+
import { PrimaryBadge as s } from "./sd-component-library9.js";
|
|
7
|
+
import { HorizontalDivider as c } from "./sd-component-library48.js";
|
|
8
|
+
const S = ({
|
|
9
|
+
searchResults: t,
|
|
10
|
+
useRouterLinks: i,
|
|
11
|
+
onResultClick: r
|
|
12
|
+
}) => /* @__PURE__ */ o.jsx(
|
|
13
|
+
n,
|
|
14
|
+
{
|
|
15
|
+
sx: {
|
|
16
|
+
position: "absolute",
|
|
17
|
+
top: "100%",
|
|
18
|
+
bg: "white",
|
|
19
|
+
width: "100%",
|
|
20
|
+
borderRadius: ["0", "0px 0px 3px 3px"],
|
|
21
|
+
borderWidth: "1px",
|
|
22
|
+
borderStyle: "solid",
|
|
23
|
+
borderTopStyle: "none",
|
|
24
|
+
borderColor: "#C8CCE5",
|
|
25
|
+
boxShadow: "2px 3px 10px rgba(211,223,255,0.25)"
|
|
26
|
+
},
|
|
27
|
+
children: t.map((e, p) => /* @__PURE__ */ o.jsxs(d.Fragment, { children: [
|
|
28
|
+
i ? /* @__PURE__ */ o.jsx(m, { to: e.url, style: { textDecoration: "none" }, children: /* @__PURE__ */ o.jsx(x, { ...e, onResultClick: r }) }) : /* @__PURE__ */ o.jsx(
|
|
29
|
+
x,
|
|
30
|
+
{
|
|
31
|
+
...e,
|
|
32
|
+
onResultClick: r,
|
|
33
|
+
onClick: () => window.location.href = `https://www.selfdecode.com${e.url}`
|
|
34
|
+
}
|
|
35
|
+
),
|
|
36
|
+
p + 1 !== t.length && /* @__PURE__ */ o.jsx(c, { color: "cl_lightGrey" })
|
|
37
|
+
] }, `${p}-${e.url}`))
|
|
38
|
+
}
|
|
39
|
+
), x = ({
|
|
40
|
+
onResultClick: t,
|
|
41
|
+
onClick: i,
|
|
42
|
+
...r
|
|
43
|
+
}) => {
|
|
44
|
+
const e = () => {
|
|
45
|
+
t == null || t(r), i == null || i();
|
|
46
|
+
};
|
|
47
|
+
return /* @__PURE__ */ o.jsxs(
|
|
48
|
+
f,
|
|
49
|
+
{
|
|
50
|
+
flexDirection: ["column-reverse", "row"],
|
|
51
|
+
justifyContent: "space-between",
|
|
52
|
+
sx: {
|
|
53
|
+
p: "10px 16px",
|
|
54
|
+
cursor: "pointer",
|
|
55
|
+
":hover": { bg: "#eff4ff" }
|
|
56
|
+
},
|
|
57
|
+
onClick: e,
|
|
58
|
+
children: [
|
|
59
|
+
/* @__PURE__ */ o.jsx(h, { fontSize: 16, children: r.text }),
|
|
60
|
+
!!r.type && /* @__PURE__ */ o.jsx(n, { width: "max-content", mb: ["8px", "0"], children: /* @__PURE__ */ o.jsx(s, { children: r.type }) })
|
|
61
|
+
]
|
|
62
|
+
}
|
|
63
|
+
);
|
|
64
|
+
};
|
|
3
65
|
export {
|
|
4
|
-
|
|
66
|
+
S as SearchBox
|
|
5
67
|
};
|
|
6
68
|
//# sourceMappingURL=sd-component-library215.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sd-component-library215.js","sources":["../src/components/inputs/search-input/
|
|
1
|
+
{"version":3,"file":"sd-component-library215.js","sources":["../src/components/inputs/search-input/search-box.tsx"],"sourcesContent":["import React from \"react\";\nimport { Link } from \"react-router-dom\";\n\nimport { Box, Flex } from \"rebass\";\n\nimport { PrimaryBadge } from \"../../badges\";\nimport { HorizontalDivider } from \"../../dividers\";\nimport { RegularText } from \"../../texts\";\nimport { SearchInputProps, SearchResult } from \"./index\";\n\ntype Props = Required<Pick<SearchInputProps, \"searchResults\">> &\n Pick<SearchInputProps, \"useRouterLinks\" | \"onResultClick\">;\n\nexport const SearchBox: React.FC<Props> = ({\n searchResults,\n useRouterLinks,\n onResultClick,\n}) => (\n <Box\n sx={{\n position: \"absolute\",\n top: \"100%\",\n bg: \"white\",\n width: \"100%\",\n borderRadius: [\"0\", \"0px 0px 3px 3px\"],\n borderWidth: \"1px\",\n borderStyle: \"solid\",\n borderTopStyle: \"none\",\n borderColor: \"#C8CCE5\",\n boxShadow: \"2px 3px 10px rgba(211,223,255,0.25)\",\n }}\n >\n {searchResults.map((result, index) => (\n <React.Fragment key={`${index}-${result.url}`}>\n {useRouterLinks ? (\n <Link to={result.url} style={{ textDecoration: \"none\" }}>\n <ResultContent {...result} onResultClick={onResultClick} />\n </Link>\n ) : (\n <ResultContent\n {...result}\n onResultClick={onResultClick}\n onClick={() =>\n (window.location.href = `https://www.selfdecode.com${result.url}`)\n }\n />\n )}\n {index + 1 !== searchResults.length && (\n <HorizontalDivider color=\"cl_lightGrey\" />\n )}\n </React.Fragment>\n ))}\n </Box>\n);\n\ntype ContentProps = SearchResult & { onClick?: () => void } & Pick<\n Props,\n \"onResultClick\"\n >;\nconst ResultContent: React.FC<ContentProps> = ({\n onResultClick,\n onClick: onClickExternal,\n ...result\n}) => {\n const onClick = () => {\n onResultClick?.(result);\n onClickExternal?.();\n };\n\n return (\n <Flex\n flexDirection={[\"column-reverse\", \"row\"]}\n justifyContent={\"space-between\"}\n sx={{\n p: \"10px 16px\",\n cursor: \"pointer\",\n \":hover\": { bg: \"#eff4ff\" },\n }}\n onClick={onClick}\n >\n <RegularText fontSize={16}>{result.text}</RegularText>\n\n {!!result.type && (\n <Box width={\"max-content\"} mb={[\"8px\", \"0\"]}>\n <PrimaryBadge>{result.type}</PrimaryBadge>\n </Box>\n )}\n </Flex>\n );\n};\n"],"names":["SearchBox","searchResults","useRouterLinks","onResultClick","jsx","Box","result","index","jsxs","React","Link","ResultContent","HorizontalDivider","onClickExternal","onClick","Flex","RegularText","PrimaryBadge"],"mappings":";;;;;;;AAaO,MAAMA,IAA6B,CAAC;AAAA,EACzC,eAAAC;AAAA,EACA,gBAAAC;AAAA,EACA,eAAAC;AACF,MACEC,gBAAAA,EAAA;AAAA,EAACC;AAAA,EAAA;AAAA,IACC,IAAI;AAAA,MACF,UAAU;AAAA,MACV,KAAK;AAAA,MACL,IAAI;AAAA,MACJ,OAAO;AAAA,MACP,cAAc,CAAC,KAAK,iBAAiB;AAAA,MACrC,aAAa;AAAA,MACb,aAAa;AAAA,MACb,gBAAgB;AAAA,MAChB,aAAa;A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ACxC,gCAACY,GAAc,EAAA,UAAAX,EAAO,KAAK,CAAA,GAC7B;AAAA,MAAA;AAAA,IAAA;AAAA,EAAA;AAIR;"}
|
|
@@ -1,55 +1,6 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
3
|
-
import { Box as t } from "rebass";
|
|
4
|
-
import { HorizontalDivider as i } from "./sd-component-library48.js";
|
|
5
|
-
import { SearchAutocompleteRow as a } from "./sd-component-library310.js";
|
|
6
|
-
const g = (l) => {
|
|
7
|
-
const { results: p, onSelect: s, rowHeight: e, rowsDisplayed: x } = l, c = (r) => () => s(r);
|
|
8
|
-
return /* @__PURE__ */ o.jsxs(
|
|
9
|
-
t,
|
|
10
|
-
{
|
|
11
|
-
sx: {
|
|
12
|
-
top: "calc(100% - 2px)",
|
|
13
|
-
left: 0,
|
|
14
|
-
position: "absolute",
|
|
15
|
-
width: "100%",
|
|
16
|
-
cursor: "pointer",
|
|
17
|
-
zIndex: 1
|
|
18
|
-
},
|
|
19
|
-
children: [
|
|
20
|
-
/* @__PURE__ */ o.jsx(i, { color: "cl_purple", height: "2px" }),
|
|
21
|
-
/* @__PURE__ */ o.jsx(
|
|
22
|
-
t,
|
|
23
|
-
{
|
|
24
|
-
sx: {
|
|
25
|
-
overflowY: "auto",
|
|
26
|
-
maxHeight: `${x * (e + 1) - 1}px`,
|
|
27
|
-
borderWidth: "1px",
|
|
28
|
-
borderStyle: "solid",
|
|
29
|
-
borderColor: "cl_lightGrey",
|
|
30
|
-
borderRadius: "0 0 3px 3px",
|
|
31
|
-
borderTopStyle: "none",
|
|
32
|
-
boxShadow: "2px 3px 10px rgba(211,223,255,0.25)",
|
|
33
|
-
bg: "cl_white"
|
|
34
|
-
},
|
|
35
|
-
children: p.map((r, d) => /* @__PURE__ */ o.jsxs(n.Fragment, { children: [
|
|
36
|
-
d !== 0 && /* @__PURE__ */ o.jsx(i, { color: "cl_headerLine" }),
|
|
37
|
-
/* @__PURE__ */ o.jsx(
|
|
38
|
-
a,
|
|
39
|
-
{
|
|
40
|
-
...r,
|
|
41
|
-
onClick: c(r),
|
|
42
|
-
height: e
|
|
43
|
-
}
|
|
44
|
-
)
|
|
45
|
-
] }, r.id))
|
|
46
|
-
}
|
|
47
|
-
)
|
|
48
|
-
]
|
|
49
|
-
}
|
|
50
|
-
);
|
|
51
|
-
};
|
|
1
|
+
import * as t from "react";
|
|
2
|
+
const a = (e) => /* @__PURE__ */ t.createElement("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 22 22.94", ...e }, /* @__PURE__ */ t.createElement("path", { d: "M2494.01,1419.91l-5.42-5.67a9.187,9.187,0,1,0-7.04,3.3,9.042,9.042,0,0,0,5.27-1.67l5.46,5.71a1.2,1.2,0,0,0,.87.37A1.2,1.2,0,0,0,2494.01,1419.91Zm-12.46-18.46a6.84,6.84,0,1,1-6.8,6.84A6.829,6.829,0,0,1,2481.55,1401.45Z", transform: "translate(-2472.34 -1399.03)" }));
|
|
52
3
|
export {
|
|
53
|
-
|
|
4
|
+
a as ReactComponent
|
|
54
5
|
};
|
|
55
6
|
//# sourceMappingURL=sd-component-library216.js.map
|