@landtrustinc/design-system 1.2.65 → 1.2.66
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.js +7 -1
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -6034,6 +6034,7 @@ var BottomDrawer = ({
|
|
|
6034
6034
|
const containerRef = (0, import_react26.useRef)(null);
|
|
6035
6035
|
const previousScrollY = (0, import_react26.useRef)(0);
|
|
6036
6036
|
const previousActiveElement = (0, import_react26.useRef)(null);
|
|
6037
|
+
const wasOpenRef = (0, import_react26.useRef)(false);
|
|
6037
6038
|
const handleKeyDown = (0, import_react26.useCallback)(
|
|
6038
6039
|
(event) => {
|
|
6039
6040
|
if (closeOnEscape && event.key === "Escape" && onClose) {
|
|
@@ -6044,6 +6045,7 @@ var BottomDrawer = ({
|
|
|
6044
6045
|
);
|
|
6045
6046
|
(0, import_react26.useEffect)(() => {
|
|
6046
6047
|
if (isOpen) {
|
|
6048
|
+
wasOpenRef.current = true;
|
|
6047
6049
|
previousScrollY.current = window.scrollY;
|
|
6048
6050
|
previousActiveElement.current = document.activeElement;
|
|
6049
6051
|
document.body.style.position = "fixed";
|
|
@@ -6054,7 +6056,8 @@ var BottomDrawer = ({
|
|
|
6054
6056
|
if (containerRef.current) {
|
|
6055
6057
|
containerRef.current.focus();
|
|
6056
6058
|
}
|
|
6057
|
-
} else {
|
|
6059
|
+
} else if (wasOpenRef.current) {
|
|
6060
|
+
wasOpenRef.current = false;
|
|
6058
6061
|
document.body.style.position = "";
|
|
6059
6062
|
document.body.style.overflow = "";
|
|
6060
6063
|
document.body.style.width = "";
|
|
@@ -7235,6 +7238,9 @@ var ChatWidget = ({
|
|
|
7235
7238
|
display: "flex",
|
|
7236
7239
|
flexDirection: "column",
|
|
7237
7240
|
gap: "var(--spacing-2)",
|
|
7241
|
+
css: import_react40.css`
|
|
7242
|
+
overscroll-behavior: contain;
|
|
7243
|
+
`,
|
|
7238
7244
|
children: [
|
|
7239
7245
|
/* @__PURE__ */ (0, import_jsx_runtime233.jsx)(Box_default, { display: "flex", flexDirection: "column", gap: "var(--spacing-2)", children: renderedMessages }),
|
|
7240
7246
|
isThinking && /* @__PURE__ */ (0, import_jsx_runtime233.jsx)(Box_default, { css: receivedWrapperStyles, children: /* @__PURE__ */ (0, import_jsx_runtime233.jsxs)("div", { css: thinkingRowStyles, children: [
|