impact-nova 2.2.2 → 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/expandable-list-item/expandable-list-item-attributes.js +6 -7
- 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/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/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/feedback/tooltip/tab-tooltip-render.js +2 -3
- package/dist/components/flows/filter-panel/filter-panel.js +61 -57
- 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 +2 -1
|
@@ -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,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
|
};
|
|
@@ -1,26 +1,27 @@
|
|
|
1
1
|
import { jsx as e, jsxs as t } from "react/jsx-runtime";
|
|
2
|
-
import
|
|
3
|
-
import { Sheet as
|
|
2
|
+
import v from "react";
|
|
3
|
+
import { Sheet as b, SheetContent as g, SheetDescription as N, SheetTitle as y, SheetClose as w } from "../../feedback/sheet/sheet.js";
|
|
4
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 C, Cross as F, InfoBadge 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
8
|
import { Tooltip as d, TooltipTrigger as h, TooltipContent as f } from "../../feedback/tooltip/tooltip.js";
|
|
9
|
-
import { Kbd as
|
|
10
|
-
import { useImpactNovaI18n as
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
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
|
+
title: i,
|
|
14
|
+
children: n,
|
|
15
|
+
className: l
|
|
15
16
|
}) => {
|
|
16
|
-
const { t: c } =
|
|
17
|
+
const { t: c } = x();
|
|
17
18
|
return /* @__PURE__ */ t(
|
|
18
19
|
"div",
|
|
19
20
|
{
|
|
20
21
|
"data-component": "filter-panel-header",
|
|
21
22
|
className: o(
|
|
22
23
|
"flex shrink-0 flex-row items-center justify-between border-b px-4 py-[9px] bg-canvas-elevated",
|
|
23
|
-
|
|
24
|
+
l
|
|
24
25
|
),
|
|
25
26
|
children: [
|
|
26
27
|
/* @__PURE__ */ t("div", { className: "flex items-center gap-3", children: [
|
|
@@ -32,10 +33,10 @@ const j = ({
|
|
|
32
33
|
children: /* @__PURE__ */ e(C, { className: "size-5 shrink-0" })
|
|
33
34
|
}
|
|
34
35
|
),
|
|
35
|
-
/* @__PURE__ */ e(y, { className: "text-lg font-bold text-content", children:
|
|
36
|
+
/* @__PURE__ */ e(y, { className: "text-lg font-bold text-content", children: i })
|
|
36
37
|
] }),
|
|
37
38
|
/* @__PURE__ */ t("div", { className: "flex items-center gap-2", children: [
|
|
38
|
-
|
|
39
|
+
n,
|
|
39
40
|
/* @__PURE__ */ e(w, { asChild: !0, children: /* @__PURE__ */ e(
|
|
40
41
|
P,
|
|
41
42
|
{
|
|
@@ -52,46 +53,48 @@ const j = ({
|
|
|
52
53
|
}
|
|
53
54
|
);
|
|
54
55
|
}, R = ({
|
|
55
|
-
open:
|
|
56
|
-
onOpenChange:
|
|
57
|
-
title:
|
|
56
|
+
open: i,
|
|
57
|
+
onOpenChange: n,
|
|
58
|
+
title: l = "Filter panel",
|
|
58
59
|
children: c,
|
|
59
|
-
header:
|
|
60
|
-
sidebar:
|
|
61
|
-
className:
|
|
62
|
-
preventClose:
|
|
63
|
-
}) => /* @__PURE__ */ e(
|
|
60
|
+
header: s,
|
|
61
|
+
sidebar: p,
|
|
62
|
+
className: m,
|
|
63
|
+
preventClose: a = !1
|
|
64
|
+
}) => /* @__PURE__ */ e(b, { open: i, onOpenChange: n, children: /* @__PURE__ */ t(
|
|
64
65
|
g,
|
|
65
66
|
{
|
|
66
67
|
side: "right",
|
|
67
68
|
className: o(
|
|
68
69
|
"w-full !max-w-[840px] p-0 sm:!max-w-[840px] gap-0 border-l shadow-xl transition-all duration-300 ease-in-out bg-canvas-elevated",
|
|
69
|
-
|
|
70
|
+
m
|
|
70
71
|
),
|
|
71
|
-
onInteractOutside: (
|
|
72
|
-
|
|
72
|
+
onInteractOutside: (r) => {
|
|
73
|
+
a && r.preventDefault();
|
|
73
74
|
},
|
|
74
|
-
onEscapeKeyDown: (
|
|
75
|
-
|
|
75
|
+
onEscapeKeyDown: (r) => {
|
|
76
|
+
a && r.preventDefault();
|
|
76
77
|
},
|
|
77
78
|
children: [
|
|
78
79
|
/* @__PURE__ */ e(N, { className: "sr-only", children: "Select filters to apply to the current view." }),
|
|
79
80
|
/* @__PURE__ */ t("div", { className: "flex h-full flex-col bg-canvas-elevated", "data-component": "filter-panel", children: [
|
|
80
|
-
|
|
81
|
+
s || /* @__PURE__ */ e(I, { title: l }),
|
|
81
82
|
/* @__PURE__ */ t("div", { className: "flex flex-1 overflow-hidden", children: [
|
|
82
|
-
|
|
83
|
+
p,
|
|
83
84
|
/* @__PURE__ */ e("div", { className: "flex flex-col flex-1 overflow-hidden", children: c })
|
|
84
85
|
] })
|
|
85
86
|
] })
|
|
86
87
|
]
|
|
87
88
|
}
|
|
88
89
|
) }), W = ({
|
|
89
|
-
items:
|
|
90
|
-
activeTab:
|
|
91
|
-
onTabChange:
|
|
90
|
+
items: i,
|
|
91
|
+
activeTab: n,
|
|
92
|
+
onTabChange: l,
|
|
92
93
|
className: c
|
|
93
94
|
}) => {
|
|
94
|
-
const { t:
|
|
95
|
+
const { t: s } = x(), p = j(), m = (a) => {
|
|
96
|
+
a !== n && p(), l(a);
|
|
97
|
+
};
|
|
95
98
|
return /* @__PURE__ */ e(
|
|
96
99
|
"div",
|
|
97
100
|
{
|
|
@@ -100,23 +103,23 @@ const j = ({
|
|
|
100
103
|
"flex w-[200px] shrink-0 flex-col border-r bg-navigation-canvas",
|
|
101
104
|
c
|
|
102
105
|
),
|
|
103
|
-
children: /* @__PURE__ */ e("div", { className: "flex flex-1 flex-col py-2 gap-1 overflow-y-auto", children:
|
|
104
|
-
const
|
|
105
|
-
return /* @__PURE__ */ t(
|
|
106
|
+
children: /* @__PURE__ */ e("div", { className: "flex flex-1 flex-col py-2 gap-1 overflow-y-auto", children: i.map((a) => {
|
|
107
|
+
const r = n === a.id;
|
|
108
|
+
return /* @__PURE__ */ t(v.Fragment, { children: [
|
|
106
109
|
a.separator && /* @__PURE__ */ e("div", { className: "my-2 h-px bg-stroke-hairline" }),
|
|
107
110
|
/* @__PURE__ */ t(
|
|
108
111
|
"button",
|
|
109
112
|
{
|
|
110
113
|
type: "button",
|
|
111
|
-
autoFocus:
|
|
112
|
-
onClick: () =>
|
|
114
|
+
autoFocus: r,
|
|
115
|
+
onClick: () => m(a.id),
|
|
113
116
|
"data-component": "filter-panel-sidebar-item",
|
|
114
|
-
"data-active":
|
|
117
|
+
"data-active": r ? "true" : "false",
|
|
115
118
|
"data-tab": a.id,
|
|
116
119
|
"data-shortcut-id": a.shortcutId,
|
|
117
120
|
className: o(
|
|
118
121
|
"group flex items-center justify-between px-3 py-[6px] mx-2 rounded-lg text-left text-sm font-medium transition-colors",
|
|
119
|
-
|
|
122
|
+
r ? "bg-canvas-accent text-brand" : "text-content-secondary hover:bg-canvas-accent"
|
|
120
123
|
),
|
|
121
124
|
children: [
|
|
122
125
|
/* @__PURE__ */ t("div", { className: "flex items-center gap-2 min-w-0 flex-1", children: [
|
|
@@ -125,7 +128,7 @@ const j = ({
|
|
|
125
128
|
{
|
|
126
129
|
className: o(
|
|
127
130
|
"shrink-0",
|
|
128
|
-
|
|
131
|
+
r ? "text-brand" : "text-content-secondary"
|
|
129
132
|
),
|
|
130
133
|
children: a.icon
|
|
131
134
|
}
|
|
@@ -137,7 +140,7 @@ const j = ({
|
|
|
137
140
|
a.label,
|
|
138
141
|
" ",
|
|
139
142
|
/* @__PURE__ */ e(
|
|
140
|
-
|
|
143
|
+
S,
|
|
141
144
|
{
|
|
142
145
|
keybinding: a.tooltipKeybinding,
|
|
143
146
|
size: "sm"
|
|
@@ -155,27 +158,27 @@ const j = ({
|
|
|
155
158
|
{
|
|
156
159
|
className: o(
|
|
157
160
|
"inline-flex h-5 min-w-5 items-center justify-center rounded-full px-1.5 text-[11px] font-medium tabular-nums leading-none shrink-0",
|
|
158
|
-
|
|
161
|
+
r ? "bg-canvas-elevated text-brand border border-stroke-subtle" : "bg-brand-tint border border-stroke-subtle"
|
|
159
162
|
),
|
|
160
163
|
children: a.count
|
|
161
164
|
}
|
|
162
165
|
) }),
|
|
163
|
-
/* @__PURE__ */ e(f, { variant: "tertiary", side: "top", children:
|
|
166
|
+
/* @__PURE__ */ e(f, { variant: "tertiary", side: "top", children: s(
|
|
164
167
|
a.countBadgeContext === "savedFiltersTotal" ? "filterPanel.savedFiltersAvailableCount" : "filterPanel.filtersAppliedCount",
|
|
165
168
|
{ count: a.count }
|
|
166
169
|
) })
|
|
167
170
|
] }),
|
|
168
171
|
a.hasError && /* @__PURE__ */ t(d, { children: [
|
|
169
|
-
/* @__PURE__ */ e(h, { asChild: !0, children: /* @__PURE__ */ e(
|
|
170
|
-
/* @__PURE__ */ e(f, { variant: "tertiary", children:
|
|
172
|
+
/* @__PURE__ */ e(h, { asChild: !0, children: /* @__PURE__ */ e(u, { className: "h-5 w-5 shrink-0 text-danger" }) }),
|
|
173
|
+
/* @__PURE__ */ e(f, { variant: "tertiary", children: s("filterPanel.tabContainsErrors") })
|
|
171
174
|
] }),
|
|
172
175
|
a.hasWarning && /* @__PURE__ */ t(d, { children: [
|
|
173
|
-
/* @__PURE__ */ e(h, { asChild: !0, children: /* @__PURE__ */ e(
|
|
174
|
-
/* @__PURE__ */ e(f, { variant: "tertiary", children:
|
|
176
|
+
/* @__PURE__ */ e(h, { asChild: !0, children: /* @__PURE__ */ e(u, { className: "h-5 w-5 shrink-0 text-warning" }) }),
|
|
177
|
+
/* @__PURE__ */ e(f, { variant: "tertiary", children: s("filterPanel.tabHasWarnings") })
|
|
175
178
|
] }),
|
|
176
179
|
a.hasInfo && /* @__PURE__ */ t(d, { children: [
|
|
177
|
-
/* @__PURE__ */ e(h, { asChild: !0, children: /* @__PURE__ */ e(
|
|
178
|
-
/* @__PURE__ */ e(f, { variant: "tertiary", children:
|
|
180
|
+
/* @__PURE__ */ e(h, { asChild: !0, children: /* @__PURE__ */ e(u, { className: "h-5 w-5 shrink-0 text-content-icon" }) }),
|
|
181
|
+
/* @__PURE__ */ e(f, { variant: "tertiary", children: s("filterPanel.additionalInfoAvailable") })
|
|
179
182
|
] })
|
|
180
183
|
] })
|
|
181
184
|
]
|
|
@@ -188,22 +191,23 @@ const j = ({
|
|
|
188
191
|
}, _ = k("filter-panel", {
|
|
189
192
|
part: "body",
|
|
190
193
|
displayName: "FilterPanelBody",
|
|
191
|
-
className: "flex flex-1 flex-col overflow-auto bg-canvas-elevated p-4"
|
|
194
|
+
className: "flex flex-1 flex-col overflow-auto bg-canvas-elevated p-4",
|
|
195
|
+
scrollSurface: !0
|
|
192
196
|
}), q = ({
|
|
193
|
-
children:
|
|
194
|
-
className:
|
|
195
|
-
leftAction:
|
|
197
|
+
children: i,
|
|
198
|
+
className: n,
|
|
199
|
+
leftAction: l
|
|
196
200
|
}) => /* @__PURE__ */ t(
|
|
197
201
|
"div",
|
|
198
202
|
{
|
|
199
203
|
"data-component": "filter-panel-footer",
|
|
200
204
|
className: o(
|
|
201
205
|
"flex items-center justify-between border-t bg-canvas-elevated px-4 py-3 shrink-0",
|
|
202
|
-
|
|
206
|
+
n
|
|
203
207
|
),
|
|
204
208
|
children: [
|
|
205
|
-
/* @__PURE__ */ e("div", { children:
|
|
206
|
-
/* @__PURE__ */ e("div", { className: "flex items-center gap-3", children:
|
|
209
|
+
/* @__PURE__ */ e("div", { children: l && l }),
|
|
210
|
+
/* @__PURE__ */ e("div", { className: "flex items-center gap-3", children: i })
|
|
207
211
|
]
|
|
208
212
|
}
|
|
209
213
|
);
|
|
@@ -211,6 +215,6 @@ export {
|
|
|
211
215
|
R as FilterPanel,
|
|
212
216
|
_ as FilterPanelBody,
|
|
213
217
|
q as FilterPanelFooter,
|
|
214
|
-
|
|
218
|
+
I as FilterPanelHeader,
|
|
215
219
|
W as FilterPanelSidebar
|
|
216
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
|
}
|