@worldcoin/mini-apps-ui-kit-react 1.3.1 → 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/dist/tailwind.js CHANGED
@@ -92,7 +92,7 @@ const ethereum = {
92
92
  "--ethereum-secondary": "230 240 255"
93
93
  };
94
94
  const uiKitTailwindPlugin = plugin(
95
- function({ addBase, addComponents }) {
95
+ function({ addBase, addComponents, addVariant }) {
96
96
  addBase({
97
97
  ":root": {
98
98
  "--font-sans": "TWK Lausanne",
@@ -130,6 +130,18 @@ const uiKitTailwindPlugin = plugin(
130
130
  animation: "shine 10s infinite linear"
131
131
  }
132
132
  });
133
+ addVariant("tap", [
134
+ "@media (hover: hover) { &:hover }",
135
+ "@media (hover: none) { &:active }"
136
+ ]);
137
+ addVariant("group-tap", [
138
+ "@media (hover: hover) { .group:hover & }",
139
+ "@media (hover: none) { .group:active & }"
140
+ ]);
141
+ addVariant("peer-tap", [
142
+ "@media (hover: hover) { .peer:hover ~& }",
143
+ "@media (hover: none) { .peer:active ~& }"
144
+ ]);
133
145
  },
134
146
  {
135
147
  theme: {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@worldcoin/mini-apps-ui-kit-react",
3
- "version": "1.3.1",
3
+ "version": "1.3.3",
4
4
  "type": "module",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.js",