impact-nova 2.2.3 → 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/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/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/flows/filter-panel/filter-panel.js +36 -35
- 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 +1 -1
|
@@ -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",
|
|
@@ -1,31 +1,31 @@
|
|
|
1
1
|
import { jsx as e, jsxs as m } from "react/jsx-runtime";
|
|
2
2
|
import * as p from "react";
|
|
3
|
-
import * as
|
|
3
|
+
import * as a from "@radix-ui/react-dialog";
|
|
4
4
|
import { ChevronRight as v, Cross as L } from "impact-nova-icons";
|
|
5
5
|
import { createCompoundPart as b, wrapRadixPart as y } from "../../../lib/primitives/create-compound.js";
|
|
6
6
|
import { cn as g } from "../../../lib/utils.js";
|
|
7
7
|
import { useImpactNovaI18n as R } from "../../../i18n/use-impact-nova-i18n.js";
|
|
8
|
-
import { Tooltip as N, TooltipTrigger as
|
|
8
|
+
import { Tooltip as N, TooltipTrigger as S, TooltipContent as C } from "../tooltip/tooltip.js";
|
|
9
9
|
import { mergeElementRefs as E } from "../../../lib/overlay/merge-element-refs.js";
|
|
10
10
|
import { OverlayHostProvider as k, useOverlayHostDismissBeforeClose as x, useOverlayHostNestedDismissing as B } from "../../../lib/overlay/overlay-portal-context.js";
|
|
11
11
|
import { OVERLAY_HOST_GROUP_CLASS as j } from "../../../lib/overlay/overlay-host.constants.js";
|
|
12
12
|
import { useOverlayPortalContainerState as z } from "../../../lib/overlay/use-overlay-portal-container-state.js";
|
|
13
13
|
import { SheetContext as T } from "./sheet-context.js";
|
|
14
14
|
import { sheetVariants as A } from "./sheet.variants.js";
|
|
15
|
-
const ee = (t) => /* @__PURE__ */ e(
|
|
15
|
+
const ee = (t) => /* @__PURE__ */ e(a.Root, { "data-component": "sheet", ...t }), te = y(
|
|
16
16
|
"sheet",
|
|
17
17
|
"trigger",
|
|
18
18
|
"SheetTrigger",
|
|
19
|
-
|
|
19
|
+
a.Trigger
|
|
20
20
|
), F = y(
|
|
21
21
|
"sheet",
|
|
22
22
|
"close",
|
|
23
23
|
"SheetClose",
|
|
24
|
-
|
|
25
|
-
), I =
|
|
24
|
+
a.Close
|
|
25
|
+
), I = a.Portal, P = p.forwardRef(({ className: t, onPointerDown: i, ...l }, n) => {
|
|
26
26
|
const o = x();
|
|
27
27
|
return /* @__PURE__ */ e(
|
|
28
|
-
|
|
28
|
+
a.Overlay,
|
|
29
29
|
{
|
|
30
30
|
className: g(
|
|
31
31
|
"fixed inset-0 z-50 bg-scrim data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 motion-reduce:animate-none motion-reduce:transition-none",
|
|
@@ -35,17 +35,17 @@ const ee = (t) => /* @__PURE__ */ e(n.Root, { "data-component": "sheet", ...t })
|
|
|
35
35
|
o(), i?.(c);
|
|
36
36
|
},
|
|
37
37
|
...l,
|
|
38
|
-
ref:
|
|
38
|
+
ref: n
|
|
39
39
|
}
|
|
40
40
|
);
|
|
41
41
|
});
|
|
42
|
-
P.displayName =
|
|
42
|
+
P.displayName = a.Overlay.displayName;
|
|
43
43
|
const D = p.forwardRef(
|
|
44
44
|
({
|
|
45
45
|
side: t,
|
|
46
46
|
isExpanded: i,
|
|
47
47
|
setPortalContainerElement: l,
|
|
48
|
-
className:
|
|
48
|
+
className: n,
|
|
49
49
|
children: o,
|
|
50
50
|
onOpenAutoFocus: c,
|
|
51
51
|
onEscapeKeyDown: h,
|
|
@@ -53,7 +53,7 @@ const D = p.forwardRef(
|
|
|
53
53
|
}, u) => {
|
|
54
54
|
const r = B(), d = x();
|
|
55
55
|
return /* @__PURE__ */ e(
|
|
56
|
-
|
|
56
|
+
a.Content,
|
|
57
57
|
{
|
|
58
58
|
ref: E(u, l),
|
|
59
59
|
"data-component": "sheet-content",
|
|
@@ -70,7 +70,7 @@ const D = p.forwardRef(
|
|
|
70
70
|
j,
|
|
71
71
|
"flex flex-col p-0 transition-all duration-300 motion-reduce:transition-none",
|
|
72
72
|
t === "bottom" && (i ? "h-[96vh]" : "h-[40vh]"),
|
|
73
|
-
|
|
73
|
+
n
|
|
74
74
|
),
|
|
75
75
|
...f,
|
|
76
76
|
children: o
|
|
@@ -84,7 +84,7 @@ const _ = p.forwardRef(
|
|
|
84
84
|
side: t = "right",
|
|
85
85
|
className: i,
|
|
86
86
|
children: l,
|
|
87
|
-
expandable:
|
|
87
|
+
expandable: n = !1,
|
|
88
88
|
defaultExpanded: o = !1,
|
|
89
89
|
onOpenAutoFocus: c,
|
|
90
90
|
onEscapeKeyDown: h,
|
|
@@ -99,7 +99,7 @@ const _ = p.forwardRef(
|
|
|
99
99
|
value: {
|
|
100
100
|
isExpanded: r,
|
|
101
101
|
onExpandToggle: O,
|
|
102
|
-
expandable:
|
|
102
|
+
expandable: n,
|
|
103
103
|
side: t || void 0
|
|
104
104
|
},
|
|
105
105
|
children: /* @__PURE__ */ e(I, { children: /* @__PURE__ */ m(k, { portalContainer: s, children: [
|
|
@@ -123,13 +123,13 @@ const _ = p.forwardRef(
|
|
|
123
123
|
);
|
|
124
124
|
}
|
|
125
125
|
);
|
|
126
|
-
_.displayName =
|
|
126
|
+
_.displayName = a.Content.displayName;
|
|
127
127
|
const V = ({
|
|
128
128
|
className: t,
|
|
129
129
|
children: i,
|
|
130
130
|
...l
|
|
131
131
|
}) => {
|
|
132
|
-
const { t:
|
|
132
|
+
const { t: n } = R(), { isExpanded: o, onExpandToggle: c, expandable: h, side: f } = p.useContext(T), u = x(), r = n("aria.close"), d = n("nestedList.expand"), s = n("nestedList.collapse");
|
|
133
133
|
return /* @__PURE__ */ m(
|
|
134
134
|
"div",
|
|
135
135
|
{
|
|
@@ -143,7 +143,7 @@ const V = ({
|
|
|
143
143
|
/* @__PURE__ */ e("div", { className: "flex flex-col space-y-1 text-center sm:text-start", children: i }),
|
|
144
144
|
/* @__PURE__ */ m("div", { className: "flex items-center gap-2", children: [
|
|
145
145
|
h && /* @__PURE__ */ m(N, { children: [
|
|
146
|
-
/* @__PURE__ */ e(
|
|
146
|
+
/* @__PURE__ */ e(S, { asChild: !0, children: /* @__PURE__ */ m(
|
|
147
147
|
"button",
|
|
148
148
|
{
|
|
149
149
|
type: "button",
|
|
@@ -157,10 +157,10 @@ const V = ({
|
|
|
157
157
|
]
|
|
158
158
|
}
|
|
159
159
|
) }),
|
|
160
|
-
/* @__PURE__ */ e(
|
|
160
|
+
/* @__PURE__ */ e(C, { variant: "tertiary", side: "top", children: o ? s : d })
|
|
161
161
|
] }),
|
|
162
162
|
/* @__PURE__ */ m(N, { children: [
|
|
163
|
-
/* @__PURE__ */ e(
|
|
163
|
+
/* @__PURE__ */ e(S, { asChild: !0, children: /* @__PURE__ */ m(
|
|
164
164
|
F,
|
|
165
165
|
{
|
|
166
166
|
"data-component": "sheet-close",
|
|
@@ -173,7 +173,7 @@ const V = ({
|
|
|
173
173
|
]
|
|
174
174
|
}
|
|
175
175
|
) }),
|
|
176
|
-
/* @__PURE__ */ e(
|
|
176
|
+
/* @__PURE__ */ e(C, { variant: "tertiary", side: "top", children: r })
|
|
177
177
|
] })
|
|
178
178
|
] })
|
|
179
179
|
]
|
|
@@ -184,22 +184,23 @@ V.displayName = "SheetHeader";
|
|
|
184
184
|
const oe = b("sheet", {
|
|
185
185
|
part: "body",
|
|
186
186
|
displayName: "SheetBody",
|
|
187
|
-
className: "flex-1 overflow-y-auto p-4"
|
|
187
|
+
className: "flex-1 overflow-y-auto p-4",
|
|
188
|
+
scrollSurface: !0
|
|
188
189
|
}), se = b("sheet", {
|
|
189
190
|
part: "footer",
|
|
190
191
|
displayName: "SheetFooter",
|
|
191
192
|
className: "mt-auto flex shrink-0 items-center justify-end gap-2 border-t bg-canvas-elevated px-4 py-3"
|
|
192
|
-
}),
|
|
193
|
+
}), ae = y(
|
|
193
194
|
"sheet",
|
|
194
195
|
"title",
|
|
195
196
|
"SheetTitle",
|
|
196
|
-
|
|
197
|
+
a.Title,
|
|
197
198
|
"text-sm font-bold leading-none tracking-tight"
|
|
198
|
-
),
|
|
199
|
+
), ne = y(
|
|
199
200
|
"sheet",
|
|
200
201
|
"description",
|
|
201
202
|
"SheetDescription",
|
|
202
|
-
|
|
203
|
+
a.Description,
|
|
203
204
|
"text-sm text-content-secondary"
|
|
204
205
|
);
|
|
205
206
|
export {
|
|
@@ -207,11 +208,11 @@ export {
|
|
|
207
208
|
oe as SheetBody,
|
|
208
209
|
F as SheetClose,
|
|
209
210
|
_ as SheetContent,
|
|
210
|
-
|
|
211
|
+
ne as SheetDescription,
|
|
211
212
|
se as SheetFooter,
|
|
212
213
|
V as SheetHeader,
|
|
213
214
|
P as SheetOverlay,
|
|
214
215
|
I as SheetPortal,
|
|
215
|
-
|
|
216
|
+
ae as SheetTitle,
|
|
216
217
|
te as SheetTrigger
|
|
217
218
|
};
|
|
@@ -1,20 +1,20 @@
|
|
|
1
1
|
import { jsx as e, jsxs as t } from "react/jsx-runtime";
|
|
2
2
|
import v from "react";
|
|
3
3
|
import { Sheet as b, SheetContent as g, SheetDescription as N, SheetTitle as y, SheetClose as w } from "../../feedback/sheet/sheet.js";
|
|
4
|
-
import { createCompoundPart as
|
|
4
|
+
import { createCompoundPart as k } from "../../../lib/primitives/create-compound.js";
|
|
5
5
|
import { cn as o } from "../../../lib/utils.js";
|
|
6
|
-
import { MultiColorFilter as
|
|
6
|
+
import { MultiColorFilter as C, Cross as F, InfoBadge as u } from "impact-nova-icons";
|
|
7
7
|
import { Button as P } from "../../primitives/button/button.js";
|
|
8
|
-
import { Tooltip as
|
|
9
|
-
import { Kbd as
|
|
10
|
-
import { useImpactNovaI18n as
|
|
11
|
-
import {
|
|
12
|
-
const
|
|
8
|
+
import { Tooltip as d, TooltipTrigger as h, TooltipContent as f } from "../../feedback/tooltip/tooltip.js";
|
|
9
|
+
import { Kbd as S } from "../../primitives/kbd/kbd.js";
|
|
10
|
+
import { useImpactNovaI18n as x } from "../../../i18n/use-impact-nova-i18n.js";
|
|
11
|
+
import { useOverlayHostDismissNestedLayersOnNavigation as j } from "../../../lib/overlay/overlay-portal-context.js";
|
|
12
|
+
const I = ({
|
|
13
13
|
title: i,
|
|
14
14
|
children: n,
|
|
15
15
|
className: l
|
|
16
16
|
}) => {
|
|
17
|
-
const { t:
|
|
17
|
+
const { t: c } = x();
|
|
18
18
|
return /* @__PURE__ */ t(
|
|
19
19
|
"div",
|
|
20
20
|
{
|
|
@@ -30,7 +30,7 @@ const S = ({
|
|
|
30
30
|
{
|
|
31
31
|
className: "flex size-8 shrink-0 items-center justify-center rounded-md border border-brand-tint bg-canvas-elevated",
|
|
32
32
|
"aria-hidden": !0,
|
|
33
|
-
children: /* @__PURE__ */ e(
|
|
33
|
+
children: /* @__PURE__ */ e(C, { className: "size-5 shrink-0" })
|
|
34
34
|
}
|
|
35
35
|
),
|
|
36
36
|
/* @__PURE__ */ e(y, { className: "text-lg font-bold text-content", children: i })
|
|
@@ -43,7 +43,7 @@ const S = ({
|
|
|
43
43
|
variant: "secondary",
|
|
44
44
|
size: "icon",
|
|
45
45
|
tabIndex: -1,
|
|
46
|
-
"aria-label":
|
|
46
|
+
"aria-label": c("aria.close"),
|
|
47
47
|
"data-component": "filter-panel-close",
|
|
48
48
|
children: /* @__PURE__ */ e(F, { className: "h-3 w-3" })
|
|
49
49
|
}
|
|
@@ -52,11 +52,11 @@ const S = ({
|
|
|
52
52
|
]
|
|
53
53
|
}
|
|
54
54
|
);
|
|
55
|
-
},
|
|
55
|
+
}, R = ({
|
|
56
56
|
open: i,
|
|
57
57
|
onOpenChange: n,
|
|
58
58
|
title: l = "Filter panel",
|
|
59
|
-
children:
|
|
59
|
+
children: c,
|
|
60
60
|
header: s,
|
|
61
61
|
sidebar: p,
|
|
62
62
|
className: m,
|
|
@@ -78,21 +78,21 @@ const S = ({
|
|
|
78
78
|
children: [
|
|
79
79
|
/* @__PURE__ */ e(N, { className: "sr-only", children: "Select filters to apply to the current view." }),
|
|
80
80
|
/* @__PURE__ */ t("div", { className: "flex h-full flex-col bg-canvas-elevated", "data-component": "filter-panel", children: [
|
|
81
|
-
s || /* @__PURE__ */ e(
|
|
81
|
+
s || /* @__PURE__ */ e(I, { title: l }),
|
|
82
82
|
/* @__PURE__ */ t("div", { className: "flex flex-1 overflow-hidden", children: [
|
|
83
83
|
p,
|
|
84
|
-
/* @__PURE__ */ e("div", { className: "flex flex-col flex-1 overflow-hidden", children:
|
|
84
|
+
/* @__PURE__ */ e("div", { className: "flex flex-col flex-1 overflow-hidden", children: c })
|
|
85
85
|
] })
|
|
86
86
|
] })
|
|
87
87
|
]
|
|
88
88
|
}
|
|
89
|
-
) }),
|
|
89
|
+
) }), W = ({
|
|
90
90
|
items: i,
|
|
91
91
|
activeTab: n,
|
|
92
92
|
onTabChange: l,
|
|
93
|
-
className:
|
|
93
|
+
className: c
|
|
94
94
|
}) => {
|
|
95
|
-
const { t: s } =
|
|
95
|
+
const { t: s } = x(), p = j(), m = (a) => {
|
|
96
96
|
a !== n && p(), l(a);
|
|
97
97
|
};
|
|
98
98
|
return /* @__PURE__ */ e(
|
|
@@ -101,7 +101,7 @@ const S = ({
|
|
|
101
101
|
"data-component": "filter-panel-sidebar",
|
|
102
102
|
className: o(
|
|
103
103
|
"flex w-[200px] shrink-0 flex-col border-r bg-navigation-canvas",
|
|
104
|
-
|
|
104
|
+
c
|
|
105
105
|
),
|
|
106
106
|
children: /* @__PURE__ */ e("div", { className: "flex flex-1 flex-col py-2 gap-1 overflow-y-auto", children: i.map((a) => {
|
|
107
107
|
const r = n === a.id;
|
|
@@ -134,13 +134,13 @@ const S = ({
|
|
|
134
134
|
}
|
|
135
135
|
),
|
|
136
136
|
/* @__PURE__ */ t("div", { className: "flex items-center gap-1 min-w-0", children: [
|
|
137
|
-
/* @__PURE__ */ t(
|
|
137
|
+
/* @__PURE__ */ t(d, { children: [
|
|
138
138
|
/* @__PURE__ */ e(h, { asChild: !0, children: /* @__PURE__ */ e("span", { className: "truncate font-['Manrope']", children: a.label }) }),
|
|
139
139
|
/* @__PURE__ */ e(f, { variant: "tertiary", side: "right", children: a.tooltipKeybinding ? /* @__PURE__ */ t("span", { className: "flex items-center gap-2", children: [
|
|
140
140
|
a.label,
|
|
141
141
|
" ",
|
|
142
142
|
/* @__PURE__ */ e(
|
|
143
|
-
|
|
143
|
+
S,
|
|
144
144
|
{
|
|
145
145
|
keybinding: a.tooltipKeybinding,
|
|
146
146
|
size: "sm"
|
|
@@ -152,7 +152,7 @@ const S = ({
|
|
|
152
152
|
] })
|
|
153
153
|
] }),
|
|
154
154
|
/* @__PURE__ */ t("div", { className: "flex items-center gap-1 shrink-0 ml-1", children: [
|
|
155
|
-
a.count !== void 0 && a.count > 0 && /* @__PURE__ */ t(
|
|
155
|
+
a.count !== void 0 && a.count > 0 && /* @__PURE__ */ t(d, { children: [
|
|
156
156
|
/* @__PURE__ */ e(h, { asChild: !0, children: /* @__PURE__ */ e(
|
|
157
157
|
"span",
|
|
158
158
|
{
|
|
@@ -168,16 +168,16 @@ const S = ({
|
|
|
168
168
|
{ count: a.count }
|
|
169
169
|
) })
|
|
170
170
|
] }),
|
|
171
|
-
a.hasError && /* @__PURE__ */ t(
|
|
172
|
-
/* @__PURE__ */ e(h, { asChild: !0, children: /* @__PURE__ */ e(
|
|
171
|
+
a.hasError && /* @__PURE__ */ t(d, { children: [
|
|
172
|
+
/* @__PURE__ */ e(h, { asChild: !0, children: /* @__PURE__ */ e(u, { className: "h-5 w-5 shrink-0 text-danger" }) }),
|
|
173
173
|
/* @__PURE__ */ e(f, { variant: "tertiary", children: s("filterPanel.tabContainsErrors") })
|
|
174
174
|
] }),
|
|
175
|
-
a.hasWarning && /* @__PURE__ */ t(
|
|
176
|
-
/* @__PURE__ */ e(h, { asChild: !0, children: /* @__PURE__ */ e(
|
|
175
|
+
a.hasWarning && /* @__PURE__ */ t(d, { children: [
|
|
176
|
+
/* @__PURE__ */ e(h, { asChild: !0, children: /* @__PURE__ */ e(u, { className: "h-5 w-5 shrink-0 text-warning" }) }),
|
|
177
177
|
/* @__PURE__ */ e(f, { variant: "tertiary", children: s("filterPanel.tabHasWarnings") })
|
|
178
178
|
] }),
|
|
179
|
-
a.hasInfo && /* @__PURE__ */ t(
|
|
180
|
-
/* @__PURE__ */ e(h, { asChild: !0, children: /* @__PURE__ */ e(
|
|
179
|
+
a.hasInfo && /* @__PURE__ */ t(d, { children: [
|
|
180
|
+
/* @__PURE__ */ e(h, { asChild: !0, children: /* @__PURE__ */ e(u, { className: "h-5 w-5 shrink-0 text-content-icon" }) }),
|
|
181
181
|
/* @__PURE__ */ e(f, { variant: "tertiary", children: s("filterPanel.additionalInfoAvailable") })
|
|
182
182
|
] })
|
|
183
183
|
] })
|
|
@@ -188,11 +188,12 @@ const S = ({
|
|
|
188
188
|
}) })
|
|
189
189
|
}
|
|
190
190
|
);
|
|
191
|
-
},
|
|
191
|
+
}, _ = k("filter-panel", {
|
|
192
192
|
part: "body",
|
|
193
193
|
displayName: "FilterPanelBody",
|
|
194
|
-
className: "flex flex-1 flex-col overflow-auto bg-canvas-elevated p-4"
|
|
195
|
-
|
|
194
|
+
className: "flex flex-1 flex-col overflow-auto bg-canvas-elevated p-4",
|
|
195
|
+
scrollSurface: !0
|
|
196
|
+
}), q = ({
|
|
196
197
|
children: i,
|
|
197
198
|
className: n,
|
|
198
199
|
leftAction: l
|
|
@@ -211,9 +212,9 @@ const S = ({
|
|
|
211
212
|
}
|
|
212
213
|
);
|
|
213
214
|
export {
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
215
|
+
R as FilterPanel,
|
|
216
|
+
_ as FilterPanelBody,
|
|
217
|
+
q as FilterPanelFooter,
|
|
218
|
+
I as FilterPanelHeader,
|
|
219
|
+
W as FilterPanelSidebar
|
|
219
220
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { jsx as e, jsxs as
|
|
1
|
+
import { jsx as e, jsxs as r } from "react/jsx-runtime";
|
|
2
2
|
import * as C from "react";
|
|
3
3
|
import { HorizontalScroller as S } from "../../layout/horizontal-scroller/horizontal-scroller.js";
|
|
4
4
|
import { TagGroup as z } from "../../primitives/tag-group/tag-group.js";
|
|
@@ -7,7 +7,7 @@ import { Tooltip as b, TooltipTrigger as w, TooltipContent as y } from "../../fe
|
|
|
7
7
|
import { PopoverContent as $, Popover as O, PopoverTrigger as j } from "../../feedback/popover/popover.js";
|
|
8
8
|
import { Button as P } from "../../primitives/button/button.js";
|
|
9
9
|
import { Checkmark as A, Copy as R, Cross as F } from "impact-nova-icons";
|
|
10
|
-
const T = "whitespace-nowrap bg-accent text-accent-foreground hover:bg-accent/80 border-0
|
|
10
|
+
const T = "whitespace-nowrap bg-accent text-accent-foreground hover:bg-accent/80 border-0 px-2 text-xs font-medium font-['Manrope'] cursor-pointer focus:!ring-inset focus:!ring-offset-0 focus:!ring-brand data-[state=open]:!ring-inset data-[state=open]:!ring-offset-0 data-[state=open]:!ring-brand", I = ({
|
|
11
11
|
remainingValues: s,
|
|
12
12
|
viewAllTrigger: c = "expand",
|
|
13
13
|
onViewAll: h,
|
|
@@ -16,10 +16,10 @@ const T = "whitespace-nowrap bg-accent text-accent-foreground hover:bg-accent/80
|
|
|
16
16
|
isCopyable: o = !1,
|
|
17
17
|
externalCopyFunction: m
|
|
18
18
|
}) => {
|
|
19
|
-
const [i,
|
|
20
|
-
navigator.clipboard.writeText(String(l)), d(a),
|
|
21
|
-
},
|
|
22
|
-
c === "custom" ? h?.() :
|
|
19
|
+
const [i, f] = C.useState(!1), [n, d] = C.useState(null), g = (t, l, a) => {
|
|
20
|
+
navigator.clipboard.writeText(String(l)), d(a), t.currentTarget.blur(), setTimeout(() => d(null), 1500);
|
|
21
|
+
}, v = i ? s : s.slice(0, 3), x = s.length > 3, p = () => {
|
|
22
|
+
c === "custom" ? h?.() : f(!0);
|
|
23
23
|
};
|
|
24
24
|
return /* @__PURE__ */ e(
|
|
25
25
|
$,
|
|
@@ -27,29 +27,29 @@ const T = "whitespace-nowrap bg-accent text-accent-foreground hover:bg-accent/80
|
|
|
27
27
|
className: "w-[200px] p-0 rounded-[8px] bg-canvas-elevated shadow-elevation-floating border-none",
|
|
28
28
|
align: "start",
|
|
29
29
|
sideOffset: 8,
|
|
30
|
-
onOpenAutoFocus: (
|
|
31
|
-
children: /* @__PURE__ */
|
|
30
|
+
onOpenAutoFocus: (t) => t.preventDefault(),
|
|
31
|
+
children: /* @__PURE__ */ r("div", { className: "flex flex-col py-2 px-[6px]", children: [
|
|
32
32
|
/* @__PURE__ */ e(
|
|
33
33
|
"div",
|
|
34
34
|
{
|
|
35
35
|
className: `flex flex-col gap-1 mb-2 ${i ? "max-h-[180px] overflow-y-auto" : ""}`,
|
|
36
|
-
children:
|
|
36
|
+
children: v.map((t, l) => /* @__PURE__ */ r(
|
|
37
37
|
"div",
|
|
38
38
|
{
|
|
39
39
|
className: "flex items-center justify-between text-[14px] font-medium leading-[20px] text-foreground px-3 py-2 overflow-hidden hover:bg-secondary rounded group shrink-0",
|
|
40
40
|
children: [
|
|
41
|
-
/* @__PURE__ */
|
|
42
|
-
/* @__PURE__ */ e(w, { asChild: !0, children: /* @__PURE__ */ e("span", { className: "truncate", children: String(
|
|
43
|
-
/* @__PURE__ */ e(y, { variant: "tertiary", side: "right", children: String(
|
|
41
|
+
/* @__PURE__ */ r(b, { children: [
|
|
42
|
+
/* @__PURE__ */ e(w, { asChild: !0, children: /* @__PURE__ */ e("span", { className: "truncate", children: String(t) }) }),
|
|
43
|
+
/* @__PURE__ */ e(y, { variant: "tertiary", side: "right", children: String(t) })
|
|
44
44
|
] }),
|
|
45
|
-
/* @__PURE__ */
|
|
45
|
+
/* @__PURE__ */ r("div", { className: "flex items-center shrink-0", children: [
|
|
46
46
|
o && /* @__PURE__ */ e(
|
|
47
47
|
"button",
|
|
48
48
|
{
|
|
49
49
|
onClick: (a) => {
|
|
50
|
-
a.stopPropagation(), m ? m({ e: a, val:
|
|
50
|
+
a.stopPropagation(), m ? m({ e: a, val: t, index: l }) : g(a, t, l);
|
|
51
51
|
},
|
|
52
|
-
"aria-label": `Copy ${String(
|
|
52
|
+
"aria-label": `Copy ${String(t)}`,
|
|
53
53
|
className: "ms-2 flex h-4 w-4 shrink-0 items-center justify-center rounded-full text-content-icon hover:bg-scrim-hover hover:text-content-secondary opacity-0 group-hover:opacity-100 focus:opacity-100 transition-opacity",
|
|
54
54
|
children: n === l ? /* @__PURE__ */ e(A, { size: 12, className: "text-success" }) : /* @__PURE__ */ e(R, { size: 12 })
|
|
55
55
|
}
|
|
@@ -58,9 +58,9 @@ const T = "whitespace-nowrap bg-accent text-accent-foreground hover:bg-accent/80
|
|
|
58
58
|
"button",
|
|
59
59
|
{
|
|
60
60
|
onClick: (a) => {
|
|
61
|
-
a.stopPropagation(), u(
|
|
61
|
+
a.stopPropagation(), u(t);
|
|
62
62
|
},
|
|
63
|
-
"aria-label": `Remove ${String(
|
|
63
|
+
"aria-label": `Remove ${String(t)}`,
|
|
64
64
|
className: "ms-2 flex h-4 w-4 shrink-0 items-center justify-center rounded-full text-content-icon hover:bg-scrim-hover hover:text-content-secondary opacity-0 group-hover:opacity-100 focus:opacity-100 transition-opacity",
|
|
65
65
|
children: /* @__PURE__ */ e(F, { size: 12 })
|
|
66
66
|
}
|
|
@@ -72,7 +72,7 @@ const T = "whitespace-nowrap bg-accent text-accent-foreground hover:bg-accent/80
|
|
|
72
72
|
))
|
|
73
73
|
}
|
|
74
74
|
),
|
|
75
|
-
!i && x && /* @__PURE__ */
|
|
75
|
+
!i && x && /* @__PURE__ */ r("div", { className: "flex flex-col gap-2", children: [
|
|
76
76
|
/* @__PURE__ */ e("div", { className: "h-px bg-stroke-hairline w-full" }),
|
|
77
77
|
/* @__PURE__ */ e(
|
|
78
78
|
P,
|
|
@@ -98,30 +98,30 @@ const T = "whitespace-nowrap bg-accent text-accent-foreground hover:bg-accent/80
|
|
|
98
98
|
{
|
|
99
99
|
items: s,
|
|
100
100
|
renderItem: (o, m) => {
|
|
101
|
-
const i = Array.isArray(o.value) ? o.value : [o.value],
|
|
102
|
-
return /* @__PURE__ */
|
|
101
|
+
const i = Array.isArray(o.value) ? o.value : [o.value], f = i.slice(0, 2), n = i.slice(2), d = !!o.overflow, g = o.overflow?.label ? o.overflow.label : o.overflow?.count ? `+${o.overflow.count}` : null, v = n.length > 0, x = d || v, p = `+${n.length}`;
|
|
102
|
+
return /* @__PURE__ */ r("div", { className: "flex items-center px-1", children: [
|
|
103
103
|
m > 0 && /* @__PURE__ */ e("div", { className: "mx-3 h-4 w-px bg-stroke-hairline shrink-0" }),
|
|
104
|
-
/* @__PURE__ */
|
|
105
|
-
/* @__PURE__ */
|
|
104
|
+
/* @__PURE__ */ r("div", { className: "flex items-center gap-2", children: [
|
|
105
|
+
/* @__PURE__ */ r("span", { className: "text-xs font-medium leading-[21px] text-secondary-foreground whitespace-nowrap", children: [
|
|
106
106
|
o.label,
|
|
107
107
|
o.required && /* @__PURE__ */ e("span", { className: "text-validation ms-0.5", children: "*" })
|
|
108
108
|
] }),
|
|
109
|
-
/* @__PURE__ */
|
|
109
|
+
/* @__PURE__ */ r("div", { className: "flex items-center gap-1", children: [
|
|
110
110
|
/* @__PURE__ */ e(
|
|
111
111
|
z,
|
|
112
112
|
{
|
|
113
113
|
spacing: "sm",
|
|
114
|
-
tags:
|
|
115
|
-
label: String(
|
|
114
|
+
tags: f.map((t) => ({
|
|
115
|
+
label: String(t),
|
|
116
116
|
variant: "secondary",
|
|
117
117
|
size: "md",
|
|
118
118
|
shape: "rounded",
|
|
119
119
|
removable: o.removable,
|
|
120
|
-
onRemove: () => c(o.id,
|
|
120
|
+
onRemove: () => c(o.id, t)
|
|
121
121
|
}))
|
|
122
122
|
}
|
|
123
123
|
),
|
|
124
|
-
x && (d ? /* @__PURE__ */
|
|
124
|
+
x && (d ? /* @__PURE__ */ r(b, { children: [
|
|
125
125
|
/* @__PURE__ */ e(w, { asChild: !0, children: /* @__PURE__ */ e(
|
|
126
126
|
k,
|
|
127
127
|
{
|
|
@@ -132,15 +132,15 @@ const T = "whitespace-nowrap bg-accent text-accent-foreground hover:bg-accent/80
|
|
|
132
132
|
className: T,
|
|
133
133
|
"aria-label": `${o.overflow?.count || n.length} more filters for ${o.label}`,
|
|
134
134
|
onClick: () => h?.(o.id),
|
|
135
|
-
children:
|
|
135
|
+
children: g || p
|
|
136
136
|
}
|
|
137
137
|
) }),
|
|
138
|
-
/* @__PURE__ */
|
|
138
|
+
/* @__PURE__ */ r(y, { variant: "tertiary", side: "top", children: [
|
|
139
139
|
o.overflow?.count || n.length,
|
|
140
140
|
" more filters"
|
|
141
141
|
] })
|
|
142
|
-
] }) : /* @__PURE__ */
|
|
143
|
-
/* @__PURE__ */
|
|
142
|
+
] }) : /* @__PURE__ */ r(O, { children: [
|
|
143
|
+
/* @__PURE__ */ r(b, { children: [
|
|
144
144
|
/* @__PURE__ */ e(w, { asChild: !0, children: /* @__PURE__ */ e(j, { asChild: !0, children: /* @__PURE__ */ e(
|
|
145
145
|
k,
|
|
146
146
|
{
|
|
@@ -152,7 +152,7 @@ const T = "whitespace-nowrap bg-accent text-accent-foreground hover:bg-accent/80
|
|
|
152
152
|
children: p
|
|
153
153
|
}
|
|
154
154
|
) }) }),
|
|
155
|
-
/* @__PURE__ */
|
|
155
|
+
/* @__PURE__ */ r(y, { variant: "tertiary", side: "top", children: [
|
|
156
156
|
n.length,
|
|
157
157
|
" more filters"
|
|
158
158
|
] })
|
|
@@ -163,7 +163,7 @@ const T = "whitespace-nowrap bg-accent text-accent-foreground hover:bg-accent/80
|
|
|
163
163
|
remainingValues: n,
|
|
164
164
|
viewAllTrigger: o.viewAllTrigger,
|
|
165
165
|
onViewAll: u,
|
|
166
|
-
onItemRemove: (
|
|
166
|
+
onItemRemove: (t) => c(o.id, t),
|
|
167
167
|
isRemovable: o.removable,
|
|
168
168
|
isCopyable: o.copyable
|
|
169
169
|
}
|