@landtrustinc/design-system 1.2.27-beta.2 → 1.2.27-beta.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.
package/dist/index.d.ts CHANGED
@@ -1341,7 +1341,15 @@ type ChatWidgetProps = {
1341
1341
  */
1342
1342
  closeOnClickOutside?: boolean;
1343
1343
  };
1344
- declare const ChatWidget: ({ title, messages, onSubmit, placeholder, disabled, className, ariaLabel, panelWidth, expanded, defaultExpanded, onExpandedChange, isThinking, thinkingText, emptyState, containerProps, suggestedPrompts, onPromptClick, suggestedPromptsTitle, notificationCount, closeOnClickOutside, }: ChatWidgetProps) => _emotion_react_jsx_runtime.JSX.Element;
1344
+ type ChatWidgetRef = {
1345
+ /**
1346
+ * Scroll to a specific message by index
1347
+ * @param index - The index of the message in the messages array
1348
+ * @param position - Where to position the message in the viewport ('start' | 'center' | 'end')
1349
+ */
1350
+ scrollToMessageIndex: (index: number, position?: ScrollLogicalPosition) => void;
1351
+ };
1352
+ declare const ChatWidget: React__default.ForwardRefExoticComponent<ChatWidgetProps & React__default.RefAttributes<ChatWidgetRef>>;
1345
1353
 
1346
1354
  type DividerProps = React__default.HTMLAttributes<HTMLHRElement> & SpaceProps & {
1347
1355
  /**
@@ -2438,4 +2446,4 @@ declare const Widget: React__default.FC<WidgetProps> & {
2438
2446
  }>;
2439
2447
  };
2440
2448
 
2441
- export { AIResponse, type AIResponseProps, AvailabilityBadge, type AvailabilityBadgeProps, type AvailabilityBadgeVariant, Avatar, type AvatarProps, type AvatarSize, type AvatarType, type BaseInputProps, Box, type BoxProps, Button, type ButtonProps, type ButtonVariants, type CarouselPositions, ChatWidget, type ChatWidgetMessage, type ChatWidgetProps, Column, type ColumnProps, ContactLandownerButton, type ContactLandownerButtonProps, Container, Divider, type DividerProps, type DotsColors, type FeatureItem, FeatureList, FeatureListItem, type FeatureListItemProps, type FeatureListProps, type FeatureListSection, FieldNoteCard, type FieldNoteCardProps, FormField, type FormFieldProps, GlobalStyle, Grid, type GridBreakpoint, GridContainer, type GridContainerProps, type GridProps, Heading, type HeadingProps, HuntCard, type HuntCardProps, Icon, IconLabel, type IconLabelProps, type IconProps, type IconSize, IconSizeMap, type IconVariantTypes$1 as IconVariantTypes, InfoBox, type InfoBoxProps, Input, type InputProps, type InputSize, type InputVariant, LandownerProfile, type LandownerProfileProps, LayoutTokens, ListingChat, type ListingChatProps, Logo, type LogoProps, type LogoTheme, type LogoVariant, MarkdownContent, type MarkdownContentProps, MessageBubble, type MessageBubbleProps, type NavLink, Navigation, type NavigationProps, PackageCard, type PackageCardBadge, type PackageCardProps, PackageHeader, type PackageHeaderProps, type ResponsiveValue, ReviewCard, type ReviewCardProps, Reviews, type ReviewsProps, ReviewsShowcase, ScrollingCarousel, type ScrollingCarouselProps, ScrollingCarouselStep, type ScrollingCarouselStepProps, Select, type SelectOption, type SelectProps, Spinner, type SpinnerProps, StarRating, type StarRatingProps, type SuggestedPrompt, type TFontWeight, type THeadingSize, type TTextAlign, type TTextSize, type TTextWrap, TagChip, type TagChipProps, type TagChipVariant, Text, TextArea, type TextProps, type TextareaProps, ThemeTokens, TopMatchingFieldNote, type TopMatchingFieldNoteProps, TopMatchingReview, type TopMatchingReviewProps, UserCard, type UserCardProps, Widget, WidgetPanel, type WidgetPanelProps, type WidgetProps, WidgetTrigger, type WidgetTriggerProps, globalStyles, styles };
2449
+ export { AIResponse, type AIResponseProps, AvailabilityBadge, type AvailabilityBadgeProps, type AvailabilityBadgeVariant, Avatar, type AvatarProps, type AvatarSize, type AvatarType, type BaseInputProps, Box, type BoxProps, Button, type ButtonProps, type ButtonVariants, type CarouselPositions, ChatWidget, type ChatWidgetMessage, type ChatWidgetProps, type ChatWidgetRef, Column, type ColumnProps, ContactLandownerButton, type ContactLandownerButtonProps, Container, Divider, type DividerProps, type DotsColors, type FeatureItem, FeatureList, FeatureListItem, type FeatureListItemProps, type FeatureListProps, type FeatureListSection, FieldNoteCard, type FieldNoteCardProps, FormField, type FormFieldProps, GlobalStyle, Grid, type GridBreakpoint, GridContainer, type GridContainerProps, type GridProps, Heading, type HeadingProps, HuntCard, type HuntCardProps, Icon, IconLabel, type IconLabelProps, type IconProps, type IconSize, IconSizeMap, type IconVariantTypes$1 as IconVariantTypes, InfoBox, type InfoBoxProps, Input, type InputProps, type InputSize, type InputVariant, LandownerProfile, type LandownerProfileProps, LayoutTokens, ListingChat, type ListingChatProps, Logo, type LogoProps, type LogoTheme, type LogoVariant, MarkdownContent, type MarkdownContentProps, MessageBubble, type MessageBubbleProps, type NavLink, Navigation, type NavigationProps, PackageCard, type PackageCardBadge, type PackageCardProps, PackageHeader, type PackageHeaderProps, type ResponsiveValue, ReviewCard, type ReviewCardProps, Reviews, type ReviewsProps, ReviewsShowcase, ScrollingCarousel, type ScrollingCarouselProps, ScrollingCarouselStep, type ScrollingCarouselStepProps, Select, type SelectOption, type SelectProps, Spinner, type SpinnerProps, StarRating, type StarRatingProps, type SuggestedPrompt, type TFontWeight, type THeadingSize, type TTextAlign, type TTextSize, type TTextWrap, TagChip, type TagChipProps, type TagChipVariant, Text, TextArea, type TextProps, type TextareaProps, ThemeTokens, TopMatchingFieldNote, type TopMatchingFieldNoteProps, TopMatchingReview, type TopMatchingReviewProps, UserCard, type UserCardProps, Widget, WidgetPanel, type WidgetPanelProps, type WidgetProps, WidgetTrigger, type WidgetTriggerProps, globalStyles, styles };
package/dist/index.js CHANGED
@@ -5911,218 +5911,244 @@ var DEFAULT_EMPTY_STATE = [
5911
5911
  "default-empty"
5912
5912
  )
5913
5913
  ];
5914
- var ChatWidget = ({
5915
- title,
5916
- messages,
5917
- onSubmit,
5918
- placeholder = "Type your question",
5919
- disabled = false,
5920
- className,
5921
- ariaLabel = "Open Chat",
5922
- panelWidth = 480,
5923
- expanded,
5924
- defaultExpanded = false,
5925
- onExpandedChange,
5926
- isThinking = false,
5927
- thinkingText = "Thinking...",
5928
- emptyState = DEFAULT_EMPTY_STATE,
5929
- containerProps,
5930
- suggestedPrompts,
5931
- onPromptClick,
5932
- suggestedPromptsTitle = "Other Helpful Topics",
5933
- notificationCount,
5934
- closeOnClickOutside = true
5935
- }) => {
5936
- const [value, setValue] = (0, import_react30.useState)("");
5937
- const scrollRef = (0, import_react30.useRef)(null);
5938
- const savedScrollPosition = (0, import_react30.useRef)(0);
5939
- const previousMessagesLength = (0, import_react30.useRef)(messages.length);
5940
- const isControlled = typeof expanded === "boolean";
5941
- const [internalExpanded, setInternalExpanded] = (0, import_react30.useState)(defaultExpanded);
5942
- const isExpanded = isControlled ? expanded : internalExpanded;
5943
- const setExpanded = (0, import_react30.useCallback)(
5944
- (next) => {
5945
- if (!next && scrollRef.current) {
5946
- savedScrollPosition.current = scrollRef.current.scrollTop;
5947
- }
5948
- if (!isControlled)
5949
- setInternalExpanded(next);
5950
- onExpandedChange == null ? void 0 : onExpandedChange(next);
5951
- },
5952
- [isControlled, onExpandedChange]
5953
- );
5954
- (0, import_react30.useEffect)(() => {
5955
- const el = scrollRef.current;
5956
- if (!el || !isExpanded)
5957
- return;
5958
- requestAnimationFrame(() => {
5959
- if (savedScrollPosition.current > 0) {
5960
- el.scrollTop = savedScrollPosition.current;
5961
- }
5962
- });
5963
- }, [isExpanded]);
5964
- (0, import_react30.useEffect)(() => {
5965
- const el = scrollRef.current;
5966
- if (!el || !isExpanded)
5967
- return;
5968
- const messagesChanged = messages.length !== previousMessagesLength.current;
5969
- previousMessagesLength.current = messages.length;
5970
- if (messagesChanged || isThinking) {
5914
+ var ChatWidget = import_react30.default.forwardRef(
5915
+ ({
5916
+ title,
5917
+ messages,
5918
+ onSubmit,
5919
+ placeholder = "Type your question",
5920
+ disabled = false,
5921
+ className,
5922
+ ariaLabel = "Open Chat",
5923
+ panelWidth = 480,
5924
+ expanded,
5925
+ defaultExpanded = false,
5926
+ onExpandedChange,
5927
+ isThinking = false,
5928
+ thinkingText = "Thinking...",
5929
+ emptyState = DEFAULT_EMPTY_STATE,
5930
+ containerProps,
5931
+ suggestedPrompts,
5932
+ onPromptClick,
5933
+ suggestedPromptsTitle = "Other Helpful Topics",
5934
+ notificationCount,
5935
+ closeOnClickOutside = true
5936
+ }, ref) => {
5937
+ const [value, setValue] = (0, import_react30.useState)("");
5938
+ const scrollRef = (0, import_react30.useRef)(null);
5939
+ const savedScrollPosition = (0, import_react30.useRef)(0);
5940
+ const messageRefs = (0, import_react30.useRef)([]);
5941
+ const isControlled = typeof expanded === "boolean";
5942
+ const [internalExpanded, setInternalExpanded] = (0, import_react30.useState)(defaultExpanded);
5943
+ const isExpanded = isControlled ? expanded : internalExpanded;
5944
+ const setExpanded = (0, import_react30.useCallback)(
5945
+ (next) => {
5946
+ if (!next && scrollRef.current) {
5947
+ savedScrollPosition.current = scrollRef.current.scrollTop;
5948
+ }
5949
+ if (!isControlled)
5950
+ setInternalExpanded(next);
5951
+ onExpandedChange == null ? void 0 : onExpandedChange(next);
5952
+ },
5953
+ [isControlled, onExpandedChange]
5954
+ );
5955
+ (0, import_react30.useImperativeHandle)(
5956
+ ref,
5957
+ () => ({
5958
+ scrollToMessageIndex: (index, position2 = "start") => {
5959
+ const messageEl = messageRefs.current[index];
5960
+ if (messageEl && scrollRef.current && isExpanded) {
5961
+ requestAnimationFrame(() => {
5962
+ messageEl.scrollIntoView({ block: position2, behavior: "smooth" });
5963
+ if (scrollRef.current) {
5964
+ savedScrollPosition.current = scrollRef.current.scrollTop;
5965
+ }
5966
+ });
5967
+ }
5968
+ }
5969
+ }),
5970
+ [isExpanded]
5971
+ );
5972
+ (0, import_react30.useEffect)(() => {
5973
+ const el = scrollRef.current;
5974
+ if (!el || !isExpanded)
5975
+ return;
5971
5976
  requestAnimationFrame(() => {
5972
- el.scrollTo({ top: el.scrollHeight, behavior: "smooth" });
5973
- savedScrollPosition.current = el.scrollHeight;
5977
+ if (savedScrollPosition.current > 0) {
5978
+ el.scrollTop = savedScrollPosition.current;
5979
+ }
5974
5980
  });
5975
- }
5976
- }, [messages, isThinking, isExpanded]);
5977
- const messagesToRender = messages.length === 0 ? emptyState : messages;
5978
- const renderedMessages = (0, import_react30.useMemo)(
5979
- () => messagesToRender.map((element, index) => {
5980
- var _a;
5981
- const key = (_a = element.key) != null ? _a : index;
5982
- if (element.type === AIResponse_default) {
5983
- return /* @__PURE__ */ (0, import_jsx_runtime226.jsx)(Box_default, { css: receivedWrapperStyles, children: element }, key);
5984
- }
5985
- if (element.type === MessageBubble_default) {
5986
- return /* @__PURE__ */ (0, import_jsx_runtime226.jsx)(Box_default, { css: sentWrapperStyles, children: element }, key);
5987
- }
5988
- return /* @__PURE__ */ (0, import_jsx_runtime226.jsx)(import_react30.default.Fragment, { children: element }, key);
5989
- }),
5990
- [messagesToRender]
5991
- );
5992
- const handleSubmit = () => {
5993
- const trimmed = value.trim();
5994
- if (!trimmed)
5995
- return;
5996
- onSubmit(trimmed);
5997
- setValue("");
5998
- };
5999
- return /* @__PURE__ */ (0, import_jsx_runtime226.jsxs)(
6000
- Widget_default,
6001
- {
6002
- ariaLabel,
6003
- icon: "ConversationalSearchAi",
6004
- expanded: isExpanded,
6005
- onExpandedChange: setExpanded,
6006
- panelWidth,
6007
- className,
6008
- containerProps,
6009
- closeOnClickOutside,
6010
- children: [
6011
- /* @__PURE__ */ (0, import_jsx_runtime226.jsx)(Box_default, { mt: 2, children: /* @__PURE__ */ (0, import_jsx_runtime226.jsx)(AskBuckButton_default, { badgeCount: notificationCount }) }),
6012
- /* @__PURE__ */ (0, import_jsx_runtime226.jsx)(Widget_default.Panel, { children: /* @__PURE__ */ (0, import_jsx_runtime226.jsxs)(Box_default, { css: containerStyles, children: [
6013
- /* @__PURE__ */ (0, import_jsx_runtime226.jsxs)(Box_default, { position: "sticky", top: 0, zIndex: 1, children: [
5981
+ }, [isExpanded]);
5982
+ const messagesToRender = messages.length === 0 ? emptyState : messages;
5983
+ (0, import_react30.useEffect)(() => {
5984
+ messageRefs.current = messageRefs.current.slice(0, messagesToRender.length);
5985
+ }, [messagesToRender.length]);
5986
+ const renderedMessages = (0, import_react30.useMemo)(
5987
+ () => messagesToRender.map((element, index) => {
5988
+ var _a;
5989
+ const key = (_a = element.key) != null ? _a : index;
5990
+ if (element.type === AIResponse_default) {
5991
+ return /* @__PURE__ */ (0, import_jsx_runtime226.jsx)(
5992
+ Box_default,
5993
+ {
5994
+ css: receivedWrapperStyles,
5995
+ ref: (el) => messageRefs.current[index] = el,
5996
+ children: element
5997
+ },
5998
+ key
5999
+ );
6000
+ }
6001
+ if (element.type === MessageBubble_default) {
6002
+ return /* @__PURE__ */ (0, import_jsx_runtime226.jsx)(
6003
+ Box_default,
6004
+ {
6005
+ css: sentWrapperStyles,
6006
+ ref: (el) => messageRefs.current[index] = el,
6007
+ children: element
6008
+ },
6009
+ key
6010
+ );
6011
+ }
6012
+ return /* @__PURE__ */ (0, import_jsx_runtime226.jsx)(Box_default, { ref: (el) => messageRefs.current[index] = el, children: element }, key);
6013
+ }),
6014
+ [messagesToRender]
6015
+ );
6016
+ const handleSubmit = () => {
6017
+ const trimmed = value.trim();
6018
+ if (!trimmed)
6019
+ return;
6020
+ onSubmit(trimmed);
6021
+ setValue("");
6022
+ };
6023
+ return /* @__PURE__ */ (0, import_jsx_runtime226.jsxs)(
6024
+ Widget_default,
6025
+ {
6026
+ ariaLabel,
6027
+ icon: "ConversationalSearchAi",
6028
+ expanded: isExpanded,
6029
+ onExpandedChange: setExpanded,
6030
+ panelWidth,
6031
+ className,
6032
+ containerProps,
6033
+ closeOnClickOutside,
6034
+ children: [
6035
+ /* @__PURE__ */ (0, import_jsx_runtime226.jsx)(Box_default, { mt: 2, children: /* @__PURE__ */ (0, import_jsx_runtime226.jsx)(AskBuckButton_default, { badgeCount: notificationCount }) }),
6036
+ /* @__PURE__ */ (0, import_jsx_runtime226.jsx)(Widget_default.Panel, { children: /* @__PURE__ */ (0, import_jsx_runtime226.jsxs)(Box_default, { css: containerStyles, children: [
6037
+ /* @__PURE__ */ (0, import_jsx_runtime226.jsxs)(Box_default, { position: "sticky", top: 0, zIndex: 1, children: [
6038
+ /* @__PURE__ */ (0, import_jsx_runtime226.jsxs)(
6039
+ Box_default,
6040
+ {
6041
+ display: "flex",
6042
+ alignItems: "center",
6043
+ justifyContent: "space-between",
6044
+ gap: "var(--spacing-4)",
6045
+ children: [
6046
+ /* @__PURE__ */ (0, import_jsx_runtime226.jsxs)(Box_default, { display: "flex", alignItems: "center", gap: "var(--spacing-4)", children: [
6047
+ /* @__PURE__ */ (0, import_jsx_runtime226.jsx)("span", { css: badge, children: /* @__PURE__ */ (0, import_jsx_runtime226.jsx)(Icon_default, { variant: "ConversationalSearchAi", size: "large" }) }),
6048
+ /* @__PURE__ */ (0, import_jsx_runtime226.jsx)(
6049
+ Heading_default,
6050
+ {
6051
+ size: "2xs",
6052
+ fontWeight: "bold",
6053
+ color: "var(--text-primary)",
6054
+ children: title
6055
+ }
6056
+ )
6057
+ ] }),
6058
+ /* @__PURE__ */ (0, import_jsx_runtime226.jsx)(
6059
+ Button_default,
6060
+ {
6061
+ variant: "text",
6062
+ size: "xs",
6063
+ "aria-label": "Close widget",
6064
+ onClick: () => setExpanded(false),
6065
+ children: /* @__PURE__ */ (0, import_jsx_runtime226.jsxs)("span", { css: closeButtonContent, children: [
6066
+ /* @__PURE__ */ (0, import_jsx_runtime226.jsx)(Icon_default, { variant: "Xmark", size: "medium" }),
6067
+ /* @__PURE__ */ (0, import_jsx_runtime226.jsx)("span", { children: "Close" })
6068
+ ] })
6069
+ }
6070
+ )
6071
+ ]
6072
+ }
6073
+ ),
6074
+ /* @__PURE__ */ (0, import_jsx_runtime226.jsx)(Divider_default, { mt: 4, mb: 0 })
6075
+ ] }),
6014
6076
  /* @__PURE__ */ (0, import_jsx_runtime226.jsxs)(
6015
6077
  Box_default,
6016
6078
  {
6079
+ ref: scrollRef,
6080
+ flex: "1 1 auto",
6081
+ minHeight: 0,
6082
+ overflowY: "auto",
6083
+ p: 0,
6084
+ pb: 4,
6017
6085
  display: "flex",
6018
- alignItems: "center",
6019
- justifyContent: "space-between",
6020
- gap: "var(--spacing-4)",
6086
+ flexDirection: "column",
6087
+ gap: "var(--spacing-2)",
6021
6088
  children: [
6022
- /* @__PURE__ */ (0, import_jsx_runtime226.jsxs)(Box_default, { display: "flex", alignItems: "center", gap: "var(--spacing-4)", children: [
6023
- /* @__PURE__ */ (0, import_jsx_runtime226.jsx)("span", { css: badge, children: /* @__PURE__ */ (0, import_jsx_runtime226.jsx)(Icon_default, { variant: "ConversationalSearchAi", size: "large" }) }),
6024
- /* @__PURE__ */ (0, import_jsx_runtime226.jsx)(
6025
- Heading_default,
6026
- {
6027
- size: "2xs",
6028
- fontWeight: "bold",
6029
- color: "var(--text-primary)",
6030
- children: title
6031
- }
6032
- )
6033
- ] }),
6034
- /* @__PURE__ */ (0, import_jsx_runtime226.jsx)(
6035
- Button_default,
6089
+ /* @__PURE__ */ (0, import_jsx_runtime226.jsx)(Box_default, { display: "flex", flexDirection: "column", gap: "var(--spacing-2)", children: renderedMessages }),
6090
+ isThinking && /* @__PURE__ */ (0, import_jsx_runtime226.jsx)(Box_default, { css: receivedWrapperStyles, children: /* @__PURE__ */ (0, import_jsx_runtime226.jsxs)("div", { css: thinkingRowStyles, children: [
6091
+ /* @__PURE__ */ (0, import_jsx_runtime226.jsx)(Spinner_default2, { size: "medium" }),
6092
+ /* @__PURE__ */ (0, import_jsx_runtime226.jsx)("span", { css: thinkingTextStyles, children: thinkingText })
6093
+ ] }) }),
6094
+ suggestedPrompts && suggestedPrompts.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime226.jsx)(Box_default, { css: receivedWrapperStyles, children: /* @__PURE__ */ (0, import_jsx_runtime226.jsxs)(
6095
+ Box_default,
6036
6096
  {
6037
- variant: "text",
6038
- size: "xs",
6039
- "aria-label": "Close widget",
6040
- onClick: () => setExpanded(false),
6041
- children: /* @__PURE__ */ (0, import_jsx_runtime226.jsxs)("span", { css: closeButtonContent, children: [
6042
- /* @__PURE__ */ (0, import_jsx_runtime226.jsx)(Icon_default, { variant: "Xmark", size: "medium" }),
6043
- /* @__PURE__ */ (0, import_jsx_runtime226.jsx)("span", { children: "Close" })
6044
- ] })
6097
+ display: "flex",
6098
+ flexDirection: "column",
6099
+ gap: "var(--spacing-4)",
6100
+ children: [
6101
+ /* @__PURE__ */ (0, import_jsx_runtime226.jsx)(Text_default, { size: "md", fontWeight: "bold", color: "var(--text-primary)", children: suggestedPromptsTitle }),
6102
+ /* @__PURE__ */ (0, import_jsx_runtime226.jsx)(
6103
+ Box_default,
6104
+ {
6105
+ display: "flex",
6106
+ flexWrap: "wrap",
6107
+ gap: "var(--spacing-4)",
6108
+ alignItems: "flex-start",
6109
+ children: suggestedPrompts.map((prompt, index) => /* @__PURE__ */ (0, import_jsx_runtime226.jsx)(
6110
+ TagChip_default,
6111
+ {
6112
+ variant: "success",
6113
+ onClick: () => {
6114
+ var _a;
6115
+ return onPromptClick == null ? void 0 : onPromptClick((_a = prompt.value) != null ? _a : prompt.label);
6116
+ },
6117
+ style: { cursor: "pointer" },
6118
+ children: prompt.label
6119
+ },
6120
+ index
6121
+ ))
6122
+ }
6123
+ )
6124
+ ]
6045
6125
  }
6046
- )
6126
+ ) })
6047
6127
  ]
6048
6128
  }
6049
6129
  ),
6050
- /* @__PURE__ */ (0, import_jsx_runtime226.jsx)(Divider_default, { mt: 4, mb: 0 })
6051
- ] }),
6052
- /* @__PURE__ */ (0, import_jsx_runtime226.jsxs)(
6053
- Box_default,
6054
- {
6055
- ref: scrollRef,
6056
- flex: "1 1 auto",
6057
- minHeight: 0,
6058
- overflowY: "auto",
6059
- p: 0,
6060
- pb: 4,
6061
- display: "flex",
6062
- flexDirection: "column",
6063
- gap: "var(--spacing-2)",
6064
- children: [
6065
- /* @__PURE__ */ (0, import_jsx_runtime226.jsx)(Box_default, { display: "flex", flexDirection: "column", gap: "var(--spacing-2)", children: renderedMessages }),
6066
- isThinking && /* @__PURE__ */ (0, import_jsx_runtime226.jsx)(Box_default, { css: receivedWrapperStyles, children: /* @__PURE__ */ (0, import_jsx_runtime226.jsxs)("div", { css: thinkingRowStyles, children: [
6067
- /* @__PURE__ */ (0, import_jsx_runtime226.jsx)(Spinner_default2, { size: "medium" }),
6068
- /* @__PURE__ */ (0, import_jsx_runtime226.jsx)("span", { css: thinkingTextStyles, children: thinkingText })
6069
- ] }) }),
6070
- suggestedPrompts && suggestedPrompts.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime226.jsx)(Box_default, { css: receivedWrapperStyles, children: /* @__PURE__ */ (0, import_jsx_runtime226.jsxs)(
6071
- Box_default,
6072
- {
6073
- display: "flex",
6074
- flexDirection: "column",
6075
- gap: "var(--spacing-4)",
6076
- children: [
6077
- /* @__PURE__ */ (0, import_jsx_runtime226.jsx)(Text_default, { size: "md", fontWeight: "bold", color: "var(--text-primary)", children: suggestedPromptsTitle }),
6078
- /* @__PURE__ */ (0, import_jsx_runtime226.jsx)(
6079
- Box_default,
6080
- {
6081
- display: "flex",
6082
- flexWrap: "wrap",
6083
- gap: "var(--spacing-4)",
6084
- alignItems: "flex-start",
6085
- children: suggestedPrompts.map((prompt, index) => /* @__PURE__ */ (0, import_jsx_runtime226.jsx)(
6086
- TagChip_default,
6087
- {
6088
- variant: "success",
6089
- onClick: () => {
6090
- var _a;
6091
- return onPromptClick == null ? void 0 : onPromptClick((_a = prompt.value) != null ? _a : prompt.label);
6092
- },
6093
- style: { cursor: "pointer" },
6094
- children: prompt.label
6095
- },
6096
- index
6097
- ))
6098
- }
6099
- )
6100
- ]
6101
- }
6102
- ) })
6103
- ]
6104
- }
6105
- ),
6106
- /* @__PURE__ */ (0, import_jsx_runtime226.jsx)(Box_default, { position: "sticky", bottom: 0, zIndex: 1, p: 0, children: /* @__PURE__ */ (0, import_jsx_runtime226.jsx)(
6107
- TextArea_default,
6108
- {
6109
- rows: 3,
6110
- value,
6111
- maxHeight: 250,
6112
- autoExpand: true,
6113
- onChange: (e) => setValue(e.target.value),
6114
- showSubmit: true,
6115
- onSubmit: handleSubmit,
6116
- disabled,
6117
- submitDisabled: !value.trim() || isThinking,
6118
- placeholder
6119
- }
6120
- ) })
6121
- ] }) })
6122
- ]
6123
- }
6124
- );
6125
- };
6130
+ /* @__PURE__ */ (0, import_jsx_runtime226.jsx)(Box_default, { position: "sticky", bottom: 0, zIndex: 1, p: 0, children: /* @__PURE__ */ (0, import_jsx_runtime226.jsx)(
6131
+ TextArea_default,
6132
+ {
6133
+ rows: 3,
6134
+ value,
6135
+ maxHeight: 250,
6136
+ autoExpand: true,
6137
+ onChange: (e) => setValue(e.target.value),
6138
+ showSubmit: true,
6139
+ onSubmit: handleSubmit,
6140
+ disabled,
6141
+ submitDisabled: !value.trim() || isThinking,
6142
+ placeholder
6143
+ }
6144
+ ) })
6145
+ ] }) })
6146
+ ]
6147
+ }
6148
+ );
6149
+ }
6150
+ );
6151
+ ChatWidget.displayName = "ChatWidget";
6126
6152
  var ChatWidget_default = ChatWidget;
6127
6153
 
6128
6154
  // src/FeatureList/components/FeatureListItem.tsx