entity-react-modals 1.0.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,99 @@
1
+ :root {
2
+ --rm-backdrop-bg: rgba(0, 0, 0, 0.6);
3
+ --rm-panel-bg: #ffffff;
4
+ --rm-panel-radius: 12px;
5
+ --rm-panel-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
6
+ --rm-close-color: #3b82f6;
7
+ --rm-close-hover: #2563eb;
8
+ --rm-header-border: #e2e8f0;
9
+ --rm-footer-border: #e2e8f0;
10
+ }
11
+
12
+ .rm-backdrop {
13
+ position: fixed;
14
+ inset: 0;
15
+ z-index: 9998;
16
+ display: flex;
17
+ align-items: center;
18
+ justify-content: center;
19
+ padding: 20px;
20
+ opacity: 0;
21
+ }
22
+
23
+ .rm-panel {
24
+ position: relative;
25
+ z-index: 9999;
26
+ background: var(--rm-panel-bg);
27
+ border-radius: var(--rm-panel-radius);
28
+ box-shadow: var(--rm-panel-shadow);
29
+ width: 100%;
30
+ opacity: 0;
31
+ transform: scale(0.95);
32
+ overflow: hidden;
33
+ }
34
+
35
+ .rm-panel--sm { max-width: 400px; }
36
+ .rm-panel--md { max-width: 560px; }
37
+ .rm-panel--lg { max-width: 720px; }
38
+ .rm-panel--xl { max-width: 900px; }
39
+
40
+ .rm-header {
41
+ display: flex;
42
+ align-items: center;
43
+ justify-content: space-between;
44
+ padding: 16px 20px;
45
+ border-bottom: 1px solid var(--rm-header-border);
46
+ }
47
+
48
+ .rm-header h2,
49
+ .rm-header h3 {
50
+ margin: 0;
51
+ font-size: 1.125rem;
52
+ font-weight: 600;
53
+ color: #1e293b;
54
+ }
55
+
56
+ .rm-body {
57
+ padding: 20px;
58
+ overflow-y: auto;
59
+ max-height: calc(100vh - 200px);
60
+ }
61
+
62
+ .rm-footer {
63
+ display: flex;
64
+ align-items: center;
65
+ justify-content: flex-end;
66
+ gap: 8px;
67
+ padding: 16px 20px;
68
+ border-top: 1px solid var(--rm-footer-border);
69
+ }
70
+
71
+ .rm-close {
72
+ display: inline-flex;
73
+ align-items: center;
74
+ justify-content: center;
75
+ width: 28px;
76
+ height: 28px;
77
+ padding: 0;
78
+ border: none;
79
+ border-radius: 6px;
80
+ background: transparent;
81
+ color: var(--rm-close-color);
82
+ font-size: 1.25rem;
83
+ line-height: 1;
84
+ cursor: pointer;
85
+ transition: background-color 0.15s ease, color 0.15s ease;
86
+ }
87
+
88
+ .rm-close:hover {
89
+ background: rgba(59, 130, 246, 0.1);
90
+ color: var(--rm-close-hover);
91
+ }
92
+
93
+ @media (prefers-reduced-motion: reduce) {
94
+ .rm-backdrop,
95
+ .rm-panel {
96
+ transition: none !important;
97
+ animation: none !important;
98
+ }
99
+ }
package/package.json ADDED
@@ -0,0 +1,68 @@
1
+ {
2
+ "name": "entity-react-modals",
3
+ "version": "1.0.0",
4
+ "description": "Zero-dependency React modal library with spring physics animations via WAAPI",
5
+ "type": "module",
6
+ "main": "./dist/index.cjs",
7
+ "module": "./dist/index.js",
8
+ "types": "./dist/index.d.ts",
9
+ "exports": {
10
+ ".": {
11
+ "import": {
12
+ "types": "./dist/index.d.ts",
13
+ "default": "./dist/index.js"
14
+ },
15
+ "require": {
16
+ "types": "./dist/index.d.cts",
17
+ "default": "./dist/index.cjs"
18
+ }
19
+ },
20
+ "./styles.css": "./dist/styles.css"
21
+ },
22
+ "sideEffects": [
23
+ "*.css"
24
+ ],
25
+ "files": [
26
+ "dist"
27
+ ],
28
+ "scripts": {
29
+ "build": "tsup",
30
+ "dev": "tsup --watch",
31
+ "prepublishOnly": "npm run build"
32
+ },
33
+ "peerDependencies": {
34
+ "react": ">=18.0.0",
35
+ "react-dom": ">=18.0.0"
36
+ },
37
+ "devDependencies": {
38
+ "@types/react": "^19.2.18",
39
+ "@types/react-dom": "^19.2.4",
40
+ "react": "^19.2.8",
41
+ "react-dom": "^19.2.8",
42
+ "tsup": "^8.4.0",
43
+ "typescript": "~5.7.0"
44
+ },
45
+ "keywords": [
46
+ "react",
47
+ "modal",
48
+ "dialog",
49
+ "spring",
50
+ "animation",
51
+ "waaapi",
52
+ "web-animations",
53
+ "compound-components",
54
+ "zero-dependency"
55
+ ],
56
+ "author": "bazil",
57
+ "license": "MIT",
58
+ "repository": {
59
+ "type": "git",
60
+ "url": "git+https://github.com/BazilSuhail/npm-react-modals.git"
61
+ },
62
+ "publishConfig": {
63
+ "registry": "https://registry.npmjs.org"
64
+ },
65
+ "engines": {
66
+ "node": ">=18"
67
+ }
68
+ }