@selfdecode/sd-component-library 4.0.97 → 4.0.99
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/checkboxes/checkbox-v2/interfaces.d.ts +1 -0
- package/lib/components/utils/anchor/interfaces.d.ts +4 -0
- package/lib/sd-component-library127.js +1 -1
- package/lib/sd-component-library128.js +1 -1
- package/lib/sd-component-library130.js +1 -1
- package/lib/sd-component-library134.js +3 -3
- package/lib/sd-component-library135.js +1 -1
- package/lib/sd-component-library137.js +2 -2
- package/lib/sd-component-library15.js +1 -1
- package/lib/sd-component-library173.js +3 -3
- package/lib/sd-component-library174.js +12 -11
- package/lib/sd-component-library174.js.map +1 -1
- package/lib/sd-component-library202.js +1 -1
- package/lib/sd-component-library203.js +1 -1
- package/lib/sd-component-library204.js +57 -3
- package/lib/sd-component-library204.js.map +1 -1
- package/lib/sd-component-library205.js +3 -57
- package/lib/sd-component-library205.js.map +1 -1
- package/lib/sd-component-library206.js +17 -24
- package/lib/sd-component-library206.js.map +1 -1
- package/lib/sd-component-library207.js +20 -18
- package/lib/sd-component-library207.js.map +1 -1
- package/lib/sd-component-library208.js +3 -5
- package/lib/sd-component-library208.js.map +1 -1
- package/lib/sd-component-library209.js +3 -5
- package/lib/sd-component-library209.js.map +1 -1
- package/lib/sd-component-library210.js +24 -17
- package/lib/sd-component-library210.js.map +1 -1
- package/lib/sd-component-library211.js +15 -60
- package/lib/sd-component-library211.js.map +1 -1
- package/lib/sd-component-library212.js +5 -23
- package/lib/sd-component-library212.js.map +1 -1
- package/lib/sd-component-library213.js +5 -21
- package/lib/sd-component-library213.js.map +1 -1
- package/lib/sd-component-library214.js +64 -3
- package/lib/sd-component-library214.js.map +1 -1
- package/lib/sd-component-library215.js +23 -3
- package/lib/sd-component-library215.js.map +1 -1
- package/lib/sd-component-library217.js +1 -1
- package/lib/sd-component-library222.js +3 -65
- 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-library224.js +65 -3
- package/lib/sd-component-library224.js.map +1 -1
- package/lib/sd-component-library225.js +3 -52
- package/lib/sd-component-library225.js.map +1 -1
- package/lib/sd-component-library23.js +2 -2
- package/lib/sd-component-library233.js +1 -1
- package/lib/sd-component-library234.js +1 -1
- package/lib/sd-component-library236.js +1 -1
- package/lib/sd-component-library24.js +2 -2
- package/lib/sd-component-library240.js +1 -1
- package/lib/sd-component-library242.js +1 -1
- package/lib/sd-component-library244.js +1 -1
- package/lib/sd-component-library25.js +1 -1
- package/lib/sd-component-library266.js +52 -54
- package/lib/sd-component-library266.js.map +1 -1
- package/lib/sd-component-library267.js +54 -52
- package/lib/sd-component-library267.js.map +1 -1
- package/lib/sd-component-library268.js +30 -122
- package/lib/sd-component-library268.js.map +1 -1
- package/lib/sd-component-library269.js +20 -9
- package/lib/sd-component-library269.js.map +1 -1
- package/lib/sd-component-library270.js +116 -41
- package/lib/sd-component-library270.js.map +1 -1
- package/lib/sd-component-library271.js +122 -30
- package/lib/sd-component-library271.js.map +1 -1
- package/lib/sd-component-library272.js +9 -20
- package/lib/sd-component-library272.js.map +1 -1
- package/lib/sd-component-library273.js +41 -116
- package/lib/sd-component-library273.js.map +1 -1
- package/lib/sd-component-library275.js +49 -2
- package/lib/sd-component-library275.js.map +1 -1
- package/lib/sd-component-library276.js +51 -2
- package/lib/sd-component-library276.js.map +1 -1
- package/lib/sd-component-library277.js +87 -48
- package/lib/sd-component-library277.js.map +1 -1
- package/lib/sd-component-library278.js +54 -52
- package/lib/sd-component-library278.js.map +1 -1
- package/lib/sd-component-library279.js +2 -92
- package/lib/sd-component-library279.js.map +1 -1
- package/lib/sd-component-library280.js +2 -49
- package/lib/sd-component-library280.js.map +1 -1
- package/lib/sd-component-library281.js +10 -6
- package/lib/sd-component-library281.js.map +1 -1
- package/lib/sd-component-library287.js +6 -10
- package/lib/sd-component-library287.js.map +1 -1
- package/lib/sd-component-library290.js +1 -1
- package/lib/sd-component-library314.js +87 -20
- package/lib/sd-component-library314.js.map +1 -1
- package/lib/sd-component-library315.js +20 -87
- package/lib/sd-component-library315.js.map +1 -1
- package/lib/sd-component-library316.js +25 -51
- package/lib/sd-component-library316.js.map +1 -1
- package/lib/sd-component-library318.js +51 -25
- package/lib/sd-component-library318.js.map +1 -1
- package/lib/sd-component-library32.js +24 -23
- package/lib/sd-component-library32.js.map +1 -1
- package/lib/sd-component-library49.js +1 -1
- package/lib/sd-component-library5.js +1 -1
- package/lib/sd-component-library50.js +1 -1
- package/lib/sd-component-library52.js +3 -3
- package/lib/sd-component-library53.js +2 -2
- package/lib/sd-component-library54.js +2 -2
- package/lib/sd-component-library6.js +1 -1
- package/lib/sd-component-library64.js +1 -1
- package/lib/sd-component-library65.js +1 -1
- package/lib/sd-component-library75.js +2 -2
- package/lib/sd-component-library76.js +3 -3
- package/lib/sd-component-library80.js +1 -1
- package/package.json +2 -2
|
@@ -1,24 +1,13 @@
|
|
|
1
|
-
import { j as
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
position: "absolute",
|
|
10
|
-
top: 0,
|
|
11
|
-
left: t === "left" ? o : void 0,
|
|
12
|
-
right: t === "right" ? o : void 0,
|
|
13
|
-
height: "100%",
|
|
14
|
-
width: s,
|
|
15
|
-
background: `transparent linear-gradient(-90deg, ${t === "left" ? a : r} 0%, ${t === "right" ? a : r} 100%) 0% 0% no-repeat padding-box`,
|
|
16
|
-
opacity: 0.05
|
|
17
|
-
}
|
|
18
|
-
}
|
|
19
|
-
);
|
|
1
|
+
import { j as c } from "./sd-component-library197.js";
|
|
2
|
+
import { useRef as f, useEffect as n } from "react";
|
|
3
|
+
import { Box as p } from "rebass";
|
|
4
|
+
const m = (l) => {
|
|
5
|
+
const { hash: e, selectedTab: t, autoScrollTabs: o, scrollTabOnSelect: a, children: s } = l, r = f(null);
|
|
6
|
+
return n(() => {
|
|
7
|
+
o && t === e && r.current && a(r);
|
|
8
|
+
}, [t, e, o, r, a]), /* @__PURE__ */ c.jsx(p, { "data-test": "scrollable-tab-wrapper", ref: r, children: s });
|
|
20
9
|
};
|
|
21
10
|
export {
|
|
22
|
-
|
|
11
|
+
m as ScrollableTabWrapper
|
|
23
12
|
};
|
|
24
13
|
//# sourceMappingURL=sd-component-library272.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sd-component-library272.js","sources":["../src/components/tabs/
|
|
1
|
+
{"version":3,"file":"sd-component-library272.js","sources":["../src/components/tabs/tabs-menu/partials/scrollable-tab-wrapper/scrollable-tab-wrapper.tsx"],"sourcesContent":["import React, { useEffect, useRef } from \"react\";\n\nimport { Box } from \"rebass\";\n\nimport { ScrollableTabWrapperProps as Props } from \"./interfaces\";\n\nexport const ScrollableTabWrapper: React.FC<Props> = (props) => {\n const { hash, selectedTab, autoScrollTabs, scrollTabOnSelect, children } =\n props;\n\n const tabRef = useRef<HTMLDivElement>(null);\n\n useEffect(() => {\n if (!autoScrollTabs) return;\n\n /**\n * If current tab is the selected one, call the callback to scroll the tab.\n */\n if (selectedTab === hash && tabRef.current) {\n scrollTabOnSelect(tabRef);\n }\n }, [selectedTab, hash, autoScrollTabs, tabRef, scrollTabOnSelect]);\n\n return (\n <Box data-test=\"scrollable-tab-wrapper\" ref={tabRef}>\n {children}\n </Box>\n );\n};\n"],"names":["ScrollableTabWrapper","props","hash","selectedTab","autoScrollTabs","scrollTabOnSelect","children","tabRef","useRef","useEffect","Box"],"mappings":";;;AAMa,MAAAA,IAAwC,CAACC,MAAU;AAC9D,QAAM,EAAE,MAAAC,GAAM,aAAAC,GAAa,gBAAAC,GAAgB,mBAAAC,GAAmB,UAAAC,EAC5D,IAAAL,GAEIM,IAASC,EAAuB,IAAI;AAE1C,SAAAC,EAAU,MAAM;AACd,IAAKL,KAKDD,MAAgBD,KAAQK,EAAO,WACjCF,EAAkBE,CAAM;AAAA,EAC1B,GACC,CAACJ,GAAaD,GAAME,GAAgBG,GAAQF,CAAiB,CAAC,yBAG9DK,GAAI,EAAA,aAAU,0BAAyB,KAAKH,GAC1C,UAAAD,EACH,CAAA;AAEJ;"}
|
|
@@ -1,128 +1,53 @@
|
|
|
1
|
-
import { j as
|
|
2
|
-
import {
|
|
3
|
-
import { Button as
|
|
4
|
-
import {
|
|
5
|
-
const
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
);
|
|
22
|
-
function E({
|
|
23
|
-
width: n,
|
|
24
|
-
height: s,
|
|
25
|
-
label: r,
|
|
26
|
-
secondaryText: x,
|
|
27
|
-
icon: p,
|
|
28
|
-
id: d,
|
|
29
|
-
onClick: h,
|
|
30
|
-
selected: i = !1,
|
|
31
|
-
activeColor: e = "cl_purple",
|
|
32
|
-
color: l = "cl_darkGrey",
|
|
33
|
-
tabPadding: u,
|
|
34
|
-
bg: o = "cl_transparent",
|
|
35
|
-
activeBg: c = "cl_transparent",
|
|
36
|
-
activeRibbonColor: b,
|
|
37
|
-
borderRadius: j = "4px",
|
|
38
|
-
tabHeaderComponent: a,
|
|
39
|
-
elementId: g,
|
|
40
|
-
maxWidth: _,
|
|
41
|
-
labelSx: R,
|
|
42
|
-
secondaryTextSx: S,
|
|
43
|
-
containerSx: w
|
|
44
|
-
}) {
|
|
45
|
-
const T = a ? i ? c : o : b || e;
|
|
46
|
-
return /* @__PURE__ */ t.jsxs(
|
|
47
|
-
f,
|
|
1
|
+
import { j as o } from "./sd-component-library197.js";
|
|
2
|
+
import { ThirteenBold as h } from "./sd-component-library155.js";
|
|
3
|
+
import { Button as m } from "./sd-component-library25.js";
|
|
4
|
+
import { MaxMaxContainer as d } from "./sd-component-library41.js";
|
|
5
|
+
const T = (s) => {
|
|
6
|
+
const {
|
|
7
|
+
Icon: i,
|
|
8
|
+
iconHeight: n,
|
|
9
|
+
title: l,
|
|
10
|
+
isActive: r,
|
|
11
|
+
hash: t,
|
|
12
|
+
onTabSelect: c,
|
|
13
|
+
enableScroll: a,
|
|
14
|
+
activeColor: e,
|
|
15
|
+
history: p
|
|
16
|
+
} = s, x = a ? {
|
|
17
|
+
scrollTo: t
|
|
18
|
+
} : {};
|
|
19
|
+
return /* @__PURE__ */ o.jsx(
|
|
20
|
+
m,
|
|
48
21
|
{
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
/* @__PURE__ */ t.jsxs(
|
|
58
|
-
y,
|
|
22
|
+
bg: "transparent",
|
|
23
|
+
onClick: () => c(t),
|
|
24
|
+
history: p,
|
|
25
|
+
"data-testid": `tab-${t}`,
|
|
26
|
+
...x,
|
|
27
|
+
children: /* @__PURE__ */ o.jsxs(d, { gap: ["15px", "20px"], children: [
|
|
28
|
+
/* @__PURE__ */ o.jsx(
|
|
29
|
+
i,
|
|
59
30
|
{
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
onClick: h,
|
|
65
|
-
borderRadius: j,
|
|
66
|
-
"data-testid": `tab-${d}`,
|
|
67
|
-
padding: u,
|
|
68
|
-
disabled: i,
|
|
69
|
-
display: "flex",
|
|
70
|
-
children: [
|
|
71
|
-
r && /* @__PURE__ */ t.jsx(
|
|
72
|
-
m,
|
|
73
|
-
{
|
|
74
|
-
fontSizeWeight: [[13, "bold"]],
|
|
75
|
-
sx: {
|
|
76
|
-
letterSpacing: "1.3px",
|
|
77
|
-
textTransform: "uppercase",
|
|
78
|
-
...R
|
|
79
|
-
},
|
|
80
|
-
"data-testid": "tab-text",
|
|
81
|
-
color: i ? e : l,
|
|
82
|
-
children: r
|
|
83
|
-
}
|
|
84
|
-
),
|
|
85
|
-
x && /* @__PURE__ */ t.jsx(
|
|
86
|
-
m,
|
|
87
|
-
{
|
|
88
|
-
fontSizeWeight: [[10, "semi-bold"]],
|
|
89
|
-
sx: {
|
|
90
|
-
letterSpacing: "1px",
|
|
91
|
-
textTransform: "uppercase",
|
|
92
|
-
...S
|
|
93
|
-
},
|
|
94
|
-
color: i ? e : l,
|
|
95
|
-
children: x
|
|
96
|
-
}
|
|
97
|
-
),
|
|
98
|
-
p && /* @__PURE__ */ t.jsx(
|
|
99
|
-
f,
|
|
100
|
-
{
|
|
101
|
-
height: "16px",
|
|
102
|
-
flexDirection: "column",
|
|
103
|
-
justifyContent: "space-between",
|
|
104
|
-
ml: "10px",
|
|
105
|
-
children: p
|
|
106
|
-
}
|
|
107
|
-
),
|
|
108
|
-
a
|
|
109
|
-
]
|
|
31
|
+
style: {
|
|
32
|
+
height: n,
|
|
33
|
+
fill: r ? e : "#434A54"
|
|
34
|
+
}
|
|
110
35
|
}
|
|
111
36
|
),
|
|
112
|
-
/* @__PURE__ */
|
|
113
|
-
|
|
37
|
+
/* @__PURE__ */ o.jsx(
|
|
38
|
+
h,
|
|
114
39
|
{
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
40
|
+
textTransform: "uppercase",
|
|
41
|
+
color: r ? e : "#434A54",
|
|
42
|
+
cursor: "pointer",
|
|
43
|
+
children: l
|
|
118
44
|
}
|
|
119
45
|
)
|
|
120
|
-
]
|
|
46
|
+
] })
|
|
121
47
|
}
|
|
122
48
|
);
|
|
123
|
-
}
|
|
49
|
+
};
|
|
124
50
|
export {
|
|
125
|
-
|
|
126
|
-
E as Tab
|
|
51
|
+
T as Tab
|
|
127
52
|
};
|
|
128
53
|
//# sourceMappingURL=sd-component-library273.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sd-component-library273.js","sources":["../src/components/tabs/
|
|
1
|
+
{"version":3,"file":"sd-component-library273.js","sources":["../src/components/tabs/tabs-menu/partials/tab/tab.tsx"],"sourcesContent":["import React from \"react\";\n\nimport { Button, MaxMaxContainer, ThirteenBold } from \"../../../../..\";\nimport { TabProps } from \"./interfaces\";\n\n/**\n * Tab component to render a single tab button.\n */\nexport const Tab: React.FC<TabProps> = (props) => {\n const {\n Icon,\n iconHeight,\n title,\n isActive,\n hash,\n onTabSelect,\n enableScroll,\n activeColor,\n history,\n } = props;\n\n const scrollProps = enableScroll\n ? {\n scrollTo: hash,\n }\n : {};\n\n return (\n <Button\n bg=\"transparent\"\n onClick={() => onTabSelect(hash)}\n history={history}\n data-testid={`tab-${hash}`}\n {...scrollProps}\n >\n <MaxMaxContainer gap={[\"15px\", \"20px\"]}>\n <Icon\n style={{\n height: iconHeight,\n fill: isActive ? activeColor : \"#434A54\",\n }}\n />\n <ThirteenBold\n textTransform=\"uppercase\"\n color={isActive ? activeColor : \"#434A54\"}\n cursor=\"pointer\"\n >\n {title}\n </ThirteenBold>\n </MaxMaxContainer>\n </Button>\n );\n};\n"],"names":["Tab","props","Icon","iconHeight","title","isActive","hash","onTabSelect","enableScroll","activeColor","history","scrollProps","jsx","Button","MaxMaxContainer","ThirteenBold"],"mappings":";;;;AAQa,MAAAA,IAA0B,CAACC,MAAU;AAC1C,QAAA;AAAA,IACJ,MAAAC;AAAA,IACA,YAAAC;AAAA,IACA,OAAAC;AAAA,IACA,UAAAC;AAAA,IACA,MAAAC;AAAA,IACA,aAAAC;AAAA,IACA,cAAAC;AAAA,IACA,aAAAC;AAAA,IACA,SAAAC;AAAA,EACE,IAAAT,GAEEU,IAAcH,IAChB;AAAA,IACE,UAAUF;AAAA,MAEZ;AAGF,SAAAM,gBAAAA,EAAA;AAAA,IAACC;AAAA,IAAA;AAAA,MACC,IAAG;AAAA,MACH,SAAS,MAAMN,EAAYD,CAAI;AAAA,MAC/B,SAAAI;AAAA,MACA,eAAa,OAAOJ,CAAI;AAAA,MACvB,GAAGK;AAAA,MAEJ,iCAACG,GAAgB,EAAA,KAAK,CAAC,QAAQ,MAAM,GACnC,UAAA;AAAA,QAAAF,gBAAAA,EAAA;AAAA,UAACV;AAAA,UAAA;AAAA,YACC,OAAO;AAAA,cACL,QAAQC;AAAA,cACR,MAAME,IAAWI,IAAc;AAAA,YACjC;AAAA,UAAA;AAAA,QACF;AAAA,QACAG,gBAAAA,EAAA;AAAA,UAACG;AAAA,UAAA;AAAA,YACC,eAAc;AAAA,YACd,OAAOV,IAAWI,IAAc;AAAA,YAChC,QAAO;AAAA,YAEN,UAAAL;AAAA,UAAA;AAAA,QACH;AAAA,MAAA,GACF;AAAA,IAAA;AAAA,EAAA;AAGN;"}
|
|
@@ -1,5 +1,52 @@
|
|
|
1
|
-
var
|
|
1
|
+
var n = Object.defineProperty;
|
|
2
|
+
var R = (t, e, s) => e in t ? n(t, e, { enumerable: !0, configurable: !0, writable: !0, value: s }) : t[e] = s;
|
|
3
|
+
var i = (t, e, s) => (R(t, typeof e != "symbol" ? e + "" : e, s), s);
|
|
4
|
+
class h {
|
|
5
|
+
constructor() {
|
|
6
|
+
i(this, "refRegistry", {});
|
|
7
|
+
}
|
|
8
|
+
/**
|
|
9
|
+
* Check if ref is registered for a component with provided ID.
|
|
10
|
+
* @param id ID for the component.
|
|
11
|
+
*/
|
|
12
|
+
doesRefExist(e) {
|
|
13
|
+
return !!this.refRegistry[e];
|
|
14
|
+
}
|
|
15
|
+
/**
|
|
16
|
+
* Register a ref.
|
|
17
|
+
*
|
|
18
|
+
* @param id ID for the component.
|
|
19
|
+
* @param ref React Ref object for the component. Used for scrolling.
|
|
20
|
+
*/
|
|
21
|
+
addRef(e, s) {
|
|
22
|
+
const r = e.startsWith("#") ? e : `#${e}`;
|
|
23
|
+
this.refRegistry[r] = s;
|
|
24
|
+
}
|
|
25
|
+
/**
|
|
26
|
+
* Remove a ref from registry.
|
|
27
|
+
*
|
|
28
|
+
* @param id ID for the component.
|
|
29
|
+
*/
|
|
30
|
+
removeRef(e) {
|
|
31
|
+
this.doesRefExist(e) ? delete this.refRegistry[e] : console.error(`Ref with ID ${e} does not exist in the registry`);
|
|
32
|
+
}
|
|
33
|
+
/**
|
|
34
|
+
* Scroll the component with provided ID into the view.
|
|
35
|
+
*
|
|
36
|
+
* @param id ID for the component.
|
|
37
|
+
* @param behavior Scroll behavior.
|
|
38
|
+
*/
|
|
39
|
+
scrollToRef(e, { behavior: s = "smooth", block: r, inline: f }) {
|
|
40
|
+
var o;
|
|
41
|
+
this.doesRefExist(e) ? (o = this.refRegistry[e].current) == null || o.scrollIntoView({
|
|
42
|
+
behavior: s,
|
|
43
|
+
block: r,
|
|
44
|
+
inline: f
|
|
45
|
+
}) : console.error(`Ref with ID ${e} does not exist in the registry`);
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
const g = new h();
|
|
2
49
|
export {
|
|
3
|
-
|
|
50
|
+
g as refsManager
|
|
4
51
|
};
|
|
5
52
|
//# sourceMappingURL=sd-component-library275.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sd-component-library275.js","sources":[],"sourcesContent":[],"names":[],"mappings":";"}
|
|
1
|
+
{"version":3,"file":"sd-component-library275.js","sources":["../src/components/utils/anchor/refs-manager.ts"],"sourcesContent":["import React from \"react\";\n\nimport { refsMap } from \"./interfaces\";\n\n/**\n * Refs Manager class to keep record of registered refs on the page.\n */\nclass RefsManager {\n refRegistry: refsMap = {};\n\n /**\n * Check if ref is registered for a component with provided ID.\n * @param id ID for the component.\n */\n public doesRefExist(id: string) {\n return !!this.refRegistry[id];\n }\n\n /**\n * Register a ref.\n *\n * @param id ID for the component.\n * @param ref React Ref object for the component. Used for scrolling.\n */\n public addRef(\n id: string,\n ref: React.MutableRefObject<HTMLDivElement | undefined>\n ) {\n const key = id.startsWith(\"#\") ? id : `#${id}`;\n\n this.refRegistry[key] = ref;\n }\n\n /**\n * Remove a ref from registry.\n *\n * @param id ID for the component.\n */\n public removeRef(id: string) {\n if (this.doesRefExist(id)) delete this.refRegistry[id];\n else console.error(`Ref with ID ${id} does not exist in the registry`);\n }\n\n /**\n * Scroll the component with provided ID into the view.\n *\n * @param id ID for the component.\n * @param behavior Scroll behavior.\n */\n public scrollToRef(\n id: string,\n { behavior = \"smooth\", block, inline }: ScrollIntoViewOptions\n ) {\n if (this.doesRefExist(id))\n this.refRegistry[id].current?.scrollIntoView({\n behavior,\n block,\n inline,\n });\n else console.error(`Ref with ID ${id} does not exist in the registry`);\n }\n}\n\nexport const refsManager = new RefsManager();\n"],"names":["RefsManager","__publicField","id","ref","key","behavior","block","inline","_a","refsManager"],"mappings":";;;AAOA,MAAMA,EAAY;AAAA,EAAlB;AACE,IAAAC,EAAA,qBAAuB,CAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAMhB,aAAaC,GAAY;AAC9B,WAAO,CAAC,CAAC,KAAK,YAAYA,CAAE;AAAA,EAC9B;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAQO,OACLA,GACAC,GACA;AACA,UAAMC,IAAMF,EAAG,WAAW,GAAG,IAAIA,IAAK,IAAIA,CAAE;AAEvC,SAAA,YAAYE,CAAG,IAAID;AAAA,EAC1B;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAOO,UAAUD,GAAY;AACvB,IAAA,KAAK,aAAaA,CAAE,IAAU,OAAA,KAAK,YAAYA,CAAE,IACxC,QAAA,MAAM,eAAeA,CAAE,iCAAiC;AAAA,EACvE;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAQO,YACLA,GACA,EAAE,UAAAG,IAAW,UAAU,OAAAC,GAAO,QAAAC,KAC9B;AA7CJ,QAAAC;AA8CQ,IAAA,KAAK,aAAaN,CAAE,KACtBM,IAAA,KAAK,YAAYN,CAAE,EAAE,YAArB,QAAAM,EAA8B,eAAe;AAAA,MAC3C,UAAAH;AAAA,MACA,OAAAC;AAAA,MACA,QAAAC;AAAA,IAAA,KAES,QAAA,MAAM,eAAeL,CAAE,iCAAiC;AAAA,EACvE;AACF;AAEa,MAAAO,IAAc,IAAIT,EAAY;"}
|
|
@@ -1,5 +1,54 @@
|
|
|
1
|
-
|
|
1
|
+
import { j as i } from "./sd-component-library197.js";
|
|
2
|
+
import d from "react";
|
|
3
|
+
import { FlexCenter as e } from "./sd-component-library35.js";
|
|
4
|
+
import { ResponsiveTextV2 as r } from "./sd-component-library151.js";
|
|
5
|
+
import { HorizontalDivider as m } from "./sd-component-library49.js";
|
|
6
|
+
const g = d.forwardRef(
|
|
7
|
+
({ mobileTitle: t, tooltipWidth: o, tooltipText: x, zIndex: h, pointerColor: n }, p) => /* @__PURE__ */ i.jsx(
|
|
8
|
+
e,
|
|
9
|
+
{
|
|
10
|
+
sx: {
|
|
11
|
+
position: "fixed",
|
|
12
|
+
top: 0,
|
|
13
|
+
left: 0,
|
|
14
|
+
width: "100vw",
|
|
15
|
+
height: "100vh",
|
|
16
|
+
bg: "#262626AA",
|
|
17
|
+
zIndex: h
|
|
18
|
+
},
|
|
19
|
+
ref: p,
|
|
20
|
+
children: /* @__PURE__ */ i.jsxs(
|
|
21
|
+
e,
|
|
22
|
+
{
|
|
23
|
+
flexDirection: "column",
|
|
24
|
+
sx: {
|
|
25
|
+
width: o,
|
|
26
|
+
maxWidth: "min(500px, calc(100vw - 30px))",
|
|
27
|
+
bg: "cl_white",
|
|
28
|
+
p: "20px",
|
|
29
|
+
borderRadius: "5px"
|
|
30
|
+
},
|
|
31
|
+
children: [
|
|
32
|
+
t && /* @__PURE__ */ i.jsxs(i.Fragment, { children: [
|
|
33
|
+
/* @__PURE__ */ i.jsx(r, { maxWidth: "100%", fontSizeWeight: [16, "bold"], children: t }),
|
|
34
|
+
/* @__PURE__ */ i.jsx(
|
|
35
|
+
m,
|
|
36
|
+
{
|
|
37
|
+
width: "min(50px, calc(100% - 40px))",
|
|
38
|
+
color: n,
|
|
39
|
+
height: "2px",
|
|
40
|
+
m: "10px 0"
|
|
41
|
+
}
|
|
42
|
+
)
|
|
43
|
+
] }),
|
|
44
|
+
/* @__PURE__ */ i.jsx(r, { maxWidth: "100%", fontSizeWeight: [14, "regular"], children: x })
|
|
45
|
+
]
|
|
46
|
+
}
|
|
47
|
+
)
|
|
48
|
+
}
|
|
49
|
+
)
|
|
50
|
+
);
|
|
2
51
|
export {
|
|
3
|
-
|
|
52
|
+
g as TooltipWithPointerMobile
|
|
4
53
|
};
|
|
5
54
|
//# sourceMappingURL=sd-component-library276.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sd-component-library276.js","sources":[],"sourcesContent":[],"names":[],"mappings":";"}
|
|
1
|
+
{"version":3,"file":"sd-component-library276.js","sources":["../src/components/tooltips/tooltip-with-pointer/partials/tooltip-with-pointer-mobile/tooltip-with-pointer-mobile.tsx"],"sourcesContent":["import React from \"react\";\n\nimport { FlexCenter } from \"../../../../containers\";\nimport { HorizontalDivider } from \"../../../../dividers\";\nimport { ResponsiveTextV2 } from \"../../../../texts\";\nimport { TooltipWithPointerProps } from \"../../interfaces\";\n\ntype Props = Pick<\n TooltipWithPointerProps,\n \"mobileTitle\" | \"tooltipText\" | \"tooltipWidth\" | \"zIndex\" | \"pointerColor\"\n>;\n\nexport const TooltipWithPointerMobile = React.forwardRef<HTMLDivElement, Props>(\n ({ mobileTitle, tooltipWidth, tooltipText, zIndex, pointerColor }, ref) => {\n return (\n <FlexCenter\n sx={{\n position: \"fixed\",\n top: 0,\n left: 0,\n width: \"100vw\",\n height: \"100vh\",\n bg: \"#262626AA\",\n zIndex,\n }}\n ref={ref}\n >\n <FlexCenter\n flexDirection=\"column\"\n sx={{\n width: tooltipWidth,\n maxWidth: \"min(500px, calc(100vw - 30px))\",\n bg: \"cl_white\",\n p: \"20px\",\n borderRadius: \"5px\",\n }}\n >\n {mobileTitle && (\n <>\n <ResponsiveTextV2 maxWidth=\"100%\" fontSizeWeight={[16, \"bold\"]}>\n {mobileTitle}\n </ResponsiveTextV2>\n\n <HorizontalDivider\n width=\"min(50px, calc(100% - 40px))\"\n color={pointerColor}\n height=\"2px\"\n m=\"10px 0\"\n />\n </>\n )}\n\n <ResponsiveTextV2 maxWidth=\"100%\" fontSizeWeight={[14, \"regular\"]}>\n {tooltipText}\n </ResponsiveTextV2>\n </FlexCenter>\n </FlexCenter>\n );\n }\n);\n"],"names":["TooltipWithPointerMobile","React","mobileTitle","tooltipWidth","tooltipText","zIndex","pointerColor","ref","jsx","FlexCenter","jsxs","Fragment","ResponsiveTextV2","HorizontalDivider"],"mappings":";;;;;AAYO,MAAMA,IAA2BC,EAAM;AAAA,EAC5C,CAAC,EAAE,aAAAC,GAAa,cAAAC,GAAc,aAAAC,GAAa,QAAAC,GAAQ,cAAAC,KAAgBC,MAE/DC,gBAAAA,EAAA;AAAA,IAACC;AAAA,IAAA;AAAA,MACC,IAAI;AAAA,QACF,UAAU;AAAA,QACV,KAAK;AAAA,QACL,MAAM;AAAA,QACN,OAAO;AAAA,QACP,QAAQ;AAAA,QACR,IAAI;AAAA,QACJ,QAAAJ;AAAA,MACF;AAAA,MACA,KAAAE;AAAA,MAEA,UAAAG,gBAAAA,EAAA;AAAA,QAACD;AAAA,QAAA;AAAA,UACC,eAAc;AAAA,UACd,IAAI;AAAA,YACF,OAAON;AAAA,YACP,UAAU;AAAA,YACV,IAAI;AAAA,YACJ,GAAG;AAAA,YACH,cAAc;AAAA,UAChB;AAAA,UAEC,UAAA;AAAA,YAAAD,KAEGQ,gBAAAA,EAAA,KAAAC,YAAA,EAAA,UAAA;AAAA,cAACH,gBAAAA,EAAAA,IAAAI,GAAA,EAAiB,UAAS,QAAO,gBAAgB,CAAC,IAAI,MAAM,GAC1D,UACHV,EAAA,CAAA;AAAA,cAEAM,gBAAAA,EAAA;AAAA,gBAACK;AAAA,gBAAA;AAAA,kBACC,OAAM;AAAA,kBACN,OAAOP;AAAA,kBACP,QAAO;AAAA,kBACP,GAAE;AAAA,gBAAA;AAAA,cACJ;AAAA,YAAA,GACF;AAAA,YAGFE,gBAAAA,EAAAA,IAACI,KAAiB,UAAS,QAAO,gBAAgB,CAAC,IAAI,SAAS,GAC7D,UACHR,EAAA,CAAA;AAAA,UAAA;AAAA,QAAA;AAAA,MACF;AAAA,IAAA;AAAA,EAAA;AAIR;"}
|
|
@@ -1,54 +1,93 @@
|
|
|
1
|
-
import { j as
|
|
2
|
-
import
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
const
|
|
7
|
-
({
|
|
8
|
-
|
|
9
|
-
|
|
1
|
+
import { j as r } from "./sd-component-library197.js";
|
|
2
|
+
import u from "react";
|
|
3
|
+
import { Flex as j, Box as s } from "rebass";
|
|
4
|
+
import { TriangularPointerIcon as x } from "./sd-component-library191.js";
|
|
5
|
+
import { ResponsiveTextV2 as R } from "./sd-component-library151.js";
|
|
6
|
+
const $ = u.forwardRef(
|
|
7
|
+
({
|
|
8
|
+
pointerSx: n,
|
|
9
|
+
tooltipSx: d,
|
|
10
|
+
tooltipText: p,
|
|
11
|
+
tooltipWidth: l,
|
|
12
|
+
tooltipPy: a,
|
|
13
|
+
tooltipPx: h,
|
|
14
|
+
pointerSize: c,
|
|
15
|
+
tooltipOffset: i,
|
|
16
|
+
placement: t,
|
|
17
|
+
containerSx: y,
|
|
18
|
+
animationDuration: g,
|
|
19
|
+
state: m,
|
|
20
|
+
pointerColor: o
|
|
21
|
+
}, f) => {
|
|
22
|
+
const b = t === "right" ? {
|
|
23
|
+
left: "100%"
|
|
24
|
+
} : {
|
|
25
|
+
right: "100%"
|
|
26
|
+
}, e = {
|
|
27
|
+
size: `${c}px`,
|
|
28
|
+
color: o,
|
|
10
29
|
sx: {
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
30
|
+
my: "auto",
|
|
31
|
+
...n
|
|
32
|
+
}
|
|
33
|
+
};
|
|
34
|
+
return /* @__PURE__ */ r.jsxs(
|
|
35
|
+
j,
|
|
36
|
+
{
|
|
37
|
+
sx: {
|
|
38
|
+
position: "absolute",
|
|
39
|
+
top: "calc(50% - 14px)",
|
|
40
|
+
cursor: "default",
|
|
41
|
+
alignItems: "center",
|
|
42
|
+
opacity: m === "entered" ? 1 : 0,
|
|
43
|
+
transition: `opacity ${g}ms`,
|
|
44
|
+
zIndex: 1,
|
|
45
|
+
...b,
|
|
46
|
+
...d
|
|
47
|
+
},
|
|
48
|
+
ref: f,
|
|
49
|
+
"data-test": "tooltip-content",
|
|
50
|
+
children: [
|
|
51
|
+
t === "right" && /* @__PURE__ */ r.jsxs(r.Fragment, { children: [
|
|
52
|
+
/* @__PURE__ */ r.jsx(s, { width: `${i}px` }),
|
|
53
|
+
/* @__PURE__ */ r.jsx(x, { direction: "left", ...e })
|
|
54
|
+
] }),
|
|
55
|
+
/* @__PURE__ */ r.jsx(
|
|
56
|
+
R,
|
|
57
|
+
{
|
|
58
|
+
fontSizeWeight: [14, "regular"],
|
|
59
|
+
sx: {
|
|
60
|
+
width: l,
|
|
61
|
+
lineHeight: "16px",
|
|
62
|
+
bg: "cl_white",
|
|
63
|
+
px: h,
|
|
64
|
+
py: a,
|
|
65
|
+
borderColor: "cl_lightGrey",
|
|
66
|
+
borderWidth: "1px",
|
|
67
|
+
borderStyle: "solid",
|
|
68
|
+
...t === "left" ? {
|
|
69
|
+
borderRightWidth: "2px",
|
|
70
|
+
borderRightColor: o,
|
|
71
|
+
borderRadius: "3px 0 0 3px"
|
|
72
|
+
} : {
|
|
73
|
+
borderLeftWidth: "2px",
|
|
74
|
+
borderLeftColor: o,
|
|
75
|
+
borderRadius: "0 3px 3px 0"
|
|
41
76
|
}
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
77
|
+
},
|
|
78
|
+
children: p
|
|
79
|
+
}
|
|
80
|
+
),
|
|
81
|
+
t === "left" && /* @__PURE__ */ r.jsxs(r.Fragment, { children: [
|
|
82
|
+
/* @__PURE__ */ r.jsx(x, { direction: "right", ...e }),
|
|
83
|
+
/* @__PURE__ */ r.jsx(s, { width: `${i}px` })
|
|
84
|
+
] })
|
|
85
|
+
]
|
|
86
|
+
}
|
|
87
|
+
);
|
|
88
|
+
}
|
|
50
89
|
);
|
|
51
90
|
export {
|
|
52
|
-
|
|
91
|
+
$ as TooltipWithPointerHorizontal
|
|
53
92
|
};
|
|
54
93
|
//# sourceMappingURL=sd-component-library277.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sd-component-library277.js","sources":["../src/components/tooltips/tooltip-with-pointer/partials/tooltip-with-pointer-
|
|
1
|
+
{"version":3,"file":"sd-component-library277.js","sources":["../src/components/tooltips/tooltip-with-pointer/partials/tooltip-with-pointer-horizontal/tooltip-with-pointer-horizontal.tsx"],"sourcesContent":["import React from \"react\";\n\nimport { Box, Flex } from \"rebass\";\n\nimport { TriangularPointerIcon } from \"../../../../icons\";\nimport { ResponsiveTextV2 } from \"../../../../texts\";\nimport { TooltipWithPointerPartialProps as Props } from \"../interfaces\";\n\nexport const TooltipWithPointerHorizontal = React.forwardRef<\n HTMLDivElement,\n Props\n>(\n (\n {\n pointerSx,\n tooltipSx,\n tooltipText,\n tooltipWidth,\n tooltipPy,\n tooltipPx,\n pointerSize,\n tooltipOffset,\n placement,\n containerSx,\n animationDuration,\n state,\n pointerColor,\n },\n ref\n ) => {\n const tooltipContainerProps =\n placement === \"right\"\n ? {\n left: \"100%\",\n }\n : {\n right: \"100%\",\n };\n\n const pointerCommonProps = {\n size: `${pointerSize}px`,\n color: pointerColor,\n sx: {\n my: \"auto\",\n ...pointerSx,\n },\n };\n\n return (\n <Flex\n sx={{\n position: \"absolute\",\n top: \"calc(50% - 14px)\",\n cursor: \"default\",\n alignItems: \"center\",\n opacity: state === \"entered\" ? 1 : 0,\n transition: `opacity ${animationDuration}ms`,\n zIndex: 1,\n ...tooltipContainerProps,\n ...tooltipSx,\n }}\n ref={ref}\n data-test=\"tooltip-content\"\n >\n {placement === \"right\" && (\n <>\n <Box width={`${tooltipOffset}px`} />\n <TriangularPointerIcon direction=\"left\" {...pointerCommonProps} />\n </>\n )}\n\n <ResponsiveTextV2\n fontSizeWeight={[14, \"regular\"]}\n sx={{\n width: tooltipWidth,\n lineHeight: \"16px\",\n bg: \"cl_white\",\n px: tooltipPx,\n py: tooltipPy,\n borderColor: \"cl_lightGrey\",\n borderWidth: \"1px\",\n borderStyle: \"solid\",\n ...(placement === \"left\"\n ? {\n borderRightWidth: \"2px\",\n borderRightColor: pointerColor,\n borderRadius: \"3px 0 0 3px\",\n }\n : {\n borderLeftWidth: \"2px\",\n borderLeftColor: pointerColor,\n borderRadius: \"0 3px 3px 0\",\n }),\n }}\n >\n {tooltipText}\n </ResponsiveTextV2>\n\n {placement === \"left\" && (\n <>\n <TriangularPointerIcon direction=\"right\" {...pointerCommonProps} />\n <Box width={`${tooltipOffset}px`} />\n </>\n )}\n </Flex>\n );\n }\n);\n"],"names":["TooltipWithPointerHorizontal","React","pointerSx","tooltipSx","tooltipText","tooltipWidth","tooltipPy","tooltipPx","pointerSize","tooltipOffset","placement","containerSx","animationDuration","state","pointerColor","ref","tooltipContainerProps","pointerCommonProps","jsxs","Flex","Fragment","jsx","Box","TriangularPointerIcon","ResponsiveTextV2"],"mappings":";;;;;AAQO,MAAMA,IAA+BC,EAAM;AAAA,EAIhD,CACE;AAAA,IACE,WAAAC;AAAA,IACA,WAAAC;AAAA,IACA,aAAAC;AAAA,IACA,cAAAC;AAAA,IACA,WAAAC;AAAA,IACA,WAAAC;AAAA,IACA,aAAAC;AAAA,IACA,eAAAC;AAAA,IACA,WAAAC;AAAA,IACA,aAAAC;AAAA,IACA,mBAAAC;AAAA,IACA,OAAAC;AAAA,IACA,cAAAC;AAAA,KAEFC,MACG;AACG,UAAAC,IACJN,MAAc,UACV;AAAA,MACE,MAAM;AAAA,IAAA,IAER;AAAA,MACE,OAAO;AAAA,IAAA,GAGTO,IAAqB;AAAA,MACzB,MAAM,GAAGT,CAAW;AAAA,MACpB,OAAOM;AAAA,MACP,IAAI;AAAA,QACF,IAAI;AAAA,QACJ,GAAGZ;AAAA,MACL;AAAA,IAAA;AAIA,WAAAgB,gBAAAA,EAAA;AAAA,MAACC;AAAA,MAAA;AAAA,QACC,IAAI;AAAA,UACF,UAAU;AAAA,UACV,KAAK;AAAA,UACL,QAAQ;AAAA,UACR,YAAY;AAAA,UACZ,SAASN,MAAU,YAAY,IAAI;AAAA,UACnC,YAAY,WAAWD,CAAiB;AAAA,UACxC,QAAQ;AAAA,UACR,GAAGI;AAAA,UACH,GAAGb;AAAA,QACL;AAAA,QACA,KAAAY;AAAA,QACA,aAAU;AAAA,QAET,UAAA;AAAA,UAAAL,MAAc,WAEXQ,gBAAAA,EAAAA,KAAAE,EAAA,UAAA,EAAA,UAAA;AAAA,YAAAC,gBAAAA,EAAA,IAACC,GAAI,EAAA,OAAO,GAAGb,CAAa,MAAM;AAAA,YACjCY,gBAAAA,EAAA,IAAAE,GAAA,EAAsB,WAAU,QAAQ,GAAGN,EAAoB,CAAA;AAAA,UAAA,GAClE;AAAA,UAGFI,gBAAAA,EAAA;AAAA,YAACG;AAAA,YAAA;AAAA,cACC,gBAAgB,CAAC,IAAI,SAAS;AAAA,cAC9B,IAAI;AAAA,gBACF,OAAOnB;AAAA,gBACP,YAAY;AAAA,gBACZ,IAAI;AAAA,gBACJ,IAAIE;AAAA,gBACJ,IAAID;AAAA,gBACJ,aAAa;AAAA,gBACb,aAAa;AAAA,gBACb,aAAa;AAAA,gBACb,GAAII,MAAc,SACd;AAAA,kBACE,kBAAkB;AAAA,kBAClB,kBAAkBI;AAAA,kBAClB,cAAc;AAAA,gBAAA,IAEhB;AAAA,kBACE,iBAAiB;AAAA,kBACjB,iBAAiBA;AAAA,kBACjB,cAAc;AAAA,gBAChB;AAAA,cACN;AAAA,cAEC,UAAAV;AAAA,YAAA;AAAA,UACH;AAAA,UAECM,MAAc,UAEXQ,gBAAAA,EAAAA,KAAAE,EAAA,UAAA,EAAA,UAAA;AAAA,YAAAC,gBAAAA,EAAA,IAACE,GAAsB,EAAA,WAAU,SAAS,GAAGN,EAAoB,CAAA;AAAA,YAChEI,gBAAAA,EAAA,IAAAC,GAAA,EAAI,OAAO,GAAGb,CAAa,MAAM;AAAA,UAAA,GACpC;AAAA,QAAA;AAAA,MAAA;AAAA,IAAA;AAAA,EAIR;AACF;"}
|