@smart-cloud/ai-kit-ui 1.5.8 → 1.5.9
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.cjs +6 -6
- package/dist/index.js +6 -6
- package/package.json +1 -1
- package/src/withAiKitShell.tsx +17 -0
package/package.json
CHANGED
package/src/withAiKitShell.tsx
CHANGED
|
@@ -312,6 +312,23 @@ export function withAiKitShell<P extends object>(
|
|
|
312
312
|
: "light"
|
|
313
313
|
: colorMode;
|
|
314
314
|
|
|
315
|
+
// Modal content is portalled into a different shadow tree. Mantine
|
|
316
|
+
// color-scheme attributes do not cross that boundary, so copy the
|
|
317
|
+
// contextual attributes that the global overlay needs explicitly.
|
|
318
|
+
if (usesSeparateModalPortal && modalRootElement) {
|
|
319
|
+
modalRootElement.setAttribute("data-ai-kit-variation", "modal");
|
|
320
|
+
modalRootElement.setAttribute(
|
|
321
|
+
"data-mantine-color-scheme",
|
|
322
|
+
resolved ?? "light",
|
|
323
|
+
);
|
|
324
|
+
modalRootElement.setAttribute("dir", currentDirection);
|
|
325
|
+
if (currentLanguage) {
|
|
326
|
+
modalRootElement.setAttribute("lang", currentLanguage);
|
|
327
|
+
} else {
|
|
328
|
+
modalRootElement.removeAttribute("lang");
|
|
329
|
+
}
|
|
330
|
+
}
|
|
331
|
+
|
|
315
332
|
return (
|
|
316
333
|
<DirectionProvider initialDirection={currentDirection}>
|
|
317
334
|
<MantineProvider
|