impact-nova 3.0.0-alpha.4 → 3.0.0-alpha.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 (47) hide show
  1. package/dist/components/data/ag-grid-react/cell-renderers/editors/list-select-cell-editor.js +56 -42
  2. package/dist/components/data/ag-grid-react/cell-renderers/editors/select-cell-editor.js +48 -45
  3. package/dist/components/data/ag-grid-react/cell-renderers/list-select-display-renderer.js +31 -33
  4. package/dist/components/data/ag-grid-react/cell-renderers/select-display-renderer.js +18 -17
  5. package/dist/components/data/ag-grid-react/editable-utils.d.ts +9 -1
  6. package/dist/components/data/ag-grid-react/editable-utils.js +46 -41
  7. package/dist/components/data/expandable-list-item/expandable-list-item-attributes.js +3 -2
  8. package/dist/components/data/expandable-list-item/expandable-list-item-metrics.js +3 -2
  9. package/dist/components/data/expandable-list-item/sku-picker-chrome.d.ts +2 -1
  10. package/dist/components/data/expandable-list-item/sku-picker-chrome.js +51 -40
  11. package/dist/components/data/expandable-list-item/useServerSkuInfinitePages.d.ts +2 -1
  12. package/dist/components/data/expandable-list-item/virtualized-responsive-grid.catalog.d.ts +5 -4
  13. package/dist/components/data-display/chart/chart-scatter3d.d.ts +39 -0
  14. package/dist/components/data-display/chart/chart-scatter3d.js +180 -0
  15. package/dist/components/data-display/chart/chart.js +125 -112
  16. package/dist/components/data-display/chart/chart.utils.js +122 -92
  17. package/dist/components/feedback/tooltip/button-icon-tooltip.d.ts +4 -1
  18. package/dist/components/feedback/tooltip/button-icon-tooltip.js +14 -12
  19. package/dist/components/feedback/tooltip/tab-tooltip-render.js +3 -2
  20. package/dist/components/feedback/tooltip/use-overflow-tooltip.js +44 -36
  21. package/dist/components/flows/command-palette/shortcut-settings.js +10 -10
  22. package/dist/components/flows/filter-panel/filter-panel.js +4 -4
  23. package/dist/components/flows/iris-chat/iris-chat-menu.js +100 -73
  24. package/dist/components/forms/choice-card/choice-card-percent.js +68 -50
  25. package/dist/components/forms/choice-card/choice-card.js +23 -23
  26. package/dist/components/forms/select/components/SelectMenuPanel.js +15 -15
  27. package/dist/components/forms/select/components/SelectTriggerValue.js +3 -2
  28. package/dist/components/forms/select/components/Submenu.js +3 -2
  29. package/dist/components/layout/horizontal-scroller/horizontal-scroller-mask.d.ts +3 -0
  30. package/dist/components/layout/horizontal-scroller/horizontal-scroller-mask.js +12 -0
  31. package/dist/components/layout/horizontal-scroller/horizontal-scroller.js +181 -125
  32. package/dist/components/layout/horizontal-scroller/horizontal-scroller.types.d.ts +2 -0
  33. package/dist/components/layout/horizontal-scroller/scroll-overflow-affordance.d.ts +3 -1
  34. package/dist/components/layout/horizontal-scroller/scroll-overflow-affordance.js +77 -67
  35. package/dist/components/primitives/iris/iris-insight-truncated-text.d.ts +3 -0
  36. package/dist/components/primitives/iris/iris-insight-truncated-text.js +33 -0
  37. package/dist/components/primitives/iris/iris.d.ts +2 -1
  38. package/dist/components/primitives/iris/iris.js +57 -67
  39. package/dist/components/primitives/iris/iris.types.d.ts +7 -0
  40. package/dist/components/primitives/stepper/internals/stepper-summary.js +5 -5
  41. package/dist/form-react/Fields/VirtualizedListField.js +69 -64
  42. package/dist/impact-nova-components.css +35 -8
  43. package/dist/impact-nova.css +1 -1
  44. package/dist/lib/alphabetical-sort.js +13 -0
  45. package/dist/llms/rules/installation.js +1 -1
  46. package/dist/llms/rules/requirements.js +1 -1
  47. package/package.json +2 -2
@@ -1,37 +1,37 @@
1
1
  import { jsxs as s, jsx as e } from "react/jsx-runtime";
2
- import { useRef as S, useState as y } from "react";
2
+ import { useRef as S, useState as g } from "react";
3
3
  import { FunnelShow as I, ThreeDots as L, Pin as M, Pencil as A, Bin as D, ChevronRight as T } from "impact-nova-icons";
4
- import { DropdownMenu as g, DropdownMenuTrigger as v, DropdownMenuContent as b, DropdownMenuItem as f } from "../../feedback/dropdown-menu/dropdown-menu.js";
4
+ import { DropdownMenu as C, DropdownMenuTrigger as v, DropdownMenuContent as b, DropdownMenuItem as p } from "../../feedback/dropdown-menu/dropdown-menu.js";
5
5
  import { ButtonIconTooltip as N } from "../../feedback/tooltip/button-icon-tooltip.js";
6
6
  import { Button as x } from "../../primitives/button/button.js";
7
7
  import { Accordion as j, AccordionItem as k, AccordionTrigger as R, AccordionContent as E } from "../../primitives/accordion/accordion.js";
8
8
  import { useImpactNovaI18n as w } from "../../../i18n/use-impact-nova-i18n.js";
9
9
  import { useVirtualizedList as B } from "../../../lib/virtualized/useVirtualizedList.js";
10
10
  import { createComponent as O } from "../../../lib/primitives/create-component.js";
11
- import { cn as C } from "../../../lib/utils.js";
11
+ import { cn as y } from "../../../lib/utils.js";
12
12
  import { IrisChatAttachIcon as $ } from "./iris-chat-icons.js";
13
13
  const z = ["type", "status", "lastActivity"], ee = O(
14
14
  "IrisChatMenu",
15
- ({ className: t, children: m, ...l }, c) => /* @__PURE__ */ e(
15
+ ({ className: t, children: d, ...l }, o) => /* @__PURE__ */ e(
16
16
  "div",
17
17
  {
18
- ref: c,
18
+ ref: o,
19
19
  "data-component": "iris-chat-menu",
20
- className: C("flex flex-col gap-4 py-4", t),
20
+ className: y("flex flex-col gap-4 py-4", t),
21
21
  ...l,
22
- children: /* @__PURE__ */ e(j, { type: "multiple", defaultValue: ["recent", "artifacts"], className: "flex flex-col gap-4", children: m })
22
+ children: /* @__PURE__ */ e(j, { type: "multiple", defaultValue: ["recent", "artifacts"], className: "flex flex-col gap-4", children: d })
23
23
  }
24
24
  )
25
25
  ), P = ({
26
26
  value: t,
27
- title: m,
27
+ title: d,
28
28
  onFilterSelect: l,
29
- onViewMore: c,
29
+ onViewMore: o,
30
30
  viewMoreLabel: a,
31
31
  className: h,
32
- children: p
32
+ children: f
33
33
  }) => {
34
- const { t: i } = w(), d = {
34
+ const { t: i } = w(), m = {
35
35
  type: i("irisChat.filterType"),
36
36
  status: i("irisChat.filterStatus"),
37
37
  lastActivity: i("irisChat.filterLastActivity")
@@ -41,7 +41,7 @@ const z = ["type", "status", "lastActivity"], ee = O(
41
41
  {
42
42
  value: t,
43
43
  "data-component": "iris-chat-menu-section",
44
- className: C("rounded-none border-0 bg-transparent shadow-none", h),
44
+ className: y("rounded-none border-0 bg-transparent shadow-none", h),
45
45
  children: [
46
46
  /* @__PURE__ */ s("div", { className: "flex h-10 items-center justify-between gap-2", children: [
47
47
  /* @__PURE__ */ s(R, { variant: "plain", headingLevel: 3, className: "flex min-w-0 flex-1 items-center gap-2 py-0", children: [
@@ -52,33 +52,42 @@ const z = ["type", "status", "lastActivity"], ee = O(
52
52
  className: "rotate-90 transition-transform group-data-[state=open]:-rotate-90"
53
53
  }
54
54
  ) }),
55
- /* @__PURE__ */ e("span", { className: "text-sm font-medium text-content", children: m })
55
+ /* @__PURE__ */ e("span", { className: "text-sm font-medium text-content", children: d })
56
56
  ] }),
57
- /* @__PURE__ */ s(g, { children: [
58
- /* @__PURE__ */ e(N, { label: i("irisChat.filter"), children: /* @__PURE__ */ e(v, { asChild: !0, children: /* @__PURE__ */ e(
59
- x,
57
+ /* @__PURE__ */ s(C, { children: [
58
+ /* @__PURE__ */ e(
59
+ N,
60
60
  {
61
- type: "button",
62
- variant: "ghost",
63
- size: "iconSm",
64
- "aria-label": i("irisChat.filter"),
65
- "data-testid": `iris-chat-filter-${t}`,
66
- children: /* @__PURE__ */ e(I, { size: 16 })
61
+ label: i("irisChat.filter"),
62
+ variant: "secondary",
63
+ align: "end",
64
+ side: "top",
65
+ children: /* @__PURE__ */ e(v, { asChild: !0, children: /* @__PURE__ */ e(
66
+ x,
67
+ {
68
+ type: "button",
69
+ variant: "ghost",
70
+ size: "iconSm",
71
+ "aria-label": i("irisChat.filter"),
72
+ "data-testid": `iris-chat-filter-${t}`,
73
+ children: /* @__PURE__ */ e(I, { size: 16 })
74
+ }
75
+ ) })
67
76
  }
68
- ) }) }),
69
- /* @__PURE__ */ e(b, { align: "end", children: z.map((o) => /* @__PURE__ */ e(f, { onSelect: () => l?.(o), children: d[o] }, o)) })
77
+ ),
78
+ /* @__PURE__ */ e(b, { align: "end", children: z.map((c) => /* @__PURE__ */ e(p, { onSelect: () => l?.(c), children: m[c] }, c)) })
70
79
  ] })
71
80
  ] }),
72
81
  /* @__PURE__ */ s(E, { className: "px-0 pb-1 pt-1", children: [
73
- /* @__PURE__ */ e("div", { className: "flex flex-col", children: p }),
74
- c ? /* @__PURE__ */ e(
82
+ /* @__PURE__ */ e("div", { className: "flex flex-col", children: f }),
83
+ o ? /* @__PURE__ */ e(
75
84
  x,
76
85
  {
77
86
  type: "button",
78
87
  variant: "link",
79
88
  "data-testid": `iris-chat-view-more-${t}`,
80
89
  className: "mt-1 h-auto justify-start px-2 text-sm",
81
- onClick: c,
90
+ onClick: o,
82
91
  children: a ?? i("irisChat.viewMore")
83
92
  }
84
93
  ) : null
@@ -88,10 +97,10 @@ const z = ["type", "status", "lastActivity"], ee = O(
88
97
  );
89
98
  };
90
99
  P.displayName = "IrisChatMenuSection";
91
- const V = ({ title: t, onSelect: m, onAction: l, className: c }) => {
92
- const { t: a } = w(), [h, p] = y(!1), [i, d] = y(!1), [o, u] = y(t), n = () => {
93
- const r = o.trim();
94
- if (d(!1), !r || r === t) {
100
+ const V = ({ title: t, onSelect: d, onAction: l, className: o }) => {
101
+ const { t: a } = w(), [h, f] = g(!1), [i, m] = g(!1), [c, u] = g(t), n = () => {
102
+ const r = c.trim();
103
+ if (m(!1), !r || r === t) {
95
104
  u(t);
96
105
  return;
97
106
  }
@@ -102,17 +111,17 @@ const V = ({ title: t, onSelect: m, onAction: l, className: c }) => {
102
111
  {
103
112
  "data-component": "iris-chat-list-item",
104
113
  "data-menu-open": h ? "" : void 0,
105
- className: C(
114
+ className: y(
106
115
  "flex min-h-10 items-center justify-between gap-2 rounded-full px-3",
107
116
  (h || i) && "bg-secondary",
108
117
  "hover:bg-secondary",
109
- c
118
+ o
110
119
  ),
111
120
  children: [
112
121
  i ? /* @__PURE__ */ e(
113
122
  "input",
114
123
  {
115
- value: o,
124
+ value: c,
116
125
  autoFocus: !0,
117
126
  "aria-label": a("irisChat.rename"),
118
127
  "data-testid": "iris-chat-item-rename",
@@ -120,7 +129,7 @@ const V = ({ title: t, onSelect: m, onAction: l, className: c }) => {
120
129
  onChange: (r) => u(r.target.value),
121
130
  onBlur: n,
122
131
  onKeyDown: (r) => {
123
- r.key === "Enter" && (r.preventDefault(), n()), r.key === "Escape" && (u(t), d(!1));
132
+ r.key === "Enter" && (r.preventDefault(), n()), r.key === "Escape" && (u(t), m(!1));
124
133
  }
125
134
  }
126
135
  ) : /* @__PURE__ */ e(
@@ -128,25 +137,34 @@ const V = ({ title: t, onSelect: m, onAction: l, className: c }) => {
128
137
  {
129
138
  type: "button",
130
139
  className: "min-w-0 flex-1 truncate text-start text-sm text-content",
131
- onClick: m,
140
+ onClick: d,
132
141
  children: t
133
142
  }
134
143
  ),
135
- /* @__PURE__ */ s(g, { open: h, onOpenChange: p, children: [
136
- /* @__PURE__ */ e(N, { label: a("irisChat.moreActions"), children: /* @__PURE__ */ e(v, { asChild: !0, children: /* @__PURE__ */ e(
137
- x,
144
+ /* @__PURE__ */ s(C, { open: h, onOpenChange: f, children: [
145
+ /* @__PURE__ */ e(
146
+ N,
138
147
  {
139
- type: "button",
140
- variant: "ghost",
141
- size: "iconSm",
142
- "aria-label": a("irisChat.moreActions"),
143
- "data-testid": "iris-chat-item-more",
144
- children: /* @__PURE__ */ e(L, { size: 16 })
148
+ label: a("irisChat.moreActions"),
149
+ variant: "secondary",
150
+ align: "end",
151
+ side: "top",
152
+ children: /* @__PURE__ */ e(v, { asChild: !0, children: /* @__PURE__ */ e(
153
+ x,
154
+ {
155
+ type: "button",
156
+ variant: "ghost",
157
+ size: "iconSm",
158
+ "aria-label": a("irisChat.moreActions"),
159
+ "data-testid": "iris-chat-item-more",
160
+ children: /* @__PURE__ */ e(L, { size: 16 })
161
+ }
162
+ ) })
145
163
  }
146
- ) }) }),
164
+ ),
147
165
  /* @__PURE__ */ s(b, { align: "end", className: "w-[182px]", children: [
148
166
  /* @__PURE__ */ e(
149
- f,
167
+ p,
150
168
  {
151
169
  icon: /* @__PURE__ */ e(M, { size: 16 }),
152
170
  onSelect: () => l?.("pin"),
@@ -154,17 +172,17 @@ const V = ({ title: t, onSelect: m, onAction: l, className: c }) => {
154
172
  }
155
173
  ),
156
174
  /* @__PURE__ */ e(
157
- f,
175
+ p,
158
176
  {
159
177
  icon: /* @__PURE__ */ e(A, { size: 16 }),
160
178
  onSelect: () => {
161
- u(t), window.setTimeout(() => d(!0), 0);
179
+ u(t), window.setTimeout(() => m(!0), 0);
162
180
  },
163
181
  children: a("irisChat.rename")
164
182
  }
165
183
  ),
166
184
  /* @__PURE__ */ e(
167
- f,
185
+ p,
168
186
  {
169
187
  icon: /* @__PURE__ */ e($, {}),
170
188
  onSelect: () => l?.("archive"),
@@ -172,7 +190,7 @@ const V = ({ title: t, onSelect: m, onAction: l, className: c }) => {
172
190
  }
173
191
  ),
174
192
  /* @__PURE__ */ e(
175
- f,
193
+ p,
176
194
  {
177
195
  icon: /* @__PURE__ */ e(D, { size: 16 }),
178
196
  className: "text-destructive focus:bg-destructive/10 focus:text-destructive",
@@ -189,19 +207,19 @@ const V = ({ title: t, onSelect: m, onAction: l, className: c }) => {
189
207
  V.displayName = "IrisChatListItem";
190
208
  function F({
191
209
  items: t,
192
- getItemId: m,
210
+ getItemId: d,
193
211
  renderItem: l,
194
- title: c,
212
+ title: o,
195
213
  onFilterSelect: a,
196
214
  estimateSize: h = 32,
197
- className: p
215
+ className: f
198
216
  }) {
199
- const { t: i } = w(), d = S(null), o = B({
217
+ const { t: i } = w(), m = S(null), c = B({
200
218
  rowCount: t.length,
201
219
  getRowData: (n) => t[n],
202
- getRowId: (n) => m(t[n]),
220
+ getRowId: (n) => d(t[n]),
203
221
  estimateSize: () => h,
204
- scrollElementRef: d,
222
+ scrollElementRef: m,
205
223
  hasMore: !1
206
224
  }), u = {
207
225
  type: i("irisChat.filterType"),
@@ -212,26 +230,35 @@ function F({
212
230
  "div",
213
231
  {
214
232
  "data-component": "iris-chat-list",
215
- className: C("flex min-h-0 flex-1 flex-col", p),
233
+ className: y("flex min-h-0 flex-1 flex-col", f),
216
234
  children: [
217
- c || a ? /* @__PURE__ */ s("div", { className: "flex items-center justify-between gap-2 py-3", children: [
218
- c ? /* @__PURE__ */ e("p", { className: "text-sm font-medium text-content", children: c }) : /* @__PURE__ */ e("span", {}),
219
- a ? /* @__PURE__ */ s(g, { children: [
220
- /* @__PURE__ */ e(N, { label: i("irisChat.filter"), children: /* @__PURE__ */ e(v, { asChild: !0, children: /* @__PURE__ */ e(
221
- x,
235
+ o || a ? /* @__PURE__ */ s("div", { className: "flex items-center justify-between gap-2 py-3", children: [
236
+ o ? /* @__PURE__ */ e("p", { className: "text-sm font-medium text-content", children: o }) : /* @__PURE__ */ e("span", {}),
237
+ a ? /* @__PURE__ */ s(C, { children: [
238
+ /* @__PURE__ */ e(
239
+ N,
222
240
  {
223
- type: "button",
224
- variant: "ghost",
225
- size: "iconSm",
226
- "aria-label": i("irisChat.filter"),
227
- "data-testid": "iris-chat-filter-list",
228
- children: /* @__PURE__ */ e(I, { size: 16 })
241
+ label: i("irisChat.filter"),
242
+ variant: "secondary",
243
+ align: "end",
244
+ side: "top",
245
+ children: /* @__PURE__ */ e(v, { asChild: !0, children: /* @__PURE__ */ e(
246
+ x,
247
+ {
248
+ type: "button",
249
+ variant: "ghost",
250
+ size: "iconSm",
251
+ "aria-label": i("irisChat.filter"),
252
+ "data-testid": "iris-chat-filter-list",
253
+ children: /* @__PURE__ */ e(I, { size: 16 })
254
+ }
255
+ ) })
229
256
  }
230
- ) }) }),
231
- /* @__PURE__ */ e(b, { align: "end", children: z.map((n) => /* @__PURE__ */ e(f, { onSelect: () => a(n), children: u[n] }, n)) })
257
+ ),
258
+ /* @__PURE__ */ e(b, { align: "end", children: z.map((n) => /* @__PURE__ */ e(p, { onSelect: () => a(n), children: u[n] }, n)) })
232
259
  ] }) : null
233
260
  ] }) : null,
234
- /* @__PURE__ */ e("div", { ref: d, className: "min-h-0 flex-1 overflow-y-auto", children: /* @__PURE__ */ e("div", { style: { height: o.virtualizer.getTotalSize(), position: "relative" }, children: o.virtualizer.getVirtualItems().map((n) => {
261
+ /* @__PURE__ */ e("div", { ref: m, className: "min-h-0 flex-1 overflow-y-auto", children: /* @__PURE__ */ e("div", { style: { height: c.virtualizer.getTotalSize(), position: "relative" }, children: c.virtualizer.getVirtualItems().map((n) => {
235
262
  const r = t[n.index];
236
263
  return /* @__PURE__ */ e(
237
264
  "div",
@@ -243,7 +270,7 @@ function F({
243
270
  },
244
271
  children: l(r)
245
272
  },
246
- m(r)
273
+ d(r)
247
274
  );
248
275
  }) }) })
249
276
  ]
@@ -1,72 +1,90 @@
1
- import { jsxs as m, jsx as n } from "react/jsx-runtime";
2
- import { ArrowUp as k, ArrowDown as v } from "impact-nova-icons";
3
- import { createComponent as z } from "../../../lib/primitives/create-component.js";
4
- import { cn as I } from "../../../lib/utils.js";
5
- import { useImpactNovaI18n as N } from "../../../i18n/use-impact-nova-i18n.js";
6
- function g(a, r, i) {
7
- return Math.min(i, Math.max(r, a));
1
+ import { jsxs as u, jsx as t } from "react/jsx-runtime";
2
+ import { ArrowUp as N, ArrowDown as I } from "impact-nova-icons";
3
+ import { createComponent as j } from "../../../lib/primitives/create-component.js";
4
+ import { cn as l } from "../../../lib/utils.js";
5
+ import { useImpactNovaI18n as z } from "../../../i18n/use-impact-nova-i18n.js";
6
+ function A(c, o, s) {
7
+ return Math.min(s, Math.max(o, c));
8
8
  }
9
- const U = z(
9
+ const f = "inline-flex h-[11px] w-5 shrink-0 select-none cursor-pointer border-0 p-0 bg-canvas-muted text-content-icon transition-[color,background-color,transform] duration-150 motion-reduce:transition-none enabled:hover:bg-stroke-track enabled:hover:text-content-tertiary enabled:active:scale-[0.98] enabled:active:bg-stroke-hairline enabled:active:text-content focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-focus-ring focus-visible:ring-inset disabled:cursor-not-allowed disabled:opacity-40", $ = j(
10
10
  "ChoiceCardPercent",
11
11
  ({
12
- className: a,
13
- value: r,
14
- onValueChange: i,
15
- min: s = 0,
16
- max: l = 100,
17
- step: o = 1,
18
- suffix: p = "%",
19
- increaseLabel: f,
20
- decreaseLabel: y,
21
- disabled: t,
22
- onKeyDown: u,
23
- ...h
24
- }, b) => {
25
- const { t: d } = N(), x = f ?? d("aria.increase"), w = y ?? d("aria.decrease"), C = !t && r > s, D = !t && r < l;
26
- function c(e) {
27
- t || i?.(g(r + e, s, l));
12
+ className: c,
13
+ value: o,
14
+ onValueChange: s,
15
+ min: d = 0,
16
+ max: b = 100,
17
+ step: i = 1,
18
+ suffix: m = "%",
19
+ increaseLabel: h,
20
+ decreaseLabel: g,
21
+ disabled: r,
22
+ onKeyDown: x,
23
+ ...v
24
+ }, w) => {
25
+ const { t: p } = z(), k = h ?? p("aria.increase"), C = g ?? p("aria.decrease"), y = !r && o > d, D = !r && o < b;
26
+ function a(e) {
27
+ r || s?.(A(o + e, d, b));
28
28
  }
29
- function j(e) {
30
- e.key === "ArrowUp" ? (e.preventDefault(), c(o)) : e.key === "ArrowDown" && (e.preventDefault(), c(-o)), u?.(e);
29
+ function n(e) {
30
+ e.stopPropagation();
31
31
  }
32
- return /* @__PURE__ */ m(
32
+ function P(e) {
33
+ e.key === "ArrowUp" ? (e.preventDefault(), a(i)) : e.key === "ArrowDown" && (e.preventDefault(), a(-i)), x?.(e);
34
+ }
35
+ return /* @__PURE__ */ u(
33
36
  "div",
34
37
  {
35
- ref: b,
36
- ...h,
38
+ ref: w,
39
+ ...v,
37
40
  "data-slot": "choice-card-percent",
38
41
  role: "group",
39
- "aria-disabled": t || void 0,
40
- tabIndex: t ? void 0 : 0,
41
- onKeyDown: j,
42
- className: I(
43
- "relative z-[1] flex h-8 w-[111px] items-center justify-between rounded-lg border border-stroke bg-canvas-elevated py-1 pl-3 pr-1 text-sm text-content",
44
- t && "opacity-50",
45
- a
42
+ "aria-disabled": r || void 0,
43
+ tabIndex: r ? void 0 : 0,
44
+ onKeyDown: P,
45
+ onPointerDown: n,
46
+ onClick: n,
47
+ className: l(
48
+ "relative z-[1] box-border flex h-8 w-[111px] items-center gap-2.5 overflow-hidden rounded-lg border border-stroke-field bg-canvas py-1 pl-3 pr-1 transition-colors",
49
+ "hover:border-brand focus-within:border-brand focus-within:outline-none",
50
+ r && "pointer-events-none border-stroke bg-disabled-surface opacity-100 hover:border-stroke",
51
+ c
46
52
  ),
47
53
  children: [
48
- /* @__PURE__ */ n("span", { children: `${r}${p}` }),
49
- /* @__PURE__ */ m("div", { className: "flex flex-col text-content-icon", children: [
50
- /* @__PURE__ */ n(
54
+ /* @__PURE__ */ t("span", { className: "min-w-0 flex-1 truncate font-normal text-sm capitalize leading-4 text-content", children: `${o}${m}` }),
55
+ /* @__PURE__ */ u("div", { className: "flex h-[23px] shrink-0 flex-col gap-px", children: [
56
+ /* @__PURE__ */ t(
51
57
  "button",
52
58
  {
53
59
  type: "button",
54
- "aria-label": x,
60
+ "aria-label": k,
55
61
  disabled: !D,
56
- className: "inline-flex size-6 items-center justify-center -my-1 disabled:opacity-40",
57
- onClick: () => c(o),
58
- children: /* @__PURE__ */ n(k, { size: 12 })
62
+ className: l(
63
+ f,
64
+ "items-center justify-center rounded-tr-sm"
65
+ ),
66
+ onPointerDown: n,
67
+ onClick: (e) => {
68
+ n(e), a(i);
69
+ },
70
+ children: /* @__PURE__ */ t(N, { size: 10 })
59
71
  }
60
72
  ),
61
- /* @__PURE__ */ n(
73
+ /* @__PURE__ */ t(
62
74
  "button",
63
75
  {
64
76
  type: "button",
65
- "aria-label": w,
66
- disabled: !C,
67
- className: "inline-flex size-6 items-center justify-center -my-1 disabled:opacity-40",
68
- onClick: () => c(-o),
69
- children: /* @__PURE__ */ n(v, { size: 12 })
77
+ "aria-label": C,
78
+ disabled: !y,
79
+ className: l(
80
+ f,
81
+ "items-center justify-center rounded-br-sm"
82
+ ),
83
+ onPointerDown: n,
84
+ onClick: (e) => {
85
+ n(e), a(-i);
86
+ },
87
+ children: /* @__PURE__ */ t(I, { size: 10 })
70
88
  }
71
89
  )
72
90
  ] })
@@ -76,5 +94,5 @@ const U = z(
76
94
  }
77
95
  );
78
96
  export {
79
- U as ChoiceCardPercent
97
+ $ as ChoiceCardPercent
80
98
  };
@@ -1,4 +1,4 @@
1
- import { jsx as o, jsxs as g } from "react/jsx-runtime";
1
+ import { jsx as o, jsxs as x } from "react/jsx-runtime";
2
2
  import * as n from "react";
3
3
  import * as L from "@radix-ui/react-checkbox";
4
4
  import * as G from "@radix-ui/react-radio-group";
@@ -12,7 +12,7 @@ import { cn as l } from "../../../lib/utils.js";
12
12
  import { choiceCardCheckboxIndicatorClassName as H, choiceCardRadioIndicatorClassName as $ } from "./choice-card-indicator.variants.js";
13
13
  import { ChoiceCardFeaturedBackdrop as K } from "./choice-card-featured-backdrop.js";
14
14
  import { choiceCardVariants as W } from "./choice-card.variants.js";
15
- const y = n.createContext(null), x = n.createContext({
15
+ const y = n.createContext(null), g = n.createContext({
16
16
  value: "",
17
17
  selected: !1,
18
18
  type: "single",
@@ -44,7 +44,7 @@ function Ce() {
44
44
  );
45
45
  }
46
46
  function pe() {
47
- return n.useContext(x);
47
+ return n.useContext(g);
48
48
  }
49
49
  function Z({
50
50
  selected: e,
@@ -266,7 +266,7 @@ const U = p(
266
266
  "aria-label": z
267
267
  }
268
268
  );
269
- return /* @__PURE__ */ o(x.Provider, { value: j, children: /* @__PURE__ */ g(
269
+ return /* @__PURE__ */ o(g.Provider, { value: j, children: /* @__PURE__ */ x(
270
270
  U,
271
271
  {
272
272
  ref: C,
@@ -279,7 +279,7 @@ const U = p(
279
279
  a,
280
280
  u.inCompare && l(
281
281
  "isolate grid w-full grid-rows-subgrid [grid-row:1/-1] gap-0",
282
- u.fit === "auto" ? "min-w-0 max-w-[420px]" : "min-w-[411px]"
282
+ u.fit === "auto" ? "min-w-0 max-w-[420px]" : "w-[411px] min-w-[411px] max-w-[411px]"
283
283
  )
284
284
  ),
285
285
  ...h,
@@ -295,7 +295,7 @@ const U = p(
295
295
  ), fe = p(
296
296
  "ChoiceCardIndicator",
297
297
  ({ className: e }, a) => {
298
- const { selected: t, type: r, disabled: c } = n.useContext(x);
298
+ const { selected: t, type: r, disabled: c } = n.useContext(g);
299
299
  return r === "multiple" ? /* @__PURE__ */ o(
300
300
  "span",
301
301
  {
@@ -361,9 +361,9 @@ function X({ className: e }) {
361
361
  }
362
362
  );
363
363
  }
364
- const ge = p(
364
+ const xe = p(
365
365
  "ChoiceCardRibbon",
366
- ({ className: e, children: a, ...t }, r) => /* @__PURE__ */ g(
366
+ ({ className: e, children: a, ...t }, r) => /* @__PURE__ */ x(
367
367
  "div",
368
368
  {
369
369
  ref: r,
@@ -387,7 +387,7 @@ const ge = p(
387
387
  ]
388
388
  }
389
389
  )
390
- ), xe = p(
390
+ ), ge = p(
391
391
  "ChoiceCardFooter",
392
392
  ({ className: e, children: a, ...t }, r) => {
393
393
  const c = n.useContext(v);
@@ -409,7 +409,7 @@ const ge = p(
409
409
  ), we = p(
410
410
  "ChoiceCardContent",
411
411
  ({ className: e, children: a, ...t }, r) => {
412
- const { variant: c } = n.useContext(x);
412
+ const { variant: c } = n.useContext(g);
413
413
  return n.useContext(v).inCompare ? /* @__PURE__ */ o(
414
414
  "div",
415
415
  {
@@ -445,7 +445,7 @@ const ge = p(
445
445
  children: a
446
446
  }
447
447
  )), Ne = p("ChoiceCardTitle", ({ className: e, children: a, ...t }, r) => {
448
- const { selected: c, disabled: i, size: m, variant: h, labelIsExplicit: C, setAccessibleName: s } = n.useContext(x), u = n.useRef(null), f = _(r, u);
448
+ const { selected: c, disabled: i, size: m, variant: h, labelIsExplicit: C, setAccessibleName: s } = n.useContext(g), u = n.useRef(null), f = _(r, u);
449
449
  return n.useLayoutEffect(() => {
450
450
  if (C) return;
451
451
  const d = u.current?.textContent?.trim();
@@ -485,7 +485,7 @@ const ge = p(
485
485
  );
486
486
  }
487
487
  ), ye = p("ChoiceCardDescription", ({ className: e, children: a, ...t }, r) => {
488
- const { selected: c, disabled: i, variant: m } = n.useContext(x);
488
+ const { selected: c, disabled: i, variant: m } = n.useContext(g);
489
489
  return /* @__PURE__ */ o(
490
490
  "p",
491
491
  {
@@ -511,7 +511,7 @@ const ge = p(
511
511
  children: c = "Selected",
512
512
  ...i
513
513
  }, m) => {
514
- const { selected: h } = n.useContext(x);
514
+ const { selected: h } = n.useContext(g);
515
515
  return h ? /* @__PURE__ */ o(
516
516
  a ? T : "div",
517
517
  {
@@ -557,7 +557,7 @@ const ge = p(
557
557
  e
558
558
  ),
559
559
  ...t,
560
- children: c.map((i, m) => /* @__PURE__ */ g(n.Fragment, { children: [
560
+ children: c.map((i, m) => /* @__PURE__ */ x(n.Fragment, { children: [
561
561
  m > 0 ? /* @__PURE__ */ o("div", { className: "h-3 w-px shrink-0 bg-stroke-field", "aria-hidden": "true" }) : null,
562
562
  i
563
563
  ] }, m))
@@ -566,7 +566,7 @@ const ge = p(
566
566
  }
567
567
  ), Ie = p(
568
568
  "ChoiceCardStat",
569
- ({ className: e, value: a, label: t, ...r }, c) => /* @__PURE__ */ g(
569
+ ({ className: e, value: a, label: t, ...r }, c) => /* @__PURE__ */ x(
570
570
  "div",
571
571
  {
572
572
  ref: c,
@@ -585,14 +585,14 @@ const ge = p(
585
585
  );
586
586
  function Y(e, a) {
587
587
  if (e <= 0) return "max-content";
588
- const t = a === "auto" ? "minmax(0, 420px)" : "minmax(411px, 1fr)";
588
+ const t = a === "auto" ? "minmax(0, 420px)" : "411px";
589
589
  return `max-content ${Array.from(
590
590
  { length: e },
591
591
  (c, i) => i === 0 ? t : `1rem ${t}`
592
592
  ).join(" ")}`;
593
593
  }
594
594
  function ee({ rows: e }) {
595
- return /* @__PURE__ */ g(
595
+ return /* @__PURE__ */ x(
596
596
  "div",
597
597
  {
598
598
  "data-slot": "choice-card-compare-gutter",
@@ -615,7 +615,7 @@ function ee({ rows: e }) {
615
615
  }
616
616
  const te = p(
617
617
  "ChoiceCardCompareLabels",
618
- ({ className: e, children: a, ...t }, r) => /* @__PURE__ */ g(
618
+ ({ className: e, children: a, ...t }, r) => /* @__PURE__ */ x(
619
619
  "div",
620
620
  {
621
621
  ref: r,
@@ -635,7 +635,7 @@ const te = p(
635
635
  )
636
636
  ), Pe = p(
637
637
  "ChoiceCardCompareLabel",
638
- ({ className: e, children: a, ...t }, r) => /* @__PURE__ */ g(
638
+ ({ className: e, children: a, ...t }, r) => /* @__PURE__ */ x(
639
639
  "div",
640
640
  {
641
641
  ref: r,
@@ -698,7 +698,7 @@ const te = p(
698
698
  e
699
699
  ),
700
700
  ...r,
701
- children: /* @__PURE__ */ g(
701
+ children: /* @__PURE__ */ x(
702
702
  "div",
703
703
  {
704
704
  className: l(
@@ -711,7 +711,7 @@ const te = p(
711
711
  },
712
712
  children: [
713
713
  m,
714
- h.map((s, u) => /* @__PURE__ */ g(n.Fragment, { children: [
714
+ h.map((s, u) => /* @__PURE__ */ x(n.Fragment, { children: [
715
715
  u > 0 && C > 0 ? /* @__PURE__ */ o(ee, { rows: C }) : null,
716
716
  s
717
717
  ] }, u))
@@ -733,13 +733,13 @@ export {
733
733
  we as ChoiceCardContent,
734
734
  ye as ChoiceCardDescription,
735
735
  K as ChoiceCardFeaturedBackdrop,
736
- xe as ChoiceCardFooter,
736
+ ge as ChoiceCardFooter,
737
737
  O as ChoiceCardGroup,
738
738
  ke as ChoiceCardHeader,
739
739
  ze as ChoiceCardIndex,
740
740
  fe as ChoiceCardIndicator,
741
741
  ve as ChoiceCardMedia,
742
- ge as ChoiceCardRibbon,
742
+ xe as ChoiceCardRibbon,
743
743
  Ie as ChoiceCardStat,
744
744
  Re as ChoiceCardStats,
745
745
  Se as ChoiceCardStatus,