@coinbase/cdp-react 0.0.23 → 0.0.24
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/dist/assets/Button.css +1 -1
- package/dist/assets/ButtonBase.css +1 -0
- package/dist/assets/CoinbaseFooter.css +1 -0
- package/dist/assets/Select.css +1 -0
- package/dist/components/SignIn/SignInFooter.d.ts +1 -1
- package/dist/components/SignIn/SignInFooter.js +4 -15
- package/dist/components/forms/Select/index.d.ts +21 -0
- package/dist/components/forms/Select/index.js +74 -0
- package/dist/components/ui/Button/index.d.ts +4 -5
- package/dist/components/ui/Button/index.js +35 -56
- package/dist/components/ui/ButtonBase/index.d.ts +8 -0
- package/dist/components/ui/ButtonBase/index.js +45 -0
- package/dist/components/ui/CoinbaseFooter/index.d.ts +2 -0
- package/dist/components/ui/CoinbaseFooter/index.js +19 -0
- package/dist/components/ui/LoadingSkeleton/index.d.ts +3 -2
- package/dist/components/ui/LoadingSkeleton/index.js +9 -15
- package/dist/icons/IconCheck.d.ts +2 -0
- package/dist/icons/IconCheck.js +14 -0
- package/dist/icons/IconChevronDown.d.ts +2 -0
- package/dist/icons/IconChevronDown.js +14 -0
- package/dist/icons/index.d.ts +2 -0
- package/dist/icons/index.js +14 -10
- package/dist/index.js +54 -50
- package/dist/theme/theme.d.ts +97 -2
- package/dist/theme/tokens.d.ts +279 -0
- package/dist/theme/tokens.js +57 -6
- package/package.json +6 -5
- package/dist/assets/SignInFooter.css +0 -1
package/dist/assets/Button.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
.Button-module__btn___Wj6Dr{--cdp-web-button-ring-color: transparent;--cdp-web-button-ring-width: 2px;--cdp-web-button-ring-inset-color: transparent;--cdp-web-button-ring-inset-width: 2px;
|
|
1
|
+
.Button-module__btn___Wj6Dr{--cdp-web-button-ring-color: transparent;--cdp-web-button-ring-width: 2px;--cdp-web-button-ring-inset-color: transparent;--cdp-web-button-ring-inset-width: 2px;border-radius:9999em}.Button-module__link-primary___6Zgkh,.Button-module__link-secondary___S0Qdo{padding:0 .25em}.Button-module__primary___WGT--{background-color:var(--cdp-web-colors-cta-primary-bg-default);color:var(--cdp-web-colors-cta-primary-text-default)}.Button-module__primary___WGT--:hover{background-color:var(--cdp-web-colors-cta-primary-bg-hover);color:var(--cdp-web-colors-cta-primary-text-hover)}.Button-module__primary___WGT--:focus{outline:none}.Button-module__primary___WGT--:focus-visible{--cdp-web-button-ring-color: var(--cdp-web-colors-cta-primary-border-focus);--cdp-web-button-ring-inset-color: var(--cdp-web-colors-page-bg-default);outline:none}.Button-module__secondary___Fx0LJ{background-color:var(--cdp-web-colors-cta-secondary-bg-default);color:var(--cdp-web-colors-cta-secondary-text-default)}.Button-module__secondary___Fx0LJ:hover{background-color:var(--cdp-web-colors-cta-secondary-bg-hover);color:var(--cdp-web-colors-cta-secondary-text-hover)}.Button-module__secondary___Fx0LJ:focus{outline:none}.Button-module__secondary___Fx0LJ:focus-visible{--cdp-web-button-ring-color: var(--cdp-web-colors-cta-secondary-border-focus);--cdp-web-button-ring-inset-color: var(--cdp-web-colors-page-bg-default);outline:none}.Button-module__link-primary___6Zgkh,.Button-module__transparent-primary___iwWv5{background-color:transparent;color:var(--cdp-web-colors-link-primary-text-default)}.Button-module__link-primary___6Zgkh:hover,.Button-module__transparent-primary___iwWv5:hover{color:var(--cdp-web-colors-link-primary-text-hover)}.Button-module__link-primary___6Zgkh:focus,.Button-module__transparent-primary___iwWv5:focus{outline:none}.Button-module__link-primary___6Zgkh:focus-visible,.Button-module__transparent-primary___iwWv5:focus-visible{--cdp-web-button-ring-color: var(--cdp-web-colors-link-primary-text-default);outline:none}.Button-module__link-secondary___S0Qdo,.Button-module__transparent-secondary___GfRXu{background-color:transparent;color:var(--cdp-web-colors-link-secondary-text-default)}.Button-module__link-secondary___S0Qdo:hover,.Button-module__transparent-secondary___GfRXu:hover{color:var(--cdp-web-colors-link-secondary-text-hover)}.Button-module__link-secondary___S0Qdo:focus,.Button-module__transparent-secondary___GfRXu:focus{outline:none}.Button-module__link-secondary___S0Qdo:focus-visible,.Button-module__transparent-secondary___GfRXu:focus-visible{--cdp-web-button-ring-color: var(--cdp-web-colors-link-secondary-text-default);outline:none}.Button-module__control-btn___9Gkoz{--cdp-web-button-ring-inset-color: var(--cdp-web-colors-input-border-default);--cdp-web-button-ring-inset-width: 1px;background-color:var(--cdp-web-colors-input-bg-default);border-radius:.5em;color:var(--cdp-web-colors-input-text-default);font-weight:400}.Button-module__control-btn___9Gkoz:focus{outline:none}.Button-module__control-btn___9Gkoz:focus-visible{--cdp-web-button-ring-inset-color: var(--cdp-web-colors-input-border-focus);--cdp-web-button-ring-inset-width: 2px;outline:none}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
.ButtonBase-module__btn___9S8PJ{--cdp-web-button-ring-color: transparent;--cdp-web-button-ring-width: 2px;--cdp-web-button-ring-inset-color: transparent;--cdp-web-button-ring-inset-width: 2px;box-sizing:border-box;box-shadow:inset 0 0 0 var(--cdp-web-button-ring-inset-width) var(--cdp-web-button-ring-inset-color),0 0 0 var(--cdp-web-button-ring-width) var(--cdp-web-button-ring-color);display:inline-flex;align-items:center;justify-content:center;gap:.5em;padding:1em;border:0;background-color:transparent;color:var(--cdp-web-colors-page-text-default);font-size:var(--cdp-web-font-size-base);font-family:var(--cdp-web-font-family-sans);font-weight:500;line-height:1.5;text-decoration:none;cursor:pointer;transition:all .15s ease-in-out;transition-property:color,background-color,border-color,box-shadow,transform;-webkit-user-select:none;user-select:none}.ButtonBase-module__full-width___vLJsn{display:flex;width:100%}.ButtonBase-module__size-lg___569jT{padding:1em}.ButtonBase-module__size-md___sAsBJ{padding:.75em}.ButtonBase-module__size-sm___xHCtU{padding:.5em .75em}.ButtonBase-module__size-xs___LiiO7{padding:.25em .75em}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
.CoinbaseFooter-module__footer___d0ToM{color:var(--cdp-web-colors-page-text-muted);display:flex;align-items:center;justify-content:center;gap:.5em;line-height:1;padding:1em 2em 0}.CoinbaseFooter-module__text___dmxyS{display:flex;align-items:center;font-size:.75em;gap:.25em;margin:0}.CoinbaseFooter-module__icon___3-qMm{height:auto;width:.75em}.CoinbaseFooter-module__coinbase-icon___Ws6HN{height:1em;width:auto}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
.Select-module__select-trigger___yqioM{--cdp-web-button-ring-inset-color: var(--cdp-web-colors-select-trigger-border-default);--cdp-web-button-ring-inset-width: 1px;background-color:var(--cdp-web-colors-select-trigger-bg-default);border-radius:.5em;color:var(--cdp-web-colors-select-trigger-text-default);font-weight:500;text-align:left;justify-content:space-between}.Select-module__select-trigger___yqioM:focus{outline:none}.Select-module__select-trigger___yqioM:focus-visible{--cdp-web-button-ring-inset-color: var(--cdp-web-colors-select-trigger-border-focus);--cdp-web-button-ring-inset-width: 2px;outline:none}.Select-module__select-icon___hE7Wy{transition:transform .2s ease-in-out}.Select-module__select-trigger___yqioM[data-state=open] .Select-module__select-icon___hE7Wy{transform:rotate(0)}.Select-module__select-trigger___yqioM[data-state=closed] .Select-module__select-icon___hE7Wy{transform:rotate(-90deg)}.Select-module__select-content___6R8J9{--shadow-sm: 0 1px 3px 0 rgb(0 0 0 / 10%), 0 1px 2px -1px rgb(0 0 0 / 10%);background-color:var(--cdp-web-colors-select-list-bg-default);border:1px solid var(--cdp-web-colors-select-list-border-default);border-radius:.5em;box-sizing:border-box;box-shadow:var(--shadow-sm);font-size:var(--cdp-web-font-size-base);max-height:var(--radix-select-content-available-height);padding:.5em;text-align:left;width:var(--radix-select-trigger-width)}.Select-module__select-content___6R8J9[data-state=open]{animation:Select-module__slide-down-and-fade___66mDK .2s cubic-bezier(.4,0,.2,1)}.Select-module__select-content___6R8J9[data-side=top][data-state=open]{animation:Select-module__slide-up-and-fade___0H9hX .2s cubic-bezier(.4,0,.2,1)}.Select-module__select-item___12l2C{background-color:var(--cdp-web-colors-select-list-item-bg-default);border-radius:.5em;color:var(--cdp-web-colors-select-list-item-text-default);cursor:pointer;font-size:.875em;display:flex;align-items:center;justify-content:space-between;gap:.5em;padding:.5em;transition:background-color .2s cubic-bezier(.4,0,.2,1)}.Select-module__select-item___12l2C[data-highlighted]{background-color:var(--cdp-web-colors-select-list-item-bg-highlight);color:var(--cdp-web-colors-select-list-item-text-onHighlight);outline:none}.Select-module__rotate-180___KuvGV{transform:rotate(180deg)}@keyframes Select-module__slide-down-and-fade___66mDK{0%{opacity:0;transform:translateY(-8px)}to{opacity:1;transform:translateY(0)}}@keyframes Select-module__slide-up-and-fade___0H9hX{0%{opacity:0;transform:translateY(8px)}to{opacity:1;transform:translateY(0)}}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { HTMLAttributes } from 'react';
|
|
2
|
-
export declare const SignInFooter: (
|
|
2
|
+
export declare const SignInFooter: (props: HTMLAttributes<HTMLDivElement>) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,18 +1,7 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { jsx as r } from "react/jsx-runtime";
|
|
2
2
|
import "react";
|
|
3
|
-
import {
|
|
4
|
-
|
|
5
|
-
import '../../assets/SignInFooter.css';const t = "SignInFooter-module__footer___DLNrl", a = "SignInFooter-module__icon___hFhfx", n = {
|
|
6
|
-
footer: t,
|
|
7
|
-
icon: a,
|
|
8
|
-
"coinbase-icon": "SignInFooter-module__coinbase-icon___NeFOp"
|
|
9
|
-
}, f = ({ className: r = "", ...i }) => /* @__PURE__ */ e("div", { className: `${n.footer} ${r}`, ...i, children: [
|
|
10
|
-
/* @__PURE__ */ o(s, { className: n.icon }),
|
|
11
|
-
/* @__PURE__ */ e("p", { children: [
|
|
12
|
-
/* @__PURE__ */ o("span", { children: "Secured by " }),
|
|
13
|
-
/* @__PURE__ */ o(c, { className: n["coinbase-icon"], "aria-label": "Coinbase" })
|
|
14
|
-
] })
|
|
15
|
-
] });
|
|
3
|
+
import { CoinbaseFooter as t } from "../ui/CoinbaseFooter/index.js";
|
|
4
|
+
const n = (o) => /* @__PURE__ */ r(t, { ...o });
|
|
16
5
|
export {
|
|
17
|
-
|
|
6
|
+
n as SignInFooter
|
|
18
7
|
};
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { SelectProps as SelectPropsPrimitive, SelectContentProps as SelectContentPropsPrimitive, SelectItemProps as SelectItemPropsPrimitive, SelectTriggerProps as SelectTriggerPropsPrimitive, SelectValueProps } from '@radix-ui/react-select';
|
|
2
|
+
import { ReactNode } from 'react';
|
|
3
|
+
import { InputSize } from '../../../theme/theme';
|
|
4
|
+
export interface SelectProps extends SelectPropsPrimitive {
|
|
5
|
+
className?: string;
|
|
6
|
+
}
|
|
7
|
+
export interface SelectTriggerProps extends SelectTriggerPropsPrimitive {
|
|
8
|
+
className?: string;
|
|
9
|
+
placeholder?: SelectValueProps["placeholder"];
|
|
10
|
+
size?: InputSize;
|
|
11
|
+
}
|
|
12
|
+
export interface SelectContentProps extends SelectContentPropsPrimitive {
|
|
13
|
+
className?: string;
|
|
14
|
+
}
|
|
15
|
+
export interface SelectItemProps extends SelectItemPropsPrimitive {
|
|
16
|
+
indicator?: boolean | ReactNode;
|
|
17
|
+
}
|
|
18
|
+
export declare const Select: ({ children, ...props }: SelectProps) => import("react/jsx-runtime").JSX.Element;
|
|
19
|
+
export declare const SelectTrigger: import('react').ForwardRefExoticComponent<SelectTriggerProps & import('react').RefAttributes<HTMLButtonElement>>;
|
|
20
|
+
export declare const SelectContent: import('react').ForwardRefExoticComponent<SelectContentProps & import('react').RefAttributes<HTMLDivElement>>;
|
|
21
|
+
export declare const SelectItem: import('react').ForwardRefExoticComponent<SelectItemProps & import('react').RefAttributes<HTMLDivElement>>;
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
import { jsx as e, jsxs as i } from "react/jsx-runtime";
|
|
2
|
+
import { SelectTrigger as u, SelectValue as p, SelectIcon as h, SelectPortal as f, SelectContent as g, SelectScrollUpButton as C, SelectViewport as I, SelectScrollDownButton as N, SelectItem as $, SelectItemText as y, SelectItemIndicator as T, Select as w } from "@radix-ui/react-select";
|
|
3
|
+
import { forwardRef as a } from "react";
|
|
4
|
+
import { useTheme as x } from "../../ThemeProvider/index.js";
|
|
5
|
+
import { ButtonBase as B } from "../../ui/ButtonBase/index.js";
|
|
6
|
+
import { IconCheck as V } from "../../../icons/IconCheck.js";
|
|
7
|
+
import { IconChevronDown as m } from "../../../icons/IconChevronDown.js";
|
|
8
|
+
import "../../../theme/theme.js";
|
|
9
|
+
import '../../../assets/Select.css';const o = {
|
|
10
|
+
"select-trigger": "Select-module__select-trigger___yqioM",
|
|
11
|
+
"select-icon": "Select-module__select-icon___hE7Wy",
|
|
12
|
+
"select-content": "Select-module__select-content___6R8J9",
|
|
13
|
+
"select-item": "Select-module__select-item___12l2C",
|
|
14
|
+
"rotate-180": "Select-module__rotate-180___KuvGV"
|
|
15
|
+
}, K = ({ children: l, ...t }) => /* @__PURE__ */ e(w, { ...t, children: l }), b = a(
|
|
16
|
+
({ children: l, className: t = "", placeholder: c = "Select an option", size: r = "md", ...s }, n) => /* @__PURE__ */ e(u, { ...s, asChild: !0, children: l || /* @__PURE__ */ i(
|
|
17
|
+
B,
|
|
18
|
+
{
|
|
19
|
+
className: `${o["select-trigger"]} ${t}`,
|
|
20
|
+
fullWidth: !0,
|
|
21
|
+
ref: n,
|
|
22
|
+
size: r,
|
|
23
|
+
children: [
|
|
24
|
+
/* @__PURE__ */ e(p, { placeholder: c }),
|
|
25
|
+
/* @__PURE__ */ e(h, { asChild: !0, children: /* @__PURE__ */ e(m, { className: o["select-icon"] }) })
|
|
26
|
+
]
|
|
27
|
+
}
|
|
28
|
+
) })
|
|
29
|
+
);
|
|
30
|
+
b.displayName = "SelectTrigger";
|
|
31
|
+
const j = a(
|
|
32
|
+
({
|
|
33
|
+
children: l,
|
|
34
|
+
className: t = "",
|
|
35
|
+
style: c,
|
|
36
|
+
position: r = "popper",
|
|
37
|
+
side: s = "bottom",
|
|
38
|
+
sideOffset: n = 1,
|
|
39
|
+
..._
|
|
40
|
+
}, d) => {
|
|
41
|
+
const { cssVariables: S } = x();
|
|
42
|
+
return /* @__PURE__ */ e(f, { children: /* @__PURE__ */ i(
|
|
43
|
+
g,
|
|
44
|
+
{
|
|
45
|
+
position: r,
|
|
46
|
+
side: s,
|
|
47
|
+
sideOffset: n,
|
|
48
|
+
className: `${o["select-content"]} ${t}`,
|
|
49
|
+
ref: d,
|
|
50
|
+
style: c ? { ...S, ...c } : S,
|
|
51
|
+
..._,
|
|
52
|
+
children: [
|
|
53
|
+
/* @__PURE__ */ e(C, { children: /* @__PURE__ */ e(m, { className: o["rotate-180"] }) }),
|
|
54
|
+
/* @__PURE__ */ e(I, { children: l }),
|
|
55
|
+
/* @__PURE__ */ e(N, { children: /* @__PURE__ */ e(m, {}) })
|
|
56
|
+
]
|
|
57
|
+
}
|
|
58
|
+
) });
|
|
59
|
+
}
|
|
60
|
+
);
|
|
61
|
+
j.displayName = "SelectContent";
|
|
62
|
+
const v = a(
|
|
63
|
+
({ children: l, indicator: t, ...c }, r) => /* @__PURE__ */ i($, { ...c, ref: r, className: o["select-item"], children: [
|
|
64
|
+
/* @__PURE__ */ e(y, { children: l }),
|
|
65
|
+
t && /* @__PURE__ */ e(T, { asChild: !0, children: typeof t == "boolean" ? /* @__PURE__ */ e(V, {}) : t })
|
|
66
|
+
] })
|
|
67
|
+
);
|
|
68
|
+
v.displayName = "SelectItem";
|
|
69
|
+
export {
|
|
70
|
+
K as Select,
|
|
71
|
+
j as SelectContent,
|
|
72
|
+
v as SelectItem,
|
|
73
|
+
b as SelectTrigger
|
|
74
|
+
};
|
|
@@ -1,9 +1,8 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
import { ButtonBaseProps } from '../ButtonBase';
|
|
3
|
+
import { ButtonVariant } from '../../../theme/theme';
|
|
4
|
+
export interface ButtonProps extends ButtonBaseProps {
|
|
5
5
|
pendingLabel?: ReactNode;
|
|
6
|
-
size?: ButtonSize;
|
|
7
6
|
variant?: ButtonVariant;
|
|
8
7
|
}
|
|
9
8
|
export declare const Button: import('react').ForwardRefExoticComponent<ButtonProps & import('react').RefAttributes<HTMLButtonElement>>;
|
|
@@ -1,75 +1,54 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import { forwardRef as
|
|
1
|
+
import { jsx as t, jsxs as c, Fragment as p } from "react/jsx-runtime";
|
|
2
|
+
import { forwardRef as u } from "react";
|
|
3
|
+
import { ButtonBase as k } from "../ButtonBase/index.js";
|
|
3
4
|
import { LoadingSpinner as B } from "../LoadingSpinner/index.js";
|
|
4
|
-
import { VisuallyHidden as
|
|
5
|
+
import { VisuallyHidden as b } from "../VisuallyHidden/index.js";
|
|
5
6
|
import "../../../theme/theme.js";
|
|
6
|
-
import '../../../assets/Button.css';const f = "Button-module__btn___Wj6Dr",
|
|
7
|
+
import '../../../assets/Button.css';const f = "Button-module__btn___Wj6Dr", S = "Button-module__primary___WGT--", h = "Button-module__secondary___Fx0LJ", r = {
|
|
7
8
|
btn: f,
|
|
8
|
-
"size-lg": "Button-module__size-lg___WlcVE",
|
|
9
|
-
"size-md": "Button-module__size-md___-SMmD",
|
|
10
|
-
"size-sm": "Button-module__size-sm___Vnrq6",
|
|
11
9
|
"link-primary": "Button-module__link-primary___6Zgkh",
|
|
12
10
|
"link-secondary": "Button-module__link-secondary___S0Qdo",
|
|
13
|
-
primary:
|
|
14
|
-
secondary:
|
|
11
|
+
primary: S,
|
|
12
|
+
secondary: h,
|
|
15
13
|
"transparent-primary": "Button-module__transparent-primary___iwWv5",
|
|
16
|
-
"transparent-secondary": "Button-module__transparent-secondary___GfRXu"
|
|
17
|
-
|
|
14
|
+
"transparent-secondary": "Button-module__transparent-secondary___GfRXu",
|
|
15
|
+
"control-btn": "Button-module__control-btn___9Gkoz"
|
|
16
|
+
}, a = {
|
|
17
|
+
primary: r.primary,
|
|
18
|
+
secondary: r.secondary,
|
|
19
|
+
linkPrimary: r["link-primary"],
|
|
20
|
+
linkSecondary: r["link-secondary"],
|
|
21
|
+
transparentPrimary: r["transparent-primary"],
|
|
22
|
+
transparentSecondary: r["transparent-secondary"],
|
|
23
|
+
control: r["control-btn"]
|
|
24
|
+
}, g = u(
|
|
18
25
|
({
|
|
19
|
-
children:
|
|
20
|
-
className:
|
|
21
|
-
isPending:
|
|
22
|
-
pendingLabel:
|
|
23
|
-
size:
|
|
26
|
+
children: e,
|
|
27
|
+
className: i = "",
|
|
28
|
+
isPending: o,
|
|
29
|
+
pendingLabel: s = "Loading...",
|
|
30
|
+
size: m = "lg",
|
|
24
31
|
variant: n = "primary",
|
|
25
32
|
..._
|
|
26
33
|
}, d) => {
|
|
27
|
-
const
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
switch (t) {
|
|
31
|
-
case "lg":
|
|
32
|
-
return r["size-lg"];
|
|
33
|
-
case "md":
|
|
34
|
-
return r["size-md"];
|
|
35
|
-
case "sm":
|
|
36
|
-
return r["size-sm"];
|
|
37
|
-
default:
|
|
38
|
-
return r["size-lg"];
|
|
39
|
-
}
|
|
40
|
-
}, [t, n]), l = a(() => {
|
|
41
|
-
switch (n) {
|
|
42
|
-
case "primary":
|
|
43
|
-
return r.primary;
|
|
44
|
-
case "secondary":
|
|
45
|
-
return r.secondary;
|
|
46
|
-
case "linkPrimary":
|
|
47
|
-
return r["link-primary"];
|
|
48
|
-
case "linkSecondary":
|
|
49
|
-
return r["link-secondary"];
|
|
50
|
-
case "transparentPrimary":
|
|
51
|
-
return r["transparent-primary"];
|
|
52
|
-
case "transparentSecondary":
|
|
53
|
-
return r["transparent-secondary"];
|
|
54
|
-
default:
|
|
55
|
-
return r.primary;
|
|
56
|
-
}
|
|
57
|
-
}, [n]);
|
|
58
|
-
return /* @__PURE__ */ e(
|
|
59
|
-
"button",
|
|
34
|
+
const l = n === "linkPrimary" || n === "linkSecondary" ? "none" : m, y = a[n] ?? a.primary;
|
|
35
|
+
return /* @__PURE__ */ t(
|
|
36
|
+
k,
|
|
60
37
|
{
|
|
61
|
-
className: `${r.btn} ${
|
|
38
|
+
className: `${r.btn} ${y} ${i}`,
|
|
62
39
|
ref: d,
|
|
40
|
+
isPending: o,
|
|
41
|
+
size: l,
|
|
63
42
|
..._,
|
|
64
|
-
children:
|
|
65
|
-
/* @__PURE__ */
|
|
66
|
-
/* @__PURE__ */
|
|
67
|
-
] }) :
|
|
43
|
+
children: o ? /* @__PURE__ */ c(p, { children: [
|
|
44
|
+
/* @__PURE__ */ t(B, { "aria-hidden": "true" }),
|
|
45
|
+
/* @__PURE__ */ t(b, { children: s })
|
|
46
|
+
] }) : e
|
|
68
47
|
}
|
|
69
48
|
);
|
|
70
49
|
}
|
|
71
50
|
);
|
|
72
|
-
|
|
51
|
+
g.displayName = "Button";
|
|
73
52
|
export {
|
|
74
|
-
|
|
53
|
+
g as Button
|
|
75
54
|
};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { ButtonHTMLAttributes } from 'react';
|
|
2
|
+
import { ButtonSize } from '../../../theme/theme';
|
|
3
|
+
export interface ButtonBaseProps extends ButtonHTMLAttributes<HTMLButtonElement> {
|
|
4
|
+
fullWidth?: boolean;
|
|
5
|
+
isPending?: boolean;
|
|
6
|
+
size?: ButtonSize;
|
|
7
|
+
}
|
|
8
|
+
export declare const ButtonBase: import('react').ForwardRefExoticComponent<ButtonBaseProps & import('react').RefAttributes<HTMLButtonElement>>;
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import { jsx as B } from "react/jsx-runtime";
|
|
2
|
+
import { forwardRef as d, useMemo as r } from "react";
|
|
3
|
+
import "../../../theme/theme.js";
|
|
4
|
+
import '../../../assets/ButtonBase.css';const z = "ButtonBase-module__btn___9S8PJ", s = {
|
|
5
|
+
btn: z,
|
|
6
|
+
"full-width": "ButtonBase-module__full-width___vLJsn",
|
|
7
|
+
"size-lg": "ButtonBase-module__size-lg___569jT",
|
|
8
|
+
"size-md": "ButtonBase-module__size-md___sAsBJ",
|
|
9
|
+
"size-sm": "ButtonBase-module__size-sm___xHCtU",
|
|
10
|
+
"size-xs": "ButtonBase-module__size-xs___LiiO7"
|
|
11
|
+
}, c = d(
|
|
12
|
+
({
|
|
13
|
+
children: n,
|
|
14
|
+
className: m = "",
|
|
15
|
+
fullWidth: t = !1,
|
|
16
|
+
isPending: i,
|
|
17
|
+
size: o = "lg",
|
|
18
|
+
...l
|
|
19
|
+
}, u) => {
|
|
20
|
+
const a = r(() => {
|
|
21
|
+
const e = [s.btn], _ = {
|
|
22
|
+
lg: s["size-lg"],
|
|
23
|
+
md: s["size-md"],
|
|
24
|
+
sm: s["size-sm"],
|
|
25
|
+
xs: s["size-xs"],
|
|
26
|
+
none: ""
|
|
27
|
+
};
|
|
28
|
+
return e.push(_[o] ?? _.lg), t && e.push(s["full-width"]), e.join(" ");
|
|
29
|
+
}, [t, o]);
|
|
30
|
+
return /* @__PURE__ */ B(
|
|
31
|
+
"button",
|
|
32
|
+
{
|
|
33
|
+
className: `${a} ${m}`,
|
|
34
|
+
ref: u,
|
|
35
|
+
"data-pending": i,
|
|
36
|
+
...l,
|
|
37
|
+
children: n
|
|
38
|
+
}
|
|
39
|
+
);
|
|
40
|
+
}
|
|
41
|
+
);
|
|
42
|
+
c.displayName = "ButtonBase";
|
|
43
|
+
export {
|
|
44
|
+
c as ButtonBase
|
|
45
|
+
};
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { jsxs as s, jsx as e } from "react/jsx-runtime";
|
|
2
|
+
import "react";
|
|
3
|
+
import { IconCoinbaseWordmark as c } from "../../../icons/IconCoinbaseWordmark.js";
|
|
4
|
+
import { IconLock as i } from "../../../icons/IconLock.js";
|
|
5
|
+
import '../../../assets/CoinbaseFooter.css';const r = "CoinbaseFooter-module__footer___d0ToM", a = "CoinbaseFooter-module__text___dmxyS", _ = "CoinbaseFooter-module__icon___3-qMm", o = {
|
|
6
|
+
footer: r,
|
|
7
|
+
text: a,
|
|
8
|
+
icon: _,
|
|
9
|
+
"coinbase-icon": "CoinbaseFooter-module__coinbase-icon___Ws6HN"
|
|
10
|
+
}, x = ({ className: n = "", ...t }) => /* @__PURE__ */ s("div", { className: `${o.footer} ${n}`, ...t, children: [
|
|
11
|
+
/* @__PURE__ */ e(i, { className: o.icon }),
|
|
12
|
+
/* @__PURE__ */ s("p", { className: o.text, children: [
|
|
13
|
+
/* @__PURE__ */ e("span", { children: "Secured by " }),
|
|
14
|
+
/* @__PURE__ */ e(c, { className: o["coinbase-icon"], "aria-label": "Coinbase" })
|
|
15
|
+
] })
|
|
16
|
+
] });
|
|
17
|
+
export {
|
|
18
|
+
x as CoinbaseFooter
|
|
19
|
+
};
|
|
@@ -1,8 +1,9 @@
|
|
|
1
|
-
import { CSSProperties, ElementType } from 'react';
|
|
1
|
+
import { CSSProperties, ElementType, ReactNode } from 'react';
|
|
2
2
|
interface LoadingSkeletonProps {
|
|
3
3
|
as?: ElementType;
|
|
4
4
|
className?: string;
|
|
5
5
|
style?: CSSProperties;
|
|
6
|
+
children?: ReactNode;
|
|
6
7
|
}
|
|
7
|
-
export declare const LoadingSkeleton: ({ as: Component, className, style, }: LoadingSkeletonProps) => import("react/jsx-runtime").JSX.Element;
|
|
8
|
+
export declare const LoadingSkeleton: ({ as: Component, children, className, style, }: LoadingSkeletonProps) => import("react/jsx-runtime").JSX.Element;
|
|
8
9
|
export {};
|
|
@@ -1,19 +1,13 @@
|
|
|
1
|
-
import { jsx as
|
|
1
|
+
import { jsx as e } from "react/jsx-runtime";
|
|
2
2
|
import "react";
|
|
3
|
-
import '../../../assets/LoadingSkeleton.css';const
|
|
4
|
-
loading:
|
|
5
|
-
},
|
|
3
|
+
import '../../../assets/LoadingSkeleton.css';const i = "LoadingSkeleton-module__loading___kqndV", t = {
|
|
4
|
+
loading: i
|
|
5
|
+
}, r = ({
|
|
6
6
|
as: o = "div",
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
{
|
|
12
|
-
"aria-hidden": "true",
|
|
13
|
-
className: `${i.loading} ${n}`,
|
|
14
|
-
style: a
|
|
15
|
-
}
|
|
16
|
-
);
|
|
7
|
+
children: n,
|
|
8
|
+
className: a = "",
|
|
9
|
+
style: d
|
|
10
|
+
}) => /* @__PURE__ */ e(o, { "aria-hidden": "true", className: `${t.loading} ${a}`, style: d, children: n });
|
|
17
11
|
export {
|
|
18
|
-
|
|
12
|
+
r as LoadingSkeleton
|
|
19
13
|
};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { jsx as o } from "react/jsx-runtime";
|
|
2
|
+
import "react";
|
|
3
|
+
import { SvgIcon as l } from "./SvgIcon.js";
|
|
4
|
+
const n = (e) => /* @__PURE__ */ o(l, { viewBox: "0 0 16 16", width: "16", height: "16", fill: "currentColor", ...e, children: /* @__PURE__ */ o(
|
|
5
|
+
"path",
|
|
6
|
+
{
|
|
7
|
+
fillRule: "evenodd",
|
|
8
|
+
d: "M12.416 3.376a.75.75 0 0 1 .208 1.04l-5 7.5a.75.75 0 0 1-1.154.114l-3-3a.75.75 0 0 1 1.06-1.06l2.353 2.353 4.493-6.74a.75.75 0 0 1 1.04-.207Z",
|
|
9
|
+
clipRule: "evenodd"
|
|
10
|
+
}
|
|
11
|
+
) });
|
|
12
|
+
export {
|
|
13
|
+
n as IconCheck
|
|
14
|
+
};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { jsx as o } from "react/jsx-runtime";
|
|
2
|
+
import "react";
|
|
3
|
+
import { SvgIcon as r } from "./SvgIcon.js";
|
|
4
|
+
const t = (e) => /* @__PURE__ */ o(r, { viewBox: "0 0 16 16", fill: "currentColor", width: "16", height: "16", ...e, children: /* @__PURE__ */ o(
|
|
5
|
+
"path",
|
|
6
|
+
{
|
|
7
|
+
fillRule: "evenodd",
|
|
8
|
+
d: "M4.22 6.22a.75.75 0 0 1 1.06 0L8 8.94l2.72-2.72a.75.75 0 1 1 1.06 1.06l-3.25 3.25a.75.75 0 0 1-1.06 0L4.22 7.28a.75.75 0 0 1 0-1.06Z",
|
|
9
|
+
clipRule: "evenodd"
|
|
10
|
+
}
|
|
11
|
+
) });
|
|
12
|
+
export {
|
|
13
|
+
t as IconChevronDown
|
|
14
|
+
};
|
package/dist/icons/index.d.ts
CHANGED
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
export * from './IconArrowLeft';
|
|
2
2
|
export * from './IconArrowsUpDown';
|
|
3
|
+
export * from './IconCheck';
|
|
3
4
|
export * from './IconCheckCircle';
|
|
5
|
+
export * from './IconChevronDown';
|
|
4
6
|
export * from './IconEnvelope';
|
|
5
7
|
export * from './IconExclamationCircle';
|
|
6
8
|
export * from './IconLock';
|
package/dist/icons/index.js
CHANGED
|
@@ -1,18 +1,22 @@
|
|
|
1
1
|
import { IconArrowLeft as e } from "./IconArrowLeft.js";
|
|
2
2
|
import { IconArrowsUpDown as n } from "./IconArrowsUpDown.js";
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
3
|
+
import { IconCheck as t } from "./IconCheck.js";
|
|
4
|
+
import { IconCheckCircle as m } from "./IconCheckCircle.js";
|
|
5
|
+
import { IconChevronDown as I } from "./IconChevronDown.js";
|
|
6
|
+
import { IconEnvelope as h } from "./IconEnvelope.js";
|
|
7
|
+
import { IconExclamationCircle as l } from "./IconExclamationCircle.js";
|
|
6
8
|
import { IconLock as a } from "./IconLock.js";
|
|
7
|
-
import { IconPhone as
|
|
8
|
-
import { IconXMark as
|
|
9
|
+
import { IconPhone as v } from "./IconPhone.js";
|
|
10
|
+
import { IconXMark as D } from "./IconXMark.js";
|
|
9
11
|
export {
|
|
10
12
|
e as IconArrowLeft,
|
|
11
13
|
n as IconArrowsUpDown,
|
|
12
|
-
t as
|
|
13
|
-
m as
|
|
14
|
-
I as
|
|
14
|
+
t as IconCheck,
|
|
15
|
+
m as IconCheckCircle,
|
|
16
|
+
I as IconChevronDown,
|
|
17
|
+
h as IconEnvelope,
|
|
18
|
+
l as IconExclamationCircle,
|
|
15
19
|
a as IconLock,
|
|
16
|
-
|
|
17
|
-
|
|
20
|
+
v as IconPhone,
|
|
21
|
+
D as IconXMark
|
|
18
22
|
};
|
package/dist/index.js
CHANGED
|
@@ -1,77 +1,81 @@
|
|
|
1
1
|
import { AUTH_METHODS as e, CDPReactProvider as t, useAppConfig as n } from "./components/CDPReactProvider/index.js";
|
|
2
2
|
import { AuthButton as p } from "./components/AuthButton/index.js";
|
|
3
3
|
import { SendTransactionButton as x } from "./components/SendTransactionButton/index.js";
|
|
4
|
-
import { SignIn as
|
|
5
|
-
import { useSignInReducer as
|
|
4
|
+
import { SignIn as c } from "./components/SignIn/index.js";
|
|
5
|
+
import { useSignInReducer as I } from "./components/SignIn/useSignInReducer.js";
|
|
6
6
|
import { SignOutButton as l } from "./components/SignOutButton/index.js";
|
|
7
7
|
import { SignInModal as u } from "./components/SignInModal/index.js";
|
|
8
8
|
import { ThemeProvider as h, useTheme as C } from "./components/ThemeProvider/index.js";
|
|
9
|
-
import { cssVariables as
|
|
9
|
+
import { cssVariables as T } from "./theme/cssVariables.js";
|
|
10
10
|
import { theme as A } from "./theme/theme.js";
|
|
11
|
-
import { colors as E, colorsBase as
|
|
11
|
+
import { colors as E, colorsBase as v, colorsComponents as w, colorsSemantic as D, font as M, tokens as P } from "./theme/tokens.js";
|
|
12
12
|
import { flattenTokensObject as F, themeToCssVariables as O } from "./theme/utils.js";
|
|
13
13
|
import { IconArrowLeft as V } from "./icons/IconArrowLeft.js";
|
|
14
14
|
import { IconArrowsUpDown as L } from "./icons/IconArrowsUpDown.js";
|
|
15
|
-
import {
|
|
16
|
-
import {
|
|
17
|
-
import {
|
|
18
|
-
import {
|
|
19
|
-
import {
|
|
20
|
-
import {
|
|
21
|
-
import {
|
|
22
|
-
import {
|
|
23
|
-
import {
|
|
24
|
-
import {
|
|
25
|
-
import {
|
|
26
|
-
import {
|
|
27
|
-
import {
|
|
28
|
-
import {
|
|
29
|
-
import {
|
|
30
|
-
import {
|
|
31
|
-
import {
|
|
32
|
-
import {
|
|
33
|
-
import {
|
|
15
|
+
import { IconCheck as j } from "./icons/IconCheck.js";
|
|
16
|
+
import { IconCheckCircle as X } from "./icons/IconCheckCircle.js";
|
|
17
|
+
import { IconChevronDown as q } from "./icons/IconChevronDown.js";
|
|
18
|
+
import { IconEnvelope as z } from "./icons/IconEnvelope.js";
|
|
19
|
+
import { IconExclamationCircle as J } from "./icons/IconExclamationCircle.js";
|
|
20
|
+
import { IconLock as Q } from "./icons/IconLock.js";
|
|
21
|
+
import { IconPhone as Y } from "./icons/IconPhone.js";
|
|
22
|
+
import { IconXMark as $ } from "./icons/IconXMark.js";
|
|
23
|
+
import { clamp as ro } from "./utils/clamp.js";
|
|
24
|
+
import { getMessageFromUnknownError as to } from "./utils/getMessageFromUnknownError.js";
|
|
25
|
+
import { isApiError as mo } from "./utils/isApiError.js";
|
|
26
|
+
import { isEmailInvalid as fo } from "./utils/isEmailInvalid.js";
|
|
27
|
+
import { parseValuesFromPhoneNumber as io } from "./utils/parseValuesFromPhoneNumber.js";
|
|
28
|
+
import { SignInAuthMethodButtons as so } from "./components/SignIn/SignInAuthMethodButtons.js";
|
|
29
|
+
import { SignInBackButton as ao } from "./components/SignIn/SignInBackButton.js";
|
|
30
|
+
import { SignInDescription as go } from "./components/SignIn/SignInDescription.js";
|
|
31
|
+
import { SignInFooter as So } from "./components/SignIn/SignInFooter.js";
|
|
32
|
+
import { SignInForm as Co } from "./components/SignIn/SignInForm.js";
|
|
33
|
+
import { SignInImage as To } from "./components/SignIn/SignInImage.js";
|
|
34
|
+
import { SignInTitle as Bo } from "./components/SignIn/SignInTitle.js";
|
|
35
|
+
import { useSignInContext as vo } from "./components/SignIn/SignInProvider.js";
|
|
34
36
|
export {
|
|
35
37
|
e as AUTH_METHODS,
|
|
36
38
|
p as AuthButton,
|
|
37
39
|
t as CDPReactProvider,
|
|
38
40
|
V as IconArrowLeft,
|
|
39
41
|
L as IconArrowsUpDown,
|
|
40
|
-
j as
|
|
41
|
-
X as
|
|
42
|
-
q as
|
|
43
|
-
z as
|
|
44
|
-
J as
|
|
45
|
-
Q as
|
|
42
|
+
j as IconCheck,
|
|
43
|
+
X as IconCheckCircle,
|
|
44
|
+
q as IconChevronDown,
|
|
45
|
+
z as IconEnvelope,
|
|
46
|
+
J as IconExclamationCircle,
|
|
47
|
+
Q as IconLock,
|
|
48
|
+
Y as IconPhone,
|
|
49
|
+
$ as IconXMark,
|
|
46
50
|
x as SendTransactionButton,
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
51
|
+
c as SignIn,
|
|
52
|
+
so as SignInAuthMethodButtons,
|
|
53
|
+
ao as SignInBackButton,
|
|
54
|
+
go as SignInDescription,
|
|
55
|
+
So as SignInFooter,
|
|
56
|
+
Co as SignInForm,
|
|
57
|
+
To as SignInImage,
|
|
54
58
|
u as SignInModal,
|
|
55
|
-
|
|
59
|
+
Bo as SignInTitle,
|
|
56
60
|
l as SignOutButton,
|
|
57
61
|
h as ThemeProvider,
|
|
58
|
-
|
|
62
|
+
ro as clamp,
|
|
59
63
|
E as colors,
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
+
v as colorsBase,
|
|
65
|
+
w as colorsComponents,
|
|
66
|
+
D as colorsSemantic,
|
|
67
|
+
T as cssVariables,
|
|
64
68
|
F as flattenTokensObject,
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
69
|
+
M as font,
|
|
70
|
+
to as getMessageFromUnknownError,
|
|
71
|
+
mo as isApiError,
|
|
72
|
+
fo as isEmailInvalid,
|
|
73
|
+
io as parseValuesFromPhoneNumber,
|
|
70
74
|
A as theme,
|
|
71
75
|
O as themeToCssVariables,
|
|
72
|
-
|
|
76
|
+
P as tokens,
|
|
73
77
|
n as useAppConfig,
|
|
74
|
-
|
|
75
|
-
|
|
78
|
+
vo as useSignInContext,
|
|
79
|
+
I as useSignInReducer,
|
|
76
80
|
C as useTheme
|
|
77
81
|
};
|
package/dist/theme/theme.d.ts
CHANGED
|
@@ -154,6 +154,99 @@ export declare const theme: Flattened<{
|
|
|
154
154
|
};
|
|
155
155
|
};
|
|
156
156
|
};
|
|
157
|
+
readonly select: {
|
|
158
|
+
readonly label: {
|
|
159
|
+
readonly default: {
|
|
160
|
+
readonly value: "{colors.fg.default}";
|
|
161
|
+
};
|
|
162
|
+
};
|
|
163
|
+
readonly trigger: {
|
|
164
|
+
readonly bg: {
|
|
165
|
+
readonly default: {
|
|
166
|
+
readonly value: "{colors.bg.default}";
|
|
167
|
+
};
|
|
168
|
+
};
|
|
169
|
+
readonly border: {
|
|
170
|
+
readonly default: {
|
|
171
|
+
readonly value: "{colors.line.heavy}";
|
|
172
|
+
};
|
|
173
|
+
readonly focus: {
|
|
174
|
+
readonly value: "{colors.line.primary}";
|
|
175
|
+
};
|
|
176
|
+
readonly error: {
|
|
177
|
+
readonly value: "{colors.line.negative}";
|
|
178
|
+
};
|
|
179
|
+
readonly success: {
|
|
180
|
+
readonly value: "{colors.line.positive}";
|
|
181
|
+
};
|
|
182
|
+
};
|
|
183
|
+
readonly placeholder: {
|
|
184
|
+
readonly default: {
|
|
185
|
+
readonly value: "{colors.fg.muted}";
|
|
186
|
+
};
|
|
187
|
+
};
|
|
188
|
+
readonly text: {
|
|
189
|
+
readonly default: {
|
|
190
|
+
readonly value: "{colors.fg.default}";
|
|
191
|
+
};
|
|
192
|
+
};
|
|
193
|
+
readonly errorText: {
|
|
194
|
+
readonly default: {
|
|
195
|
+
readonly value: "{colors.fg.negative}";
|
|
196
|
+
};
|
|
197
|
+
};
|
|
198
|
+
readonly successText: {
|
|
199
|
+
readonly default: {
|
|
200
|
+
readonly value: "{colors.fg.positive}";
|
|
201
|
+
};
|
|
202
|
+
};
|
|
203
|
+
};
|
|
204
|
+
readonly list: {
|
|
205
|
+
readonly bg: {
|
|
206
|
+
readonly default: {
|
|
207
|
+
readonly value: "{colors.bg.default}";
|
|
208
|
+
};
|
|
209
|
+
};
|
|
210
|
+
readonly border: {
|
|
211
|
+
readonly default: {
|
|
212
|
+
readonly value: "{colors.line.heavy}";
|
|
213
|
+
};
|
|
214
|
+
readonly focus: {
|
|
215
|
+
readonly value: "{colors.line.primary}";
|
|
216
|
+
};
|
|
217
|
+
readonly error: {
|
|
218
|
+
readonly value: "{colors.line.negative}";
|
|
219
|
+
};
|
|
220
|
+
readonly success: {
|
|
221
|
+
readonly value: "{colors.line.positive}";
|
|
222
|
+
};
|
|
223
|
+
};
|
|
224
|
+
readonly item: {
|
|
225
|
+
readonly bg: {
|
|
226
|
+
readonly default: {
|
|
227
|
+
readonly value: "{colors.bg.default}";
|
|
228
|
+
};
|
|
229
|
+
readonly highlight: {
|
|
230
|
+
readonly value: "{colors.bg.secondary}";
|
|
231
|
+
};
|
|
232
|
+
};
|
|
233
|
+
readonly text: {
|
|
234
|
+
readonly default: {
|
|
235
|
+
readonly value: "{colors.fg.default}";
|
|
236
|
+
};
|
|
237
|
+
readonly muted: {
|
|
238
|
+
readonly value: "{colors.fg.muted}";
|
|
239
|
+
};
|
|
240
|
+
readonly onHighlight: {
|
|
241
|
+
readonly value: "{colors.fg.default}";
|
|
242
|
+
};
|
|
243
|
+
readonly mutedOnHighlight: {
|
|
244
|
+
readonly value: "{colors.fg.muted}";
|
|
245
|
+
};
|
|
246
|
+
};
|
|
247
|
+
};
|
|
248
|
+
};
|
|
249
|
+
};
|
|
157
250
|
readonly bg: {
|
|
158
251
|
readonly default: {
|
|
159
252
|
readonly value: "#ffffff";
|
|
@@ -247,5 +340,7 @@ export type FontTokens = Flattened<{
|
|
|
247
340
|
}>;
|
|
248
341
|
export type ColorTokens = SemanticColors | ComponentColors;
|
|
249
342
|
export type Theme = ColorTokens & FontTokens;
|
|
250
|
-
export type ButtonVariant = "primary" | "secondary" | "linkPrimary" | "linkSecondary" | "transparentPrimary" | "transparentSecondary";
|
|
251
|
-
export type
|
|
343
|
+
export type ButtonVariant = "primary" | "secondary" | "linkPrimary" | "linkSecondary" | "transparentPrimary" | "transparentSecondary" | "control";
|
|
344
|
+
export type Size = "lg" | "md" | "sm" | "xs";
|
|
345
|
+
export type ButtonSize = Size | "none";
|
|
346
|
+
export type InputSize = Size;
|
package/dist/theme/tokens.d.ts
CHANGED
|
@@ -235,6 +235,99 @@ export declare const colorsComponents: {
|
|
|
235
235
|
};
|
|
236
236
|
};
|
|
237
237
|
};
|
|
238
|
+
readonly select: {
|
|
239
|
+
readonly label: {
|
|
240
|
+
readonly default: {
|
|
241
|
+
readonly value: "{colors.fg.default}";
|
|
242
|
+
};
|
|
243
|
+
};
|
|
244
|
+
readonly trigger: {
|
|
245
|
+
readonly bg: {
|
|
246
|
+
readonly default: {
|
|
247
|
+
readonly value: "{colors.bg.default}";
|
|
248
|
+
};
|
|
249
|
+
};
|
|
250
|
+
readonly border: {
|
|
251
|
+
readonly default: {
|
|
252
|
+
readonly value: "{colors.line.heavy}";
|
|
253
|
+
};
|
|
254
|
+
readonly focus: {
|
|
255
|
+
readonly value: "{colors.line.primary}";
|
|
256
|
+
};
|
|
257
|
+
readonly error: {
|
|
258
|
+
readonly value: "{colors.line.negative}";
|
|
259
|
+
};
|
|
260
|
+
readonly success: {
|
|
261
|
+
readonly value: "{colors.line.positive}";
|
|
262
|
+
};
|
|
263
|
+
};
|
|
264
|
+
readonly placeholder: {
|
|
265
|
+
readonly default: {
|
|
266
|
+
readonly value: "{colors.fg.muted}";
|
|
267
|
+
};
|
|
268
|
+
};
|
|
269
|
+
readonly text: {
|
|
270
|
+
readonly default: {
|
|
271
|
+
readonly value: "{colors.fg.default}";
|
|
272
|
+
};
|
|
273
|
+
};
|
|
274
|
+
readonly errorText: {
|
|
275
|
+
readonly default: {
|
|
276
|
+
readonly value: "{colors.fg.negative}";
|
|
277
|
+
};
|
|
278
|
+
};
|
|
279
|
+
readonly successText: {
|
|
280
|
+
readonly default: {
|
|
281
|
+
readonly value: "{colors.fg.positive}";
|
|
282
|
+
};
|
|
283
|
+
};
|
|
284
|
+
};
|
|
285
|
+
readonly list: {
|
|
286
|
+
readonly bg: {
|
|
287
|
+
readonly default: {
|
|
288
|
+
readonly value: "{colors.bg.default}";
|
|
289
|
+
};
|
|
290
|
+
};
|
|
291
|
+
readonly border: {
|
|
292
|
+
readonly default: {
|
|
293
|
+
readonly value: "{colors.line.heavy}";
|
|
294
|
+
};
|
|
295
|
+
readonly focus: {
|
|
296
|
+
readonly value: "{colors.line.primary}";
|
|
297
|
+
};
|
|
298
|
+
readonly error: {
|
|
299
|
+
readonly value: "{colors.line.negative}";
|
|
300
|
+
};
|
|
301
|
+
readonly success: {
|
|
302
|
+
readonly value: "{colors.line.positive}";
|
|
303
|
+
};
|
|
304
|
+
};
|
|
305
|
+
readonly item: {
|
|
306
|
+
readonly bg: {
|
|
307
|
+
readonly default: {
|
|
308
|
+
readonly value: "{colors.bg.default}";
|
|
309
|
+
};
|
|
310
|
+
readonly highlight: {
|
|
311
|
+
readonly value: "{colors.bg.secondary}";
|
|
312
|
+
};
|
|
313
|
+
};
|
|
314
|
+
readonly text: {
|
|
315
|
+
readonly default: {
|
|
316
|
+
readonly value: "{colors.fg.default}";
|
|
317
|
+
};
|
|
318
|
+
readonly muted: {
|
|
319
|
+
readonly value: "{colors.fg.muted}";
|
|
320
|
+
};
|
|
321
|
+
readonly onHighlight: {
|
|
322
|
+
readonly value: "{colors.fg.default}";
|
|
323
|
+
};
|
|
324
|
+
readonly mutedOnHighlight: {
|
|
325
|
+
readonly value: "{colors.fg.muted}";
|
|
326
|
+
};
|
|
327
|
+
};
|
|
328
|
+
};
|
|
329
|
+
};
|
|
330
|
+
};
|
|
238
331
|
};
|
|
239
332
|
export declare const colors: {
|
|
240
333
|
readonly page: {
|
|
@@ -389,6 +482,99 @@ export declare const colors: {
|
|
|
389
482
|
};
|
|
390
483
|
};
|
|
391
484
|
};
|
|
485
|
+
readonly select: {
|
|
486
|
+
readonly label: {
|
|
487
|
+
readonly default: {
|
|
488
|
+
readonly value: "{colors.fg.default}";
|
|
489
|
+
};
|
|
490
|
+
};
|
|
491
|
+
readonly trigger: {
|
|
492
|
+
readonly bg: {
|
|
493
|
+
readonly default: {
|
|
494
|
+
readonly value: "{colors.bg.default}";
|
|
495
|
+
};
|
|
496
|
+
};
|
|
497
|
+
readonly border: {
|
|
498
|
+
readonly default: {
|
|
499
|
+
readonly value: "{colors.line.heavy}";
|
|
500
|
+
};
|
|
501
|
+
readonly focus: {
|
|
502
|
+
readonly value: "{colors.line.primary}";
|
|
503
|
+
};
|
|
504
|
+
readonly error: {
|
|
505
|
+
readonly value: "{colors.line.negative}";
|
|
506
|
+
};
|
|
507
|
+
readonly success: {
|
|
508
|
+
readonly value: "{colors.line.positive}";
|
|
509
|
+
};
|
|
510
|
+
};
|
|
511
|
+
readonly placeholder: {
|
|
512
|
+
readonly default: {
|
|
513
|
+
readonly value: "{colors.fg.muted}";
|
|
514
|
+
};
|
|
515
|
+
};
|
|
516
|
+
readonly text: {
|
|
517
|
+
readonly default: {
|
|
518
|
+
readonly value: "{colors.fg.default}";
|
|
519
|
+
};
|
|
520
|
+
};
|
|
521
|
+
readonly errorText: {
|
|
522
|
+
readonly default: {
|
|
523
|
+
readonly value: "{colors.fg.negative}";
|
|
524
|
+
};
|
|
525
|
+
};
|
|
526
|
+
readonly successText: {
|
|
527
|
+
readonly default: {
|
|
528
|
+
readonly value: "{colors.fg.positive}";
|
|
529
|
+
};
|
|
530
|
+
};
|
|
531
|
+
};
|
|
532
|
+
readonly list: {
|
|
533
|
+
readonly bg: {
|
|
534
|
+
readonly default: {
|
|
535
|
+
readonly value: "{colors.bg.default}";
|
|
536
|
+
};
|
|
537
|
+
};
|
|
538
|
+
readonly border: {
|
|
539
|
+
readonly default: {
|
|
540
|
+
readonly value: "{colors.line.heavy}";
|
|
541
|
+
};
|
|
542
|
+
readonly focus: {
|
|
543
|
+
readonly value: "{colors.line.primary}";
|
|
544
|
+
};
|
|
545
|
+
readonly error: {
|
|
546
|
+
readonly value: "{colors.line.negative}";
|
|
547
|
+
};
|
|
548
|
+
readonly success: {
|
|
549
|
+
readonly value: "{colors.line.positive}";
|
|
550
|
+
};
|
|
551
|
+
};
|
|
552
|
+
readonly item: {
|
|
553
|
+
readonly bg: {
|
|
554
|
+
readonly default: {
|
|
555
|
+
readonly value: "{colors.bg.default}";
|
|
556
|
+
};
|
|
557
|
+
readonly highlight: {
|
|
558
|
+
readonly value: "{colors.bg.secondary}";
|
|
559
|
+
};
|
|
560
|
+
};
|
|
561
|
+
readonly text: {
|
|
562
|
+
readonly default: {
|
|
563
|
+
readonly value: "{colors.fg.default}";
|
|
564
|
+
};
|
|
565
|
+
readonly muted: {
|
|
566
|
+
readonly value: "{colors.fg.muted}";
|
|
567
|
+
};
|
|
568
|
+
readonly onHighlight: {
|
|
569
|
+
readonly value: "{colors.fg.default}";
|
|
570
|
+
};
|
|
571
|
+
readonly mutedOnHighlight: {
|
|
572
|
+
readonly value: "{colors.fg.muted}";
|
|
573
|
+
};
|
|
574
|
+
};
|
|
575
|
+
};
|
|
576
|
+
};
|
|
577
|
+
};
|
|
392
578
|
readonly bg: {
|
|
393
579
|
readonly default: {
|
|
394
580
|
readonly value: "#ffffff";
|
|
@@ -624,6 +810,99 @@ export declare const tokens: {
|
|
|
624
810
|
};
|
|
625
811
|
};
|
|
626
812
|
};
|
|
813
|
+
readonly select: {
|
|
814
|
+
readonly label: {
|
|
815
|
+
readonly default: {
|
|
816
|
+
readonly value: "{colors.fg.default}";
|
|
817
|
+
};
|
|
818
|
+
};
|
|
819
|
+
readonly trigger: {
|
|
820
|
+
readonly bg: {
|
|
821
|
+
readonly default: {
|
|
822
|
+
readonly value: "{colors.bg.default}";
|
|
823
|
+
};
|
|
824
|
+
};
|
|
825
|
+
readonly border: {
|
|
826
|
+
readonly default: {
|
|
827
|
+
readonly value: "{colors.line.heavy}";
|
|
828
|
+
};
|
|
829
|
+
readonly focus: {
|
|
830
|
+
readonly value: "{colors.line.primary}";
|
|
831
|
+
};
|
|
832
|
+
readonly error: {
|
|
833
|
+
readonly value: "{colors.line.negative}";
|
|
834
|
+
};
|
|
835
|
+
readonly success: {
|
|
836
|
+
readonly value: "{colors.line.positive}";
|
|
837
|
+
};
|
|
838
|
+
};
|
|
839
|
+
readonly placeholder: {
|
|
840
|
+
readonly default: {
|
|
841
|
+
readonly value: "{colors.fg.muted}";
|
|
842
|
+
};
|
|
843
|
+
};
|
|
844
|
+
readonly text: {
|
|
845
|
+
readonly default: {
|
|
846
|
+
readonly value: "{colors.fg.default}";
|
|
847
|
+
};
|
|
848
|
+
};
|
|
849
|
+
readonly errorText: {
|
|
850
|
+
readonly default: {
|
|
851
|
+
readonly value: "{colors.fg.negative}";
|
|
852
|
+
};
|
|
853
|
+
};
|
|
854
|
+
readonly successText: {
|
|
855
|
+
readonly default: {
|
|
856
|
+
readonly value: "{colors.fg.positive}";
|
|
857
|
+
};
|
|
858
|
+
};
|
|
859
|
+
};
|
|
860
|
+
readonly list: {
|
|
861
|
+
readonly bg: {
|
|
862
|
+
readonly default: {
|
|
863
|
+
readonly value: "{colors.bg.default}";
|
|
864
|
+
};
|
|
865
|
+
};
|
|
866
|
+
readonly border: {
|
|
867
|
+
readonly default: {
|
|
868
|
+
readonly value: "{colors.line.heavy}";
|
|
869
|
+
};
|
|
870
|
+
readonly focus: {
|
|
871
|
+
readonly value: "{colors.line.primary}";
|
|
872
|
+
};
|
|
873
|
+
readonly error: {
|
|
874
|
+
readonly value: "{colors.line.negative}";
|
|
875
|
+
};
|
|
876
|
+
readonly success: {
|
|
877
|
+
readonly value: "{colors.line.positive}";
|
|
878
|
+
};
|
|
879
|
+
};
|
|
880
|
+
readonly item: {
|
|
881
|
+
readonly bg: {
|
|
882
|
+
readonly default: {
|
|
883
|
+
readonly value: "{colors.bg.default}";
|
|
884
|
+
};
|
|
885
|
+
readonly highlight: {
|
|
886
|
+
readonly value: "{colors.bg.secondary}";
|
|
887
|
+
};
|
|
888
|
+
};
|
|
889
|
+
readonly text: {
|
|
890
|
+
readonly default: {
|
|
891
|
+
readonly value: "{colors.fg.default}";
|
|
892
|
+
};
|
|
893
|
+
readonly muted: {
|
|
894
|
+
readonly value: "{colors.fg.muted}";
|
|
895
|
+
};
|
|
896
|
+
readonly onHighlight: {
|
|
897
|
+
readonly value: "{colors.fg.default}";
|
|
898
|
+
};
|
|
899
|
+
readonly mutedOnHighlight: {
|
|
900
|
+
readonly value: "{colors.fg.muted}";
|
|
901
|
+
};
|
|
902
|
+
};
|
|
903
|
+
};
|
|
904
|
+
};
|
|
905
|
+
};
|
|
627
906
|
readonly bg: {
|
|
628
907
|
readonly default: {
|
|
629
908
|
readonly value: "#ffffff";
|
package/dist/theme/tokens.js
CHANGED
|
@@ -14,7 +14,7 @@ const e = {
|
|
|
14
14
|
// contextual
|
|
15
15
|
red500: "#cf202f",
|
|
16
16
|
green500: "#098551"
|
|
17
|
-
},
|
|
17
|
+
}, l = {
|
|
18
18
|
bg: {
|
|
19
19
|
default: { value: e.white },
|
|
20
20
|
// background
|
|
@@ -57,7 +57,7 @@ const e = {
|
|
|
57
57
|
negative: { value: "{colors.fg.negative}" }
|
|
58
58
|
// negative line color
|
|
59
59
|
}
|
|
60
|
-
},
|
|
60
|
+
}, a = {
|
|
61
61
|
page: {
|
|
62
62
|
bg: {
|
|
63
63
|
default: { value: "{colors.bg.default}" }
|
|
@@ -140,10 +140,61 @@ const e = {
|
|
|
140
140
|
successText: {
|
|
141
141
|
default: { value: "{colors.fg.positive}" }
|
|
142
142
|
}
|
|
143
|
+
},
|
|
144
|
+
select: {
|
|
145
|
+
label: {
|
|
146
|
+
default: { value: "{colors.fg.default}" }
|
|
147
|
+
},
|
|
148
|
+
trigger: {
|
|
149
|
+
bg: {
|
|
150
|
+
default: { value: "{colors.bg.default}" }
|
|
151
|
+
},
|
|
152
|
+
border: {
|
|
153
|
+
default: { value: "{colors.line.heavy}" },
|
|
154
|
+
focus: { value: "{colors.line.primary}" },
|
|
155
|
+
error: { value: "{colors.line.negative}" },
|
|
156
|
+
success: { value: "{colors.line.positive}" }
|
|
157
|
+
},
|
|
158
|
+
placeholder: {
|
|
159
|
+
default: { value: "{colors.fg.muted}" }
|
|
160
|
+
},
|
|
161
|
+
text: {
|
|
162
|
+
default: { value: "{colors.fg.default}" }
|
|
163
|
+
},
|
|
164
|
+
errorText: {
|
|
165
|
+
default: { value: "{colors.fg.negative}" }
|
|
166
|
+
},
|
|
167
|
+
successText: {
|
|
168
|
+
default: { value: "{colors.fg.positive}" }
|
|
169
|
+
}
|
|
170
|
+
},
|
|
171
|
+
list: {
|
|
172
|
+
bg: {
|
|
173
|
+
default: { value: "{colors.bg.default}" }
|
|
174
|
+
},
|
|
175
|
+
border: {
|
|
176
|
+
default: { value: "{colors.line.heavy}" },
|
|
177
|
+
focus: { value: "{colors.line.primary}" },
|
|
178
|
+
error: { value: "{colors.line.negative}" },
|
|
179
|
+
success: { value: "{colors.line.positive}" }
|
|
180
|
+
},
|
|
181
|
+
item: {
|
|
182
|
+
bg: {
|
|
183
|
+
default: { value: "{colors.bg.default}" },
|
|
184
|
+
highlight: { value: "{colors.bg.secondary}" }
|
|
185
|
+
},
|
|
186
|
+
text: {
|
|
187
|
+
default: { value: "{colors.fg.default}" },
|
|
188
|
+
muted: { value: "{colors.fg.muted}" },
|
|
189
|
+
onHighlight: { value: "{colors.fg.default}" },
|
|
190
|
+
mutedOnHighlight: { value: "{colors.fg.muted}" }
|
|
191
|
+
}
|
|
192
|
+
}
|
|
193
|
+
}
|
|
143
194
|
}
|
|
144
195
|
}, o = {
|
|
145
|
-
...
|
|
146
|
-
...
|
|
196
|
+
...l,
|
|
197
|
+
...a
|
|
147
198
|
}, r = {
|
|
148
199
|
family: {
|
|
149
200
|
sans: {
|
|
@@ -160,8 +211,8 @@ const e = {
|
|
|
160
211
|
export {
|
|
161
212
|
o as colors,
|
|
162
213
|
e as colorsBase,
|
|
163
|
-
|
|
164
|
-
|
|
214
|
+
a as colorsComponents,
|
|
215
|
+
l as colorsSemantic,
|
|
165
216
|
r as font,
|
|
166
217
|
u as tokens
|
|
167
218
|
};
|
package/package.json
CHANGED
|
@@ -1,20 +1,21 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@coinbase/cdp-react",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.24",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"dependencies": {
|
|
6
6
|
"@internationalized/number": "3.6.4",
|
|
7
7
|
"@radix-ui/react-dialog": "^1.1.14",
|
|
8
8
|
"@radix-ui/react-form": "^0.1.7",
|
|
9
9
|
"@radix-ui/react-one-time-password-field": "^0.1.7",
|
|
10
|
+
"@radix-ui/react-select": "^2.2.6",
|
|
10
11
|
"big.js": "7.0.1",
|
|
11
12
|
"libphonenumber-js": "^1.12.10",
|
|
12
13
|
"react-transition-state": "2.3.0"
|
|
13
14
|
},
|
|
14
15
|
"peerDependencies": {
|
|
15
16
|
"react": ">=18.2.0",
|
|
16
|
-
"@coinbase/cdp-core": "^0.0.
|
|
17
|
-
"@coinbase/cdp-hooks": "^0.0.
|
|
17
|
+
"@coinbase/cdp-core": "^0.0.24",
|
|
18
|
+
"@coinbase/cdp-hooks": "^0.0.24"
|
|
18
19
|
},
|
|
19
20
|
"devDependencies": {
|
|
20
21
|
"@size-limit/preset-big-lib": "^11.2.0",
|
|
@@ -44,8 +45,8 @@
|
|
|
44
45
|
"vite": "^7.0.4",
|
|
45
46
|
"vite-plugin-dts": "^4.5.4",
|
|
46
47
|
"vite-plugin-lib-inject-css": "^2.2.2",
|
|
47
|
-
"@coinbase/cdp-core": "^0.0.
|
|
48
|
-
"@coinbase/cdp-hooks": "^0.0.
|
|
48
|
+
"@coinbase/cdp-core": "^0.0.24",
|
|
49
|
+
"@coinbase/cdp-hooks": "^0.0.24"
|
|
49
50
|
},
|
|
50
51
|
"size-limit": [
|
|
51
52
|
{
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
.SignInFooter-module__footer___DLNrl{color:var(--cdp-web-colors-page-text-muted);display:flex;align-items:center;justify-content:center;gap:.5em;line-height:1;padding:1em 2em 0}.SignInFooter-module__footer___DLNrl:first-child{border-top:0}.SignInFooter-module__footer___DLNrl p{display:flex;align-items:center;font-size:.75em;gap:.25em;margin:0}.SignInFooter-module__icon___hFhfx{height:auto;width:.75em}.SignInFooter-module__coinbase-icon___NeFOp{height:1em;width:auto}
|