impact-nova 1.7.50 → 1.7.51
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/ui/ag-grid-react/index.js +1 -1
- package/dist/components/ui/choice-card/choice-card.d.ts +45 -0
- package/dist/components/ui/choice-card/choice-card.js +282 -0
- package/dist/components/ui/choice-card/index.d.ts +1 -0
- package/dist/components/ui/choice-card/index.js +12 -0
- package/dist/components/ui/data-table/data-table-saved-views.js +53 -53
- package/dist/components/ui/nested-list/components/NestedListContent.d.ts +2 -1
- package/dist/components/ui/nested-list/components/NestedListContent.js +46 -46
- package/dist/components/ui/nested-list/components/SortableItem.d.ts +1 -0
- package/dist/components/ui/nested-list/components/SortableItem.js +72 -70
- package/dist/components/ui/nested-list/nested-list.js +166 -152
- package/dist/components/ui/sheet.js +6 -6
- package/dist/components/ui/wizard/index.d.ts +1 -0
- package/dist/components/ui/wizard/index.js +17 -0
- package/dist/components/ui/wizard/wizard.d.ts +53 -0
- package/dist/components/ui/wizard/wizard.js +312 -0
- package/dist/impact-nova.css +1 -1
- package/dist/index.d.ts +2 -2
- package/dist/index.js +339 -336
- package/dist/llms/rules/real-world-patterns.js +1 -1
- package/package.json +11 -11
- package/dist/components/ui/create-item-flow/create-item-flow.d.ts +0 -46
- package/dist/components/ui/create-item-flow/create-item-flow.js +0 -231
- package/dist/components/ui/create-item-flow/index.d.ts +0 -1
- package/dist/components/ui/create-item-flow/index.js +0 -16
- package/dist/components/ui/report-card/index.d.ts +0 -1
- package/dist/components/ui/report-card/index.js +0 -10
- package/dist/components/ui/report-card/report-card.d.ts +0 -19
- package/dist/components/ui/report-card/report-card.js +0 -146
|
@@ -0,0 +1,312 @@
|
|
|
1
|
+
import { jsx as n } from "react/jsx-runtime";
|
|
2
|
+
import * as a from "react";
|
|
3
|
+
import { useControllableState as C } from "@radix-ui/react-use-controllable-state";
|
|
4
|
+
import { cn as c } from "../../../lib/utils.js";
|
|
5
|
+
import R from "../../../icons/assets/createFlowImage.svg.js";
|
|
6
|
+
const N = a.createContext(null), S = a.createContext(null), W = () => {
|
|
7
|
+
const t = a.useContext(N);
|
|
8
|
+
if (!t)
|
|
9
|
+
throw new Error("Wizard.* components must be used within WizardRoot");
|
|
10
|
+
return t;
|
|
11
|
+
}, y = () => {
|
|
12
|
+
const t = a.useContext(S);
|
|
13
|
+
if (!t)
|
|
14
|
+
throw new Error("Wizard content and footer must be used within WizardBody");
|
|
15
|
+
return t;
|
|
16
|
+
};
|
|
17
|
+
function O() {
|
|
18
|
+
const { value: t, totalSteps: e, setValue: o } = W();
|
|
19
|
+
return a.useMemo(
|
|
20
|
+
() => ({
|
|
21
|
+
value: t,
|
|
22
|
+
totalSteps: e,
|
|
23
|
+
setValue: o,
|
|
24
|
+
goNext: () => o(Math.min(t + 1, e)),
|
|
25
|
+
goBack: () => o(Math.max(t - 1, 1)),
|
|
26
|
+
isFirstStep: t <= 1,
|
|
27
|
+
isLastStep: t >= e
|
|
28
|
+
}),
|
|
29
|
+
[t, e, o]
|
|
30
|
+
);
|
|
31
|
+
}
|
|
32
|
+
const E = ({
|
|
33
|
+
value: t,
|
|
34
|
+
defaultValue: e = 1,
|
|
35
|
+
onValueChange: o,
|
|
36
|
+
totalSteps: r,
|
|
37
|
+
steps: s = [],
|
|
38
|
+
children: i
|
|
39
|
+
}) => {
|
|
40
|
+
const [p, m] = C({
|
|
41
|
+
prop: t,
|
|
42
|
+
defaultProp: e,
|
|
43
|
+
onChange: o
|
|
44
|
+
}), [u, l] = a.useState([]), x = a.useCallback((b) => {
|
|
45
|
+
l((v) => v.includes(b) ? v : [...v, b].sort((g, w) => g - w));
|
|
46
|
+
}, []), d = a.useCallback((b) => {
|
|
47
|
+
l((v) => v.filter((g) => g !== b));
|
|
48
|
+
}, []), f = r ?? (u.length > 0 ? Math.max(...u) : s.length), h = a.useMemo(
|
|
49
|
+
() => ({
|
|
50
|
+
value: p ?? e,
|
|
51
|
+
totalSteps: f,
|
|
52
|
+
steps: s,
|
|
53
|
+
setValue: m,
|
|
54
|
+
registerStep: x,
|
|
55
|
+
unregisterStep: d
|
|
56
|
+
}),
|
|
57
|
+
[p, e, f, s, m, x, d]
|
|
58
|
+
);
|
|
59
|
+
return /* @__PURE__ */ n(N.Provider, { value: h, children: i });
|
|
60
|
+
};
|
|
61
|
+
E.displayName = "WizardRoot";
|
|
62
|
+
const k = a.forwardRef(
|
|
63
|
+
({ className: t, children: e, ...o }, r) => /* @__PURE__ */ n(
|
|
64
|
+
"div",
|
|
65
|
+
{
|
|
66
|
+
ref: r,
|
|
67
|
+
className: c(
|
|
68
|
+
"flex flex-row bg-canvas-elevated rounded-lg shadow-elevation-card overflow-hidden w-[83%] mx-auto min-h-0 min-w-0 flex-1",
|
|
69
|
+
t
|
|
70
|
+
),
|
|
71
|
+
...o,
|
|
72
|
+
children: e
|
|
73
|
+
}
|
|
74
|
+
)
|
|
75
|
+
);
|
|
76
|
+
k.displayName = "WizardLayout";
|
|
77
|
+
const _ = a.forwardRef(
|
|
78
|
+
({ className: t, children: e, ...o }, r) => /* @__PURE__ */ n(
|
|
79
|
+
"div",
|
|
80
|
+
{
|
|
81
|
+
ref: r,
|
|
82
|
+
className: c(
|
|
83
|
+
"hidden lg:flex flex-col w-[300px] xl:w-[427px] shrink-0 bg-canvas-elevated border-r border-stroke-hairline pt-[100px]",
|
|
84
|
+
t
|
|
85
|
+
),
|
|
86
|
+
"data-slot": "sidebar",
|
|
87
|
+
...o,
|
|
88
|
+
children: e
|
|
89
|
+
}
|
|
90
|
+
)
|
|
91
|
+
);
|
|
92
|
+
_.displayName = "WizardSidebar";
|
|
93
|
+
const M = a.forwardRef(
|
|
94
|
+
({ className: t, children: e, ...o }, r) => /* @__PURE__ */ n(
|
|
95
|
+
"h1",
|
|
96
|
+
{
|
|
97
|
+
ref: r,
|
|
98
|
+
className: c("font-manrope text-[24px] font-[800] leading-[36px] text-[#0D152C] mb-3 px-6 lg:px-10 xl:px-[64px]", t),
|
|
99
|
+
...o,
|
|
100
|
+
children: e
|
|
101
|
+
}
|
|
102
|
+
)
|
|
103
|
+
);
|
|
104
|
+
M.displayName = "WizardTitle";
|
|
105
|
+
const D = a.forwardRef(
|
|
106
|
+
({ className: t, children: e, ...o }, r) => /* @__PURE__ */ n(
|
|
107
|
+
"p",
|
|
108
|
+
{
|
|
109
|
+
ref: r,
|
|
110
|
+
className: c("font-manrope text-[12px] font-[500] leading-[16px] text-[#7A8294] px-6 lg:px-10 xl:px-[64px]", t),
|
|
111
|
+
...o,
|
|
112
|
+
children: e
|
|
113
|
+
}
|
|
114
|
+
)
|
|
115
|
+
);
|
|
116
|
+
D.displayName = "WizardDescription";
|
|
117
|
+
const L = a.forwardRef(
|
|
118
|
+
({ className: t, src: e, alt: o = "Wizard illustration", children: r, ...s }, i) => /* @__PURE__ */ n(
|
|
119
|
+
"div",
|
|
120
|
+
{
|
|
121
|
+
ref: i,
|
|
122
|
+
className: c(
|
|
123
|
+
"mt-auto shrink-0 w-[200px] xl:w-[280px] h-[120px] xl:h-[166px] mx-auto xl:ml-[73px] xl:mr-[73px] mb-[100px]",
|
|
124
|
+
t
|
|
125
|
+
),
|
|
126
|
+
"data-slot": "media",
|
|
127
|
+
...s,
|
|
128
|
+
children: r || (e ? /* @__PURE__ */ n("img", { src: e, alt: o, className: "w-full h-full object-contain" }) : /* @__PURE__ */ n(R, { className: "w-full h-full", role: "img", "aria-label": o }))
|
|
129
|
+
}
|
|
130
|
+
)
|
|
131
|
+
);
|
|
132
|
+
L.displayName = "WizardMedia";
|
|
133
|
+
const F = a.forwardRef(
|
|
134
|
+
({ className: t, children: e, ...o }, r) => {
|
|
135
|
+
const [s, i] = a.useState({ top: !1, bottom: !1 });
|
|
136
|
+
return /* @__PURE__ */ n(S.Provider, { value: { edges: s, setEdges: i }, children: /* @__PURE__ */ n(
|
|
137
|
+
"div",
|
|
138
|
+
{
|
|
139
|
+
ref: r,
|
|
140
|
+
className: c(
|
|
141
|
+
"flex flex-col flex-1 min-h-0 min-w-0 overflow-hidden pt-[50px] px-6 sm:px-10 md:px-16 lg:px-20 xl:px-[60px] 2xl:px-[190px] pb-[73px]",
|
|
142
|
+
t
|
|
143
|
+
),
|
|
144
|
+
"data-slot": "body",
|
|
145
|
+
...o,
|
|
146
|
+
children: e
|
|
147
|
+
}
|
|
148
|
+
) });
|
|
149
|
+
}
|
|
150
|
+
);
|
|
151
|
+
F.displayName = "WizardBody";
|
|
152
|
+
const P = a.forwardRef(
|
|
153
|
+
({ className: t, interactive: e = !0, linear: o = !1, ...r }, s) => {
|
|
154
|
+
const { value: i, totalSteps: p, steps: m, setValue: u } = W();
|
|
155
|
+
if (p <= 0) return null;
|
|
156
|
+
const l = (x) => {
|
|
157
|
+
e && (o && x > i || u(x));
|
|
158
|
+
};
|
|
159
|
+
return /* @__PURE__ */ n(
|
|
160
|
+
"div",
|
|
161
|
+
{
|
|
162
|
+
ref: s,
|
|
163
|
+
className: c("flex gap-2 mb-[42px] shrink-0", t),
|
|
164
|
+
"data-slot": "progress",
|
|
165
|
+
role: "list",
|
|
166
|
+
...r,
|
|
167
|
+
children: Array.from({ length: p }, (x, d) => {
|
|
168
|
+
const f = d + 1, h = d === i - 1, b = d < i - 1, g = m[d]?.label ?? `Step ${f} of ${p}`, w = e && (!o || f <= i);
|
|
169
|
+
return /* @__PURE__ */ n(
|
|
170
|
+
"div",
|
|
171
|
+
{
|
|
172
|
+
role: "listitem",
|
|
173
|
+
"aria-label": g,
|
|
174
|
+
"aria-current": h ? "step" : void 0,
|
|
175
|
+
tabIndex: w ? 0 : void 0,
|
|
176
|
+
onClick: () => l(f),
|
|
177
|
+
onKeyDown: w ? (z) => {
|
|
178
|
+
(z.key === "Enter" || z.key === " ") && (z.preventDefault(), l(f));
|
|
179
|
+
} : void 0,
|
|
180
|
+
className: c(
|
|
181
|
+
"h-2 flex-1 max-w-[132px] rounded-[4px] transition-colors duration-300",
|
|
182
|
+
h || b ? "bg-[#4259ee]" : "bg-[#e8eaf6]",
|
|
183
|
+
w ? "cursor-pointer" : "cursor-default"
|
|
184
|
+
)
|
|
185
|
+
},
|
|
186
|
+
d
|
|
187
|
+
);
|
|
188
|
+
})
|
|
189
|
+
}
|
|
190
|
+
);
|
|
191
|
+
}
|
|
192
|
+
);
|
|
193
|
+
P.displayName = "WizardProgress";
|
|
194
|
+
const A = a.forwardRef(
|
|
195
|
+
({ className: t, children: e, ...o }, r) => /* @__PURE__ */ n(
|
|
196
|
+
"h2",
|
|
197
|
+
{
|
|
198
|
+
ref: r,
|
|
199
|
+
className: c("font-manrope text-[14px] font-[800] leading-[21px] text-[#0D152C]", t),
|
|
200
|
+
...o,
|
|
201
|
+
children: e
|
|
202
|
+
}
|
|
203
|
+
)
|
|
204
|
+
);
|
|
205
|
+
A.displayName = "WizardHeader";
|
|
206
|
+
const B = a.forwardRef(
|
|
207
|
+
({ className: t, children: e, ...o }, r) => /* @__PURE__ */ n(
|
|
208
|
+
"p",
|
|
209
|
+
{
|
|
210
|
+
ref: r,
|
|
211
|
+
className: c("text-[14px] font-normal leading-relaxed text-content-muted", t),
|
|
212
|
+
...o,
|
|
213
|
+
children: e
|
|
214
|
+
}
|
|
215
|
+
)
|
|
216
|
+
);
|
|
217
|
+
B.displayName = "WizardStepDescription";
|
|
218
|
+
const H = a.forwardRef(
|
|
219
|
+
({ className: t, children: e, ...o }, r) => {
|
|
220
|
+
const { edges: s, setEdges: i } = y(), p = a.useRef(null), m = a.useCallback(
|
|
221
|
+
(l) => {
|
|
222
|
+
p.current = l, typeof r == "function" ? r(l) : r && (r.current = l);
|
|
223
|
+
},
|
|
224
|
+
[r]
|
|
225
|
+
), u = a.useCallback(() => {
|
|
226
|
+
const l = p.current;
|
|
227
|
+
if (!l) return;
|
|
228
|
+
const { scrollTop: x, scrollHeight: d, clientHeight: f } = l, h = 1, b = x > h, v = x + f < d - h;
|
|
229
|
+
i((g) => g.top === b && g.bottom === v ? g : { top: b, bottom: v });
|
|
230
|
+
}, [i]);
|
|
231
|
+
return a.useEffect(() => {
|
|
232
|
+
const l = p.current;
|
|
233
|
+
if (!l) return;
|
|
234
|
+
const x = () => {
|
|
235
|
+
requestAnimationFrame(u);
|
|
236
|
+
};
|
|
237
|
+
x(), l.addEventListener("scroll", u, { passive: !0 });
|
|
238
|
+
const d = new ResizeObserver(x);
|
|
239
|
+
d.observe(l);
|
|
240
|
+
const f = l.firstElementChild;
|
|
241
|
+
return f && d.observe(f), () => {
|
|
242
|
+
l.removeEventListener("scroll", u), d.disconnect();
|
|
243
|
+
};
|
|
244
|
+
}, [u, e]), /* @__PURE__ */ n(
|
|
245
|
+
"div",
|
|
246
|
+
{
|
|
247
|
+
className: c(
|
|
248
|
+
"flex flex-col flex-1 min-h-0 transition-[box-shadow] duration-200",
|
|
249
|
+
s.top && "shadow-[inset_0_1px_0_0_var(--color-border-hairline)]"
|
|
250
|
+
),
|
|
251
|
+
"data-slot": "content-wrapper",
|
|
252
|
+
"data-scroll-top": s.top || void 0,
|
|
253
|
+
"data-scroll-bottom": s.bottom || void 0,
|
|
254
|
+
children: /* @__PURE__ */ n(
|
|
255
|
+
"div",
|
|
256
|
+
{
|
|
257
|
+
ref: m,
|
|
258
|
+
className: c("flex-1 min-h-0 overflow-y-auto overflow-x-hidden p-0.5", t),
|
|
259
|
+
"data-slot": "content",
|
|
260
|
+
...o,
|
|
261
|
+
children: e
|
|
262
|
+
}
|
|
263
|
+
)
|
|
264
|
+
}
|
|
265
|
+
);
|
|
266
|
+
}
|
|
267
|
+
);
|
|
268
|
+
H.displayName = "WizardContent";
|
|
269
|
+
const T = a.forwardRef(
|
|
270
|
+
({ className: t, value: e, children: o, ...r }, s) => {
|
|
271
|
+
const { value: i, registerStep: p, unregisterStep: m } = W();
|
|
272
|
+
return a.useEffect(() => (p(e), () => m(e)), [e, p, m]), i !== e ? null : /* @__PURE__ */ n("div", { ref: s, className: c(t), "data-step": e, ...r, children: o });
|
|
273
|
+
}
|
|
274
|
+
);
|
|
275
|
+
T.displayName = "WizardStep";
|
|
276
|
+
const j = a.forwardRef(
|
|
277
|
+
({ className: t, children: e, ...o }, r) => {
|
|
278
|
+
const { edges: s } = y();
|
|
279
|
+
return /* @__PURE__ */ n(
|
|
280
|
+
"div",
|
|
281
|
+
{
|
|
282
|
+
ref: r,
|
|
283
|
+
className: c(
|
|
284
|
+
"relative z-10 mt-auto flex shrink-0 items-center justify-between bg-canvas-elevated pt-6 pb-[27px] transition-[box-shadow,border-color] duration-200",
|
|
285
|
+
s.bottom && "border-t border-stroke-hairline shadow-[0_-4px_8px_-6px_rgba(13,21,44,0.08)]",
|
|
286
|
+
t
|
|
287
|
+
),
|
|
288
|
+
"data-slot": "footer",
|
|
289
|
+
"data-scroll-bottom": s.bottom || void 0,
|
|
290
|
+
...o,
|
|
291
|
+
children: e
|
|
292
|
+
}
|
|
293
|
+
);
|
|
294
|
+
}
|
|
295
|
+
);
|
|
296
|
+
j.displayName = "WizardFooter";
|
|
297
|
+
export {
|
|
298
|
+
F as WizardBody,
|
|
299
|
+
H as WizardContent,
|
|
300
|
+
D as WizardDescription,
|
|
301
|
+
j as WizardFooter,
|
|
302
|
+
A as WizardHeader,
|
|
303
|
+
k as WizardLayout,
|
|
304
|
+
L as WizardMedia,
|
|
305
|
+
P as WizardProgress,
|
|
306
|
+
E as WizardRoot,
|
|
307
|
+
_ as WizardSidebar,
|
|
308
|
+
T as WizardStep,
|
|
309
|
+
B as WizardStepDescription,
|
|
310
|
+
M as WizardTitle,
|
|
311
|
+
O as useWizard
|
|
312
|
+
};
|