@seamly/web-ui 25.2.0-beta.1 → 25.2.0
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/build/dist/lib/index.debug.js +41 -22
- package/build/dist/lib/index.debug.js.map +1 -1
- package/build/dist/lib/index.debug.min.js +1 -1
- package/build/dist/lib/index.debug.min.js.map +1 -1
- package/build/dist/lib/index.js +19 -1
- package/build/dist/lib/index.js.map +1 -1
- package/build/dist/lib/index.min.js +1 -1
- package/build/dist/lib/index.min.js.map +1 -1
- package/package.json +1 -1
- package/src/javascripts/core/ui/components/layout/chat.tsx +21 -1
package/build/dist/lib/index.js
CHANGED
|
@@ -5837,7 +5837,7 @@ class API {
|
|
|
5837
5837
|
return {
|
|
5838
5838
|
clientName: "@seamly/web-ui",
|
|
5839
5839
|
clientVariant: this.#layoutMode,
|
|
5840
|
-
clientVersion: "25.2.0
|
|
5840
|
+
clientVersion: "25.2.0",
|
|
5841
5841
|
currentUrl: window.location.toString(),
|
|
5842
5842
|
screenResolution: `${window.screen.width}x${window.screen.height}`,
|
|
5843
5843
|
timezone: getTimeZone(),
|
|
@@ -20571,10 +20571,12 @@ const Suggestions = ({
|
|
|
20571
20571
|
|
|
20572
20572
|
|
|
20573
20573
|
|
|
20574
|
+
|
|
20574
20575
|
const Chat = (0,compat_namespaceObject.forwardRef)(({
|
|
20575
20576
|
children,
|
|
20576
20577
|
className: givenClassName = ''
|
|
20577
20578
|
}, forwardedRef) => {
|
|
20579
|
+
const focusTrap = (0,compat_namespaceObject.useRef)(null);
|
|
20578
20580
|
const {
|
|
20579
20581
|
closeChat,
|
|
20580
20582
|
isOpen,
|
|
@@ -20589,6 +20591,7 @@ const Chat = (0,compat_namespaceObject.forwardRef)(({
|
|
|
20589
20591
|
isInline
|
|
20590
20592
|
} = useSeamlyLayoutMode();
|
|
20591
20593
|
const appContainerClassNames = useSeamlyAppContainerClassNames();
|
|
20594
|
+
const chatSectionId = useGeneratedId();
|
|
20592
20595
|
const headingId = useGeneratedId();
|
|
20593
20596
|
const userHasResponded = useUserHasResponded();
|
|
20594
20597
|
const {
|
|
@@ -20611,7 +20614,22 @@ const Chat = (0,compat_namespaceObject.forwardRef)(({
|
|
|
20611
20614
|
focusWindowOpenButton();
|
|
20612
20615
|
}
|
|
20613
20616
|
};
|
|
20617
|
+
(0,compat_namespaceObject.useEffect)(() => {
|
|
20618
|
+
if (isVisible && layoutMode === 'window') {
|
|
20619
|
+
focusTrap.current = createFocusTrap(`#${chatSectionId}`, {
|
|
20620
|
+
// We set the initialFocus to false, as the `WindowOpenButton` takes care of that
|
|
20621
|
+
initialFocus: false
|
|
20622
|
+
});
|
|
20623
|
+
focusTrap.current.activate();
|
|
20624
|
+
}
|
|
20625
|
+
return () => {
|
|
20626
|
+
if (focusTrap.current) {
|
|
20627
|
+
focusTrap.current.deactivate();
|
|
20628
|
+
}
|
|
20629
|
+
};
|
|
20630
|
+
}, [chatSectionId, isVisible, layoutMode]);
|
|
20614
20631
|
return isVisible && /*#__PURE__*/(0,jsx_runtime_namespaceObject.jsxs)("section", {
|
|
20632
|
+
id: chatSectionId,
|
|
20615
20633
|
className: css_className(classNames),
|
|
20616
20634
|
onKeyDown: onKeyDownHandler,
|
|
20617
20635
|
tabIndex: -1,
|