@reportportal/ui-kit 0.0.1-alpha.40 → 0.0.1-alpha.42
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/dist/calendar-f154eb78.js +6 -0
- package/dist/components/dataPicker2/dataPicker2/datePicker.d.ts +24 -0
- package/dist/components/dataPicker2/dataPicker2/header/datePickerHeader.d.ts +15 -0
- package/dist/components/dataPicker2/dataPicker2/header/index.d.ts +3 -0
- package/dist/components/dataPicker2/dataPicker2/index.d.ts +3 -0
- package/dist/components/dataPicker2/dataPicker2/utils.d.ts +3 -0
- package/dist/components/date2/date2.d.ts +24 -0
- package/dist/components/date2/index.d.ts +3 -0
- package/dist/components/datePicker1/datePicker.d.ts +24 -0
- package/dist/components/datePicker1/header/datePickerHeader.d.ts +15 -0
- package/dist/components/datePicker1/header/index.d.ts +3 -0
- package/dist/components/datePicker1/index.d.ts +3 -0
- package/dist/components/datePicker1/utils.d.ts +3 -0
- package/dist/components/index.d.ts +3 -0
- package/dist/components/reactDatePicker/index.d.ts +3 -0
- package/dist/components/reactDatePicker/reactDatePicker.d.ts +2 -0
- package/dist/components/reactDatePicker2/index.d.ts +3 -0
- package/dist/components/reactDatePicker2/reactDatePicker2.d.ts +2 -0
- package/dist/date2-9273411e.js +46 -0
- package/dist/date2.js +7 -0
- package/dist/datePicker-a005ebc6.js +194 -0
- package/dist/datePicker-e85bee1d.js +194 -0
- package/dist/datePicker.js +2 -1
- package/dist/datePicker1.js +19 -0
- package/dist/index.js +47 -40
- package/dist/reactDatePicker2-a31b070e.js +5 -0
- package/dist/reactDatePicker2.js +6 -0
- package/dist/style.css +1 -1
- package/package.json +1 -1
- package/dist/datePicker-1b333ee2.js +0 -196
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import * as e from "react";
|
|
2
|
+
const l = (t) => /* @__PURE__ */ e.createElement("svg", { width: 8, height: 13, viewBox: "0 0 8 13", fill: "none", xmlns: "http://www.w3.org/2000/svg", ...t }, /* @__PURE__ */ e.createElement("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M6.54134 12.2173C6.69755 12.3735 6.95081 12.3735 7.10702 12.2173L7.24844 12.0759C7.40465 11.9197 7.40465 11.6664 7.24844 11.5102L1.90539 6.16715L7.24844 0.824097C7.40465 0.667887 7.40465 0.41462 7.24844 0.258411L7.10702 0.116989C6.95081 -0.0392199 6.69755 -0.0392199 6.54134 0.116989L0.998591 5.65973L0.999562 5.6607L0.767094 5.89317C0.610884 6.04938 0.610884 6.30265 0.767093 6.45886L1.48425 7.17602L1.49215 7.16813L6.54134 12.2173Z", fill: "#C1C7D0" })), i = (t) => /* @__PURE__ */ e.createElement("svg", { width: 14, height: 15, viewBox: "0 0 14 15", fill: "none", xmlns: "http://www.w3.org/2000/svg", ...t }, /* @__PURE__ */ e.createElement("rect", { x: 0.5, y: 1.5, width: 13, height: 13, rx: 1.5, stroke: "#A2AAB5" }), /* @__PURE__ */ e.createElement("rect", { x: 9, width: 1, height: 3.00067, rx: 0.5, fill: "#A2AAB5" }), /* @__PURE__ */ e.createElement("rect", { x: 4, width: 1, height: 3.00067, rx: 0.5, fill: "#A2AAB5" }), /* @__PURE__ */ e.createElement("rect", { x: 14, y: 4, width: 1, height: 14, transform: "rotate(90 14 4)", fill: "#A2AAB5" }), /* @__PURE__ */ e.createElement("rect", { x: 3, y: 10, width: 2, height: 2, fill: "#A2AAB5" }), /* @__PURE__ */ e.createElement("rect", { x: 6, y: 10, width: 2, height: 2, fill: "#A2AAB5" }), /* @__PURE__ */ e.createElement("rect", { x: 6, y: 7, width: 2, height: 2, fill: "#A2AAB5" }), /* @__PURE__ */ e.createElement("rect", { x: 3, y: 7, width: 2, height: 2, fill: "#A2AAB5" }), /* @__PURE__ */ e.createElement("rect", { x: 9, y: 7, width: 2, height: 2, fill: "#A2AAB5" }));
|
|
3
|
+
export {
|
|
4
|
+
l as S,
|
|
5
|
+
i as a
|
|
6
|
+
};
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { FC, ReactNode, ReactElement } from 'react';
|
|
2
|
+
interface DatePickerProps {
|
|
3
|
+
onChange?: (date: Date | any) => void;
|
|
4
|
+
onBlur?: () => void;
|
|
5
|
+
onFocus?: () => void;
|
|
6
|
+
headerNodes?: ReactNode;
|
|
7
|
+
disabled?: boolean;
|
|
8
|
+
shouldCloseOnSelect?: boolean;
|
|
9
|
+
fixedHeight?: boolean;
|
|
10
|
+
startDate?: Date | undefined;
|
|
11
|
+
endDate?: Date | undefined;
|
|
12
|
+
customClassName?: string;
|
|
13
|
+
popperClassName?: string;
|
|
14
|
+
calendarClassName?: string;
|
|
15
|
+
customTimeInput?: ReactElement;
|
|
16
|
+
language?: string;
|
|
17
|
+
yearsOptions?: number[];
|
|
18
|
+
placeholder?: string;
|
|
19
|
+
dateFormat?: string;
|
|
20
|
+
selects?: 'start' | 'end' | 'none';
|
|
21
|
+
value?: Date | null;
|
|
22
|
+
}
|
|
23
|
+
export declare const DatePicker2: FC<DatePickerProps>;
|
|
24
|
+
export {};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { FC, ReactNode } from 'react';
|
|
2
|
+
export interface DatePickerHeaderProps {
|
|
3
|
+
changeYear: (year: number) => void;
|
|
4
|
+
changeMonth: (month: number) => void;
|
|
5
|
+
decreaseMonth: () => void;
|
|
6
|
+
increaseMonth: () => void;
|
|
7
|
+
headerNodes: ReactNode;
|
|
8
|
+
date: Date;
|
|
9
|
+
prevMonthButtonDisabled: boolean;
|
|
10
|
+
nextMonthButtonDisabled: boolean;
|
|
11
|
+
customClassName: string;
|
|
12
|
+
yearsOptions: number[];
|
|
13
|
+
locale: string;
|
|
14
|
+
}
|
|
15
|
+
export declare const DatePickerHeader: FC<DatePickerHeaderProps>;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { FC, ReactNode, ReactElement } from 'react';
|
|
2
|
+
interface DatePickerProps {
|
|
3
|
+
onChange?: (date: Date | any) => void;
|
|
4
|
+
onBlur?: () => void;
|
|
5
|
+
onFocus?: () => void;
|
|
6
|
+
headerNodes?: ReactNode;
|
|
7
|
+
disabled?: boolean;
|
|
8
|
+
shouldCloseOnSelect?: boolean;
|
|
9
|
+
fixedHeight?: boolean;
|
|
10
|
+
startDate?: Date | undefined;
|
|
11
|
+
endDate?: Date | undefined;
|
|
12
|
+
customClassName?: string;
|
|
13
|
+
popperClassName?: string;
|
|
14
|
+
calendarClassName?: string;
|
|
15
|
+
customTimeInput?: ReactElement;
|
|
16
|
+
language?: string;
|
|
17
|
+
yearsOptions?: number[];
|
|
18
|
+
placeholder?: string;
|
|
19
|
+
dateFormat?: string;
|
|
20
|
+
selects?: 'start' | 'end' | 'none';
|
|
21
|
+
value?: Date | null;
|
|
22
|
+
}
|
|
23
|
+
export declare const Date2: FC<DatePickerProps>;
|
|
24
|
+
export {};
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { FC, ReactNode, ReactElement } from 'react';
|
|
2
|
+
interface DatePickerProps {
|
|
3
|
+
onChange?: (date: Date | any) => void;
|
|
4
|
+
onBlur?: () => void;
|
|
5
|
+
onFocus?: () => void;
|
|
6
|
+
headerNodes?: ReactNode;
|
|
7
|
+
disabled?: boolean;
|
|
8
|
+
shouldCloseOnSelect?: boolean;
|
|
9
|
+
fixedHeight?: boolean;
|
|
10
|
+
startDate?: Date | undefined;
|
|
11
|
+
endDate?: Date | undefined;
|
|
12
|
+
customClassName?: string;
|
|
13
|
+
popperClassName?: string;
|
|
14
|
+
calendarClassName?: string;
|
|
15
|
+
customTimeInput?: ReactElement;
|
|
16
|
+
language?: string;
|
|
17
|
+
yearsOptions?: number[];
|
|
18
|
+
placeholder?: string;
|
|
19
|
+
dateFormat?: string;
|
|
20
|
+
selects?: 'start' | 'end' | 'none';
|
|
21
|
+
value?: Date | null;
|
|
22
|
+
}
|
|
23
|
+
export declare const DatePicker1: FC<DatePickerProps>;
|
|
24
|
+
export {};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { FC, ReactNode } from 'react';
|
|
2
|
+
export interface DatePickerHeaderProps {
|
|
3
|
+
changeYear: (year: number) => void;
|
|
4
|
+
changeMonth: (month: number) => void;
|
|
5
|
+
decreaseMonth: () => void;
|
|
6
|
+
increaseMonth: () => void;
|
|
7
|
+
headerNodes: ReactNode;
|
|
8
|
+
date: Date;
|
|
9
|
+
prevMonthButtonDisabled: boolean;
|
|
10
|
+
nextMonthButtonDisabled: boolean;
|
|
11
|
+
customClassName: string;
|
|
12
|
+
yearsOptions: number[];
|
|
13
|
+
locale: string;
|
|
14
|
+
}
|
|
15
|
+
export declare const DatePickerHeader: FC<DatePickerHeaderProps>;
|
|
@@ -16,5 +16,8 @@ export { Popover } from './popover';
|
|
|
16
16
|
export { Pagination } from './pagination';
|
|
17
17
|
export { Table } from './table';
|
|
18
18
|
export { DatePicker } from './datePicker';
|
|
19
|
+
export { DatePicker1 } from './datePicker1';
|
|
20
|
+
export { Date2 } from './date2';
|
|
21
|
+
export { ReactDatePicker2 } from './reactDatePicker2';
|
|
19
22
|
export { SystemAlert } from './systemAlert';
|
|
20
23
|
export * from './icons';
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import { jsx as E } from "react/jsx-runtime";
|
|
2
|
+
import T from "react-datepicker";
|
|
3
|
+
const m = "en", r = "MM-dd-yyyy", U = ({
|
|
4
|
+
onChange: a = () => {
|
|
5
|
+
},
|
|
6
|
+
disabled: s = !1,
|
|
7
|
+
onBlur: d = () => {
|
|
8
|
+
},
|
|
9
|
+
onFocus: l = () => {
|
|
10
|
+
},
|
|
11
|
+
endDate: n = void 0,
|
|
12
|
+
startDate: o = void 0,
|
|
13
|
+
customTimeInput: t = void 0,
|
|
14
|
+
shouldCloseOnSelect: i = !0,
|
|
15
|
+
fixedHeight: p = !1,
|
|
16
|
+
language: c = m,
|
|
17
|
+
placeholder: A = r.toUpperCase(),
|
|
18
|
+
dateFormat: D = r,
|
|
19
|
+
selects: e = "start",
|
|
20
|
+
value: f = null
|
|
21
|
+
}) => /* @__PURE__ */ E(
|
|
22
|
+
T,
|
|
23
|
+
{
|
|
24
|
+
placeholderText: A,
|
|
25
|
+
selected: f,
|
|
26
|
+
startDate: o,
|
|
27
|
+
endDate: n,
|
|
28
|
+
minDate: e === "end" ? o : void 0,
|
|
29
|
+
disabled: s,
|
|
30
|
+
shouldCloseOnSelect: i,
|
|
31
|
+
fixedHeight: p,
|
|
32
|
+
locale: c,
|
|
33
|
+
showPopperArrow: !1,
|
|
34
|
+
onChange: a,
|
|
35
|
+
onBlur: d,
|
|
36
|
+
onFocus: l,
|
|
37
|
+
customTimeInput: t,
|
|
38
|
+
showTimeInput: !!t,
|
|
39
|
+
dateFormat: D,
|
|
40
|
+
selectsStart: e === "start",
|
|
41
|
+
selectsEnd: e === "end"
|
|
42
|
+
}
|
|
43
|
+
);
|
|
44
|
+
export {
|
|
45
|
+
U as D
|
|
46
|
+
};
|
package/dist/date2.js
ADDED
|
@@ -0,0 +1,194 @@
|
|
|
1
|
+
import { jsxs as S, Fragment as U, jsx as o } from "react/jsx-runtime";
|
|
2
|
+
import $ from "react-datepicker";
|
|
3
|
+
import { c as Y } from "./bind-06a7ff84.js";
|
|
4
|
+
import { useMemo as E, useRef as B } from "react";
|
|
5
|
+
import { F as D } from "./fieldText-65e4c614.js";
|
|
6
|
+
import "./baseIconButton-b6adc843.js";
|
|
7
|
+
import { S as T, a as G } from "./calendar-f154eb78.js";
|
|
8
|
+
import { D as P } from "./dropdown-9f4d1928.js";
|
|
9
|
+
const H = (a, c = 20) => {
|
|
10
|
+
const l = a + c;
|
|
11
|
+
return new Array(l - a).fill(void 0).map((g, e) => a - e);
|
|
12
|
+
}, V = "_header_a3cjx_1", O = "_disabled_a3cjx_25", W = "_dropdown_a3cjx_8", q = {
|
|
13
|
+
header: V,
|
|
14
|
+
"dropdowns-wrapper": "_dropdowns-wrapper_a3cjx_8",
|
|
15
|
+
"button-prev": "_button-prev_a3cjx_13",
|
|
16
|
+
"button-next": "_button-next_a3cjx_14",
|
|
17
|
+
disabled: O,
|
|
18
|
+
dropdown: W,
|
|
19
|
+
"month-dropdown": "_month-dropdown_a3cjx_44",
|
|
20
|
+
"toggle-button": "_toggle-button_a3cjx_47"
|
|
21
|
+
}, r = Y.bind(q), z = ({
|
|
22
|
+
date: a = /* @__PURE__ */ new Date(),
|
|
23
|
+
changeYear: c = () => {
|
|
24
|
+
},
|
|
25
|
+
changeMonth: l = () => {
|
|
26
|
+
},
|
|
27
|
+
decreaseMonth: g = () => {
|
|
28
|
+
},
|
|
29
|
+
increaseMonth: e = () => {
|
|
30
|
+
},
|
|
31
|
+
prevMonthButtonDisabled: n = !1,
|
|
32
|
+
nextMonthButtonDisabled: h = !1,
|
|
33
|
+
headerNodes: b = null,
|
|
34
|
+
customClassName: w = "",
|
|
35
|
+
yearsOptions: i = [],
|
|
36
|
+
locale: x
|
|
37
|
+
}) => {
|
|
38
|
+
const p = a.getFullYear(), C = a.getMonth(), f = E(() => {
|
|
39
|
+
const t = Array(12).keys(), s = new Intl.DateTimeFormat(x, {
|
|
40
|
+
month: "long"
|
|
41
|
+
}), d = (m) => s.format(new Date(p, m));
|
|
42
|
+
return Array.from(t, d).reduce((m, j, A) => m.concat({
|
|
43
|
+
value: A,
|
|
44
|
+
label: j
|
|
45
|
+
}), []);
|
|
46
|
+
}, []), N = E(() => (i.length > 0 ? i : H(p)).reduce(
|
|
47
|
+
(s, d) => s.concat({ value: d, label: `${d}` }),
|
|
48
|
+
[]
|
|
49
|
+
), [i]), v = (t) => {
|
|
50
|
+
l(t);
|
|
51
|
+
}, y = (t) => {
|
|
52
|
+
c(t);
|
|
53
|
+
};
|
|
54
|
+
return /* @__PURE__ */ S(U, { children: [
|
|
55
|
+
b && /* @__PURE__ */ o("div", { className: r(w), children: b }),
|
|
56
|
+
/* @__PURE__ */ S("div", { className: r("header"), children: [
|
|
57
|
+
/* @__PURE__ */ o(
|
|
58
|
+
"button",
|
|
59
|
+
{
|
|
60
|
+
"aria-label": "Previous Months",
|
|
61
|
+
disabled: n,
|
|
62
|
+
onClick: g,
|
|
63
|
+
className: r("button-prev", { disabled: n }),
|
|
64
|
+
children: /* @__PURE__ */ o(T, {})
|
|
65
|
+
}
|
|
66
|
+
),
|
|
67
|
+
/* @__PURE__ */ S("div", { className: r("dropdowns-wrapper"), children: [
|
|
68
|
+
/* @__PURE__ */ o(
|
|
69
|
+
P,
|
|
70
|
+
{
|
|
71
|
+
options: f,
|
|
72
|
+
value: C,
|
|
73
|
+
onChange: v,
|
|
74
|
+
transparentBackground: !0,
|
|
75
|
+
className: r("dropdown", "month-dropdown"),
|
|
76
|
+
toggleButtonClassName: r("toggle-button")
|
|
77
|
+
}
|
|
78
|
+
),
|
|
79
|
+
/* @__PURE__ */ o(
|
|
80
|
+
P,
|
|
81
|
+
{
|
|
82
|
+
options: N,
|
|
83
|
+
value: p,
|
|
84
|
+
onChange: y,
|
|
85
|
+
transparentBackground: !0,
|
|
86
|
+
className: r("dropdown"),
|
|
87
|
+
toggleButtonClassName: r("toggle-button")
|
|
88
|
+
}
|
|
89
|
+
)
|
|
90
|
+
] }),
|
|
91
|
+
/* @__PURE__ */ o(
|
|
92
|
+
"button",
|
|
93
|
+
{
|
|
94
|
+
"aria-label": "Next Months",
|
|
95
|
+
disabled: h,
|
|
96
|
+
onClick: e,
|
|
97
|
+
className: r("button-next", { disabled: h }),
|
|
98
|
+
children: /* @__PURE__ */ o(T, {})
|
|
99
|
+
}
|
|
100
|
+
)
|
|
101
|
+
] })
|
|
102
|
+
] });
|
|
103
|
+
}, J = "_calendar_1jr94_5", K = "_date_1jr94_90", Q = "_disabled_1jr94_202", X = "_popper_1jr94_210", Z = "_input_1jr94_214", ee = {
|
|
104
|
+
calendar: J,
|
|
105
|
+
"current-date": "_current-date_1jr94_89",
|
|
106
|
+
date: K,
|
|
107
|
+
"selected-range": "_selected-range_1jr94_119",
|
|
108
|
+
"end-date": "_end-date_1jr94_119",
|
|
109
|
+
disabled: Q,
|
|
110
|
+
popper: X,
|
|
111
|
+
input: Z
|
|
112
|
+
}, _ = Y.bind(ee), ne = "en", R = "MM-dd-yyyy", ie = ({
|
|
113
|
+
onChange: a = () => {
|
|
114
|
+
},
|
|
115
|
+
disabled: c = !1,
|
|
116
|
+
onBlur: l = () => {
|
|
117
|
+
},
|
|
118
|
+
onFocus: g = () => {
|
|
119
|
+
},
|
|
120
|
+
endDate: e = void 0,
|
|
121
|
+
startDate: n = void 0,
|
|
122
|
+
headerNodes: h = null,
|
|
123
|
+
customClassName: b = "",
|
|
124
|
+
customTimeInput: w = void 0,
|
|
125
|
+
shouldCloseOnSelect: i = !0,
|
|
126
|
+
popperClassName: x = "",
|
|
127
|
+
calendarClassName: p = "",
|
|
128
|
+
fixedHeight: C = !1,
|
|
129
|
+
language: f = ne,
|
|
130
|
+
yearsOptions: N = [],
|
|
131
|
+
placeholder: v = R.toUpperCase(),
|
|
132
|
+
dateFormat: y = R,
|
|
133
|
+
selects: t = "start",
|
|
134
|
+
value: s = null
|
|
135
|
+
}) => {
|
|
136
|
+
const d = B(null), F = n == null ? void 0 : n.toDateString(), m = e == null ? void 0 : e.toDateString(), j = e && n && e > n, A = (u) => {
|
|
137
|
+
const k = u.toDateString(), I = k === F, M = j && k === m, L = n && e && u > n && u < e;
|
|
138
|
+
return _("date", {
|
|
139
|
+
"current-date": I,
|
|
140
|
+
"selected-range": L && !M,
|
|
141
|
+
"end-date": M && j,
|
|
142
|
+
disabled: c
|
|
143
|
+
});
|
|
144
|
+
};
|
|
145
|
+
return /* @__PURE__ */ o(
|
|
146
|
+
$,
|
|
147
|
+
{
|
|
148
|
+
customInput: /* @__PURE__ */ o(
|
|
149
|
+
D,
|
|
150
|
+
{
|
|
151
|
+
className: _("input"),
|
|
152
|
+
defaultWidth: !1,
|
|
153
|
+
endIcon: /* @__PURE__ */ o(G, {}),
|
|
154
|
+
ref: d
|
|
155
|
+
}
|
|
156
|
+
),
|
|
157
|
+
placeholderText: v,
|
|
158
|
+
selected: s,
|
|
159
|
+
startDate: n,
|
|
160
|
+
endDate: e,
|
|
161
|
+
minDate: t === "end" ? n : void 0,
|
|
162
|
+
disabled: c,
|
|
163
|
+
shouldCloseOnSelect: i,
|
|
164
|
+
fixedHeight: C,
|
|
165
|
+
locale: f,
|
|
166
|
+
showPopperArrow: !1,
|
|
167
|
+
dayClassName: A,
|
|
168
|
+
calendarClassName: _(p, "calendar"),
|
|
169
|
+
renderCustomHeader: (u) => /* @__PURE__ */ o(
|
|
170
|
+
z,
|
|
171
|
+
{
|
|
172
|
+
...u,
|
|
173
|
+
headerNodes: h,
|
|
174
|
+
customClassName: b,
|
|
175
|
+
yearsOptions: N,
|
|
176
|
+
locale: f
|
|
177
|
+
}
|
|
178
|
+
),
|
|
179
|
+
onChange: a,
|
|
180
|
+
onBlur: l,
|
|
181
|
+
onFocus: g,
|
|
182
|
+
customTimeInput: w,
|
|
183
|
+
showTimeInput: !!w,
|
|
184
|
+
popperClassName: _(x, "popper"),
|
|
185
|
+
dateFormat: y,
|
|
186
|
+
selectsStart: t === "start",
|
|
187
|
+
selectsEnd: t === "end",
|
|
188
|
+
className: _("datepicker")
|
|
189
|
+
}
|
|
190
|
+
);
|
|
191
|
+
};
|
|
192
|
+
export {
|
|
193
|
+
ie as D
|
|
194
|
+
};
|
|
@@ -0,0 +1,194 @@
|
|
|
1
|
+
import { jsxs as S, Fragment as U, jsx as o } from "react/jsx-runtime";
|
|
2
|
+
import $ from "react-datepicker";
|
|
3
|
+
import { c as Y } from "./bind-06a7ff84.js";
|
|
4
|
+
import { useMemo as E, useRef as B } from "react";
|
|
5
|
+
import { F as D } from "./fieldText-65e4c614.js";
|
|
6
|
+
import "./baseIconButton-b6adc843.js";
|
|
7
|
+
import { S as T, a as G } from "./calendar-f154eb78.js";
|
|
8
|
+
import { D as P } from "./dropdown-9f4d1928.js";
|
|
9
|
+
const H = (a, c = 20) => {
|
|
10
|
+
const l = a + c;
|
|
11
|
+
return new Array(l - a).fill(void 0).map((g, e) => a - e);
|
|
12
|
+
}, V = "_header_a3cjx_1", O = "_disabled_a3cjx_25", W = "_dropdown_a3cjx_8", q = {
|
|
13
|
+
header: V,
|
|
14
|
+
"dropdowns-wrapper": "_dropdowns-wrapper_a3cjx_8",
|
|
15
|
+
"button-prev": "_button-prev_a3cjx_13",
|
|
16
|
+
"button-next": "_button-next_a3cjx_14",
|
|
17
|
+
disabled: O,
|
|
18
|
+
dropdown: W,
|
|
19
|
+
"month-dropdown": "_month-dropdown_a3cjx_44",
|
|
20
|
+
"toggle-button": "_toggle-button_a3cjx_47"
|
|
21
|
+
}, r = Y.bind(q), z = ({
|
|
22
|
+
date: a = /* @__PURE__ */ new Date(),
|
|
23
|
+
changeYear: c = () => {
|
|
24
|
+
},
|
|
25
|
+
changeMonth: l = () => {
|
|
26
|
+
},
|
|
27
|
+
decreaseMonth: g = () => {
|
|
28
|
+
},
|
|
29
|
+
increaseMonth: e = () => {
|
|
30
|
+
},
|
|
31
|
+
prevMonthButtonDisabled: n = !1,
|
|
32
|
+
nextMonthButtonDisabled: h = !1,
|
|
33
|
+
headerNodes: b = null,
|
|
34
|
+
customClassName: w = "",
|
|
35
|
+
yearsOptions: i = [],
|
|
36
|
+
locale: x
|
|
37
|
+
}) => {
|
|
38
|
+
const p = a.getFullYear(), C = a.getMonth(), f = E(() => {
|
|
39
|
+
const t = Array(12).keys(), s = new Intl.DateTimeFormat(x, {
|
|
40
|
+
month: "long"
|
|
41
|
+
}), d = (m) => s.format(new Date(p, m));
|
|
42
|
+
return Array.from(t, d).reduce((m, j, A) => m.concat({
|
|
43
|
+
value: A,
|
|
44
|
+
label: j
|
|
45
|
+
}), []);
|
|
46
|
+
}, []), N = E(() => (i.length > 0 ? i : H(p)).reduce(
|
|
47
|
+
(s, d) => s.concat({ value: d, label: `${d}` }),
|
|
48
|
+
[]
|
|
49
|
+
), [i]), v = (t) => {
|
|
50
|
+
l(t);
|
|
51
|
+
}, y = (t) => {
|
|
52
|
+
c(t);
|
|
53
|
+
};
|
|
54
|
+
return /* @__PURE__ */ S(U, { children: [
|
|
55
|
+
b && /* @__PURE__ */ o("div", { className: r(w), children: b }),
|
|
56
|
+
/* @__PURE__ */ S("div", { className: r("header"), children: [
|
|
57
|
+
/* @__PURE__ */ o(
|
|
58
|
+
"button",
|
|
59
|
+
{
|
|
60
|
+
"aria-label": "Previous Months",
|
|
61
|
+
disabled: n,
|
|
62
|
+
onClick: g,
|
|
63
|
+
className: r("button-prev", { disabled: n }),
|
|
64
|
+
children: /* @__PURE__ */ o(T, {})
|
|
65
|
+
}
|
|
66
|
+
),
|
|
67
|
+
/* @__PURE__ */ S("div", { className: r("dropdowns-wrapper"), children: [
|
|
68
|
+
/* @__PURE__ */ o(
|
|
69
|
+
P,
|
|
70
|
+
{
|
|
71
|
+
options: f,
|
|
72
|
+
value: C,
|
|
73
|
+
onChange: v,
|
|
74
|
+
transparentBackground: !0,
|
|
75
|
+
className: r("dropdown", "month-dropdown"),
|
|
76
|
+
toggleButtonClassName: r("toggle-button")
|
|
77
|
+
}
|
|
78
|
+
),
|
|
79
|
+
/* @__PURE__ */ o(
|
|
80
|
+
P,
|
|
81
|
+
{
|
|
82
|
+
options: N,
|
|
83
|
+
value: p,
|
|
84
|
+
onChange: y,
|
|
85
|
+
transparentBackground: !0,
|
|
86
|
+
className: r("dropdown"),
|
|
87
|
+
toggleButtonClassName: r("toggle-button")
|
|
88
|
+
}
|
|
89
|
+
)
|
|
90
|
+
] }),
|
|
91
|
+
/* @__PURE__ */ o(
|
|
92
|
+
"button",
|
|
93
|
+
{
|
|
94
|
+
"aria-label": "Next Months",
|
|
95
|
+
disabled: h,
|
|
96
|
+
onClick: e,
|
|
97
|
+
className: r("button-next", { disabled: h }),
|
|
98
|
+
children: /* @__PURE__ */ o(T, {})
|
|
99
|
+
}
|
|
100
|
+
)
|
|
101
|
+
] })
|
|
102
|
+
] });
|
|
103
|
+
}, J = "_calendar_1jr94_5", K = "_date_1jr94_90", Q = "_disabled_1jr94_202", X = "_popper_1jr94_210", Z = "_input_1jr94_214", ee = {
|
|
104
|
+
calendar: J,
|
|
105
|
+
"current-date": "_current-date_1jr94_89",
|
|
106
|
+
date: K,
|
|
107
|
+
"selected-range": "_selected-range_1jr94_119",
|
|
108
|
+
"end-date": "_end-date_1jr94_119",
|
|
109
|
+
disabled: Q,
|
|
110
|
+
popper: X,
|
|
111
|
+
input: Z
|
|
112
|
+
}, _ = Y.bind(ee), ne = "en", R = "MM-dd-yyyy", ie = ({
|
|
113
|
+
onChange: a = () => {
|
|
114
|
+
},
|
|
115
|
+
disabled: c = !1,
|
|
116
|
+
onBlur: l = () => {
|
|
117
|
+
},
|
|
118
|
+
onFocus: g = () => {
|
|
119
|
+
},
|
|
120
|
+
endDate: e = void 0,
|
|
121
|
+
startDate: n = void 0,
|
|
122
|
+
headerNodes: h = null,
|
|
123
|
+
customClassName: b = "",
|
|
124
|
+
customTimeInput: w = void 0,
|
|
125
|
+
shouldCloseOnSelect: i = !0,
|
|
126
|
+
popperClassName: x = "",
|
|
127
|
+
calendarClassName: p = "",
|
|
128
|
+
fixedHeight: C = !1,
|
|
129
|
+
language: f = ne,
|
|
130
|
+
yearsOptions: N = [],
|
|
131
|
+
placeholder: v = R.toUpperCase(),
|
|
132
|
+
dateFormat: y = R,
|
|
133
|
+
selects: t = "start",
|
|
134
|
+
value: s = null
|
|
135
|
+
}) => {
|
|
136
|
+
const d = B(null), F = n == null ? void 0 : n.toDateString(), m = e == null ? void 0 : e.toDateString(), j = e && n && e > n, A = (u) => {
|
|
137
|
+
const k = u.toDateString(), I = k === F, M = j && k === m, L = n && e && u > n && u < e;
|
|
138
|
+
return _("date", {
|
|
139
|
+
"current-date": I,
|
|
140
|
+
"selected-range": L && !M,
|
|
141
|
+
"end-date": M && j,
|
|
142
|
+
disabled: c
|
|
143
|
+
});
|
|
144
|
+
};
|
|
145
|
+
return /* @__PURE__ */ o(
|
|
146
|
+
$,
|
|
147
|
+
{
|
|
148
|
+
customInput: /* @__PURE__ */ o(
|
|
149
|
+
D,
|
|
150
|
+
{
|
|
151
|
+
className: _("input"),
|
|
152
|
+
defaultWidth: !1,
|
|
153
|
+
endIcon: /* @__PURE__ */ o(G, {}),
|
|
154
|
+
ref: d
|
|
155
|
+
}
|
|
156
|
+
),
|
|
157
|
+
placeholderText: v,
|
|
158
|
+
selected: s,
|
|
159
|
+
startDate: n,
|
|
160
|
+
endDate: e,
|
|
161
|
+
minDate: t === "end" ? n : void 0,
|
|
162
|
+
disabled: c,
|
|
163
|
+
shouldCloseOnSelect: i,
|
|
164
|
+
fixedHeight: C,
|
|
165
|
+
locale: f,
|
|
166
|
+
showPopperArrow: !1,
|
|
167
|
+
dayClassName: A,
|
|
168
|
+
calendarClassName: _(p, "calendar"),
|
|
169
|
+
renderCustomHeader: (u) => /* @__PURE__ */ o(
|
|
170
|
+
z,
|
|
171
|
+
{
|
|
172
|
+
...u,
|
|
173
|
+
headerNodes: h,
|
|
174
|
+
customClassName: b,
|
|
175
|
+
yearsOptions: N,
|
|
176
|
+
locale: f
|
|
177
|
+
}
|
|
178
|
+
),
|
|
179
|
+
onChange: a,
|
|
180
|
+
onBlur: l,
|
|
181
|
+
onFocus: g,
|
|
182
|
+
customTimeInput: w,
|
|
183
|
+
showTimeInput: !!w,
|
|
184
|
+
popperClassName: _(x, "popper"),
|
|
185
|
+
dateFormat: y,
|
|
186
|
+
selectsStart: t === "start",
|
|
187
|
+
selectsEnd: t === "end",
|
|
188
|
+
className: _("datepicker")
|
|
189
|
+
}
|
|
190
|
+
);
|
|
191
|
+
};
|
|
192
|
+
export {
|
|
193
|
+
ie as D
|
|
194
|
+
};
|
package/dist/datePicker.js
CHANGED
|
@@ -1,10 +1,11 @@
|
|
|
1
|
-
import { D as t } from "./datePicker-
|
|
1
|
+
import { D as t } from "./datePicker-e85bee1d.js";
|
|
2
2
|
import "react/jsx-runtime";
|
|
3
3
|
import "react-datepicker";
|
|
4
4
|
import "./bind-06a7ff84.js";
|
|
5
5
|
import "react";
|
|
6
6
|
import "./fieldText-65e4c614.js";
|
|
7
7
|
import "./baseIconButton-b6adc843.js";
|
|
8
|
+
import "./calendar-f154eb78.js";
|
|
8
9
|
import "./dropdown-9f4d1928.js";
|
|
9
10
|
import "@floating-ui/react-dom";
|
|
10
11
|
import "downshift";
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { D as t } from "./datePicker-a005ebc6.js";
|
|
2
|
+
import "react/jsx-runtime";
|
|
3
|
+
import "react-datepicker";
|
|
4
|
+
import "./bind-06a7ff84.js";
|
|
5
|
+
import "react";
|
|
6
|
+
import "./fieldText-65e4c614.js";
|
|
7
|
+
import "./baseIconButton-b6adc843.js";
|
|
8
|
+
import "./calendar-f154eb78.js";
|
|
9
|
+
import "./dropdown-9f4d1928.js";
|
|
10
|
+
import "@floating-ui/react-dom";
|
|
11
|
+
import "downshift";
|
|
12
|
+
import "rc-scrollbars";
|
|
13
|
+
import "./useOnClickOutside-c332f7d3.js";
|
|
14
|
+
import "./keyCodes-f63c0e11.js";
|
|
15
|
+
import "./checkbox-9a6c7ce1.js";
|
|
16
|
+
export {
|
|
17
|
+
t as DatePicker1,
|
|
18
|
+
t as default
|
|
19
|
+
};
|