@worldcoin/mini-apps-ui-kit-react 1.3.2 → 1.3.3

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.
@@ -5,6 +5,7 @@ import * as React from "react";
5
5
  import { Drawer } from "../../node_modules/.pnpm/vaul@1.1.2_@types_react-dom@18.3.7_@types_react@18.3.23__@types_react@18.3.23_react-dom@18.3._hck6bgtscpcdlplcvchrs7yfhu/node_modules/vaul/dist/index.js";
6
6
  import { XMark } from "../Icons/XMark.js";
7
7
  import { AlertDialogContext, useAlertDialog } from "./use-alert-dialog.js";
8
+ import { useSafeAreaInsets } from "../SafeAreaView/useSafeAreaInsets.js";
8
9
  import { BottomBar } from "../BottomBar/BottomBar.js";
9
10
  import { Typography } from "../Typography/Typography.js";
10
11
  import { Button } from "../Button/Button.js";
@@ -29,25 +30,37 @@ AlertDialogTrigger.displayName = "AlertDialogTrigger";
29
30
  const AlertDialogPortal = Drawer.Portal;
30
31
  const AlertDialogClose = React.forwardRef((props, ref) => /* @__PURE__ */ jsx(Drawer.Close, { ref, ...props }));
31
32
  AlertDialogClose.displayName = "AlertDialogClose";
32
- const AlertDialogContent = React.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsxs(AlertDialogPortal, { children: [
33
- /* @__PURE__ */ jsx(
34
- Drawer.Overlay,
35
- {
36
- ref,
37
- className: cn("fixed inset-0 z-50 bg-gray-900/40", className),
38
- ...props
39
- }
40
- ),
41
- /* @__PURE__ */ jsx(
42
- Drawer.Content,
43
- {
44
- ref,
45
- className: cn("fixed inset-x-0 bottom-0 z-50 mt-24 h-auto", className),
46
- ...props,
47
- children: /* @__PURE__ */ jsx("div", { className: "flex flex-col rounded-[1.75rem] bg-gray-0 m-3 p-8", children })
48
- }
49
- )
50
- ] }));
33
+ const AlertDialogContent = React.forwardRef(({ className, children, ...props }, ref) => {
34
+ const safe = useSafeAreaInsets();
35
+ return /* @__PURE__ */ jsxs(AlertDialogPortal, { children: [
36
+ /* @__PURE__ */ jsx(
37
+ Drawer.Overlay,
38
+ {
39
+ ref,
40
+ className: cn("fixed inset-0 z-50 bg-gray-900/40", className),
41
+ ...props
42
+ }
43
+ ),
44
+ /* @__PURE__ */ jsx(
45
+ Drawer.Content,
46
+ {
47
+ ref,
48
+ className: cn("fixed inset-x-0 bottom-0 z-50 mt-24 h-auto", className),
49
+ ...props,
50
+ children: /* @__PURE__ */ jsx(
51
+ "div",
52
+ {
53
+ className: "flex flex-col rounded-[1.75rem] bg-gray-0 m-3 p-8",
54
+ style: {
55
+ marginBottom: Math.max(safe.bottom, 12)
56
+ },
57
+ children
58
+ }
59
+ )
60
+ }
61
+ )
62
+ ] });
63
+ });
51
64
  AlertDialogContent.displayName = "AlertDialogContent";
52
65
  const AlertDialogHeader = ({ icon, children, ...props }) => {
53
66
  const { dismissible } = useAlertDialog();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@worldcoin/mini-apps-ui-kit-react",
3
- "version": "1.3.2",
3
+ "version": "1.3.3",
4
4
  "type": "module",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.js",