@landtrustinc/design-system 1.2.74 → 1.2.76

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
@@ -1511,6 +1511,10 @@ type ChatWidgetProps = {
1511
1511
  * Title displayed in the chat widget header
1512
1512
  */
1513
1513
  title: string;
1514
+ /**
1515
+ * Optional tooltip copy rendered behind an info icon next to the title
1516
+ */
1517
+ titleTooltipContent?: ReactNode;
1514
1518
  /**
1515
1519
  * Array of messages to display
1516
1520
  */
@@ -1601,7 +1605,7 @@ type ChatWidgetProps = {
1601
1605
  */
1602
1606
  enableScrollToBottomControl?: boolean;
1603
1607
  };
1604
- declare const ChatWidget: ({ title, messages, onSubmit, placeholder, disabled, className, ariaLabel, panelWidth, expanded, defaultExpanded, onExpandedChange, isThinking, thinkingText, thinkingContent, emptyState, containerProps, suggestedPrompts, onPromptClick, suggestedPromptsTitle, notificationCount, closeOnClickOutside, enableScrollToBottomControl, }: ChatWidgetProps) => _emotion_react_jsx_runtime.JSX.Element;
1608
+ declare const ChatWidget: ({ title, titleTooltipContent, messages, onSubmit, placeholder, disabled, className, ariaLabel, panelWidth, expanded, defaultExpanded, onExpandedChange, isThinking, thinkingText, thinkingContent, emptyState, containerProps, suggestedPrompts, onPromptClick, suggestedPromptsTitle, notificationCount, closeOnClickOutside, enableScrollToBottomControl, }: ChatWidgetProps) => _emotion_react_jsx_runtime.JSX.Element;
1605
1609
 
1606
1610
  type CtaCardBase = {
1607
1611
  /**
package/dist/index.js CHANGED
@@ -3452,11 +3452,12 @@ var tooltipContentStyles = import_react3.css`
3452
3452
  padding: var(--spacing-2) var(--spacing-3);
3453
3453
  border-radius: var(--spacing-1);
3454
3454
  font-size: var(--font-size-sm);
3455
- white-space: nowrap;
3456
3455
  z-index: 1000;
3457
3456
  pointer-events: none;
3458
3457
  opacity: 0;
3459
3458
  transition: opacity 0.2s ease-in-out;
3459
+ max-width: 320px;
3460
+ text-wrap: pretty;
3460
3461
 
3461
3462
  &[data-visible='true'] {
3462
3463
  opacity: 1;
@@ -6582,6 +6583,11 @@ var useWidgetScrollLock = (isExpanded, containerRef) => {
6582
6583
  (0, import_react34.useEffect)(() => {
6583
6584
  if (!isExpanded)
6584
6585
  return;
6586
+ const isMobile = window.matchMedia(
6587
+ `(max-width: calc(${screens.lg} - 1px))`
6588
+ ).matches;
6589
+ if (!isMobile)
6590
+ return;
6585
6591
  const scrollY = window.scrollY;
6586
6592
  const html = document.documentElement;
6587
6593
  const originalOverflow = html.style.overflow;
@@ -7276,6 +7282,7 @@ var DEFAULT_EMPTY_STATE = [
7276
7282
  ];
7277
7283
  var ChatWidget = ({
7278
7284
  title,
7285
+ titleTooltipContent,
7279
7286
  messages,
7280
7287
  onSubmit,
7281
7288
  placeholder = "Type your question",
@@ -7387,15 +7394,26 @@ var ChatWidget = ({
7387
7394
  justifyContent: "space-between",
7388
7395
  gap: "var(--spacing-4)",
7389
7396
  children: [
7390
- /* @__PURE__ */ (0, import_jsx_runtime236.jsx)(Box_default, { display: "flex", alignItems: "center", gap: "var(--spacing-4)", children: /* @__PURE__ */ (0, import_jsx_runtime236.jsx)(
7391
- Heading_default,
7392
- {
7393
- size: "2xs",
7394
- fontWeight: "bold",
7395
- color: "var(--text-primary)",
7396
- children: title
7397
- }
7398
- ) }),
7397
+ /* @__PURE__ */ (0, import_jsx_runtime236.jsx)(Box_default, { display: "flex", alignItems: "center", gap: "var(--spacing-4)", children: /* @__PURE__ */ (0, import_jsx_runtime236.jsxs)(Box_default, { display: "flex", alignItems: "center", gap: "var(--spacing-4)", children: [
7398
+ /* @__PURE__ */ (0, import_jsx_runtime236.jsx)(
7399
+ Heading_default,
7400
+ {
7401
+ size: "2xs",
7402
+ fontWeight: "bold",
7403
+ color: "var(--text-primary)",
7404
+ children: title
7405
+ }
7406
+ ),
7407
+ titleTooltipContent && /* @__PURE__ */ (0, import_jsx_runtime236.jsx)(Tooltip_default, { content: titleTooltipContent, position: "bottom", children: /* @__PURE__ */ (0, import_jsx_runtime236.jsx)(
7408
+ Box_default,
7409
+ {
7410
+ display: "flex",
7411
+ alignItems: "center",
7412
+ "aria-label": "Show title information",
7413
+ children: /* @__PURE__ */ (0, import_jsx_runtime236.jsx)(Icon_default, { variant: "CircleInfo", size: "medium" })
7414
+ }
7415
+ ) })
7416
+ ] }) }),
7399
7417
  /* @__PURE__ */ (0, import_jsx_runtime236.jsx)(
7400
7418
  Button_default,
7401
7419
  {