impact-nova 2.2.2 → 2.2.4
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/ag-grid-react/headers/custom-header.js +133 -110
- package/dist/components/data/ag-grid-react/headers/header-search-input.js +23 -23
- package/dist/components/data/ag-grid-react/index.js +202 -206
- package/dist/components/data/data-table/build-column-tree-from-grid.js +65 -67
- package/dist/components/data/data-table/data-table-column-list-sync.js +5 -10
- package/dist/components/data/data-table/data-table-column-list.js +64 -61
- package/dist/components/data/data-table/data-table-column-tree-cache.d.ts +29 -0
- package/dist/components/data/data-table/data-table-column-tree-cache.js +117 -0
- package/dist/components/data/data-table/data-table-constants.d.ts +2 -0
- package/dist/components/data/data-table/data-table-constants.js +3 -2
- package/dist/components/data/data-table/data-table-sheet.js +46 -49
- package/dist/components/data/data-table/data-table.js +137 -119
- package/dist/components/data/data-table/index.js +24 -23
- package/dist/components/data/data-table/patch-column-tree-indicators-from-grid.d.ts +3 -0
- package/dist/components/data/data-table/patch-column-tree-indicators-from-grid.js +24 -0
- package/dist/components/data/data-table/use-data-table-column-list-sync.d.ts +2 -1
- package/dist/components/data/data-table/use-data-table-column-list-sync.js +249 -150
- package/dist/components/data/expandable-list-item/expandable-list-item-attributes.js +6 -7
- package/dist/components/data/nested-list/components/NestedListContent.js +158 -96
- package/dist/components/data/nested-list/nested-list-constants.d.ts +4 -0
- package/dist/components/data/nested-list/nested-list-constants.js +6 -0
- package/dist/components/data/nested-list/nested-list-tree-utils.d.ts +3 -0
- package/dist/components/data/nested-list/nested-list-tree-utils.js +24 -0
- package/dist/components/data/nested-list/nested-list.js +214 -215
- 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 +70 -68
- package/dist/components/data-display/calendar/calendar-week-number-cell.js +29 -29
- package/dist/components/data-display/calendar/calendar.js +96 -94
- package/dist/components/data-display/calendar/calendar.types.d.ts +2 -0
- package/dist/components/data-display/card/card.js +6 -5
- package/dist/components/feedback/dialog/dialog.js +7 -5
- package/dist/components/feedback/sheet/sheet.js +28 -27
- package/dist/components/feedback/tooltip/tab-tooltip-render.js +2 -3
- package/dist/components/flows/filter-panel/filter-panel.js +61 -57
- package/dist/components/flows/filter-strip/filter-tag-list.js +33 -33
- package/dist/components/forms/combobox/combobox.js +110 -100
- package/dist/components/forms/date-picker/date-input-behavior.d.ts +9 -0
- package/dist/components/forms/date-picker/date-input-behavior.js +32 -19
- package/dist/components/forms/date-picker/date-picker.js +96 -90
- package/dist/components/forms/date-picker/date-range-picker.js +160 -152
- package/dist/components/forms/date-picker/month-picker.js +71 -65
- package/dist/components/forms/date-picker/month-range-picker.js +153 -145
- package/dist/components/forms/date-picker/multi-date-picker.js +127 -99
- package/dist/components/forms/date-picker/multi-month-picker.js +109 -97
- package/dist/components/forms/date-picker/multi-week-picker.js +98 -86
- package/dist/components/forms/date-picker/week-picker.js +82 -76
- package/dist/components/forms/date-picker/week-range-picker.js +127 -119
- package/dist/impact-nova-base.scss +10 -5
- package/dist/impact-nova-components.css +9 -5
- package/dist/impact-nova.css +1 -1
- package/dist/index.js +189 -188
- package/dist/lib/overlay/overlay-portal-context.d.ts +11 -2
- package/dist/lib/overlay/overlay-portal-context.js +39 -28
- package/dist/lib/primitives/create-compound.d.ts +5 -0
- package/dist/lib/primitives/create-compound.js +17 -16
- package/dist/llms/rules/installation.js +1 -1
- package/dist/llms/rules/requirements.js +1 -1
- package/package.json +2 -1
|
@@ -1,104 +1,106 @@
|
|
|
1
|
-
import { jsx as
|
|
1
|
+
import { jsx as J } from "react/jsx-runtime";
|
|
2
2
|
import "react";
|
|
3
|
-
import { DayPicker as
|
|
4
|
-
import { cn as
|
|
5
|
-
import { useCalendarDayPickerConfig as
|
|
6
|
-
function
|
|
7
|
-
className:
|
|
3
|
+
import { DayPicker as K } from "react-day-picker";
|
|
4
|
+
import { cn as Q } from "../../../lib/utils.js";
|
|
5
|
+
import { useCalendarDayPickerConfig as R } from "./use-calendar-day-picker-config.js";
|
|
6
|
+
function E({
|
|
7
|
+
className: u,
|
|
8
8
|
pickerType: t,
|
|
9
9
|
mode: r,
|
|
10
10
|
weekMode: o,
|
|
11
11
|
calendarType: a,
|
|
12
12
|
showOutsideDays: n,
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
13
|
+
fixedWeeks: e,
|
|
14
|
+
captionLayout: p,
|
|
15
|
+
buttonVariant: d,
|
|
16
|
+
weekStartsOn: s,
|
|
17
|
+
formatters: g,
|
|
18
|
+
classNames: f,
|
|
19
|
+
components: w,
|
|
19
20
|
selected: b,
|
|
20
|
-
showFooter:
|
|
21
|
-
pendingSelection:
|
|
22
|
-
selectedDaysFromWeeks:
|
|
23
|
-
currentMonth:
|
|
24
|
-
monthsFull:
|
|
21
|
+
showFooter: P,
|
|
22
|
+
pendingSelection: y,
|
|
23
|
+
selectedDaysFromWeeks: D,
|
|
24
|
+
currentMonth: i,
|
|
25
|
+
monthsFull: h,
|
|
25
26
|
resolvedStartMonth: m,
|
|
26
|
-
resolvedEndMonth:
|
|
27
|
-
availableYears:
|
|
28
|
-
dateFnsLocale:
|
|
29
|
-
intlLocale:
|
|
30
|
-
weekRangeModifiers:
|
|
31
|
-
onSelect:
|
|
27
|
+
resolvedEndMonth: c,
|
|
28
|
+
availableYears: k,
|
|
29
|
+
dateFnsLocale: v,
|
|
30
|
+
intlLocale: C,
|
|
31
|
+
weekRangeModifiers: N,
|
|
32
|
+
onSelect: _,
|
|
32
33
|
onMonthChange: l,
|
|
33
|
-
onWeekSelect:
|
|
34
|
-
previousMonthLabel:
|
|
34
|
+
onWeekSelect: S,
|
|
35
|
+
previousMonthLabel: x,
|
|
35
36
|
nextMonthLabel: L,
|
|
36
|
-
monthPlaceholder:
|
|
37
|
-
yearPlaceholder:
|
|
37
|
+
monthPlaceholder: O,
|
|
38
|
+
yearPlaceholder: j,
|
|
38
39
|
weekNumberLabel: V,
|
|
39
|
-
weekLabel:
|
|
40
|
-
formatWeekNumber:
|
|
41
|
-
disabled:
|
|
42
|
-
...
|
|
40
|
+
weekLabel: q,
|
|
41
|
+
formatWeekNumber: z,
|
|
42
|
+
disabled: A,
|
|
43
|
+
...B
|
|
43
44
|
}) {
|
|
44
|
-
const { dayPickerClassNames:
|
|
45
|
-
buttonVariant:
|
|
45
|
+
const { dayPickerClassNames: F, dayPickerComponents: G } = R({
|
|
46
|
+
buttonVariant: d,
|
|
46
47
|
pickerType: t,
|
|
47
48
|
calendarType: a,
|
|
48
49
|
showOutsideDays: n,
|
|
49
|
-
classNames:
|
|
50
|
-
currentMonth:
|
|
51
|
-
monthsFull:
|
|
50
|
+
classNames: f,
|
|
51
|
+
currentMonth: i,
|
|
52
|
+
monthsFull: h,
|
|
52
53
|
resolvedStartMonth: m,
|
|
53
|
-
resolvedEndMonth:
|
|
54
|
-
availableYears:
|
|
55
|
-
weekStartsOn:
|
|
56
|
-
previousMonthLabel:
|
|
54
|
+
resolvedEndMonth: c,
|
|
55
|
+
availableYears: k,
|
|
56
|
+
weekStartsOn: s,
|
|
57
|
+
previousMonthLabel: x,
|
|
57
58
|
nextMonthLabel: L,
|
|
58
|
-
monthPlaceholder:
|
|
59
|
-
yearPlaceholder:
|
|
59
|
+
monthPlaceholder: O,
|
|
60
|
+
yearPlaceholder: j,
|
|
60
61
|
weekNumberLabel: V,
|
|
61
|
-
weekLabel:
|
|
62
|
+
weekLabel: q,
|
|
62
63
|
onMonthChange: l,
|
|
63
|
-
onWeekSelect:
|
|
64
|
-
components:
|
|
65
|
-
}),
|
|
66
|
-
return /* @__PURE__ */
|
|
67
|
-
|
|
64
|
+
onWeekSelect: S,
|
|
65
|
+
components: w
|
|
66
|
+
}), H = r === "range" || r === "multiple" || o === "range" || o === "multiple" ? 2 : 1;
|
|
67
|
+
return /* @__PURE__ */ J(
|
|
68
|
+
K,
|
|
68
69
|
{
|
|
69
70
|
mode: t === "week" ? "multiple" : r,
|
|
70
|
-
selected: t === "week" ?
|
|
71
|
-
onSelect:
|
|
72
|
-
month:
|
|
71
|
+
selected: t === "week" ? D : P ? y : b,
|
|
72
|
+
onSelect: _,
|
|
73
|
+
month: i,
|
|
73
74
|
onMonthChange: l,
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
75
|
+
fixedWeeks: e,
|
|
76
|
+
showOutsideDays: e || a === "fiscal" || n,
|
|
77
|
+
weekStartsOn: s,
|
|
78
|
+
modifiers: t === "week" ? N : void 0,
|
|
79
|
+
locale: v,
|
|
80
|
+
className: Q(
|
|
79
81
|
"bg-canvas group/calendar p-2 [[data-slot=card-content]_&]:bg-transparent [[data-slot=popover-content]_&]:bg-transparent",
|
|
80
82
|
String.raw`rtl:**:[.rdp-button\_next>svg]:rotate-180`,
|
|
81
83
|
String.raw`rtl:**:[.rdp-button\_previous>svg]:rotate-180`,
|
|
82
|
-
|
|
84
|
+
u
|
|
83
85
|
),
|
|
84
|
-
captionLayout:
|
|
86
|
+
captionLayout: p,
|
|
85
87
|
navLayout: "around",
|
|
86
88
|
startMonth: m,
|
|
87
|
-
endMonth:
|
|
88
|
-
disabled:
|
|
89
|
-
numberOfMonths:
|
|
89
|
+
endMonth: c,
|
|
90
|
+
disabled: A,
|
|
91
|
+
numberOfMonths: H,
|
|
90
92
|
showWeekNumber: !0,
|
|
91
93
|
formatters: {
|
|
92
|
-
formatMonthDropdown: (
|
|
93
|
-
formatWeekNumber:
|
|
94
|
-
...
|
|
94
|
+
formatMonthDropdown: (I) => I.toLocaleString(C, { month: "short" }),
|
|
95
|
+
formatWeekNumber: z,
|
|
96
|
+
...g
|
|
95
97
|
},
|
|
96
|
-
classNames:
|
|
97
|
-
components:
|
|
98
|
-
...
|
|
98
|
+
classNames: F,
|
|
99
|
+
components: G,
|
|
100
|
+
...B
|
|
99
101
|
}
|
|
100
102
|
);
|
|
101
103
|
}
|
|
102
104
|
export {
|
|
103
|
-
|
|
105
|
+
E as CalendarDayPickerView
|
|
104
106
|
};
|
|
@@ -1,42 +1,42 @@
|
|
|
1
|
-
import { jsx as
|
|
1
|
+
import { jsx as n } from "react/jsx-runtime";
|
|
2
2
|
import "react";
|
|
3
3
|
import { cn as a } from "../../../lib/utils.js";
|
|
4
4
|
function C({
|
|
5
|
-
week:
|
|
5
|
+
week: x,
|
|
6
6
|
weekStartsOn: c,
|
|
7
|
-
pickerType:
|
|
7
|
+
pickerType: p,
|
|
8
8
|
weekNumberLabel: i,
|
|
9
|
-
weekLabel:
|
|
10
|
-
onWeekSelect:
|
|
9
|
+
weekLabel: h,
|
|
10
|
+
onWeekSelect: y,
|
|
11
11
|
className: s,
|
|
12
|
-
...
|
|
12
|
+
...k
|
|
13
13
|
}) {
|
|
14
|
-
const e =
|
|
14
|
+
const e = x.days.find((o) => !o.outside)?.date;
|
|
15
15
|
if (!e)
|
|
16
|
-
return /* @__PURE__ */
|
|
17
|
-
"
|
|
16
|
+
return /* @__PURE__ */ n(
|
|
17
|
+
"th",
|
|
18
18
|
{
|
|
19
|
-
|
|
19
|
+
scope: "row",
|
|
20
|
+
"aria-hidden": "true",
|
|
20
21
|
className: a(
|
|
21
|
-
"select-none flex h-
|
|
22
|
+
"select-none flex h-[30px] w-[30px] flex-shrink-0 items-center justify-center text-[11px] text-secondary-foreground rdp-week_number",
|
|
22
23
|
s
|
|
23
|
-
)
|
|
24
|
-
children: /* @__PURE__ */ r("div", { className: "flex size-[--cell-size] items-center justify-center text-center" })
|
|
24
|
+
)
|
|
25
25
|
}
|
|
26
26
|
);
|
|
27
|
-
const
|
|
28
|
-
|
|
29
|
-
const
|
|
30
|
-
(
|
|
31
|
-
) + 1,
|
|
32
|
-
if (
|
|
33
|
-
const o = () =>
|
|
34
|
-
return /* @__PURE__ */
|
|
27
|
+
const f = e.getFullYear(), l = e.getMonth(), m = (new Date(f, l, 1).getDay() + 7 - c) % 7, w = new Date(f, l, 1 - m), d = new Date(e), D = (e.getDay() + 7 - c) % 7;
|
|
28
|
+
d.setDate(e.getDate() - D);
|
|
29
|
+
const r = Math.round(
|
|
30
|
+
(d.getTime() - w.getTime()) / (10080 * 60 * 1e3)
|
|
31
|
+
) + 1, u = h(r);
|
|
32
|
+
if (p === "week") {
|
|
33
|
+
const o = () => y(e);
|
|
34
|
+
return /* @__PURE__ */ n(
|
|
35
35
|
"td",
|
|
36
36
|
{
|
|
37
|
-
"aria-label":
|
|
38
|
-
"data-week-index":
|
|
39
|
-
"data-week-number":
|
|
37
|
+
"aria-label": u,
|
|
38
|
+
"data-week-index": r,
|
|
39
|
+
"data-week-number": r,
|
|
40
40
|
tabIndex: 0,
|
|
41
41
|
role: "button",
|
|
42
42
|
className: a(
|
|
@@ -49,21 +49,21 @@ function C({
|
|
|
49
49
|
onKeyDown: (t) => {
|
|
50
50
|
(t.key === "Enter" || t.key === " ") && (t.preventDefault(), t.stopPropagation(), o());
|
|
51
51
|
},
|
|
52
|
-
children: /* @__PURE__ */
|
|
52
|
+
children: /* @__PURE__ */ n("div", { className: "flex h-8 w-full items-center justify-center text-center text-[11px] text-secondary-foreground", children: i(r) })
|
|
53
53
|
}
|
|
54
54
|
);
|
|
55
55
|
}
|
|
56
|
-
return /* @__PURE__ */
|
|
56
|
+
return /* @__PURE__ */ n(
|
|
57
57
|
"th",
|
|
58
58
|
{
|
|
59
|
-
...
|
|
60
|
-
"aria-label":
|
|
59
|
+
...k,
|
|
60
|
+
"aria-label": u,
|
|
61
61
|
className: a(
|
|
62
62
|
"select-none flex h-[30px] w-[30px] flex-shrink-0 items-center justify-center text-[11px] text-secondary-foreground rdp-week_number",
|
|
63
63
|
s
|
|
64
64
|
),
|
|
65
65
|
scope: "row",
|
|
66
|
-
children: /* @__PURE__ */
|
|
66
|
+
children: /* @__PURE__ */ n("div", { className: "flex h-8 w-full items-center justify-center text-center", children: i(r) })
|
|
67
67
|
}
|
|
68
68
|
);
|
|
69
69
|
}
|
|
@@ -1,117 +1,118 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import { createComponent as
|
|
3
|
-
import { CALENDAR_DEFAULT_END_MONTH as
|
|
4
|
-
import { CalendarDayPickerView as
|
|
5
|
-
import { CalendarFooter as
|
|
6
|
-
import { CalendarMonthPanes as
|
|
7
|
-
import { useCalendarI18n as
|
|
8
|
-
import { useCalendarState as
|
|
9
|
-
const
|
|
1
|
+
import { jsxs as be, jsx as h } from "react/jsx-runtime";
|
|
2
|
+
import { createComponent as Ce } from "../../../lib/primitives/create-component.js";
|
|
3
|
+
import { CALENDAR_DEFAULT_END_MONTH as ge, CALENDAR_DEFAULT_START_MONTH as pe, getCalendarDayLayoutAttr as Le, getCalendarMonthLayoutAttr as ve, resolveFiscalPattern as Ae } from "./calendar-config.js";
|
|
4
|
+
import { CalendarDayPickerView as Se } from "./calendar-day-picker-view.js";
|
|
5
|
+
import { CalendarFooter as Me } from "./calendar-footer.js";
|
|
6
|
+
import { CalendarMonthPanes as Pe } from "./calendar-month-panes.js";
|
|
7
|
+
import { useCalendarI18n as fe } from "./use-calendar-i18n.js";
|
|
8
|
+
import { useCalendarState as De } from "./use-calendar-state.js";
|
|
9
|
+
const We = Ce(
|
|
10
10
|
"Calendar",
|
|
11
11
|
({
|
|
12
12
|
className: P,
|
|
13
13
|
classNames: f,
|
|
14
14
|
showOutsideDays: D = !1,
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
15
|
+
fixedWeeks: Y = !0,
|
|
16
|
+
captionLayout: k = "dropdown",
|
|
17
|
+
buttonVariant: y = "ghost",
|
|
18
|
+
formatters: N,
|
|
19
|
+
components: F,
|
|
19
20
|
showFooter: l = !0,
|
|
20
|
-
footerFlashKey:
|
|
21
|
-
footerFlashTarget:
|
|
22
|
-
disableApply:
|
|
23
|
-
onApply:
|
|
24
|
-
onCancel:
|
|
25
|
-
onClear:
|
|
21
|
+
footerFlashKey: x = 0,
|
|
22
|
+
footerFlashTarget: E,
|
|
23
|
+
disableApply: R = !1,
|
|
24
|
+
onApply: W,
|
|
25
|
+
onCancel: _,
|
|
26
|
+
onClear: I,
|
|
26
27
|
mode: d = "single",
|
|
27
28
|
selected: m,
|
|
28
|
-
onSelect:
|
|
29
|
+
onSelect: j,
|
|
29
30
|
pickerType: n = "date",
|
|
30
31
|
weekMode: r = "single",
|
|
31
|
-
selectedWeeks:
|
|
32
|
-
onWeekSelect:
|
|
32
|
+
selectedWeeks: w,
|
|
33
|
+
onWeekSelect: H,
|
|
33
34
|
calendarType: t = "calendar",
|
|
34
35
|
fiscalMode: u = "basic",
|
|
35
36
|
selectionMode: b = "week",
|
|
36
|
-
fiscalMonthPattern:
|
|
37
|
-
fiscalYearStartMonth:
|
|
37
|
+
fiscalMonthPattern: O,
|
|
38
|
+
fiscalYearStartMonth: U = 1,
|
|
38
39
|
weekStartsOn: C = 1,
|
|
39
40
|
monthMode: o = "single",
|
|
40
41
|
selectedMonths: g,
|
|
41
|
-
onMonthSelect:
|
|
42
|
-
month:
|
|
43
|
-
defaultMonth:
|
|
44
|
-
onMonthChange:
|
|
45
|
-
startMonth:
|
|
46
|
-
endMonth:
|
|
42
|
+
onMonthSelect: V,
|
|
43
|
+
month: q,
|
|
44
|
+
defaultMonth: z,
|
|
45
|
+
onMonthChange: B,
|
|
46
|
+
startMonth: G,
|
|
47
|
+
endMonth: J,
|
|
47
48
|
...c
|
|
48
|
-
},
|
|
49
|
-
const { t: e, intlLocale:
|
|
49
|
+
}, K) => {
|
|
50
|
+
const { t: e, intlLocale: Q, dateFnsLocale: X, monthsFull: Z, monthsShort: $ } = fe(), p = Ae({
|
|
50
51
|
calendarType: t,
|
|
51
52
|
fiscalMode: u,
|
|
52
|
-
fiscalMonthPattern:
|
|
53
|
-
}), s =
|
|
53
|
+
fiscalMonthPattern: O
|
|
54
|
+
}), s = G ?? pe, i = J ?? ge, {
|
|
54
55
|
pendingSelection: L,
|
|
55
56
|
currentMonth: v,
|
|
56
|
-
pendingWeekSelection:
|
|
57
|
+
pendingWeekSelection: T,
|
|
57
58
|
pendingMonthSelection: A,
|
|
58
|
-
monthPickerYear:
|
|
59
|
+
monthPickerYear: ee,
|
|
59
60
|
handleMonthChangeInternal: S,
|
|
60
|
-
resolveWeekFromInput:
|
|
61
|
-
handleWeekClick:
|
|
62
|
-
handleMonthClick:
|
|
61
|
+
resolveWeekFromInput: ae,
|
|
62
|
+
handleWeekClick: ne,
|
|
63
|
+
handleMonthClick: le,
|
|
63
64
|
availableYears: M,
|
|
64
|
-
selectedDaysFromWeeks:
|
|
65
|
-
weekRangeModifiers:
|
|
66
|
-
handleInternalSelect:
|
|
67
|
-
handleApply:
|
|
68
|
-
handleCancel:
|
|
69
|
-
handleClear:
|
|
70
|
-
isMonthSelected:
|
|
71
|
-
getMonthRangeProps:
|
|
72
|
-
isMonthDisabled:
|
|
73
|
-
isApplyDisabledInternal:
|
|
74
|
-
} =
|
|
65
|
+
selectedDaysFromWeeks: re,
|
|
66
|
+
weekRangeModifiers: te,
|
|
67
|
+
handleInternalSelect: oe,
|
|
68
|
+
handleApply: de,
|
|
69
|
+
handleCancel: ce,
|
|
70
|
+
handleClear: se,
|
|
71
|
+
isMonthSelected: ie,
|
|
72
|
+
getMonthRangeProps: he,
|
|
73
|
+
isMonthDisabled: me,
|
|
74
|
+
isApplyDisabledInternal: ue
|
|
75
|
+
} = De({
|
|
75
76
|
showFooter: l,
|
|
76
77
|
selected: m,
|
|
77
|
-
onSelect:
|
|
78
|
+
onSelect: j,
|
|
78
79
|
pickerType: n,
|
|
79
80
|
weekMode: r,
|
|
80
|
-
selectedWeeks:
|
|
81
|
-
onWeekSelect:
|
|
81
|
+
selectedWeeks: w,
|
|
82
|
+
onWeekSelect: H,
|
|
82
83
|
calendarType: t,
|
|
83
84
|
fiscalMode: u,
|
|
84
85
|
selectionMode: b,
|
|
85
86
|
resolvedFiscalPattern: p,
|
|
86
|
-
fiscalYearStartMonth:
|
|
87
|
+
fiscalYearStartMonth: U,
|
|
87
88
|
weekStartsOn: C,
|
|
88
89
|
monthMode: o,
|
|
89
90
|
selectedMonths: g,
|
|
90
|
-
onMonthSelect:
|
|
91
|
-
month:
|
|
92
|
-
defaultMonth:
|
|
93
|
-
onMonthChange:
|
|
91
|
+
onMonthSelect: V,
|
|
92
|
+
month: q,
|
|
93
|
+
defaultMonth: z,
|
|
94
|
+
onMonthChange: B,
|
|
94
95
|
resolvedStartMonth: s,
|
|
95
96
|
resolvedEndMonth: i,
|
|
96
97
|
disabled: c.disabled,
|
|
97
|
-
onApply:
|
|
98
|
-
onCancel:
|
|
99
|
-
onClear:
|
|
98
|
+
onApply: W,
|
|
99
|
+
onCancel: _,
|
|
100
|
+
onClear: I
|
|
100
101
|
});
|
|
101
|
-
return /* @__PURE__ */
|
|
102
|
+
return /* @__PURE__ */ be(
|
|
102
103
|
"div",
|
|
103
104
|
{
|
|
104
|
-
ref:
|
|
105
|
+
ref: K,
|
|
105
106
|
"data-component": "calendar",
|
|
106
|
-
"data-month-layout":
|
|
107
|
-
"data-day-layout":
|
|
107
|
+
"data-month-layout": ve(n, o),
|
|
108
|
+
"data-day-layout": Le(n, d, r),
|
|
108
109
|
children: [
|
|
109
110
|
n === "month" ? /* @__PURE__ */ h(
|
|
110
|
-
|
|
111
|
+
Pe,
|
|
111
112
|
{
|
|
112
113
|
monthMode: o,
|
|
113
|
-
monthPickerYear:
|
|
114
|
-
monthsShort:
|
|
114
|
+
monthPickerYear: ee,
|
|
115
|
+
monthsShort: $,
|
|
115
116
|
showFooter: l,
|
|
116
117
|
pendingMonthSelection: A,
|
|
117
118
|
selectedMonths: g,
|
|
@@ -121,14 +122,14 @@ const Re = be(
|
|
|
121
122
|
previousYearLabel: e("calendar.previousYear"),
|
|
122
123
|
nextYearLabel: e("calendar.nextYear"),
|
|
123
124
|
currentMonth: v,
|
|
124
|
-
isMonthSelected:
|
|
125
|
-
getMonthRangeProps:
|
|
126
|
-
isMonthDisabled:
|
|
125
|
+
isMonthSelected: ie,
|
|
126
|
+
getMonthRangeProps: he,
|
|
127
|
+
isMonthDisabled: me,
|
|
127
128
|
onMonthChange: S,
|
|
128
|
-
onMonthClick:
|
|
129
|
+
onMonthClick: le
|
|
129
130
|
}
|
|
130
131
|
) : /* @__PURE__ */ h(
|
|
131
|
-
|
|
132
|
+
Se,
|
|
132
133
|
{
|
|
133
134
|
className: P,
|
|
134
135
|
pickerType: n,
|
|
@@ -136,27 +137,28 @@ const Re = be(
|
|
|
136
137
|
weekMode: r,
|
|
137
138
|
calendarType: t,
|
|
138
139
|
showOutsideDays: D,
|
|
139
|
-
|
|
140
|
-
|
|
140
|
+
fixedWeeks: Y,
|
|
141
|
+
captionLayout: k,
|
|
142
|
+
buttonVariant: y,
|
|
141
143
|
weekStartsOn: C,
|
|
142
|
-
formatters:
|
|
144
|
+
formatters: N,
|
|
143
145
|
classNames: f,
|
|
144
|
-
components:
|
|
146
|
+
components: F,
|
|
145
147
|
selected: m,
|
|
146
148
|
showFooter: l,
|
|
147
149
|
pendingSelection: L,
|
|
148
|
-
selectedDaysFromWeeks:
|
|
150
|
+
selectedDaysFromWeeks: re,
|
|
149
151
|
currentMonth: v,
|
|
150
|
-
monthsFull:
|
|
152
|
+
monthsFull: Z,
|
|
151
153
|
resolvedStartMonth: s,
|
|
152
154
|
resolvedEndMonth: i,
|
|
153
155
|
availableYears: M,
|
|
154
|
-
dateFnsLocale:
|
|
155
|
-
intlLocale:
|
|
156
|
-
weekRangeModifiers:
|
|
157
|
-
onSelect:
|
|
156
|
+
dateFnsLocale: X,
|
|
157
|
+
intlLocale: Q,
|
|
158
|
+
weekRangeModifiers: te,
|
|
159
|
+
onSelect: oe,
|
|
158
160
|
onMonthChange: S,
|
|
159
|
-
onWeekSelect: (a) => ae(
|
|
161
|
+
onWeekSelect: (a) => ne(ae(a)),
|
|
160
162
|
previousMonthLabel: e("calendar.previousMonth"),
|
|
161
163
|
nextMonthLabel: e("calendar.nextMonth"),
|
|
162
164
|
monthPlaceholder: e("calendar.monthPlaceholder"),
|
|
@@ -169,7 +171,7 @@ const Re = be(
|
|
|
169
171
|
}
|
|
170
172
|
),
|
|
171
173
|
l ? /* @__PURE__ */ h(
|
|
172
|
-
|
|
174
|
+
Me,
|
|
173
175
|
{
|
|
174
176
|
pickerType: n,
|
|
175
177
|
mode: d,
|
|
@@ -179,12 +181,12 @@ const Re = be(
|
|
|
179
181
|
selectionMode: b,
|
|
180
182
|
resolvedFiscalPattern: p,
|
|
181
183
|
pendingSelection: L,
|
|
182
|
-
pendingWeekSelection:
|
|
184
|
+
pendingWeekSelection: T,
|
|
183
185
|
pendingMonthSelection: A,
|
|
184
|
-
disableApply:
|
|
185
|
-
isApplyDisabled:
|
|
186
|
-
footerFlashKey:
|
|
187
|
-
footerFlashTarget:
|
|
186
|
+
disableApply: R,
|
|
187
|
+
isApplyDisabled: ue,
|
|
188
|
+
footerFlashKey: x,
|
|
189
|
+
footerFlashTarget: E,
|
|
188
190
|
labels: {
|
|
189
191
|
clear: e("calendar.clear"),
|
|
190
192
|
cancel: e("calendar.cancel"),
|
|
@@ -193,9 +195,9 @@ const Re = be(
|
|
|
193
195
|
monthSingle: e("calendar.monthRange"),
|
|
194
196
|
monthPlural: (a) => e("calendar.monthRangePlural", { count: a })
|
|
195
197
|
},
|
|
196
|
-
onClear:
|
|
197
|
-
onCancel:
|
|
198
|
-
onApply:
|
|
198
|
+
onClear: se,
|
|
199
|
+
onCancel: ce,
|
|
200
|
+
onApply: de
|
|
199
201
|
}
|
|
200
202
|
) : null
|
|
201
203
|
]
|
|
@@ -204,5 +206,5 @@ const Re = be(
|
|
|
204
206
|
}
|
|
205
207
|
);
|
|
206
208
|
export {
|
|
207
|
-
|
|
209
|
+
We as Calendar
|
|
208
210
|
};
|
|
@@ -54,4 +54,6 @@ export interface CalendarProps extends Omit<React.ComponentProps<typeof DayPicke
|
|
|
54
54
|
monthMode?: "single" | "multiple" | "range";
|
|
55
55
|
selectedMonths?: MonthSelection | MonthSelection[] | MonthRange;
|
|
56
56
|
onMonthSelect?: (months: MonthSelection | MonthSelection[] | MonthRange | undefined) => void;
|
|
57
|
+
/** Always render 6 week rows to prevent layout shift when navigating months. Default true. */
|
|
58
|
+
fixedWeeks?: boolean;
|
|
57
59
|
}
|
|
@@ -2,7 +2,7 @@ import { jsx as o } from "react/jsx-runtime";
|
|
|
2
2
|
import { createComponent as d } from "../../../lib/primitives/create-component.js";
|
|
3
3
|
import { createCompoundPart as a } from "../../../lib/primitives/create-compound.js";
|
|
4
4
|
import { cn as s } from "../../../lib/utils.js";
|
|
5
|
-
const
|
|
5
|
+
const m = d(
|
|
6
6
|
"Card",
|
|
7
7
|
({ className: e, ...r }, t) => /* @__PURE__ */ o(
|
|
8
8
|
"div",
|
|
@@ -16,7 +16,7 @@ const i = d(
|
|
|
16
16
|
...r
|
|
17
17
|
}
|
|
18
18
|
)
|
|
19
|
-
),
|
|
19
|
+
), i = a("card", {
|
|
20
20
|
part: "header",
|
|
21
21
|
displayName: "CardHeader",
|
|
22
22
|
className: "flex flex-col space-y-1.5 p-6"
|
|
@@ -31,17 +31,18 @@ const i = d(
|
|
|
31
31
|
}), N = a("card", {
|
|
32
32
|
part: "content",
|
|
33
33
|
displayName: "CardContent",
|
|
34
|
-
className: "p-6 pt-0"
|
|
34
|
+
className: "p-6 pt-0",
|
|
35
|
+
scrollSurface: !0
|
|
35
36
|
}), x = a("card", {
|
|
36
37
|
part: "footer",
|
|
37
38
|
displayName: "CardFooter",
|
|
38
39
|
className: "flex items-center p-6 pt-0"
|
|
39
40
|
});
|
|
40
41
|
export {
|
|
41
|
-
|
|
42
|
+
m as Card,
|
|
42
43
|
N as CardContent,
|
|
43
44
|
f as CardDescription,
|
|
44
45
|
x as CardFooter,
|
|
45
|
-
|
|
46
|
+
i as CardHeader,
|
|
46
47
|
C as CardTitle
|
|
47
48
|
};
|
|
@@ -65,9 +65,10 @@ const C = u.forwardRef(
|
|
|
65
65
|
l(), m?.(d);
|
|
66
66
|
},
|
|
67
67
|
className: v(
|
|
68
|
-
"fixed left-[50%] top-[50%] z-50 flex flex-col w-full max-w-lg translate-x-[-50%] translate-y-[-50%] border bg-canvas shadow-xl duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] rounded-lg
|
|
68
|
+
"fixed left-[50%] top-[50%] z-50 flex flex-col w-full max-w-lg translate-x-[-50%] translate-y-[-50%] border bg-canvas shadow-xl duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] rounded-lg motion-reduce:animate-none motion-reduce:transition-none",
|
|
69
69
|
R,
|
|
70
|
-
i
|
|
70
|
+
i,
|
|
71
|
+
"overflow-visible"
|
|
71
72
|
),
|
|
72
73
|
...g,
|
|
73
74
|
children: [
|
|
@@ -114,15 +115,16 @@ B.displayName = e.Content.displayName;
|
|
|
114
115
|
const Y = y("dialog", {
|
|
115
116
|
part: "header",
|
|
116
117
|
displayName: "DialogHeader",
|
|
117
|
-
className: "relative flex flex-col justify-center border-b bg-canvas-tint p-4 pe-12 text-center sm:text-start"
|
|
118
|
+
className: "relative flex flex-col justify-center rounded-t-lg border-b bg-canvas-tint p-4 pe-12 text-center sm:text-start"
|
|
118
119
|
}), q = y("dialog", {
|
|
119
120
|
part: "body",
|
|
120
121
|
displayName: "DialogBody",
|
|
121
|
-
className: "min-h-0 flex-1 overflow-y-auto px-6 py-6"
|
|
122
|
+
className: "min-h-0 flex-1 overflow-y-auto px-6 py-6",
|
|
123
|
+
scrollSurface: !0
|
|
122
124
|
}), J = y("dialog", {
|
|
123
125
|
part: "footer",
|
|
124
126
|
displayName: "DialogFooter",
|
|
125
|
-
className: "flex flex-col-reverse bg-canvas-elevated px-4 py-[9px] sm:flex-row sm:items-center sm:justify-end sm:gap-2"
|
|
127
|
+
className: "flex flex-col-reverse rounded-b-lg bg-canvas-elevated px-4 py-[9px] sm:flex-row sm:items-center sm:justify-end sm:gap-2"
|
|
126
128
|
}), M = c(
|
|
127
129
|
"dialog",
|
|
128
130
|
"title",
|