impact-nova 2.2.2 → 2.2.3
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/expandable-list-item/expandable-list-item-attributes.js +6 -7
- 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/feedback/tooltip/tab-tooltip-render.js +2 -3
- package/dist/components/flows/filter-panel/filter-panel.js +79 -76
- package/dist/impact-nova.css +1 -1
- package/dist/llms/rules/installation.js +1 -1
- package/dist/llms/rules/requirements.js +1 -1
- package/package.json +2 -1
|
@@ -4,14 +4,13 @@ import { FilterPopoverContent as h } from "../../flows/filter-strip/filter-tag-l
|
|
|
4
4
|
import { Popover as u, PopoverTrigger as f } from "../../feedback/popover/popover.js";
|
|
5
5
|
import { Tag as x } from "../../primitives/tag/tag.js";
|
|
6
6
|
import { Tooltip as b, TooltipTrigger as g, TooltipContent as v } from "../../feedback/tooltip/tooltip.js";
|
|
7
|
-
|
|
8
|
-
function P({
|
|
7
|
+
function I({
|
|
9
8
|
tags: n,
|
|
10
9
|
title: i = "Attributes",
|
|
11
10
|
maxVisibleTags: a = 4,
|
|
12
11
|
formatOverflow: s
|
|
13
12
|
}) {
|
|
14
|
-
const c = n.slice(0, a), t = n.slice(a), o = t.length,
|
|
13
|
+
const c = n.slice(0, a), t = n.slice(a), o = t.length, d = s?.(o) ?? (o > 0 ? `+${o}` : null);
|
|
15
14
|
return /* @__PURE__ */ r(
|
|
16
15
|
"div",
|
|
17
16
|
{
|
|
@@ -20,7 +19,7 @@ function P({
|
|
|
20
19
|
children: [
|
|
21
20
|
/* @__PURE__ */ e("p", { className: "text-xs font-semibold leading-5 text-content-heading", children: i }),
|
|
22
21
|
/* @__PURE__ */ r("div", { className: "mt-2 flex flex-wrap gap-1.5", children: [
|
|
23
|
-
c.map((l,
|
|
22
|
+
c.map((l, m) => /* @__PURE__ */ e(
|
|
24
23
|
p,
|
|
25
24
|
{
|
|
26
25
|
variant: "subtle",
|
|
@@ -30,7 +29,7 @@ function P({
|
|
|
30
29
|
className: "max-w-full",
|
|
31
30
|
children: l
|
|
32
31
|
},
|
|
33
|
-
`${
|
|
32
|
+
`${m}-${l}`
|
|
34
33
|
)),
|
|
35
34
|
t.length > 0 ? /* @__PURE__ */ r(u, { children: [
|
|
36
35
|
/* @__PURE__ */ r(b, { children: [
|
|
@@ -44,7 +43,7 @@ function P({
|
|
|
44
43
|
tabIndex: 0,
|
|
45
44
|
role: "button",
|
|
46
45
|
"aria-label": `${t.length} more attributes for ${i}`,
|
|
47
|
-
children:
|
|
46
|
+
children: d
|
|
48
47
|
}
|
|
49
48
|
) }) }),
|
|
50
49
|
/* @__PURE__ */ r(v, { variant: "tertiary", side: "top", children: [
|
|
@@ -69,5 +68,5 @@ function P({
|
|
|
69
68
|
);
|
|
70
69
|
}
|
|
71
70
|
export {
|
|
72
|
-
|
|
71
|
+
I as ExpandableListItemAttributes
|
|
73
72
|
};
|
|
@@ -5,12 +5,13 @@ import { CalendarProps } from './calendar.types';
|
|
|
5
5
|
import { WeekPickerInput } from './calendar-week-utils';
|
|
6
6
|
import * as React from "react";
|
|
7
7
|
type DayPickerProps = React.ComponentProps<typeof DayPicker>;
|
|
8
|
-
export interface CalendarDayPickerViewProps extends Omit<CalendarProps, "showFooter" | "disableApply" | "onApply" | "onCancel" | "onClear" | "pickerType" | "weekMode" | "selectedWeeks" | "onWeekSelect" | "monthMode" | "selectedMonths" | "onMonthSelect" | "defaultMonth" | "fiscalMode" | "fiscalMonthPattern" | "fiscalYearStartMonth" | "selectionMode" | "buttonVariant" | "components" | "classNames" | "formatters" | "captionLayout" | "showOutsideDays" | "calendarType" | "weekStartsOn" | "startMonth" | "endMonth" | "month" | "onMonthChange" | "selected" | "onSelect" | "mode"> {
|
|
8
|
+
export interface CalendarDayPickerViewProps extends Omit<CalendarProps, "showFooter" | "disableApply" | "onApply" | "onCancel" | "onClear" | "pickerType" | "weekMode" | "selectedWeeks" | "onWeekSelect" | "monthMode" | "selectedMonths" | "onMonthSelect" | "defaultMonth" | "fiscalMode" | "fiscalMonthPattern" | "fiscalYearStartMonth" | "selectionMode" | "buttonVariant" | "components" | "classNames" | "formatters" | "captionLayout" | "showOutsideDays" | "fixedWeeks" | "calendarType" | "weekStartsOn" | "startMonth" | "endMonth" | "month" | "onMonthChange" | "selected" | "onSelect" | "mode"> {
|
|
9
9
|
pickerType: "date" | "week";
|
|
10
10
|
mode: NonNullable<CalendarProps["mode"]>;
|
|
11
11
|
weekMode: NonNullable<CalendarProps["weekMode"]>;
|
|
12
12
|
calendarType: NonNullable<CalendarProps["calendarType"]>;
|
|
13
13
|
showOutsideDays: boolean;
|
|
14
|
+
fixedWeeks: boolean;
|
|
14
15
|
captionLayout: NonNullable<CalendarProps["captionLayout"]>;
|
|
15
16
|
buttonVariant: React.ComponentProps<typeof Button>["variant"];
|
|
16
17
|
weekStartsOn: NonNullable<CalendarProps["weekStartsOn"]>;
|
|
@@ -40,5 +41,5 @@ export interface CalendarDayPickerViewProps extends Omit<CalendarProps, "showFoo
|
|
|
40
41
|
weekLabel: (weekOfMonth: number) => string;
|
|
41
42
|
formatWeekNumber: (weekNumber: number) => string;
|
|
42
43
|
}
|
|
43
|
-
export declare function CalendarDayPickerView({ className, pickerType, mode, weekMode, calendarType, showOutsideDays, captionLayout, buttonVariant, weekStartsOn, formatters, classNames, components, selected, showFooter, pendingSelection, selectedDaysFromWeeks, currentMonth, monthsFull, resolvedStartMonth, resolvedEndMonth, availableYears, dateFnsLocale, intlLocale, weekRangeModifiers, onSelect, onMonthChange, onWeekSelect, previousMonthLabel, nextMonthLabel, monthPlaceholder, yearPlaceholder, weekNumberLabel, weekLabel, formatWeekNumber, disabled, ...props }: CalendarDayPickerViewProps): import("react/jsx-runtime").JSX.Element;
|
|
44
|
+
export declare function CalendarDayPickerView({ className, pickerType, mode, weekMode, calendarType, showOutsideDays, fixedWeeks, captionLayout, buttonVariant, weekStartsOn, formatters, classNames, components, selected, showFooter, pendingSelection, selectedDaysFromWeeks, currentMonth, monthsFull, resolvedStartMonth, resolvedEndMonth, availableYears, dateFnsLocale, intlLocale, weekRangeModifiers, onSelect, onMonthChange, onWeekSelect, previousMonthLabel, nextMonthLabel, monthPlaceholder, yearPlaceholder, weekNumberLabel, weekLabel, formatWeekNumber, disabled, ...props }: CalendarDayPickerViewProps): import("react/jsx-runtime").JSX.Element;
|
|
44
45
|
export {};
|
|
@@ -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
|
}
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { jsxs as t, jsx as e } from "react/jsx-runtime";
|
|
2
2
|
import { Tooltip as l, TooltipTrigger as n, TooltipContent as o } from "./tooltip.js";
|
|
3
|
-
|
|
4
|
-
const p = (i, r, a) => /* @__PURE__ */ t(l, { children: [
|
|
3
|
+
const d = (i, r, a) => /* @__PURE__ */ t(l, { children: [
|
|
5
4
|
/* @__PURE__ */ e(n, { asChild: !0, children: /* @__PURE__ */ e("span", { className: "inline-flex items-center justify-center h-full w-full", children: i }) }),
|
|
6
5
|
/* @__PURE__ */ e(o, { variant: "tertiary", className: a, children: r })
|
|
7
6
|
] }), h = (i, r) => /* @__PURE__ */ t(l, { children: [
|
|
@@ -10,5 +9,5 @@ const p = (i, r, a) => /* @__PURE__ */ t(l, { children: [
|
|
|
10
9
|
] });
|
|
11
10
|
export {
|
|
12
11
|
h as defaultAccordionTooltipRender,
|
|
13
|
-
|
|
12
|
+
d as defaultTabTooltipRender
|
|
14
13
|
};
|