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,171 +1,187 @@
1
- import { jsx as e, jsxs as r } from "react/jsx-runtime";
2
- import * as C from "react";
3
- import { HorizontalScroller as S } from "../../layout/horizontal-scroller/horizontal-scroller.js";
4
- import { TagGroup as z } from "../../primitives/tag-group/tag-group.js";
5
- import { Tag as k } from "../../primitives/tag/tag.js";
6
- import { Tooltip as b, TooltipTrigger as w, TooltipContent as y } from "../../feedback/tooltip/tooltip.js";
7
- import { PopoverContent as $, Popover as O, PopoverTrigger as j } from "../../feedback/popover/popover.js";
8
- import { Button as P } from "../../primitives/button/button.js";
9
- import { Checkmark as A, Copy as R, Cross as F } from "impact-nova-icons";
10
- const T = "whitespace-nowrap bg-accent text-brand 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
- remainingValues: s,
1
+ import { jsx as o, jsxs as r } from "react/jsx-runtime";
2
+ import * as N from "react";
3
+ import { cn as O } from "../../../lib/utils.js";
4
+ import { HorizontalScroller as $ } from "../../layout/horizontal-scroller/horizontal-scroller.js";
5
+ import { TagGroup as A } from "../../primitives/tag-group/tag-group.js";
6
+ import { Tag as C } from "../../primitives/tag/tag.js";
7
+ import { Tooltip as T, TooltipTrigger as k, TooltipContent as z } from "../../feedback/tooltip/tooltip.js";
8
+ import { OverflowTooltip as P } from "../../feedback/tooltip/overflow-tooltip.js";
9
+ import { PopoverContent as j, Popover as R, PopoverTrigger as B } from "../../feedback/popover/popover.js";
10
+ import { Button as F } from "../../primitives/button/button.js";
11
+ import { Checkmark as I, Copy as L, Cross as V } from "impact-nova-icons";
12
+ const S = "whitespace-nowrap bg-accent text-brand 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", E = ({
13
+ remainingValues: a,
12
14
  viewAllTrigger: c = "expand",
13
- onViewAll: h,
14
- onItemRemove: u,
15
- isRemovable: N,
16
- isCopyable: t = !1,
15
+ onViewAll: u,
16
+ onItemRemove: v,
17
+ isRemovable: f,
18
+ isCopyable: e = !1,
17
19
  externalCopyFunction: m
18
20
  }) => {
19
- const [i, f] = C.useState(!1), [n, d] = C.useState(null), v = (o, l, a) => {
20
- navigator.clipboard.writeText(String(l)), d(a), o.currentTarget.blur(), setTimeout(() => d(null), 1500);
21
- }, g = i ? s : s.slice(0, 3), x = s.length > 3, p = () => {
22
- c === "custom" ? h?.() : f(!0);
21
+ const [s, g] = N.useState(!1), [n, d] = N.useState(null), x = (t, l, i) => {
22
+ navigator.clipboard.writeText(String(l)), d(i), t.currentTarget.blur(), setTimeout(() => d(null), 1500);
23
+ }, w = s ? a : a.slice(0, 3), b = a.length > 3, h = () => {
24
+ c === "custom" ? u?.() : g(!0);
23
25
  };
24
- return /* @__PURE__ */ e(
25
- $,
26
+ return /* @__PURE__ */ o(
27
+ j,
26
28
  {
27
29
  className: "w-[200px] p-0 rounded-[8px] bg-canvas-elevated shadow-elevation-floating border-none",
28
30
  align: "start",
29
31
  sideOffset: 8,
30
- onOpenAutoFocus: (o) => o.preventDefault(),
32
+ onOpenAutoFocus: (t) => t.preventDefault(),
31
33
  children: /* @__PURE__ */ r("div", { className: "flex flex-col py-2 px-[6px]", children: [
32
- /* @__PURE__ */ e(
34
+ /* @__PURE__ */ o(
33
35
  "div",
34
36
  {
35
- className: `flex flex-col gap-1 mb-2 ${i ? "max-h-[180px] overflow-y-auto" : ""}`,
36
- children: g.map((o, l) => /* @__PURE__ */ r(
37
- "div",
38
- {
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
- children: [
41
- /* @__PURE__ */ r(b, { children: [
42
- /* @__PURE__ */ e(w, { asChild: !0, children: /* @__PURE__ */ e("span", { className: "truncate", children: String(o) }) }),
43
- /* @__PURE__ */ e(y, { variant: "tertiary", side: "right", children: String(o) })
44
- ] }),
45
- /* @__PURE__ */ r("div", { className: "flex items-center shrink-0", children: [
46
- t && /* @__PURE__ */ e(
47
- "button",
37
+ className: `flex flex-col gap-1 mb-2 ${s ? "max-h-[180px] overflow-y-auto" : ""}`,
38
+ children: w.map((t, l) => {
39
+ const i = String(t), y = !!(e || f);
40
+ return /* @__PURE__ */ r(
41
+ "div",
42
+ {
43
+ className: "group relative flex min-w-0 items-stretch overflow-hidden rounded px-3 py-2 text-[14px] font-medium leading-[20px] text-foreground hover:bg-secondary",
44
+ children: [
45
+ /* @__PURE__ */ o(
46
+ P,
48
47
  {
49
- onClick: (a) => {
50
- a.stopPropagation(), m ? m({ e: a, val: o, index: l }) : v(a, o, l);
51
- },
52
- "aria-label": `Copy ${String(o)}`,
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
- children: n === l ? /* @__PURE__ */ e(A, { size: 12, className: "text-success" }) : /* @__PURE__ */ e(R, { size: 12 })
48
+ triggerClassName: O(
49
+ "block min-w-0 flex-1 self-stretch truncate overflow-hidden",
50
+ y && "pe-0 group-hover:pe-10"
51
+ ),
52
+ content: i,
53
+ side: "right",
54
+ variant: "tertiary",
55
+ children: i
55
56
  }
56
57
  ),
57
- N && /* @__PURE__ */ e(
58
- "button",
59
- {
60
- onClick: (a) => {
61
- a.stopPropagation(), u(o);
62
- },
63
- "aria-label": `Remove ${String(o)}`,
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
- children: /* @__PURE__ */ e(F, { size: 12 })
66
- }
67
- )
68
- ] })
69
- ]
70
- },
71
- l
72
- ))
58
+ y ? /* @__PURE__ */ r("div", { className: "pointer-events-none absolute end-2 top-1/2 z-10 flex -translate-y-1/2 items-center gap-1 opacity-0 transition-opacity group-hover:pointer-events-auto group-hover:opacity-100 focus-within:pointer-events-auto focus-within:opacity-100", children: [
59
+ e ? /* @__PURE__ */ o(
60
+ "button",
61
+ {
62
+ type: "button",
63
+ onClick: (p) => {
64
+ p.stopPropagation(), m ? m({ e: p, val: t, index: l }) : x(p, t, l);
65
+ },
66
+ "aria-label": `Copy ${i}`,
67
+ className: "flex h-4 w-4 shrink-0 items-center justify-center rounded-full text-content-icon hover:bg-scrim-hover hover:text-content-secondary",
68
+ children: n === l ? /* @__PURE__ */ o(I, { size: 12, className: "text-success" }) : /* @__PURE__ */ o(L, { size: 12 })
69
+ }
70
+ ) : null,
71
+ f ? /* @__PURE__ */ o(
72
+ "button",
73
+ {
74
+ type: "button",
75
+ onClick: (p) => {
76
+ p.stopPropagation(), v(t);
77
+ },
78
+ "aria-label": `Remove ${i}`,
79
+ className: "flex h-4 w-4 shrink-0 items-center justify-center rounded-full text-content-icon hover:bg-scrim-hover hover:text-content-secondary",
80
+ children: /* @__PURE__ */ o(V, { size: 12 })
81
+ }
82
+ ) : null
83
+ ] }) : null
84
+ ]
85
+ },
86
+ l
87
+ );
88
+ })
73
89
  }
74
90
  ),
75
- !i && x && /* @__PURE__ */ r("div", { className: "flex flex-col gap-2", children: [
76
- /* @__PURE__ */ e("div", { className: "h-px bg-stroke-hairline w-full" }),
77
- /* @__PURE__ */ e(
78
- P,
91
+ !s && b && /* @__PURE__ */ r("div", { className: "flex flex-col gap-2", children: [
92
+ /* @__PURE__ */ o("div", { className: "h-px bg-stroke-hairline w-full" }),
93
+ /* @__PURE__ */ o(
94
+ F,
79
95
  {
80
96
  variant: "secondary",
81
97
  size: "md",
82
98
  className: "w-full justify-center",
83
- onClick: p,
84
- children: c === "custom" ? "View all" : `View all (${s.length})`
99
+ onClick: h,
100
+ children: c === "custom" ? "View all" : `View all (${a.length})`
85
101
  }
86
102
  )
87
103
  ] })
88
104
  ] })
89
105
  }
90
106
  );
91
- }, H = ({
92
- filters: s,
107
+ }, X = ({
108
+ filters: a,
93
109
  onFilterRemove: c,
94
- onOverflowClick: h,
95
- onViewAll: u
96
- }) => /* @__PURE__ */ e("div", { className: "flex flex-1 items-center min-w-0", children: /* @__PURE__ */ e(
97
- S,
110
+ onOverflowClick: u,
111
+ onViewAll: v
112
+ }) => /* @__PURE__ */ o("div", { className: "flex flex-1 items-center min-w-0", children: /* @__PURE__ */ o(
113
+ $,
98
114
  {
99
- items: s,
100
- renderItem: (t, m) => {
101
- const i = Array.isArray(t.value) ? t.value : [t.value], f = i.slice(0, 2), n = i.slice(2), d = !!t.overflow, v = t.overflow?.label ? t.overflow.label : t.overflow?.count ? `+${t.overflow.count}` : null, g = n.length > 0, x = d || g, p = `+${n.length}`;
115
+ items: a,
116
+ renderItem: (e, m) => {
117
+ const s = Array.isArray(e.value) ? e.value : [e.value], g = s.slice(0, 2), n = s.slice(2), d = !!e.overflow, x = e.overflow?.label ? e.overflow.label : e.overflow?.count ? `+${e.overflow.count}` : null, w = n.length > 0, b = d || w, h = `+${n.length}`;
102
118
  return /* @__PURE__ */ r("div", { className: "flex items-center px-1", children: [
103
- m > 0 && /* @__PURE__ */ e("div", { className: "mx-3 h-4 w-px bg-stroke-hairline shrink-0" }),
119
+ m > 0 && /* @__PURE__ */ o("div", { className: "mx-3 h-4 w-px bg-stroke-hairline shrink-0" }),
104
120
  /* @__PURE__ */ r("div", { className: "flex items-center gap-2", children: [
105
121
  /* @__PURE__ */ r("span", { className: "text-xs font-medium leading-[21px] text-secondary-foreground whitespace-nowrap", children: [
106
- t.label,
107
- t.required && /* @__PURE__ */ e("span", { className: "text-validation ms-0.5", children: "*" })
122
+ e.label,
123
+ e.required && /* @__PURE__ */ o("span", { className: "text-validation ms-0.5", children: "*" })
108
124
  ] }),
109
125
  /* @__PURE__ */ r("div", { className: "flex items-center gap-1", children: [
110
- /* @__PURE__ */ e(
111
- z,
126
+ /* @__PURE__ */ o(
127
+ A,
112
128
  {
113
129
  spacing: "sm",
114
- tags: f.map((o) => ({
115
- label: String(o),
130
+ tags: g.map((t) => ({
131
+ label: String(t),
116
132
  variant: "secondary",
117
133
  size: "md",
118
134
  shape: "rounded",
119
- removable: t.removable,
120
- onRemove: () => c(t.id, o)
135
+ removable: e.removable,
136
+ onRemove: () => c(e.id, t)
121
137
  }))
122
138
  }
123
139
  ),
124
- x && (d ? /* @__PURE__ */ r(b, { children: [
125
- /* @__PURE__ */ e(w, { asChild: !0, children: /* @__PURE__ */ e(
126
- k,
140
+ b && (d ? /* @__PURE__ */ r(T, { children: [
141
+ /* @__PURE__ */ o(k, { asChild: !0, children: /* @__PURE__ */ o(
142
+ C,
127
143
  {
128
144
  asButton: !0,
129
145
  variant: "secondary",
130
146
  size: "md",
131
147
  shape: "rounded",
132
- className: T,
133
- "aria-label": `${t.overflow?.count || n.length} more filters for ${t.label}`,
134
- onClick: () => h?.(t.id),
135
- children: v || p
148
+ className: S,
149
+ "aria-label": `${e.overflow?.count || n.length} more filters for ${e.label}`,
150
+ onClick: () => u?.(e.id),
151
+ children: x || h
136
152
  }
137
153
  ) }),
138
- /* @__PURE__ */ r(y, { variant: "tertiary", side: "top", children: [
139
- t.overflow?.count || n.length,
154
+ /* @__PURE__ */ r(z, { variant: "tertiary", side: "top", children: [
155
+ e.overflow?.count || n.length,
140
156
  " more filters"
141
157
  ] })
142
- ] }) : /* @__PURE__ */ r(O, { children: [
143
- /* @__PURE__ */ r(b, { children: [
144
- /* @__PURE__ */ e(w, { asChild: !0, children: /* @__PURE__ */ e(j, { asChild: !0, children: /* @__PURE__ */ e(
145
- k,
158
+ ] }) : /* @__PURE__ */ r(R, { children: [
159
+ /* @__PURE__ */ r(T, { children: [
160
+ /* @__PURE__ */ o(k, { asChild: !0, children: /* @__PURE__ */ o(B, { asChild: !0, children: /* @__PURE__ */ o(
161
+ C,
146
162
  {
147
163
  asButton: !0,
148
164
  variant: "secondary",
149
165
  size: "md",
150
166
  shape: "rounded",
151
- className: T,
152
- children: p
167
+ className: S,
168
+ children: h
153
169
  }
154
170
  ) }) }),
155
- /* @__PURE__ */ r(y, { variant: "tertiary", side: "top", children: [
171
+ /* @__PURE__ */ r(z, { variant: "tertiary", side: "top", children: [
156
172
  n.length,
157
173
  " more filters"
158
174
  ] })
159
175
  ] }),
160
- /* @__PURE__ */ e(
161
- I,
176
+ /* @__PURE__ */ o(
177
+ E,
162
178
  {
163
179
  remainingValues: n,
164
- viewAllTrigger: t.viewAllTrigger,
165
- onViewAll: u,
166
- onItemRemove: (o) => c(t.id, o),
167
- isRemovable: t.removable,
168
- isCopyable: t.copyable
180
+ viewAllTrigger: e.viewAllTrigger,
181
+ onViewAll: v,
182
+ onItemRemove: (t) => c(e.id, t),
183
+ isRemovable: e.removable,
184
+ isCopyable: e.copyable
169
185
  }
170
186
  )
171
187
  ] }))
@@ -178,6 +194,6 @@ const T = "whitespace-nowrap bg-accent text-brand hover:bg-accent/80 border-0 px
178
194
  }
179
195
  ) });
180
196
  export {
181
- I as FilterPopoverContent,
182
- H as FilterTagList
197
+ E as FilterPopoverContent,
198
+ X as FilterTagList
183
199
  };
@@ -1,3 +1,3 @@
1
1
  export declare const promptVariants: (props?: ({
2
- variant?: "default" | "destructive" | "info" | "warning" | "success" | null | undefined;
2
+ variant?: "default" | "success" | "warning" | "destructive" | "info" | null | undefined;
3
3
  } & import('class-variance-authority/types').ClassProp) | undefined) => string;
@@ -1,58 +1,62 @@
1
1
  import { jsx as o } from "react/jsx-runtime";
2
- import * as a from "@radix-ui/react-popover";
3
- import { cn as i } from "../../../../lib/utils.js";
4
- import { useOverlayPortalContainer as m } from "../../../../lib/overlay/overlay-portal-context.js";
5
- import { OVERLAY_NESTED_FLOATING_INSTANT_HIDE_CLASS as v } from "../../../../lib/overlay/overlay-host.constants.js";
6
- function g({
7
- menuRef: n,
8
- menuMinHeight: t,
9
- menuWidth: l,
2
+ import * as n from "@radix-ui/react-popover";
3
+ import { cn as a } from "../../../../lib/utils.js";
4
+ import { preventDismissOnTooltipOutside as t } from "../../../../lib/overlay/prevent-dismiss-on-tooltip-outside.js";
5
+ import { useOverlayPortalContainer as v } from "../../../../lib/overlay/overlay-portal-context.js";
6
+ import { OVERLAY_NESTED_FLOATING_INSTANT_HIDE_CLASS as f } from "../../../../lib/overlay/overlay-host.constants.js";
7
+ function O({
8
+ menuRef: l,
9
+ menuMinHeight: i,
10
+ menuWidth: s,
10
11
  isReadOnly: r,
11
12
  id: d,
12
- menuLabel: s,
13
- children: p
13
+ menuLabel: p,
14
+ children: m
14
15
  }) {
15
- const c = m();
16
- return /* @__PURE__ */ o(a.Portal, { container: c, children: /* @__PURE__ */ o(
17
- a.Content,
16
+ const c = v();
17
+ return /* @__PURE__ */ o(n.Portal, { container: c, children: /* @__PURE__ */ o(
18
+ n.Content,
18
19
  {
19
- ref: n,
20
+ ref: l,
20
21
  side: "bottom",
21
22
  sideOffset: 4,
22
23
  align: "start",
23
24
  avoidCollisions: !0,
24
25
  collisionPadding: 8,
25
- "aria-label": s,
26
+ "aria-label": p,
26
27
  onOpenAutoFocus: (e) => e.preventDefault(),
28
+ onPointerDownOutside: t,
29
+ onInteractOutside: t,
30
+ onFocusOutside: t,
27
31
  onWheel: (e) => e.stopPropagation(),
28
32
  style: {
29
- width: l ?? "var(--radix-popover-trigger-width)",
33
+ width: s ?? "var(--radix-popover-trigger-width)",
30
34
  minWidth: "var(--radix-popover-trigger-width)",
31
35
  maxHeight: "min(320px, var(--radix-popover-content-available-height, 320px))"
32
36
  },
33
- className: i(
37
+ className: a(
34
38
  "z-50 flex flex-col overflow-hidden rounded-[12px] p-0 text-base shadow-elevation-select focus:outline-none sm:text-sm border-none pointer-events-auto",
35
39
  r ? "bg-disabled-surface" : "bg-canvas-elevated",
36
- v
40
+ f
37
41
  ),
38
42
  "data-testid": `select-menu-${d || "default"}`,
39
43
  "data-component": "select-menu",
40
44
  children: /* @__PURE__ */ o(
41
45
  "div",
42
46
  {
43
- className: i(
47
+ className: a(
44
48
  "flex min-h-0 flex-1 flex-col overflow-hidden rounded-[12px]",
45
49
  r ? "bg-disabled-surface" : "bg-canvas-elevated"
46
50
  ),
47
51
  style: {
48
- minHeight: t ? `${t}px` : void 0
52
+ minHeight: i ? `${i}px` : void 0
49
53
  },
50
- children: p
54
+ children: m
51
55
  }
52
56
  )
53
57
  }
54
58
  ) });
55
59
  }
56
60
  export {
57
- g as SelectMenuPanel
61
+ O as SelectMenuPanel
58
62
  };
@@ -1,16 +1,18 @@
1
1
  import { jsxs as w, jsx as t } from "react/jsx-runtime";
2
2
  import { memo as Y } from "react";
3
- import { Checkmark as F, ChevronRight as H } from "impact-nova-icons";
4
- import { Badge as J } from "../../../data-display/badge/badge.js";
5
- import { cn as o } from "../../../../lib/utils.js";
6
- import { selectOptionVariants as K } from "../select.variants.js";
7
- import { isSelected as L } from "../utils/select.js";
8
- import { Submenu as Q } from "./Submenu.js";
9
- function T({
3
+ import { useSuppressOptionClickForTextSelection as J } from "../hooks/useSuppressOptionClickForTextSelection.js";
4
+ import { Checkmark as K, ChevronRight as L } from "impact-nova-icons";
5
+ import { Badge as Q } from "../../../data-display/badge/badge.js";
6
+ import { OverflowTooltip as U } from "../../../feedback/tooltip/overflow-tooltip.js";
7
+ import { cn as m } from "../../../../lib/utils.js";
8
+ import { selectOptionVariants as W } from "../select.variants.js";
9
+ import { isSelected as X } from "../utils/select.js";
10
+ import { Submenu as Z } from "./Submenu.js";
11
+ function _({
10
12
  option: e,
11
- virtualRow: s,
12
- measureElement: j,
13
- selectFieldId: C,
13
+ virtualRow: o,
14
+ measureElement: P,
15
+ selectFieldId: j,
14
16
  id: v,
15
17
  isMulti: f,
16
18
  isReadOnly: u,
@@ -19,62 +21,64 @@ function T({
19
21
  showSequence: I,
20
22
  selected: r,
21
23
  isOptDisabled: n,
22
- indeterminate: h,
23
- selectedCount: N,
24
- isParentSelectable: $,
25
- highlighted: z,
26
- activeSubmenu: B,
24
+ indeterminate: p,
25
+ selectedCount: S,
26
+ isParentSelectable: N,
27
+ highlighted: O,
28
+ activeSubmenu: z,
27
29
  setActiveSubmenu: y,
28
- optionLabel: V,
29
- optionLabelString: E,
30
- sequence: d,
31
- internalValue: G,
32
- renderOption: S,
30
+ optionLabel: B,
31
+ optionLabelString: T,
32
+ sequence: s,
33
+ internalValue: V,
34
+ renderOption: $,
33
35
  onSelect: b,
34
- getGroupStats: P
36
+ getGroupStats: C
35
37
  }) {
36
- const x = v || "default", p = String(e.value || ""), l = c && e.isGroup, g = a && e.isSubmenuParent, k = I && !l && !g;
38
+ const h = v || "default", x = String(e.value || ""), l = c && e.isGroup, k = a && e.isSubmenuParent, g = I && !l && !k, { onOptionPointerDown: E, onOptionDoubleClick: F, createOptionClickHandler: G } = J(), H = () => {
39
+ n || (c && e.isGroup || a && e.isSubmenuParent) && !N || b(e);
40
+ };
37
41
  return /* @__PURE__ */ w(
38
42
  "div",
39
43
  {
40
- "data-index": s.index,
41
- ref: j,
44
+ "data-index": o.index,
45
+ ref: P,
42
46
  className: "absolute start-0 w-full pb-[2px]",
43
47
  style: {
44
- transform: `translateY(${s.start}px)`,
48
+ transform: `translateY(${o.start}px)`,
45
49
  width: "100%"
46
50
  },
47
- "data-testid": `select-option-wrapper-${x}-${p}`,
51
+ "data-testid": `select-option-wrapper-${h}-${x}`,
48
52
  children: [
49
53
  /* @__PURE__ */ t(
50
54
  "div",
51
55
  {
52
- id: `${C}-option-${s.index}`,
53
- className: o(
54
- K({
56
+ id: `${j}-option-${o.index}`,
57
+ className: m(
58
+ W({
55
59
  disabled: n,
56
60
  readOnly: u,
57
61
  selected: r && !n && !(c && e.isGroup) && !(a && e.isSubmenuParent),
58
- highlighted: z && !n
62
+ highlighted: O && !n
59
63
  })
60
64
  ),
61
65
  style: {
62
66
  paddingInlineStart: `${e.depth * 16 + 12}px`
63
67
  },
64
- onClick: () => {
65
- n || (c && e.isGroup || a && e.isSubmenuParent) && !$ || b(e);
66
- },
68
+ onPointerDown: E,
69
+ onDoubleClick: F,
70
+ onClick: G(H),
67
71
  onMouseEnter: () => {
68
72
  a && e.isSubmenuParent ? y(e.value) : y(null);
69
73
  },
70
- "data-testid": `select-option-${x}-${p}`,
74
+ "data-testid": `select-option-${h}-${x}`,
71
75
  "data-state": r ? "checked" : "unchecked",
72
76
  "data-disabled": n || void 0,
73
77
  "data-component": "select-option",
74
78
  role: "option",
75
79
  "aria-selected": r,
76
80
  "aria-disabled": n || void 0,
77
- children: S ? S(
81
+ children: $ ? $(
78
82
  {
79
83
  onClick: () => {
80
84
  },
@@ -84,82 +88,89 @@ function T({
84
88
  },
85
89
  e
86
90
  ) : /* @__PURE__ */ w("div", { className: "flex items-center flex-1 overflow-hidden", children: [
87
- f && (c && e.isGroup || a && e.isSubmenuParent ? $ : !0) && /* @__PURE__ */ t(
91
+ f && (c && e.isGroup || a && e.isSubmenuParent ? N : !0) && /* @__PURE__ */ t(
88
92
  "span",
89
93
  {
90
94
  "aria-hidden": "true",
91
- className: o(
95
+ className: m(
92
96
  "mr-[7px] flex h-4 w-4 shrink-0 items-center justify-center rounded-[4px] border border-stroke-field bg-canvas-elevated",
93
- (r || h) && "border-brand bg-accent text-brand",
97
+ (r || p) && "border-brand bg-accent text-brand",
94
98
  (n || u) && "opacity-50"
95
99
  ),
96
- children: r && !h ? /* @__PURE__ */ t(F, { className: "h-3.5 w-3.5" }) : h ? /* @__PURE__ */ t("span", { className: "block h-0.5 w-2.5 bg-current" }) : null
100
+ children: r && !p ? /* @__PURE__ */ t(K, { className: "h-3.5 w-3.5" }) : p ? /* @__PURE__ */ t("span", { className: "block h-0.5 w-2.5 bg-current" }) : null
97
101
  }
98
102
  ),
99
103
  /* @__PURE__ */ w(
100
104
  "div",
101
105
  {
102
- className: o(
106
+ className: m(
103
107
  "flex min-w-0 flex-1 items-center overflow-hidden",
104
- k ? "justify-between gap-2" : "gap-2"
108
+ g ? "justify-between gap-2" : "gap-2"
105
109
  ),
106
110
  children: [
107
111
  /* @__PURE__ */ t(
108
- "span",
112
+ U,
109
113
  {
110
- className: o(
111
- "block min-w-0 truncate",
112
- k && "flex-1",
113
- l ? "text-xs font-semibold text-content-icon uppercase tracking-wider" : r && !g ? "font-medium" : "font-normal",
114
+ triggerClassName: m(
115
+ "block min-w-0 truncate select-text",
116
+ g && "flex-1",
117
+ l ? "text-xs font-semibold text-content-icon uppercase tracking-wider" : r && !k ? "font-medium" : "font-normal",
114
118
  !l && "text-[14px]"
115
119
  ),
116
- "data-testid": `select-option-label-${x}-${p}`,
117
- "data-state": r ? "checked" : "unchecked",
118
- title: E,
119
- children: V
120
+ content: T,
121
+ side: "top",
122
+ variant: "tertiary",
123
+ children: /* @__PURE__ */ t(
124
+ "span",
125
+ {
126
+ "data-testid": `select-option-label-${h}-${x}`,
127
+ "data-state": r ? "checked" : "unchecked",
128
+ children: B
129
+ }
130
+ )
120
131
  }
121
132
  ),
122
- (l || g) && N > 0 && /* @__PURE__ */ t("span", { className: "inline-flex shrink-0 items-center justify-center rounded-full bg-brand-tint px-1.5 py-0.5 text-xs font-medium text-brand-on-subtle", children: N }),
123
- k && /* @__PURE__ */ t("span", { className: "flex h-5 w-6 shrink-0 items-center justify-center", children: d !== void 0 && d > 0 ? /* @__PURE__ */ t(
124
- J,
133
+ (l || k) && S > 0 && /* @__PURE__ */ t("span", { className: "inline-flex shrink-0 items-center justify-center rounded-full bg-brand-tint px-1.5 py-0.5 text-xs font-medium text-brand-on-subtle", children: S }),
134
+ g && /* @__PURE__ */ t("span", { className: "flex h-5 w-6 shrink-0 items-center justify-center", children: s !== void 0 && s > 0 ? /* @__PURE__ */ t(
135
+ Q,
125
136
  {
126
137
  variant: "outline",
127
138
  color: "primary",
128
139
  size: "sm",
129
- "data-testid": `select-option-sequence-${d}`,
130
- children: d.toString()
140
+ "data-testid": `select-option-sequence-${s}`,
141
+ children: s.toString()
131
142
  }
132
143
  ) : null })
133
144
  ]
134
145
  }
135
146
  ),
136
- a && e.isSubmenuParent && /* @__PURE__ */ t(H, { size: "12px", className: "text-content-icon" })
147
+ a && e.isSubmenuParent && /* @__PURE__ */ t(L, { size: "12px", className: "text-content-icon" })
137
148
  ] })
138
149
  }
139
150
  ),
140
- a && B === e.value && e.isSubmenuParent && /* @__PURE__ */ t(
141
- Q,
151
+ a && z === e.value && e.isSubmenuParent && /* @__PURE__ */ t(
152
+ Z,
142
153
  {
143
154
  parentOption: e,
144
155
  isMulti: !!f,
145
156
  isReadOnly: !!u,
146
- isSelected: (i) => L(i, G, !!f),
157
+ isSelected: (i) => X(i, V, !!f),
147
158
  getIndeterminateState: (i) => {
148
- const m = P(i);
149
- return m ? m.selected > 0 && m.selected < m.total : !1;
159
+ const d = C(i);
160
+ return d ? d.selected > 0 && d.selected < d.total : !1;
150
161
  },
151
- getSelectedCount: (i) => P(i)?.selected || 0,
162
+ getSelectedCount: (i) => C(i)?.selected || 0,
152
163
  handleSelect: b,
153
164
  id: v
154
165
  }
155
166
  )
156
167
  ]
157
168
  },
158
- s.key
169
+ o.key
159
170
  );
160
171
  }
161
- const O = Y(T);
172
+ const ie = Y(_);
162
173
  export {
163
- O as SelectOptionRow,
164
- T as SelectOptionRowInner
174
+ ie as SelectOptionRow,
175
+ _ as SelectOptionRowInner
165
176
  };