impact-nova 3.0.0-alpha.17 → 3.0.0-alpha.18

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 (102) hide show
  1. package/dist/components/data/ag-grid-react/ag-grid.types.d.ts +9 -0
  2. package/dist/components/data/ag-grid-react/cell-renderers/badge-cell-renderer.d.ts +2 -0
  3. package/dist/components/data/ag-grid-react/cell-renderers/badge-cell-renderer.js +15 -14
  4. package/dist/components/data/ag-grid-react/cell-renderers/badge-icon-registry.d.ts +10 -0
  5. package/dist/components/data/ag-grid-react/cell-renderers/badge-icon-registry.js +17 -0
  6. package/dist/components/data/ag-grid-react/cell-renderers/index.d.ts +45 -7
  7. package/dist/components/data/ag-grid-react/cell-renderers/index.js +70 -58
  8. package/dist/components/data/ag-grid-react/cell-renderers/style-description-display-renderer.d.ts +5 -11
  9. package/dist/components/data/ag-grid-react/cell-renderers/style-description-display-renderer.js +127 -51
  10. package/dist/components/data/ag-grid-react/index.d.ts +1 -1
  11. package/dist/components/data/ag-grid-react/index.js +150 -147
  12. package/dist/components/data/ag-grid-react/list-drag-grid-options.d.ts +14 -1
  13. package/dist/components/data/ag-grid-react/list-drag-grid-options.js +95 -31
  14. package/dist/components/data/ag-grid-react/list-drag-preview-card.d.ts +4 -0
  15. package/dist/components/data/ag-grid-react/list-drag-preview-card.js +14 -0
  16. package/dist/components/data/ag-grid-react/list-drag-preview-snapshot.d.ts +20 -0
  17. package/dist/components/data/ag-grid-react/list-drag-preview-snapshot.js +42 -0
  18. package/dist/components/data/ag-grid-react/list-find-highlight.d.ts +6 -0
  19. package/dist/components/data/ag-grid-react/list-find-highlight.js +7 -0
  20. package/dist/components/data/ag-grid-react/process-backend-columndefs.d.ts +4 -0
  21. package/dist/components/data/ag-grid-react/process-backend-columndefs.js +78 -0
  22. package/dist/components/data/ag-grid-react/use-ag-grid-list-drag.d.ts +10 -2
  23. package/dist/components/data/ag-grid-react/use-ag-grid-list-drag.js +130 -107
  24. package/dist/components/data/ag-grid-react/use-list-drag-preview.d.ts +4 -1
  25. package/dist/components/data/ag-grid-react/use-list-drag-preview.js +131 -32
  26. package/dist/components/data/ag-grid-react/use-list-find.d.ts +36 -0
  27. package/dist/components/data/ag-grid-react/use-list-row-drop-zones.d.ts +2 -0
  28. package/dist/components/data/ag-grid-react/use-list-row-drop-zones.js +60 -41
  29. package/dist/components/data/data-table/data-table-list-header.js +1 -1
  30. package/dist/components/data/data-table/data-table-overlay.d.ts +6 -0
  31. package/dist/components/data/data-table/data-table-overlay.js +18 -0
  32. package/dist/components/data/data-table/data-table.types.d.ts +1 -0
  33. package/dist/components/data/data-table/index.d.ts +3 -0
  34. package/dist/components/data/data-table/index.js +67 -63
  35. package/dist/components/data/expandable-list-item/expandable-list-item-attributes.js +3 -2
  36. package/dist/components/data/expandable-list-item/expandable-list-item-metrics.js +3 -2
  37. package/dist/components/data/scenario-comparison/flatten-scenario-comparison-rows.d.ts +2 -0
  38. package/dist/components/data/scenario-comparison/flatten-scenario-comparison-rows.js +16 -0
  39. package/dist/components/data/scenario-comparison/index.d.ts +3 -0
  40. package/dist/components/data/scenario-comparison/index.js +6 -0
  41. package/dist/components/data/scenario-comparison/scenario-comparison-column.d.ts +12 -0
  42. package/dist/components/data/scenario-comparison/scenario-comparison-column.js +172 -0
  43. package/dist/components/data/scenario-comparison/scenario-comparison-label.d.ts +6 -0
  44. package/dist/components/data/scenario-comparison/scenario-comparison-label.js +64 -0
  45. package/dist/components/data/scenario-comparison/scenario-comparison.d.ts +5 -0
  46. package/dist/components/data/scenario-comparison/scenario-comparison.js +127 -0
  47. package/dist/components/data/scenario-comparison/scenario-comparison.types.d.ts +56 -0
  48. package/dist/components/data/scenario-comparison/scenario-comparison.variants.d.ts +7 -0
  49. package/dist/components/data/scenario-comparison/scenario-comparison.variants.js +29 -0
  50. package/dist/components/data-display/badge/index.d.ts +2 -0
  51. package/dist/components/data-display/badge/index.js +4 -2
  52. package/dist/components/data-display/badge/trophy-icon.d.ts +6 -0
  53. package/dist/components/data-display/badge/trophy-icon.js +28 -0
  54. package/dist/components/feedback/find-bar/collect-find-matches.d.ts +35 -0
  55. package/dist/components/feedback/find-bar/collect-find-matches.js +68 -0
  56. package/dist/components/feedback/find-bar/find-bar-shortcuts.d.ts +5 -0
  57. package/dist/components/feedback/find-bar/find-bar-shortcuts.js +27 -0
  58. package/dist/components/feedback/find-bar/find-bar.d.ts +7 -0
  59. package/dist/components/feedback/find-bar/find-bar.js +266 -0
  60. package/dist/components/feedback/find-bar/find-bar.types.d.ts +32 -0
  61. package/dist/components/feedback/find-bar/index.d.ts +4 -0
  62. package/dist/components/feedback/find-bar/index.js +11 -0
  63. package/dist/components/feedback/tooltip/tab-tooltip-render.js +3 -2
  64. package/dist/components/flows/command-palette/shortcut-settings.js +10 -10
  65. package/dist/components/flows/filter-panel/filter-panel.js +4 -4
  66. package/dist/components/forms/choice-card/choice-card-compare-scroll.d.ts +4 -0
  67. package/dist/components/forms/choice-card/choice-card-compare-scroll.js +6 -0
  68. package/dist/components/forms/choice-card/choice-card.d.ts +13 -2
  69. package/dist/components/forms/choice-card/choice-card.js +432 -342
  70. package/dist/components/forms/choice-card/choice-card.types.d.ts +9 -2
  71. package/dist/components/forms/select/components/SelectTriggerValue.js +3 -2
  72. package/dist/components/forms/select/components/Submenu.js +3 -2
  73. package/dist/components/primitives/tabs/folder-tab-path.d.ts +6 -0
  74. package/dist/components/primitives/tabs/folder-tab-path.js +16 -0
  75. package/dist/components/primitives/tabs/tabs.js +164 -111
  76. package/dist/components/primitives/tabs/tabs.types.d.ts +1 -1
  77. package/dist/i18n/defaultMessages.d.ts +17 -0
  78. package/dist/i18n/defaultMessages.js +52 -38
  79. package/dist/i18n/impact-nova-i18n-defaults.d.ts +5 -0
  80. package/dist/i18n/impact-nova-i18n-defaults.js +4 -9
  81. package/dist/i18n/index.d.ts +1 -1
  82. package/dist/i18n/locales/de.js +15 -1
  83. package/dist/i18n/locales/es.js +15 -1
  84. package/dist/i18n/locales/hi.js +15 -1
  85. package/dist/i18n/locales/kn.js +15 -1
  86. package/dist/impact-nova-components.css +189 -14
  87. package/dist/impact-nova-tokens.scss +2 -0
  88. package/dist/impact-nova.css +1 -1
  89. package/dist/index.d.ts +1 -0
  90. package/dist/index.js +621 -607
  91. package/dist/lib/virtualized/index.d.ts +2 -0
  92. package/dist/lib/virtualized/index.js +35 -31
  93. package/dist/lib/virtualized/list-index.d.ts +5 -0
  94. package/dist/lib/virtualized/list-index.js +13 -0
  95. package/dist/lib/virtualized/read-infinite-query-list.d.ts +14 -0
  96. package/dist/lib/virtualized/read-infinite-query-list.js +12 -0
  97. package/dist/lib/virtualized/types.d.ts +4 -2
  98. package/dist/lib/virtualized/useRowState.js +60 -56
  99. package/dist/lib/virtualized/useVirtualizedList.d.ts +5 -0
  100. package/dist/llms/rules/installation.js +1 -1
  101. package/dist/llms/rules/requirements.js +1 -1
  102. package/package.json +1 -1
@@ -1,18 +1,19 @@
1
1
  import { jsx as r, jsxs as x } from "react/jsx-runtime";
2
- import * as i from "react";
3
- import * as L from "@radix-ui/react-checkbox";
4
- import * as G from "@radix-ui/react-radio-group";
5
- import { Slot as T } from "@radix-ui/react-slot";
6
- import { useControllableState as M } from "@radix-ui/react-use-controllable-state";
7
- import { Checkmark as V } from "impact-nova-icons";
8
- import { Badge as F } from "../../data-display/badge/badge.js";
9
- import { createComponent as p } from "../../../lib/primitives/create-component.js";
10
- import { useComposedRefs as _ } from "../../../lib/compose-refs.js";
11
- import { cn as l } from "../../../lib/utils.js";
12
- import { choiceCardCheckboxIndicatorClassName as H, choiceCardRadioIndicatorClassName as $ } from "./choice-card-indicator.variants.js";
13
- import { ChoiceCardFeaturedBackdrop as K } from "./choice-card-featured-backdrop.js";
14
- import { choiceCardVariants as W } from "./choice-card.variants.js";
15
- const y = i.createContext(null), g = i.createContext({
2
+ import * as s from "react";
3
+ import * as _ from "@radix-ui/react-checkbox";
4
+ import * as P from "@radix-ui/react-radio-group";
5
+ import { Slot as F } from "@radix-ui/react-slot";
6
+ import { useControllableState as A } from "@radix-ui/react-use-controllable-state";
7
+ import { Checkmark as M } from "impact-nova-icons";
8
+ import { Badge as $ } from "../../data-display/badge/badge.js";
9
+ import { createComponent as C } from "../../../lib/primitives/create-component.js";
10
+ import { useComposedRefs as H } from "../../../lib/compose-refs.js";
11
+ import { cn as i } from "../../../lib/utils.js";
12
+ import { choiceCardCheckboxIndicatorClassName as q, choiceCardRadioIndicatorClassName as K } from "./choice-card-indicator.variants.js";
13
+ import { ChoiceCardFeaturedBackdrop as W } from "./choice-card-featured-backdrop.js";
14
+ import { choiceCardCompareRowsScrollAccessibility as V } from "./choice-card-compare-scroll.js";
15
+ import { choiceCardVariants as Z } from "./choice-card.variants.js";
16
+ const R = s.createContext(null), v = s.createContext({
16
17
  value: "",
17
18
  selected: !1,
18
19
  type: "single",
@@ -21,333 +22,343 @@ const y = i.createContext(null), g = i.createContext({
21
22
  labelIsExplicit: !1,
22
23
  setAccessibleName: () => {
23
24
  }
24
- }), v = i.createContext({
25
+ }), N = s.createContext({
25
26
  inCompare: !1,
26
27
  rows: 0,
27
- fit: "scroll"
28
- }), B = () => {
29
- const e = i.useContext(y);
28
+ fit: "scroll",
29
+ scrollRows: !1,
30
+ rowMinHeight: "3.5rem",
31
+ syncRowsScroll: () => {
32
+ }
33
+ });
34
+ function ge() {
35
+ return s.useContext(N);
36
+ }
37
+ const B = () => {
38
+ const e = s.useContext(R);
30
39
  if (!e)
31
40
  throw new Error("ChoiceCard components must be used within ChoiceCardGroup");
32
41
  return e;
33
42
  };
34
- function Ce() {
35
- const { value: e, type: a, setValue: t, isSelected: o } = B();
36
- return i.useMemo(
43
+ function xe() {
44
+ const { value: e, type: o, setValue: t, isSelected: a } = B();
45
+ return s.useMemo(
37
46
  () => ({
38
47
  value: e,
39
- type: a,
48
+ type: o,
40
49
  setValue: t,
41
- isSelected: o
50
+ isSelected: a
42
51
  }),
43
- [e, a, t, o]
52
+ [e, o, t, a]
44
53
  );
45
54
  }
46
- function pe() {
47
- return i.useContext(g);
55
+ function we() {
56
+ return s.useContext(v);
48
57
  }
49
- function Z({
58
+ function J({
50
59
  selected: e,
51
- disabled: a,
60
+ disabled: o,
52
61
  mode: t,
53
- size: o,
62
+ size: a,
54
63
  variant: c,
55
64
  className: n
56
65
  }) {
57
- return l(
58
- W({
66
+ return i(
67
+ Z({
59
68
  variant: c,
60
- size: o,
69
+ size: a,
61
70
  selected: e,
62
71
  mode: t,
63
- disabled: !!a
72
+ disabled: !!o
64
73
  }),
65
74
  n
66
75
  );
67
76
  }
68
- const q = ({
77
+ const O = ({
69
78
  value: e,
70
- defaultValue: a = "",
79
+ defaultValue: o = "",
71
80
  onValueChange: t,
72
- disabled: o,
81
+ disabled: a,
73
82
  orientation: c = "horizontal",
74
83
  wrap: n = !1,
75
- className: d,
84
+ className: m,
76
85
  children: h
77
86
  }) => {
78
- const [C, s] = M({
87
+ const [p, u] = A({
79
88
  prop: e,
80
- defaultProp: a,
89
+ defaultProp: o,
81
90
  onChange: t
82
- }), u = i.useCallback(
83
- (m) => C === m,
84
- [C]
85
- ), f = i.useMemo(
91
+ }), d = s.useCallback(
92
+ (l) => p === l,
93
+ [p]
94
+ ), f = s.useMemo(
86
95
  () => ({
87
96
  type: "single",
88
- disabled: o,
89
- value: C,
90
- setValue: (m) => s(m),
91
- isSelected: u,
92
- toggle: (m) => s(m)
97
+ disabled: a,
98
+ value: p,
99
+ setValue: (l) => u(l),
100
+ isSelected: d,
101
+ toggle: (l) => u(l)
93
102
  }),
94
- [o, C, s, u]
103
+ [a, p, u, d]
95
104
  );
96
- return /* @__PURE__ */ r(y.Provider, { value: f, children: /* @__PURE__ */ r(
97
- G.Root,
105
+ return /* @__PURE__ */ r(R.Provider, { value: f, children: /* @__PURE__ */ r(
106
+ P.Root,
98
107
  {
99
- value: C,
100
- onValueChange: s,
101
- disabled: o,
102
- className: d,
108
+ value: p,
109
+ onValueChange: u,
110
+ disabled: a,
111
+ className: m,
103
112
  "data-component": "choice-card-group",
104
113
  "data-type": "single",
105
114
  "data-layout": n ? "wrap" : c === "vertical" ? "column" : "row",
106
115
  children: h
107
116
  }
108
117
  ) });
109
- }, J = ({
118
+ }, Q = ({
110
119
  value: e,
111
- defaultValue: a = [],
120
+ defaultValue: o = [],
112
121
  onValueChange: t,
113
- disabled: o,
122
+ disabled: a,
114
123
  orientation: c = "horizontal",
115
124
  wrap: n = !1,
116
- className: d,
125
+ className: m,
117
126
  children: h
118
127
  }) => {
119
- const [C, s] = M({
128
+ const [p, u] = A({
120
129
  prop: e,
121
- defaultProp: a,
130
+ defaultProp: o,
122
131
  onChange: t
123
- }), u = i.useMemo(() => C ?? [], [C]), f = i.useCallback(
124
- (b) => u.includes(b),
125
- [u]
126
- ), m = i.useCallback(
132
+ }), d = s.useMemo(() => p ?? [], [p]), f = s.useCallback(
133
+ (b) => d.includes(b),
134
+ [d]
135
+ ), l = s.useCallback(
127
136
  (b) => {
128
- if (u.includes(b)) {
129
- s(u.filter((N) => N !== b));
137
+ if (d.includes(b)) {
138
+ u(d.filter((w) => w !== b));
130
139
  return;
131
140
  }
132
- s([...u, b]);
141
+ u([...d, b]);
133
142
  },
134
- [u, s]
135
- ), k = i.useMemo(
143
+ [d, u]
144
+ ), g = s.useMemo(
136
145
  () => ({
137
146
  type: "multiple",
138
- disabled: o,
139
- value: u,
140
- setValue: (b) => s(b),
147
+ disabled: a,
148
+ value: d,
149
+ setValue: (b) => u(b),
141
150
  isSelected: f,
142
- toggle: m
151
+ toggle: l
143
152
  }),
144
- [o, u, s, f, m]
153
+ [a, d, u, f, l]
145
154
  );
146
- return /* @__PURE__ */ r(y.Provider, { value: k, children: /* @__PURE__ */ r(
155
+ return /* @__PURE__ */ r(R.Provider, { value: g, children: /* @__PURE__ */ r(
147
156
  "div",
148
157
  {
149
158
  role: "group",
150
- className: d,
159
+ className: m,
151
160
  "data-component": "choice-card-group",
152
161
  "data-type": "multiple",
153
162
  "data-layout": n ? "wrap" : c === "vertical" ? "column" : "row",
154
163
  children: h
155
164
  }
156
165
  ) });
157
- }, O = (e) => e.type === "multiple" ? /* @__PURE__ */ r(J, { ...e }) : /* @__PURE__ */ r(q, { ...e });
158
- O.displayName = "ChoiceCardGroup";
159
- function E(e, a, t) {
166
+ }, U = (e) => e.type === "multiple" ? /* @__PURE__ */ r(Q, { ...e }) : /* @__PURE__ */ r(O, { ...e });
167
+ U.displayName = "ChoiceCardGroup";
168
+ function G(e, o, t) {
160
169
  if (e) {
161
- a.preventDefault(), a.stopPropagation();
170
+ o.preventDefault(), o.stopPropagation();
162
171
  return;
163
172
  }
164
- t?.(a);
173
+ t?.(o);
165
174
  }
166
- function Q(e) {
175
+ function X(e) {
167
176
  return e instanceof Element && !!e.closest(
168
177
  'a, button, input, textarea, select, [role="button"], [data-slot="choice-card-control"]'
169
178
  );
170
179
  }
171
- const U = p(
180
+ const Y = C(
172
181
  "ChoiceCardSurface",
173
182
  ({
174
183
  className: e,
175
- selected: a,
184
+ selected: o,
176
185
  disabled: t = !1,
177
- mode: o,
186
+ mode: a,
178
187
  size: c,
179
188
  variant: n,
180
- children: d,
189
+ children: m,
181
190
  onClick: h,
182
- onPointerDown: C,
183
- onKeyDown: s,
184
- ...u
191
+ onPointerDown: p,
192
+ onKeyDown: u,
193
+ ...d
185
194
  }, f) => /* @__PURE__ */ r(
186
195
  "div",
187
196
  {
188
197
  ref: f,
189
- className: Z({
190
- selected: a,
198
+ className: J({
199
+ selected: o,
191
200
  disabled: t,
192
- mode: o,
201
+ mode: a,
193
202
  size: c,
194
203
  variant: n,
195
204
  className: e
196
205
  }),
197
206
  "data-component": "choice-card",
198
- "data-selected": a || void 0,
207
+ "data-selected": o || void 0,
199
208
  "data-disabled": t || void 0,
200
209
  "data-size": c,
201
210
  "data-variant": n,
202
211
  "aria-disabled": t || void 0,
203
- onClick: (m) => E(t, m, h),
204
- onPointerDown: (m) => E(t, m, C),
205
- onKeyDown: (m) => {
206
- if (t && (m.key === " " || m.key === "Enter")) {
207
- m.preventDefault(), m.stopPropagation();
212
+ onClick: (l) => G(t, l, h),
213
+ onPointerDown: (l) => G(t, l, p),
214
+ onKeyDown: (l) => {
215
+ if (t && (l.key === " " || l.key === "Enter")) {
216
+ l.preventDefault(), l.stopPropagation();
208
217
  return;
209
218
  }
210
- s?.(m);
219
+ u?.(l);
211
220
  },
212
- ...u,
213
- children: d
221
+ ...d,
222
+ children: m
214
223
  }
215
224
  )
216
- ), he = p(
225
+ ), ve = C(
217
226
  "ChoiceCard",
218
227
  ({
219
228
  value: e,
220
- className: a,
229
+ className: o,
221
230
  children: t,
222
- disabled: o,
231
+ disabled: a,
223
232
  size: c = "md",
224
233
  variant: n = "default",
225
- "aria-label": d,
234
+ "aria-label": m,
226
235
  ...h
227
- }, C) => {
228
- const s = B(), u = i.useContext(v), f = o || s.disabled, m = s.isSelected(e), [k, b] = i.useState(""), N = i.useCallback((w) => {
229
- b((P) => P === w ? P : w);
230
- }, []), S = !!d, j = i.useMemo(
236
+ }, p) => {
237
+ const u = B(), d = s.useContext(N), f = a || u.disabled, l = u.isSelected(e), [g, b] = s.useState(""), w = s.useCallback((S) => {
238
+ b((I) => I === S ? I : S);
239
+ }, []), k = !!m, y = s.useMemo(
231
240
  () => ({
232
241
  value: e,
233
- selected: m,
242
+ selected: l,
234
243
  disabled: f,
235
- type: s.type,
244
+ type: u.type,
236
245
  size: c,
237
246
  variant: n,
238
- labelIsExplicit: S,
239
- setAccessibleName: N
247
+ labelIsExplicit: k,
248
+ setAccessibleName: w
240
249
  }),
241
- [e, m, f, s.type, c, n, S, N]
242
- ), z = d ?? (k || e), R = () => {
243
- f || s.toggle(e);
244
- }, A = (w) => {
245
- Q(w.target) || R(), h.onClick?.(w);
246
- }, I = l(
250
+ [e, l, f, u.type, c, n, k, w]
251
+ ), z = m ?? (g || e), T = () => {
252
+ f || u.toggle(e);
253
+ }, D = (S) => {
254
+ X(S.target) || T(), h.onClick?.(S);
255
+ }, E = i(
247
256
  "pointer-events-none absolute inset-0 z-0 opacity-0 outline-none",
248
- u.inCompare && "[grid-column:1] [grid-row:1/-1]"
249
- ), D = s.type === "single" ? /* @__PURE__ */ r(
250
- G.Item,
257
+ d.inCompare && "[grid-column:1] [grid-row:1/-1]"
258
+ ), L = u.type === "single" ? /* @__PURE__ */ r(
259
+ P.Item,
251
260
  {
252
261
  value: e,
253
262
  disabled: f,
254
- className: I,
263
+ className: E,
255
264
  "data-slot": "choice-card-control",
256
265
  "aria-label": z
257
266
  }
258
267
  ) : /* @__PURE__ */ r(
259
- L.Root,
268
+ _.Root,
260
269
  {
261
- checked: m,
270
+ checked: l,
262
271
  disabled: f,
263
- onCheckedChange: R,
264
- className: I,
272
+ onCheckedChange: T,
273
+ className: E,
265
274
  "data-slot": "choice-card-control",
266
275
  "aria-label": z
267
276
  }
268
277
  );
269
- return /* @__PURE__ */ r(g.Provider, { value: j, children: /* @__PURE__ */ x(
270
- U,
278
+ return /* @__PURE__ */ r(v.Provider, { value: y, children: /* @__PURE__ */ x(
279
+ Y,
271
280
  {
272
- ref: C,
273
- selected: m,
281
+ ref: p,
282
+ selected: l,
274
283
  disabled: f,
275
- mode: s.type,
284
+ mode: u.type,
276
285
  size: c,
277
286
  variant: n,
278
- className: l(
279
- a,
280
- u.inCompare && l(
287
+ className: i(
288
+ d.inCompare && i(
281
289
  "isolate grid w-full grid-rows-subgrid [grid-row:1/-1] gap-0",
282
- u.fit === "auto" ? "min-w-0 max-w-[420px]" : "w-[411px] min-w-[411px] max-w-[411px]"
283
- )
290
+ d.fit === "auto" && "min-w-0 max-w-[420px]",
291
+ d.fit === "fill" && "min-w-[17rem] w-full max-w-none",
292
+ d.fit === "scroll" && "w-[411px] min-w-[411px] max-w-[411px]"
293
+ ),
294
+ o
284
295
  ),
285
296
  ...h,
286
- onClick: A,
297
+ onClick: D,
287
298
  children: [
288
- D,
289
- n === "featured" ? /* @__PURE__ */ r(K, {}) : null,
299
+ L,
300
+ n === "featured" ? /* @__PURE__ */ r(W, {}) : null,
290
301
  t
291
302
  ]
292
303
  }
293
304
  ) });
294
305
  }
295
- ), fe = p("ChoiceCardIndicator", ({ className: e, shape: a }, t) => {
296
- const { selected: o, type: c, disabled: n } = i.useContext(g);
297
- return (a ?? (c === "multiple" ? "checkbox" : "radio")) === "checkbox" ? /* @__PURE__ */ r(
306
+ ), Ne = C("ChoiceCardIndicator", ({ className: e, shape: o }, t) => {
307
+ const { selected: a, type: c, disabled: n } = s.useContext(v);
308
+ return (o ?? (c === "multiple" ? "checkbox" : "radio")) === "checkbox" ? /* @__PURE__ */ r(
298
309
  "span",
299
310
  {
300
311
  ref: t,
301
- className: l(
302
- H,
303
- o && !n && "border-brand bg-accent text-brand",
304
- o && n && "border-stroke-field bg-disabled-surface text-content-secondary",
305
- !o && n && "border-stroke bg-disabled-surface text-disabled-foreground",
312
+ className: i(
313
+ q,
314
+ a && !n && "border-brand bg-accent text-brand",
315
+ a && n && "border-stroke-field bg-disabled-surface text-content-secondary",
316
+ !a && n && "border-stroke bg-disabled-surface text-disabled-foreground",
306
317
  e
307
318
  ),
308
319
  "data-slot": "choice-card-indicator",
309
- "data-state": o ? "checked" : "unchecked",
320
+ "data-state": a ? "checked" : "unchecked",
310
321
  "aria-hidden": "true",
311
- children: o ? /* @__PURE__ */ r(V, { className: "h-3.5 w-3.5" }) : null
322
+ children: a ? /* @__PURE__ */ r(M, { className: "h-3.5 w-3.5" }) : null
312
323
  }
313
324
  ) : /* @__PURE__ */ r(
314
325
  "span",
315
326
  {
316
327
  ref: t,
317
- className: l(
318
- $,
319
- o && !n && "ring-brand",
320
- o && n && "bg-disabled-surface text-stroke-field ring-stroke-field",
321
- !o && n && "bg-disabled-surface ring-stroke",
328
+ className: i(
329
+ K,
330
+ a && !n && "ring-brand",
331
+ a && n && "bg-disabled-surface text-stroke-field ring-stroke-field",
332
+ !a && n && "bg-disabled-surface ring-stroke",
322
333
  e
323
334
  ),
324
335
  "data-slot": "choice-card-indicator",
325
336
  "aria-hidden": "true",
326
- children: o ? /* @__PURE__ */ r("span", { className: "absolute inset-[3px] rounded-full bg-current" }) : null
337
+ children: a ? /* @__PURE__ */ r("span", { className: "absolute inset-[3px] rounded-full bg-current" }) : null
327
338
  }
328
339
  );
329
- }), be = p(
340
+ }), ke = C(
330
341
  "ChoiceCardBackground",
331
- ({ className: e, children: a, ...t }, o) => /* @__PURE__ */ r(
342
+ ({ className: e, children: o, ...t }, a) => /* @__PURE__ */ r(
332
343
  "div",
333
344
  {
334
- ref: o,
335
- className: l("pointer-events-none absolute inset-0 overflow-hidden", e),
345
+ ref: a,
346
+ className: i("pointer-events-none absolute inset-0 overflow-hidden", e),
336
347
  "data-slot": "choice-card-background",
337
348
  "aria-hidden": "true",
338
349
  ...t,
339
- children: a
350
+ children: o
340
351
  }
341
352
  )
342
353
  );
343
- function X({ className: e }) {
354
+ function ee({ className: e }) {
344
355
  return /* @__PURE__ */ r(
345
356
  "svg",
346
357
  {
347
358
  width: 28,
348
359
  height: 32,
349
360
  viewBox: "0 0 28 32",
350
- className: l("relative z-0 block h-8 w-7 shrink-0", e),
361
+ className: i("relative z-0 block h-8 w-7 shrink-0", e),
351
362
  "data-slot": "choice-card-ribbon-wedge",
352
363
  "aria-hidden": "true",
353
364
  children: /* @__PURE__ */ r(
@@ -360,69 +371,69 @@ function X({ className: e }) {
360
371
  }
361
372
  );
362
373
  }
363
- const xe = p(
374
+ const ye = C(
364
375
  "ChoiceCardRibbon",
365
- ({ className: e, children: a, ...t }, o) => /* @__PURE__ */ x(
376
+ ({ className: e, children: o, ...t }, a) => /* @__PURE__ */ x(
366
377
  "div",
367
378
  {
368
- ref: o,
369
- className: l("pointer-events-none absolute bottom-0 right-0 flex h-8 items-stretch", e),
379
+ ref: a,
380
+ className: i("pointer-events-none absolute bottom-0 right-0 flex h-8 items-stretch", e),
370
381
  "data-slot": "choice-card-ribbon",
371
382
  ...t,
372
383
  children: [
373
- /* @__PURE__ */ r(X, {}),
384
+ /* @__PURE__ */ r(ee, {}),
374
385
  /* @__PURE__ */ r(
375
386
  "div",
376
387
  {
377
- className: l(
388
+ className: i(
378
389
  // Start fill at the chevron tip (28 − 11) so no empty purple band sits before the label
379
390
  "relative z-[1] -ms-[17px] flex h-8 items-center rounded-br-xl pe-2 ps-1",
380
391
  "bg-[linear-gradient(90deg,var(--color-choice-card-ribbon-from)_0%,var(--color-choice-card-ribbon-to)_100%)]"
381
392
  ),
382
393
  "data-slot": "choice-card-ribbon-fill",
383
- children: /* @__PURE__ */ r("span", { className: "text-xs font-bold leading-5 text-content capitalize whitespace-nowrap", children: a })
394
+ children: /* @__PURE__ */ r("span", { className: "text-xs font-bold leading-5 text-content capitalize whitespace-nowrap", children: o })
384
395
  }
385
396
  )
386
397
  ]
387
398
  }
388
399
  )
389
- ), ge = p(
400
+ ), Se = C(
390
401
  "ChoiceCardFooter",
391
- ({ className: e, children: a, ...t }, o) => {
392
- const c = i.useContext(v);
402
+ ({ className: e, children: o, ...t }, a) => {
403
+ const c = s.useContext(N);
393
404
  return /* @__PURE__ */ r(
394
405
  "div",
395
406
  {
396
- ref: o,
397
- className: l(
407
+ ref: a,
408
+ className: i(
398
409
  "flex flex-wrap items-start gap-2",
399
410
  c.inCompare && "[grid-row:-1] self-end pt-4",
400
411
  e
401
412
  ),
402
413
  "data-slot": "choice-card-footer",
403
414
  ...t,
404
- children: a
415
+ children: o
405
416
  }
406
417
  );
407
418
  }
408
- ), we = p(
419
+ ), Re = C(
409
420
  "ChoiceCardContent",
410
- ({ className: e, children: a, ...t }, o) => {
411
- const { variant: c } = i.useContext(g);
412
- return i.useContext(v).inCompare ? /* @__PURE__ */ r(
421
+ ({ className: e, children: o, ...t }, a) => {
422
+ const { variant: c } = s.useContext(v);
423
+ return s.useContext(N).inCompare ? /* @__PURE__ */ r(
413
424
  "div",
414
425
  {
415
- ref: o,
416
- className: l("contents", e),
426
+ ref: a,
427
+ className: i("contents", e),
417
428
  "data-slot": "choice-card-content",
418
429
  ...t,
419
- children: a
430
+ children: o
420
431
  }
421
432
  ) : /* @__PURE__ */ r(
422
433
  "div",
423
434
  {
424
- ref: o,
425
- className: l(
435
+ ref: a,
436
+ className: i(
426
437
  "relative z-[1] flex min-w-0 flex-1 flex-col items-start gap-1",
427
438
  c === "featured" && "w-full flex-none gap-2 p-3",
428
439
  c === "compare" && "w-full flex-none gap-4",
@@ -430,219 +441,268 @@ const xe = p(
430
441
  ),
431
442
  "data-slot": "choice-card-content",
432
443
  ...t,
433
- children: a
444
+ children: o
434
445
  }
435
446
  );
436
447
  }
437
- ), ve = p("ChoiceCardMedia", ({ className: e, children: a, ...t }, o) => /* @__PURE__ */ r(
448
+ ), ze = C("ChoiceCardMedia", ({ className: e, children: o, ...t }, a) => /* @__PURE__ */ r(
438
449
  "div",
439
450
  {
440
- ref: o,
441
- className: l("flex shrink-0 items-center justify-center", e),
451
+ ref: a,
452
+ className: i("flex shrink-0 items-center justify-center", e),
442
453
  "data-slot": "choice-card-media",
443
454
  ...t,
444
- children: a
455
+ children: o
445
456
  }
446
- )), Ne = p("ChoiceCardTitle", ({ className: e, children: a, ...t }, o) => {
447
- const { selected: c, disabled: n, size: d, variant: h, labelIsExplicit: C, setAccessibleName: s } = i.useContext(g), u = i.useRef(null), f = _(o, u);
448
- return i.useLayoutEffect(() => {
449
- if (C) return;
450
- const m = u.current?.textContent?.trim();
451
- m && s(m);
452
- }, [a, C, s]), /* @__PURE__ */ r(
457
+ )), Te = C("ChoiceCardTitle", ({ className: e, children: o, ...t }, a) => {
458
+ const { selected: c, disabled: n, size: m, variant: h, labelIsExplicit: p, setAccessibleName: u } = s.useContext(v), d = s.useRef(null), f = H(a, d);
459
+ return s.useLayoutEffect(() => {
460
+ if (p) return;
461
+ const l = d.current?.textContent?.trim();
462
+ l && u(l);
463
+ }, [o, p, u]), /* @__PURE__ */ r(
453
464
  "h3",
454
465
  {
455
466
  ref: f,
456
- className: l(
467
+ className: i(
457
468
  "capitalize text-content",
458
- d === "sm" ? "text-sm font-semibold leading-6" : "text-base font-bold leading-6",
469
+ m === "sm" ? "text-sm font-semibold leading-6" : "text-base font-bold leading-6",
459
470
  (h === "featured" || h === "compare") && "text-base font-semibold leading-6",
460
471
  n && !c && "text-content-secondary",
461
472
  e
462
473
  ),
463
474
  ...t,
464
- children: a
475
+ children: o
465
476
  }
466
477
  );
467
- }), ke = p(
478
+ }), Ee = C(
468
479
  "ChoiceCardHeader",
469
- ({ className: e, children: a, ...t }, o) => {
470
- const c = i.useContext(v);
480
+ ({ className: e, children: o, ...t }, a) => {
481
+ const c = s.useContext(N);
471
482
  return /* @__PURE__ */ r(
472
483
  "div",
473
484
  {
474
- ref: o,
475
- className: l(
485
+ ref: a,
486
+ className: i(
476
487
  "flex w-full items-center gap-2",
477
488
  c.inCompare && "[grid-row:1] min-w-0 overflow-hidden",
478
489
  e
479
490
  ),
480
491
  "data-slot": "choice-card-header",
481
492
  ...t,
482
- children: a
493
+ children: o
483
494
  }
484
495
  );
485
496
  }
486
- ), ye = p("ChoiceCardDescription", ({ className: e, children: a, ...t }, o) => {
487
- const { selected: c, disabled: n, variant: d } = i.useContext(g);
497
+ ), Ie = C("ChoiceCardDescription", ({ className: e, children: o, ...t }, a) => {
498
+ const { selected: c, disabled: n, variant: m } = s.useContext(v);
488
499
  return /* @__PURE__ */ r(
489
500
  "p",
490
501
  {
491
- ref: o,
492
- className: l(
502
+ ref: a,
503
+ className: i(
493
504
  "text-xs font-medium leading-4 text-content-secondary",
494
- d === "featured" && "leading-[18px]",
495
- d === "compare" && "capitalize font-bold leading-5 text-content-icon",
496
- n && !c && d !== "featured" && "text-content-muted",
505
+ m === "featured" && "leading-[18px]",
506
+ m === "compare" && "capitalize font-bold leading-5 text-content-icon",
507
+ n && !c && m !== "featured" && "text-content-muted",
497
508
  e
498
509
  ),
499
510
  ...t,
500
- children: a
511
+ children: o
501
512
  }
502
513
  );
503
- }), Se = p(
514
+ }), Ge = C(
504
515
  "ChoiceCardStatus",
505
516
  ({
506
517
  className: e,
507
- asChild: a = !1,
518
+ asChild: o = !1,
508
519
  placement: t = "start",
509
- icon: o,
520
+ icon: a,
510
521
  children: c = "Selected",
511
522
  ...n
512
- }, d) => {
513
- const { selected: h } = i.useContext(g);
523
+ }, m) => {
524
+ const { selected: h } = s.useContext(v);
514
525
  return h ? /* @__PURE__ */ r(
515
- a ? T : "div",
526
+ o ? F : "div",
516
527
  {
517
- ref: d,
528
+ ref: m,
518
529
  "data-slot": "choice-card-status",
519
530
  "data-placement": t,
520
- className: l(
531
+ className: i(
521
532
  "pointer-events-none absolute z-10 -top-4",
522
533
  t === "center" ? "left-1/2 -translate-x-1/2" : "start-3",
523
534
  e
524
535
  ),
525
536
  ...n,
526
- children: a ? c : /* @__PURE__ */ r(F, { variant: "solid", color: "success", size: "md", icon: o ?? /* @__PURE__ */ r(V, { className: "size-4" }), children: c })
537
+ children: o ? c : /* @__PURE__ */ r($, { variant: "solid", color: "success", size: "md", icon: a ?? /* @__PURE__ */ r(M, { className: "size-4" }), children: c })
527
538
  }
528
539
  ) : null;
529
540
  }
530
- ), ze = p(
541
+ ), Pe = C(
531
542
  "ChoiceCardIndex",
532
- ({ className: e, children: a, ...t }, o) => /* @__PURE__ */ r(
543
+ ({ className: e, children: o, ...t }, a) => /* @__PURE__ */ r(
533
544
  "span",
534
545
  {
535
- ref: o,
546
+ ref: a,
536
547
  "data-slot": "choice-card-index",
537
- className: l(
548
+ className: i(
538
549
  "inline-flex size-[22px] shrink-0 items-center justify-center rounded-md bg-content-icon text-[12px] font-bold leading-none tracking-[-0.12px] text-brand-foreground group-data-[selected]:bg-success",
539
550
  e
540
551
  ),
541
552
  ...t,
542
- children: a
553
+ children: o
543
554
  }
544
555
  )
545
- ), Re = p(
556
+ ), Ae = C(
546
557
  "ChoiceCardStats",
547
- ({ className: e, children: a, ...t }, o) => {
548
- const c = i.Children.toArray(a);
558
+ ({ className: e, children: o, ...t }, a) => {
559
+ const c = s.Children.toArray(o);
549
560
  return /* @__PURE__ */ r(
550
561
  "div",
551
562
  {
552
- ref: o,
563
+ ref: a,
553
564
  "data-slot": "choice-card-stats",
554
- className: l(
565
+ className: i(
555
566
  "flex h-[46px] w-full items-center rounded-lg bg-canvas-muted",
556
567
  e
557
568
  ),
558
569
  ...t,
559
- children: c.map((n, d) => /* @__PURE__ */ x(i.Fragment, { children: [
560
- d > 0 ? /* @__PURE__ */ r("div", { className: "h-3 w-px shrink-0 bg-stroke-field", "aria-hidden": "true" }) : null,
570
+ children: c.map((n, m) => /* @__PURE__ */ x(s.Fragment, { children: [
571
+ m > 0 ? /* @__PURE__ */ r("div", { className: "h-3 w-px shrink-0 bg-stroke-field", "aria-hidden": "true" }) : null,
561
572
  n
562
- ] }, d))
573
+ ] }, m))
563
574
  }
564
575
  );
565
576
  }
566
- ), Ie = p(
577
+ ), Me = C(
567
578
  "ChoiceCardStat",
568
- ({ className: e, value: a, label: t, ...o }, c) => /* @__PURE__ */ x(
579
+ ({ className: e, value: o, label: t, ...a }, c) => /* @__PURE__ */ x(
569
580
  "div",
570
581
  {
571
582
  ref: c,
572
583
  "data-slot": "choice-card-stat",
573
- className: l(
584
+ className: i(
574
585
  "flex min-w-0 flex-1 flex-col items-center gap-0.5 p-1",
575
586
  e
576
587
  ),
577
- ...o,
588
+ ...a,
578
589
  children: [
579
- /* @__PURE__ */ r("p", { className: "text-sm font-medium leading-5 text-content-secondary", children: a }),
590
+ /* @__PURE__ */ r("p", { className: "text-sm font-medium leading-5 text-content-secondary", children: o }),
580
591
  /* @__PURE__ */ r("p", { className: "text-xs font-medium leading-4 text-content-heading capitalize", children: t })
581
592
  ]
582
593
  }
583
594
  )
584
595
  );
585
- function Y(e, a) {
596
+ function te(e) {
597
+ return e === "auto" ? "minmax(0, 420px)" : e === "fill" ? "minmax(17rem, 1fr)" : "411px";
598
+ }
599
+ function oe(e) {
600
+ return e === "fill" ? "3.9375rem" : "1rem";
601
+ }
602
+ function ae(e, o) {
586
603
  if (e <= 0) return "max-content";
587
- const t = a === "auto" ? "minmax(0, 420px)" : "411px";
604
+ const t = te(o), a = oe(o);
588
605
  return `max-content ${Array.from(
589
606
  { length: e },
590
- (c, n) => n === 0 ? t : `1rem ${t}`
607
+ (n, m) => m === 0 ? t : `${a} ${t}`
591
608
  ).join(" ")}`;
592
609
  }
593
- function ee({ rows: e }) {
594
- return /* @__PURE__ */ x(
610
+ const j = "h-full min-h-0 self-stretch overflow-y-auto [grid-row:3] [scrollbar-width:none] [&::-webkit-scrollbar]:hidden";
611
+ function re({
612
+ rows: e,
613
+ fit: o,
614
+ scrollRows: t,
615
+ rowMinHeight: a,
616
+ onRowsScroll: c
617
+ }) {
618
+ const n = o === "fill" ? "w-[63px]" : "w-4";
619
+ return t ? /* @__PURE__ */ x(
620
+ "div",
621
+ {
622
+ "data-slot": "choice-card-compare-gutter",
623
+ className: i("grid grid-rows-subgrid [grid-row:1/-1]", n),
624
+ "aria-hidden": "true",
625
+ children: [
626
+ /* @__PURE__ */ r("span", { className: "[grid-row:1]" }),
627
+ /* @__PURE__ */ r("span", { className: "[grid-row:2]" }),
628
+ /* @__PURE__ */ r(
629
+ "div",
630
+ {
631
+ "data-slot": "choice-card-compare-rows",
632
+ className: j,
633
+ onScroll: c,
634
+ ...V,
635
+ children: Array.from({ length: e }, (m, h) => /* @__PURE__ */ r("span", { className: "flex items-center", style: { height: a }, children: /* @__PURE__ */ r("span", { className: "h-px w-full border-t border-dotted border-stroke-accent" }) }, h))
636
+ }
637
+ ),
638
+ /* @__PURE__ */ r("span", { className: "[grid-row:-1]" })
639
+ ]
640
+ }
641
+ ) : /* @__PURE__ */ x(
595
642
  "div",
596
643
  {
597
644
  "data-slot": "choice-card-compare-gutter",
598
- className: "grid w-4 grid-rows-subgrid [grid-row:1/-1]",
645
+ className: i("grid grid-rows-subgrid [grid-row:1/-1]", n),
599
646
  "aria-hidden": "true",
600
647
  children: [
601
648
  /* @__PURE__ */ r("span", { className: "[grid-row:1]" }),
602
649
  /* @__PURE__ */ r("span", { className: "[grid-row:2]" }),
603
- Array.from({ length: e }, (a, t) => /* @__PURE__ */ r(
650
+ Array.from({ length: e }, (m, h) => /* @__PURE__ */ r(
604
651
  "span",
605
652
  {
606
- className: "w-full self-center border-t border-dashed border-canvas-accordion"
653
+ className: "relative z-0 h-px w-full self-center border-t border-dotted border-stroke-accent",
654
+ style: { gridRow: h + 3 }
607
655
  },
608
- t
656
+ h
609
657
  )),
610
658
  /* @__PURE__ */ r("span", { className: "[grid-row:-1]" })
611
659
  ]
612
660
  }
613
661
  );
614
662
  }
615
- const te = p(
663
+ const ce = C(
616
664
  "ChoiceCardCompareLabels",
617
- ({ className: e, children: a, ...t }, o) => /* @__PURE__ */ x(
618
- "div",
619
- {
620
- ref: o,
621
- "data-slot": "choice-card-compare-labels",
622
- className: l(
623
- "sticky start-0 z-20 grid grid-rows-subgrid items-center justify-items-end bg-canvas [grid-row:1/-1]",
624
- e
625
- ),
626
- ...t,
627
- children: [
628
- /* @__PURE__ */ r("span", { className: "[grid-row:1]", "aria-hidden": "true" }),
629
- /* @__PURE__ */ r("span", { className: "[grid-row:2]", "aria-hidden": "true" }),
630
- a,
631
- /* @__PURE__ */ r("span", { className: "[grid-row:-1]", "aria-hidden": "true" })
632
- ]
633
- }
634
- )
635
- ), Pe = p(
665
+ ({ className: e, children: o, ...t }, a) => {
666
+ const c = s.useContext(N);
667
+ return /* @__PURE__ */ x(
668
+ "div",
669
+ {
670
+ ref: a,
671
+ "data-slot": "choice-card-compare-labels",
672
+ className: i(
673
+ "sticky start-0 z-20 grid grid-rows-subgrid items-center justify-items-end bg-canvas [grid-row:1/-1]",
674
+ e
675
+ ),
676
+ ...t,
677
+ children: [
678
+ /* @__PURE__ */ r("span", { className: "[grid-row:1]", "aria-hidden": "true" }),
679
+ /* @__PURE__ */ r("span", { className: "[grid-row:2]", "aria-hidden": "true" }),
680
+ c.scrollRows ? /* @__PURE__ */ r(
681
+ "div",
682
+ {
683
+ "data-slot": "choice-card-compare-rows",
684
+ className: j,
685
+ onScroll: c.syncRowsScroll,
686
+ ...V,
687
+ children: o
688
+ }
689
+ ) : o,
690
+ /* @__PURE__ */ r("span", { className: "[grid-row:-1]", "aria-hidden": "true" })
691
+ ]
692
+ }
693
+ );
694
+ }
695
+ ), Ve = C(
636
696
  "ChoiceCardCompareLabel",
637
- ({ className: e, children: a, ...t }, o) => /* @__PURE__ */ x(
697
+ ({ className: e, children: o, ...t }, a) => /* @__PURE__ */ x(
638
698
  "div",
639
699
  {
640
- ref: o,
700
+ ref: a,
641
701
  "data-slot": "choice-card-compare-label",
642
- className: l("flex items-center self-center", e),
702
+ className: i("flex items-center self-center", e),
643
703
  ...t,
644
704
  children: [
645
- /* @__PURE__ */ r("span", { className: "rounded-full border border-canvas-accordion bg-accent px-2 py-1 text-sm font-medium leading-[21px] text-accent-foreground capitalize whitespace-nowrap", children: a }),
705
+ /* @__PURE__ */ r("span", { className: "rounded-full border border-canvas-accordion bg-accent px-2 py-1 text-sm font-medium leading-[21px] text-accent-foreground capitalize whitespace-nowrap", children: o }),
646
706
  /* @__PURE__ */ r(
647
707
  "span",
648
708
  {
@@ -653,96 +713,126 @@ const te = p(
653
713
  ]
654
714
  }
655
715
  )
656
- ), Ee = p(
716
+ ), Be = C(
657
717
  "ChoiceCardCompareLead",
658
- ({ className: e, ...a }, t) => /* @__PURE__ */ r(
718
+ ({ className: e, ...o }, t) => /* @__PURE__ */ r(
659
719
  "div",
660
720
  {
661
721
  ref: t,
662
722
  "data-slot": "choice-card-compare-lead",
663
- className: l("[grid-row:2] min-h-4 min-w-0", e),
664
- ...a
723
+ className: i("[grid-row:2] min-h-4 min-w-0", e),
724
+ ...o
665
725
  }
666
726
  )
667
- ), Ge = p(
727
+ ), je = C(
668
728
  "ChoiceCardCompareRow",
669
- ({ className: e, ...a }, t) => /* @__PURE__ */ r(
729
+ ({ className: e, ...o }, t) => /* @__PURE__ */ r(
670
730
  "div",
671
731
  {
672
732
  ref: t,
673
733
  "data-slot": "choice-card-compare-row",
674
- className: l("flex w-full min-w-0 items-center justify-center self-stretch", e),
675
- ...a
734
+ className: i("flex w-full min-w-0 items-center justify-center self-stretch", e),
735
+ ...o
676
736
  }
677
737
  )
678
- ), Me = p(
738
+ ), De = C(
679
739
  "ChoiceCardCompare",
680
- ({ className: e, children: a, fit: t = "scroll", ...o }, c) => {
681
- const n = i.Children.toArray(a), d = n.find(
682
- (s) => i.isValidElement(s) && s.type === te
683
- ), h = n.filter((s) => s !== d), C = i.isValidElement(d) && d.props ? i.Children.count(
684
- d.props.children
685
- ) : 0;
686
- return /* @__PURE__ */ r(v.Provider, { value: { inCompare: !0, rows: C, fit: t }, children: /* @__PURE__ */ r(
687
- "div",
740
+ ({ className: e, children: o, fit: t = "scroll", rowMinHeight: a = "3.5rem", scrollRows: c = !1, ...n }, m) => {
741
+ const h = s.Children.toArray(o), p = h.find(
742
+ (g) => s.isValidElement(g) && g.type === ce
743
+ ), u = h.filter((g) => g !== p), d = s.isValidElement(p) && p.props ? s.Children.count(
744
+ p.props.children
745
+ ) : 0, f = (g) => {
746
+ const b = g.currentTarget, w = b.closest("[data-slot=choice-card-compare]");
747
+ if (!(w instanceof HTMLElement)) return;
748
+ const k = b.scrollTop;
749
+ w.querySelectorAll(
750
+ "[data-slot=choice-card-compare-rows]"
751
+ ).forEach((y) => {
752
+ y !== b && y.scrollTop !== k && (y.scrollTop = k);
753
+ });
754
+ }, l = c ? "auto auto minmax(0, 1fr) auto" : `auto auto repeat(${Math.max(d, 1)}, minmax(${a}, auto)) auto`;
755
+ return /* @__PURE__ */ r(
756
+ N.Provider,
688
757
  {
689
- ref: c,
690
- "data-slot": "choice-card-compare",
691
- "data-fit": t,
692
- className: l(
693
- "w-full min-w-0 overscroll-x-contain pt-5 pb-2",
694
- t === "auto" ? "overflow-x-auto" : "overflow-x-scroll",
695
- "[scrollbar-width:thin] [scrollbar-color:var(--color-stroke)_transparent]",
696
- "[&::-webkit-scrollbar]:h-2 [&::-webkit-scrollbar-thumb]:rounded-full [&::-webkit-scrollbar-thumb]:bg-stroke",
697
- e
698
- ),
699
- ...o,
700
- children: /* @__PURE__ */ x(
758
+ value: { inCompare: !0, rows: d, fit: t, scrollRows: c, rowMinHeight: a, syncRowsScroll: f },
759
+ children: /* @__PURE__ */ r(
701
760
  "div",
702
761
  {
703
- className: l(
704
- "grid w-full grid-flow-col items-stretch",
705
- t === "auto" ? "min-w-0" : "min-w-max"
762
+ ref: m,
763
+ "data-slot": "choice-card-compare",
764
+ "data-fit": t,
765
+ "data-scroll-rows": c ? "true" : void 0,
766
+ className: i(
767
+ "min-w-0 overscroll-x-contain pt-5 pb-2",
768
+ c ? "h-full w-max min-w-full overflow-visible" : i(
769
+ "w-full",
770
+ t === "fill" ? "overflow-auto" : t === "auto" ? "overflow-x-auto" : "overflow-x-scroll",
771
+ "[scrollbar-width:thin] [scrollbar-color:var(--color-stroke)_transparent]",
772
+ "[&::-webkit-scrollbar]:h-2 [&::-webkit-scrollbar-thumb]:rounded-full [&::-webkit-scrollbar-thumb]:bg-stroke"
773
+ ),
774
+ e
706
775
  ),
707
- style: {
708
- gridTemplateColumns: Y(h.length, t),
709
- gridTemplateRows: `auto auto repeat(${Math.max(C, 1)}, minmax(3.5rem, auto)) auto`
710
- },
711
- children: [
712
- d,
713
- h.map((s, u) => /* @__PURE__ */ x(i.Fragment, { children: [
714
- u > 0 && C > 0 ? /* @__PURE__ */ r(ee, { rows: C }) : null,
715
- s
716
- ] }, u))
717
- ]
776
+ ...n,
777
+ children: /* @__PURE__ */ x(
778
+ "div",
779
+ {
780
+ className: i(
781
+ "grid grid-flow-col items-stretch",
782
+ c ? "h-full min-h-0 w-max min-w-full" : "w-full",
783
+ !c && (t === "scroll" ? "min-w-max" : "min-w-0")
784
+ ),
785
+ style: {
786
+ gridTemplateColumns: ae(u.length, t),
787
+ gridTemplateRows: l
788
+ },
789
+ children: [
790
+ p,
791
+ u.map((g, b) => /* @__PURE__ */ x(s.Fragment, { children: [
792
+ b > 0 && d > 0 ? /* @__PURE__ */ r(
793
+ re,
794
+ {
795
+ rows: d,
796
+ fit: t,
797
+ scrollRows: c,
798
+ rowMinHeight: a,
799
+ onRowsScroll: f
800
+ }
801
+ ) : null,
802
+ g
803
+ ] }, b))
804
+ ]
805
+ }
806
+ )
718
807
  }
719
808
  )
720
809
  }
721
- ) });
810
+ );
722
811
  }
723
812
  );
724
813
  export {
725
- he as ChoiceCard,
726
- be as ChoiceCardBackground,
727
- Me as ChoiceCardCompare,
728
- Pe as ChoiceCardCompareLabel,
729
- te as ChoiceCardCompareLabels,
730
- Ee as ChoiceCardCompareLead,
731
- Ge as ChoiceCardCompareRow,
732
- we as ChoiceCardContent,
733
- ye as ChoiceCardDescription,
734
- K as ChoiceCardFeaturedBackdrop,
735
- ge as ChoiceCardFooter,
736
- O as ChoiceCardGroup,
737
- ke as ChoiceCardHeader,
738
- ze as ChoiceCardIndex,
739
- fe as ChoiceCardIndicator,
740
- ve as ChoiceCardMedia,
741
- xe as ChoiceCardRibbon,
742
- Ie as ChoiceCardStat,
743
- Re as ChoiceCardStats,
744
- Se as ChoiceCardStatus,
745
- Ne as ChoiceCardTitle,
746
- Ce as useChoiceCardGroup,
747
- pe as useChoiceCardItem
814
+ ve as ChoiceCard,
815
+ ke as ChoiceCardBackground,
816
+ De as ChoiceCardCompare,
817
+ Ve as ChoiceCardCompareLabel,
818
+ ce as ChoiceCardCompareLabels,
819
+ Be as ChoiceCardCompareLead,
820
+ je as ChoiceCardCompareRow,
821
+ Re as ChoiceCardContent,
822
+ Ie as ChoiceCardDescription,
823
+ W as ChoiceCardFeaturedBackdrop,
824
+ Se as ChoiceCardFooter,
825
+ U as ChoiceCardGroup,
826
+ Ee as ChoiceCardHeader,
827
+ Pe as ChoiceCardIndex,
828
+ Ne as ChoiceCardIndicator,
829
+ ze as ChoiceCardMedia,
830
+ ye as ChoiceCardRibbon,
831
+ Me as ChoiceCardStat,
832
+ Ae as ChoiceCardStats,
833
+ Ge as ChoiceCardStatus,
834
+ Te as ChoiceCardTitle,
835
+ ge as useChoiceCardCompare,
836
+ xe as useChoiceCardGroup,
837
+ we as useChoiceCardItem
748
838
  };