@formstr/signer 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,263 @@
1
+ /*
2
+ * @formstr/signer default stylesheet. Opt-in: `import '@formstr/signer/styles.css'`.
3
+ * Override any class in your own CSS to restyle. See README for the full BEM
4
+ * class catalog.
5
+ */
6
+
7
+ .nostr-signer__root {
8
+ position: fixed;
9
+ inset: 0;
10
+ background: rgba(0, 0, 0, 0.45);
11
+ display: flex;
12
+ align-items: center;
13
+ justify-content: center;
14
+ z-index: 9999;
15
+ font-family: ui-sans-serif, system-ui, sans-serif;
16
+ line-height: 1.5;
17
+ }
18
+
19
+ .nostr-signer__modal {
20
+ background: #fff;
21
+ color: #1a1a1a;
22
+ border-radius: 12px;
23
+ padding: 24px;
24
+ max-width: 480px;
25
+ width: 90%;
26
+ max-height: 90vh;
27
+ overflow-y: auto;
28
+ box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
29
+ box-sizing: border-box;
30
+ }
31
+
32
+ .nostr-signer__header {
33
+ display: flex;
34
+ align-items: center;
35
+ justify-content: space-between;
36
+ margin: 0 0 16px 0;
37
+ }
38
+
39
+ .nostr-signer__title {
40
+ margin: 0;
41
+ font-size: 1.25rem;
42
+ font-weight: 600;
43
+ }
44
+
45
+ .nostr-signer__close {
46
+ background: transparent;
47
+ border: none;
48
+ font-size: 1.4rem;
49
+ line-height: 1;
50
+ cursor: pointer;
51
+ padding: 4px 10px;
52
+ border-radius: 6px;
53
+ color: inherit;
54
+ }
55
+ .nostr-signer__close:hover {
56
+ background: rgba(0, 0, 0, 0.06);
57
+ }
58
+
59
+ .nostr-signer__tabs {
60
+ display: flex;
61
+ flex-wrap: wrap;
62
+ gap: 2px;
63
+ border-bottom: 1px solid #e4e4e7;
64
+ margin-bottom: 16px;
65
+ }
66
+
67
+ .nostr-signer__tab {
68
+ padding: 8px 12px;
69
+ border: none;
70
+ background: transparent;
71
+ cursor: pointer;
72
+ font: inherit;
73
+ color: #6b7280;
74
+ border-bottom: 2px solid transparent;
75
+ margin-bottom: -1px;
76
+ }
77
+ .nostr-signer__tab:hover {
78
+ color: #1a1a1a;
79
+ }
80
+ .nostr-signer__tab--active {
81
+ color: #2563eb;
82
+ border-bottom-color: #2563eb;
83
+ font-weight: 600;
84
+ }
85
+
86
+ .nostr-signer__panel {
87
+ margin: 0;
88
+ }
89
+
90
+ .nostr-signer__form {
91
+ display: flex;
92
+ flex-direction: column;
93
+ gap: 4px;
94
+ }
95
+
96
+ .nostr-signer__hint {
97
+ color: #6b7280;
98
+ font-size: 0.85rem;
99
+ margin: 0 0 12px 0;
100
+ }
101
+
102
+ .nostr-signer__label {
103
+ font-size: 0.85rem;
104
+ color: #6b7280;
105
+ margin-top: 8px;
106
+ }
107
+
108
+ .nostr-signer__input {
109
+ width: 100%;
110
+ padding: 8px 10px;
111
+ border: 1px solid #d4d4d8;
112
+ border-radius: 6px;
113
+ font: inherit;
114
+ font-family: ui-monospace, monospace;
115
+ font-size: 0.85rem;
116
+ background: #fff;
117
+ color: inherit;
118
+ box-sizing: border-box;
119
+ }
120
+ .nostr-signer__input:focus {
121
+ outline: none;
122
+ border-color: #2563eb;
123
+ box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
124
+ }
125
+
126
+ textarea.nostr-signer__input {
127
+ min-height: 80px;
128
+ resize: vertical;
129
+ }
130
+
131
+ .nostr-signer__button {
132
+ padding: 8px 16px;
133
+ border: 1px solid transparent;
134
+ border-radius: 6px;
135
+ cursor: pointer;
136
+ font: inherit;
137
+ font-weight: 500;
138
+ margin-top: 12px;
139
+ }
140
+ .nostr-signer__button--primary {
141
+ background: #2563eb;
142
+ color: #fff;
143
+ }
144
+ .nostr-signer__button--primary:hover {
145
+ background: #1d4ed8;
146
+ }
147
+ .nostr-signer__button--secondary {
148
+ background: transparent;
149
+ color: inherit;
150
+ border-color: #d4d4d8;
151
+ }
152
+ .nostr-signer__button--secondary:hover {
153
+ background: rgba(0, 0, 0, 0.04);
154
+ }
155
+
156
+ .nostr-signer__error {
157
+ margin-top: 12px;
158
+ padding: 8px 12px;
159
+ border-radius: 6px;
160
+ background: #fee2e2;
161
+ color: #b91c1c;
162
+ font-size: 0.85rem;
163
+ }
164
+
165
+ .nostr-signer__qr {
166
+ margin-top: 12px;
167
+ }
168
+
169
+ .nostr-signer__qr-image {
170
+ display: flex;
171
+ justify-content: center;
172
+ margin: 8px 0;
173
+ }
174
+
175
+ .nostr-signer__qr-image:empty {
176
+ display: none;
177
+ }
178
+
179
+ .nostr-signer__qr-image svg {
180
+ width: 240px;
181
+ height: 240px;
182
+ max-width: 100%;
183
+ background: #ffffff;
184
+ padding: 8px;
185
+ border-radius: 6px;
186
+ }
187
+
188
+ .nostr-signer__qr-uri,
189
+ .nostr-signer__ncryptsec-display {
190
+ background: #f4f4f5;
191
+ padding: 12px;
192
+ border-radius: 6px;
193
+ font-size: 0.75rem;
194
+ font-family: ui-monospace, monospace;
195
+ white-space: pre-wrap;
196
+ word-break: break-all;
197
+ margin: 8px 0 0 0;
198
+ }
199
+
200
+ .nostr-signer__ncryptsec-display {
201
+ background: #fef3c7;
202
+ }
203
+
204
+ .nostr-signer__status {
205
+ color: #6b7280;
206
+ font-size: 0.85rem;
207
+ margin-top: 8px;
208
+ }
209
+
210
+ @media (prefers-color-scheme: dark) {
211
+ .nostr-signer__modal {
212
+ background: #18181b;
213
+ color: #e5e7eb;
214
+ }
215
+ .nostr-signer__tabs {
216
+ border-bottom-color: #2a2a2a;
217
+ }
218
+ .nostr-signer__tab {
219
+ color: #9ca3af;
220
+ }
221
+ .nostr-signer__tab:hover {
222
+ color: #f4f4f5;
223
+ }
224
+ .nostr-signer__tab--active {
225
+ color: #60a5fa;
226
+ border-bottom-color: #60a5fa;
227
+ }
228
+ .nostr-signer__input {
229
+ background: #0b0b0b;
230
+ border-color: #2a2a2a;
231
+ color: inherit;
232
+ }
233
+ .nostr-signer__input:focus {
234
+ border-color: #60a5fa;
235
+ box-shadow: 0 0 0 3px rgba(96, 165, 250, 0.2);
236
+ }
237
+ .nostr-signer__hint,
238
+ .nostr-signer__label,
239
+ .nostr-signer__tab,
240
+ .nostr-signer__status {
241
+ color: #9ca3af;
242
+ }
243
+ .nostr-signer__qr-uri {
244
+ background: #1f1f23;
245
+ }
246
+ .nostr-signer__ncryptsec-display {
247
+ background: #2a2003;
248
+ color: #fde68a;
249
+ }
250
+ .nostr-signer__button--primary {
251
+ background: #2563eb;
252
+ }
253
+ .nostr-signer__button--secondary {
254
+ border-color: #2a2a2a;
255
+ }
256
+ .nostr-signer__close:hover {
257
+ background: rgba(255, 255, 255, 0.06);
258
+ }
259
+ .nostr-signer__error {
260
+ background: rgba(248, 113, 113, 0.12);
261
+ color: #fca5a5;
262
+ }
263
+ }