@selfdecode/sd-component-library 4.0.89 → 4.0.90
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/sd-component-library100.js +2 -2
- package/lib/sd-component-library101.js +3 -3
- package/lib/sd-component-library104.js +2 -2
- package/lib/sd-component-library106.js +2 -2
- package/lib/sd-component-library117.js +1 -1
- package/lib/sd-component-library118.js +1 -1
- package/lib/sd-component-library120.js +1 -1
- package/lib/sd-component-library121.js +1 -1
- package/lib/sd-component-library126.js +1 -1
- package/lib/sd-component-library127.js +1 -1
- package/lib/sd-component-library129.js +1 -1
- package/lib/sd-component-library132.js +3 -3
- package/lib/sd-component-library133.js +1 -1
- package/lib/sd-component-library135.js +2 -2
- package/lib/sd-component-library15.js +1 -1
- package/lib/sd-component-library166.js +1 -1
- package/lib/sd-component-library195.js +3 -3
- package/lib/sd-component-library199.js +3 -2
- package/lib/sd-component-library199.js.map +1 -1
- package/lib/sd-component-library200.js +57 -30
- package/lib/sd-component-library200.js.map +1 -1
- package/lib/sd-component-library201.js +24 -598
- package/lib/sd-component-library201.js.map +1 -1
- package/lib/sd-component-library202.js +19 -3
- package/lib/sd-component-library202.js.map +1 -1
- package/lib/sd-component-library203.js +5 -25
- package/lib/sd-component-library203.js.map +1 -1
- package/lib/sd-component-library204.js +5 -57
- package/lib/sd-component-library204.js.map +1 -1
- package/lib/sd-component-library205.js +61 -15
- package/lib/sd-component-library205.js.map +1 -1
- package/lib/sd-component-library206.js +2 -5
- package/lib/sd-component-library206.js.map +1 -1
- package/lib/sd-component-library207.js +30 -5
- package/lib/sd-component-library207.js.map +1 -1
- package/lib/sd-component-library208.js +595 -61
- package/lib/sd-component-library208.js.map +1 -1
- package/lib/sd-component-library210.js +19 -62
- package/lib/sd-component-library210.js.map +1 -1
- package/lib/sd-component-library211.js +3 -23
- package/lib/sd-component-library211.js.map +1 -1
- package/lib/sd-component-library212.js +3 -40
- package/lib/sd-component-library212.js.map +1 -1
- package/lib/sd-component-library213.js +62 -19
- package/lib/sd-component-library213.js.map +1 -1
- package/lib/sd-component-library214.js +23 -3
- package/lib/sd-component-library214.js.map +1 -1
- package/lib/sd-component-library215.js +40 -3
- package/lib/sd-component-library215.js.map +1 -1
- package/lib/sd-component-library227.js +3 -26
- package/lib/sd-component-library227.js.map +1 -1
- package/lib/sd-component-library23.js +2 -2
- package/lib/sd-component-library230.js +3 -3
- package/lib/sd-component-library232.js +1 -1
- package/lib/sd-component-library233.js +1 -1
- package/lib/sd-component-library234.js +2 -2
- package/lib/sd-component-library236.js +1 -1
- package/lib/sd-component-library237.js +1 -1
- package/lib/sd-component-library238.js +64 -3
- package/lib/sd-component-library238.js.map +1 -1
- package/lib/sd-component-library239.js +43 -21
- package/lib/sd-component-library239.js.map +1 -1
- package/lib/sd-component-library24.js +2 -2
- package/lib/sd-component-library240.js +11 -107
- package/lib/sd-component-library240.js.map +1 -1
- package/lib/sd-component-library241.js +21 -47
- package/lib/sd-component-library241.js.map +1 -1
- package/lib/sd-component-library242.js +108 -23
- package/lib/sd-component-library242.js.map +1 -1
- package/lib/sd-component-library243.js +43 -49
- package/lib/sd-component-library243.js.map +1 -1
- package/lib/sd-component-library244.js +22 -46
- package/lib/sd-component-library244.js.map +1 -1
- package/lib/sd-component-library245.js +51 -73
- package/lib/sd-component-library245.js.map +1 -1
- package/lib/sd-component-library246.js +46 -62
- package/lib/sd-component-library246.js.map +1 -1
- package/lib/sd-component-library247.js +73 -41
- package/lib/sd-component-library247.js.map +1 -1
- package/lib/sd-component-library248.js +40 -12
- package/lib/sd-component-library248.js.map +1 -1
- package/lib/sd-component-library249.js +27 -41
- package/lib/sd-component-library249.js.map +1 -1
- package/lib/sd-component-library25.js +1 -1
- package/lib/sd-component-library250.js +21 -27
- package/lib/sd-component-library250.js.map +1 -1
- package/lib/sd-component-library251.js +19 -20
- package/lib/sd-component-library251.js.map +1 -1
- package/lib/sd-component-library252.js +2 -20
- package/lib/sd-component-library252.js.map +1 -1
- package/lib/sd-component-library253.js +26 -2
- package/lib/sd-component-library253.js.map +1 -1
- package/lib/sd-component-library256.js +25 -21
- package/lib/sd-component-library256.js.map +1 -1
- package/lib/sd-component-library258.js +24 -22
- package/lib/sd-component-library258.js.map +1 -1
- package/lib/sd-component-library260.js +21 -25
- package/lib/sd-component-library260.js.map +1 -1
- package/lib/sd-component-library261.js +22 -24
- package/lib/sd-component-library261.js.map +1 -1
- package/lib/sd-component-library262.js +27 -27
- package/lib/sd-component-library262.js.map +1 -1
- package/lib/sd-component-library263.js +43 -13
- package/lib/sd-component-library263.js.map +1 -1
- package/lib/sd-component-library264.js +118 -112
- package/lib/sd-component-library264.js.map +1 -1
- package/lib/sd-component-library265.js +57 -105
- package/lib/sd-component-library265.js.map +1 -1
- package/lib/sd-component-library266.js +75 -9
- package/lib/sd-component-library266.js.map +1 -1
- package/lib/sd-component-library267.js +111 -39
- package/lib/sd-component-library267.js.map +1 -1
- package/lib/sd-component-library268.js +27 -27
- package/lib/sd-component-library268.js.map +1 -1
- package/lib/sd-component-library269.js +13 -43
- package/lib/sd-component-library269.js.map +1 -1
- package/lib/sd-component-library270.js +112 -118
- package/lib/sd-component-library270.js.map +1 -1
- package/lib/sd-component-library271.js +9 -73
- package/lib/sd-component-library271.js.map +1 -1
- package/lib/sd-component-library272.js +42 -68
- package/lib/sd-component-library272.js.map +1 -1
- package/lib/sd-component-library282.js +10 -70
- package/lib/sd-component-library282.js.map +1 -1
- package/lib/sd-component-library283.js +69 -101
- package/lib/sd-component-library283.js.map +1 -1
- package/lib/sd-component-library284.js +91 -95
- package/lib/sd-component-library284.js.map +1 -1
- package/lib/sd-component-library285.js +106 -10
- package/lib/sd-component-library285.js.map +1 -1
- package/lib/sd-component-library291.js +3 -3
- package/lib/sd-component-library292.js +4 -4
- package/lib/sd-component-library293.js +1 -1
- package/lib/sd-component-library294.js +3 -2
- package/lib/sd-component-library294.js.map +1 -1
- package/lib/sd-component-library295.js +3 -77
- package/lib/sd-component-library295.js.map +1 -1
- package/lib/sd-component-library296.js +3 -93
- package/lib/sd-component-library296.js.map +1 -1
- package/lib/sd-component-library297.js +2 -53
- package/lib/sd-component-library297.js.map +1 -1
- package/lib/sd-component-library298.js +76 -8
- package/lib/sd-component-library298.js.map +1 -1
- package/lib/sd-component-library299.js +92 -4
- package/lib/sd-component-library299.js.map +1 -1
- package/lib/sd-component-library300.js +48 -48
- package/lib/sd-component-library300.js.map +1 -1
- package/lib/sd-component-library301.js +9 -3
- package/lib/sd-component-library301.js.map +1 -1
- package/lib/sd-component-library302.js +5 -3
- package/lib/sd-component-library302.js.map +1 -1
- package/lib/sd-component-library303.js +53 -3
- package/lib/sd-component-library303.js.map +1 -1
- package/lib/sd-component-library314.js +91 -33
- package/lib/sd-component-library314.js.map +1 -1
- package/lib/sd-component-library315.js +51 -25
- package/lib/sd-component-library315.js.map +1 -1
- package/lib/sd-component-library316.js +33 -91
- package/lib/sd-component-library316.js.map +1 -1
- package/lib/sd-component-library317.js +25 -51
- package/lib/sd-component-library317.js.map +1 -1
- package/lib/sd-component-library32.js +1 -1
- package/lib/sd-component-library321.js +1 -1
- package/lib/sd-component-library33.js +1 -1
- package/lib/sd-component-library5.js +1 -1
- package/lib/sd-component-library52.js +3 -3
- package/lib/sd-component-library53.js +2 -2
- package/lib/sd-component-library54.js +2 -2
- package/lib/sd-component-library58.js +18 -17
- package/lib/sd-component-library58.js.map +1 -1
- package/lib/sd-component-library6.js +1 -1
- package/lib/sd-component-library60.js +1 -1
- package/lib/sd-component-library62.js +3 -3
- package/lib/sd-component-library63.js +1 -1
- package/lib/sd-component-library64.js +1 -1
- package/lib/sd-component-library85.js +1 -1
- package/lib/sd-component-library88.js +1 -1
- package/lib/sd-component-library92.js +3 -3
- package/lib/sd-component-library94.js +5 -5
- package/lib/sd-component-library98.js +2 -2
- package/lib/sd-component-library99.js +3 -3
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sd-component-library270.js","sources":["../src/components/
|
|
1
|
+
{"version":3,"file":"sd-component-library270.js","sources":["../src/components/tabs/tab-bar/partials/tab/tab.tsx"],"sourcesContent":["import React from \"react\";\n\nimport { Box, Flex } from \"rebass\";\n\nimport { Button } from \"../../../../buttons\";\nimport { ResponsiveTextV2 } from \"../../../../texts\";\nimport { TabProps } from \"./interfaces\";\n\nexport const Ribbon = ({\n active = false,\n activeColor = \"cl_purple\",\n color = \"transparent\",\n}) => (\n <Box\n height={4}\n width=\"100%\"\n bg={active ? activeColor : color}\n sx={{\n mt: \"auto\",\n transition: \"all 175ms ease\",\n }}\n data-testid=\"tab-ribbon\"\n />\n);\n\nexport function Tab<T>({\n width,\n height,\n label,\n secondaryText,\n icon,\n id,\n onClick,\n selected = false,\n activeColor = \"cl_purple\",\n color = \"cl_darkGrey\",\n tabPadding,\n bg = \"cl_transparent\",\n activeBg = \"cl_transparent\",\n activeRibbonColor,\n borderRadius = \"4px\",\n tabHeaderComponent,\n elementId,\n maxWidth,\n labelSx,\n secondaryTextSx,\n containerSx,\n}: TabProps<T>) {\n const activeColorOfRibbon = tabHeaderComponent\n ? selected\n ? activeBg\n : bg\n : activeRibbonColor || activeColor;\n\n return (\n <Flex\n flexDirection=\"column\"\n sx={{\n width: \"fit-content\",\n maxWidth,\n minWidth: \"fit-content\",\n ...containerSx,\n }}\n >\n <Button\n id={elementId}\n width={width}\n height={height}\n bg={selected ? activeBg : bg}\n onClick={onClick}\n borderRadius={borderRadius}\n data-testid={`tab-${id}`}\n padding={tabPadding}\n disabled={selected}\n display=\"flex\"\n >\n {label && (\n <ResponsiveTextV2\n fontSizeWeight={[[13, \"bold\"]]}\n sx={{\n letterSpacing: \"1.3px\",\n textTransform: \"uppercase\",\n ...labelSx,\n }}\n data-testid=\"tab-text\"\n color={selected ? activeColor : color}\n >\n {label}\n </ResponsiveTextV2>\n )}\n\n {secondaryText && (\n <ResponsiveTextV2\n fontSizeWeight={[[10, \"semi-bold\"]]}\n sx={{\n letterSpacing: \"1px\",\n textTransform: \"uppercase\",\n ...secondaryTextSx,\n }}\n color={selected ? activeColor : color}\n >\n {secondaryText}\n </ResponsiveTextV2>\n )}\n\n {icon && (\n <Flex\n height=\"16px\"\n flexDirection=\"column\"\n justifyContent=\"space-between\"\n ml=\"10px\"\n >\n {icon}\n </Flex>\n )}\n\n {/* Render custom component, if provided */}\n {tabHeaderComponent}\n </Button>\n\n <Ribbon\n active={selected || !!tabHeaderComponent} // in tabHeaderComponent mode, it should fill the gap.\n activeColor={activeColorOfRibbon}\n color={bg}\n />\n </Flex>\n );\n}\n"],"names":["Ribbon","active","activeColor","color","jsx","Box","Tab","width","height","label","secondaryText","icon","id","onClick","selected","tabPadding","bg","activeBg","activeRibbonColor","borderRadius","tabHeaderComponent","elementId","maxWidth","labelSx","secondaryTextSx","containerSx","activeColorOfRibbon","jsxs","Flex","Button","ResponsiveTextV2"],"mappings":";;;;AAQO,MAAMA,IAAS,CAAC;AAAA,EACrB,QAAAC,IAAS;AAAA,EACT,aAAAC,IAAc;AAAA,EACd,OAAAC,IAAQ;AACV,MACEC,gBAAAA,EAAA;AAAA,EAACC;AAAA,EAAA;AAAA,IACC,QAAQ;AAAA,IACR,OAAM;AAAA,IACN,IAAIJ,IAASC,IAAcC;AAAA,IAC3B,IAAI;AAAA,MACF,IAAI;AAAA,MACJ,YAAY;AAAA,IACd;AAAA,IACA,eAAY;AAAA,EAAA;AACd;AAGK,SAASG,EAAO;AAAA,EACrB,OAAAC;AAAA,EACA,QAAAC;AAAA,EACA,OAAAC;AAAA,EACA,eAAAC;AAAA,EACA,MAAAC;AAAA,EACA,IAAAC;AAAA,EACA,SAAAC;AAAA,EACA,UAAAC,IAAW;AAAA,EACX,aAAAZ,IAAc;AAAA,EACd,OAAAC,IAAQ;AAAA,EACR,YAAAY;AAAA,EACA,IAAAC,IAAK;AAAA,EACL,UAAAC,IAAW;AAAA,EACX,mBAAAC;AAAA,EACA,cAAAC,IAAe;AAAA,EACf,oBAAAC;AAAA,EACA,WAAAC;AAAA,EACA,UAAAC;AAAA,EACA,SAAAC;AAAA,EACA,iBAAAC;AAAA,EACA,aAAAC;AACF,GAAgB;AACd,QAAMC,IAAsBN,IACxBN,IACEG,IACAD,IACFE,KAAqBhB;AAGvB,SAAAyB,gBAAAA,EAAA;AAAA,IAACC;AAAA,IAAA;AAAA,MACC,eAAc;AAAA,MACd,IAAI;AAAA,QACF,OAAO;AAAA,QACP,UAAAN;AAAA,QACA,UAAU;AAAA,QACV,GAAGG;AAAA,MACL;AAAA,MAEA,UAAA;AAAA,QAAAE,gBAAAA,EAAA;AAAA,UAACE;AAAA,UAAA;AAAA,YACC,IAAIR;AAAA,YACJ,OAAAd;AAAA,YACA,QAAAC;AAAA,YACA,IAAIM,IAAWG,IAAWD;AAAA,YAC1B,SAAAH;AAAA,YACA,cAAAM;AAAA,YACA,eAAa,OAAOP,CAAE;AAAA,YACtB,SAASG;AAAA,YACT,UAAUD;AAAA,YACV,SAAQ;AAAA,YAEP,UAAA;AAAA,cACCL,KAAAL,gBAAAA,EAAA;AAAA,gBAAC0B;AAAA,gBAAA;AAAA,kBACC,gBAAgB,CAAC,CAAC,IAAI,MAAM,CAAC;AAAA,kBAC7B,IAAI;AAAA,oBACF,eAAe;AAAA,oBACf,eAAe;AAAA,oBACf,GAAGP;AAAA,kBACL;AAAA,kBACA,eAAY;AAAA,kBACZ,OAAOT,IAAWZ,IAAcC;AAAA,kBAE/B,UAAAM;AAAA,gBAAA;AAAA,cACH;AAAA,cAGDC,KACCN,gBAAAA,EAAA;AAAA,gBAAC0B;AAAA,gBAAA;AAAA,kBACC,gBAAgB,CAAC,CAAC,IAAI,WAAW,CAAC;AAAA,kBAClC,IAAI;AAAA,oBACF,eAAe;AAAA,oBACf,eAAe;AAAA,oBACf,GAAGN;AAAA,kBACL;AAAA,kBACA,OAAOV,IAAWZ,IAAcC;AAAA,kBAE/B,UAAAO;AAAA,gBAAA;AAAA,cACH;AAAA,cAGDC,KACCP,gBAAAA,EAAA;AAAA,gBAACwB;AAAA,gBAAA;AAAA,kBACC,QAAO;AAAA,kBACP,eAAc;AAAA,kBACd,gBAAe;AAAA,kBACf,IAAG;AAAA,kBAEF,UAAAjB;AAAA,gBAAA;AAAA,cACH;AAAA,cAIDS;AAAA,YAAA;AAAA,UAAA;AAAA,QACH;AAAA,QAEAhB,gBAAAA,EAAA;AAAA,UAACJ;AAAA,UAAA;AAAA,YACC,QAAQc,KAAY,CAAC,CAACM;AAAA,YACtB,aAAaM;AAAA,YACb,OAAOV;AAAA,UAAA;AAAA,QACT;AAAA,MAAA;AAAA,IAAA;AAAA,EAAA;AAGN;"}
|
|
@@ -1,77 +1,13 @@
|
|
|
1
|
-
import { j as
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
}) => {
|
|
10
|
-
const i = {
|
|
11
|
-
borderColor: "cl_lightGrey",
|
|
12
|
-
borderWidth: "1px"
|
|
13
|
-
}, x = (r) => () => t(r);
|
|
14
|
-
return /* @__PURE__ */ o.jsxs(
|
|
15
|
-
e,
|
|
16
|
-
{
|
|
17
|
-
sx: {
|
|
18
|
-
position: "absolute",
|
|
19
|
-
top: "100%",
|
|
20
|
-
right: 0,
|
|
21
|
-
zIndex: 1
|
|
22
|
-
},
|
|
23
|
-
children: [
|
|
24
|
-
/* @__PURE__ */ o.jsx(s, { color: "cl_purple", height: "2px" }),
|
|
25
|
-
/* @__PURE__ */ o.jsx(
|
|
26
|
-
e,
|
|
27
|
-
{
|
|
28
|
-
sx: {
|
|
29
|
-
bg: "cl_white",
|
|
30
|
-
borderRadius: "0 0 3px 3px",
|
|
31
|
-
...i,
|
|
32
|
-
borderStyle: "solid",
|
|
33
|
-
borderTopStyle: "none",
|
|
34
|
-
boxShadow: "0px 3px 10px #0000001A"
|
|
35
|
-
},
|
|
36
|
-
children: /* @__PURE__ */ o.jsx(
|
|
37
|
-
p,
|
|
38
|
-
{
|
|
39
|
-
height: "180px",
|
|
40
|
-
width: "max-content",
|
|
41
|
-
scrollbarThumbColor: "cl_purple",
|
|
42
|
-
scrollbarTrackColor: "cl_headerLine",
|
|
43
|
-
scrollbarWidth: "5px",
|
|
44
|
-
hoverScrollbarWidth: "5px",
|
|
45
|
-
bg: "cl_transparent",
|
|
46
|
-
p: "5px 7px 5px 0",
|
|
47
|
-
sx: { pr: "8px" },
|
|
48
|
-
children: l.map((r) => /* @__PURE__ */ o.jsx(
|
|
49
|
-
d,
|
|
50
|
-
{
|
|
51
|
-
fontSizeWeight: [14, "regular"],
|
|
52
|
-
sx: {
|
|
53
|
-
display: "flex",
|
|
54
|
-
alignItems: "center",
|
|
55
|
-
height: "36px",
|
|
56
|
-
px: "10px",
|
|
57
|
-
borderColor: "cl_headerLine",
|
|
58
|
-
borderWidth: "1px",
|
|
59
|
-
borderBottomStyle: "solid"
|
|
60
|
-
},
|
|
61
|
-
onClick: x(r),
|
|
62
|
-
children: r.title
|
|
63
|
-
},
|
|
64
|
-
r.id
|
|
65
|
-
))
|
|
66
|
-
}
|
|
67
|
-
)
|
|
68
|
-
}
|
|
69
|
-
)
|
|
70
|
-
]
|
|
71
|
-
}
|
|
72
|
-
);
|
|
1
|
+
import { j as c } from "./sd-component-library195.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 });
|
|
73
9
|
};
|
|
74
10
|
export {
|
|
75
|
-
m as
|
|
11
|
+
m as ScrollableTabWrapper
|
|
76
12
|
};
|
|
77
13
|
//# sourceMappingURL=sd-component-library271.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sd-component-library271.js","sources":["../src/components/
|
|
1
|
+
{"version":3,"file":"sd-component-library271.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,79 +1,53 @@
|
|
|
1
|
-
import { j as
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
1
|
+
import { j as o } from "./sd-component-library195.js";
|
|
2
|
+
import { ThirteenBold as h } from "./sd-component-library153.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,
|
|
17
21
|
{
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
},
|
|
26
|
-
children: [
|
|
27
|
-
/* @__PURE__ */ r.jsx(g, { direction: "top", mr: "15px", ml: "auto" }),
|
|
28
|
-
/* @__PURE__ */ r.jsx(f, { color: "cl_purple", height: "2px" }),
|
|
29
|
-
/* @__PURE__ */ r.jsx(
|
|
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(
|
|
30
29
|
i,
|
|
31
30
|
{
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
borderRadius: l,
|
|
46
|
-
bg: n,
|
|
47
|
-
border: `${e}px solid transparent`,
|
|
48
|
-
backgroundClip: "content-box"
|
|
49
|
-
},
|
|
50
|
-
"::-webkit-scrollbar": {
|
|
51
|
-
width: m,
|
|
52
|
-
bg: "transparent"
|
|
53
|
-
},
|
|
54
|
-
"::-webkit-scrollbar-thumb": {
|
|
55
|
-
borderRadius: l,
|
|
56
|
-
bg: s,
|
|
57
|
-
border: `${e}px solid transparent`,
|
|
58
|
-
backgroundClip: "content-box"
|
|
59
|
-
}
|
|
60
|
-
},
|
|
61
|
-
children: h.map((o) => /* @__PURE__ */ u(
|
|
62
|
-
w,
|
|
63
|
-
{
|
|
64
|
-
onClick: x(o),
|
|
65
|
-
...o,
|
|
66
|
-
key: o.id,
|
|
67
|
-
currentSelection: t.id === o.id
|
|
68
|
-
}
|
|
69
|
-
))
|
|
31
|
+
style: {
|
|
32
|
+
height: n,
|
|
33
|
+
fill: r ? e : "#434A54"
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
),
|
|
37
|
+
/* @__PURE__ */ o.jsx(
|
|
38
|
+
h,
|
|
39
|
+
{
|
|
40
|
+
textTransform: "uppercase",
|
|
41
|
+
color: r ? e : "#434A54",
|
|
42
|
+
cursor: "pointer",
|
|
43
|
+
children: l
|
|
70
44
|
}
|
|
71
45
|
)
|
|
72
|
-
]
|
|
46
|
+
] })
|
|
73
47
|
}
|
|
74
48
|
);
|
|
75
49
|
};
|
|
76
50
|
export {
|
|
77
|
-
|
|
51
|
+
T as Tab
|
|
78
52
|
};
|
|
79
53
|
//# sourceMappingURL=sd-component-library272.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sd-component-library272.js","sources":["../src/components/
|
|
1
|
+
{"version":3,"file":"sd-component-library272.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,73 +1,13 @@
|
|
|
1
|
-
import
|
|
2
|
-
const
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
startDate: y(l(/* @__PURE__ */ new Date(), -1)),
|
|
11
|
-
endDate: i(l(/* @__PURE__ */ new Date(), -1))
|
|
12
|
-
},
|
|
13
|
-
{
|
|
14
|
-
label: "Last Week",
|
|
15
|
-
startDate: O(n(/* @__PURE__ */ new Date(), -1), { weekStartsOn: 1 }),
|
|
16
|
-
endDate: S(n(/* @__PURE__ */ new Date(), -1), { weekStartsOn: 1 })
|
|
17
|
-
},
|
|
18
|
-
{
|
|
19
|
-
label: "Last 2 Weeks",
|
|
20
|
-
startDate: O(n(/* @__PURE__ */ new Date(), -2), { weekStartsOn: 1 }),
|
|
21
|
-
endDate: S(n(/* @__PURE__ */ new Date(), -1), { weekStartsOn: 1 })
|
|
22
|
-
},
|
|
23
|
-
{
|
|
24
|
-
label: "Last Month",
|
|
25
|
-
startDate: u(f(/* @__PURE__ */ new Date(), -1)),
|
|
26
|
-
endDate: M(f(/* @__PURE__ */ new Date(), -1))
|
|
27
|
-
},
|
|
28
|
-
{
|
|
29
|
-
label: "Last Year",
|
|
30
|
-
startDate: b(c(/* @__PURE__ */ new Date(), -1)),
|
|
31
|
-
endDate: C(c(/* @__PURE__ */ new Date(), -1))
|
|
32
|
-
}
|
|
33
|
-
], _ = (t, e, E, k, m, h) => {
|
|
34
|
-
const o = (m || Y).map(
|
|
35
|
-
({ label: s, startDate: d, endDate: w }) => ({
|
|
36
|
-
label: s,
|
|
37
|
-
range: (a) => ({
|
|
38
|
-
startDate: d,
|
|
39
|
-
endDate: w
|
|
40
|
-
}),
|
|
41
|
-
isSelected: (a) => a.startDate && a.endDate ? r(a.startDate, d) && r(a.endDate, w) : !1
|
|
42
|
-
})
|
|
43
|
-
);
|
|
44
|
-
return h ? o.concat({
|
|
45
|
-
label: "Custom Range",
|
|
46
|
-
range: (s) => (e(), {
|
|
47
|
-
startDate: (t == null ? void 0 : t.startDate) || /* @__PURE__ */ new Date(),
|
|
48
|
-
endDate: (t == null ? void 0 : t.endDate) || /* @__PURE__ */ new Date()
|
|
49
|
-
}),
|
|
50
|
-
isSelected: (s) => k
|
|
51
|
-
}) : o;
|
|
52
|
-
}, g = (t) => ({
|
|
53
|
-
...t,
|
|
54
|
-
rangeColors: [t.color ?? "#9E1CB5"],
|
|
55
|
-
weekStartsOn: 1,
|
|
56
|
-
inputRanges: [],
|
|
57
|
-
ranges: [
|
|
58
|
-
t.selectedRange ?? {
|
|
59
|
-
startDate: /* @__PURE__ */ new Date(),
|
|
60
|
-
endDate: /* @__PURE__ */ new Date()
|
|
61
|
-
}
|
|
62
|
-
],
|
|
63
|
-
months: t.months,
|
|
64
|
-
onChange: (e) => {
|
|
65
|
-
t.setSelectedRange(e.range1);
|
|
66
|
-
}
|
|
67
|
-
});
|
|
1
|
+
import * as e from "react";
|
|
2
|
+
const a = (t) => /* @__PURE__ */ e.createElement("svg", { xmlns: "http://www.w3.org/2000/svg", width: 18.2, height: 20, viewBox: "0 0 18.2 20", ...t }, /* @__PURE__ */ e.createElement("defs", null, /* @__PURE__ */ e.createElement("style", null, `
|
|
3
|
+
.calendar{
|
|
4
|
+
fill:none;
|
|
5
|
+
stroke-linecap:round;
|
|
6
|
+
stroke-linejoin:round;
|
|
7
|
+
stroke-width:2px;
|
|
8
|
+
}
|
|
9
|
+
`)), /* @__PURE__ */ e.createElement("g", { transform: "translate(-3.5 -2)" }, /* @__PURE__ */ e.createElement("path", { className: "calendar", stroke: "current", d: "M6.3,6H18.9a1.8,1.8,0,0,1,1.8,1.8V20.4a1.8,1.8,0,0,1-1.8,1.8H6.3a1.8,1.8,0,0,1-1.8-1.8V7.8A1.8,1.8,0,0,1,6.3,6Z", transform: "translate(0 -1.2)" }), /* @__PURE__ */ e.createElement("path", { className: "calendar", stroke: "current", d: "M24,3V6.6", transform: "translate(-7.8 0)" }), /* @__PURE__ */ e.createElement("path", { className: "calendar", stroke: "current", d: "M12,3V6.6", transform: "translate(-3 0)" }), /* @__PURE__ */ e.createElement("path", { className: "calendar", stroke: "current", d: "M4.5,15H20.7", transform: "translate(0 -4.8)" })));
|
|
68
10
|
export {
|
|
69
|
-
|
|
70
|
-
x as getSelectedRangeText,
|
|
71
|
-
_ as getStaticRanges
|
|
11
|
+
a as ReactComponent
|
|
72
12
|
};
|
|
73
13
|
//# sourceMappingURL=sd-component-library282.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sd-component-library282.js","sources":["../src/components/
|
|
1
|
+
{"version":3,"file":"sd-component-library282.js","sources":["../src/components/icons/calendar-icon/calendar.svg"],"sourcesContent":["export default \"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIxOC4yIiBoZWlnaHQ9IjIwIiB2aWV3Qm94PSIwIDAgMTguMiAyMCI+CiAgPGRlZnM+CiAgICA8c3R5bGU+CiAgICAgIC5jYWxlbmRhcnsKICAgICAgICBmaWxsOm5vbmU7CiAgICAgICAgc3Ryb2tlLWxpbmVjYXA6cm91bmQ7CiAgICAgICAgc3Ryb2tlLWxpbmVqb2luOnJvdW5kOwogICAgICAgIHN0cm9rZS13aWR0aDoycHg7CiAgICAgIH0KICAgIDwvc3R5bGU+CiAgPC9kZWZzPgogIDxnIHRyYW5zZm9ybT0idHJhbnNsYXRlKC0zLjUgLTIpIj4KICAgIDxwYXRoIGNsYXNzPSJjYWxlbmRhciIgc3Ryb2tlPSJjdXJyZW50IiBkPSJNNi4zLDZIMTguOWExLjgsMS44LDAsMCwxLDEuOCwxLjhWMjAuNGExLjgsMS44LDAsMCwxLTEuOCwxLjhINi4zYTEuOCwxLjgsMCwwLDEtMS44LTEuOFY3LjhBMS44LDEuOCwwLDAsMSw2LjMsNloiIHRyYW5zZm9ybT0idHJhbnNsYXRlKDAgLTEuMikiLz4KICAgIDxwYXRoIGNsYXNzPSJjYWxlbmRhciIgc3Ryb2tlPSJjdXJyZW50IiBkPSJNMjQsM1Y2LjYiIHRyYW5zZm9ybT0idHJhbnNsYXRlKC03LjggMCkiLz4KICAgIDxwYXRoIGNsYXNzPSJjYWxlbmRhciIgc3Ryb2tlPSJjdXJyZW50IiBkPSJNMTIsM1Y2LjYiIHRyYW5zZm9ybT0idHJhbnNsYXRlKC0zIDApIi8+CiAgICA8cGF0aCBjbGFzcz0iY2FsZW5kYXIiIHN0cm9rZT0iY3VycmVudCIgZD0iTTQuNSwxNUgyMC43IiB0cmFuc2Zvcm09InRyYW5zbGF0ZSgwIC00LjgpIi8+CiAgPC9nPgo8L3N2Zz4=\""],"names":["SvgCalendar","props","React"],"mappings":";AACK,MAACA,IAAc,CAACC,MAA0B,gBAAAC,EAAM,cAAc,OAAO,EAAE,OAAO,8BAA8B,OAAO,MAAM,QAAQ,IAAI,SAAS,eAAe,GAAGD,KAAyB,gBAAAC,EAAM,cAAc,QAAQ,MAAsB,gBAAAA,EAAM,cAAc,SAAS,MAAM;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,KAAiJ,CAAC,GAAmB,gBAAAA,EAAM,cAAc,KAAK,EAAE,WAAW,wBAAwC,gBAAAA,EAAM,cAAc,QAAQ,EAAE,WAAW,YAAY,QAAQ,WAAW,GAAG,mHAAmH,WAAW,oBAAqB,CAAA,GAAmB,gBAAAA,EAAM,cAAc,QAAQ,EAAE,WAAW,YAAY,QAAQ,WAAW,GAAG,aAAa,WAAW,oBAAmB,CAAE,GAAmB,gBAAAA,EAAM,cAAc,QAAQ,EAAE,WAAW,YAAY,QAAQ,WAAW,GAAG,aAAa,WAAW,kBAAmB,CAAA,GAAmB,gBAAAA,EAAM,cAAc,QAAQ,EAAE,WAAW,YAAY,QAAQ,WAAW,GAAG,gBAAgB,WAAW,oBAAmB,CAAE,CAAC,CAAC;"}
|
|
@@ -1,105 +1,73 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
m,
|
|
33
|
-
{
|
|
34
|
-
onClickOutside: p,
|
|
35
|
-
sx: {
|
|
36
|
-
borderStyle: "solid",
|
|
37
|
-
borderWidth: "1px",
|
|
38
|
-
borderColor: "cl_lightGrey",
|
|
39
|
-
minWidth: "352px",
|
|
40
|
-
width: "max-content",
|
|
41
|
-
backgroundColor: "#fff",
|
|
42
|
-
m: "auto",
|
|
43
|
-
borderRadius: "4px",
|
|
44
|
-
zIndex: n,
|
|
45
|
-
".rdrDateRangePickerWrapper": {
|
|
46
|
-
width: "100%",
|
|
47
|
-
flexDirection: "column"
|
|
48
|
-
},
|
|
49
|
-
".rdrDefinedRangesWrapper": {
|
|
50
|
-
width: "100%"
|
|
51
|
-
},
|
|
52
|
-
".rdrCalendarWrapper": {
|
|
53
|
-
display: a ? "inline-flex" : "none"
|
|
54
|
-
},
|
|
55
|
-
".rdrInputRanges": {
|
|
56
|
-
display: "none"
|
|
57
|
-
},
|
|
58
|
-
".rdrStaticRanges:before": {
|
|
59
|
-
fontSize: "16px",
|
|
60
|
-
fontFamily: "proxima-nova",
|
|
61
|
-
color: "#9BA2B4",
|
|
62
|
-
fontWeight: "300",
|
|
63
|
-
p: "10px 20px"
|
|
64
|
-
},
|
|
65
|
-
".rdrStaticRange": {
|
|
66
|
-
fontSize: "16px",
|
|
67
|
-
fontFamily: "proxima-nova",
|
|
68
|
-
color: "#434A54",
|
|
69
|
-
borderBottomWidth: "0"
|
|
70
|
-
}
|
|
71
|
-
},
|
|
72
|
-
children: [
|
|
73
|
-
/* @__PURE__ */ r.jsx(f, { fontSizeWeight: [12, "semi-bold"], ref: i, children: /* @__PURE__ */ r.jsx(
|
|
74
|
-
s,
|
|
75
|
-
{
|
|
76
|
-
...c(e),
|
|
77
|
-
direction: "vertical",
|
|
78
|
-
staticRanges: d(!0)
|
|
79
|
-
}
|
|
80
|
-
) }),
|
|
81
|
-
/* @__PURE__ */ r.jsx(h, { ...e, isMobile: !0 }),
|
|
82
|
-
/* @__PURE__ */ r.jsxs(g, { p: "10px 20px", children: [
|
|
83
|
-
/* @__PURE__ */ r.jsx(
|
|
84
|
-
u,
|
|
85
|
-
{
|
|
86
|
-
onClick: o,
|
|
87
|
-
height: "42px",
|
|
88
|
-
color: "cl_darkGrey",
|
|
89
|
-
padding: "0",
|
|
90
|
-
children: "Cancel"
|
|
91
|
-
}
|
|
92
|
-
),
|
|
93
|
-
/* @__PURE__ */ r.jsx(R, { ...e })
|
|
94
|
-
] })
|
|
95
|
-
]
|
|
96
|
-
}
|
|
97
|
-
)
|
|
98
|
-
}
|
|
99
|
-
);
|
|
1
|
+
import { startOfDay as y, addDays as l, endOfDay as i, startOfWeek as O, addWeeks as n, endOfWeek as S, startOfMonth as u, addMonths as f, endOfMonth as M, startOfYear as b, addYears as c, endOfYear as C, isSameDay as r, format as W } from "date-fns";
|
|
2
|
+
const D = (t) => W(t, "EEE d MMM yyyy"), x = (t) => {
|
|
3
|
+
const e = "No date selected";
|
|
4
|
+
return !t || !t.startDate || !t.endDate ? e : r(t.startDate, t.endDate) ? D(t.startDate) : `${D(t.startDate)} - ${D(
|
|
5
|
+
t.endDate
|
|
6
|
+
)}`;
|
|
7
|
+
}, Y = [
|
|
8
|
+
{
|
|
9
|
+
label: "Yesterday",
|
|
10
|
+
startDate: y(l(/* @__PURE__ */ new Date(), -1)),
|
|
11
|
+
endDate: i(l(/* @__PURE__ */ new Date(), -1))
|
|
12
|
+
},
|
|
13
|
+
{
|
|
14
|
+
label: "Last Week",
|
|
15
|
+
startDate: O(n(/* @__PURE__ */ new Date(), -1), { weekStartsOn: 1 }),
|
|
16
|
+
endDate: S(n(/* @__PURE__ */ new Date(), -1), { weekStartsOn: 1 })
|
|
17
|
+
},
|
|
18
|
+
{
|
|
19
|
+
label: "Last 2 Weeks",
|
|
20
|
+
startDate: O(n(/* @__PURE__ */ new Date(), -2), { weekStartsOn: 1 }),
|
|
21
|
+
endDate: S(n(/* @__PURE__ */ new Date(), -1), { weekStartsOn: 1 })
|
|
22
|
+
},
|
|
23
|
+
{
|
|
24
|
+
label: "Last Month",
|
|
25
|
+
startDate: u(f(/* @__PURE__ */ new Date(), -1)),
|
|
26
|
+
endDate: M(f(/* @__PURE__ */ new Date(), -1))
|
|
27
|
+
},
|
|
28
|
+
{
|
|
29
|
+
label: "Last Year",
|
|
30
|
+
startDate: b(c(/* @__PURE__ */ new Date(), -1)),
|
|
31
|
+
endDate: C(c(/* @__PURE__ */ new Date(), -1))
|
|
100
32
|
}
|
|
101
|
-
)
|
|
33
|
+
], _ = (t, e, E, k, m, h) => {
|
|
34
|
+
const o = (m || Y).map(
|
|
35
|
+
({ label: s, startDate: d, endDate: w }) => ({
|
|
36
|
+
label: s,
|
|
37
|
+
range: (a) => ({
|
|
38
|
+
startDate: d,
|
|
39
|
+
endDate: w
|
|
40
|
+
}),
|
|
41
|
+
isSelected: (a) => a.startDate && a.endDate ? r(a.startDate, d) && r(a.endDate, w) : !1
|
|
42
|
+
})
|
|
43
|
+
);
|
|
44
|
+
return h ? o.concat({
|
|
45
|
+
label: "Custom Range",
|
|
46
|
+
range: (s) => (e(), {
|
|
47
|
+
startDate: (t == null ? void 0 : t.startDate) || /* @__PURE__ */ new Date(),
|
|
48
|
+
endDate: (t == null ? void 0 : t.endDate) || /* @__PURE__ */ new Date()
|
|
49
|
+
}),
|
|
50
|
+
isSelected: (s) => k
|
|
51
|
+
}) : o;
|
|
52
|
+
}, g = (t) => ({
|
|
53
|
+
...t,
|
|
54
|
+
rangeColors: [t.color ?? "#9E1CB5"],
|
|
55
|
+
weekStartsOn: 1,
|
|
56
|
+
inputRanges: [],
|
|
57
|
+
ranges: [
|
|
58
|
+
t.selectedRange ?? {
|
|
59
|
+
startDate: /* @__PURE__ */ new Date(),
|
|
60
|
+
endDate: /* @__PURE__ */ new Date()
|
|
61
|
+
}
|
|
62
|
+
],
|
|
63
|
+
months: t.months,
|
|
64
|
+
onChange: (e) => {
|
|
65
|
+
t.setSelectedRange(e.range1);
|
|
66
|
+
}
|
|
67
|
+
});
|
|
102
68
|
export {
|
|
103
|
-
|
|
69
|
+
g as getCalendarProps,
|
|
70
|
+
x as getSelectedRangeText,
|
|
71
|
+
_ as getStaticRanges
|
|
104
72
|
};
|
|
105
73
|
//# sourceMappingURL=sd-component-library283.js.map
|