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