impact-nova 2.2.4 → 2.2.6
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-tooltip-overflow.d.ts +2 -1
- package/dist/components/data/ag-grid-react/ag-grid-tooltip-overflow.js +12 -11
- package/dist/components/data/ag-grid-react/cell-renderers/link-with-batch-cell-renderer.js +109 -87
- package/dist/components/data/ag-grid-react/index.d.ts +2 -0
- package/dist/components/data/ag-grid-react/index.js +41 -36
- package/dist/components/data/data-table/data-table-saved-views.js +216 -191
- package/dist/components/data/expandable-list-item/expandable-list-item-attributes.d.ts +2 -1
- package/dist/components/data/expandable-list-item/expandable-list-item-attributes.js +30 -27
- package/dist/components/data/expandable-list-item/expandable-list-item-metrics.js +44 -30
- package/dist/components/data/expandable-list-item/expandable-list-item-parts.d.ts +1 -1
- package/dist/components/data/expandable-list-item/expandable-list-item-parts.js +162 -127
- package/dist/components/data/expandable-list-item/expandable-list-item-preset.js +30 -29
- package/dist/components/data/expandable-list-item/expandable-list-item.types.d.ts +8 -1
- package/dist/components/data/expandable-list-item/index.d.ts +1 -1
- package/dist/components/data-display/statistics-card/statistics-card.js +138 -111
- package/dist/components/feedback/tooltip/index.d.ts +3 -0
- package/dist/components/feedback/tooltip/index.js +13 -9
- package/dist/components/feedback/tooltip/overflow-tooltip.d.ts +2 -0
- package/dist/components/feedback/tooltip/overflow-tooltip.js +69 -0
- package/dist/components/feedback/tooltip/overflow-tooltip.types.d.ts +37 -0
- package/dist/components/feedback/tooltip/tab-tooltip-render.js +3 -2
- package/dist/components/feedback/tooltip/use-overflow-tooltip.d.ts +3 -0
- package/dist/components/feedback/tooltip/use-overflow-tooltip.js +55 -0
- package/dist/components/flows/command-palette/shortcut-settings.js +85 -66
- package/dist/components/flows/filter-panel/filter-panel.js +76 -69
- package/dist/components/flows/filter-strip/filter-summary.js +184 -163
- package/dist/components/flows/filter-strip/filter-tag-list.js +119 -103
- package/dist/components/forms/select/components/SelectOptionRow.js +35 -27
- package/dist/components/forms/select/components/SelectTriggerValue.js +49 -20
- package/dist/components/forms/select/components/Submenu.js +40 -31
- package/dist/components/layout/horizontal-scroller/index.d.ts +4 -0
- package/dist/components/layout/horizontal-scroller/index.js +6 -2
- package/dist/components/layout/horizontal-scroller/scroll-overflow-affordance.d.ts +10 -0
- package/dist/components/layout/horizontal-scroller/scroll-overflow-affordance.js +124 -0
- package/dist/components/layout/horizontal-scroller/use-horizontal-scroll-overflow.d.ts +13 -0
- package/dist/components/layout/horizontal-scroller/use-horizontal-scroll-overflow.js +40 -0
- package/dist/components/primitives/stepper/stepper.js +61 -42
- package/dist/impact-nova.css +1 -1
- package/dist/index.js +468 -460
- package/dist/lib/overflow/is-text-overflowing.d.ts +3 -0
- package/dist/lib/overflow/is-text-overflowing.js +6 -0
- package/dist/llms/rules/ag-grid.js +1 -1
- package/dist/llms/rules/best-practices.js +1 -1
- package/dist/llms/rules/installation.js +1 -1
- package/dist/llms/rules/requirements.js +1 -1
- package/dist/llms/rules/troubleshooting.js +1 -1
- package/package.json +1 -1
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { jsx as l, jsxs as d } from "react/jsx-runtime";
|
|
2
|
-
import * as
|
|
3
|
-
import { ExpandableListItemAttributes as
|
|
4
|
-
import { ExpandableListItemMetrics as
|
|
5
|
-
import { ExpandableListItemRoot as
|
|
2
|
+
import * as P from "react";
|
|
3
|
+
import { ExpandableListItemAttributes as R } from "./expandable-list-item-attributes.js";
|
|
4
|
+
import { ExpandableListItemMetrics as T } from "./expandable-list-item-metrics.js";
|
|
5
|
+
import { ExpandableListItemRoot as o, ExpandableListItemRow as f, ExpandableListItemCheckbox as C, ExpandableListItemHeader as E, ExpandableListItemMedia as I, ExpandableListItemTitle as k, ExpandableListItemDescription as L, ExpandableListItemTrigger as v, ExpandableListItemContent as j, ExpandableListItemFooter as M } from "./expandable-list-item-parts.js";
|
|
6
6
|
function O(e) {
|
|
7
7
|
switch (e.type) {
|
|
8
8
|
case "metrics":
|
|
9
9
|
return /* @__PURE__ */ l(
|
|
10
|
-
|
|
10
|
+
T,
|
|
11
11
|
{
|
|
12
12
|
sectionId: e.id,
|
|
13
13
|
columns: e.columns
|
|
@@ -16,12 +16,13 @@ function O(e) {
|
|
|
16
16
|
);
|
|
17
17
|
case "attributes":
|
|
18
18
|
return /* @__PURE__ */ l(
|
|
19
|
-
|
|
19
|
+
R,
|
|
20
20
|
{
|
|
21
21
|
title: e.title,
|
|
22
22
|
tags: e.tags,
|
|
23
23
|
maxVisibleTags: e.maxVisibleTags,
|
|
24
|
-
formatOverflow: e.formatOverflow
|
|
24
|
+
formatOverflow: e.formatOverflow,
|
|
25
|
+
externalCopyFunction: e.externalCopyFunction
|
|
25
26
|
},
|
|
26
27
|
e.id
|
|
27
28
|
);
|
|
@@ -34,7 +35,7 @@ function O(e) {
|
|
|
34
35
|
function V({ section: e }) {
|
|
35
36
|
return /* @__PURE__ */ l("div", { className: "px-4 py-4 sm:px-5", children: e.content });
|
|
36
37
|
}
|
|
37
|
-
const $ =
|
|
38
|
+
const $ = P.forwardRef(
|
|
38
39
|
({
|
|
39
40
|
className: e,
|
|
40
41
|
title: t,
|
|
@@ -43,31 +44,31 @@ const $ = R.forwardRef(
|
|
|
43
44
|
selection: a,
|
|
44
45
|
selected: g,
|
|
45
46
|
expanded: w,
|
|
46
|
-
defaultExpanded:
|
|
47
|
-
onExpandedChange:
|
|
47
|
+
defaultExpanded: y = !1,
|
|
48
|
+
onExpandedChange: S,
|
|
48
49
|
disabled: c,
|
|
49
50
|
sections: i,
|
|
50
51
|
panelFooter: h,
|
|
51
|
-
expandAriaLabel:
|
|
52
|
-
collapseAriaLabel:
|
|
53
|
-
...
|
|
54
|
-
},
|
|
52
|
+
expandAriaLabel: u = "Expand details",
|
|
53
|
+
collapseAriaLabel: s = "Collapse details",
|
|
54
|
+
...p
|
|
55
|
+
}, b) => {
|
|
55
56
|
const x = !!(g || a?.checked);
|
|
56
57
|
return i != null && i.length > 0 || h != null ? /* @__PURE__ */ d(
|
|
57
|
-
|
|
58
|
+
o,
|
|
58
59
|
{
|
|
59
|
-
ref:
|
|
60
|
+
ref: b,
|
|
60
61
|
className: e,
|
|
61
62
|
selected: x,
|
|
62
63
|
expanded: w,
|
|
63
|
-
defaultExpanded:
|
|
64
|
-
onExpandedChange:
|
|
64
|
+
defaultExpanded: y,
|
|
65
|
+
onExpandedChange: S,
|
|
65
66
|
disabled: c,
|
|
66
|
-
expandAriaLabel:
|
|
67
|
-
collapseAriaLabel:
|
|
68
|
-
...
|
|
67
|
+
expandAriaLabel: u,
|
|
68
|
+
collapseAriaLabel: s,
|
|
69
|
+
...p,
|
|
69
70
|
children: [
|
|
70
|
-
/* @__PURE__ */ d(
|
|
71
|
+
/* @__PURE__ */ d(f, { children: [
|
|
71
72
|
a ? /* @__PURE__ */ l(
|
|
72
73
|
C,
|
|
73
74
|
{
|
|
@@ -79,7 +80,7 @@ const $ = R.forwardRef(
|
|
|
79
80
|
"aria-label": a["aria-label"] ?? `Select ${t}`
|
|
80
81
|
}
|
|
81
82
|
) : null,
|
|
82
|
-
/* @__PURE__ */ l(
|
|
83
|
+
/* @__PURE__ */ l(v, { children: /* @__PURE__ */ d(E, { children: [
|
|
83
84
|
/* @__PURE__ */ d(I, { children: [
|
|
84
85
|
/* @__PURE__ */ l(k, { children: t }),
|
|
85
86
|
m
|
|
@@ -94,16 +95,16 @@ const $ = R.forwardRef(
|
|
|
94
95
|
]
|
|
95
96
|
}
|
|
96
97
|
) : /* @__PURE__ */ l(
|
|
97
|
-
|
|
98
|
+
o,
|
|
98
99
|
{
|
|
99
|
-
ref:
|
|
100
|
+
ref: b,
|
|
100
101
|
className: e,
|
|
101
102
|
selected: x,
|
|
102
103
|
disabled: c,
|
|
103
|
-
expandAriaLabel:
|
|
104
|
-
collapseAriaLabel:
|
|
105
|
-
...
|
|
106
|
-
children: /* @__PURE__ */ d(
|
|
104
|
+
expandAriaLabel: u,
|
|
105
|
+
collapseAriaLabel: s,
|
|
106
|
+
...p,
|
|
107
|
+
children: /* @__PURE__ */ d(f, { children: [
|
|
107
108
|
a ? /* @__PURE__ */ l(
|
|
108
109
|
C,
|
|
109
110
|
{
|
|
@@ -1,4 +1,9 @@
|
|
|
1
|
-
import { ReactNode } from 'react';
|
|
1
|
+
import { default as React, ReactNode } from 'react';
|
|
2
|
+
export interface ExternalCopyFunctionProps {
|
|
3
|
+
e: React.MouseEvent<HTMLButtonElement>;
|
|
4
|
+
val: string | number;
|
|
5
|
+
index: number;
|
|
6
|
+
}
|
|
2
7
|
export type ExpandableListItemMetricColumn = {
|
|
3
8
|
label: string;
|
|
4
9
|
value: string;
|
|
@@ -19,6 +24,8 @@ export type ExpandableListItemAttributesSection = {
|
|
|
19
24
|
maxVisibleTags?: number;
|
|
20
25
|
/** Default: `(n) => \`+\${n}\``. */
|
|
21
26
|
formatOverflow?: (hiddenCount: number) => string;
|
|
27
|
+
/** Override the default clipboard copy inside the overflow popover. */
|
|
28
|
+
externalCopyFunction?: (props: ExternalCopyFunctionProps) => void;
|
|
22
29
|
};
|
|
23
30
|
/** Arbitrary block inside the expanded panel. */
|
|
24
31
|
export type ExpandableListItemCustomSection = {
|
|
@@ -2,4 +2,4 @@ export { ExpandableListItem, type ExpandableListItemProps, } from './expandable-
|
|
|
2
2
|
export { ExpandableListItemRoot, ExpandableListItemRow, ExpandableListItemCheckbox, ExpandableListItemTrigger, ExpandableListItemTitle, ExpandableListItemDescription, ExpandableListItemMedia, ExpandableListItemHeader, ExpandableListItemContent, ExpandableListItemFooter, type ExpandableListItemRootProps, type ExpandableListItemCheckboxProps, } from './expandable-list-item-parts';
|
|
3
3
|
export { ExpandableListItemMetrics, type ExpandableListItemMetricsProps } from './expandable-list-item-metrics';
|
|
4
4
|
export { ExpandableListItemAttributes, type ExpandableListItemAttributesProps, } from './expandable-list-item-attributes';
|
|
5
|
-
export type { ExpandableListItemAttributesSection, ExpandableListItemCustomSection, ExpandableListItemMetricColumn, ExpandableListItemMetricsSection, ExpandableListItemSelection, ExpandableListItemSection, } from './expandable-list-item.types';
|
|
5
|
+
export type { ExternalCopyFunctionProps, ExpandableListItemAttributesSection, ExpandableListItemCustomSection, ExpandableListItemMetricColumn, ExpandableListItemMetricsSection, ExpandableListItemSelection, ExpandableListItemSection, } from './expandable-list-item.types';
|
|
@@ -1,37 +1,38 @@
|
|
|
1
|
-
import { jsxs as u, jsx as
|
|
1
|
+
import { jsxs as u, jsx as s } from "react/jsx-runtime";
|
|
2
2
|
import * as S from "react";
|
|
3
3
|
import { createComponent as m } from "../../../lib/primitives/create-component.js";
|
|
4
|
-
import { createCompoundPart as
|
|
4
|
+
import { createCompoundPart as w } from "../../../lib/primitives/create-compound.js";
|
|
5
5
|
import { cn as p } from "../../../lib/utils.js";
|
|
6
|
-
import { Checkbox as
|
|
7
|
-
import { Tooltip as
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
|
|
6
|
+
import { Checkbox as j } from "../../forms/checkbox/checkbox.js";
|
|
7
|
+
import { Tooltip as L, TooltipTrigger as W, TooltipContent as G } from "../../feedback/tooltip/tooltip.js";
|
|
8
|
+
import { OverflowTooltip as N } from "../../feedback/tooltip/overflow-tooltip.js";
|
|
9
|
+
import { Info as B } from "impact-nova-icons";
|
|
10
|
+
import { Chart as O } from "../chart/chart.js";
|
|
11
|
+
import { useStatisticsChartData as $, useStatisticsChartLabel as R, useStatisticsChartSeries as H, useStatisticsChartOptions as M } from "./statistics-card.hooks.js";
|
|
12
|
+
import { useStatisticsCardContext as y, StatisticsCardContext as D } from "./statistics-card-context.js";
|
|
13
|
+
const Z = m(
|
|
13
14
|
"StatisticsCardRoot",
|
|
14
|
-
({ className:
|
|
15
|
+
({ className: o, items: t, onItemToggle: r, chartSize: e = 110, config: i, mapItem: n, children: c, ...l }, a) => {
|
|
15
16
|
const d = S.useMemo(
|
|
16
|
-
() => n ?
|
|
17
|
-
[
|
|
18
|
-
), f = "var(--color-surface-subtle)",
|
|
19
|
-
() => ({ items: d, onItemToggle:
|
|
20
|
-
[d,
|
|
17
|
+
() => n ? t.map((I, P) => n(I, P)) : t,
|
|
18
|
+
[t, n]
|
|
19
|
+
), f = "var(--color-surface-subtle)", g = "px-5 py-4", h = "gap-4 md:gap-6 lg:gap-8", x = "w-full min-w-0 max-w-[439px]", C = i?.colors?.background || f, v = i?.spacing?.rootPadding || g, b = i?.spacing?.rootGap || h, T = i?.spacing?.rootWidth || x, k = S.useMemo(
|
|
20
|
+
() => ({ items: d, onItemToggle: r, chartSize: e, config: i }),
|
|
21
|
+
[d, r, e, i]
|
|
21
22
|
);
|
|
22
|
-
return /* @__PURE__ */
|
|
23
|
+
return /* @__PURE__ */ s(D.Provider, { value: k, children: /* @__PURE__ */ s(
|
|
23
24
|
"div",
|
|
24
25
|
{
|
|
25
|
-
ref:
|
|
26
|
+
ref: a,
|
|
26
27
|
role: "region",
|
|
27
28
|
"aria-roledescription": "statistics card",
|
|
28
29
|
"data-component": "statistics-card",
|
|
29
30
|
className: p(
|
|
30
31
|
"flex flex-row flex-wrap md:flex-nowrap items-center justify-between rounded-lg box-border min-w-0 overflow-hidden bg-[var(--statistics-card-bg)]",
|
|
31
|
-
|
|
32
|
-
|
|
32
|
+
T,
|
|
33
|
+
v,
|
|
33
34
|
b,
|
|
34
|
-
|
|
35
|
+
o
|
|
35
36
|
),
|
|
36
37
|
style: { "--statistics-card-bg": C },
|
|
37
38
|
...l,
|
|
@@ -39,54 +40,78 @@ const X = m(
|
|
|
39
40
|
}
|
|
40
41
|
) });
|
|
41
42
|
}
|
|
42
|
-
),
|
|
43
|
+
), _ = w("statistics-card", {
|
|
43
44
|
part: "header",
|
|
44
45
|
displayName: "StatisticsCardHeader",
|
|
45
46
|
className: "flex flex-col items-start gap-4 flex-shrink-0 min-w-0"
|
|
46
|
-
}),
|
|
47
|
+
}), z = w("statistics-card", {
|
|
47
48
|
part: "title",
|
|
48
49
|
displayName: "StatisticsCardTitle",
|
|
49
50
|
className: "flex flex-row items-center gap-1.5 min-w-0 max-w-[150px]"
|
|
50
|
-
}),
|
|
51
|
+
}), tt = m(
|
|
51
52
|
"StatisticsCardTitleIcon",
|
|
52
|
-
({ icon:
|
|
53
|
+
({ icon: o, className: t, ...r }, e) => /* @__PURE__ */ s(
|
|
53
54
|
"div",
|
|
54
55
|
{
|
|
55
|
-
ref:
|
|
56
|
+
ref: e,
|
|
56
57
|
"data-component": "statistics-card-title-icon",
|
|
57
|
-
className: p("flex items-center justify-center w-6 h-6 p-1.5 bg-accent rounded-full shrink-0",
|
|
58
|
-
...
|
|
59
|
-
children:
|
|
58
|
+
className: p("flex items-center justify-center w-6 h-6 p-1.5 bg-accent rounded-full shrink-0", t),
|
|
59
|
+
...r,
|
|
60
|
+
children: o
|
|
60
61
|
}
|
|
61
62
|
)
|
|
62
|
-
),
|
|
63
|
+
), et = m(
|
|
63
64
|
"StatisticsCardTitleText",
|
|
64
|
-
({ className:
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
65
|
+
({ className: o, children: t, ...r }, e) => {
|
|
66
|
+
const i = p(
|
|
67
|
+
"font-semibold text-base leading-[1.5em] text-secondary-foreground truncate line-clamp-1",
|
|
68
|
+
o
|
|
69
|
+
);
|
|
70
|
+
return typeof t == "string" ? /* @__PURE__ */ s(
|
|
71
|
+
N,
|
|
72
|
+
{
|
|
73
|
+
as: "span",
|
|
74
|
+
triggerClassName: i,
|
|
75
|
+
content: t,
|
|
76
|
+
side: "top",
|
|
77
|
+
variant: "tertiary",
|
|
78
|
+
children: /* @__PURE__ */ s(
|
|
79
|
+
"span",
|
|
80
|
+
{
|
|
81
|
+
ref: e,
|
|
82
|
+
"data-component": "statistics-card-title-text",
|
|
83
|
+
...r,
|
|
84
|
+
children: t
|
|
85
|
+
}
|
|
86
|
+
)
|
|
87
|
+
}
|
|
88
|
+
) : /* @__PURE__ */ s(
|
|
89
|
+
"span",
|
|
90
|
+
{
|
|
91
|
+
ref: e,
|
|
92
|
+
"data-component": "statistics-card-title-text",
|
|
93
|
+
className: i,
|
|
94
|
+
...r,
|
|
95
|
+
children: t
|
|
96
|
+
}
|
|
97
|
+
);
|
|
98
|
+
}
|
|
99
|
+
), at = m(
|
|
75
100
|
"StatisticsCardTitleTooltip",
|
|
76
|
-
({ content:
|
|
77
|
-
/* @__PURE__ */
|
|
78
|
-
/* @__PURE__ */
|
|
101
|
+
({ content: o, icon: t, ...r }, e) => /* @__PURE__ */ s("div", { ref: e, "data-component": "statistics-card-title-tooltip", ...r, children: /* @__PURE__ */ u(L, { children: [
|
|
102
|
+
/* @__PURE__ */ s(W, { asChild: !0, children: t || /* @__PURE__ */ s(B, { size: "sm", className: "text-secondary-foreground cursor-pointer shrink-0" }) }),
|
|
103
|
+
/* @__PURE__ */ s(G, { variant: "tertiary", side: "top", children: o })
|
|
79
104
|
] }) })
|
|
80
|
-
),
|
|
105
|
+
), st = m(
|
|
81
106
|
"StatisticsCardChart",
|
|
82
|
-
({ className:
|
|
83
|
-
const { items: c, onItemToggle: l } = y(), { total:
|
|
84
|
-
...
|
|
107
|
+
({ className: o, centerLabel: t, chartConfig: r, chartSize: e = 104, ...i }, n) => {
|
|
108
|
+
const { items: c, onItemToggle: l } = y(), { total: a, checkedTotal: d, hasChecked: f } = $(c), g = R(t, f, d, a), h = H(c, f), x = M(c, l, r), C = {
|
|
109
|
+
...x,
|
|
85
110
|
chart: {
|
|
86
|
-
...
|
|
111
|
+
...x.chart,
|
|
87
112
|
type: "pie",
|
|
88
|
-
height:
|
|
89
|
-
width:
|
|
113
|
+
height: e,
|
|
114
|
+
width: e,
|
|
90
115
|
margin: [0, 0, 0, 0],
|
|
91
116
|
spacing: [0, 0, 0, 0],
|
|
92
117
|
backgroundColor: "transparent"
|
|
@@ -102,142 +127,144 @@ const X = m(
|
|
|
102
127
|
{
|
|
103
128
|
ref: n,
|
|
104
129
|
"data-component": "statistics-card-chart",
|
|
105
|
-
className: p("relative flex items-center justify-center flex-shrink-0",
|
|
106
|
-
style: { width: `${
|
|
107
|
-
...
|
|
130
|
+
className: p("relative flex items-center justify-center flex-shrink-0", o),
|
|
131
|
+
style: { width: `${e}px`, height: `${e}px` },
|
|
132
|
+
...i,
|
|
108
133
|
children: [
|
|
109
|
-
/* @__PURE__ */
|
|
110
|
-
|
|
134
|
+
/* @__PURE__ */ s(
|
|
135
|
+
O,
|
|
111
136
|
{
|
|
112
137
|
options: C,
|
|
113
|
-
height:
|
|
114
|
-
width:
|
|
138
|
+
height: e,
|
|
139
|
+
width: e,
|
|
115
140
|
noWrapper: !0
|
|
116
141
|
}
|
|
117
142
|
),
|
|
118
|
-
|
|
143
|
+
g && /* @__PURE__ */ s("div", { className: "absolute inset-0 flex items-center justify-center pointer-events-none", children: /* @__PURE__ */ s("span", { className: "font-black text-[12px] leading-[9.536px] text-foreground", children: g }) })
|
|
119
144
|
]
|
|
120
145
|
}
|
|
121
146
|
);
|
|
122
147
|
}
|
|
123
|
-
),
|
|
148
|
+
), it = m(
|
|
124
149
|
"StatisticsCardLegend",
|
|
125
|
-
({ className:
|
|
126
|
-
const { config:
|
|
127
|
-
return /* @__PURE__ */
|
|
150
|
+
({ className: o, children: t, ...r }, e) => {
|
|
151
|
+
const { config: i } = y(), n = "w-full md:w-auto md:min-w-[190px] md:max-w-[208px]", c = "gap-2", l = i?.spacing?.legendWidth || n, a = i?.spacing?.itemGap || c;
|
|
152
|
+
return /* @__PURE__ */ s(
|
|
128
153
|
"div",
|
|
129
154
|
{
|
|
130
|
-
ref:
|
|
155
|
+
ref: e,
|
|
131
156
|
role: "list",
|
|
132
157
|
"data-component": "statistics-card-legend",
|
|
133
158
|
className: p(
|
|
134
159
|
"flex flex-col justify-center min-w-0 flex-1 md:flex-none",
|
|
135
160
|
l,
|
|
136
|
-
|
|
137
|
-
|
|
161
|
+
a,
|
|
162
|
+
o
|
|
138
163
|
),
|
|
139
|
-
...
|
|
140
|
-
children:
|
|
164
|
+
...r,
|
|
165
|
+
children: t
|
|
141
166
|
}
|
|
142
167
|
);
|
|
143
168
|
}
|
|
144
|
-
),
|
|
169
|
+
), rt = m(
|
|
145
170
|
"StatisticsCardLegendItem",
|
|
146
|
-
({ className:
|
|
171
|
+
({ className: o, index: t, item: r, ...e }, i) => {
|
|
147
172
|
const { items: n, onItemToggle: c, config: l } = y();
|
|
148
|
-
let
|
|
149
|
-
if (!
|
|
150
|
-
const f = "bg-canvas-elevated",
|
|
173
|
+
let a = r, d = -1;
|
|
174
|
+
if (!a && t !== void 0 ? (a = n[t], d = t) : a && (d = n.findIndex((b) => b === a)), !a || d === -1) return null;
|
|
175
|
+
const f = "bg-canvas-elevated", g = "px-3 py-1.5", h = "var(--color-foreground)", x = l?.colors?.background || f, C = l?.spacing?.itemPadding || g, v = l?.colors?.text || h;
|
|
151
176
|
return /* @__PURE__ */ u(
|
|
152
177
|
"div",
|
|
153
178
|
{
|
|
154
|
-
ref:
|
|
179
|
+
ref: i,
|
|
155
180
|
role: "listitem",
|
|
156
|
-
"aria-label": `${
|
|
181
|
+
"aria-label": `${a.label}: ${a.value}`,
|
|
157
182
|
"data-component": "statistics-card-legend-item",
|
|
158
183
|
className: p(
|
|
159
184
|
"flex flex-row items-center gap-2 rounded-md border-l-2 transition-all shadow-elevation-floating",
|
|
160
|
-
|
|
161
|
-
|
|
185
|
+
a.checked && "shadow-none ring-[3px] ring-[var(--item-color)]",
|
|
186
|
+
x,
|
|
162
187
|
C,
|
|
163
|
-
|
|
188
|
+
o
|
|
164
189
|
),
|
|
165
190
|
style: {
|
|
166
|
-
borderLeftColor:
|
|
167
|
-
"--item-color":
|
|
191
|
+
borderLeftColor: a.borderColor,
|
|
192
|
+
"--item-color": a.borderColor
|
|
168
193
|
},
|
|
169
|
-
...
|
|
194
|
+
...e,
|
|
170
195
|
children: [
|
|
171
196
|
/* @__PURE__ */ u("div", { className: "flex flex-row items-center gap-2 flex-1 min-w-0", children: [
|
|
172
|
-
/* @__PURE__ */
|
|
173
|
-
|
|
197
|
+
/* @__PURE__ */ s(
|
|
198
|
+
j,
|
|
174
199
|
{
|
|
175
|
-
checked:
|
|
200
|
+
checked: a.checked ?? !1,
|
|
176
201
|
onCheckedChange: (b) => c?.(d, b === !0),
|
|
177
|
-
"aria-label": `Select ${
|
|
202
|
+
"aria-label": `Select ${a.label}`,
|
|
178
203
|
className: "shrink-0"
|
|
179
204
|
}
|
|
180
205
|
),
|
|
181
|
-
/* @__PURE__ */
|
|
182
|
-
|
|
206
|
+
/* @__PURE__ */ s(
|
|
207
|
+
N,
|
|
183
208
|
{
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
209
|
+
triggerClassName: "flex-1 font-medium text-xs leading-[1.25em] truncate text-[var(--item-text)] block min-w-0",
|
|
210
|
+
content: a.label,
|
|
211
|
+
side: "top",
|
|
212
|
+
variant: "tertiary",
|
|
213
|
+
children: /* @__PURE__ */ s("span", { style: { "--item-text": v }, children: a.label })
|
|
187
214
|
}
|
|
188
215
|
)
|
|
189
216
|
] }),
|
|
190
|
-
/* @__PURE__ */
|
|
217
|
+
/* @__PURE__ */ s(
|
|
191
218
|
"span",
|
|
192
219
|
{
|
|
193
220
|
className: "shrink-0 font-semibold text-sm leading-[1.5em] text-right min-w-[27px] text-foreground",
|
|
194
|
-
children:
|
|
221
|
+
children: a.value
|
|
195
222
|
}
|
|
196
223
|
)
|
|
197
224
|
]
|
|
198
225
|
}
|
|
199
226
|
);
|
|
200
227
|
}
|
|
201
|
-
),
|
|
228
|
+
), ot = w("statistics-card", {
|
|
202
229
|
part: "summary",
|
|
203
230
|
displayName: "StatisticsCardSummary",
|
|
204
231
|
className: "flex flex-wrap items-center gap-3 self-center text-[11px] font-medium text-secondary-foreground"
|
|
205
|
-
}),
|
|
232
|
+
}), nt = m(
|
|
206
233
|
"StatisticsCardSummaryItem",
|
|
207
|
-
({ className:
|
|
234
|
+
({ className: o, label: t, count: r, color: e = "var(--color-secondary-foreground)", ...i }, n) => /* @__PURE__ */ u(
|
|
208
235
|
"div",
|
|
209
236
|
{
|
|
210
237
|
ref: n,
|
|
211
238
|
"data-component": "statistics-card-summary-item",
|
|
212
|
-
className: p("flex items-center gap-1",
|
|
213
|
-
style: { "--summary-color":
|
|
214
|
-
...
|
|
239
|
+
className: p("flex items-center gap-1", o),
|
|
240
|
+
style: { "--summary-color": e },
|
|
241
|
+
...i,
|
|
215
242
|
children: [
|
|
216
|
-
/* @__PURE__ */
|
|
243
|
+
/* @__PURE__ */ s(
|
|
217
244
|
"span",
|
|
218
245
|
{
|
|
219
246
|
className: "w-1.5 h-1.5 rounded-full shrink-0 bg-[var(--summary-color)]"
|
|
220
247
|
}
|
|
221
248
|
),
|
|
222
249
|
/* @__PURE__ */ u("span", { children: [
|
|
223
|
-
|
|
250
|
+
t,
|
|
224
251
|
": ",
|
|
225
|
-
|
|
252
|
+
r
|
|
226
253
|
] })
|
|
227
254
|
]
|
|
228
255
|
}
|
|
229
256
|
)
|
|
230
257
|
);
|
|
231
258
|
export {
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
259
|
+
st as StatisticsCardChart,
|
|
260
|
+
_ as StatisticsCardHeader,
|
|
261
|
+
it as StatisticsCardLegend,
|
|
262
|
+
rt as StatisticsCardLegendItem,
|
|
263
|
+
Z as StatisticsCardRoot,
|
|
264
|
+
ot as StatisticsCardSummary,
|
|
265
|
+
nt as StatisticsCardSummaryItem,
|
|
266
|
+
z as StatisticsCardTitle,
|
|
267
|
+
tt as StatisticsCardTitleIcon,
|
|
268
|
+
et as StatisticsCardTitleText,
|
|
269
|
+
at as StatisticsCardTitleTooltip
|
|
243
270
|
};
|
|
@@ -3,5 +3,8 @@ export type { TooltipContentProps } from './tooltip.types';
|
|
|
3
3
|
export { tooltipVariants } from './tooltip.variants';
|
|
4
4
|
export { ButtonIconTooltip } from './button-icon-tooltip';
|
|
5
5
|
export type { ButtonIconTooltipProps } from './button-icon-tooltip';
|
|
6
|
+
export { OverflowTooltip } from './overflow-tooltip';
|
|
7
|
+
export { useOverflowTooltip } from './use-overflow-tooltip';
|
|
8
|
+
export type { OverflowTooltipProps, UseOverflowTooltipOptions, UseOverflowTooltipResult, } from './overflow-tooltip.types';
|
|
6
9
|
export { defaultTabTooltipRender, defaultAccordionTooltipRender, } from './tab-tooltip-render';
|
|
7
10
|
export type { InfoTooltipRender } from './tab-tooltip-render';
|
|
@@ -1,14 +1,18 @@
|
|
|
1
|
-
import { Tooltip as r, TooltipContent as e, TooltipProvider as
|
|
1
|
+
import { Tooltip as r, TooltipContent as e, TooltipProvider as p, TooltipTrigger as i } from "./tooltip.js";
|
|
2
2
|
import { tooltipVariants as T } from "./tooltip.variants.js";
|
|
3
|
-
import { ButtonIconTooltip as
|
|
4
|
-
import {
|
|
3
|
+
import { ButtonIconTooltip as n } from "./button-icon-tooltip.js";
|
|
4
|
+
import { OverflowTooltip as m } from "./overflow-tooltip.js";
|
|
5
|
+
import { useOverflowTooltip as a } from "./use-overflow-tooltip.js";
|
|
6
|
+
import { defaultAccordionTooltipRender as c, defaultTabTooltipRender as v } from "./tab-tooltip-render.js";
|
|
5
7
|
export {
|
|
6
|
-
|
|
8
|
+
n as ButtonIconTooltip,
|
|
9
|
+
m as OverflowTooltip,
|
|
7
10
|
r as Tooltip,
|
|
8
11
|
e as TooltipContent,
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
T as tooltipVariants
|
|
12
|
+
p as TooltipProvider,
|
|
13
|
+
i as TooltipTrigger,
|
|
14
|
+
c as defaultAccordionTooltipRender,
|
|
15
|
+
v as defaultTabTooltipRender,
|
|
16
|
+
T as tooltipVariants,
|
|
17
|
+
a as useOverflowTooltip
|
|
14
18
|
};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import { OverflowTooltipProps } from './overflow-tooltip.types';
|
|
2
|
+
export declare function OverflowTooltip({ children, content, overflowMode, side, align, variant, className, triggerClassName, as: triggerElement, alwaysShow, disabled, focusable, }: OverflowTooltipProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
import { jsx as e, jsxs as F } from "react/jsx-runtime";
|
|
2
|
+
import { cn as f } from "../../../lib/utils.js";
|
|
3
|
+
import { Tooltip as I, TooltipTrigger as P, TooltipContent as b } from "./tooltip.js";
|
|
4
|
+
import { useOverflowTooltip as y } from "./use-overflow-tooltip.js";
|
|
5
|
+
function k({
|
|
6
|
+
children: o,
|
|
7
|
+
content: t,
|
|
8
|
+
overflowMode: T = "ellipsis",
|
|
9
|
+
side: m = "top",
|
|
10
|
+
align: n,
|
|
11
|
+
variant: r,
|
|
12
|
+
className: i,
|
|
13
|
+
triggerClassName: p,
|
|
14
|
+
as: a = "span",
|
|
15
|
+
alwaysShow: c = !1,
|
|
16
|
+
disabled: l = !1,
|
|
17
|
+
focusable: u = !1
|
|
18
|
+
}) {
|
|
19
|
+
const s = a, d = t ?? o, {
|
|
20
|
+
setTriggerRef: x,
|
|
21
|
+
onTriggerPointerEnter: C,
|
|
22
|
+
onTriggerFocus: O,
|
|
23
|
+
triggerTabIndex: h,
|
|
24
|
+
isTooltipArmed: g,
|
|
25
|
+
isTooltipOpen: w,
|
|
26
|
+
tooltipContent: E,
|
|
27
|
+
handleTooltipOpenChange: j
|
|
28
|
+
} = y(o, {
|
|
29
|
+
content: t,
|
|
30
|
+
overflowMode: T,
|
|
31
|
+
alwaysShow: c,
|
|
32
|
+
disabled: l,
|
|
33
|
+
focusable: u,
|
|
34
|
+
contentDependency: d
|
|
35
|
+
}), v = f("outline-none", p, i);
|
|
36
|
+
return l ? /* @__PURE__ */ e(s, { className: f(p, i), children: o }) : /* @__PURE__ */ F(
|
|
37
|
+
I,
|
|
38
|
+
{
|
|
39
|
+
open: g && w,
|
|
40
|
+
onOpenChange: j,
|
|
41
|
+
children: [
|
|
42
|
+
/* @__PURE__ */ e(P, { asChild: !0, children: /* @__PURE__ */ e(
|
|
43
|
+
s,
|
|
44
|
+
{
|
|
45
|
+
ref: x,
|
|
46
|
+
"data-component": "overflow-tooltip-trigger",
|
|
47
|
+
className: v,
|
|
48
|
+
onPointerEnter: C,
|
|
49
|
+
tabIndex: h,
|
|
50
|
+
onFocus: O,
|
|
51
|
+
children: o
|
|
52
|
+
}
|
|
53
|
+
) }),
|
|
54
|
+
g ? /* @__PURE__ */ e(
|
|
55
|
+
b,
|
|
56
|
+
{
|
|
57
|
+
side: m,
|
|
58
|
+
...n ? { align: n } : {},
|
|
59
|
+
...r ? { variant: r } : {},
|
|
60
|
+
children: E
|
|
61
|
+
}
|
|
62
|
+
) : null
|
|
63
|
+
]
|
|
64
|
+
}
|
|
65
|
+
);
|
|
66
|
+
}
|
|
67
|
+
export {
|
|
68
|
+
k as OverflowTooltip
|
|
69
|
+
};
|