@dekin_dev/react-checkout 0.1.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.
@@ -0,0 +1 @@
1
+ .vq-checkout-root{--vq-overlay-bg: rgba(15, 17, 21, .55);--vq-surface-bg: #ffffff;--vq-surface-fg: #14161a;--vq-muted-fg: #6b7280;--vq-border-color: rgba(15, 17, 21, .08);--vq-radius: 16px;--vq-shadow: 0 20px 60px rgba(15, 17, 21, .25), 0 2px 8px rgba(15, 17, 21, .08);--vq-focus-ring: #2563eb;--vq-close-hover-bg: rgba(15, 17, 21, .06);--vq-z-index: 2147483000;--vq-font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;position:fixed;top:0;right:0;bottom:0;left:0;z-index:var(--vq-z-index);font-family:var(--vq-font)}.vq-checkout-root[data-theme=dark]{--vq-overlay-bg: rgba(0, 0, 0, .7);--vq-surface-bg: #17191d;--vq-surface-fg: #f3f4f6;--vq-muted-fg: #9ca3af;--vq-border-color: rgba(255, 255, 255, .08);--vq-shadow: 0 20px 60px rgba(0, 0, 0, .5), 0 2px 8px rgba(0, 0, 0, .3);--vq-close-hover-bg: rgba(255, 255, 255, .08)}@media (prefers-color-scheme: dark){.vq-checkout-root[data-theme=auto]{--vq-overlay-bg: rgba(0, 0, 0, .7);--vq-surface-bg: #17191d;--vq-surface-fg: #f3f4f6;--vq-muted-fg: #9ca3af;--vq-border-color: rgba(255, 255, 255, .08);--vq-shadow: 0 20px 60px rgba(0, 0, 0, .5), 0 2px 8px rgba(0, 0, 0, .3);--vq-close-hover-bg: rgba(255, 255, 255, .08)}}.vq-checkout-overlay{position:absolute;top:0;right:0;bottom:0;left:0;background:var(--vq-overlay-bg);display:flex;align-items:center;justify-content:center;padding:16px;animation:vq-fade-in .18s ease-out}.vq-checkout-modal{position:relative;display:flex;flex-direction:column;width:100%;background:var(--vq-surface-bg);color:var(--vq-surface-fg);border-radius:var(--vq-radius);box-shadow:var(--vq-shadow);overflow:hidden;animation:vq-scale-in .22s cubic-bezier(.16,1,.3,1)}.vq-checkout-header{display:flex;align-items:flex-start;justify-content:space-between;gap:12px;padding:18px 20px;border-bottom:1px solid var(--vq-border-color);flex-shrink:0}.vq-checkout-heading{display:flex;flex-direction:column;gap:2px;min-width:0}.vq-checkout-title{margin:0;font-size:16px;font-weight:600;line-height:1.3;color:var(--vq-surface-fg)}.vq-checkout-description{margin:0;font-size:13px;line-height:1.4;color:var(--vq-muted-fg)}.vq-checkout-close{display:inline-flex;align-items:center;justify-content:center;width:32px;height:32px;flex-shrink:0;border:none;border-radius:999px;background:transparent;color:var(--vq-muted-fg);cursor:pointer;transition:background-color .12s ease,color .12s ease}.vq-checkout-close:hover{background:var(--vq-close-hover-bg);color:var(--vq-surface-fg)}.vq-checkout-close:focus-visible,.vq-checkout-modal :focus-visible{outline:2px solid var(--vq-focus-ring);outline-offset:2px}.vq-checkout-body{position:relative;flex:1;min-height:0;display:flex}.vq-checkout-iframe{width:100%;height:100%;border:none;background:var(--vq-surface-bg);display:block}.vq-checkout-state{position:absolute;top:0;right:0;bottom:0;left:0;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:14px;padding:32px;text-align:center;background:var(--vq-surface-bg);color:var(--vq-muted-fg);font-size:14px}.vq-checkout-spinner{width:32px;height:32px;border-radius:999px;border:3px solid var(--vq-border-color);border-top-color:var(--vq-focus-ring);animation:vq-spin .8s linear infinite}.vq-checkout-error-icon{width:36px;height:36px;border-radius:999px;display:flex;align-items:center;justify-content:center;background:#dc26261a;color:#dc2626;font-size:18px;font-weight:700}.vq-checkout-error-message{color:var(--vq-surface-fg);font-weight:500;max-width:32ch}@keyframes vq-fade-in{0%{opacity:0}to{opacity:1}}@keyframes vq-scale-in{0%{opacity:0;transform:scale(.96) translateY(8px)}to{opacity:1;transform:scale(1) translateY(0)}}@keyframes vq-spin{to{transform:rotate(360deg)}}@media (max-width: 640px){.vq-checkout-overlay{padding:0}.vq-checkout-modal{width:100vw!important;height:100dvh!important;max-width:100vw!important;max-height:100dvh!important;border-radius:0}}@media (prefers-reduced-motion: reduce){.vq-checkout-overlay,.vq-checkout-modal,.vq-checkout-spinner{animation-duration:.01ms!important}}.vq-checkout-trigger{font-family:var(--vq-font, inherit)}
package/package.json ADDED
@@ -0,0 +1,78 @@
1
+ {
2
+ "name": "@dekin_dev/react-checkout",
3
+ "version": "0.1.0",
4
+ "description": "A lightweight, provider-agnostic React modal/iframe checkout for embedding hosted payment pages (Hubtel, Moolre, PaySwitch, and custom gateways).",
5
+ "type": "module",
6
+ "license": "MIT",
7
+ "author": "Veqta Space",
8
+ "keywords": [
9
+ "react",
10
+ "checkout",
11
+ "payment",
12
+ "iframe",
13
+ "modal",
14
+ "hubtel",
15
+ "moolre",
16
+ "payswitch",
17
+ "africa",
18
+ "payments"
19
+ ],
20
+ "sideEffects": [
21
+ "**/*.css"
22
+ ],
23
+ "files": [
24
+ "dist"
25
+ ],
26
+ "main": "./dist/index.js",
27
+ "module": "./dist/index.mjs",
28
+ "types": "./dist/index.d.ts",
29
+ "exports": {
30
+ ".": {
31
+ "types": "./dist/index.d.ts",
32
+ "import": "./dist/index.mjs",
33
+ "require": "./dist/index.js"
34
+ },
35
+ "./styles.css": "./dist/styles.css",
36
+ "./package.json": "./package.json"
37
+ },
38
+ "engines": {
39
+ "node": ">=18"
40
+ },
41
+ "peerDependencies": {
42
+ "react": ">=18.0.0",
43
+ "react-dom": ">=18.0.0"
44
+ },
45
+ "scripts": {
46
+ "dev": "vite build --watch",
47
+ "build": "tsc -p tsconfig.json --noEmit && vite build",
48
+ "test": "vitest run",
49
+ "test:watch": "vitest",
50
+ "lint": "eslint .",
51
+ "typecheck": "tsc -p tsconfig.json --noEmit",
52
+ "release": "npm run typecheck && npm run lint && npm run test && npm run build",
53
+ "demo": "npm run dev --workspace demo"
54
+ },
55
+ "workspaces": [
56
+ "demo"
57
+ ],
58
+ "devDependencies": {
59
+ "@eslint/js": "^9.15.0",
60
+ "@testing-library/jest-dom": "^6.5.0",
61
+ "@testing-library/react": "^16.0.1",
62
+ "@testing-library/user-event": "^14.5.2",
63
+ "@types/node": "^22.20.2",
64
+ "@types/react": "^18.3.12",
65
+ "@types/react-dom": "^18.3.1",
66
+ "@vitejs/plugin-react": "^4.3.3",
67
+ "eslint": "^9.15.0",
68
+ "eslint-plugin-react-hooks": "^5.0.0",
69
+ "jsdom": "^25.0.1",
70
+ "react": "^18.3.1",
71
+ "react-dom": "^18.3.1",
72
+ "typescript": "^5.6.3",
73
+ "typescript-eslint": "^8.15.0",
74
+ "vite": "^5.4.11",
75
+ "vite-plugin-dts": "^4.3.0",
76
+ "vitest": "^2.1.5"
77
+ }
78
+ }