@inkeep/cxkit-primitives 0.5.115 → 0.5.116

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.
@@ -1,19 +1,19 @@
1
1
  "use client";
2
2
  import { jsx as r } from "react/jsx-runtime";
3
3
  import { ikp as t } from "./factory.js";
4
- import { forwardRef as p, useRef as v, useEffect as P } from "react";
4
+ import { forwardRef as b, useRef as v, useEffect as P } from "react";
5
5
  import x from "react-textarea-autosize";
6
- import { Trigger as A, Icon as V, Content as L, Viewport as H, Item as E, ItemText as D, ItemIndicator as N, Root as q, Value as M } from "../atoms/select.js";
6
+ import { Trigger as A, Icon as V, Content as L, Viewport as H, Item as D, ItemText as E, ItemIndicator as N, Root as q, Value as M } from "../atoms/select.js";
7
7
  import { ComboboxRoot as z, ComboboxControl as O, ComboboxInput as U, ComboboxTrigger as j, ComboboxPositioner as Q, ComboboxContent as W, ComboboxItem as $, ComboboxItemText as G, ComboboxSelectedTags as J, ComboboxItemIndicator as K } from "../atoms/combobox.js";
8
- import { useComboboxItems as ut } from "../atoms/combobox.js";
8
+ import { useComboboxItems as gt } from "../atoms/combobox.js";
9
9
  import * as y from "@radix-ui/react-checkbox";
10
10
  import { useIntelligentForm as m } from "./intelligent-form/intelligent-form-provider.js";
11
- import { IntelligentFormProvider as gt } from "./intelligent-form/intelligent-form-provider.js";
12
- import * as b from "@radix-ui/react-scroll-area";
13
- import { BuiltInIconRenderer as _ } from "../atoms/icons/built-in-icon-renderer.js";
14
- import { maybeRender as h, dataAttr as F } from "../utils/misc.js";
11
+ import { IntelligentFormProvider as St } from "./intelligent-form/intelligent-form-provider.js";
12
+ import * as S from "@radix-ui/react-scroll-area";
13
+ import { BuiltInIconRenderer as g } from "../atoms/icons/built-in-icon-renderer.js";
14
+ import { maybeRender as f, dataAttr as F } from "../utils/misc.js";
15
15
  import { Controller as X } from "react-hook-form";
16
- import { IntelligentFormFieldProvider as Y, useIntelligentFormField as g } from "../providers/intelligent-form-field-provider.js";
16
+ import { IntelligentFormFieldProvider as Y, useIntelligentFormField as u } from "../providers/intelligent-form-field-provider.js";
17
17
  import { CheckboxIcon as Z } from "../atoms/icons/checkbox-icon.js";
18
18
  import { useInkeepConfig as w } from "../providers/config-provider.js";
19
19
  import { SourceItemProvider as ee, useSourceItem as T } from "../providers/source-item-provider.js";
@@ -25,19 +25,19 @@ import { transformInkeepSource as oe } from "../utils/transform-source/index.js"
25
25
  import { useShadow as ne } from "../atoms/shadow/context.js";
26
26
  const re = t("form", {
27
27
  _id: "intelligentForm__Root"
28
- }), ti = (i) => {
28
+ }), oi = (i) => {
29
29
  const { onSubmit: e, ...o } = i, { handleSubmit: n } = m();
30
30
  return /* @__PURE__ */ r(re, { onSubmit: a(e, n), ...o });
31
- }, oi = t("h2", {
31
+ }, ni = t("h2", {
32
32
  _id: "intelligentForm__Heading",
33
33
  children: "Contact Support"
34
- }), ni = t("div", {
34
+ }), ri = t("div", {
35
35
  _id: "intelligentForm__Content"
36
- }), ri = t(b.Root, {
36
+ }), li = t(S.Root, {
37
37
  _id: "intelligentForm__Content__ScrollArea"
38
- }), le = t(b.Viewport, {
38
+ }), le = t(S.Viewport, {
39
39
  _id: "intelligentForm__Content__ScrollAreaViewport"
40
- }), li = (i) => {
40
+ }), mi = (i) => {
41
41
  const { children: e, ...o } = i;
42
42
  return /* @__PURE__ */ r(
43
43
  le,
@@ -49,26 +49,26 @@ const re = t("form", {
49
49
  ...o
50
50
  }
51
51
  );
52
- }, mi = t(
53
- b.ScrollAreaScrollbar,
52
+ }, si = t(
53
+ S.ScrollAreaScrollbar,
54
54
  {
55
55
  _id: "intelligentForm__Content__ScrollAreaScrollbar"
56
56
  }
57
- ), si = t(
58
- b.ScrollAreaThumb,
57
+ ), ci = t(
58
+ S.ScrollAreaThumb,
59
59
  {
60
60
  _id: "intelligentForm__Content__ScrollAreaThumb"
61
61
  }
62
- ), ci = t(b.Corner, {
62
+ ), di = t(S.Corner, {
63
63
  _id: "intelligentForm__Content__ScrollAreaCorner"
64
64
  }), me = t("div", {
65
65
  _id: "intelligentForm__Success"
66
- }), di = (i) => {
66
+ }), ai = (i) => {
67
67
  const { children: e, ...o } = i, { isSubmitSuccessful: n } = m();
68
68
  return n ? /* @__PURE__ */ r(me, { ...o, children: e }) : null;
69
- }, se = t(_, {
69
+ }, se = t(g, {
70
70
  _id: "intelligentForm__SuccessIcon"
71
- }), ai = (i) => {
71
+ }), Fi = (i) => {
72
72
  const {
73
73
  formSettings: { successView: e }
74
74
  } = m();
@@ -81,25 +81,25 @@ const re = t("form", {
81
81
  );
82
82
  }, ce = t("h2", {
83
83
  _id: "intelligentForm__SuccessHeading"
84
- }), Fi = (i) => {
84
+ }), ui = (i) => {
85
85
  const {
86
86
  formSettings: { successView: e }
87
87
  } = m();
88
88
  return /* @__PURE__ */ r(ce, { children: e.heading, ...i });
89
89
  }, de = t("p", {
90
90
  _id: "intelligentForm__SuccessMessage"
91
- }), ui = (i) => {
91
+ }), _i = (i) => {
92
92
  const {
93
93
  formSettings: { successView: e }
94
94
  } = m();
95
95
  return /* @__PURE__ */ r(de, { children: e.message, ...i });
96
- }, _i = t("div", {
96
+ }, gi = t("div", {
97
97
  _id: "intelligentForm__PrimaryForm"
98
98
  }), ae = t("div", {
99
99
  _id: "intelligentForm__PrimaryFormFields"
100
100
  }), Fe = t("p", {
101
101
  _id: "intelligentForm__PrimaryForm__Description"
102
- }), gi = (i) => {
102
+ }), pi = (i) => {
103
103
  const {
104
104
  formSettings: { primary: e }
105
105
  } = m();
@@ -108,7 +108,7 @@ const re = t("form", {
108
108
  const { children: e, ...o } = i, {
109
109
  formSettings: { primary: n }
110
110
  } = m();
111
- return /* @__PURE__ */ r(ae, { children: h(e, n.fields), ...o });
111
+ return /* @__PURE__ */ r(ae, { children: f(e, n.fields), ...o });
112
112
  }, ue = t("button", {
113
113
  _id: "intelligentForm__PrimaryFormSubmit",
114
114
  type: "button",
@@ -125,7 +125,7 @@ const re = t("form", {
125
125
  );
126
126
  }, _e = t("div", {
127
127
  _id: "intelligentForm__Field"
128
- }), pi = (i) => {
128
+ }), Ci = (i) => {
129
129
  const { field: e, autoFocus: o, ...n } = i, { control: l, errors: s } = m();
130
130
  return /* @__PURE__ */ r(
131
131
  X,
@@ -159,8 +159,8 @@ const re = t("form", {
159
159
  );
160
160
  }, ge = t("label", {
161
161
  _id: "intelligentForm__FieldLabel"
162
- }), Ci = (i) => {
163
- const { field: e } = g();
162
+ }), Ii = (i) => {
163
+ const { field: e } = u();
164
164
  return /* @__PURE__ */ r(
165
165
  ge,
166
166
  {
@@ -170,10 +170,10 @@ const re = t("form", {
170
170
  ...i
171
171
  }
172
172
  );
173
- }, Se = t("input", {
173
+ }, pe = t("input", {
174
174
  _id: "intelligentForm__FieldText",
175
175
  type: "text"
176
- }), R = p((i, e) => {
176
+ }), R = b((i, e) => {
177
177
  const {
178
178
  field: o,
179
179
  error: n,
@@ -183,18 +183,18 @@ const re = t("form", {
183
183
  ref: c,
184
184
  ...d
185
185
  },
186
- autoFocus: S
187
- } = g(), u = C(
186
+ autoFocus: p
187
+ } = u(), _ = C(
188
188
  e,
189
189
  c
190
190
  );
191
191
  return /* @__PURE__ */ r(
192
- Se,
192
+ pe,
193
193
  {
194
194
  asChild: o.inputType === "textarea",
195
- ref: u,
195
+ ref: _,
196
196
  id: o.name,
197
- autoFocus: S,
197
+ autoFocus: p,
198
198
  placeholder: "placeholder" in o ? o.placeholder : void 0,
199
199
  "data-invalid": F(!!n),
200
200
  onChange: a(i.onChange, l),
@@ -204,37 +204,37 @@ const re = t("form", {
204
204
  children: o.inputType === "textarea" ? /* @__PURE__ */ r(x, { minRows: 3, maxRows: 10 }) : null
205
205
  }
206
206
  );
207
- }), Ii = t(R, {
207
+ }), vi = t(R, {
208
208
  _id: "intelligentForm__FieldEmail",
209
209
  type: "email"
210
- }), be = t("input", {
210
+ }), Se = t("input", {
211
211
  _id: "intelligentForm__FieldFile",
212
212
  type: "file",
213
213
  multiple: !0
214
- }), vi = (i) => {
214
+ }), Pi = (i) => {
215
215
  const {
216
216
  field: e,
217
217
  error: o,
218
218
  fieldProps: { value: n, onChange: l, onBlur: s, ...c },
219
219
  autoFocus: d
220
- } = g(), { onChange: S, onBlur: u, ...f } = i, I = (k) => {
220
+ } = u(), { onChange: p, onBlur: _, ...h } = i, I = (k) => {
221
221
  const B = k.target.files;
222
222
  l(B);
223
223
  };
224
224
  return /* @__PURE__ */ r(
225
- be,
225
+ Se,
226
226
  {
227
227
  id: e.name,
228
228
  autoFocus: d,
229
229
  "data-value": n,
230
230
  "data-invalid": F(!!o),
231
- ...f,
231
+ ...h,
232
232
  ...c,
233
- onChange: a(S, I),
234
- onBlur: a(u, s)
233
+ onChange: a(p, I),
234
+ onBlur: a(_, s)
235
235
  }
236
236
  );
237
- }, Pi = t(
237
+ }, fi = t(
238
238
  R,
239
239
  {
240
240
  _id: "intelligentForm__FieldTextArea",
@@ -242,12 +242,12 @@ const re = t("form", {
242
242
  asChild: !0,
243
243
  children: /* @__PURE__ */ r(x, { rows: 1, maxRows: 8 })
244
244
  }
245
- ), pe = t(y.Root, {
245
+ ), be = t(y.Root, {
246
246
  _id: "intelligentForm__FieldCheckbox"
247
247
  }), hi = (i) => {
248
- const { field: e, error: o, fieldProps: n, autoFocus: l } = g(), { onCheckedChange: s, ...c } = i;
248
+ const { field: e, error: o, fieldProps: n, autoFocus: l } = u(), { onCheckedChange: s, ...c } = i;
249
249
  return /* @__PURE__ */ r(
250
- pe,
250
+ be,
251
251
  {
252
252
  id: e.name,
253
253
  name: e.name,
@@ -258,13 +258,13 @@ const re = t("form", {
258
258
  ...c
259
259
  }
260
260
  );
261
- }, fi = t(y.Indicator, {
261
+ }, xi = t(y.Indicator, {
262
262
  _id: "intelligentForm__FieldCheckboxIndicator",
263
263
  children: /* @__PURE__ */ r(Z, {})
264
264
  }), Ce = t(q, {
265
265
  _id: "intelligentForm__FieldSelect"
266
- }), xi = (i) => {
267
- const { field: e, error: o, fieldProps: n } = g(), { onValueChange: l, ...s } = i;
266
+ }), yi = (i) => {
267
+ const { field: e, error: o, fieldProps: n } = u(), { onValueChange: l, ...s } = i;
268
268
  return /* @__PURE__ */ r(
269
269
  Ce,
270
270
  {
@@ -275,12 +275,12 @@ const re = t("form", {
275
275
  ...s
276
276
  }
277
277
  );
278
- }, yi = t(A, {
278
+ }, wi = t(A, {
279
279
  _id: "intelligentForm__FieldSelect__Trigger"
280
280
  }), Ie = t(M, {
281
281
  _id: "intelligentForm__FieldSelect__Value"
282
- }), wi = (i) => {
283
- const { field: e } = g();
282
+ }), Ti = (i) => {
283
+ const { field: e } = u();
284
284
  return /* @__PURE__ */ r(
285
285
  Ie,
286
286
  {
@@ -288,34 +288,34 @@ const re = t("form", {
288
288
  ...i
289
289
  }
290
290
  );
291
- }, Ti = t(V, {
291
+ }, Ri = t(V, {
292
292
  _id: "intelligentForm__FieldSelect__Icon",
293
293
  asChild: !0,
294
- children: /* @__PURE__ */ r(_, { iconSettings: { builtIn: "LuChevronDown" } })
295
- }), Ri = t(L, {
294
+ children: /* @__PURE__ */ r(g, { iconSettings: { builtIn: "LuChevronDown" } })
295
+ }), ki = t(L, {
296
296
  _id: "intelligentForm__FieldSelect__Content",
297
297
  position: "popper"
298
- }), ki = t(H, {
298
+ }), Bi = t(H, {
299
299
  _id: "intelligentForm__FieldSelect__Viewport"
300
- }), Bi = t(E, {
301
- _id: "intelligentForm__FieldSelect__Item"
302
300
  }), Ai = t(D, {
301
+ _id: "intelligentForm__FieldSelect__Item"
302
+ }), Vi = t(E, {
303
303
  _id: "intelligentForm__FieldSelect__ItemText"
304
- }), Vi = t(
304
+ }), Li = t(
305
305
  N,
306
306
  {
307
307
  _id: "intelligentForm__FieldSelect__ItemIndicator",
308
308
  asChild: !0,
309
- children: /* @__PURE__ */ r(_, { iconSettings: { builtIn: "LuCheck" } })
309
+ children: /* @__PURE__ */ r(g, { iconSettings: { builtIn: "LuCheck" } })
310
310
  }
311
- ), Li = (i) => {
312
- const { field: e, error: o, fieldProps: n, autoFocus: l } = g(), s = ne();
311
+ ), Hi = (i) => {
312
+ const { field: e, error: o, fieldProps: n, autoFocus: l } = u(), s = ne();
313
313
  if (e.inputType !== "combobox") return null;
314
- const { onValueChange: c, children: d, ...S } = i, u = s?.shadowHost ? () => s.shadowHost.shadowRoot ?? document : void 0;
314
+ const { onValueChange: c, children: d, ...p } = i, _ = s?.shadowHost ? () => s.shadowHost.shadowRoot ?? document : void 0;
315
315
  return /* @__PURE__ */ r(
316
316
  z,
317
317
  {
318
- ...S,
318
+ ...p,
319
319
  id: e.name,
320
320
  name: e.name,
321
321
  items: e.items ?? [],
@@ -325,50 +325,55 @@ const re = t("form", {
325
325
  placeholder: "placeholder" in e ? e.placeholder : void 0,
326
326
  invalid: !!o,
327
327
  autoFocus: l,
328
- getRootNode: u,
328
+ getRootNode: _,
329
329
  children: d
330
330
  }
331
331
  );
332
- }, Hi = t(O, {
332
+ }, Di = t(O, {
333
333
  _id: "intelligentForm__FieldCombobox__Control"
334
334
  }), Ei = t(U, {
335
335
  _id: "intelligentForm__FieldCombobox__Input"
336
- }), Di = t(j, {
336
+ }), Ni = t(j, {
337
337
  _id: "intelligentForm__FieldCombobox__Trigger",
338
- children: /* @__PURE__ */ r(_, { iconSettings: { builtIn: "LuChevronDown" } })
339
- }), Ni = t(Q, {
338
+ children: /* @__PURE__ */ r(g, { iconSettings: { builtIn: "LuChevronDown" } })
339
+ }), qi = t(Q, {
340
340
  _id: "intelligentForm__FieldCombobox__Positioner"
341
- }), qi = t(W, {
341
+ }), Mi = t(W, {
342
342
  _id: "intelligentForm__FieldCombobox__Content"
343
- }), Mi = t($, {
343
+ }), zi = t($, {
344
344
  _id: "intelligentForm__FieldCombobox__Item"
345
- }), zi = t(G, {
345
+ }), Oi = t(G, {
346
346
  _id: "intelligentForm__FieldCombobox__ItemText"
347
- }), Oi = t(J, {
347
+ }), Ui = t(J, {
348
348
  _id: "intelligentForm__FieldCombobox__SelectedTags"
349
- }), Ui = t(K, {
349
+ }), ji = t(K, {
350
350
  _id: "intelligentForm__FieldCombobox__ItemIndicator",
351
- children: /* @__PURE__ */ r(_, { iconSettings: { builtIn: "LuCheck" } })
352
- }), ve = t("span", {
351
+ children: /* @__PURE__ */ r(g, { iconSettings: { builtIn: "LuCheck" } })
352
+ }), ve = t("p", {
353
+ _id: "intelligentForm__FieldDescription"
354
+ }), Qi = (i) => {
355
+ const { field: e } = u();
356
+ return e.description ? /* @__PURE__ */ r(ve, { children: e.description, ...i }) : null;
357
+ }, Pe = t("span", {
353
358
  _id: "intelligentForm__FieldError"
354
- }), ji = (i) => {
355
- const { error: e } = g();
356
- return e ? /* @__PURE__ */ r(ve, { children: e.message?.toString(), ...i }) : null;
357
- }, Qi = t("div", {
359
+ }), Wi = (i) => {
360
+ const { error: e } = u();
361
+ return e ? /* @__PURE__ */ r(Pe, { children: e.message?.toString(), ...i }) : null;
362
+ }, $i = t("div", {
358
363
  _id: "intelligentForm__BotHeading"
359
- }), Wi = t(_, {
364
+ }), Gi = t(g, {
360
365
  _id: "intelligentForm__BotHeading__Icon",
361
366
  iconSettings: { builtIn: "LuSparkles" }
362
- }), Pe = t("div", {
367
+ }), fe = t("div", {
363
368
  _id: "intelligentForm__BotHeading__Name"
364
- }), $i = (i) => {
369
+ }), Ji = (i) => {
365
370
  const { baseSettings: e } = w(), { organizationDisplayName: o } = e ?? {}, {
366
371
  formSettings: { aiAssistantName: n }
367
372
  } = m();
368
- return /* @__PURE__ */ r(Pe, { children: n ?? o, ...i });
373
+ return /* @__PURE__ */ r(fe, { children: n ?? o, ...i });
369
374
  }, he = t("div", {
370
375
  _id: "intelligentForm__Loading"
371
- }), Gi = p(({ ...i }, e) => {
376
+ }), Ki = b(({ ...i }, e) => {
372
377
  const { loading: o } = m(), n = v(null), l = C(e, n);
373
378
  return P(() => {
374
379
  o && n.current && n.current.scrollIntoView({
@@ -377,9 +382,9 @@ const re = t("form", {
377
382
  inline: "nearest"
378
383
  });
379
384
  }, [o]), o ? /* @__PURE__ */ r(he, { ref: l, ...i }) : null;
380
- }), fe = t("div", {
385
+ }), xe = t("div", {
381
386
  _id: "intelligentForm__ConfidentResponse"
382
- }), Ji = p(({ ...i }, e) => {
387
+ }), Xi = b(({ ...i }, e) => {
383
388
  const { aiResponse: o, loading: n } = m(), l = v(null), s = C(e, l);
384
389
  return P(() => {
385
390
  !n && o.answerConfidence && l.current && l.current.scrollIntoView({
@@ -387,36 +392,36 @@ const re = t("form", {
387
392
  block: "nearest",
388
393
  inline: "nearest"
389
394
  });
390
- }, [n, o.answerConfidence]), o.answerConfidence ? /* @__PURE__ */ r(fe, { ref: s, ...i }) : null;
391
- }), xe = t(te, {
395
+ }, [n, o.answerConfidence]), o.answerConfidence ? /* @__PURE__ */ r(xe, { ref: s, ...i }) : null;
396
+ }), ye = t(te, {
392
397
  _id: "intelligentForm__ConfidentAnswer"
393
- }), Ki = (i) => {
398
+ }), Yi = (i) => {
394
399
  const { aiResponse: e } = m();
395
- return /* @__PURE__ */ r(xe, { shouldOpenLinksInNewTab: !0, children: e.answer, ...i });
396
- }, ye = t("button", {
400
+ return /* @__PURE__ */ r(ye, { shouldOpenLinksInNewTab: !0, children: e.answer, ...i });
401
+ }, we = t("button", {
397
402
  _id: "intelligentForm__ConfidentResponseButton",
398
403
  type: "button"
399
- }), Xi = (i) => {
404
+ }), Zi = (i) => {
400
405
  const { onClick: e, ...o } = i, { showSecondaryFields: n, setShowSecondaryFields: l } = m(), s = () => {
401
406
  l(!0);
402
407
  };
403
408
  return /* @__PURE__ */ r(
404
- ye,
409
+ we,
405
410
  {
406
411
  "data-escalated": F(n),
407
412
  onClick: a(e, s),
408
413
  ...o
409
414
  }
410
415
  );
411
- }, Yi = t(_, {
416
+ }, et = t(g, {
412
417
  _id: "intelligentForm__ConfidentResponseButton__Icon",
413
418
  iconSettings: { builtIn: "LuUser" }
414
- }), Zi = t("span", {
419
+ }), it = t("span", {
415
420
  _id: "intelligentForm__ConfidentResponseButton__Label",
416
421
  children: "Escalate to human"
417
- }), we = t("div", {
422
+ }), Te = t("div", {
418
423
  _id: "intelligentForm__SecondaryForm"
419
- }), et = p(({ ...i }, e) => {
424
+ }), tt = b(({ ...i }, e) => {
420
425
  const { showSecondaryFields: o } = m(), n = v(null), l = C(e, n);
421
426
  return P(() => {
422
427
  o && n.current && n.current.scrollIntoView({
@@ -424,10 +429,10 @@ const re = t("form", {
424
429
  block: "nearest",
425
430
  inline: "nearest"
426
431
  });
427
- }, [o]), o ? /* @__PURE__ */ r(we, { ref: l, ...i }) : null;
428
- }), Te = t("p", {
432
+ }, [o]), o ? /* @__PURE__ */ r(Te, { ref: l, ...i }) : null;
433
+ }), Re = t("p", {
429
434
  _id: "intelligentForm__SecondaryForm__Description"
430
- }), it = (i) => {
435
+ }), ot = (i) => {
431
436
  const {
432
437
  formSettings: { secondary: e },
433
438
  aiResponse: { answerConfidence: o }
@@ -437,54 +442,54 @@ const re = t("form", {
437
442
  // If description is an object, use the confident description if the answer is confident
438
443
  o ? e.description.confident : e.description.default
439
444
  );
440
- return /* @__PURE__ */ r(Te, { children: n, ...i });
441
- }, Re = t("div", {
445
+ return /* @__PURE__ */ r(Re, { children: n, ...i });
446
+ }, ke = t("div", {
442
447
  _id: "intelligentForm__SecondaryFormFields"
443
- }), tt = (i) => {
448
+ }), nt = (i) => {
444
449
  const { children: e, ...o } = i, {
445
450
  formSettings: { secondary: n }
446
451
  } = m();
447
- return /* @__PURE__ */ r(Re, { children: h(e, n.fields), ...o });
448
- }, ke = t("button", {
452
+ return /* @__PURE__ */ r(ke, { children: f(e, n.fields), ...o });
453
+ }, Be = t("button", {
449
454
  _id: "intelligentForm__SecondaryFormSubmit",
450
455
  type: "submit",
451
456
  children: "Submit"
452
- }), ot = (i) => {
457
+ }), rt = (i) => {
453
458
  const { formSettings: e, isSubmitting: o } = m(), { label: n } = e.buttons.submit;
454
- return /* @__PURE__ */ r(ke, { disabled: o, children: n ?? "Submit", ...i });
455
- }, Be = t("span", {
459
+ return /* @__PURE__ */ r(Be, { disabled: o, children: n ?? "Submit", ...i });
460
+ }, Ae = t("span", {
456
461
  _id: "intelligentForm__Error"
457
- }), nt = (i) => {
462
+ }), lt = (i) => {
458
463
  const { formError: e } = m();
459
- return e ? /* @__PURE__ */ r(Be, { children: e.message, ...i }) : null;
460
- }, rt = t("div", {
464
+ return e ? /* @__PURE__ */ r(Ae, { children: e.message, ...i }) : null;
465
+ }, mt = t("div", {
461
466
  _id: "intelligentForm__Sources"
462
- }), lt = t("p", {
467
+ }), st = t("p", {
463
468
  _id: "intelligentForm__SourcesCaption",
464
469
  children: "Here are the sources I considered:"
465
- }), Ae = t("div", {
470
+ }), Ve = t("div", {
466
471
  _id: "intelligentForm__SourcesList"
467
- }), mt = (i) => {
472
+ }), ct = (i) => {
468
473
  const { children: e, ...o } = i, {
469
474
  baseSettings: { transformSource: n, organizationDisplayName: l }
470
475
  } = w(), {
471
476
  aiResponse: { recordsConsidered: s }
472
477
  } = m();
473
478
  if (!s) return null;
474
- const c = s.reduce((d, S) => {
475
- const u = oe(S, "intelligentFormSource", {
479
+ const c = s.reduce((d, p) => {
480
+ const _ = oe(p, "intelligentFormSource", {
476
481
  organizationDisplayName: l,
477
482
  transformSource: n
478
483
  });
479
- return d.some((I) => I.url === u.url) || d.push(u), d;
484
+ return d.some((I) => I.url === _.url) || d.push(_), d;
480
485
  }, []);
481
- return /* @__PURE__ */ r(Ae, { children: h(e, c), ...o });
482
- }, Ve = t(ie, {
486
+ return /* @__PURE__ */ r(Ve, { children: f(e, c), ...o });
487
+ }, Le = t(ie, {
483
488
  _id: "intelligentForm__Source"
484
- }), st = (i) => {
489
+ }), dt = (i) => {
485
490
  const { source: e, ...o } = i;
486
491
  return /* @__PURE__ */ r(ee, { source: { ...e, isExternal: !!e.shouldOpenInNewTab }, children: /* @__PURE__ */ r(
487
- Ve,
492
+ Le,
488
493
  {
489
494
  "data-type": e.type,
490
495
  appendToUrl: e.appendToUrl,
@@ -493,146 +498,148 @@ const re = t("form", {
493
498
  ...o
494
499
  }
495
500
  ) });
496
- }, Le = t(_, {
501
+ }, He = t(g, {
497
502
  _id: "intelligentForm__SourceIcon"
498
- }), ct = (i) => {
503
+ }), at = (i) => {
499
504
  const { source: e } = T();
500
- return /* @__PURE__ */ r(Le, { iconSettings: e.icon, "data-type": e.type, ...i });
501
- }, He = t("span", {
505
+ return /* @__PURE__ */ r(He, { iconSettings: e.icon, "data-type": e.type, ...i });
506
+ }, De = t("span", {
502
507
  _id: "intelligentForm__SourceTitle"
503
- }), dt = (i) => {
508
+ }), Ft = (i) => {
504
509
  const { source: e } = T();
505
- return /* @__PURE__ */ r(He, { "data-type": e.type, children: e.title, ...i });
510
+ return /* @__PURE__ */ r(De, { "data-type": e.type, children: e.title, ...i });
506
511
  };
507
512
  export {
508
- Qi as BotHeading,
509
- Wi as BotHeadingIcon,
510
- $i as BotHeadingName,
511
- Ki as ConfidentAnswer,
512
- Ji as ConfidentResponse,
513
- Xi as ConfidentResponseButton,
514
- Yi as ConfidentResponseButtonIcon,
515
- Zi as ConfidentResponseButtonLabel,
516
- ni as Content,
517
- ri as ContentScrollArea,
518
- ci as ContentScrollAreaCorner,
519
- mi as ContentScrollAreaScrollbar,
520
- si as ContentScrollAreaThumb,
521
- li as ContentScrollAreaViewport,
522
- nt as Error,
523
- pi as FormField,
513
+ $i as BotHeading,
514
+ Gi as BotHeadingIcon,
515
+ Ji as BotHeadingName,
516
+ Yi as ConfidentAnswer,
517
+ Xi as ConfidentResponse,
518
+ Zi as ConfidentResponseButton,
519
+ et as ConfidentResponseButtonIcon,
520
+ it as ConfidentResponseButtonLabel,
521
+ ri as Content,
522
+ li as ContentScrollArea,
523
+ di as ContentScrollAreaCorner,
524
+ si as ContentScrollAreaScrollbar,
525
+ ci as ContentScrollAreaThumb,
526
+ mi as ContentScrollAreaViewport,
527
+ lt as Error,
528
+ Ci as FormField,
524
529
  hi as FormFieldCheckbox,
525
- fi as FormFieldCheckboxIndicator,
526
- Li as FormFieldCombobox,
527
- qi as FormFieldComboboxContent,
528
- Hi as FormFieldComboboxControl,
530
+ xi as FormFieldCheckboxIndicator,
531
+ Hi as FormFieldCombobox,
532
+ Mi as FormFieldComboboxContent,
533
+ Di as FormFieldComboboxControl,
529
534
  Ei as FormFieldComboboxInput,
530
- Mi as FormFieldComboboxItem,
531
- Ui as FormFieldComboboxItemIndicator,
532
- zi as FormFieldComboboxItemText,
533
- Ni as FormFieldComboboxPositioner,
534
- Oi as FormFieldComboboxSelectedTags,
535
- Di as FormFieldComboboxTrigger,
536
- Ii as FormFieldEmail,
537
- ji as FormFieldError,
538
- vi as FormFieldFile,
539
- Ci as FormFieldLabel,
540
- xi as FormFieldSelect,
541
- Ri as FormFieldSelectContent,
542
- Ti as FormFieldSelectIcon,
543
- Bi as FormFieldSelectItem,
544
- Vi as FormFieldSelectItemIndicator,
545
- Ai as FormFieldSelectItemText,
546
- yi as FormFieldSelectTrigger,
547
- wi as FormFieldSelectValue,
548
- ki as FormFieldSelectViewport,
535
+ zi as FormFieldComboboxItem,
536
+ ji as FormFieldComboboxItemIndicator,
537
+ Oi as FormFieldComboboxItemText,
538
+ qi as FormFieldComboboxPositioner,
539
+ Ui as FormFieldComboboxSelectedTags,
540
+ Ni as FormFieldComboboxTrigger,
541
+ Qi as FormFieldDescription,
542
+ vi as FormFieldEmail,
543
+ Wi as FormFieldError,
544
+ Pi as FormFieldFile,
545
+ Ii as FormFieldLabel,
546
+ yi as FormFieldSelect,
547
+ ki as FormFieldSelectContent,
548
+ Ri as FormFieldSelectIcon,
549
+ Ai as FormFieldSelectItem,
550
+ Li as FormFieldSelectItemIndicator,
551
+ Vi as FormFieldSelectItemText,
552
+ wi as FormFieldSelectTrigger,
553
+ Ti as FormFieldSelectValue,
554
+ Bi as FormFieldSelectViewport,
549
555
  R as FormFieldText,
550
- Pi as FormFieldTextArea,
551
- oi as Heading,
552
- Qi as IntelligentFormPrimitiveBotHeading,
553
- Wi as IntelligentFormPrimitiveBotHeadingIcon,
554
- $i as IntelligentFormPrimitiveBotHeadingName,
555
- Ki as IntelligentFormPrimitiveConfidentAnswer,
556
- Ji as IntelligentFormPrimitiveConfidentResponse,
557
- Xi as IntelligentFormPrimitiveConfidentResponseButton,
558
- Yi as IntelligentFormPrimitiveConfidentResponseButtonIcon,
559
- Zi as IntelligentFormPrimitiveConfidentResponseButtonLabel,
560
- ni as IntelligentFormPrimitiveContent,
561
- ri as IntelligentFormPrimitiveContentScrollArea,
562
- ci as IntelligentFormPrimitiveContentScrollAreaCorner,
563
- mi as IntelligentFormPrimitiveContentScrollAreaScrollbar,
564
- si as IntelligentFormPrimitiveContentScrollAreaThumb,
565
- li as IntelligentFormPrimitiveContentScrollAreaViewport,
566
- nt as IntelligentFormPrimitiveFormError,
567
- pi as IntelligentFormPrimitiveFormField,
556
+ fi as FormFieldTextArea,
557
+ ni as Heading,
558
+ $i as IntelligentFormPrimitiveBotHeading,
559
+ Gi as IntelligentFormPrimitiveBotHeadingIcon,
560
+ Ji as IntelligentFormPrimitiveBotHeadingName,
561
+ Yi as IntelligentFormPrimitiveConfidentAnswer,
562
+ Xi as IntelligentFormPrimitiveConfidentResponse,
563
+ Zi as IntelligentFormPrimitiveConfidentResponseButton,
564
+ et as IntelligentFormPrimitiveConfidentResponseButtonIcon,
565
+ it as IntelligentFormPrimitiveConfidentResponseButtonLabel,
566
+ ri as IntelligentFormPrimitiveContent,
567
+ li as IntelligentFormPrimitiveContentScrollArea,
568
+ di as IntelligentFormPrimitiveContentScrollAreaCorner,
569
+ si as IntelligentFormPrimitiveContentScrollAreaScrollbar,
570
+ ci as IntelligentFormPrimitiveContentScrollAreaThumb,
571
+ mi as IntelligentFormPrimitiveContentScrollAreaViewport,
572
+ lt as IntelligentFormPrimitiveFormError,
573
+ Ci as IntelligentFormPrimitiveFormField,
568
574
  hi as IntelligentFormPrimitiveFormFieldCheckbox,
569
- fi as IntelligentFormPrimitiveFormFieldCheckboxIndicator,
570
- Li as IntelligentFormPrimitiveFormFieldCombobox,
571
- qi as IntelligentFormPrimitiveFormFieldComboboxContent,
572
- Hi as IntelligentFormPrimitiveFormFieldComboboxControl,
575
+ xi as IntelligentFormPrimitiveFormFieldCheckboxIndicator,
576
+ Hi as IntelligentFormPrimitiveFormFieldCombobox,
577
+ Mi as IntelligentFormPrimitiveFormFieldComboboxContent,
578
+ Di as IntelligentFormPrimitiveFormFieldComboboxControl,
573
579
  Ei as IntelligentFormPrimitiveFormFieldComboboxInput,
574
- Mi as IntelligentFormPrimitiveFormFieldComboboxItem,
575
- Ui as IntelligentFormPrimitiveFormFieldComboboxItemIndicator,
576
- zi as IntelligentFormPrimitiveFormFieldComboboxItemText,
577
- Ni as IntelligentFormPrimitiveFormFieldComboboxPositioner,
578
- Oi as IntelligentFormPrimitiveFormFieldComboboxSelectedTags,
579
- Di as IntelligentFormPrimitiveFormFieldComboboxTrigger,
580
- Ii as IntelligentFormPrimitiveFormFieldEmail,
581
- ji as IntelligentFormPrimitiveFormFieldError,
582
- vi as IntelligentFormPrimitiveFormFieldFile,
583
- Ci as IntelligentFormPrimitiveFormFieldLabel,
584
- xi as IntelligentFormPrimitiveFormFieldSelect,
585
- Ri as IntelligentFormPrimitiveFormFieldSelectContent,
586
- Ti as IntelligentFormPrimitiveFormFieldSelectIcon,
587
- Bi as IntelligentFormPrimitiveFormFieldSelectItem,
588
- Vi as IntelligentFormPrimitiveFormFieldSelectItemIndicator,
589
- Ai as IntelligentFormPrimitiveFormFieldSelectItemText,
590
- yi as IntelligentFormPrimitiveFormFieldSelectTrigger,
591
- wi as IntelligentFormPrimitiveFormFieldSelectValue,
592
- ki as IntelligentFormPrimitiveFormFieldSelectViewport,
580
+ zi as IntelligentFormPrimitiveFormFieldComboboxItem,
581
+ ji as IntelligentFormPrimitiveFormFieldComboboxItemIndicator,
582
+ Oi as IntelligentFormPrimitiveFormFieldComboboxItemText,
583
+ qi as IntelligentFormPrimitiveFormFieldComboboxPositioner,
584
+ Ui as IntelligentFormPrimitiveFormFieldComboboxSelectedTags,
585
+ Ni as IntelligentFormPrimitiveFormFieldComboboxTrigger,
586
+ Qi as IntelligentFormPrimitiveFormFieldDescription,
587
+ vi as IntelligentFormPrimitiveFormFieldEmail,
588
+ Wi as IntelligentFormPrimitiveFormFieldError,
589
+ Pi as IntelligentFormPrimitiveFormFieldFile,
590
+ Ii as IntelligentFormPrimitiveFormFieldLabel,
591
+ yi as IntelligentFormPrimitiveFormFieldSelect,
592
+ ki as IntelligentFormPrimitiveFormFieldSelectContent,
593
+ Ri as IntelligentFormPrimitiveFormFieldSelectIcon,
594
+ Ai as IntelligentFormPrimitiveFormFieldSelectItem,
595
+ Li as IntelligentFormPrimitiveFormFieldSelectItemIndicator,
596
+ Vi as IntelligentFormPrimitiveFormFieldSelectItemText,
597
+ wi as IntelligentFormPrimitiveFormFieldSelectTrigger,
598
+ Ti as IntelligentFormPrimitiveFormFieldSelectValue,
599
+ Bi as IntelligentFormPrimitiveFormFieldSelectViewport,
593
600
  R as IntelligentFormPrimitiveFormFieldText,
594
- Pi as IntelligentFormPrimitiveFormFieldTextArea,
595
- oi as IntelligentFormPrimitiveHeading,
596
- Gi as IntelligentFormPrimitiveLoading,
597
- _i as IntelligentFormPrimitivePrimaryForm,
598
- gi as IntelligentFormPrimitivePrimaryFormDescription,
601
+ fi as IntelligentFormPrimitiveFormFieldTextArea,
602
+ ni as IntelligentFormPrimitiveHeading,
603
+ Ki as IntelligentFormPrimitiveLoading,
604
+ gi as IntelligentFormPrimitivePrimaryForm,
605
+ pi as IntelligentFormPrimitivePrimaryFormDescription,
599
606
  Si as IntelligentFormPrimitivePrimaryFormFields,
600
607
  bi as IntelligentFormPrimitivePrimaryFormSubmit,
601
- ti as IntelligentFormPrimitiveRoot,
602
- et as IntelligentFormPrimitiveSecondaryForm,
603
- it as IntelligentFormPrimitiveSecondaryFormDescription,
604
- tt as IntelligentFormPrimitiveSecondaryFormFields,
605
- ot as IntelligentFormPrimitiveSecondaryFormSubmit,
606
- st as IntelligentFormPrimitiveSource,
607
- ct as IntelligentFormPrimitiveSourceIcon,
608
- dt as IntelligentFormPrimitiveSourceTitle,
609
- rt as IntelligentFormPrimitiveSources,
610
- lt as IntelligentFormPrimitiveSourcesCaption,
611
- mt as IntelligentFormPrimitiveSourcesList,
612
- di as IntelligentFormPrimitiveSuccess,
613
- Fi as IntelligentFormPrimitiveSuccessHeading,
614
- ai as IntelligentFormPrimitiveSuccessIcon,
615
- ui as IntelligentFormPrimitiveSuccessMessage,
616
- Gi as Loading,
617
- _i as PrimaryForm,
618
- gi as PrimaryFormDescription,
608
+ oi as IntelligentFormPrimitiveRoot,
609
+ tt as IntelligentFormPrimitiveSecondaryForm,
610
+ ot as IntelligentFormPrimitiveSecondaryFormDescription,
611
+ nt as IntelligentFormPrimitiveSecondaryFormFields,
612
+ rt as IntelligentFormPrimitiveSecondaryFormSubmit,
613
+ dt as IntelligentFormPrimitiveSource,
614
+ at as IntelligentFormPrimitiveSourceIcon,
615
+ Ft as IntelligentFormPrimitiveSourceTitle,
616
+ mt as IntelligentFormPrimitiveSources,
617
+ st as IntelligentFormPrimitiveSourcesCaption,
618
+ ct as IntelligentFormPrimitiveSourcesList,
619
+ ai as IntelligentFormPrimitiveSuccess,
620
+ ui as IntelligentFormPrimitiveSuccessHeading,
621
+ Fi as IntelligentFormPrimitiveSuccessIcon,
622
+ _i as IntelligentFormPrimitiveSuccessMessage,
623
+ Ki as Loading,
624
+ gi as PrimaryForm,
625
+ pi as PrimaryFormDescription,
619
626
  Si as PrimaryFormFields,
620
627
  bi as PrimaryFormSubmit,
621
- gt as Provider,
622
- ti as Root,
623
- et as SecondaryForm,
624
- it as SecondaryFormDescription,
625
- tt as SecondaryFormFields,
626
- ot as SecondaryFormSubmit,
627
- st as Source,
628
- ct as SourceIcon,
629
- dt as SourceTitle,
630
- rt as Sources,
631
- lt as SourcesCaption,
632
- mt as SourcesList,
633
- di as Success,
634
- Fi as SuccessHeading,
635
- ai as SuccessIcon,
636
- ui as SuccessMessage,
637
- ut as useComboboxItems
628
+ St as Provider,
629
+ oi as Root,
630
+ tt as SecondaryForm,
631
+ ot as SecondaryFormDescription,
632
+ nt as SecondaryFormFields,
633
+ rt as SecondaryFormSubmit,
634
+ dt as Source,
635
+ at as SourceIcon,
636
+ Ft as SourceTitle,
637
+ mt as Sources,
638
+ st as SourcesCaption,
639
+ ct as SourcesList,
640
+ ai as Success,
641
+ ui as SuccessHeading,
642
+ Fi as SuccessIcon,
643
+ _i as SuccessMessage,
644
+ gt as useComboboxItems
638
645
  };