@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.d.cts
CHANGED
|
@@ -1767,7 +1767,7 @@ type DrawerProps = React.ComponentProps<typeof Drawer$1.Root> & {
|
|
|
1767
1767
|
direction?: DrawerDirection;
|
|
1768
1768
|
};
|
|
1769
1769
|
declare const Drawer: {
|
|
1770
|
-
({ children, shouldScaleBackground, ...props }: DrawerProps): React.JSX.Element;
|
|
1770
|
+
({ children, shouldScaleBackground, onOpenChange, ...props }: DrawerProps): React.JSX.Element;
|
|
1771
1771
|
displayName: string;
|
|
1772
1772
|
};
|
|
1773
1773
|
declare const DrawerTrigger: React.ForwardRefExoticComponent<DialogPrimitive.DialogTriggerProps & React.RefAttributes<HTMLButtonElement>>;
|
package/dist/index.d.ts
CHANGED
|
@@ -1767,7 +1767,7 @@ type DrawerProps = React.ComponentProps<typeof Drawer$1.Root> & {
|
|
|
1767
1767
|
direction?: DrawerDirection;
|
|
1768
1768
|
};
|
|
1769
1769
|
declare const Drawer: {
|
|
1770
|
-
({ children, shouldScaleBackground, ...props }: DrawerProps): React.JSX.Element;
|
|
1770
|
+
({ children, shouldScaleBackground, onOpenChange, ...props }: DrawerProps): React.JSX.Element;
|
|
1771
1771
|
displayName: string;
|
|
1772
1772
|
};
|
|
1773
1773
|
declare const DrawerTrigger: React.ForwardRefExoticComponent<DialogPrimitive.DialogTriggerProps & React.RefAttributes<HTMLButtonElement>>;
|
package/dist/index.js
CHANGED
|
@@ -339,15 +339,23 @@ var useDrawerDirection = () => React3.useContext(DrawerDirectionContext);
|
|
|
339
339
|
var Drawer = ({
|
|
340
340
|
children,
|
|
341
341
|
shouldScaleBackground = true,
|
|
342
|
+
onOpenChange,
|
|
342
343
|
...props
|
|
343
344
|
}) => {
|
|
344
345
|
const direction = props.direction ?? "bottom";
|
|
346
|
+
const handleOpenChange = (open) => {
|
|
347
|
+
if (open && typeof document !== "undefined" && document.activeElement instanceof HTMLElement) {
|
|
348
|
+
document.activeElement.blur();
|
|
349
|
+
}
|
|
350
|
+
onOpenChange?.(open);
|
|
351
|
+
};
|
|
345
352
|
return /* @__PURE__ */ jsx5(RadixDialogModalProvider, { modal: true, children: /* @__PURE__ */ jsx5(DrawerDirectionContext.Provider, { value: direction, children: /* @__PURE__ */ jsx5(
|
|
346
353
|
DrawerPrimitive.Root,
|
|
347
354
|
{
|
|
348
355
|
modal: true,
|
|
349
356
|
shouldScaleBackground,
|
|
350
357
|
...props,
|
|
358
|
+
onOpenChange: handleOpenChange,
|
|
351
359
|
direction,
|
|
352
360
|
children
|
|
353
361
|
}
|