ml-uikit 1.1.6 → 1.1.7
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/components/ui/date-range-picker.d.ts +3 -0
- package/dist/components/ui/date-range-picker.d.ts.map +1 -1
- package/dist/index.cjs29.js +1 -1
- package/dist/index.cjs29.js.map +1 -1
- package/dist/index.es29.js +190 -186
- package/dist/index.es29.js.map +1 -1
- package/dist/style.css +143 -52
- package/package.json +1 -1
package/dist/index.es29.js
CHANGED
|
@@ -1,130 +1,130 @@
|
|
|
1
1
|
import * as e from "react";
|
|
2
|
-
import { startOfMonth as
|
|
3
|
-
import { CalendarDays as
|
|
4
|
-
import { DayPicker as
|
|
5
|
-
import { cn as
|
|
6
|
-
import { Button as
|
|
7
|
-
import { Popover as
|
|
8
|
-
const
|
|
2
|
+
import { startOfMonth as x, addMonths as z, isAfter as w, isBefore as G, setMonth as ce, setYear as de, format as me } from "date-fns";
|
|
3
|
+
import { CalendarDays as fe, ChevronLeft as ue, ChevronDown as I, ChevronRight as be } from "lucide-react";
|
|
4
|
+
import { DayPicker as pe } from "react-day-picker";
|
|
5
|
+
import { cn as u } from "./index.es60.js";
|
|
6
|
+
import { Button as W } from "./index.es10.js";
|
|
7
|
+
import { Popover as xe, PopoverTrigger as ge, PopoverContent as he } from "./index.es41.js";
|
|
8
|
+
const we = "dd/MM/yyyy", ve = "DD/MM/YYYY - DD/MM/YYYY", Ee = Array.from(
|
|
9
9
|
{ length: 12 },
|
|
10
|
-
(t,
|
|
11
|
-
),
|
|
10
|
+
(t, n) => new Date(2020, n, 1).toLocaleString("default", { month: "long" })
|
|
11
|
+
), M = (t, n, s) => G(t, n) ? n : w(t, s) ? s : t, N = (t) => {
|
|
12
12
|
if (!(!t?.from && !t?.to))
|
|
13
|
-
return t.from && t.to &&
|
|
13
|
+
return t.from && t.to && w(t.from, t.to) ? {
|
|
14
14
|
from: t.to,
|
|
15
15
|
to: t.from
|
|
16
16
|
} : {
|
|
17
17
|
from: t.from,
|
|
18
18
|
to: t.to
|
|
19
19
|
};
|
|
20
|
-
},
|
|
20
|
+
}, C = (t, n) => {
|
|
21
21
|
if (t)
|
|
22
|
-
return
|
|
23
|
-
},
|
|
24
|
-
const s =
|
|
22
|
+
return me(t, n);
|
|
23
|
+
}, ye = (t, n) => {
|
|
24
|
+
const s = C(t?.from, n), m = C(t?.to, n);
|
|
25
25
|
return !s || !m ? "" : `${s} - ${m}`;
|
|
26
|
-
},
|
|
27
|
-
const s =
|
|
26
|
+
}, De = (t, n) => {
|
|
27
|
+
const s = C(t?.from, n) ?? "DD/MM/YYYY", m = C(t?.to, n) ?? "DD/MM/YYYY";
|
|
28
28
|
return `${s} - ${m}`;
|
|
29
29
|
};
|
|
30
|
-
function
|
|
30
|
+
function q({
|
|
31
31
|
label: t,
|
|
32
|
-
month:
|
|
32
|
+
month: n,
|
|
33
33
|
minMonth: s,
|
|
34
34
|
maxMonth: m,
|
|
35
|
-
minDate:
|
|
36
|
-
maxDate:
|
|
37
|
-
selectedDate:
|
|
38
|
-
disabledMatcher:
|
|
39
|
-
disabled:
|
|
35
|
+
minDate: S,
|
|
36
|
+
maxDate: Y,
|
|
37
|
+
selectedDate: k,
|
|
38
|
+
disabledMatcher: v,
|
|
39
|
+
disabled: g,
|
|
40
40
|
years: E,
|
|
41
|
-
onMonthChange:
|
|
42
|
-
onSelectDate:
|
|
41
|
+
onMonthChange: f,
|
|
42
|
+
onSelectDate: y
|
|
43
43
|
}) {
|
|
44
|
-
const
|
|
45
|
-
|
|
46
|
-
},
|
|
47
|
-
|
|
48
|
-
},
|
|
49
|
-
return /* @__PURE__ */ e.createElement("div", { className: "w-full min-w-0" }, /* @__PURE__ */ e.createElement("div", { className: "flex items-center gap-2
|
|
44
|
+
const h = () => {
|
|
45
|
+
f(z(n, -1));
|
|
46
|
+
}, P = () => {
|
|
47
|
+
f(z(n, 1));
|
|
48
|
+
}, A = g || !w(n, s), d = g || !G(n, m);
|
|
49
|
+
return /* @__PURE__ */ e.createElement("div", { className: "w-full min-w-0" }, /* @__PURE__ */ e.createElement("div", { className: "flex flex-wrap items-center gap-2 sm:flex-nowrap" }, /* @__PURE__ */ e.createElement(
|
|
50
50
|
"button",
|
|
51
51
|
{
|
|
52
52
|
type: "button",
|
|
53
|
-
onClick:
|
|
54
|
-
disabled:
|
|
55
|
-
className:
|
|
56
|
-
"inline-flex h-
|
|
53
|
+
onClick: h,
|
|
54
|
+
disabled: A,
|
|
55
|
+
className: u(
|
|
56
|
+
"inline-flex h-8 w-8 items-center justify-center rounded-md text-[#6e6d71] transition-colors lg:h-9 lg:w-9",
|
|
57
57
|
"hover:bg-[#f5f5f5] focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-[#1d1c20]/20",
|
|
58
58
|
"disabled:cursor-not-allowed disabled:opacity-40"
|
|
59
59
|
),
|
|
60
60
|
"aria-label": `Previous month for ${t.toLowerCase()}`
|
|
61
61
|
},
|
|
62
|
-
/* @__PURE__ */ e.createElement(
|
|
62
|
+
/* @__PURE__ */ e.createElement(ue, { className: "h-4 w-4 lg:h-5 lg:w-5" })
|
|
63
63
|
), /* @__PURE__ */ e.createElement("div", { className: "relative min-w-0 flex-1" }, /* @__PURE__ */ e.createElement(
|
|
64
64
|
"select",
|
|
65
65
|
{
|
|
66
|
-
value:
|
|
66
|
+
value: n.getMonth(),
|
|
67
67
|
onChange: (r) => {
|
|
68
|
-
const
|
|
69
|
-
|
|
68
|
+
const l = Number(r.target.value);
|
|
69
|
+
f(ce(n, l));
|
|
70
70
|
},
|
|
71
|
-
disabled:
|
|
72
|
-
className:
|
|
73
|
-
"h-
|
|
71
|
+
disabled: g,
|
|
72
|
+
className: u(
|
|
73
|
+
"h-9 w-full appearance-none rounded-md border border-[#b7b7b9] bg-white px-3 pr-8 text-left text-sm font-medium leading-5 text-[#111111] lg:h-10 lg:px-4 lg:pr-10",
|
|
74
74
|
"focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-[#1d1c20]/20",
|
|
75
75
|
"disabled:cursor-not-allowed disabled:bg-[#f2f2f2] disabled:text-[#b3b3b3]"
|
|
76
76
|
),
|
|
77
77
|
"aria-label": `Month for ${t.toLowerCase()}`
|
|
78
78
|
},
|
|
79
|
-
|
|
80
|
-
), /* @__PURE__ */ e.createElement(
|
|
79
|
+
Ee.map((r, l) => /* @__PURE__ */ e.createElement("option", { key: r, value: l }, r))
|
|
80
|
+
), /* @__PURE__ */ e.createElement(I, { className: "pointer-events-none absolute right-2.5 top-1/2 h-4 w-4 -translate-y-1/2 text-[#7f7d83] lg:right-3" })), /* @__PURE__ */ e.createElement("div", { className: "relative w-[104px] shrink-0 sm:w-[120px]" }, /* @__PURE__ */ e.createElement(
|
|
81
81
|
"select",
|
|
82
82
|
{
|
|
83
|
-
value:
|
|
83
|
+
value: n.getFullYear(),
|
|
84
84
|
onChange: (r) => {
|
|
85
|
-
const
|
|
86
|
-
|
|
85
|
+
const l = Number(r.target.value);
|
|
86
|
+
f(de(n, l));
|
|
87
87
|
},
|
|
88
|
-
disabled:
|
|
89
|
-
className:
|
|
90
|
-
"h-
|
|
88
|
+
disabled: g,
|
|
89
|
+
className: u(
|
|
90
|
+
"h-9 w-full appearance-none rounded-md border border-[#b7b7b9] bg-white px-3 pr-8 text-left text-sm font-medium leading-5 text-[#111111] lg:h-10 lg:px-4 lg:pr-9",
|
|
91
91
|
"focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-[#1d1c20]/20",
|
|
92
92
|
"disabled:cursor-not-allowed disabled:bg-[#f2f2f2] disabled:text-[#b3b3b3]"
|
|
93
93
|
),
|
|
94
94
|
"aria-label": `Year for ${t.toLowerCase()}`
|
|
95
95
|
},
|
|
96
96
|
E.map((r) => /* @__PURE__ */ e.createElement("option", { key: r, value: r }, r))
|
|
97
|
-
), /* @__PURE__ */ e.createElement(
|
|
97
|
+
), /* @__PURE__ */ e.createElement(I, { className: "pointer-events-none absolute right-2.5 top-1/2 h-4 w-4 -translate-y-1/2 text-[#7f7d83] lg:right-3" })), /* @__PURE__ */ e.createElement(
|
|
98
98
|
"button",
|
|
99
99
|
{
|
|
100
100
|
type: "button",
|
|
101
|
-
onClick:
|
|
102
|
-
disabled:
|
|
103
|
-
className:
|
|
104
|
-
"inline-flex h-
|
|
101
|
+
onClick: P,
|
|
102
|
+
disabled: d,
|
|
103
|
+
className: u(
|
|
104
|
+
"inline-flex h-8 w-8 items-center justify-center rounded-md text-[#6e6d71] transition-colors lg:h-9 lg:w-9",
|
|
105
105
|
"hover:bg-[#f5f5f5] focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-[#1d1c20]/20",
|
|
106
106
|
"disabled:cursor-not-allowed disabled:opacity-40"
|
|
107
107
|
),
|
|
108
108
|
"aria-label": `Next month for ${t.toLowerCase()}`
|
|
109
109
|
},
|
|
110
|
-
/* @__PURE__ */ e.createElement(
|
|
111
|
-
)), /* @__PURE__ */ e.createElement("p", { className: "mt-
|
|
112
|
-
|
|
110
|
+
/* @__PURE__ */ e.createElement(be, { className: "h-4 w-4 lg:h-5 lg:w-5" })
|
|
111
|
+
)), /* @__PURE__ */ e.createElement("p", { className: "mt-1.5 text-center text-sm font-medium leading-5 text-[#666666] lg:mt-2" }, t), /* @__PURE__ */ e.createElement(
|
|
112
|
+
pe,
|
|
113
113
|
{
|
|
114
114
|
mode: "single",
|
|
115
|
-
month:
|
|
116
|
-
onMonthChange:
|
|
117
|
-
selected:
|
|
118
|
-
onSelect:
|
|
115
|
+
month: n,
|
|
116
|
+
onMonthChange: f,
|
|
117
|
+
selected: k,
|
|
118
|
+
onSelect: y,
|
|
119
119
|
showOutsideDays: !0,
|
|
120
120
|
fixedWeeks: !0,
|
|
121
121
|
hideNavigation: !0,
|
|
122
122
|
disabled: [
|
|
123
|
-
{ before:
|
|
124
|
-
{ after:
|
|
125
|
-
...
|
|
123
|
+
{ before: S },
|
|
124
|
+
{ after: Y },
|
|
125
|
+
...v ? [v] : []
|
|
126
126
|
],
|
|
127
|
-
className: "mt-
|
|
127
|
+
className: "mt-1 p-0 [--drp-cell-size:1.625rem] md:[--drp-cell-size:1.875rem] xl:[--drp-cell-size:2.125rem]",
|
|
128
128
|
classNames: {
|
|
129
129
|
root: "w-full",
|
|
130
130
|
months: "w-full",
|
|
@@ -132,12 +132,12 @@ function I({
|
|
|
132
132
|
month_caption: "hidden",
|
|
133
133
|
month_grid: "w-full border-collapse",
|
|
134
134
|
weekdays: "grid grid-cols-7",
|
|
135
|
-
weekday: "h-
|
|
136
|
-
weeks: "grid gap-
|
|
135
|
+
weekday: "h-[calc(var(--drp-cell-size)-0.25rem)] text-center text-[11px] font-medium leading-4 text-[#666666] lg:text-xs",
|
|
136
|
+
weeks: "grid gap-0",
|
|
137
137
|
week: "grid grid-cols-7",
|
|
138
|
-
day: "flex h-
|
|
139
|
-
day_button: "h-
|
|
140
|
-
selected: "",
|
|
138
|
+
day: "flex h-[var(--drp-cell-size)] w-full items-center justify-center p-0",
|
|
139
|
+
day_button: "h-[--drp-cell-size] w-[--drp-cell-size] rounded-md border border-transparent bg-transparent p-0 text-[13px] font-normal leading-none text-[#444444] transition-colors hover:border-[#cccccc] focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-[#2bbd8f]/25 lg:text-sm",
|
|
140
|
+
selected: "[&>button]:border-[#2bbd8f] [&>button]:bg-[#2bbd8f] [&>button]:text-[#111111]",
|
|
141
141
|
today: "font-medium",
|
|
142
142
|
outside: "text-[#a4a4a8]",
|
|
143
143
|
disabled: "pointer-events-none text-[#d3d3d6]",
|
|
@@ -146,192 +146,196 @@ function I({
|
|
|
146
146
|
}
|
|
147
147
|
));
|
|
148
148
|
}
|
|
149
|
-
const
|
|
149
|
+
const Me = e.forwardRef(
|
|
150
150
|
({
|
|
151
151
|
value: t,
|
|
152
|
-
defaultValue:
|
|
152
|
+
defaultValue: n,
|
|
153
153
|
onValueChange: s,
|
|
154
154
|
wrapperClassName: m,
|
|
155
|
-
popoverClassName:
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
155
|
+
popoverClassName: S,
|
|
156
|
+
popoverSide: Y = "bottom",
|
|
157
|
+
popoverAvoidCollisions: k = !0,
|
|
158
|
+
className: v,
|
|
159
|
+
placeholder: g = ve,
|
|
160
|
+
dateFormat: E = we,
|
|
161
|
+
minYear: f = 2e3,
|
|
162
|
+
maxYear: y = 2100,
|
|
163
|
+
disabled: h,
|
|
164
|
+
...P
|
|
165
|
+
}, A) => {
|
|
166
|
+
const d = Math.min(f, y), r = Math.max(f, y), l = e.useMemo(
|
|
167
|
+
() => x(new Date(d, 0, 1)),
|
|
166
168
|
[d]
|
|
167
|
-
),
|
|
168
|
-
() =>
|
|
169
|
-
[
|
|
170
|
-
),
|
|
171
|
-
() => new Date(
|
|
172
|
-
[
|
|
173
|
-
),
|
|
169
|
+
), b = e.useMemo(
|
|
170
|
+
() => x(new Date(r, 11, 1)),
|
|
171
|
+
[r]
|
|
172
|
+
), R = e.useMemo(() => new Date(d, 0, 1), [d]), O = e.useMemo(
|
|
173
|
+
() => new Date(r, 11, 31),
|
|
174
|
+
[r]
|
|
175
|
+
), $ = e.useMemo(
|
|
174
176
|
() => Array.from(
|
|
175
|
-
{ length:
|
|
176
|
-
(
|
|
177
|
+
{ length: r - d + 1 },
|
|
178
|
+
(o, c) => d + c
|
|
177
179
|
),
|
|
178
|
-
[d,
|
|
179
|
-
),
|
|
180
|
-
|
|
181
|
-
),
|
|
182
|
-
(
|
|
183
|
-
const c =
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
),
|
|
180
|
+
[d, r]
|
|
181
|
+
), j = t !== void 0, [J, K] = e.useState(
|
|
182
|
+
N(n)
|
|
183
|
+
), p = N(j ? t : J), L = e.useCallback(
|
|
184
|
+
(o) => {
|
|
185
|
+
const c = x(/* @__PURE__ */ new Date()), a = M(
|
|
186
|
+
x(o?.from ?? c),
|
|
187
|
+
l,
|
|
188
|
+
b
|
|
189
|
+
), se = o?.to ? x(o.to) : z(a, 1), ie = M(se, l, b);
|
|
188
190
|
return {
|
|
189
191
|
start: a,
|
|
190
|
-
end:
|
|
192
|
+
end: ie
|
|
191
193
|
};
|
|
192
194
|
},
|
|
193
|
-
[
|
|
194
|
-
), [
|
|
195
|
-
|
|
196
|
-
),
|
|
197
|
-
(
|
|
198
|
-
const c =
|
|
199
|
-
|
|
200
|
-
const a =
|
|
201
|
-
|
|
195
|
+
[l, b]
|
|
196
|
+
), [T, V] = e.useState(!1), [i, _] = e.useState(
|
|
197
|
+
p
|
|
198
|
+
), B = L(p), [Q, H] = e.useState(B.start), [X, U] = e.useState(B.end), D = e.useCallback(
|
|
199
|
+
(o) => {
|
|
200
|
+
const c = N(o);
|
|
201
|
+
_(c);
|
|
202
|
+
const a = L(c);
|
|
203
|
+
H(a.start), U(a.end);
|
|
202
204
|
},
|
|
203
|
-
[
|
|
205
|
+
[L]
|
|
204
206
|
);
|
|
205
207
|
e.useEffect(() => {
|
|
206
|
-
|
|
207
|
-
}, [
|
|
208
|
-
const
|
|
209
|
-
|
|
210
|
-
},
|
|
211
|
-
|
|
212
|
-
},
|
|
213
|
-
|
|
208
|
+
T || D(p);
|
|
209
|
+
}, [p, T, D]);
|
|
210
|
+
const Z = (o) => {
|
|
211
|
+
H(M(x(o), l, b));
|
|
212
|
+
}, ee = (o) => {
|
|
213
|
+
U(M(x(o), l, b));
|
|
214
|
+
}, te = (o) => {
|
|
215
|
+
o && _((c) => {
|
|
214
216
|
const a = {
|
|
215
|
-
from:
|
|
217
|
+
from: o,
|
|
216
218
|
to: c?.to
|
|
217
219
|
};
|
|
218
|
-
return a.to &&
|
|
220
|
+
return a.to && w(o, a.to) && (a.to = o), a;
|
|
219
221
|
});
|
|
220
|
-
},
|
|
221
|
-
|
|
222
|
+
}, oe = (o) => {
|
|
223
|
+
o && _((c) => {
|
|
222
224
|
const a = {
|
|
223
225
|
from: c?.from,
|
|
224
|
-
to:
|
|
226
|
+
to: o
|
|
225
227
|
};
|
|
226
|
-
return a.from &&
|
|
228
|
+
return a.from && w(a.from, o) && (a.from = o), a;
|
|
227
229
|
});
|
|
228
|
-
}, te = () => {
|
|
229
|
-
y(h), T(!1);
|
|
230
230
|
}, ne = () => {
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
231
|
+
D(p), V(!1);
|
|
232
|
+
}, re = () => {
|
|
233
|
+
const o = N(i);
|
|
234
|
+
j || K(o), s?.(o), V(!1);
|
|
235
|
+
}, ae = !!(i?.from && i?.to), F = ye(p, E), le = De(i, E);
|
|
236
|
+
return /* @__PURE__ */ e.createElement("div", { className: u("w-full", m) }, /* @__PURE__ */ e.createElement(
|
|
237
|
+
xe,
|
|
236
238
|
{
|
|
237
|
-
open:
|
|
238
|
-
onOpenChange: (
|
|
239
|
-
|
|
239
|
+
open: T,
|
|
240
|
+
onOpenChange: (o) => {
|
|
241
|
+
h || (o && D(p), V(o));
|
|
240
242
|
}
|
|
241
243
|
},
|
|
242
|
-
/* @__PURE__ */ e.createElement(
|
|
244
|
+
/* @__PURE__ */ e.createElement(ge, { asChild: !0 }, /* @__PURE__ */ e.createElement(
|
|
243
245
|
"button",
|
|
244
246
|
{
|
|
245
|
-
ref:
|
|
247
|
+
ref: A,
|
|
246
248
|
type: "button",
|
|
247
|
-
disabled:
|
|
248
|
-
className:
|
|
249
|
+
disabled: h,
|
|
250
|
+
className: u(
|
|
249
251
|
"flex h-10 w-full items-center justify-between rounded-[8px] border border-[#e6e6e6] bg-white px-3 py-2 text-left text-[14px] leading-[20px] transition-colors",
|
|
250
252
|
"focus-visible:outline-none focus-visible:border-[#1D1C20] focus-visible:ring-0",
|
|
251
253
|
"disabled:cursor-not-allowed disabled:bg-[#f2f2f2] disabled:text-[#9ca3af] disabled:opacity-100",
|
|
252
|
-
|
|
254
|
+
v
|
|
253
255
|
),
|
|
254
|
-
...
|
|
256
|
+
...P
|
|
255
257
|
},
|
|
256
258
|
/* @__PURE__ */ e.createElement(
|
|
257
259
|
"span",
|
|
258
260
|
{
|
|
259
|
-
className:
|
|
261
|
+
className: u(
|
|
260
262
|
"truncate text-[14px] font-normal leading-[20px]",
|
|
261
|
-
|
|
263
|
+
F ? "text-[#111111]" : "text-[#b3b3b3]"
|
|
262
264
|
)
|
|
263
265
|
},
|
|
264
|
-
|
|
266
|
+
F || g
|
|
265
267
|
),
|
|
266
|
-
/* @__PURE__ */ e.createElement(
|
|
268
|
+
/* @__PURE__ */ e.createElement(fe, { className: "ml-3 h-4 w-4 shrink-0 text-[#111111]" })
|
|
267
269
|
)),
|
|
268
270
|
/* @__PURE__ */ e.createElement(
|
|
269
|
-
|
|
271
|
+
he,
|
|
270
272
|
{
|
|
273
|
+
side: Y,
|
|
274
|
+
avoidCollisions: k,
|
|
271
275
|
align: "start",
|
|
272
276
|
sideOffset: 10,
|
|
273
|
-
className:
|
|
274
|
-
"w-[min(
|
|
275
|
-
|
|
277
|
+
className: u(
|
|
278
|
+
"w-[min(95vw,760px)] max-h-[var(--radix-popover-content-available-height)] overflow-y-auto overscroll-contain rounded-xl border border-[#d8d8da] bg-[#f7f7f8] p-3 shadow-[0px_12px_24px_rgba(0,0,0,0.08)] sm:p-4",
|
|
279
|
+
S
|
|
276
280
|
)
|
|
277
281
|
},
|
|
278
|
-
/* @__PURE__ */ e.createElement("div", { className: "grid gap-
|
|
279
|
-
|
|
282
|
+
/* @__PURE__ */ e.createElement("div", { className: "grid gap-3 md:grid-cols-2 md:gap-4" }, /* @__PURE__ */ e.createElement(
|
|
283
|
+
q,
|
|
280
284
|
{
|
|
281
285
|
label: "Start date",
|
|
282
|
-
month:
|
|
283
|
-
minMonth:
|
|
284
|
-
maxMonth:
|
|
285
|
-
minDate:
|
|
286
|
-
maxDate:
|
|
286
|
+
month: Q,
|
|
287
|
+
minMonth: l,
|
|
288
|
+
maxMonth: b,
|
|
289
|
+
minDate: R,
|
|
290
|
+
maxDate: O,
|
|
287
291
|
selectedDate: i?.from,
|
|
288
292
|
disabledMatcher: i?.to ? { after: i.to } : void 0,
|
|
289
|
-
disabled:
|
|
290
|
-
years:
|
|
291
|
-
onMonthChange:
|
|
292
|
-
onSelectDate:
|
|
293
|
+
disabled: h,
|
|
294
|
+
years: $,
|
|
295
|
+
onMonthChange: Z,
|
|
296
|
+
onSelectDate: te
|
|
293
297
|
}
|
|
294
298
|
), /* @__PURE__ */ e.createElement(
|
|
295
|
-
|
|
299
|
+
q,
|
|
296
300
|
{
|
|
297
301
|
label: "End date",
|
|
298
|
-
month:
|
|
299
|
-
minMonth:
|
|
300
|
-
maxMonth:
|
|
301
|
-
minDate:
|
|
302
|
-
maxDate:
|
|
302
|
+
month: X,
|
|
303
|
+
minMonth: l,
|
|
304
|
+
maxMonth: b,
|
|
305
|
+
minDate: R,
|
|
306
|
+
maxDate: O,
|
|
303
307
|
selectedDate: i?.to,
|
|
304
308
|
disabledMatcher: i?.from ? { before: i.from } : void 0,
|
|
305
|
-
disabled:
|
|
306
|
-
years:
|
|
307
|
-
onMonthChange:
|
|
308
|
-
onSelectDate:
|
|
309
|
+
disabled: h,
|
|
310
|
+
years: $,
|
|
311
|
+
onMonthChange: ee,
|
|
312
|
+
onSelectDate: oe
|
|
309
313
|
}
|
|
310
314
|
)),
|
|
311
|
-
/* @__PURE__ */ e.createElement("div", { className: "mt-5 border-t border-[#d8d8da] pt-
|
|
315
|
+
/* @__PURE__ */ e.createElement("div", { className: "mt-2.5 border-t border-[#d8d8da] pt-2.5" }, /* @__PURE__ */ e.createElement(
|
|
312
316
|
"input",
|
|
313
317
|
{
|
|
314
318
|
readOnly: !0,
|
|
315
|
-
value:
|
|
316
|
-
className: "h-
|
|
319
|
+
value: le,
|
|
320
|
+
className: "h-9 w-full rounded-md border border-[#e6e6e6] bg-white px-3 py-2 text-sm leading-5 text-[#111111] outline-none transition-colors placeholder:text-[#b3b3b3] focus-visible:border-[#1D1C20]",
|
|
317
321
|
"aria-label": "Selected date range"
|
|
318
322
|
}
|
|
319
|
-
), /* @__PURE__ */ e.createElement("div", { className: "mt-
|
|
320
|
-
|
|
323
|
+
), /* @__PURE__ */ e.createElement("div", { className: "mt-2.5 flex flex-col-reverse gap-2 sm:flex-row sm:justify-end" }, /* @__PURE__ */ e.createElement(
|
|
324
|
+
W,
|
|
321
325
|
{
|
|
322
326
|
type: "button",
|
|
323
327
|
variant: "outline",
|
|
324
|
-
className: "h-
|
|
325
|
-
onClick:
|
|
328
|
+
className: "h-9 rounded-md px-4 text-sm",
|
|
329
|
+
onClick: ne
|
|
326
330
|
},
|
|
327
331
|
"Cancel"
|
|
328
332
|
), /* @__PURE__ */ e.createElement(
|
|
329
|
-
|
|
333
|
+
W,
|
|
330
334
|
{
|
|
331
335
|
type: "button",
|
|
332
|
-
className: "h-
|
|
333
|
-
disabled: !
|
|
334
|
-
onClick:
|
|
336
|
+
className: "h-9 rounded-md px-4 text-sm",
|
|
337
|
+
disabled: !ae,
|
|
338
|
+
onClick: re
|
|
335
339
|
},
|
|
336
340
|
"Apply"
|
|
337
341
|
)))
|
|
@@ -339,8 +343,8 @@ const ye = e.forwardRef(
|
|
|
339
343
|
));
|
|
340
344
|
}
|
|
341
345
|
);
|
|
342
|
-
|
|
346
|
+
Me.displayName = "DateRangePicker";
|
|
343
347
|
export {
|
|
344
|
-
|
|
348
|
+
Me as DateRangePicker
|
|
345
349
|
};
|
|
346
350
|
//# sourceMappingURL=index.es29.js.map
|