@inkeep/cxkit-react 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 +1 @@
1
- "use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),d=require("@inkeep/cxkit-styled"),h=require("react"),l=require("./widget-toggle.cjs"),C=require("./modal.cjs");function x(a){const{baseSettings:t,aiChatSettings:s}=a;return e.jsx(d.ErrorBoundary,{children:e.jsx(d.Shadow,{wrapperStyles:{height:"inherit",width:"inherit"},children:e.jsx(d.RootProvider,{config:{baseSettings:t,aiChatSettings:s},componentType:d.WebWidgetInteractionType.EmbeddedChat,children:e.jsx(c,{...a})})})})}function o(a){const{children:t,onToggleView:s,isHidden:n,shouldAutoFocusInput:r=!s}=a;return e.jsx(d.EmbeddedChat.Provider,{isHidden:n,shouldAutoFocusInput:r,children:t})}function c(a){return e.jsx(o,{...a,children:e.jsx(i,{...a})})}function i(a){const{onToggleView:t,variant:s,header:n=j}=a,r=d.useModal(),m=d.useWidget(),b=r&&!m?C.ModalContent:h.Fragment;return e.jsx(b,{children:e.jsxs(d.EmbeddedChat.Wrapper,{variant:s??(t?"no-shadow":"container-with-shadow"),"data-composite":d.dataAttr(!!a.onToggleView||r?.isOpen),children:[e.jsx(d.EmbeddedChat.ConversationLoading,{}),e.jsxs(d.EmbeddedChat.Root,{children:[e.jsx(n,{...a}),e.jsx(E,{}),e.jsx(M,{})]}),e.jsx(B,{}),e.jsx(S,{})]})})}function j(a){const{onToggleView:t,askAILabel:s,searchLabel:n}=a,r=!!t;return e.jsx(d.EmbeddedChat.Header,{"data-show-toolbar":d.dataAttr(r),children:r?e.jsxs(d.EmbeddedChat.HeaderToolbar,{children:[e.jsxs(d.EmbeddedChat.HeaderToolbarWrapper,{children:[e.jsx(d.EmbeddedChat.ToolbarHeader,{}),e.jsxs(d.EmbeddedChat.Disclaimer,{children:[e.jsx(d.EmbeddedChat.DisclaimerTrigger,{}),e.jsxs(d.EmbeddedChat.DisclaimerContent,{side:"bottom",align:"start",children:[e.jsx(d.EmbeddedChat.DisclaimerText,{}),e.jsx(d.EmbeddedChat.DisclaimerArrow,{})]})]})]}),e.jsx(l.WidgetToggle,{onToggleView:t,askAILabel:s,searchLabel:n,view:"chat"}),e.jsx(d.Modal.Close,{})]}):e.jsx(d.Modal.Close,{})})}function E(){return e.jsx(d.EmbeddedChat.Content,{children:e.jsxs(d.EmbeddedChat.ContentScrollArea,{children:[e.jsx(d.EmbeddedChat.ContentScrollAreaViewport,{children:e.jsx(F,{})}),e.jsx(d.EmbeddedChat.ContentScrollAreaScrollbar,{children:e.jsx(d.EmbeddedChat.ContentScrollAreaThumb,{})}),e.jsx(d.EmbeddedChat.ContentScrollAreaCorner,{})]})})}function F(){return e.jsx(d.EmbeddedChat.Messages,{children:({messages:a})=>e.jsxs(e.Fragment,{children:[e.jsx(u,{}),a.map(t=>e.jsxs(d.EmbeddedChat.MessageWrapper,{message:t,children:[e.jsx(g,{}),e.jsx(d.EmbeddedChat.MessageLoading,{}),e.jsxs(d.EmbeddedChat.MessageContentWrapper,{children:[e.jsx(d.EmbeddedChat.MessageContent,{children:e.jsx(d.EmbeddedChat.Message,{})}),e.jsx(p,{}),e.jsx(A,{}),e.jsx(I,{})]})]},t.id))]})})}function u(){return e.jsxs(d.EmbeddedChat.IntroMessageWrapper,{children:[e.jsxs(d.EmbeddedChat.MessageHeader,{children:[e.jsx(d.EmbeddedChat.MessageAvatar,{children:e.jsxs(d.EmbeddedChat.MessageAvatarContent,{children:[e.jsx(d.EmbeddedChat.MessageAvatarFallback,{}),e.jsx(d.EmbeddedChat.MessageAvatarImage,{})]})}),e.jsx(d.EmbeddedChat.MessageName,{})]}),e.jsxs(d.EmbeddedChat.MessageContentWrapper,{children:[e.jsx(d.EmbeddedChat.MessageContent,{children:e.jsx(d.EmbeddedChat.Message,{})}),e.jsxs(d.EmbeddedChat.Disclaimer,{children:[e.jsx(d.EmbeddedChat.DisclaimerLabel,{}),e.jsx(d.EmbeddedChat.DisclaimerTrigger,{}),e.jsxs(d.EmbeddedChat.DisclaimerContent,{children:[e.jsx(d.EmbeddedChat.DisclaimerText,{}),e.jsx(d.EmbeddedChat.DisclaimerArrow,{})]})]}),e.jsxs(d.EmbeddedChat.ExampleQuestions,{children:[e.jsx(d.EmbeddedChat.ExampleQuestionsLabel,{}),e.jsx(d.EmbeddedChat.ExampleQuestionsList,{children:a=>a.map(t=>e.jsx(d.EmbeddedChat.ExampleQuestion,{children:e.jsx(d.EmbeddedChat.ExampleQuestionButton,{question:t})},t))})]})]})]})}function g(){return e.jsxs(d.EmbeddedChat.MessageHeader,{children:[e.jsx(d.EmbeddedChat.MessageAvatar,{children:e.jsxs(d.EmbeddedChat.MessageAvatarContent,{children:[e.jsx(d.EmbeddedChat.MessageAvatarFallback,{}),e.jsx(d.EmbeddedChat.MessageAvatarImage,{})]})}),e.jsx(d.EmbeddedChat.MessageName,{})]})}function p(){return e.jsxs(d.EmbeddedChat.MessageAttachments,{children:[e.jsx(d.EmbeddedChat.MessageAttachmentsList,{children:a=>a.map(t=>e.jsxs(d.EmbeddedChat.MessageAttachmentsItem,{attachment:t,children:[e.jsx(d.EmbeddedChat.MessageAttachmentsItemIcon,{}),e.jsx(d.EmbeddedChat.MessageAttachmentsItemTitle,{})]},t.id))}),e.jsx(d.EmbeddedChat.MessageAttachmentsPreview,{children:e.jsx(d.PortalWithTheme,{children:e.jsx(d.EmbeddedChat.MessageAttachmentsPreviewOverlay,{children:e.jsxs(d.EmbeddedChat.MessageAttachmentsPreviewContent,{children:[e.jsx(d.EmbeddedChat.MessageAttachmentsPreviewHeader,{}),e.jsx(d.EmbeddedChat.MessageAttachmentsPreviewClose,{}),e.jsx(d.EmbeddedChat.MessageAttachmentsPreviewBody,{})]})})})})]})}function A(){return e.jsxs(d.EmbeddedChat.MessageToolbar,{children:[e.jsx(d.EmbeddedChat.MessageToolActions,{children:a=>a.map((t,s)=>e.jsx(d.EmbeddedChat.MessageToolAction,{action:t},`action-${s}`))}),e.jsx(d.EmbeddedChat.MessageAction,{action:"copy"}),e.jsx(d.EmbeddedChat.MessageAction,{action:"upvote"}),e.jsx(d.EmbeddedChat.MessageAction,{action:"downvote"})]})}function I(){return e.jsxs(d.EmbeddedChat.MessageSources,{children:[e.jsx(d.EmbeddedChat.MessageSourcesHeader,{}),e.jsx(d.EmbeddedChat.MessageSourcesList,{children:a=>a.map((t,s)=>e.jsxs(d.EmbeddedChat.MessageSourceItem,{href:t.url,source:t,children:[e.jsx(d.EmbeddedChat.MessageSourceItemBreadcrumbs,{children:t.breadcrumbs?.map(n=>e.jsxs(h.Fragment,{children:[n,e.jsx(d.EmbeddedChat.MessageSourceItemBreadcrumbIcon,{})]},n))}),e.jsx(d.EmbeddedChat.MessageSourceItemIcon,{}),e.jsx(d.EmbeddedChat.MessageSourceItemTitle,{}),e.jsx(d.EmbeddedChat.MessageSourceItemTag,{}),e.jsx(d.EmbeddedChat.MessageSourceItemDescription,{children:n=>n.map((r,m)=>e.jsx(d.EmbeddedChat.MessageSourceItemDescriptionPart,{part:r},`part-${m}`))}),e.jsx(d.EmbeddedChat.MessageSourceItemIndicator,{})]},s))})]})}function M(){return e.jsxs(d.EmbeddedChat.Footer,{children:[e.jsx(T,{}),e.jsx(k,{})]})}function T(){return e.jsxs(d.EmbeddedChat.InputFieldset,{children:[e.jsxs(d.EmbeddedChat.InputGroup,{children:[e.jsx(d.EmbeddedChat.Input,{}),e.jsx(d.EmbeddedChat.SendButton,{children:e.jsx(d.EmbeddedChat.SendButtonIcon,{})})]}),e.jsxs(d.EmbeddedChat.AttachmentsBar,{children:[e.jsx(d.EmbeddedChat.AttachmentsBarList,{children:a=>a.map(t=>e.jsxs(d.EmbeddedChat.AttachmentsBarAttachment,{attachment:t,children:[e.jsx(d.EmbeddedChat.AttachmentsBarAttachmentIcon,{}),e.jsx(d.EmbeddedChat.AttachmentsBarAttachmentTitle,{}),e.jsx(d.EmbeddedChat.AttachmentsBarAttachmentDelete,{})]},t.id))}),e.jsxs(d.EmbeddedChat.AttachmentsBarActions,{children:[e.jsxs(d.EmbeddedChat.AttachmentsBarInfoTip,{children:[e.jsx(d.EmbeddedChat.AttachmentsBarInfoTipIcon,{}),e.jsx(d.EmbeddedChat.AttachmentsBarInfoTipText,{})]}),e.jsx(d.EmbeddedChat.AttachmentsBarInputs,{children:a=>a.map(t=>e.jsx(d.EmbeddedChat.AttachmentsBarInput,{input:t,children:t.displayName},t.id))})]}),e.jsx(d.PortalWithTheme,{children:e.jsx(d.EmbeddedChat.AttachmentsBarModal,{children:e.jsx(d.EmbeddedChat.AttachmentsBarModalOverlay,{children:e.jsxs(d.EmbeddedChat.AttachmentsBarModalContent,{children:[e.jsxs(d.EmbeddedChat.AttachmentsBarModalHeader,{children:[e.jsx(d.EmbeddedChat.AttachmentsBarModalHeading,{}),e.jsx(d.EmbeddedChat.AttachmentsBarModalDescription,{}),e.jsx(d.EmbeddedChat.AttachmentsBarModalHelp,{})]}),e.jsx(d.EmbeddedChat.AttachmentsBarModalClose,{}),e.jsx(d.EmbeddedChat.AttachmentsBarModalBody,{children:e.jsxs(d.EmbeddedChat.AttachmentsBarForm,{children:[e.jsxs(d.EmbeddedChat.AttachmentsBarFormTitle,{children:[e.jsx(d.EmbeddedChat.AttachmentsBarFormTitleLabel,{}),e.jsx(d.EmbeddedChat.AttachmentsBarFormTitleInput,{}),e.jsx(d.EmbeddedChat.AttachmentsBarFormTitleError,{})]}),e.jsxs(d.EmbeddedChat.AttachmentsBarFormContent,{children:[e.jsx(d.EmbeddedChat.AttachmentsBarFormContentLabel,{}),e.jsx(d.EmbeddedChat.AttachmentsBarFormContentInput,{}),e.jsx(d.EmbeddedChat.AttachmentsBarFormContentError,{})]}),e.jsx(d.EmbeddedChat.AttachmentsBarFormSubmitButton,{})]})})]})})})})]})]})}function k(){return e.jsxs(d.EmbeddedChat.ActionBar,{children:[e.jsxs(d.EmbeddedChat.TaglineContainer,{children:[e.jsx(d.EmbeddedChat.TaglineText,{}),e.jsx(d.EmbeddedChat.TaglineLogo,{}),e.jsx(d.EmbeddedChat.TaglineBrandName,{})]}),e.jsxs(d.EmbeddedChat.Actions,{children:[e.jsx(d.EmbeddedChat.HelpActions,{children:({pinned:a,unpinned:t})=>e.jsxs(e.Fragment,{children:[a.map(s=>e.jsx(d.EmbeddedChat.HelpAction,{action:s},s.name)),t.length>0&&e.jsx(d.EmbeddedChat.HelpActionsTrigger,{}),e.jsxs(d.EmbeddedChat.HelpActionsMenu,{children:[e.jsx(d.EmbeddedChat.HelpActionsMenuArrow,{}),t.map(s=>e.jsxs(d.EmbeddedChat.HelpActionsMenuItem,{action:s,children:[e.jsx(d.EmbeddedChat.HelpActionsMenuItemIcon,{action:s}),s.name]},s.name))]})]})}),e.jsxs(d.EmbeddedChat.ChatAction,{action:"copy",children:[e.jsx(d.EmbeddedChat.ChatActionLabel,{action:"copy"}),e.jsx(d.EmbeddedChat.ChatActionFeedback,{action:"copy"})]}),e.jsxs(d.EmbeddedChat.ChatAction,{action:"share",children:[e.jsx(d.EmbeddedChat.ChatActionLabel,{action:"share"}),e.jsx(d.EmbeddedChat.ChatActionFeedback,{action:"share"})]}),e.jsx(d.EmbeddedChat.ChatAction,{action:"clear"}),e.jsx(d.EmbeddedChat.ChatAction,{action:"stop"})]})]})}function B(){return e.jsx(d.PortalWithTheme,{children:e.jsx(d.EmbeddedChat.FeedbackModal,{children:e.jsx(d.EmbeddedChat.FeedbackModalOverlay,{children:e.jsxs(d.EmbeddedChat.FeedbackModalContent,{children:[e.jsx(d.EmbeddedChat.FeedbackModalHeader,{}),e.jsx(d.EmbeddedChat.FeedbackModalClose,{}),e.jsx(d.EmbeddedChat.FeedbackModalBody,{children:e.jsxs(d.EmbeddedChat.FeedbackForm,{children:[e.jsxs(d.EmbeddedChat.FeedbackItem,{name:"unrelated_response",children:[e.jsx(d.EmbeddedChat.FeedbackItemCheckbox,{children:e.jsx(d.EmbeddedChat.FeedbackItemCheckboxIndicator,{})}),e.jsx(d.EmbeddedChat.FeedbackItemLabel,{}),e.jsx(d.EmbeddedChat.FeedbackItemDescription,{})]}),e.jsxs(d.EmbeddedChat.FeedbackItem,{name:"inaccurate_statement",children:[e.jsx(d.EmbeddedChat.FeedbackItemCheckbox,{children:e.jsx(d.EmbeddedChat.FeedbackItemCheckboxIndicator,{})}),e.jsx(d.EmbeddedChat.FeedbackItemLabel,{}),e.jsx(d.EmbeddedChat.FeedbackItemDescription,{})]}),e.jsxs(d.EmbeddedChat.FeedbackItem,{name:"inaccurate_code_snippet",children:[e.jsx(d.EmbeddedChat.FeedbackItemCheckbox,{children:e.jsx(d.EmbeddedChat.FeedbackItemCheckboxIndicator,{})}),e.jsx(d.EmbeddedChat.FeedbackItemLabel,{}),e.jsx(d.EmbeddedChat.FeedbackItemDescription,{})]}),e.jsxs(d.EmbeddedChat.FeedbackItem,{name:"irrelevant_citations",children:[e.jsx(d.EmbeddedChat.FeedbackItemCheckbox,{children:e.jsx(d.EmbeddedChat.FeedbackItemCheckboxIndicator,{})}),e.jsx(d.EmbeddedChat.FeedbackItemLabel,{})]}),e.jsx(d.EmbeddedChat.FeedbackSubmitButton,{})]})})]})})})})}function S(){return e.jsxs(d.EmbeddedChat.FormWrapper,{children:[e.jsx(d.EmbeddedChat.FormClose,{}),e.jsxs(d.EmbeddedChat.Form,{children:[e.jsxs(d.EmbeddedChat.FormHeader,{children:[e.jsx(d.EmbeddedChat.FormHeading,{}),e.jsx(d.EmbeddedChat.FormDescription,{})]}),e.jsx(d.EmbeddedChat.FormContent,{children:a=>e.jsxs(e.Fragment,{children:[a.map((t,s)=>e.jsxs(d.EmbeddedChat.FormField,{field:t,autoFocus:s===0,children:[e.jsx(d.EmbeddedChat.FormFieldLabel,{}),t.inputType==="text"&&e.jsx(d.EmbeddedChat.FormFieldText,{}),t.inputType==="email"&&e.jsx(d.EmbeddedChat.FormFieldEmail,{}),t.inputType==="file"&&e.jsx(d.EmbeddedChat.FormFieldFile,{}),t.inputType==="textarea"&&e.jsx(d.EmbeddedChat.FormFieldTextArea,{}),t.inputType==="checkbox"&&e.jsx(d.EmbeddedChat.FormFieldCheckbox,{children:e.jsx(d.EmbeddedChat.FormFieldCheckboxIndicator,{})}),t.inputType==="select"&&e.jsxs(d.EmbeddedChat.FormFieldSelect,{children:[e.jsxs(d.EmbeddedChat.FormFieldSelectTrigger,{children:[e.jsx(d.EmbeddedChat.FormFieldSelectValue,{}),e.jsx(d.EmbeddedChat.FormFieldSelectIcon,{})]}),e.jsx(d.EmbeddedChat.FormFieldSelectContent,{children:e.jsx(d.EmbeddedChat.FormFieldSelectViewport,{children:t.items.map(n=>e.jsxs(d.EmbeddedChat.FormFieldSelectItem,{value:n.value,children:[e.jsx(d.EmbeddedChat.FormFieldSelectItemText,{children:n.label}),e.jsx(d.EmbeddedChat.FormFieldSelectItemIndicator,{})]},n.value))})})]}),t.inputType==="combobox"&&e.jsxs(d.EmbeddedChat.FormFieldCombobox,{children:[e.jsxs(d.EmbeddedChat.FormFieldComboboxControl,{children:[t.multiple&&e.jsx(d.EmbeddedChat.FormFieldComboboxSelectedTags,{}),e.jsx(d.EmbeddedChat.FormFieldComboboxInput,{}),e.jsx(d.EmbeddedChat.FormFieldComboboxTrigger,{})]}),e.jsx(d.EmbeddedChat.FormFieldComboboxPositioner,{children:e.jsx(d.EmbeddedChat.FormFieldComboboxContent,{children:e.jsx(d.EmbeddedChat.FormFieldComboboxItemList,{})})})]}),e.jsx(d.EmbeddedChat.FormFieldError,{})]},t.name)),e.jsx(d.EmbeddedChat.FormError,{})]})}),e.jsxs(d.EmbeddedChat.FormFooter,{children:[e.jsx(d.EmbeddedChat.FormCancel,{}),e.jsx(d.EmbeddedChat.FormSubmit,{})]})]}),e.jsxs(d.EmbeddedChat.FormSuccess,{children:[e.jsx(d.EmbeddedChat.FormSuccessHeading,{}),e.jsx(d.EmbeddedChat.FormSuccessMessage,{}),e.jsx(d.EmbeddedChat.FormSuccessButton,{})]})]})}exports.InkeepEmbeddedChat=x;exports.InkeepEmbeddedChatImpl=c;exports.InkeepEmbeddedChatImplContent=i;exports.InkeepEmbeddedChatProvider=o;
1
+ "use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),d=require("@inkeep/cxkit-styled"),h=require("react"),l=require("./widget-toggle.cjs"),C=require("./modal.cjs");function x(a){const{baseSettings:t,aiChatSettings:s}=a;return e.jsx(d.ErrorBoundary,{children:e.jsx(d.Shadow,{wrapperStyles:{height:"inherit",width:"inherit"},children:e.jsx(d.RootProvider,{config:{baseSettings:t,aiChatSettings:s},componentType:d.WebWidgetInteractionType.EmbeddedChat,children:e.jsx(c,{...a})})})})}function o(a){const{children:t,onToggleView:s,isHidden:n,shouldAutoFocusInput:r=!s}=a;return e.jsx(d.EmbeddedChat.Provider,{isHidden:n,shouldAutoFocusInput:r,children:t})}function c(a){return e.jsx(o,{...a,children:e.jsx(i,{...a})})}function i(a){const{onToggleView:t,variant:s,header:n=j}=a,r=d.useModal(),m=d.useWidget(),b=r&&!m?C.ModalContent:h.Fragment;return e.jsx(b,{children:e.jsxs(d.EmbeddedChat.Wrapper,{variant:s??(t?"no-shadow":"container-with-shadow"),"data-composite":d.dataAttr(!!a.onToggleView||r?.isOpen),children:[e.jsx(d.EmbeddedChat.ConversationLoading,{}),e.jsxs(d.EmbeddedChat.Root,{children:[e.jsx(n,{...a}),e.jsx(E,{}),e.jsx(M,{})]}),e.jsx(B,{}),e.jsx(S,{})]})})}function j(a){const{onToggleView:t,askAILabel:s,searchLabel:n}=a,r=!!t;return e.jsx(d.EmbeddedChat.Header,{"data-show-toolbar":d.dataAttr(r),children:r?e.jsxs(d.EmbeddedChat.HeaderToolbar,{children:[e.jsxs(d.EmbeddedChat.HeaderToolbarWrapper,{children:[e.jsx(d.EmbeddedChat.ToolbarHeader,{}),e.jsxs(d.EmbeddedChat.Disclaimer,{children:[e.jsx(d.EmbeddedChat.DisclaimerTrigger,{}),e.jsxs(d.EmbeddedChat.DisclaimerContent,{side:"bottom",align:"start",children:[e.jsx(d.EmbeddedChat.DisclaimerText,{}),e.jsx(d.EmbeddedChat.DisclaimerArrow,{})]})]})]}),e.jsx(l.WidgetToggle,{onToggleView:t,askAILabel:s,searchLabel:n,view:"chat"}),e.jsx(d.Modal.Close,{})]}):e.jsx(d.Modal.Close,{})})}function E(){return e.jsx(d.EmbeddedChat.Content,{children:e.jsxs(d.EmbeddedChat.ContentScrollArea,{children:[e.jsx(d.EmbeddedChat.ContentScrollAreaViewport,{children:e.jsx(F,{})}),e.jsx(d.EmbeddedChat.ContentScrollAreaScrollbar,{children:e.jsx(d.EmbeddedChat.ContentScrollAreaThumb,{})}),e.jsx(d.EmbeddedChat.ContentScrollAreaCorner,{})]})})}function F(){return e.jsx(d.EmbeddedChat.Messages,{children:({messages:a})=>e.jsxs(e.Fragment,{children:[e.jsx(u,{}),a.map(t=>e.jsxs(d.EmbeddedChat.MessageWrapper,{message:t,children:[e.jsx(g,{}),e.jsx(d.EmbeddedChat.MessageLoading,{}),e.jsxs(d.EmbeddedChat.MessageContentWrapper,{children:[e.jsx(d.EmbeddedChat.MessageContent,{children:e.jsx(d.EmbeddedChat.Message,{})}),e.jsx(p,{}),e.jsx(A,{}),e.jsx(I,{})]})]},t.id))]})})}function u(){return e.jsxs(d.EmbeddedChat.IntroMessageWrapper,{children:[e.jsxs(d.EmbeddedChat.MessageHeader,{children:[e.jsx(d.EmbeddedChat.MessageAvatar,{children:e.jsxs(d.EmbeddedChat.MessageAvatarContent,{children:[e.jsx(d.EmbeddedChat.MessageAvatarFallback,{}),e.jsx(d.EmbeddedChat.MessageAvatarImage,{})]})}),e.jsx(d.EmbeddedChat.MessageName,{})]}),e.jsxs(d.EmbeddedChat.MessageContentWrapper,{children:[e.jsx(d.EmbeddedChat.MessageContent,{children:e.jsx(d.EmbeddedChat.Message,{})}),e.jsxs(d.EmbeddedChat.Disclaimer,{children:[e.jsx(d.EmbeddedChat.DisclaimerLabel,{}),e.jsx(d.EmbeddedChat.DisclaimerTrigger,{}),e.jsxs(d.EmbeddedChat.DisclaimerContent,{children:[e.jsx(d.EmbeddedChat.DisclaimerText,{}),e.jsx(d.EmbeddedChat.DisclaimerArrow,{})]})]}),e.jsxs(d.EmbeddedChat.ExampleQuestions,{children:[e.jsx(d.EmbeddedChat.ExampleQuestionsLabel,{}),e.jsx(d.EmbeddedChat.ExampleQuestionsList,{children:a=>a.map(t=>e.jsx(d.EmbeddedChat.ExampleQuestion,{children:e.jsx(d.EmbeddedChat.ExampleQuestionButton,{question:t})},t))})]})]})]})}function g(){return e.jsxs(d.EmbeddedChat.MessageHeader,{children:[e.jsx(d.EmbeddedChat.MessageAvatar,{children:e.jsxs(d.EmbeddedChat.MessageAvatarContent,{children:[e.jsx(d.EmbeddedChat.MessageAvatarFallback,{}),e.jsx(d.EmbeddedChat.MessageAvatarImage,{})]})}),e.jsx(d.EmbeddedChat.MessageName,{})]})}function p(){return e.jsxs(d.EmbeddedChat.MessageAttachments,{children:[e.jsx(d.EmbeddedChat.MessageAttachmentsList,{children:a=>a.map(t=>e.jsxs(d.EmbeddedChat.MessageAttachmentsItem,{attachment:t,children:[e.jsx(d.EmbeddedChat.MessageAttachmentsItemIcon,{}),e.jsx(d.EmbeddedChat.MessageAttachmentsItemTitle,{})]},t.id))}),e.jsx(d.EmbeddedChat.MessageAttachmentsPreview,{children:e.jsx(d.PortalWithTheme,{children:e.jsx(d.EmbeddedChat.MessageAttachmentsPreviewOverlay,{children:e.jsxs(d.EmbeddedChat.MessageAttachmentsPreviewContent,{children:[e.jsx(d.EmbeddedChat.MessageAttachmentsPreviewHeader,{}),e.jsx(d.EmbeddedChat.MessageAttachmentsPreviewClose,{}),e.jsx(d.EmbeddedChat.MessageAttachmentsPreviewBody,{})]})})})})]})}function A(){return e.jsxs(d.EmbeddedChat.MessageToolbar,{children:[e.jsx(d.EmbeddedChat.MessageToolActions,{children:a=>a.map((t,s)=>e.jsx(d.EmbeddedChat.MessageToolAction,{action:t},`action-${s}`))}),e.jsx(d.EmbeddedChat.MessageAction,{action:"copy"}),e.jsx(d.EmbeddedChat.MessageAction,{action:"upvote"}),e.jsx(d.EmbeddedChat.MessageAction,{action:"downvote"})]})}function I(){return e.jsxs(d.EmbeddedChat.MessageSources,{children:[e.jsx(d.EmbeddedChat.MessageSourcesHeader,{}),e.jsx(d.EmbeddedChat.MessageSourcesList,{children:a=>a.map((t,s)=>e.jsxs(d.EmbeddedChat.MessageSourceItem,{href:t.url,source:t,children:[e.jsx(d.EmbeddedChat.MessageSourceItemBreadcrumbs,{children:t.breadcrumbs?.map(n=>e.jsxs(h.Fragment,{children:[n,e.jsx(d.EmbeddedChat.MessageSourceItemBreadcrumbIcon,{})]},n))}),e.jsx(d.EmbeddedChat.MessageSourceItemIcon,{}),e.jsx(d.EmbeddedChat.MessageSourceItemTitle,{}),e.jsx(d.EmbeddedChat.MessageSourceItemTag,{}),e.jsx(d.EmbeddedChat.MessageSourceItemDescription,{children:n=>n.map((r,m)=>e.jsx(d.EmbeddedChat.MessageSourceItemDescriptionPart,{part:r},`part-${m}`))}),e.jsx(d.EmbeddedChat.MessageSourceItemIndicator,{})]},s))})]})}function M(){return e.jsxs(d.EmbeddedChat.Footer,{children:[e.jsx(T,{}),e.jsx(k,{})]})}function T(){return e.jsxs(d.EmbeddedChat.InputFieldset,{children:[e.jsxs(d.EmbeddedChat.InputGroup,{children:[e.jsx(d.EmbeddedChat.Input,{}),e.jsx(d.EmbeddedChat.SendButton,{children:e.jsx(d.EmbeddedChat.SendButtonIcon,{})})]}),e.jsxs(d.EmbeddedChat.AttachmentsBar,{children:[e.jsx(d.EmbeddedChat.AttachmentsBarList,{children:a=>a.map(t=>e.jsxs(d.EmbeddedChat.AttachmentsBarAttachment,{attachment:t,children:[e.jsx(d.EmbeddedChat.AttachmentsBarAttachmentIcon,{}),e.jsx(d.EmbeddedChat.AttachmentsBarAttachmentTitle,{}),e.jsx(d.EmbeddedChat.AttachmentsBarAttachmentDelete,{})]},t.id))}),e.jsxs(d.EmbeddedChat.AttachmentsBarActions,{children:[e.jsxs(d.EmbeddedChat.AttachmentsBarInfoTip,{children:[e.jsx(d.EmbeddedChat.AttachmentsBarInfoTipIcon,{}),e.jsx(d.EmbeddedChat.AttachmentsBarInfoTipText,{})]}),e.jsx(d.EmbeddedChat.AttachmentsBarInputs,{children:a=>a.map(t=>e.jsx(d.EmbeddedChat.AttachmentsBarInput,{input:t,children:t.displayName},t.id))})]}),e.jsx(d.PortalWithTheme,{children:e.jsx(d.EmbeddedChat.AttachmentsBarModal,{children:e.jsx(d.EmbeddedChat.AttachmentsBarModalOverlay,{children:e.jsxs(d.EmbeddedChat.AttachmentsBarModalContent,{children:[e.jsxs(d.EmbeddedChat.AttachmentsBarModalHeader,{children:[e.jsx(d.EmbeddedChat.AttachmentsBarModalHeading,{}),e.jsx(d.EmbeddedChat.AttachmentsBarModalDescription,{}),e.jsx(d.EmbeddedChat.AttachmentsBarModalHelp,{})]}),e.jsx(d.EmbeddedChat.AttachmentsBarModalClose,{}),e.jsx(d.EmbeddedChat.AttachmentsBarModalBody,{children:e.jsxs(d.EmbeddedChat.AttachmentsBarForm,{children:[e.jsxs(d.EmbeddedChat.AttachmentsBarFormTitle,{children:[e.jsx(d.EmbeddedChat.AttachmentsBarFormTitleLabel,{}),e.jsx(d.EmbeddedChat.AttachmentsBarFormTitleInput,{}),e.jsx(d.EmbeddedChat.AttachmentsBarFormTitleError,{})]}),e.jsxs(d.EmbeddedChat.AttachmentsBarFormContent,{children:[e.jsx(d.EmbeddedChat.AttachmentsBarFormContentLabel,{}),e.jsx(d.EmbeddedChat.AttachmentsBarFormContentInput,{}),e.jsx(d.EmbeddedChat.AttachmentsBarFormContentError,{})]}),e.jsx(d.EmbeddedChat.AttachmentsBarFormSubmitButton,{})]})})]})})})})]})]})}function k(){return e.jsxs(d.EmbeddedChat.ActionBar,{children:[e.jsxs(d.EmbeddedChat.TaglineContainer,{children:[e.jsx(d.EmbeddedChat.TaglineText,{}),e.jsx(d.EmbeddedChat.TaglineLogo,{}),e.jsx(d.EmbeddedChat.TaglineBrandName,{})]}),e.jsxs(d.EmbeddedChat.Actions,{children:[e.jsx(d.EmbeddedChat.HelpActions,{children:({pinned:a,unpinned:t})=>e.jsxs(e.Fragment,{children:[a.map(s=>e.jsx(d.EmbeddedChat.HelpAction,{action:s},s.name)),t.length>0&&e.jsx(d.EmbeddedChat.HelpActionsTrigger,{}),e.jsxs(d.EmbeddedChat.HelpActionsMenu,{children:[e.jsx(d.EmbeddedChat.HelpActionsMenuArrow,{}),t.map(s=>e.jsxs(d.EmbeddedChat.HelpActionsMenuItem,{action:s,children:[e.jsx(d.EmbeddedChat.HelpActionsMenuItemIcon,{action:s}),s.name]},s.name))]})]})}),e.jsxs(d.EmbeddedChat.ChatAction,{action:"copy",children:[e.jsx(d.EmbeddedChat.ChatActionLabel,{action:"copy"}),e.jsx(d.EmbeddedChat.ChatActionFeedback,{action:"copy"})]}),e.jsxs(d.EmbeddedChat.ChatAction,{action:"share",children:[e.jsx(d.EmbeddedChat.ChatActionLabel,{action:"share"}),e.jsx(d.EmbeddedChat.ChatActionFeedback,{action:"share"})]}),e.jsx(d.EmbeddedChat.ChatAction,{action:"clear"}),e.jsx(d.EmbeddedChat.ChatAction,{action:"stop"})]})]})}function B(){return e.jsx(d.PortalWithTheme,{children:e.jsx(d.EmbeddedChat.FeedbackModal,{children:e.jsx(d.EmbeddedChat.FeedbackModalOverlay,{children:e.jsxs(d.EmbeddedChat.FeedbackModalContent,{children:[e.jsx(d.EmbeddedChat.FeedbackModalHeader,{}),e.jsx(d.EmbeddedChat.FeedbackModalClose,{}),e.jsx(d.EmbeddedChat.FeedbackModalBody,{children:e.jsxs(d.EmbeddedChat.FeedbackForm,{children:[e.jsxs(d.EmbeddedChat.FeedbackItem,{name:"unrelated_response",children:[e.jsx(d.EmbeddedChat.FeedbackItemCheckbox,{children:e.jsx(d.EmbeddedChat.FeedbackItemCheckboxIndicator,{})}),e.jsx(d.EmbeddedChat.FeedbackItemLabel,{}),e.jsx(d.EmbeddedChat.FeedbackItemDescription,{})]}),e.jsxs(d.EmbeddedChat.FeedbackItem,{name:"inaccurate_statement",children:[e.jsx(d.EmbeddedChat.FeedbackItemCheckbox,{children:e.jsx(d.EmbeddedChat.FeedbackItemCheckboxIndicator,{})}),e.jsx(d.EmbeddedChat.FeedbackItemLabel,{}),e.jsx(d.EmbeddedChat.FeedbackItemDescription,{})]}),e.jsxs(d.EmbeddedChat.FeedbackItem,{name:"inaccurate_code_snippet",children:[e.jsx(d.EmbeddedChat.FeedbackItemCheckbox,{children:e.jsx(d.EmbeddedChat.FeedbackItemCheckboxIndicator,{})}),e.jsx(d.EmbeddedChat.FeedbackItemLabel,{}),e.jsx(d.EmbeddedChat.FeedbackItemDescription,{})]}),e.jsxs(d.EmbeddedChat.FeedbackItem,{name:"irrelevant_citations",children:[e.jsx(d.EmbeddedChat.FeedbackItemCheckbox,{children:e.jsx(d.EmbeddedChat.FeedbackItemCheckboxIndicator,{})}),e.jsx(d.EmbeddedChat.FeedbackItemLabel,{})]}),e.jsx(d.EmbeddedChat.FeedbackSubmitButton,{})]})})]})})})})}function S(){return e.jsxs(d.EmbeddedChat.FormWrapper,{children:[e.jsx(d.EmbeddedChat.FormClose,{}),e.jsxs(d.EmbeddedChat.Form,{children:[e.jsxs(d.EmbeddedChat.FormHeader,{children:[e.jsx(d.EmbeddedChat.FormHeading,{}),e.jsx(d.EmbeddedChat.FormDescription,{})]}),e.jsx(d.EmbeddedChat.FormContent,{children:a=>e.jsxs(e.Fragment,{children:[a.map((t,s)=>e.jsxs(d.EmbeddedChat.FormField,{field:t,autoFocus:s===0,children:[e.jsx(d.EmbeddedChat.FormFieldLabel,{}),t.inputType==="text"&&e.jsx(d.EmbeddedChat.FormFieldText,{}),t.inputType==="email"&&e.jsx(d.EmbeddedChat.FormFieldEmail,{}),t.inputType==="file"&&e.jsx(d.EmbeddedChat.FormFieldFile,{}),t.inputType==="textarea"&&e.jsx(d.EmbeddedChat.FormFieldTextArea,{}),t.inputType==="checkbox"&&e.jsx(d.EmbeddedChat.FormFieldCheckbox,{children:e.jsx(d.EmbeddedChat.FormFieldCheckboxIndicator,{})}),t.inputType==="select"&&e.jsxs(d.EmbeddedChat.FormFieldSelect,{children:[e.jsxs(d.EmbeddedChat.FormFieldSelectTrigger,{children:[e.jsx(d.EmbeddedChat.FormFieldSelectValue,{}),e.jsx(d.EmbeddedChat.FormFieldSelectIcon,{})]}),e.jsx(d.EmbeddedChat.FormFieldSelectContent,{children:e.jsx(d.EmbeddedChat.FormFieldSelectViewport,{children:t.items.map(n=>e.jsxs(d.EmbeddedChat.FormFieldSelectItem,{value:n.value,children:[e.jsx(d.EmbeddedChat.FormFieldSelectItemText,{children:n.label}),e.jsx(d.EmbeddedChat.FormFieldSelectItemIndicator,{})]},n.value))})})]}),t.inputType==="combobox"&&e.jsxs(d.EmbeddedChat.FormFieldCombobox,{children:[e.jsxs(d.EmbeddedChat.FormFieldComboboxControl,{children:[t.multiple&&e.jsx(d.EmbeddedChat.FormFieldComboboxSelectedTags,{}),e.jsx(d.EmbeddedChat.FormFieldComboboxInput,{}),e.jsx(d.EmbeddedChat.FormFieldComboboxTrigger,{})]}),e.jsx(d.EmbeddedChat.FormFieldComboboxPositioner,{children:e.jsx(d.EmbeddedChat.FormFieldComboboxContent,{children:e.jsx(d.EmbeddedChat.FormFieldComboboxItemList,{})})})]}),e.jsx(d.EmbeddedChat.FormFieldDescription,{}),e.jsx(d.EmbeddedChat.FormFieldError,{})]},t.name)),e.jsx(d.EmbeddedChat.FormError,{})]})}),e.jsxs(d.EmbeddedChat.FormFooter,{children:[e.jsx(d.EmbeddedChat.FormCancel,{}),e.jsx(d.EmbeddedChat.FormSubmit,{})]})]}),e.jsxs(d.EmbeddedChat.FormSuccess,{children:[e.jsx(d.EmbeddedChat.FormSuccessHeading,{}),e.jsx(d.EmbeddedChat.FormSuccessMessage,{}),e.jsx(d.EmbeddedChat.FormSuccessButton,{})]})]})}exports.InkeepEmbeddedChat=x;exports.InkeepEmbeddedChatImpl=c;exports.InkeepEmbeddedChatImplContent=i;exports.InkeepEmbeddedChatProvider=o;
@@ -1,13 +1,13 @@
1
1
  "use client";
2
2
  import { jsx as t, jsxs as r, Fragment as d } from "react/jsx-runtime";
3
- import { ErrorBoundary as u, Shadow as p, RootProvider as g, WebWidgetInteractionType as b, EmbeddedChat as e, useModal as A, useWidget as M, dataAttr as h, Modal as m, PortalWithTheme as s } from "@inkeep/cxkit-styled";
3
+ import { ErrorBoundary as p, Shadow as u, RootProvider as g, WebWidgetInteractionType as b, EmbeddedChat as e, useModal as A, useWidget as M, dataAttr as h, Modal as m, PortalWithTheme as s } from "@inkeep/cxkit-styled";
4
4
  import { Fragment as F } from "react";
5
5
  import { WidgetToggle as I } from "./widget-toggle.js";
6
6
  import { ModalContent as C } from "./modal.js";
7
7
  function R(a) {
8
8
  const { baseSettings: n, aiChatSettings: o } = a;
9
- return /* @__PURE__ */ t(u, { children: /* @__PURE__ */ t(
10
- p,
9
+ return /* @__PURE__ */ t(p, { children: /* @__PURE__ */ t(
10
+ u,
11
11
  {
12
12
  wrapperStyles: {
13
13
  height: "inherit",
@@ -322,6 +322,7 @@ function V() {
322
322
  ] }),
323
323
  /* @__PURE__ */ t(e.FormFieldComboboxPositioner, { children: /* @__PURE__ */ t(e.FormFieldComboboxContent, { children: /* @__PURE__ */ t(e.FormFieldComboboxItemList, {}) }) })
324
324
  ] }),
325
+ /* @__PURE__ */ t(e.FormFieldDescription, {}),
325
326
  /* @__PURE__ */ t(e.FormFieldError, {})
326
327
  ] }, n.name)),
327
328
  /* @__PURE__ */ t(e.FormError, {})
@@ -1 +1 @@
1
- "use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),n=require("@inkeep/cxkit-styled");function c(r){const{baseSettings:t}=r;return e.jsx(n.ErrorBoundary,{children:e.jsx(n.Shadow,{wrapperStyles:{height:"inherit",width:"inherit"},children:e.jsx(n.RootProvider,{config:{baseSettings:t},componentType:n.WebWidgetInteractionType.IntelligentForm,children:e.jsx(s,{...r})})})})}function s(r){const{formSettings:t}=r;return e.jsx(n.IntelligentForm.Provider,{formSettings:t,children:e.jsxs(n.IntelligentForm.Root,{children:[e.jsx(n.IntelligentForm.Heading,{}),e.jsx(n.IntelligentForm.Content,{children:e.jsxs(n.IntelligentForm.ContentScrollArea,{children:[e.jsxs(n.IntelligentForm.ContentScrollAreaViewport,{children:[e.jsx(F,{}),e.jsx(x,{}),e.jsx(g,{}),e.jsx(I,{}),e.jsx(d,{})]}),e.jsx(n.IntelligentForm.ContentScrollAreaScrollbar,{children:e.jsx(n.IntelligentForm.ContentScrollAreaThumb,{})}),e.jsx(n.IntelligentForm.ContentScrollAreaCorner,{})]})})]})})}function F(){return e.jsxs(n.IntelligentForm.Success,{children:[e.jsx(n.IntelligentForm.SuccessIcon,{}),e.jsx(n.IntelligentForm.SuccessHeading,{}),e.jsx(n.IntelligentForm.SuccessMessage,{})]})}function x(){const{isSubmitSuccessful:r}=n.useIntelligentForm();return r?null:e.jsxs(n.IntelligentForm.PrimaryForm,{children:[e.jsx(n.IntelligentForm.PrimaryFormDescription,{}),e.jsx(n.IntelligentForm.PrimaryFormFields,{children:t=>t.map(l=>e.jsx(m,{field:l},l.name))}),e.jsx(n.IntelligentForm.PrimaryFormSubmit,{})]})}function i(){return e.jsxs(n.IntelligentForm.BotHeading,{children:[e.jsx(n.IntelligentForm.BotHeadingIcon,{}),e.jsx(n.IntelligentForm.BotHeadingName,{})]})}function g(){return e.jsxs(n.IntelligentForm.Loading,{children:[e.jsx(i,{}),e.jsx(n.LoadingIndicator,{})]})}function I(){const{isSubmitSuccessful:r}=n.useIntelligentForm();return r?null:e.jsxs(n.IntelligentForm.ConfidentResponse,{children:[e.jsx(i,{}),e.jsxs(n.IntelligentForm.Sources,{children:[e.jsx(n.IntelligentForm.SourcesCaption,{}),e.jsx(n.IntelligentForm.SourcesList,{children:t=>t.map(l=>e.jsxs(n.IntelligentForm.Source,{source:l,children:[e.jsx(n.IntelligentForm.SourceIcon,{}),e.jsx(n.IntelligentForm.SourceTitle,{})]},l.url))})]}),e.jsx(n.IntelligentForm.ConfidentAnswer,{}),e.jsxs(n.IntelligentForm.ConfidentResponseButton,{children:[e.jsx(n.IntelligentForm.ConfidentResponseButtonIcon,{}),e.jsx(n.IntelligentForm.ConfidentResponseButtonLabel,{})]})]})}function d(){const{aiResponse:r}=n.useIntelligentForm(),{isSubmitSuccessful:t}=n.useIntelligentForm();return t?null:e.jsxs(n.IntelligentForm.SecondaryForm,{children:[e.jsx(i,{}),!r.answerConfidence&&e.jsxs(n.IntelligentForm.Sources,{children:[e.jsx(n.IntelligentForm.SourcesCaption,{children:"I wasn't able to find a direct answer to your question, but here's some helpful sources:"}),e.jsx(n.IntelligentForm.SourcesList,{children:l=>l.map(o=>e.jsxs(n.IntelligentForm.Source,{source:o,children:[e.jsx(n.IntelligentForm.SourceIcon,{}),e.jsx(n.IntelligentForm.SourceTitle,{})]},o.url))})]}),e.jsx(n.IntelligentForm.SecondaryFormDescription,{}),e.jsx(n.IntelligentForm.SecondaryFormFields,{children:l=>l.map(o=>e.jsx(m,{field:o},o.name))}),e.jsx(n.IntelligentForm.Error,{}),e.jsx(n.IntelligentForm.SecondaryFormSubmit,{})]})}function m(r){const{field:t}=r;return e.jsxs(n.IntelligentForm.Field,{field:t,children:[e.jsx(n.IntelligentForm.FieldLabel,{}),t.inputType==="text"&&e.jsx(n.IntelligentForm.Text,{}),t.inputType==="email"&&e.jsx(n.IntelligentForm.Email,{}),t.inputType==="file"&&e.jsx(n.IntelligentForm.File,{}),t.inputType==="textarea"&&e.jsx(n.IntelligentForm.TextArea,{}),t.inputType==="checkbox"&&e.jsx(n.IntelligentForm.Checkbox,{children:e.jsx(n.IntelligentForm.CheckboxIndicator,{})}),t.inputType==="select"&&e.jsxs(n.IntelligentForm.Select,{children:[e.jsxs(n.IntelligentForm.SelectTrigger,{children:[e.jsx(n.IntelligentForm.SelectValue,{}),e.jsx(n.IntelligentForm.SelectIcon,{})]}),e.jsx(n.IntelligentForm.SelectContent,{children:e.jsx(n.IntelligentForm.SelectViewport,{children:t.items.map(l=>e.jsxs(n.IntelligentForm.SelectItem,{value:l.value,children:[e.jsx(n.IntelligentForm.SelectItemText,{children:l.label}),e.jsx(n.IntelligentForm.SelectItemIndicator,{})]},l.value))})})]}),t.inputType==="combobox"&&e.jsxs(n.IntelligentForm.FormFieldCombobox,{children:[e.jsxs(n.IntelligentForm.FormFieldComboboxControl,{children:[t.multiple&&e.jsx(n.IntelligentForm.FormFieldComboboxSelectedTags,{}),e.jsx(n.IntelligentForm.FormFieldComboboxInput,{}),e.jsx(n.IntelligentForm.FormFieldComboboxTrigger,{})]}),e.jsx(n.IntelligentForm.FormFieldComboboxPositioner,{children:e.jsx(n.IntelligentForm.FormFieldComboboxContent,{children:e.jsx(n.IntelligentForm.FormFieldComboboxItemList,{})})})]}),e.jsx(n.IntelligentForm.FieldError,{})]},t.name)}exports.InkeepIntelligentForm=c;exports.InkeepIntelligentFormImpl=s;
1
+ "use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),n=require("@inkeep/cxkit-styled");function c(r){const{baseSettings:t}=r;return e.jsx(n.ErrorBoundary,{children:e.jsx(n.Shadow,{wrapperStyles:{height:"inherit",width:"inherit"},children:e.jsx(n.RootProvider,{config:{baseSettings:t},componentType:n.WebWidgetInteractionType.IntelligentForm,children:e.jsx(s,{...r})})})})}function s(r){const{formSettings:t}=r;return e.jsx(n.IntelligentForm.Provider,{formSettings:t,children:e.jsxs(n.IntelligentForm.Root,{children:[e.jsx(n.IntelligentForm.Heading,{}),e.jsx(n.IntelligentForm.Content,{children:e.jsxs(n.IntelligentForm.ContentScrollArea,{children:[e.jsxs(n.IntelligentForm.ContentScrollAreaViewport,{children:[e.jsx(F,{}),e.jsx(x,{}),e.jsx(g,{}),e.jsx(I,{}),e.jsx(d,{})]}),e.jsx(n.IntelligentForm.ContentScrollAreaScrollbar,{children:e.jsx(n.IntelligentForm.ContentScrollAreaThumb,{})}),e.jsx(n.IntelligentForm.ContentScrollAreaCorner,{})]})})]})})}function F(){return e.jsxs(n.IntelligentForm.Success,{children:[e.jsx(n.IntelligentForm.SuccessIcon,{}),e.jsx(n.IntelligentForm.SuccessHeading,{}),e.jsx(n.IntelligentForm.SuccessMessage,{})]})}function x(){const{isSubmitSuccessful:r}=n.useIntelligentForm();return r?null:e.jsxs(n.IntelligentForm.PrimaryForm,{children:[e.jsx(n.IntelligentForm.PrimaryFormDescription,{}),e.jsx(n.IntelligentForm.PrimaryFormFields,{children:t=>t.map(l=>e.jsx(m,{field:l},l.name))}),e.jsx(n.IntelligentForm.PrimaryFormSubmit,{})]})}function i(){return e.jsxs(n.IntelligentForm.BotHeading,{children:[e.jsx(n.IntelligentForm.BotHeadingIcon,{}),e.jsx(n.IntelligentForm.BotHeadingName,{})]})}function g(){return e.jsxs(n.IntelligentForm.Loading,{children:[e.jsx(i,{}),e.jsx(n.LoadingIndicator,{})]})}function I(){const{isSubmitSuccessful:r}=n.useIntelligentForm();return r?null:e.jsxs(n.IntelligentForm.ConfidentResponse,{children:[e.jsx(i,{}),e.jsxs(n.IntelligentForm.Sources,{children:[e.jsx(n.IntelligentForm.SourcesCaption,{}),e.jsx(n.IntelligentForm.SourcesList,{children:t=>t.map(l=>e.jsxs(n.IntelligentForm.Source,{source:l,children:[e.jsx(n.IntelligentForm.SourceIcon,{}),e.jsx(n.IntelligentForm.SourceTitle,{})]},l.url))})]}),e.jsx(n.IntelligentForm.ConfidentAnswer,{}),e.jsxs(n.IntelligentForm.ConfidentResponseButton,{children:[e.jsx(n.IntelligentForm.ConfidentResponseButtonIcon,{}),e.jsx(n.IntelligentForm.ConfidentResponseButtonLabel,{})]})]})}function d(){const{aiResponse:r}=n.useIntelligentForm(),{isSubmitSuccessful:t}=n.useIntelligentForm();return t?null:e.jsxs(n.IntelligentForm.SecondaryForm,{children:[e.jsx(i,{}),!r.answerConfidence&&e.jsxs(n.IntelligentForm.Sources,{children:[e.jsx(n.IntelligentForm.SourcesCaption,{children:"I wasn't able to find a direct answer to your question, but here's some helpful sources:"}),e.jsx(n.IntelligentForm.SourcesList,{children:l=>l.map(o=>e.jsxs(n.IntelligentForm.Source,{source:o,children:[e.jsx(n.IntelligentForm.SourceIcon,{}),e.jsx(n.IntelligentForm.SourceTitle,{})]},o.url))})]}),e.jsx(n.IntelligentForm.SecondaryFormDescription,{}),e.jsx(n.IntelligentForm.SecondaryFormFields,{children:l=>l.map(o=>e.jsx(m,{field:o},o.name))}),e.jsx(n.IntelligentForm.Error,{}),e.jsx(n.IntelligentForm.SecondaryFormSubmit,{})]})}function m(r){const{field:t}=r;return e.jsxs(n.IntelligentForm.Field,{field:t,children:[e.jsx(n.IntelligentForm.FieldLabel,{}),t.inputType==="text"&&e.jsx(n.IntelligentForm.Text,{}),t.inputType==="email"&&e.jsx(n.IntelligentForm.Email,{}),t.inputType==="file"&&e.jsx(n.IntelligentForm.File,{}),t.inputType==="textarea"&&e.jsx(n.IntelligentForm.TextArea,{}),t.inputType==="checkbox"&&e.jsx(n.IntelligentForm.Checkbox,{children:e.jsx(n.IntelligentForm.CheckboxIndicator,{})}),t.inputType==="select"&&e.jsxs(n.IntelligentForm.Select,{children:[e.jsxs(n.IntelligentForm.SelectTrigger,{children:[e.jsx(n.IntelligentForm.SelectValue,{}),e.jsx(n.IntelligentForm.SelectIcon,{})]}),e.jsx(n.IntelligentForm.SelectContent,{children:e.jsx(n.IntelligentForm.SelectViewport,{children:t.items.map(l=>e.jsxs(n.IntelligentForm.SelectItem,{value:l.value,children:[e.jsx(n.IntelligentForm.SelectItemText,{children:l.label}),e.jsx(n.IntelligentForm.SelectItemIndicator,{})]},l.value))})})]}),t.inputType==="combobox"&&e.jsxs(n.IntelligentForm.FormFieldCombobox,{children:[e.jsxs(n.IntelligentForm.FormFieldComboboxControl,{children:[t.multiple&&e.jsx(n.IntelligentForm.FormFieldComboboxSelectedTags,{}),e.jsx(n.IntelligentForm.FormFieldComboboxInput,{}),e.jsx(n.IntelligentForm.FormFieldComboboxTrigger,{})]}),e.jsx(n.IntelligentForm.FormFieldComboboxPositioner,{children:e.jsx(n.IntelligentForm.FormFieldComboboxContent,{children:e.jsx(n.IntelligentForm.FormFieldComboboxItemList,{})})})]}),e.jsx(n.IntelligentForm.FieldDescription,{}),e.jsx(n.IntelligentForm.FieldError,{})]},t.name)}exports.InkeepIntelligentForm=c;exports.InkeepIntelligentFormImpl=s;
@@ -129,6 +129,7 @@ function u(t) {
129
129
  ] }),
130
130
  /* @__PURE__ */ n(e.FormFieldComboboxPositioner, { children: /* @__PURE__ */ n(e.FormFieldComboboxContent, { children: /* @__PURE__ */ n(e.FormFieldComboboxItemList, {}) }) })
131
131
  ] }),
132
+ /* @__PURE__ */ n(e.FieldDescription, {}),
132
133
  /* @__PURE__ */ n(e.FieldError, {})
133
134
  ] }, r.name);
134
135
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@inkeep/cxkit-react",
3
- "version": "0.5.115",
3
+ "version": "0.5.116",
4
4
  "description": "",
5
5
  "license": "Inkeep, Inc. Customer License (IICL) v1.1",
6
6
  "homepage": "",
@@ -22,7 +22,7 @@
22
22
  "dependencies": {
23
23
  "@radix-ui/react-use-controllable-state": "^1.1.0",
24
24
  "lucide-react": "^0.503.0",
25
- "@inkeep/cxkit-styled": "0.5.115"
25
+ "@inkeep/cxkit-styled": "0.5.116"
26
26
  },
27
27
  "devDependencies": {
28
28
  "@biomejs/biome": "1.9.4",
@@ -44,8 +44,8 @@
44
44
  "typescript": "5.7.3",
45
45
  "vite": "5.4.11",
46
46
  "vite-plugin-dts": "4.4.0",
47
- "@inkeep/cxkit-color-mode": "0.5.115",
48
- "@inkeep/cxkit-types": "0.5.115"
47
+ "@inkeep/cxkit-color-mode": "0.5.116",
48
+ "@inkeep/cxkit-types": "0.5.116"
49
49
  },
50
50
  "module": "dist/index.js",
51
51
  "types": "dist/index.d.ts",