impact-nova 2.2.5 → 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.
Files changed (40) 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 +109 -87
  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 +216 -191
  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/statistics-card/statistics-card.js +138 -111
  10. package/dist/components/feedback/tooltip/index.d.ts +3 -0
  11. package/dist/components/feedback/tooltip/index.js +13 -9
  12. package/dist/components/feedback/tooltip/overflow-tooltip.d.ts +2 -0
  13. package/dist/components/feedback/tooltip/overflow-tooltip.js +69 -0
  14. package/dist/components/feedback/tooltip/overflow-tooltip.types.d.ts +37 -0
  15. package/dist/components/feedback/tooltip/use-overflow-tooltip.d.ts +3 -0
  16. package/dist/components/feedback/tooltip/use-overflow-tooltip.js +55 -0
  17. package/dist/components/flows/command-palette/shortcut-settings.js +85 -66
  18. package/dist/components/flows/filter-panel/filter-panel.js +76 -69
  19. package/dist/components/flows/filter-strip/filter-summary.js +184 -163
  20. package/dist/components/flows/filter-strip/filter-tag-list.js +121 -105
  21. package/dist/components/forms/select/components/SelectOptionRow.js +35 -27
  22. package/dist/components/forms/select/components/SelectTriggerValue.js +49 -20
  23. package/dist/components/forms/select/components/Submenu.js +40 -31
  24. package/dist/components/layout/horizontal-scroller/index.d.ts +4 -0
  25. package/dist/components/layout/horizontal-scroller/index.js +6 -2
  26. package/dist/components/layout/horizontal-scroller/scroll-overflow-affordance.d.ts +10 -0
  27. package/dist/components/layout/horizontal-scroller/scroll-overflow-affordance.js +124 -0
  28. package/dist/components/layout/horizontal-scroller/use-horizontal-scroll-overflow.d.ts +13 -0
  29. package/dist/components/layout/horizontal-scroller/use-horizontal-scroll-overflow.js +40 -0
  30. package/dist/components/primitives/stepper/stepper.js +61 -42
  31. package/dist/impact-nova.css +1 -1
  32. package/dist/index.js +468 -460
  33. package/dist/lib/overflow/is-text-overflowing.d.ts +3 -0
  34. package/dist/lib/overflow/is-text-overflowing.js +6 -0
  35. package/dist/llms/rules/ag-grid.js +1 -1
  36. package/dist/llms/rules/best-practices.js +1 -1
  37. package/dist/llms/rules/installation.js +1 -1
  38. package/dist/llms/rules/requirements.js +1 -1
  39. package/dist/llms/rules/troubleshooting.js +1 -1
  40. 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 k, TooltipTrigger as T, 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
15
  onViewAll: h,
14
- onItemRemove: u,
15
- isRemovable: N,
16
- isCopyable: t = !1,
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
+ }, b = s ? a : a.slice(0, 3), w = a.length > 3, u = () => {
24
+ c === "custom" ? h?.() : 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: b.map((t, l) => {
39
+ const i = String(t), y = !!(e || f);
40
+ return /* @__PURE__ */ r(
41
+ "div",
42
+ {
43
+ className: "group relative shrink-0 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 w-full truncate",
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 && w && /* @__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: u,
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
110
  onOverflowClick: h,
95
- onViewAll: u
96
- }) => /* @__PURE__ */ e("div", { className: "flex flex-1 items-center min-w-0", children: /* @__PURE__ */ e(
97
- S,
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, b = n.length > 0, w = d || b, u = `+${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
+ w && (d ? /* @__PURE__ */ r(k, { children: [
141
+ /* @__PURE__ */ o(T, { 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: () => h?.(e.id),
151
+ children: x || u
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(k, { children: [
160
+ /* @__PURE__ */ o(T, { 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: u
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,12 +1,13 @@
1
1
  import { jsxs as w, jsx as t } from "react/jsx-runtime";
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";
2
+ import { memo as T } from "react";
3
+ import { Checkmark as Y, ChevronRight as F } from "impact-nova-icons";
4
+ import { Badge as H } from "../../../data-display/badge/badge.js";
5
+ import { OverflowTooltip as J } from "../../../feedback/tooltip/overflow-tooltip.js";
6
+ import { cn as m } from "../../../../lib/utils.js";
6
7
  import { selectOptionVariants as K } from "../select.variants.js";
7
8
  import { isSelected as L } from "../utils/select.js";
8
9
  import { Submenu as Q } from "./Submenu.js";
9
- function T({
10
+ function U({
10
11
  option: e,
11
12
  virtualRow: s,
12
13
  measureElement: j,
@@ -21,10 +22,10 @@ function T({
21
22
  isOptDisabled: n,
22
23
  indeterminate: h,
23
24
  selectedCount: N,
24
- isParentSelectable: $,
25
+ isParentSelectable: y,
25
26
  highlighted: z,
26
27
  activeSubmenu: B,
27
- setActiveSubmenu: y,
28
+ setActiveSubmenu: $,
28
29
  optionLabel: V,
29
30
  optionLabelString: E,
30
31
  sequence: d,
@@ -50,7 +51,7 @@ function T({
50
51
  "div",
51
52
  {
52
53
  id: `${C}-option-${s.index}`,
53
- className: o(
54
+ className: m(
54
55
  K({
55
56
  disabled: n,
56
57
  readOnly: u,
@@ -62,10 +63,10 @@ function T({
62
63
  paddingInlineStart: `${e.depth * 16 + 12}px`
63
64
  },
64
65
  onClick: () => {
65
- n || (c && e.isGroup || a && e.isSubmenuParent) && !$ || b(e);
66
+ n || (c && e.isGroup || a && e.isSubmenuParent) && !y || b(e);
66
67
  },
67
68
  onMouseEnter: () => {
68
- a && e.isSubmenuParent ? y(e.value) : y(null);
69
+ a && e.isSubmenuParent ? $(e.value) : $(null);
69
70
  },
70
71
  "data-testid": `select-option-${x}-${p}`,
71
72
  "data-state": r ? "checked" : "unchecked",
@@ -84,44 +85,51 @@ function T({
84
85
  },
85
86
  e
86
87
  ) : /* @__PURE__ */ w("div", { className: "flex items-center flex-1 overflow-hidden", children: [
87
- f && (c && e.isGroup || a && e.isSubmenuParent ? $ : !0) && /* @__PURE__ */ t(
88
+ f && (c && e.isGroup || a && e.isSubmenuParent ? y : !0) && /* @__PURE__ */ t(
88
89
  "span",
89
90
  {
90
91
  "aria-hidden": "true",
91
- className: o(
92
+ className: m(
92
93
  "mr-[7px] flex h-4 w-4 shrink-0 items-center justify-center rounded-[4px] border border-stroke-field bg-canvas-elevated",
93
94
  (r || h) && "border-brand bg-accent text-brand",
94
95
  (n || u) && "opacity-50"
95
96
  ),
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
97
+ children: r && !h ? /* @__PURE__ */ t(Y, { className: "h-3.5 w-3.5" }) : h ? /* @__PURE__ */ t("span", { className: "block h-0.5 w-2.5 bg-current" }) : null
97
98
  }
98
99
  ),
99
100
  /* @__PURE__ */ w(
100
101
  "div",
101
102
  {
102
- className: o(
103
+ className: m(
103
104
  "flex min-w-0 flex-1 items-center overflow-hidden",
104
105
  k ? "justify-between gap-2" : "gap-2"
105
106
  ),
106
107
  children: [
107
108
  /* @__PURE__ */ t(
108
- "span",
109
+ J,
109
110
  {
110
- className: o(
111
+ triggerClassName: m(
111
112
  "block min-w-0 truncate",
112
113
  k && "flex-1",
113
114
  l ? "text-xs font-semibold text-content-icon uppercase tracking-wider" : r && !g ? "font-medium" : "font-normal",
114
115
  !l && "text-[14px]"
115
116
  ),
116
- "data-testid": `select-option-label-${x}-${p}`,
117
- "data-state": r ? "checked" : "unchecked",
118
- title: E,
119
- children: V
117
+ content: E,
118
+ side: "top",
119
+ variant: "tertiary",
120
+ children: /* @__PURE__ */ t(
121
+ "span",
122
+ {
123
+ "data-testid": `select-option-label-${x}-${p}`,
124
+ "data-state": r ? "checked" : "unchecked",
125
+ children: V
126
+ }
127
+ )
120
128
  }
121
129
  ),
122
130
  (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
131
  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,
132
+ H,
125
133
  {
126
134
  variant: "outline",
127
135
  color: "primary",
@@ -133,7 +141,7 @@ function T({
133
141
  ]
134
142
  }
135
143
  ),
136
- a && e.isSubmenuParent && /* @__PURE__ */ t(H, { size: "12px", className: "text-content-icon" })
144
+ a && e.isSubmenuParent && /* @__PURE__ */ t(F, { size: "12px", className: "text-content-icon" })
137
145
  ] })
138
146
  }
139
147
  ),
@@ -145,8 +153,8 @@ function T({
145
153
  isReadOnly: !!u,
146
154
  isSelected: (i) => L(i, G, !!f),
147
155
  getIndeterminateState: (i) => {
148
- const m = P(i);
149
- return m ? m.selected > 0 && m.selected < m.total : !1;
156
+ const o = P(i);
157
+ return o ? o.selected > 0 && o.selected < o.total : !1;
150
158
  },
151
159
  getSelectedCount: (i) => P(i)?.selected || 0,
152
160
  handleSelect: b,
@@ -158,8 +166,8 @@ function T({
158
166
  s.key
159
167
  );
160
168
  }
161
- const O = Y(T);
169
+ const D = T(U);
162
170
  export {
163
- O as SelectOptionRow,
164
- T as SelectOptionRowInner
171
+ D as SelectOptionRow,
172
+ U as SelectOptionRowInner
165
173
  };
@@ -1,28 +1,57 @@
1
- import { jsx as n } from "react/jsx-runtime";
2
- import { cn as p } from "../../../../lib/utils.js";
3
- import { isInvertedSelection as x, isOptionArray as f } from "../utils/select.js";
4
- function T({
5
- isMulti: l,
6
- isDisabled: m,
7
- internalValue: s,
8
- totalCount: i,
9
- totalOptionsCount: u,
10
- formatSelectedCount: d,
11
- resolveOptionLabel: c,
12
- placeholder: o
1
+ import { jsx as r } from "react/jsx-runtime";
2
+ import { cn as x } from "../../../../lib/utils.js";
3
+ import "react";
4
+ import { OverflowTooltip as m } from "../../../feedback/tooltip/overflow-tooltip.js";
5
+ import { isInvertedSelection as h, isOptionArray as d } from "../utils/select.js";
6
+ function C({
7
+ isMulti: u,
8
+ isDisabled: p,
9
+ internalValue: o,
10
+ totalCount: s,
11
+ totalOptionsCount: g,
12
+ formatSelectedCount: v,
13
+ resolveOptionLabel: a,
14
+ placeholder: c
13
15
  }) {
14
- const r = p(
16
+ const n = x(
15
17
  "text-[14px] font-medium truncate min-w-0 block",
16
- m ? "text-disabled-foreground" : "text-foreground"
18
+ p ? "text-disabled-foreground" : "text-foreground"
17
19
  );
18
- if (l) {
19
- const e = s || [];
20
+ if (u) {
21
+ const e = o || [];
20
22
  let t = 0;
21
- return x(e) ? t = Math.max(0, (typeof i == "number" ? i : u) - e.excludedValues.length) : f(e) && (t = e.length), t === 0 ? o : t === 1 && f(e) ? /* @__PURE__ */ n("span", { className: r, children: c(e[0]) }) : /* @__PURE__ */ n("span", { className: r, children: d(t) });
23
+ if (h(e) ? t = Math.max(0, (typeof s == "number" ? s : g) - e.excludedValues.length) : d(e) && (t = e.length), t === 0)
24
+ return c;
25
+ if (t === 1 && d(e)) {
26
+ const i = a(e[0]);
27
+ return /* @__PURE__ */ r(
28
+ m,
29
+ {
30
+ triggerClassName: n,
31
+ content: i,
32
+ side: "top",
33
+ variant: "tertiary",
34
+ children: /* @__PURE__ */ r("span", { children: i })
35
+ }
36
+ );
37
+ }
38
+ return /* @__PURE__ */ r("span", { className: n, children: v(t) });
22
39
  }
23
- const a = s;
24
- return a ? /* @__PURE__ */ n("span", { className: r, children: c(a) }) : o;
40
+ const l = o;
41
+ if (!l)
42
+ return c;
43
+ const f = a(l);
44
+ return /* @__PURE__ */ r(
45
+ m,
46
+ {
47
+ triggerClassName: n,
48
+ content: f,
49
+ side: "top",
50
+ variant: "tertiary",
51
+ children: /* @__PURE__ */ r("span", { children: f })
52
+ }
53
+ );
25
54
  }
26
55
  export {
27
- T as SelectTriggerValue
56
+ C as SelectTriggerValue
28
57
  };