@coinbase/cdp-react 0.0.49 → 0.0.51

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.
Files changed (34) hide show
  1. package/README.md +15 -0
  2. package/dist/chunks/lite.1fxw3LjI.js +7 -0
  3. package/dist/components/AuthButton/index.d.ts +16 -3
  4. package/dist/components/AuthButton/index.js +51 -39
  5. package/dist/components/CDPReactProvider/index.d.ts +1 -1
  6. package/dist/components/CDPReactProvider/index.js +59 -52
  7. package/dist/components/Fund/index.d.ts +1 -1
  8. package/dist/components/Fund/index.js +9 -1
  9. package/dist/components/Fund/types.d.ts +2 -1
  10. package/dist/components/FundModal/index.d.ts +13 -3
  11. package/dist/components/FundModal/index.js +93 -83
  12. package/dist/components/OAuthStatusModal/index.js +39 -37
  13. package/dist/components/SendEvmTransactionButton/index.d.ts +3 -6
  14. package/dist/components/SendEvmTransactionButton/index.js +32 -34
  15. package/dist/components/SendSolanaTransactionButton/index.d.ts +3 -6
  16. package/dist/components/SendSolanaTransactionButton/index.js +28 -30
  17. package/dist/components/SignIn/SignInAuthMethodButtons.js +30 -25
  18. package/dist/components/SignIn/hooks/useSignInWithOAuth.js +12 -12
  19. package/dist/components/SignIn/index.d.ts +2 -3
  20. package/dist/components/SignIn/index.js +32 -32
  21. package/dist/components/SignInModal/index.d.ts +11 -0
  22. package/dist/components/SignInModal/index.js +73 -51
  23. package/dist/components/SignOutButton/index.d.ts +4 -5
  24. package/dist/components/SignOutButton/index.js +23 -10
  25. package/dist/components/ui/Button/index.js +20 -18
  26. package/dist/components/ui/ButtonBase/index.d.ts +1 -0
  27. package/dist/components/ui/ButtonBase/index.js +31 -28
  28. package/dist/components/ui/Modal/index.d.ts +4 -3
  29. package/dist/components/ui/Modal/index.js +26 -22
  30. package/dist/index.d.ts +2 -0
  31. package/dist/index.js +105 -92
  32. package/dist/utils/childrenHasComponent.d.ts +2 -0
  33. package/dist/utils/childrenHasComponent.js +13 -0
  34. package/package.json +7 -5
@@ -1,62 +1,84 @@
1
- import { jsxs as o, jsx as n, Fragment as m } from "react/jsx-runtime";
2
- import "react";
3
- import { useAppConfig as f } from "../CDPReactProvider/index.js";
4
- import { SignIn as u } from "../SignIn/index.js";
5
- import { Button as c } from "../ui/Button/index.js";
6
- import { Modal as I, ModalTrigger as S, ModalContent as M, ModalClose as b, ModalTitle as v, ModalDescription as C } from "../ui/Modal/index.js";
7
- import { VisuallyHidden as t } from "../ui/VisuallyHidden/index.js";
8
- import { IconXMark as N } from "../../icons/IconXMark.js";
9
- import { SignInBackButton as k } from "../SignIn/SignInBackButton.js";
10
- import { SignInImage as x } from "../SignIn/SignInImage.js";
11
- import { SignInForm as B } from "../SignIn/SignInForm.js";
12
- import { SignInTitle as l } from "../SignIn/SignInTitle.js";
13
- import { SignInDescription as a } from "../SignIn/SignInDescription.js";
14
- import { SignInAuthMethodButtons as w } from "../SignIn/SignInAuthMethodButtons.js";
15
- import { SignInFooter as y } from "../SignIn/SignInFooter.js";
16
- import '../../assets/SignInModal.css';const D = "SignInModal-module__trigger___IcJ8x", F = "SignInModal-module__footer___6qEo2", T = "SignInModal-module__buttons___jhaVn", i = {
17
- trigger: D,
1
+ import { jsx as n, jsxs as t, Fragment as d } from "react/jsx-runtime";
2
+ import { c as S } from "../../chunks/lite.1fxw3LjI.js";
3
+ import { createContext as C, useMemo as b, useContext as x } from "react";
4
+ import { useAppConfig as v } from "../CDPReactProvider/index.js";
5
+ import { SignIn as N } from "../SignIn/index.js";
6
+ import "@coinbase/cdp-hooks";
7
+ import { Button as h } from "../ui/Button/index.js";
8
+ import { ModalTrigger as w, ModalContent as T, ModalClose as k, Modal as B, ModalTitle as D, ModalDescription as F } from "../ui/Modal/index.js";
9
+ import { VisuallyHidden as m } from "../ui/VisuallyHidden/index.js";
10
+ import { IconXMark as j } from "../../icons/IconXMark.js";
11
+ import { childrenHasComponent as u } from "../../utils/childrenHasComponent.js";
12
+ import { SignInBackButton as y } from "../SignIn/SignInBackButton.js";
13
+ import { SignInImage as A } from "../SignIn/SignInImage.js";
14
+ import { SignInForm as V } from "../SignIn/SignInForm.js";
15
+ import { SignInTitle as g } from "../SignIn/SignInTitle.js";
16
+ import { SignInDescription as _ } from "../SignIn/SignInDescription.js";
17
+ import { SignInAuthMethodButtons as z } from "../SignIn/SignInAuthMethodButtons.js";
18
+ import { SignInFooter as E } from "../SignIn/SignInFooter.js";
19
+ import '../../assets/SignInModal.css';const H = "SignInModal-module__trigger___IcJ8x", J = "SignInModal-module__footer___6qEo2", X = "SignInModal-module__buttons___jhaVn", i = {
20
+ trigger: H,
18
21
  "sign-in": "SignInModal-module__sign-in___n05-5",
19
22
  "no-footer": "SignInModal-module__no-footer___meSt1",
20
23
  "title-desc-wrapper": "SignInModal-module__title-desc-wrapper___--XLa",
21
24
  "sign-in-form": "SignInModal-module__sign-in-form___Jzx1-",
22
25
  "sign-in-image": "SignInModal-module__sign-in-image___DGg7B",
23
- footer: F,
24
- buttons: T,
26
+ footer: J,
27
+ buttons: X,
25
28
  "back-button": "SignInModal-module__back-button___nMh2-",
26
29
  "close-icon": "SignInModal-module__close-icon___b-gMh"
27
- }, R = ({ children: _, open: g, setIsOpen: p, onSuccess: s }) => {
28
- const { showCoinbaseFooter: d } = f();
29
- return /* @__PURE__ */ o(I, { open: g, onOpenChange: p, children: [
30
- /* @__PURE__ */ n(S, { asChild: !0, children: _ || /* @__PURE__ */ n(c, { variant: "primary", className: i.trigger, children: "Sign in" }) }),
31
- /* @__PURE__ */ n(M, { children: /* @__PURE__ */ n(
32
- u,
33
- {
34
- onSuccess: s,
35
- className: `${i["sign-in"]} ${d ? "" : i["no-footer"]}`,
36
- children: /* @__PURE__ */ o(m, { children: [
37
- /* @__PURE__ */ n(j, {}),
38
- /* @__PURE__ */ o("div", { className: i.buttons, children: [
39
- /* @__PURE__ */ n(k, { className: i["back-button"] }),
40
- /* @__PURE__ */ n(b, { asChild: !0, children: /* @__PURE__ */ n(c, { "aria-label": "Close", size: "md", variant: "transparentSecondary", children: /* @__PURE__ */ n(N, { className: i["close-icon"] }) }) })
30
+ }, p = C(null), $ = () => {
31
+ const o = x(p);
32
+ if (!o)
33
+ throw new Error("useSignInModalContext must be used within a SignInModal");
34
+ return o;
35
+ }, f = ({
36
+ children: o,
37
+ className: r = "",
38
+ label: l,
39
+ ...e
40
+ }) => /* @__PURE__ */ n(w, { asChild: !0, children: o || /* @__PURE__ */ n(h, { className: S(i.trigger, r), ...e, children: l || "Sign in" }) }), c = (o) => {
41
+ const { showCoinbaseFooter: r } = v(), { onSuccess: l } = $();
42
+ return /* @__PURE__ */ n(T, { ...o, children: /* @__PURE__ */ n(
43
+ N,
44
+ {
45
+ onSuccess: l,
46
+ className: `${i["sign-in"]} ${r ? "" : i["no-footer"]}`,
47
+ ...o,
48
+ children: /* @__PURE__ */ t(d, { children: [
49
+ /* @__PURE__ */ n(q, {}),
50
+ /* @__PURE__ */ t("div", { className: i.buttons, children: [
51
+ /* @__PURE__ */ n(y, { className: i["back-button"] }),
52
+ /* @__PURE__ */ n(k, { asChild: !0, children: /* @__PURE__ */ n(h, { "aria-label": "Close", size: "md", variant: "transparentSecondary", children: /* @__PURE__ */ n(j, { className: i["close-icon"] }) }) })
53
+ ] }),
54
+ /* @__PURE__ */ n("div", { className: i["sign-in-image"], children: /* @__PURE__ */ n(A, {}) }),
55
+ /* @__PURE__ */ n(V, { onSuccess: l, children: ({ authMethod: e, step: s, Form: a }) => /* @__PURE__ */ t(d, { children: [
56
+ /* @__PURE__ */ t("div", { className: i["title-desc-wrapper"], children: [
57
+ s === "verification" ? /* @__PURE__ */ n(m, { as: "div", children: /* @__PURE__ */ n(g, {}) }) : /* @__PURE__ */ n(g, {}),
58
+ s === "credentials" ? /* @__PURE__ */ n(m, { as: "div", children: /* @__PURE__ */ n(_, { authMethod: e }) }) : /* @__PURE__ */ n(_, { authMethod: e })
41
59
  ] }),
42
- /* @__PURE__ */ n("div", { className: i["sign-in-image"], children: /* @__PURE__ */ n(x, {}) }),
43
- /* @__PURE__ */ n(B, { onSuccess: s, children: ({ authMethod: r, step: e, Form: h }) => /* @__PURE__ */ o(m, { children: [
44
- /* @__PURE__ */ o("div", { className: i["title-desc-wrapper"], children: [
45
- e === "verification" ? /* @__PURE__ */ n(t, { as: "div", children: /* @__PURE__ */ n(l, {}) }) : /* @__PURE__ */ n(l, {}),
46
- e === "credentials" ? /* @__PURE__ */ n(t, { as: "div", children: /* @__PURE__ */ n(a, { authMethod: r }) }) : /* @__PURE__ */ n(a, { authMethod: r })
47
- ] }),
48
- /* @__PURE__ */ n("div", { className: i["sign-in-form"], children: h }),
49
- e === "credentials" && /* @__PURE__ */ n(w, { activeMethod: r })
50
- ] }) }),
51
- d && /* @__PURE__ */ n(y, { className: i.footer })
52
- ] })
53
- }
54
- ) })
55
- ] });
56
- }, j = () => /* @__PURE__ */ o(t, { children: [
57
- /* @__PURE__ */ n(v, { asChild: !0, children: /* @__PURE__ */ n(l, { as: "span" }) }),
58
- /* @__PURE__ */ n(C, { asChild: !0, children: /* @__PURE__ */ n(a, { as: "span" }) })
60
+ /* @__PURE__ */ n("div", { className: i["sign-in-form"], children: a }),
61
+ s === "credentials" && /* @__PURE__ */ n(z, { activeMethod: e })
62
+ ] }) }),
63
+ r && /* @__PURE__ */ n(E, { className: i.footer })
64
+ ] })
65
+ }
66
+ ) });
67
+ }, an = ({ children: o, open: r, setIsOpen: l, onSuccess: e }) => {
68
+ const s = o ? u(o, f) : !1, a = o ? u(o, c) : !1, M = !s && !a, I = b(() => ({ onSuccess: e }), [e]);
69
+ return /* @__PURE__ */ n(p.Provider, { value: I, children: /* @__PURE__ */ n(B, { open: r, onOpenChange: l, children: M ? /* @__PURE__ */ t(d, { children: [
70
+ /* @__PURE__ */ n(f, { children: o }),
71
+ /* @__PURE__ */ n(c, {})
72
+ ] }) : /* @__PURE__ */ t(d, { children: [
73
+ o,
74
+ !a && /* @__PURE__ */ n(c, {})
75
+ ] }) }) });
76
+ }, q = () => /* @__PURE__ */ t(m, { children: [
77
+ /* @__PURE__ */ n(D, { asChild: !0, children: /* @__PURE__ */ n(g, { as: "span" }) }),
78
+ /* @__PURE__ */ n(F, { asChild: !0, children: /* @__PURE__ */ n(_, { as: "span" }) })
59
79
  ] });
60
80
  export {
61
- R as SignInModal
81
+ an as SignInModal,
82
+ c as SignInModalContent,
83
+ f as SignInModalTrigger
62
84
  };
@@ -1,8 +1,7 @@
1
1
  import { ReactNode } from 'react';
2
- import { ButtonVariant } from '../../theme/theme';
3
- export type SignOutButtonProps = {
2
+ import { ButtonProps } from '../ui/Button';
3
+ export interface SignOutButtonProps extends ButtonProps {
4
4
  children?: ReactNode;
5
5
  onSuccess?: () => void;
6
- variant?: ButtonVariant;
7
- };
8
- export declare const SignOutButton: ({ children, variant, onSuccess }: SignOutButtonProps) => import("react/jsx-runtime").JSX.Element;
6
+ }
7
+ export declare const SignOutButton: ({ children, className, onSuccess, ...props }: SignOutButtonProps) => import("react/jsx-runtime").JSX.Element;
@@ -1,16 +1,29 @@
1
- import { jsx as s } from "react/jsx-runtime";
2
- import { useSignOut as r } from "@coinbase/cdp-hooks";
1
+ import { jsx as r } from "react/jsx-runtime";
2
+ import { useSignOut as m } from "@coinbase/cdp-hooks";
3
+ import { c } from "../../chunks/lite.1fxw3LjI.js";
3
4
  import "react";
4
- import { Button as m } from "../ui/Button/index.js";
5
- import "../../theme/theme.js";
6
- import '../../assets/SignOutButton.css';const e = {
5
+ import { Button as e } from "../ui/Button/index.js";
6
+ import '../../assets/SignOutButton.css';const g = {
7
7
  "sign-out-button": "SignOutButton-module__sign-out-button___qiybe"
8
- }, O = ({ children: t, variant: o = "primary", onSuccess: n }) => {
9
- const { signOut: i } = r(), u = async () => {
10
- await i(), n?.();
8
+ }, b = ({
9
+ children: o,
10
+ className: n = "",
11
+ onSuccess: i,
12
+ ...t
13
+ }) => {
14
+ const { signOut: u } = m(), s = async () => {
15
+ await u(), i?.();
11
16
  };
12
- return /* @__PURE__ */ s(m, { variant: o, className: e["sign-out-button"], onClick: u, children: t || "Sign out" });
17
+ return /* @__PURE__ */ r(
18
+ e,
19
+ {
20
+ className: t.asChild ? "" : c(g["sign-out-button"], n),
21
+ onClick: s,
22
+ ...t,
23
+ children: o || "Sign out"
24
+ }
25
+ );
13
26
  };
14
27
  export {
15
- O as SignOutButton
28
+ b as SignOutButton
16
29
  };
@@ -1,19 +1,20 @@
1
- import { jsx as t, jsxs as c, Fragment as p } from "react/jsx-runtime";
1
+ import { jsx as t, jsxs as y, Fragment as c } from "react/jsx-runtime";
2
+ import { c as p } from "../../../chunks/lite.1fxw3LjI.js";
2
3
  import { forwardRef as u } from "react";
3
4
  import { ButtonBase as k } from "../ButtonBase/index.js";
4
5
  import { LoadingSpinner as B } from "../LoadingSpinner/index.js";
5
- import { VisuallyHidden as b } from "../VisuallyHidden/index.js";
6
+ import { VisuallyHidden as f } from "../VisuallyHidden/index.js";
6
7
  import "../../../theme/theme.js";
7
- import '../../../assets/Button.css';const f = "Button-module__btn___Wj6Dr", S = "Button-module__primary___WGT--", h = "Button-module__secondary___Fx0LJ", r = {
8
- btn: f,
8
+ import '../../../assets/Button.css';const b = "Button-module__btn___Wj6Dr", h = "Button-module__primary___WGT--", S = "Button-module__secondary___Fx0LJ", r = {
9
+ btn: b,
9
10
  "link-primary": "Button-module__link-primary___6Zgkh",
10
11
  "link-secondary": "Button-module__link-secondary___S0Qdo",
11
- primary: S,
12
- secondary: h,
12
+ primary: h,
13
+ secondary: S,
13
14
  "transparent-primary": "Button-module__transparent-primary___iwWv5",
14
15
  "transparent-secondary": "Button-module__transparent-secondary___GfRXu",
15
16
  "control-btn": "Button-module__control-btn___9Gkoz"
16
- }, a = {
17
+ }, e = {
17
18
  primary: r.primary,
18
19
  secondary: r.secondary,
19
20
  linkPrimary: r["link-primary"],
@@ -23,27 +24,28 @@ import '../../../assets/Button.css';const f = "Button-module__btn___Wj6Dr", S =
23
24
  control: r["control-btn"]
24
25
  }, x = u(
25
26
  ({
26
- children: e,
27
- className: i = "",
27
+ children: i,
28
+ className: m = "",
28
29
  isPending: o,
29
30
  pendingLabel: s = "Loading...",
30
- size: m = "md",
31
+ size: _ = "md",
31
32
  variant: n = "primary",
32
- ..._
33
+ ...a
33
34
  }, d) => {
34
- const y = n === "linkPrimary" || n === "linkSecondary" ? "none" : m, l = a[n] ?? a.primary;
35
+ const l = n === "linkPrimary" || n === "linkSecondary" ? "none" : _;
35
36
  return /* @__PURE__ */ t(
36
37
  k,
37
38
  {
38
- className: `${r.btn} ${l} ${i}`,
39
+ className: a.asChild ? "" : p(r.btn, e[n] ?? e.primary, m),
39
40
  ref: d,
40
41
  isPending: o,
41
- size: y,
42
- ..._,
43
- children: o ? /* @__PURE__ */ c(p, { children: [
42
+ size: l,
43
+ "data-variant": n,
44
+ ...a,
45
+ children: o ? /* @__PURE__ */ y(c, { children: [
44
46
  /* @__PURE__ */ t(B, { "aria-hidden": "true" }),
45
- /* @__PURE__ */ t(b, { children: s })
46
- ] }) : e
47
+ /* @__PURE__ */ t(f, { children: s })
48
+ ] }) : i
47
49
  }
48
50
  );
49
51
  }
@@ -1,6 +1,7 @@
1
1
  import { ButtonHTMLAttributes } from 'react';
2
2
  import { ButtonSize } from '../../../theme/theme';
3
3
  export interface ButtonBaseProps extends ButtonHTMLAttributes<HTMLButtonElement> {
4
+ asChild?: boolean;
4
5
  fullWidth?: boolean;
5
6
  isPending?: boolean;
6
7
  size?: ButtonSize;
@@ -1,45 +1,48 @@
1
- import { jsx as d } from "react/jsx-runtime";
2
- import { forwardRef as B, useMemo as r } from "react";
1
+ import { jsx as l } from "react/jsx-runtime";
2
+ import { Primitive as n } from "@radix-ui/react-primitive";
3
+ import { c as u } from "../../../chunks/lite.1fxw3LjI.js";
4
+ import { forwardRef as B } from "react";
3
5
  import "../../../theme/theme.js";
4
- import '../../../assets/ButtonBase.css';const z = "ButtonBase-module__btn___9S8PJ", s = {
5
- btn: z,
6
+ import '../../../assets/ButtonBase.css';const r = "ButtonBase-module__btn___9S8PJ", s = {
7
+ btn: r,
6
8
  "full-width": "ButtonBase-module__full-width___vLJsn",
7
9
  "size-lg": "ButtonBase-module__size-lg___569jT",
8
10
  "size-md": "ButtonBase-module__size-md___sAsBJ",
9
11
  "size-sm": "ButtonBase-module__size-sm___xHCtU",
10
12
  "size-xs": "ButtonBase-module__size-xs___LiiO7"
11
- }, _ = {
13
+ }, i = {
12
14
  lg: s["size-lg"],
13
15
  md: s["size-md"],
14
16
  sm: s["size-sm"],
15
17
  xs: s["size-xs"],
16
18
  none: ""
17
- }, c = B(
19
+ }, z = B(
18
20
  ({
19
- children: n,
21
+ children: _,
20
22
  className: m = "",
21
23
  fullWidth: t = !1,
22
- isPending: i,
23
- size: o = "md",
24
- ...u
25
- }, a) => {
26
- const l = r(() => {
27
- const e = [s.btn];
28
- return e.push(_[o] ?? _.md), t && e.push(s["full-width"]), e.join(" ");
29
- }, [t, o]);
30
- return /* @__PURE__ */ d(
31
- "button",
32
- {
33
- className: `${l} ${m}`,
34
- ref: a,
35
- "data-pending": i,
36
- ...u,
37
- children: n
38
- }
39
- );
40
- }
24
+ isPending: a,
25
+ size: e = "md",
26
+ ...o
27
+ }, d) => /* @__PURE__ */ l(
28
+ n.button,
29
+ {
30
+ className: o.asChild ? "" : u(
31
+ s.btn,
32
+ i[e] ?? i.md,
33
+ t && s["full-width"],
34
+ m
35
+ ),
36
+ ref: d,
37
+ "data-pending": a,
38
+ "data-size": e,
39
+ "data-full-width": t === !0 ? !0 : void 0,
40
+ ...o,
41
+ children: _
42
+ }
43
+ )
41
44
  );
42
- c.displayName = "ButtonBase";
45
+ z.displayName = "ButtonBase";
43
46
  export {
44
- c as ButtonBase
47
+ z as ButtonBase
45
48
  };
@@ -1,6 +1,8 @@
1
1
  import { DialogContentProps } from '@radix-ui/react-dialog';
2
- import { HTMLAttributes } from 'react';
3
- interface ModalContentProps extends DialogContentProps, HTMLAttributes<HTMLDivElement> {
2
+ import { CSSProperties, HTMLAttributes } from 'react';
3
+ export interface ModalContentProps extends DialogContentProps, HTMLAttributes<HTMLDivElement> {
4
+ overlayClassName?: string;
5
+ overlayStyle?: CSSProperties;
4
6
  }
5
7
  export declare const ModalContent: import('react').ForwardRefExoticComponent<ModalContentProps & import('react').RefAttributes<HTMLDivElement>>;
6
8
  export declare const Modal: import('react').FC<import('@radix-ui/react-dialog').DialogProps>;
@@ -8,4 +10,3 @@ export declare const ModalClose: import('react').ForwardRefExoticComponent<impor
8
10
  export declare const ModalDescription: import('react').ForwardRefExoticComponent<import('@radix-ui/react-dialog').DialogDescriptionProps & import('react').RefAttributes<HTMLParagraphElement>>;
9
11
  export declare const ModalTitle: import('react').ForwardRefExoticComponent<import('@radix-ui/react-dialog').DialogTitleProps & import('react').RefAttributes<HTMLHeadingElement>>;
10
12
  export declare const ModalTrigger: import('react').ForwardRefExoticComponent<import('@radix-ui/react-dialog').DialogTriggerProps & import('react').RefAttributes<HTMLButtonElement>>;
11
- export {};
@@ -1,27 +1,31 @@
1
- import { jsx as o, jsxs as t } from "react/jsx-runtime";
2
- import { Dialog as i, DialogTitle as c, DialogDescription as d, DialogPortal as n, DialogOverlay as m, DialogContent as _, DialogClose as g, DialogTrigger as p } from "@radix-ui/react-dialog";
3
- import { forwardRef as M } from "react";
4
- import { useTheme as D } from "../../ThemeProvider/index.js";
5
- import '../../../assets/Modal.css';const f = "Modal-module__modal___MUsZA", y = "Modal-module__overlay___-RqGQ", v = "Modal-module__spacer___dIfOA", l = {
6
- modal: f,
7
- overlay: y,
8
- spacer: v
9
- }, u = M(
10
- ({ children: a, ...e }, s) => {
11
- const { cssVariables: r } = D();
12
- return /* @__PURE__ */ o(n, { children: /* @__PURE__ */ t(m, { className: l.overlay, style: r, children: [
13
- /* @__PURE__ */ o("div", { className: l.spacer }),
14
- /* @__PURE__ */ o(_, { ...e, ref: s, className: l.modal, children: a })
1
+ import { jsx as o, jsxs as d } from "react/jsx-runtime";
2
+ import { Dialog as m, DialogTitle as n, DialogDescription as _, DialogPortal as p, DialogOverlay as g, DialogContent as M, DialogClose as D, DialogTrigger as f } from "@radix-ui/react-dialog";
3
+ import { c as u } from "../../../chunks/lite.1fxw3LjI.js";
4
+ import { forwardRef as y, useMemo as v } from "react";
5
+ import { useTheme as C } from "../../ThemeProvider/index.js";
6
+ import '../../../assets/Modal.css';const T = "Modal-module__modal___MUsZA", x = "Modal-module__overlay___-RqGQ", N = "Modal-module__spacer___dIfOA", a = {
7
+ modal: T,
8
+ overlay: x,
9
+ spacer: N
10
+ }, h = y(
11
+ ({ children: e, overlayClassName: r = "", overlayStyle: l, ...t }, c) => {
12
+ const { cssVariables: s } = C(), i = v(
13
+ () => ({ ...s, ...l }),
14
+ [s, l]
15
+ );
16
+ return /* @__PURE__ */ o(p, { children: /* @__PURE__ */ d(g, { className: u(a.overlay, r), style: i, children: [
17
+ /* @__PURE__ */ o("div", { className: a.spacer }),
18
+ /* @__PURE__ */ o(M, { ...t, ref: c, className: a.modal, children: e })
15
19
  ] }) });
16
20
  }
17
21
  );
18
- u.displayName = "ModalContent";
19
- const x = i, j = g, A = d, O = c, R = p;
22
+ h.displayName = "ModalContent";
23
+ const q = m, w = D, G = _, I = n, P = f;
20
24
  export {
21
- x as Modal,
22
- j as ModalClose,
23
- u as ModalContent,
24
- A as ModalDescription,
25
- O as ModalTitle,
26
- R as ModalTrigger
25
+ q as Modal,
26
+ w as ModalClose,
27
+ h as ModalContent,
28
+ G as ModalDescription,
29
+ I as ModalTitle,
30
+ P as ModalTrigger
27
31
  };
package/dist/index.d.ts CHANGED
@@ -8,6 +8,8 @@ export * from './components/SignIn';
8
8
  export * from './components/SignOutButton';
9
9
  export * from './components/SignInModal';
10
10
  export * from './components/ThemeProvider';
11
+ export * from './components/ui/Button';
12
+ export * from './components/ui/Modal';
11
13
  export * from './theme';
12
14
  export * from './icons';
13
15
  export * from './utils';