@clubmed/trident-ui 2.0.0 → 2.1.0-beta.2

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.
package/ui/ChatWindow.js CHANGED
@@ -1,135 +1,51 @@
1
1
  "use client";
2
2
  import { twMerge as e } from "./helpers/twMerge.js";
3
- import { ChatInput as t } from "./ChatInput.js";
4
- import { t as n } from "../chunks/ChatMessage.js";
5
- import { ChatTypingIndicator as r } from "./ChatTypingIndicator.js";
6
- import { ChatWindowCsatPrompt as i } from "./ChatWindowCsatPrompt.js";
7
- import { ChatWindowCsatThankYou as a } from "./ChatWindowCsatThankYou.js";
8
- import { ChatWindowQuote as o } from "./ChatWindowQuote.js";
9
- import { forwardRef as s, useEffect as c, useImperativeHandle as l, useRef as u, useState as d } from "react";
10
- import { jsx as f, jsxs as p } from "react/jsx-runtime";
11
- import { Icon as m } from "@clubmed/trident-icons";
3
+ import { ChatBody as t } from "./ChatBody.js";
4
+ import { ChatInput as n } from "./ChatInput.js";
5
+ import { ChatHeader as r } from "./ChatHeader.js";
6
+ import { forwardRef as i } from "react";
7
+ import { Fragment as a, jsx as o, jsxs as s } from "react/jsx-runtime";
8
+ import { Icon as c } from "@clubmed/trident-icons";
12
9
  //#region lib/ui/ChatWindow.tsx
13
- var h = /* @__PURE__ */ f("svg", {
14
- className: "absolute top-full inset-x-[50%] -translate-x-1/2",
15
- width: "118",
16
- height: "27",
17
- viewBox: "0 0 118 27",
18
- children: /* @__PURE__ */ f("path", {
19
- d: "M0 0C10.8283 0 21.1946 5.40419 28.7327 13.2062L30.2673 14.7945C45.991 31.0685 72.009 31.0685 87.7327 14.7945L89.2673 13.2062C96.8054 5.40419 107.172 0 118 0C118 0 80.6853 0 0 0Z",
20
- fill: "#F6EFE7"
21
- })
22
- }), g = s(function({ title: s = "Ask me a question", greeting: g, messages: _, inputValue: v, inputPlaceholder: y, isTyping: b = !1, onInputChange: x, onSubmit: S, onClose: C, onAudioClick: w, logo: T, onFeedbackRate: E, csatLabels: D, csatRenderRatingLabel: O, csatThankYouLabels: k, onQuoteCtaClick: A, className: j, ...M }, N) {
23
- let P = u(null), [F, I] = d(!1), [L, R] = d(null), [z, B] = d([]);
24
- l(N, () => ({
25
- askForFeedback() {
26
- I(!0);
27
- },
28
- showQuotes(e) {
29
- B((t) => [...t, e]);
30
- }
31
- })), c(() => {
32
- let e = P.current;
33
- e && e.scrollTo({
34
- top: e.scrollHeight,
35
- behavior: "smooth"
36
- });
37
- }, [
38
- _,
39
- b,
40
- F,
41
- L,
42
- z
43
- ]);
44
- function V(e) {
45
- R(String(O ? O(e) : e)), E?.(e);
46
- }
47
- let H = F && D && O;
48
- return /* @__PURE__ */ p("div", {
49
- ...M,
50
- className: e("flex flex-col gap-20 items-center", j),
51
- children: [/* @__PURE__ */ p("div", {
10
+ var l = i(function({ title: i, onClose: l, logo: u, className: d, children: f, inputValue: p, inputPlaceholder: m, onInputChange: h, onSubmit: g, onAudioClick: _, greeting: v, messages: y, isTyping: b, onFeedbackRate: x, csatLabels: S, csatRenderRatingLabel: C, csatThankYouLabels: w, onQuoteCtaClick: T, ...E }, D) {
11
+ return /* @__PURE__ */ s("div", {
12
+ ...E,
13
+ className: e("flex flex-col gap-20 items-center", d),
14
+ children: [/* @__PURE__ */ o("div", {
52
15
  className: "chat-border bg-white flex flex-col h-full w-full rounded-32 overflow-hidden",
53
- children: [
54
- /* @__PURE__ */ p("div", {
55
- className: "relative flex flex-col items-center shrink-0 pt-4 px-4 h-118 overflow-hidden",
56
- children: [/* @__PURE__ */ f("div", {
57
- className: "absolute inset-x-4 top-4 h-87 bg-lightSand rounded-[24]",
58
- children: h
59
- }), /* @__PURE__ */ p("div", {
60
- className: "relative flex flex-col flex-1 items-center justify-end pb-8 w-full z-10",
61
- children: [/* @__PURE__ */ f("div", {
62
- className: "flex items-center justify-center px-12 py-8 w-full",
63
- children: /* @__PURE__ */ f("p", {
64
- className: "font-serif font-bold italic text-h5 text-center text-black line-clamp-2",
65
- children: s
66
- })
67
- }), T ?? /* @__PURE__ */ f("button", {
68
- type: "button",
69
- "aria-label": "AI assistant",
70
- className: "chat-border flex items-center justify-center size-48 rounded-full bg-white outline-none focus-visible:ring-4 focus-visible:ring-black focus-visible:ring-offset-2",
71
- children: /* @__PURE__ */ f(m, {
72
- name: "Sparkles",
73
- width: "24px"
74
- })
75
- })]
76
- })]
16
+ children: f ?? /* @__PURE__ */ s(a, { children: [
17
+ /* @__PURE__ */ o(r, {
18
+ title: i,
19
+ logo: u
77
20
  }),
78
- /* @__PURE__ */ p("div", {
79
- ref: P,
80
- role: "log",
81
- "aria-label": "Chat messages",
82
- "aria-live": "polite",
83
- className: "chat-message-log flex flex-col flex-1 gap-20 overflow-y-auto py-20",
84
- children: [
85
- g ? /* @__PURE__ */ f("div", {
86
- className: "px-20",
87
- children: /* @__PURE__ */ f("p", {
88
- className: "text-b3 text-black",
89
- children: g
90
- })
91
- }) : null,
92
- _.map((e) => /* @__PURE__ */ f(n, {
93
- sender: e.sender,
94
- children: e.content
95
- }, e.id)),
96
- b && /* @__PURE__ */ f("div", {
97
- className: "px-12",
98
- children: /* @__PURE__ */ f(r, {})
99
- }),
100
- H && /* @__PURE__ */ f(i, {
101
- onRate: V,
102
- labels: D,
103
- renderRatingLabel: O
104
- }),
105
- L && /* @__PURE__ */ f(n, {
106
- sender: "user",
107
- children: L
108
- }),
109
- L && k && /* @__PURE__ */ f(a, { labels: k }),
110
- z.map((e, t) => /* @__PURE__ */ f(o, {
111
- quotes: e,
112
- onCtaClick: A
113
- }, t))
114
- ]
21
+ /* @__PURE__ */ o(t, {
22
+ greeting: v,
23
+ messages: y,
24
+ isTyping: b,
25
+ onFeedbackRate: x,
26
+ csatLabels: S,
27
+ csatRenderRatingLabel: C,
28
+ csatThankYouLabels: w,
29
+ onQuoteCtaClick: T,
30
+ ref: D
115
31
  }),
116
- /* @__PURE__ */ f("div", {
32
+ /* @__PURE__ */ o("div", {
117
33
  className: "shrink-0 px-8 pb-8 pt-12",
118
- children: /* @__PURE__ */ f(t, {
119
- value: v,
120
- placeholder: y,
121
- onValueChange: x,
122
- onSubmit: S,
123
- onAudioClick: w
34
+ children: /* @__PURE__ */ o(n, {
35
+ value: p,
36
+ placeholder: m,
37
+ onValueChange: h,
38
+ onSubmit: g,
39
+ onAudioClick: _
124
40
  })
125
41
  })
126
- ]
127
- }), C && /* @__PURE__ */ f("button", {
42
+ ] })
43
+ }), l && /* @__PURE__ */ o("button", {
128
44
  type: "button",
129
45
  "aria-label": "Close chat",
130
- onClick: C,
46
+ onClick: l,
131
47
  className: "flex items-center justify-center size-48 rounded-full bg-black border border-black text-white shrink-0 hover:opacity-80 transition-opacity outline-none focus-visible:ring-4 focus-visible:ring-black focus-visible:ring-offset-2",
132
- children: /* @__PURE__ */ f(m, {
48
+ children: /* @__PURE__ */ o(c, {
133
49
  name: "CrossDefault",
134
50
  width: "24px"
135
51
  })
@@ -137,6 +53,6 @@ var h = /* @__PURE__ */ f("svg", {
137
53
  });
138
54
  });
139
55
  //#endregion
140
- export { g as ChatWindow };
56
+ export { l as ChatWindow };
141
57
 
142
58
  //# sourceMappingURL=ChatWindow.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"ChatWindow.js","names":[],"sources":["../../lib/ui/ChatWindow.tsx"],"sourcesContent":["'use client';\n\nimport { Icon } from '@clubmed/trident-icons';\nimport type { HTMLAttributes, ReactNode } from 'react';\nimport { forwardRef, useEffect, useImperativeHandle, useRef, useState } from 'react';\nimport { twMerge } from './helpers/twMerge';\nimport { ChatInput } from './ChatInput';\nimport { ChatMessage } from './ChatMessage';\nimport type { ChatMessageSender } from './ChatMessage';\nimport { ChatTypingIndicator } from './ChatTypingIndicator';\nimport { ChatWindowCsatPrompt } from './ChatWindowCsatPrompt';\nimport type { ChatWindowCsatPromptLabels } from './ChatWindowCsatPrompt';\nimport { ChatWindowCsatThankYou } from './ChatWindowCsatThankYou';\nimport type { ChatWindowCsatThankYouLabels } from './ChatWindowCsatThankYou';\nimport { ChatWindowQuote } from './ChatWindowQuote';\nimport type { ChatWindowQuoteItem } from './ChatWindowQuote';\n\nexport type { ChatWindowCsatPromptLabels, ChatWindowCsatThankYouLabels, ChatWindowQuoteItem };\n\nexport interface ChatWindowMessage {\n id: string;\n sender: ChatMessageSender;\n content: string;\n}\n\nexport interface ChatWindowProps extends Omit<HTMLAttributes<HTMLDivElement>, 'children'> {\n title?: string;\n greeting?: string;\n messages: ChatWindowMessage[];\n inputValue: string;\n inputPlaceholder?: string;\n isTyping?: boolean;\n onInputChange: (value: string) => void;\n onSubmit: () => void;\n onClose?: () => void;\n onAudioClick?: () => void;\n logo?: ReactNode;\n onFeedbackRate?: (rating: number) => void;\n csatLabels?: ChatWindowCsatPromptLabels;\n csatRenderRatingLabel?: (rating: number) => ReactNode;\n csatThankYouLabels?: ChatWindowCsatThankYouLabels;\n onQuoteCtaClick?: (quote: ChatWindowQuoteItem) => void;\n}\n\nexport interface ChatWindowHandle {\n askForFeedback: () => void;\n showQuotes: (quotes: ChatWindowQuoteItem[]) => void;\n}\n\nconst headerCurve = (\n <svg\n className=\"absolute top-full inset-x-[50%] -translate-x-1/2\"\n width=\"118\"\n height=\"27\"\n viewBox=\"0 0 118 27\"\n >\n <path\n d=\"M0 0C10.8283 0 21.1946 5.40419 28.7327 13.2062L30.2673 14.7945C45.991 31.0685 72.009 31.0685 87.7327 14.7945L89.2673 13.2062C96.8054 5.40419 107.172 0 118 0C118 0 80.6853 0 0 0Z\"\n fill=\"#F6EFE7\"\n />\n </svg>\n);\n\nexport const ChatWindow = forwardRef<ChatWindowHandle, ChatWindowProps>(function ChatWindow(\n {\n title = 'Ask me a question',\n greeting,\n messages,\n inputValue,\n inputPlaceholder,\n isTyping = false,\n onInputChange,\n onSubmit,\n onClose,\n onAudioClick,\n logo,\n onFeedbackRate,\n csatLabels,\n csatRenderRatingLabel,\n csatThankYouLabels,\n onQuoteCtaClick,\n className,\n ...props\n },\n ref,\n) {\n const logRef = useRef<HTMLDivElement>(null);\n const [showCsat, setShowCsat] = useState(false);\n const [csatRatingMessage, setCsatRatingMessage] = useState<string | null>(null);\n const [quoteGroups, setQuoteGroups] = useState<ChatWindowQuoteItem[][]>([]);\n\n useImperativeHandle(ref, () => ({\n askForFeedback() {\n setShowCsat(true);\n },\n showQuotes(quotes: ChatWindowQuoteItem[]) {\n setQuoteGroups((prev) => [...prev, quotes]);\n },\n }));\n\n useEffect(() => {\n const el = logRef.current;\n if (el) el.scrollTo({ top: el.scrollHeight, behavior: 'smooth' });\n }, [messages, isTyping, showCsat, csatRatingMessage, quoteGroups]);\n\n function handleRate(rating: number) {\n const label = csatRenderRatingLabel ? String(csatRenderRatingLabel(rating)) : String(rating);\n setCsatRatingMessage(label);\n onFeedbackRate?.(rating);\n }\n\n const csatReady = showCsat && csatLabels && csatRenderRatingLabel;\n\n return (\n <div {...props} className={twMerge('flex flex-col gap-20 items-center', className)}>\n <div className=\"chat-border bg-white flex flex-col h-full w-full rounded-32 overflow-hidden\">\n <div className=\"relative flex flex-col items-center shrink-0 pt-4 px-4 h-118 overflow-hidden\">\n <div className=\"absolute inset-x-4 top-4 h-87 bg-lightSand rounded-[24]\">\n {headerCurve}\n </div>\n <div className=\"relative flex flex-col flex-1 items-center justify-end pb-8 w-full z-10\">\n <div className=\"flex items-center justify-center px-12 py-8 w-full\">\n <p className=\"font-serif font-bold italic text-h5 text-center text-black line-clamp-2\">\n {title}\n </p>\n </div>\n {logo ?? (\n <button\n type=\"button\"\n aria-label=\"AI assistant\"\n className=\"chat-border flex items-center justify-center size-48 rounded-full bg-white outline-none focus-visible:ring-4 focus-visible:ring-black focus-visible:ring-offset-2\"\n >\n <Icon name=\"Sparkles\" width=\"24px\" />\n </button>\n )}\n </div>\n </div>\n\n <div\n ref={logRef}\n role=\"log\"\n aria-label=\"Chat messages\"\n aria-live=\"polite\"\n className=\"chat-message-log flex flex-col flex-1 gap-20 overflow-y-auto py-20\"\n >\n {greeting ? (\n <div className=\"px-20\">\n <p className=\"text-b3 text-black\">{greeting}</p>\n </div>\n ) : null}\n {messages.map((msg) => (\n <ChatMessage key={msg.id} sender={msg.sender}>\n {msg.content}\n </ChatMessage>\n ))}\n {isTyping && (\n <div className=\"px-12\">\n <ChatTypingIndicator />\n </div>\n )}\n {csatReady && (\n <ChatWindowCsatPrompt\n onRate={handleRate}\n labels={csatLabels}\n renderRatingLabel={csatRenderRatingLabel}\n />\n )}\n {csatRatingMessage && <ChatMessage sender=\"user\">{csatRatingMessage}</ChatMessage>}\n {csatRatingMessage && csatThankYouLabels && (\n <ChatWindowCsatThankYou labels={csatThankYouLabels} />\n )}\n {quoteGroups.map((quotes, idx) => (\n <ChatWindowQuote key={idx} quotes={quotes} onCtaClick={onQuoteCtaClick} />\n ))}\n </div>\n\n <div className=\"shrink-0 px-8 pb-8 pt-12\">\n <ChatInput\n value={inputValue}\n placeholder={inputPlaceholder}\n onValueChange={onInputChange}\n onSubmit={onSubmit}\n onAudioClick={onAudioClick}\n />\n </div>\n </div>\n\n {onClose && (\n <button\n type=\"button\"\n aria-label=\"Close chat\"\n onClick={onClose}\n className=\"flex items-center justify-center size-48 rounded-full bg-black border border-black text-white shrink-0 hover:opacity-80 transition-opacity outline-none focus-visible:ring-4 focus-visible:ring-black focus-visible:ring-offset-2\"\n >\n <Icon name=\"CrossDefault\" width=\"24px\" />\n </button>\n )}\n </div>\n );\n});\n"],"mappings":";;;;;;;;;;;;AAiDA,IAAM,IACJ,kBAAC,OAAD;CACE,WAAU;CACV,OAAM;CACN,QAAO;CACP,SAAQ;WAER,kBAAC,QAAD;EACE,GAAE;EACF,MAAK;EACL,CAAA;CACE,CAAA,EAGK,IAAa,EAA8C,SACtE,EACE,WAAQ,qBACR,aACA,aACA,eACA,qBACA,cAAW,IACX,kBACA,aACA,YACA,iBACA,SACA,mBACA,eACA,0BACA,uBACA,oBACA,cACA,GAAG,KAEL,GACA;CACA,IAAM,IAAS,EAAuB,KAAK,EACrC,CAAC,GAAU,KAAe,EAAS,GAAM,EACzC,CAAC,GAAmB,KAAwB,EAAwB,KAAK,EACzE,CAAC,GAAa,KAAkB,EAAkC,EAAE,CAAC;AAW3E,CATA,EAAoB,UAAY;EAC9B,iBAAiB;AACf,KAAY,GAAK;;EAEnB,WAAW,GAA+B;AACxC,MAAgB,MAAS,CAAC,GAAG,GAAM,EAAO,CAAC;;EAE9C,EAAE,EAEH,QAAgB;EACd,IAAM,IAAK,EAAO;AAClB,EAAI,KAAI,EAAG,SAAS;GAAE,KAAK,EAAG;GAAc,UAAU;GAAU,CAAC;IAChE;EAAC;EAAU;EAAU;EAAU;EAAmB;EAAY,CAAC;CAElE,SAAS,EAAW,GAAgB;AAGlC,EADA,EADsC,OAAxB,IAA+B,EAAsB,EAAO,GAAW,EAAO,CACjE,EAC3B,IAAiB,EAAO;;CAG1B,IAAM,IAAY,KAAY,KAAc;AAE5C,QACE,kBAAC,OAAD;EAAK,GAAI;EAAO,WAAW,EAAQ,qCAAqC,EAAU;YAAlF,CACE,kBAAC,OAAD;GAAK,WAAU;aAAf;IACE,kBAAC,OAAD;KAAK,WAAU;eAAf,CACE,kBAAC,OAAD;MAAK,WAAU;gBACZ;MACG,CAAA,EACN,kBAAC,OAAD;MAAK,WAAU;gBAAf,CACE,kBAAC,OAAD;OAAK,WAAU;iBACb,kBAAC,KAAD;QAAG,WAAU;kBACV;QACC,CAAA;OACA,CAAA,EACL,KACC,kBAAC,UAAD;OACE,MAAK;OACL,cAAW;OACX,WAAU;iBAEV,kBAAC,GAAD;QAAM,MAAK;QAAW,OAAM;QAAS,CAAA;OAC9B,CAAA,CAAA;;;IAKf,kBAAC,OAAD;KACE,KAAK;KACL,MAAK;KACL,cAAW;KACX,aAAU;KACV,WAAU;eALZ;MAOG,IACC,kBAAC,OAAD;OAAK,WAAU;iBACb,kBAAC,KAAD;QAAG,WAAU;kBAAsB;QAAa,CAAA;OAC5C,CAAA,GACJ;MACH,EAAS,KAAK,MACb,kBAAC,GAAD;OAA0B,QAAQ,EAAI;iBACnC,EAAI;OACO,EAFI,EAAI,GAER,CACd;MACD,KACC,kBAAC,OAAD;OAAK,WAAU;iBACb,kBAAC,GAAD,EAAuB,CAAA;OACnB,CAAA;MAEP,KACC,kBAAC,GAAD;OACE,QAAQ;OACR,QAAQ;OACR,mBAAmB;OACnB,CAAA;MAEH,KAAqB,kBAAC,GAAD;OAAa,QAAO;iBAAQ;OAAgC,CAAA;MACjF,KAAqB,KACpB,kBAAC,GAAD,EAAwB,QAAQ,GAAsB,CAAA;MAEvD,EAAY,KAAK,GAAQ,MACxB,kBAAC,GAAD;OAAmC;OAAQ,YAAY;OAAmB,EAApD,EAAoD,CAAA;;;IAI9E,kBAAC,OAAD;KAAK,WAAU;eACb,kBAAC,GAAD;MACE,OAAO;MACP,aAAa;MACb,eAAe;MACL;MACI;MACd,CAAA;KACE,CAAA;;MAGP,KACC,kBAAC,UAAD;GACE,MAAK;GACL,cAAW;GACX,SAAS;GACT,WAAU;aAEV,kBAAC,GAAD;IAAM,MAAK;IAAe,OAAM;IAAS,CAAA;GAClC,CAAA,CAAA;;EAIf"}
1
+ {"version":3,"file":"ChatWindow.js","names":[],"sources":["../../lib/ui/ChatWindow.tsx"],"sourcesContent":["'use client';\n\nimport { Icon } from '@clubmed/trident-icons';\nimport { forwardRef, type ReactNode } from 'react';\nimport { twMerge } from './helpers/twMerge';\nimport type { ChatMessageSender } from './ChatMessage';\nimport type { ChatWindowCsatPromptLabels } from './ChatWindowCsatPrompt';\nimport type { ChatWindowCsatThankYouLabels } from './ChatWindowCsatThankYou';\nimport type { ChatWindowQuoteItem } from './ChatWindowQuote';\nimport { ChatHeader, type ChatHeaderProps } from './ChatHeader';\nimport { ChatBody, type ChatBodyProps } from './ChatBody';\nimport { ChatInput, type ChatInputProps } from '@/ui/ChatInput';\n\nexport type { ChatWindowCsatPromptLabels, ChatWindowCsatThankYouLabels, ChatWindowQuoteItem };\n\nexport interface ChatWindowMessage {\n id: string;\n sender: ChatMessageSender;\n content: ReactNode;\n}\n\ninterface ChatWindowInputProps {\n inputValue: ChatInputProps['value'];\n inputPlaceholder?: ChatInputProps['placeholder'];\n onInputChange: ChatInputProps['onValueChange'];\n onSubmit: ChatInputProps['onSubmit'];\n onAudioClick?: ChatInputProps['onAudioClick'];\n}\n\ninterface ChatWindowBaseProps extends ChatHeaderProps {\n onClose?: () => void;\n}\n\n// Either compose the panel from `ChatHeader`/`ChatBody`/`ChatInput` children,\n// or fall back to the opaque props-only form — in which case the message-log\n// and input props become required.\nexport type ChatWindowProps = ChatWindowBaseProps &\n (\n | ({ children: ReactNode } & Partial<ChatBodyProps> & Partial<ChatWindowInputProps>)\n | (ChatBodyProps & ChatWindowInputProps & { children?: undefined })\n );\n\nexport interface ChatWindowHandle {\n askForFeedback: () => void;\n showQuotes: (quotes: ChatWindowQuoteItem[]) => void;\n}\n\nexport const ChatWindow = forwardRef<ChatWindowHandle, ChatWindowProps>(function ChatWindow(\n {\n title,\n onClose,\n logo,\n className,\n children,\n inputValue,\n inputPlaceholder,\n onInputChange,\n onSubmit,\n onAudioClick,\n greeting,\n messages,\n isTyping,\n onFeedbackRate,\n csatLabels,\n csatRenderRatingLabel,\n csatThankYouLabels,\n onQuoteCtaClick,\n ...props\n },\n ref,\n) {\n return (\n <div {...props} className={twMerge('flex flex-col gap-20 items-center', className)}>\n <div className=\"chat-border bg-white flex flex-col h-full w-full rounded-32 overflow-hidden\">\n {children ?? (\n <>\n <ChatHeader title={title} logo={logo} />\n <ChatBody\n greeting={greeting}\n messages={messages!}\n isTyping={isTyping}\n onFeedbackRate={onFeedbackRate}\n csatLabels={csatLabels}\n csatRenderRatingLabel={csatRenderRatingLabel}\n csatThankYouLabels={csatThankYouLabels}\n onQuoteCtaClick={onQuoteCtaClick}\n ref={ref}\n />\n <div className=\"shrink-0 px-8 pb-8 pt-12\">\n <ChatInput\n value={inputValue!}\n placeholder={inputPlaceholder}\n onValueChange={onInputChange!}\n onSubmit={onSubmit!}\n onAudioClick={onAudioClick}\n />\n </div>\n </>\n )}\n </div>\n\n {onClose && (\n <button\n type=\"button\"\n aria-label=\"Close chat\"\n onClick={onClose}\n className=\"flex items-center justify-center size-48 rounded-full bg-black border border-black text-white shrink-0 hover:opacity-80 transition-opacity outline-none focus-visible:ring-4 focus-visible:ring-black focus-visible:ring-offset-2\"\n >\n <Icon name=\"CrossDefault\" width=\"24px\" />\n </button>\n )}\n </div>\n );\n});\n"],"mappings":";;;;;;;;;AA+CA,IAAa,IAAa,EAA8C,SACtE,EACE,UACA,YACA,SACA,cACA,aACA,eACA,qBACA,kBACA,aACA,iBACA,aACA,aACA,aACA,mBACA,eACA,0BACA,uBACA,oBACA,GAAG,KAEL,GACA;AACA,QACE,kBAAC,OAAD;EAAK,GAAI;EAAO,WAAW,EAAQ,qCAAqC,EAAU;YAAlF,CACE,kBAAC,OAAD;GAAK,WAAU;aACZ,KACC,kBAAA,GAAA,EAAA,UAAA;IACE,kBAAC,GAAD;KAAmB;KAAa;KAAQ,CAAA;IACxC,kBAAC,GAAD;KACY;KACA;KACA;KACM;KACJ;KACW;KACH;KACH;KACZ;KACL,CAAA;IACF,kBAAC,OAAD;KAAK,WAAU;eACb,kBAAC,GAAD;MACE,OAAO;MACP,aAAa;MACb,eAAe;MACL;MACI;MACd,CAAA;KACE,CAAA;IACL,EAAA,CAAA;GAED,CAAA,EAEL,KACC,kBAAC,UAAD;GACE,MAAK;GACL,cAAW;GACX,SAAS;GACT,WAAU;aAEV,kBAAC,GAAD;IAAM,MAAK;IAAe,OAAM;IAAS,CAAA;GAClC,CAAA,CAAA;;EAIf"}
@@ -1,4 +1,4 @@
1
- import { o as e, t } from "../../chunks/chunk.js";
1
+ import { i as e, t } from "../../chunks/chunk.js";
2
2
  import { createContext as n, useContext as r } from "react";
3
3
  import { jsx as i } from "react/jsx-runtime";
4
4
  //#region ../../node_modules/.pnpm/lodash@4.17.23/node_modules/lodash/isArray.js