impact-nova 2.2.6 → 2.2.8
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/cell-renderers/link-with-batch-cell-renderer.js +96 -120
- package/dist/components/data/ag-grid-react/headers/components/section-renderers.js +19 -18
- package/dist/components/data/ag-grid-react/info-system-story-columns.d.ts +38 -1
- package/dist/components/data/data-table/data-table-saved-views.js +70 -79
- package/dist/components/data-display/badge/badge.variants.d.ts +2 -2
- package/dist/components/feedback/alert/alert.variants.d.ts +1 -1
- package/dist/components/feedback/tooltip/badge-overflow-tooltip.d.ts +19 -0
- package/dist/components/feedback/tooltip/badge-overflow-tooltip.js +48 -0
- package/dist/components/feedback/tooltip/index.d.ts +2 -0
- package/dist/components/feedback/tooltip/index.js +11 -9
- package/dist/components/feedback/tooltip/overflow-tooltip.js +73 -50
- package/dist/components/feedback/tooltip/overflow-tooltip.types.d.ts +5 -0
- package/dist/components/feedback/tooltip/tooltip.d.ts +2 -2
- package/dist/components/feedback/tooltip/tooltip.js +65 -28
- package/dist/components/feedback/tooltip/tooltip.variants.js +1 -1
- package/dist/components/feedback/tooltip/use-overflow-tooltip.js +89 -35
- package/dist/components/flows/filter-panel/filter-panel.js +33 -29
- package/dist/components/flows/filter-strip/filter-summary.js +126 -137
- package/dist/components/flows/filter-strip/filter-tag-list.js +97 -89
- package/dist/components/forms/prompt/prompt.js +13 -13
- package/dist/components/forms/prompt/prompt.variants.d.ts +1 -1
- package/dist/components/forms/select/components/SelectMenuPanel.js +26 -22
- package/dist/components/forms/select/components/SelectOptionRow.js +67 -64
- package/dist/components/forms/select/components/Submenu.js +40 -35
- package/dist/components/forms/select/hooks/useSuppressOptionClickForTextSelection.d.ts +5 -0
- package/dist/components/forms/select/hooks/useSuppressOptionClickForTextSelection.js +28 -0
- package/dist/components/forms/select/select.js +121 -120
- package/dist/components/forms/select/utils/shouldSuppressOptionClickForTextSelection.d.ts +5 -0
- package/dist/components/forms/select/utils/shouldSuppressOptionClickForTextSelection.js +16 -0
- package/dist/components/primitives/tag/tag.variants.d.ts +1 -1
- package/dist/impact-nova.css +1 -1
- package/dist/index.js +153 -151
- package/dist/lib/overlay/prevent-dismiss-on-tooltip-outside.d.ts +3 -0
- package/dist/lib/overlay/prevent-dismiss-on-tooltip-outside.js +34 -0
- package/dist/lib/tooltip/tooltip-content-interaction.d.ts +4 -0
- package/dist/lib/tooltip/tooltip-content-interaction.js +21 -0
- package/dist/llms/rules/installation.js +1 -1
- package/dist/llms/rules/requirements.js +1 -1
- package/dist/providers/app-providers.js +18 -11
- package/package.json +1 -1
|
@@ -1,48 +1,48 @@
|
|
|
1
1
|
import { jsxs as l, Fragment as X, jsx as t } from "react/jsx-runtime";
|
|
2
2
|
import * as n from "react";
|
|
3
|
-
import { ChevronRight as
|
|
3
|
+
import { ChevronRight as xe, Star as I, Search as ye, Bookmark as we, Pencil as Ne, Bin as Te } from "impact-nova-icons";
|
|
4
4
|
import { cn as m } from "../../../lib/utils.js";
|
|
5
|
-
import { useImpactNovaI18n as
|
|
6
|
-
import { Popover as
|
|
7
|
-
import { OverflowTooltip as
|
|
5
|
+
import { useImpactNovaI18n as Ve } from "../../../i18n/use-impact-nova-i18n.js";
|
|
6
|
+
import { Popover as ke, PopoverTrigger as De, PopoverContent as Ce } from "../../feedback/popover/popover.js";
|
|
7
|
+
import { OverflowTooltip as Se } from "../../feedback/tooltip/overflow-tooltip.js";
|
|
8
|
+
import { BadgeOverflowTooltip as ze } from "../../feedback/tooltip/badge-overflow-tooltip.js";
|
|
8
9
|
import { Button as u } from "../../primitives/button/button.js";
|
|
9
|
-
import { Badge as
|
|
10
|
-
import { badgeVariants as ze } from "../../data-display/badge/badge.variants.js";
|
|
10
|
+
import { Badge as Z } from "../../data-display/badge/badge.js";
|
|
11
11
|
import { Input as Me } from "../../forms/input/input.js";
|
|
12
|
-
import { Separator as
|
|
12
|
+
import { Separator as q } from "../../data-display/separator/separator.js";
|
|
13
13
|
import { Skeleton as R } from "../../data-display/skeleton/skeleton.js";
|
|
14
14
|
import { Prompt as Ae } from "../../forms/prompt/prompt.js";
|
|
15
15
|
function Pe(v) {
|
|
16
16
|
return v.isSystemView ? "system" : v.isDefaultView ? "default" : v.isActive ? "active" : "other";
|
|
17
17
|
}
|
|
18
|
-
const Oe = ["default", "active", "system"],
|
|
18
|
+
const Oe = ["default", "active", "system"], We = ({
|
|
19
19
|
isSaveViewEnabled: v = !0,
|
|
20
20
|
views: o,
|
|
21
|
-
activeViewSummary:
|
|
22
|
-
viewTypeOptions:
|
|
21
|
+
activeViewSummary: ee,
|
|
22
|
+
viewTypeOptions: te,
|
|
23
23
|
menuOpen: E,
|
|
24
|
-
defaultMenuOpen:
|
|
24
|
+
defaultMenuOpen: ae = !1,
|
|
25
25
|
onMenuOpenChange: j,
|
|
26
26
|
onSearch: D,
|
|
27
27
|
isLoadingViews: L = !1,
|
|
28
28
|
customListContent: U,
|
|
29
|
-
disableApply:
|
|
30
|
-
className:
|
|
31
|
-
onSaveViewClick:
|
|
32
|
-
onApply:
|
|
33
|
-
onCancel:
|
|
34
|
-
onEditView:
|
|
35
|
-
onDeleteView:
|
|
29
|
+
disableApply: ne = !1,
|
|
30
|
+
className: ie,
|
|
31
|
+
onSaveViewClick: re,
|
|
32
|
+
onApply: le,
|
|
33
|
+
onCancel: se,
|
|
34
|
+
onEditView: oe,
|
|
35
|
+
onDeleteView: de,
|
|
36
36
|
onSetDefaultView: Q
|
|
37
37
|
}) => {
|
|
38
|
-
const { t: a } =
|
|
39
|
-
|
|
40
|
-
), p =
|
|
38
|
+
const { t: a } = Ve(), C = E !== void 0, [ce, N] = n.useState(null), [me, ue] = n.useState(
|
|
39
|
+
ae
|
|
40
|
+
), p = C ? !!E : me, f = n.useCallback(
|
|
41
41
|
(e) => {
|
|
42
|
-
|
|
42
|
+
C || ue(e), j?.(e);
|
|
43
43
|
},
|
|
44
|
-
[
|
|
45
|
-
), [x,
|
|
44
|
+
[C, j]
|
|
45
|
+
), [x, S] = n.useState("All"), [T, z] = n.useState(""), [F, M] = n.useState("");
|
|
46
46
|
n.useEffect(() => {
|
|
47
47
|
const e = window.setTimeout(() => M(T), 300);
|
|
48
48
|
return () => window.clearTimeout(e);
|
|
@@ -52,12 +52,12 @@ const Oe = ["default", "active", "system"], Ge = ({
|
|
|
52
52
|
const Y = n.useMemo(
|
|
53
53
|
() => o.find((e) => e.isActive),
|
|
54
54
|
[o]
|
|
55
|
-
), d = Y ?? null, _ =
|
|
55
|
+
), d = Y ?? null, _ = ee ?? Y?.viewName ?? a("dataTable.savedViewsNotApplicable"), [V, A] = n.useState(null), [y, $] = n.useState(null), K = n.useRef(!1);
|
|
56
56
|
n.useEffect(() => {
|
|
57
57
|
const e = p && !K.current;
|
|
58
58
|
if (K.current = p, e) {
|
|
59
59
|
const i = o.find((c) => c.isActive);
|
|
60
|
-
A(i?.id ?? null),
|
|
60
|
+
A(i?.id ?? null), S("All"), z(""), M("");
|
|
61
61
|
}
|
|
62
62
|
}, [p, o]);
|
|
63
63
|
const w = n.useMemo(() => x === "All" ? o : o.filter((e) => e.viewType === x), [o, x]), h = T.trim().toLowerCase(), k = n.useCallback(
|
|
@@ -76,27 +76,27 @@ const Oe = ["default", "active", "system"], Ge = ({
|
|
|
76
76
|
}, [w, h, k]), O = n.useMemo(() => {
|
|
77
77
|
const e = new Set(b.map((i) => i.id));
|
|
78
78
|
return P.filter((i) => !e.has(i.id));
|
|
79
|
-
}, [P, b]),
|
|
80
|
-
|
|
81
|
-
},
|
|
82
|
-
|
|
83
|
-
},
|
|
79
|
+
}, [P, b]), W = V === null ? null : o.find((e) => e.id === V) ?? null, pe = () => {
|
|
80
|
+
le?.(W, { activeView: d }), f(!1);
|
|
81
|
+
}, fe = () => {
|
|
82
|
+
se?.({ activeView: d, pendingView: W }), f(!1);
|
|
83
|
+
}, he = (e) => {
|
|
84
84
|
f(e), e || (z(""), M(""));
|
|
85
85
|
};
|
|
86
86
|
if (!v)
|
|
87
87
|
return null;
|
|
88
|
-
const
|
|
89
|
-
const B = V === e.id, s =
|
|
88
|
+
const be = o.length > 0, G = (e, i, c) => {
|
|
89
|
+
const B = V === e.id, s = ce === e.id, H = i === "priority" && !!e.isActive, ge = i === "list" && !!e.isActive, ve = !!(e.isEditable || e.isDeletable), g = !e.hideDefaultStar, J = ve || g;
|
|
90
90
|
return /* @__PURE__ */ l(
|
|
91
91
|
"div",
|
|
92
92
|
{
|
|
93
93
|
tabIndex: 0,
|
|
94
94
|
className: m(
|
|
95
|
-
"group mb-1 flex min-w-0 cursor-pointer items-
|
|
95
|
+
"group mb-1 flex min-w-0 cursor-pointer items-stretch rounded-lg px-3 py-2 text-left text-sm font-medium font-['Manrope'] transition-all duration-300 relative overflow-hidden",
|
|
96
96
|
!s && "hover:bg-canvas-muted",
|
|
97
|
-
!s &&
|
|
97
|
+
!s && H && !B && "bg-primary/10 dark:bg-primary/15",
|
|
98
98
|
!s && B && "bg-badge-info-muted text-badge-info-foreground",
|
|
99
|
-
!s && !B && !
|
|
99
|
+
!s && !B && !H && "text-foreground",
|
|
100
100
|
s && "pointer-events-none"
|
|
101
101
|
),
|
|
102
102
|
onClick: () => !s && A(e.id),
|
|
@@ -115,12 +115,12 @@ const Oe = ["default", "active", "system"], Ge = ({
|
|
|
115
115
|
}
|
|
116
116
|
),
|
|
117
117
|
/* @__PURE__ */ t(
|
|
118
|
-
|
|
118
|
+
Se,
|
|
119
119
|
{
|
|
120
120
|
triggerClassName: m(
|
|
121
|
-
"relative z-10 block min-w-0
|
|
122
|
-
|
|
123
|
-
|
|
121
|
+
"relative z-10 block min-w-0 flex-1 self-stretch truncate text-start overflow-hidden",
|
|
122
|
+
J && (e.isDefaultView && g ? "pe-7 group-hover:pe-[4.75rem]" : "pe-0 group-hover:pe-[4.75rem]"),
|
|
123
|
+
ge && "underline decoration-primary decoration-2 underline-offset-2"
|
|
124
124
|
),
|
|
125
125
|
content: e.viewName,
|
|
126
126
|
side: "right",
|
|
@@ -128,7 +128,7 @@ const Oe = ["default", "active", "system"], Ge = ({
|
|
|
128
128
|
children: e.viewName
|
|
129
129
|
}
|
|
130
130
|
),
|
|
131
|
-
|
|
131
|
+
J ? /* @__PURE__ */ l(
|
|
132
132
|
"div",
|
|
133
133
|
{
|
|
134
134
|
className: m(
|
|
@@ -148,9 +148,9 @@ const Oe = ["default", "active", "system"], Ge = ({
|
|
|
148
148
|
),
|
|
149
149
|
"aria-label": a("dataTable.savedViewsEdit"),
|
|
150
150
|
onClick: (r) => {
|
|
151
|
-
r.stopPropagation(), r.preventDefault(), f(!1),
|
|
151
|
+
r.stopPropagation(), r.preventDefault(), f(!1), oe?.(e, { activeView: d });
|
|
152
152
|
},
|
|
153
|
-
children: /* @__PURE__ */ t(
|
|
153
|
+
children: /* @__PURE__ */ t(Ne, { className: "size-3.5" })
|
|
154
154
|
}
|
|
155
155
|
) : null,
|
|
156
156
|
e.isDeletable ? /* @__PURE__ */ t(
|
|
@@ -167,7 +167,7 @@ const Oe = ["default", "active", "system"], Ge = ({
|
|
|
167
167
|
onClick: (r) => {
|
|
168
168
|
r.stopPropagation(), r.preventDefault(), f(!1), $(e);
|
|
169
169
|
},
|
|
170
|
-
children: /* @__PURE__ */ t(
|
|
170
|
+
children: /* @__PURE__ */ t(Te, { className: "size-3.5" })
|
|
171
171
|
}
|
|
172
172
|
) : null,
|
|
173
173
|
g ? e.isDefaultView ? /* @__PURE__ */ t(
|
|
@@ -214,14 +214,14 @@ const Oe = ["default", "active", "system"], Ge = ({
|
|
|
214
214
|
"data-component": "data-table-saved-views",
|
|
215
215
|
className: m(
|
|
216
216
|
"saved-view-bar-gradient mb-2 mx-4 flex min-w-0 flex-nowrap items-center justify-between gap-2 rounded-lg px-2 py-3",
|
|
217
|
-
|
|
217
|
+
ie
|
|
218
218
|
),
|
|
219
219
|
children: [
|
|
220
220
|
L ? /* @__PURE__ */ l("div", { className: "flex min-w-0 flex-1 items-center gap-1 overflow-hidden", children: [
|
|
221
221
|
/* @__PURE__ */ t(R, { className: "h-6 w-24 rounded-full bg-scrim-skeleton" }),
|
|
222
222
|
/* @__PURE__ */ t(R, { className: "h-6 w-6 shrink-0 rounded-md bg-scrim-skeleton" })
|
|
223
|
-
] }) :
|
|
224
|
-
/* @__PURE__ */ t(
|
|
223
|
+
] }) : be ? /* @__PURE__ */ t("div", { className: "flex min-w-0 flex-1 items-center justify-start gap-1 overflow-hidden", children: /* @__PURE__ */ l(ke, { open: p, onOpenChange: he, children: [
|
|
224
|
+
/* @__PURE__ */ t(De, { asChild: !0, children: /* @__PURE__ */ l(
|
|
225
225
|
"button",
|
|
226
226
|
{
|
|
227
227
|
type: "button",
|
|
@@ -231,23 +231,14 @@ const Oe = ["default", "active", "system"], Ge = ({
|
|
|
231
231
|
"aria-label": a("dataTable.savedViewsOpenMenu"),
|
|
232
232
|
children: [
|
|
233
233
|
/* @__PURE__ */ t(
|
|
234
|
-
|
|
234
|
+
ze,
|
|
235
235
|
{
|
|
236
|
-
|
|
237
|
-
triggerClassName: m(
|
|
238
|
-
ze({
|
|
239
|
-
variant: "outline",
|
|
240
|
-
color: "success",
|
|
241
|
-
size: "md",
|
|
242
|
-
shape: "circle",
|
|
243
|
-
layout: "default"
|
|
244
|
-
}),
|
|
245
|
-
"w-fit max-w-full min-w-0 shrink truncate font-['Manrope']"
|
|
246
|
-
),
|
|
236
|
+
label: _,
|
|
247
237
|
content: _,
|
|
238
|
+
badgeColor: "success",
|
|
239
|
+
maxWidthClassName: "max-w-full",
|
|
248
240
|
side: "top",
|
|
249
|
-
variant: "tertiary"
|
|
250
|
-
children: _
|
|
241
|
+
variant: "tertiary"
|
|
251
242
|
}
|
|
252
243
|
),
|
|
253
244
|
/* @__PURE__ */ t(
|
|
@@ -258,7 +249,7 @@ const Oe = ["default", "active", "system"], Ge = ({
|
|
|
258
249
|
p && "rotate-180"
|
|
259
250
|
),
|
|
260
251
|
"aria-hidden": !0,
|
|
261
|
-
children: /* @__PURE__ */ t(
|
|
252
|
+
children: /* @__PURE__ */ t(xe, { className: "size-3.5 rotate-90 text-content-charcoal" })
|
|
262
253
|
}
|
|
263
254
|
)
|
|
264
255
|
]
|
|
@@ -284,9 +275,9 @@ const Oe = ["default", "active", "system"], Ge = ({
|
|
|
284
275
|
{
|
|
285
276
|
type: "button",
|
|
286
277
|
className: "border-none bg-transparent p-0",
|
|
287
|
-
onClick: () =>
|
|
278
|
+
onClick: () => S("All"),
|
|
288
279
|
children: /* @__PURE__ */ t(
|
|
289
|
-
|
|
280
|
+
Z,
|
|
290
281
|
{
|
|
291
282
|
color: x === "All" ? "primary" : "neutral",
|
|
292
283
|
variant: "outline",
|
|
@@ -297,14 +288,14 @@ const Oe = ["default", "active", "system"], Ge = ({
|
|
|
297
288
|
)
|
|
298
289
|
}
|
|
299
290
|
),
|
|
300
|
-
|
|
291
|
+
te?.map((e) => /* @__PURE__ */ t(
|
|
301
292
|
"button",
|
|
302
293
|
{
|
|
303
294
|
type: "button",
|
|
304
295
|
className: "border-none bg-transparent p-0",
|
|
305
|
-
onClick: () =>
|
|
296
|
+
onClick: () => S(e.value),
|
|
306
297
|
children: /* @__PURE__ */ t(
|
|
307
|
-
|
|
298
|
+
Z,
|
|
308
299
|
{
|
|
309
300
|
color: x === e.value ? "primary" : "neutral",
|
|
310
301
|
variant: "outline",
|
|
@@ -325,7 +316,7 @@ const Oe = ["default", "active", "system"], Ge = ({
|
|
|
325
316
|
value: T,
|
|
326
317
|
onChange: (e) => z(e.target.value),
|
|
327
318
|
prefix: /* @__PURE__ */ t(
|
|
328
|
-
|
|
319
|
+
ye,
|
|
329
320
|
{
|
|
330
321
|
className: "size-4 shrink-0 text-secondary-foreground",
|
|
331
322
|
"aria-hidden": !0
|
|
@@ -337,17 +328,17 @@ const Oe = ["default", "active", "system"], Ge = ({
|
|
|
337
328
|
) }),
|
|
338
329
|
/* @__PURE__ */ t("div", { className: "min-h-[72px] px-1", children: U || (L ? /* @__PURE__ */ t("div", { className: "flex max-h-[160px] flex-col gap-2 overflow-y-auto px-2 py-1", children: [1, 2, 3, 4, 5].map((e) => /* @__PURE__ */ t(R, { className: "h-9 w-full rounded-lg" }, e)) }) : P.length === 0 && b.length === 0 ? /* @__PURE__ */ t("div", { className: "flex min-h-[100px] flex-col items-center justify-center px-4 py-6 text-center", children: /* @__PURE__ */ t("span", { className: "text-sm leading-relaxed text-content-tertiary font-['Manrope']", children: a("dataTable.savedViewsEmptyList") }) }) : /* @__PURE__ */ l("div", { className: "flex max-h-[220px] flex-col gap-0 overflow-y-auto", children: [
|
|
339
330
|
b.length > 0 ? /* @__PURE__ */ t("div", { className: "flex flex-col px-1 pb-1 ", children: b.map(
|
|
340
|
-
(e) =>
|
|
331
|
+
(e) => G(
|
|
341
332
|
e,
|
|
342
333
|
"priority",
|
|
343
334
|
`priority-${e.id}`
|
|
344
335
|
)
|
|
345
336
|
) }) : null,
|
|
346
|
-
b.length > 0 && O.length > 0 ? /* @__PURE__ */ t(
|
|
337
|
+
b.length > 0 && O.length > 0 ? /* @__PURE__ */ t(q, { className: "mb-2 bg-stroke-hairline" }) : null,
|
|
347
338
|
O.length > 0 ? /* @__PURE__ */ l(X, { children: [
|
|
348
339
|
/* @__PURE__ */ t("div", { className: "px-3 pb-1.5 pt-0.5 text-xs font-medium tracking-wide text-content-placeholder font-['Manrope']", children: a("dataTable.savedViewsAllSavedViews") }),
|
|
349
340
|
/* @__PURE__ */ t("div", { className: "flex flex-col px-1 pb-1", children: O.map(
|
|
350
|
-
(e) =>
|
|
341
|
+
(e) => G(
|
|
351
342
|
e,
|
|
352
343
|
"list",
|
|
353
344
|
`list-${e.id}`
|
|
@@ -355,7 +346,7 @@ const Oe = ["default", "active", "system"], Ge = ({
|
|
|
355
346
|
) })
|
|
356
347
|
] }) : null
|
|
357
348
|
] })) }),
|
|
358
|
-
/* @__PURE__ */ t(
|
|
349
|
+
/* @__PURE__ */ t(q, { className: "my-1 bg-[var(--color-border-hairline)]" }),
|
|
359
350
|
/* @__PURE__ */ l("div", { className: "flex justify-end gap-2 px-3 pt-1", children: [
|
|
360
351
|
/* @__PURE__ */ t(
|
|
361
352
|
u,
|
|
@@ -363,7 +354,7 @@ const Oe = ["default", "active", "system"], Ge = ({
|
|
|
363
354
|
type: "button",
|
|
364
355
|
variant: "tertiary",
|
|
365
356
|
size: "md",
|
|
366
|
-
onClick:
|
|
357
|
+
onClick: fe,
|
|
367
358
|
children: a("dataTable.savedViewsCancel")
|
|
368
359
|
}
|
|
369
360
|
),
|
|
@@ -373,8 +364,8 @@ const Oe = ["default", "active", "system"], Ge = ({
|
|
|
373
364
|
type: "button",
|
|
374
365
|
variant: "default",
|
|
375
366
|
size: "md",
|
|
376
|
-
disabled:
|
|
377
|
-
onClick:
|
|
367
|
+
disabled: ne || V === d?.id,
|
|
368
|
+
onClick: pe,
|
|
378
369
|
children: a("dataTable.savedViewsApply")
|
|
379
370
|
}
|
|
380
371
|
)
|
|
@@ -383,7 +374,7 @@ const Oe = ["default", "active", "system"], Ge = ({
|
|
|
383
374
|
}
|
|
384
375
|
)
|
|
385
376
|
] }) }) : /* @__PURE__ */ l("div", { className: "flex min-w-0 flex-1 items-center gap-2 overflow-hidden text-content-tertiary", children: [
|
|
386
|
-
/* @__PURE__ */ t(
|
|
377
|
+
/* @__PURE__ */ t(we, { className: "size-4 shrink-0", "aria-hidden": !0 }),
|
|
387
378
|
/* @__PURE__ */ t("span", { className: "text-sm font-medium font-['Manrope']", children: a("dataTable.savedViewsNoneYet") })
|
|
388
379
|
] }),
|
|
389
380
|
/* @__PURE__ */ t(
|
|
@@ -394,7 +385,7 @@ const Oe = ["default", "active", "system"], Ge = ({
|
|
|
394
385
|
size: "sm",
|
|
395
386
|
className: "shrink-0 font-['Manrope']",
|
|
396
387
|
onClick: () => {
|
|
397
|
-
f(!1),
|
|
388
|
+
f(!1), re?.({ activeView: d });
|
|
398
389
|
},
|
|
399
390
|
children: a("dataTable.savedViewsSave")
|
|
400
391
|
}
|
|
@@ -416,12 +407,12 @@ const Oe = ["default", "active", "system"], Ge = ({
|
|
|
416
407
|
}) : void 0,
|
|
417
408
|
confirmLabel: a("dataTable.savedViewsDeleteConfirmButton"),
|
|
418
409
|
onConfirm: () => {
|
|
419
|
-
y &&
|
|
410
|
+
y && de?.(y, { activeView: d });
|
|
420
411
|
}
|
|
421
412
|
}
|
|
422
413
|
)
|
|
423
414
|
] });
|
|
424
415
|
};
|
|
425
416
|
export {
|
|
426
|
-
|
|
417
|
+
We as DataTableSavedViews
|
|
427
418
|
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
export declare const badgeVariants: (props?: ({
|
|
2
|
-
variant?: "
|
|
3
|
-
color?: "primary" | "
|
|
2
|
+
variant?: "solid" | "outline" | "subtle" | null | undefined;
|
|
3
|
+
color?: "primary" | "success" | "warning" | "destructive" | "neutral" | null | undefined;
|
|
4
4
|
size?: "sm" | "md" | null | undefined;
|
|
5
5
|
shape?: "circle" | "square" | null | undefined;
|
|
6
6
|
layout?: "default" | "iconOnly" | null | undefined;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
export declare const alertVariants: (props?: ({
|
|
2
|
-
variant?: "default" | "error" | "
|
|
2
|
+
variant?: "default" | "error" | "success" | "warning" | "info" | null | undefined;
|
|
3
3
|
emphasis?: "flat" | "elevated" | null | undefined;
|
|
4
4
|
} & import('class-variance-authority/types').ClassProp) | undefined) => string;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { VariantProps } from 'class-variance-authority';
|
|
2
|
+
import { badgeVariants } from '../../data-display/badge/badge.variants';
|
|
3
|
+
import { OverflowTooltipProps } from './overflow-tooltip.types';
|
|
4
|
+
type BadgeStyleProps = Pick<VariantProps<typeof badgeVariants>, 'variant' | 'color' | 'size' | 'shape'>;
|
|
5
|
+
export interface BadgeOverflowTooltipProps extends Omit<OverflowTooltipProps, 'children' | 'triggerClassName' | 'as'> {
|
|
6
|
+
label: string;
|
|
7
|
+
badgeVariant?: BadgeStyleProps['variant'];
|
|
8
|
+
badgeColor?: BadgeStyleProps['color'];
|
|
9
|
+
badgeSize?: BadgeStyleProps['size'];
|
|
10
|
+
badgeShape?: BadgeStyleProps['shape'];
|
|
11
|
+
maxWidthClassName?: string;
|
|
12
|
+
triggerClassName?: string;
|
|
13
|
+
}
|
|
14
|
+
/**
|
|
15
|
+
* Badge shell + inner truncating OverflowTooltip trigger.
|
|
16
|
+
* SSOT for pill badges with ellipsis (Filters Applied, saved views, etc.).
|
|
17
|
+
*/
|
|
18
|
+
export declare function BadgeOverflowTooltip({ label, badgeVariant, badgeColor, badgeSize, badgeShape, maxWidthClassName, triggerClassName, content, ...overflowTooltipProps }: BadgeOverflowTooltipProps): import("react/jsx-runtime").JSX.Element;
|
|
19
|
+
export {};
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import { jsx as o } from "react/jsx-runtime";
|
|
2
|
+
import { badgeVariants as c } from "../../data-display/badge/badge.variants.js";
|
|
3
|
+
import { cn as t } from "../../../lib/utils.js";
|
|
4
|
+
import { OverflowTooltip as f } from "./overflow-tooltip.js";
|
|
5
|
+
function x({
|
|
6
|
+
label: r,
|
|
7
|
+
badgeVariant: e = "outline",
|
|
8
|
+
badgeColor: a = "primary",
|
|
9
|
+
badgeSize: i = "md",
|
|
10
|
+
badgeShape: n = "circle",
|
|
11
|
+
maxWidthClassName: l = "max-w-[140px]",
|
|
12
|
+
triggerClassName: m,
|
|
13
|
+
content: p,
|
|
14
|
+
...s
|
|
15
|
+
}) {
|
|
16
|
+
return /* @__PURE__ */ o(
|
|
17
|
+
"span",
|
|
18
|
+
{
|
|
19
|
+
className: t(
|
|
20
|
+
c({
|
|
21
|
+
variant: e,
|
|
22
|
+
color: a,
|
|
23
|
+
size: i,
|
|
24
|
+
shape: n,
|
|
25
|
+
layout: "default"
|
|
26
|
+
}),
|
|
27
|
+
l,
|
|
28
|
+
"min-w-0 shrink overflow-hidden"
|
|
29
|
+
),
|
|
30
|
+
children: /* @__PURE__ */ o(
|
|
31
|
+
f,
|
|
32
|
+
{
|
|
33
|
+
as: "span",
|
|
34
|
+
content: p ?? r,
|
|
35
|
+
triggerClassName: t(
|
|
36
|
+
"block min-w-0 w-full truncate text-start font-['Manrope']",
|
|
37
|
+
m
|
|
38
|
+
),
|
|
39
|
+
...s,
|
|
40
|
+
children: r
|
|
41
|
+
}
|
|
42
|
+
)
|
|
43
|
+
}
|
|
44
|
+
);
|
|
45
|
+
}
|
|
46
|
+
export {
|
|
47
|
+
x as BadgeOverflowTooltip
|
|
48
|
+
};
|
|
@@ -4,6 +4,8 @@ export { tooltipVariants } from './tooltip.variants';
|
|
|
4
4
|
export { ButtonIconTooltip } from './button-icon-tooltip';
|
|
5
5
|
export type { ButtonIconTooltipProps } from './button-icon-tooltip';
|
|
6
6
|
export { OverflowTooltip } from './overflow-tooltip';
|
|
7
|
+
export { BadgeOverflowTooltip } from './badge-overflow-tooltip';
|
|
8
|
+
export type { BadgeOverflowTooltipProps } from './badge-overflow-tooltip';
|
|
7
9
|
export { useOverflowTooltip } from './use-overflow-tooltip';
|
|
8
10
|
export type { OverflowTooltipProps, UseOverflowTooltipOptions, UseOverflowTooltipResult, } from './overflow-tooltip.types';
|
|
9
11
|
export { defaultTabTooltipRender, defaultAccordionTooltipRender, } from './tab-tooltip-render';
|
|
@@ -1,18 +1,20 @@
|
|
|
1
|
-
import { Tooltip as r, TooltipContent as e, TooltipProvider as p, TooltipTrigger as
|
|
2
|
-
import { tooltipVariants as
|
|
1
|
+
import { Tooltip as r, TooltipContent as e, TooltipProvider as p, TooltipTrigger as l } from "./tooltip.js";
|
|
2
|
+
import { tooltipVariants as f } from "./tooltip.variants.js";
|
|
3
3
|
import { ButtonIconTooltip as n } from "./button-icon-tooltip.js";
|
|
4
4
|
import { OverflowTooltip as m } from "./overflow-tooltip.js";
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
5
|
+
import { BadgeOverflowTooltip as a } from "./badge-overflow-tooltip.js";
|
|
6
|
+
import { useOverflowTooltip as v } from "./use-overflow-tooltip.js";
|
|
7
|
+
import { defaultAccordionTooltipRender as g, defaultTabTooltipRender as w } from "./tab-tooltip-render.js";
|
|
7
8
|
export {
|
|
9
|
+
a as BadgeOverflowTooltip,
|
|
8
10
|
n as ButtonIconTooltip,
|
|
9
11
|
m as OverflowTooltip,
|
|
10
12
|
r as Tooltip,
|
|
11
13
|
e as TooltipContent,
|
|
12
14
|
p as TooltipProvider,
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
15
|
+
l as TooltipTrigger,
|
|
16
|
+
g as defaultAccordionTooltipRender,
|
|
17
|
+
w as defaultTabTooltipRender,
|
|
18
|
+
f as tooltipVariants,
|
|
19
|
+
v as useOverflowTooltip
|
|
18
20
|
};
|
|
@@ -1,63 +1,86 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import { cn as
|
|
3
|
-
import { Tooltip as
|
|
4
|
-
import { useOverflowTooltip as
|
|
5
|
-
function
|
|
1
|
+
import { jsx as n, jsxs as A } from "react/jsx-runtime";
|
|
2
|
+
import { cn as b } from "../../../lib/utils.js";
|
|
3
|
+
import { Tooltip as G, TooltipTrigger as H, TooltipContent as R } from "./tooltip.js";
|
|
4
|
+
import { useOverflowTooltip as q } from "./use-overflow-tooltip.js";
|
|
5
|
+
function M({
|
|
6
6
|
children: o,
|
|
7
|
-
content:
|
|
8
|
-
overflowMode:
|
|
9
|
-
side:
|
|
10
|
-
align:
|
|
11
|
-
variant:
|
|
12
|
-
className:
|
|
13
|
-
triggerClassName:
|
|
14
|
-
as:
|
|
15
|
-
alwaysShow:
|
|
16
|
-
disabled:
|
|
17
|
-
focusable:
|
|
7
|
+
content: i,
|
|
8
|
+
overflowMode: m = "ellipsis",
|
|
9
|
+
side: P = "top",
|
|
10
|
+
align: l,
|
|
11
|
+
variant: s,
|
|
12
|
+
className: t,
|
|
13
|
+
triggerClassName: r,
|
|
14
|
+
as: x = "span",
|
|
15
|
+
alwaysShow: C = !1,
|
|
16
|
+
disabled: p = !1,
|
|
17
|
+
focusable: w = !1
|
|
18
18
|
}) {
|
|
19
|
-
const
|
|
20
|
-
setTriggerRef:
|
|
21
|
-
onTriggerPointerEnter:
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
19
|
+
const a = x, d = i ?? o, {
|
|
20
|
+
setTriggerRef: v,
|
|
21
|
+
onTriggerPointerEnter: h,
|
|
22
|
+
onTriggerPointerLeave: L,
|
|
23
|
+
onTriggerFocus: E,
|
|
24
|
+
onContentPointerEnter: O,
|
|
25
|
+
onContentPointerDown: F,
|
|
26
|
+
onContentPointerLeave: k,
|
|
27
|
+
onContentPointerUp: y,
|
|
28
|
+
triggerTabIndex: D,
|
|
29
|
+
isTooltipArmed: c,
|
|
30
|
+
isTooltipOpen: I,
|
|
31
|
+
tooltipContent: j,
|
|
32
|
+
handleTooltipOpenChange: U
|
|
33
|
+
} = q(o, {
|
|
34
|
+
content: i,
|
|
35
|
+
overflowMode: m,
|
|
36
|
+
alwaysShow: C,
|
|
37
|
+
disabled: p,
|
|
38
|
+
focusable: w,
|
|
34
39
|
contentDependency: d
|
|
35
|
-
}),
|
|
36
|
-
|
|
37
|
-
|
|
40
|
+
}), e = `${r ?? ""} ${t ?? ""}`, f = /\btruncate\b/.test(e), g = /\b(inline-block|inline-flex|inline)\b/.test(
|
|
41
|
+
e
|
|
42
|
+
), T = /\bflex\b/.test(e), u = /\bflex-1\b/.test(e), $ = b(
|
|
43
|
+
"outline-none min-w-0 max-w-full",
|
|
44
|
+
f && !g && !T && !u && "block w-full",
|
|
45
|
+
f && !g && !T && u && "block",
|
|
46
|
+
r,
|
|
47
|
+
t
|
|
48
|
+
);
|
|
49
|
+
return p ? /* @__PURE__ */ n(a, { className: b(r, t), children: o }) : /* @__PURE__ */ A(
|
|
50
|
+
G,
|
|
38
51
|
{
|
|
39
|
-
|
|
40
|
-
|
|
52
|
+
disableHoverableContent: !1,
|
|
53
|
+
open: c && I,
|
|
54
|
+
onOpenChange: U,
|
|
41
55
|
children: [
|
|
42
|
-
/* @__PURE__ */
|
|
43
|
-
|
|
56
|
+
/* @__PURE__ */ n(H, { asChild: !0, children: /* @__PURE__ */ n(
|
|
57
|
+
a,
|
|
44
58
|
{
|
|
45
|
-
ref:
|
|
59
|
+
ref: v,
|
|
46
60
|
"data-component": "overflow-tooltip-trigger",
|
|
47
|
-
className:
|
|
48
|
-
onPointerEnter:
|
|
49
|
-
|
|
50
|
-
|
|
61
|
+
className: $,
|
|
62
|
+
onPointerEnter: h,
|
|
63
|
+
onPointerLeave: L,
|
|
64
|
+
tabIndex: D,
|
|
65
|
+
onFocus: E,
|
|
51
66
|
children: o
|
|
52
67
|
}
|
|
53
68
|
) }),
|
|
54
|
-
|
|
55
|
-
|
|
69
|
+
c ? /* @__PURE__ */ n(
|
|
70
|
+
R,
|
|
56
71
|
{
|
|
57
|
-
side:
|
|
58
|
-
...
|
|
59
|
-
...
|
|
60
|
-
|
|
72
|
+
side: P,
|
|
73
|
+
...l ? { align: l } : {},
|
|
74
|
+
...s ? { variant: s } : {},
|
|
75
|
+
onPointerEnter: O,
|
|
76
|
+
onPointerLeave: k,
|
|
77
|
+
onPointerDown: () => {
|
|
78
|
+
F();
|
|
79
|
+
},
|
|
80
|
+
onPointerUp: () => {
|
|
81
|
+
y();
|
|
82
|
+
},
|
|
83
|
+
children: j
|
|
61
84
|
}
|
|
62
85
|
) : null
|
|
63
86
|
]
|
|
@@ -65,5 +88,5 @@ function k({
|
|
|
65
88
|
);
|
|
66
89
|
}
|
|
67
90
|
export {
|
|
68
|
-
|
|
91
|
+
M as OverflowTooltip
|
|
69
92
|
};
|
|
@@ -13,6 +13,7 @@ export interface UseOverflowTooltipOptions {
|
|
|
13
13
|
export interface UseOverflowTooltipResult {
|
|
14
14
|
setTriggerRef: React.RefCallback<HTMLElement>;
|
|
15
15
|
onTriggerPointerEnter: React.PointerEventHandler<HTMLElement>;
|
|
16
|
+
onTriggerPointerLeave: React.PointerEventHandler<HTMLElement>;
|
|
16
17
|
onTriggerFocus?: React.FocusEventHandler<HTMLElement>;
|
|
17
18
|
triggerTabIndex?: number;
|
|
18
19
|
isTooltipArmed: boolean;
|
|
@@ -20,6 +21,10 @@ export interface UseOverflowTooltipResult {
|
|
|
20
21
|
tooltipContent: React.ReactNode;
|
|
21
22
|
recheckOverflow: () => boolean;
|
|
22
23
|
handleTooltipOpenChange: (isOpen: boolean) => void;
|
|
24
|
+
onContentPointerEnter: React.PointerEventHandler<HTMLElement>;
|
|
25
|
+
onContentPointerLeave: React.PointerEventHandler<HTMLElement>;
|
|
26
|
+
onContentPointerDown: () => void;
|
|
27
|
+
onContentPointerUp: () => void;
|
|
23
28
|
}
|
|
24
29
|
export interface OverflowTooltipProps {
|
|
25
30
|
children: React.ReactNode;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { TooltipContentProps } from './tooltip.types';
|
|
2
2
|
import * as React from "react";
|
|
3
3
|
import * as TooltipPrimitive from "@radix-ui/react-tooltip";
|
|
4
|
-
declare const TooltipProvider: React.
|
|
5
|
-
declare const Tooltip: (
|
|
4
|
+
declare const TooltipProvider: ({ disableHoverableContent, ...providerProps }: React.ComponentPropsWithoutRef<typeof TooltipPrimitive.Provider>) => import("react/jsx-runtime").JSX.Element;
|
|
5
|
+
declare const Tooltip: ({ disableHoverableContent, ...tooltipProps }: React.ComponentPropsWithoutRef<typeof TooltipPrimitive.Root>) => import("react/jsx-runtime").JSX.Element;
|
|
6
6
|
declare const TooltipTrigger: React.ForwardRefExoticComponent<Omit<TooltipPrimitive.TooltipTriggerProps & React.RefAttributes<HTMLButtonElement>, "ref"> & React.RefAttributes<HTMLButtonElement>>;
|
|
7
7
|
declare const TooltipContent: React.ForwardRefExoticComponent<TooltipContentProps & React.RefAttributes<HTMLDivElement>>;
|
|
8
8
|
export { Tooltip, TooltipTrigger, TooltipContent, TooltipProvider };
|