impact-nova 1.7.4 → 1.7.6
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/ui/ag-grid-react/headers/components/truncated-text.d.ts +15 -0
- package/dist/components/ui/ag-grid-react/headers/components/truncated-text.js +27 -0
- package/dist/components/ui/ag-grid-react/headers/custom-header-group.js +22 -15
- package/dist/components/ui/ag-grid-react/headers/custom-header.js +47 -43
- package/dist/components/ui/breadcrumb.js +1 -1
- package/dist/components/ui/button-group.d.ts +3 -0
- package/dist/components/ui/button-group.js +129 -78
- package/dist/components/ui/checkbox.d.ts +3 -0
- package/dist/components/ui/checkbox.js +64 -53
- package/dist/components/ui/data-table/data-table-saved-views.d.ts +2 -0
- package/dist/components/ui/data-table/data-table-saved-views.js +348 -0
- package/dist/components/ui/data-table/data-table-view-options.d.ts +8 -0
- package/dist/components/ui/data-table/index.d.ts +2 -0
- package/dist/components/ui/data-table/index.js +16 -14
- package/dist/components/ui/date-picker/date-range-picker.js +239 -196
- package/dist/components/ui/date-picker/month-range-picker.js +226 -183
- package/dist/components/ui/date-picker/week-range-picker.js +265 -222
- package/dist/components/ui/dialog.js +6 -6
- package/dist/components/ui/filter-panel/filter-panel.js +15 -8
- package/dist/components/ui/filter-strip/filter-strip.js +8 -9
- package/dist/components/ui/input.d.ts +3 -0
- package/dist/components/ui/input.js +107 -43
- package/dist/components/ui/notification-panel/notification-panel.d.ts +4 -4
- package/dist/components/ui/notification-panel/notification-panel.js +78 -16
- package/dist/components/ui/radio-group.d.ts +3 -0
- package/dist/components/ui/radio-group.js +101 -52
- package/dist/components/ui/select/select.js +579 -554
- package/dist/components/ui/sidebar.js +5 -5
- package/dist/components/ui/textarea.d.ts +3 -0
- package/dist/components/ui/textarea.js +104 -58
- package/dist/components/ui/types/data-table-saved-views.types.d.ts +71 -0
- package/dist/components/ui/types/helper-text.types.d.ts +5 -0
- package/dist/components/ui/types/select.types.d.ts +6 -0
- package/dist/i18n/defaultMessages.d.ts +19 -0
- package/dist/i18n/defaultMessages.js +33 -15
- package/dist/i18n/locales/de.js +19 -1
- package/dist/i18n/locales/es.js +19 -1
- package/dist/i18n/locales/hi.js +19 -1
- package/dist/i18n/locales/kn.js +19 -1
- package/dist/icons/assets/blocks.svg.js +1 -1
- package/dist/icons/assets/drawBrush.svg.js +5 -0
- package/dist/icons/assets/info-badge.svg.js +5 -0
- package/dist/icons/assets/priority-alert.svg.js +5 -0
- package/dist/icons/assets/settings.svg.js +1 -1
- package/dist/icons/assets/webp/sales.webp.js +4 -0
- package/dist/icons/index.d.ts +4 -0
- package/dist/icons/index.js +253 -245
- package/dist/impact-nova.css +1 -1
- package/dist/index.js +91 -89
- package/package.json +1 -1
|
@@ -1,257 +1,300 @@
|
|
|
1
|
-
import { jsxs as
|
|
1
|
+
import { jsxs as d, jsx as r } from "react/jsx-runtime";
|
|
2
2
|
import * as c from "react";
|
|
3
|
-
import { X as
|
|
4
|
-
import { CalendarMonth as Re, Info as
|
|
5
|
-
import { format as
|
|
6
|
-
import { cn as
|
|
7
|
-
import { Popover as
|
|
8
|
-
import { Calendar as
|
|
9
|
-
import { Tooltip as
|
|
10
|
-
import { resolveWeekSelection as
|
|
11
|
-
import { getDateFnsLocale as
|
|
12
|
-
import { useImpactNovaI18n as
|
|
13
|
-
const a = (t) => t?.from ? t.to ? t.to.endDate : t.from.endDate : void 0,
|
|
3
|
+
import { X as Ne } from "lucide-react";
|
|
4
|
+
import { CalendarMonth as Re, Info as Z } from "../../../icons/index.js";
|
|
5
|
+
import { format as s, isValid as C, parse as P } from "date-fns";
|
|
6
|
+
import { cn as f, padValidDateString as $, maskDate as Y } from "../../../lib/utils.js";
|
|
7
|
+
import { Popover as Se, PopoverTrigger as Ce, PopoverContent as Pe } from "../popover.js";
|
|
8
|
+
import { Calendar as Ie } from "../calendar.js";
|
|
9
|
+
import { Tooltip as _, TooltipTrigger as F, TooltipContent as ee } from "../tooltip.js";
|
|
10
|
+
import { resolveWeekSelection as We } from "../../../lib/fiscal-calendar.js";
|
|
11
|
+
import { getDateFnsLocale as Ve } from "../../../i18n/getDateFnsLocale.js";
|
|
12
|
+
import { useImpactNovaI18n as Ee } from "../../../i18n/ImpactNovaI18nContext.js";
|
|
13
|
+
const a = (t) => t?.from ? t.to ? t.to.endDate : t.from.endDate : void 0, Ae = c.forwardRef(
|
|
14
14
|
({
|
|
15
15
|
value: t,
|
|
16
|
-
onChange:
|
|
16
|
+
onChange: w,
|
|
17
17
|
format: n = "MM/dd/yyyy",
|
|
18
|
-
placeholder:
|
|
19
|
-
minDate:
|
|
20
|
-
maxDate:
|
|
21
|
-
startMonth:
|
|
22
|
-
endMonth:
|
|
23
|
-
showFooter:
|
|
24
|
-
calendarType:
|
|
25
|
-
fiscalMode:
|
|
26
|
-
selectionMode:
|
|
27
|
-
fiscalMonthPattern:
|
|
28
|
-
fiscalYearStartMonth:
|
|
29
|
-
weekStartsOn:
|
|
30
|
-
disabled:
|
|
31
|
-
className:
|
|
32
|
-
isError:
|
|
33
|
-
size:
|
|
34
|
-
label:
|
|
35
|
-
helperText:
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
18
|
+
placeholder: te,
|
|
19
|
+
minDate: ne,
|
|
20
|
+
maxDate: oe,
|
|
21
|
+
startMonth: le,
|
|
22
|
+
endMonth: re,
|
|
23
|
+
showFooter: b = !0,
|
|
24
|
+
calendarType: K = "calendar",
|
|
25
|
+
fiscalMode: M = "basic",
|
|
26
|
+
selectionMode: z = "week",
|
|
27
|
+
fiscalMonthPattern: B,
|
|
28
|
+
fiscalYearStartMonth: T = 1,
|
|
29
|
+
weekStartsOn: O = 1,
|
|
30
|
+
disabled: N,
|
|
31
|
+
className: se,
|
|
32
|
+
isError: D,
|
|
33
|
+
size: H,
|
|
34
|
+
label: X,
|
|
35
|
+
helperText: I,
|
|
36
|
+
helperTextPosition: A = "absolute",
|
|
37
|
+
required: ce,
|
|
38
|
+
prefix: Le,
|
|
39
|
+
prefixClick: je,
|
|
40
|
+
...ae
|
|
41
|
+
}, ie) => {
|
|
42
|
+
const { locale: q, t: V } = Ee(), o = c.useMemo(() => Ve(q), [q]), G = te ?? V("datePicker.selectWeekRange"), J = c.useRef(null), de = c.useRef(null);
|
|
43
|
+
c.useRef(null), c.useRef(null), c.useImperativeHandle(ie, () => J.current);
|
|
44
|
+
const [l, g] = c.useState(!1), W = c.useRef(!1), [y, p] = c.useState(t), [R, m] = c.useState(t?.from ? s(t.from.startDate, n, { locale: o }) : ""), [S, u] = c.useState(a(t) ? s(a(t), n, { locale: o }) : ""), [fe, L] = c.useState(t?.from?.startDate || /* @__PURE__ */ new Date());
|
|
44
45
|
c.useEffect(() => {
|
|
45
|
-
|
|
46
|
-
}, [t, n,
|
|
47
|
-
|
|
48
|
-
}, [
|
|
49
|
-
const
|
|
50
|
-
|
|
51
|
-
},
|
|
52
|
-
|
|
53
|
-
},
|
|
54
|
-
|
|
55
|
-
},
|
|
56
|
-
|
|
57
|
-
},
|
|
58
|
-
calendarType:
|
|
59
|
-
fiscalMode:
|
|
60
|
-
selectionMode:
|
|
61
|
-
fiscalMonthPattern:
|
|
62
|
-
fiscalYearStartMonth:
|
|
63
|
-
weekStartsOn:
|
|
64
|
-
}),
|
|
65
|
-
const
|
|
66
|
-
if (
|
|
67
|
-
const
|
|
68
|
-
|
|
46
|
+
l || (m(t?.from ? s(t.from.startDate, n, { locale: o }) : ""), u(a(t) ? s(a(t), n, { locale: o }) : ""), p(t));
|
|
47
|
+
}, [t, n, l, o]), c.useEffect(() => {
|
|
48
|
+
l && (p(t), m(t?.from ? s(t.from.startDate, n, { locale: o }) : ""), u(a(t) ? s(a(t), n, { locale: o }) : ""), L(t?.from?.startDate || /* @__PURE__ */ new Date()));
|
|
49
|
+
}, [l, t, n, o]);
|
|
50
|
+
const pe = (e) => {
|
|
51
|
+
p(e), e?.from ? (m(s(e.from.startDate, n, { locale: o })), u(s(a(e), n, { locale: o }))) : (m(""), u("")), !b && e?.from && e?.to && e.from.startDate.getTime() !== e.to.startDate.getTime() && (w?.(e), g(!1));
|
|
52
|
+
}, me = (e) => {
|
|
53
|
+
w?.(e !== void 0 ? e : y), g(!1);
|
|
54
|
+
}, j = () => {
|
|
55
|
+
p(t), m(t?.from ? s(t.from.startDate, n, { locale: o }) : ""), u(a(t) ? s(a(t), n, { locale: o }) : ""), g(!1);
|
|
56
|
+
}, Q = () => {
|
|
57
|
+
p(void 0), m(""), u(""), w?.(void 0), b || g(!1);
|
|
58
|
+
}, E = (e) => We(e, {
|
|
59
|
+
calendarType: K,
|
|
60
|
+
fiscalMode: M,
|
|
61
|
+
selectionMode: z,
|
|
62
|
+
fiscalMonthPattern: B,
|
|
63
|
+
fiscalYearStartMonth: T,
|
|
64
|
+
weekStartsOn: O
|
|
65
|
+
}), ue = (e) => {
|
|
66
|
+
const k = e.target.value, i = Y(k, n, R);
|
|
67
|
+
if (m(i), i === "") {
|
|
68
|
+
const h = { from: void 0, to: y?.to };
|
|
69
|
+
p(h), b || w?.(h);
|
|
69
70
|
return;
|
|
70
71
|
}
|
|
71
|
-
const
|
|
72
|
-
if (
|
|
73
|
-
const
|
|
74
|
-
|
|
72
|
+
const x = P(i, n, /* @__PURE__ */ new Date(), { locale: o });
|
|
73
|
+
if (C(x) && i.length === n.length) {
|
|
74
|
+
const v = { from: E(x), to: y?.to };
|
|
75
|
+
p(v), u(s(a(v), n, { locale: o })), b || w?.(v);
|
|
75
76
|
}
|
|
76
|
-
},
|
|
77
|
-
const
|
|
78
|
-
if (
|
|
79
|
-
const
|
|
80
|
-
|
|
77
|
+
}, xe = (e) => {
|
|
78
|
+
const k = e.target.value, i = Y(k, n, S);
|
|
79
|
+
if (u(i), i === "") {
|
|
80
|
+
const h = { from: y?.from, to: void 0 };
|
|
81
|
+
p(h), b || w?.(h);
|
|
81
82
|
return;
|
|
82
83
|
}
|
|
83
|
-
const
|
|
84
|
-
if (
|
|
85
|
-
const
|
|
86
|
-
|
|
84
|
+
const x = P(i, n, /* @__PURE__ */ new Date(), { locale: o });
|
|
85
|
+
if (C(x) && i.length === n.length) {
|
|
86
|
+
const h = E(x), v = { from: y?.from, to: h };
|
|
87
|
+
p(v), y?.from && m(s(y.from.startDate, n, { locale: o })), x && L(x), b || w?.(v);
|
|
87
88
|
}
|
|
88
|
-
},
|
|
89
|
-
if (
|
|
90
|
-
const e =
|
|
91
|
-
if (!
|
|
92
|
-
|
|
93
|
-
else if (
|
|
94
|
-
const
|
|
95
|
-
|
|
89
|
+
}, U = () => {
|
|
90
|
+
if (l) return;
|
|
91
|
+
const e = $(R, n), k = $(S, n), i = P(e, n, /* @__PURE__ */ new Date(), { locale: o }), x = P(k, n, /* @__PURE__ */ new Date(), { locale: o }), h = C(i) && e.length === n.length, v = C(x) && k.length === n.length;
|
|
92
|
+
if (!h || !v)
|
|
93
|
+
m(t?.from ? s(t.from.startDate, n, { locale: o }) : ""), u(a(t) ? s(a(t), n, { locale: o }) : ""), p(t);
|
|
94
|
+
else if (m(e), u(k), !b) {
|
|
95
|
+
const ye = E(i), ve = E(x);
|
|
96
|
+
w?.({ from: ye, to: ve });
|
|
96
97
|
}
|
|
97
|
-
},
|
|
98
|
-
return /* @__PURE__ */
|
|
99
|
-
/* @__PURE__ */
|
|
100
|
-
|
|
98
|
+
}, he = t?.from ? s(t.from.startDate, n, { locale: o }) : "", ge = a(t) ? s(a(t), n, { locale: o }) : "", ke = he !== R, we = ge !== S, be = R.length === n.length && !C(P(R, n, /* @__PURE__ */ new Date(), { locale: o })), De = S.length === n.length && !C(P(S, n, /* @__PURE__ */ new Date(), { locale: o }));
|
|
99
|
+
return /* @__PURE__ */ d("div", { className: "flex w-full min-w-[240px] flex-col gap-[6px]", "data-component": "week-range-picker", "data-disabled": N || void 0, children: [
|
|
100
|
+
/* @__PURE__ */ d("div", { className: "flex flex-col gap-[6px]", children: [
|
|
101
|
+
X && /* @__PURE__ */ d(
|
|
101
102
|
"label",
|
|
102
103
|
{
|
|
103
|
-
className:
|
|
104
|
+
className: f(
|
|
104
105
|
"text-xs font-medium leading-[18px] text-content-tertiary",
|
|
105
|
-
|
|
106
|
-
|
|
106
|
+
N && "opacity-70",
|
|
107
|
+
D && "text-destructive"
|
|
107
108
|
),
|
|
108
109
|
children: [
|
|
109
|
-
|
|
110
|
+
X,
|
|
110
111
|
" ",
|
|
111
|
-
|
|
112
|
+
ce && /* @__PURE__ */ r("span", { className: "text-destructive", children: "*" })
|
|
112
113
|
]
|
|
113
114
|
}
|
|
114
115
|
),
|
|
115
|
-
/* @__PURE__ */
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
"
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
116
|
+
/* @__PURE__ */ d(
|
|
117
|
+
"div",
|
|
118
|
+
{
|
|
119
|
+
className: f(
|
|
120
|
+
"w-full",
|
|
121
|
+
I && A === "absolute" && "relative"
|
|
122
|
+
),
|
|
123
|
+
children: [
|
|
124
|
+
/* @__PURE__ */ d(Se, { open: l, onOpenChange: g, children: [
|
|
125
|
+
/* @__PURE__ */ r(Ce, { asChild: !0, children: /* @__PURE__ */ d(
|
|
126
|
+
"div",
|
|
127
|
+
{
|
|
128
|
+
"data-state": l ? "open" : "closed",
|
|
129
|
+
className: f(
|
|
130
|
+
"flex w-full items-center justify-between gap-2 rounded-md border bg-canvas-elevated px-3 text-sm shadow-sm transition-colors hover:border-brand disabled:cursor-not-allowed disabled:bg-disabled-surface disabled:text-disabled-foreground disabled:border-stroke",
|
|
131
|
+
D ? "border-destructive hover:border-destructive" : "border-field",
|
|
132
|
+
H === "sm" ? "h-6" : H === "md" ? "h-[28px]" : "h-8",
|
|
133
|
+
N && "pointer-events-none opacity-100 bg-disabled-surface border-stroke text-disabled-foreground hover:border-stroke",
|
|
134
|
+
"cursor-pointer",
|
|
135
|
+
se
|
|
136
|
+
),
|
|
137
|
+
children: [
|
|
138
|
+
/* @__PURE__ */ d("div", { className: "flex items-center gap-4 flex-1 min-w-0", children: [
|
|
139
|
+
/* @__PURE__ */ r(
|
|
140
|
+
"input",
|
|
141
|
+
{
|
|
142
|
+
ref: J,
|
|
143
|
+
type: "text",
|
|
144
|
+
value: R,
|
|
145
|
+
onChange: ue,
|
|
146
|
+
onBlur: U,
|
|
147
|
+
onClick: (e) => l && e.stopPropagation(),
|
|
148
|
+
onKeyDown: (e) => {
|
|
149
|
+
(e.key === "Enter" || e.key === "ArrowDown") && !l && (e.preventDefault(), W.current = !0, g(!0)), e.key === "Escape" && l && (e.preventDefault(), j());
|
|
150
|
+
},
|
|
151
|
+
placeholder: l ? n : G,
|
|
152
|
+
disabled: !!N,
|
|
153
|
+
"aria-label": "Start Date",
|
|
154
|
+
"data-field": "start",
|
|
155
|
+
className: f(
|
|
156
|
+
"flex-1 min-w-0 bg-transparent p-0 text-sm font-medium outline-none placeholder:font-medium placeholder:text-content-empty disabled:cursor-not-allowed disabled:opacity-50",
|
|
157
|
+
be ? "text-destructive" : ke ? "text-content-muted" : ""
|
|
158
|
+
),
|
|
159
|
+
...ae
|
|
160
|
+
}
|
|
161
|
+
),
|
|
162
|
+
/* @__PURE__ */ r(
|
|
163
|
+
"input",
|
|
164
|
+
{
|
|
165
|
+
ref: de,
|
|
166
|
+
type: "text",
|
|
167
|
+
value: S,
|
|
168
|
+
onChange: xe,
|
|
169
|
+
onBlur: U,
|
|
170
|
+
onClick: (e) => l && e.stopPropagation(),
|
|
171
|
+
onKeyDown: (e) => {
|
|
172
|
+
(e.key === "Enter" || e.key === "ArrowDown") && !l && (e.preventDefault(), W.current = !0, g(!0)), e.key === "Escape" && l && (e.preventDefault(), j());
|
|
173
|
+
},
|
|
174
|
+
placeholder: l ? n : G,
|
|
175
|
+
disabled: !!N,
|
|
176
|
+
"aria-label": "End Date",
|
|
177
|
+
"data-field": "end",
|
|
178
|
+
className: f(
|
|
179
|
+
"flex-1 min-w-0 bg-transparent p-0 text-sm font-medium outline-none placeholder:font-medium placeholder:text-content-empty disabled:cursor-not-allowed disabled:opacity-50",
|
|
180
|
+
De ? "text-destructive" : we ? "text-content-muted" : ""
|
|
181
|
+
)
|
|
182
|
+
}
|
|
183
|
+
)
|
|
184
|
+
] }),
|
|
185
|
+
/* @__PURE__ */ d("div", { className: "flex items-center gap-1 shrink-0", children: [
|
|
186
|
+
t?.from && !N && /* @__PURE__ */ d(_, { children: [
|
|
187
|
+
/* @__PURE__ */ r(F, { asChild: !0, children: /* @__PURE__ */ r(
|
|
188
|
+
Ne,
|
|
189
|
+
{
|
|
190
|
+
className: "h-4 w-4 cursor-pointer hover:text-content text-content-muted",
|
|
191
|
+
onClick: (e) => {
|
|
192
|
+
e.stopPropagation(), Q();
|
|
193
|
+
}
|
|
194
|
+
}
|
|
195
|
+
) }),
|
|
196
|
+
/* @__PURE__ */ r(ee, { variant: "tertiary", side: "top", children: V("calendar.clear") })
|
|
197
|
+
] }),
|
|
198
|
+
/* @__PURE__ */ d(_, { children: [
|
|
199
|
+
/* @__PURE__ */ r(F, { asChild: !0, children: /* @__PURE__ */ r("button", { type: "button", tabIndex: 0, "aria-label": V("datePicker.selectWeekRange"), onClick: (e) => {
|
|
200
|
+
e.stopPropagation(), g(!l);
|
|
201
|
+
}, onKeyDown: (e) => {
|
|
202
|
+
(e.key === "Enter" || e.key === " ") && (e.preventDefault(), e.stopPropagation(), W.current = !0, g(!l));
|
|
203
|
+
}, className: "inline-flex items-center justify-center bg-transparent border-none p-0 cursor-pointer", children: /* @__PURE__ */ r(Re, { className: "h-4 w-4 text-secondary-foreground" }) }) }),
|
|
204
|
+
/* @__PURE__ */ r(ee, { variant: "tertiary", side: "top", children: V("datePicker.selectWeekRange") })
|
|
205
|
+
] })
|
|
206
|
+
] })
|
|
207
|
+
]
|
|
208
|
+
}
|
|
209
|
+
) }),
|
|
210
|
+
/* @__PURE__ */ r(
|
|
211
|
+
Pe,
|
|
212
|
+
{
|
|
213
|
+
className: "w-auto p-0",
|
|
214
|
+
align: "start",
|
|
215
|
+
onOpenAutoFocus: (e) => {
|
|
216
|
+
W.current || e.preventDefault(), W.current = !1;
|
|
217
|
+
},
|
|
218
|
+
children: /* @__PURE__ */ r(
|
|
219
|
+
Ie,
|
|
180
220
|
{
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
221
|
+
pickerType: "week",
|
|
222
|
+
weekMode: "range",
|
|
223
|
+
selectedWeeks: y,
|
|
224
|
+
onWeekSelect: pe,
|
|
225
|
+
month: fe,
|
|
226
|
+
onMonthChange: L,
|
|
227
|
+
disabled: { before: ne, after: oe },
|
|
228
|
+
startMonth: le,
|
|
229
|
+
endMonth: re,
|
|
230
|
+
showFooter: b,
|
|
231
|
+
calendarType: K,
|
|
232
|
+
fiscalMode: M,
|
|
233
|
+
selectionMode: z,
|
|
234
|
+
fiscalMonthPattern: B,
|
|
235
|
+
fiscalYearStartMonth: T,
|
|
236
|
+
weekStartsOn: O,
|
|
237
|
+
onApply: me,
|
|
238
|
+
onCancel: j,
|
|
239
|
+
onClear: Q,
|
|
240
|
+
captionLayout: "dropdown"
|
|
185
241
|
}
|
|
186
|
-
)
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
onWeekSelect: de,
|
|
216
|
-
month: ie,
|
|
217
|
-
onMonthChange: V,
|
|
218
|
-
disabled: { before: ee, after: te },
|
|
219
|
-
startMonth: ne,
|
|
220
|
-
endMonth: oe,
|
|
221
|
-
showFooter: D,
|
|
222
|
-
calendarType: A,
|
|
223
|
-
fiscalMode: L,
|
|
224
|
-
selectionMode: j,
|
|
225
|
-
fiscalMonthPattern: K,
|
|
226
|
-
fiscalYearStartMonth: M,
|
|
227
|
-
weekStartsOn: B,
|
|
228
|
-
onApply: fe,
|
|
229
|
-
onCancel: T,
|
|
230
|
-
onClear: J,
|
|
231
|
-
captionLayout: "dropdown"
|
|
232
|
-
}
|
|
233
|
-
)
|
|
234
|
-
}
|
|
235
|
-
)
|
|
236
|
-
] })
|
|
242
|
+
)
|
|
243
|
+
}
|
|
244
|
+
)
|
|
245
|
+
] }),
|
|
246
|
+
I && A === "absolute" && /* @__PURE__ */ d("div", { className: f("absolute left-0 top-full z-10 mt-1 flex min-w-0 max-w-full items-center gap-[6px]", D && "text-destructive"), children: [
|
|
247
|
+
/* @__PURE__ */ r(
|
|
248
|
+
Z,
|
|
249
|
+
{
|
|
250
|
+
size: "xs",
|
|
251
|
+
className: f(
|
|
252
|
+
"shrink-0",
|
|
253
|
+
D ? "text-destructive" : "text-content-muted"
|
|
254
|
+
)
|
|
255
|
+
}
|
|
256
|
+
),
|
|
257
|
+
/* @__PURE__ */ r(
|
|
258
|
+
"p",
|
|
259
|
+
{
|
|
260
|
+
className: f(
|
|
261
|
+
"min-w-0 text-[12px] font-medium leading-[18px] text-navigation-muted",
|
|
262
|
+
D && "text-destructive"
|
|
263
|
+
),
|
|
264
|
+
children: I
|
|
265
|
+
}
|
|
266
|
+
)
|
|
267
|
+
] })
|
|
268
|
+
]
|
|
269
|
+
}
|
|
270
|
+
)
|
|
237
271
|
] }),
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
272
|
+
I && A === "flow" && /* @__PURE__ */ d("div", { className: f("flex items-center gap-[6px]", D && "text-destructive"), children: [
|
|
273
|
+
/* @__PURE__ */ r(
|
|
274
|
+
Z,
|
|
275
|
+
{
|
|
276
|
+
size: "xs",
|
|
277
|
+
className: f(
|
|
278
|
+
"shrink-0",
|
|
279
|
+
D ? "text-destructive" : "text-content-muted"
|
|
280
|
+
)
|
|
281
|
+
}
|
|
282
|
+
),
|
|
283
|
+
/* @__PURE__ */ r(
|
|
241
284
|
"p",
|
|
242
285
|
{
|
|
243
|
-
className:
|
|
244
|
-
"text-[
|
|
245
|
-
|
|
286
|
+
className: f(
|
|
287
|
+
"text-[12px] font-medium leading-[18px] text-navigation-muted",
|
|
288
|
+
D && "text-destructive"
|
|
246
289
|
),
|
|
247
|
-
children:
|
|
290
|
+
children: I
|
|
248
291
|
}
|
|
249
292
|
)
|
|
250
293
|
] })
|
|
251
294
|
] });
|
|
252
295
|
}
|
|
253
296
|
);
|
|
254
|
-
|
|
297
|
+
Ae.displayName = "WeekRangePicker";
|
|
255
298
|
export {
|
|
256
|
-
|
|
299
|
+
Ae as WeekRangePicker
|
|
257
300
|
};
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { jsxs as l, jsx as o } from "react/jsx-runtime";
|
|
2
2
|
import * as n from "react";
|
|
3
3
|
import * as a from "@radix-ui/react-dialog";
|
|
4
|
-
import { X as
|
|
4
|
+
import { X as x } from "lucide-react";
|
|
5
5
|
import { cn as i } from "../../lib/utils.js";
|
|
6
|
-
import { Tooltip as
|
|
6
|
+
import { Tooltip as y, TooltipTrigger as u, TooltipContent as N } from "./tooltip.js";
|
|
7
7
|
import { useImpactNovaI18n as v } from "../../i18n/ImpactNovaI18nContext.js";
|
|
8
8
|
const B = a.Root, H = a.Trigger, D = a.Portal, I = a.Close, c = n.forwardRef(({ className: e, ...t }, s) => /* @__PURE__ */ o(
|
|
9
9
|
a.Overlay,
|
|
@@ -37,15 +37,15 @@ const b = n.forwardRef(({ className: e, children: t, hideClose: s, onOpenAutoFoc
|
|
|
37
37
|
...p,
|
|
38
38
|
children: [
|
|
39
39
|
t,
|
|
40
|
-
!s && /* @__PURE__ */ l(
|
|
41
|
-
/* @__PURE__ */ o(
|
|
40
|
+
!s && /* @__PURE__ */ l(y, { children: [
|
|
41
|
+
/* @__PURE__ */ o(u, { asChild: !0, children: /* @__PURE__ */ l(
|
|
42
42
|
a.Close,
|
|
43
43
|
{
|
|
44
44
|
"data-component": "dialog-close",
|
|
45
45
|
className: "absolute right-4 top-4 rounded-sm opacity-50 ring-offset-canvas transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-focus-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-accent data-[state=open]:text-content-muted",
|
|
46
46
|
"aria-label": d,
|
|
47
47
|
children: [
|
|
48
|
-
/* @__PURE__ */ o(
|
|
48
|
+
/* @__PURE__ */ o(x, { className: "h-4 w-4" }),
|
|
49
49
|
/* @__PURE__ */ o("span", { className: "sr-only", children: d })
|
|
50
50
|
]
|
|
51
51
|
}
|
|
@@ -90,7 +90,7 @@ const T = ({
|
|
|
90
90
|
"div",
|
|
91
91
|
{
|
|
92
92
|
className: i(
|
|
93
|
-
"flex flex-col-reverse sm:flex-row sm:justify-end sm:items-center sm:space-x-2 px-4 py-
|
|
93
|
+
"flex flex-col-reverse sm:flex-row sm:justify-end sm:items-center sm:space-x-2 px-4 py-[9px] bg-canvas-elevated",
|
|
94
94
|
e
|
|
95
95
|
),
|
|
96
96
|
...t
|