verant_id_cloud_scan 1.4.4-beta.0 → 1.4.4-beta.1

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/dmv-modal.css ADDED
@@ -0,0 +1,512 @@
1
+ /* ===========================
2
+ DMV Verification Modal Styles
3
+ =========================== */
4
+
5
+ /* CSS Custom Properties for easy theming */
6
+ .verant-dmv-overlay {
7
+ /* Color variables */
8
+ --verant-primary-color: #0074CB;
9
+ --verant-success-color: #28a745;
10
+ --verant-warning-color: #ffc107;
11
+ --verant-error-color: #dc3545;
12
+
13
+ /* Background colors */
14
+ --verant-overlay-bg: rgba(0, 0, 0, 0.6);
15
+ --verant-modal-bg: white;
16
+ --verant-info-box-bg: #f8f9fa;
17
+ --verant-text-color: #333;
18
+ --verant-text-secondary: #555;
19
+ --verant-text-muted: #666;
20
+
21
+ /* Borders */
22
+ --verant-border-color: #0074cb;
23
+ --verant-border-radius: 8px;
24
+
25
+ /* Typography */
26
+ --verant-font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
27
+
28
+ /* Spacing */
29
+ --verant-modal-padding: 30px;
30
+ --verant-header-padding: 20px;
31
+ }
32
+
33
+ /* ===========================
34
+ Overlay
35
+ =========================== */
36
+ .verant-dmv-overlay {
37
+ position: fixed;
38
+ top: 0;
39
+ left: 0;
40
+ width: 100%;
41
+ height: 100%;
42
+ background: var(--verant-overlay-bg);
43
+ backdrop-filter: blur(3px);
44
+ display: flex;
45
+ align-items: center;
46
+ justify-content: center;
47
+ z-index: 100000;
48
+ animation: verant-fade-in 0.2s ease;
49
+ font-family: var(--verant-font-family);
50
+ }
51
+
52
+ @keyframes verant-fade-in {
53
+ from { opacity: 0; }
54
+ to { opacity: 1; }
55
+ }
56
+
57
+ /* ===========================
58
+ Modal Container
59
+ =========================== */
60
+ .verant-dmv-modal {
61
+ background: var(--verant-modal-bg);
62
+ border-radius: var(--verant-border-radius);
63
+ width: 90%;
64
+ max-width: 600px;
65
+ max-height: 90vh;
66
+ box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
67
+ overflow: hidden;
68
+ animation: verant-slide-up 0.3s ease;
69
+ display: flex;
70
+ flex-direction: column;
71
+ }
72
+
73
+ @keyframes verant-slide-up {
74
+ from {
75
+ opacity: 0;
76
+ transform: translateY(20px);
77
+ }
78
+ to {
79
+ opacity: 1;
80
+ transform: translateY(0);
81
+ }
82
+ }
83
+
84
+ /* ===========================
85
+ Header
86
+ =========================== */
87
+ .verant-dmv-header {
88
+ /* background-color set inline via JS (primaryColor) */
89
+ color: white;
90
+ padding: var(--verant-header-padding);
91
+ display: flex;
92
+ justify-content: space-between;
93
+ align-items: center;
94
+ }
95
+
96
+ .verant-dmv-header h3 {
97
+ margin: 0;
98
+ font-size: 20px;
99
+ font-weight: 500;
100
+ }
101
+
102
+ .verant-dmv-close {
103
+ background: none;
104
+ border: none;
105
+ color: white;
106
+ font-size: 32px;
107
+ cursor: pointer;
108
+ padding: 0;
109
+ line-height: 1;
110
+ width: 32px;
111
+ height: 32px;
112
+ display: flex;
113
+ align-items: center;
114
+ justify-content: center;
115
+ transition: opacity 0.2s ease;
116
+ }
117
+
118
+ .verant-dmv-close:hover {
119
+ opacity: 0.8;
120
+ }
121
+
122
+ .verant-dmv-close:focus {
123
+ outline: 2px solid white;
124
+ outline-offset: 2px;
125
+ }
126
+
127
+ /* ===========================
128
+ Body
129
+ =========================== */
130
+ .verant-dmv-body {
131
+ padding: var(--verant-modal-padding);
132
+ overflow-y: auto;
133
+ flex: 1;
134
+ }
135
+
136
+ .verant-dmv-question {
137
+ font-size: 18px;
138
+ margin: 0 0 20px 0;
139
+ text-align: left;
140
+ color: var(--verant-text-color);
141
+ font-weight: 500;
142
+ }
143
+
144
+ /* ===========================
145
+ Info Box (Confirmation Screen)
146
+ =========================== */
147
+ .verant-dmv-info-box {
148
+ border: 1px solid var(--verant-border-color);
149
+ border-radius: 6px;
150
+ padding: 15px;
151
+ margin-bottom: 25px;
152
+ max-height: 400px;
153
+ overflow-y: auto;
154
+ }
155
+
156
+ .verant-dmv-info-box p {
157
+ margin: 8px 0;
158
+ font-size: 15px;
159
+ color: var(--verant-text-secondary);
160
+ }
161
+
162
+ .verant-dmv-info-box strong {
163
+ color: var(--verant-text-color);
164
+ }
165
+
166
+ /* Two-column grid for driver data */
167
+ .verant-dmv-data-grid {
168
+ display: grid;
169
+ grid-template-columns: 1fr 1fr;
170
+ gap: 20px;
171
+ }
172
+
173
+ .verant-dmv-data-column {
174
+ display: flex;
175
+ flex-direction: column;
176
+ }
177
+
178
+ .verant-dmv-data-column p {
179
+ margin: 6px 0;
180
+ font-size: 14px;
181
+ line-height: 1.6;
182
+ text-align: left;
183
+ }
184
+
185
+ /* Scrollbar styling for info box */
186
+ .verant-dmv-info-box::-webkit-scrollbar {
187
+ width: 8px;
188
+ }
189
+
190
+ .verant-dmv-info-box::-webkit-scrollbar-track {
191
+ background: #f1f1f1;
192
+ border-radius: 4px;
193
+ }
194
+
195
+ .verant-dmv-info-box::-webkit-scrollbar-thumb {
196
+ background: #888;
197
+ border-radius: 4px;
198
+ }
199
+
200
+ .verant-dmv-info-box::-webkit-scrollbar-thumb:hover {
201
+ background: #555;
202
+ }
203
+
204
+ /* ===========================
205
+ Loading State
206
+ =========================== */
207
+ .verant-dmv-loading {
208
+ text-align: center;
209
+ padding: 50px 20px;
210
+ }
211
+
212
+ .verant-dmv-spinner {
213
+ border: 4px solid #f3f3f3;
214
+ /* border-top-color set inline via JS (primaryColor) */
215
+ border-radius: 50%;
216
+ width: 50px;
217
+ height: 50px;
218
+ animation: verant-spin 1s linear infinite;
219
+ margin: 0 auto 20px;
220
+ }
221
+
222
+ @keyframes verant-spin {
223
+ 0% { transform: rotate(0deg); }
224
+ 100% { transform: rotate(360deg); }
225
+ }
226
+
227
+ .verant-dmv-loading p {
228
+ font-size: 16px;
229
+ color: var(--verant-text-muted);
230
+ margin: 0;
231
+ }
232
+
233
+ /* ===========================
234
+ Results Screen
235
+ =========================== */
236
+ .verant-dmv-result {
237
+ text-align: center;
238
+ padding: 10px 0;
239
+ }
240
+
241
+ .verant-dmv-result h3 {
242
+ font-size: 22px;
243
+ margin: 0 0 25px 0;
244
+ font-weight: 600;
245
+ }
246
+
247
+ .verant-dmv-result.success h3 {
248
+ color: var(--verant-success-color);
249
+ }
250
+
251
+ .verant-dmv-result.warning h3 {
252
+ color: var(--verant-warning-color);
253
+ }
254
+
255
+ .verant-dmv-result.error h3 {
256
+ color: var(--verant-error-color);
257
+ }
258
+
259
+ .verant-dmv-result h4 {
260
+ font-size: 16px;
261
+ text-align: left;
262
+ margin: 0 0 10px 0;
263
+ color: var(--verant-text-color);
264
+ font-weight: 600;
265
+ }
266
+
267
+ .verant-dmv-result p {
268
+ color: var(--verant-text-muted);
269
+ font-size: 15px;
270
+ }
271
+
272
+ /* ===========================
273
+ Field List (Results Screen)
274
+ =========================== */
275
+
276
+ /* Container for results with scrolling */
277
+ .verant-dmv-results-container {
278
+ max-height: 350px;
279
+ overflow-y: auto;
280
+ margin-bottom: 20px;
281
+ }
282
+
283
+ /* Two-column grid for results */
284
+ .verant-dmv-results-grid {
285
+ display: grid;
286
+ grid-template-columns: 1fr 1fr;
287
+ gap: 15px;
288
+ }
289
+
290
+ .verant-dmv-fields-column {
291
+ list-style: none;
292
+ padding: 0;
293
+ margin: 0;
294
+ text-align: left;
295
+ }
296
+
297
+ .verant-dmv-field-item {
298
+ padding: 5px 10px;
299
+ }
300
+
301
+ .verant-dmv-field-item:last-child {
302
+ border-bottom: none;
303
+ }
304
+
305
+ .verant-dmv-field-header {
306
+ display: flex;
307
+ justify-content: space-between;
308
+ align-items: center;
309
+ margin-bottom: 4px;
310
+ }
311
+
312
+ .verant-dmv-field-label {
313
+ font-weight: bold;
314
+ color: #000;
315
+ font-size: 14px;
316
+ }
317
+
318
+ .verant-dmv-field-value {
319
+ color: #000;
320
+ font-weight: normal;
321
+ font-size: 14px;
322
+ padding-left: 0;
323
+ }
324
+
325
+ .verant-dmv-field-icon {
326
+ font-size: 16px;
327
+ font-weight: bold;
328
+ }
329
+
330
+ .verant-dmv-field-icon.match {
331
+ color: var(--verant-success-color);
332
+ }
333
+
334
+ .verant-dmv-field-icon.mismatch {
335
+ color: var(--verant-error-color);
336
+ }
337
+
338
+ /* Scrollbar for results container */
339
+ .verant-dmv-results-container::-webkit-scrollbar {
340
+ width: 8px;
341
+ }
342
+
343
+ .verant-dmv-results-container::-webkit-scrollbar-track {
344
+ background: #f1f1f1;
345
+ border-radius: 4px;
346
+ }
347
+
348
+ .verant-dmv-results-container::-webkit-scrollbar-thumb {
349
+ background: #888;
350
+ border-radius: 4px;
351
+ }
352
+
353
+ .verant-dmv-results-container::-webkit-scrollbar-thumb:hover {
354
+ background: #555;
355
+ }
356
+
357
+ /* Legacy support for old single-column layout (if needed) */
358
+ .verant-dmv-fields {
359
+ list-style: none;
360
+ padding: 0;
361
+ margin: 0 0 20px 0;
362
+ text-align: left;
363
+ }
364
+
365
+ .verant-dmv-fields li {
366
+ padding: 10px;
367
+ border-bottom: 1px solid #eee;
368
+ font-size: 15px;
369
+ }
370
+
371
+ .verant-dmv-fields li:last-child {
372
+ border-bottom: none;
373
+ }
374
+
375
+ .verant-dmv-fields li.match {
376
+ color: var(--verant-success-color);
377
+ }
378
+
379
+ .verant-dmv-fields li.mismatch {
380
+ color: var(--verant-error-color);
381
+ }
382
+
383
+ /* ===========================
384
+ Action Buttons
385
+ =========================== */
386
+ .verant-dmv-actions {
387
+ display: flex;
388
+ gap: 12px;
389
+ justify-content: flex-end;
390
+ margin-top: 25px;
391
+ }
392
+
393
+ .verant-dmv-btn-primary,
394
+ .verant-dmv-btn-secondary {
395
+ padding: 12px 24px;
396
+ border: none;
397
+ border-radius: 6px;
398
+ font-size: 16px;
399
+ font-weight: 500;
400
+ cursor: pointer;
401
+ transition: all 0.2s ease;
402
+ font-family: inherit;
403
+ }
404
+
405
+ .verant-dmv-btn-primary {
406
+ /* background-color set inline via JS (primaryColor) */
407
+ color: white;
408
+ }
409
+
410
+ .verant-dmv-btn-primary:hover {
411
+ opacity: 0.9;
412
+ transform: translateY(-1px);
413
+ box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
414
+ }
415
+
416
+ .verant-dmv-btn-primary:focus {
417
+ outline: 2px solid var(--verant-primary-color);
418
+ outline-offset: 2px;
419
+ }
420
+
421
+ .verant-dmv-btn-secondary {
422
+ background: white;
423
+ color: var(--verant-text-muted);
424
+ border: 2px solid #ddd;
425
+ }
426
+
427
+ .verant-dmv-btn-secondary:hover {
428
+ background: #f8f9fa;
429
+ border-color: #999;
430
+ }
431
+
432
+ .verant-dmv-btn-secondary:focus {
433
+ outline: 2px solid #999;
434
+ outline-offset: 2px;
435
+ }
436
+
437
+ /* ===========================
438
+ Mobile Responsive
439
+ =========================== */
440
+ @media (max-width: 600px) {
441
+ .verant-dmv-modal {
442
+ width: 95%;
443
+ max-width: none;
444
+ }
445
+
446
+ .verant-dmv-body {
447
+ padding: 20px;
448
+ }
449
+
450
+ /* Stack data grid columns on mobile */
451
+ .verant-dmv-data-grid {
452
+ grid-template-columns: 1fr;
453
+ gap: 10px;
454
+ }
455
+
456
+ /* Stack results grid columns on mobile */
457
+ .verant-dmv-results-grid {
458
+ grid-template-columns: 1fr;
459
+ gap: 10px;
460
+ }
461
+
462
+ .verant-dmv-actions {
463
+ flex-direction: column;
464
+ }
465
+
466
+ .verant-dmv-btn-primary,
467
+ .verant-dmv-btn-secondary {
468
+ width: 100%;
469
+ }
470
+ }
471
+
472
+ /* ===========================
473
+ Accessibility Improvements
474
+ =========================== */
475
+ .verant-dmv-modal:focus {
476
+ outline: none;
477
+ }
478
+
479
+ /* Ensure text is readable */
480
+ .verant-dmv-modal * {
481
+ line-height: 1.2;
482
+ }
483
+
484
+ /* High contrast mode support */
485
+ @media (prefers-contrast: high) {
486
+ .verant-dmv-overlay {
487
+ --verant-overlay-bg: rgba(0, 0, 0, 0.85);
488
+ }
489
+
490
+ .verant-dmv-info-box {
491
+ border: 2px solid var(--verant-border-color);
492
+ }
493
+
494
+ .verant-dmv-btn-secondary {
495
+ border-width: 3px;
496
+ }
497
+ }
498
+
499
+ /* Reduced motion support */
500
+ @media (prefers-reduced-motion: reduce) {
501
+ .verant-dmv-overlay,
502
+ .verant-dmv-modal,
503
+ .verant-dmv-btn-primary,
504
+ .verant-dmv-btn-secondary {
505
+ animation: none;
506
+ transition: none;
507
+ }
508
+
509
+ .verant-dmv-spinner {
510
+ animation: verant-spin 2s linear infinite; /* Slower spin */
511
+ }
512
+ }
package/index.d.ts CHANGED
@@ -46,6 +46,7 @@ declare module "verant_id_cloud_scan" {
46
46
  export function localContinueScanId(
47
47
  scannerAddress: string,
48
48
  includeData: boolean,
49
+ clientId?: string | null,
49
50
  skipBackScan?: boolean
50
51
  ): Promise<{
51
52
  barcodeResultsObject: any;
@@ -54,5 +55,3 @@ declare module "verant_id_cloud_scan" {
54
55
  errorMessages: string;
55
56
  }>;
56
57
  }
57
-
58
- export function scannerPresent(scannerAddress: string): Promise<boolean>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "verant_id_cloud_scan",
3
- "version": "1.4.4-beta.0",
3
+ "version": "1.4.4-beta.1",
4
4
  "description": "Verant ID Cloud Scan NPM Library",
5
5
  "main": "CloudScan.js",
6
6
  "types": "index.d.ts",