impact-nova 1.8.0 → 1.8.2

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.
@@ -29,11 +29,11 @@ const N = g(
29
29
  }
30
30
  ), w = h.forwardRef(
31
31
  ({
32
- className: x,
33
- type: p,
34
- label: r,
32
+ className: p,
33
+ type: x,
34
+ label: i,
35
35
  helperText: s,
36
- helperTextPosition: i = "absolute",
36
+ helperTextPosition: r = "absolute",
37
37
  isError: t,
38
38
  size: b,
39
39
  disabled: n,
@@ -51,16 +51,15 @@ const N = g(
51
51
  "data-invalid": t || void 0,
52
52
  children: [
53
53
  /* @__PURE__ */ d("div", { className: "flex flex-col gap-[6px]", children: [
54
- r && /* @__PURE__ */ d(
54
+ i && /* @__PURE__ */ d(
55
55
  "label",
56
56
  {
57
57
  className: e(
58
58
  "text-xs font-medium leading-[18px] text-content-tertiary",
59
- n && "opacity-70",
60
- t && "text-destructive"
59
+ n && "opacity-70"
61
60
  ),
62
61
  children: [
63
- r,
62
+ i,
64
63
  " ",
65
64
  u.required && /* @__PURE__ */ a("span", { className: "text-destructive", children: "*" })
66
65
  ]
@@ -70,7 +69,7 @@ const N = g(
70
69
  "div",
71
70
  {
72
71
  className: e(
73
- s && i === "absolute" && "relative"
72
+ s && r === "absolute" && "relative"
74
73
  ),
75
74
  children: [
76
75
  /* @__PURE__ */ d(
@@ -78,7 +77,7 @@ const N = g(
78
77
  {
79
78
  "data-component": "input-border",
80
79
  className: e(
81
- N({ size: b, isError: t, disabled: n, className: x }),
80
+ N({ size: b, isError: t, disabled: n, className: p }),
82
81
  "bg-canvas",
83
82
  n && "bg-disabled-surface"
84
83
  ),
@@ -94,7 +93,7 @@ const N = g(
94
93
  /* @__PURE__ */ a(
95
94
  "input",
96
95
  {
97
- type: p,
96
+ type: x,
98
97
  className: e(
99
98
  "flex h-full w-full bg-transparent p-0 text-sm font-medium outline-none placeholder:font-medium placeholder:text-content-empty disabled:cursor-not-allowed disabled:opacity-50",
100
99
  n && "opacity-100 text-disabled-foreground placeholder:text-disabled-foreground"
@@ -116,7 +115,7 @@ const N = g(
116
115
  ]
117
116
  }
118
117
  ),
119
- s && i === "absolute" && /* @__PURE__ */ d(
118
+ s && r === "absolute" && /* @__PURE__ */ d(
120
119
  "div",
121
120
  {
122
121
  className: e(
@@ -151,7 +150,7 @@ const N = g(
151
150
  }
152
151
  )
153
152
  ] }),
154
- s && i === "flow" && /* @__PURE__ */ d(
153
+ s && r === "flow" && /* @__PURE__ */ d(
155
154
  "div",
156
155
  {
157
156
  className: e(
@@ -1,4 +1,4 @@
1
- import { default as React } from 'react';
1
+ import { default as React, HTMLInputTypeAttribute } from 'react';
2
2
  import { InputProps } from './input';
3
3
  type ComparisonOperator = ">" | "<" | ">=" | "<=";
4
4
  export interface SmartInputProps extends Omit<InputProps, "onChange" | "value" | "onFocus" | "onBlur"> {
@@ -6,7 +6,7 @@ export interface SmartInputProps extends Omit<InputProps, "onChange" | "value" |
6
6
  onChange?: (value: string, syntheticEvent?: React.ChangeEvent<HTMLInputElement>) => void;
7
7
  onBlur?: (event: React.FocusEvent<HTMLInputElement>) => void;
8
8
  onFocus?: (event: React.FocusEvent<HTMLInputElement>) => void;
9
- isNumeric?: boolean;
9
+ type?: HTMLInputTypeAttribute;
10
10
  allowNegative?: boolean;
11
11
  min?: number;
12
12
  max?: number;
@@ -1,33 +1,33 @@
1
- import { jsx as J } from "react/jsx-runtime";
2
- import { useState as Q, useRef as U, useEffect as X } from "react";
3
- import { Input as Y } from "./input.js";
4
- const re = ({
1
+ import { jsx as H } from "react/jsx-runtime";
2
+ import { useState as J, useRef as Q, useEffect as U } from "react";
3
+ import { Input as X } from "./input.js";
4
+ const ne = ({
5
5
  value: D = "",
6
+ type: C = "text",
6
7
  onChange: V,
7
- onBlur: P,
8
+ onBlur: N,
8
9
  onFocus: W,
9
- isNumeric: l = !1,
10
10
  allowNegative: g = !0,
11
11
  min: s,
12
12
  max: u,
13
13
  min_operator: I = ">=",
14
14
  max_operator: v = "<=",
15
15
  maxIntegerDigits: w,
16
- decimalPlaces: f,
17
- enforceDecimal: z = !1,
18
- allowDecimal: C = !0,
19
- maxLength: a,
20
- trimLeadingSpaces: M = !0,
16
+ decimalPlaces: l,
17
+ enforceDecimal: b = !1,
18
+ allowDecimal: M = !0,
19
+ maxLength: c,
20
+ trimLeadingSpaces: P = !0,
21
21
  customValidator: y,
22
22
  onValidationError: h,
23
23
  disabled: p = !1,
24
- ...F
24
+ ...z
25
25
  }) => {
26
- const [c, $] = Q(String(D ?? "")), K = U(null);
27
- X(() => {
26
+ const [a, $] = J(String(D ?? "")), F = Q(null), i = C === "number";
27
+ U(() => {
28
28
  $(String(D ?? ""));
29
29
  }, [D]);
30
- const b = (t) => {
30
+ const K = (t) => {
31
31
  if (s === void 0) return !0;
32
32
  switch (I) {
33
33
  case ">":
@@ -80,68 +80,69 @@ const re = ({
80
80
  } else if (t.includes("-") && !t.startsWith("-"))
81
81
  return t.replace("-", "");
82
82
  return t;
83
- }, q = (t) => {
84
- if (f === void 0 || !t.includes(".")) return t;
83
+ }, m = (t) => {
84
+ if (l === void 0 || !t.includes(".")) return t;
85
85
  const [e, r] = t.split(".");
86
- return r && r.length > f ? `${e}.${r.slice(0, f)}` : t;
87
- }, A = (t) => {
86
+ return r && r.length > l ? `${e}.${r.slice(0, l)}` : t;
87
+ }, q = (t) => {
88
88
  if (w === void 0) return t;
89
89
  const [e, r] = t.split("."), n = e.replace("-", "");
90
90
  if (n.length > w) {
91
- const i = n.slice(0, w), d = e.startsWith("-") ? "-" : "";
92
- return r !== void 0 ? `${d}${i}.${r}` : `${d}${i}`;
91
+ const o = n.slice(0, w), d = e.startsWith("-") ? "-" : "";
92
+ return r !== void 0 ? `${d}${o}.${r}` : `${d}${o}`;
93
93
  }
94
94
  return t;
95
95
  }, S = (t) => {
96
- if (!l) return t;
96
+ if (!i) return t;
97
97
  let e = String(t ?? "");
98
- return M && (e = e.replace(/^\s+/, "")), e = R(e), e = O(e), e = T(e, t), e = q(e), e = A(e), C || (e = e.replace(".", "")), e;
99
- }, E = (t) => {
100
- if (!l || !t || t === "-") return t;
98
+ return P && (e = e.replace(/^\s+/, "")), e = R(e), e = O(e), e = T(e, t), e = m(e), e = q(e), M || (e = e.replace(".", "")), e;
99
+ }, A = (t) => {
100
+ if (!i || !t || t === "-") return t;
101
101
  let e = t;
102
102
  const r = parseFloat(e);
103
103
  if (isNaN(r)) return "";
104
104
  const n = k(r);
105
- if (z && f !== void 0)
106
- e = n.toFixed(f);
107
- else if (f !== void 0 && e.includes(".")) {
108
- const [i, d = ""] = e.split("."), B = d.padEnd(f, "0");
109
- e = `${i}.${B}`;
105
+ if (b && l !== void 0)
106
+ e = n.toFixed(l);
107
+ else if (l !== void 0 && e.includes(".")) {
108
+ const [o, d = ""] = e.split("."), B = d.padEnd(l, "0");
109
+ e = `${o}.${B}`;
110
110
  } else
111
111
  e = String(n);
112
112
  return e;
113
- }, G = (t) => {
113
+ }, E = (t) => {
114
114
  if (!t) return !0;
115
115
  if (y && !y(t))
116
116
  return h?.("Custom validation failed"), !1;
117
- if (l) {
117
+ if (i) {
118
118
  const e = parseFloat(t);
119
119
  if (isNaN(e))
120
120
  return h?.("Invalid number"), !1;
121
- if (!b(e))
121
+ if (!K(e))
122
122
  return h?.(`Value must be ${I} ${s}`), !1;
123
123
  if (!j(e))
124
124
  return h?.(`Value must be ${v} ${u}`), !1;
125
125
  }
126
- return a && t.length > a ? (h?.(`Maximum length is ${a}`), !1) : !0;
126
+ return c && t.length > c ? (h?.(`Maximum length is ${c}`), !1) : !0;
127
127
  };
128
- return /* @__PURE__ */ J(
129
- Y,
128
+ return /* @__PURE__ */ H(
129
+ X,
130
130
  {
131
- ...F,
132
- value: c,
131
+ ...z,
132
+ type: C,
133
+ value: a,
133
134
  onChange: (t) => {
134
135
  if (p) return;
135
136
  let r = t.target.value;
136
- l ? r = S(r) : M && (r = r.replace(/^\s+/, "")), a && r.length > a && (r = r.slice(0, a)), $(r), V?.(r, t);
137
+ i ? r = S(r) : P && (r = r.replace(/^\s+/, "")), c && r.length > c && (r = r.slice(0, c)), $(r), V?.(r, t);
137
138
  },
138
139
  onBlur: (t) => {
139
- let e = c;
140
- l && e && (e = E(e), G(e) && ($(e), e !== c && V?.(e))), P?.(t);
140
+ let e = a;
141
+ i && e && (e = A(e), E(e) && ($(e), e !== a && V?.(e))), N?.(t);
141
142
  },
142
143
  onFocus: W,
143
144
  onKeyDown: (t) => {
144
- if (p || !l) return;
145
+ if (p || !i) return;
145
146
  const e = t.key;
146
147
  if (e === "e" || e === "E") {
147
148
  t.preventDefault();
@@ -151,11 +152,11 @@ const re = ({
151
152
  t.preventDefault();
152
153
  return;
153
154
  }
154
- if (e === "-" && c.includes("-")) {
155
+ if (e === "-" && a.includes("-")) {
155
156
  t.preventDefault();
156
157
  return;
157
158
  }
158
- if (e === "." && (!C || c.includes("."))) {
159
+ if (e === "." && (!M || a.includes("."))) {
159
160
  t.preventDefault();
160
161
  return;
161
162
  }
@@ -163,20 +164,20 @@ const re = ({
163
164
  onPaste: (t) => {
164
165
  if (p) return;
165
166
  t.preventDefault();
166
- const e = t.clipboardData.getData("text"), r = l ? S(e) : e, n = t.target, i = n.selectionStart || 0, d = n.selectionEnd || 0, B = c.slice(0, i), H = c.slice(d);
167
- let o = B + r + H;
168
- l && (o = S(o)), a && o.length > a && (o = o.slice(0, a)), $(o), V?.(o);
167
+ const e = t.clipboardData.getData("text"), r = i ? S(e) : e, n = t.target, o = n.selectionStart || 0, d = n.selectionEnd || 0, B = a.slice(0, o), G = a.slice(d);
168
+ let f = B + r + G;
169
+ i && (f = S(f)), c && f.length > c && (f = f.slice(0, c)), $(f), V?.(f);
169
170
  },
170
171
  disabled: p,
171
- ref: K,
172
+ ref: F,
172
173
  "data-component": "smart-input",
173
- "data-numeric": l || void 0,
174
- "data-decimal-places": f,
174
+ "data-numeric": i || void 0,
175
+ "data-decimal-places": l,
175
176
  "data-min": s,
176
177
  "data-max": u
177
178
  }
178
179
  );
179
180
  };
180
181
  export {
181
- re as SmartInput
182
+ ne as SmartInput
182
183
  };
@@ -1,17 +1,19 @@
1
- import { VariantProps } from 'class-variance-authority';
2
1
  import { HelperTextPosition } from './types/helper-text.types';
3
2
  import * as React from "react";
4
- declare const textareaVariants: (props?: {
5
- isError?: boolean;
6
- size?: "sm" | "md" | "lg" | "default";
7
- disabled?: boolean;
8
- } & import('class-variance-authority/types').ClassProp) => string;
9
- export interface TextareaProps extends Omit<React.TextareaHTMLAttributes<HTMLTextAreaElement>, "disabled" | "size">, VariantProps<typeof textareaVariants> {
3
+ export interface TextareaProps {
4
+ className?: string;
10
5
  label?: string;
6
+ value?: string;
7
+ onChange?: (e: React.ChangeEvent<HTMLTextAreaElement>) => void;
11
8
  helperText?: React.ReactNode;
12
- /** @default "absolute" */
13
9
  helperTextPosition?: HelperTextPosition;
14
10
  characterLimit?: number;
11
+ isRequired?: boolean;
12
+ isError?: boolean;
13
+ isDisabled?: boolean;
14
+ size?: "default" | "sm" | "md" | "lg";
15
+ defaultValue?: string;
16
+ placeholder?: string;
15
17
  }
16
18
  declare const Textarea: React.ForwardRefExoticComponent<TextareaProps & React.RefAttributes<HTMLTextAreaElement>>;
17
19
  export { Textarea };
@@ -1,9 +1,9 @@
1
- import { jsxs as e, jsx as a, Fragment as N } from "react/jsx-runtime";
1
+ import { jsxs as e, jsx as t, Fragment as y } from "react/jsx-runtime";
2
2
  import * as m from "react";
3
- import { cva as y } from "class-variance-authority";
3
+ import { cva as z } from "class-variance-authority";
4
4
  import { Info as x } from "../../icons/index.js";
5
- import { cn as d } from "../../lib/utils.js";
6
- const z = y(
5
+ import { cn as a } from "../../lib/utils.js";
6
+ const C = z(
7
7
  "flex w-full rounded-md border border-field bg-transparent px-3 py-2 text-sm font-medium shadow-sm transition-colors placeholder:font-medium placeholder:text-content-empty focus-visible:outline-none focus-visible:border-brand hover:border-brand disabled:cursor-not-allowed disabled:bg-disabled-surface disabled:text-disabled-foreground disabled:border-stroke",
8
8
  {
9
9
  variants: {
@@ -17,7 +17,7 @@ const z = y(
17
17
  md: "min-h-[72px]",
18
18
  lg: "min-h-32"
19
19
  },
20
- disabled: {
20
+ isDisabled: {
21
21
  true: "cursor-not-allowed opacity-100 bg-disabled-surface border-stroke text-disabled-foreground placeholder:text-disabled-foreground hover:border-stroke",
22
22
  false: ""
23
23
  }
@@ -27,25 +27,26 @@ const z = y(
27
27
  isError: !1
28
28
  }
29
29
  }
30
- ), C = m.forwardRef(
30
+ ), V = m.forwardRef(
31
31
  ({
32
32
  className: b,
33
33
  label: u,
34
- helperText: l,
35
- helperTextPosition: s = "absolute",
34
+ helperText: d,
35
+ helperTextPosition: n = "absolute",
36
36
  characterLimit: o,
37
- isError: t,
38
- size: g,
39
- disabled: i,
37
+ isRequired: g,
38
+ isError: l,
39
+ size: p,
40
+ isDisabled: s,
40
41
  value: r,
41
42
  onChange: v,
42
- ...n
43
- }, p) => {
44
- const [h, c] = m.useState(0);
43
+ ...i
44
+ }, h) => {
45
+ const [w, c] = m.useState(0);
45
46
  m.useEffect(() => {
46
- r ? c(String(r).length) : n.defaultValue && c(String(n.defaultValue).length);
47
- }, [r, n.defaultValue]);
48
- const w = (f) => {
47
+ r ? c(String(r).length) : i.defaultValue && c(String(i.defaultValue).length);
48
+ }, [r, i.defaultValue]);
49
+ const N = (f) => {
49
50
  c(f.target.value.length), v?.(f);
50
51
  };
51
52
  return /* @__PURE__ */ e("div", { className: "flex w-full min-w-[240px] flex-col gap-[6px]", children: [
@@ -53,60 +54,59 @@ const z = y(
53
54
  u && /* @__PURE__ */ e(
54
55
  "label",
55
56
  {
56
- className: d(
57
+ className: a(
57
58
  "text-xs font-medium leading-[18px] text-content-tertiary",
58
- i && "opacity-70",
59
- t && "text-destructive"
59
+ s && "opacity-70"
60
60
  ),
61
61
  children: [
62
62
  u,
63
63
  " ",
64
- n.required && /* @__PURE__ */ a("span", { className: "text-destructive", children: "*" })
64
+ g && /* @__PURE__ */ t("span", { className: "text-destructive", children: "*" })
65
65
  ]
66
66
  }
67
67
  ),
68
68
  /* @__PURE__ */ e(
69
69
  "div",
70
70
  {
71
- className: d(
72
- l && s === "absolute" && "relative"
71
+ className: a(
72
+ d && n === "absolute" && "relative"
73
73
  ),
74
74
  children: [
75
- /* @__PURE__ */ a(
75
+ /* @__PURE__ */ t(
76
76
  "textarea",
77
77
  {
78
- className: d(
79
- z({ isError: t, size: g, disabled: i, className: b }),
78
+ className: a(
79
+ C({ isError: l, size: p, isDisabled: s, className: b }),
80
80
  "bg-canvas",
81
- i && "bg-disabled-surface"
81
+ s && "bg-disabled-surface"
82
82
  ),
83
- ref: p,
84
- disabled: !!i,
83
+ ref: h,
84
+ disabled: !!s,
85
85
  value: r,
86
- onChange: w,
86
+ onChange: N,
87
87
  "data-component": "textarea",
88
- ...n
88
+ ...i
89
89
  }
90
90
  ),
91
- l && s === "absolute" && /* @__PURE__ */ e(
91
+ d && n === "absolute" && /* @__PURE__ */ e(
92
92
  "div",
93
93
  {
94
- className: d(
94
+ className: a(
95
95
  "absolute left-0 top-full z-10 mt-1 flex min-w-0 max-w-full items-center gap-[6px] text-[12px] font-medium leading-[18px] text-navigation-muted",
96
- t && "text-destructive"
96
+ l && "text-destructive"
97
97
  ),
98
98
  children: [
99
- /* @__PURE__ */ a(
99
+ /* @__PURE__ */ t(
100
100
  x,
101
101
  {
102
102
  size: "xs",
103
- className: d(
103
+ className: a(
104
104
  "shrink-0",
105
- t ? "text-destructive" : "text-content-muted"
105
+ l ? "text-destructive" : "text-content-muted"
106
106
  )
107
107
  }
108
108
  ),
109
- /* @__PURE__ */ a("p", { className: "min-w-0", children: l })
109
+ /* @__PURE__ */ t("p", { className: "min-w-0", children: d })
110
110
  ]
111
111
  }
112
112
  )
@@ -114,30 +114,30 @@ const z = y(
114
114
  }
115
115
  )
116
116
  ] }),
117
- (l && s === "flow" || o) && /* @__PURE__ */ e("div", { className: "flex items-center justify-between gap-[6px]", children: [
118
- /* @__PURE__ */ a(
117
+ (d && n === "flow" || o) && /* @__PURE__ */ e("div", { className: "flex items-center justify-between gap-[6px]", children: [
118
+ /* @__PURE__ */ t(
119
119
  "div",
120
120
  {
121
- className: d(
121
+ className: a(
122
122
  "flex min-w-0 flex-1 items-center gap-[6px]",
123
- t && "text-destructive"
123
+ l && "text-destructive"
124
124
  ),
125
- children: l && s === "flow" && /* @__PURE__ */ e(N, { children: [
126
- /* @__PURE__ */ a(
125
+ children: d && n === "flow" && /* @__PURE__ */ e(y, { children: [
126
+ /* @__PURE__ */ t(
127
127
  x,
128
128
  {
129
129
  size: "xs",
130
- color: t ? "destructive" : "muted"
130
+ color: l ? "destructive" : "muted"
131
131
  }
132
132
  ),
133
- /* @__PURE__ */ a(
133
+ /* @__PURE__ */ t(
134
134
  "p",
135
135
  {
136
- className: d(
136
+ className: a(
137
137
  "min-w-0 text-[12px] font-medium leading-[18px] text-navigation-muted",
138
- t && "text-destructive"
138
+ l && "text-destructive"
139
139
  ),
140
- children: l
140
+ children: d
141
141
  }
142
142
  )
143
143
  ] })
@@ -149,7 +149,7 @@ const z = y(
149
149
  className: "text-[12px] font-medium leading-[18px] text-navigation-muted text-right",
150
150
  "data-component": "character-count-indicator",
151
151
  children: [
152
- h,
152
+ w,
153
153
  "/",
154
154
  o
155
155
  ]
@@ -159,7 +159,7 @@ const z = y(
159
159
  ] });
160
160
  }
161
161
  );
162
- C.displayName = "Textarea";
162
+ V.displayName = "Textarea";
163
163
  export {
164
- C as Textarea
164
+ V as Textarea
165
165
  };
@@ -117,6 +117,11 @@ export interface AgGridWrapperProps<TData = unknown> extends Omit<AgGridReactPro
117
117
  * Default column group definition (will be merged with wrapper defaults)
118
118
  */
119
119
  defaultColGroupDef?: ColGroupDef<TData>;
120
+ /**
121
+ * When true (default), DOM order matches visual order for screen readers.
122
+ * Large planning grids should pass false for better column virtualization.
123
+ */
124
+ ensureDomOrder?: boolean;
120
125
  /**
121
126
  * Value formatter registry - maps formatter names to formatter functions
122
127
  * Allows backend to specify formatters by string name (e.g., "currency", "percentage")
@@ -1 +1 @@
1
- export type { ButtonGroupProps } from '../button-group';
1
+ export type { ButtonGroupProps, ButtonOption } from '../button-group';
@@ -4,6 +4,7 @@ export interface FilterItem {
4
4
  value: string | number | string[];
5
5
  required?: boolean;
6
6
  removable?: boolean;
7
+ copyable?: boolean;
7
8
  viewAllTrigger?: 'expand' | 'custom';
8
9
  overflow?: {
9
10
  count?: number;
@@ -106,4 +107,12 @@ export interface FilterStripProps {
106
107
  * to anchor a badge to this button.
107
108
  */
108
109
  allFiltersShortcutId?: string;
110
+ /**
111
+ * Whether to show the "All Filters" button. Defaults to true.
112
+ */
113
+ showAllFiltersButton?: boolean;
114
+ /**
115
+ * Whether to show the saved filters in the summary dropdown.
116
+ */
117
+ showSavedFilters?: boolean;
109
118
  }