@bfrs/agentic-components 0.7.8 → 0.7.9
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/data-display/DataTable/TableViewSelector.d.ts +3 -1
- package/dist/components/data-display/DataTable/TableViewSelector.js +242 -209
- package/dist/components/data-display/DataTable/TableViewSelector.js.map +1 -1
- package/dist/components/filters/DateRangePicker/DateRangePicker.js +417 -445
- package/dist/components/filters/DateRangePicker/DateRangePicker.js.map +1 -1
- package/dist/components/filters/DateRangePicker/DateRangePicker.utils.d.ts +36 -0
- package/dist/components/filters/DateRangePicker/DateRangePicker.utils.js +89 -52
- package/dist/components/filters/DateRangePicker/DateRangePicker.utils.js.map +1 -1
- package/dist/custom-elements.js +6338 -6304
- package/dist/custom-elements.js.map +1 -1
- package/dist/index.js +258 -250
- package/package.json +1 -1
|
@@ -1,88 +1,88 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import { Root as
|
|
3
|
-
import { CalendarBlank as
|
|
4
|
-
import { CaretDown as
|
|
5
|
-
import { CaretLeft as
|
|
6
|
-
import { CaretRight as
|
|
7
|
-
import { Check as
|
|
8
|
-
import { X as
|
|
9
|
-
import { useState as
|
|
1
|
+
import { jsxs as l, jsx as r, Fragment as ct } from "react/jsx-runtime";
|
|
2
|
+
import { Root as Tt, Trigger as Mt, Portal as Bt, Content as zt } from "../../../node_modules/@radix-ui/react-popover/dist/index.js";
|
|
3
|
+
import { CalendarBlank as Lt } from "../../../node_modules/@phosphor-icons/react/dist/csr/CalendarBlank.es.js";
|
|
4
|
+
import { CaretDown as dt } from "../../../node_modules/@phosphor-icons/react/dist/csr/CaretDown.es.js";
|
|
5
|
+
import { CaretLeft as Je } from "../../../node_modules/@phosphor-icons/react/dist/csr/CaretLeft.es.js";
|
|
6
|
+
import { CaretRight as Ke } from "../../../node_modules/@phosphor-icons/react/dist/csr/CaretRight.es.js";
|
|
7
|
+
import { Check as Qe } from "../../../node_modules/@phosphor-icons/react/dist/csr/Check.es.js";
|
|
8
|
+
import { X as Ft } from "../../../node_modules/@phosphor-icons/react/dist/csr/X.es.js";
|
|
9
|
+
import { useState as D, useMemo as z, useRef as It, useCallback as ye, useEffect as gt } from "react";
|
|
10
10
|
import o from "@emotion/styled";
|
|
11
|
-
import { twRing as He, twTransform as
|
|
12
|
-
import { Button as
|
|
13
|
-
import { WarningAlertIcon as
|
|
14
|
-
import { floatingCollisionPadding as
|
|
15
|
-
import { coerceDateRangeValue as
|
|
16
|
-
import { BfrsPortalScope as
|
|
17
|
-
import { Select as
|
|
18
|
-
const
|
|
11
|
+
import { twRing as He, twTransform as ft, kfContentIn as Wt } from "../../../lib/emotionTw.js";
|
|
12
|
+
import { Button as We } from "../../primitives/Button/Button.js";
|
|
13
|
+
import { WarningAlertIcon as Yt, warningSurfaceTextStyle as Et } from "../../ui/feedback/warningVisual.js";
|
|
14
|
+
import { floatingCollisionPadding as Ht } from "../../ui/overlays/overlayPositioning.js";
|
|
15
|
+
import { coerceDateRangeValue as Ze, CUSTOM_PRESET_ID as m, YEAR_LAST_ONE as xe, YEAR_LAST_30_DAYS as et, getInitialCalendar as Ye, shiftMonth as S, startOfDay as w, addDays as Re, computeYearRange as tt, compareDay as L, hasCompleteRange as C, BASE_YEAR as pt, getPresetLabel as Nt, defaultDateRangePresets as _t, sameDay as Ne, defaultFormatDate as ht, clampYearRange as $t, differenceInCalendarDays as jt, YEAR_OPTIONS as rt, normalizeRange as _e, daysInMonth as Ot, MONTH_NAMES as Vt, SHORT_MONTH_NAMES as ot, DAY_HEADS as Gt } from "./DateRangePicker.utils.js";
|
|
16
|
+
import { BfrsPortalScope as Ut } from "../../ui/providers/BfrsProvider/BfrsProvider.js";
|
|
17
|
+
import { Select as Xt } from "../../ui/forms/Select/Select.js";
|
|
18
|
+
const $e = (e) => e ? He("2px", `hsl(var(--bfrs-color-border-focus) / ${e})`) : {
|
|
19
19
|
...He("2px", "hsl(var(--bfrs-color-border-focus) / var(--tw-ring-opacity, 1))"),
|
|
20
20
|
"--tw-ring-opacity": "1"
|
|
21
|
-
},
|
|
21
|
+
}, $ = {
|
|
22
22
|
"--tw-text-opacity": "1",
|
|
23
23
|
color: "hsl(var(--bfrs-color-text-muted) / var(--tw-text-opacity, 1))"
|
|
24
|
-
},
|
|
24
|
+
}, A = {
|
|
25
25
|
"--tw-text-opacity": "1",
|
|
26
26
|
color: "hsl(var(--bfrs-color-text-primary) / var(--tw-text-opacity, 1))"
|
|
27
|
-
},
|
|
27
|
+
}, Pe = {
|
|
28
28
|
"--tw-text-opacity": "1",
|
|
29
29
|
color: "hsl(var(--bfrs-color-text-secondary) / var(--tw-text-opacity, 1))"
|
|
30
|
-
},
|
|
30
|
+
}, Z = {
|
|
31
31
|
"--tw-text-opacity": "1",
|
|
32
32
|
color: "hsl(var(--bfrs-color-text-disabled) / var(--tw-text-opacity, 1))"
|
|
33
|
-
},
|
|
33
|
+
}, N = {
|
|
34
34
|
"--tw-bg-opacity": "1",
|
|
35
35
|
backgroundColor: "hsl(var(--bfrs-color-primary-soft) / var(--tw-bg-opacity, 1))"
|
|
36
|
-
},
|
|
36
|
+
}, ee = {
|
|
37
37
|
"--tw-bg-opacity": "1",
|
|
38
38
|
backgroundColor: "hsl(var(--bfrs-color-surface-card) / var(--tw-bg-opacity, 1))"
|
|
39
|
-
},
|
|
39
|
+
}, te = {
|
|
40
40
|
"--tw-border-opacity": "1",
|
|
41
41
|
borderColor: "hsl(var(--bfrs-color-border) / var(--tw-border-opacity, 1))"
|
|
42
42
|
};
|
|
43
|
-
function
|
|
44
|
-
const
|
|
45
|
-
return
|
|
43
|
+
function _(e, c) {
|
|
44
|
+
const h = Date.UTC(e.year, e.month, 1), d = Date.UTC(c.year, c.month, 1);
|
|
45
|
+
return h === d ? 0 : h < d ? -1 : 1;
|
|
46
46
|
}
|
|
47
|
-
function
|
|
48
|
-
return
|
|
47
|
+
function qt(e, c, h) {
|
|
48
|
+
return _(e, c) < 0 || _(e, h) > 0;
|
|
49
49
|
}
|
|
50
|
-
function
|
|
50
|
+
function nt(e) {
|
|
51
51
|
return { year: e.getFullYear(), month: e.getMonth() };
|
|
52
52
|
}
|
|
53
|
-
function
|
|
54
|
-
const
|
|
55
|
-
if (!
|
|
56
|
-
return { left: e, right:
|
|
57
|
-
const
|
|
58
|
-
return !
|
|
53
|
+
function Jt(e, c, h) {
|
|
54
|
+
const d = S(e.year, e.month, 1);
|
|
55
|
+
if (!h || _(d, h) <= 0)
|
|
56
|
+
return { left: e, right: d };
|
|
57
|
+
const b = S(e.year, e.month, -1);
|
|
58
|
+
return !c || _(b, c) >= 0 ? { left: b, right: e } : { left: e, right: d };
|
|
59
59
|
}
|
|
60
|
-
function Ee(e,
|
|
61
|
-
const
|
|
62
|
-
if (
|
|
63
|
-
const
|
|
64
|
-
return
|
|
60
|
+
function Ee(e, c, h, d) {
|
|
61
|
+
const b = nt(e);
|
|
62
|
+
if (h === 1) return { left: b, right: b };
|
|
63
|
+
const j = nt(c);
|
|
64
|
+
return _(b, j) < 0 ? { left: b, right: j } : Jt(b, d == null ? void 0 : d.minMonth, d == null ? void 0 : d.maxMonth);
|
|
65
65
|
}
|
|
66
|
-
const
|
|
66
|
+
const Kt = /* @__PURE__ */ o("div", {
|
|
67
67
|
label: "AgenticDateRangePicker-calendar"
|
|
68
68
|
})({
|
|
69
69
|
width: "252px",
|
|
70
70
|
borderRadius: "var(--bfrs-radius-xl)",
|
|
71
71
|
borderWidth: "1px",
|
|
72
|
-
...
|
|
73
|
-
...
|
|
72
|
+
...te,
|
|
73
|
+
...ee,
|
|
74
74
|
padding: ".75rem",
|
|
75
75
|
"--tw-shadow": "var(--bfrs-shadow-low)",
|
|
76
76
|
"--tw-shadow-colored": "var(--bfrs-shadow-low)",
|
|
77
77
|
boxShadow: "var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)"
|
|
78
|
-
}),
|
|
78
|
+
}), Qt = /* @__PURE__ */ o("div", {
|
|
79
79
|
label: "AgenticDateRangePicker-calendarHeader"
|
|
80
80
|
})({
|
|
81
81
|
marginBottom: ".5rem",
|
|
82
82
|
display: "flex",
|
|
83
83
|
alignItems: "center",
|
|
84
84
|
justifyContent: "space-between"
|
|
85
|
-
}),
|
|
85
|
+
}), ke = /* @__PURE__ */ o("button", {
|
|
86
86
|
label: "AgenticDateRangePicker-navButton",
|
|
87
87
|
shouldForwardProp: (e) => e !== "ownerState"
|
|
88
88
|
})(({ ownerState: e }) => [
|
|
@@ -93,14 +93,14 @@ const Jt = /* @__PURE__ */ o("div", {
|
|
|
93
93
|
alignItems: "center",
|
|
94
94
|
justifyContent: "center",
|
|
95
95
|
borderRadius: "var(--bfrs-radius-md)",
|
|
96
|
-
|
|
96
|
+
...$,
|
|
97
97
|
outline: "2px solid transparent",
|
|
98
98
|
outlineOffset: "2px",
|
|
99
99
|
"&:hover": {
|
|
100
|
-
...
|
|
101
|
-
...
|
|
100
|
+
...N,
|
|
101
|
+
...A
|
|
102
102
|
},
|
|
103
|
-
"&:focus-visible":
|
|
103
|
+
"&:focus-visible": $e()
|
|
104
104
|
},
|
|
105
105
|
e.disableable && {
|
|
106
106
|
"&:disabled": {
|
|
@@ -108,12 +108,12 @@ const Jt = /* @__PURE__ */ o("div", {
|
|
|
108
108
|
opacity: ".3"
|
|
109
109
|
}
|
|
110
110
|
}
|
|
111
|
-
]),
|
|
111
|
+
]), at = /* @__PURE__ */ o("div", {
|
|
112
112
|
label: "AgenticDateRangePicker-navSpacer"
|
|
113
113
|
})({
|
|
114
114
|
width: "1.75rem",
|
|
115
115
|
height: "1.75rem"
|
|
116
|
-
}),
|
|
116
|
+
}), Zt = /* @__PURE__ */ o("button", {
|
|
117
117
|
label: "AgenticDateRangePicker-titleButton"
|
|
118
118
|
})({
|
|
119
119
|
display: "flex",
|
|
@@ -122,7 +122,7 @@ const Jt = /* @__PURE__ */ o("div", {
|
|
|
122
122
|
fontSize: ".875rem",
|
|
123
123
|
lineHeight: "1.25rem",
|
|
124
124
|
fontWeight: 700,
|
|
125
|
-
...
|
|
125
|
+
...A,
|
|
126
126
|
outline: "2px solid transparent",
|
|
127
127
|
outlineOffset: "2px",
|
|
128
128
|
"&:hover": {
|
|
@@ -132,18 +132,18 @@ const Jt = /* @__PURE__ */ o("div", {
|
|
|
132
132
|
transitionProperty: "color,background-color,border-color,text-decoration-color,fill,stroke",
|
|
133
133
|
transitionTimingFunction: "cubic-bezier(.4,0,.2,1)",
|
|
134
134
|
transitionDuration: ".15s"
|
|
135
|
-
}),
|
|
135
|
+
}), er = /* @__PURE__ */ o(dt, {
|
|
136
136
|
label: "AgenticDateRangePicker-titleCaret",
|
|
137
137
|
shouldForwardProp: (e) => e !== "ownerState"
|
|
138
138
|
})(({ ownerState: e }) => [
|
|
139
139
|
{
|
|
140
|
-
|
|
140
|
+
...$,
|
|
141
141
|
transitionProperty: "transform",
|
|
142
142
|
transitionTimingFunction: "cubic-bezier(.4,0,.2,1)",
|
|
143
143
|
transitionDuration: ".15s"
|
|
144
144
|
},
|
|
145
|
-
e.open &&
|
|
146
|
-
]),
|
|
145
|
+
e.open && ft({ "--tw-rotate": "180deg" })
|
|
146
|
+
]), tr = /* @__PURE__ */ o("div", {
|
|
147
147
|
label: "AgenticDateRangePicker-monthGrid"
|
|
148
148
|
})({
|
|
149
149
|
display: "grid",
|
|
@@ -151,7 +151,7 @@ const Jt = /* @__PURE__ */ o("div", {
|
|
|
151
151
|
gap: ".375rem",
|
|
152
152
|
paddingTop: ".25rem",
|
|
153
153
|
paddingBottom: ".25rem"
|
|
154
|
-
}),
|
|
154
|
+
}), rr = /* @__PURE__ */ o("button", {
|
|
155
155
|
label: "AgenticDateRangePicker-monthButton",
|
|
156
156
|
shouldForwardProp: (e) => e !== "ownerState"
|
|
157
157
|
})(({ ownerState: e }) => [
|
|
@@ -163,17 +163,17 @@ const Jt = /* @__PURE__ */ o("div", {
|
|
|
163
163
|
paddingBottom: ".625rem",
|
|
164
164
|
fontSize: "12px",
|
|
165
165
|
fontWeight: 500,
|
|
166
|
-
...
|
|
166
|
+
...Pe,
|
|
167
167
|
outline: "2px solid transparent",
|
|
168
168
|
outlineOffset: "2px",
|
|
169
169
|
transitionProperty: "color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter",
|
|
170
170
|
transitionTimingFunction: "cubic-bezier(.4,0,.2,1)",
|
|
171
171
|
transitionDuration: ".15s",
|
|
172
172
|
"&:hover": {
|
|
173
|
-
...
|
|
174
|
-
...
|
|
173
|
+
...N,
|
|
174
|
+
...A
|
|
175
175
|
},
|
|
176
|
-
"&:focus-visible":
|
|
176
|
+
"&:focus-visible": $e()
|
|
177
177
|
},
|
|
178
178
|
e.current && {
|
|
179
179
|
"--tw-bg-opacity": "1",
|
|
@@ -190,36 +190,36 @@ const Jt = /* @__PURE__ */ o("div", {
|
|
|
190
190
|
},
|
|
191
191
|
e.disabled && {
|
|
192
192
|
cursor: "not-allowed",
|
|
193
|
-
...
|
|
193
|
+
...Z,
|
|
194
194
|
opacity: ".45",
|
|
195
195
|
"&:hover": {
|
|
196
196
|
backgroundColor: "transparent",
|
|
197
|
-
...
|
|
197
|
+
...Z
|
|
198
198
|
}
|
|
199
199
|
}
|
|
200
|
-
]),
|
|
200
|
+
]), or = /* @__PURE__ */ o("div", {
|
|
201
201
|
label: "AgenticDateRangePicker-dayHeads"
|
|
202
202
|
})({
|
|
203
203
|
marginBottom: ".125rem",
|
|
204
204
|
display: "grid",
|
|
205
205
|
gridTemplateColumns: "repeat(7,minmax(0,1fr))",
|
|
206
206
|
borderBottomWidth: "1px",
|
|
207
|
-
...
|
|
207
|
+
...te,
|
|
208
208
|
paddingBottom: ".375rem"
|
|
209
|
-
}),
|
|
209
|
+
}), nr = /* @__PURE__ */ o("div", {
|
|
210
210
|
label: "AgenticDateRangePicker-dayHead"
|
|
211
211
|
})({
|
|
212
212
|
textAlign: "center",
|
|
213
213
|
fontSize: ".75rem",
|
|
214
214
|
lineHeight: "1rem",
|
|
215
215
|
fontWeight: 600,
|
|
216
|
-
...
|
|
217
|
-
}),
|
|
216
|
+
...Z
|
|
217
|
+
}), ar = /* @__PURE__ */ o("div", {
|
|
218
218
|
label: "AgenticDateRangePicker-daysGrid"
|
|
219
219
|
})({
|
|
220
220
|
display: "grid",
|
|
221
221
|
gridTemplateColumns: "repeat(7,minmax(0,1fr))"
|
|
222
|
-
}),
|
|
222
|
+
}), ir = /* @__PURE__ */ o("div", {
|
|
223
223
|
label: "AgenticDateRangePicker-monthLabel"
|
|
224
224
|
})({
|
|
225
225
|
gridColumn: "span 7 / span 7",
|
|
@@ -230,12 +230,12 @@ const Jt = /* @__PURE__ */ o("div", {
|
|
|
230
230
|
fontSize: "11px",
|
|
231
231
|
fontWeight: 700,
|
|
232
232
|
letterSpacing: ".12em",
|
|
233
|
-
...
|
|
234
|
-
}),
|
|
233
|
+
...Z
|
|
234
|
+
}), lr = /* @__PURE__ */ o("div", {
|
|
235
235
|
label: "AgenticDateRangePicker-blankCell"
|
|
236
236
|
})({
|
|
237
237
|
height: "2rem"
|
|
238
|
-
}),
|
|
238
|
+
}), sr = /* @__PURE__ */ o("div", {
|
|
239
239
|
label: "AgenticDateRangePicker-dayCell"
|
|
240
240
|
})({
|
|
241
241
|
position: "relative",
|
|
@@ -243,7 +243,7 @@ const Jt = /* @__PURE__ */ o("div", {
|
|
|
243
243
|
height: "2rem",
|
|
244
244
|
alignItems: "center",
|
|
245
245
|
justifyContent: "center"
|
|
246
|
-
}),
|
|
246
|
+
}), cr = /* @__PURE__ */ o("div", {
|
|
247
247
|
label: "AgenticDateRangePicker-rangeBand",
|
|
248
248
|
shouldForwardProp: (e) => e !== "ownerState"
|
|
249
249
|
})(({ ownerState: e }) => [
|
|
@@ -252,7 +252,7 @@ const Jt = /* @__PURE__ */ o("div", {
|
|
|
252
252
|
position: "absolute",
|
|
253
253
|
top: "2px",
|
|
254
254
|
bottom: "2px",
|
|
255
|
-
...
|
|
255
|
+
...N
|
|
256
256
|
},
|
|
257
257
|
e.shape === "start" && { left: "50%", right: 0 },
|
|
258
258
|
e.shape === "end" && { left: 0, right: "50%" },
|
|
@@ -265,7 +265,7 @@ const Jt = /* @__PURE__ */ o("div", {
|
|
|
265
265
|
borderTopRightRadius: "var(--bfrs-radius-lg)",
|
|
266
266
|
borderBottomRightRadius: "var(--bfrs-radius-lg)"
|
|
267
267
|
}
|
|
268
|
-
]),
|
|
268
|
+
]), dr = /* @__PURE__ */ o("button", {
|
|
269
269
|
label: "AgenticDateRangePicker-dayButton",
|
|
270
270
|
shouldForwardProp: (e) => e !== "ownerState"
|
|
271
271
|
})(({ ownerState: e }) => [
|
|
@@ -284,7 +284,7 @@ const Jt = /* @__PURE__ */ o("div", {
|
|
|
284
284
|
transitionProperty: "color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter",
|
|
285
285
|
transitionTimingFunction: "cubic-bezier(.4,0,.2,1)",
|
|
286
286
|
transitionDuration: ".15s",
|
|
287
|
-
"&:focus-visible":
|
|
287
|
+
"&:focus-visible": $e()
|
|
288
288
|
},
|
|
289
289
|
e.shape === "start" ? {
|
|
290
290
|
borderTopLeftRadius: "var(--bfrs-radius-lg)",
|
|
@@ -303,200 +303,172 @@ const Jt = /* @__PURE__ */ o("div", {
|
|
|
303
303
|
"--tw-shadow-colored": "var(--bfrs-shadow-low)",
|
|
304
304
|
boxShadow: "var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)"
|
|
305
305
|
},
|
|
306
|
-
!e.selected && e.inRange && { fontWeight: 500, ...
|
|
306
|
+
!e.selected && e.inRange && { fontWeight: 500, ...A },
|
|
307
307
|
!e.selected && !e.inRange && {
|
|
308
|
-
...
|
|
308
|
+
...Pe,
|
|
309
309
|
"&:hover": {
|
|
310
|
-
...
|
|
311
|
-
...
|
|
310
|
+
...N,
|
|
311
|
+
...A
|
|
312
312
|
}
|
|
313
313
|
},
|
|
314
314
|
e.disabled && {
|
|
315
315
|
cursor: "not-allowed",
|
|
316
|
-
...
|
|
316
|
+
...Z,
|
|
317
317
|
opacity: ".4",
|
|
318
318
|
"&:hover": {
|
|
319
319
|
backgroundColor: "transparent",
|
|
320
|
-
...
|
|
320
|
+
...Z
|
|
321
321
|
}
|
|
322
322
|
}
|
|
323
323
|
]);
|
|
324
|
-
function
|
|
324
|
+
function it({
|
|
325
325
|
year: e,
|
|
326
|
-
month:
|
|
327
|
-
from:
|
|
328
|
-
to:
|
|
329
|
-
hovered:
|
|
330
|
-
awaitingTo:
|
|
331
|
-
isDateDisabled:
|
|
326
|
+
month: c,
|
|
327
|
+
from: h,
|
|
328
|
+
to: d,
|
|
329
|
+
hovered: b,
|
|
330
|
+
awaitingTo: j,
|
|
331
|
+
isDateDisabled: pe,
|
|
332
332
|
onSelectDate: he,
|
|
333
333
|
onHoverDate: O,
|
|
334
|
-
onPrev:
|
|
334
|
+
onPrev: De,
|
|
335
335
|
onNext: Ce,
|
|
336
|
-
showPrev:
|
|
337
|
-
showNext:
|
|
338
|
-
minMonth:
|
|
336
|
+
showPrev: F = !0,
|
|
337
|
+
showNext: I = !0,
|
|
338
|
+
minMonth: v,
|
|
339
339
|
maxMonth: Se,
|
|
340
|
-
onNavigateTo:
|
|
340
|
+
onNavigateTo: se,
|
|
341
341
|
className: Ae
|
|
342
342
|
}) {
|
|
343
|
-
const [
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
}, [e,
|
|
347
|
-
const Me = new Date(e,
|
|
348
|
-
for (let
|
|
349
|
-
|
|
350
|
-
for (;
|
|
351
|
-
|
|
352
|
-
const
|
|
353
|
-
return /* @__PURE__ */
|
|
354
|
-
/* @__PURE__ */
|
|
355
|
-
|
|
356
|
-
|
|
343
|
+
const [y, me] = D(!1), [x, re] = D(e), Te = (/* @__PURE__ */ new Date()).getFullYear();
|
|
344
|
+
gt(() => {
|
|
345
|
+
y || re(e);
|
|
346
|
+
}, [e, y]);
|
|
347
|
+
const Me = new Date(e, c, 1).getDay(), be = Ot(e, c), oe = Array(Me).fill(null);
|
|
348
|
+
for (let s = 1; s <= be; s += 1)
|
|
349
|
+
oe.push(s);
|
|
350
|
+
for (; oe.length % 7 !== 0; )
|
|
351
|
+
oe.push(null);
|
|
352
|
+
const T = d ?? (j ? b : void 0), f = h && T ? _e(h, T) : void 0;
|
|
353
|
+
return /* @__PURE__ */ l(Kt, { className: Ae, children: [
|
|
354
|
+
/* @__PURE__ */ l(Qt, { children: [
|
|
355
|
+
y ? /* @__PURE__ */ r(
|
|
356
|
+
ke,
|
|
357
357
|
{
|
|
358
358
|
type: "button",
|
|
359
359
|
ownerState: { disableable: !0 },
|
|
360
|
-
onClick: () =>
|
|
361
|
-
disabled:
|
|
360
|
+
onClick: () => re((s) => s - 1),
|
|
361
|
+
disabled: x <= pt,
|
|
362
362
|
"aria-label": "Previous year",
|
|
363
|
-
children: /* @__PURE__ */ r(
|
|
363
|
+
children: /* @__PURE__ */ r(Je, { size: 14, weight: "bold" })
|
|
364
364
|
}
|
|
365
|
-
) :
|
|
366
|
-
/* @__PURE__ */
|
|
367
|
-
|
|
365
|
+
) : F ? /* @__PURE__ */ r(ke, { type: "button", ownerState: { disableable: !1 }, onClick: De, "aria-label": "Previous month", children: /* @__PURE__ */ r(Je, { size: 14, weight: "bold" }) }) : /* @__PURE__ */ r(at, { "aria-hidden": "true" }),
|
|
366
|
+
/* @__PURE__ */ l(
|
|
367
|
+
Zt,
|
|
368
368
|
{
|
|
369
369
|
type: "button",
|
|
370
370
|
onClick: () => {
|
|
371
|
-
|
|
371
|
+
re(e), me((s) => !s);
|
|
372
372
|
},
|
|
373
373
|
children: [
|
|
374
|
-
|
|
375
|
-
/* @__PURE__ */ r(
|
|
374
|
+
y ? x : `${Vt[c]}, ${e}`,
|
|
375
|
+
/* @__PURE__ */ r(er, { size: 11, weight: "bold", ownerState: { open: y } })
|
|
376
376
|
]
|
|
377
377
|
}
|
|
378
378
|
),
|
|
379
|
-
|
|
380
|
-
|
|
379
|
+
y ? /* @__PURE__ */ r(
|
|
380
|
+
ke,
|
|
381
381
|
{
|
|
382
382
|
type: "button",
|
|
383
383
|
ownerState: { disableable: !0 },
|
|
384
|
-
onClick: () =>
|
|
385
|
-
disabled:
|
|
384
|
+
onClick: () => re((s) => s + 1),
|
|
385
|
+
disabled: x >= Te + 1,
|
|
386
386
|
"aria-label": "Next year",
|
|
387
|
-
children: /* @__PURE__ */ r(
|
|
387
|
+
children: /* @__PURE__ */ r(Ke, { size: 14, weight: "bold" })
|
|
388
388
|
}
|
|
389
|
-
) :
|
|
389
|
+
) : I ? /* @__PURE__ */ r(ke, { type: "button", ownerState: { disableable: !1 }, onClick: Ce, "aria-label": "Next month", children: /* @__PURE__ */ r(Ke, { size: 14, weight: "bold" }) }) : /* @__PURE__ */ r(at, { "aria-hidden": "true" })
|
|
390
390
|
] }),
|
|
391
|
-
|
|
392
|
-
const
|
|
391
|
+
y ? /* @__PURE__ */ r(tr, { children: ot.map((s, R) => {
|
|
392
|
+
const u = R === c && x === e, M = qt({ year: x, month: R }, v, Se);
|
|
393
393
|
return /* @__PURE__ */ r(
|
|
394
|
-
|
|
394
|
+
rr,
|
|
395
395
|
{
|
|
396
396
|
type: "button",
|
|
397
|
-
disabled:
|
|
398
|
-
ownerState: { current:
|
|
397
|
+
disabled: M,
|
|
398
|
+
ownerState: { current: u, disabled: M },
|
|
399
399
|
onClick: () => {
|
|
400
|
-
|
|
400
|
+
M || (se == null || se(x, R), me(!1));
|
|
401
401
|
},
|
|
402
|
-
children:
|
|
402
|
+
children: s
|
|
403
403
|
},
|
|
404
|
-
|
|
404
|
+
R
|
|
405
405
|
);
|
|
406
|
-
}) }) : /* @__PURE__ */
|
|
407
|
-
/* @__PURE__ */ r(
|
|
408
|
-
/* @__PURE__ */
|
|
409
|
-
/* @__PURE__ */ r(
|
|
410
|
-
|
|
411
|
-
if (!
|
|
412
|
-
return /* @__PURE__ */ r(
|
|
413
|
-
const
|
|
414
|
-
return /* @__PURE__ */
|
|
415
|
-
|
|
406
|
+
}) }) : /* @__PURE__ */ l(ct, { children: [
|
|
407
|
+
/* @__PURE__ */ r(or, { children: Gt.map((s, R) => /* @__PURE__ */ r(nr, { children: s }, `${s}-${R}`)) }),
|
|
408
|
+
/* @__PURE__ */ l(ar, { children: [
|
|
409
|
+
/* @__PURE__ */ r(ir, { children: ot[c] }),
|
|
410
|
+
oe.map((s, R) => {
|
|
411
|
+
if (!s)
|
|
412
|
+
return /* @__PURE__ */ r(lr, {}, `blank-${R}`);
|
|
413
|
+
const u = new Date(e, c, s), M = Ne(u, (f == null ? void 0 : f.from) ?? h), W = Ne(u, (f == null ? void 0 : f.to) ?? d), k = M || W, B = !!(f && L(u, f.from) > 0 && L(u, f.to) < 0), V = pe(u), ue = R % 7, p = !!(f && L(f.from, f.to) !== 0);
|
|
414
|
+
return /* @__PURE__ */ l(
|
|
415
|
+
sr,
|
|
416
416
|
{
|
|
417
|
-
onMouseEnter: () => O(
|
|
417
|
+
onMouseEnter: () => O(u),
|
|
418
418
|
onMouseLeave: () => O(void 0),
|
|
419
419
|
children: [
|
|
420
|
-
(
|
|
421
|
-
|
|
420
|
+
(B || p && k) && /* @__PURE__ */ r(
|
|
421
|
+
cr,
|
|
422
422
|
{
|
|
423
423
|
ownerState: {
|
|
424
|
-
shape:
|
|
425
|
-
roundLeft:
|
|
426
|
-
roundRight:
|
|
424
|
+
shape: p && M ? "start" : p && W ? "end" : "middle",
|
|
425
|
+
roundLeft: ue === 0 || s === 1,
|
|
426
|
+
roundRight: ue === 6 || s === be
|
|
427
427
|
},
|
|
428
428
|
"aria-hidden": "true"
|
|
429
429
|
}
|
|
430
430
|
),
|
|
431
431
|
/* @__PURE__ */ r(
|
|
432
|
-
|
|
432
|
+
dr,
|
|
433
433
|
{
|
|
434
434
|
type: "button",
|
|
435
|
-
disabled:
|
|
436
|
-
onClick: () => he(
|
|
437
|
-
"aria-pressed":
|
|
438
|
-
"aria-label":
|
|
435
|
+
disabled: V,
|
|
436
|
+
onClick: () => he(u),
|
|
437
|
+
"aria-pressed": k,
|
|
438
|
+
"aria-label": ht(u),
|
|
439
439
|
ownerState: {
|
|
440
440
|
// Range endpoints square off the side that meets the band so they sit flush
|
|
441
441
|
// with it; the start keeps its left corners, the end keeps its right corners.
|
|
442
|
-
shape:
|
|
443
|
-
selected:
|
|
444
|
-
inRange:
|
|
445
|
-
disabled:
|
|
442
|
+
shape: p && M ? "start" : p && W ? "end" : "single",
|
|
443
|
+
selected: k,
|
|
444
|
+
inRange: B,
|
|
445
|
+
disabled: V
|
|
446
446
|
},
|
|
447
|
-
children:
|
|
447
|
+
children: s
|
|
448
448
|
}
|
|
449
449
|
)
|
|
450
450
|
]
|
|
451
451
|
},
|
|
452
|
-
|
|
452
|
+
s
|
|
453
453
|
);
|
|
454
454
|
})
|
|
455
455
|
] })
|
|
456
456
|
] })
|
|
457
457
|
] });
|
|
458
458
|
}
|
|
459
|
-
const
|
|
460
|
-
function dr() {
|
|
461
|
-
const e = (/* @__PURE__ */ new Date()).getFullYear(), i = [
|
|
462
|
-
{ value: ke, label: "Last 30 days" },
|
|
463
|
-
{ value: se, label: "Last one year" }
|
|
464
|
-
];
|
|
465
|
-
for (let l = e - 1; l >= $e; l--)
|
|
466
|
-
i.push({ value: String(l), label: String(l) });
|
|
467
|
-
return i;
|
|
468
|
-
}
|
|
469
|
-
const it = dr();
|
|
470
|
-
function gr() {
|
|
471
|
-
const e = b(/* @__PURE__ */ new Date()), i = new Date(e.getFullYear() - 1, e.getMonth() - 1, 1), l = Math.min(e.getDate(), ht(i.getFullYear(), i.getMonth()));
|
|
472
|
-
return {
|
|
473
|
-
min: new Date(i.getFullYear(), i.getMonth(), l),
|
|
474
|
-
max: e
|
|
475
|
-
};
|
|
476
|
-
}
|
|
477
|
-
function lt(e) {
|
|
478
|
-
if (e === ke) {
|
|
479
|
-
const l = b(/* @__PURE__ */ new Date());
|
|
480
|
-
return { min: pe(l, -29), max: l };
|
|
481
|
-
}
|
|
482
|
-
if (e === se)
|
|
483
|
-
return gr();
|
|
484
|
-
const i = Number(e);
|
|
485
|
-
return { min: new Date(i, 0, 1), max: new Date(i, 11, 31) };
|
|
486
|
-
}
|
|
487
|
-
const fr = /* @__PURE__ */ o("div", {
|
|
459
|
+
const gr = /* @__PURE__ */ o("div", {
|
|
488
460
|
label: "AgenticDateRangePicker-root"
|
|
489
461
|
})({
|
|
490
462
|
display: "inline-flex",
|
|
491
463
|
flexDirection: "column",
|
|
492
464
|
gap: ".375rem"
|
|
493
|
-
}),
|
|
465
|
+
}), fr = /* @__PURE__ */ o("div", {
|
|
494
466
|
label: "AgenticDateRangePicker-label"
|
|
495
467
|
})({
|
|
496
468
|
fontSize: "12px",
|
|
497
469
|
fontWeight: 600,
|
|
498
|
-
...
|
|
499
|
-
}),
|
|
470
|
+
...A
|
|
471
|
+
}), pr = /* @__PURE__ */ o("button", {
|
|
500
472
|
label: "AgenticDateRangePicker-trigger",
|
|
501
473
|
shouldForwardProp: (e) => e !== "ownerState"
|
|
502
474
|
})(({ ownerState: e }) => [
|
|
@@ -509,17 +481,17 @@ const fr = /* @__PURE__ */ o("div", {
|
|
|
509
481
|
gap: ".5rem",
|
|
510
482
|
borderRadius: "var(--bfrs-button-radius)",
|
|
511
483
|
borderWidth: "1px",
|
|
512
|
-
...
|
|
513
|
-
...
|
|
484
|
+
...te,
|
|
485
|
+
...ee,
|
|
514
486
|
fontSize: "12px",
|
|
515
487
|
fontWeight: 400,
|
|
516
|
-
...
|
|
488
|
+
...A,
|
|
517
489
|
outline: "2px solid transparent",
|
|
518
490
|
outlineOffset: "2px",
|
|
519
491
|
transitionProperty: "color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter",
|
|
520
492
|
transitionTimingFunction: "cubic-bezier(0,0,.2,1)",
|
|
521
493
|
transitionDuration: ".15s",
|
|
522
|
-
"&:hover":
|
|
494
|
+
"&:hover": N,
|
|
523
495
|
"&:active": {
|
|
524
496
|
"--tw-bg-opacity": "1",
|
|
525
497
|
backgroundColor: "hsl(var(--bfrs-color-surface-muted) / var(--tw-bg-opacity, 1))"
|
|
@@ -531,17 +503,17 @@ const fr = /* @__PURE__ */ o("div", {
|
|
|
531
503
|
}
|
|
532
504
|
},
|
|
533
505
|
e.md ? { height: "2.25rem", paddingLeft: ".75rem", paddingRight: ".75rem" } : { height: "1.75rem", paddingLeft: ".75rem", paddingRight: ".75rem" },
|
|
534
|
-
e.empty ?
|
|
506
|
+
e.empty ? $ : A,
|
|
535
507
|
e.smFilled && {
|
|
536
508
|
"--tw-border-opacity": "1",
|
|
537
509
|
borderColor: "hsl(var(--bfrs-color-border-focus) / var(--tw-border-opacity, 1))"
|
|
538
510
|
}
|
|
539
|
-
]), hr = /* @__PURE__ */ o(
|
|
511
|
+
]), hr = /* @__PURE__ */ o(Lt, {
|
|
540
512
|
label: "AgenticDateRangePicker-triggerIcon"
|
|
541
513
|
})({
|
|
542
514
|
flexShrink: 0,
|
|
543
|
-
|
|
544
|
-
}),
|
|
515
|
+
...$
|
|
516
|
+
}), mr = /* @__PURE__ */ o("span", {
|
|
545
517
|
label: "AgenticDateRangePicker-triggerLabel"
|
|
546
518
|
})({
|
|
547
519
|
flex: "1 1 0%",
|
|
@@ -549,19 +521,19 @@ const fr = /* @__PURE__ */ o("div", {
|
|
|
549
521
|
textOverflow: "ellipsis",
|
|
550
522
|
whiteSpace: "nowrap",
|
|
551
523
|
textAlign: "left"
|
|
552
|
-
}), br = /* @__PURE__ */ o(
|
|
524
|
+
}), br = /* @__PURE__ */ o(dt, {
|
|
553
525
|
label: "AgenticDateRangePicker-caret",
|
|
554
526
|
shouldForwardProp: (e) => e !== "ownerState"
|
|
555
527
|
})(({ ownerState: e }) => [
|
|
556
528
|
{
|
|
557
529
|
flexShrink: 0,
|
|
558
|
-
|
|
530
|
+
...$,
|
|
559
531
|
transitionProperty: "transform",
|
|
560
532
|
transitionTimingFunction: "cubic-bezier(.4,0,.2,1)",
|
|
561
533
|
transitionDuration: ".15s"
|
|
562
534
|
},
|
|
563
|
-
e.open &&
|
|
564
|
-
]),
|
|
535
|
+
e.open && ft({ "--tw-rotate": "180deg" })
|
|
536
|
+
]), ur = /* @__PURE__ */ o(zt, {
|
|
565
537
|
label: "AgenticDateRangePicker-content",
|
|
566
538
|
shouldForwardProp: (e) => e !== "ownerState"
|
|
567
539
|
})(({ ownerState: e }) => [
|
|
@@ -573,8 +545,8 @@ const fr = /* @__PURE__ */ o("div", {
|
|
|
573
545
|
overflow: "hidden",
|
|
574
546
|
borderRadius: "var(--bfrs-radius-lg)",
|
|
575
547
|
borderWidth: "1px",
|
|
576
|
-
...
|
|
577
|
-
...
|
|
548
|
+
...te,
|
|
549
|
+
...ee,
|
|
578
550
|
"--tw-shadow": "var(--bfrs-shadow-elevated)",
|
|
579
551
|
"--tw-shadow-colored": "var(--bfrs-shadow-elevated)",
|
|
580
552
|
boxShadow: "var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)",
|
|
@@ -586,7 +558,7 @@ const fr = /* @__PURE__ */ o("div", {
|
|
|
586
558
|
e.widthMode === "presets" && { width: "14rem" },
|
|
587
559
|
e.widthMode === "one" && { width: "min(calc(100vw - 1rem),420px)" },
|
|
588
560
|
e.widthMode === "two" && { width: "min(calc(100vw - 1rem),700px)" }
|
|
589
|
-
]),
|
|
561
|
+
]), wr = /* @__PURE__ */ o("div", {
|
|
590
562
|
label: "AgenticDateRangePicker-scroll",
|
|
591
563
|
shouldForwardProp: (e) => e !== "ownerState"
|
|
592
564
|
})(({ ownerState: e }) => [
|
|
@@ -601,7 +573,7 @@ const fr = /* @__PURE__ */ o("div", {
|
|
|
601
573
|
flexDirection: "column",
|
|
602
574
|
"@media (min-width:768px)": { flexDirection: "row" }
|
|
603
575
|
}
|
|
604
|
-
]),
|
|
576
|
+
]), vr = /* @__PURE__ */ o("div", {
|
|
605
577
|
label: "AgenticDateRangePicker-presetColumn",
|
|
606
578
|
shouldForwardProp: (e) => e !== "ownerState"
|
|
607
579
|
})(({ ownerState: e }) => [
|
|
@@ -610,22 +582,22 @@ const fr = /* @__PURE__ */ o("div", {
|
|
|
610
582
|
width: "100%",
|
|
611
583
|
flexShrink: 0,
|
|
612
584
|
flexDirection: "column",
|
|
613
|
-
...
|
|
585
|
+
...te
|
|
614
586
|
},
|
|
615
587
|
e.customPanel && {
|
|
616
|
-
...
|
|
588
|
+
...ee,
|
|
617
589
|
"@media (min-width:768px)": {
|
|
618
590
|
width: "144px",
|
|
619
591
|
borderRightWidth: "1px"
|
|
620
592
|
}
|
|
621
593
|
}
|
|
622
|
-
]),
|
|
594
|
+
]), yr = /* @__PURE__ */ o("div", {
|
|
623
595
|
label: "AgenticDateRangePicker-presetList"
|
|
624
596
|
})({
|
|
625
597
|
flex: "1 1 0%",
|
|
626
598
|
paddingTop: ".5rem",
|
|
627
599
|
paddingBottom: ".5rem"
|
|
628
|
-
}),
|
|
600
|
+
}), lt = /* @__PURE__ */ o("button", {
|
|
629
601
|
label: "AgenticDateRangePicker-presetButton",
|
|
630
602
|
shouldForwardProp: (e) => e !== "ownerState"
|
|
631
603
|
})(({ ownerState: e }) => [
|
|
@@ -643,18 +615,18 @@ const fr = /* @__PURE__ */ o("div", {
|
|
|
643
615
|
transitionProperty: "color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter",
|
|
644
616
|
transitionTimingFunction: "cubic-bezier(.4,0,.2,1)",
|
|
645
617
|
transitionDuration: ".15s",
|
|
646
|
-
"&:hover":
|
|
647
|
-
"&:focus-visible":
|
|
618
|
+
"&:hover": N,
|
|
619
|
+
"&:focus-visible": N
|
|
648
620
|
},
|
|
649
621
|
e.md ? { height: "2.25rem", paddingLeft: ".75rem", paddingRight: ".75rem" } : { height: "1.75rem", paddingLeft: ".625rem", paddingRight: ".625rem" },
|
|
650
|
-
e.selected ? { ...
|
|
622
|
+
e.selected ? { ...N, fontWeight: 700, ...A } : { fontWeight: 500, ...Pe },
|
|
651
623
|
e.presetDisabled && {
|
|
652
624
|
cursor: "not-allowed",
|
|
653
|
-
...
|
|
625
|
+
...Z,
|
|
654
626
|
opacity: ".6",
|
|
655
627
|
"&:hover": { backgroundColor: "transparent" }
|
|
656
628
|
}
|
|
657
|
-
]),
|
|
629
|
+
]), xr = /* @__PURE__ */ o("div", {
|
|
658
630
|
label: "AgenticDateRangePicker-rangeLimit"
|
|
659
631
|
})({
|
|
660
632
|
position: "sticky",
|
|
@@ -663,34 +635,34 @@ const fr = /* @__PURE__ */ o("div", {
|
|
|
663
635
|
display: "flex",
|
|
664
636
|
gap: ".5rem",
|
|
665
637
|
borderTopWidth: "1px",
|
|
666
|
-
...
|
|
667
|
-
...
|
|
638
|
+
...te,
|
|
639
|
+
...ee,
|
|
668
640
|
paddingLeft: "1rem",
|
|
669
641
|
paddingRight: "1rem",
|
|
670
642
|
paddingTop: ".75rem",
|
|
671
643
|
paddingBottom: ".75rem",
|
|
672
644
|
fontSize: ".75rem",
|
|
673
645
|
lineHeight: "1.25rem",
|
|
674
|
-
|
|
675
|
-
}),
|
|
646
|
+
...$
|
|
647
|
+
}), Rr = /* @__PURE__ */ o("span", {
|
|
676
648
|
label: "AgenticDateRangePicker-rangeLimitIcon"
|
|
677
649
|
})({
|
|
678
650
|
marginTop: ".125rem",
|
|
679
651
|
display: "flex",
|
|
680
652
|
flexShrink: 0
|
|
681
|
-
}),
|
|
653
|
+
}), kr = /* @__PURE__ */ o("div", {
|
|
682
654
|
label: "AgenticDateRangePicker-customArea"
|
|
683
655
|
})({
|
|
684
656
|
minWidth: "0px",
|
|
685
657
|
flex: "1 1 0%",
|
|
686
|
-
...
|
|
658
|
+
...ee
|
|
687
659
|
}), Pr = /* @__PURE__ */ o("div", {
|
|
688
660
|
label: "AgenticDateRangePicker-yearRow"
|
|
689
661
|
})({
|
|
690
662
|
paddingLeft: "1rem",
|
|
691
663
|
paddingRight: "1rem",
|
|
692
664
|
paddingTop: "1rem"
|
|
693
|
-
}),
|
|
665
|
+
}), Dr = /* @__PURE__ */ o("div", {
|
|
694
666
|
label: "AgenticDateRangePicker-yearBanner"
|
|
695
667
|
})({
|
|
696
668
|
display: "flex",
|
|
@@ -701,21 +673,21 @@ const fr = /* @__PURE__ */ o("div", {
|
|
|
701
673
|
paddingRight: ".75rem",
|
|
702
674
|
paddingTop: ".5rem",
|
|
703
675
|
paddingBottom: ".5rem"
|
|
704
|
-
}),
|
|
676
|
+
}), Cr = /* @__PURE__ */ o("span", {
|
|
705
677
|
label: "AgenticDateRangePicker-yearText"
|
|
706
678
|
})({
|
|
707
679
|
flex: "1 1 0%",
|
|
708
680
|
fontSize: "12.5px",
|
|
709
681
|
fontWeight: 500,
|
|
710
|
-
...
|
|
711
|
-
}),
|
|
682
|
+
...A
|
|
683
|
+
}), Sr = /* @__PURE__ */ o(Xt, {
|
|
712
684
|
label: "AgenticDateRangePicker-yearSelect"
|
|
713
685
|
})({
|
|
714
686
|
"&&": {
|
|
715
687
|
width: "8rem",
|
|
716
688
|
flexShrink: 0
|
|
717
689
|
}
|
|
718
|
-
}),
|
|
690
|
+
}), Ar = /* @__PURE__ */ o("div", {
|
|
719
691
|
label: "AgenticDateRangePicker-calendarGrid",
|
|
720
692
|
shouldForwardProp: (e) => e !== "ownerState"
|
|
721
693
|
})(({ ownerState: e }) => [
|
|
@@ -726,22 +698,22 @@ const fr = /* @__PURE__ */ o("div", {
|
|
|
726
698
|
padding: "1rem"
|
|
727
699
|
},
|
|
728
700
|
e.two ? { "@media (min-width:768px)": { gridTemplateColumns: "repeat(2,minmax(0,1fr))" } } : { gridTemplateColumns: "repeat(1,minmax(0,1fr))" }
|
|
729
|
-
]),
|
|
701
|
+
]), Tr = /* @__PURE__ */ o("div", {
|
|
730
702
|
label: "AgenticDateRangePicker-footer"
|
|
731
703
|
})({
|
|
732
704
|
display: "flex",
|
|
733
705
|
flexShrink: 0,
|
|
734
706
|
alignItems: "stretch",
|
|
735
707
|
borderTopWidth: "1px",
|
|
736
|
-
...
|
|
737
|
-
}),
|
|
708
|
+
...te
|
|
709
|
+
}), Mr = /* @__PURE__ */ o("div", {
|
|
738
710
|
label: "AgenticDateRangePicker-footerInner"
|
|
739
711
|
})({
|
|
740
712
|
display: "flex",
|
|
741
713
|
flex: "1 1 0%",
|
|
742
714
|
flexDirection: "column",
|
|
743
715
|
gap: ".75rem",
|
|
744
|
-
...
|
|
716
|
+
...ee,
|
|
745
717
|
paddingLeft: "1.25rem",
|
|
746
718
|
paddingRight: "1.25rem",
|
|
747
719
|
paddingTop: "1rem",
|
|
@@ -751,30 +723,30 @@ const fr = /* @__PURE__ */ o("div", {
|
|
|
751
723
|
alignItems: "center",
|
|
752
724
|
justifyContent: "space-between"
|
|
753
725
|
}
|
|
754
|
-
}),
|
|
726
|
+
}), Br = /* @__PURE__ */ o("div", {
|
|
755
727
|
label: "AgenticDateRangePicker-selectedBlock"
|
|
756
728
|
})({
|
|
757
729
|
display: "flex",
|
|
758
730
|
flexDirection: "column",
|
|
759
731
|
gap: ".125rem"
|
|
760
|
-
}),
|
|
732
|
+
}), zr = /* @__PURE__ */ o("div", {
|
|
761
733
|
label: "AgenticDateRangePicker-selectedText"
|
|
762
734
|
})({
|
|
763
735
|
fontSize: "13px",
|
|
764
|
-
...
|
|
765
|
-
}),
|
|
736
|
+
...Pe
|
|
737
|
+
}), Lr = /* @__PURE__ */ o("span", {
|
|
766
738
|
label: "AgenticDateRangePicker-selectedLabel"
|
|
767
739
|
})({
|
|
768
740
|
fontWeight: 600,
|
|
769
741
|
"--tw-text-opacity": "1",
|
|
770
742
|
color: "hsl(var(--bfrs-color-primary) / var(--tw-text-opacity, 1))"
|
|
771
|
-
}),
|
|
743
|
+
}), st = /* @__PURE__ */ o("span", {
|
|
772
744
|
label: "AgenticDateRangePicker-selectedValue"
|
|
773
745
|
})({
|
|
774
746
|
fontWeight: 500
|
|
775
|
-
}),
|
|
747
|
+
}), Fr = /* @__PURE__ */ o("span", {
|
|
776
748
|
label: "AgenticDateRangePicker-selectedTo"
|
|
777
|
-
})(
|
|
749
|
+
})($), Ir = /* @__PURE__ */ o("div", {
|
|
778
750
|
label: "AgenticDateRangePicker-incomplete"
|
|
779
751
|
})({
|
|
780
752
|
fontSize: "12px",
|
|
@@ -787,323 +759,323 @@ const fr = /* @__PURE__ */ o("div", {
|
|
|
787
759
|
flexWrap: "wrap",
|
|
788
760
|
justifyContent: "flex-end",
|
|
789
761
|
gap: ".5rem"
|
|
790
|
-
}),
|
|
762
|
+
}), Yr = /* @__PURE__ */ o("div", {
|
|
791
763
|
label: "AgenticDateRangePicker-helper"
|
|
792
764
|
})({
|
|
793
765
|
fontSize: ".75rem",
|
|
794
766
|
lineHeight: "1.25rem",
|
|
795
|
-
|
|
767
|
+
...$
|
|
796
768
|
});
|
|
797
|
-
function
|
|
769
|
+
function ro({
|
|
798
770
|
className: e,
|
|
799
|
-
value:
|
|
800
|
-
defaultValue:
|
|
801
|
-
onChange:
|
|
802
|
-
presets:
|
|
803
|
-
placeholder:
|
|
804
|
-
label:
|
|
771
|
+
value: c,
|
|
772
|
+
defaultValue: h,
|
|
773
|
+
onChange: d,
|
|
774
|
+
presets: b = _t,
|
|
775
|
+
placeholder: j = "Select date range",
|
|
776
|
+
label: pe,
|
|
805
777
|
helperText: he,
|
|
806
778
|
size: O = "md",
|
|
807
|
-
disabled:
|
|
779
|
+
disabled: De,
|
|
808
780
|
clearable: Ce,
|
|
809
|
-
minDate:
|
|
810
|
-
maxDate:
|
|
811
|
-
maxRangeDays:
|
|
781
|
+
minDate: F,
|
|
782
|
+
maxDate: I,
|
|
783
|
+
maxRangeDays: v,
|
|
812
784
|
months: Se = 2,
|
|
813
|
-
align:
|
|
785
|
+
align: se = "start",
|
|
814
786
|
side: Ae = "bottom",
|
|
815
|
-
open:
|
|
816
|
-
defaultOpen:
|
|
817
|
-
onOpenChange:
|
|
818
|
-
infoText:
|
|
787
|
+
open: y,
|
|
788
|
+
defaultOpen: me = !1,
|
|
789
|
+
onOpenChange: x,
|
|
790
|
+
infoText: re,
|
|
819
791
|
customPresetLabel: Te = "Custom",
|
|
820
792
|
applyLabel: Me = "Apply",
|
|
821
793
|
cancelLabel: be = "Cancel",
|
|
822
|
-
clearLabel:
|
|
823
|
-
formatDate:
|
|
824
|
-
formatRange:
|
|
825
|
-
triggerClassName:
|
|
826
|
-
contentClassName:
|
|
827
|
-
calendarClassName:
|
|
828
|
-
rangeLimitClassName:
|
|
829
|
-
restrictToLast3Months:
|
|
830
|
-
singleDateMode:
|
|
831
|
-
allowedFutureDate:
|
|
832
|
-
showLastOneYearOnly:
|
|
833
|
-
...
|
|
794
|
+
clearLabel: oe = "Clear",
|
|
795
|
+
formatDate: T = ht,
|
|
796
|
+
formatRange: f,
|
|
797
|
+
triggerClassName: s,
|
|
798
|
+
contentClassName: R,
|
|
799
|
+
calendarClassName: u,
|
|
800
|
+
rangeLimitClassName: M,
|
|
801
|
+
restrictToLast3Months: W = !1,
|
|
802
|
+
singleDateMode: k = !1,
|
|
803
|
+
allowedFutureDate: B = !1,
|
|
804
|
+
showLastOneYearOnly: V = !1,
|
|
805
|
+
...ue
|
|
834
806
|
}) {
|
|
835
|
-
const
|
|
836
|
-
const t =
|
|
837
|
-
return
|
|
838
|
-
}),
|
|
839
|
-
if (
|
|
840
|
-
const t =
|
|
841
|
-
return { min:
|
|
807
|
+
const p = k ? 1 : Se, [Be, je] = D(() => Ze(h ?? {})), n = z(() => Ze(c ?? Be), [c, Be]), [mt, bt] = D(me), ce = y ?? mt, [Oe, ne] = D(n.preset ?? m), [g, Y] = D(n), [Ve, ae] = D(), [ie, G] = D(!1), [ze, we] = D(V ? xe : et), [U, X] = D(() => Ye(n, p)), [le, q] = D(() => {
|
|
808
|
+
const t = Ye(n, p);
|
|
809
|
+
return S(t.year, t.month, 1);
|
|
810
|
+
}), Ge = It(!1), J = p, ve = z(() => {
|
|
811
|
+
if (W) {
|
|
812
|
+
const t = w(/* @__PURE__ */ new Date());
|
|
813
|
+
return { min: Re(t, -90), max: t };
|
|
842
814
|
}
|
|
843
|
-
return
|
|
844
|
-
}, [
|
|
845
|
-
if (
|
|
846
|
-
return
|
|
847
|
-
const t =
|
|
848
|
-
return
|
|
849
|
-
}, [
|
|
850
|
-
if (
|
|
851
|
-
return
|
|
852
|
-
const t =
|
|
853
|
-
return
|
|
854
|
-
}, [
|
|
855
|
-
() => ({ year:
|
|
856
|
-
[
|
|
857
|
-
),
|
|
858
|
-
() => ({ year:
|
|
859
|
-
[
|
|
860
|
-
),
|
|
815
|
+
return tt(ze);
|
|
816
|
+
}, [W, ze]), K = z(() => {
|
|
817
|
+
if (B)
|
|
818
|
+
return Re(w(/* @__PURE__ */ new Date()), 1);
|
|
819
|
+
const t = ve.min;
|
|
820
|
+
return F && L(w(F), t) > 0 ? w(F) : t;
|
|
821
|
+
}, [B, ve, F]), Q = z(() => {
|
|
822
|
+
if (B)
|
|
823
|
+
return Re(w(/* @__PURE__ */ new Date()), 365);
|
|
824
|
+
const t = ve.max;
|
|
825
|
+
return I && L(w(I), t) < 0 ? w(I) : t;
|
|
826
|
+
}, [B, ve, I]), de = z(
|
|
827
|
+
() => ({ year: K.getFullYear(), month: K.getMonth() }),
|
|
828
|
+
[K]
|
|
829
|
+
), E = z(
|
|
830
|
+
() => ({ year: Q.getFullYear(), month: Q.getMonth() }),
|
|
831
|
+
[Q]
|
|
832
|
+
), ut = z(() => J !== 2 ? E : S(le.year, le.month, -1), [E, le, J]), wt = z(() => S(U.year, U.month, 1), [U]), ge = ye(
|
|
861
833
|
(t) => {
|
|
862
|
-
|
|
834
|
+
y === void 0 && bt(t), x == null || x(t);
|
|
863
835
|
},
|
|
864
|
-
[
|
|
865
|
-
), Le =
|
|
836
|
+
[y, x]
|
|
837
|
+
), Le = ye(
|
|
866
838
|
(t) => {
|
|
867
|
-
|
|
839
|
+
c === void 0 && je(t), d == null || d(t);
|
|
868
840
|
},
|
|
869
|
-
[
|
|
841
|
+
[d, c]
|
|
870
842
|
);
|
|
871
|
-
|
|
872
|
-
const t =
|
|
873
|
-
if (
|
|
874
|
-
if (
|
|
875
|
-
const
|
|
876
|
-
minMonth:
|
|
877
|
-
maxMonth:
|
|
843
|
+
gt(() => {
|
|
844
|
+
const t = ce && !Ge.current;
|
|
845
|
+
if (Ge.current = ce, !t) return;
|
|
846
|
+
if (Y(n), ne(n.preset ?? (C(n) ? m : "")), ae(void 0), G(!1), C(n) && p === 2) {
|
|
847
|
+
const i = Ee(n.from, n.to, p, {
|
|
848
|
+
minMonth: de,
|
|
849
|
+
maxMonth: E
|
|
878
850
|
});
|
|
879
|
-
|
|
851
|
+
X(i.left), q(i.right);
|
|
880
852
|
} else {
|
|
881
|
-
const
|
|
882
|
-
|
|
853
|
+
const i = Ye(n, p);
|
|
854
|
+
X(i), q(S(i.year, i.month, 1));
|
|
883
855
|
}
|
|
884
856
|
const a = (/* @__PURE__ */ new Date()).getFullYear();
|
|
885
|
-
if (
|
|
886
|
-
const
|
|
887
|
-
|
|
857
|
+
if (C(n) && n.preset === m) {
|
|
858
|
+
const i = n.from.getFullYear(), P = n.to.getFullYear();
|
|
859
|
+
i === P && i >= pt && i < a ? we(String(i)) : we(xe);
|
|
888
860
|
} else
|
|
889
|
-
|
|
890
|
-
}, [n,
|
|
891
|
-
const
|
|
892
|
-
if (
|
|
893
|
-
return
|
|
894
|
-
const t =
|
|
895
|
-
return t && n.preset !==
|
|
896
|
-
}, [n,
|
|
861
|
+
we(V ? xe : et);
|
|
862
|
+
}, [n, E, de, p, ce, V]);
|
|
863
|
+
const vt = z(() => {
|
|
864
|
+
if (f)
|
|
865
|
+
return f(n);
|
|
866
|
+
const t = Nt(b, n.preset);
|
|
867
|
+
return t && n.preset !== m ? t : C(n) ? Ne(n.from, n.to) ? T(n.from) : `${T(n.from)} - ${T(n.to)}` : j;
|
|
868
|
+
}, [n, T, f, j, b]), yt = ye(
|
|
897
869
|
(t) => {
|
|
898
|
-
|
|
899
|
-
const a =
|
|
900
|
-
|
|
901
|
-
const
|
|
902
|
-
minMonth: { year:
|
|
903
|
-
maxMonth: { year:
|
|
870
|
+
we(t);
|
|
871
|
+
const a = tt(t), { from: i, to: P } = $t(a, { minDate: F, maxDate: I, maxRangeDays: v });
|
|
872
|
+
Y({ preset: m, from: i, to: P });
|
|
873
|
+
const fe = Ee(i, P, p, {
|
|
874
|
+
minMonth: { year: i.getFullYear(), month: i.getMonth() },
|
|
875
|
+
maxMonth: { year: P.getFullYear(), month: P.getMonth() }
|
|
904
876
|
});
|
|
905
|
-
|
|
877
|
+
X(fe.left), q(fe.right), G(!1), ae(void 0);
|
|
906
878
|
},
|
|
907
|
-
[
|
|
908
|
-
), Fe =
|
|
879
|
+
[p, F, I, v]
|
|
880
|
+
), Fe = ye(
|
|
909
881
|
(t) => {
|
|
910
|
-
const a =
|
|
911
|
-
return !!(
|
|
882
|
+
const a = w(t), i = w(K), P = w(Q);
|
|
883
|
+
return !!(L(a, i) < 0 || L(a, P) > 0 || ie && g.from && v && jt(a, g.from) + 1 > v);
|
|
912
884
|
},
|
|
913
|
-
[
|
|
914
|
-
),
|
|
885
|
+
[ie, g.from, K, Q, v]
|
|
886
|
+
), xt = (t) => {
|
|
915
887
|
if (t.disabled) return;
|
|
916
|
-
const a = t.getRange(),
|
|
917
|
-
Le({ preset: t.id, ...
|
|
918
|
-
},
|
|
919
|
-
|
|
920
|
-
const t = (
|
|
921
|
-
|
|
922
|
-
const
|
|
923
|
-
minMonth:
|
|
924
|
-
maxMonth:
|
|
888
|
+
const a = t.getRange(), i = _e(a.from, a.to);
|
|
889
|
+
Le({ preset: t.id, ...i }), ge(!1);
|
|
890
|
+
}, Rt = () => {
|
|
891
|
+
ne(m);
|
|
892
|
+
const t = (Ie) => L(Ie, K) < 0 ? K : L(Ie, Q) > 0 ? Q : Ie, a = t(w(/* @__PURE__ */ new Date())), i = v ? Math.min(30, v) : 30, P = t(Re(a, -(i - 1)));
|
|
893
|
+
Y({ preset: m, from: P, to: a });
|
|
894
|
+
const fe = Ee(P, a, p, {
|
|
895
|
+
minMonth: de,
|
|
896
|
+
maxMonth: E
|
|
925
897
|
});
|
|
926
|
-
|
|
927
|
-
},
|
|
898
|
+
X(fe.left), q(fe.right), G(!1), ae(void 0);
|
|
899
|
+
}, Ue = (t) => {
|
|
928
900
|
if (Fe(t)) return;
|
|
929
|
-
const a =
|
|
930
|
-
if (
|
|
931
|
-
|
|
901
|
+
const a = w(t);
|
|
902
|
+
if (k) {
|
|
903
|
+
Y({ preset: m, from: a, to: a }), ne(m);
|
|
932
904
|
return;
|
|
933
905
|
}
|
|
934
|
-
if (!
|
|
935
|
-
|
|
906
|
+
if (!ie || !g.from || g.to) {
|
|
907
|
+
Y({ preset: m, from: a, to: void 0 }), ne(m), G(!0);
|
|
936
908
|
return;
|
|
937
909
|
}
|
|
938
|
-
const
|
|
939
|
-
|
|
940
|
-
},
|
|
941
|
-
|
|
910
|
+
const i = _e(g.from, a);
|
|
911
|
+
Y({ preset: m, ...i }), G(!1);
|
|
912
|
+
}, kt = () => {
|
|
913
|
+
C(g) && (Le({ preset: m, from: g.from, to: g.to }), ge(!1));
|
|
942
914
|
}, Pt = () => {
|
|
943
|
-
|
|
944
|
-
},
|
|
945
|
-
Le({}),
|
|
946
|
-
},
|
|
947
|
-
return /* @__PURE__ */
|
|
948
|
-
|
|
949
|
-
/* @__PURE__ */
|
|
950
|
-
/* @__PURE__ */ r(
|
|
951
|
-
|
|
915
|
+
Y(n), ne(n.preset ?? (C(n) ? m : "")), G(!1), ae(void 0), ge(!1);
|
|
916
|
+
}, Dt = () => {
|
|
917
|
+
Le({}), Y({}), ne(""), G(!1), ge(!1);
|
|
918
|
+
}, Ct = C(g), H = Oe === m, St = k ? !!g.from : Ct, Xe = re ?? (v ? `Date range can be selected for up to ${v} days.` : W ? "Date can be viewed only for the last 90 days." : k && B ? "Date can be viewed only for a period of future date." : "Date can be viewed only for a period of up to 1 year."), At = _(U, de) > 0, qe = J === 2 ? _(le, E) < 0 : _(U, E) < 0;
|
|
919
|
+
return /* @__PURE__ */ l(gr, { className: e, ...ue, children: [
|
|
920
|
+
pe && /* @__PURE__ */ r(fr, { children: pe }),
|
|
921
|
+
/* @__PURE__ */ l(Tt, { open: ce, onOpenChange: ge, children: [
|
|
922
|
+
/* @__PURE__ */ r(Mt, { asChild: !0, children: /* @__PURE__ */ l(
|
|
923
|
+
pr,
|
|
952
924
|
{
|
|
953
925
|
type: "button",
|
|
954
|
-
disabled:
|
|
955
|
-
"data-filled":
|
|
926
|
+
disabled: De,
|
|
927
|
+
"data-filled": C(n) || n.preset ? "" : void 0,
|
|
956
928
|
ownerState: {
|
|
957
929
|
md: O === "md",
|
|
958
|
-
empty: !
|
|
959
|
-
smFilled: O === "sm" && (
|
|
930
|
+
empty: !C(n) && !n.preset,
|
|
931
|
+
smFilled: O === "sm" && (C(n) || !!n.preset)
|
|
960
932
|
},
|
|
961
|
-
className:
|
|
933
|
+
className: s,
|
|
962
934
|
children: [
|
|
963
935
|
/* @__PURE__ */ r(hr, { size: 13 }),
|
|
964
|
-
/* @__PURE__ */ r(
|
|
965
|
-
/* @__PURE__ */ r(br, { size: 10, weight: "bold", ownerState: { open:
|
|
936
|
+
/* @__PURE__ */ r(mr, { children: vt }),
|
|
937
|
+
/* @__PURE__ */ r(br, { size: 10, weight: "bold", ownerState: { open: ce } })
|
|
966
938
|
]
|
|
967
939
|
}
|
|
968
940
|
) }),
|
|
969
|
-
/* @__PURE__ */ r(
|
|
970
|
-
|
|
941
|
+
/* @__PURE__ */ r(Bt, { children: /* @__PURE__ */ r(Ut, { children: /* @__PURE__ */ l(
|
|
942
|
+
ur,
|
|
971
943
|
{
|
|
972
|
-
align:
|
|
944
|
+
align: se,
|
|
973
945
|
side: Ae,
|
|
974
946
|
sideOffset: 6,
|
|
975
|
-
collisionPadding:
|
|
976
|
-
ownerState: { widthMode:
|
|
977
|
-
className:
|
|
947
|
+
collisionPadding: Ht,
|
|
948
|
+
ownerState: { widthMode: H ? J === 1 ? "one" : "two" : "presets" },
|
|
949
|
+
className: R,
|
|
978
950
|
children: [
|
|
979
|
-
/* @__PURE__ */
|
|
980
|
-
/* @__PURE__ */
|
|
981
|
-
/* @__PURE__ */
|
|
982
|
-
|
|
983
|
-
const a =
|
|
984
|
-
return /* @__PURE__ */
|
|
985
|
-
|
|
951
|
+
/* @__PURE__ */ l(wr, { ownerState: { customPanel: H }, children: [
|
|
952
|
+
/* @__PURE__ */ l(vr, { ownerState: { customPanel: H }, children: [
|
|
953
|
+
/* @__PURE__ */ l(yr, { children: [
|
|
954
|
+
b.map((t) => {
|
|
955
|
+
const a = Oe === t.id;
|
|
956
|
+
return /* @__PURE__ */ l(
|
|
957
|
+
lt,
|
|
986
958
|
{
|
|
987
959
|
type: "button",
|
|
988
960
|
disabled: t.disabled,
|
|
989
|
-
onClick: () =>
|
|
961
|
+
onClick: () => xt(t),
|
|
990
962
|
ownerState: { md: O === "md", selected: a, presetDisabled: !!t.disabled },
|
|
991
963
|
children: [
|
|
992
964
|
/* @__PURE__ */ r("span", { children: t.label }),
|
|
993
|
-
a && /* @__PURE__ */ r(
|
|
965
|
+
a && /* @__PURE__ */ r(Qe, { size: 14, weight: "bold" })
|
|
994
966
|
]
|
|
995
967
|
},
|
|
996
968
|
t.id
|
|
997
969
|
);
|
|
998
970
|
}),
|
|
999
|
-
/* @__PURE__ */
|
|
1000
|
-
|
|
971
|
+
/* @__PURE__ */ l(
|
|
972
|
+
lt,
|
|
1001
973
|
{
|
|
1002
974
|
type: "button",
|
|
1003
|
-
onClick:
|
|
1004
|
-
ownerState: { md: O === "md", selected:
|
|
975
|
+
onClick: Rt,
|
|
976
|
+
ownerState: { md: O === "md", selected: H, presetDisabled: !1 },
|
|
1005
977
|
children: [
|
|
1006
978
|
/* @__PURE__ */ r("span", { children: Te }),
|
|
1007
|
-
|
|
979
|
+
H && /* @__PURE__ */ r(Qe, { size: 14, weight: "bold" })
|
|
1008
980
|
]
|
|
1009
981
|
}
|
|
1010
982
|
)
|
|
1011
983
|
] }),
|
|
1012
|
-
|
|
1013
|
-
/* @__PURE__ */ r(
|
|
1014
|
-
/* @__PURE__ */ r("span", { children:
|
|
984
|
+
Xe && H && /* @__PURE__ */ l(xr, { className: M, children: [
|
|
985
|
+
/* @__PURE__ */ r(Rr, { children: /* @__PURE__ */ r(Yt, {}) }),
|
|
986
|
+
/* @__PURE__ */ r("span", { children: Xe })
|
|
1015
987
|
] })
|
|
1016
988
|
] }),
|
|
1017
|
-
|
|
1018
|
-
!
|
|
1019
|
-
/* @__PURE__ */ r(
|
|
989
|
+
H && /* @__PURE__ */ l(kr, { children: [
|
|
990
|
+
!W && !B && !k && /* @__PURE__ */ r(Pr, { children: /* @__PURE__ */ l(Dr, { style: Et, children: [
|
|
991
|
+
/* @__PURE__ */ r(Cr, { children: "Please select the year you want to view data for" }),
|
|
1020
992
|
/* @__PURE__ */ r(
|
|
1021
|
-
|
|
993
|
+
Sr,
|
|
1022
994
|
{
|
|
1023
995
|
size: "sm",
|
|
1024
996
|
value: ze,
|
|
1025
|
-
onValueChange:
|
|
1026
|
-
options:
|
|
997
|
+
onValueChange: yt,
|
|
998
|
+
options: V ? rt.filter((t) => t.value === xe) : rt
|
|
1027
999
|
}
|
|
1028
1000
|
)
|
|
1029
1001
|
] }) }),
|
|
1030
|
-
/* @__PURE__ */
|
|
1002
|
+
/* @__PURE__ */ l(Ar, { ownerState: { two: J === 2 }, children: [
|
|
1031
1003
|
/* @__PURE__ */ r(
|
|
1032
|
-
|
|
1004
|
+
it,
|
|
1033
1005
|
{
|
|
1034
|
-
year:
|
|
1035
|
-
month:
|
|
1036
|
-
from:
|
|
1037
|
-
to:
|
|
1006
|
+
year: U.year,
|
|
1007
|
+
month: U.month,
|
|
1008
|
+
from: g.from,
|
|
1009
|
+
to: g.to,
|
|
1038
1010
|
hovered: Ve,
|
|
1039
|
-
awaitingTo:
|
|
1011
|
+
awaitingTo: ie,
|
|
1040
1012
|
isDateDisabled: Fe,
|
|
1041
|
-
onSelectDate:
|
|
1042
|
-
onHoverDate:
|
|
1043
|
-
onPrev: () =>
|
|
1044
|
-
onNext: () =>
|
|
1045
|
-
onNavigateTo: (t, a) =>
|
|
1046
|
-
minMonth:
|
|
1047
|
-
maxMonth:
|
|
1048
|
-
showPrev:
|
|
1049
|
-
showNext:
|
|
1050
|
-
className:
|
|
1013
|
+
onSelectDate: Ue,
|
|
1014
|
+
onHoverDate: ae,
|
|
1015
|
+
onPrev: () => X((t) => S(t.year, t.month, -1)),
|
|
1016
|
+
onNext: () => X((t) => S(t.year, t.month, 1)),
|
|
1017
|
+
onNavigateTo: (t, a) => X({ year: t, month: a }),
|
|
1018
|
+
minMonth: de,
|
|
1019
|
+
maxMonth: ut,
|
|
1020
|
+
showPrev: At,
|
|
1021
|
+
showNext: J !== 2 && qe,
|
|
1022
|
+
className: u
|
|
1051
1023
|
}
|
|
1052
1024
|
),
|
|
1053
|
-
|
|
1054
|
-
|
|
1025
|
+
J === 2 && /* @__PURE__ */ r(
|
|
1026
|
+
it,
|
|
1055
1027
|
{
|
|
1056
|
-
year:
|
|
1057
|
-
month:
|
|
1058
|
-
from:
|
|
1059
|
-
to:
|
|
1028
|
+
year: le.year,
|
|
1029
|
+
month: le.month,
|
|
1030
|
+
from: g.from,
|
|
1031
|
+
to: g.to,
|
|
1060
1032
|
hovered: Ve,
|
|
1061
|
-
awaitingTo:
|
|
1033
|
+
awaitingTo: ie,
|
|
1062
1034
|
isDateDisabled: Fe,
|
|
1063
|
-
onSelectDate:
|
|
1064
|
-
onHoverDate:
|
|
1065
|
-
onPrev: () =>
|
|
1066
|
-
onNext: () =>
|
|
1067
|
-
onNavigateTo: (t, a) =>
|
|
1068
|
-
minMonth:
|
|
1069
|
-
maxMonth:
|
|
1035
|
+
onSelectDate: Ue,
|
|
1036
|
+
onHoverDate: ae,
|
|
1037
|
+
onPrev: () => q((t) => S(t.year, t.month, -1)),
|
|
1038
|
+
onNext: () => q((t) => S(t.year, t.month, 1)),
|
|
1039
|
+
onNavigateTo: (t, a) => q({ year: t, month: a }),
|
|
1040
|
+
minMonth: wt,
|
|
1041
|
+
maxMonth: E,
|
|
1070
1042
|
showPrev: !1,
|
|
1071
|
-
showNext:
|
|
1072
|
-
className:
|
|
1043
|
+
showNext: qe,
|
|
1044
|
+
className: u
|
|
1073
1045
|
}
|
|
1074
1046
|
)
|
|
1075
1047
|
] })
|
|
1076
1048
|
] })
|
|
1077
1049
|
] }),
|
|
1078
|
-
|
|
1079
|
-
/* @__PURE__ */
|
|
1080
|
-
/* @__PURE__ */
|
|
1081
|
-
/* @__PURE__ */ r(
|
|
1050
|
+
H && /* @__PURE__ */ r(Tr, { children: /* @__PURE__ */ l(Mr, { children: [
|
|
1051
|
+
/* @__PURE__ */ l(Br, { children: [
|
|
1052
|
+
/* @__PURE__ */ l(zr, { children: [
|
|
1053
|
+
/* @__PURE__ */ r(Lr, { children: "Selected:" }),
|
|
1082
1054
|
" ",
|
|
1083
|
-
/* @__PURE__ */ r(
|
|
1084
|
-
!
|
|
1055
|
+
/* @__PURE__ */ r(st, { children: g.from ? T(g.from) : "--/--/----" }),
|
|
1056
|
+
!k && /* @__PURE__ */ l(ct, { children: [
|
|
1085
1057
|
" ",
|
|
1086
|
-
/* @__PURE__ */ r(
|
|
1058
|
+
/* @__PURE__ */ r(Fr, { children: "To" }),
|
|
1087
1059
|
" ",
|
|
1088
|
-
/* @__PURE__ */ r(
|
|
1060
|
+
/* @__PURE__ */ r(st, { children: g.to ? T(g.to) : "--/--/----" })
|
|
1089
1061
|
] })
|
|
1090
1062
|
] }),
|
|
1091
|
-
|
|
1063
|
+
ie && !k && /* @__PURE__ */ r(Ir, { children: "Date range incomplete. Select both Start and End dates." })
|
|
1092
1064
|
] }),
|
|
1093
|
-
/* @__PURE__ */
|
|
1094
|
-
Ce && /* @__PURE__ */ r(
|
|
1095
|
-
/* @__PURE__ */ r(
|
|
1096
|
-
/* @__PURE__ */ r(
|
|
1065
|
+
/* @__PURE__ */ l(Wr, { children: [
|
|
1066
|
+
Ce && /* @__PURE__ */ r(We, { variant: "ghost", size: "sm", leftIcon: /* @__PURE__ */ r(Ft, { size: 13, weight: "bold" }), onClick: Dt, children: oe }),
|
|
1067
|
+
/* @__PURE__ */ r(We, { variant: "outline", size: "sm", onClick: Pt, children: be }),
|
|
1068
|
+
/* @__PURE__ */ r(We, { size: "sm", disabled: !St, onClick: kt, children: Me })
|
|
1097
1069
|
] })
|
|
1098
1070
|
] }) })
|
|
1099
1071
|
]
|
|
1100
1072
|
}
|
|
1101
1073
|
) }) })
|
|
1102
1074
|
] }),
|
|
1103
|
-
he && /* @__PURE__ */ r(
|
|
1075
|
+
he && /* @__PURE__ */ r(Yr, { children: he })
|
|
1104
1076
|
] });
|
|
1105
1077
|
}
|
|
1106
1078
|
export {
|
|
1107
|
-
|
|
1079
|
+
ro as DateRangePicker
|
|
1108
1080
|
};
|
|
1109
1081
|
//# sourceMappingURL=DateRangePicker.js.map
|