impact-nova 2.0.1 → 2.0.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/assets/empty-state-1-3H9kriwm.webp +0 -0
- package/dist/assets/empty-state-2-Brn6WD3e.webp +0 -0
- package/dist/assets/empty-state-3-CqLldG5q.webp +0 -0
- package/dist/assets/empty-state-4-Br-xaUJO.webp +0 -0
- package/dist/assets/empty-state-5-BanvbHv1.webp +0 -0
- package/dist/assets/empty-state-6-Egbfj9Fe.webp +0 -0
- package/dist/components/ui/accordion.d.ts +13 -0
- package/dist/components/ui/accordion.js +50 -33
- package/dist/components/ui/ag-grid-react/cell-renderers/percent-progress-display-renderer.js +24 -23
- package/dist/components/ui/ag-grid-react/headers/components/header-info.d.ts +8 -6
- package/dist/components/ui/ag-grid-react/headers/components/header-info.js +69 -60
- package/dist/components/ui/ag-grid-react/headers/custom-header.js +23 -22
- package/dist/components/ui/ag-grid-react/headers/header-search-input.js +43 -35
- package/dist/components/ui/ag-grid-react/index.js +44 -42
- package/dist/components/ui/breadcrumb.d.ts +5 -1
- package/dist/components/ui/breadcrumb.js +59 -51
- package/dist/components/ui/date-picker/date-picker.js +14 -14
- package/dist/components/ui/date-picker/date-range-picker.js +25 -25
- package/dist/components/ui/date-picker/month-picker.js +4 -4
- package/dist/components/ui/date-picker/month-range-picker.js +7 -7
- package/dist/components/ui/date-picker/multi-date-picker.js +9 -9
- package/dist/components/ui/date-picker/multi-month-picker.js +29 -29
- package/dist/components/ui/date-picker/multi-week-picker.js +20 -20
- package/dist/components/ui/date-picker/week-picker.js +31 -31
- package/dist/components/ui/date-picker/week-range-picker.js +22 -22
- package/dist/components/ui/dynamic-layout.d.ts +1 -1
- package/dist/components/ui/empty-container/assets/empty-state-1.webp.js +1 -1
- package/dist/components/ui/empty-container/assets/empty-state-2.webp.js +2 -2
- package/dist/components/ui/empty-container/assets/empty-state-3.webp.js +1 -1
- package/dist/components/ui/empty-container/assets/empty-state-4.webp.js +1 -1
- package/dist/components/ui/empty-container/assets/empty-state-5.webp.js +1 -1
- package/dist/components/ui/empty-container/assets/empty-state-6.webp.js +2 -2
- package/dist/components/ui/empty-container/emptyStateIllustrations.d.ts +2 -2
- package/dist/components/ui/empty-container/emptyStateIllustrations.js +32 -20
- package/dist/components/ui/empty-container.js +82 -58
- package/dist/components/ui/filter-strip/filter-summary.js +28 -29
- package/dist/components/ui/filter-strip/filter-tag-list.js +87 -96
- package/dist/components/ui/radio-group.js +19 -19
- package/dist/components/ui/select/select.js +29 -28
- package/dist/components/ui/sidebar.d.ts +2 -1
- package/dist/components/ui/sidebar.js +212 -202
- package/dist/components/ui/tag.d.ts +3 -1
- package/dist/components/ui/tag.js +65 -44
- package/dist/components/ui/types/empty-container.types.d.ts +2 -0
- package/dist/i18n/defaultMessages.d.ts +1 -0
- package/dist/i18n/defaultMessages.js +1 -0
- package/dist/i18n/locales/de.js +1 -0
- package/dist/i18n/locales/es.js +1 -0
- package/dist/i18n/locales/hi.js +1 -0
- package/dist/i18n/locales/kn.js +1 -0
- package/dist/impact-nova-components.css +4 -0
- package/dist/impact-nova.css +1 -1
- package/dist/index.js +441 -439
- package/package.json +4 -1
- package/dist/assets/empty-state-1-Bqh-20pq.webp +0 -0
- package/dist/assets/empty-state-2-DPMRkOBw.webp +0 -0
- package/dist/assets/empty-state-3-BqSOh0-t.webp +0 -0
- package/dist/assets/empty-state-4-CjN-c01q.webp +0 -0
- package/dist/assets/empty-state-5-D4RMA1H1.webp +0 -0
- package/dist/assets/empty-state-6-Dlnf1-2W.webp +0 -0
|
@@ -20,7 +20,7 @@ const zt = (Ne) => {
|
|
|
20
20
|
defaultValue: _e,
|
|
21
21
|
onChange: u,
|
|
22
22
|
isMulti: p,
|
|
23
|
-
isDisabled:
|
|
23
|
+
isDisabled: N,
|
|
24
24
|
isLoading: T,
|
|
25
25
|
isClearable: qe = !0,
|
|
26
26
|
isSearchable: $ = !0,
|
|
@@ -101,7 +101,7 @@ const zt = (Ne) => {
|
|
|
101
101
|
S,
|
|
102
102
|
f,
|
|
103
103
|
p ?? !1
|
|
104
|
-
),
|
|
104
|
+
), k = wt({
|
|
105
105
|
count: m.length,
|
|
106
106
|
getScrollElement: () => ee.current,
|
|
107
107
|
estimateSize: () => 34,
|
|
@@ -144,21 +144,21 @@ const zt = (Ne) => {
|
|
|
144
144
|
}, [q]), C(() => {
|
|
145
145
|
if (!d) return;
|
|
146
146
|
const e = requestAnimationFrame(() => {
|
|
147
|
-
|
|
147
|
+
k.measure();
|
|
148
148
|
});
|
|
149
149
|
return () => cancelAnimationFrame(e);
|
|
150
|
-
}, [d,
|
|
150
|
+
}, [d, k]), C(() => {
|
|
151
151
|
if (d && ke && !I && m.length > 0) {
|
|
152
152
|
const e = m.findIndex((t) => p ? S.mode === "exclude" ? !S.set.has(t.value) : S.set.has(t.value) : f?.value === t.value);
|
|
153
153
|
if (e !== -1) {
|
|
154
154
|
const t = setTimeout(() => {
|
|
155
|
-
|
|
155
|
+
k.scrollToIndex(e, { align: "center" });
|
|
156
156
|
}, 50);
|
|
157
157
|
return () => clearTimeout(t);
|
|
158
158
|
}
|
|
159
159
|
}
|
|
160
|
-
}, [d, ke, I, m.length, p, S.mode, S.set, f,
|
|
161
|
-
const K = M(null), Fe =
|
|
160
|
+
}, [d, ke, I, m.length, p, S.mode, S.set, f, k]);
|
|
161
|
+
const K = M(null), Fe = k.getVirtualItems(), ye = Fe[Fe.length - 1], te = yt.useCallback(() => {
|
|
162
162
|
T || I || K.current || F && (F(), K.current = setTimeout(() => {
|
|
163
163
|
K.current = null;
|
|
164
164
|
}, 500));
|
|
@@ -190,7 +190,7 @@ const zt = (Ne) => {
|
|
|
190
190
|
te
|
|
191
191
|
]);
|
|
192
192
|
const E = (e) => {
|
|
193
|
-
if (!
|
|
193
|
+
if (!N)
|
|
194
194
|
if (Me(e), e)
|
|
195
195
|
et?.();
|
|
196
196
|
else {
|
|
@@ -209,7 +209,7 @@ const zt = (Ne) => {
|
|
|
209
209
|
};
|
|
210
210
|
}, [d]);
|
|
211
211
|
const ne = (e) => {
|
|
212
|
-
if (!(
|
|
212
|
+
if (!(N || h || e.isDisabled || ("children" in e || "options" in e) && e.isParentSelectable === !1))
|
|
213
213
|
if (p) {
|
|
214
214
|
const n = f || [];
|
|
215
215
|
if ("children" in e || "options" in e) {
|
|
@@ -285,7 +285,7 @@ const zt = (Ne) => {
|
|
|
285
285
|
option: e
|
|
286
286
|
}), Ke && (Me(!1), Ae?.(e, void 0), Z(""));
|
|
287
287
|
}, we = async () => {
|
|
288
|
-
if (!(!p ||
|
|
288
|
+
if (!(!p || N || h)) {
|
|
289
289
|
if (L.length > 3e3) {
|
|
290
290
|
try {
|
|
291
291
|
const e = await ft(
|
|
@@ -462,7 +462,7 @@ const zt = (Ne) => {
|
|
|
462
462
|
!n.isGroup && !(w && n.isSubmenuParent) && !n.isDisabled && e.push(s);
|
|
463
463
|
}), e;
|
|
464
464
|
}, ht = (e) => {
|
|
465
|
-
if (
|
|
465
|
+
if (N || h) return;
|
|
466
466
|
if (e.key === "Tab") {
|
|
467
467
|
d && E(!1);
|
|
468
468
|
return;
|
|
@@ -481,11 +481,11 @@ const zt = (Ne) => {
|
|
|
481
481
|
if (e.key === "ArrowDown") {
|
|
482
482
|
e.preventDefault();
|
|
483
483
|
const s = n < t.length - 1 ? n + 1 : 0, l = t[s];
|
|
484
|
-
A(l), l >= 0 &&
|
|
484
|
+
A(l), l >= 0 && k.scrollToIndex(l, { align: "auto" });
|
|
485
485
|
} else if (e.key === "ArrowUp") {
|
|
486
486
|
e.preventDefault();
|
|
487
487
|
const s = n > 0 ? n - 1 : t.length - 1, l = t[s];
|
|
488
|
-
A(l), l >= 0 &&
|
|
488
|
+
A(l), l >= 0 && k.scrollToIndex(l, { align: "auto" });
|
|
489
489
|
} else if (e.key === "Enter" || e.key === " ") {
|
|
490
490
|
if (e.preventDefault(), O === J)
|
|
491
491
|
we();
|
|
@@ -496,10 +496,10 @@ const zt = (Ne) => {
|
|
|
496
496
|
} else if (e.key === "Escape")
|
|
497
497
|
e.preventDefault(), E(!1), ge.current?.focus();
|
|
498
498
|
else if (e.key === "Home")
|
|
499
|
-
e.preventDefault(), t.length > 0 && (A(t[0]), t[0] >= 0 &&
|
|
499
|
+
e.preventDefault(), t.length > 0 && (A(t[0]), t[0] >= 0 && k.scrollToIndex(t[0], { align: "auto" }));
|
|
500
500
|
else if (e.key === "End" && (e.preventDefault(), t.length > 0)) {
|
|
501
501
|
const s = t[t.length - 1];
|
|
502
|
-
A(s), s >= 0 &&
|
|
502
|
+
A(s), s >= 0 && k.scrollToIndex(s, { align: "auto" });
|
|
503
503
|
}
|
|
504
504
|
}, xt = (e) => {
|
|
505
505
|
const t = Ge();
|
|
@@ -508,11 +508,11 @@ const zt = (Ne) => {
|
|
|
508
508
|
if (e.key === "ArrowDown") {
|
|
509
509
|
e.preventDefault();
|
|
510
510
|
const s = n < t.length - 1 ? n + 1 : 0, l = t[s];
|
|
511
|
-
A(l), l >= 0 &&
|
|
511
|
+
A(l), l >= 0 && k.scrollToIndex(l, { align: "auto" });
|
|
512
512
|
} else if (e.key === "ArrowUp") {
|
|
513
513
|
e.preventDefault();
|
|
514
514
|
const s = n > 0 ? n - 1 : t.length - 1, l = t[s];
|
|
515
|
-
A(l), l >= 0 &&
|
|
515
|
+
A(l), l >= 0 && k.scrollToIndex(l, { align: "auto" });
|
|
516
516
|
} else if (e.key === "Enter") {
|
|
517
517
|
if (e.preventDefault(), O === J)
|
|
518
518
|
we();
|
|
@@ -525,10 +525,10 @@ const zt = (Ne) => {
|
|
|
525
525
|
if (p) {
|
|
526
526
|
const e = f || [];
|
|
527
527
|
let t = 0;
|
|
528
|
-
return z(e) ? t = Math.max(0, (typeof De == "number" ? De : $e) - e.excludedValues.length) : V(e) && (t = e.length), t === 0 ? null : t === 1 && V(e) ? /* @__PURE__ */ a("span", { className: y("text-[14px] font-medium truncate min-w-0 block",
|
|
528
|
+
return z(e) ? t = Math.max(0, (typeof De == "number" ? De : $e) - e.excludedValues.length) : V(e) && (t = e.length), t === 0 ? null : t === 1 && V(e) ? /* @__PURE__ */ a("span", { className: y("text-[14px] font-medium truncate min-w-0 block", N ? "text-disabled-foreground" : "text-[#1f2b4d]"), children: le(e[0]) }) : /* @__PURE__ */ a("span", { className: y("text-[14px] font-medium truncate min-w-0 block", N ? "text-disabled-foreground" : "text-[#1f2b4d]"), children: Y("select.selectedCount", { count: t }) });
|
|
529
529
|
} else {
|
|
530
530
|
const e = f;
|
|
531
|
-
return e ? /* @__PURE__ */ a("span", { className: y("text-[14px] font-medium truncate min-w-0 block",
|
|
531
|
+
return e ? /* @__PURE__ */ a("span", { className: y("text-[14px] font-medium truncate min-w-0 block", N ? "text-disabled-foreground" : "text-[#1f2b4d]"), children: le(e) }) : null;
|
|
532
532
|
}
|
|
533
533
|
};
|
|
534
534
|
return /* @__PURE__ */ g(
|
|
@@ -572,22 +572,23 @@ const zt = (Ne) => {
|
|
|
572
572
|
className: y(
|
|
573
573
|
"relative h-[32px] w-full cursor-pointer rounded-[8px] border border-solid px-3 py-1 text-left shadow-sm sm:text-sm transition-all flex items-center overflow-hidden",
|
|
574
574
|
ce ? "border-[#e15554] focus-visible:ring-[#e15554]" : "border-[#c3c8d4] hover:border-gray-400 focus-visible:border-indigo-500 focus-visible:ring-1 focus-visible:ring-indigo-500",
|
|
575
|
-
|
|
575
|
+
N ? "bg-[#f2f4fb] cursor-not-allowed opacity-75" : "",
|
|
576
576
|
h ? "cursor-default bg-[#f2f4fb]" : "",
|
|
577
577
|
d ? "ring-1 ring-indigo-500 border-indigo-500" : "",
|
|
578
|
-
!
|
|
578
|
+
!N && !h && "bg-white",
|
|
579
579
|
Ye
|
|
580
580
|
),
|
|
581
581
|
id: P,
|
|
582
|
-
tabIndex:
|
|
582
|
+
tabIndex: N ? -1 : 0,
|
|
583
583
|
onFocus: ot,
|
|
584
584
|
onBlur: ct,
|
|
585
585
|
role: "combobox",
|
|
586
586
|
"aria-expanded": d,
|
|
587
587
|
"aria-haspopup": "listbox",
|
|
588
588
|
"aria-label": H ? String(H) : me,
|
|
589
|
+
"aria-disabled": N || void 0,
|
|
589
590
|
"data-component": "select-trigger",
|
|
590
|
-
"data-disabled":
|
|
591
|
+
"data-disabled": N || void 0,
|
|
591
592
|
"data-state": d ? "open" : "closed",
|
|
592
593
|
onKeyDown: ht,
|
|
593
594
|
onClick: (e) => {
|
|
@@ -631,7 +632,7 @@ const zt = (Ne) => {
|
|
|
631
632
|
}
|
|
632
633
|
),
|
|
633
634
|
/* @__PURE__ */ a("div", { className: "flex items-center gap-1 text-gray-400 shrink-0", children: !d && (T || I) ? /* @__PURE__ */ a(Nt, { size: "14px" }) : /* @__PURE__ */ g(vt, { children: [
|
|
634
|
-
qe && !h && !
|
|
635
|
+
qe && !h && !N && (p && (z(
|
|
635
636
|
f
|
|
636
637
|
) && f.isAllSelected || V(f) && f.length > 0) || !p && f) && /* @__PURE__ */ a(
|
|
637
638
|
"div",
|
|
@@ -767,7 +768,7 @@ const zt = (Ne) => {
|
|
|
767
768
|
const n = b ? Math.min(e, b) : e;
|
|
768
769
|
return t > 0 && t < n ? "indeterminate" : t >= n;
|
|
769
770
|
})(),
|
|
770
|
-
disabled:
|
|
771
|
+
disabled: N || h,
|
|
771
772
|
onChange: () => {
|
|
772
773
|
},
|
|
773
774
|
"data-testid": `select-select-all-checkbox-${P || "default"}`
|
|
@@ -836,11 +837,11 @@ const zt = (Ne) => {
|
|
|
836
837
|
"div",
|
|
837
838
|
{
|
|
838
839
|
style: {
|
|
839
|
-
height: `${
|
|
840
|
+
height: `${k.getTotalSize()}px`,
|
|
840
841
|
width: "100%",
|
|
841
842
|
position: "relative"
|
|
842
843
|
},
|
|
843
|
-
children:
|
|
844
|
+
children: k.getVirtualItems().map((e) => {
|
|
844
845
|
const t = m[e.index], n = p ? S.mode === "exclude" ? !S.set.has(t.value) : S.set.has(t.value) : f?.value === t.value, s = f || [], l = p && b ? z(s) ? !1 : V(s) && s.length >= b : !1, i = t.isDisabled || l && !n && !(D && t.isGroup) && !(w && t.isSubmenuParent), r = D && t.isGroup || w && t.isSubmenuParent ? ve(t.original) : void 0, c = r?.selected || 0, o = r?.total || 0, x = c > 0 && c < o, se = t.isParentSelectable !== !1, Se = P || "default", ie = String(t.value || ""), Ve = le(
|
|
845
846
|
t
|
|
846
847
|
), bt = typeof Ve == "string" ? Ve : ie;
|
|
@@ -848,7 +849,7 @@ const zt = (Ne) => {
|
|
|
848
849
|
"div",
|
|
849
850
|
{
|
|
850
851
|
"data-index": e.index,
|
|
851
|
-
ref:
|
|
852
|
+
ref: k.measureElement,
|
|
852
853
|
className: "absolute left-0 w-full pb-[2px]",
|
|
853
854
|
style: {
|
|
854
855
|
transform: `translateY(${e.start}px)`,
|
|
@@ -70,6 +70,7 @@ declare const SidebarMenuButton: React.ForwardRefExoticComponent<Omit<React.Clas
|
|
|
70
70
|
variant?: "default" | "outline";
|
|
71
71
|
size?: "default" | "sm" | "lg";
|
|
72
72
|
} & import('class-variance-authority/types').ClassProp) => string>, "ref"> & React.RefAttributes<HTMLButtonElement>>;
|
|
73
|
+
declare const SidebarMenuLabel: React.ForwardRefExoticComponent<Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, "ref"> & React.RefAttributes<HTMLSpanElement>>;
|
|
73
74
|
declare const SidebarLogout: React.ForwardRefExoticComponent<Omit<Omit<React.ClassAttributes<HTMLButtonElement> & React.ButtonHTMLAttributes<HTMLButtonElement> & {
|
|
74
75
|
asChild?: boolean;
|
|
75
76
|
isActive?: boolean;
|
|
@@ -95,4 +96,4 @@ declare const SidebarMenuSubButton: React.ForwardRefExoticComponent<Omit<React.C
|
|
|
95
96
|
size?: "sm" | "md";
|
|
96
97
|
isActive?: boolean;
|
|
97
98
|
}, "ref"> & React.RefAttributes<HTMLAnchorElement>>;
|
|
98
|
-
export { Sidebar, SidebarContent, SidebarFooter, SidebarGroup, SidebarGroupAction, SidebarGroupContent, SidebarGroupLabel, SidebarHeader, SidebarInput, SidebarInset, SidebarMenu, SidebarMenuAction, SidebarMenuBadge, SidebarMenuButton, SidebarMenuCollapsible, SidebarLogout, SidebarMenuItem, SidebarMenuSkeleton, SidebarMenuSub, SidebarMenuSubButton, SidebarMenuSubItem, SidebarProvider, SidebarRail, SidebarSeparator, SidebarTrigger, useSidebar, };
|
|
99
|
+
export { Sidebar, SidebarContent, SidebarFooter, SidebarGroup, SidebarGroupAction, SidebarGroupContent, SidebarGroupLabel, SidebarHeader, SidebarInput, SidebarInset, SidebarMenu, SidebarMenuAction, SidebarMenuBadge, SidebarMenuButton, SidebarMenuCollapsible, SidebarMenuLabel, SidebarLogout, SidebarMenuItem, SidebarMenuSkeleton, SidebarMenuSub, SidebarMenuSubButton, SidebarMenuSubItem, SidebarProvider, SidebarRail, SidebarSeparator, SidebarTrigger, useSidebar, };
|