@inkeep/cxkit-react 0.0.0-dev-20250228015002 → 0.0.0-dev-20250228071024
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"),n=require("@inkeep/cxkit-styled");function m(r){const{baseSettings:t}=r;return 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{
|
|
1
|
+
"use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),n=require("@inkeep/cxkit-styled");function m(r){const{baseSettings:t}=r;return 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(I,{}),e.jsx(g,{}),e.jsx(F,{}),e.jsx(x,{}),e.jsx(u,{})]}),e.jsx(n.IntelligentForm.ContentScrollAreaScrollbar,{children:e.jsx(n.IntelligentForm.ContentScrollAreaThumb,{})}),e.jsx(n.IntelligentForm.ContentScrollAreaCorner,{})]})})]})})}function I(){return e.jsxs(n.IntelligentForm.Success,{children:[e.jsx(n.IntelligentForm.SuccessIcon,{}),e.jsx(n.IntelligentForm.SuccessHeading,{}),e.jsx(n.IntelligentForm.SuccessMessage,{})]})}function g(){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(c,{field:l},l.name))}),e.jsx(n.IntelligentForm.PrimaryFormSubmit,{})]})}function o(){return e.jsxs(n.IntelligentForm.BotHeading,{children:[e.jsx(n.IntelligentForm.BotHeadingIcon,{}),e.jsx(n.IntelligentForm.BotHeadingName,{})]})}function F(){return e.jsxs(n.IntelligentForm.Loading,{children:[e.jsx(o,{}),e.jsx(n.LoadingIndicator,{})]})}function x(){const{isSubmitSuccessful:r}=n.useIntelligentForm();return r?null:e.jsxs(n.IntelligentForm.ConfidentResponse,{children:[e.jsx(o,{}),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 u(){const{aiResponse:r}=n.useIntelligentForm(),{isSubmitSuccessful:t}=n.useIntelligentForm();return t?null:e.jsxs(n.IntelligentForm.SecondaryForm,{children:[e.jsx(o,{}),!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(i=>e.jsxs(n.IntelligentForm.Source,{source:i,children:[e.jsx(n.IntelligentForm.SourceIcon,{}),e.jsx(n.IntelligentForm.SourceTitle,{})]},i.url))})]}),e.jsx(n.IntelligentForm.SecondaryFormDescription,{}),e.jsx(n.IntelligentForm.SecondaryFormFields,{children:l=>l.map(i=>e.jsx(c,{field:i},i.name))}),e.jsx(n.IntelligentForm.Error,{}),e.jsx(n.IntelligentForm.SecondaryFormSubmit,{})]})}function c(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))})})]}),e.jsx(n.IntelligentForm.FieldError,{})]},t.name)}exports.InkeepIntelligentForm=m;exports.InkeepIntelligentFormImpl=s;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { InkeepConfig,
|
|
1
|
+
import { InkeepConfig, IntelligentFormSettings } from '@inkeep/cxkit-types';
|
|
2
2
|
interface InkeepIntelligentFormImplProps {
|
|
3
|
-
|
|
3
|
+
formSettings: IntelligentFormSettings;
|
|
4
4
|
}
|
|
5
5
|
export type InkeepIntelligentFormProps = InkeepIntelligentFormImplProps & Partial<Pick<InkeepConfig, 'baseSettings'>>;
|
|
6
6
|
export declare function InkeepIntelligentForm(props: InkeepIntelligentFormProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { InkeepConfig,
|
|
1
|
+
import { InkeepConfig, IntelligentFormSettings } from '@inkeep/cxkit-types';
|
|
2
2
|
interface InkeepIntelligentFormImplProps {
|
|
3
|
-
|
|
3
|
+
formSettings: IntelligentFormSettings;
|
|
4
4
|
}
|
|
5
5
|
export type InkeepIntelligentFormProps = InkeepIntelligentFormImplProps & Partial<Pick<InkeepConfig, 'baseSettings'>>;
|
|
6
6
|
export declare function InkeepIntelligentForm(props: InkeepIntelligentFormProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { jsx as n, jsxs as t } from "react/jsx-runtime";
|
|
3
|
-
import { Shadow as
|
|
3
|
+
import { Shadow as d, RootProvider as a, WebWidgetInteractionType as S, IntelligentForm as e, useIntelligentForm as l, LoadingIndicator as m } from "@inkeep/cxkit-styled";
|
|
4
4
|
function b(o) {
|
|
5
5
|
const { baseSettings: r } = o;
|
|
6
6
|
return /* @__PURE__ */ n(
|
|
7
|
-
|
|
7
|
+
d,
|
|
8
8
|
{
|
|
9
9
|
wrapperStyles: {
|
|
10
10
|
height: "inherit",
|
|
@@ -24,8 +24,8 @@ function b(o) {
|
|
|
24
24
|
);
|
|
25
25
|
}
|
|
26
26
|
function h(o) {
|
|
27
|
-
const {
|
|
28
|
-
return /* @__PURE__ */ n(e.Provider, {
|
|
27
|
+
const { formSettings: r } = o;
|
|
28
|
+
return /* @__PURE__ */ n(e.Provider, { formSettings: r, children: /* @__PURE__ */ t(e.Root, { children: [
|
|
29
29
|
/* @__PURE__ */ n(e.Heading, {}),
|
|
30
30
|
/* @__PURE__ */ n(e.Content, { children: /* @__PURE__ */ t(e.ContentScrollArea, { children: [
|
|
31
31
|
/* @__PURE__ */ t(e.ContentScrollAreaViewport, { children: [
|
|
@@ -51,7 +51,7 @@ function f() {
|
|
|
51
51
|
const { isSubmitSuccessful: o } = l();
|
|
52
52
|
return o ? null : /* @__PURE__ */ t(e.PrimaryForm, { children: [
|
|
53
53
|
/* @__PURE__ */ n(e.PrimaryFormDescription, {}),
|
|
54
|
-
/* @__PURE__ */ n(e.PrimaryFormFields, { children: (r) => r.map((i) => /* @__PURE__ */ n(
|
|
54
|
+
/* @__PURE__ */ n(e.PrimaryFormFields, { children: (r) => r.map((i) => /* @__PURE__ */ n(s, { field: i }, i.name)) }),
|
|
55
55
|
/* @__PURE__ */ n(e.PrimaryFormSubmit, {})
|
|
56
56
|
] });
|
|
57
57
|
}
|
|
@@ -97,12 +97,12 @@ function I() {
|
|
|
97
97
|
] }, c.url)) })
|
|
98
98
|
] }),
|
|
99
99
|
/* @__PURE__ */ n(e.SecondaryFormDescription, {}),
|
|
100
|
-
/* @__PURE__ */ n(e.SecondaryFormFields, { children: (i) => i.map((c) => /* @__PURE__ */ n(
|
|
100
|
+
/* @__PURE__ */ n(e.SecondaryFormFields, { children: (i) => i.map((c) => /* @__PURE__ */ n(s, { field: c }, c.name)) }),
|
|
101
101
|
/* @__PURE__ */ n(e.Error, {}),
|
|
102
102
|
/* @__PURE__ */ n(e.SecondaryFormSubmit, {})
|
|
103
103
|
] });
|
|
104
104
|
}
|
|
105
|
-
function
|
|
105
|
+
function s(o) {
|
|
106
106
|
const { field: r } = o;
|
|
107
107
|
return /* @__PURE__ */ t(e.Field, { field: r, children: [
|
|
108
108
|
/* @__PURE__ */ n(e.FieldLabel, {}),
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@inkeep/cxkit-react",
|
|
3
|
-
"version": "0.0.0-dev-
|
|
3
|
+
"version": "0.0.0-dev-20250228071024",
|
|
4
4
|
"description": "",
|
|
5
5
|
"license": "Inkeep, Inc. Customer License (IICL) v1.1",
|
|
6
6
|
"homepage": "",
|
|
@@ -20,7 +20,7 @@
|
|
|
20
20
|
},
|
|
21
21
|
"sideEffects": false,
|
|
22
22
|
"dependencies": {
|
|
23
|
-
"@inkeep/cxkit-styled": "0.0.0-dev-
|
|
23
|
+
"@inkeep/cxkit-styled": "0.0.0-dev-20250228071024"
|
|
24
24
|
},
|
|
25
25
|
"devDependencies": {
|
|
26
26
|
"@biomejs/biome": "1.9.4",
|
|
@@ -43,8 +43,8 @@
|
|
|
43
43
|
"typescript": "5.7.3",
|
|
44
44
|
"vite": "5.4.11",
|
|
45
45
|
"vite-plugin-dts": "4.4.0",
|
|
46
|
-
"@inkeep/cxkit-color-mode": "0.0.0-dev-
|
|
47
|
-
"@inkeep/cxkit-types": "0.0.0-dev-
|
|
46
|
+
"@inkeep/cxkit-color-mode": "0.0.0-dev-20250228071024",
|
|
47
|
+
"@inkeep/cxkit-types": "0.0.0-dev-20250228071024"
|
|
48
48
|
},
|
|
49
49
|
"module": "dist/index.js",
|
|
50
50
|
"types": "dist/index.d.ts",
|