impact-nova 3.0.0-alpha.16 → 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.
- package/dist/components/data/ag-grid-react/ag-grid.types.d.ts +9 -0
- package/dist/components/data/ag-grid-react/cell-renderers/badge-cell-renderer.d.ts +2 -0
- package/dist/components/data/ag-grid-react/cell-renderers/badge-cell-renderer.js +15 -14
- package/dist/components/data/ag-grid-react/cell-renderers/badge-icon-registry.d.ts +10 -0
- package/dist/components/data/ag-grid-react/cell-renderers/badge-icon-registry.js +17 -0
- package/dist/components/data/ag-grid-react/cell-renderers/index.d.ts +45 -7
- package/dist/components/data/ag-grid-react/cell-renderers/index.js +70 -58
- package/dist/components/data/ag-grid-react/cell-renderers/style-description-display-renderer.d.ts +5 -11
- package/dist/components/data/ag-grid-react/cell-renderers/style-description-display-renderer.js +127 -51
- package/dist/components/data/ag-grid-react/index.d.ts +1 -1
- package/dist/components/data/ag-grid-react/index.js +150 -147
- package/dist/components/data/ag-grid-react/list-drag-grid-options.d.ts +14 -1
- package/dist/components/data/ag-grid-react/list-drag-grid-options.js +95 -31
- package/dist/components/data/ag-grid-react/list-drag-preview-card.d.ts +4 -0
- package/dist/components/data/ag-grid-react/list-drag-preview-card.js +14 -0
- package/dist/components/data/ag-grid-react/list-drag-preview-snapshot.d.ts +20 -0
- package/dist/components/data/ag-grid-react/list-drag-preview-snapshot.js +42 -0
- package/dist/components/data/ag-grid-react/list-find-highlight.d.ts +6 -0
- package/dist/components/data/ag-grid-react/list-find-highlight.js +7 -0
- package/dist/components/data/ag-grid-react/process-backend-columndefs.d.ts +4 -0
- package/dist/components/data/ag-grid-react/process-backend-columndefs.js +78 -0
- package/dist/components/data/ag-grid-react/use-ag-grid-list-drag.d.ts +10 -2
- package/dist/components/data/ag-grid-react/use-ag-grid-list-drag.js +130 -107
- package/dist/components/data/ag-grid-react/use-list-drag-preview.d.ts +4 -1
- package/dist/components/data/ag-grid-react/use-list-drag-preview.js +131 -32
- package/dist/components/data/ag-grid-react/use-list-find.d.ts +36 -0
- package/dist/components/data/ag-grid-react/use-list-row-drop-zones.d.ts +2 -0
- package/dist/components/data/ag-grid-react/use-list-row-drop-zones.js +60 -41
- package/dist/components/data/data-table/data-table-list-header.js +1 -1
- package/dist/components/data/data-table/data-table-overlay.d.ts +6 -0
- package/dist/components/data/data-table/data-table-overlay.js +18 -0
- package/dist/components/data/data-table/data-table.types.d.ts +1 -0
- package/dist/components/data/data-table/index.d.ts +3 -0
- package/dist/components/data/data-table/index.js +67 -63
- package/dist/components/data/expandable-list-item/expandable-list-item-attributes.js +3 -2
- package/dist/components/data/expandable-list-item/expandable-list-item-metrics.js +3 -2
- package/dist/components/data/scenario-comparison/flatten-scenario-comparison-rows.d.ts +2 -0
- package/dist/components/data/scenario-comparison/flatten-scenario-comparison-rows.js +16 -0
- package/dist/components/data/scenario-comparison/index.d.ts +3 -0
- package/dist/components/data/scenario-comparison/index.js +6 -0
- package/dist/components/data/scenario-comparison/scenario-comparison-column.d.ts +12 -0
- package/dist/components/data/scenario-comparison/scenario-comparison-column.js +172 -0
- package/dist/components/data/scenario-comparison/scenario-comparison-label.d.ts +6 -0
- package/dist/components/data/scenario-comparison/scenario-comparison-label.js +64 -0
- package/dist/components/data/scenario-comparison/scenario-comparison.d.ts +5 -0
- package/dist/components/data/scenario-comparison/scenario-comparison.js +127 -0
- package/dist/components/data/scenario-comparison/scenario-comparison.types.d.ts +56 -0
- package/dist/components/data/scenario-comparison/scenario-comparison.variants.d.ts +7 -0
- package/dist/components/data/scenario-comparison/scenario-comparison.variants.js +29 -0
- package/dist/components/data-display/badge/index.d.ts +2 -0
- package/dist/components/data-display/badge/index.js +4 -2
- package/dist/components/data-display/badge/trophy-icon.d.ts +6 -0
- package/dist/components/data-display/badge/trophy-icon.js +28 -0
- package/dist/components/feedback/find-bar/collect-find-matches.d.ts +35 -0
- package/dist/components/feedback/find-bar/collect-find-matches.js +68 -0
- package/dist/components/feedback/find-bar/find-bar-shortcuts.d.ts +5 -0
- package/dist/components/feedback/find-bar/find-bar-shortcuts.js +27 -0
- package/dist/components/feedback/find-bar/find-bar.d.ts +7 -0
- package/dist/components/feedback/find-bar/find-bar.js +266 -0
- package/dist/components/feedback/find-bar/find-bar.types.d.ts +32 -0
- package/dist/components/feedback/find-bar/index.d.ts +4 -0
- package/dist/components/feedback/find-bar/index.js +11 -0
- package/dist/components/feedback/tooltip/tab-tooltip-render.js +3 -2
- package/dist/components/flows/command-palette/shortcut-settings.js +10 -10
- package/dist/components/flows/filter-panel/filter-panel.js +4 -4
- package/dist/components/forms/choice-card/choice-card-compare-scroll.d.ts +4 -0
- package/dist/components/forms/choice-card/choice-card-compare-scroll.js +6 -0
- package/dist/components/forms/choice-card/choice-card.d.ts +13 -2
- package/dist/components/forms/choice-card/choice-card.js +432 -342
- package/dist/components/forms/choice-card/choice-card.types.d.ts +9 -2
- package/dist/components/forms/select/components/SelectTriggerValue.js +3 -2
- package/dist/components/forms/select/components/Submenu.js +3 -2
- package/dist/components/primitives/tabs/folder-tab-path.d.ts +6 -0
- package/dist/components/primitives/tabs/folder-tab-path.js +16 -0
- package/dist/components/primitives/tabs/tabs.js +164 -111
- package/dist/components/primitives/tabs/tabs.types.d.ts +1 -1
- package/dist/i18n/defaultMessages.d.ts +17 -0
- package/dist/i18n/defaultMessages.js +52 -38
- package/dist/i18n/impact-nova-i18n-defaults.d.ts +5 -0
- package/dist/i18n/impact-nova-i18n-defaults.js +4 -9
- package/dist/i18n/index.d.ts +1 -1
- package/dist/i18n/locales/de.js +15 -1
- package/dist/i18n/locales/es.js +15 -1
- package/dist/i18n/locales/hi.js +15 -1
- package/dist/i18n/locales/kn.js +15 -1
- package/dist/impact-nova-components.css +189 -14
- package/dist/impact-nova-tokens.scss +2 -0
- package/dist/impact-nova.css +1 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.js +621 -607
- package/dist/lib/virtualized/index.d.ts +2 -0
- package/dist/lib/virtualized/index.js +35 -31
- package/dist/lib/virtualized/list-index.d.ts +5 -0
- package/dist/lib/virtualized/list-index.js +13 -0
- package/dist/lib/virtualized/read-infinite-query-list.d.ts +14 -0
- package/dist/lib/virtualized/read-infinite-query-list.js +12 -0
- package/dist/lib/virtualized/types.d.ts +4 -2
- package/dist/lib/virtualized/useRowState.js +60 -56
- package/dist/lib/virtualized/useVirtualizedList.d.ts +5 -0
- package/dist/llms/rules/installation.js +1 -1
- package/dist/llms/rules/requirements.js +1 -1
- package/package.json +16 -3
|
@@ -1,18 +1,19 @@
|
|
|
1
1
|
import { jsx as r, jsxs as x } from "react/jsx-runtime";
|
|
2
|
-
import * as
|
|
3
|
-
import * as
|
|
4
|
-
import * as
|
|
5
|
-
import { Slot as
|
|
6
|
-
import { useControllableState as
|
|
7
|
-
import { Checkmark as
|
|
8
|
-
import { Badge as
|
|
9
|
-
import { createComponent as
|
|
10
|
-
import { useComposedRefs as
|
|
11
|
-
import { cn as
|
|
12
|
-
import { choiceCardCheckboxIndicatorClassName as
|
|
13
|
-
import { ChoiceCardFeaturedBackdrop as
|
|
14
|
-
import {
|
|
15
|
-
|
|
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
|
-
}),
|
|
25
|
+
}), N = s.createContext({
|
|
25
26
|
inCompare: !1,
|
|
26
27
|
rows: 0,
|
|
27
|
-
fit: "scroll"
|
|
28
|
-
|
|
29
|
-
|
|
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
|
|
35
|
-
const { value: e, type:
|
|
36
|
-
return
|
|
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:
|
|
48
|
+
type: o,
|
|
40
49
|
setValue: t,
|
|
41
|
-
isSelected:
|
|
50
|
+
isSelected: a
|
|
42
51
|
}),
|
|
43
|
-
[e,
|
|
52
|
+
[e, o, t, a]
|
|
44
53
|
);
|
|
45
54
|
}
|
|
46
|
-
function
|
|
47
|
-
return
|
|
55
|
+
function we() {
|
|
56
|
+
return s.useContext(v);
|
|
48
57
|
}
|
|
49
|
-
function
|
|
58
|
+
function J({
|
|
50
59
|
selected: e,
|
|
51
|
-
disabled:
|
|
60
|
+
disabled: o,
|
|
52
61
|
mode: t,
|
|
53
|
-
size:
|
|
62
|
+
size: a,
|
|
54
63
|
variant: c,
|
|
55
64
|
className: n
|
|
56
65
|
}) {
|
|
57
|
-
return
|
|
58
|
-
|
|
66
|
+
return i(
|
|
67
|
+
Z({
|
|
59
68
|
variant: c,
|
|
60
|
-
size:
|
|
69
|
+
size: a,
|
|
61
70
|
selected: e,
|
|
62
71
|
mode: t,
|
|
63
|
-
disabled: !!
|
|
72
|
+
disabled: !!o
|
|
64
73
|
}),
|
|
65
74
|
n
|
|
66
75
|
);
|
|
67
76
|
}
|
|
68
|
-
const
|
|
77
|
+
const O = ({
|
|
69
78
|
value: e,
|
|
70
|
-
defaultValue:
|
|
79
|
+
defaultValue: o = "",
|
|
71
80
|
onValueChange: t,
|
|
72
|
-
disabled:
|
|
81
|
+
disabled: a,
|
|
73
82
|
orientation: c = "horizontal",
|
|
74
83
|
wrap: n = !1,
|
|
75
|
-
className:
|
|
84
|
+
className: m,
|
|
76
85
|
children: h
|
|
77
86
|
}) => {
|
|
78
|
-
const [
|
|
87
|
+
const [p, u] = A({
|
|
79
88
|
prop: e,
|
|
80
|
-
defaultProp:
|
|
89
|
+
defaultProp: o,
|
|
81
90
|
onChange: t
|
|
82
|
-
}),
|
|
83
|
-
(
|
|
84
|
-
[
|
|
85
|
-
), f =
|
|
91
|
+
}), d = s.useCallback(
|
|
92
|
+
(l) => p === l,
|
|
93
|
+
[p]
|
|
94
|
+
), f = s.useMemo(
|
|
86
95
|
() => ({
|
|
87
96
|
type: "single",
|
|
88
|
-
disabled:
|
|
89
|
-
value:
|
|
90
|
-
setValue: (
|
|
91
|
-
isSelected:
|
|
92
|
-
toggle: (
|
|
97
|
+
disabled: a,
|
|
98
|
+
value: p,
|
|
99
|
+
setValue: (l) => u(l),
|
|
100
|
+
isSelected: d,
|
|
101
|
+
toggle: (l) => u(l)
|
|
93
102
|
}),
|
|
94
|
-
[
|
|
103
|
+
[a, p, u, d]
|
|
95
104
|
);
|
|
96
|
-
return /* @__PURE__ */ r(
|
|
97
|
-
|
|
105
|
+
return /* @__PURE__ */ r(R.Provider, { value: f, children: /* @__PURE__ */ r(
|
|
106
|
+
P.Root,
|
|
98
107
|
{
|
|
99
|
-
value:
|
|
100
|
-
onValueChange:
|
|
101
|
-
disabled:
|
|
102
|
-
className:
|
|
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
|
-
},
|
|
118
|
+
}, Q = ({
|
|
110
119
|
value: e,
|
|
111
|
-
defaultValue:
|
|
120
|
+
defaultValue: o = [],
|
|
112
121
|
onValueChange: t,
|
|
113
|
-
disabled:
|
|
122
|
+
disabled: a,
|
|
114
123
|
orientation: c = "horizontal",
|
|
115
124
|
wrap: n = !1,
|
|
116
|
-
className:
|
|
125
|
+
className: m,
|
|
117
126
|
children: h
|
|
118
127
|
}) => {
|
|
119
|
-
const [
|
|
128
|
+
const [p, u] = A({
|
|
120
129
|
prop: e,
|
|
121
|
-
defaultProp:
|
|
130
|
+
defaultProp: o,
|
|
122
131
|
onChange: t
|
|
123
|
-
}),
|
|
124
|
-
(b) =>
|
|
125
|
-
[
|
|
126
|
-
),
|
|
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 (
|
|
129
|
-
|
|
137
|
+
if (d.includes(b)) {
|
|
138
|
+
u(d.filter((w) => w !== b));
|
|
130
139
|
return;
|
|
131
140
|
}
|
|
132
|
-
|
|
141
|
+
u([...d, b]);
|
|
133
142
|
},
|
|
134
|
-
[
|
|
135
|
-
),
|
|
143
|
+
[d, u]
|
|
144
|
+
), g = s.useMemo(
|
|
136
145
|
() => ({
|
|
137
146
|
type: "multiple",
|
|
138
|
-
disabled:
|
|
139
|
-
value:
|
|
140
|
-
setValue: (b) =>
|
|
147
|
+
disabled: a,
|
|
148
|
+
value: d,
|
|
149
|
+
setValue: (b) => u(b),
|
|
141
150
|
isSelected: f,
|
|
142
|
-
toggle:
|
|
151
|
+
toggle: l
|
|
143
152
|
}),
|
|
144
|
-
[
|
|
153
|
+
[a, d, u, f, l]
|
|
145
154
|
);
|
|
146
|
-
return /* @__PURE__ */ r(
|
|
155
|
+
return /* @__PURE__ */ r(R.Provider, { value: g, children: /* @__PURE__ */ r(
|
|
147
156
|
"div",
|
|
148
157
|
{
|
|
149
158
|
role: "group",
|
|
150
|
-
className:
|
|
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
|
-
},
|
|
158
|
-
|
|
159
|
-
function
|
|
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
|
-
|
|
170
|
+
o.preventDefault(), o.stopPropagation();
|
|
162
171
|
return;
|
|
163
172
|
}
|
|
164
|
-
t?.(
|
|
173
|
+
t?.(o);
|
|
165
174
|
}
|
|
166
|
-
function
|
|
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
|
|
180
|
+
const Y = C(
|
|
172
181
|
"ChoiceCardSurface",
|
|
173
182
|
({
|
|
174
183
|
className: e,
|
|
175
|
-
selected:
|
|
184
|
+
selected: o,
|
|
176
185
|
disabled: t = !1,
|
|
177
|
-
mode:
|
|
186
|
+
mode: a,
|
|
178
187
|
size: c,
|
|
179
188
|
variant: n,
|
|
180
|
-
children:
|
|
189
|
+
children: m,
|
|
181
190
|
onClick: h,
|
|
182
|
-
onPointerDown:
|
|
183
|
-
onKeyDown:
|
|
184
|
-
...
|
|
191
|
+
onPointerDown: p,
|
|
192
|
+
onKeyDown: u,
|
|
193
|
+
...d
|
|
185
194
|
}, f) => /* @__PURE__ */ r(
|
|
186
195
|
"div",
|
|
187
196
|
{
|
|
188
197
|
ref: f,
|
|
189
|
-
className:
|
|
190
|
-
selected:
|
|
198
|
+
className: J({
|
|
199
|
+
selected: o,
|
|
191
200
|
disabled: t,
|
|
192
|
-
mode:
|
|
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":
|
|
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: (
|
|
204
|
-
onPointerDown: (
|
|
205
|
-
onKeyDown: (
|
|
206
|
-
if (t && (
|
|
207
|
-
|
|
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
|
-
|
|
219
|
+
u?.(l);
|
|
211
220
|
},
|
|
212
|
-
...
|
|
213
|
-
children:
|
|
221
|
+
...d,
|
|
222
|
+
children: m
|
|
214
223
|
}
|
|
215
224
|
)
|
|
216
|
-
),
|
|
225
|
+
), ve = C(
|
|
217
226
|
"ChoiceCard",
|
|
218
227
|
({
|
|
219
228
|
value: e,
|
|
220
|
-
className:
|
|
229
|
+
className: o,
|
|
221
230
|
children: t,
|
|
222
|
-
disabled:
|
|
231
|
+
disabled: a,
|
|
223
232
|
size: c = "md",
|
|
224
233
|
variant: n = "default",
|
|
225
|
-
"aria-label":
|
|
234
|
+
"aria-label": m,
|
|
226
235
|
...h
|
|
227
|
-
},
|
|
228
|
-
const
|
|
229
|
-
b((
|
|
230
|
-
}, []),
|
|
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:
|
|
242
|
+
selected: l,
|
|
234
243
|
disabled: f,
|
|
235
|
-
type:
|
|
244
|
+
type: u.type,
|
|
236
245
|
size: c,
|
|
237
246
|
variant: n,
|
|
238
|
-
labelIsExplicit:
|
|
239
|
-
setAccessibleName:
|
|
247
|
+
labelIsExplicit: k,
|
|
248
|
+
setAccessibleName: w
|
|
240
249
|
}),
|
|
241
|
-
[e,
|
|
242
|
-
), z =
|
|
243
|
-
f ||
|
|
244
|
-
},
|
|
245
|
-
|
|
246
|
-
},
|
|
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
|
-
|
|
249
|
-
),
|
|
250
|
-
|
|
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:
|
|
263
|
+
className: E,
|
|
255
264
|
"data-slot": "choice-card-control",
|
|
256
265
|
"aria-label": z
|
|
257
266
|
}
|
|
258
267
|
) : /* @__PURE__ */ r(
|
|
259
|
-
|
|
268
|
+
_.Root,
|
|
260
269
|
{
|
|
261
|
-
checked:
|
|
270
|
+
checked: l,
|
|
262
271
|
disabled: f,
|
|
263
|
-
onCheckedChange:
|
|
264
|
-
className:
|
|
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(
|
|
270
|
-
|
|
278
|
+
return /* @__PURE__ */ r(v.Provider, { value: y, children: /* @__PURE__ */ x(
|
|
279
|
+
Y,
|
|
271
280
|
{
|
|
272
|
-
ref:
|
|
273
|
-
selected:
|
|
281
|
+
ref: p,
|
|
282
|
+
selected: l,
|
|
274
283
|
disabled: f,
|
|
275
|
-
mode:
|
|
284
|
+
mode: u.type,
|
|
276
285
|
size: c,
|
|
277
286
|
variant: n,
|
|
278
|
-
className:
|
|
279
|
-
|
|
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
|
-
|
|
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:
|
|
297
|
+
onClick: D,
|
|
287
298
|
children: [
|
|
288
|
-
|
|
289
|
-
n === "featured" ? /* @__PURE__ */ r(
|
|
299
|
+
L,
|
|
300
|
+
n === "featured" ? /* @__PURE__ */ r(W, {}) : null,
|
|
290
301
|
t
|
|
291
302
|
]
|
|
292
303
|
}
|
|
293
304
|
) });
|
|
294
305
|
}
|
|
295
|
-
),
|
|
296
|
-
const { selected:
|
|
297
|
-
return (
|
|
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:
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
!
|
|
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":
|
|
320
|
+
"data-state": a ? "checked" : "unchecked",
|
|
310
321
|
"aria-hidden": "true",
|
|
311
|
-
children:
|
|
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:
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
!
|
|
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:
|
|
337
|
+
children: a ? /* @__PURE__ */ r("span", { className: "absolute inset-[3px] rounded-full bg-current" }) : null
|
|
327
338
|
}
|
|
328
339
|
);
|
|
329
|
-
}),
|
|
340
|
+
}), ke = C(
|
|
330
341
|
"ChoiceCardBackground",
|
|
331
|
-
({ className: e, children:
|
|
342
|
+
({ className: e, children: o, ...t }, a) => /* @__PURE__ */ r(
|
|
332
343
|
"div",
|
|
333
344
|
{
|
|
334
|
-
ref:
|
|
335
|
-
className:
|
|
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:
|
|
350
|
+
children: o
|
|
340
351
|
}
|
|
341
352
|
)
|
|
342
353
|
);
|
|
343
|
-
function
|
|
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:
|
|
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
|
|
374
|
+
const ye = C(
|
|
364
375
|
"ChoiceCardRibbon",
|
|
365
|
-
({ className: e, children:
|
|
376
|
+
({ className: e, children: o, ...t }, a) => /* @__PURE__ */ x(
|
|
366
377
|
"div",
|
|
367
378
|
{
|
|
368
|
-
ref:
|
|
369
|
-
className:
|
|
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(
|
|
384
|
+
/* @__PURE__ */ r(ee, {}),
|
|
374
385
|
/* @__PURE__ */ r(
|
|
375
386
|
"div",
|
|
376
387
|
{
|
|
377
|
-
className:
|
|
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:
|
|
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
|
-
),
|
|
400
|
+
), Se = C(
|
|
390
401
|
"ChoiceCardFooter",
|
|
391
|
-
({ className: e, children:
|
|
392
|
-
const c =
|
|
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:
|
|
397
|
-
className:
|
|
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:
|
|
415
|
+
children: o
|
|
405
416
|
}
|
|
406
417
|
);
|
|
407
418
|
}
|
|
408
|
-
),
|
|
419
|
+
), Re = C(
|
|
409
420
|
"ChoiceCardContent",
|
|
410
|
-
({ className: e, children:
|
|
411
|
-
const { variant: c } =
|
|
412
|
-
return
|
|
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:
|
|
416
|
-
className:
|
|
426
|
+
ref: a,
|
|
427
|
+
className: i("contents", e),
|
|
417
428
|
"data-slot": "choice-card-content",
|
|
418
429
|
...t,
|
|
419
|
-
children:
|
|
430
|
+
children: o
|
|
420
431
|
}
|
|
421
432
|
) : /* @__PURE__ */ r(
|
|
422
433
|
"div",
|
|
423
434
|
{
|
|
424
|
-
ref:
|
|
425
|
-
className:
|
|
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:
|
|
444
|
+
children: o
|
|
434
445
|
}
|
|
435
446
|
);
|
|
436
447
|
}
|
|
437
|
-
),
|
|
448
|
+
), ze = C("ChoiceCardMedia", ({ className: e, children: o, ...t }, a) => /* @__PURE__ */ r(
|
|
438
449
|
"div",
|
|
439
450
|
{
|
|
440
|
-
ref:
|
|
441
|
-
className:
|
|
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:
|
|
455
|
+
children: o
|
|
445
456
|
}
|
|
446
|
-
)),
|
|
447
|
-
const { selected: c, disabled: n, size:
|
|
448
|
-
return
|
|
449
|
-
if (
|
|
450
|
-
const
|
|
451
|
-
|
|
452
|
-
}, [
|
|
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:
|
|
467
|
+
className: i(
|
|
457
468
|
"capitalize text-content",
|
|
458
|
-
|
|
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:
|
|
475
|
+
children: o
|
|
465
476
|
}
|
|
466
477
|
);
|
|
467
|
-
}),
|
|
478
|
+
}), Ee = C(
|
|
468
479
|
"ChoiceCardHeader",
|
|
469
|
-
({ className: e, children:
|
|
470
|
-
const c =
|
|
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:
|
|
475
|
-
className:
|
|
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:
|
|
493
|
+
children: o
|
|
483
494
|
}
|
|
484
495
|
);
|
|
485
496
|
}
|
|
486
|
-
),
|
|
487
|
-
const { selected: c, disabled: n, variant:
|
|
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:
|
|
492
|
-
className:
|
|
502
|
+
ref: a,
|
|
503
|
+
className: i(
|
|
493
504
|
"text-xs font-medium leading-4 text-content-secondary",
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
n && !c &&
|
|
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:
|
|
511
|
+
children: o
|
|
501
512
|
}
|
|
502
513
|
);
|
|
503
|
-
}),
|
|
514
|
+
}), Ge = C(
|
|
504
515
|
"ChoiceCardStatus",
|
|
505
516
|
({
|
|
506
517
|
className: e,
|
|
507
|
-
asChild:
|
|
518
|
+
asChild: o = !1,
|
|
508
519
|
placement: t = "start",
|
|
509
|
-
icon:
|
|
520
|
+
icon: a,
|
|
510
521
|
children: c = "Selected",
|
|
511
522
|
...n
|
|
512
|
-
},
|
|
513
|
-
const { selected: h } =
|
|
523
|
+
}, m) => {
|
|
524
|
+
const { selected: h } = s.useContext(v);
|
|
514
525
|
return h ? /* @__PURE__ */ r(
|
|
515
|
-
|
|
526
|
+
o ? F : "div",
|
|
516
527
|
{
|
|
517
|
-
ref:
|
|
528
|
+
ref: m,
|
|
518
529
|
"data-slot": "choice-card-status",
|
|
519
530
|
"data-placement": t,
|
|
520
|
-
className:
|
|
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:
|
|
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
|
-
),
|
|
541
|
+
), Pe = C(
|
|
531
542
|
"ChoiceCardIndex",
|
|
532
|
-
({ className: e, children:
|
|
543
|
+
({ className: e, children: o, ...t }, a) => /* @__PURE__ */ r(
|
|
533
544
|
"span",
|
|
534
545
|
{
|
|
535
|
-
ref:
|
|
546
|
+
ref: a,
|
|
536
547
|
"data-slot": "choice-card-index",
|
|
537
|
-
className:
|
|
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:
|
|
553
|
+
children: o
|
|
543
554
|
}
|
|
544
555
|
)
|
|
545
|
-
),
|
|
556
|
+
), Ae = C(
|
|
546
557
|
"ChoiceCardStats",
|
|
547
|
-
({ className: e, children:
|
|
548
|
-
const c =
|
|
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:
|
|
563
|
+
ref: a,
|
|
553
564
|
"data-slot": "choice-card-stats",
|
|
554
|
-
className:
|
|
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,
|
|
560
|
-
|
|
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
|
-
] },
|
|
573
|
+
] }, m))
|
|
563
574
|
}
|
|
564
575
|
);
|
|
565
576
|
}
|
|
566
|
-
),
|
|
577
|
+
), Me = C(
|
|
567
578
|
"ChoiceCardStat",
|
|
568
|
-
({ className: e, value:
|
|
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:
|
|
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
|
-
...
|
|
588
|
+
...a,
|
|
578
589
|
children: [
|
|
579
|
-
/* @__PURE__ */ r("p", { className: "text-sm font-medium leading-5 text-content-secondary", children:
|
|
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
|
|
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
|
|
604
|
+
const t = te(o), a = oe(o);
|
|
588
605
|
return `max-content ${Array.from(
|
|
589
606
|
{ length: e },
|
|
590
|
-
(
|
|
607
|
+
(n, m) => m === 0 ? t : `${a} ${t}`
|
|
591
608
|
).join(" ")}`;
|
|
592
609
|
}
|
|
593
|
-
|
|
594
|
-
|
|
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
|
|
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 }, (
|
|
650
|
+
Array.from({ length: e }, (m, h) => /* @__PURE__ */ r(
|
|
604
651
|
"span",
|
|
605
652
|
{
|
|
606
|
-
className: "w-full self-center border-t border-
|
|
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
|
-
|
|
656
|
+
h
|
|
609
657
|
)),
|
|
610
658
|
/* @__PURE__ */ r("span", { className: "[grid-row:-1]" })
|
|
611
659
|
]
|
|
612
660
|
}
|
|
613
661
|
);
|
|
614
662
|
}
|
|
615
|
-
const
|
|
663
|
+
const ce = C(
|
|
616
664
|
"ChoiceCardCompareLabels",
|
|
617
|
-
({ className: e, children:
|
|
618
|
-
|
|
619
|
-
|
|
620
|
-
|
|
621
|
-
|
|
622
|
-
|
|
623
|
-
"
|
|
624
|
-
|
|
625
|
-
|
|
626
|
-
|
|
627
|
-
|
|
628
|
-
|
|
629
|
-
|
|
630
|
-
|
|
631
|
-
|
|
632
|
-
|
|
633
|
-
|
|
634
|
-
|
|
635
|
-
|
|
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:
|
|
697
|
+
({ className: e, children: o, ...t }, a) => /* @__PURE__ */ x(
|
|
638
698
|
"div",
|
|
639
699
|
{
|
|
640
|
-
ref:
|
|
700
|
+
ref: a,
|
|
641
701
|
"data-slot": "choice-card-compare-label",
|
|
642
|
-
className:
|
|
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:
|
|
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
|
-
),
|
|
716
|
+
), Be = C(
|
|
657
717
|
"ChoiceCardCompareLead",
|
|
658
|
-
({ className: e, ...
|
|
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:
|
|
664
|
-
...
|
|
723
|
+
className: i("[grid-row:2] min-h-4 min-w-0", e),
|
|
724
|
+
...o
|
|
665
725
|
}
|
|
666
726
|
)
|
|
667
|
-
),
|
|
727
|
+
), je = C(
|
|
668
728
|
"ChoiceCardCompareRow",
|
|
669
|
-
({ className: e, ...
|
|
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:
|
|
675
|
-
...
|
|
734
|
+
className: i("flex w-full min-w-0 items-center justify-center self-stretch", e),
|
|
735
|
+
...o
|
|
676
736
|
}
|
|
677
737
|
)
|
|
678
|
-
),
|
|
738
|
+
), De = C(
|
|
679
739
|
"ChoiceCardCompare",
|
|
680
|
-
({ className: e, children:
|
|
681
|
-
const
|
|
682
|
-
(
|
|
683
|
-
),
|
|
684
|
-
|
|
685
|
-
) : 0
|
|
686
|
-
|
|
687
|
-
|
|
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
|
-
|
|
690
|
-
|
|
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
|
-
|
|
704
|
-
|
|
705
|
-
|
|
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
|
-
|
|
708
|
-
|
|
709
|
-
|
|
710
|
-
|
|
711
|
-
|
|
712
|
-
|
|
713
|
-
|
|
714
|
-
|
|
715
|
-
|
|
716
|
-
|
|
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
|
-
|
|
726
|
-
|
|
727
|
-
|
|
728
|
-
|
|
729
|
-
|
|
730
|
-
|
|
731
|
-
|
|
732
|
-
|
|
733
|
-
|
|
734
|
-
|
|
735
|
-
|
|
736
|
-
|
|
737
|
-
|
|
738
|
-
|
|
739
|
-
|
|
740
|
-
|
|
741
|
-
|
|
742
|
-
|
|
743
|
-
|
|
744
|
-
|
|
745
|
-
|
|
746
|
-
|
|
747
|
-
|
|
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
|
};
|