@landtrustinc/design-system 1.2.27-beta.2 → 1.2.27-beta.4

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,14 @@ 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, positioning it at the top of the scroll container
1347
+ * @param index - The index of the message in the messages array
1348
+ */
1349
+ scrollToMessageIndex: (index: number) => void;
1350
+ };
1351
+ declare const ChatWidget: React__default.ForwardRefExoticComponent<ChatWidgetProps & React__default.RefAttributes<ChatWidgetRef>>;
1345
1352
 
1346
1353
  type DividerProps = React__default.HTMLAttributes<HTMLHRElement> & SpaceProps & {
1347
1354
  /**
@@ -2438,4 +2445,4 @@ declare const Widget: React__default.FC<WidgetProps> & {
2438
2445
  }>;
2439
2446
  };
2440
2447
 
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 };
2448
+ 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,242 @@ 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) => {
5959
+ const messageEl = messageRefs.current[index];
5960
+ if (messageEl && scrollRef.current && isExpanded) {
5961
+ requestAnimationFrame(() => {
5962
+ scrollRef.current.scrollTop = messageEl.offsetTop;
5963
+ savedScrollPosition.current = messageEl.offsetTop;
5964
+ });
5965
+ }
5966
+ }
5967
+ }),
5968
+ [isExpanded]
5969
+ );
5970
+ (0, import_react30.useEffect)(() => {
5971
+ const el = scrollRef.current;
5972
+ if (!el || !isExpanded)
5973
+ return;
5971
5974
  requestAnimationFrame(() => {
5972
- el.scrollTo({ top: el.scrollHeight, behavior: "smooth" });
5973
- savedScrollPosition.current = el.scrollHeight;
5975
+ if (savedScrollPosition.current > 0) {
5976
+ el.scrollTop = savedScrollPosition.current;
5977
+ }
5974
5978
  });
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: [
5979
+ }, [isExpanded]);
5980
+ const messagesToRender = messages.length === 0 ? emptyState : messages;
5981
+ (0, import_react30.useEffect)(() => {
5982
+ messageRefs.current = messageRefs.current.slice(0, messagesToRender.length);
5983
+ }, [messagesToRender.length]);
5984
+ const renderedMessages = (0, import_react30.useMemo)(
5985
+ () => messagesToRender.map((element, index) => {
5986
+ var _a;
5987
+ const key = (_a = element.key) != null ? _a : index;
5988
+ if (element.type === AIResponse_default) {
5989
+ return /* @__PURE__ */ (0, import_jsx_runtime226.jsx)(
5990
+ Box_default,
5991
+ {
5992
+ css: receivedWrapperStyles,
5993
+ ref: (el) => messageRefs.current[index] = el,
5994
+ children: element
5995
+ },
5996
+ key
5997
+ );
5998
+ }
5999
+ if (element.type === MessageBubble_default) {
6000
+ return /* @__PURE__ */ (0, import_jsx_runtime226.jsx)(
6001
+ Box_default,
6002
+ {
6003
+ css: sentWrapperStyles,
6004
+ ref: (el) => messageRefs.current[index] = el,
6005
+ children: element
6006
+ },
6007
+ key
6008
+ );
6009
+ }
6010
+ return /* @__PURE__ */ (0, import_jsx_runtime226.jsx)(Box_default, { ref: (el) => messageRefs.current[index] = el, children: element }, key);
6011
+ }),
6012
+ [messagesToRender]
6013
+ );
6014
+ const handleSubmit = () => {
6015
+ const trimmed = value.trim();
6016
+ if (!trimmed)
6017
+ return;
6018
+ onSubmit(trimmed);
6019
+ setValue("");
6020
+ };
6021
+ return /* @__PURE__ */ (0, import_jsx_runtime226.jsxs)(
6022
+ Widget_default,
6023
+ {
6024
+ ariaLabel,
6025
+ icon: "ConversationalSearchAi",
6026
+ expanded: isExpanded,
6027
+ onExpandedChange: setExpanded,
6028
+ panelWidth,
6029
+ className,
6030
+ containerProps,
6031
+ closeOnClickOutside,
6032
+ children: [
6033
+ /* @__PURE__ */ (0, import_jsx_runtime226.jsx)(Box_default, { mt: 2, children: /* @__PURE__ */ (0, import_jsx_runtime226.jsx)(AskBuckButton_default, { badgeCount: notificationCount }) }),
6034
+ /* @__PURE__ */ (0, import_jsx_runtime226.jsx)(Widget_default.Panel, { children: /* @__PURE__ */ (0, import_jsx_runtime226.jsxs)(Box_default, { css: containerStyles, children: [
6035
+ /* @__PURE__ */ (0, import_jsx_runtime226.jsxs)(Box_default, { position: "sticky", top: 0, zIndex: 1, children: [
6036
+ /* @__PURE__ */ (0, import_jsx_runtime226.jsxs)(
6037
+ Box_default,
6038
+ {
6039
+ display: "flex",
6040
+ alignItems: "center",
6041
+ justifyContent: "space-between",
6042
+ gap: "var(--spacing-4)",
6043
+ children: [
6044
+ /* @__PURE__ */ (0, import_jsx_runtime226.jsxs)(Box_default, { display: "flex", alignItems: "center", gap: "var(--spacing-4)", children: [
6045
+ /* @__PURE__ */ (0, import_jsx_runtime226.jsx)("span", { css: badge, children: /* @__PURE__ */ (0, import_jsx_runtime226.jsx)(Icon_default, { variant: "ConversationalSearchAi", size: "large" }) }),
6046
+ /* @__PURE__ */ (0, import_jsx_runtime226.jsx)(
6047
+ Heading_default,
6048
+ {
6049
+ size: "2xs",
6050
+ fontWeight: "bold",
6051
+ color: "var(--text-primary)",
6052
+ children: title
6053
+ }
6054
+ )
6055
+ ] }),
6056
+ /* @__PURE__ */ (0, import_jsx_runtime226.jsx)(
6057
+ Button_default,
6058
+ {
6059
+ variant: "text",
6060
+ size: "xs",
6061
+ "aria-label": "Close widget",
6062
+ onClick: () => setExpanded(false),
6063
+ children: /* @__PURE__ */ (0, import_jsx_runtime226.jsxs)("span", { css: closeButtonContent, children: [
6064
+ /* @__PURE__ */ (0, import_jsx_runtime226.jsx)(Icon_default, { variant: "Xmark", size: "medium" }),
6065
+ /* @__PURE__ */ (0, import_jsx_runtime226.jsx)("span", { children: "Close" })
6066
+ ] })
6067
+ }
6068
+ )
6069
+ ]
6070
+ }
6071
+ ),
6072
+ /* @__PURE__ */ (0, import_jsx_runtime226.jsx)(Divider_default, { mt: 4, mb: 0 })
6073
+ ] }),
6014
6074
  /* @__PURE__ */ (0, import_jsx_runtime226.jsxs)(
6015
6075
  Box_default,
6016
6076
  {
6077
+ ref: scrollRef,
6078
+ flex: "1 1 auto",
6079
+ minHeight: 0,
6080
+ overflowY: "auto",
6081
+ p: 0,
6082
+ pb: 4,
6017
6083
  display: "flex",
6018
- alignItems: "center",
6019
- justifyContent: "space-between",
6020
- gap: "var(--spacing-4)",
6084
+ flexDirection: "column",
6085
+ gap: "var(--spacing-2)",
6021
6086
  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,
6087
+ /* @__PURE__ */ (0, import_jsx_runtime226.jsx)(Box_default, { display: "flex", flexDirection: "column", gap: "var(--spacing-2)", children: renderedMessages }),
6088
+ isThinking && /* @__PURE__ */ (0, import_jsx_runtime226.jsx)(Box_default, { css: receivedWrapperStyles, children: /* @__PURE__ */ (0, import_jsx_runtime226.jsxs)("div", { css: thinkingRowStyles, children: [
6089
+ /* @__PURE__ */ (0, import_jsx_runtime226.jsx)(Spinner_default2, { size: "medium" }),
6090
+ /* @__PURE__ */ (0, import_jsx_runtime226.jsx)("span", { css: thinkingTextStyles, children: thinkingText })
6091
+ ] }) }),
6092
+ suggestedPrompts && suggestedPrompts.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime226.jsx)(Box_default, { css: receivedWrapperStyles, children: /* @__PURE__ */ (0, import_jsx_runtime226.jsxs)(
6093
+ Box_default,
6036
6094
  {
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
- ] })
6095
+ display: "flex",
6096
+ flexDirection: "column",
6097
+ gap: "var(--spacing-4)",
6098
+ children: [
6099
+ /* @__PURE__ */ (0, import_jsx_runtime226.jsx)(Text_default, { size: "md", fontWeight: "bold", color: "var(--text-primary)", children: suggestedPromptsTitle }),
6100
+ /* @__PURE__ */ (0, import_jsx_runtime226.jsx)(
6101
+ Box_default,
6102
+ {
6103
+ display: "flex",
6104
+ flexWrap: "wrap",
6105
+ gap: "var(--spacing-4)",
6106
+ alignItems: "flex-start",
6107
+ children: suggestedPrompts.map((prompt, index) => /* @__PURE__ */ (0, import_jsx_runtime226.jsx)(
6108
+ TagChip_default,
6109
+ {
6110
+ variant: "success",
6111
+ onClick: () => {
6112
+ var _a;
6113
+ return onPromptClick == null ? void 0 : onPromptClick((_a = prompt.value) != null ? _a : prompt.label);
6114
+ },
6115
+ style: { cursor: "pointer" },
6116
+ children: prompt.label
6117
+ },
6118
+ index
6119
+ ))
6120
+ }
6121
+ )
6122
+ ]
6045
6123
  }
6046
- )
6124
+ ) })
6047
6125
  ]
6048
6126
  }
6049
6127
  ),
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
- };
6128
+ /* @__PURE__ */ (0, import_jsx_runtime226.jsx)(Box_default, { position: "sticky", bottom: 0, zIndex: 1, p: 0, children: /* @__PURE__ */ (0, import_jsx_runtime226.jsx)(
6129
+ TextArea_default,
6130
+ {
6131
+ rows: 3,
6132
+ value,
6133
+ maxHeight: 250,
6134
+ autoExpand: true,
6135
+ onChange: (e) => setValue(e.target.value),
6136
+ showSubmit: true,
6137
+ onSubmit: handleSubmit,
6138
+ disabled,
6139
+ submitDisabled: !value.trim() || isThinking,
6140
+ placeholder
6141
+ }
6142
+ ) })
6143
+ ] }) })
6144
+ ]
6145
+ }
6146
+ );
6147
+ }
6148
+ );
6149
+ ChatWidget.displayName = "ChatWidget";
6126
6150
  var ChatWidget_default = ChatWidget;
6127
6151
 
6128
6152
  // src/FeatureList/components/FeatureListItem.tsx