@txnlab/use-wallet-ui-react 0.3.0 → 0.4.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@txnlab/use-wallet-ui-react",
3
- "version": "0.3.0",
3
+ "version": "0.4.0",
4
4
  "description": "React components for use-wallet UI",
5
5
  "type": "module",
6
6
  "main": "dist/cjs/index.cjs",
@@ -18,10 +18,12 @@
18
18
  }
19
19
  },
20
20
  "./dist/style.css": "./dist/style.css",
21
+ "./theme.css": "./src/theme.css",
21
22
  "./package.json": "./package.json"
22
23
  },
23
24
  "files": [
24
25
  "dist",
26
+ "src/theme.css",
25
27
  "README.md"
26
28
  ],
27
29
  "keywords": [
@@ -37,19 +39,31 @@
37
39
  "license": "MIT",
38
40
  "repository": {
39
41
  "type": "git",
40
- "url": "git+https://github.com/Algorand-Developer-Retreat/use-wallet-ui.git"
42
+ "url": "git+https://github.com/TxnLab/use-wallet-ui.git"
41
43
  },
42
44
  "bugs": {
43
- "url": "https://github.com/Algorand-Developer-Retreat/use-wallet-ui/issues"
45
+ "url": "https://github.com/TxnLab/use-wallet-ui/issues"
44
46
  },
45
- "homepage": "https://github.com/Algorand-Developer-Retreat/use-wallet-ui#readme",
47
+ "homepage": "https://github.com/TxnLab/use-wallet-ui#readme",
46
48
  "publishConfig": {
47
- "access": "public"
49
+ "access": "public",
50
+ "provenance": true
48
51
  },
49
52
  "engines": {
50
53
  "node": ">=22",
51
54
  "pnpm": ">=9"
52
55
  },
56
+ "scripts": {
57
+ "build": "pnpm generate:css && vite build && publint --strict",
58
+ "dev": "vite build --watch",
59
+ "test": "vitest run",
60
+ "test:watch": "vitest",
61
+ "test:coverage": "vitest run --coverage",
62
+ "lint": "eslint \"**/*.{js,jsx,ts,tsx}\"",
63
+ "format": "prettier --write .",
64
+ "typecheck": "tsc --noEmit",
65
+ "generate:css": "npx @tailwindcss/cli -c ./tailwind.config.js -i ./src/input.css -o ./dist/style.css && node ./scripts/post-process-css.js"
66
+ },
53
67
  "peerDependencies": {
54
68
  "@txnlab/use-wallet-react": "^4.0.1",
55
69
  "react": "^18 || ^19",
@@ -78,16 +92,5 @@
78
92
  "vite-plugin-dts": "4.5.4",
79
93
  "vite-tsconfig-paths": "5.1.4",
80
94
  "vitest": "3.2.4"
81
- },
82
- "scripts": {
83
- "build": "pnpm generate:css && vite build && publint --strict",
84
- "dev": "vite build --watch",
85
- "test": "vitest run",
86
- "test:watch": "vitest",
87
- "test:coverage": "vitest run --coverage",
88
- "lint": "eslint \"**/*.{js,jsx,ts,tsx}\"",
89
- "format": "prettier --write .",
90
- "typecheck": "tsc --noEmit",
91
- "generate:css": "npx @tailwindcss/cli -c ./tailwind.config.js -i ./src/input.css -o ./dist/style.css && node ./scripts/post-process-css.js"
92
95
  }
93
- }
96
+ }
package/src/theme.css ADDED
@@ -0,0 +1,76 @@
1
+ /* Theme CSS custom properties for wallet UI components */
2
+ /* Import this file in Tailwind projects to enable theming */
3
+
4
+ /* Light mode (default) */
5
+ [data-wallet-ui] {
6
+ --wui-color-primary: #2d2df1;
7
+ --wui-color-primary-hover: #2929d9;
8
+ --wui-color-primary-text: #ffffff;
9
+ --wui-color-bg: #ffffff;
10
+ --wui-color-bg-secondary: #f9fafb;
11
+ --wui-color-bg-tertiary: #f3f4f6;
12
+ --wui-color-bg-hover: #e9e9fd;
13
+ --wui-color-text: #1f2937;
14
+ --wui-color-text-secondary: #6b7280;
15
+ --wui-color-text-tertiary: #9ca3af;
16
+ --wui-color-border: #e5e7eb;
17
+ --wui-color-link: rgba(45, 45, 241, 0.8);
18
+ --wui-color-link-hover: #2d2df1;
19
+ --wui-color-overlay: rgba(0, 0, 0, 0.3);
20
+ }
21
+
22
+ /* Dark mode via data-theme attribute (explicit) */
23
+ [data-wallet-ui][data-theme='dark'] {
24
+ --wui-color-primary: #bfbff9;
25
+ --wui-color-primary-hover: #d4d4fa;
26
+ --wui-color-primary-text: #001324;
27
+ --wui-color-bg: #001324;
28
+ --wui-color-bg-secondary: #101b29;
29
+ --wui-color-bg-tertiary: #192a39;
30
+ --wui-color-bg-hover: #192a39;
31
+ --wui-color-text: #e9e9fd;
32
+ --wui-color-text-secondary: #99a1a7;
33
+ --wui-color-text-tertiary: #6b7280;
34
+ --wui-color-border: #192a39;
35
+ --wui-color-link: #6c6cf1;
36
+ --wui-color-link-hover: #8080f3;
37
+ --wui-color-overlay: rgba(0, 0, 0, 0.5);
38
+ }
39
+
40
+ /* Dark mode via .dark class on ancestor (Tailwind convention) */
41
+ .dark [data-wallet-ui]:not([data-theme='light']) {
42
+ --wui-color-primary: #bfbff9;
43
+ --wui-color-primary-hover: #d4d4fa;
44
+ --wui-color-primary-text: #001324;
45
+ --wui-color-bg: #001324;
46
+ --wui-color-bg-secondary: #101b29;
47
+ --wui-color-bg-tertiary: #192a39;
48
+ --wui-color-bg-hover: #192a39;
49
+ --wui-color-text: #e9e9fd;
50
+ --wui-color-text-secondary: #99a1a7;
51
+ --wui-color-text-tertiary: #6b7280;
52
+ --wui-color-border: #192a39;
53
+ --wui-color-link: #6c6cf1;
54
+ --wui-color-link-hover: #8080f3;
55
+ --wui-color-overlay: rgba(0, 0, 0, 0.5);
56
+ }
57
+
58
+ /* Dark mode via system preference (when theme="system" or no explicit theme) */
59
+ @media (prefers-color-scheme: dark) {
60
+ [data-wallet-ui]:not([data-theme='light']):not([data-theme='dark']) {
61
+ --wui-color-primary: #bfbff9;
62
+ --wui-color-primary-hover: #d4d4fa;
63
+ --wui-color-primary-text: #001324;
64
+ --wui-color-bg: #001324;
65
+ --wui-color-bg-secondary: #101b29;
66
+ --wui-color-bg-tertiary: #192a39;
67
+ --wui-color-bg-hover: #192a39;
68
+ --wui-color-text: #e9e9fd;
69
+ --wui-color-text-secondary: #99a1a7;
70
+ --wui-color-text-tertiary: #6b7280;
71
+ --wui-color-border: #192a39;
72
+ --wui-color-link: #6c6cf1;
73
+ --wui-color-link-hover: #8080f3;
74
+ --wui-color-overlay: rgba(0, 0, 0, 0.5);
75
+ }
76
+ }
package/LICENSE DELETED
@@ -1,21 +0,0 @@
1
- MIT License
2
-
3
- Copyright (c) 2025 TxnLab, Inc.
4
-
5
- Permission is hereby granted, free of charge, to any person obtaining a copy
6
- of this software and associated documentation files (the "Software"), to deal
7
- in the Software without restriction, including without limitation the rights
8
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
- copies of the Software, and to permit persons to whom the Software is
10
- furnished to do so, subject to the following conditions:
11
-
12
- The above copyright notice and this permission notice shall be included in all
13
- copies or substantial portions of the Software.
14
-
15
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
- SOFTWARE.