@w3payments/react 1.2.1 → 1.3.0
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/README.md +194 -14
- package/dist/assets/main.css +1 -1
- package/dist/components/PaymentMethodRow.d.ts +0 -2
- package/dist/components/PaymentMethodRow.d.ts.map +1 -1
- package/dist/components/W3PaymentFooter.d.ts.map +1 -1
- package/dist/components/W3PaymentWidget.d.ts +7 -1
- package/dist/components/W3PaymentWidget.d.ts.map +1 -1
- package/dist/components/W3PaymentsProvider.d.ts +0 -3
- package/dist/components/W3PaymentsProvider.d.ts.map +1 -1
- package/dist/components/index.d.ts +0 -1
- package/dist/components/index.d.ts.map +1 -1
- package/dist/context/W3PaymentsContext.d.ts +0 -3
- package/dist/context/W3PaymentsContext.d.ts.map +1 -1
- package/dist/index.js +10 -11
- package/dist/index.mjs +3765 -3866
- package/dist/main.d.ts +1 -1
- package/dist/main.d.ts.map +1 -1
- package/package.json +16 -13
- package/dist/theme.d.ts +0 -194
- package/dist/theme.d.ts.map +0 -1
package/dist/main.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export declare const W3_PAYMENTS_REACT_VERSION = "1.0.0";
|
|
2
|
-
export { W3PaymentsProvider, W3PaymentWidget
|
|
2
|
+
export { W3PaymentsProvider, W3PaymentWidget } from './components';
|
|
3
3
|
export { useW3Payments } from './hooks/useW3Payments';
|
|
4
4
|
export type { W3PaymentsProviderProps, W3PaymentWidgetProps, PaymentInitiateData, PaymentCompleteData, PaymentErrorData, PaymentMethodRowProps, W3PaymentFooterProps, } from './components';
|
|
5
5
|
export type { PaymentEvent, PaymentError, PaymentMethodDisplayData, } from './types';
|
package/dist/main.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"main.d.ts","sourceRoot":"","sources":["../lib/main.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAGH,OAAO,YAAY,CAAC;AAGpB,eAAO,MAAM,yBAAyB,UAAU,CAAC;AAGjD,OAAO,
|
|
1
|
+
{"version":3,"file":"main.d.ts","sourceRoot":"","sources":["../lib/main.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAGH,OAAO,YAAY,CAAC;AAGpB,eAAO,MAAM,yBAAyB,UAAU,CAAC;AAGjD,OAAO,EAAE,kBAAkB,EAAE,eAAe,EAAE,MAAM,cAAc,CAAC;AAGnE,OAAO,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAC;AAGtD,YAAY,EACV,uBAAuB,EACvB,oBAAoB,EACpB,mBAAmB,EACnB,mBAAmB,EACnB,gBAAgB,EAChB,qBAAqB,EACrB,oBAAoB,GACrB,MAAM,cAAc,CAAC;AAGtB,YAAY,EACV,YAAY,EACZ,YAAY,EACZ,wBAAwB,GACzB,MAAM,SAAS,CAAC;;;;AAGjB,wBAEE"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@w3payments/react",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.3.0",
|
|
4
4
|
"description": "React component library for universal Web3 payment processing with multi-vendor support",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -54,9 +54,9 @@
|
|
|
54
54
|
"dependencies": {
|
|
55
55
|
"@mantine/core": "^8.3.10",
|
|
56
56
|
"framer-motion": "^12.23.26",
|
|
57
|
-
"@w3payments/adapters": "1.2.
|
|
58
|
-
"@w3payments/
|
|
59
|
-
"@w3payments/
|
|
57
|
+
"@w3payments/adapters": "1.2.2",
|
|
58
|
+
"@w3payments/common": "1.3.0",
|
|
59
|
+
"@w3payments/core": "1.2.2"
|
|
60
60
|
},
|
|
61
61
|
"peerDependencies": {
|
|
62
62
|
"react": ">=18.0.0",
|
|
@@ -72,12 +72,10 @@
|
|
|
72
72
|
},
|
|
73
73
|
"devDependencies": {
|
|
74
74
|
"@chromatic-com/storybook": "^4.1.3",
|
|
75
|
-
"@storybook/addon-a11y": "^10.1.
|
|
76
|
-
"@storybook/addon-docs": "^10.1.
|
|
77
|
-
"@storybook/addon-
|
|
78
|
-
"@storybook/
|
|
79
|
-
"@storybook/addon-vitest": "^10.1.10",
|
|
80
|
-
"@storybook/react-vite": "^10.1.10",
|
|
75
|
+
"@storybook/addon-a11y": "^10.1.11",
|
|
76
|
+
"@storybook/addon-docs": "^10.1.11",
|
|
77
|
+
"@storybook/addon-vitest": "^10.1.11",
|
|
78
|
+
"@storybook/react-vite": "^10.1.11",
|
|
81
79
|
"@types/cors": "^2.8.19",
|
|
82
80
|
"@types/express": "^5.0.6",
|
|
83
81
|
"@types/node": "^24.10.3",
|
|
@@ -87,22 +85,27 @@
|
|
|
87
85
|
"concurrently": "^8.2.2",
|
|
88
86
|
"cors": "^2.8.5",
|
|
89
87
|
"dotenv": "^17.2.3",
|
|
90
|
-
"eslint-plugin-storybook": "^10.1.
|
|
88
|
+
"eslint-plugin-storybook": "^10.1.11",
|
|
91
89
|
"express": "^5.2.1",
|
|
90
|
+
"find-up": "^8.0.0",
|
|
92
91
|
"react": "^19.2.3",
|
|
93
92
|
"react-dom": "^19.2.3",
|
|
94
|
-
"storybook": "^10.1.
|
|
93
|
+
"storybook": "^10.1.11",
|
|
94
|
+
"tsc-alias": "^1.8.16",
|
|
95
95
|
"typescript": "~5.9.3",
|
|
96
|
+
"unplugin-dts": "1.0.0-beta.6",
|
|
96
97
|
"vite": "^7.2.7",
|
|
97
98
|
"vite-plugin-dts": "^4.5.4",
|
|
98
99
|
"vite-plugin-lib-inject-css": "^2.2.2"
|
|
99
100
|
},
|
|
100
101
|
"scripts": {
|
|
101
102
|
"dev": "vite",
|
|
102
|
-
"build": "
|
|
103
|
+
"build": "vite build",
|
|
103
104
|
"lint": "eslint .",
|
|
104
105
|
"preview": "vite preview",
|
|
105
106
|
"storybook": "concurrently \"npx tsx server.ts\" \"storybook dev -p 6006\"",
|
|
107
|
+
"server": "npx tsx server.ts",
|
|
108
|
+
"kill-servers": "pkill -f 'tsx server.ts' || pkill -f 'storybook dev' || echo 'No servers running'",
|
|
106
109
|
"build-storybook": "storybook build",
|
|
107
110
|
"version": "pnpm run build",
|
|
108
111
|
"publish:beta": "pnpm publish --access public --tag beta --no-git-checks",
|
package/dist/theme.d.ts
DELETED
|
@@ -1,194 +0,0 @@
|
|
|
1
|
-
import { MantineColorsTuple } from '@mantine/core';
|
|
2
|
-
export declare const W3_THEME_CONSTANTS: {
|
|
3
|
-
readonly WIDGET_HEIGHT: "600px";
|
|
4
|
-
readonly WIDGET_MAX_WIDTH: "440px";
|
|
5
|
-
readonly WIDGET_MIN_WIDTH: "380px";
|
|
6
|
-
readonly QR_SIZE: "176px";
|
|
7
|
-
readonly QR_GENERATION_SIZE: 176;
|
|
8
|
-
readonly QR_MARGIN: 1;
|
|
9
|
-
readonly HEADER_LOGO_SIZE: "28px";
|
|
10
|
-
readonly ACTION_ICON_SIZE: "40px";
|
|
11
|
-
readonly INFO_ICON_SIZE: "20px";
|
|
12
|
-
readonly COPY_ICON_SIZE: "14px";
|
|
13
|
-
readonly COLORS: {
|
|
14
|
-
readonly WIDGET_BACKGROUND: "var(--w3-widget-background, #fefefe)";
|
|
15
|
-
readonly CARD_BACKGROUND: "var(--w3-card-background, #fdfdfd)";
|
|
16
|
-
readonly QR_BACKGROUND: "var(--w3-qr-background, #fafafa)";
|
|
17
|
-
readonly INFO_BACKGROUND: "var(--w3-info-background, #f0f9ff)";
|
|
18
|
-
readonly INFO_ICON_BACKGROUND: "var(--w3-info-icon-background, #dbeafe)";
|
|
19
|
-
readonly USD_BADGE_BACKGROUND: "var(--w3-usd-badge-background, #f0f9ff)";
|
|
20
|
-
readonly COPY_BUTTON_BACKGROUND: "var(--w3-copy-button-background, white)";
|
|
21
|
-
readonly BORDER_LIGHT: "var(--w3-border-light, #f8f8f8)";
|
|
22
|
-
readonly BORDER_MEDIUM: "var(--w3-border-medium, #f4f4f5)";
|
|
23
|
-
readonly BORDER_COPY_DEFAULT: "var(--w3-border-copy-default, #e5e7eb)";
|
|
24
|
-
readonly INFO_TEXT: "var(--w3-info-text, #1e40af)";
|
|
25
|
-
readonly USD_BADGE_TEXT: "var(--w3-usd-badge-text, #1e40af)";
|
|
26
|
-
readonly MUTED_TEXT: "var(--w3-muted-text, #a1a1aa)";
|
|
27
|
-
};
|
|
28
|
-
readonly FONT_SIZES: {
|
|
29
|
-
readonly QR_AMOUNT: "24px";
|
|
30
|
-
readonly MAIN_AMOUNT: "36px";
|
|
31
|
-
readonly USD_BADGE: "10px";
|
|
32
|
-
readonly HEADER_LOGO: "9px";
|
|
33
|
-
readonly CURRENCY_LABEL: "10px";
|
|
34
|
-
readonly ADDRESS_TEXT: "10px";
|
|
35
|
-
readonly PAYMENT_METHOD_LABEL: "9px";
|
|
36
|
-
};
|
|
37
|
-
readonly TEXT: {
|
|
38
|
-
readonly DIRECT_DEPOSIT: "Direct Deposit";
|
|
39
|
-
readonly FREE: "Free";
|
|
40
|
-
readonly PROCESSING_TIMES: {
|
|
41
|
-
readonly INSTANT: "Instant";
|
|
42
|
-
readonly EXCHANGE: "1-5 min";
|
|
43
|
-
readonly FIAT: "1-3 days";
|
|
44
|
-
readonly WALLET: "10-20 min";
|
|
45
|
-
};
|
|
46
|
-
readonly FEES: {
|
|
47
|
-
readonly FREE: "Free";
|
|
48
|
-
readonly EXCHANGE: "1-3%";
|
|
49
|
-
readonly FIAT: "2-5%";
|
|
50
|
-
};
|
|
51
|
-
};
|
|
52
|
-
};
|
|
53
|
-
export declare const w3MantineTheme: {
|
|
54
|
-
focusRing?: "auto" | "always" | "never" | undefined;
|
|
55
|
-
scale?: number | undefined;
|
|
56
|
-
fontSmoothing?: boolean | undefined;
|
|
57
|
-
white?: string | undefined;
|
|
58
|
-
black?: string | undefined;
|
|
59
|
-
colors?: {
|
|
60
|
-
[x: string & {}]: MantineColorsTuple | undefined;
|
|
61
|
-
dark?: MantineColorsTuple | undefined;
|
|
62
|
-
gray?: MantineColorsTuple | undefined;
|
|
63
|
-
red?: MantineColorsTuple | undefined;
|
|
64
|
-
pink?: MantineColorsTuple | undefined;
|
|
65
|
-
grape?: MantineColorsTuple | undefined;
|
|
66
|
-
violet?: MantineColorsTuple | undefined;
|
|
67
|
-
indigo?: MantineColorsTuple | undefined;
|
|
68
|
-
blue?: MantineColorsTuple | undefined;
|
|
69
|
-
cyan?: MantineColorsTuple | undefined;
|
|
70
|
-
green?: MantineColorsTuple | undefined;
|
|
71
|
-
lime?: MantineColorsTuple | undefined;
|
|
72
|
-
yellow?: MantineColorsTuple | undefined;
|
|
73
|
-
orange?: MantineColorsTuple | undefined;
|
|
74
|
-
teal?: MantineColorsTuple | undefined;
|
|
75
|
-
} | undefined;
|
|
76
|
-
primaryShade?: import('@mantine/core').MantineColorShade | {
|
|
77
|
-
light?: import('@mantine/core').MantineColorShade | undefined;
|
|
78
|
-
dark?: import('@mantine/core').MantineColorShade | undefined;
|
|
79
|
-
} | undefined;
|
|
80
|
-
primaryColor?: string | undefined;
|
|
81
|
-
variantColorResolver?: import('@mantine/core').VariantColorsResolver | undefined;
|
|
82
|
-
autoContrast?: boolean | undefined;
|
|
83
|
-
luminanceThreshold?: number | undefined;
|
|
84
|
-
fontFamily?: string | undefined;
|
|
85
|
-
fontFamilyMonospace?: string | undefined;
|
|
86
|
-
headings?: {
|
|
87
|
-
fontFamily?: string | undefined;
|
|
88
|
-
fontWeight?: string | undefined;
|
|
89
|
-
textWrap?: "wrap" | "nowrap" | "balance" | "pretty" | "stable" | undefined;
|
|
90
|
-
sizes?: {
|
|
91
|
-
h1?: {
|
|
92
|
-
fontSize?: string | undefined;
|
|
93
|
-
fontWeight?: string | undefined;
|
|
94
|
-
lineHeight?: string | undefined;
|
|
95
|
-
} | undefined;
|
|
96
|
-
h2?: {
|
|
97
|
-
fontSize?: string | undefined;
|
|
98
|
-
fontWeight?: string | undefined;
|
|
99
|
-
lineHeight?: string | undefined;
|
|
100
|
-
} | undefined;
|
|
101
|
-
h3?: {
|
|
102
|
-
fontSize?: string | undefined;
|
|
103
|
-
fontWeight?: string | undefined;
|
|
104
|
-
lineHeight?: string | undefined;
|
|
105
|
-
} | undefined;
|
|
106
|
-
h4?: {
|
|
107
|
-
fontSize?: string | undefined;
|
|
108
|
-
fontWeight?: string | undefined;
|
|
109
|
-
lineHeight?: string | undefined;
|
|
110
|
-
} | undefined;
|
|
111
|
-
h5?: {
|
|
112
|
-
fontSize?: string | undefined;
|
|
113
|
-
fontWeight?: string | undefined;
|
|
114
|
-
lineHeight?: string | undefined;
|
|
115
|
-
} | undefined;
|
|
116
|
-
h6?: {
|
|
117
|
-
fontSize?: string | undefined;
|
|
118
|
-
fontWeight?: string | undefined;
|
|
119
|
-
lineHeight?: string | undefined;
|
|
120
|
-
} | undefined;
|
|
121
|
-
} | undefined;
|
|
122
|
-
} | undefined;
|
|
123
|
-
radius?: {
|
|
124
|
-
[x: string & {}]: string | undefined;
|
|
125
|
-
md?: string | undefined;
|
|
126
|
-
xs?: string | undefined;
|
|
127
|
-
sm?: string | undefined;
|
|
128
|
-
lg?: string | undefined;
|
|
129
|
-
xl?: string | undefined;
|
|
130
|
-
} | undefined;
|
|
131
|
-
defaultRadius?: import('@mantine/core').MantineRadius | undefined;
|
|
132
|
-
spacing?: {
|
|
133
|
-
[x: number]: string | undefined;
|
|
134
|
-
[x: string & {}]: string | undefined;
|
|
135
|
-
md?: string | undefined;
|
|
136
|
-
xs?: string | undefined;
|
|
137
|
-
sm?: string | undefined;
|
|
138
|
-
lg?: string | undefined;
|
|
139
|
-
xl?: string | undefined;
|
|
140
|
-
} | undefined;
|
|
141
|
-
fontSizes?: {
|
|
142
|
-
[x: string & {}]: string | undefined;
|
|
143
|
-
md?: string | undefined;
|
|
144
|
-
xs?: string | undefined;
|
|
145
|
-
sm?: string | undefined;
|
|
146
|
-
lg?: string | undefined;
|
|
147
|
-
xl?: string | undefined;
|
|
148
|
-
} | undefined;
|
|
149
|
-
lineHeights?: {
|
|
150
|
-
[x: string & {}]: string | undefined;
|
|
151
|
-
md?: string | undefined;
|
|
152
|
-
xs?: string | undefined;
|
|
153
|
-
sm?: string | undefined;
|
|
154
|
-
lg?: string | undefined;
|
|
155
|
-
xl?: string | undefined;
|
|
156
|
-
} | undefined;
|
|
157
|
-
breakpoints?: {
|
|
158
|
-
[x: string & {}]: string | undefined;
|
|
159
|
-
md?: string | undefined;
|
|
160
|
-
xs?: string | undefined;
|
|
161
|
-
sm?: string | undefined;
|
|
162
|
-
lg?: string | undefined;
|
|
163
|
-
xl?: string | undefined;
|
|
164
|
-
} | undefined;
|
|
165
|
-
shadows?: {
|
|
166
|
-
[x: string & {}]: string | undefined;
|
|
167
|
-
md?: string | undefined;
|
|
168
|
-
xs?: string | undefined;
|
|
169
|
-
sm?: string | undefined;
|
|
170
|
-
lg?: string | undefined;
|
|
171
|
-
xl?: string | undefined;
|
|
172
|
-
} | undefined;
|
|
173
|
-
respectReducedMotion?: boolean | undefined;
|
|
174
|
-
cursorType?: "default" | "pointer" | undefined;
|
|
175
|
-
defaultGradient?: {
|
|
176
|
-
from?: string | undefined;
|
|
177
|
-
to?: string | undefined;
|
|
178
|
-
deg?: number | undefined;
|
|
179
|
-
} | undefined;
|
|
180
|
-
activeClassName?: string | undefined;
|
|
181
|
-
focusClassName?: string | undefined;
|
|
182
|
-
components?: {
|
|
183
|
-
[x: string]: {
|
|
184
|
-
classNames?: any;
|
|
185
|
-
styles?: any;
|
|
186
|
-
vars?: any;
|
|
187
|
-
defaultProps?: any;
|
|
188
|
-
} | undefined;
|
|
189
|
-
} | undefined;
|
|
190
|
-
other?: {
|
|
191
|
-
[x: string]: any;
|
|
192
|
-
} | undefined;
|
|
193
|
-
};
|
|
194
|
-
//# sourceMappingURL=theme.d.ts.map
|
package/dist/theme.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"theme.d.ts","sourceRoot":"","sources":["../lib/theme.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAGH,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,eAAe,CAAC;AA6CxD,eAAO,MAAM,kBAAkB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAkErB,CAAC;AAEX,eAAO,MAAM,cAAc;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA0BzB,CAAC"}
|