@worldcoin/mini-apps-ui-kit-react 1.0.0-canary.1 → 1.0.0-canary.2

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.
@@ -0,0 +1,22 @@
1
+ import { BottomBarProps } from '../BottomBar';
2
+ import { AlertDialogCloseProps, AlertDialogContentProps, AlertDialogDescriptionProps, AlertDialogHeaderProps, AlertDialogProps, AlertDialogTitleProps, AlertDialogTriggerProps } from './types';
3
+ import * as React from "react";
4
+ declare const AlertDialog: {
5
+ ({ dismissible, modal, ...props }: AlertDialogProps): import("react/jsx-runtime").JSX.Element;
6
+ displayName: string;
7
+ };
8
+ declare const AlertDialogTrigger: React.ForwardRefExoticComponent<AlertDialogTriggerProps & React.RefAttributes<HTMLButtonElement>>;
9
+ declare const AlertDialogPortal: typeof import('vaul').Portal;
10
+ declare const AlertDialogClose: React.ForwardRefExoticComponent<AlertDialogCloseProps & React.RefAttributes<HTMLButtonElement>>;
11
+ declare const AlertDialogContent: React.ForwardRefExoticComponent<AlertDialogContentProps & React.RefAttributes<HTMLDivElement>>;
12
+ declare const AlertDialogHeader: {
13
+ ({ icon, children, ...props }: AlertDialogHeaderProps): import("react/jsx-runtime").JSX.Element;
14
+ displayName: string;
15
+ };
16
+ declare const AlertDialogFooter: {
17
+ (props: BottomBarProps): import("react/jsx-runtime").JSX.Element;
18
+ displayName: string;
19
+ };
20
+ declare const AlertDialogTitle: React.ForwardRefExoticComponent<AlertDialogTitleProps & React.RefAttributes<HTMLHeadingElement>>;
21
+ declare const AlertDialogDescription: React.ForwardRefExoticComponent<AlertDialogDescriptionProps & React.RefAttributes<HTMLParagraphElement>>;
22
+ export { AlertDialog, AlertDialogPortal, AlertDialogTrigger, AlertDialogClose, AlertDialogContent, AlertDialogHeader, AlertDialogFooter, AlertDialogTitle, AlertDialogDescription, };
@@ -2,50 +2,48 @@
2
2
  import { jsx as r, jsxs as n } from "react/jsx-runtime";
3
3
  import { cn as s } from "../../lib/utils.js";
4
4
  import * as i from "react";
5
- import { Drawer as t } from "../../node_modules/.pnpm/vaul@1.1.2_@types_react-dom@18.3.5_@types_react@18.3.18__@types_react@18.3.18_react-dom@18.3._7iqkcrcg5qjc3n2ixm6rnrnx3e/node_modules/vaul/dist/index.js";
6
- import { BottomBar as g } from "../BottomBar/BottomBar.js";
7
- import { Button as f } from "../Button/Button.js";
8
- import { XMark as p } from "../Icons/XMark.js";
5
+ import { Drawer as o } from "../../node_modules/.pnpm/vaul@1.1.2_@types_react-dom@18.3.5_@types_react@18.3.18__@types_react@18.3.18_react-dom@18.3._7iqkcrcg5qjc3n2ixm6rnrnx3e/node_modules/vaul/dist/index.js";
6
+ import { BottomBar as c } from "../BottomBar/BottomBar.js";
7
+ import { Button as g } from "../Button/Button.js";
8
+ import { XMark as f } from "../Icons/XMark.js";
9
9
  import { Typography as m } from "../Typography/Typography.js";
10
- import { AlertDialogContext as D, useAlertDialog as A } from "./use-alert-dialog.js";
11
- const y = ({ dismissible: e = !0, modal: l = !0, ...a }) => /* @__PURE__ */ r(D.Provider, { value: { dismissible: e }, children: /* @__PURE__ */ r(
12
- t.Root,
10
+ import { AlertDialogContext as p, useAlertDialog as D } from "./use-alert-dialog.js";
11
+ const A = ({ dismissible: e = !0, modal: l = !0, ...t }) => /* @__PURE__ */ r(p.Provider, { value: { dismissible: e }, children: /* @__PURE__ */ r(
12
+ o.Root,
13
13
  {
14
14
  shouldScaleBackground: !1,
15
15
  dismissible: e,
16
16
  modal: l,
17
- ...a
17
+ ...t
18
18
  }
19
19
  ) });
20
- y.displayName = "AlertDialog";
21
- const h = i.forwardRef((e, l) => /* @__PURE__ */ r(t.Trigger, { ref: l, ...e }));
20
+ A.displayName = "AlertDialog";
21
+ const h = i.forwardRef((e, l) => /* @__PURE__ */ r(o.Trigger, { ref: l, ...e }));
22
22
  h.displayName = "AlertDialogTrigger";
23
- const N = t.Portal, d = i.forwardRef((e, l) => /* @__PURE__ */ r(t.Close, { ref: l, ...e }));
23
+ const u = o.Portal, d = i.forwardRef((e, l) => /* @__PURE__ */ r(o.Close, { ref: l, ...e }));
24
24
  d.displayName = "AlertDialogClose";
25
- const c = i.forwardRef(({ className: e, ...l }, a) => /* @__PURE__ */ r(
26
- t.Overlay,
27
- {
28
- ref: a,
29
- className: s("fixed inset-0 z-50 bg-gray-900/40", e),
30
- ...l
31
- }
32
- ));
33
- c.displayName = "AlertDialogOverlay";
34
- const u = i.forwardRef(({ className: e, children: l, ...a }, o) => /* @__PURE__ */ n(N, { children: [
35
- /* @__PURE__ */ r(c, {}),
25
+ const y = i.forwardRef(({ className: e, children: l, ...t }, a) => /* @__PURE__ */ n(u, { children: [
36
26
  /* @__PURE__ */ r(
37
- t.Content,
27
+ o.Overlay,
38
28
  {
39
- ref: o,
29
+ ref: a,
30
+ className: s("fixed inset-0 z-50 bg-gray-900/40", e),
31
+ ...t
32
+ }
33
+ ),
34
+ /* @__PURE__ */ r(
35
+ o.Content,
36
+ {
37
+ ref: a,
40
38
  className: s("fixed inset-x-0 bottom-0 z-50 mt-24 h-auto", e),
41
- ...a,
39
+ ...t,
42
40
  children: /* @__PURE__ */ r("div", { className: "flex flex-col rounded-[1.75rem] bg-gray-0 m-3 p-8", children: l })
43
41
  }
44
42
  )
45
43
  ] }));
46
- u.displayName = "AlertDialogContent";
47
- const x = ({ icon: e, children: l, ...a }) => {
48
- const { dismissible: o } = A();
44
+ y.displayName = "AlertDialogContent";
45
+ const N = ({ icon: e, children: l, ...t }) => {
46
+ const { dismissible: a } = D();
49
47
  return /* @__PURE__ */ n(
50
48
  "div",
51
49
  {
@@ -53,42 +51,41 @@ const x = ({ icon: e, children: l, ...a }) => {
53
51
  "flex justify-between gap-4 mb-4 w-full",
54
52
  e ? "items-start" : "items-center"
55
53
  ),
56
- ...a,
54
+ ...t,
57
55
  children: [
58
56
  /* @__PURE__ */ n("div", { className: "flex flex-col gap-6", children: [
59
57
  e,
60
58
  l
61
59
  ] }),
62
- o && /* @__PURE__ */ r("div", { className: "shrink-0", children: /* @__PURE__ */ r(d, { asChild: !0, children: /* @__PURE__ */ r(f, { variant: "tertiary", size: "icon", children: /* @__PURE__ */ r(p, {}) }) }) })
60
+ a && /* @__PURE__ */ r("div", { className: "shrink-0", children: /* @__PURE__ */ r(d, { asChild: !0, children: /* @__PURE__ */ r(g, { variant: "tertiary", size: "icon", children: /* @__PURE__ */ r(f, {}) }) }) })
63
61
  ]
64
62
  }
65
63
  );
66
64
  };
67
- x.displayName = "AlertDialogHeader";
68
- const v = (e) => /* @__PURE__ */ r(g, { ...e });
69
- v.displayName = "AlertDialogFooter";
70
- const C = i.forwardRef(({ className: e, children: l, ...a }, o) => /* @__PURE__ */ r(t.Title, { ref: o, ...a, asChild: !0, children: /* @__PURE__ */ r(m, { variant: "heading", level: 2, children: l }) }));
71
- C.displayName = "AlertDialogTitle";
72
- const w = i.forwardRef(({ className: e, children: l, ...a }, o) => /* @__PURE__ */ r(
73
- t.Description,
65
+ N.displayName = "AlertDialogHeader";
66
+ const x = (e) => /* @__PURE__ */ r(c, { ...e });
67
+ x.displayName = "AlertDialogFooter";
68
+ const v = i.forwardRef(({ className: e, children: l, ...t }, a) => /* @__PURE__ */ r(o.Title, { ref: a, ...t, asChild: !0, children: /* @__PURE__ */ r(m, { variant: "heading", level: 2, children: l }) }));
69
+ v.displayName = "AlertDialogTitle";
70
+ const C = i.forwardRef(({ className: e, children: l, ...t }, a) => /* @__PURE__ */ r(
71
+ o.Description,
74
72
  {
75
- ref: o,
73
+ ref: a,
76
74
  className: s("text-gray-500 mb-8", e),
77
- ...a,
75
+ ...t,
78
76
  asChild: !0,
79
77
  children: /* @__PURE__ */ r(m, { children: l })
80
78
  }
81
79
  ));
82
- w.displayName = "AlertDialogDescription";
80
+ C.displayName = "AlertDialogDescription";
83
81
  export {
84
- y as AlertDialog,
82
+ A as AlertDialog,
85
83
  d as AlertDialogClose,
86
- u as AlertDialogContent,
87
- w as AlertDialogDescription,
88
- v as AlertDialogFooter,
89
- x as AlertDialogHeader,
90
- c as AlertDialogOverlay,
91
- N as AlertDialogPortal,
92
- C as AlertDialogTitle,
84
+ y as AlertDialogContent,
85
+ C as AlertDialogDescription,
86
+ x as AlertDialogFooter,
87
+ N as AlertDialogHeader,
88
+ u as AlertDialogPortal,
89
+ v as AlertDialogTitle,
93
90
  h as AlertDialogTrigger
94
91
  };
@@ -1,13 +1,12 @@
1
- import { AlertDialog as r, AlertDialogClose as o, AlertDialogContent as t, AlertDialogDescription as i, AlertDialogFooter as a, AlertDialogHeader as g, AlertDialogOverlay as D, AlertDialogPortal as A, AlertDialogTitle as n, AlertDialogTrigger as p } from "./AlertDialog.js";
1
+ import { AlertDialog as o, AlertDialogClose as r, AlertDialogContent as t, AlertDialogDescription as i, AlertDialogFooter as a, AlertDialogHeader as g, AlertDialogPortal as D, AlertDialogTitle as A, AlertDialogTrigger as n } from "./AlertDialog.js";
2
2
  export {
3
- r as AlertDialog,
4
- o as AlertDialogClose,
3
+ o as AlertDialog,
4
+ r as AlertDialogClose,
5
5
  t as AlertDialogContent,
6
6
  i as AlertDialogDescription,
7
7
  a as AlertDialogFooter,
8
8
  g as AlertDialogHeader,
9
- D as AlertDialogOverlay,
10
- A as AlertDialogPortal,
11
- n as AlertDialogTitle,
12
- p as AlertDialogTrigger
9
+ D as AlertDialogPortal,
10
+ A as AlertDialogTitle,
11
+ n as AlertDialogTrigger
13
12
  };
@@ -6,7 +6,7 @@ declare const buttonVariants: (props?: ({
6
6
  stateful?: boolean | null | undefined;
7
7
  fullWidth?: boolean | null | undefined;
8
8
  } & import('class-variance-authority/types').ClassProp) | undefined) => string;
9
- export interface ButtonProps extends Omit<ButtonHTMLAttributes<HTMLButtonElement>, "className">, VariantProps<typeof buttonVariants> {
9
+ export interface ButtonProps extends ButtonHTMLAttributes<HTMLButtonElement>, VariantProps<typeof buttonVariants> {
10
10
  /**
11
11
  * The variant style to use
12
12
  * @default "primary"
@@ -1,14 +1,14 @@
1
1
  "use client";
2
- import { jsxs as g, jsx as a } from "react/jsx-runtime";
3
- import { cn as b } from "../../lib/utils.js";
4
- import { Slot as d } from "../../node_modules/.pnpm/@radix-ui_react-slot@1.1.1_@types_react@18.3.18_react@18.3.1/node_modules/@radix-ui/react-slot/dist/index.js";
5
- import { cva as m } from "../../node_modules/.pnpm/class-variance-authority@0.7.1/node_modules/class-variance-authority/dist/index.js";
2
+ import { jsxs as g, jsx as r } from "react/jsx-runtime";
3
+ import { cn as m } from "../../lib/utils.js";
4
+ import { Slot as b } from "../../node_modules/.pnpm/@radix-ui_react-slot@1.1.1_@types_react@18.3.18_react@18.3.1/node_modules/@radix-ui/react-slot/dist/index.js";
5
+ import { cva as d } from "../../node_modules/.pnpm/class-variance-authority@0.7.1/node_modules/class-variance-authority/dist/index.js";
6
6
  import { forwardRef as p } from "react";
7
7
  import { Fail as f } from "../Icons/Fail.js";
8
8
  import { Success as c } from "../Icons/Success.js";
9
9
  import { Spinner as y } from "../Spinner/Spinner.js";
10
10
  import { typographyVariants as u } from "../Typography/Typography.js";
11
- const v = m(
11
+ const v = d(
12
12
  "flex items-center justify-center rounded-full gap-2 font-sans leading-[1.2] tracking-normal transition-colors",
13
13
  {
14
14
  variants: {
@@ -38,28 +38,29 @@ const v = m(
38
38
  }
39
39
  }
40
40
  ), x = p(
41
- ({ variant: e, size: t = "lg", fullWidth: s, asChild: i, state: r, children: n, ...o }, l) => /* @__PURE__ */ g(
42
- i ? d : "button",
41
+ ({ variant: s = "primary", size: t = "lg", fullWidth: i, asChild: n, state: a, children: l, ...e }, o) => /* @__PURE__ */ g(
42
+ n ? b : "button",
43
43
  {
44
- ref: l,
45
- className: b(
44
+ ref: o,
45
+ ...e,
46
+ className: m(
46
47
  v({
47
- variant: e,
48
+ variant: s,
48
49
  size: t,
49
- stateful: !!r,
50
- fullWidth: s
50
+ stateful: !!a,
51
+ fullWidth: i
51
52
  }),
52
53
  u({
53
54
  variant: "label",
54
55
  level: t === "lg" ? 1 : 2
55
- })
56
+ }),
57
+ e.className
56
58
  ),
57
- ...o,
58
59
  children: [
59
- !r && n,
60
- r === "pending" && /* @__PURE__ */ a(y, { className: "absolute size-6" }),
61
- r === "success" && /* @__PURE__ */ a(c, { className: "absolute size-6" }),
62
- r === "failed" && /* @__PURE__ */ a(f, { className: "absolute size-6" })
60
+ !a && l,
61
+ a === "pending" && /* @__PURE__ */ r(y, { className: "absolute size-6" }),
62
+ a === "success" && /* @__PURE__ */ r(c, { className: "absolute size-6" }),
63
+ a === "failed" && /* @__PURE__ */ r(f, { className: "absolute size-6" })
63
64
  ]
64
65
  }
65
66
  )
package/dist/index.js CHANGED
@@ -1,103 +1,102 @@
1
- import { Button as a } from "./components/Button/Button.js";
2
- import { Checkbox as l } from "./components/Checkbox/Checkbox.js";
1
+ import { Button as m } from "./components/Button/Button.js";
2
+ import { Checkbox as i } from "./components/Checkbox/Checkbox.js";
3
3
  import { Chip as f } from "./components/Chip/Chip.js";
4
- import { ColorPickerGroup as g, ColorPickerItem as s } from "./components/ColorPicker/ColorPicker.js";
4
+ import { ColorPickerGroup as s, ColorPickerItem as g } from "./components/ColorPicker/ColorPicker.js";
5
5
  import { Flag as d } from "./components/Flag/Flag.js";
6
6
  import { LazyFlag as D } from "./components/Flag/LazyFlag.js";
7
7
  import { isSupportedCountryCode as C } from "./components/Flag/utils.js";
8
8
  import * as r from "./components/Form/Form.js";
9
- import { Input as c, iconVariants as w, inputVariants as F } from "./components/Input/Input.js";
9
+ import { Input as w, iconVariants as A, inputVariants as F } from "./components/Input/Input.js";
10
10
  import { ListItem as y } from "./components/ListItem/ListItem.js";
11
11
  import { NumberPad as B } from "./components/NumberPad/NumberPad.js";
12
12
  import { OTPField as G } from "./components/OTPField/OTPField.js";
13
13
  import { Pill as V } from "./components/Pill/Pill.js";
14
14
  import { RadioGroup as L } from "./components/RadioGroup/RadioGroup.js";
15
15
  import { RadioGroupItem as R } from "./components/RadioGroup/RadioGroupItem.js";
16
- import { Select as H } from "./components/Select/Select.js";
17
- import { SearchField as _ } from "./components/SearchField/SearchField.js";
18
- import { PhoneField as K } from "./components/PhoneField/PhoneField.js";
19
- import { getValidatedCountryCode as N } from "./components/PhoneField/utils.js";
16
+ import { Select as _ } from "./components/Select/Select.js";
17
+ import { SearchField as z } from "./components/SearchField/SearchField.js";
18
+ import { PhoneField as M } from "./components/PhoneField/PhoneField.js";
19
+ import { getValidatedCountryCode as O } from "./components/PhoneField/utils.js";
20
20
  import { Spinner as j } from "./components/Spinner/Spinner.js";
21
21
  import { Switch as E } from "./components/Switch/Switch.js";
22
22
  import { Token as Q } from "./components/Token/Token.js";
23
23
  import { Toast as X, ToastProvider as Y, ToastViewport as Z } from "./components/Toast/Toast.js";
24
24
  import { Toaster as rr } from "./components/Toast/Toaster.js";
25
25
  import { reducer as er, toast as tr, useToast as pr } from "./components/Toast/use-toast.js";
26
- import { Typography as mr, typographyVariants as lr } from "./components/Typography/Typography.js";
27
- import { Drawer as fr, DrawerClose as xr, DrawerContent as gr, DrawerHeader as sr, DrawerTitle as nr, DrawerTrigger as dr } from "./components/Drawer/Drawer.js";
26
+ import { Typography as ar, typographyVariants as ir } from "./components/Typography/Typography.js";
27
+ import { Drawer as fr, DrawerClose as xr, DrawerContent as sr, DrawerHeader as gr, DrawerTitle as nr, DrawerTrigger as dr } from "./components/Drawer/Drawer.js";
28
28
  import { Progress as Dr } from "./components/Progress/Progress.js";
29
29
  import "./components/TextArea/TextArea.js";
30
30
  import { WalletAddressField as Cr } from "./components/WalletAddressField/WalletAddressField.js";
31
- import { AlertDialog as cr, AlertDialogClose as wr, AlertDialogContent as Fr, AlertDialogDescription as Pr, AlertDialogFooter as yr, AlertDialogHeader as hr, AlertDialogOverlay as Br, AlertDialogPortal as Ir, AlertDialogTitle as Gr, AlertDialogTrigger as Sr } from "./components/AlertDialog/AlertDialog.js";
32
- import { BottomBar as kr } from "./components/BottomBar/BottomBar.js";
33
- import { BulletList as br } from "./components/BulletList/BulletList.js";
34
- import { BulletListItem as vr } from "./components/BulletListItem/BulletListItem.js";
31
+ import { AlertDialog as wr, AlertDialogClose as Ar, AlertDialogContent as Fr, AlertDialogDescription as Pr, AlertDialogFooter as yr, AlertDialogHeader as hr, AlertDialogPortal as Br, AlertDialogTitle as Ir, AlertDialogTrigger as Gr } from "./components/AlertDialog/AlertDialog.js";
32
+ import { BottomBar as Vr } from "./components/BottomBar/BottomBar.js";
33
+ import { BulletList as Lr } from "./components/BulletList/BulletList.js";
34
+ import { BulletListItem as Rr } from "./components/BulletListItem/BulletListItem.js";
35
35
  import "./components/BulletPoint/BulletPoint.js";
36
- import { Marble as Or } from "./components/Marble/Marble.js";
36
+ import { Marble as _r } from "./components/Marble/Marble.js";
37
37
  import { TopBar as zr } from "./components/TopBar/TopBar.js";
38
38
  import { CountryDrawer as Mr } from "./components/CountryDrawer/CountryDrawer.js";
39
- import { ToggleGroupItem as Wr, ToggleGroupRoot as jr } from "./components/ToggleGroup/ToggleGroup.js";
40
- import { default as Er } from "./tailwind/index.js";
39
+ import { ToggleGroupItem as Or, ToggleGroupRoot as Wr } from "./components/ToggleGroup/ToggleGroup.js";
40
+ import { default as qr } from "./tailwind/index.js";
41
41
  export {
42
- cr as AlertDialog,
43
- wr as AlertDialogClose,
42
+ wr as AlertDialog,
43
+ Ar as AlertDialogClose,
44
44
  Fr as AlertDialogContent,
45
45
  Pr as AlertDialogDescription,
46
46
  yr as AlertDialogFooter,
47
47
  hr as AlertDialogHeader,
48
- Br as AlertDialogOverlay,
49
- Ir as AlertDialogPortal,
50
- Gr as AlertDialogTitle,
51
- Sr as AlertDialogTrigger,
52
- kr as BottomBar,
53
- br as BulletList,
54
- vr as BulletListItem,
55
- a as Button,
56
- l as Checkbox,
48
+ Br as AlertDialogPortal,
49
+ Ir as AlertDialogTitle,
50
+ Gr as AlertDialogTrigger,
51
+ Vr as BottomBar,
52
+ Lr as BulletList,
53
+ Rr as BulletListItem,
54
+ m as Button,
55
+ i as Checkbox,
57
56
  f as Chip,
58
- g as ColorPickerGroup,
59
- s as ColorPickerItem,
57
+ s as ColorPickerGroup,
58
+ g as ColorPickerItem,
60
59
  Mr as CountryDrawer,
61
60
  fr as Drawer,
62
61
  xr as DrawerClose,
63
- gr as DrawerContent,
64
- sr as DrawerHeader,
62
+ sr as DrawerContent,
63
+ gr as DrawerHeader,
65
64
  nr as DrawerTitle,
66
65
  dr as DrawerTrigger,
67
66
  d as Flag,
68
67
  r as Form,
69
- c as Input,
68
+ w as Input,
70
69
  D as LazyFlag,
71
70
  y as ListItem,
72
- Or as Marble,
71
+ _r as Marble,
73
72
  B as NumberPad,
74
73
  G as OTPField,
75
- K as PhoneField,
74
+ M as PhoneField,
76
75
  V as Pill,
77
76
  Dr as Progress,
78
77
  L as RadioGroup,
79
78
  R as RadioGroupItem,
80
- _ as SearchField,
81
- H as Select,
79
+ z as SearchField,
80
+ _ as Select,
82
81
  j as Spinner,
83
82
  E as Switch,
84
83
  X as Toast,
85
84
  Y as ToastProvider,
86
85
  Z as ToastViewport,
87
86
  rr as Toaster,
88
- Wr as ToggleGroupItem,
89
- jr as ToggleGroupRoot,
87
+ Or as ToggleGroupItem,
88
+ Wr as ToggleGroupRoot,
90
89
  Q as Token,
91
90
  zr as TopBar,
92
- mr as Typography,
91
+ ar as Typography,
93
92
  Cr as WalletAddressField,
94
- N as getValidatedCountryCode,
95
- w as iconVariants,
93
+ O as getValidatedCountryCode,
94
+ A as iconVariants,
96
95
  F as inputVariants,
97
96
  C as isSupportedCountryCode,
98
97
  er as reducer,
99
98
  tr as toast,
100
- lr as typographyVariants,
101
- Er as uiKitTailwindPlugin,
99
+ ir as typographyVariants,
100
+ qr as uiKitTailwindPlugin,
102
101
  pr as useToast
103
102
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@worldcoin/mini-apps-ui-kit-react",
3
- "version": "1.0.0-canary.1",
3
+ "version": "1.0.0-canary.2",
4
4
  "type": "module",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",