impact-nova 1.7.50 → 1.8.0

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 (31) hide show
  1. package/dist/components/ui/ag-grid-react/index.js +1 -1
  2. package/dist/components/ui/choice-card/choice-card.d.ts +45 -0
  3. package/dist/components/ui/choice-card/choice-card.js +282 -0
  4. package/dist/components/ui/choice-card/index.d.ts +1 -0
  5. package/dist/components/ui/choice-card/index.js +12 -0
  6. package/dist/components/ui/data-table/data-table-saved-views.js +53 -53
  7. package/dist/components/ui/nested-list/components/NestedListContent.d.ts +2 -1
  8. package/dist/components/ui/nested-list/components/NestedListContent.js +46 -46
  9. package/dist/components/ui/nested-list/components/SortableItem.d.ts +1 -0
  10. package/dist/components/ui/nested-list/components/SortableItem.js +72 -70
  11. package/dist/components/ui/nested-list/nested-list.js +166 -152
  12. package/dist/components/ui/select/select.js +126 -125
  13. package/dist/components/ui/sheet.js +6 -6
  14. package/dist/components/ui/types/select.types.d.ts +13 -0
  15. package/dist/components/ui/wizard/index.d.ts +1 -0
  16. package/dist/components/ui/wizard/index.js +17 -0
  17. package/dist/components/ui/wizard/wizard.d.ts +53 -0
  18. package/dist/components/ui/wizard/wizard.js +312 -0
  19. package/dist/impact-nova.css +1 -1
  20. package/dist/index.d.ts +2 -2
  21. package/dist/index.js +339 -336
  22. package/dist/llms/rules/real-world-patterns.js +1 -1
  23. package/package.json +11 -11
  24. package/dist/components/ui/create-item-flow/create-item-flow.d.ts +0 -46
  25. package/dist/components/ui/create-item-flow/create-item-flow.js +0 -231
  26. package/dist/components/ui/create-item-flow/index.d.ts +0 -1
  27. package/dist/components/ui/create-item-flow/index.js +0 -16
  28. package/dist/components/ui/report-card/index.d.ts +0 -1
  29. package/dist/components/ui/report-card/index.js +0 -10
  30. package/dist/components/ui/report-card/report-card.d.ts +0 -19
  31. package/dist/components/ui/report-card/report-card.js +0 -146
@@ -223,6 +223,19 @@ export interface SelectProps<OptionType extends Option = Option, IsMulti extends
223
223
  * Callback fired when the menu is scrolled to the bottom.
224
224
  */
225
225
  onMenuScrollToBottom?: () => void;
226
+ /**
227
+ * Total number of options in the complete dataset, including options that
228
+ * have not been fetched yet (async pagination). When provided AND the
229
+ * component is in multi-select with `enableInvertedSelection`, the trigger
230
+ * label "Selected (N)" uses this value instead of the count of loaded
231
+ * options. Leave undefined for non-paginated usage; behaviour is unchanged.
232
+ *
233
+ * The parent should pass the same total it intends "Select All" to
234
+ * represent on the server. During search you may either keep the
235
+ * unfiltered total (recommended) or pass the filtered total – the
236
+ * component renders whatever is given.
237
+ */
238
+ totalCount?: number;
226
239
  /**
227
240
  * If `true`, shows the "Select All" option in multi-select mode.
228
241
  * @default true
@@ -0,0 +1 @@
1
+ export { WizardRoot, WizardLayout, WizardSidebar, WizardTitle, WizardDescription, WizardMedia, WizardBody, WizardProgress, WizardHeader, WizardStepDescription, WizardContent, WizardStep, WizardFooter, useWizard, type WizardRootProps, type WizardMediaProps, type WizardStepDefinition, type WizardProgressProps, type WizardStepProps, } from './wizard';
@@ -0,0 +1,17 @@
1
+ import { WizardBody as a, WizardContent as d, WizardDescription as e, WizardFooter as z, WizardHeader as W, WizardLayout as o, WizardMedia as t, WizardProgress as p, WizardRoot as s, WizardSidebar as n, WizardStep as S, WizardStepDescription as c, WizardTitle as u, useWizard as y } from "./wizard.js";
2
+ export {
3
+ a as WizardBody,
4
+ d as WizardContent,
5
+ e as WizardDescription,
6
+ z as WizardFooter,
7
+ W as WizardHeader,
8
+ o as WizardLayout,
9
+ t as WizardMedia,
10
+ p as WizardProgress,
11
+ s as WizardRoot,
12
+ n as WizardSidebar,
13
+ S as WizardStep,
14
+ c as WizardStepDescription,
15
+ u as WizardTitle,
16
+ y as useWizard
17
+ };
@@ -0,0 +1,53 @@
1
+ import * as React from "react";
2
+ export interface WizardStepDefinition {
3
+ /** Accessible name for progress segment (aria-label) */
4
+ label: string;
5
+ description?: string;
6
+ }
7
+ export declare function useWizard(): {
8
+ value: number;
9
+ totalSteps: number;
10
+ setValue: (step: number) => void;
11
+ goNext: () => void;
12
+ goBack: () => void;
13
+ isFirstStep: boolean;
14
+ isLastStep: boolean;
15
+ };
16
+ export interface WizardRootProps {
17
+ /** Controlled active step (1-indexed) */
18
+ value?: number;
19
+ /** Uncontrolled initial step (default 1) */
20
+ defaultValue?: number;
21
+ /** Fired when active step changes */
22
+ onValueChange?: (step: number) => void;
23
+ /** Total steps. Auto-counted from WizardStep children when omitted */
24
+ totalSteps?: number;
25
+ /** Optional metadata — improves WizardProgress aria-labels */
26
+ steps?: WizardStepDefinition[];
27
+ children?: React.ReactNode;
28
+ }
29
+ declare const WizardRoot: React.FC<WizardRootProps>;
30
+ declare const WizardLayout: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLDivElement> & React.RefAttributes<HTMLDivElement>>;
31
+ declare const WizardSidebar: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLDivElement> & React.RefAttributes<HTMLDivElement>>;
32
+ declare const WizardTitle: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLHeadingElement> & React.RefAttributes<HTMLHeadingElement>>;
33
+ declare const WizardDescription: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLParagraphElement> & React.RefAttributes<HTMLParagraphElement>>;
34
+ export interface WizardMediaProps extends React.HTMLAttributes<HTMLDivElement> {
35
+ src?: string;
36
+ alt?: string;
37
+ }
38
+ declare const WizardMedia: React.ForwardRefExoticComponent<WizardMediaProps & React.RefAttributes<HTMLDivElement>>;
39
+ declare const WizardBody: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLDivElement> & React.RefAttributes<HTMLDivElement>>;
40
+ export interface WizardProgressProps extends React.HTMLAttributes<HTMLDivElement> {
41
+ interactive?: boolean;
42
+ linear?: boolean;
43
+ }
44
+ declare const WizardProgress: React.ForwardRefExoticComponent<WizardProgressProps & React.RefAttributes<HTMLDivElement>>;
45
+ declare const WizardHeader: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLHeadingElement> & React.RefAttributes<HTMLHeadingElement>>;
46
+ declare const WizardStepDescription: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLParagraphElement> & React.RefAttributes<HTMLParagraphElement>>;
47
+ declare const WizardContent: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLDivElement> & React.RefAttributes<HTMLDivElement>>;
48
+ export interface WizardStepProps extends React.HTMLAttributes<HTMLDivElement> {
49
+ value: number;
50
+ }
51
+ declare const WizardStep: React.ForwardRefExoticComponent<WizardStepProps & React.RefAttributes<HTMLDivElement>>;
52
+ declare const WizardFooter: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLDivElement> & React.RefAttributes<HTMLDivElement>>;
53
+ export { WizardRoot, WizardLayout, WizardSidebar, WizardTitle, WizardDescription, WizardMedia, WizardBody, WizardProgress, WizardHeader, WizardStepDescription, WizardContent, WizardStep, WizardFooter, };
@@ -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
+ };