impact-nova 3.0.0-alpha.6 → 3.0.0-alpha.7

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 (24) hide show
  1. package/dist/components/data/ag-grid-react/headers/header-search-input.js +203 -199
  2. package/dist/components/flows/iris-chat/iris-chat-artifact.js +46 -36
  3. package/dist/components/flows/iris-chat/iris-chat-markdown.js +47 -27
  4. package/dist/components/flows/iris-chat/iris-chat-thread.d.ts +1 -0
  5. package/dist/components/flows/iris-chat/iris-chat-thread.js +81 -75
  6. package/dist/components/flows/iris-chat/iris-chat.js +83 -83
  7. package/dist/components/flows/iris-chat/iris-chat.types.d.ts +2 -0
  8. package/dist/components/flows/iris-chat/iris-chat.variants.d.ts +1 -0
  9. package/dist/components/flows/iris-chat/iris-chat.variants.js +29 -11
  10. package/dist/components/forms/choice-card/choice-card-percent.js +50 -37
  11. package/dist/components/forms/input/input.js +5 -5
  12. package/dist/components/primitives/button/button.variants.js +1 -1
  13. package/dist/components/primitives/stepper/internals/step-model.d.ts +1 -1
  14. package/dist/components/primitives/stepper/internals/step-model.js +5 -5
  15. package/dist/components/primitives/stepper/internals/stepper-compact.js +13 -13
  16. package/dist/components/primitives/stepper/internals/stepper-pipeline.js +6 -6
  17. package/dist/components/primitives/stepper/internals/stepper-rail.js +15 -15
  18. package/dist/components/primitives/stepper/internals/stepper-summary.js +2 -2
  19. package/dist/components/primitives/stepper/internals/stepper-track.js +2 -2
  20. package/dist/components/primitives/stepper/stepper.js +92 -91
  21. package/dist/components/primitives/stepper/stepper.types.d.ts +2 -0
  22. package/dist/impact-nova-components.css +56 -0
  23. package/dist/impact-nova.css +1 -1
  24. package/package.json +1 -1
@@ -1,22 +1,25 @@
1
- import { jsxs as v, jsx as r } from "react/jsx-runtime";
2
- import { useRef as _e, useCallback as X, useState as Ue } from "react";
3
- import { Filter as Ye, Cross as j } from "impact-nova-icons";
4
- import { cn as Je } from "../../../../lib/utils.js";
5
- import { DatePicker as De } from "../../../forms/date-picker/date-picker.js";
6
- import { MonthPicker as Me } from "../../../forms/date-picker/month-picker.js";
7
- import { WeekPicker as Ne } from "../../../forms/date-picker/week-picker.js";
1
+ import { jsxs as y, jsx as r } from "react/jsx-runtime";
2
+ import { useRef as Ue, useCallback as X, useState as Ye } from "react";
3
+ import { Filter as Je, Cross as R } from "impact-nova-icons";
4
+ import { cn as Ke } from "../../../../lib/utils.js";
5
+ import { DatePicker as Me } from "../../../forms/date-picker/date-picker.js";
6
+ import { MonthPicker as Ne } from "../../../forms/date-picker/month-picker.js";
7
+ import { WeekPicker as Pe } from "../../../forms/date-picker/week-picker.js";
8
8
  import { Input as q } from "../../../forms/input/input.js";
9
- import { Select as Pe } from "../../../forms/select/select.js";
10
- import { Popover as Ke, PopoverTrigger as Qe, PopoverContent as Xe, PopoverHeader as Ze, PopoverTitle as $e, PopoverBody as et } from "../../../feedback/popover/popover.js";
11
- import { useImpactNovaI18n as tt } from "../../../../i18n/use-impact-nova-i18n.js";
12
- import { useGridHeader as rt } from "./context/grid-header-context.js";
13
- import { getMultiFilterIndices as H, parseInputPattern as ke, mapOperatorToAgGrid as we } from "./utils/filter-utils.js";
14
- import { DEFAULT_DATE_DISPLAY_FORMAT as lt, serializeWeek as nt, serializeMonth as at, serializeDate as ot, displayDateToIso as Z } from "./utils/date-utils.js";
15
- import { fiscalCalendarPassThrough as st } from "../../../forms/date-picker/fiscal-pass-through.js";
16
- import { useHeaderSearchEditingState as it } from "./use-header-search-editing-state.js";
17
- const Nt = ({
18
- column: N,
19
- api: b,
9
+ import { Select as we } from "../../../forms/select/select.js";
10
+ import { Popover as Qe, PopoverTrigger as Xe, PopoverContent as Ze, PopoverHeader as $e, PopoverTitle as et, PopoverBody as tt } from "../../../feedback/popover/popover.js";
11
+ import { useImpactNovaI18n as rt } from "../../../../i18n/use-impact-nova-i18n.js";
12
+ import { useGridHeader as lt } from "./context/grid-header-context.js";
13
+ import { getMultiFilterIndices as A, parseInputPattern as ke, mapOperatorToAgGrid as Se } from "./utils/filter-utils.js";
14
+ import { DEFAULT_DATE_DISPLAY_FORMAT as nt, serializeWeek as at, serializeMonth as ot, serializeDate as st, displayDateToIso as Z } from "./utils/date-utils.js";
15
+ import { fiscalCalendarPassThrough as it } from "../../../forms/date-picker/fiscal-pass-through.js";
16
+ import { useHeaderSearchEditingState as ct } from "./use-header-search-editing-state.js";
17
+ function dt(f) {
18
+ return typeof f != "object" || f === null || !("selectMenuSearchable" in f) ? !0 : f.selectMenuSearchable !== !1;
19
+ }
20
+ const wt = ({
21
+ column: f,
22
+ api: F,
20
23
  onClose: $,
21
24
  handleInlineSearch: ee,
22
25
  handleClearSearchInline: te,
@@ -24,49 +27,49 @@ const Nt = ({
24
27
  toggleAdvanceSearch: le,
25
28
  advanceSearchEnabled: Ae = !1,
26
29
  selectOptions: G,
27
- isMultiSelect: F,
30
+ isMultiSelect: C,
28
31
  onSelectScrollToBottom: He,
29
32
  onSelectSearchChange: ze,
30
33
  onSelectOpen: ne,
31
34
  isLoadingSelect: ae,
32
35
  enableSpaceSplitting: Be = !1,
33
- enableBooleanParsing: Se = !1,
34
- enableDateParsing: Ie = !1
36
+ enableBooleanParsing: Ie = !1,
37
+ enableDateParsing: We = !1
35
38
  }) => {
36
- const { t: i } = tt(), l = N.getColDef(), c = N.getColId(), V = l?.filter || "agTextColumnFilter", C = V === "agDateColumnFilter", L = V === "agSetColumnFilter" || G && G.length > 0 || l?.cellDataType === "boolean", _ = l?.headerComponentParams?.datePickerVariant || "date", z = C && _ === "month", B = C && _ === "week", S = st(
39
+ const { t: i } = rt(), l = f.getColDef(), c = f.getColId(), V = l?.filter || "agTextColumnFilter", oe = dt(l?.headerComponentParams), T = V === "agDateColumnFilter", L = V === "agSetColumnFilter" || G && G.length > 0 || l?.cellDataType === "boolean", _ = l?.headerComponentParams?.datePickerVariant || "date", H = T && _ === "month", z = T && _ === "week", B = it(
37
40
  l?.headerComponentParams ?? {}
38
- ), y = l?.headerComponentParams?.dateDisplayFormat || lt, oe = rt(), U = _e(null), {
41
+ ), b = l?.headerComponentParams?.dateDisplayFormat || nt, se = lt(), U = Ue(null), {
39
42
  searchText: Y,
40
43
  dateDisplayString: I,
41
- selectedDate: se,
42
- selectedMonth: ie,
43
- selectedWeek: ce,
44
+ selectedDate: ie,
45
+ selectedMonth: ce,
46
+ selectedWeek: de,
44
47
  updateDraft: P,
45
- handleFocus: f,
46
- handleBlur: p,
47
- clearEditingOverlay: We
48
- } = it({
49
- api: b,
48
+ handleFocus: p,
49
+ handleBlur: h,
50
+ clearEditingOverlay: je
51
+ } = ct({
52
+ api: F,
50
53
  colId: c,
51
54
  colDef: l,
52
- isDateFilter: C,
53
- isMonthVariant: z,
54
- isWeekVariant: B,
55
+ isDateFilter: T,
56
+ isMonthVariant: H,
57
+ isWeekVariant: z,
55
58
  datePickerVariant: _,
56
- dateDisplayFormat: y
57
- }), D = (e, t) => {
58
- const n = (a) => a.replace(/[^0-9.\-+eE]/g, ""), s = (a, R) => {
59
- const w = ke(
59
+ dateDisplayFormat: b
60
+ }), M = (e, t) => {
61
+ const n = (a) => a.replace(/[^0-9.\-+eE]/g, ""), s = (a, O) => {
62
+ const k = ke(
60
63
  a,
61
64
  Be,
62
- Se,
63
- Ie
65
+ Ie,
66
+ We
64
67
  );
65
- if (w.conditions.length === 0) return null;
66
- const Ce = (d) => {
67
- let x = we(d.operator);
68
- if (R === "number") {
69
- const Te = parseFloat(n(d.value));
68
+ if (k.conditions.length === 0) return null;
69
+ const Te = (d) => {
70
+ let x = Se(d.operator);
71
+ if (O === "number") {
72
+ const De = parseFloat(n(d.value));
70
73
  return ["contains", "notContains", "startsWith", "endsWith"].includes(
71
74
  x
72
75
  ) && (x = x === "notContains" ? "notEqual" : "equals"), d.operator === "inRange" ? {
@@ -74,7 +77,7 @@ const Nt = ({
74
77
  filter: parseFloat(n(d.value)) || 0,
75
78
  filterTo: parseFloat(n(d.valueTo || "")) || 0,
76
79
  filterType: "number"
77
- } : isNaN(Te) ? null : { type: x, filter: Te, filterType: "number" };
80
+ } : isNaN(De) ? null : { type: x, filter: De, filterType: "number" };
78
81
  }
79
82
  return {
80
83
  type: x,
@@ -83,18 +86,18 @@ const Nt = ({
83
86
  filterType: "text"
84
87
  };
85
88
  };
86
- let A = null;
87
- if (w.conditions.length === 1)
88
- A = Ce(w.conditions[0]);
89
+ let S = null;
90
+ if (k.conditions.length === 1)
91
+ S = Te(k.conditions[0]);
89
92
  else {
90
- const d = w.conditions.map(Ce).filter((x) => x !== null);
91
- d.length === 0 ? A = null : d.length === 1 ? A = d[0] : A = {
92
- filterType: R,
93
- operator: w.logic,
93
+ const d = k.conditions.map(Te).filter((x) => x !== null);
94
+ d.length === 0 ? S = null : d.length === 1 ? S = d[0] : S = {
95
+ filterType: O,
96
+ operator: k.logic,
94
97
  conditions: d
95
98
  };
96
99
  }
97
- return A;
100
+ return S;
98
101
  };
99
102
  let o = null;
100
103
  if (!(e === null || e === "" || Array.isArray(e) && e.length === 0))
@@ -104,16 +107,16 @@ const Nt = ({
104
107
  filterType: "set"
105
108
  };
106
109
  else if (t === "date")
107
- if (B && e && typeof e == "object" && "startDate" in e && "endDate" in e) {
108
- const a = nt(e);
110
+ if (z && e && typeof e == "object" && "startDate" in e && "endDate" in e) {
111
+ const a = at(e);
109
112
  o = {
110
113
  type: "inRange",
111
114
  dateFrom: a.dateFrom,
112
115
  dateTo: a.dateTo,
113
116
  filterType: "date"
114
117
  };
115
- } else if (z && e && typeof e == "object" && "month" in e && "year" in e) {
116
- const a = at(e);
118
+ } else if (H && e && typeof e == "object" && "month" in e && "year" in e) {
119
+ const a = ot(e);
117
120
  o = {
118
121
  type: "inRange",
119
122
  dateFrom: a.dateFrom,
@@ -121,50 +124,50 @@ const Nt = ({
121
124
  filterType: "date"
122
125
  };
123
126
  } else {
124
- const a = e instanceof Date ? ot(e) : null;
127
+ const a = e instanceof Date ? st(e) : null;
125
128
  o = a ? { type: "equals", dateFrom: a, filterType: "date" } : null;
126
129
  }
127
130
  else {
128
- const a = l.filter === "agMultiColumnFilter" ? H(l) : null, R = a ? a.text !== -1 ? "text" : "number" : V === "agNumberColumnFilter" ? "number" : "text";
129
- o = s(String(e), R);
131
+ const a = l.filter === "agMultiColumnFilter" ? A(l) : null, O = a ? a.text !== -1 ? "text" : "number" : V === "agNumberColumnFilter" ? "number" : "text";
132
+ o = s(String(e), O);
130
133
  }
131
- const u = l.filter === "agMultiColumnFilter" ? H(l) : null, T = u ? t === "text" ? u.text !== -1 ? u.text : u.number : t === "set" ? u.set : u.date : 0;
132
- K(o, T);
134
+ const u = l.filter === "agMultiColumnFilter" ? A(l) : null, D = u ? t === "text" ? u.text !== -1 ? u.text : u.number : t === "set" ? u.set : u.date : 0;
135
+ K(o, D);
133
136
  }, J = (e) => {
134
137
  if (ee) {
135
138
  ee(Array.isArray(e) ? e.join(",") : e);
136
139
  return;
137
140
  }
138
- D(e, C ? "date" : "text");
139
- }, de = (e) => {
141
+ M(e, T ? "date" : "text");
142
+ }, ue = (e) => {
140
143
  const t = e.target.value;
141
144
  P({ searchText: t }), J(t);
142
- }, ue = (e) => {
143
- P({ selectedDate: e }), J(e);
144
145
  }, fe = (e) => {
145
- P({ selectedMonth: e }), D(e || null, "date");
146
+ P({ selectedDate: e }), J(e);
146
147
  }, pe = (e) => {
147
- P({ selectedWeek: e }), D(e || null, "date");
148
+ P({ selectedMonth: e }), M(e || null, "date");
149
+ }, he = (e) => {
150
+ P({ selectedWeek: e }), M(e || null, "date");
148
151
  }, Ee = (e) => {
149
152
  if (!e.trim()) return null;
150
153
  const t = ke(e, !1, !1, !1);
151
154
  if (t.conditions.length === 0) return null;
152
155
  const n = (o) => {
153
- let g = we(o.operator);
156
+ let v = Se(o.operator);
154
157
  if (["contains", "notContains", "startsWith", "endsWith"].includes(
155
- g
156
- ) && (g = g === "notContains" ? "notEqual" : "equals"), o.operator === "inRange") {
157
- let T = Z(o.value, y), a = Z(o.valueTo || "", y);
158
- return !T || !a ? null : (T > a && ([T, a] = [a, T]), {
158
+ v
159
+ ) && (v = v === "notContains" ? "notEqual" : "equals"), o.operator === "inRange") {
160
+ let D = Z(o.value, b), a = Z(o.valueTo || "", b);
161
+ return !D || !a ? null : (D > a && ([D, a] = [a, D]), {
159
162
  type: "inRange",
160
- dateFrom: T,
163
+ dateFrom: D,
161
164
  dateTo: a,
162
165
  filterType: "date"
163
166
  });
164
167
  }
165
- const u = Z(o.value, y);
168
+ const u = Z(o.value, b);
166
169
  return u ? {
167
- type: g,
170
+ type: v,
168
171
  dateFrom: u,
169
172
  filterType: "date"
170
173
  } : null;
@@ -179,26 +182,26 @@ const Nt = ({
179
182
  };
180
183
  }, K = X(
181
184
  (e, t) => {
182
- const n = b.getFilterModel(), s = { ...n };
185
+ const n = F.getFilterModel(), s = { ...n };
183
186
  if (l.filter === "agMultiColumnFilter") {
184
187
  if (t === -1) return;
185
- const o = n[c], g = o && o.filterType === "multi" ? [...o.filterModels || []] : Array(l.filterParams?.filters?.length || 1).fill(null);
186
- g[t] = e, g.every((u) => u === null) ? delete s[c] : s[c] = {
188
+ const o = n[c], v = o && o.filterType === "multi" ? [...o.filterModels || []] : Array(l.filterParams?.filters?.length || 1).fill(null);
189
+ v[t] = e, v.every((u) => u === null) ? delete s[c] : s[c] = {
187
190
  filterType: "multi",
188
- filterModels: g
191
+ filterModels: v
189
192
  };
190
193
  } else
191
194
  e ? s[c] = e : delete s[c];
192
- b.setFilterModel(s);
195
+ F.setFilterModel(s);
193
196
  },
194
- [b, c, l]
197
+ [F, c, l]
195
198
  ), me = X(
196
199
  (e) => {
197
- const t = l.filter === "agMultiColumnFilter" ? H(l).date : 0;
200
+ const t = l.filter === "agMultiColumnFilter" ? A(l).date : 0;
198
201
  K(e, t);
199
202
  },
200
203
  [l, K]
201
- ), he = (e) => {
204
+ ), ge = (e) => {
202
205
  const t = e.target.value.replace(/[^0-9/\-!=><+,~]/g, "");
203
206
  if (P({ dateDisplayString: t }), !t.trim()) {
204
207
  me(null);
@@ -207,17 +210,17 @@ const Nt = ({
207
210
  const n = Ee(t);
208
211
  n && me(n);
209
212
  }, Q = () => {
210
- We(), J(""), te && te();
213
+ je(), J(""), te && te();
211
214
  }, W = (e) => {
212
- D(e, "set");
213
- }, E = G || (l?.cellDataType === "boolean" ? [
215
+ M(e, "set");
216
+ }, j = G || (l?.cellDataType === "boolean" ? [
214
217
  { label: i("gridHeader.true"), value: "true" },
215
218
  { label: i("gridHeader.false"), value: "false" }
216
- ] : []), ge = X(() => {
217
- const e = b.getFilterModel()[c];
219
+ ] : []), ve = X(() => {
220
+ const e = F.getFilterModel()[c];
218
221
  if (!e) return [];
219
222
  if ("filterType" in e && e.filterType === "multi" && e.filterModels) {
220
- const n = H(N.getColDef()).set;
223
+ const n = A(f.getColDef()).set;
221
224
  if (n !== -1) {
222
225
  const s = e.filterModels[n];
223
226
  if (s?.filterType === "set" && s.values)
@@ -230,30 +233,30 @@ const Nt = ({
230
233
  return [String(e.filter)];
231
234
  }
232
235
  return [];
233
- }, [b, c, N]), [O, k] = Ue(null), ve = () => {
234
- const e = O !== null ? O : ge();
235
- return F ? E.filter((t) => e.includes(t.value)) : E.find((t) => e.includes(t.value)) || null;
236
- }, ye = (e) => {
236
+ }, [F, c, f]), [E, w] = Ye(null), ye = () => {
237
+ const e = E !== null ? E : ve();
238
+ return C ? j.filter((t) => e.includes(t.value)) : j.find((t) => e.includes(t.value)) || null;
239
+ }, be = (e) => {
237
240
  let t = [];
238
- if (Array.isArray(e) ? t = e.map((n) => n.value) : e && typeof e == "object" && "value" in e && (t = [e.value]), !F) {
241
+ if (Array.isArray(e) ? t = e.map((n) => n.value) : e && typeof e == "object" && "value" in e && (t = [e.value]), !C) {
239
242
  W(t), e && $();
240
243
  return;
241
244
  }
242
- k(t);
245
+ w(t);
243
246
  }, Oe = () => {
244
- W([]), k([]);
247
+ W([]), w([]);
245
248
  }, Re = (e) => {
246
- if (F) {
249
+ if (C) {
247
250
  if (e !== void 0) {
248
251
  let t = [];
249
- Array.isArray(e) ? t = e.map((n) => n.value) : e && typeof e == "object" && "value" in e ? t = [e.value] : e === null && (t = []), W(t), k(null);
252
+ Array.isArray(e) ? t = e.map((n) => n.value) : e && typeof e == "object" && "value" in e ? t = [e.value] : e === null && (t = []), W(t), w(null);
250
253
  return;
251
254
  }
252
- O !== null && (W(O), k(null));
255
+ E !== null && (W(E), w(null));
253
256
  }
254
- }, je = () => {
255
- k(ge()), ne && ne();
256
- }, qe = () => Ae ? /* @__PURE__ */ r(
257
+ }, qe = () => {
258
+ w(ve()), ne && ne();
259
+ }, Ge = () => Ae ? /* @__PURE__ */ r(
257
260
  "svg",
258
261
  {
259
262
  className: "cursor-pointer text-navigation-muted hover:text-brand-variant-hover shrink-0",
@@ -264,57 +267,57 @@ const Nt = ({
264
267
  width: "18",
265
268
  height: "18",
266
269
  onClick: (e) => {
267
- e.stopPropagation(), U.current && U.current.blur(), re ? re(N) : le ? le(c) : oe && oe.openAdvancedFilter(c);
270
+ e.stopPropagation(), U.current && U.current.blur(), re ? re(f) : le ? le(c) : se && se.openAdvancedFilter(c);
268
271
  },
269
272
  children: /* @__PURE__ */ r("path", { d: "M3 17v2h6v-2H3zM3 5v2h10V5H3zm10 16v-2h8v-2h-8v-2h-2v6h2zM7 9v2H3v2h4v2h2V9H7zm14 4v-2H11v2h10zm-6-4h2V7h4V5h-4V3h-2v6z" })
270
273
  }
271
- ) : null, Ge = () => /* @__PURE__ */ r(
274
+ ) : null, Ve = () => /* @__PURE__ */ r(
272
275
  "button",
273
276
  {
274
277
  onClick: $,
275
278
  className: "cursor-pointer shrink-0 text-brand hover:text-brand-strong",
276
- children: /* @__PURE__ */ r(j, { size: "xs" })
279
+ children: /* @__PURE__ */ r(R, { size: "xs" })
277
280
  }
278
- ), M = l.filter === "agMultiColumnFilter", m = H(l);
279
- let h = "text";
280
- M ? h = m.set !== -1 ? "set" : m.date !== -1 ? "date" : "text" : L ? h = "set" : C && (h = "date");
281
- const Ve = M ? m.text !== -1 || m.number !== -1 : !C && !L, xe = M ? m.set !== -1 : L, be = M ? m.date !== -1 : C, Le = b.getFilterModel()[c], Fe = M && Le?.filterModels?.some((e, t) => {
281
+ ), N = l.filter === "agMultiColumnFilter", m = A(l);
282
+ let g = "text";
283
+ N ? g = m.set !== -1 ? "set" : m.date !== -1 ? "date" : "text" : L ? g = "set" : T && (g = "date");
284
+ const Le = N ? m.text !== -1 || m.number !== -1 : !T && !L, xe = N ? m.set !== -1 : L, Fe = N ? m.date !== -1 : T, _e = F.getFilterModel()[c], Ce = N && _e?.filterModels?.some((e, t) => {
282
285
  const n = t === m.text || t === m.number ? "text" : t === m.set ? "set" : "date";
283
- return e !== null && n !== h;
286
+ return e !== null && n !== g;
284
287
  });
285
- return /* @__PURE__ */ v("div", { className: "ag-header-cell-label flex items-center gap-1 w-full bg-brand-tint px-1 py-2 ag-header-cell-search-active h-full", children: [
286
- h === "set" && xe ? /* @__PURE__ */ r(
287
- Pe,
288
+ return /* @__PURE__ */ y("div", { className: "ag-header-cell-label flex w-full min-w-0 items-center justify-between gap-2 bg-brand-tint px-3 py-2 ag-header-cell-search-active h-full", children: [
289
+ g === "set" && xe ? /* @__PURE__ */ r(
290
+ we,
288
291
  {
289
- options: E,
290
- value: ve(),
291
- onChange: ye,
292
- isMulti: F !== void 0 ? F : l?.cellDataType !== "boolean",
292
+ options: j,
293
+ value: ye(),
294
+ onChange: be,
295
+ isMulti: C !== void 0 ? C : l?.cellDataType !== "boolean",
293
296
  placeholder: i("filter.select"),
294
297
  className: "w-full bg-canvas-elevated",
295
298
  parentClassName: "flex-1 min-w-0",
296
- menuWidth: "200px",
299
+ isSearchable: oe,
297
300
  menuPortalTarget: document.body,
298
301
  autoFocus: !0,
299
- onMenuOpen: je,
302
+ onMenuOpen: qe,
300
303
  onMenuClose: Re,
301
304
  onMenuScrollToBottom: He,
302
305
  onInputChange: ze,
303
306
  onClearAll: Oe,
304
307
  isLoading: ae,
305
- onFocus: f,
306
- onBlur: p
308
+ onFocus: p,
309
+ onBlur: h
307
310
  }
308
- ) : h === "date" && be ? I ? /* @__PURE__ */ r(
311
+ ) : g === "date" && Fe ? I ? /* @__PURE__ */ r(
309
312
  q,
310
313
  {
311
314
  value: I,
312
- onChange: he,
315
+ onChange: ge,
313
316
  placeholder: i("filter.search"),
314
317
  className: "w-full bg-canvas-elevated",
315
318
  autoFocus: !0,
316
- onFocus: f,
317
- onBlur: p,
319
+ onFocus: p,
320
+ onBlur: h,
318
321
  suffix: /* @__PURE__ */ r(
319
322
  "button",
320
323
  {
@@ -322,61 +325,61 @@ const Nt = ({
322
325
  e.stopPropagation(), Q();
323
326
  },
324
327
  className: "cursor-pointer text-navigation-muted hover:text-brand-variant-hover",
325
- children: /* @__PURE__ */ r(j, { size: "xs" })
328
+ children: /* @__PURE__ */ r(R, { size: "xs" })
326
329
  }
327
330
  )
328
331
  }
329
- ) : B ? /* @__PURE__ */ r(
330
- Ne,
332
+ ) : z ? /* @__PURE__ */ r(
333
+ Pe,
331
334
  {
332
- value: ce || void 0,
333
- onChange: (e) => pe(e || null),
335
+ value: de || void 0,
336
+ onChange: (e) => he(e || null),
334
337
  placeholder: i("datePicker.selectWeek"),
335
- format: y,
338
+ format: b,
336
339
  minDate: /* @__PURE__ */ new Date("2000-01-01"),
337
340
  maxDate: /* @__PURE__ */ new Date("2100-12-31"),
338
341
  className: "w-full bg-canvas-elevated",
339
342
  showFooter: !1,
340
- ...S
343
+ ...B
341
344
  }
342
- ) : z ? /* @__PURE__ */ r(
343
- Me,
345
+ ) : H ? /* @__PURE__ */ r(
346
+ Ne,
344
347
  {
345
- value: ie || void 0,
346
- onChange: (e) => fe(e || null),
348
+ value: ce || void 0,
349
+ onChange: (e) => pe(e || null),
347
350
  placeholder: i("datePicker.selectMonth"),
348
351
  minDate: /* @__PURE__ */ new Date("2000-01-01"),
349
352
  maxDate: /* @__PURE__ */ new Date("2100-12-31"),
350
353
  className: "w-full bg-canvas-elevated",
351
354
  showFooter: !1,
352
- onFocus: f,
353
- onBlur: p
355
+ onFocus: p,
356
+ onBlur: h
354
357
  }
355
358
  ) : /* @__PURE__ */ r(
356
- De,
359
+ Me,
357
360
  {
358
- value: se || void 0,
359
- onChange: (e) => ue(e || null),
361
+ value: ie || void 0,
362
+ onChange: (e) => fe(e || null),
360
363
  placeholder: i("filter.selectDate"),
361
- format: y,
364
+ format: b,
362
365
  minDate: /* @__PURE__ */ new Date("2000-01-01"),
363
366
  maxDate: /* @__PURE__ */ new Date("2100-12-31"),
364
367
  className: "w-full bg-canvas-elevated",
365
- weekStartsOn: S.weekStartsOn,
366
- onFocus: f,
367
- onBlur: p
368
+ weekStartsOn: B.weekStartsOn,
369
+ onFocus: p,
370
+ onBlur: h
368
371
  }
369
372
  ) : /* @__PURE__ */ r(
370
373
  q,
371
374
  {
372
375
  value: Y,
373
- onChange: de,
376
+ onChange: ue,
374
377
  placeholder: i("filter.search"),
375
378
  type: "text",
376
379
  autoFocus: !0,
377
380
  ref: U,
378
- onFocus: f,
379
- onBlur: p,
381
+ onFocus: p,
382
+ onBlur: h,
380
383
  suffix: Y && /* @__PURE__ */ r(
381
384
  "button",
382
385
  {
@@ -384,14 +387,14 @@ const Nt = ({
384
387
  e.stopPropagation(), Q();
385
388
  },
386
389
  className: "cursor-pointer text-navigation-muted hover:text-brand-variant-hover",
387
- children: /* @__PURE__ */ r(j, { size: "xs" })
390
+ children: /* @__PURE__ */ r(R, { size: "xs" })
388
391
  }
389
392
  )
390
393
  }
391
394
  ),
392
- /* @__PURE__ */ v("div", { className: "flex items-center gap-1.5 shrink-0", children: [
393
- M && /* @__PURE__ */ v(Ke, { children: [
394
- /* @__PURE__ */ r(Qe, { asChild: !0, children: /* @__PURE__ */ v(
395
+ /* @__PURE__ */ y("div", { className: "flex items-center gap-1.5 shrink-0", children: [
396
+ N && /* @__PURE__ */ y(Qe, { children: [
397
+ /* @__PURE__ */ r(Xe, { asChild: !0, children: /* @__PURE__ */ y(
395
398
  "button",
396
399
  {
397
400
  type: "button",
@@ -399,63 +402,64 @@ const Nt = ({
399
402
  className: "relative group p-1 hover:bg-brand-tint rounded-md transition-colors cursor-pointer bg-transparent border-none",
400
403
  children: [
401
404
  /* @__PURE__ */ r(
402
- Ye,
405
+ Je,
403
406
  {
404
407
  size: "md",
405
- className: Je(
408
+ className: Ke(
406
409
  "text-content-tertiary group-hover:text-brand-variant-hover",
407
- Fe && "text-brand-variant-hover"
410
+ Ce && "text-brand-variant-hover"
408
411
  )
409
412
  }
410
413
  ),
411
- Fe && /* @__PURE__ */ r("span", { className: "absolute top-0.5 right-0.5 w-2 h-2 rounded-full bg-brand border border-white shadow-sm" })
414
+ Ce && /* @__PURE__ */ r("span", { className: "absolute top-0.5 right-0.5 w-2 h-2 rounded-full bg-brand border border-white shadow-sm" })
412
415
  ]
413
416
  }
414
417
  ) }),
415
- /* @__PURE__ */ v(Xe, { align: "end", className: "w-[300px]", children: [
416
- /* @__PURE__ */ r(Ze, { children: /* @__PURE__ */ r($e, { children: i("gridHeader.activeFilters") }) }),
417
- /* @__PURE__ */ v(et, { className: "flex flex-col gap-4", children: [
418
- h !== "text" && Ve && /* @__PURE__ */ v("div", { className: "flex flex-col gap-1.5", children: [
418
+ /* @__PURE__ */ y(Ze, { align: "end", className: "w-[300px]", children: [
419
+ /* @__PURE__ */ r($e, { children: /* @__PURE__ */ r(et, { children: i("gridHeader.activeFilters") }) }),
420
+ /* @__PURE__ */ y(tt, { className: "flex flex-col gap-4", children: [
421
+ g !== "text" && Le && /* @__PURE__ */ y("div", { className: "flex flex-col gap-1.5", children: [
419
422
  /* @__PURE__ */ r("span", { className: "text-xs font-semibold text-content-tertiary", children: i("gridHeader.textSearch") }),
420
423
  /* @__PURE__ */ r(
421
424
  q,
422
425
  {
423
426
  value: Y,
424
- onChange: de,
427
+ onChange: ue,
425
428
  placeholder: i("filter.searchPlaceholder"),
426
429
  className: "bg-canvas-elevated",
427
- onFocus: f,
428
- onBlur: p
430
+ onFocus: p,
431
+ onBlur: h
429
432
  }
430
433
  )
431
434
  ] }),
432
- h !== "set" && xe && /* @__PURE__ */ v("div", { className: "flex flex-col gap-1.5", children: [
435
+ g !== "set" && xe && /* @__PURE__ */ y("div", { className: "flex flex-col gap-1.5", children: [
433
436
  /* @__PURE__ */ r("span", { className: "text-xs font-semibold text-content-tertiary", children: i("gridHeader.selectionFilter") }),
434
437
  /* @__PURE__ */ r(
435
- Pe,
438
+ we,
436
439
  {
437
- options: E,
438
- value: ve(),
439
- onChange: ye,
440
- isMulti: F !== void 0 ? F : l?.cellDataType !== "boolean",
440
+ options: j,
441
+ value: ye(),
442
+ onChange: be,
443
+ isMulti: C !== void 0 ? C : l?.cellDataType !== "boolean",
441
444
  placeholder: i("filter.select"),
442
445
  className: "w-full bg-canvas-elevated",
446
+ isSearchable: oe,
443
447
  isLoading: ae,
444
- onFocus: f,
445
- onBlur: p
448
+ onFocus: p,
449
+ onBlur: h
446
450
  }
447
451
  )
448
452
  ] }),
449
- h !== "date" && be && /* @__PURE__ */ v("div", { className: "flex flex-col gap-1.5", children: [
453
+ g !== "date" && Fe && /* @__PURE__ */ y("div", { className: "flex flex-col gap-1.5", children: [
450
454
  /* @__PURE__ */ r("span", { className: "text-xs font-semibold text-content-tertiary", children: i("gridHeader.dateFilter") }),
451
455
  I ? /* @__PURE__ */ r(
452
456
  q,
453
457
  {
454
458
  value: I,
455
- onChange: he,
459
+ onChange: ge,
456
460
  className: "w-full bg-canvas-elevated",
457
- onFocus: f,
458
- onBlur: p,
461
+ onFocus: p,
462
+ onBlur: h,
459
463
  suffix: /* @__PURE__ */ r(
460
464
  "button",
461
465
  {
@@ -463,51 +467,51 @@ const Nt = ({
463
467
  e.stopPropagation(), Q();
464
468
  },
465
469
  className: "cursor-pointer text-navigation-muted hover:text-brand-variant-hover",
466
- children: /* @__PURE__ */ r(j, { size: "xs" })
470
+ children: /* @__PURE__ */ r(R, { size: "xs" })
467
471
  }
468
472
  )
469
473
  }
470
- ) : B ? /* @__PURE__ */ r(
474
+ ) : z ? /* @__PURE__ */ r(
475
+ Pe,
476
+ {
477
+ value: de || void 0,
478
+ onChange: (e) => he(e || null),
479
+ format: b,
480
+ className: "w-full bg-canvas-elevated",
481
+ showFooter: !1,
482
+ ...B
483
+ }
484
+ ) : H ? /* @__PURE__ */ r(
471
485
  Ne,
472
486
  {
473
487
  value: ce || void 0,
474
488
  onChange: (e) => pe(e || null),
475
- format: y,
476
489
  className: "w-full bg-canvas-elevated",
477
490
  showFooter: !1,
478
- ...S
491
+ onFocus: p,
492
+ onBlur: h
479
493
  }
480
- ) : z ? /* @__PURE__ */ r(
494
+ ) : /* @__PURE__ */ r(
481
495
  Me,
482
496
  {
483
497
  value: ie || void 0,
484
498
  onChange: (e) => fe(e || null),
499
+ format: b,
485
500
  className: "w-full bg-canvas-elevated",
486
- showFooter: !1,
487
- onFocus: f,
488
- onBlur: p
489
- }
490
- ) : /* @__PURE__ */ r(
491
- De,
492
- {
493
- value: se || void 0,
494
- onChange: (e) => ue(e || null),
495
- format: y,
496
- className: "w-full bg-canvas-elevated",
497
- weekStartsOn: S.weekStartsOn,
498
- onFocus: f,
499
- onBlur: p
501
+ weekStartsOn: B.weekStartsOn,
502
+ onFocus: p,
503
+ onBlur: h
500
504
  }
501
505
  )
502
506
  ] })
503
507
  ] })
504
508
  ] })
505
509
  ] }),
506
- qe(),
507
- Ge()
510
+ Ge(),
511
+ Ve()
508
512
  ] })
509
513
  ] });
510
514
  };
511
515
  export {
512
- Nt as HeaderSearchInput
516
+ wt as HeaderSearchInput
513
517
  };