@razorpay/blade 9.6.1 → 10.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.
- package/build/components/index.d.ts +25 -24
- package/build/components/index.development.web.js +4916 -7486
- package/build/components/index.development.web.js.map +1 -1
- package/build/components/index.native.d.ts +17 -16
- package/build/components/index.native.js +430 -425
- package/build/components/index.native.js.map +1 -1
- package/build/components/index.production.web.js +4898 -7421
- package/build/components/index.production.web.js.map +1 -1
- package/build/css/bankingThemeDarkDesktop.css +1 -1
- package/build/css/bankingThemeDarkMobile.css +1 -1
- package/build/css/bankingThemeLightDesktop.css +1 -1
- package/build/css/bankingThemeLightMobile.css +1 -1
- package/build/css/paymentThemeDarkDesktop.css +1 -1
- package/build/css/paymentThemeDarkMobile.css +1 -1
- package/build/css/paymentThemeLightDesktop.css +1 -1
- package/build/css/paymentThemeLightMobile.css +1 -1
- package/build/tokens/index.d.ts +27 -27
- package/build/tokens/index.development.web.js +30 -71
- package/build/tokens/index.development.web.js.map +1 -1
- package/build/tokens/index.native.d.ts +27 -27
- package/build/tokens/index.native.js +4 -5
- package/build/tokens/index.native.js.map +1 -1
- package/build/tokens/index.production.web.js +20 -44
- package/build/tokens/index.production.web.js.map +1 -1
- package/build/utils/index.d.ts +12 -12
- package/build/utils/index.development.web.js +26 -60
- package/build/utils/index.development.web.js.map +1 -1
- package/build/utils/index.native.d.ts +12 -12
- package/build/utils/index.native.js +7 -7
- package/build/utils/index.native.js.map +1 -1
- package/build/utils/index.production.web.js +24 -55
- package/build/utils/index.production.web.js.map +1 -1
- package/package.json +23 -22
|
@@ -10,8 +10,8 @@ var border = {
|
|
|
10
10
|
large: 8,
|
|
11
11
|
max: 9999,
|
|
12
12
|
round: '50%' // this needs to be in % but need to figure out how will we store unitless things
|
|
13
|
-
|
|
14
13
|
},
|
|
14
|
+
|
|
15
15
|
width: {
|
|
16
16
|
none: 0,
|
|
17
17
|
thinner: 0.5,
|
|
@@ -324,8 +324,15 @@ var fontFamily = {
|
|
|
324
324
|
};
|
|
325
325
|
|
|
326
326
|
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
327
|
-
|
|
328
327
|
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty$1(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
328
|
+
|
|
329
|
+
/**
|
|
330
|
+
* For font size and line-heights we can’t say from xl to 2xl the value will necessary increase.
|
|
331
|
+
* it might decrease or remain same because these are alias tokens and we need aliases for cross platform.
|
|
332
|
+
* so for example xl on mobile can be 32px and on desktop xl can be 34px,
|
|
333
|
+
* similarly 2xl on mobile can be 34px but on desktop doesn’t necessarily mean 2xl will be more than xl(34px) it can be 32 as well since visually they make better hierarchy.
|
|
334
|
+
*/
|
|
335
|
+
|
|
329
336
|
var fontWeight = {
|
|
330
337
|
regular: 400,
|
|
331
338
|
bold: 700
|
|
@@ -365,9 +372,10 @@ var typography = {
|
|
|
365
372
|
600: 40,
|
|
366
373
|
700: 40,
|
|
367
374
|
800: 48
|
|
368
|
-
}
|
|
369
|
-
|
|
375
|
+
}
|
|
376
|
+
// letterSpacings: {},
|
|
370
377
|
},
|
|
378
|
+
|
|
371
379
|
onMobile: {
|
|
372
380
|
fonts: {
|
|
373
381
|
family: _objectSpread({}, fontFamily),
|
|
@@ -402,8 +410,8 @@ var typography = {
|
|
|
402
410
|
600: 32,
|
|
403
411
|
700: 40,
|
|
404
412
|
800: 40
|
|
405
|
-
}
|
|
406
|
-
|
|
413
|
+
}
|
|
414
|
+
// letterSpacings: {},
|
|
407
415
|
}
|
|
408
416
|
};
|
|
409
417
|
|
|
@@ -412,6 +420,7 @@ var typography = {
|
|
|
412
420
|
*
|
|
413
421
|
* {@link ../../components/Box/BaseBox/types/spacingTypes.ts}
|
|
414
422
|
*/
|
|
423
|
+
|
|
415
424
|
var spacing = {
|
|
416
425
|
0: 0,
|
|
417
426
|
1: 2,
|
|
@@ -431,6 +440,8 @@ var makeBezier = function makeBezier(x1, y1, x2, y2) {
|
|
|
431
440
|
return "cubic-bezier(".concat(x1, ", ").concat(y1, ", ").concat(x2, ", ").concat(y2, ")");
|
|
432
441
|
};
|
|
433
442
|
|
|
443
|
+
// similar to EasingFactoryFn of `react-native-reanimated`
|
|
444
|
+
|
|
434
445
|
var delay = {
|
|
435
446
|
'2xshort': 70,
|
|
436
447
|
xshort: 120,
|
|
@@ -448,8 +459,8 @@ var duration = {
|
|
|
448
459
|
xgentle: 600,
|
|
449
460
|
'2xgentle': 900
|
|
450
461
|
};
|
|
451
|
-
/* makeBezier returns a string of `cubic-bezier()` for web & a react-native-reanimated Easing Function of type `EasingFunctionFactory` for native */
|
|
452
462
|
|
|
463
|
+
/* makeBezier returns a string of `cubic-bezier()` for web & a react-native-reanimated Easing Function of type `EasingFactoryFn` for native */
|
|
453
464
|
var easing = {
|
|
454
465
|
standard: {
|
|
455
466
|
attentive: makeBezier(0.5, 0, 0.3, 1.5),
|
|
@@ -480,106 +491,72 @@ var motion = {
|
|
|
480
491
|
var size = {
|
|
481
492
|
/** 0 px */
|
|
482
493
|
0: 0,
|
|
483
|
-
|
|
484
494
|
/** 1 px */
|
|
485
495
|
1: 1,
|
|
486
|
-
|
|
487
496
|
/** 2 px */
|
|
488
497
|
2: 2,
|
|
489
|
-
|
|
490
498
|
/** 3 px */
|
|
491
499
|
3: 3,
|
|
492
|
-
|
|
493
500
|
/** 4 px */
|
|
494
501
|
4: 4,
|
|
495
|
-
|
|
496
502
|
/** 5 px */
|
|
497
503
|
5: 5,
|
|
498
|
-
|
|
499
504
|
/** 6 px */
|
|
500
505
|
6: 6,
|
|
501
|
-
|
|
502
506
|
/** 8 px */
|
|
503
507
|
8: 8,
|
|
504
|
-
|
|
505
508
|
/** 10 px */
|
|
506
509
|
10: 10,
|
|
507
|
-
|
|
508
510
|
/** 12 px */
|
|
509
511
|
12: 12,
|
|
510
|
-
|
|
511
512
|
/** 16 px */
|
|
512
513
|
16: 16,
|
|
513
|
-
|
|
514
514
|
/** 18 px */
|
|
515
515
|
18: 18,
|
|
516
|
-
|
|
517
516
|
/** 20 px */
|
|
518
517
|
20: 20,
|
|
519
|
-
|
|
520
518
|
/** 24 px */
|
|
521
519
|
24: 24,
|
|
522
|
-
|
|
523
520
|
/** 28 px */
|
|
524
521
|
28: 28,
|
|
525
|
-
|
|
526
522
|
/** 32 px */
|
|
527
523
|
32: 32,
|
|
528
|
-
|
|
529
524
|
/** 36 px */
|
|
530
525
|
36: 36,
|
|
531
|
-
|
|
532
526
|
/** 40 px */
|
|
533
527
|
40: 40,
|
|
534
|
-
|
|
535
528
|
/** 44 px */
|
|
536
529
|
44: 44,
|
|
537
|
-
|
|
538
530
|
/** 48 px */
|
|
539
531
|
48: 48,
|
|
540
|
-
|
|
541
532
|
/** 60 px */
|
|
542
533
|
56: 56,
|
|
543
|
-
|
|
544
534
|
/** 100 px */
|
|
545
535
|
100: 100,
|
|
546
|
-
|
|
547
536
|
/** 120 px */
|
|
548
537
|
120: 120,
|
|
549
|
-
|
|
550
538
|
/** 140 px */
|
|
551
539
|
140: 140,
|
|
552
|
-
|
|
553
540
|
/** 160 px */
|
|
554
541
|
160: 160,
|
|
555
|
-
|
|
556
542
|
/** 200 px */
|
|
557
543
|
200: 200,
|
|
558
|
-
|
|
559
544
|
/** 300 px */
|
|
560
545
|
300: 300,
|
|
561
|
-
|
|
562
546
|
/** 360 px */
|
|
563
547
|
360: 360,
|
|
564
|
-
|
|
565
548
|
/** 400 px */
|
|
566
549
|
400: 400,
|
|
567
|
-
|
|
568
550
|
/** 584 px */
|
|
569
551
|
584: 584,
|
|
570
|
-
|
|
571
552
|
/** 640 px */
|
|
572
553
|
640: 640,
|
|
573
|
-
|
|
574
554
|
/** 760 px */
|
|
575
555
|
760: 760,
|
|
576
|
-
|
|
577
556
|
/** 800 px */
|
|
578
557
|
800: 800,
|
|
579
|
-
|
|
580
558
|
/** 1024 px */
|
|
581
559
|
1024: 1024,
|
|
582
|
-
|
|
583
560
|
/** 1136 px */
|
|
584
561
|
1136: 1136
|
|
585
562
|
};
|
|
@@ -587,7 +564,6 @@ var size = {
|
|
|
587
564
|
var elevation = {
|
|
588
565
|
onLight: {
|
|
589
566
|
none: 'none',
|
|
590
|
-
|
|
591
567
|
/** offset-x | offset-y | blur-radius | spread-radius | color, offset-x | offset-y | blur-radius | spread-radius | color */
|
|
592
568
|
lowRaised: "0 4px 8px -2px hsla(217, 56%, 17%, 0.1), 0 2px 4px -2px hsla(217, 56%, 17%, 0.06)",
|
|
593
569
|
midRaised: "0 12px 16px -4px hsla(217, 56%, 17%, 0.08), 0 4px 6px -2px hsla(217, 56%, 17%, 0.03)",
|
|
@@ -8397,9 +8373,9 @@ var merge_1 = merge;
|
|
|
8397
8373
|
*/
|
|
8398
8374
|
var overrideTheme = function overrideTheme(_ref) {
|
|
8399
8375
|
var baseThemeTokens = _ref.baseThemeTokens,
|
|
8400
|
-
|
|
8401
|
-
|
|
8376
|
+
overrides = _ref.overrides;
|
|
8402
8377
|
|
|
8378
|
+
// Need to clone before merging since merge changes/mutates the actual object
|
|
8403
8379
|
return merge_1(cloneDeep_1(baseThemeTokens), overrides);
|
|
8404
8380
|
};
|
|
8405
8381
|
|