@inkeep/cxkit-primitives 0.5.2 → 0.5.3

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 (65) hide show
  1. package/dist/atoms/link.cjs +1 -1
  2. package/dist/atoms/link.js +5 -5
  3. package/dist/components/chat-button.cjs +1 -1
  4. package/dist/components/chat-button.js +21 -21
  5. package/dist/components/embedded-chat/use-captcha.cjs +1 -1
  6. package/dist/components/embedded-chat/use-captcha.d.cts +2 -2
  7. package/dist/components/embedded-chat/use-captcha.d.ts +2 -2
  8. package/dist/components/embedded-chat/use-captcha.js +1 -1
  9. package/dist/components/embedded-chat/use-chat-action.cjs +1 -1
  10. package/dist/components/embedded-chat/use-chat-action.js +9 -9
  11. package/dist/components/embedded-chat/use-inkeep-chat.cjs +3 -3
  12. package/dist/components/embedded-chat/use-inkeep-chat.js +39 -39
  13. package/dist/components/embedded-chat.cjs +4 -4
  14. package/dist/components/embedded-chat.d.cts +6 -6
  15. package/dist/components/embedded-chat.d.ts +6 -6
  16. package/dist/components/embedded-chat.js +707 -708
  17. package/dist/components/embedded-search/transform-results.cjs +1 -1
  18. package/dist/components/embedded-search/transform-results.js +3 -3
  19. package/dist/components/embedded-search/use-inkeep-search.cjs +1 -1
  20. package/dist/components/embedded-search/use-inkeep-search.js +36 -36
  21. package/dist/components/embedded-search.cjs +1 -1
  22. package/dist/components/embedded-search.js +60 -60
  23. package/dist/components/intelligent-form/use-inkeep-intelligent-form.cjs +1 -1
  24. package/dist/components/intelligent-form/use-inkeep-intelligent-form.js +35 -35
  25. package/dist/components/intelligent-form.cjs +1 -1
  26. package/dist/components/intelligent-form.d.cts +3 -3
  27. package/dist/components/intelligent-form.d.ts +3 -3
  28. package/dist/components/intelligent-form.js +106 -106
  29. package/dist/components/modal/modal-provider.d.cts +1 -1
  30. package/dist/components/modal/modal-provider.d.ts +1 -1
  31. package/dist/components/modal/use-inkeep-modal.cjs +1 -1
  32. package/dist/components/modal/use-inkeep-modal.d.cts +1 -1
  33. package/dist/components/modal/use-inkeep-modal.d.ts +1 -1
  34. package/dist/components/modal/use-inkeep-modal.js +4 -4
  35. package/dist/components/modal.cjs +1 -1
  36. package/dist/components/modal.js +5 -5
  37. package/dist/hooks/use-browser-storage.cjs +1 -1
  38. package/dist/hooks/use-browser-storage.js +6 -6
  39. package/dist/providers/base-events-provider.cjs +1 -1
  40. package/dist/providers/base-events-provider.js +22 -22
  41. package/dist/providers/chat-events-provider.cjs +1 -1
  42. package/dist/providers/chat-events-provider.js +46 -39
  43. package/dist/providers/chat-form-provider.cjs +1 -1
  44. package/dist/providers/chat-form-provider.js +40 -40
  45. package/dist/providers/config-provider.cjs +1 -1
  46. package/dist/providers/config-provider.d.cts +7 -7
  47. package/dist/providers/config-provider.d.ts +7 -7
  48. package/dist/providers/config-provider.js +24 -24
  49. package/dist/providers/feedback-provider.cjs +1 -1
  50. package/dist/providers/feedback-provider.js +10 -10
  51. package/dist/providers/root-provider.cjs +1 -1
  52. package/dist/providers/root-provider.d.cts +1 -1
  53. package/dist/providers/root-provider.d.ts +1 -1
  54. package/dist/providers/root-provider.js +2 -2
  55. package/dist/providers/theme-provider.cjs +1 -1
  56. package/dist/providers/theme-provider.js +32 -30
  57. package/dist/providers/user-provider.cjs +1 -1
  58. package/dist/providers/user-provider.js +14 -14
  59. package/dist/utils/default-settings.cjs +1 -1
  60. package/dist/utils/default-settings.d.cts +20 -20
  61. package/dist/utils/default-settings.d.ts +20 -20
  62. package/dist/utils/default-settings.js +32 -31
  63. package/dist/utils/form.cjs +1 -1
  64. package/dist/utils/form.js +11 -11
  65. package/package.json +5 -5
@@ -1,8 +1,8 @@
1
1
  "use client";
2
2
  import J from "openai";
3
- import { useMemo as V, useState as u, useEffect as X } from "react";
4
- import { useForm as z } from "react-hook-form";
5
- import { getFormDefaultValues as W } from "../../utils/form.js";
3
+ import { useMemo as V, useState as u, useEffect as W } from "react";
4
+ import { useForm as X } from "react-hook-form";
5
+ import { getFormDefaultValues as z } from "../../utils/form.js";
6
6
  import { generateQAModelResponse as Y } from "./actions/qa-model-response.js";
7
7
  import { generateContextModelResponse as Z } from "./actions/context-model-response.js";
8
8
  import { useInkeepConfig as ee } from "../../providers/config-provider.js";
@@ -10,7 +10,7 @@ import { useInkeepConversation as re } from "../../providers/conversation-provid
10
10
  import { useChatEvents as se } from "../../providers/chat-events-provider.js";
11
11
  import { getQAModelMessages as oe } from "./actions/qa-model-messages.js";
12
12
  import { fetchAndSolveChallenge as ne } from "../embedded-chat/use-captcha.js";
13
- const te = "root.serverError", R = async (g, s) => {
13
+ const te = "root.serverError", A = async (g, s) => {
14
14
  if (s) return;
15
15
  const t = await ne(`${g}/v1/challenge`);
16
16
  if (t)
@@ -18,30 +18,30 @@ const te = "root.serverError", R = async (g, s) => {
18
18
  "X-INKEEP-CHALLENGE-SOLUTION": btoa(JSON.stringify(t))
19
19
  };
20
20
  }, ye = (g) => {
21
- const { formConfig: s } = g, { baseSettings: t } = ee(), { conversation: o } = re(), { logEvent: i } = se(), { baseUrl: d, bypassChallenge: y } = t, v = V(
21
+ const { formConfig: s } = g, { baseSettings: t } = ee(), { conversation: o } = re(), { logEvent: i } = se(), { aiApiBaseUrl: d, shouldBypassCaptcha: y } = t, v = V(
22
22
  () => new J({
23
23
  baseURL: `${d}/v1`,
24
24
  apiKey: t.apiKey,
25
25
  dangerouslyAllowBrowser: !0
26
26
  }),
27
27
  [t.apiKey, d]
28
- ), [N, S] = u(!1), [A, F] = u(!1), [M, p] = u(!1), [O, _] = u({}), c = V(() => {
28
+ ), [R, h] = u(!1), [N, F] = u(!1), [M, p] = u(!1), [O, S] = u({}), c = V(() => {
29
29
  const { primary: n, secondary: l } = s;
30
- return W([...n.fields, ...l.fields]);
30
+ return z([...n.fields, ...l.fields]);
31
31
  }, [s]), {
32
- control: C,
33
- handleSubmit: x,
34
- formState: { errors: b, isSubmitting: L, isSubmitSuccessful: P },
35
- reset: h,
32
+ control: _,
33
+ handleSubmit: P,
34
+ formState: { errors: C, isSubmitting: x, isSubmitSuccessful: L },
35
+ reset: b,
36
36
  trigger: k,
37
37
  setValue: H,
38
38
  setError: K
39
- } = z({
39
+ } = X({
40
40
  defaultValues: c
41
41
  });
42
- X(() => {
43
- c && h(c);
44
- }, [h, c]);
42
+ W(() => {
43
+ c && b(c);
44
+ }, [b, c]);
45
45
  const U = async (n) => {
46
46
  const l = typeof window > "u" ? "" : window.location.href;
47
47
  try {
@@ -70,12 +70,12 @@ const te = "root.serverError", R = async (g, s) => {
70
70
  }, q = async () => {
71
71
  const n = s.primary.fields.map((e) => e.name);
72
72
  if (!await k(n)) return;
73
- F(!0), S(!0);
74
- const a = C._formValues, E = s.primary.fields.reduce(
73
+ F(!0), h(!0);
74
+ const a = _._formValues, E = s.primary.fields.reduce(
75
75
  (e, m) => (e[m.name] = a[m.name], e),
76
76
  {}
77
- ), Q = s.secondary.fields.filter(
78
- (e) => e.aiGenerated !== !1
77
+ ), G = s.secondary.fields.filter(
78
+ (e) => e.shouldPrefillWithAI !== !1
79
79
  ), I = oe(E);
80
80
  i({
81
81
  eventName: "intelligent_form_primary_submitted",
@@ -86,10 +86,10 @@ const te = "root.serverError", R = async (g, s) => {
86
86
  }
87
87
  });
88
88
  try {
89
- const e = await R(d, y), m = await R(d, y), [r, f] = await Promise.all([
89
+ const e = await A(d, y), m = await A(d, y), [r, f] = await Promise.all([
90
90
  Y(I, v, e),
91
91
  Z(
92
- { primaryFieldValues: E, fieldsToGenerate: Q },
92
+ { primaryFieldValues: E, fieldsToGenerate: G },
93
93
  v,
94
94
  m
95
95
  )
@@ -104,8 +104,8 @@ const te = "root.serverError", R = async (g, s) => {
104
104
  recordsConsidered: r.recordsConsidered
105
105
  }
106
106
  }), f.suggestedValues) {
107
- for (const [B, D] of Object.entries(f.suggestedValues))
108
- H(B, D);
107
+ for (const [$, D] of Object.entries(f.suggestedValues))
108
+ H($, D);
109
109
  i({
110
110
  eventName: "intelligent_form_context_suggestions",
111
111
  properties: {
@@ -114,12 +114,12 @@ const te = "root.serverError", R = async (g, s) => {
114
114
  }
115
115
  });
116
116
  }
117
- const w = r.aiAnnotations?.answerConfidence, T = w && ["very_confident", "somewhat_confident"].includes(w), $ = r.recordsConsidered && r.recordsConsidered.length > 0;
118
- T && $ && r.answer ? _({
117
+ const w = r.aiAnnotations?.answerConfidence, Q = w && ["very_confident", "somewhat_confident"].includes(w), T = r.recordsConsidered && r.recordsConsidered.length > 0;
118
+ Q && T && r.answer ? S({
119
119
  answer: r.answer,
120
120
  answerConfidence: w,
121
121
  recordsConsidered: r.recordsConsidered
122
- }) : (p(!0), _({
122
+ }) : (p(!0), S({
123
123
  answer: null,
124
124
  recordsConsidered: r.recordsConsidered,
125
125
  suggestedValues: f.suggestedValues
@@ -133,19 +133,19 @@ const te = "root.serverError", R = async (g, s) => {
133
133
  }
134
134
  });
135
135
  } finally {
136
- S(!1);
136
+ h(!1);
137
137
  }
138
- }, G = x(U), j = b?.root?.serverError;
138
+ }, B = P(U), j = C?.root?.serverError;
139
139
  return {
140
140
  formConfig: s,
141
- control: C,
142
- errors: b,
143
- isSubmitSuccessful: P,
144
- isSubmitting: L,
145
- handleSubmit: G,
146
- loading: N,
141
+ control: _,
142
+ errors: C,
143
+ isSubmitSuccessful: L,
144
+ isSubmitting: x,
145
+ handleSubmit: B,
146
+ loading: R,
147
147
  formError: j,
148
- submittedPrimaryForm: A,
148
+ submittedPrimaryForm: N,
149
149
  handleSubmitPrimaryForm: q,
150
150
  aiResponse: O,
151
151
  showSecondaryFields: M,
@@ -1 +1 @@
1
- "use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("react/jsx-runtime"),t=require("./factory.cjs"),F=require("react"),y=require("react-textarea-autosize"),Ae=require("@radix-ui/react-select"),je=require("@radix-ui/react-checkbox"),m=require("./intelligent-form/intelligent-form-provider.cjs"),Te=require("@radix-ui/react-scroll-area"),p=require("../atoms/icons/built-in-icon-renderer.cjs"),c=require("../utils/misc.cjs"),Be=require("react-hook-form"),I=require("../providers/intelligent-form-field-provider.cjs"),Ee=require("../atoms/icons/checkbox-icon.cjs"),x=require("../providers/config-provider.cjs"),h=require("../providers/source-item-provider.cjs"),He=require("../atoms/link.cjs"),Le=require("../atoms/markdown/index.cjs"),S=require("../utils/compose-refs.cjs"),u=require("../utils/compose-event-handlers.cjs");function k(i){const e=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(i){for(const n in i)if(n!=="default"){const r=Object.getOwnPropertyDescriptor(i,n);Object.defineProperty(e,n,r.get?r:{enumerable:!0,get:()=>i[n]})}}return e.default=i,Object.freeze(e)}const g=k(Ae),R=k(je),P=k(Te),Ve=t.ikp("form",{_id:"intelligentForm__Root"}),w=i=>{const{onSubmit:e,...n}=i,{handleSubmit:r}=m.useIntelligentForm();return o.jsx(Ve,{onSubmit:u.composeEventHandlers(e,r),...n})},A=t.ikp("h2",{_id:"intelligentForm__Heading",children:"Contact Support"}),j=t.ikp("div",{_id:"intelligentForm__Content"}),T=t.ikp(P.Root,{_id:"intelligentForm__Content__ScrollArea"}),qe=t.ikp(P.Viewport,{_id:"intelligentForm__Content__ScrollAreaViewport"}),B=i=>{const{children:e,...n}=i;return o.jsx(qe,{children:o.jsx("div",{"data-part":"grid",style:{display:"grid"},children:e}),...n})},E=t.ikp(P.ScrollAreaScrollbar,{_id:"intelligentForm__Content__ScrollAreaScrollbar"}),H=t.ikp(P.ScrollAreaThumb,{_id:"intelligentForm__Content__ScrollAreaThumb"}),L=t.ikp(P.Corner,{_id:"intelligentForm__Content__ScrollAreaCorner"}),De=t.ikp("div",{_id:"intelligentForm__Success"}),V=i=>{const{children:e,...n}=i,{isSubmitSuccessful:r}=m.useIntelligentForm();return r?o.jsx(De,{...n,children:e}):null},Ne=t.ikp(p.BuiltInIconRenderer,{_id:"intelligentForm__SuccessIcon"}),q=i=>{const{formConfig:{successView:e}}=m.useIntelligentForm();return o.jsx(Ne,{iconSettings:e.icon??{builtIn:"LuCircleCheck"},...i})},Oe=t.ikp("h2",{_id:"intelligentForm__SuccessHeading"}),D=i=>{const{formConfig:{successView:e}}=m.useIntelligentForm();return o.jsx(Oe,{children:e.heading,...i})},Me=t.ikp("p",{_id:"intelligentForm__SuccessMessage"}),N=i=>{const{formConfig:{successView:e}}=m.useIntelligentForm();return o.jsx(Me,{children:e.message,...i})},O=t.ikp("div",{_id:"intelligentForm__PrimaryForm"}),ze=t.ikp("div",{_id:"intelligentForm__PrimaryFormFields"}),Ue=t.ikp("p",{_id:"intelligentForm__PrimaryForm__Description"}),M=i=>{const{formConfig:{primary:e}}=m.useIntelligentForm();return e.description?o.jsx(Ue,{children:e.description,...i}):null},z=i=>{const{children:e,...n}=i,{formConfig:{primary:r}}=m.useIntelligentForm();return o.jsx(ze,{children:c.maybeRender(e,r.fields),...n})},Xe=t.ikp("button",{_id:"intelligentForm__PrimaryFormSubmit",type:"button",children:"Next"}),U=i=>{const{onClick:e,...n}=i,{submittedPrimaryForm:r,handleSubmitPrimaryForm:l}=m.useIntelligentForm();return o.jsx(Xe,{"data-submitted":c.dataAttr(r),onClick:u.composeEventHandlers(e,l),...n})},Qe=t.ikp("div",{_id:"intelligentForm__Field"}),X=i=>{const{field:e,autoFocus:n,...r}=i,{control:l,errors:s}=m.useIntelligentForm();return o.jsx(Be.Controller,{name:e.name,control:l,rules:{required:e.required?`${e.label} is required.`:void 0},render:({field:d})=>{const a=d.value!==void 0||e.inputType==="FILE";return o.jsx(I.IntelligentFormFieldProvider,{"data-invalid":c.dataAttr(!!s[e.name]),field:e,fieldProps:d,autoFocus:n,children:a&&o.jsx(Qe,{"data-input-type":e.inputType,"data-hidden":c.dataAttr(e.isHidden),...r})})}})},We=t.ikp("label",{_id:"intelligentForm__FieldLabel"}),Q=i=>{const{field:e}=I.useIntelligentFormField();return o.jsx(We,{"data-required":c.dataAttr(e.required),htmlFor:e.name,children:e.label,...i})},$e=t.ikp("input",{_id:"intelligentForm__FieldText",type:"text"}),f=F.forwardRef((i,e)=>{const{field:n,error:r,fieldProps:{onChange:l,onBlur:s,ref:d,...a},autoFocus:v}=I.useIntelligentFormField(),_=S.useComposedRefs(e,d);return o.jsx($e,{asChild:n.inputType==="TEXTAREA",ref:_,id:n.name,autoFocus:v,placeholder:"placeholder"in n?n.placeholder:void 0,"data-invalid":c.dataAttr(!!r),onChange:u.composeEventHandlers(i.onChange,l),onBlur:u.composeEventHandlers(i.onBlur,s),...a,...i,children:n.inputType==="TEXTAREA"?o.jsx(y,{minRows:3,maxRows:10}):null})}),W=t.ikp(f,{_id:"intelligentForm__FieldEmail",type:"email"}),Ge=t.ikp("input",{_id:"intelligentForm__FieldFile",type:"file",multiple:!0}),$=i=>{const{field:e,error:n,fieldProps:{value:r,onChange:l,onBlur:s,...d},autoFocus:a}=I.useIntelligentFormField(),{onChange:v,onBlur:_,...b}=i,C=Re=>{const we=Re.target.files;l(we)};return o.jsx(Ge,{id:e.name,autoFocus:a,"data-value":r,"data-invalid":c.dataAttr(!!n),...b,...d,onChange:u.composeEventHandlers(v,C),onBlur:u.composeEventHandlers(_,s)})},G=t.ikp(f,{_id:"intelligentForm__FieldTextArea",type:"textarea",asChild:!0,children:o.jsx(y,{rows:1,maxRows:8})}),Je=t.ikp(R.Root,{_id:"intelligentForm__FieldCheckbox"}),J=i=>{const{field:e,error:n,fieldProps:r,autoFocus:l}=I.useIntelligentFormField(),{onCheckedChange:s,...d}=i;return o.jsx(Je,{id:e.name,name:e.name,autoFocus:l,"data-invalid":c.dataAttr(!!n),checked:r.value,onCheckedChange:u.composeEventHandlers(s,r.onChange),...d})},K=t.ikp(R.Indicator,{_id:"intelligentForm__FieldCheckboxIndicator",children:o.jsx(Ee.CheckboxIcon,{})}),Ke=t.ikp(g.Root,{_id:"intelligentForm__FieldSelect"}),Y=i=>{const{field:e,error:n,fieldProps:r}=I.useIntelligentFormField(),{onValueChange:l,...s}=i;return o.jsx(Ke,{name:e.name,"data-invalid":c.dataAttr(!!n),value:r.value,onValueChange:u.composeEventHandlers(l,r.onChange),...s})},Z=t.ikp(g.Trigger,{_id:"intelligentForm__FieldSelect__Trigger"}),Ye=t.ikp(g.Value,{_id:"intelligentForm__FieldSelect__Value"}),ee=i=>{const{field:e}=I.useIntelligentFormField();return o.jsx(Ye,{placeholder:"placeholder"in e?e.placeholder:void 0,...i})},ie=t.ikp(g.Icon,{_id:"intelligentForm__FieldSelect__Icon",asChild:!0,children:o.jsx(p.BuiltInIconRenderer,{iconSettings:{builtIn:"LuChevronDown"}})}),te=t.ikp(g.Content,{_id:"intelligentForm__FieldSelect__Content",position:"popper"}),ne=t.ikp(g.Viewport,{_id:"intelligentForm__FieldSelect__Viewport"}),re=t.ikp(g.Item,{_id:"intelligentForm__FieldSelect__Item"}),oe=t.ikp(g.ItemText,{_id:"intelligentForm__FieldSelect__ItemText"}),le=t.ikp(g.ItemIndicator,{_id:"intelligentForm__FieldSelect__ItemIndicator",asChild:!0,children:o.jsx(p.BuiltInIconRenderer,{iconSettings:{builtIn:"LuCheck"}})}),Ze=t.ikp("span",{_id:"intelligentForm__FieldError"}),me=i=>{const{error:e}=I.useIntelligentFormField();return e?o.jsx(Ze,{children:e.message?.toString(),...i}):null},se=t.ikp("div",{_id:"intelligentForm__BotHeading"}),ce=t.ikp(p.BuiltInIconRenderer,{_id:"intelligentForm__BotHeading__Icon",iconSettings:{builtIn:"LuSparkles"}}),ei=t.ikp("div",{_id:"intelligentForm__BotHeading__Name"}),de=i=>{const{baseSettings:e}=x.useInkeepConfig(),{organizationDisplayName:n}=e??{},{formConfig:{botName:r}}=m.useIntelligentForm();return o.jsx(ei,{children:r??n,...i})},ii=t.ikp("div",{_id:"intelligentForm__Loading"}),Fe=F.forwardRef(({...i},e)=>{const{loading:n}=m.useIntelligentForm(),r=F.useRef(null),l=S.useComposedRefs(e,r);return F.useEffect(()=>{n&&r.current&&r.current.scrollIntoView({behavior:"smooth",block:"nearest",inline:"nearest"})},[n]),n?o.jsx(ii,{ref:l,...i}):null}),ti=t.ikp("div",{_id:"intelligentForm__ConfidentResponse"}),ae=F.forwardRef(({...i},e)=>{const{aiResponse:n,loading:r}=m.useIntelligentForm(),l=F.useRef(null),s=S.useComposedRefs(e,l);return F.useEffect(()=>{!r&&n.answerConfidence&&l.current&&l.current.scrollIntoView({behavior:"smooth",block:"nearest",inline:"nearest"})},[r,n.answerConfidence]),n.answerConfidence?o.jsx(ti,{ref:s,...i}):null}),ni=t.ikp(Le.Markdown,{_id:"intelligentForm__ConfidentAnswer"}),ue=i=>{const{aiResponse:e}=m.useIntelligentForm();return o.jsx(ni,{shouldOpenLinksInNewTab:!0,children:e.answer,...i})},ri=t.ikp("button",{_id:"intelligentForm__ConfidentResponseButton",type:"button"}),ge=i=>{const{onClick:e,...n}=i,{showSecondaryFields:r,setShowSecondaryFields:l}=m.useIntelligentForm(),s=()=>{l(!0)};return o.jsx(ri,{"data-escalated":c.dataAttr(r),onClick:u.composeEventHandlers(e,s),...n})},Ie=t.ikp(p.BuiltInIconRenderer,{_id:"intelligentForm__ConfidentResponseButton__Icon",iconSettings:{builtIn:"LuUser"}}),_e=t.ikp("span",{_id:"intelligentForm__ConfidentResponseButton__Label",children:"Escalate to human"}),oi=t.ikp("div",{_id:"intelligentForm__SecondaryForm"}),pe=F.forwardRef(({...i},e)=>{const{showSecondaryFields:n}=m.useIntelligentForm(),r=F.useRef(null),l=S.useComposedRefs(e,r);return F.useEffect(()=>{n&&r.current&&r.current.scrollIntoView({behavior:"smooth",block:"nearest",inline:"nearest"})},[n]),n?o.jsx(oi,{ref:l,...i}):null}),li=t.ikp("p",{_id:"intelligentForm__SecondaryForm__Description"}),ve=i=>{const{formConfig:{secondary:e},aiResponse:{answerConfidence:n}}=m.useIntelligentForm();if(!e.description)return null;const r=typeof e.description=="string"?e.description:n?e.description.confident:e.description.default;return o.jsx(li,{children:r,...i})},mi=t.ikp("div",{_id:"intelligentForm__SecondaryFormFields"}),Pe=i=>{const{children:e,...n}=i,{formConfig:{secondary:r}}=m.useIntelligentForm();return o.jsx(mi,{children:c.maybeRender(e,r.fields),...n})},Se=t.ikp("button",{_id:"intelligentForm__SecondaryFormSubmit",type:"submit",children:"Submit"}),si=t.ikp("span",{_id:"intelligentForm__Error"}),fe=i=>{const{formError:e}=m.useIntelligentForm();return e?o.jsx(si,{children:e.message,...i}):null},Ce=t.ikp("div",{_id:"intelligentForm__Sources"}),he=t.ikp("p",{_id:"intelligentForm__SourcesCaption",children:"Here are the sources I considered:"}),ci=t.ikp("div",{_id:"intelligentForm__SourcesList"}),ke=i=>{const{children:e,...n}=i,{baseSettings:{transformSource:r,organizationDisplayName:l}}=x.useInkeepConfig(),{aiResponse:{recordsConsidered:s}}=m.useIntelligentForm();if(!s)return null;const d=s.reduce((a,v)=>{const _=r(v,"intelligentFormSource",{organizationDisplayName:l});return a.some(C=>C.url===_.url)||a.push(_),a},[]);return o.jsx(ci,{children:c.maybeRender(e,d),...n})},di=t.ikp(He.LinkWithQueryParams,{_id:"intelligentForm__Source"}),be=i=>{const{source:e,...n}=i;return o.jsx(h.SourceItemProvider,{source:{...e,isExternal:!!e.shouldOpenInNewTab},children:o.jsx(di,{"data-type":e.type,appendToUrl:e.appendToUrl,href:e.url,isExternal:e.shouldOpenInNewTab!==!1,...n})})},Fi=t.ikp(p.BuiltInIconRenderer,{_id:"intelligentForm__SourceIcon"}),ye=i=>{const{source:e}=h.useSourceItem();return o.jsx(Fi,{iconSettings:e.icon,"data-type":e.type,...i})},ai=t.ikp("span",{_id:"intelligentForm__SourceTitle"}),xe=i=>{const{source:e}=h.useSourceItem();return o.jsx(ai,{"data-type":e.type,children:e.title,...i})};exports.Provider=m.IntelligentFormProvider;exports.BotHeading=se;exports.BotHeadingIcon=ce;exports.BotHeadingName=de;exports.ConfidentAnswer=ue;exports.ConfidentResponse=ae;exports.ConfidentResponseButton=ge;exports.ConfidentResponseButtonIcon=Ie;exports.ConfidentResponseButtonLabel=_e;exports.Content=j;exports.ContentScrollArea=T;exports.ContentScrollAreaCorner=L;exports.ContentScrollAreaScrollbar=E;exports.ContentScrollAreaThumb=H;exports.ContentScrollAreaViewport=B;exports.Error=fe;exports.FormField=X;exports.FormFieldCheckbox=J;exports.FormFieldCheckboxIndicator=K;exports.FormFieldEmail=W;exports.FormFieldError=me;exports.FormFieldFile=$;exports.FormFieldLabel=Q;exports.FormFieldSelect=Y;exports.FormFieldSelectContent=te;exports.FormFieldSelectIcon=ie;exports.FormFieldSelectItem=re;exports.FormFieldSelectItemIndicator=le;exports.FormFieldSelectItemText=oe;exports.FormFieldSelectTrigger=Z;exports.FormFieldSelectValue=ee;exports.FormFieldSelectViewport=ne;exports.FormFieldText=f;exports.FormFieldTextArea=G;exports.Heading=A;exports.IntelligentFormPrimitiveBotHeading=se;exports.IntelligentFormPrimitiveBotHeadingIcon=ce;exports.IntelligentFormPrimitiveBotHeadingName=de;exports.IntelligentFormPrimitiveConfidentAnswer=ue;exports.IntelligentFormPrimitiveConfidentResponse=ae;exports.IntelligentFormPrimitiveConfidentResponseButton=ge;exports.IntelligentFormPrimitiveConfidentResponseButtonIcon=Ie;exports.IntelligentFormPrimitiveConfidentResponseButtonLabel=_e;exports.IntelligentFormPrimitiveContent=j;exports.IntelligentFormPrimitiveContentScrollArea=T;exports.IntelligentFormPrimitiveContentScrollAreaCorner=L;exports.IntelligentFormPrimitiveContentScrollAreaScrollbar=E;exports.IntelligentFormPrimitiveContentScrollAreaThumb=H;exports.IntelligentFormPrimitiveContentScrollAreaViewport=B;exports.IntelligentFormPrimitiveFormError=fe;exports.IntelligentFormPrimitiveFormField=X;exports.IntelligentFormPrimitiveFormFieldCheckbox=J;exports.IntelligentFormPrimitiveFormFieldCheckboxIndicator=K;exports.IntelligentFormPrimitiveFormFieldEmail=W;exports.IntelligentFormPrimitiveFormFieldError=me;exports.IntelligentFormPrimitiveFormFieldFile=$;exports.IntelligentFormPrimitiveFormFieldLabel=Q;exports.IntelligentFormPrimitiveFormFieldSelect=Y;exports.IntelligentFormPrimitiveFormFieldSelectContent=te;exports.IntelligentFormPrimitiveFormFieldSelectIcon=ie;exports.IntelligentFormPrimitiveFormFieldSelectItem=re;exports.IntelligentFormPrimitiveFormFieldSelectItemIndicator=le;exports.IntelligentFormPrimitiveFormFieldSelectItemText=oe;exports.IntelligentFormPrimitiveFormFieldSelectTrigger=Z;exports.IntelligentFormPrimitiveFormFieldSelectValue=ee;exports.IntelligentFormPrimitiveFormFieldSelectViewport=ne;exports.IntelligentFormPrimitiveFormFieldText=f;exports.IntelligentFormPrimitiveFormFieldTextArea=G;exports.IntelligentFormPrimitiveHeading=A;exports.IntelligentFormPrimitiveLoading=Fe;exports.IntelligentFormPrimitivePrimaryForm=O;exports.IntelligentFormPrimitivePrimaryFormDescription=M;exports.IntelligentFormPrimitivePrimaryFormFields=z;exports.IntelligentFormPrimitivePrimaryFormSubmit=U;exports.IntelligentFormPrimitiveRoot=w;exports.IntelligentFormPrimitiveSecondaryForm=pe;exports.IntelligentFormPrimitiveSecondaryFormDescription=ve;exports.IntelligentFormPrimitiveSecondaryFormFields=Pe;exports.IntelligentFormPrimitiveSecondaryFormSubmit=Se;exports.IntelligentFormPrimitiveSource=be;exports.IntelligentFormPrimitiveSourceIcon=ye;exports.IntelligentFormPrimitiveSourceTitle=xe;exports.IntelligentFormPrimitiveSources=Ce;exports.IntelligentFormPrimitiveSourcesCaption=he;exports.IntelligentFormPrimitiveSourcesList=ke;exports.IntelligentFormPrimitiveSuccess=V;exports.IntelligentFormPrimitiveSuccessHeading=D;exports.IntelligentFormPrimitiveSuccessIcon=q;exports.IntelligentFormPrimitiveSuccessMessage=N;exports.Loading=Fe;exports.PrimaryForm=O;exports.PrimaryFormDescription=M;exports.PrimaryFormFields=z;exports.PrimaryFormSubmit=U;exports.Root=w;exports.SecondaryForm=pe;exports.SecondaryFormDescription=ve;exports.SecondaryFormFields=Pe;exports.SecondaryFormSubmit=Se;exports.Source=be;exports.SourceIcon=ye;exports.SourceTitle=xe;exports.Sources=Ce;exports.SourcesCaption=he;exports.SourcesList=ke;exports.Success=V;exports.SuccessHeading=D;exports.SuccessIcon=q;exports.SuccessMessage=N;
1
+ "use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("react/jsx-runtime"),t=require("./factory.cjs"),F=require("react"),y=require("react-textarea-autosize"),je=require("@radix-ui/react-select"),Ae=require("@radix-ui/react-checkbox"),m=require("./intelligent-form/intelligent-form-provider.cjs"),Te=require("@radix-ui/react-scroll-area"),p=require("../atoms/icons/built-in-icon-renderer.cjs"),c=require("../utils/misc.cjs"),Be=require("react-hook-form"),I=require("../providers/intelligent-form-field-provider.cjs"),He=require("../atoms/icons/checkbox-icon.cjs"),x=require("../providers/config-provider.cjs"),h=require("../providers/source-item-provider.cjs"),Ee=require("../atoms/link.cjs"),Le=require("../atoms/markdown/index.cjs"),S=require("../utils/compose-refs.cjs"),u=require("../utils/compose-event-handlers.cjs");function k(i){const e=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(i){for(const n in i)if(n!=="default"){const r=Object.getOwnPropertyDescriptor(i,n);Object.defineProperty(e,n,r.get?r:{enumerable:!0,get:()=>i[n]})}}return e.default=i,Object.freeze(e)}const g=k(je),R=k(Ae),P=k(Te),Ve=t.ikp("form",{_id:"intelligentForm__Root"}),w=i=>{const{onSubmit:e,...n}=i,{handleSubmit:r}=m.useIntelligentForm();return o.jsx(Ve,{onSubmit:u.composeEventHandlers(e,r),...n})},j=t.ikp("h2",{_id:"intelligentForm__Heading",children:"Contact Support"}),A=t.ikp("div",{_id:"intelligentForm__Content"}),T=t.ikp(P.Root,{_id:"intelligentForm__Content__ScrollArea"}),qe=t.ikp(P.Viewport,{_id:"intelligentForm__Content__ScrollAreaViewport"}),B=i=>{const{children:e,...n}=i;return o.jsx(qe,{children:o.jsx("div",{"data-part":"grid",style:{display:"grid"},children:e}),...n})},H=t.ikp(P.ScrollAreaScrollbar,{_id:"intelligentForm__Content__ScrollAreaScrollbar"}),E=t.ikp(P.ScrollAreaThumb,{_id:"intelligentForm__Content__ScrollAreaThumb"}),L=t.ikp(P.Corner,{_id:"intelligentForm__Content__ScrollAreaCorner"}),De=t.ikp("div",{_id:"intelligentForm__Success"}),V=i=>{const{children:e,...n}=i,{isSubmitSuccessful:r}=m.useIntelligentForm();return r?o.jsx(De,{...n,children:e}):null},Ne=t.ikp(p.BuiltInIconRenderer,{_id:"intelligentForm__SuccessIcon"}),q=i=>{const{formConfig:{successView:e}}=m.useIntelligentForm();return o.jsx(Ne,{iconSettings:e.icon??{builtIn:"LuCircleCheck"},...i})},Oe=t.ikp("h2",{_id:"intelligentForm__SuccessHeading"}),D=i=>{const{formConfig:{successView:e}}=m.useIntelligentForm();return o.jsx(Oe,{children:e.heading,...i})},Me=t.ikp("p",{_id:"intelligentForm__SuccessMessage"}),N=i=>{const{formConfig:{successView:e}}=m.useIntelligentForm();return o.jsx(Me,{children:e.message,...i})},O=t.ikp("div",{_id:"intelligentForm__PrimaryForm"}),ze=t.ikp("div",{_id:"intelligentForm__PrimaryFormFields"}),Ue=t.ikp("p",{_id:"intelligentForm__PrimaryForm__Description"}),M=i=>{const{formConfig:{primary:e}}=m.useIntelligentForm();return e.description?o.jsx(Ue,{children:e.description,...i}):null},z=i=>{const{children:e,...n}=i,{formConfig:{primary:r}}=m.useIntelligentForm();return o.jsx(ze,{children:c.maybeRender(e,r.fields),...n})},Qe=t.ikp("button",{_id:"intelligentForm__PrimaryFormSubmit",type:"button",children:"Next"}),U=i=>{const{onClick:e,...n}=i,{submittedPrimaryForm:r,handleSubmitPrimaryForm:l}=m.useIntelligentForm();return o.jsx(Qe,{"data-submitted":c.dataAttr(r),onClick:u.composeEventHandlers(e,l),...n})},We=t.ikp("div",{_id:"intelligentForm__Field"}),Q=i=>{const{field:e,autoFocus:n,...r}=i,{control:l,errors:s}=m.useIntelligentForm();return o.jsx(Be.Controller,{name:e.name,control:l,rules:{required:e.isRequired?`${e.label} is required.`:void 0},render:({field:d})=>{const a=d.value!==void 0||e.inputType==="file";return o.jsx(I.IntelligentFormFieldProvider,{"data-invalid":c.dataAttr(!!s[e.name]),field:e,fieldProps:d,autoFocus:n,children:a&&o.jsx(We,{"data-input-type":e.inputType,"data-hidden":c.dataAttr(e.isHidden),...r})})}})},$e=t.ikp("label",{_id:"intelligentForm__FieldLabel"}),W=i=>{const{field:e}=I.useIntelligentFormField();return o.jsx($e,{"data-required":c.dataAttr(e.isRequired),htmlFor:e.name,children:e.label,...i})},Ge=t.ikp("input",{_id:"intelligentForm__FieldText",type:"text"}),f=F.forwardRef((i,e)=>{const{field:n,error:r,fieldProps:{onChange:l,onBlur:s,ref:d,...a},autoFocus:v}=I.useIntelligentFormField(),_=S.useComposedRefs(e,d);return o.jsx(Ge,{asChild:n.inputType==="textarea",ref:_,id:n.name,autoFocus:v,placeholder:"placeholder"in n?n.placeholder:void 0,"data-invalid":c.dataAttr(!!r),onChange:u.composeEventHandlers(i.onChange,l),onBlur:u.composeEventHandlers(i.onBlur,s),...a,...i,children:n.inputType==="textarea"?o.jsx(y,{minRows:3,maxRows:10}):null})}),$=t.ikp(f,{_id:"intelligentForm__FieldEmail",type:"email"}),Je=t.ikp("input",{_id:"intelligentForm__FieldFile",type:"file",multiple:!0}),G=i=>{const{field:e,error:n,fieldProps:{value:r,onChange:l,onBlur:s,...d},autoFocus:a}=I.useIntelligentFormField(),{onChange:v,onBlur:_,...b}=i,C=Re=>{const we=Re.target.files;l(we)};return o.jsx(Je,{id:e.name,autoFocus:a,"data-value":r,"data-invalid":c.dataAttr(!!n),...b,...d,onChange:u.composeEventHandlers(v,C),onBlur:u.composeEventHandlers(_,s)})},J=t.ikp(f,{_id:"intelligentForm__FieldTextArea",type:"textarea",asChild:!0,children:o.jsx(y,{rows:1,maxRows:8})}),Ke=t.ikp(R.Root,{_id:"intelligentForm__FieldCheckbox"}),K=i=>{const{field:e,error:n,fieldProps:r,autoFocus:l}=I.useIntelligentFormField(),{onCheckedChange:s,...d}=i;return o.jsx(Ke,{id:e.name,name:e.name,autoFocus:l,"data-invalid":c.dataAttr(!!n),checked:r.value,onCheckedChange:u.composeEventHandlers(s,r.onChange),...d})},X=t.ikp(R.Indicator,{_id:"intelligentForm__FieldCheckboxIndicator",children:o.jsx(He.CheckboxIcon,{})}),Xe=t.ikp(g.Root,{_id:"intelligentForm__FieldSelect"}),Y=i=>{const{field:e,error:n,fieldProps:r}=I.useIntelligentFormField(),{onValueChange:l,...s}=i;return o.jsx(Xe,{name:e.name,"data-invalid":c.dataAttr(!!n),value:r.value,onValueChange:u.composeEventHandlers(l,r.onChange),...s})},Z=t.ikp(g.Trigger,{_id:"intelligentForm__FieldSelect__Trigger"}),Ye=t.ikp(g.Value,{_id:"intelligentForm__FieldSelect__Value"}),ee=i=>{const{field:e}=I.useIntelligentFormField();return o.jsx(Ye,{placeholder:"placeholder"in e?e.placeholder:void 0,...i})},ie=t.ikp(g.Icon,{_id:"intelligentForm__FieldSelect__Icon",asChild:!0,children:o.jsx(p.BuiltInIconRenderer,{iconSettings:{builtIn:"LuChevronDown"}})}),te=t.ikp(g.Content,{_id:"intelligentForm__FieldSelect__Content",position:"popper"}),ne=t.ikp(g.Viewport,{_id:"intelligentForm__FieldSelect__Viewport"}),re=t.ikp(g.Item,{_id:"intelligentForm__FieldSelect__Item"}),oe=t.ikp(g.ItemText,{_id:"intelligentForm__FieldSelect__ItemText"}),le=t.ikp(g.ItemIndicator,{_id:"intelligentForm__FieldSelect__ItemIndicator",asChild:!0,children:o.jsx(p.BuiltInIconRenderer,{iconSettings:{builtIn:"LuCheck"}})}),Ze=t.ikp("span",{_id:"intelligentForm__FieldError"}),me=i=>{const{error:e}=I.useIntelligentFormField();return e?o.jsx(Ze,{children:e.message?.toString(),...i}):null},se=t.ikp("div",{_id:"intelligentForm__BotHeading"}),ce=t.ikp(p.BuiltInIconRenderer,{_id:"intelligentForm__BotHeading__Icon",iconSettings:{builtIn:"LuSparkles"}}),ei=t.ikp("div",{_id:"intelligentForm__BotHeading__Name"}),de=i=>{const{baseSettings:e}=x.useInkeepConfig(),{organizationDisplayName:n}=e??{},{formConfig:{aiAssistantName:r}}=m.useIntelligentForm();return o.jsx(ei,{children:r??n,...i})},ii=t.ikp("div",{_id:"intelligentForm__Loading"}),Fe=F.forwardRef(({...i},e)=>{const{loading:n}=m.useIntelligentForm(),r=F.useRef(null),l=S.useComposedRefs(e,r);return F.useEffect(()=>{n&&r.current&&r.current.scrollIntoView({behavior:"smooth",block:"nearest",inline:"nearest"})},[n]),n?o.jsx(ii,{ref:l,...i}):null}),ti=t.ikp("div",{_id:"intelligentForm__ConfidentResponse"}),ae=F.forwardRef(({...i},e)=>{const{aiResponse:n,loading:r}=m.useIntelligentForm(),l=F.useRef(null),s=S.useComposedRefs(e,l);return F.useEffect(()=>{!r&&n.answerConfidence&&l.current&&l.current.scrollIntoView({behavior:"smooth",block:"nearest",inline:"nearest"})},[r,n.answerConfidence]),n.answerConfidence?o.jsx(ti,{ref:s,...i}):null}),ni=t.ikp(Le.Markdown,{_id:"intelligentForm__ConfidentAnswer"}),ue=i=>{const{aiResponse:e}=m.useIntelligentForm();return o.jsx(ni,{shouldOpenLinksInNewTab:!0,children:e.answer,...i})},ri=t.ikp("button",{_id:"intelligentForm__ConfidentResponseButton",type:"button"}),ge=i=>{const{onClick:e,...n}=i,{showSecondaryFields:r,setShowSecondaryFields:l}=m.useIntelligentForm(),s=()=>{l(!0)};return o.jsx(ri,{"data-escalated":c.dataAttr(r),onClick:u.composeEventHandlers(e,s),...n})},Ie=t.ikp(p.BuiltInIconRenderer,{_id:"intelligentForm__ConfidentResponseButton__Icon",iconSettings:{builtIn:"LuUser"}}),_e=t.ikp("span",{_id:"intelligentForm__ConfidentResponseButton__Label",children:"Escalate to human"}),oi=t.ikp("div",{_id:"intelligentForm__SecondaryForm"}),pe=F.forwardRef(({...i},e)=>{const{showSecondaryFields:n}=m.useIntelligentForm(),r=F.useRef(null),l=S.useComposedRefs(e,r);return F.useEffect(()=>{n&&r.current&&r.current.scrollIntoView({behavior:"smooth",block:"nearest",inline:"nearest"})},[n]),n?o.jsx(oi,{ref:l,...i}):null}),li=t.ikp("p",{_id:"intelligentForm__SecondaryForm__Description"}),ve=i=>{const{formConfig:{secondary:e},aiResponse:{answerConfidence:n}}=m.useIntelligentForm();if(!e.description)return null;const r=typeof e.description=="string"?e.description:n?e.description.confident:e.description.default;return o.jsx(li,{children:r,...i})},mi=t.ikp("div",{_id:"intelligentForm__SecondaryFormFields"}),Pe=i=>{const{children:e,...n}=i,{formConfig:{secondary:r}}=m.useIntelligentForm();return o.jsx(mi,{children:c.maybeRender(e,r.fields),...n})},Se=t.ikp("button",{_id:"intelligentForm__SecondaryFormSubmit",type:"submit",children:"Submit"}),si=t.ikp("span",{_id:"intelligentForm__Error"}),fe=i=>{const{formError:e}=m.useIntelligentForm();return e?o.jsx(si,{children:e.message,...i}):null},Ce=t.ikp("div",{_id:"intelligentForm__Sources"}),he=t.ikp("p",{_id:"intelligentForm__SourcesCaption",children:"Here are the sources I considered:"}),ci=t.ikp("div",{_id:"intelligentForm__SourcesList"}),ke=i=>{const{children:e,...n}=i,{baseSettings:{transformSource:r,organizationDisplayName:l}}=x.useInkeepConfig(),{aiResponse:{recordsConsidered:s}}=m.useIntelligentForm();if(!s)return null;const d=s.reduce((a,v)=>{const _=r(v,"intelligentFormSource",{organizationDisplayName:l});return a.some(C=>C.url===_.url)||a.push(_),a},[]);return o.jsx(ci,{children:c.maybeRender(e,d),...n})},di=t.ikp(Ee.LinkWithQueryParams,{_id:"intelligentForm__Source"}),be=i=>{const{source:e,...n}=i;return o.jsx(h.SourceItemProvider,{source:{...e,isExternal:!!e.shouldOpenInNewTab},children:o.jsx(di,{"data-type":e.type,appendToUrl:e.appendToUrl,href:e.url,isExternal:e.shouldOpenInNewTab!==!1,...n})})},Fi=t.ikp(p.BuiltInIconRenderer,{_id:"intelligentForm__SourceIcon"}),ye=i=>{const{source:e}=h.useSourceItem();return o.jsx(Fi,{iconSettings:e.icon,"data-type":e.type,...i})},ai=t.ikp("span",{_id:"intelligentForm__SourceTitle"}),xe=i=>{const{source:e}=h.useSourceItem();return o.jsx(ai,{"data-type":e.type,children:e.title,...i})};exports.Provider=m.IntelligentFormProvider;exports.BotHeading=se;exports.BotHeadingIcon=ce;exports.BotHeadingName=de;exports.ConfidentAnswer=ue;exports.ConfidentResponse=ae;exports.ConfidentResponseButton=ge;exports.ConfidentResponseButtonIcon=Ie;exports.ConfidentResponseButtonLabel=_e;exports.Content=A;exports.ContentScrollArea=T;exports.ContentScrollAreaCorner=L;exports.ContentScrollAreaScrollbar=H;exports.ContentScrollAreaThumb=E;exports.ContentScrollAreaViewport=B;exports.Error=fe;exports.FormField=Q;exports.FormFieldCheckbox=K;exports.FormFieldCheckboxIndicator=X;exports.FormFieldEmail=$;exports.FormFieldError=me;exports.FormFieldFile=G;exports.FormFieldLabel=W;exports.FormFieldSelect=Y;exports.FormFieldSelectContent=te;exports.FormFieldSelectIcon=ie;exports.FormFieldSelectItem=re;exports.FormFieldSelectItemIndicator=le;exports.FormFieldSelectItemText=oe;exports.FormFieldSelectTrigger=Z;exports.FormFieldSelectValue=ee;exports.FormFieldSelectViewport=ne;exports.FormFieldText=f;exports.FormFieldTextArea=J;exports.Heading=j;exports.IntelligentFormPrimitiveBotHeading=se;exports.IntelligentFormPrimitiveBotHeadingIcon=ce;exports.IntelligentFormPrimitiveBotHeadingName=de;exports.IntelligentFormPrimitiveConfidentAnswer=ue;exports.IntelligentFormPrimitiveConfidentResponse=ae;exports.IntelligentFormPrimitiveConfidentResponseButton=ge;exports.IntelligentFormPrimitiveConfidentResponseButtonIcon=Ie;exports.IntelligentFormPrimitiveConfidentResponseButtonLabel=_e;exports.IntelligentFormPrimitiveContent=A;exports.IntelligentFormPrimitiveContentScrollArea=T;exports.IntelligentFormPrimitiveContentScrollAreaCorner=L;exports.IntelligentFormPrimitiveContentScrollAreaScrollbar=H;exports.IntelligentFormPrimitiveContentScrollAreaThumb=E;exports.IntelligentFormPrimitiveContentScrollAreaViewport=B;exports.IntelligentFormPrimitiveFormError=fe;exports.IntelligentFormPrimitiveFormField=Q;exports.IntelligentFormPrimitiveFormFieldCheckbox=K;exports.IntelligentFormPrimitiveFormFieldCheckboxIndicator=X;exports.IntelligentFormPrimitiveFormFieldEmail=$;exports.IntelligentFormPrimitiveFormFieldError=me;exports.IntelligentFormPrimitiveFormFieldFile=G;exports.IntelligentFormPrimitiveFormFieldLabel=W;exports.IntelligentFormPrimitiveFormFieldSelect=Y;exports.IntelligentFormPrimitiveFormFieldSelectContent=te;exports.IntelligentFormPrimitiveFormFieldSelectIcon=ie;exports.IntelligentFormPrimitiveFormFieldSelectItem=re;exports.IntelligentFormPrimitiveFormFieldSelectItemIndicator=le;exports.IntelligentFormPrimitiveFormFieldSelectItemText=oe;exports.IntelligentFormPrimitiveFormFieldSelectTrigger=Z;exports.IntelligentFormPrimitiveFormFieldSelectValue=ee;exports.IntelligentFormPrimitiveFormFieldSelectViewport=ne;exports.IntelligentFormPrimitiveFormFieldText=f;exports.IntelligentFormPrimitiveFormFieldTextArea=J;exports.IntelligentFormPrimitiveHeading=j;exports.IntelligentFormPrimitiveLoading=Fe;exports.IntelligentFormPrimitivePrimaryForm=O;exports.IntelligentFormPrimitivePrimaryFormDescription=M;exports.IntelligentFormPrimitivePrimaryFormFields=z;exports.IntelligentFormPrimitivePrimaryFormSubmit=U;exports.IntelligentFormPrimitiveRoot=w;exports.IntelligentFormPrimitiveSecondaryForm=pe;exports.IntelligentFormPrimitiveSecondaryFormDescription=ve;exports.IntelligentFormPrimitiveSecondaryFormFields=Pe;exports.IntelligentFormPrimitiveSecondaryFormSubmit=Se;exports.IntelligentFormPrimitiveSource=be;exports.IntelligentFormPrimitiveSourceIcon=ye;exports.IntelligentFormPrimitiveSourceTitle=xe;exports.IntelligentFormPrimitiveSources=Ce;exports.IntelligentFormPrimitiveSourcesCaption=he;exports.IntelligentFormPrimitiveSourcesList=ke;exports.IntelligentFormPrimitiveSuccess=V;exports.IntelligentFormPrimitiveSuccessHeading=D;exports.IntelligentFormPrimitiveSuccessIcon=q;exports.IntelligentFormPrimitiveSuccessMessage=N;exports.Loading=Fe;exports.PrimaryForm=O;exports.PrimaryFormDescription=M;exports.PrimaryFormFields=z;exports.PrimaryFormSubmit=U;exports.Root=w;exports.SecondaryForm=pe;exports.SecondaryFormDescription=ve;exports.SecondaryFormFields=Pe;exports.SecondaryFormSubmit=Se;exports.Source=be;exports.SourceIcon=ye;exports.SourceTitle=xe;exports.Sources=Ce;exports.SourcesCaption=he;exports.SourcesList=ke;exports.Success=V;exports.SuccessHeading=D;exports.SuccessIcon=q;exports.SuccessMessage=N;
@@ -49,11 +49,11 @@ export interface IntelligentFormPrimitiveFormFieldProps extends ComponentPropsWi
49
49
  export declare const IntelligentFormPrimitiveFormField: (props: IntelligentFormPrimitiveFormFieldProps) => import("react/jsx-runtime").JSX.Element;
50
50
  declare const PrimitiveFormFieldLabel: ForwardRefExoticComponent< PolymorphicProps & Omit< DetailedHTMLProps<LabelHTMLAttributes<HTMLLabelElement>, HTMLLabelElement>, "_id"> & Partial<Pick< DetailedHTMLProps<LabelHTMLAttributes<HTMLLabelElement>, HTMLLabelElement>, "_id">>>;
51
51
  export declare const IntelligentFormPrimitiveFormFieldLabel: (props: ComponentPropsWithRef<typeof PrimitiveFormFieldLabel>) => import("react/jsx-runtime").JSX.Element;
52
- export declare const IntelligentFormPrimitiveFormFieldText: ForwardRefExoticComponent<Omit< PolymorphicProps & Omit< DetailedHTMLProps<InputHTMLAttributes<HTMLInputElement>, HTMLInputElement>, "type" | "_id"> & Partial<Pick< DetailedHTMLProps<InputHTMLAttributes<HTMLInputElement>, HTMLInputElement>, "type" | "_id">>, "ref"> & RefAttributes<HTMLInputElement | HTMLTextAreaElement>>;
53
- export declare const IntelligentFormPrimitiveFormFieldEmail: ForwardRefExoticComponent< PolymorphicProps & Omit<Omit< PolymorphicProps & Omit< DetailedHTMLProps<InputHTMLAttributes<HTMLInputElement>, HTMLInputElement>, "type" | "_id"> & Partial<Pick< DetailedHTMLProps<InputHTMLAttributes<HTMLInputElement>, HTMLInputElement>, "type" | "_id">>, "ref"> & RefAttributes<HTMLInputElement | HTMLTextAreaElement>, "type" | "_id"> & Partial<Pick<Omit< PolymorphicProps & Omit< DetailedHTMLProps<InputHTMLAttributes<HTMLInputElement>, HTMLInputElement>, "type" | "_id"> & Partial<Pick< DetailedHTMLProps<InputHTMLAttributes<HTMLInputElement>, HTMLInputElement>, "type" | "_id">>, "ref"> & RefAttributes<HTMLInputElement | HTMLTextAreaElement>, "type" | "_id">>>;
52
+ export declare const IntelligentFormPrimitiveFormFieldText: ForwardRefExoticComponent<Omit< PolymorphicProps & Omit< DetailedHTMLProps<InputHTMLAttributes<HTMLInputElement>, HTMLInputElement>, "type" | "_id"> & Partial<Pick< DetailedHTMLProps<InputHTMLAttributes<HTMLInputElement>, HTMLInputElement>, "type" | "_id">>, "ref"> & RefAttributes<HTMLTextAreaElement | HTMLInputElement>>;
53
+ export declare const IntelligentFormPrimitiveFormFieldEmail: ForwardRefExoticComponent< PolymorphicProps & Omit<Omit< PolymorphicProps & Omit< DetailedHTMLProps<InputHTMLAttributes<HTMLInputElement>, HTMLInputElement>, "type" | "_id"> & Partial<Pick< DetailedHTMLProps<InputHTMLAttributes<HTMLInputElement>, HTMLInputElement>, "type" | "_id">>, "ref"> & RefAttributes<HTMLTextAreaElement | HTMLInputElement>, "type" | "_id"> & Partial<Pick<Omit< PolymorphicProps & Omit< DetailedHTMLProps<InputHTMLAttributes<HTMLInputElement>, HTMLInputElement>, "type" | "_id"> & Partial<Pick< DetailedHTMLProps<InputHTMLAttributes<HTMLInputElement>, HTMLInputElement>, "type" | "_id">>, "ref"> & RefAttributes<HTMLTextAreaElement | HTMLInputElement>, "type" | "_id">>>;
54
54
  declare const PrimitiveFormFieldFile: ForwardRefExoticComponent< PolymorphicProps & Omit< DetailedHTMLProps<InputHTMLAttributes<HTMLInputElement>, HTMLInputElement>, "type" | "multiple" | "_id"> & Partial<Pick< DetailedHTMLProps<InputHTMLAttributes<HTMLInputElement>, HTMLInputElement>, "type" | "multiple" | "_id">>>;
55
55
  export declare const IntelligentFormPrimitiveFormFieldFile: (props: ComponentPropsWithRef<typeof PrimitiveFormFieldFile>) => import("react/jsx-runtime").JSX.Element;
56
- export declare const IntelligentFormPrimitiveFormFieldTextArea: ForwardRefExoticComponent< PolymorphicProps & Omit<Omit< PolymorphicProps & Omit< DetailedHTMLProps<InputHTMLAttributes<HTMLInputElement>, HTMLInputElement>, "type" | "_id"> & Partial<Pick< DetailedHTMLProps<InputHTMLAttributes<HTMLInputElement>, HTMLInputElement>, "type" | "_id">>, "ref"> & RefAttributes<HTMLInputElement | HTMLTextAreaElement>, "type" | "children" | "asChild" | "_id"> & Partial<Pick<Omit< PolymorphicProps & Omit< DetailedHTMLProps<InputHTMLAttributes<HTMLInputElement>, HTMLInputElement>, "type" | "_id"> & Partial<Pick< DetailedHTMLProps<InputHTMLAttributes<HTMLInputElement>, HTMLInputElement>, "type" | "_id">>, "ref"> & RefAttributes<HTMLInputElement | HTMLTextAreaElement>, "type" | "children" | "asChild" | "_id">>>;
56
+ export declare const IntelligentFormPrimitiveFormFieldTextArea: ForwardRefExoticComponent< PolymorphicProps & Omit<Omit< PolymorphicProps & Omit< DetailedHTMLProps<InputHTMLAttributes<HTMLInputElement>, HTMLInputElement>, "type" | "_id"> & Partial<Pick< DetailedHTMLProps<InputHTMLAttributes<HTMLInputElement>, HTMLInputElement>, "type" | "_id">>, "ref"> & RefAttributes<HTMLTextAreaElement | HTMLInputElement>, "type" | "children" | "asChild" | "_id"> & Partial<Pick<Omit< PolymorphicProps & Omit< DetailedHTMLProps<InputHTMLAttributes<HTMLInputElement>, HTMLInputElement>, "type" | "_id"> & Partial<Pick< DetailedHTMLProps<InputHTMLAttributes<HTMLInputElement>, HTMLInputElement>, "type" | "_id">>, "ref"> & RefAttributes<HTMLTextAreaElement | HTMLInputElement>, "type" | "children" | "asChild" | "_id">>>;
57
57
  declare const PrimitiveFormFieldCheckbox: ForwardRefExoticComponent< PolymorphicProps & Omit<CheckboxPrimitive.CheckboxProps & RefAttributes<HTMLButtonElement>, "_id"> & Partial<Pick<CheckboxPrimitive.CheckboxProps & RefAttributes<HTMLButtonElement>, "_id">>>;
58
58
  export declare const IntelligentFormPrimitiveFormFieldCheckbox: (props: ComponentPropsWithRef<typeof PrimitiveFormFieldCheckbox>) => import("react/jsx-runtime").JSX.Element;
59
59
  export declare const IntelligentFormPrimitiveFormFieldCheckboxIndicator: ForwardRefExoticComponent< PolymorphicProps & Omit<CheckboxPrimitive.CheckboxIndicatorProps & RefAttributes<HTMLSpanElement>, "children" | "_id"> & Partial<Pick<CheckboxPrimitive.CheckboxIndicatorProps & RefAttributes<HTMLSpanElement>, "children" | "_id">>>;
@@ -49,11 +49,11 @@ export interface IntelligentFormPrimitiveFormFieldProps extends ComponentPropsWi
49
49
  export declare const IntelligentFormPrimitiveFormField: (props: IntelligentFormPrimitiveFormFieldProps) => import("react/jsx-runtime").JSX.Element;
50
50
  declare const PrimitiveFormFieldLabel: ForwardRefExoticComponent< PolymorphicProps & Omit< DetailedHTMLProps<LabelHTMLAttributes<HTMLLabelElement>, HTMLLabelElement>, "_id"> & Partial<Pick< DetailedHTMLProps<LabelHTMLAttributes<HTMLLabelElement>, HTMLLabelElement>, "_id">>>;
51
51
  export declare const IntelligentFormPrimitiveFormFieldLabel: (props: ComponentPropsWithRef<typeof PrimitiveFormFieldLabel>) => import("react/jsx-runtime").JSX.Element;
52
- export declare const IntelligentFormPrimitiveFormFieldText: ForwardRefExoticComponent<Omit< PolymorphicProps & Omit< DetailedHTMLProps<InputHTMLAttributes<HTMLInputElement>, HTMLInputElement>, "type" | "_id"> & Partial<Pick< DetailedHTMLProps<InputHTMLAttributes<HTMLInputElement>, HTMLInputElement>, "type" | "_id">>, "ref"> & RefAttributes<HTMLInputElement | HTMLTextAreaElement>>;
53
- export declare const IntelligentFormPrimitiveFormFieldEmail: ForwardRefExoticComponent< PolymorphicProps & Omit<Omit< PolymorphicProps & Omit< DetailedHTMLProps<InputHTMLAttributes<HTMLInputElement>, HTMLInputElement>, "type" | "_id"> & Partial<Pick< DetailedHTMLProps<InputHTMLAttributes<HTMLInputElement>, HTMLInputElement>, "type" | "_id">>, "ref"> & RefAttributes<HTMLInputElement | HTMLTextAreaElement>, "type" | "_id"> & Partial<Pick<Omit< PolymorphicProps & Omit< DetailedHTMLProps<InputHTMLAttributes<HTMLInputElement>, HTMLInputElement>, "type" | "_id"> & Partial<Pick< DetailedHTMLProps<InputHTMLAttributes<HTMLInputElement>, HTMLInputElement>, "type" | "_id">>, "ref"> & RefAttributes<HTMLInputElement | HTMLTextAreaElement>, "type" | "_id">>>;
52
+ export declare const IntelligentFormPrimitiveFormFieldText: ForwardRefExoticComponent<Omit< PolymorphicProps & Omit< DetailedHTMLProps<InputHTMLAttributes<HTMLInputElement>, HTMLInputElement>, "type" | "_id"> & Partial<Pick< DetailedHTMLProps<InputHTMLAttributes<HTMLInputElement>, HTMLInputElement>, "type" | "_id">>, "ref"> & RefAttributes<HTMLTextAreaElement | HTMLInputElement>>;
53
+ export declare const IntelligentFormPrimitiveFormFieldEmail: ForwardRefExoticComponent< PolymorphicProps & Omit<Omit< PolymorphicProps & Omit< DetailedHTMLProps<InputHTMLAttributes<HTMLInputElement>, HTMLInputElement>, "type" | "_id"> & Partial<Pick< DetailedHTMLProps<InputHTMLAttributes<HTMLInputElement>, HTMLInputElement>, "type" | "_id">>, "ref"> & RefAttributes<HTMLTextAreaElement | HTMLInputElement>, "type" | "_id"> & Partial<Pick<Omit< PolymorphicProps & Omit< DetailedHTMLProps<InputHTMLAttributes<HTMLInputElement>, HTMLInputElement>, "type" | "_id"> & Partial<Pick< DetailedHTMLProps<InputHTMLAttributes<HTMLInputElement>, HTMLInputElement>, "type" | "_id">>, "ref"> & RefAttributes<HTMLTextAreaElement | HTMLInputElement>, "type" | "_id">>>;
54
54
  declare const PrimitiveFormFieldFile: ForwardRefExoticComponent< PolymorphicProps & Omit< DetailedHTMLProps<InputHTMLAttributes<HTMLInputElement>, HTMLInputElement>, "type" | "multiple" | "_id"> & Partial<Pick< DetailedHTMLProps<InputHTMLAttributes<HTMLInputElement>, HTMLInputElement>, "type" | "multiple" | "_id">>>;
55
55
  export declare const IntelligentFormPrimitiveFormFieldFile: (props: ComponentPropsWithRef<typeof PrimitiveFormFieldFile>) => import("react/jsx-runtime").JSX.Element;
56
- export declare const IntelligentFormPrimitiveFormFieldTextArea: ForwardRefExoticComponent< PolymorphicProps & Omit<Omit< PolymorphicProps & Omit< DetailedHTMLProps<InputHTMLAttributes<HTMLInputElement>, HTMLInputElement>, "type" | "_id"> & Partial<Pick< DetailedHTMLProps<InputHTMLAttributes<HTMLInputElement>, HTMLInputElement>, "type" | "_id">>, "ref"> & RefAttributes<HTMLInputElement | HTMLTextAreaElement>, "type" | "children" | "asChild" | "_id"> & Partial<Pick<Omit< PolymorphicProps & Omit< DetailedHTMLProps<InputHTMLAttributes<HTMLInputElement>, HTMLInputElement>, "type" | "_id"> & Partial<Pick< DetailedHTMLProps<InputHTMLAttributes<HTMLInputElement>, HTMLInputElement>, "type" | "_id">>, "ref"> & RefAttributes<HTMLInputElement | HTMLTextAreaElement>, "type" | "children" | "asChild" | "_id">>>;
56
+ export declare const IntelligentFormPrimitiveFormFieldTextArea: ForwardRefExoticComponent< PolymorphicProps & Omit<Omit< PolymorphicProps & Omit< DetailedHTMLProps<InputHTMLAttributes<HTMLInputElement>, HTMLInputElement>, "type" | "_id"> & Partial<Pick< DetailedHTMLProps<InputHTMLAttributes<HTMLInputElement>, HTMLInputElement>, "type" | "_id">>, "ref"> & RefAttributes<HTMLTextAreaElement | HTMLInputElement>, "type" | "children" | "asChild" | "_id"> & Partial<Pick<Omit< PolymorphicProps & Omit< DetailedHTMLProps<InputHTMLAttributes<HTMLInputElement>, HTMLInputElement>, "type" | "_id"> & Partial<Pick< DetailedHTMLProps<InputHTMLAttributes<HTMLInputElement>, HTMLInputElement>, "type" | "_id">>, "ref"> & RefAttributes<HTMLTextAreaElement | HTMLInputElement>, "type" | "children" | "asChild" | "_id">>>;
57
57
  declare const PrimitiveFormFieldCheckbox: ForwardRefExoticComponent< PolymorphicProps & Omit<CheckboxPrimitive.CheckboxProps & RefAttributes<HTMLButtonElement>, "_id"> & Partial<Pick<CheckboxPrimitive.CheckboxProps & RefAttributes<HTMLButtonElement>, "_id">>>;
58
58
  export declare const IntelligentFormPrimitiveFormFieldCheckbox: (props: ComponentPropsWithRef<typeof PrimitiveFormFieldCheckbox>) => import("react/jsx-runtime").JSX.Element;
59
59
  export declare const IntelligentFormPrimitiveFormFieldCheckboxIndicator: ForwardRefExoticComponent< PolymorphicProps & Omit<CheckboxPrimitive.CheckboxIndicatorProps & RefAttributes<HTMLSpanElement>, "children" | "_id"> & Partial<Pick<CheckboxPrimitive.CheckboxIndicatorProps & RefAttributes<HTMLSpanElement>, "children" | "_id">>>;