@snapkyc-ooru/consent-handoff-react 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,710 @@
1
+ /* Tokens are scoped to the SDK root; optional `theme` prop sets the same variables inline. */
2
+ .snap-consent-handoff {
3
+ --snap-consent-font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
4
+ --snap-consent-text: #1c1917;
5
+ --snap-consent-muted: #57534e;
6
+ --snap-consent-bg: #fafaf9;
7
+ --snap-consent-surface: #ffffff;
8
+ --snap-consent-surface-muted: #fff7ed;
9
+ --snap-consent-border: #e7e5e4;
10
+ --snap-consent-border-active: #e87d43;
11
+ --snap-consent-overlay: rgba(28, 25, 23, 0.55);
12
+ --snap-consent-accent: #e87d43;
13
+ --snap-consent-on-primary: #ffffff;
14
+ --snap-consent-danger: #b91c1c;
15
+ --snap-consent-radius: 12px;
16
+ --snap-consent-gap: 12px;
17
+ --snap-consent-max-width: 720px;
18
+ --snap-consent-modal-z: 10000;
19
+ --snap-consent-success: #16a34a;
20
+ --snap-consent-success-status-bg: #fff5f0;
21
+ --snap-consent-success-purposes-bg: #f0f2ff;
22
+ --snap-consent-success-accordion-border: #e0d7d0;
23
+ }
24
+
25
+ .snap-consent-handoff *,
26
+ .snap-consent-handoff *::before,
27
+ .snap-consent-handoff *::after {
28
+ box-sizing: border-box;
29
+ }
30
+
31
+ .snap-consent-handoff_overlay {
32
+ position: fixed;
33
+ inset: 0;
34
+ z-index: var(--snap-consent-modal-z);
35
+ display: flex;
36
+ align-items: center;
37
+ justify-content: center;
38
+ padding: 16px;
39
+ background: var(--snap-consent-overlay);
40
+ }
41
+
42
+ .snap-consent-handoff_body {
43
+ display: flex;
44
+ flex-direction: column;
45
+ align-items: center;
46
+ gap: 10px;
47
+ width: min(100%, var(--snap-consent-max-width));
48
+ }
49
+
50
+ .snap-consent-handoff_sheet {
51
+ width: min(100%, var(--snap-consent-max-width));
52
+ max-height: min(90vh, 900px);
53
+ overflow: auto;
54
+ padding: 20px;
55
+ border-radius: var(--snap-consent-radius);
56
+ font-family: var(--snap-consent-font-family);
57
+ color: var(--snap-consent-text);
58
+ background: var(--snap-consent-bg);
59
+ box-shadow: 0 20px 50px color-mix(in srgb, var(--snap-consent-text) 16%, transparent);
60
+ }
61
+
62
+ .snap-consent-handoff_inline {
63
+ width: min(100%, var(--snap-consent-max-width));
64
+ }
65
+
66
+ .snap-consent-handoff_inline .snap-consent-handoff_sheet {
67
+ padding: 20px;
68
+ border-radius: var(--snap-consent-radius);
69
+ font-family: var(--snap-consent-font-family);
70
+ color: var(--snap-consent-text);
71
+ background: var(--snap-consent-bg);
72
+ border: 1px solid var(--snap-consent-border);
73
+ width: 100%;
74
+ }
75
+
76
+ .snap-consent-handoff_powered {
77
+ display: flex;
78
+ align-items: center;
79
+ justify-content: center;
80
+ flex-wrap: nowrap;
81
+ gap: 10px;
82
+ margin: 0;
83
+ padding: 8px 0 4px;
84
+ font-size: 14px;
85
+ line-height: 1.2;
86
+ font-family: var(--snap-consent-font-family);
87
+ overflow: visible;
88
+ }
89
+
90
+ .snap-consent-handoff_poweredLabel {
91
+ color: var(--snap-consent-muted);
92
+ }
93
+
94
+ .snap-consent-handoff_poweredLogo {
95
+ display: block;
96
+ height: 36px;
97
+ width: auto;
98
+ max-width: none;
99
+ object-fit: contain;
100
+ object-position: left center;
101
+ flex-shrink: 0;
102
+ }
103
+
104
+ .snap-consent-handoff_poweredBrand {
105
+ font-weight: 700;
106
+ color: var(--snap-consent-text);
107
+ letter-spacing: -0.02em;
108
+ }
109
+
110
+ .snap-consent-handoff_overlay .snap-consent-handoff_poweredLabel,
111
+ .snap-consent-handoff_overlay .snap-consent-handoff_poweredBrand {
112
+ color: color-mix(in srgb, var(--snap-consent-on-primary) 92%, transparent);
113
+ }
114
+
115
+ .snap-consent-handoff_hdr {
116
+ display: flex;
117
+ align-items: flex-start;
118
+ justify-content: space-between;
119
+ gap: var(--snap-consent-gap);
120
+ margin-bottom: 12px;
121
+ }
122
+
123
+ .snap-consent-handoff_title {
124
+ margin: 0;
125
+ font-size: 18px;
126
+ line-height: 1.24;
127
+ }
128
+
129
+ .snap-consent-handoff_headingSm {
130
+ margin: 16px 0 10px;
131
+ font-size: 16px;
132
+ font-weight: 700;
133
+ line-height: 1.3;
134
+ color: var(--snap-consent-text);
135
+ }
136
+
137
+ .snap-consent-handoff_btnIcon {
138
+ border: none;
139
+ background: transparent;
140
+ cursor: pointer;
141
+ font-size: 18px;
142
+ line-height: 1;
143
+ padding: 4px;
144
+ color: var(--snap-consent-muted);
145
+ }
146
+
147
+ .snap-consent-handoff_btnIcon:focus-visible {
148
+ outline: 2px solid color-mix(in srgb, var(--snap-consent-accent) 65%, transparent);
149
+ outline-offset: 2px;
150
+ border-radius: 4px;
151
+ }
152
+
153
+ .snap-consent-handoff_muted {
154
+ color: var(--snap-consent-muted);
155
+ }
156
+
157
+ .snap-consent-handoff_notice {
158
+ border: 1px solid color-mix(in srgb, var(--snap-consent-border-active) 38%, var(--snap-consent-border));
159
+ border-radius: var(--snap-consent-radius);
160
+ padding: 14px 16px;
161
+ margin: 12px 0;
162
+ background: var(--snap-consent-surface-muted);
163
+ color: var(--snap-consent-text);
164
+ line-height: 1.45;
165
+ }
166
+
167
+ .snap-consent-handoff_list {
168
+ display: grid;
169
+ gap: 10px;
170
+ margin: 12px 0;
171
+ }
172
+
173
+ .snap-consent-handoff_row {
174
+ display: grid;
175
+ grid-template-columns: 20px 1fr;
176
+ align-items: center;
177
+ gap: 12px;
178
+ padding: 12px 14px;
179
+ border: 1px solid var(--snap-consent-border);
180
+ border-radius: var(--snap-consent-radius);
181
+ background: var(--snap-consent-surface);
182
+ cursor: pointer;
183
+ transition:
184
+ background 0.15s ease,
185
+ border-color 0.15s ease;
186
+ }
187
+
188
+ .snap-consent-handoff_row:hover:not(.snap-consent-handoff_row--disabled) {
189
+ border-color: color-mix(in srgb, var(--snap-consent-border-active) 35%, var(--snap-consent-border));
190
+ }
191
+
192
+ .snap-consent-handoff_row--selected {
193
+ background: var(--snap-consent-surface-muted);
194
+ border-color: var(--snap-consent-border-active);
195
+ }
196
+
197
+ .snap-consent-handoff_row input[type="checkbox"] {
198
+ width: 18px;
199
+ height: 18px;
200
+ margin: 0;
201
+ flex-shrink: 0;
202
+ border-radius: 4px;
203
+ accent-color: var(--snap-consent-accent);
204
+ cursor: pointer;
205
+ }
206
+
207
+ .snap-consent-handoff_row input[type="checkbox"]:disabled {
208
+ cursor: not-allowed;
209
+ opacity: 0.55;
210
+ }
211
+
212
+ .snap-consent-handoff_row--disabled {
213
+ cursor: not-allowed;
214
+ opacity: 0.75;
215
+ }
216
+
217
+ .snap-consent-handoff_actions {
218
+ display: flex;
219
+ flex-wrap: wrap;
220
+ gap: 10px;
221
+ margin-top: 16px;
222
+ justify-content: flex-end;
223
+ }
224
+
225
+ .snap-consent-handoff_actions--split {
226
+ justify-content: flex-end;
227
+ flex-wrap: nowrap;
228
+ }
229
+
230
+ .snap-consent-handoff_btnPrimary {
231
+ border: none;
232
+ border-radius: var(--snap-consent-radius);
233
+ padding: 12px 20px;
234
+ min-width: min(100%, 200px);
235
+ cursor: pointer;
236
+ color: var(--snap-consent-on-primary);
237
+ font-weight: 700;
238
+ font-family: inherit;
239
+ font-size: 15px;
240
+ background: linear-gradient(
241
+ 180deg,
242
+ color-mix(in srgb, var(--snap-consent-accent) 88%, #ffffff) 0%,
243
+ color-mix(in srgb, var(--snap-consent-accent) 92%, #000000) 100%
244
+ );
245
+ box-shadow: 0 1px 2px color-mix(in srgb, var(--snap-consent-text) 12%, transparent);
246
+ }
247
+
248
+ .snap-consent-handoff_btnPrimary:hover:not(:disabled) {
249
+ filter: brightness(1.03);
250
+ }
251
+
252
+ .snap-consent-handoff_btnPrimary:active:not(:disabled) {
253
+ filter: brightness(0.97);
254
+ }
255
+
256
+ .snap-consent-handoff_btnPrimary:disabled {
257
+ opacity: 0.55;
258
+ cursor: not-allowed;
259
+ }
260
+
261
+ .snap-consent-handoff_btnPrimary:focus-visible {
262
+ outline: 2px solid color-mix(in srgb, var(--snap-consent-accent) 55%, transparent);
263
+ outline-offset: 2px;
264
+ }
265
+
266
+ .snap-consent-handoff_btnSecondary {
267
+ border: 1px solid var(--snap-consent-border);
268
+ border-radius: var(--snap-consent-radius);
269
+ padding: 10px 14px;
270
+ cursor: pointer;
271
+ background: var(--snap-consent-surface);
272
+ font-weight: 600;
273
+ font-family: inherit;
274
+ color: var(--snap-consent-text);
275
+ }
276
+
277
+ .snap-consent-handoff_btnSecondary:hover {
278
+ background: color-mix(in srgb, var(--snap-consent-surface-muted) 55%, var(--snap-consent-surface));
279
+ }
280
+
281
+ .snap-consent-handoff_btnSecondary:focus-visible {
282
+ outline: 2px solid color-mix(in srgb, var(--snap-consent-accent) 45%, transparent);
283
+ outline-offset: 2px;
284
+ }
285
+
286
+ .snap-consent-handoff_btnSecondary:disabled {
287
+ opacity: 0.55;
288
+ cursor: not-allowed;
289
+ }
290
+
291
+ .snap-consent-handoff_err {
292
+ color: var(--snap-consent-danger);
293
+ white-space: pre-wrap;
294
+ }
295
+
296
+ .snap-consent-handoff_qr {
297
+ display: grid;
298
+ place-items: center;
299
+ }
300
+
301
+ .snap-consent-handoff_qr img {
302
+ width: min(360px, 100%);
303
+ height: auto;
304
+ image-rendering: pixelated;
305
+ }
306
+
307
+ .snap-consent-handoff_intents {
308
+ display: grid;
309
+ gap: 10px;
310
+ margin-top: 12px;
311
+ }
312
+
313
+ .snap-consent-handoff_codeBox {
314
+ width: 100%;
315
+ resize: vertical;
316
+ min-height: 84px;
317
+ padding: 10px;
318
+ border-radius: var(--snap-consent-radius);
319
+ border: 1px solid var(--snap-consent-border);
320
+ background: var(--snap-consent-surface);
321
+ color: var(--snap-consent-text);
322
+ font-family:
323
+ ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
324
+ font-size: 12px;
325
+ }
326
+
327
+ .snap-consent-handoff_demographics {
328
+ margin-top: 16px;
329
+ }
330
+
331
+ .snap-consent-handoff_demoGrid {
332
+ display: grid;
333
+ gap: 16px;
334
+ }
335
+
336
+ @media (min-width: 520px) {
337
+ .snap-consent-handoff_demoGrid {
338
+ grid-template-columns: auto 1fr;
339
+ align-items: start;
340
+ }
341
+ }
342
+
343
+ .snap-consent-handoff_demoPhoto img {
344
+ width: 120px;
345
+ height: 120px;
346
+ object-fit: cover;
347
+ border-radius: var(--snap-consent-radius);
348
+ border: 1px solid var(--snap-consent-border);
349
+ background: color-mix(in srgb, var(--snap-consent-muted) 12%, var(--snap-consent-surface));
350
+ }
351
+
352
+ .snap-consent-handoff_demoFields {
353
+ margin: 0;
354
+ display: grid;
355
+ gap: 10px;
356
+ }
357
+
358
+ .snap-consent-handoff_demoRow {
359
+ display: grid;
360
+ gap: 2px;
361
+ }
362
+
363
+ .snap-consent-handoff_demoRow dt {
364
+ margin: 0;
365
+ font-size: 12px;
366
+ font-weight: 600;
367
+ color: var(--snap-consent-muted);
368
+ }
369
+
370
+ .snap-consent-handoff_demoRow dd {
371
+ margin: 0;
372
+ font-size: 14px;
373
+ line-height: 1.35;
374
+ word-break: break-word;
375
+ }
376
+
377
+ .snap-consent-handoff_successBody {
378
+ display: grid;
379
+ gap: 16px;
380
+ margin-top: 0;
381
+ min-height: 0;
382
+ }
383
+
384
+ .snap-consent-handoff_successHero {
385
+ display: flex;
386
+ align-items: flex-start;
387
+ gap: 14px;
388
+ text-align: left;
389
+ }
390
+
391
+ .snap-consent-handoff_successBadge {
392
+ display: grid;
393
+ place-items: center;
394
+ width: 52px;
395
+ height: 52px;
396
+ flex-shrink: 0;
397
+ border-radius: 50%;
398
+ background: var(--snap-consent-success);
399
+ color: var(--snap-consent-on-primary);
400
+ }
401
+
402
+ .snap-consent-handoff_successHeroText {
403
+ min-width: 0;
404
+ }
405
+
406
+ .snap-consent-handoff_successTitle {
407
+ margin: 0 0 6px;
408
+ font-size: 20px;
409
+ font-weight: 700;
410
+ line-height: 1.25;
411
+ color: var(--snap-consent-text);
412
+ }
413
+
414
+ .snap-consent-handoff_successSubtitle {
415
+ margin: 0;
416
+ font-size: 15px;
417
+ line-height: 1.45;
418
+ color: var(--snap-consent-muted);
419
+ }
420
+
421
+ .snap-consent-handoff_statusStrip {
422
+ display: grid;
423
+ grid-template-columns: 1fr 1fr;
424
+ gap: 12px 20px;
425
+ padding: 14px 16px;
426
+ border-radius: var(--snap-consent-radius);
427
+ background: var(--snap-consent-success-status-bg);
428
+ border: 1px solid color-mix(in srgb, var(--snap-consent-accent) 22%, var(--snap-consent-border));
429
+ }
430
+
431
+ .snap-consent-handoff_statusStripCol--end {
432
+ text-align: right;
433
+ }
434
+
435
+ .snap-consent-handoff_statusLabel {
436
+ margin: 0 0 6px;
437
+ font-size: 11px;
438
+ font-weight: 700;
439
+ letter-spacing: 0.08em;
440
+ text-transform: uppercase;
441
+ color: var(--snap-consent-accent);
442
+ }
443
+
444
+ .snap-consent-handoff_statusLabel--neutral {
445
+ color: var(--snap-consent-muted);
446
+ }
447
+
448
+ .snap-consent-handoff_statusValue {
449
+ margin: 0;
450
+ display: inline-flex;
451
+ align-items: center;
452
+ gap: 8px;
453
+ font-size: 16px;
454
+ font-weight: 700;
455
+ color: color-mix(in srgb, var(--snap-consent-accent) 55%, var(--snap-consent-text));
456
+ }
457
+
458
+ .snap-consent-handoff_statusCheck {
459
+ display: grid;
460
+ place-items: center;
461
+ width: 22px;
462
+ height: 22px;
463
+ border-radius: 50%;
464
+ background: color-mix(in srgb, var(--snap-consent-success) 18%, transparent);
465
+ color: var(--snap-consent-success);
466
+ }
467
+
468
+ .snap-consent-handoff_statusMeta {
469
+ margin: 0;
470
+ font-size: 13px;
471
+ line-height: 1.4;
472
+ color: var(--snap-consent-text);
473
+ word-break: break-word;
474
+ }
475
+
476
+ .snap-consent-handoff_purposeCard {
477
+ padding: 14px 16px 16px;
478
+ border-radius: var(--snap-consent-radius);
479
+ background: var(--snap-consent-success-purposes-bg);
480
+ border: 1px solid color-mix(in srgb, var(--snap-consent-text) 8%, var(--snap-consent-border));
481
+ }
482
+
483
+ .snap-consent-handoff_successSectionTitle {
484
+ margin: 0 0 12px;
485
+ display: flex;
486
+ align-items: center;
487
+ gap: 8px;
488
+ font-size: 16px;
489
+ font-weight: 700;
490
+ color: var(--snap-consent-text);
491
+ }
492
+
493
+ .snap-consent-handoff_successSectionIcon {
494
+ display: grid;
495
+ place-items: center;
496
+ color: var(--snap-consent-accent);
497
+ flex-shrink: 0;
498
+ }
499
+
500
+ .snap-consent-handoff_purposeGrid {
501
+ list-style: none;
502
+ margin: 0;
503
+ padding: 0;
504
+ display: grid;
505
+ gap: 10px 18px;
506
+ grid-template-columns: 1fr;
507
+ }
508
+
509
+ @media (min-width: 480px) {
510
+ .snap-consent-handoff_purposeGrid {
511
+ grid-template-columns: 1fr 1fr;
512
+ }
513
+ }
514
+
515
+ .snap-consent-handoff_purposeGridItem {
516
+ display: flex;
517
+ align-items: flex-start;
518
+ gap: 8px;
519
+ font-size: 14px;
520
+ font-weight: 600;
521
+ line-height: 1.35;
522
+ color: var(--snap-consent-text);
523
+ }
524
+
525
+ .snap-consent-handoff_purposeCheck {
526
+ flex-shrink: 0;
527
+ margin-top: 1px;
528
+ color: var(--snap-consent-accent);
529
+ }
530
+
531
+ .snap-consent-handoff_successNoDemo {
532
+ margin: 0;
533
+ }
534
+
535
+ .snap-consent-handoff_accordionList {
536
+ display: grid;
537
+ gap: 10px;
538
+ }
539
+
540
+ .snap-consent-handoff_accordion {
541
+ border: 1px solid var(--snap-consent-success-accordion-border);
542
+ border-radius: var(--snap-consent-radius);
543
+ background: var(--snap-consent-surface);
544
+ overflow: hidden;
545
+ }
546
+
547
+ .snap-consent-handoff_accordionHeader {
548
+ width: 100%;
549
+ display: flex;
550
+ align-items: center;
551
+ justify-content: space-between;
552
+ gap: 12px;
553
+ padding: 14px 16px;
554
+ margin: 0;
555
+ border: none;
556
+ background: transparent;
557
+ cursor: pointer;
558
+ font: inherit;
559
+ text-align: left;
560
+ }
561
+
562
+ .snap-consent-handoff_accordionHeader:focus-visible {
563
+ outline: 2px solid color-mix(in srgb, var(--snap-consent-accent) 45%, transparent);
564
+ outline-offset: -2px;
565
+ }
566
+
567
+ .snap-consent-handoff_accordionTitle {
568
+ font-size: 15px;
569
+ font-weight: 700;
570
+ color: var(--snap-consent-text);
571
+ }
572
+
573
+ .snap-consent-handoff_accordionChevron {
574
+ display: grid;
575
+ place-items: center;
576
+ color: var(--snap-consent-muted);
577
+ transition: transform 0.2s ease;
578
+ }
579
+
580
+ .snap-consent-handoff_accordionChevron--open {
581
+ transform: rotate(180deg);
582
+ }
583
+
584
+ .snap-consent-handoff_accordionPanel {
585
+ display: none;
586
+ border-top: 1px solid var(--snap-consent-success-accordion-border);
587
+ padding: 14px 16px 16px;
588
+ }
589
+
590
+ .snap-consent-handoff_accordionPanel--open {
591
+ display: block;
592
+ }
593
+
594
+ .snap-consent-handoff_accordionNote {
595
+ margin: 0 0 12px;
596
+ font-size: 12px;
597
+ }
598
+
599
+ .snap-consent-handoff_accordionBody {
600
+ display: grid;
601
+ gap: 14px;
602
+ }
603
+
604
+ .snap-consent-handoff_accordionBody--withPhoto {
605
+ grid-template-columns: 1fr;
606
+ }
607
+
608
+ @media (min-width: 520px) {
609
+ .snap-consent-handoff_accordionBody--withPhoto {
610
+ grid-template-columns: auto 1fr;
611
+ align-items: start;
612
+ }
613
+ }
614
+
615
+ .snap-consent-handoff_accordionPhoto img {
616
+ width: 112px;
617
+ height: 112px;
618
+ object-fit: cover;
619
+ border-radius: var(--snap-consent-radius);
620
+ border: 1px solid var(--snap-consent-border);
621
+ background: color-mix(in srgb, var(--snap-consent-muted) 10%, var(--snap-consent-surface));
622
+ }
623
+
624
+ .snap-consent-handoff_successFields {
625
+ margin: 0;
626
+ display: grid;
627
+ gap: 12px 18px;
628
+ grid-template-columns: 1fr;
629
+ }
630
+
631
+ @media (min-width: 480px) {
632
+ .snap-consent-handoff_successFields {
633
+ grid-template-columns: 1fr 1fr;
634
+ }
635
+ }
636
+
637
+ .snap-consent-handoff_successField {
638
+ display: grid;
639
+ gap: 4px;
640
+ min-width: 0;
641
+ }
642
+
643
+ .snap-consent-handoff_successField dt {
644
+ margin: 0;
645
+ font-size: 11px;
646
+ font-weight: 700;
647
+ letter-spacing: 0.06em;
648
+ text-transform: uppercase;
649
+ color: var(--snap-consent-muted);
650
+ }
651
+
652
+ .snap-consent-handoff_successField dd {
653
+ margin: 0;
654
+ font-size: 15px;
655
+ font-weight: 600;
656
+ line-height: 1.35;
657
+ word-break: break-word;
658
+ color: var(--snap-consent-text);
659
+ }
660
+
661
+ @media (max-width: 520px) {
662
+ .snap-consent-handoff_statusStrip {
663
+ grid-template-columns: 1fr;
664
+ }
665
+
666
+ .snap-consent-handoff_statusStripCol--end {
667
+ text-align: left;
668
+ }
669
+ }
670
+
671
+ .snap-consent-handoff_done {
672
+ display: block;
673
+ }
674
+
675
+ .snap-consent-handoff_purposeList {
676
+ margin: 0;
677
+ padding-left: 20px;
678
+ display: grid;
679
+ gap: 6px;
680
+ }
681
+
682
+ .snap-consent-handoff_purposeList li {
683
+ font-size: 14px;
684
+ line-height: 1.35;
685
+ }
686
+
687
+ @media (max-width: 520px) {
688
+ .snap-consent-handoff_actions:not(.snap-consent-handoff_actions--split) {
689
+ flex-direction: column;
690
+ align-items: stretch;
691
+ }
692
+
693
+ .snap-consent-handoff_actions:not(.snap-consent-handoff_actions--split) .snap-consent-handoff_btnPrimary {
694
+ width: 100%;
695
+ min-width: 0;
696
+ }
697
+
698
+ .snap-consent-handoff_actions--split {
699
+ flex-direction: row;
700
+ flex-wrap: nowrap;
701
+ gap: 10px;
702
+ }
703
+
704
+ .snap-consent-handoff_actions--split .snap-consent-handoff_btnPrimary,
705
+ .snap-consent-handoff_actions--split .snap-consent-handoff_btnSecondary {
706
+ flex: 1;
707
+ min-width: 0;
708
+ width: auto;
709
+ }
710
+ }