@ai-matrx/design-system 0.20.14 → 0.20.16
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/CHANGELOG.md +12 -0
- package/dist/data-table/index.cjs +7 -1
- package/dist/data-table/index.cjs.map +1 -1
- package/dist/data-table/index.js +7 -1
- package/dist/data-table/index.js.map +1 -1
- package/dist/index.cjs +8 -0
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +8 -0
- package/dist/index.js.map +1 -1
- package/package.json +4 -4
package/dist/index.cjs
CHANGED
|
@@ -601,15 +601,23 @@ var useDrawerDirection = () => React3.useContext(DrawerDirectionContext);
|
|
|
601
601
|
var Drawer = ({
|
|
602
602
|
children,
|
|
603
603
|
shouldScaleBackground = true,
|
|
604
|
+
onOpenChange,
|
|
604
605
|
...props
|
|
605
606
|
}) => {
|
|
606
607
|
const direction = props.direction ?? "bottom";
|
|
608
|
+
const handleOpenChange = (open) => {
|
|
609
|
+
if (open && typeof document !== "undefined" && document.activeElement instanceof HTMLElement) {
|
|
610
|
+
document.activeElement.blur();
|
|
611
|
+
}
|
|
612
|
+
onOpenChange?.(open);
|
|
613
|
+
};
|
|
607
614
|
return /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(RadixDialogModalProvider, { modal: true, children: /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(DrawerDirectionContext.Provider, { value: direction, children: /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
|
|
608
615
|
import_vaul.Drawer.Root,
|
|
609
616
|
{
|
|
610
617
|
modal: true,
|
|
611
618
|
shouldScaleBackground,
|
|
612
619
|
...props,
|
|
620
|
+
onOpenChange: handleOpenChange,
|
|
613
621
|
direction,
|
|
614
622
|
children
|
|
615
623
|
}
|