@inkeep/cxkit-react 0.5.22 → 0.5.23

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 t=require("react/jsx-runtime"),e=require("@inkeep/cxkit-styled"),x=require("react"),B=require("./modal.cjs"),I=require("./embedded-search-and-chat.cjs"),j=require("./embedded-search-and-chat.impl.cjs"),S=require("./embedded-chat.cjs");function b(n){const[r,o]=x.useState(!1),{modalSettings:s,label:i,defaultView:a="chat",canToggleView:c=!0,avatar:C,...d}=n,m={...d,shouldShowAskAICard:c},{config:h,...u}=j.useWidgetImpl({...m,defaultView:a}),g={...s,isOpen:r,onOpenChange:l=>{n.forceDefaultView&&!l&&u.setView(a??"chat"),o(!!l)}};return t.jsxs(t.Fragment,{children:[t.jsx(e.Shadow,{wrapperStyles:{display:"contents"},children:t.jsx(e.RootProvider,{config:h,componentType:e.WebWidgetInteractionType.ChatButton,children:t.jsx(p,{label:i,avatar:C,setOpen:o})})}),t.jsx(B.InkeepModal,{...h,componentType:e.WebWidgetInteractionType.ChatButton,modalSettings:g,children:c?t.jsx(I.InkeepEmbeddedSearchAndChatImpl,{...u}):t.jsx(S.InkeepEmbeddedChatImpl,{...d})})]})}function p(n){const{label:r="Ask AI",avatar:o,setOpen:s}=n;return t.jsx(e.ChatButton.Container,{children:t.jsxs(e.ChatButton.ChatButton,{onClick:i=>{i.button!==2&&s(a=>!a)},children:[t.jsx(e.ChatButton.ChatButtonText,{children:r}),t.jsx(e.ChatButton.ChatButtonAvatarContent,{children:t.jsx(e.ChatButton.ChatButtonAvatarImage,{avatar:o})})]})})}exports.ChatButtonImpl=p;exports.InkeepChatButton=b;
1
+ "use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),t=require("@inkeep/cxkit-styled"),x=require("./modal.cjs"),B=require("./embedded-search-and-chat.cjs"),S=require("./embedded-search-and-chat.impl.cjs"),j=require("./embedded-chat.cjs"),b=require("../utils.cjs"),k=require("@radix-ui/react-use-controllable-state");function A(o){const{modalSettings:n,label:s,defaultView:a="chat",canToggleView:r=!0,avatar:i,...l}=o,p={...l,shouldShowAskAICard:r?o.shouldShowAskAICard:!1},{config:c,...u}=S.useWidgetImpl({...p,defaultView:a}),m=h=>{n?.isOpen===void 0&&(o.forceDefaultView&&!h&&u.setView(a??"search"),d(!!h))},[g=!1,d]=k.useControllableState({prop:n?.isOpen,defaultProp:!1,onChange:b.composeEventHandlers(n?.onOpenChange,m)}),I={...n,isOpen:g,onOpenChange:d},f=()=>r?e.jsx(B.InkeepEmbeddedSearchAndChatImpl,{...u}):e.jsx(j.InkeepEmbeddedChatImpl,{...l});return e.jsxs(e.Fragment,{children:[e.jsx(t.Shadow,{wrapperStyles:{display:"contents"},children:e.jsx(t.RootProvider,{config:c,componentType:t.WebWidgetInteractionType.ChatButton,children:e.jsx(C,{label:s,avatar:i,onOpenChange:d})})}),e.jsx(x.InkeepModal,{...c,componentType:t.WebWidgetInteractionType.ChatButton,modalSettings:I,children:f()})]})}function C({label:o="Ask AI",avatar:n,onOpenChange:s}){const a=r=>{r.button!==2&&s(i=>!i)};return e.jsx(t.ChatButton.Container,{children:e.jsxs(t.ChatButton.ChatButton,{onClick:a,children:[e.jsx(t.ChatButton.ChatButtonText,{children:o}),e.jsx(t.ChatButton.ChatButtonAvatarContent,{children:e.jsx(t.ChatButton.ChatButtonAvatarImage,{avatar:n})})]})})}exports.ChatButtonImpl=C;exports.InkeepChatButton=A;
@@ -1,58 +1,57 @@
1
1
  "use client";
2
- import { jsxs as u, Fragment as I, jsx as t } from "react/jsx-runtime";
3
- import { Shadow as B, RootProvider as S, WebWidgetInteractionType as h, ChatButton as e } from "@inkeep/cxkit-styled";
4
- import { useState as k } from "react";
2
+ import { jsxs as u, Fragment as A, jsx as t } from "react/jsx-runtime";
3
+ import { Shadow as B, RootProvider as S, WebWidgetInteractionType as p, ChatButton as o } from "@inkeep/cxkit-styled";
5
4
  import { InkeepModal as w } from "./modal.js";
6
- import { InkeepEmbeddedSearchAndChatImpl as A } from "./embedded-search-and-chat.js";
7
- import { useWidgetImpl as b } from "./embedded-search-and-chat.impl.js";
8
- import { InkeepEmbeddedChatImpl as v } from "./embedded-chat.js";
9
- function D(n) {
10
- const [r, o] = k(!1), {
11
- modalSettings: i,
12
- label: l,
13
- defaultView: a = "chat",
14
- canToggleView: c = !0,
15
- avatar: C,
16
- ...p
17
- } = n, f = {
18
- ...p,
19
- shouldShowAskAICard: c
20
- }, { config: s, ...m } = b({ ...f, defaultView: a }), g = {
21
- ...i,
22
- isOpen: r,
23
- onOpenChange: (d) => {
24
- n.forceDefaultView && !d && m.setView(a ?? "chat"), o(!!d);
25
- }
26
- };
27
- return /* @__PURE__ */ u(I, { children: [
28
- /* @__PURE__ */ t(B, { wrapperStyles: { display: "contents" }, children: /* @__PURE__ */ t(S, { config: s, componentType: h.ChatButton, children: /* @__PURE__ */ t(y, { label: l, avatar: C, setOpen: o }) }) }),
5
+ import { InkeepEmbeddedSearchAndChatImpl as b } from "./embedded-search-and-chat.js";
6
+ import { useWidgetImpl as v } from "./embedded-search-and-chat.impl.js";
7
+ import { InkeepEmbeddedChatImpl as y } from "./embedded-chat.js";
8
+ import { composeEventHandlers as O } from "../utils.js";
9
+ import { useControllableState as T } from "@radix-ui/react-use-controllable-state";
10
+ function M(n) {
11
+ const {
12
+ modalSettings: e,
13
+ label: i,
14
+ defaultView: r = "chat",
15
+ canToggleView: a = !0,
16
+ avatar: l,
17
+ ...d
18
+ } = n, C = {
19
+ ...d,
20
+ shouldShowAskAICard: a ? n.shouldShowAskAICard : !1
21
+ }, { config: c, ...h } = v({ ...C, defaultView: r }), f = (m) => {
22
+ e?.isOpen === void 0 && (n.forceDefaultView && !m && h.setView(r ?? "search"), s(!!m));
23
+ }, [g = !1, s] = T({
24
+ prop: e?.isOpen,
25
+ defaultProp: !1,
26
+ onChange: O(e?.onOpenChange, f)
27
+ }), I = {
28
+ ...e,
29
+ isOpen: g,
30
+ onOpenChange: s
31
+ }, k = () => a ? /* @__PURE__ */ t(b, { ...h }) : /* @__PURE__ */ t(y, { ...d });
32
+ return /* @__PURE__ */ u(A, { children: [
33
+ /* @__PURE__ */ t(B, { wrapperStyles: { display: "contents" }, children: /* @__PURE__ */ t(S, { config: c, componentType: p.ChatButton, children: /* @__PURE__ */ t(x, { label: i, avatar: l, onOpenChange: s }) }) }),
29
34
  /* @__PURE__ */ t(
30
35
  w,
31
36
  {
32
- ...s,
33
- componentType: h.ChatButton,
34
- modalSettings: g,
35
- children: c ? /* @__PURE__ */ t(A, { ...m }) : /* @__PURE__ */ t(v, { ...p })
37
+ ...c,
38
+ componentType: p.ChatButton,
39
+ modalSettings: I,
40
+ children: k()
36
41
  }
37
42
  )
38
43
  ] });
39
44
  }
40
- function y(n) {
41
- const { label: r = "Ask AI", avatar: o, setOpen: i } = n;
42
- return /* @__PURE__ */ t(e.Container, { children: /* @__PURE__ */ u(
43
- e.ChatButton,
44
- {
45
- onClick: (l) => {
46
- l.button !== 2 && i((a) => !a);
47
- },
48
- children: [
49
- /* @__PURE__ */ t(e.ChatButtonText, { children: r }),
50
- /* @__PURE__ */ t(e.ChatButtonAvatarContent, { children: /* @__PURE__ */ t(e.ChatButtonAvatarImage, { avatar: o }) })
51
- ]
52
- }
53
- ) });
45
+ function x({ label: n = "Ask AI", avatar: e, onOpenChange: i }) {
46
+ const r = (a) => {
47
+ a.button !== 2 && i((l) => !l);
48
+ };
49
+ return /* @__PURE__ */ t(o.Container, { children: /* @__PURE__ */ u(o.ChatButton, { onClick: r, children: [
50
+ /* @__PURE__ */ t(o.ChatButtonText, { children: n }),
51
+ /* @__PURE__ */ t(o.ChatButtonAvatarContent, { children: /* @__PURE__ */ t(o.ChatButtonAvatarImage, { avatar: e }) })
52
+ ] }) });
54
53
  }
55
54
  export {
56
- y as ChatButtonImpl,
57
- D as InkeepChatButton
55
+ x as ChatButtonImpl,
56
+ M as InkeepChatButton
58
57
  };
@@ -1 +1 @@
1
- "use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),B=require("react"),m=require("./embedded-search-and-chat.cjs"),x=require("./embedded-search-and-chat.impl.cjs"),j=require("./embedded-search.cjs"),r=require("@inkeep/cxkit-styled"),g=require("./modal.cjs");function y(a){const[n,t]=B.useState(!1),{modalSettings:s,defaultView:c="search",canToggleView:o=!0,...u}=a,h={...u,shouldShowAskAICard:o},{config:d,...i}=x.useWidgetImpl({...h,defaultView:c}),S={shortcutKey:"k",...s,isOpen:n,onOpenChange:l=>{a.forceDefaultView&&!l&&i.setView(c??"search"),t(!!l)}};return e.jsxs(e.Fragment,{children:[e.jsx(r.Shadow,{wrapperStyles:{display:"contents"},children:e.jsx(r.RootProvider,{config:d,componentType:r.WebWidgetInteractionType.SearchBar,children:e.jsx(p,{setOpen:t,modalSettings:S})})}),e.jsx(g.InkeepModal,{...d,modalSettings:S,componentType:r.WebWidgetInteractionType.SearchBar,children:o?e.jsx(m.InkeepEmbeddedSearchAndChatImpl,{...i}):e.jsx(j.InkeepEmbeddedSearchImpl,{...h})})]})}function p(a){const{setOpen:n,modalSettings:t}=a;return e.jsx(r.SearchBar.SearchBarContainer,{children:e.jsxs(r.SearchBar.SearchBarButton,{onClick:s=>{s.button!==2&&n(c=>!c)},children:[e.jsxs(r.SearchBar.SearchBarContentWrapper,{children:[e.jsx(r.SearchBar.SearchBarIcon,{}),e.jsx(r.SearchBar.SearchBarText,{})]}),e.jsxs(r.SearchBar.SearchBarKbdWrapper,{children:[e.jsx(r.SearchBar.SearchBarKbdModifier,{shortcutKey:t?.shortcutKey}),e.jsx(r.SearchBar.SearchBarKbdShortcutKey,{shortcutKey:t?.shortcutKey})]})]})})}exports.InkeepSearchBar=y;exports.SearchBarImpl=p;
1
+ "use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),x=require("./embedded-search-and-chat.cjs"),j=require("./embedded-search-and-chat.impl.cjs"),f=require("./embedded-search.cjs"),r=require("@inkeep/cxkit-styled"),C=require("./modal.cjs"),b=require("../utils.cjs"),g=require("@radix-ui/react-use-controllable-state");function y(a){const{modalSettings:t,defaultView:n="search",canToggleView:c=!0,...o}=a,h={...o,shouldShowAskAICard:c?a.shouldShowAskAICard:!1},{config:i,...d}=j.useWidgetImpl({...h,defaultView:n}),p=S=>{t?.isOpen===void 0&&(a.forceDefaultView&&!S&&d.setView(n),s(!!S))},[B=!1,s]=g.useControllableState({prop:t?.isOpen,defaultProp:!1,onChange:b.composeEventHandlers(t?.onOpenChange,p)}),l={shortcutKey:"k",...t,isOpen:B,onOpenChange:s},m=()=>c?e.jsx(x.InkeepEmbeddedSearchAndChatImpl,{...d}):e.jsx(f.InkeepEmbeddedSearchImpl,{...h});return e.jsxs(e.Fragment,{children:[e.jsx(r.Shadow,{wrapperStyles:{display:"contents"},children:e.jsx(r.RootProvider,{config:i,componentType:r.WebWidgetInteractionType.SearchBar,children:e.jsx(u,{onOpenChange:s,modalSettings:l})})}),e.jsx(C.InkeepModal,{...i,modalSettings:l,componentType:r.WebWidgetInteractionType.SearchBar,children:m()})]})}function u({onOpenChange:a,modalSettings:t}){const n=c=>{c.button!==2&&a(o=>!o)};return e.jsx(r.SearchBar.SearchBarContainer,{children:e.jsxs(r.SearchBar.SearchBarButton,{onClick:n,children:[e.jsxs(r.SearchBar.SearchBarContentWrapper,{children:[e.jsx(r.SearchBar.SearchBarIcon,{}),e.jsx(r.SearchBar.SearchBarText,{})]}),e.jsxs(r.SearchBar.SearchBarKbdWrapper,{children:[e.jsx(r.SearchBar.SearchBarKbdModifier,{shortcutKey:t?.shortcutKey}),e.jsx(r.SearchBar.SearchBarKbdShortcutKey,{shortcutKey:t?.shortcutKey})]})]})})}exports.InkeepSearchBar=y;exports.SearchBarImpl=u;
@@ -1,66 +1,65 @@
1
1
  "use client";
2
- import { jsxs as a, Fragment as f, jsx as e } from "react/jsx-runtime";
3
- import { useState as B } from "react";
2
+ import { jsxs as c, Fragment as C, jsx as e } from "react/jsx-runtime";
4
3
  import { InkeepEmbeddedSearchAndChatImpl as g } from "./embedded-search-and-chat.js";
5
- import { useWidgetImpl as y } from "./embedded-search-and-chat.impl.js";
6
- import { InkeepEmbeddedSearchImpl as I } from "./embedded-search.js";
7
- import { Shadow as K, RootProvider as b, WebWidgetInteractionType as S, SearchBar as r } from "@inkeep/cxkit-styled";
8
- import { InkeepModal as k } from "./modal.js";
9
- function E(n) {
10
- const [c, t] = B(!1), {
11
- modalSettings: i,
4
+ import { useWidgetImpl as I } from "./embedded-search-and-chat.impl.js";
5
+ import { InkeepEmbeddedSearchImpl as y } from "./embedded-search.js";
6
+ import { Shadow as k, RootProvider as K, WebWidgetInteractionType as u, SearchBar as r } from "@inkeep/cxkit-styled";
7
+ import { InkeepModal as b } from "./modal.js";
8
+ import { composeEventHandlers as w } from "../utils.js";
9
+ import { useControllableState as A } from "@radix-ui/react-use-controllable-state";
10
+ function M(n) {
11
+ const {
12
+ modalSettings: t,
12
13
  defaultView: o = "search",
13
- canToggleView: h = !0,
14
- ...u
14
+ canToggleView: a = !0,
15
+ ...i
15
16
  } = n, s = {
16
- ...u,
17
- shouldShowAskAICard: h
18
- }, { config: p, ...d } = y({
17
+ ...i,
18
+ shouldShowAskAICard: a ? n.shouldShowAskAICard : !1
19
+ }, { config: d, ...l } = I({
19
20
  ...s,
20
21
  defaultView: o
21
- }), m = {
22
+ }), f = (m) => {
23
+ t?.isOpen === void 0 && (n.forceDefaultView && !m && l.setView(o), h(!!m));
24
+ }, [S = !1, h] = A({
25
+ prop: t?.isOpen,
26
+ defaultProp: !1,
27
+ onChange: w(t?.onOpenChange, f)
28
+ }), p = {
22
29
  shortcutKey: "k",
23
- ...i,
24
- isOpen: c,
25
- onOpenChange: (l) => {
26
- n.forceDefaultView && !l && d.setView(o ?? "search"), t(!!l);
27
- }
28
- };
29
- return /* @__PURE__ */ a(f, { children: [
30
- /* @__PURE__ */ e(K, { wrapperStyles: { display: "contents" }, children: /* @__PURE__ */ e(b, { config: p, componentType: S.SearchBar, children: /* @__PURE__ */ e(w, { setOpen: t, modalSettings: m }) }) }),
30
+ ...t,
31
+ isOpen: S,
32
+ onOpenChange: h
33
+ }, B = () => a ? /* @__PURE__ */ e(g, { ...l }) : /* @__PURE__ */ e(y, { ...s });
34
+ return /* @__PURE__ */ c(C, { children: [
35
+ /* @__PURE__ */ e(k, { wrapperStyles: { display: "contents" }, children: /* @__PURE__ */ e(K, { config: d, componentType: u.SearchBar, children: /* @__PURE__ */ e(O, { onOpenChange: h, modalSettings: p }) }) }),
31
36
  /* @__PURE__ */ e(
32
- k,
37
+ b,
33
38
  {
34
- ...p,
35
- modalSettings: m,
36
- componentType: S.SearchBar,
37
- children: h ? /* @__PURE__ */ e(g, { ...d }) : /* @__PURE__ */ e(I, { ...s })
39
+ ...d,
40
+ modalSettings: p,
41
+ componentType: u.SearchBar,
42
+ children: B()
38
43
  }
39
44
  )
40
45
  ] });
41
46
  }
42
- function w(n) {
43
- const { setOpen: c, modalSettings: t } = n;
44
- return /* @__PURE__ */ e(r.SearchBarContainer, { children: /* @__PURE__ */ a(
45
- r.SearchBarButton,
46
- {
47
- onClick: (i) => {
48
- i.button !== 2 && c((o) => !o);
49
- },
50
- children: [
51
- /* @__PURE__ */ a(r.SearchBarContentWrapper, { children: [
52
- /* @__PURE__ */ e(r.SearchBarIcon, {}),
53
- /* @__PURE__ */ e(r.SearchBarText, {})
54
- ] }),
55
- /* @__PURE__ */ a(r.SearchBarKbdWrapper, { children: [
56
- /* @__PURE__ */ e(r.SearchBarKbdModifier, { shortcutKey: t?.shortcutKey }),
57
- /* @__PURE__ */ e(r.SearchBarKbdShortcutKey, { shortcutKey: t?.shortcutKey })
58
- ] })
59
- ]
60
- }
61
- ) });
47
+ function O({ onOpenChange: n, modalSettings: t }) {
48
+ const o = (a) => {
49
+ a.button !== 2 && n((i) => !i);
50
+ };
51
+ return /* @__PURE__ */ e(r.SearchBarContainer, { children: /* @__PURE__ */ c(r.SearchBarButton, { onClick: o, children: [
52
+ /* @__PURE__ */ c(r.SearchBarContentWrapper, { children: [
53
+ /* @__PURE__ */ e(r.SearchBarIcon, {}),
54
+ /* @__PURE__ */ e(r.SearchBarText, {})
55
+ ] }),
56
+ /* @__PURE__ */ c(r.SearchBarKbdWrapper, { children: [
57
+ /* @__PURE__ */ e(r.SearchBarKbdModifier, { shortcutKey: t?.shortcutKey }),
58
+ /* @__PURE__ */ e(r.SearchBarKbdShortcutKey, { shortcutKey: t?.shortcutKey })
59
+ ] })
60
+ ] }) });
62
61
  }
63
62
  export {
64
- E as InkeepSearchBar,
65
- w as SearchBarImpl
63
+ M as InkeepSearchBar,
64
+ O as SearchBarImpl
66
65
  };
package/dist/index.d.cts CHANGED
@@ -12,10 +12,10 @@ import { RootProviderProps } from '@inkeep/cxkit-styled';
12
12
  import { WebWidgetInteractionType } from '@inkeep/cxkit-styled';
13
13
  import { WidgetView } from '@inkeep/cxkit-types';
14
14
 
15
- export declare function ChatButtonImpl(props: ChatButtonImplProps): JSX.Element;
15
+ export declare function ChatButtonImpl({ label, avatar, onOpenChange }: ChatButtonImplProps): JSX.Element;
16
16
 
17
17
  declare interface ChatButtonImplProps extends Pick<InkeepChatButtonProps, 'label' | 'avatar'> {
18
- setOpen: React.Dispatch<React.SetStateAction<boolean>>;
18
+ onOpenChange: React.Dispatch<React.SetStateAction<boolean | undefined>>;
19
19
  }
20
20
 
21
21
  declare type ChatConfig = Pick<InkeepConfig, 'baseSettings' | 'aiChatSettings'>;
@@ -23,7 +23,7 @@ declare type ChatConfig = Pick<InkeepConfig, 'baseSettings' | 'aiChatSettings'>;
23
23
  export declare function InkeepChatButton(props: InkeepChatButtonProps): JSX.Element;
24
24
 
25
25
  export declare interface InkeepChatButtonProps extends Omit<InkeepEmbeddedSearchAndChatProps, 'onToggleView'> {
26
- modalSettings?: Omit<InkeepModalSettings, 'isOpen' | 'onOpenChange'>;
26
+ modalSettings?: InkeepModalSettings;
27
27
  label?: string;
28
28
  avatar?: InkeepAIChatSettings['aiAssistantAvatar'];
29
29
  canToggleView?: boolean;
@@ -144,7 +144,7 @@ export declare interface InkeepModalSearchProps extends Omit<InkeepEmbeddedSearc
144
144
  export declare function InkeepSearchBar(props: InkeepSearchBarProps): JSX.Element;
145
145
 
146
146
  export declare interface InkeepSearchBarProps extends Omit<InkeepEmbeddedSearchAndChatProps, 'onToggleView'> {
147
- modalSettings?: Omit<InkeepModalSettings, 'isOpen' | 'onOpenChange'>;
147
+ modalSettings?: InkeepModalSettings;
148
148
  canToggleView?: boolean;
149
149
  }
150
150
 
@@ -159,10 +159,10 @@ export declare function ModalContent(props: PropsWithChildren): JSX.Element;
159
159
 
160
160
  declare type RootConfig = RootProviderProps['config'];
161
161
 
162
- export declare function SearchBarImpl(props: SearchBarImplProps): JSX.Element;
162
+ export declare function SearchBarImpl({ onOpenChange, modalSettings }: SearchBarImplProps): JSX.Element;
163
163
 
164
164
  declare interface SearchBarImplProps {
165
- setOpen: React.Dispatch<React.SetStateAction<boolean>>;
165
+ onOpenChange: React.Dispatch<React.SetStateAction<boolean | undefined>>;
166
166
  modalSettings: InkeepSearchBarProps['modalSettings'];
167
167
  }
168
168
 
package/dist/index.d.ts CHANGED
@@ -12,10 +12,10 @@ import { RootProviderProps } from '@inkeep/cxkit-styled';
12
12
  import { WebWidgetInteractionType } from '@inkeep/cxkit-styled';
13
13
  import { WidgetView } from '@inkeep/cxkit-types';
14
14
 
15
- export declare function ChatButtonImpl(props: ChatButtonImplProps): JSX.Element;
15
+ export declare function ChatButtonImpl({ label, avatar, onOpenChange }: ChatButtonImplProps): JSX.Element;
16
16
 
17
17
  declare interface ChatButtonImplProps extends Pick<InkeepChatButtonProps, 'label' | 'avatar'> {
18
- setOpen: React.Dispatch<React.SetStateAction<boolean>>;
18
+ onOpenChange: React.Dispatch<React.SetStateAction<boolean | undefined>>;
19
19
  }
20
20
 
21
21
  declare type ChatConfig = Pick<InkeepConfig, 'baseSettings' | 'aiChatSettings'>;
@@ -23,7 +23,7 @@ declare type ChatConfig = Pick<InkeepConfig, 'baseSettings' | 'aiChatSettings'>;
23
23
  export declare function InkeepChatButton(props: InkeepChatButtonProps): JSX.Element;
24
24
 
25
25
  export declare interface InkeepChatButtonProps extends Omit<InkeepEmbeddedSearchAndChatProps, 'onToggleView'> {
26
- modalSettings?: Omit<InkeepModalSettings, 'isOpen' | 'onOpenChange'>;
26
+ modalSettings?: InkeepModalSettings;
27
27
  label?: string;
28
28
  avatar?: InkeepAIChatSettings['aiAssistantAvatar'];
29
29
  canToggleView?: boolean;
@@ -144,7 +144,7 @@ export declare interface InkeepModalSearchProps extends Omit<InkeepEmbeddedSearc
144
144
  export declare function InkeepSearchBar(props: InkeepSearchBarProps): JSX.Element;
145
145
 
146
146
  export declare interface InkeepSearchBarProps extends Omit<InkeepEmbeddedSearchAndChatProps, 'onToggleView'> {
147
- modalSettings?: Omit<InkeepModalSettings, 'isOpen' | 'onOpenChange'>;
147
+ modalSettings?: InkeepModalSettings;
148
148
  canToggleView?: boolean;
149
149
  }
150
150
 
@@ -159,10 +159,10 @@ export declare function ModalContent(props: PropsWithChildren): JSX.Element;
159
159
 
160
160
  declare type RootConfig = RootProviderProps['config'];
161
161
 
162
- export declare function SearchBarImpl(props: SearchBarImplProps): JSX.Element;
162
+ export declare function SearchBarImpl({ onOpenChange, modalSettings }: SearchBarImplProps): JSX.Element;
163
163
 
164
164
  declare interface SearchBarImplProps {
165
- setOpen: React.Dispatch<React.SetStateAction<boolean>>;
165
+ onOpenChange: React.Dispatch<React.SetStateAction<boolean | undefined>>;
166
166
  modalSettings: InkeepSearchBarProps['modalSettings'];
167
167
  }
168
168
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@inkeep/cxkit-react",
3
- "version": "0.5.22",
3
+ "version": "0.5.23",
4
4
  "description": "",
5
5
  "license": "Inkeep, Inc. Customer License (IICL) v1.1",
6
6
  "homepage": "",
@@ -20,7 +20,8 @@
20
20
  },
21
21
  "sideEffects": false,
22
22
  "dependencies": {
23
- "@inkeep/cxkit-styled": "0.5.22"
23
+ "@radix-ui/react-use-controllable-state": "^1.1.0",
24
+ "@inkeep/cxkit-styled": "0.5.23"
24
25
  },
25
26
  "devDependencies": {
26
27
  "@biomejs/biome": "1.9.4",
@@ -43,8 +44,8 @@
43
44
  "typescript": "5.7.3",
44
45
  "vite": "5.4.11",
45
46
  "vite-plugin-dts": "4.4.0",
46
- "@inkeep/cxkit-color-mode": "0.5.22",
47
- "@inkeep/cxkit-types": "0.5.22"
47
+ "@inkeep/cxkit-color-mode": "0.5.23",
48
+ "@inkeep/cxkit-types": "0.5.23"
48
49
  },
49
50
  "module": "dist/index.js",
50
51
  "types": "dist/index.d.ts",