impact-nova 2.2.1 → 2.2.2
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/ag-grid-header-dom.d.ts +8 -0
- package/dist/components/data/ag-grid-react/ag-grid-header-dom.js +11 -0
- package/dist/components/data/ag-grid-react/ag-grid-tooltip-overflow.d.ts +4 -1
- package/dist/components/data/ag-grid-react/ag-grid-tooltip-overflow.js +14 -3
- package/dist/components/data/ag-grid-react/headers/column-menu/column-header-settings-menu.d.ts +19 -0
- package/dist/components/data/ag-grid-react/headers/column-menu/column-header-settings-menu.js +74 -0
- package/dist/components/data/ag-grid-react/headers/column-menu/column-settings-menu.d.ts +4 -5
- package/dist/components/data/ag-grid-react/headers/column-menu/column-settings-menu.js +110 -144
- package/dist/components/data/ag-grid-react/headers/components/header-info.d.ts +2 -1
- package/dist/components/data/ag-grid-react/headers/components/header-info.js +73 -70
- package/dist/components/data/ag-grid-react/headers/context/grid-header-context.d.ts +0 -8
- package/dist/components/data/ag-grid-react/headers/custom-header.js +112 -118
- package/dist/components/data/ag-grid-react/headers/custom-inner-header-group.js +27 -23
- package/dist/components/data/ag-grid-react/headers/resolve-header-info-params.d.ts +10 -0
- package/dist/components/data/ag-grid-react/headers/resolve-header-info-params.js +19 -0
- package/dist/components/data/ag-grid-react/index.js +169 -210
- package/dist/components/data/ag-grid-react/info-system-story-columns.d.ts +12 -0
- package/dist/components/data/ag-grid-react/merge-column-group-defs.d.ts +3 -0
- package/dist/components/data/ag-grid-react/merge-column-group-defs.js +27 -0
- package/dist/components/data/ag-grid-react/use-ag-grid-truncation-tooltip.d.ts +2 -1
- package/dist/components/data/ag-grid-react/use-ag-grid-truncation-tooltip.js +7 -7
- package/dist/components/data/data-table/data-table-view-menu.d.ts +1 -0
- package/dist/components/feedback/dialog/dialog.js +107 -61
- package/dist/components/feedback/dropdown-menu/dropdown-menu.d.ts +1 -0
- package/dist/components/feedback/dropdown-menu/dropdown-menu.js +83 -76
- package/dist/components/feedback/popover/popover.d.ts +5 -2
- package/dist/components/feedback/popover/popover.js +43 -40
- package/dist/components/feedback/sheet/sheet.js +149 -102
- package/dist/components/forms/date-picker/date-input-behavior.d.ts +10 -4
- package/dist/components/forms/date-picker/date-input-behavior.js +86 -67
- package/dist/components/forms/date-picker/date-picker.js +59 -52
- package/dist/components/forms/date-picker/date-range-picker.js +26 -25
- package/dist/components/forms/date-picker/month-picker.js +76 -69
- package/dist/components/forms/date-picker/month-range-picker.js +41 -40
- package/dist/components/forms/date-picker/multi-date-picker.js +31 -31
- package/dist/components/forms/date-picker/multi-month-picker.js +27 -27
- package/dist/components/forms/date-picker/multi-week-picker.js +37 -37
- package/dist/components/forms/date-picker/week-picker.js +85 -78
- package/dist/components/forms/date-picker/week-range-picker.js +67 -66
- package/dist/components/forms/select/components/SelectMenuPanel.js +19 -15
- package/dist/components/forms/select/components/SelectOptionRow.js +110 -90
- package/dist/components/forms/select/components/Submenu.js +39 -34
- package/dist/components/forms/select/hooks/useSelectOpenEffects.js +65 -70
- package/dist/components/forms/select/select.js +228 -223
- package/dist/components/forms/select/select.types.d.ts +8 -0
- package/dist/impact-nova-components.css +59 -15
- package/dist/impact-nova.css +1 -1
- package/dist/lib/overlay/merge-element-refs.d.ts +2 -0
- package/dist/lib/overlay/merge-element-refs.js +17 -0
- package/dist/lib/overlay/overlay-host.constants.d.ts +4 -0
- package/dist/lib/overlay/overlay-host.constants.js +5 -0
- package/dist/lib/overlay/overlay-portal-context.d.ts +26 -0
- package/dist/lib/overlay/overlay-portal-context.js +65 -0
- package/dist/lib/overlay/use-overlay-portal-container-state.d.ts +5 -0
- package/dist/lib/overlay/use-overlay-portal-container-state.js +13 -0
- package/dist/llms/rules/installation.js +1 -1
- package/dist/llms/rules/requirements.js +1 -1
- package/package.json +22 -8
- package/dist/components/forms/select/components/LabelWithSequence.d.ts +0 -13
- package/dist/components/forms/select/components/LabelWithSequence.js +0 -18
|
@@ -1,23 +1,25 @@
|
|
|
1
|
-
import { jsxs as
|
|
1
|
+
import { jsxs as s, jsx as t } from "react/jsx-runtime";
|
|
2
2
|
import * as l from "@radix-ui/react-popover";
|
|
3
|
-
import { Checkbox as
|
|
4
|
-
import { ChevronRight as
|
|
5
|
-
import { cn as
|
|
3
|
+
import { Checkbox as k } from "../../checkbox/checkbox.js";
|
|
4
|
+
import { ChevronRight as A, Checkmark as y } from "impact-nova-icons";
|
|
5
|
+
import { cn as f } from "../../../../lib/utils.js";
|
|
6
|
+
import { useOverlayPortalContainer as P } from "../../../../lib/overlay/overlay-portal-context.js";
|
|
7
|
+
import { OVERLAY_NESTED_FLOATING_INSTANT_HIDE_CLASS as w } from "../../../../lib/overlay/overlay-host.constants.js";
|
|
6
8
|
const $ = ({
|
|
7
9
|
parentOption: n,
|
|
8
|
-
isMulti:
|
|
9
|
-
isReadOnly:
|
|
10
|
-
isSelected:
|
|
10
|
+
isMulti: u,
|
|
11
|
+
isReadOnly: i,
|
|
12
|
+
isSelected: v,
|
|
11
13
|
getIndeterminateState: x,
|
|
12
|
-
getSelectedCount:
|
|
13
|
-
handleSelect:
|
|
14
|
+
getSelectedCount: h,
|
|
15
|
+
handleSelect: g
|
|
14
16
|
}) => {
|
|
15
|
-
const
|
|
16
|
-
if (!
|
|
17
|
-
const
|
|
18
|
-
return /* @__PURE__ */
|
|
17
|
+
const N = P(), d = "children" in n && Array.isArray(n.children) ? n.children : null;
|
|
18
|
+
if (!d) return null;
|
|
19
|
+
const c = String(n.value || "");
|
|
20
|
+
return /* @__PURE__ */ s(l.Root, { open: !0, children: [
|
|
19
21
|
/* @__PURE__ */ t(l.Anchor, { className: "absolute inset-0 pointer-events-none" }),
|
|
20
|
-
/* @__PURE__ */ t(l.Portal, { children: /* @__PURE__ */ t(
|
|
22
|
+
/* @__PURE__ */ t(l.Portal, { container: N, children: /* @__PURE__ */ t(
|
|
21
23
|
l.Content,
|
|
22
24
|
{
|
|
23
25
|
side: "right",
|
|
@@ -25,36 +27,39 @@ const $ = ({
|
|
|
25
27
|
align: "start",
|
|
26
28
|
avoidCollisions: !0,
|
|
27
29
|
collisionPadding: 8,
|
|
28
|
-
"aria-label": String(n.label ??
|
|
30
|
+
"aria-label": String(n.label ?? c),
|
|
29
31
|
onOpenAutoFocus: (e) => e.preventDefault(),
|
|
30
32
|
onInteractOutside: (e) => e.preventDefault(),
|
|
31
33
|
onFocusOutside: (e) => e.preventDefault(),
|
|
32
|
-
className:
|
|
34
|
+
className: f(
|
|
35
|
+
"select-submenu-container z-50 min-w-[180px] max-h-[300px] overflow-auto rounded-xl bg-canvas-elevated py-1 shadow-elevation-floating",
|
|
36
|
+
w
|
|
37
|
+
),
|
|
33
38
|
"data-component": "select-menu",
|
|
34
|
-
children:
|
|
35
|
-
const a =
|
|
36
|
-
return /* @__PURE__ */
|
|
39
|
+
children: d.map((e) => {
|
|
40
|
+
const a = v(e), S = x(e), o = e.isDisabled, m = h(e), r = "children" in e && Array.isArray(e.children) && e.children.length > 0, p = e.isParentSelectable !== !1, b = String(e.value || "");
|
|
41
|
+
return /* @__PURE__ */ s(
|
|
37
42
|
"div",
|
|
38
43
|
{
|
|
39
|
-
className:
|
|
44
|
+
className: f(
|
|
40
45
|
"relative flex h-[35px] cursor-default select-none items-center justify-between gap-1.5 rounded-[8px] px-3",
|
|
41
|
-
o ? "cursor-not-allowed bg-canvas-readonly opacity-50" :
|
|
42
|
-
a && !o && !
|
|
46
|
+
o ? "cursor-not-allowed bg-canvas-readonly opacity-50" : i ? "cursor-default" : "cursor-pointer hover:bg-canvas-muted",
|
|
47
|
+
a && !o && !r ? "bg-brand-subtle text-content" : "text-content"
|
|
43
48
|
),
|
|
44
|
-
onClick: (
|
|
45
|
-
|
|
49
|
+
onClick: (C) => {
|
|
50
|
+
C.stopPropagation(), !o && !i && p && g(e);
|
|
46
51
|
},
|
|
47
|
-
"data-testid": `select-submenu-option-${
|
|
52
|
+
"data-testid": `select-submenu-option-${c}-${b}`,
|
|
48
53
|
"data-state": a ? "checked" : "unchecked",
|
|
49
54
|
"data-disabled": o || void 0,
|
|
50
55
|
"data-component": "select-option",
|
|
51
56
|
children: [
|
|
52
|
-
/* @__PURE__ */
|
|
53
|
-
|
|
54
|
-
|
|
57
|
+
/* @__PURE__ */ s("div", { className: "flex min-w-0 flex-1 items-center gap-1.5", children: [
|
|
58
|
+
u && p && /* @__PURE__ */ t(
|
|
59
|
+
k,
|
|
55
60
|
{
|
|
56
|
-
checked:
|
|
57
|
-
disabled: o ||
|
|
61
|
+
checked: S ? "indeterminate" : a,
|
|
62
|
+
disabled: o || i,
|
|
58
63
|
onChange: () => {
|
|
59
64
|
}
|
|
60
65
|
}
|
|
@@ -63,20 +68,20 @@ const $ = ({
|
|
|
63
68
|
"span",
|
|
64
69
|
{
|
|
65
70
|
className: "block truncate text-[14px] font-medium leading-5",
|
|
66
|
-
"data-testid": `select-submenu-option-label-${
|
|
71
|
+
"data-testid": `select-submenu-option-label-${c}-${b}`,
|
|
67
72
|
"data-state": a ? "checked" : "unchecked",
|
|
68
73
|
title: String(e.label || ""),
|
|
69
74
|
children: e.label
|
|
70
75
|
}
|
|
71
76
|
),
|
|
72
|
-
|
|
77
|
+
r && m > 0 && /* @__PURE__ */ s("span", { className: "text-xs text-secondary-foreground font-medium", children: [
|
|
73
78
|
"(",
|
|
74
79
|
m,
|
|
75
80
|
")"
|
|
76
81
|
] })
|
|
77
82
|
] }),
|
|
78
|
-
|
|
79
|
-
!
|
|
83
|
+
r && /* @__PURE__ */ t(A, { size: "sm", className: "text-content-icon" }),
|
|
84
|
+
!u && a && !r && /* @__PURE__ */ t(y, { className: "h-4 w-4 text-brand" })
|
|
80
85
|
]
|
|
81
86
|
},
|
|
82
87
|
e.value
|
|
@@ -1,92 +1,87 @@
|
|
|
1
|
-
import { useEffect as
|
|
2
|
-
import { SELECT_ALL_INDEX as
|
|
3
|
-
import { hasSelectAllRow as
|
|
4
|
-
function
|
|
5
|
-
isOpen:
|
|
6
|
-
isSearchable:
|
|
7
|
-
searchPosition:
|
|
8
|
-
isReadOnly:
|
|
9
|
-
isLoading:
|
|
1
|
+
import { useEffect as E } from "react";
|
|
2
|
+
import { SELECT_ALL_INDEX as F } from "../select.constants.js";
|
|
3
|
+
import { hasSelectAllRow as G } from "../utils/getSelectableOptionIndices.js";
|
|
4
|
+
function U({
|
|
5
|
+
isOpen: u,
|
|
6
|
+
isSearchable: x,
|
|
7
|
+
searchPosition: A,
|
|
8
|
+
isReadOnly: T,
|
|
9
|
+
isLoading: B,
|
|
10
10
|
isProcessing: t,
|
|
11
|
-
fetchError:
|
|
12
|
-
isMulti:
|
|
13
|
-
isSelectAllEnabled:
|
|
14
|
-
flatOptions:
|
|
15
|
-
searchValue:
|
|
16
|
-
highlightedIndex:
|
|
17
|
-
setHighlightedIndex:
|
|
18
|
-
openedViaKeyboardRef:
|
|
19
|
-
scrollToSelectedOnOpen:
|
|
20
|
-
selectionModel:
|
|
21
|
-
internalValue:
|
|
22
|
-
rowVirtualizer:
|
|
11
|
+
fetchError: C,
|
|
12
|
+
isMulti: v,
|
|
13
|
+
isSelectAllEnabled: D,
|
|
14
|
+
flatOptions: m,
|
|
15
|
+
searchValue: j,
|
|
16
|
+
highlightedIndex: k,
|
|
17
|
+
setHighlightedIndex: f,
|
|
18
|
+
openedViaKeyboardRef: _,
|
|
19
|
+
scrollToSelectedOnOpen: I,
|
|
20
|
+
selectionModel: r,
|
|
21
|
+
internalValue: N,
|
|
22
|
+
rowVirtualizer: L
|
|
23
23
|
}) {
|
|
24
|
-
|
|
25
|
-
if (!
|
|
26
|
-
|
|
24
|
+
E(() => {
|
|
25
|
+
if (!u) {
|
|
26
|
+
f(-1);
|
|
27
27
|
return;
|
|
28
28
|
}
|
|
29
|
-
if (
|
|
30
|
-
if (
|
|
31
|
-
|
|
29
|
+
if (_.current) {
|
|
30
|
+
if (_.current = !1, x && A === "menu" && !T) {
|
|
31
|
+
f(-1);
|
|
32
32
|
return;
|
|
33
33
|
}
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
isLoading: !!
|
|
34
|
+
f(
|
|
35
|
+
G({
|
|
36
|
+
isLoading: !!B,
|
|
37
37
|
isProcessing: t,
|
|
38
|
-
fetchError:
|
|
39
|
-
isMulti:
|
|
40
|
-
isSelectAllEnabled:
|
|
41
|
-
isReadOnly:
|
|
42
|
-
flatOptionsLength:
|
|
43
|
-
}) ?
|
|
38
|
+
fetchError: C,
|
|
39
|
+
isMulti: v,
|
|
40
|
+
isSelectAllEnabled: D,
|
|
41
|
+
isReadOnly: T,
|
|
42
|
+
flatOptionsLength: m.length
|
|
43
|
+
}) ? F : 0
|
|
44
44
|
);
|
|
45
45
|
}
|
|
46
46
|
}, [
|
|
47
|
-
|
|
48
|
-
|
|
47
|
+
u,
|
|
48
|
+
x,
|
|
49
|
+
A,
|
|
49
50
|
T,
|
|
50
|
-
|
|
51
|
-
a,
|
|
51
|
+
B,
|
|
52
52
|
t,
|
|
53
|
-
|
|
54
|
-
|
|
53
|
+
C,
|
|
54
|
+
v,
|
|
55
|
+
D,
|
|
56
|
+
m.length,
|
|
55
57
|
_,
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
]),
|
|
60
|
-
|
|
61
|
-
}, [
|
|
62
|
-
if (!m)
|
|
63
|
-
return;
|
|
64
|
-
const v = requestAnimationFrame(() => {
|
|
65
|
-
c.measure();
|
|
66
|
-
});
|
|
67
|
-
return () => cancelAnimationFrame(v);
|
|
68
|
-
}, [m, c]), L(() => {
|
|
69
|
-
if (!m || !q || t || u.length === 0)
|
|
58
|
+
f
|
|
59
|
+
]), E(() => {
|
|
60
|
+
k !== -1 && f(0);
|
|
61
|
+
}, [j]), E(() => {
|
|
62
|
+
u || L.measure();
|
|
63
|
+
}, [u, L]), E(() => {
|
|
64
|
+
if (!u || !I || t || m.length === 0)
|
|
70
65
|
return;
|
|
71
|
-
const
|
|
72
|
-
if (
|
|
66
|
+
const X = m.findIndex((c) => v ? r.mode === "exclude" ? !r.set.has(c.value) : r.set.has(c.value) : N?.value === c.value);
|
|
67
|
+
if (X === -1)
|
|
73
68
|
return;
|
|
74
|
-
const
|
|
75
|
-
|
|
69
|
+
const q = setTimeout(() => {
|
|
70
|
+
L.scrollToIndex(X, { align: "center" });
|
|
76
71
|
}, 50);
|
|
77
|
-
return () => clearTimeout(
|
|
72
|
+
return () => clearTimeout(q);
|
|
78
73
|
}, [
|
|
79
|
-
m,
|
|
80
|
-
q,
|
|
81
|
-
t,
|
|
82
74
|
u,
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
75
|
+
I,
|
|
76
|
+
t,
|
|
77
|
+
m,
|
|
78
|
+
v,
|
|
79
|
+
r.mode,
|
|
80
|
+
r.set,
|
|
81
|
+
N,
|
|
82
|
+
L
|
|
88
83
|
]);
|
|
89
84
|
}
|
|
90
85
|
export {
|
|
91
|
-
|
|
86
|
+
U as useSelectOpenEffects
|
|
92
87
|
};
|