@razorpay/blade 11.1.1 → 11.2.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/build/lib/native/components/Amount/Amount.js +4 -3
- package/build/lib/native/components/Amount/Amount.js.map +1 -1
- package/build/lib/native/components/Amount/amountTokens.js +2 -2
- package/build/lib/native/components/Amount/amountTokens.js.map +1 -1
- package/build/lib/native/components/Dropdown/Dropdown.js +1 -1
- package/build/lib/native/components/Dropdown/Dropdown.js.map +1 -1
- package/build/lib/web/development/components/Amount/Amount.js +107 -106
- package/build/lib/web/development/components/Amount/Amount.js.map +1 -1
- package/build/lib/web/development/components/Amount/amountTokens.js +1 -415
- package/build/lib/web/development/components/Amount/amountTokens.js.map +1 -1
- package/build/lib/web/development/components/Dropdown/Dropdown.js +1 -1
- package/build/lib/web/development/components/Dropdown/Dropdown.js.map +1 -1
- package/build/lib/web/development/components/Input/BaseInput/BaseInputTagSlot.web.js +15 -1
- package/build/lib/web/development/components/Input/BaseInput/BaseInputTagSlot.web.js.map +1 -1
- package/build/lib/web/production/components/Amount/Amount.js +107 -106
- package/build/lib/web/production/components/Amount/Amount.js.map +1 -1
- package/build/lib/web/production/components/Amount/amountTokens.js +1 -415
- package/build/lib/web/production/components/Amount/amountTokens.js.map +1 -1
- package/build/lib/web/production/components/Dropdown/Dropdown.js +1 -1
- package/build/lib/web/production/components/Dropdown/Dropdown.js.map +1 -1
- package/build/lib/web/production/components/Input/BaseInput/BaseInputTagSlot.web.js +15 -1
- package/build/lib/web/production/components/Input/BaseInput/BaseInputTagSlot.web.js.map +1 -1
- package/build/types/components/index.d.ts +4 -384
- package/build/types/components/index.native.d.ts +4 -384
- package/package.json +6 -3
|
@@ -3,6 +3,7 @@ import * as React$1 from 'react';
|
|
|
3
3
|
import React__default, { ReactNode, ReactElement, ReactChild, SyntheticEvent, KeyboardEvent } from 'react';
|
|
4
4
|
import { View, ViewStyle, ImageSourcePropType, AccessibilityRole, GestureResponderEvent, PressableProps } from 'react-native';
|
|
5
5
|
import { CSSObject } from 'styled-components';
|
|
6
|
+
import { CurrencyCodeType } from '@razorpay/i18nify-js/currency';
|
|
6
7
|
import { ReactDOMAttributes } from '@use-gesture/react/dist/declarations/src/types';
|
|
7
8
|
import * as react_native_types from 'react-native/types';
|
|
8
9
|
import { UseFloatingOptions } from '@floating-ui/react';
|
|
@@ -2472,389 +2473,6 @@ type AmountBodyProps = {
|
|
|
2472
2473
|
weight?: Extract<BaseTextProps['fontWeight'], 'regular' | 'medium' | 'semibold'>;
|
|
2473
2474
|
};
|
|
2474
2475
|
type AmountTypeProps = AmountDisplayProps | AmountHeadingProps | AmountBodyProps;
|
|
2475
|
-
declare const currencyIndicatorMapping: {
|
|
2476
|
-
AED: {
|
|
2477
|
-
'currency-symbol': string;
|
|
2478
|
-
'currency-code': string;
|
|
2479
|
-
};
|
|
2480
|
-
ALL: {
|
|
2481
|
-
'currency-symbol': string;
|
|
2482
|
-
'currency-code': string;
|
|
2483
|
-
};
|
|
2484
|
-
AMD: {
|
|
2485
|
-
'currency-symbol': string;
|
|
2486
|
-
'currency-code': string;
|
|
2487
|
-
};
|
|
2488
|
-
ARS: {
|
|
2489
|
-
'currency-symbol': string;
|
|
2490
|
-
'currency-code': string;
|
|
2491
|
-
};
|
|
2492
|
-
AUD: {
|
|
2493
|
-
'currency-symbol': string;
|
|
2494
|
-
'currency-code': string;
|
|
2495
|
-
};
|
|
2496
|
-
AWG: {
|
|
2497
|
-
'currency-symbol': string;
|
|
2498
|
-
'currency-code': string;
|
|
2499
|
-
};
|
|
2500
|
-
BBD: {
|
|
2501
|
-
'currency-symbol': string;
|
|
2502
|
-
'currency-code': string;
|
|
2503
|
-
};
|
|
2504
|
-
BDT: {
|
|
2505
|
-
'currency-symbol': string;
|
|
2506
|
-
'currency-code': string;
|
|
2507
|
-
};
|
|
2508
|
-
BMD: {
|
|
2509
|
-
'currency-symbol': string;
|
|
2510
|
-
'currency-code': string;
|
|
2511
|
-
};
|
|
2512
|
-
BND: {
|
|
2513
|
-
'currency-symbol': string;
|
|
2514
|
-
'currency-code': string;
|
|
2515
|
-
};
|
|
2516
|
-
BOB: {
|
|
2517
|
-
'currency-symbol': string;
|
|
2518
|
-
'currency-code': string;
|
|
2519
|
-
};
|
|
2520
|
-
BSD: {
|
|
2521
|
-
'currency-symbol': string;
|
|
2522
|
-
'currency-code': string;
|
|
2523
|
-
};
|
|
2524
|
-
BWP: {
|
|
2525
|
-
'currency-symbol': string;
|
|
2526
|
-
'currency-code': string;
|
|
2527
|
-
};
|
|
2528
|
-
BZD: {
|
|
2529
|
-
'currency-symbol': string;
|
|
2530
|
-
'currency-code': string;
|
|
2531
|
-
};
|
|
2532
|
-
CAD: {
|
|
2533
|
-
'currency-symbol': string;
|
|
2534
|
-
'currency-code': string;
|
|
2535
|
-
};
|
|
2536
|
-
CHF: {
|
|
2537
|
-
'currency-symbol': string;
|
|
2538
|
-
'currency-code': string;
|
|
2539
|
-
};
|
|
2540
|
-
CNY: {
|
|
2541
|
-
'currency-symbol': string;
|
|
2542
|
-
'currency-code': string;
|
|
2543
|
-
};
|
|
2544
|
-
COP: {
|
|
2545
|
-
'currency-symbol': string;
|
|
2546
|
-
'currency-code': string;
|
|
2547
|
-
};
|
|
2548
|
-
CRC: {
|
|
2549
|
-
'currency-symbol': string;
|
|
2550
|
-
'currency-code': string;
|
|
2551
|
-
};
|
|
2552
|
-
CUP: {
|
|
2553
|
-
'currency-symbol': string;
|
|
2554
|
-
'currency-code': string;
|
|
2555
|
-
};
|
|
2556
|
-
CZK: {
|
|
2557
|
-
'currency-symbol': string;
|
|
2558
|
-
'currency-code': string;
|
|
2559
|
-
};
|
|
2560
|
-
DKK: {
|
|
2561
|
-
'currency-symbol': string;
|
|
2562
|
-
'currency-code': string;
|
|
2563
|
-
};
|
|
2564
|
-
DOP: {
|
|
2565
|
-
'currency-symbol': string;
|
|
2566
|
-
'currency-code': string;
|
|
2567
|
-
};
|
|
2568
|
-
DZD: {
|
|
2569
|
-
'currency-symbol': string;
|
|
2570
|
-
'currency-code': string;
|
|
2571
|
-
};
|
|
2572
|
-
EGP: {
|
|
2573
|
-
'currency-symbol': string;
|
|
2574
|
-
'currency-code': string;
|
|
2575
|
-
};
|
|
2576
|
-
ETB: {
|
|
2577
|
-
'currency-symbol': string;
|
|
2578
|
-
'currency-code': string;
|
|
2579
|
-
};
|
|
2580
|
-
EUR: {
|
|
2581
|
-
'currency-symbol': string;
|
|
2582
|
-
'currency-code': string;
|
|
2583
|
-
};
|
|
2584
|
-
FJD: {
|
|
2585
|
-
'currency-symbol': string;
|
|
2586
|
-
'currency-code': string;
|
|
2587
|
-
};
|
|
2588
|
-
GBP: {
|
|
2589
|
-
'currency-symbol': string;
|
|
2590
|
-
'currency-code': string;
|
|
2591
|
-
};
|
|
2592
|
-
GHS: {
|
|
2593
|
-
'currency-symbol': string;
|
|
2594
|
-
'currency-code': string;
|
|
2595
|
-
};
|
|
2596
|
-
GIP: {
|
|
2597
|
-
'currency-symbol': string;
|
|
2598
|
-
'currency-code': string;
|
|
2599
|
-
};
|
|
2600
|
-
GMD: {
|
|
2601
|
-
'currency-symbol': string;
|
|
2602
|
-
'currency-code': string;
|
|
2603
|
-
};
|
|
2604
|
-
GTQ: {
|
|
2605
|
-
'currency-symbol': string;
|
|
2606
|
-
'currency-code': string;
|
|
2607
|
-
};
|
|
2608
|
-
GYD: {
|
|
2609
|
-
'currency-symbol': string;
|
|
2610
|
-
'currency-code': string;
|
|
2611
|
-
};
|
|
2612
|
-
HKD: {
|
|
2613
|
-
'currency-symbol': string;
|
|
2614
|
-
'currency-code': string;
|
|
2615
|
-
};
|
|
2616
|
-
HNL: {
|
|
2617
|
-
'currency-symbol': string;
|
|
2618
|
-
'currency-code': string;
|
|
2619
|
-
};
|
|
2620
|
-
HRK: {
|
|
2621
|
-
'currency-symbol': string;
|
|
2622
|
-
'currency-code': string;
|
|
2623
|
-
};
|
|
2624
|
-
HTG: {
|
|
2625
|
-
'currency-symbol': string;
|
|
2626
|
-
'currency-code': string;
|
|
2627
|
-
};
|
|
2628
|
-
HUF: {
|
|
2629
|
-
'currency-symbol': string;
|
|
2630
|
-
'currency-code': string;
|
|
2631
|
-
};
|
|
2632
|
-
IDR: {
|
|
2633
|
-
'currency-symbol': string;
|
|
2634
|
-
'currency-code': string;
|
|
2635
|
-
};
|
|
2636
|
-
ILS: {
|
|
2637
|
-
'currency-symbol': string;
|
|
2638
|
-
'currency-code': string;
|
|
2639
|
-
};
|
|
2640
|
-
INR: {
|
|
2641
|
-
'currency-symbol': string;
|
|
2642
|
-
'currency-code': string;
|
|
2643
|
-
};
|
|
2644
|
-
JMD: {
|
|
2645
|
-
'currency-symbol': string;
|
|
2646
|
-
'currency-code': string;
|
|
2647
|
-
};
|
|
2648
|
-
KES: {
|
|
2649
|
-
'currency-symbol': string;
|
|
2650
|
-
'currency-code': string;
|
|
2651
|
-
};
|
|
2652
|
-
KGS: {
|
|
2653
|
-
'currency-symbol': string;
|
|
2654
|
-
'currency-code': string;
|
|
2655
|
-
};
|
|
2656
|
-
KHR: {
|
|
2657
|
-
'currency-symbol': string;
|
|
2658
|
-
'currency-code': string;
|
|
2659
|
-
};
|
|
2660
|
-
KYD: {
|
|
2661
|
-
'currency-symbol': string;
|
|
2662
|
-
'currency-code': string;
|
|
2663
|
-
};
|
|
2664
|
-
KZT: {
|
|
2665
|
-
'currency-symbol': string;
|
|
2666
|
-
'currency-code': string;
|
|
2667
|
-
};
|
|
2668
|
-
LAK: {
|
|
2669
|
-
'currency-symbol': string;
|
|
2670
|
-
'currency-code': string;
|
|
2671
|
-
};
|
|
2672
|
-
LKR: {
|
|
2673
|
-
'currency-symbol': string;
|
|
2674
|
-
'currency-code': string;
|
|
2675
|
-
};
|
|
2676
|
-
LRD: {
|
|
2677
|
-
'currency-symbol': string;
|
|
2678
|
-
'currency-code': string;
|
|
2679
|
-
};
|
|
2680
|
-
LSL: {
|
|
2681
|
-
'currency-symbol': string;
|
|
2682
|
-
'currency-code': string;
|
|
2683
|
-
};
|
|
2684
|
-
MAD: {
|
|
2685
|
-
'currency-symbol': string;
|
|
2686
|
-
'currency-code': string;
|
|
2687
|
-
};
|
|
2688
|
-
MDL: {
|
|
2689
|
-
'currency-symbol': string;
|
|
2690
|
-
'currency-code': string;
|
|
2691
|
-
};
|
|
2692
|
-
MKD: {
|
|
2693
|
-
'currency-symbol': string;
|
|
2694
|
-
'currency-code': string;
|
|
2695
|
-
};
|
|
2696
|
-
MMK: {
|
|
2697
|
-
'currency-symbol': string;
|
|
2698
|
-
'currency-code': string;
|
|
2699
|
-
};
|
|
2700
|
-
MNT: {
|
|
2701
|
-
'currency-symbol': string;
|
|
2702
|
-
'currency-code': string;
|
|
2703
|
-
};
|
|
2704
|
-
MOP: {
|
|
2705
|
-
'currency-symbol': string;
|
|
2706
|
-
'currency-code': string;
|
|
2707
|
-
};
|
|
2708
|
-
MUR: {
|
|
2709
|
-
'currency-symbol': string;
|
|
2710
|
-
'currency-code': string;
|
|
2711
|
-
};
|
|
2712
|
-
MVR: {
|
|
2713
|
-
'currency-symbol': string;
|
|
2714
|
-
'currency-code': string;
|
|
2715
|
-
};
|
|
2716
|
-
MWK: {
|
|
2717
|
-
'currency-symbol': string;
|
|
2718
|
-
'currency-code': string;
|
|
2719
|
-
};
|
|
2720
|
-
MXN: {
|
|
2721
|
-
'currency-symbol': string;
|
|
2722
|
-
'currency-code': string;
|
|
2723
|
-
};
|
|
2724
|
-
MYR: {
|
|
2725
|
-
'currency-symbol': string;
|
|
2726
|
-
'currency-code': string;
|
|
2727
|
-
};
|
|
2728
|
-
NAD: {
|
|
2729
|
-
'currency-symbol': string;
|
|
2730
|
-
'currency-code': string;
|
|
2731
|
-
};
|
|
2732
|
-
NGN: {
|
|
2733
|
-
'currency-symbol': string;
|
|
2734
|
-
'currency-code': string;
|
|
2735
|
-
};
|
|
2736
|
-
NIO: {
|
|
2737
|
-
'currency-symbol': string;
|
|
2738
|
-
'currency-code': string;
|
|
2739
|
-
};
|
|
2740
|
-
NOK: {
|
|
2741
|
-
'currency-symbol': string;
|
|
2742
|
-
'currency-code': string;
|
|
2743
|
-
};
|
|
2744
|
-
NPR: {
|
|
2745
|
-
'currency-symbol': string;
|
|
2746
|
-
'currency-code': string;
|
|
2747
|
-
};
|
|
2748
|
-
NZD: {
|
|
2749
|
-
'currency-symbol': string;
|
|
2750
|
-
'currency-code': string;
|
|
2751
|
-
};
|
|
2752
|
-
PEN: {
|
|
2753
|
-
'currency-symbol': string;
|
|
2754
|
-
'currency-code': string;
|
|
2755
|
-
};
|
|
2756
|
-
PGK: {
|
|
2757
|
-
'currency-symbol': string;
|
|
2758
|
-
'currency-code': string;
|
|
2759
|
-
};
|
|
2760
|
-
PHP: {
|
|
2761
|
-
'currency-symbol': string;
|
|
2762
|
-
'currency-code': string;
|
|
2763
|
-
};
|
|
2764
|
-
PKR: {
|
|
2765
|
-
'currency-symbol': string;
|
|
2766
|
-
'currency-code': string;
|
|
2767
|
-
};
|
|
2768
|
-
QAR: {
|
|
2769
|
-
'currency-symbol': string;
|
|
2770
|
-
'currency-code': string;
|
|
2771
|
-
};
|
|
2772
|
-
RUB: {
|
|
2773
|
-
'currency-symbol': string;
|
|
2774
|
-
'currency-code': string;
|
|
2775
|
-
};
|
|
2776
|
-
SAR: {
|
|
2777
|
-
'currency-symbol': string;
|
|
2778
|
-
'currency-code': string;
|
|
2779
|
-
};
|
|
2780
|
-
SCR: {
|
|
2781
|
-
'currency-symbol': string;
|
|
2782
|
-
'currency-code': string;
|
|
2783
|
-
};
|
|
2784
|
-
SEK: {
|
|
2785
|
-
'currency-symbol': string;
|
|
2786
|
-
'currency-code': string;
|
|
2787
|
-
};
|
|
2788
|
-
SGD: {
|
|
2789
|
-
'currency-symbol': string;
|
|
2790
|
-
'currency-code': string;
|
|
2791
|
-
};
|
|
2792
|
-
SLL: {
|
|
2793
|
-
'currency-symbol': string;
|
|
2794
|
-
'currency-code': string;
|
|
2795
|
-
};
|
|
2796
|
-
SOS: {
|
|
2797
|
-
'currency-symbol': string;
|
|
2798
|
-
'currency-code': string;
|
|
2799
|
-
};
|
|
2800
|
-
SSP: {
|
|
2801
|
-
'currency-symbol': string;
|
|
2802
|
-
'currency-code': string;
|
|
2803
|
-
};
|
|
2804
|
-
SVC: {
|
|
2805
|
-
'currency-symbol': string;
|
|
2806
|
-
'currency-code': string;
|
|
2807
|
-
};
|
|
2808
|
-
SZL: {
|
|
2809
|
-
'currency-symbol': string;
|
|
2810
|
-
'currency-code': string;
|
|
2811
|
-
};
|
|
2812
|
-
THB: {
|
|
2813
|
-
'currency-symbol': string;
|
|
2814
|
-
'currency-code': string;
|
|
2815
|
-
};
|
|
2816
|
-
TTD: {
|
|
2817
|
-
'currency-symbol': string;
|
|
2818
|
-
'currency-code': string;
|
|
2819
|
-
};
|
|
2820
|
-
TZS: {
|
|
2821
|
-
'currency-symbol': string;
|
|
2822
|
-
'currency-code': string;
|
|
2823
|
-
};
|
|
2824
|
-
USD: {
|
|
2825
|
-
'currency-symbol': string;
|
|
2826
|
-
'currency-code': string;
|
|
2827
|
-
};
|
|
2828
|
-
UYU: {
|
|
2829
|
-
'currency-symbol': string;
|
|
2830
|
-
'currency-code': string;
|
|
2831
|
-
};
|
|
2832
|
-
UZS: {
|
|
2833
|
-
'currency-symbol': string;
|
|
2834
|
-
'currency-code': string;
|
|
2835
|
-
};
|
|
2836
|
-
YER: {
|
|
2837
|
-
'currency-symbol': string;
|
|
2838
|
-
'currency-code': string;
|
|
2839
|
-
};
|
|
2840
|
-
ZAR: {
|
|
2841
|
-
'currency-symbol': string;
|
|
2842
|
-
'currency-code': string;
|
|
2843
|
-
};
|
|
2844
|
-
KWD: {
|
|
2845
|
-
'currency-symbol': string;
|
|
2846
|
-
'currency-code': string;
|
|
2847
|
-
};
|
|
2848
|
-
BHD: {
|
|
2849
|
-
'currency-symbol': string;
|
|
2850
|
-
'currency-code': string;
|
|
2851
|
-
};
|
|
2852
|
-
OMR: {
|
|
2853
|
-
'currency-symbol': string;
|
|
2854
|
-
'currency-code': string;
|
|
2855
|
-
};
|
|
2856
|
-
};
|
|
2857
|
-
type Currency = keyof typeof currencyIndicatorMapping;
|
|
2858
2476
|
|
|
2859
2477
|
type AmountCommonProps = {
|
|
2860
2478
|
/**
|
|
@@ -2883,6 +2501,8 @@ type AmountCommonProps = {
|
|
|
2883
2501
|
/**
|
|
2884
2502
|
* Determines the visual representation of the currency, choose between displaying the currency symbol or code.
|
|
2885
2503
|
*
|
|
2504
|
+
* Note: Currency symbol and code is determined by the locale set in user's browser or set via @razorpay/i18nify-react library.
|
|
2505
|
+
*
|
|
2886
2506
|
* @default 'currency-symbol'
|
|
2887
2507
|
*/
|
|
2888
2508
|
currencyIndicator?: 'currency-symbol' | 'currency-code';
|
|
@@ -2892,7 +2512,7 @@ type AmountCommonProps = {
|
|
|
2892
2512
|
*
|
|
2893
2513
|
* @default 'INR'
|
|
2894
2514
|
* */
|
|
2895
|
-
currency?:
|
|
2515
|
+
currency?: CurrencyCodeType;
|
|
2896
2516
|
/**
|
|
2897
2517
|
* If true, the amount text will have a line through it.
|
|
2898
2518
|
*
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@razorpay/blade",
|
|
3
3
|
"description": "The Design System that powers Razorpay",
|
|
4
|
-
"version": "11.
|
|
4
|
+
"version": "11.2.1",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"engines": {
|
|
7
7
|
"node": ">=18.12.1"
|
|
@@ -269,7 +269,9 @@
|
|
|
269
269
|
"typescript": "4.9",
|
|
270
270
|
"typescript-transform-paths": "3.4.6",
|
|
271
271
|
"@types/body-scroll-lock": "3.1.0",
|
|
272
|
-
"ramda": "0.29.1"
|
|
272
|
+
"ramda": "0.29.1",
|
|
273
|
+
"@razorpay/i18nify-js": "1.4.0",
|
|
274
|
+
"@razorpay/i18nify-react": "4.0.0"
|
|
273
275
|
},
|
|
274
276
|
"peerDependencies": {
|
|
275
277
|
"react": ">=18",
|
|
@@ -283,7 +285,8 @@
|
|
|
283
285
|
"react-native-svg": "^12.3.0",
|
|
284
286
|
"react-native-gesture-handler": "^2.9.0",
|
|
285
287
|
"@gorhom/bottom-sheet": "^4.4.6",
|
|
286
|
-
"@gorhom/portal": "^1.0.14"
|
|
288
|
+
"@gorhom/portal": "^1.0.14",
|
|
289
|
+
"@razorpay/i18nify-js": "^1.4.0"
|
|
287
290
|
},
|
|
288
291
|
"peerDependenciesMeta": {
|
|
289
292
|
"react-native": {
|