@reevit/react 0.4.7 → 0.4.9

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/dist/styles.css CHANGED
@@ -98,7 +98,7 @@
98
98
  box-shadow: var(--reevit-shadow);
99
99
  width: 100%;
100
100
  max-width: 440px;
101
- min-height: 380px;
101
+ min-height: 360px;
102
102
  max-height: 90vh;
103
103
  overflow: hidden;
104
104
  display: flex;
@@ -128,9 +128,8 @@
128
128
  display: flex;
129
129
  align-items: center;
130
130
  justify-content: space-between;
131
- padding: 18px 22px;
132
- border-bottom: 1px solid var(--reevit-border);
133
- background: linear-gradient(120deg, rgba(14, 165, 233, 0.08), transparent 55%);
131
+ padding: 16px 20px;
132
+ background: var(--reevit-background);
134
133
  }
135
134
 
136
135
  .reevit-modal__branding {
@@ -140,25 +139,25 @@
140
139
  }
141
140
 
142
141
  .reevit-modal__logo {
143
- height: 18px;
144
- width: auto;
142
+ height: 28px;
143
+ width: 28px;
145
144
  object-fit: contain;
145
+ border-radius: 6px;
146
146
  }
147
147
 
148
148
  .reevit-modal__brand-name {
149
- font-size: 12px;
149
+ font-size: 14px;
150
150
  font-weight: 600;
151
151
  color: var(--reevit-text);
152
152
  }
153
153
 
154
154
  .reevit-modal__close {
155
- width: 28px;
156
- height: 28px;
157
- border-radius: var(--reevit-radius-sm);
158
- border: 1px solid var(--reevit-border);
159
- background: transparent;
160
- color: var(--reevit-text-secondary);
161
- font-size: 14px;
155
+ width: 32px;
156
+ height: 32px;
157
+ border-radius: 50%;
158
+ border: none;
159
+ background: rgba(0, 0, 0, 0.06);
160
+ color: var(--reevit-text);
162
161
  cursor: pointer;
163
162
  display: flex;
164
163
  align-items: center;
@@ -167,17 +166,14 @@
167
166
  }
168
167
 
169
168
  .reevit-modal__close:hover {
170
- background: var(--reevit-surface);
171
- color: var(--reevit-text);
172
- border-color: var(--reevit-text-secondary);
169
+ background: rgba(0, 0, 0, 0.1);
173
170
  }
174
171
 
175
172
  /* Modal Amount */
176
173
  .reevit-modal__amount {
177
- padding: 28px 22px;
174
+ padding: 24px 20px;
178
175
  text-align: center;
179
- background: linear-gradient(135deg, rgba(14, 165, 233, 0.12), rgba(14, 165, 233, 0.04));
180
- border-bottom: 1px solid var(--reevit-border);
176
+ background: var(--reevit-background);
181
177
  }
182
178
 
183
179
  .reevit-modal__amount-label {
@@ -185,16 +181,17 @@
185
181
  font-size: 11px;
186
182
  font-weight: 500;
187
183
  text-transform: uppercase;
188
- letter-spacing: 0.1em;
189
- color: var(--reevit-text-secondary);
184
+ letter-spacing: 0.12em;
185
+ color: var(--reevit-text);
186
+ opacity: 0.6;
190
187
  margin-bottom: 8px;
191
188
  }
192
189
 
193
190
  .reevit-modal__amount-value {
194
191
  display: block;
195
- font-size: 36px;
192
+ font-size: 32px;
196
193
  font-weight: 700;
197
- letter-spacing: -0.03em;
194
+ letter-spacing: -0.02em;
198
195
  color: var(--reevit-text);
199
196
  }
200
197
 
@@ -202,61 +199,73 @@
202
199
  .reevit-modal__content {
203
200
  flex: 1;
204
201
  overflow-y: auto;
205
- padding: 20px;
202
+ padding: 0 20px 20px;
203
+ background: var(--reevit-background);
206
204
  }
207
205
 
208
206
  /* Modal Footer */
209
207
  .reevit-modal__footer {
210
- padding: 14px 20px;
211
- border-top: 1px solid var(--reevit-border);
208
+ padding: 16px 20px;
212
209
  text-align: center;
213
- background: var(--reevit-surface);
210
+ background: var(--reevit-background);
214
211
  }
215
212
 
216
213
  .reevit-modal__secured {
217
- font-size: 11px;
218
- font-weight: 500;
219
- color: var(--reevit-text-secondary);
220
- letter-spacing: 0.02em;
214
+ font-size: 12px;
215
+ font-weight: 400;
216
+ color: var(--reevit-text);
217
+ opacity: 0.5;
221
218
  }
222
219
 
223
220
  /* ===== PSP SELECTOR ===== */
224
221
  .reevit-psp-selector {
225
- margin-bottom: 20px;
222
+ margin-bottom: 0;
226
223
  }
227
224
 
228
225
  .reevit-psp-selector__label {
229
- font-size: 12px;
226
+ font-size: 11px;
230
227
  font-weight: 600;
228
+ text-transform: uppercase;
229
+ letter-spacing: 0.08em;
231
230
  color: var(--reevit-text);
232
- margin-bottom: 10px;
233
- letter-spacing: 0.02em;
231
+ opacity: 0.6;
232
+ margin-bottom: 12px;
234
233
  }
235
234
 
236
235
  .reevit-psp-selector__options {
237
- display: grid;
238
- gap: 10px;
236
+ display: flex;
237
+ flex-direction: column;
238
+ border: 1px solid var(--reevit-border);
239
+ border-radius: var(--reevit-radius);
240
+ overflow: hidden;
239
241
  }
240
242
 
241
243
  .reevit-psp-option {
242
244
  display: flex;
243
245
  align-items: center;
244
- gap: 14px;
246
+ gap: 12px;
245
247
  padding: 14px 16px;
246
- border-radius: var(--reevit-radius);
247
- border: 1px solid var(--reevit-border);
248
- background: var(--reevit-surface);
248
+ border: none;
249
+ border-bottom: 1px solid var(--reevit-border);
250
+ border-radius: 0;
251
+ background: transparent;
249
252
  cursor: pointer;
250
- transition: all 0.2s ease;
253
+ transition: all 0.15s ease;
251
254
  text-align: left;
252
255
  width: 100%;
253
256
  position: relative;
254
- overflow: hidden;
257
+ }
258
+
259
+ .reevit-psp-option:last-child {
260
+ border-bottom: none;
261
+ }
262
+
263
+ .reevit-psp-option:hover:not(.reevit-psp-option--disabled):not(.reevit-psp-option--selected) {
264
+ background: rgba(0, 0, 0, 0.02);
255
265
  }
256
266
 
257
267
  .reevit-psp-option--selected {
258
- border-color: color-mix(in srgb, var(--reevit-primary) 70%, var(--reevit-border));
259
- box-shadow: 0 12px 24px -20px color-mix(in srgb, var(--reevit-primary) 60%, transparent);
268
+ border-bottom: 1px solid var(--reevit-border);
260
269
  }
261
270
 
262
271
  .reevit-psp-option--disabled {
@@ -265,34 +274,31 @@
265
274
  }
266
275
 
267
276
  .reevit-psp-option__logo {
268
- width: 36px;
269
- height: 36px;
270
- border-radius: 12px;
277
+ width: 32px;
278
+ height: 32px;
279
+ border-radius: 8px;
271
280
  background: transparent;
272
281
  display: inline-flex;
273
282
  align-items: center;
274
283
  justify-content: center;
275
284
  flex-shrink: 0;
276
- position: relative;
277
- z-index: 1;
278
285
  }
279
286
 
280
287
  .reevit-psp-option__logo-img {
281
- width: 100%;
282
- height: 100%;
288
+ width: 24px;
289
+ height: 24px;
283
290
  object-fit: contain;
284
291
  }
285
292
 
286
293
  .reevit-psp-option__logo-fallback {
294
+ font-size: 12px;
287
295
  font-weight: 700;
288
- color: var(--reevit-text-secondary);
296
+ color: var(--reevit-text);
289
297
  }
290
298
 
291
299
  .reevit-psp-option__content {
292
300
  flex: 1;
293
301
  min-width: 0;
294
- position: relative;
295
- z-index: 1;
296
302
  }
297
303
 
298
304
  .reevit-psp-option__name {
@@ -304,27 +310,12 @@
304
310
 
305
311
  .reevit-psp-option__methods {
306
312
  display: block;
307
- font-size: 11px;
308
- color: var(--reevit-text-secondary);
313
+ font-size: 12px;
314
+ color: var(--reevit-text);
315
+ opacity: 0.6;
309
316
  margin-top: 2px;
310
317
  }
311
318
 
312
- .reevit-psp-option__check {
313
- font-size: 10px;
314
- font-weight: 600;
315
- color: var(--reevit-text-secondary);
316
- background: rgba(148, 163, 184, 0.2);
317
- padding: 4px 8px;
318
- border-radius: 999px;
319
- position: relative;
320
- z-index: 1;
321
- }
322
-
323
- .reevit-psp-option--selected .reevit-psp-option__check {
324
- background: color-mix(in srgb, var(--reevit-primary) 18%, transparent);
325
- color: var(--reevit-primary);
326
- }
327
-
328
319
 
329
320
  /* ===== ANIMATIONS ===== */
330
321
  @keyframes reevit-fade-in {
@@ -368,71 +359,34 @@
368
359
  .reevit-psp-accordion {
369
360
  display: flex;
370
361
  flex-direction: column;
371
- gap: 0;
372
- margin-bottom: 12px;
373
- }
374
-
375
- .reevit-psp-accordion:last-child {
376
- margin-bottom: 0;
377
- }
378
-
379
- .reevit-psp-option {
380
- display: flex;
381
- align-items: center;
382
- gap: 14px;
383
- padding: 14px 16px;
384
- border-radius: 12px;
385
- border: 1px solid var(--reevit-border);
386
- background: var(--reevit-surface);
387
- cursor: pointer;
388
- transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
389
- text-align: left;
390
- width: 100%;
391
- position: relative;
392
- }
393
-
394
- .reevit-psp-option:hover:not(.reevit-psp-option--disabled):not(.reevit-psp-option--selected) {
395
- border-color: color-mix(in srgb, var(--reevit-primary) 50%, var(--reevit-border));
396
- background: color-mix(in srgb, var(--reevit-primary) 4%, var(--reevit-surface));
397
- transform: translateY(-1px);
398
- }
399
-
400
- .reevit-psp-option--selected {
401
- border-radius: 12px 12px 0 0 !important;
402
- box-shadow: none;
403
- border-color: color-mix(in srgb, var(--reevit-primary) 40%, var(--reevit-border));
404
- border-bottom-color: transparent;
405
- background: color-mix(in srgb, var(--reevit-primary) 5%, var(--reevit-surface));
406
- position: relative;
407
- z-index: 1;
408
362
  }
409
363
 
410
364
  .reevit-psp-accordion__content {
411
- padding: 16px;
365
+ padding: 12px 16px;
412
366
  background: transparent;
413
- border: 1px solid color-mix(in srgb, var(--reevit-primary) 40%, var(--reevit-border));
414
- border-top: none;
415
- border-radius: 0 0 12px 12px;
416
- margin-top: 0;
417
- overflow: hidden;
418
- animation: reevit-accordion-expand 0.4s cubic-bezier(0.16, 1, 0.3, 1);
367
+ border-bottom: 1px solid var(--reevit-border);
368
+ animation: reevit-accordion-expand 0.3s ease-out;
419
369
  transform-origin: top;
420
- position: relative;
370
+ }
371
+
372
+ .reevit-psp-accordion:last-child .reevit-psp-accordion__content {
373
+ border-bottom: none;
421
374
  }
422
375
 
423
376
  /* ===== PAYMENT METHOD SELECTOR ===== */
424
377
  .reevit-method-selector {
425
- margin-bottom: 24px;
378
+ margin-bottom: 16px;
426
379
  width: 100%;
427
380
  }
428
381
 
429
382
  .reevit-method-selector__label {
430
- font-size: 13px;
383
+ font-size: 11px;
431
384
  font-weight: 600;
385
+ text-transform: uppercase;
386
+ letter-spacing: 0.08em;
432
387
  color: var(--reevit-text);
433
- margin-bottom: 16px;
434
- letter-spacing: -0.01em;
435
- opacity: 0.8;
388
+ opacity: 0.6;
389
+ margin-bottom: 12px;
436
390
  }
437
391
 
438
392
  .reevit-method-selector__options--grid {
@@ -445,8 +399,11 @@
445
399
  .reevit-method-selector__options--list {
446
400
  display: flex;
447
401
  flex-direction: column;
448
- gap: 12px;
402
+ gap: 0;
449
403
  width: 100%;
404
+ border: 1px solid var(--reevit-border);
405
+ border-radius: var(--reevit-radius);
406
+ overflow: hidden;
450
407
  }
451
408
 
452
409
  /* Grid layout styles */
@@ -519,54 +476,40 @@
519
476
  display: flex;
520
477
  flex-direction: row;
521
478
  align-items: center;
522
- gap: 16px;
479
+ gap: 14px;
523
480
  padding: 14px 16px;
524
- background: color-mix(in srgb, var(--reevit-text) 4%, transparent);
525
- border: 1px solid transparent;
526
- border-radius: 12px;
527
- box-shadow: none;
481
+ background: transparent;
482
+ border: none;
483
+ border-bottom: 1px solid var(--reevit-border);
484
+ border-radius: 0;
528
485
  cursor: pointer;
529
- transition: all 0.2s ease;
486
+ transition: all 0.15s ease;
530
487
  text-align: left;
531
488
  width: 100%;
532
489
  position: relative;
533
- overflow: hidden;
490
+ }
491
+
492
+ .reevit-method-option--list:last-child {
493
+ border-bottom: none;
534
494
  }
535
495
 
536
496
  .reevit-method-option--list:hover:not(.reevit-method-option--disabled) {
537
- border-color: color-mix(in srgb, var(--reevit-primary) 60%, var(--reevit-border));
538
- background: color-mix(in srgb, var(--reevit-primary) 8%, var(--reevit-surface));
539
- transform: translateY(-1px);
540
- box-shadow: 0 10px 24px -18px rgba(15, 23, 42, 0.35);
497
+ background: rgba(0, 0, 0, 0.02);
541
498
  }
542
499
 
543
500
  .reevit-method-option--list.reevit-method-option--selected {
544
- border-color: var(--reevit-primary);
545
- background: color-mix(in srgb, var(--reevit-primary) 12%, var(--reevit-surface));
546
- box-shadow: 0 8px 20px -16px color-mix(in srgb, var(--reevit-primary) 40%, transparent);
501
+ background: rgba(0, 0, 0, 0.02);
547
502
  }
548
503
 
549
504
  .reevit-method-option--list .reevit-method-option__icon-wrapper {
550
505
  display: flex;
551
506
  align-items: center;
552
507
  justify-content: center;
553
- width: 50px;
554
- height: 50px;
555
- background: color-mix(in srgb, var(--reevit-text) 5%, transparent);
556
- border-radius: 14px;
508
+ width: 40px;
509
+ height: 40px;
510
+ background: transparent;
557
511
  flex-shrink: 0;
558
- transition: all 0.2s ease;
559
- font-size: 24px;
560
- }
561
-
562
- .reevit-method-option--list:hover .reevit-method-option__icon-wrapper {
563
- background: color-mix(in srgb, var(--reevit-primary) 12%, transparent);
564
- transform: scale(1.03);
565
- }
566
-
567
- .reevit-method-option--list.reevit-method-option--selected .reevit-method-option__icon-wrapper {
568
- background: color-mix(in srgb, var(--reevit-primary) 16%, transparent);
569
- transform: scale(1.05);
512
+ font-size: 22px;
570
513
  }
571
514
 
572
515
  .reevit-method-option--list .reevit-method-option__content {
@@ -576,33 +519,49 @@
576
519
 
577
520
  .reevit-method-option--list .reevit-method-option__label {
578
521
  display: block;
579
- font-size: 16px;
580
- font-weight: 700;
522
+ font-size: 15px;
523
+ font-weight: 600;
581
524
  color: var(--reevit-text);
582
- margin-bottom: 4px;
583
- letter-spacing: -0.01em;
525
+ margin-bottom: 2px;
584
526
  }
585
527
 
586
528
  .reevit-method-option--list .reevit-method-option__description {
587
529
  display: block;
588
- font-size: 14px;
530
+ font-size: 13px;
589
531
  color: var(--reevit-text);
590
532
  opacity: 0.6;
591
533
  line-height: 1.4;
592
534
  }
593
535
 
594
536
  .reevit-method-option--list .reevit-method-option__chevron {
595
- color: var(--reevit-primary);
596
- opacity: 0;
597
- transform: translateX(-10px);
598
- transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
599
- flex-shrink: 0;
537
+ display: none;
538
+ }
539
+
540
+ .reevit-method-option--list .reevit-method-option__check {
541
+ display: none;
542
+ }
543
+
544
+ /* Payment method logos */
545
+ .reevit-method-option__logos {
546
+ display: flex;
547
+ align-items: center;
548
+ gap: 4px;
549
+ }
550
+
551
+ .reevit-method-option__logo-img {
552
+ width: 28px;
553
+ height: 28px;
554
+ object-fit: contain;
555
+ border-radius: 4px;
600
556
  }
601
557
 
602
- .reevit-method-option--list:hover .reevit-method-option__chevron,
603
- .reevit-method-option--list.reevit-method-option--selected .reevit-method-option__chevron {
604
- opacity: 1;
605
- transform: translateX(0);
558
+ .reevit-method-option--grid .reevit-method-option__logos {
559
+ gap: 6px;
560
+ }
561
+
562
+ .reevit-method-option--grid .reevit-method-option__logo-img {
563
+ width: 32px;
564
+ height: 32px;
606
565
  }
607
566
 
608
567
  /* ===== MOBILE MONEY FORM ===== */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@reevit/react",
3
- "version": "0.4.7",
3
+ "version": "0.4.9",
4
4
  "description": "Reevit React SDK - Unified Payment Widget",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.mjs",
@@ -16,6 +16,7 @@
16
16
  "scripts": {
17
17
  "build": "tsup",
18
18
  "dev": "tsup --watch",
19
+ "preview": "vite --config preview/vite.config.ts",
19
20
  "lint": "eslint src/",
20
21
  "typecheck": "tsc --noEmit",
21
22
  "prepublishOnly": "npm run build"
@@ -31,10 +32,12 @@
31
32
  "@types/node": "^25.0.3",
32
33
  "@types/react": "^18.2.0",
33
34
  "@types/react-dom": "^18.2.0",
35
+ "@vitejs/plugin-react": "^4.3.4",
34
36
  "react": "^18.2.0",
35
37
  "react-dom": "^18.2.0",
36
38
  "tsup": "^8.0.0",
37
- "typescript": "^5.0.0"
39
+ "typescript": "^5.0.0",
40
+ "vite": "^6.0.0"
38
41
  },
39
42
  "keywords": [
40
43
  "reevit",