impact-nova 2.5.8 → 2.5.10
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/data-table/column-runtime-state-guard.js +42 -42
- package/dist/components/data/data-table/data-table-column-tree-cache.d.ts +15 -0
- package/dist/components/data/data-table/data-table-column-tree-cache.js +109 -80
- package/dist/components/data/data-table/use-data-table-column-list-sync.js +65 -62
- package/dist/components/data/expandable-list-item/expandable-list-item-attributes.js +2 -3
- package/dist/components/data/expandable-list-item/expandable-list-item-metrics.js +2 -3
- package/dist/components/data-display/calendar/calendar-day-picker-classnames.d.ts +6 -1
- package/dist/components/data-display/calendar/calendar-day-picker-classnames.js +31 -23
- package/dist/components/data-display/calendar/calendar-day-picker-components.d.ts +2 -1
- package/dist/components/data-display/calendar/calendar-day-picker-components.js +197 -164
- package/dist/components/data-display/calendar/calendar-day-picker-view.d.ts +3 -2
- package/dist/components/data-display/calendar/calendar-day-picker-view.js +130 -129
- package/dist/components/data-display/calendar/calendar-fiscal-labels.js +6 -6
- package/dist/components/data-display/calendar/calendar-fiscal-period-nav.d.ts +16 -0
- package/dist/components/data-display/calendar/calendar-fiscal-period-nav.js +41 -0
- package/dist/components/data-display/calendar/calendar-padding-week.utils.d.ts +5 -1
- package/dist/components/data-display/calendar/calendar-padding-week.utils.js +20 -16
- package/dist/components/data-display/calendar/calendar-week-number-cell.d.ts +2 -1
- package/dist/components/data-display/calendar/calendar-week-number-cell.js +43 -42
- package/dist/components/data-display/calendar/calendar-week-utils.d.ts +6 -0
- package/dist/components/data-display/calendar/calendar-week-utils.js +51 -47
- package/dist/components/data-display/calendar/calendar.js +102 -100
- package/dist/components/data-display/calendar/calendar.types.d.ts +2 -0
- package/dist/components/data-display/calendar/use-calendar-day-picker-config.d.ts +4 -2
- package/dist/components/data-display/calendar/use-calendar-day-picker-config.js +77 -72
- package/dist/components/data-display/calendar/use-fiscal-calendar.js +16 -15
- package/dist/components/feedback/dialog/dialog.js +12 -12
- package/dist/components/feedback/sheet/sheet.js +22 -22
- package/dist/components/feedback/tooltip/tab-tooltip-render.js +2 -3
- package/dist/components/flows/command-palette/shortcut-settings.js +10 -10
- package/dist/components/flows/filter-panel/filter-panel.js +4 -4
- package/dist/components/forms/date-picker/calendar-selection-adapters.d.ts +2 -0
- package/dist/components/forms/date-picker/calendar-selection-adapters.js +36 -31
- package/dist/components/forms/date-picker/date-input-behavior.d.ts +10 -0
- package/dist/components/forms/date-picker/date-input-behavior.js +111 -90
- package/dist/components/forms/date-picker/date-picker.js +71 -69
- package/dist/components/forms/date-picker/date-picker.types.d.ts +2 -0
- package/dist/components/forms/date-picker/date-range-picker.js +146 -144
- package/dist/components/forms/date-picker/fiscal-pass-through.d.ts +1 -0
- package/dist/components/forms/date-picker/fiscal-pass-through.js +1 -0
- package/dist/components/forms/date-picker/month-picker.js +82 -80
- package/dist/components/forms/date-picker/month-range-picker.js +145 -143
- package/dist/components/forms/date-picker/multi-date-picker.js +51 -49
- package/dist/components/forms/date-picker/multi-month-picker.js +49 -47
- package/dist/components/forms/date-picker/multi-quarter-picker.js +46 -44
- package/dist/components/forms/date-picker/multi-week-picker.js +53 -51
- package/dist/components/forms/date-picker/multi-year-picker.js +48 -46
- package/dist/components/forms/date-picker/picker-story-layout.d.ts +2 -0
- package/dist/components/forms/date-picker/quarter-picker.js +46 -44
- package/dist/components/forms/date-picker/quarter-range-picker.js +45 -43
- package/dist/components/forms/date-picker/week-picker.js +82 -80
- package/dist/components/forms/date-picker/week-range-picker.js +169 -164
- package/dist/components/forms/date-picker/year-picker.js +47 -45
- package/dist/components/forms/date-picker/year-range-picker.js +47 -45
- package/dist/components/forms/select/components/SelectMenuPanel.js +3 -2
- package/dist/components/forms/select/components/SelectTriggerValue.js +2 -3
- package/dist/components/forms/select/components/Submenu.js +2 -3
- package/dist/components/forms/select/select.js +1 -0
- package/dist/components/forms/smart-input/smart-input.js +106 -85
- package/dist/components/forms/smart-input/smart-input.types.d.ts +5 -0
- package/dist/components/forms/textarea/textarea.js +29 -28
- package/dist/components/forms/textarea/textarea.types.d.ts +1 -0
- package/dist/form-react/Fields/TextField.js +25 -24
- package/dist/form-react/Fields/WeekRangePicker.js +47 -48
- package/dist/form-react/types/fields.types.d.ts +8 -0
- package/dist/impact-nova.css +1 -1
- package/dist/lib/fiscal-calendar/civil-date.js +18 -18
- package/dist/lib/overlay/overlay-portal-context.js +16 -16
- package/dist/llms/rules/best-practices.js +1 -1
- package/dist/llms/rules/installation.js +1 -1
- package/dist/llms/rules/real-world-patterns.js +1 -1
- package/dist/llms/rules/requirements.js +1 -1
- package/package.json +1 -1
|
@@ -1,262 +1,295 @@
|
|
|
1
|
-
import { jsx as i, jsxs as
|
|
2
|
-
import * as
|
|
3
|
-
import { useDayPicker as
|
|
4
|
-
import { ChevronRight as
|
|
5
|
-
import { cn as
|
|
6
|
-
import { Button as
|
|
7
|
-
import { Select as
|
|
8
|
-
import { CalendarCaptionHeader as
|
|
9
|
-
import { CalendarDayButton as
|
|
10
|
-
import { PanelIndexContext as
|
|
11
|
-
import { CalendarWeekNumberCell as
|
|
12
|
-
import { paneCivilMonthIndex as
|
|
13
|
-
import {
|
|
14
|
-
import {
|
|
15
|
-
import { getAvailableMonths as
|
|
16
|
-
import { isCalendarPaddingWeek as
|
|
17
|
-
import { fiscalPeriodForWeek as
|
|
18
|
-
import { FiscalPeriodCaptionSelect as
|
|
19
|
-
function
|
|
20
|
-
if (
|
|
1
|
+
import { jsx as i, jsxs as q } from "react/jsx-runtime";
|
|
2
|
+
import * as v from "react";
|
|
3
|
+
import { useDayPicker as le } from "react-day-picker";
|
|
4
|
+
import { ChevronRight as J } from "impact-nova-icons";
|
|
5
|
+
import { cn as y } from "../../../lib/utils.js";
|
|
6
|
+
import { Button as M } from "../../primitives/button/button.js";
|
|
7
|
+
import { Select as Q } from "../../forms/select/select.js";
|
|
8
|
+
import { CalendarCaptionHeader as ce } from "./calendar-caption-header.js";
|
|
9
|
+
import { CalendarDayButton as de } from "./calendar-day-button.js";
|
|
10
|
+
import { PanelIndexContext as P } from "./calendar-panel-context.js";
|
|
11
|
+
import { CalendarWeekNumberCell as me } from "./calendar-week-number-cell.js";
|
|
12
|
+
import { paneCivilMonthIndex as fe } from "./calendar-week-number-header.js";
|
|
13
|
+
import { buildFiscalYear as ue } from "../../../lib/fiscal-calendar/build-year.js";
|
|
14
|
+
import { civilMonthAtOffset as N, midMonthDate as F, visibleMonthForPeriod as U, periodForCivilMonth as X } from "./calendar-fiscal-period-nav.js";
|
|
15
|
+
import { getAvailableMonths as pe } from "./calendar-month-utils.js";
|
|
16
|
+
import { isCalendarPaddingWeek as Z, weekHasInMonthSelection as he, weekIntervalContinues as ve } from "./calendar-padding-week.utils.js";
|
|
17
|
+
import { isForeignFiscalWeekRow as $, fiscalPeriodForWeek as L } from "./calendar-week-utils.js";
|
|
18
|
+
import { FiscalPeriodCaptionSelect as xe } from "./fiscal-period-caption-select.js";
|
|
19
|
+
function I(D, h, d) {
|
|
20
|
+
if (h != null && D)
|
|
21
21
|
try {
|
|
22
|
-
return
|
|
22
|
+
return ue(D, h).periods;
|
|
23
23
|
} catch {
|
|
24
24
|
}
|
|
25
|
-
return
|
|
25
|
+
return d ?? [];
|
|
26
26
|
}
|
|
27
|
-
function
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
weekMode: O = "single",
|
|
57
|
-
components: T
|
|
27
|
+
function ze({
|
|
28
|
+
buttonVariant: D,
|
|
29
|
+
pickerType: h,
|
|
30
|
+
calendarKind: d,
|
|
31
|
+
currentMonth: x,
|
|
32
|
+
monthsFull: g,
|
|
33
|
+
monthsShort: T,
|
|
34
|
+
resolvedStartMonth: V,
|
|
35
|
+
resolvedEndMonth: K,
|
|
36
|
+
availableYears: C,
|
|
37
|
+
fiscalPeriods: S,
|
|
38
|
+
fiscalConfig: W,
|
|
39
|
+
weekStartsOn: ee,
|
|
40
|
+
previousMonthLabel: A,
|
|
41
|
+
nextMonthLabel: Y,
|
|
42
|
+
monthPlaceholder: j,
|
|
43
|
+
yearPlaceholder: te,
|
|
44
|
+
weekNumberLabel: oe,
|
|
45
|
+
weekNumberHeader: O,
|
|
46
|
+
weekLabel: ne,
|
|
47
|
+
fiscalWeekNumberLabel: re,
|
|
48
|
+
fiscalWeekAriaLabel: ie,
|
|
49
|
+
getCellMeta: c,
|
|
50
|
+
onMonthChange: k,
|
|
51
|
+
onWeekSelect: R,
|
|
52
|
+
periodRowHover: z = !1,
|
|
53
|
+
weekMode: B = "single",
|
|
54
|
+
showPeriodBoundaries: se = !1,
|
|
55
|
+
components: ae
|
|
58
56
|
}) {
|
|
57
|
+
function _(e) {
|
|
58
|
+
if (d !== "fiscal") return;
|
|
59
|
+
const t = N(x, e);
|
|
60
|
+
return X(
|
|
61
|
+
I(
|
|
62
|
+
W,
|
|
63
|
+
c?.(F(t))?.fy ?? c?.(t)?.fy,
|
|
64
|
+
S
|
|
65
|
+
),
|
|
66
|
+
t.getFullYear(),
|
|
67
|
+
t.getMonth()
|
|
68
|
+
)?.period;
|
|
69
|
+
}
|
|
59
70
|
return {
|
|
60
|
-
Root: ({ className: e, rootRef:
|
|
61
|
-
Chevron: ({ className: e, orientation:
|
|
62
|
-
|
|
71
|
+
Root: ({ className: e, rootRef: t, ...o }) => /* @__PURE__ */ i("div", { "data-slot": "calendar", ref: t, className: y(e), ...o }),
|
|
72
|
+
Chevron: ({ className: e, orientation: t, ...o }) => t === "left" ? /* @__PURE__ */ i(
|
|
73
|
+
J,
|
|
63
74
|
{
|
|
64
75
|
size: 16,
|
|
65
|
-
className:
|
|
66
|
-
...
|
|
76
|
+
className: y("rotate-180 text-content", e),
|
|
77
|
+
...o
|
|
67
78
|
}
|
|
68
|
-
) :
|
|
79
|
+
) : t === "right" ? /* @__PURE__ */ i(J, { size: 16, className: y("text-content", e), ...o }) : /* @__PURE__ */ i("span", {}),
|
|
69
80
|
PreviousMonthButton: (e) => /* @__PURE__ */ i(
|
|
70
|
-
|
|
81
|
+
M,
|
|
71
82
|
{
|
|
72
|
-
variant:
|
|
83
|
+
variant: D,
|
|
73
84
|
size: "icon",
|
|
74
85
|
className: "h-7 w-7",
|
|
75
|
-
"aria-label":
|
|
76
|
-
title:
|
|
86
|
+
"aria-label": A,
|
|
87
|
+
title: A,
|
|
77
88
|
...e
|
|
78
89
|
}
|
|
79
90
|
),
|
|
80
91
|
NextMonthButton: (e) => /* @__PURE__ */ i(
|
|
81
|
-
|
|
92
|
+
M,
|
|
82
93
|
{
|
|
83
|
-
variant:
|
|
94
|
+
variant: D,
|
|
84
95
|
size: "icon",
|
|
85
96
|
className: "h-7 w-7",
|
|
86
|
-
"aria-label":
|
|
87
|
-
title:
|
|
97
|
+
"aria-label": Y,
|
|
98
|
+
title: Y,
|
|
88
99
|
...e
|
|
89
100
|
}
|
|
90
101
|
),
|
|
91
|
-
MonthCaption: ({ displayIndex: e, calendarMonth:
|
|
92
|
-
Month: ({ calendarMonth: e, displayIndex:
|
|
93
|
-
const
|
|
94
|
-
return /* @__PURE__ */ i(
|
|
95
|
-
|
|
96
|
-
|
|
102
|
+
MonthCaption: ({ displayIndex: e, calendarMonth: t, ...o }) => /* @__PURE__ */ i("div", { ...o }),
|
|
103
|
+
Month: ({ calendarMonth: e, displayIndex: t, className: o, children: r, ...s }) => {
|
|
104
|
+
const l = v.Children.toArray(r), f = l[l.length - 1], a = l.slice(0, -1);
|
|
105
|
+
return /* @__PURE__ */ i(P.Provider, { value: t, children: /* @__PURE__ */ q("div", { className: y(o), ...s, children: [
|
|
106
|
+
a.length > 0 ? /* @__PURE__ */ i(ce, { children: a }) : null,
|
|
107
|
+
f
|
|
97
108
|
] }) });
|
|
98
109
|
},
|
|
99
|
-
Months: ({ className: e, children:
|
|
110
|
+
Months: ({ className: e, children: t, ...o }) => /* @__PURE__ */ i(
|
|
100
111
|
"div",
|
|
101
112
|
{
|
|
102
113
|
"data-slot": "day-months",
|
|
103
|
-
"data-period-row-hover":
|
|
104
|
-
"data-week-gutter-track":
|
|
105
|
-
className:
|
|
106
|
-
...
|
|
107
|
-
children:
|
|
114
|
+
"data-period-row-hover": z ? "true" : void 0,
|
|
115
|
+
"data-week-gutter-track": h === "week" ? "true" : void 0,
|
|
116
|
+
className: y(e),
|
|
117
|
+
...o,
|
|
118
|
+
children: t
|
|
108
119
|
}
|
|
109
120
|
),
|
|
110
|
-
DropdownNav: ({ children: e, className:
|
|
111
|
-
if (
|
|
112
|
-
return /* @__PURE__ */ i("div", { className:
|
|
113
|
-
const
|
|
114
|
-
const
|
|
115
|
-
return !
|
|
121
|
+
DropdownNav: ({ children: e, className: t, ...o }) => {
|
|
122
|
+
if (d !== "fiscal")
|
|
123
|
+
return /* @__PURE__ */ i("div", { className: t, ...o, children: e });
|
|
124
|
+
const r = v.Children.toArray(e), s = (n) => v.isValidElement(n) && n.key != null ? String(n.key) : "", l = r.find((n) => s(n).endsWith("year")), f = r.find((n) => s(n).endsWith("month")), a = r.filter((n) => {
|
|
125
|
+
const m = s(n);
|
|
126
|
+
return !m.endsWith("year") && !m.endsWith("month");
|
|
116
127
|
});
|
|
117
|
-
return /* @__PURE__ */
|
|
118
|
-
d,
|
|
128
|
+
return /* @__PURE__ */ q("div", { className: t, ...o, children: [
|
|
119
129
|
l,
|
|
120
|
-
|
|
130
|
+
f,
|
|
131
|
+
a
|
|
121
132
|
] });
|
|
122
133
|
},
|
|
123
134
|
MonthsDropdown: ({ value: e }) => {
|
|
124
|
-
const
|
|
125
|
-
if (
|
|
126
|
-
const
|
|
135
|
+
const t = v.useContext(P), o = t > 0, r = N(x, t), s = r.getFullYear();
|
|
136
|
+
if (d === "fiscal" && W) {
|
|
137
|
+
const a = c?.(F(r)) ?? c?.(r), n = I(W, a?.fy, S), m = X(
|
|
138
|
+
n,
|
|
139
|
+
r.getFullYear(),
|
|
140
|
+
r.getMonth()
|
|
141
|
+
);
|
|
127
142
|
return /* @__PURE__ */ i(
|
|
128
|
-
|
|
143
|
+
xe,
|
|
129
144
|
{
|
|
130
145
|
periods: n,
|
|
131
|
-
selectedPeriod:
|
|
132
|
-
placeholder:
|
|
133
|
-
onPeriodChange: (
|
|
134
|
-
|
|
146
|
+
selectedPeriod: m,
|
|
147
|
+
placeholder: j,
|
|
148
|
+
onPeriodChange: (u) => {
|
|
149
|
+
k(U(u, o));
|
|
135
150
|
}
|
|
136
151
|
}
|
|
137
152
|
);
|
|
138
153
|
}
|
|
139
|
-
const
|
|
154
|
+
const f = pe(
|
|
140
155
|
s,
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
156
|
+
g,
|
|
157
|
+
V,
|
|
158
|
+
K
|
|
144
159
|
);
|
|
145
160
|
return /* @__PURE__ */ i(
|
|
146
|
-
|
|
161
|
+
Q,
|
|
147
162
|
{
|
|
148
|
-
value:
|
|
149
|
-
onChange: (
|
|
150
|
-
if (
|
|
151
|
-
const n = parseInt(
|
|
152
|
-
|
|
163
|
+
value: f.find((a) => a.value === e?.toString()),
|
|
164
|
+
onChange: (a) => {
|
|
165
|
+
if (a && "value" in a) {
|
|
166
|
+
const n = parseInt(a.value);
|
|
167
|
+
k(o ? new Date(s, n - 1, 1) : new Date(s, n, 1));
|
|
153
168
|
}
|
|
154
169
|
},
|
|
155
170
|
scrollToSelectedOnOpen: !0,
|
|
156
|
-
options:
|
|
171
|
+
options: f,
|
|
157
172
|
className: "w-[116px] shrink-0",
|
|
158
173
|
menuWidth: "160px",
|
|
159
174
|
isSearchable: !0,
|
|
160
175
|
isClearable: !1,
|
|
161
|
-
placeholder:
|
|
176
|
+
placeholder: j
|
|
162
177
|
}
|
|
163
178
|
);
|
|
164
179
|
},
|
|
165
180
|
YearsDropdown: ({ value: e }) => {
|
|
166
|
-
const
|
|
181
|
+
const t = v.useContext(P), o = t > 0, r = d === "fiscal" && W, s = N(x, t), l = r ? c?.(F(s)) ?? c?.(s) : void 0, f = r && l?.fy != null ? String(l.fy) : e?.toString();
|
|
167
182
|
return /* @__PURE__ */ i(
|
|
168
|
-
|
|
183
|
+
Q,
|
|
169
184
|
{
|
|
170
|
-
value:
|
|
185
|
+
value: C.find((n) => n.value === f),
|
|
171
186
|
onChange: (n) => {
|
|
172
187
|
if (n && "value" in n) {
|
|
173
|
-
const
|
|
174
|
-
if (
|
|
175
|
-
const
|
|
176
|
-
|
|
188
|
+
const m = parseInt(n.value);
|
|
189
|
+
if (r) {
|
|
190
|
+
const u = I(W, m, S), p = u.find((b) => b.period === l?.fiscalPeriod) ?? u[0];
|
|
191
|
+
p && k(U(p, o));
|
|
177
192
|
return;
|
|
178
193
|
}
|
|
179
|
-
if (
|
|
180
|
-
const
|
|
181
|
-
|
|
182
|
-
|
|
194
|
+
if (o) {
|
|
195
|
+
const u = new Date(
|
|
196
|
+
x.getFullYear(),
|
|
197
|
+
x.getMonth() + 1,
|
|
183
198
|
1
|
|
184
199
|
).getMonth();
|
|
185
|
-
|
|
200
|
+
k(new Date(m, u - 1, 1));
|
|
186
201
|
} else
|
|
187
|
-
|
|
202
|
+
k(new Date(m, x.getMonth(), 1));
|
|
188
203
|
}
|
|
189
204
|
},
|
|
190
205
|
scrollToSelectedOnOpen: !0,
|
|
191
|
-
options:
|
|
206
|
+
options: C,
|
|
192
207
|
className: "w-[116px] shrink-0",
|
|
193
208
|
menuWidth: "140px",
|
|
194
209
|
isSearchable: !0,
|
|
195
210
|
isClearable: !1,
|
|
196
|
-
placeholder:
|
|
211
|
+
placeholder: te
|
|
197
212
|
}
|
|
198
213
|
);
|
|
199
214
|
},
|
|
200
215
|
DayButton: (e) => /* @__PURE__ */ i(
|
|
201
|
-
|
|
216
|
+
de,
|
|
202
217
|
{
|
|
203
218
|
...e,
|
|
204
|
-
pickerType:
|
|
219
|
+
pickerType: h,
|
|
205
220
|
modifiers: {
|
|
206
221
|
...e.modifiers,
|
|
207
|
-
|
|
208
|
-
|
|
222
|
+
...se ? {
|
|
223
|
+
fiscal_period_start: !!c?.(e.day.date)?.isPeriodStart,
|
|
224
|
+
fiscal_period_end: !!c?.(e.day.date)?.isPeriodEnd
|
|
225
|
+
} : {}
|
|
209
226
|
}
|
|
210
227
|
}
|
|
211
228
|
),
|
|
212
|
-
Week: ({ week: e, className:
|
|
213
|
-
const { isSelected:
|
|
229
|
+
Week: ({ week: e, className: t, children: o, onClick: r, ...s }) => {
|
|
230
|
+
const { isSelected: l } = le(), f = v.useContext(P), a = Z(e), n = h === "week", m = L(e, c), u = _(f), p = a || $({
|
|
231
|
+
calendarKind: d,
|
|
232
|
+
weekPeriod: m,
|
|
233
|
+
panePeriod: u
|
|
234
|
+
}), b = z && !p ? m : void 0, E = !p && he(e, l), G = h === "week" && B !== "multiple" && B !== "multi-range" && E ? ve(e, l, {
|
|
235
|
+
joinAdjacentWeek: d === "fiscal",
|
|
236
|
+
panePeriod: u,
|
|
237
|
+
periodForDate: (w) => c?.(w)?.fiscalPeriod
|
|
238
|
+
}) : { prev: !1, next: !1 };
|
|
214
239
|
return /* @__PURE__ */ i(
|
|
215
240
|
"tr",
|
|
216
241
|
{
|
|
217
|
-
className:
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
242
|
+
className: y(
|
|
243
|
+
t,
|
|
244
|
+
p && "invisible order-last",
|
|
245
|
+
n && !p && "cursor-pointer"
|
|
221
246
|
),
|
|
222
247
|
...s,
|
|
223
|
-
"aria-hidden":
|
|
224
|
-
"data-fiscal-period":
|
|
225
|
-
"data-week-selected":
|
|
226
|
-
"data-week-continues-next":
|
|
227
|
-
"data-week-continues-prev":
|
|
228
|
-
onClick:
|
|
229
|
-
if (
|
|
230
|
-
const
|
|
231
|
-
|
|
232
|
-
} :
|
|
233
|
-
children:
|
|
248
|
+
"aria-hidden": p || void 0,
|
|
249
|
+
"data-fiscal-period": b,
|
|
250
|
+
"data-week-selected": E ? !0 : void 0,
|
|
251
|
+
"data-week-continues-next": G.next || void 0,
|
|
252
|
+
"data-week-continues-prev": G.prev || void 0,
|
|
253
|
+
onClick: n && !p ? (w) => {
|
|
254
|
+
if (r?.(w), w.defaultPrevented) return;
|
|
255
|
+
const H = w.target;
|
|
256
|
+
H.closest("button") || H.closest("[data-week-number]") || R(e);
|
|
257
|
+
} : r,
|
|
258
|
+
children: o
|
|
259
|
+
}
|
|
260
|
+
);
|
|
261
|
+
},
|
|
262
|
+
WeekNumber: ({ week: e, ...t }) => {
|
|
263
|
+
const o = v.useContext(P), r = Z(e) || $({
|
|
264
|
+
calendarKind: d,
|
|
265
|
+
weekPeriod: L(e, c),
|
|
266
|
+
panePeriod: _(o)
|
|
267
|
+
});
|
|
268
|
+
return /* @__PURE__ */ i(
|
|
269
|
+
me,
|
|
270
|
+
{
|
|
271
|
+
week: e,
|
|
272
|
+
weekStartsOn: ee,
|
|
273
|
+
pickerType: h,
|
|
274
|
+
calendarKind: d,
|
|
275
|
+
weekNumberLabel: oe,
|
|
276
|
+
weekLabel: ne,
|
|
277
|
+
fiscalWeekNumberLabel: re,
|
|
278
|
+
fiscalWeekAriaLabel: ie,
|
|
279
|
+
getCellMeta: c,
|
|
280
|
+
onWeekSelect: R,
|
|
281
|
+
...t,
|
|
282
|
+
blank: r
|
|
234
283
|
}
|
|
235
284
|
);
|
|
236
285
|
},
|
|
237
|
-
WeekNumber: ({ week: e, ...r }) => /* @__PURE__ */ i(
|
|
238
|
-
te,
|
|
239
|
-
{
|
|
240
|
-
week: e,
|
|
241
|
-
weekStartsOn: Q,
|
|
242
|
-
pickerType: m,
|
|
243
|
-
calendarKind: h,
|
|
244
|
-
weekNumberLabel: X,
|
|
245
|
-
weekLabel: Z,
|
|
246
|
-
fiscalWeekNumberLabel: $,
|
|
247
|
-
fiscalWeekAriaLabel: L,
|
|
248
|
-
getCellMeta: x,
|
|
249
|
-
onWeekSelect: Y,
|
|
250
|
-
...r
|
|
251
|
-
}
|
|
252
|
-
),
|
|
253
286
|
WeekNumberHeader: (e) => {
|
|
254
|
-
const
|
|
255
|
-
return /* @__PURE__ */ i("th", { ...e, "aria-label": s, children:
|
|
287
|
+
const t = v.useContext(P), o = fe(d, x, t), r = o === void 0 ? O : T[o], s = o === void 0 ? O : g[o];
|
|
288
|
+
return /* @__PURE__ */ i("th", { ...e, "aria-label": s, children: r });
|
|
256
289
|
},
|
|
257
|
-
...
|
|
290
|
+
...ae
|
|
258
291
|
};
|
|
259
292
|
}
|
|
260
293
|
export {
|
|
261
|
-
|
|
294
|
+
ze as buildCalendarDayPickerComponents
|
|
262
295
|
};
|
|
@@ -6,7 +6,7 @@ import { CalendarProps } from './calendar.types';
|
|
|
6
6
|
import { WeekPickerInput } from './calendar-week-utils';
|
|
7
7
|
import * as React from "react";
|
|
8
8
|
type DayPickerProps = React.ComponentProps<typeof DayPicker>;
|
|
9
|
-
export interface CalendarDayPickerViewProps extends Omit<CalendarProps, "showFooter" | "disableApply" | "onApply" | "onCancel" | "onClear" | "pickerType" | "weekMode" | "selectedWeeks" | "onWeekSelect" | "monthMode" | "selectedMonths" | "onMonthSelect" | "defaultMonth" | "fiscalMode" | "fiscalMonthPattern" | "fiscalYearStartMonth" | "buttonVariant" | "components" | "classNames" | "formatters" | "captionLayout" | "showOutsideDays" | "fixedWeeks" | "calendarKind" | "fiscalConfig" | "granularity" | "showPresets" | "comparison" | "onComparisonChange" | "onSelectionChange" | "selectedQuarters" | "onQuarterSelect" | "selectedYear" | "onYearSelect" | "weekStartsOn" | "startMonth" | "endMonth" | "month" | "onMonthChange" | "selected" | "onSelect" | "mode"> {
|
|
9
|
+
export interface CalendarDayPickerViewProps extends Omit<CalendarProps, "showFooter" | "showPeriodBoundaries" | "disableApply" | "onApply" | "onCancel" | "onClear" | "pickerType" | "weekMode" | "selectedWeeks" | "onWeekSelect" | "monthMode" | "selectedMonths" | "onMonthSelect" | "defaultMonth" | "fiscalMode" | "fiscalMonthPattern" | "fiscalYearStartMonth" | "buttonVariant" | "components" | "classNames" | "formatters" | "captionLayout" | "showOutsideDays" | "fixedWeeks" | "calendarKind" | "fiscalConfig" | "granularity" | "showPresets" | "comparison" | "onComparisonChange" | "onSelectionChange" | "selectedQuarters" | "onQuarterSelect" | "selectedYear" | "onYearSelect" | "weekStartsOn" | "startMonth" | "endMonth" | "month" | "onMonthChange" | "selected" | "onSelect" | "mode"> {
|
|
10
10
|
pickerType: "date" | "week";
|
|
11
11
|
mode: NonNullable<CalendarProps["mode"]>;
|
|
12
12
|
weekMode: NonNullable<CalendarProps["weekMode"]>;
|
|
@@ -22,6 +22,7 @@ export interface CalendarDayPickerViewProps extends Omit<CalendarProps, "showFoo
|
|
|
22
22
|
components?: CalendarProps["components"];
|
|
23
23
|
selected?: Date | Date[] | DateRange;
|
|
24
24
|
showFooter: boolean;
|
|
25
|
+
showPeriodBoundaries: boolean;
|
|
25
26
|
pendingSelection?: Date | Date[] | DateRange;
|
|
26
27
|
selectedDaysFromWeeks?: Date[];
|
|
27
28
|
currentMonth: Date;
|
|
@@ -49,5 +50,5 @@ export interface CalendarDayPickerViewProps extends Omit<CalendarProps, "showFoo
|
|
|
49
50
|
getCellMeta?: (date: Date) => import('../../../lib/fiscal-calendar').DateCellMeta | undefined;
|
|
50
51
|
formatWeekNumber: (weekNumber: number) => string;
|
|
51
52
|
}
|
|
52
|
-
export declare function CalendarDayPickerView({ className, pickerType, mode, weekMode, calendarKind, granularity, showOutsideDays, fixedWeeks, captionLayout, buttonVariant, weekStartsOn, formatters, classNames, components, selected, showFooter, pendingSelection, selectedDaysFromWeeks, currentMonth, monthsFull, monthsShort, weekNumberHeader, resolvedStartMonth, resolvedEndMonth, availableYears, fiscalPeriods, fiscalConfig, dateFnsLocale, intlLocale, weekRangeModifiers, onSelect, onMonthChange, onWeekSelect, previousMonthLabel, nextMonthLabel, monthPlaceholder, yearPlaceholder, weekNumberLabel, weekLabel, fiscalWeekAriaLabel, getCellMeta, formatWeekNumber, disabled, ...props }: CalendarDayPickerViewProps): import("react/jsx-runtime").JSX.Element;
|
|
53
|
+
export declare function CalendarDayPickerView({ className, pickerType, mode, weekMode, calendarKind, granularity, showOutsideDays, fixedWeeks, captionLayout, buttonVariant, weekStartsOn, formatters, classNames, components, selected, showFooter, showPeriodBoundaries, pendingSelection, selectedDaysFromWeeks, currentMonth, monthsFull, monthsShort, weekNumberHeader, resolvedStartMonth, resolvedEndMonth, availableYears, fiscalPeriods, fiscalConfig, dateFnsLocale, intlLocale, weekRangeModifiers, onSelect, onMonthChange, onWeekSelect, previousMonthLabel, nextMonthLabel, monthPlaceholder, yearPlaceholder, weekNumberLabel, weekLabel, fiscalWeekAriaLabel, getCellMeta, formatWeekNumber, disabled, showWeekNumber, ...props }: CalendarDayPickerViewProps): import("react/jsx-runtime").JSX.Element;
|
|
53
54
|
export {};
|