@selfdecode/sd-component-library 4.0.142 → 4.0.144
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/links/link/interfaces.d.ts +1 -0
- package/lib/components/wrapper/functions.d.ts +1 -1
- package/lib/components/wrapper/interfaces.d.ts +1 -0
- package/lib/sd-component-library100.js +2 -2
- package/lib/sd-component-library101.js +3 -3
- package/lib/sd-component-library102.js +2 -2
- package/lib/sd-component-library112.js +1 -1
- package/lib/sd-component-library118.js +1 -1
- package/lib/sd-component-library126.js +1 -1
- package/lib/sd-component-library127.js +1 -1
- package/lib/sd-component-library16.js +1 -1
- package/lib/sd-component-library167.js +1 -1
- package/lib/sd-component-library172.js +1 -1
- package/lib/sd-component-library197.js +3 -3
- package/lib/sd-component-library198.js +57 -57
- package/lib/sd-component-library198.js.map +1 -1
- package/lib/sd-component-library2.js +14 -4
- package/lib/sd-component-library2.js.map +1 -1
- package/lib/sd-component-library202.js +2 -57
- package/lib/sd-component-library202.js.map +1 -1
- package/lib/sd-component-library203.js +30 -2
- package/lib/sd-component-library203.js.map +1 -1
- package/lib/sd-component-library204.js +590 -21
- package/lib/sd-component-library204.js.map +1 -1
- package/lib/sd-component-library205.js +25 -598
- package/lib/sd-component-library205.js.map +1 -1
- package/lib/sd-component-library206.js +55 -24
- package/lib/sd-component-library206.js.map +1 -1
- package/lib/sd-component-library210.js +40 -21
- package/lib/sd-component-library210.js.map +1 -1
- package/lib/sd-component-library211.js +129 -3
- package/lib/sd-component-library211.js.map +1 -1
- package/lib/sd-component-library212.js +13 -3
- package/lib/sd-component-library212.js.map +1 -1
- package/lib/sd-component-library213.js +14 -26
- package/lib/sd-component-library213.js.map +1 -1
- package/lib/sd-component-library214.js +3 -3
- package/lib/sd-component-library214.js.map +1 -1
- package/lib/sd-component-library215.js +3 -31
- package/lib/sd-component-library215.js.map +1 -1
- package/lib/sd-component-library216.js +65 -19
- package/lib/sd-component-library216.js.map +1 -1
- package/lib/sd-component-library217.js +3 -20
- package/lib/sd-component-library217.js.map +1 -1
- package/lib/sd-component-library218.js +3 -28
- package/lib/sd-component-library218.js.map +1 -1
- package/lib/sd-component-library219.js +44 -31
- package/lib/sd-component-library219.js.map +1 -1
- package/lib/sd-component-library220.js +52 -3
- package/lib/sd-component-library220.js.map +1 -1
- package/lib/sd-component-library221.js +15 -127
- package/lib/sd-component-library221.js.map +1 -1
- package/lib/sd-component-library222.js +19 -41
- package/lib/sd-component-library222.js.map +1 -1
- package/lib/sd-component-library223.js +3 -47
- package/lib/sd-component-library223.js.map +1 -1
- package/lib/sd-component-library224.js +3 -8
- package/lib/sd-component-library224.js.map +1 -1
- package/lib/sd-component-library225.js +3 -64
- package/lib/sd-component-library225.js.map +1 -1
- package/lib/sd-component-library226.js +31 -43
- package/lib/sd-component-library226.js.map +1 -1
- package/lib/sd-component-library227.js +19 -13
- package/lib/sd-component-library227.js.map +1 -1
- package/lib/sd-component-library228.js +20 -21
- package/lib/sd-component-library228.js.map +1 -1
- package/lib/sd-component-library229.js +26 -107
- package/lib/sd-component-library229.js.map +1 -1
- package/lib/sd-component-library230.js +27 -41
- package/lib/sd-component-library230.js.map +1 -1
- package/lib/sd-component-library231.js +129 -24
- package/lib/sd-component-library231.js.map +1 -1
- package/lib/sd-component-library232.js +40 -50
- package/lib/sd-component-library232.js.map +1 -1
- package/lib/sd-component-library233.js +45 -46
- package/lib/sd-component-library233.js.map +1 -1
- package/lib/sd-component-library234.js +7 -74
- package/lib/sd-component-library234.js.map +1 -1
- package/lib/sd-component-library235.js +3 -41
- package/lib/sd-component-library235.js.map +1 -1
- package/lib/sd-component-library236.js +20 -26
- package/lib/sd-component-library236.js.map +1 -1
- package/lib/sd-component-library237.js +107 -19
- package/lib/sd-component-library237.js.map +1 -1
- package/lib/sd-component-library238.js +47 -20
- package/lib/sd-component-library238.js.map +1 -1
- package/lib/sd-component-library239.js +24 -2
- package/lib/sd-component-library239.js.map +1 -1
- package/lib/sd-component-library24.js +1 -1
- package/lib/sd-component-library240.js +49 -36
- package/lib/sd-component-library240.js.map +1 -1
- package/lib/sd-component-library241.js +63 -128
- package/lib/sd-component-library241.js.map +1 -1
- package/lib/sd-component-library242.js +43 -13
- package/lib/sd-component-library242.js.map +1 -1
- package/lib/sd-component-library243.js +13 -14
- package/lib/sd-component-library243.js.map +1 -1
- package/lib/sd-component-library244.js +48 -3
- package/lib/sd-component-library244.js.map +1 -1
- package/lib/sd-component-library245.js +41 -3
- package/lib/sd-component-library245.js.map +1 -1
- package/lib/sd-component-library246.js +27 -3
- package/lib/sd-component-library246.js.map +1 -1
- package/lib/sd-component-library247.js +16 -47
- package/lib/sd-component-library247.js.map +1 -1
- package/lib/sd-component-library248.js +16 -61
- package/lib/sd-component-library248.js.map +1 -1
- package/lib/sd-component-library249.js +75 -3
- package/lib/sd-component-library249.js.map +1 -1
- package/lib/sd-component-library250.js +2 -46
- package/lib/sd-component-library250.js.map +1 -1
- package/lib/sd-component-library251.js +324 -16
- package/lib/sd-component-library251.js.map +1 -1
- package/lib/sd-component-library252.js +5 -325
- package/lib/sd-component-library252.js.map +1 -1
- package/lib/sd-component-library253.js +26 -5
- package/lib/sd-component-library253.js.map +1 -1
- package/lib/sd-component-library261.js +1 -1
- package/lib/sd-component-library262.js +1 -1
- package/lib/sd-component-library264.js +1 -1
- package/lib/sd-component-library277.js +2 -6
- package/lib/sd-component-library277.js.map +1 -1
- package/lib/sd-component-library278.js +2 -3
- package/lib/sd-component-library278.js.map +1 -1
- package/lib/sd-component-library279.js +9 -2
- package/lib/sd-component-library279.js.map +1 -1
- package/lib/sd-component-library280.js +70 -3
- package/lib/sd-component-library280.js.map +1 -1
- package/lib/sd-component-library281.js +102 -2
- package/lib/sd-component-library281.js.map +1 -1
- package/lib/sd-component-library282.js +106 -2
- package/lib/sd-component-library282.js.map +1 -1
- package/lib/sd-component-library283.js +6 -70
- package/lib/sd-component-library283.js.map +1 -1
- package/lib/sd-component-library284.js +2 -102
- package/lib/sd-component-library284.js.map +1 -1
- package/lib/sd-component-library285.js +34 -104
- package/lib/sd-component-library285.js.map +1 -1
- package/lib/sd-component-library286.js +14 -10
- package/lib/sd-component-library286.js.map +1 -1
- package/lib/sd-component-library287.js +3 -2
- package/lib/sd-component-library287.js.map +1 -1
- package/lib/sd-component-library288.js +3 -36
- package/lib/sd-component-library288.js.map +1 -1
- package/lib/sd-component-library289.js +3 -14
- package/lib/sd-component-library289.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 +58 -2
- package/lib/sd-component-library294.js.map +1 -1
- package/lib/sd-component-library295.js +25 -76
- package/lib/sd-component-library295.js.map +1 -1
- package/lib/sd-component-library296.js +89 -89
- package/lib/sd-component-library296.js.map +1 -1
- package/lib/sd-component-library297.js +50 -52
- package/lib/sd-component-library297.js.map +1 -1
- package/lib/sd-component-library298.js +35 -9
- package/lib/sd-component-library298.js.map +1 -1
- package/lib/sd-component-library299.js +25 -5
- package/lib/sd-component-library299.js.map +1 -1
- package/lib/sd-component-library300.js +5 -53
- package/lib/sd-component-library300.js.map +1 -1
- package/lib/sd-component-library301.js +4 -9
- package/lib/sd-component-library301.js.map +1 -1
- package/lib/sd-component-library302.js +8 -4
- package/lib/sd-component-library302.js.map +1 -1
- package/lib/sd-component-library303.js +5 -4
- package/lib/sd-component-library303.js.map +1 -1
- package/lib/sd-component-library304.js +4 -19
- package/lib/sd-component-library304.js.map +1 -1
- package/lib/sd-component-library305.js +19 -3
- package/lib/sd-component-library305.js.map +1 -1
- package/lib/sd-component-library306.js +3 -2
- package/lib/sd-component-library306.js.map +1 -1
- package/lib/sd-component-library307.js +34 -2
- package/lib/sd-component-library307.js.map +1 -1
- package/lib/sd-component-library308.js +2 -6
- package/lib/sd-component-library308.js.map +1 -1
- package/lib/sd-component-library309.js +76 -24
- package/lib/sd-component-library309.js.map +1 -1
- package/lib/sd-component-library310.js +92 -50
- package/lib/sd-component-library310.js.map +1 -1
- package/lib/sd-component-library311.js +52 -34
- package/lib/sd-component-library311.js.map +1 -1
- package/lib/sd-component-library312.js +9 -5
- package/lib/sd-component-library312.js.map +1 -1
- package/lib/sd-component-library313.js +5 -93
- package/lib/sd-component-library313.js.map +1 -1
- package/lib/sd-component-library314.js +53 -4
- package/lib/sd-component-library314.js.map +1 -1
- package/lib/sd-component-library315.js +20 -49
- package/lib/sd-component-library315.js.map +1 -1
- package/lib/sd-component-library316.js +15 -20
- package/lib/sd-component-library316.js.map +1 -1
- package/lib/sd-component-library317.js +6 -34
- package/lib/sd-component-library317.js.map +1 -1
- package/lib/sd-component-library319.js +31 -28
- package/lib/sd-component-library319.js.map +1 -1
- package/lib/sd-component-library320.js +2 -21
- package/lib/sd-component-library320.js.map +1 -1
- package/lib/sd-component-library321.js +2 -32
- package/lib/sd-component-library321.js.map +1 -1
- package/lib/sd-component-library51.js +3 -3
- package/lib/sd-component-library60.js +1 -1
- package/lib/sd-component-library61.js +2 -2
- package/lib/sd-component-library62.js +5 -5
- package/lib/sd-component-library63.js +1 -1
- package/lib/sd-component-library64.js +2 -2
- package/lib/sd-component-library65.js +1 -1
- package/lib/sd-component-library70.js +2 -2
- package/lib/sd-component-library72.js +3 -3
- 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-library81.js +9 -7
- package/lib/sd-component-library81.js.map +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 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sd-component-library280.js","sources":["../src/components/
|
|
1
|
+
{"version":3,"file":"sd-component-library280.js","sources":["../src/components/inputs/date-inputs/base-date-range-input/utils.ts"],"sourcesContent":["import { OnChangeProps, Range, StaticRange } from \"react-date-range\";\n\nimport {\n addDays,\n addMonths,\n addWeeks,\n addYears,\n endOfDay,\n endOfMonth,\n endOfWeek,\n endOfYear,\n format,\n isSameDay,\n startOfDay,\n startOfMonth,\n startOfWeek,\n startOfYear,\n} from \"date-fns\";\n\nimport { OnRangeSelection, StaticRangeOption } from \"./interfaces\";\nimport { BaseDateRangeInputMobileProps } from \"./partials/base-date-range-input-mobile/interfaces\";\n\nconst getFormattedDate = (date: Date) => format(date, \"EEE d MMM yyyy\");\n\nexport const getSelectedRangeText = (range: Range | null | undefined) => {\n const defaultText = \"No date selected\";\n\n return !range || !range.startDate || !range.endDate\n ? defaultText\n : isSameDay(range.startDate, range.endDate)\n ? getFormattedDate(range.startDate)\n : `${getFormattedDate(range.startDate)} - ${getFormattedDate(\n range.endDate\n )}`;\n};\n\nconst ranges = [\n {\n label: \"Yesterday\",\n startDate: startOfDay(addDays(new Date(), -1)),\n endDate: endOfDay(addDays(new Date(), -1)),\n },\n {\n label: \"Last Week\",\n startDate: startOfWeek(addWeeks(new Date(), -1), { weekStartsOn: 1 }),\n endDate: endOfWeek(addWeeks(new Date(), -1), { weekStartsOn: 1 }),\n },\n {\n label: \"Last 2 Weeks\",\n startDate: startOfWeek(addWeeks(new Date(), -2), { weekStartsOn: 1 }),\n endDate: endOfWeek(addWeeks(new Date(), -1), { weekStartsOn: 1 }),\n },\n {\n label: \"Last Month\",\n startDate: startOfMonth(addMonths(new Date(), -1)),\n endDate: endOfMonth(addMonths(new Date(), -1)),\n },\n {\n label: \"Last Year\",\n startDate: startOfYear(addYears(new Date(), -1)),\n endDate: endOfYear(addYears(new Date(), -1)),\n },\n];\n\nexport const getStaticRanges = (\n selectedRange: Range | undefined | null,\n onCustomRangeSelect: () => void,\n deselectCustomRange: () => void,\n customOptionSelected: boolean,\n customRanges?: StaticRangeOption[],\n mobile?: boolean\n): StaticRange[] => {\n const rangesToShow = customRanges || ranges;\n const staticRanges: StaticRange[] = rangesToShow.map(\n ({ label, startDate, endDate }) => ({\n label,\n range: (_) => ({\n startDate,\n endDate,\n }),\n isSelected: (range) =>\n range.startDate && range.endDate\n ? isSameDay(range.startDate, startDate) &&\n isSameDay(range.endDate, endDate)\n : false,\n })\n );\n\n return !mobile\n ? staticRanges\n : staticRanges.concat({\n label: \"Custom Range\",\n range: (_) => {\n onCustomRangeSelect();\n return {\n startDate: selectedRange?.startDate || new Date(),\n endDate: selectedRange?.endDate || new Date(),\n };\n },\n isSelected: (_) => customOptionSelected,\n });\n};\n\nexport const getCalendarProps = (props: BaseDateRangeInputMobileProps) => ({\n ...props,\n rangeColors: [props.color ?? \"#9E1CB5\"],\n weekStartsOn: 1,\n inputRanges: [],\n ranges: [\n props.selectedRange ?? {\n startDate: new Date(),\n endDate: new Date(),\n },\n ],\n months: props.months,\n onChange: (value: OnChangeProps) => {\n props.setSelectedRange((value as OnRangeSelection).range1);\n },\n});\n"],"names":["getFormattedDate","date","format","getSelectedRangeText","range","defaultText","isSameDay","ranges","startOfDay","addDays","endOfDay","startOfWeek","addWeeks","endOfWeek","startOfMonth","addMonths","endOfMonth","startOfYear","addYears","endOfYear","getStaticRanges","selectedRange","onCustomRangeSelect","deselectCustomRange","customOptionSelected","customRanges","mobile","staticRanges","label","startDate","endDate","_","getCalendarProps","props","value"],"mappings":";AAsBA,MAAMA,IAAmB,CAACC,MAAeC,EAAOD,GAAM,gBAAgB,GAEzDE,IAAuB,CAACC,MAAoC;AACvE,QAAMC,IAAc;AAEb,SAAA,CAACD,KAAS,CAACA,EAAM,aAAa,CAACA,EAAM,UACxCC,IACAC,EAAUF,E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OAAO;AAAA,QACb,WAAAF;AAAA,QACA,SAAAC;AAAA,MAAA;AAAA,MAEF,YAAY,CAAC1B,MACXA,EAAM,aAAaA,EAAM,UACrBE,EAAUF,EAAM,WAAWyB,CAAS,KACpCvB,EAAUF,EAAM,SAAS0B,CAAO,IAChC;AAAA,IAAA;AAAA,EACR;AAGF,SAAQJ,IAEJC,EAAa,OAAO;AAAA,IAClB,OAAO;AAAA,IACP,OAAO,CAACI,OACcT,KACb;AAAA,MACL,YAAWD,KAAA,gBAAAA,EAAe,cAAa,oBAAI,KAAK;AAAA,MAChD,UAASA,KAAA,gBAAAA,EAAe,YAAW,oBAAI,KAAK;AAAA,IAAA;AAAA,IAGhD,YAAY,CAACU,MAAMP;AAAA,EAAA,CACpB,IAXDG;AAYN,GAEaK,IAAmB,CAACC,OAA0C;AAAA,EACzE,GAAGA;AAAA,EACH,aAAa,CAACA,EAAM,SAAS,SAAS;AAAA,EACtC,cAAc;AAAA,EACd,aAAa,CAAC;AAAA,EACd,QAAQ;AAAA,IACNA,EAAM,iBAAiB;AAAA,MACrB,+BAAe,KAAK;AAAA,MACpB,6BAAa,KAAK;AAAA,IACpB;AAAA,EACF;AAAA,EACA,QAAQA,EAAM;AAAA,EACd,UAAU,CAACC,MAAyB;AAC5B,IAAAD,EAAA,iBAAkBC,EAA2B,MAAM;AAAA,EAC3D;AACF;"}
|
|
@@ -1,5 +1,105 @@
|
|
|
1
|
-
|
|
1
|
+
import { j as r } from "./sd-component-library197.js";
|
|
2
|
+
import l from "react";
|
|
3
|
+
import { DateRangePicker as s } from "react-date-range";
|
|
4
|
+
import { Box as x } from "rebass";
|
|
5
|
+
import { getCalendarProps as c } from "./sd-component-library280.js";
|
|
6
|
+
import { OutsideClickBox as m } from "./sd-component-library12.js";
|
|
7
|
+
import { ResponsiveTextV2 as f } from "./sd-component-library150.js";
|
|
8
|
+
import { SelectedRangeText as h } from "./sd-component-library315.js";
|
|
9
|
+
import { FrFrContainer as g } from "./sd-component-library36.js";
|
|
10
|
+
import { PrimaryTextButton as u } from "./sd-component-library22.js";
|
|
11
|
+
import { ApplyButton as R } from "./sd-component-library316.js";
|
|
12
|
+
const z = l.forwardRef(
|
|
13
|
+
(e, i) => {
|
|
14
|
+
const { zIndex: n, customOptionSelected: a, handleCancel: o, getStaticRanges: d } = e, p = (t) => {
|
|
15
|
+
t == null || t.preventDefault(), o();
|
|
16
|
+
};
|
|
17
|
+
return /* @__PURE__ */ r.jsx(
|
|
18
|
+
x,
|
|
19
|
+
{
|
|
20
|
+
sx: {
|
|
21
|
+
position: "fixed",
|
|
22
|
+
top: 0,
|
|
23
|
+
left: 0,
|
|
24
|
+
width: "100vw",
|
|
25
|
+
height: "100vh",
|
|
26
|
+
overflowY: "auto",
|
|
27
|
+
py: "30px",
|
|
28
|
+
bg: "#434A5499"
|
|
29
|
+
},
|
|
30
|
+
"data-testid": "calendar-wrapper",
|
|
31
|
+
children: /* @__PURE__ */ r.jsxs(
|
|
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
|
+
);
|
|
100
|
+
}
|
|
101
|
+
);
|
|
2
102
|
export {
|
|
3
|
-
|
|
103
|
+
z as BaseDateRangeInputMobile
|
|
4
104
|
};
|
|
5
105
|
//# sourceMappingURL=sd-component-library281.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sd-component-library281.js","sources":[],"sourcesContent":[],"names":[],"mappings":";"}
|
|
1
|
+
{"version":3,"file":"sd-component-library281.js","sources":["../src/components/inputs/date-inputs/base-date-range-input/partials/base-date-range-input-mobile/base-date-range-input-mobile.tsx"],"sourcesContent":["import React from \"react\";\nimport { DateRangePicker } from \"react-date-range\";\n\nimport { Box } from \"rebass\";\n\nimport { OutsideClickBox } from \"../../../../../boxes\";\nimport { PrimaryTextButton } from \"../../../../../buttons\";\nimport { FrFrContainer } from \"../../../../../containers\";\nimport { ResponsiveTextV2 } from \"../../../../../texts/responsive-text-v2\";\nimport { getCalendarProps } from \"../../utils\";\nimport { ApplyButton } from \"../apply-button\";\nimport { SelectedRangeText } from \"../selected-range-text\";\nimport { BaseDateRangeInputMobileProps as Props } from \"./interfaces\";\n\nexport const BaseDateRangeInputMobile = React.forwardRef<HTMLDivElement, Props>(\n (props, ref) => {\n const { zIndex, customOptionSelected, handleCancel, getStaticRanges } =\n props;\n\n const onClickOutside = (event?: React.MouseEvent<HTMLDivElement>) => {\n event?.preventDefault();\n handleCancel();\n };\n\n return (\n <Box\n sx={{\n position: \"fixed\",\n top: 0,\n left: 0,\n width: \"100vw\",\n height: \"100vh\",\n overflowY: \"auto\",\n py: \"30px\",\n bg: \"#434A5499\",\n }}\n data-testid=\"calendar-wrapper\"\n >\n <OutsideClickBox\n onClickOutside={onClickOutside}\n sx={{\n borderStyle: \"solid\",\n borderWidth: \"1px\",\n borderColor: \"cl_lightGrey\",\n minWidth: \"352px\",\n width: \"max-content\",\n backgroundColor: \"#fff\",\n m: \"auto\",\n borderRadius: \"4px\",\n zIndex,\n \".rdrDateRangePickerWrapper\": {\n width: \"100%\",\n flexDirection: \"column\",\n },\n \".rdrDefinedRangesWrapper\": {\n width: \"100%\",\n },\n \".rdrCalendarWrapper\": {\n display: customOptionSelected ? \"inline-flex\" : \"none\",\n },\n \".rdrInputRanges\": {\n display: \"none\",\n },\n \".rdrStaticRanges:before\": {\n fontSize: \"16px\",\n fontFamily: \"proxima-nova\",\n color: \"#9BA2B4\",\n fontWeight: \"300\",\n p: \"10px 20px\",\n },\n \".rdrStaticRange\": {\n fontSize: \"16px\",\n fontFamily: \"proxima-nova\",\n color: \"#434A54\",\n borderBottomWidth: \"0\",\n },\n }}\n >\n <ResponsiveTextV2 fontSizeWeight={[12, \"semi-bold\"]} ref={ref}>\n <DateRangePicker\n {...getCalendarProps(props)}\n direction=\"vertical\"\n staticRanges={getStaticRanges(true)}\n />\n </ResponsiveTextV2>\n\n <SelectedRangeText {...props} isMobile />\n\n <FrFrContainer p=\"10px 20px\">\n <PrimaryTextButton\n onClick={handleCancel}\n height=\"42px\"\n color=\"cl_darkGrey\"\n padding=\"0\"\n >\n Cancel\n </PrimaryTextButton>\n\n <ApplyButton {...props} />\n </FrFrContainer>\n </OutsideClickBox>\n </Box>\n );\n }\n);\n"],"names":["BaseDateRangeInputMobile","React","props","ref","zIndex","customOptionSelected","handleCancel","getStaticRanges","onClickOutside","event","jsx","Box","jsxs","OutsideClickBox","ResponsiveTextV2","DateRangePicker","getCalendarProps","SelectedRangeText","FrFrContainer","PrimaryTextButton","ApplyButton"],"mappings":";;;;;;;;;;;AAcO,MAAMA,IAA2BC,EAAM;AAAA,EAC5C,CAACC,GAAOC,MAAQ;AACd,UAAM,EAAE,QAAAC,GAAQ,sBAAAC,GAAsB,cAAAC,GAAc,iBAAAC,MAClDL,GAEIM,IAAiB,CAACC,MAA6C;AACnE,MAAAA,KAAA,QAAAA,EAAO,kBACMH;IAAA;AAIb,WAAAI,gBAAAA,EAAA;AAAA,MAACC;AAAA,MAAA;AAAA,QACC,IAAI;AAAA,UACF,UAAU;AAAA,UACV,KAAK;AAAA,UACL,MAAM;AAAA,UACN,OAAO;AAAA,UACP,QAAQ;AAAA,UACR,WAAW;AAAA,UACX,IAAI;AAAA,UACJ,IAAI;AAAA,QACN;AAAA,QACA,eAAY;AAAA,QAEZ,UAAAC,gBAAAA,EAAA;AAAA,UAACC;AAAA,UAAA;AAAA,YACC,gBAAAL;AAAA,YACA,IAAI;AAAA,cACF,aAAa;AAAA,cACb,aAAa;AAAA,c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B,GAAO;AAAA,cAAA,GAC1B;AAAA,YAAA;AAAA,UAAA;AAAA,QACF;AAAA,MAAA;AAAA,IAAA;AAAA,EAGN;AACF;"}
|
|
@@ -1,5 +1,109 @@
|
|
|
1
|
-
|
|
1
|
+
import { j as e } from "./sd-component-library197.js";
|
|
2
|
+
import { DateRangePicker as p } from "react-date-range";
|
|
3
|
+
import { Box as l } from "rebass";
|
|
4
|
+
import { getCalendarProps as x } from "./sd-component-library280.js";
|
|
5
|
+
import { TenSb as m } from "./sd-component-library153.js";
|
|
6
|
+
import { PrimaryTextButton as s } from "./sd-component-library22.js";
|
|
7
|
+
import { SelectedRangeText as c } from "./sd-component-library315.js";
|
|
8
|
+
import { ApplyButton as f } from "./sd-component-library316.js";
|
|
9
|
+
import { GridContainerV2 as g } from "./sd-component-library38.js";
|
|
10
|
+
const B = (r) => {
|
|
11
|
+
const {
|
|
12
|
+
selectedRange: o,
|
|
13
|
+
zIndex: n,
|
|
14
|
+
getStaticRanges: i,
|
|
15
|
+
handleCancel: a,
|
|
16
|
+
quickSelectionLabel: d,
|
|
17
|
+
alignCalendar: t
|
|
18
|
+
} = r;
|
|
19
|
+
return /* @__PURE__ */ e.jsxs(
|
|
20
|
+
l,
|
|
21
|
+
{
|
|
22
|
+
sx: {
|
|
23
|
+
overflowX: "auto",
|
|
24
|
+
borderStyle: "solid",
|
|
25
|
+
borderWidth: "1px",
|
|
26
|
+
minWidth: "max-content",
|
|
27
|
+
borderColor: "cl_lightGrey",
|
|
28
|
+
position: "absolute",
|
|
29
|
+
maxWidth: "max-content",
|
|
30
|
+
width: "max-content",
|
|
31
|
+
top: 0,
|
|
32
|
+
left: t === "left" ? "0" : t === "right" ? "unset" : void 0,
|
|
33
|
+
right: t === "right" ? "0" : t === "left" ? "unset" : void 0,
|
|
34
|
+
margin: "auto",
|
|
35
|
+
backgroundColor: "#fff",
|
|
36
|
+
zIndex: n,
|
|
37
|
+
".rdrDateRangePickerWrapper": {
|
|
38
|
+
width: "unset",
|
|
39
|
+
flexDirection: "row"
|
|
40
|
+
},
|
|
41
|
+
".rdrDefinedRangesWrapper": {
|
|
42
|
+
width: "226px"
|
|
43
|
+
},
|
|
44
|
+
".rdrCalendarWrapper": {
|
|
45
|
+
display: "inline-flex"
|
|
46
|
+
},
|
|
47
|
+
".rdrInputRanges": {
|
|
48
|
+
display: "none"
|
|
49
|
+
},
|
|
50
|
+
".rdrStaticRanges:before": {
|
|
51
|
+
content: d,
|
|
52
|
+
fontSize: "14px",
|
|
53
|
+
fontFamily: "proxima-nova",
|
|
54
|
+
color: "#9BA2B4",
|
|
55
|
+
fontWeight: "300",
|
|
56
|
+
p: "10px 20px"
|
|
57
|
+
},
|
|
58
|
+
".rdrStaticRange": {
|
|
59
|
+
fontSize: "14px",
|
|
60
|
+
fontFamily: "proxima-nova",
|
|
61
|
+
color: "#434A54",
|
|
62
|
+
borderBottomWidth: "1px"
|
|
63
|
+
}
|
|
64
|
+
},
|
|
65
|
+
"data-testid": "calendar-wrapper",
|
|
66
|
+
children: [
|
|
67
|
+
/* @__PURE__ */ e.jsx(m, { children: /* @__PURE__ */ e.jsx(
|
|
68
|
+
p,
|
|
69
|
+
{
|
|
70
|
+
...x(r),
|
|
71
|
+
direction: "horizontal",
|
|
72
|
+
staticRanges: i()
|
|
73
|
+
}
|
|
74
|
+
) }),
|
|
75
|
+
/* @__PURE__ */ e.jsxs(
|
|
76
|
+
g,
|
|
77
|
+
{
|
|
78
|
+
sx: {
|
|
79
|
+
gridTemplateColumns: "max-content 1fr max-content",
|
|
80
|
+
gap: "30px",
|
|
81
|
+
p: "10px",
|
|
82
|
+
borderTopWidth: "1px",
|
|
83
|
+
borderTopStyle: "solid",
|
|
84
|
+
borderTopColor: "#CCD0DB"
|
|
85
|
+
},
|
|
86
|
+
children: [
|
|
87
|
+
/* @__PURE__ */ e.jsx(
|
|
88
|
+
s,
|
|
89
|
+
{
|
|
90
|
+
onClick: a,
|
|
91
|
+
height: "42px",
|
|
92
|
+
color: "cl_darkGrey",
|
|
93
|
+
padding: "0 0 0 10px",
|
|
94
|
+
children: "Cancel"
|
|
95
|
+
}
|
|
96
|
+
),
|
|
97
|
+
/* @__PURE__ */ e.jsx(c, { selectedRange: o }),
|
|
98
|
+
/* @__PURE__ */ e.jsx(f, { ...r })
|
|
99
|
+
]
|
|
100
|
+
}
|
|
101
|
+
)
|
|
102
|
+
]
|
|
103
|
+
}
|
|
104
|
+
);
|
|
105
|
+
};
|
|
2
106
|
export {
|
|
3
|
-
|
|
107
|
+
B as BaseDateRangeInputDesktop
|
|
4
108
|
};
|
|
5
109
|
//# sourceMappingURL=sd-component-library282.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sd-component-library282.js","sources":[],"sourcesContent":[],"names":[],"mappings":";"}
|
|
1
|
+
{"version":3,"file":"sd-component-library282.js","sources":["../src/components/inputs/date-inputs/base-date-range-input/partials/base-date-range-input-desktop/base-date-range-input-desktop.tsx"],"sourcesContent":["import React from \"react\";\nimport { DateRangePicker } from \"react-date-range\";\n\nimport { Box } from \"rebass\";\n\nimport { PrimaryTextButton } from \"../../../../../buttons\";\nimport { Grid } from \"../../../../../containers\";\nimport { TenSb } from \"../../../../../texts/ten-sb\";\nimport { getCalendarProps } from \"../../utils\";\nimport { ApplyButton } from \"../apply-button\";\nimport { SelectedRangeText } from \"../selected-range-text\";\nimport { BaseDateRangeInputDesktopProps as Props } from \"./interfaces\";\n\nexport const BaseDateRangeInputDesktop: React.FC<Props> = (props) => {\n const {\n selectedRange,\n zIndex,\n getStaticRanges,\n handleCancel,\n quickSelectionLabel,\n alignCalendar,\n } = props;\n return (\n <Box\n sx={{\n overflowX: \"auto\",\n borderStyle: \"solid\",\n borderWidth: \"1px\",\n minWidth: \"max-content\",\n borderColor: \"cl_lightGrey\",\n position: \"absolute\",\n maxWidth: \"max-content\",\n width: \"max-content\",\n top: 0,\n left:\n alignCalendar === \"left\"\n ? \"0\"\n : alignCalendar === \"right\"\n ? \"unset\"\n : undefined,\n right:\n alignCalendar === \"right\"\n ? \"0\"\n : alignCalendar === \"left\"\n ? \"unset\"\n : undefined,\n margin: \"auto\",\n backgroundColor: \"#fff\",\n zIndex,\n \".rdrDateRangePickerWrapper\": {\n width: \"unset\",\n flexDirection: \"row\",\n },\n \".rdrDefinedRangesWrapper\": {\n width: \"226px\",\n },\n \".rdrCalendarWrapper\": {\n display: \"inline-flex\",\n },\n \".rdrInputRanges\": {\n display: \"none\",\n },\n \".rdrStaticRanges:before\": {\n content: quickSelectionLabel,\n fontSize: \"14px\",\n fontFamily: \"proxima-nova\",\n color: \"#9BA2B4\",\n fontWeight: \"300\",\n p: \"10px 20px\",\n },\n \".rdrStaticRange\": {\n fontSize: \"14px\",\n fontFamily: \"proxima-nova\",\n color: \"#434A54\",\n borderBottomWidth: \"1px\",\n },\n }}\n data-testid=\"calendar-wrapper\"\n >\n <TenSb>\n <DateRangePicker\n {...getCalendarProps(props)}\n direction=\"horizontal\"\n staticRanges={getStaticRanges()}\n />\n </TenSb>\n\n <Grid\n sx={{\n gridTemplateColumns: \"max-content 1fr max-content\",\n gap: \"30px\",\n p: \"10px\",\n borderTopWidth: \"1px\",\n borderTopStyle: \"solid\",\n borderTopColor: \"#CCD0DB\",\n }}\n >\n <PrimaryTextButton\n onClick={handleCancel}\n height=\"42px\"\n color=\"cl_darkGrey\"\n padding=\"0 0 0 10px\"\n >\n Cancel\n </PrimaryTextButton>\n\n <SelectedRangeText selectedRange={selectedRange} />\n\n <ApplyButton {...props} />\n </Grid>\n </Box>\n );\n};\n"],"names":["BaseDateRangeInputDesktop","props","selectedRange","zIndex","getStaticRanges","handleCancel","quickSelectionLabel","alignCalendar","jsxs","Box","jsx","TenSb","DateRangePicker","getCalendarProps","Grid","PrimaryTextButton","SelectedRangeText","ApplyButton"],"mappings":";;;;;;;;;AAaa,MAAAA,IAA6C,CAACC,MAAU;AAC7D,QAAA;AAAA,IACJ,eAAAC;AAAA,IACA,QAAAC;AAAA,IACA,iBAAA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BAAqB;AAAA,cACrB,KAAK;AAAA,cACL,GAAG;AAAA,cACH,gBAAgB;AAAA,cAChB,gBAAgB;AAAA,cAChB,gBAAgB;AAAA,YAClB;AAAA,YAEA,UAAA;AAAA,cAAAJ,gBAAAA,EAAA;AAAA,gBAACK;AAAA,gBAAA;AAAA,kBACC,SAASV;AAAA,kBACT,QAAO;AAAA,kBACP,OAAM;AAAA,kBACN,SAAQ;AAAA,kBACT,UAAA;AAAA,gBAAA;AAAA,cAED;AAAA,cAEAK,gBAAAA,MAACM,KAAkB,eAAAd,GAA8B;AAAA,cAEjDQ,gBAAAA,EAAAA,IAACO,GAAa,EAAA,GAAGhB,GAAO;AAAA,YAAA;AAAA,UAAA;AAAA,QAC1B;AAAA,MAAA;AAAA,IAAA;AAAA,EAAA;AAGN;"}
|
|
@@ -1,73 +1,9 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
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))
|
|
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
|
+
var o = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {};
|
|
2
|
+
function l(e) {
|
|
3
|
+
return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
|
|
4
|
+
}
|
|
68
5
|
export {
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
_ as getStaticRanges
|
|
6
|
+
o as commonjsGlobal,
|
|
7
|
+
l as getDefaultExportFromCjs
|
|
72
8
|
};
|
|
73
9
|
//# sourceMappingURL=sd-component-library283.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sd-component-library283.js","sources":[
|
|
1
|
+
{"version":3,"file":"sd-component-library283.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;"}
|
|
@@ -1,105 +1,5 @@
|
|
|
1
|
-
|
|
2
|
-
import l from "react";
|
|
3
|
-
import { DateRangePicker as s } from "react-date-range";
|
|
4
|
-
import { Box as x } from "rebass";
|
|
5
|
-
import { getCalendarProps as c } from "./sd-component-library283.js";
|
|
6
|
-
import { OutsideClickBox as m } from "./sd-component-library12.js";
|
|
7
|
-
import { ResponsiveTextV2 as f } from "./sd-component-library150.js";
|
|
8
|
-
import { SelectedRangeText as h } from "./sd-component-library319.js";
|
|
9
|
-
import { FrFrContainer as g } from "./sd-component-library36.js";
|
|
10
|
-
import { PrimaryTextButton as u } from "./sd-component-library22.js";
|
|
11
|
-
import { ApplyButton as R } from "./sd-component-library320.js";
|
|
12
|
-
const z = l.forwardRef(
|
|
13
|
-
(e, i) => {
|
|
14
|
-
const { zIndex: n, customOptionSelected: a, handleCancel: o, getStaticRanges: d } = e, p = (t) => {
|
|
15
|
-
t == null || t.preventDefault(), o();
|
|
16
|
-
};
|
|
17
|
-
return /* @__PURE__ */ r.jsx(
|
|
18
|
-
x,
|
|
19
|
-
{
|
|
20
|
-
sx: {
|
|
21
|
-
position: "fixed",
|
|
22
|
-
top: 0,
|
|
23
|
-
left: 0,
|
|
24
|
-
width: "100vw",
|
|
25
|
-
height: "100vh",
|
|
26
|
-
overflowY: "auto",
|
|
27
|
-
py: "30px",
|
|
28
|
-
bg: "#434A5499"
|
|
29
|
-
},
|
|
30
|
-
"data-testid": "calendar-wrapper",
|
|
31
|
-
children: /* @__PURE__ */ r.jsxs(
|
|
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
|
-
);
|
|
100
|
-
}
|
|
101
|
-
);
|
|
1
|
+
var e = {};
|
|
102
2
|
export {
|
|
103
|
-
|
|
3
|
+
e as __exports
|
|
104
4
|
};
|
|
105
5
|
//# sourceMappingURL=sd-component-library284.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sd-component-library284.js","sources":[
|
|
1
|
+
{"version":3,"file":"sd-component-library284.js","sources":[],"sourcesContent":[],"names":[],"mappings":";"}
|
|
@@ -1,109 +1,39 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
handleCancel: a,
|
|
16
|
-
quickSelectionLabel: d,
|
|
17
|
-
alignCalendar: t
|
|
18
|
-
} = r;
|
|
19
|
-
return /* @__PURE__ */ e.jsxs(
|
|
20
|
-
l,
|
|
21
|
-
{
|
|
22
|
-
sx: {
|
|
23
|
-
overflowX: "auto",
|
|
24
|
-
borderStyle: "solid",
|
|
25
|
-
borderWidth: "1px",
|
|
26
|
-
minWidth: "max-content",
|
|
27
|
-
borderColor: "cl_lightGrey",
|
|
28
|
-
position: "absolute",
|
|
29
|
-
maxWidth: "max-content",
|
|
30
|
-
width: "max-content",
|
|
31
|
-
top: 0,
|
|
32
|
-
left: t === "left" ? "0" : t === "right" ? "unset" : void 0,
|
|
33
|
-
right: t === "right" ? "0" : t === "left" ? "unset" : void 0,
|
|
34
|
-
margin: "auto",
|
|
35
|
-
backgroundColor: "#fff",
|
|
36
|
-
zIndex: n,
|
|
37
|
-
".rdrDateRangePickerWrapper": {
|
|
38
|
-
width: "unset",
|
|
39
|
-
flexDirection: "row"
|
|
40
|
-
},
|
|
41
|
-
".rdrDefinedRangesWrapper": {
|
|
42
|
-
width: "226px"
|
|
43
|
-
},
|
|
44
|
-
".rdrCalendarWrapper": {
|
|
45
|
-
display: "inline-flex"
|
|
46
|
-
},
|
|
47
|
-
".rdrInputRanges": {
|
|
48
|
-
display: "none"
|
|
49
|
-
},
|
|
50
|
-
".rdrStaticRanges:before": {
|
|
51
|
-
content: d,
|
|
52
|
-
fontSize: "14px",
|
|
53
|
-
fontFamily: "proxima-nova",
|
|
54
|
-
color: "#9BA2B4",
|
|
55
|
-
fontWeight: "300",
|
|
56
|
-
p: "10px 20px"
|
|
57
|
-
},
|
|
58
|
-
".rdrStaticRange": {
|
|
59
|
-
fontSize: "14px",
|
|
60
|
-
fontFamily: "proxima-nova",
|
|
61
|
-
color: "#434A54",
|
|
62
|
-
borderBottomWidth: "1px"
|
|
63
|
-
}
|
|
64
|
-
},
|
|
65
|
-
"data-testid": "calendar-wrapper",
|
|
66
|
-
children: [
|
|
67
|
-
/* @__PURE__ */ e.jsx(m, { children: /* @__PURE__ */ e.jsx(
|
|
68
|
-
p,
|
|
69
|
-
{
|
|
70
|
-
...x(r),
|
|
71
|
-
direction: "horizontal",
|
|
72
|
-
staticRanges: i()
|
|
73
|
-
}
|
|
74
|
-
) }),
|
|
75
|
-
/* @__PURE__ */ e.jsxs(
|
|
76
|
-
g,
|
|
77
|
-
{
|
|
78
|
-
sx: {
|
|
79
|
-
gridTemplateColumns: "max-content 1fr max-content",
|
|
80
|
-
gap: "30px",
|
|
81
|
-
p: "10px",
|
|
82
|
-
borderTopWidth: "1px",
|
|
83
|
-
borderTopStyle: "solid",
|
|
84
|
-
borderTopColor: "#CCD0DB"
|
|
85
|
-
},
|
|
86
|
-
children: [
|
|
87
|
-
/* @__PURE__ */ e.jsx(
|
|
88
|
-
s,
|
|
89
|
-
{
|
|
90
|
-
onClick: a,
|
|
91
|
-
height: "42px",
|
|
92
|
-
color: "cl_darkGrey",
|
|
93
|
-
padding: "0 0 0 10px",
|
|
94
|
-
children: "Cancel"
|
|
95
|
-
}
|
|
96
|
-
),
|
|
97
|
-
/* @__PURE__ */ e.jsx(c, { selectedRange: o }),
|
|
98
|
-
/* @__PURE__ */ e.jsx(f, { ...r })
|
|
99
|
-
]
|
|
100
|
-
}
|
|
101
|
-
)
|
|
102
|
-
]
|
|
1
|
+
var c = function u(r, t) {
|
|
2
|
+
if (r === t)
|
|
3
|
+
return !0;
|
|
4
|
+
if (r && t && typeof r == "object" && typeof t == "object") {
|
|
5
|
+
if (r.constructor !== t.constructor)
|
|
6
|
+
return !1;
|
|
7
|
+
var f, e, o;
|
|
8
|
+
if (Array.isArray(r)) {
|
|
9
|
+
if (f = r.length, f != t.length)
|
|
10
|
+
return !1;
|
|
11
|
+
for (e = f; e-- !== 0; )
|
|
12
|
+
if (!u(r[e], t[e]))
|
|
13
|
+
return !1;
|
|
14
|
+
return !0;
|
|
103
15
|
}
|
|
104
|
-
|
|
16
|
+
if (r.constructor === RegExp)
|
|
17
|
+
return r.source === t.source && r.flags === t.flags;
|
|
18
|
+
if (r.valueOf !== Object.prototype.valueOf)
|
|
19
|
+
return r.valueOf() === t.valueOf();
|
|
20
|
+
if (r.toString !== Object.prototype.toString)
|
|
21
|
+
return r.toString() === t.toString();
|
|
22
|
+
if (o = Object.keys(r), f = o.length, f !== Object.keys(t).length)
|
|
23
|
+
return !1;
|
|
24
|
+
for (e = f; e-- !== 0; )
|
|
25
|
+
if (!Object.prototype.hasOwnProperty.call(t, o[e]))
|
|
26
|
+
return !1;
|
|
27
|
+
for (e = f; e-- !== 0; ) {
|
|
28
|
+
var n = o[e];
|
|
29
|
+
if (!u(r[n], t[n]))
|
|
30
|
+
return !1;
|
|
31
|
+
}
|
|
32
|
+
return !0;
|
|
33
|
+
}
|
|
34
|
+
return r !== r && t !== t;
|
|
105
35
|
};
|
|
106
36
|
export {
|
|
107
|
-
|
|
37
|
+
c as f
|
|
108
38
|
};
|
|
109
39
|
//# sourceMappingURL=sd-component-library285.js.map
|