zebpay-ui 0.0.41 → 0.0.43
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/.vscode/settings.json +3 -0
- package/coverage/clover.xml +424 -0
- package/coverage/coverage-final.json +23 -0
- package/coverage/lcov-report/base.css +224 -0
- package/coverage/lcov-report/block-navigation.js +87 -0
- package/coverage/lcov-report/components/Accordion/index.html +131 -0
- package/coverage/lcov-report/components/Accordion/index.tsx.html +202 -0
- package/coverage/lcov-report/components/Accordion/style.ts.html +166 -0
- package/coverage/lcov-report/components/Button/index.html +131 -0
- package/coverage/lcov-report/components/Button/index.tsx.html +277 -0
- package/coverage/lcov-report/components/Button/styles.ts.html +532 -0
- package/coverage/lcov-report/components/CircularLoader/index.html +131 -0
- package/coverage/lcov-report/components/CircularLoader/index.tsx.html +286 -0
- package/coverage/lcov-report/components/CircularLoader/style.ts.html +148 -0
- package/coverage/lcov-report/components/Input/index.html +131 -0
- package/coverage/lcov-report/components/Input/index.tsx.html +409 -0
- package/coverage/lcov-report/components/Input/styles.ts.html +433 -0
- package/coverage/lcov-report/components/PinInput/PinInputField.tsx.html +517 -0
- package/coverage/lcov-report/components/PinInput/index.html +146 -0
- package/coverage/lcov-report/components/PinInput/index.tsx.html +268 -0
- package/coverage/lcov-report/components/PinInput/style.ts.html +247 -0
- package/coverage/lcov-report/components/Popper/index.html +131 -0
- package/coverage/lcov-report/components/Popper/index.tsx.html +346 -0
- package/coverage/lcov-report/components/Popper/styles.ts.html +205 -0
- package/coverage/lcov-report/components/SidePanel/index.html +131 -0
- package/coverage/lcov-report/components/SidePanel/index.tsx.html +343 -0
- package/coverage/lcov-report/components/SidePanel/style.ts.html +307 -0
- package/coverage/lcov-report/components/Tooltip/index.html +131 -0
- package/coverage/lcov-report/components/Tooltip/index.tsx.html +307 -0
- package/coverage/lcov-report/components/Tooltip/styles.ts.html +157 -0
- package/coverage/lcov-report/favicon.png +0 -0
- package/coverage/lcov-report/index.html +236 -0
- package/coverage/lcov-report/prettify.css +1 -0
- package/coverage/lcov-report/prettify.js +2 -0
- package/coverage/lcov-report/sort-arrow-sprite.png +0 -0
- package/coverage/lcov-report/sorter.js +196 -0
- package/coverage/lcov-report/styles/colors.ts.html +235 -0
- package/coverage/lcov-report/styles/index.html +176 -0
- package/coverage/lcov-report/styles/index.ts.html +103 -0
- package/coverage/lcov-report/styles/mixins.ts.html +355 -0
- package/coverage/lcov-report/styles/typography.ts.html +1105 -0
- package/coverage/lcov-report/styles/utils.ts.html +202 -0
- package/coverage/lcov.info +780 -0
- package/dist/cjs/components/Avatar/index.d.ts +5 -0
- package/dist/cjs/components/Avatar/styles.d.ts +4 -0
- package/dist/cjs/components/Avatar/typings.d.ts +19 -0
- package/dist/cjs/components/AvatarGroup/index.d.ts +5 -0
- package/dist/cjs/components/AvatarGroup/styles.d.ts +1 -0
- package/dist/cjs/components/AvatarGroup/typings.d.ts +19 -0
- package/dist/cjs/components/RewardOMeter/index.d.ts +5 -0
- package/dist/cjs/components/RewardOMeter/styles.d.ts +3 -0
- package/dist/cjs/components/RewardOMeter/typings.d.ts +22 -0
- package/dist/cjs/components/index.d.ts +4 -1
- package/dist/cjs/index.js +2 -2
- package/dist/cjs/index.js.map +1 -1
- package/dist/cjs/styles/colors.d.ts +5 -0
- package/dist/esm/components/Avatar/index.d.ts +5 -0
- package/dist/esm/components/Avatar/styles.d.ts +4 -0
- package/dist/esm/components/Avatar/typings.d.ts +19 -0
- package/dist/esm/components/AvatarGroup/index.d.ts +5 -0
- package/dist/esm/components/AvatarGroup/styles.d.ts +1 -0
- package/dist/esm/components/AvatarGroup/typings.d.ts +19 -0
- package/dist/esm/components/RewardOMeter/index.d.ts +5 -0
- package/dist/esm/components/RewardOMeter/styles.d.ts +3 -0
- package/dist/esm/components/RewardOMeter/typings.d.ts +22 -0
- package/dist/esm/components/index.d.ts +4 -1
- package/dist/esm/index.js +3 -3
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/styles/colors.d.ts +5 -0
- package/dist/icons/icons.css +191 -185
- package/dist/icons/icons.eot +0 -0
- package/dist/icons/icons.html +18 -0
- package/dist/icons/icons.json +184 -182
- package/dist/icons/icons.ts +190 -182
- package/dist/icons/icons.woff +0 -0
- package/dist/icons/icons.woff2 +0 -0
- package/jest.config.js +15 -0
- package/package.json +21 -6
- package/tests/Accordion.test.tsx +40 -0
- package/tests/Avatar.test.tsx +76 -0
- package/tests/Button.test.tsx +35 -0
- package/tests/Input.test.tsx +39 -0
- package/tests/PinInput.test.tsx +89 -0
- package/tests/Popper.test.tsx +50 -0
- package/tests/RewardOMeter.test.tsx +73 -0
- package/tests/SearchInput.test.tsx +34 -0
- package/tests/Select.test.tsx +74 -0
- package/tests/SidePanel.test.tsx +74 -0
- package/tests/Tooltip.test.tsx +36 -0
- package/tests/__snapshots__/Accordion.test.tsx.snap +11 -0
- package/tests/__snapshots__/Button.test.tsx.snap +10 -0
- package/tests/__snapshots__/PinInput.test.tsx.snap +18 -0
- package/tests/__snapshots__/Popper.test.tsx.snap +15 -0
- package/tests/__snapshots__/SidePanel.test.tsx.snap +10 -0
package/dist/icons/icons.ts
CHANGED
|
@@ -17,6 +17,7 @@ export type IconsId =
|
|
|
17
17
|
| "asterik"
|
|
18
18
|
| "balance-ltv"
|
|
19
19
|
| "bank"
|
|
20
|
+
| "basket"
|
|
20
21
|
| "blog"
|
|
21
22
|
| "bonus"
|
|
22
23
|
| "buy-crypto"
|
|
@@ -107,6 +108,7 @@ export type IconsId =
|
|
|
107
108
|
| "max-supply"
|
|
108
109
|
| "menu"
|
|
109
110
|
| "more-options"
|
|
111
|
+
| "needle"
|
|
110
112
|
| "negative"
|
|
111
113
|
| "network"
|
|
112
114
|
| "next"
|
|
@@ -219,6 +221,7 @@ export type IconsKey =
|
|
|
219
221
|
| "Asterik"
|
|
220
222
|
| "BalanceLtv"
|
|
221
223
|
| "Bank"
|
|
224
|
+
| "Basket"
|
|
222
225
|
| "Blog"
|
|
223
226
|
| "Bonus"
|
|
224
227
|
| "BuyCrypto"
|
|
@@ -309,6 +312,7 @@ export type IconsKey =
|
|
|
309
312
|
| "MaxSupply"
|
|
310
313
|
| "Menu"
|
|
311
314
|
| "MoreOptions"
|
|
315
|
+
| "Needle"
|
|
312
316
|
| "Negative"
|
|
313
317
|
| "Network"
|
|
314
318
|
| "Next"
|
|
@@ -421,6 +425,7 @@ export enum Icons {
|
|
|
421
425
|
Asterik = "asterik",
|
|
422
426
|
BalanceLtv = "balance-ltv",
|
|
423
427
|
Bank = "bank",
|
|
428
|
+
Basket = "basket",
|
|
424
429
|
Blog = "blog",
|
|
425
430
|
Bonus = "bonus",
|
|
426
431
|
BuyCrypto = "buy-crypto",
|
|
@@ -511,6 +516,7 @@ export enum Icons {
|
|
|
511
516
|
MaxSupply = "max-supply",
|
|
512
517
|
Menu = "menu",
|
|
513
518
|
MoreOptions = "more-options",
|
|
519
|
+
Needle = "needle",
|
|
514
520
|
Negative = "negative",
|
|
515
521
|
Network = "network",
|
|
516
522
|
Next = "next",
|
|
@@ -624,186 +630,188 @@ export const ICONS_CODEPOINTS: { [key in Icons]: string } = {
|
|
|
624
630
|
[Icons.Asterik]: "61712",
|
|
625
631
|
[Icons.BalanceLtv]: "61713",
|
|
626
632
|
[Icons.Bank]: "61714",
|
|
627
|
-
[Icons.
|
|
628
|
-
[Icons.
|
|
629
|
-
[Icons.
|
|
630
|
-
[Icons.
|
|
631
|
-
[Icons.
|
|
632
|
-
[Icons.
|
|
633
|
-
[Icons.
|
|
634
|
-
[Icons.
|
|
635
|
-
[Icons.
|
|
636
|
-
[Icons.
|
|
637
|
-
[Icons.
|
|
638
|
-
[Icons.
|
|
639
|
-
[Icons.
|
|
640
|
-
[Icons.
|
|
641
|
-
[Icons.
|
|
642
|
-
[Icons.
|
|
643
|
-
[Icons.
|
|
644
|
-
[Icons.
|
|
645
|
-
[Icons.
|
|
646
|
-
[Icons.
|
|
647
|
-
[Icons.
|
|
648
|
-
[Icons.
|
|
649
|
-
[Icons.
|
|
650
|
-
[Icons.
|
|
651
|
-
[Icons.
|
|
652
|
-
[Icons.
|
|
653
|
-
[Icons.
|
|
654
|
-
[Icons.
|
|
655
|
-
[Icons.
|
|
656
|
-
[Icons.
|
|
657
|
-
[Icons.
|
|
658
|
-
[Icons.
|
|
659
|
-
[Icons.
|
|
660
|
-
[Icons.
|
|
661
|
-
[Icons.
|
|
662
|
-
[Icons.
|
|
663
|
-
[Icons.
|
|
664
|
-
[Icons.
|
|
665
|
-
[Icons.
|
|
666
|
-
[Icons.
|
|
667
|
-
[Icons.
|
|
668
|
-
[Icons.
|
|
669
|
-
[Icons.
|
|
670
|
-
[Icons.
|
|
671
|
-
[Icons.
|
|
672
|
-
[Icons.
|
|
673
|
-
[Icons.
|
|
674
|
-
[Icons.
|
|
675
|
-
[Icons.
|
|
676
|
-
[Icons.
|
|
677
|
-
[Icons.
|
|
678
|
-
[Icons.
|
|
679
|
-
[Icons.
|
|
680
|
-
[Icons.
|
|
681
|
-
[Icons.
|
|
682
|
-
[Icons.
|
|
683
|
-
[Icons.
|
|
684
|
-
[Icons.
|
|
685
|
-
[Icons.
|
|
686
|
-
[Icons.
|
|
687
|
-
[Icons.
|
|
688
|
-
[Icons.
|
|
689
|
-
[Icons.
|
|
690
|
-
[Icons.
|
|
691
|
-
[Icons.
|
|
692
|
-
[Icons.
|
|
693
|
-
[Icons.
|
|
694
|
-
[Icons.
|
|
695
|
-
[Icons.
|
|
696
|
-
[Icons.
|
|
697
|
-
[Icons.
|
|
698
|
-
[Icons.
|
|
699
|
-
[Icons.
|
|
700
|
-
[Icons.
|
|
701
|
-
[Icons.
|
|
702
|
-
[Icons.
|
|
703
|
-
[Icons.
|
|
704
|
-
[Icons.
|
|
705
|
-
[Icons.
|
|
706
|
-
[Icons.
|
|
707
|
-
[Icons.
|
|
708
|
-
[Icons.
|
|
709
|
-
[Icons.
|
|
710
|
-
[Icons.
|
|
711
|
-
[Icons.
|
|
712
|
-
[Icons.
|
|
713
|
-
[Icons.
|
|
714
|
-
[Icons.
|
|
715
|
-
[Icons.
|
|
716
|
-
[Icons.
|
|
717
|
-
[Icons.
|
|
718
|
-
[Icons.
|
|
719
|
-
[Icons.
|
|
720
|
-
[Icons.
|
|
721
|
-
[Icons.
|
|
722
|
-
[Icons.
|
|
723
|
-
[Icons.
|
|
724
|
-
[Icons.
|
|
725
|
-
[Icons.
|
|
726
|
-
[Icons.
|
|
727
|
-
[Icons.
|
|
728
|
-
[Icons.
|
|
729
|
-
[Icons.
|
|
730
|
-
[Icons.
|
|
731
|
-
[Icons.
|
|
732
|
-
[Icons.
|
|
733
|
-
[Icons.
|
|
734
|
-
[Icons.
|
|
735
|
-
[Icons.
|
|
736
|
-
[Icons.
|
|
737
|
-
[Icons.
|
|
738
|
-
[Icons.
|
|
739
|
-
[Icons.
|
|
740
|
-
[Icons.
|
|
741
|
-
[Icons.
|
|
742
|
-
[Icons.
|
|
743
|
-
[Icons.
|
|
744
|
-
[Icons.
|
|
745
|
-
[Icons.
|
|
746
|
-
[Icons.
|
|
747
|
-
[Icons.
|
|
748
|
-
[Icons.
|
|
749
|
-
[Icons.
|
|
750
|
-
[Icons.
|
|
751
|
-
[Icons.
|
|
752
|
-
[Icons.
|
|
753
|
-
[Icons.
|
|
754
|
-
[Icons.
|
|
755
|
-
[Icons.
|
|
756
|
-
[Icons.
|
|
757
|
-
[Icons.
|
|
758
|
-
[Icons.
|
|
759
|
-
[Icons.
|
|
760
|
-
[Icons.
|
|
761
|
-
[Icons.
|
|
762
|
-
[Icons.
|
|
763
|
-
[Icons.
|
|
764
|
-
[Icons.
|
|
765
|
-
[Icons.
|
|
766
|
-
[Icons.
|
|
767
|
-
[Icons.
|
|
768
|
-
[Icons.
|
|
769
|
-
[Icons.
|
|
770
|
-
[Icons.
|
|
771
|
-
[Icons.
|
|
772
|
-
[Icons.
|
|
773
|
-
[Icons.
|
|
774
|
-
[Icons.
|
|
775
|
-
[Icons.
|
|
776
|
-
[Icons.
|
|
777
|
-
[Icons.
|
|
778
|
-
[Icons.
|
|
779
|
-
[Icons.
|
|
780
|
-
[Icons.
|
|
781
|
-
[Icons.
|
|
782
|
-
[Icons.
|
|
783
|
-
[Icons.
|
|
784
|
-
[Icons.
|
|
785
|
-
[Icons.
|
|
786
|
-
[Icons.
|
|
787
|
-
[Icons.
|
|
788
|
-
[Icons.
|
|
789
|
-
[Icons.
|
|
790
|
-
[Icons.
|
|
791
|
-
[Icons.
|
|
792
|
-
[Icons.
|
|
793
|
-
[Icons.
|
|
794
|
-
[Icons.
|
|
795
|
-
[Icons.
|
|
796
|
-
[Icons.
|
|
797
|
-
[Icons.
|
|
798
|
-
[Icons.
|
|
799
|
-
[Icons.
|
|
800
|
-
[Icons.
|
|
801
|
-
[Icons.
|
|
802
|
-
[Icons.
|
|
803
|
-
[Icons.
|
|
804
|
-
[Icons.
|
|
805
|
-
[Icons.
|
|
806
|
-
[Icons.
|
|
807
|
-
[Icons.
|
|
808
|
-
[Icons.
|
|
633
|
+
[Icons.Basket]: "61715",
|
|
634
|
+
[Icons.Blog]: "61716",
|
|
635
|
+
[Icons.Bonus]: "61717",
|
|
636
|
+
[Icons.BuyCrypto]: "61718",
|
|
637
|
+
[Icons.Calendar]: "61719",
|
|
638
|
+
[Icons.Camera]: "61720",
|
|
639
|
+
[Icons.Cancelled]: "61721",
|
|
640
|
+
[Icons.CandleChart]: "61722",
|
|
641
|
+
[Icons.Chart]: "61723",
|
|
642
|
+
[Icons.CheckboxAll]: "61724",
|
|
643
|
+
[Icons.Cheque]: "61725",
|
|
644
|
+
[Icons.CircleCross]: "61726",
|
|
645
|
+
[Icons.CirculationSupply]: "61727",
|
|
646
|
+
[Icons.City]: "61728",
|
|
647
|
+
[Icons.CoinStack]: "61729",
|
|
648
|
+
[Icons.Coins]: "61730",
|
|
649
|
+
[Icons.Compare]: "61731",
|
|
650
|
+
[Icons.Completed]: "61732",
|
|
651
|
+
[Icons.Contract]: "61733",
|
|
652
|
+
[Icons.Copy]: "61734",
|
|
653
|
+
[Icons.Coupon]: "61735",
|
|
654
|
+
[Icons.Cross]: "61736",
|
|
655
|
+
[Icons.CryptoWallet]: "61737",
|
|
656
|
+
[Icons.Deactivate]: "61738",
|
|
657
|
+
[Icons.DepositSimple]: "61739",
|
|
658
|
+
[Icons.Deposit]: "61740",
|
|
659
|
+
[Icons.DepthChart]: "61741",
|
|
660
|
+
[Icons.District]: "61742",
|
|
661
|
+
[Icons.Dob]: "61743",
|
|
662
|
+
[Icons.Download]: "61744",
|
|
663
|
+
[Icons.Downwards]: "61745",
|
|
664
|
+
[Icons.DrivingLicence]: "61746",
|
|
665
|
+
[Icons.Earned]: "61747",
|
|
666
|
+
[Icons.Edit]: "61748",
|
|
667
|
+
[Icons.Email]: "61749",
|
|
668
|
+
[Icons.EmiAmount]: "61750",
|
|
669
|
+
[Icons.EmiDuedate]: "61751",
|
|
670
|
+
[Icons.Error]: "61752",
|
|
671
|
+
[Icons.Exclamation]: "61753",
|
|
672
|
+
[Icons.Expand]: "61754",
|
|
673
|
+
[Icons.Expiry]: "61755",
|
|
674
|
+
[Icons.ExternalLink]: "61756",
|
|
675
|
+
[Icons.Facelock]: "61757",
|
|
676
|
+
[Icons.Fees]: "61758",
|
|
677
|
+
[Icons.FiatDeposit]: "61759",
|
|
678
|
+
[Icons.FiatWithdraw]: "61760",
|
|
679
|
+
[Icons.Filter]: "61761",
|
|
680
|
+
[Icons.Fingerprint]: "61762",
|
|
681
|
+
[Icons.Form]: "61763",
|
|
682
|
+
[Icons.Gallery]: "61764",
|
|
683
|
+
[Icons.Globe]: "61765",
|
|
684
|
+
[Icons.GreaterThanEqualTo]: "61766",
|
|
685
|
+
[Icons.Hamburger]: "61767",
|
|
686
|
+
[Icons.Help]: "61768",
|
|
687
|
+
[Icons.Hide]: "61769",
|
|
688
|
+
[Icons.History]: "61770",
|
|
689
|
+
[Icons.Home]: "61771",
|
|
690
|
+
[Icons.Ifsc]: "61772",
|
|
691
|
+
[Icons.IncomeSource]: "61773",
|
|
692
|
+
[Icons.Indicators]: "61774",
|
|
693
|
+
[Icons.Info]: "61775",
|
|
694
|
+
[Icons.InitialLtv]: "61776",
|
|
695
|
+
[Icons.InstantBuySell]: "61777",
|
|
696
|
+
[Icons.InterestAmount]: "61778",
|
|
697
|
+
[Icons.InterestRate]: "61779",
|
|
698
|
+
[Icons.Kyc_2]: "61780",
|
|
699
|
+
[Icons.Kyc]: "61781",
|
|
700
|
+
[Icons.Landscape]: "61782",
|
|
701
|
+
[Icons.Lend]: "61783",
|
|
702
|
+
[Icons.Lightning]: "61784",
|
|
703
|
+
[Icons.Lightning2]: "61785",
|
|
704
|
+
[Icons.Link]: "61786",
|
|
705
|
+
[Icons.LiquidationCost]: "61787",
|
|
706
|
+
[Icons.LiquidationId]: "61788",
|
|
707
|
+
[Icons.LiquidationPrice]: "61789",
|
|
708
|
+
[Icons.Liquidation]: "61790",
|
|
709
|
+
[Icons.List]: "61791",
|
|
710
|
+
[Icons.LoanAmount]: "61792",
|
|
711
|
+
[Icons.LoanDetails]: "61793",
|
|
712
|
+
[Icons.LoanRepayment]: "61794",
|
|
713
|
+
[Icons.LoanTerm]: "61795",
|
|
714
|
+
[Icons.Location]: "61796",
|
|
715
|
+
[Icons.Lock]: "61797",
|
|
716
|
+
[Icons.Logout]: "61798",
|
|
717
|
+
[Icons.LtvRatio]: "61799",
|
|
718
|
+
[Icons.Mail]: "61800",
|
|
719
|
+
[Icons.Map]: "61801",
|
|
720
|
+
[Icons.MarginCall]: "61802",
|
|
721
|
+
[Icons.MaxSupply]: "61803",
|
|
722
|
+
[Icons.Menu]: "61804",
|
|
723
|
+
[Icons.MoreOptions]: "61805",
|
|
724
|
+
[Icons.Needle]: "61806",
|
|
725
|
+
[Icons.Negative]: "61807",
|
|
726
|
+
[Icons.Network]: "61808",
|
|
727
|
+
[Icons.Next]: "61809",
|
|
728
|
+
[Icons.Nominee]: "61810",
|
|
729
|
+
[Icons.Note]: "61811",
|
|
730
|
+
[Icons.Notification]: "61812",
|
|
731
|
+
[Icons.Occupation]: "61813",
|
|
732
|
+
[Icons.Ongoing]: "61814",
|
|
733
|
+
[Icons.Order_2]: "61815",
|
|
734
|
+
[Icons.Order]: "61816",
|
|
735
|
+
[Icons.OrdersComplete]: "61817",
|
|
736
|
+
[Icons.PairSelector]: "61818",
|
|
737
|
+
[Icons.Pair]: "61819",
|
|
738
|
+
[Icons.Pan]: "61820",
|
|
739
|
+
[Icons.Passbook]: "61821",
|
|
740
|
+
[Icons.Passport]: "61822",
|
|
741
|
+
[Icons.PayEmi]: "61823",
|
|
742
|
+
[Icons.PayLumpsum]: "61824",
|
|
743
|
+
[Icons.PayOffLoan_2]: "61825",
|
|
744
|
+
[Icons.PayOffLoan]: "61826",
|
|
745
|
+
[Icons.PenaltyCharges]: "61827",
|
|
746
|
+
[Icons.Pending]: "61828",
|
|
747
|
+
[Icons.Percentage]: "61829",
|
|
748
|
+
[Icons.Phone]: "61830",
|
|
749
|
+
[Icons.Portrait]: "61831",
|
|
750
|
+
[Icons.Positive]: "61832",
|
|
751
|
+
[Icons.PrepayPrincipal]: "61833",
|
|
752
|
+
[Icons.Previous]: "61834",
|
|
753
|
+
[Icons.ProfileBorder]: "61835",
|
|
754
|
+
[Icons.Profile]: "61836",
|
|
755
|
+
[Icons.QrCode]: "61837",
|
|
756
|
+
[Icons.Quicktrade]: "61838",
|
|
757
|
+
[Icons.Rank]: "61839",
|
|
758
|
+
[Icons.Ream]: "61840",
|
|
759
|
+
[Icons.ReceiveLightning]: "61841",
|
|
760
|
+
[Icons.Receive]: "61842",
|
|
761
|
+
[Icons.Redo]: "61843",
|
|
762
|
+
[Icons.RepaymentSchedule]: "61844",
|
|
763
|
+
[Icons.Reports]: "61845",
|
|
764
|
+
[Icons.Reset]: "61846",
|
|
765
|
+
[Icons.Save]: "61847",
|
|
766
|
+
[Icons.Scan]: "61848",
|
|
767
|
+
[Icons.Search]: "61849",
|
|
768
|
+
[Icons.Security]: "61850",
|
|
769
|
+
[Icons.Selfie]: "61851",
|
|
770
|
+
[Icons.SellCrypto]: "61852",
|
|
771
|
+
[Icons.SendEmail]: "61853",
|
|
772
|
+
[Icons.SendLightning]: "61854",
|
|
773
|
+
[Icons.Send]: "61855",
|
|
774
|
+
[Icons.Separator]: "61856",
|
|
775
|
+
[Icons.Settings]: "61857",
|
|
776
|
+
[Icons.Share]: "61858",
|
|
777
|
+
[Icons.Shield]: "61859",
|
|
778
|
+
[Icons.Show]: "61860",
|
|
779
|
+
[Icons.Side_2]: "61861",
|
|
780
|
+
[Icons.Side]: "61862",
|
|
781
|
+
[Icons.Sip]: "61863",
|
|
782
|
+
[Icons.Sms]: "61864",
|
|
783
|
+
[Icons.SorterFilled]: "61865",
|
|
784
|
+
[Icons.Sorter]: "61866",
|
|
785
|
+
[Icons.StarFilled]: "61867",
|
|
786
|
+
[Icons.Star]: "61868",
|
|
787
|
+
[Icons.Statement]: "61869",
|
|
788
|
+
[Icons.Stop]: "61870",
|
|
789
|
+
[Icons.StreetAddress]: "61871",
|
|
790
|
+
[Icons.Subtract]: "61872",
|
|
791
|
+
[Icons.Success]: "61873",
|
|
792
|
+
[Icons.Support]: "61874",
|
|
793
|
+
[Icons.Taxnode]: "61875",
|
|
794
|
+
[Icons.Team]: "61876",
|
|
795
|
+
[Icons.Templates]: "61877",
|
|
796
|
+
[Icons.Term]: "61878",
|
|
797
|
+
[Icons.Tick]: "61879",
|
|
798
|
+
[Icons.Time]: "61880",
|
|
799
|
+
[Icons.TotalPayableLumpsum]: "61881",
|
|
800
|
+
[Icons.Trade_2]: "61882",
|
|
801
|
+
[Icons.Trash]: "61883",
|
|
802
|
+
[Icons.Trigger]: "61884",
|
|
803
|
+
[Icons.Trophy]: "61885",
|
|
804
|
+
[Icons.Unarchive]: "61886",
|
|
805
|
+
[Icons.Unlock]: "61887",
|
|
806
|
+
[Icons.UpiLandscape]: "61888",
|
|
807
|
+
[Icons.Upi]: "61889",
|
|
808
|
+
[Icons.Upload]: "61890",
|
|
809
|
+
[Icons.Upwards]: "61891",
|
|
810
|
+
[Icons.VotingCard]: "61892",
|
|
811
|
+
[Icons.Wallet]: "61893",
|
|
812
|
+
[Icons.WayArrow]: "61894",
|
|
813
|
+
[Icons.Whitelisted]: "61895",
|
|
814
|
+
[Icons.WithdrawSimple]: "61896",
|
|
815
|
+
[Icons.Xpress]: "61897",
|
|
816
|
+
[Icons.ZipCode]: "61898",
|
|
809
817
|
};
|
package/dist/icons/icons.woff
CHANGED
|
Binary file
|
package/dist/icons/icons.woff2
CHANGED
|
Binary file
|
package/jest.config.js
ADDED
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
module.exports = {
|
|
2
|
+
roots: ["<rootDir>"],
|
|
3
|
+
testMatch: [
|
|
4
|
+
"**/__tests__/**/*.+(ts|tsx|js)",
|
|
5
|
+
"**/?(*.)+(spec|test).+(ts|tsx|js)",
|
|
6
|
+
],
|
|
7
|
+
transform: {
|
|
8
|
+
"^.+\\.(ts|tsx)$": "ts-jest",
|
|
9
|
+
},
|
|
10
|
+
moduleNameMapper: {
|
|
11
|
+
"\\.(css|less|scss|sass)$": "identity-obj-proxy",
|
|
12
|
+
},
|
|
13
|
+
testEnvironment: "jsdom",
|
|
14
|
+
setupFilesAfterEnv: ["<rootDir>/src/setupTests.ts"],
|
|
15
|
+
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "zebpay-ui",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.43",
|
|
4
4
|
"description": "A lightweight component and utilities library Design System created using React",
|
|
5
5
|
"main": "dist/cjs/index.js",
|
|
6
6
|
"module": "dist/esm/index.js",
|
|
@@ -17,17 +17,21 @@
|
|
|
17
17
|
"storybook": "start-storybook -p 6006",
|
|
18
18
|
"build-storybook": "build-storybook",
|
|
19
19
|
"format": "prettier --write .",
|
|
20
|
-
"lint": "eslint
|
|
20
|
+
"lint": "eslint src --fix && eslint stories --fix",
|
|
21
21
|
"lint-staged": "lint-staged",
|
|
22
22
|
"prepare": "husky install",
|
|
23
23
|
"clear:output": "rimraf dist",
|
|
24
24
|
"build:icons": "mkdirp dist/icons && fantasticon svgs -o dist/icons",
|
|
25
25
|
"build": "rollup -c",
|
|
26
|
-
"watch": "rollup -c rollup.config.js -w"
|
|
26
|
+
"watch": "rollup -c rollup.config.js -w",
|
|
27
|
+
"test": "jest",
|
|
28
|
+
"coverage": "jest --coverage"
|
|
27
29
|
},
|
|
28
30
|
"devDependencies": {
|
|
29
31
|
"@babel/core": "^7.17.5",
|
|
32
|
+
"@babel/preset-env": "^7.19.4",
|
|
30
33
|
"@babel/preset-react": "^7.18.6",
|
|
34
|
+
"@babel/preset-typescript": "^7.18.6",
|
|
31
35
|
"@emotion/babel-plugin": "^11.9.2",
|
|
32
36
|
"@rollup/plugin-commonjs": "^21.0.3",
|
|
33
37
|
"@rollup/plugin-node-resolve": "^13.1.3",
|
|
@@ -38,28 +42,39 @@
|
|
|
38
42
|
"@storybook/addon-links": "^6.4.19",
|
|
39
43
|
"@storybook/react": "^6.4.19",
|
|
40
44
|
"@storybook/testing-library": "^0.0.9",
|
|
45
|
+
"@testing-library/jest-dom": "^5.16.5",
|
|
46
|
+
"@testing-library/react": "^13.4.0",
|
|
47
|
+
"@types/jest": "^29.2.0",
|
|
41
48
|
"@types/react": "^17.0.39",
|
|
42
49
|
"@types/react-calendar": "^3.5.2",
|
|
43
50
|
"@typescript-eslint/eslint-plugin": "^5.9.0",
|
|
44
51
|
"@typescript-eslint/parser": "^5.9.0",
|
|
45
52
|
"autoprefixer": "^10.4.8",
|
|
53
|
+
"babel-jest": "^29.2.2",
|
|
46
54
|
"babel-loader": "^8.2.3",
|
|
47
55
|
"cssnano": "^5.1.12",
|
|
48
|
-
"eslint": "^8.
|
|
56
|
+
"eslint": "^8.27.0",
|
|
49
57
|
"eslint-config-prettier": "^8.3.0",
|
|
58
|
+
"eslint-plugin-jest": "^27.1.4",
|
|
50
59
|
"eslint-plugin-prettier": "^4.0.0",
|
|
51
60
|
"fantasticon": "^1.2.3",
|
|
52
61
|
"husky": "^7.0.4",
|
|
62
|
+
"identity-obj-proxy": "^3.0.0",
|
|
63
|
+
"jest": "^29.2.2",
|
|
64
|
+
"jest-environment-jsdom": "^29.2.2",
|
|
65
|
+
"jest-extended": "^3.1.0",
|
|
53
66
|
"lint-staged": "^12.4.1",
|
|
54
67
|
"mkdirp": "^1.0.4",
|
|
55
68
|
"postcss": "^8.4.16",
|
|
56
69
|
"prettier": "^2.6.2",
|
|
70
|
+
"react-test-renderer": "^18.2.0",
|
|
57
71
|
"rimraf": "^3.0.2",
|
|
58
72
|
"rollup": "^2.70.1",
|
|
59
73
|
"rollup-plugin-babel": "^4.4.0",
|
|
60
74
|
"rollup-plugin-peer-deps-external": "^2.2.4",
|
|
61
75
|
"rollup-plugin-postcss": "^4.0.2",
|
|
62
76
|
"rollup-plugin-terser": "^7.0.2",
|
|
77
|
+
"ts-jest": "^29.0.3",
|
|
63
78
|
"typescript": "^4.5.5"
|
|
64
79
|
},
|
|
65
80
|
"peerDependencies": {
|
|
@@ -70,9 +85,9 @@
|
|
|
70
85
|
"dependencies": {
|
|
71
86
|
"@emotion/react": "^11.9.3",
|
|
72
87
|
"@popperjs/core": "^2.11.6",
|
|
73
|
-
"react": "^
|
|
88
|
+
"react": "^18.2.0",
|
|
74
89
|
"react-calendar": "^3.7.0",
|
|
75
|
-
"react-dom": "^
|
|
90
|
+
"react-dom": "^18.2.0",
|
|
76
91
|
"react-hot-toast": "^2.2.0"
|
|
77
92
|
}
|
|
78
93
|
}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import Accordion from "../src/components/Accordion";
|
|
3
|
+
import { render, fireEvent, cleanup, screen } from "@testing-library/react";
|
|
4
|
+
|
|
5
|
+
afterEach(cleanup);
|
|
6
|
+
|
|
7
|
+
const defaultProps = {
|
|
8
|
+
title: "Testing",
|
|
9
|
+
isOpen: true,
|
|
10
|
+
};
|
|
11
|
+
|
|
12
|
+
describe("Accordion Test", () => {
|
|
13
|
+
it("is rendered correctly", () => {
|
|
14
|
+
render(
|
|
15
|
+
<Accordion onToggle={() => {}} {...defaultProps}>
|
|
16
|
+
Accordion content
|
|
17
|
+
</Accordion>
|
|
18
|
+
);
|
|
19
|
+
expect(
|
|
20
|
+
<Accordion onToggle={() => {}} {...defaultProps}>
|
|
21
|
+
Accordion content
|
|
22
|
+
</Accordion>
|
|
23
|
+
).toMatchSnapshot();
|
|
24
|
+
});
|
|
25
|
+
|
|
26
|
+
test("is clicked", () => {
|
|
27
|
+
const handleClick = jest.fn();
|
|
28
|
+
render(
|
|
29
|
+
<Accordion isOpen={true} onToggle={handleClick} title={"Testing"}>
|
|
30
|
+
<p>AB</p>
|
|
31
|
+
</Accordion>
|
|
32
|
+
);
|
|
33
|
+
const divClick = screen.getByTestId("accordion");
|
|
34
|
+
fireEvent.click(divClick);
|
|
35
|
+
|
|
36
|
+
expect(screen.queryByText("AB")).toBeInTheDocument();
|
|
37
|
+
|
|
38
|
+
expect(handleClick).toHaveBeenCalledTimes(1);
|
|
39
|
+
});
|
|
40
|
+
});
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import Avatar from "../src/components/Avatar";
|
|
3
|
+
import { render, fireEvent, cleanup, screen } from "@testing-library/react";
|
|
4
|
+
|
|
5
|
+
afterEach(cleanup);
|
|
6
|
+
|
|
7
|
+
const defaultProps = {
|
|
8
|
+
src: "abc",
|
|
9
|
+
alt: "abc",
|
|
10
|
+
id: 1,
|
|
11
|
+
};
|
|
12
|
+
|
|
13
|
+
describe("Avatar Test", () => {
|
|
14
|
+
it("is rendered correctly", () => {
|
|
15
|
+
render(<Avatar {...defaultProps} spacing="medium" />);
|
|
16
|
+
expect(<Avatar {...defaultProps} spacing="medium" />).toMatchSnapshot();
|
|
17
|
+
});
|
|
18
|
+
|
|
19
|
+
test("is clicked", () => {
|
|
20
|
+
const handleClick = jest.fn();
|
|
21
|
+
render(<Avatar {...defaultProps} spacing="medium" onClick={handleClick} />);
|
|
22
|
+
const divClick = screen.getByTestId("avatar");
|
|
23
|
+
|
|
24
|
+
fireEvent.click(divClick);
|
|
25
|
+
expect(handleClick).toHaveBeenCalledTimes(1);
|
|
26
|
+
});
|
|
27
|
+
|
|
28
|
+
test("custom Child", () => {
|
|
29
|
+
render(
|
|
30
|
+
<Avatar {...defaultProps} spacing="medium">
|
|
31
|
+
W
|
|
32
|
+
</Avatar>
|
|
33
|
+
);
|
|
34
|
+
|
|
35
|
+
expect(screen.queryByText("W")).toBeInTheDocument();
|
|
36
|
+
});
|
|
37
|
+
test("loading state", () => {
|
|
38
|
+
render(
|
|
39
|
+
<Avatar {...defaultProps} spacing="medium" loading={true}>
|
|
40
|
+
W
|
|
41
|
+
</Avatar>
|
|
42
|
+
);
|
|
43
|
+
|
|
44
|
+
expect(screen.queryByText("W")).not.toBeInTheDocument();
|
|
45
|
+
expect(screen.queryByTestId("avatar")).not.toBeInTheDocument();
|
|
46
|
+
expect(screen.queryByTestId("shimmer")).toBeInTheDocument();
|
|
47
|
+
});
|
|
48
|
+
|
|
49
|
+
test("size small change", () => {
|
|
50
|
+
render(
|
|
51
|
+
<Avatar {...defaultProps} spacing="medium" size="small" loading={true}>
|
|
52
|
+
W
|
|
53
|
+
</Avatar>
|
|
54
|
+
);
|
|
55
|
+
expect(screen.getByTestId("shimmer")).toHaveStyle("width:24px");
|
|
56
|
+
expect(screen.getByTestId("shimmer")).toHaveStyle("height:24px");
|
|
57
|
+
});
|
|
58
|
+
test("size medium change", () => {
|
|
59
|
+
render(
|
|
60
|
+
<Avatar {...defaultProps} spacing="medium" size="medium" loading={true}>
|
|
61
|
+
W
|
|
62
|
+
</Avatar>
|
|
63
|
+
);
|
|
64
|
+
expect(screen.getByTestId("shimmer")).toHaveStyle("width:28px");
|
|
65
|
+
expect(screen.getByTestId("shimmer")).toHaveStyle("height:28px");
|
|
66
|
+
});
|
|
67
|
+
test("size large change", () => {
|
|
68
|
+
render(
|
|
69
|
+
<Avatar {...defaultProps} spacing="medium" size="large" loading={true}>
|
|
70
|
+
W
|
|
71
|
+
</Avatar>
|
|
72
|
+
);
|
|
73
|
+
expect(screen.getByTestId("shimmer")).toHaveStyle("width:32px");
|
|
74
|
+
expect(screen.getByTestId("shimmer")).toHaveStyle("height:32px");
|
|
75
|
+
});
|
|
76
|
+
});
|