@react-vault/ui 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.
- package/LICENSE +12 -0
- package/README.md +48 -0
- package/package.json +98 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
Copyright (c) 2026 Rsense. All rights reserved.
|
|
2
|
+
|
|
3
|
+
This software and associated documentation files (the "Software") are the
|
|
4
|
+
proprietary property of Rsense and are licensed for internal use only by
|
|
5
|
+
employees, contractors, and authorised partners of Rsense.
|
|
6
|
+
|
|
7
|
+
No part of the Software may be redistributed, sublicensed, sold, or otherwise
|
|
8
|
+
made available to third parties without prior written consent from Rsense.
|
|
9
|
+
|
|
10
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
11
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
12
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
package/README.md
ADDED
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
# @react-vault/ui
|
|
2
|
+
|
|
3
|
+
React component library on top of Tailwind CSS + shadcn/ui, with BFSI-specific compositions.
|
|
4
|
+
|
|
5
|
+
```tsx
|
|
6
|
+
import { PIIMaskedDisplay, CurrencyDisplay, DateTimeDisplay, cn } from '@react-vault/ui';
|
|
7
|
+
import { tokens } from '@react-vault/ui/theme';
|
|
8
|
+
|
|
9
|
+
// PII masking with click-to-reveal + audit hook
|
|
10
|
+
<PIIMaskedDisplay
|
|
11
|
+
type="pan"
|
|
12
|
+
value={user.pan}
|
|
13
|
+
auditTarget={{ type: 'user', id: user.id }}
|
|
14
|
+
onReveal={() => auditClient.record({ event_name: 'data.pan.revealed', ... })}
|
|
15
|
+
/>
|
|
16
|
+
|
|
17
|
+
// Locale-aware money + dates
|
|
18
|
+
<CurrencyDisplay value={1234567.89} /> // ₹12,34,567.89
|
|
19
|
+
<DateTimeDisplay value={tx.createdAt} preset="datetime" /> // IST
|
|
20
|
+
```
|
|
21
|
+
|
|
22
|
+
## What's inside (v0.1)
|
|
23
|
+
|
|
24
|
+
- `PIIMaskedDisplay` — click-to-reveal PII display with auto re-mask + audit callback
|
|
25
|
+
- `CurrencyDisplay` — Intl-based currency formatter, INR/en-IN default, accounting style option
|
|
26
|
+
- `DateTimeDisplay` — Intl-based date/time formatter, IST default
|
|
27
|
+
- `cn` — class-name composer (clsx + tailwind-merge)
|
|
28
|
+
- `tokens` — BFSI design tokens (status colours, sensitivity tiers)
|
|
29
|
+
|
|
30
|
+
## Coming in v0.2
|
|
31
|
+
|
|
32
|
+
- `ConfirmModal` — confirmation modal with optional MFA challenge slot
|
|
33
|
+
- `SecureFormField` — RHF integration with autocomplete=off + paste guards
|
|
34
|
+
- `AuditedAction` — wraps a button to emit audit event on click
|
|
35
|
+
- `AccessControlledTable` — data table with column-level RBAC + export controls
|
|
36
|
+
- `StatusBadge` — KYC / transaction / audit status indicator
|
|
37
|
+
- `DocumentUploader` — file upload with MIME validation + virus-scan hook
|
|
38
|
+
- `SignatureCapture` — e-signature stub for IRDAI flows
|
|
39
|
+
- `PCITokenizedCardInput` — PCI-DSS-compliant iframe for card capture
|
|
40
|
+
|
|
41
|
+
The full shadcn/ui primitive set (Button, Input, Dialog, Toast, Combobox, etc.) gets installed by the CLI generator into each scaffolded app's `src/components/ui/` — apps own those copies.
|
|
42
|
+
|
|
43
|
+
## Conventions
|
|
44
|
+
|
|
45
|
+
- All components are typed; no `any`.
|
|
46
|
+
- All interactive elements have proper a11y (`aria-*`, focus styles, keyboard).
|
|
47
|
+
- All BFSI components emit `data-target-type` / `data-target-id` so screenshot diffing + audit replay can correlate.
|
|
48
|
+
- All formatters fall back gracefully on null/undefined/NaN to `—`.
|
package/package.json
ADDED
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@react-vault/ui",
|
|
3
|
+
"version": "0.1.0",
|
|
4
|
+
"description": "Tailwind + shadcn/ui + BFSI-specific React components: PIIMaskedDisplay, ConfirmModal, SecureFormField, AccessControlledTable, CurrencyDisplay, DateTimeDisplay, and more.",
|
|
5
|
+
"license": "UNLICENSED",
|
|
6
|
+
"type": "module",
|
|
7
|
+
"sideEffects": [
|
|
8
|
+
"**/*.css"
|
|
9
|
+
],
|
|
10
|
+
"main": "./dist/index.js",
|
|
11
|
+
"module": "./dist/index.js",
|
|
12
|
+
"types": "./dist/index.d.ts",
|
|
13
|
+
"exports": {
|
|
14
|
+
".": {
|
|
15
|
+
"types": "./dist/index.d.ts",
|
|
16
|
+
"import": "./dist/index.js"
|
|
17
|
+
},
|
|
18
|
+
"./primitives": {
|
|
19
|
+
"types": "./dist/primitives/index.d.ts",
|
|
20
|
+
"import": "./dist/primitives/index.js"
|
|
21
|
+
},
|
|
22
|
+
"./bfsi": {
|
|
23
|
+
"types": "./dist/bfsi/index.d.ts",
|
|
24
|
+
"import": "./dist/bfsi/index.js"
|
|
25
|
+
},
|
|
26
|
+
"./theme": {
|
|
27
|
+
"types": "./dist/theme/index.d.ts",
|
|
28
|
+
"import": "./dist/theme/index.js"
|
|
29
|
+
},
|
|
30
|
+
"./formatters": {
|
|
31
|
+
"types": "./dist/formatters/index.d.ts",
|
|
32
|
+
"import": "./dist/formatters/index.js"
|
|
33
|
+
},
|
|
34
|
+
"./styles.css": "./dist/styles.css"
|
|
35
|
+
},
|
|
36
|
+
"files": [
|
|
37
|
+
"dist",
|
|
38
|
+
"README.md"
|
|
39
|
+
],
|
|
40
|
+
"peerDependencies": {
|
|
41
|
+
"react": "18.3.1",
|
|
42
|
+
"react-dom": "18.3.1"
|
|
43
|
+
},
|
|
44
|
+
"dependencies": {
|
|
45
|
+
"class-variance-authority": "0.7.0",
|
|
46
|
+
"clsx": "2.1.1",
|
|
47
|
+
"tailwind-merge": "2.3.0",
|
|
48
|
+
"lucide-react": "0.378.0",
|
|
49
|
+
"date-fns": "3.6.0",
|
|
50
|
+
"@react-vault/core": "0.1.0"
|
|
51
|
+
},
|
|
52
|
+
"devDependencies": {
|
|
53
|
+
"@types/react": "18.3.0",
|
|
54
|
+
"@types/react-dom": "18.3.0",
|
|
55
|
+
"@testing-library/react": "15.0.6",
|
|
56
|
+
"@testing-library/user-event": "14.5.2",
|
|
57
|
+
"@testing-library/jest-dom": "6.4.5",
|
|
58
|
+
"jsdom": "24.0.0",
|
|
59
|
+
"react": "18.3.1",
|
|
60
|
+
"react-dom": "18.3.1",
|
|
61
|
+
"typescript": "5.4.5",
|
|
62
|
+
"vitest": "1.6.0"
|
|
63
|
+
},
|
|
64
|
+
"engines": {
|
|
65
|
+
"node": ">=20.11.0"
|
|
66
|
+
},
|
|
67
|
+
"repository": {
|
|
68
|
+
"type": "git",
|
|
69
|
+
"url": "git+https://github.com/amar-josh/react-vault.git",
|
|
70
|
+
"directory": "packages/ui"
|
|
71
|
+
},
|
|
72
|
+
"homepage": "https://github.com/amar-josh/react-vault#readme",
|
|
73
|
+
"bugs": {
|
|
74
|
+
"url": "https://github.com/amar-josh/react-vault/issues"
|
|
75
|
+
},
|
|
76
|
+
"keywords": [
|
|
77
|
+
"bfsi",
|
|
78
|
+
"fintech",
|
|
79
|
+
"react",
|
|
80
|
+
"tailwind",
|
|
81
|
+
"shadcn",
|
|
82
|
+
"pii-masking",
|
|
83
|
+
"ui-components"
|
|
84
|
+
],
|
|
85
|
+
"publishConfig": {
|
|
86
|
+
"access": "public"
|
|
87
|
+
},
|
|
88
|
+
"scripts": {
|
|
89
|
+
"build": "tsc -p tsconfig.json",
|
|
90
|
+
"dev": "tsc -p tsconfig.json --watch",
|
|
91
|
+
"lint": "eslint src --ext .ts,.tsx",
|
|
92
|
+
"lint:fix": "eslint src --ext .ts,.tsx --fix",
|
|
93
|
+
"test": "vitest run",
|
|
94
|
+
"test:watch": "vitest",
|
|
95
|
+
"typecheck": "tsc -p tsconfig.json --noEmit",
|
|
96
|
+
"clean": "rm -rf dist .tsbuildinfo"
|
|
97
|
+
}
|
|
98
|
+
}
|