impact-nova 2.2.5 → 2.2.7

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.
Files changed (60) hide show
  1. package/dist/components/data/ag-grid-react/ag-grid-tooltip-overflow.d.ts +2 -1
  2. package/dist/components/data/ag-grid-react/ag-grid-tooltip-overflow.js +12 -11
  3. package/dist/components/data/ag-grid-react/cell-renderers/link-with-batch-cell-renderer.js +54 -56
  4. package/dist/components/data/ag-grid-react/index.d.ts +2 -0
  5. package/dist/components/data/ag-grid-react/index.js +41 -36
  6. package/dist/components/data/data-table/data-table-saved-views.js +223 -207
  7. package/dist/components/data/expandable-list-item/expandable-list-item-metrics.js +44 -30
  8. package/dist/components/data/expandable-list-item/expandable-list-item-parts.js +158 -184
  9. package/dist/components/data-display/badge/badge.variants.d.ts +2 -2
  10. package/dist/components/data-display/statistics-card/statistics-card.js +138 -111
  11. package/dist/components/feedback/alert/alert.variants.d.ts +1 -1
  12. package/dist/components/feedback/tooltip/badge-overflow-tooltip.d.ts +19 -0
  13. package/dist/components/feedback/tooltip/badge-overflow-tooltip.js +48 -0
  14. package/dist/components/feedback/tooltip/index.d.ts +5 -0
  15. package/dist/components/feedback/tooltip/index.js +16 -10
  16. package/dist/components/feedback/tooltip/overflow-tooltip.d.ts +2 -0
  17. package/dist/components/feedback/tooltip/overflow-tooltip.js +92 -0
  18. package/dist/components/feedback/tooltip/overflow-tooltip.types.d.ts +42 -0
  19. package/dist/components/feedback/tooltip/tooltip.d.ts +2 -2
  20. package/dist/components/feedback/tooltip/tooltip.js +65 -28
  21. package/dist/components/feedback/tooltip/tooltip.variants.js +1 -1
  22. package/dist/components/feedback/tooltip/use-overflow-tooltip.d.ts +3 -0
  23. package/dist/components/feedback/tooltip/use-overflow-tooltip.js +109 -0
  24. package/dist/components/flows/command-palette/shortcut-settings.js +85 -66
  25. package/dist/components/flows/filter-panel/filter-panel.js +94 -83
  26. package/dist/components/flows/filter-strip/filter-summary.js +187 -177
  27. package/dist/components/flows/filter-strip/filter-tag-list.js +123 -107
  28. package/dist/components/forms/prompt/prompt.variants.d.ts +1 -1
  29. package/dist/components/forms/select/components/SelectMenuPanel.js +26 -22
  30. package/dist/components/forms/select/components/SelectOptionRow.js +77 -66
  31. package/dist/components/forms/select/components/SelectTriggerValue.js +49 -20
  32. package/dist/components/forms/select/components/Submenu.js +53 -39
  33. package/dist/components/forms/select/hooks/useSuppressOptionClickForTextSelection.d.ts +5 -0
  34. package/dist/components/forms/select/hooks/useSuppressOptionClickForTextSelection.js +28 -0
  35. package/dist/components/forms/select/select.js +121 -120
  36. package/dist/components/forms/select/utils/shouldSuppressOptionClickForTextSelection.d.ts +5 -0
  37. package/dist/components/forms/select/utils/shouldSuppressOptionClickForTextSelection.js +16 -0
  38. package/dist/components/layout/horizontal-scroller/index.d.ts +4 -0
  39. package/dist/components/layout/horizontal-scroller/index.js +6 -2
  40. package/dist/components/layout/horizontal-scroller/scroll-overflow-affordance.d.ts +10 -0
  41. package/dist/components/layout/horizontal-scroller/scroll-overflow-affordance.js +124 -0
  42. package/dist/components/layout/horizontal-scroller/use-horizontal-scroll-overflow.d.ts +13 -0
  43. package/dist/components/layout/horizontal-scroller/use-horizontal-scroll-overflow.js +40 -0
  44. package/dist/components/primitives/stepper/stepper.js +61 -42
  45. package/dist/components/primitives/tag/tag.variants.d.ts +1 -1
  46. package/dist/impact-nova.css +1 -1
  47. package/dist/index.js +473 -463
  48. package/dist/lib/overflow/is-text-overflowing.d.ts +3 -0
  49. package/dist/lib/overflow/is-text-overflowing.js +6 -0
  50. package/dist/lib/overlay/prevent-dismiss-on-tooltip-outside.d.ts +3 -0
  51. package/dist/lib/overlay/prevent-dismiss-on-tooltip-outside.js +34 -0
  52. package/dist/lib/tooltip/tooltip-content-interaction.d.ts +4 -0
  53. package/dist/lib/tooltip/tooltip-content-interaction.js +21 -0
  54. package/dist/llms/rules/ag-grid.js +1 -1
  55. package/dist/llms/rules/best-practices.js +1 -1
  56. package/dist/llms/rules/installation.js +1 -1
  57. package/dist/llms/rules/requirements.js +1 -1
  58. package/dist/llms/rules/troubleshooting.js +1 -1
  59. package/dist/providers/app-providers.js +18 -11
  60. package/package.json +1 -1
@@ -1,37 +1,38 @@
1
- import { jsxs as u, jsx as i } from "react/jsx-runtime";
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 v } from "../../../lib/primitives/create-compound.js";
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 P } from "../../forms/checkbox/checkbox.js";
7
- import { Tooltip as j, TooltipTrigger as L, TooltipContent as W } from "../../feedback/tooltip/tooltip.js";
8
- import { Info as G } from "impact-nova-icons";
9
- import { Chart as B } from "../chart/chart.js";
10
- import { useStatisticsChartData as $, useStatisticsChartLabel as O, useStatisticsChartSeries as R, useStatisticsChartOptions as H } from "./statistics-card.hooks.js";
11
- import { useStatisticsCardContext as y, StatisticsCardContext as M } from "./statistics-card-context.js";
12
- const X = m(
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: r, items: a, onItemToggle: s, chartSize: t = 110, config: o, mapItem: n, children: c, ...l }, e) => {
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 ? a.map((k, I) => n(k, I)) : a,
17
- [a, n]
18
- ), f = "var(--color-surface-subtle)", x = "px-5 py-4", h = "gap-4 md:gap-6 lg:gap-8", g = "w-full min-w-0 max-w-[439px]", C = o?.colors?.background || f, w = o?.spacing?.rootPadding || x, b = o?.spacing?.rootGap || h, N = o?.spacing?.rootWidth || g, T = S.useMemo(
19
- () => ({ items: d, onItemToggle: s, chartSize: t, config: o }),
20
- [d, s, t, o]
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__ */ i(M.Provider, { value: T, children: /* @__PURE__ */ i(
23
+ return /* @__PURE__ */ s(D.Provider, { value: k, children: /* @__PURE__ */ s(
23
24
  "div",
24
25
  {
25
- ref: e,
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
- N,
32
- w,
32
+ T,
33
+ v,
33
34
  b,
34
- r
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
- ), Y = v("statistics-card", {
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
- }), Z = v("statistics-card", {
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
- }), _ = m(
51
+ }), tt = m(
51
52
  "StatisticsCardTitleIcon",
52
- ({ icon: r, className: a, ...s }, t) => /* @__PURE__ */ i(
53
+ ({ icon: o, className: t, ...r }, e) => /* @__PURE__ */ s(
53
54
  "div",
54
55
  {
55
- ref: t,
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", a),
58
- ...s,
59
- children: r
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
- ), z = m(
63
+ ), et = m(
63
64
  "StatisticsCardTitleText",
64
- ({ className: r, children: a, ...s }, t) => /* @__PURE__ */ i(
65
- "span",
66
- {
67
- ref: t,
68
- "data-component": "statistics-card-title-text",
69
- className: p("font-semibold text-base leading-[1.5em] text-secondary-foreground truncate line-clamp-1", r),
70
- ...s,
71
- children: a
72
- }
73
- )
74
- ), tt = m(
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: r, icon: a, ...s }, t) => /* @__PURE__ */ i("div", { ref: t, "data-component": "statistics-card-title-tooltip", ...s, children: /* @__PURE__ */ u(j, { children: [
77
- /* @__PURE__ */ i(L, { asChild: !0, children: a || /* @__PURE__ */ i(G, { size: "sm", className: "text-secondary-foreground cursor-pointer shrink-0" }) }),
78
- /* @__PURE__ */ i(W, { variant: "tertiary", side: "top", children: r })
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
- ), et = m(
105
+ ), st = m(
81
106
  "StatisticsCardChart",
82
- ({ className: r, centerLabel: a, chartConfig: s, chartSize: t = 104, ...o }, n) => {
83
- const { items: c, onItemToggle: l } = y(), { total: e, checkedTotal: d, hasChecked: f } = $(c), x = O(a, f, d, e), h = R(c, f), g = H(c, l, s), C = {
84
- ...g,
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
- ...g.chart,
111
+ ...x.chart,
87
112
  type: "pie",
88
- height: t,
89
- width: t,
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", r),
106
- style: { width: `${t}px`, height: `${t}px` },
107
- ...o,
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__ */ i(
110
- B,
134
+ /* @__PURE__ */ s(
135
+ O,
111
136
  {
112
137
  options: C,
113
- height: t,
114
- width: t,
138
+ height: e,
139
+ width: e,
115
140
  noWrapper: !0
116
141
  }
117
142
  ),
118
- x && /* @__PURE__ */ i("div", { className: "absolute inset-0 flex items-center justify-center pointer-events-none", children: /* @__PURE__ */ i("span", { className: "font-black text-[12px] leading-[9.536px] text-foreground", children: x }) })
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
- ), at = m(
148
+ ), it = m(
124
149
  "StatisticsCardLegend",
125
- ({ className: r, children: a, ...s }, t) => {
126
- const { config: o } = y(), n = "w-full md:w-auto md:min-w-[190px] md:max-w-[208px]", c = "gap-2", l = o?.spacing?.legendWidth || n, e = o?.spacing?.itemGap || c;
127
- return /* @__PURE__ */ i(
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: t,
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
- e,
137
- r
161
+ a,
162
+ o
138
163
  ),
139
- ...s,
140
- children: a
164
+ ...r,
165
+ children: t
141
166
  }
142
167
  );
143
168
  }
144
- ), st = m(
169
+ ), rt = m(
145
170
  "StatisticsCardLegendItem",
146
- ({ className: r, index: a, item: s, ...t }, o) => {
171
+ ({ className: o, index: t, item: r, ...e }, i) => {
147
172
  const { items: n, onItemToggle: c, config: l } = y();
148
- let e = s, d = -1;
149
- if (!e && a !== void 0 ? (e = n[a], d = a) : e && (d = n.findIndex((b) => b === e)), !e || d === -1) return null;
150
- const f = "bg-canvas-elevated", x = "px-3 py-1.5", h = "var(--color-foreground)", g = l?.colors?.background || f, C = l?.spacing?.itemPadding || x, w = l?.colors?.text || h;
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: o,
179
+ ref: i,
155
180
  role: "listitem",
156
- "aria-label": `${e.label}: ${e.value}`,
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
- e.checked && "shadow-none ring-[3px] ring-[var(--item-color)]",
161
- g,
185
+ a.checked && "shadow-none ring-[3px] ring-[var(--item-color)]",
186
+ x,
162
187
  C,
163
- r
188
+ o
164
189
  ),
165
190
  style: {
166
- borderLeftColor: e.borderColor,
167
- "--item-color": e.borderColor
191
+ borderLeftColor: a.borderColor,
192
+ "--item-color": a.borderColor
168
193
  },
169
- ...t,
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__ */ i(
173
- P,
197
+ /* @__PURE__ */ s(
198
+ j,
174
199
  {
175
- checked: e.checked ?? !1,
200
+ checked: a.checked ?? !1,
176
201
  onCheckedChange: (b) => c?.(d, b === !0),
177
- "aria-label": `Select ${e.label}`,
202
+ "aria-label": `Select ${a.label}`,
178
203
  className: "shrink-0"
179
204
  }
180
205
  ),
181
- /* @__PURE__ */ i(
182
- "span",
206
+ /* @__PURE__ */ s(
207
+ N,
183
208
  {
184
- className: "flex-1 font-medium text-xs leading-[1.25em] truncate text-[var(--item-text)]",
185
- style: { "--item-text": w },
186
- children: e.label
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__ */ i(
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: e.value
221
+ children: a.value
195
222
  }
196
223
  )
197
224
  ]
198
225
  }
199
226
  );
200
227
  }
201
- ), it = v("statistics-card", {
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
- }), rt = m(
232
+ }), nt = m(
206
233
  "StatisticsCardSummaryItem",
207
- ({ className: r, label: a, count: s, color: t = "var(--color-secondary-foreground)", ...o }, n) => /* @__PURE__ */ u(
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", r),
213
- style: { "--summary-color": t },
214
- ...o,
239
+ className: p("flex items-center gap-1", o),
240
+ style: { "--summary-color": e },
241
+ ...i,
215
242
  children: [
216
- /* @__PURE__ */ i(
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
- a,
250
+ t,
224
251
  ": ",
225
- s
252
+ r
226
253
  ] })
227
254
  ]
228
255
  }
229
256
  )
230
257
  );
231
258
  export {
232
- et as StatisticsCardChart,
233
- Y as StatisticsCardHeader,
234
- at as StatisticsCardLegend,
235
- st as StatisticsCardLegendItem,
236
- X as StatisticsCardRoot,
237
- it as StatisticsCardSummary,
238
- rt as StatisticsCardSummaryItem,
239
- Z as StatisticsCardTitle,
240
- _ as StatisticsCardTitleIcon,
241
- z as StatisticsCardTitleText,
242
- tt as StatisticsCardTitleTooltip
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
  };
@@ -1,4 +1,4 @@
1
1
  export declare const alertVariants: (props?: ({
2
- variant?: "default" | "error" | "info" | "warning" | "success" | null | undefined;
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
+ };
@@ -3,5 +3,10 @@ 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 { BadgeOverflowTooltip } from './badge-overflow-tooltip';
8
+ export type { BadgeOverflowTooltipProps } from './badge-overflow-tooltip';
9
+ export { useOverflowTooltip } from './use-overflow-tooltip';
10
+ export type { OverflowTooltipProps, UseOverflowTooltipOptions, UseOverflowTooltipResult, } from './overflow-tooltip.types';
6
11
  export { defaultTabTooltipRender, defaultAccordionTooltipRender, } from './tab-tooltip-render';
7
12
  export type { InfoTooltipRender } from './tab-tooltip-render';
@@ -1,14 +1,20 @@
1
- import { Tooltip as r, TooltipContent as e, TooltipProvider as i, TooltipTrigger as p } from "./tooltip.js";
2
- import { tooltipVariants as T } from "./tooltip.variants.js";
3
- import { ButtonIconTooltip as d } from "./button-icon-tooltip.js";
4
- import { defaultAccordionTooltipRender as a, defaultTabTooltipRender as m } from "./tab-tooltip-render.js";
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
+ import { ButtonIconTooltip as n } from "./button-icon-tooltip.js";
4
+ import { OverflowTooltip as m } from "./overflow-tooltip.js";
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";
5
8
  export {
6
- d as ButtonIconTooltip,
9
+ a as BadgeOverflowTooltip,
10
+ n as ButtonIconTooltip,
11
+ m as OverflowTooltip,
7
12
  r as Tooltip,
8
13
  e as TooltipContent,
9
- i as TooltipProvider,
10
- p as TooltipTrigger,
11
- a as defaultAccordionTooltipRender,
12
- m as defaultTabTooltipRender,
13
- T as tooltipVariants
14
+ p as TooltipProvider,
15
+ l as TooltipTrigger,
16
+ g as defaultAccordionTooltipRender,
17
+ w as defaultTabTooltipRender,
18
+ f as tooltipVariants,
19
+ v as useOverflowTooltip
14
20
  };
@@ -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,92 @@
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
+ children: o,
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
+ }) {
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,
39
+ contentDependency: d
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,
51
+ {
52
+ disableHoverableContent: !1,
53
+ open: c && I,
54
+ onOpenChange: U,
55
+ children: [
56
+ /* @__PURE__ */ n(H, { asChild: !0, children: /* @__PURE__ */ n(
57
+ a,
58
+ {
59
+ ref: v,
60
+ "data-component": "overflow-tooltip-trigger",
61
+ className: $,
62
+ onPointerEnter: h,
63
+ onPointerLeave: L,
64
+ tabIndex: D,
65
+ onFocus: E,
66
+ children: o
67
+ }
68
+ ) }),
69
+ c ? /* @__PURE__ */ n(
70
+ R,
71
+ {
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
84
+ }
85
+ ) : null
86
+ ]
87
+ }
88
+ );
89
+ }
90
+ export {
91
+ M as OverflowTooltip
92
+ };
@@ -0,0 +1,42 @@
1
+ import { TextOverflowMode } from '../../../lib/overflow/is-text-overflowing';
2
+ import { TooltipContentProps } from './tooltip.types';
3
+ import type * as React from 'react';
4
+ export interface UseOverflowTooltipOptions {
5
+ content?: React.ReactNode;
6
+ overflowMode?: TextOverflowMode;
7
+ alwaysShow?: boolean;
8
+ disabled?: boolean;
9
+ /** When false (default), trigger is pointer-only — safe inside buttons, options, comboboxes. */
10
+ focusable?: boolean;
11
+ contentDependency?: unknown;
12
+ }
13
+ export interface UseOverflowTooltipResult {
14
+ setTriggerRef: React.RefCallback<HTMLElement>;
15
+ onTriggerPointerEnter: React.PointerEventHandler<HTMLElement>;
16
+ onTriggerPointerLeave: React.PointerEventHandler<HTMLElement>;
17
+ onTriggerFocus?: React.FocusEventHandler<HTMLElement>;
18
+ triggerTabIndex?: number;
19
+ isTooltipArmed: boolean;
20
+ isTooltipOpen: boolean;
21
+ tooltipContent: React.ReactNode;
22
+ recheckOverflow: () => boolean;
23
+ handleTooltipOpenChange: (isOpen: boolean) => void;
24
+ onContentPointerEnter: React.PointerEventHandler<HTMLElement>;
25
+ onContentPointerLeave: React.PointerEventHandler<HTMLElement>;
26
+ onContentPointerDown: () => void;
27
+ onContentPointerUp: () => void;
28
+ }
29
+ export interface OverflowTooltipProps {
30
+ children: React.ReactNode;
31
+ content?: React.ReactNode;
32
+ overflowMode?: TextOverflowMode;
33
+ side?: TooltipContentProps['side'];
34
+ align?: TooltipContentProps['align'];
35
+ variant?: TooltipContentProps['variant'];
36
+ className?: string;
37
+ triggerClassName?: string;
38
+ as?: 'span' | 'p' | 'div';
39
+ alwaysShow?: boolean;
40
+ disabled?: boolean;
41
+ focusable?: boolean;
42
+ }
@@ -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.FC<TooltipPrimitive.TooltipProviderProps>;
5
- declare const Tooltip: (props: React.ComponentPropsWithoutRef<typeof TooltipPrimitive.Root>) => import("react/jsx-runtime").JSX.Element;
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 };