@stokr/components-library 2.3.65-beta.1 → 2.3.65-beta.11

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.
Files changed (222) hide show
  1. package/dist/components/2FA/main-flow.js +28 -7
  2. package/dist/components/AdminDashboard/Table/ReactTable.js +123 -7
  3. package/dist/components/Chips/Chip.js +1 -2
  4. package/dist/components/Chips/Chip.styles.js +3 -2
  5. package/dist/components/Input/Input.js +33 -33
  6. package/dist/components/Input/MultiSelect.js +319 -0
  7. package/dist/components/Input/SearchInput.js +78 -0
  8. package/dist/components/Input/SearchInput.styles.js +25 -0
  9. package/dist/components/Input/Select.js +51 -28
  10. package/dist/components/Modal/SideModal.js +82 -0
  11. package/dist/components/Modal/SideModal.styles.js +21 -0
  12. package/dist/components/Payment/PaymentDetailsCard.js +189 -0
  13. package/dist/components/Payment/PaymentDisplay.js +2 -12
  14. package/dist/components/ProfileBox/ProfileBox.js +2 -1
  15. package/dist/components/Snackbar/Snackbar.js +193 -0
  16. package/dist/components/Snackbar/Snackbar.styles.js +97 -0
  17. package/dist/components/Snackbar/SnackbarProvider.js +81 -0
  18. package/dist/components/Snackbar/index.js +32 -0
  19. package/dist/components/Snackbar/useSnackbar.js +43 -0
  20. package/dist/components/StatusTag/StatusTag.js +175 -0
  21. package/dist/components/StatusTag/StatusTag.styles.js +37 -0
  22. package/dist/components/StepsProgress/StepIndicator.js +59 -0
  23. package/dist/components/StepsProgress/StepIndicator.styles.js +30 -0
  24. package/dist/components/TextLink/TextLink.styles.js +1 -1
  25. package/dist/components/Timeline/TimelineStep.js +2 -2
  26. package/dist/constants/globalVariables.js +41 -2
  27. package/dist/context/Checkbox/CheckboxContext.js +0 -1
  28. package/dist/index.js +66 -0
  29. package/dist/static/images/bmn2-logo.svg +9 -0
  30. package/dist/static/images/document-icon.svg +3 -0
  31. package/dist/static/images/plus-icon.svg +4 -0
  32. package/dist/static/images/search-icon.svg +3 -0
  33. package/dist/static/images/sent-icon.svg +10 -0
  34. package/dist/static/images/transfer-icon.svg +10 -0
  35. package/dist/utils/formatCurrencyValue.js +43 -3
  36. package/package.json +3 -2
  37. package/dist/components/2FA/EnterCode.stories.js +0 -35
  38. package/dist/components/2FA/disable-2fa-flow.stories.js +0 -31
  39. package/dist/components/2FA/enable-2fa-flow.stories.js +0 -31
  40. package/dist/components/2FA/login-with-otp-flow.stories.js +0 -31
  41. package/dist/components/2FA/main-flow.stories.js +0 -33
  42. package/dist/components/AccountBalance/AccountBalance.stories.js +0 -83
  43. package/dist/components/AdminDashboard/Table/ReactTable.stories.js +0 -406
  44. package/dist/components/AgreementItem/AgreementItem.stories.js +0 -105
  45. package/dist/components/AnalyticGraphs/Analytic.js +0 -541
  46. package/dist/components/AnalyticGraphs/Analytic.styles.js +0 -25
  47. package/dist/components/BackButton/BackButton.stories.js +0 -32
  48. package/dist/components/Background/Background.stories.js +0 -75
  49. package/dist/components/BarChart/BarChart.js +0 -263
  50. package/dist/components/BarChart/BarChart.stories.js +0 -66
  51. package/dist/components/BarChart/BarChart.styles.js +0 -26
  52. package/dist/components/BarChartLegend/BarChartLegend.js +0 -79
  53. package/dist/components/BarChartLegend/BarChartLegend.styles.js +0 -21
  54. package/dist/components/BasicTable/BasicTable.stories.js +0 -59
  55. package/dist/components/BlogPost/BlogPost.stories.js +0 -160
  56. package/dist/components/Button/Button.stories.js +0 -146
  57. package/dist/components/Button/GlareButton.stories.js +0 -132
  58. package/dist/components/CapitalRaisedSummary/CapitalRaisedSummery.stories.js +0 -42
  59. package/dist/components/ChartBox/ChartBox.js +0 -41
  60. package/dist/components/ChartBox/ChartBox.stories.js +0 -17
  61. package/dist/components/ChartBox/ChartBox.styles.js +0 -27
  62. package/dist/components/ChartBox/ChartBoxDistribution.js +0 -27
  63. package/dist/components/ChartBox/ChartBoxDistribution.stories.js +0 -18
  64. package/dist/components/ChartLegend/ChartLegend.stories.js +0 -90
  65. package/dist/components/Checkbox/Checkbox.stories.js +0 -88
  66. package/dist/components/Checklist/ChecklistCard.stories.js +0 -102
  67. package/dist/components/Checklist/UserChecklist.js +0 -184
  68. package/dist/components/Checklist/UserChecklist.stories.js +0 -317
  69. package/dist/components/Chips/Chip.stories.js +0 -36
  70. package/dist/components/Chips/ChipsWrapper.stories.js +0 -47
  71. package/dist/components/ComponentScroll/ComponentScroll.stories.js +0 -111
  72. package/dist/components/CryptoAddress/CryptoAddress.stories.js +0 -205
  73. package/dist/components/CryptoAddressDetails/CryptoAddressDetails.stories.js +0 -70
  74. package/dist/components/DonutChart/DonutChart.stories.js +0 -54
  75. package/dist/components/FAQ/FAQ.stories.js +0 -76
  76. package/dist/components/Footer/Footer.stories.js +0 -49
  77. package/dist/components/Footer/FooterLayout.stories.js +0 -26
  78. package/dist/components/Footer/FooterMenu.stories.js +0 -113
  79. package/dist/components/Footer/mangopay.png +0 -0
  80. package/dist/components/Footer/mangopay.svg +0 -20
  81. package/dist/components/ForgotPasswordModal/ForgotPasswordModal.stories.js +0 -69
  82. package/dist/components/Form/Form.stories.js +0 -32
  83. package/dist/components/FullscreenCard/FullscreenCard.styles.js +0 -27
  84. package/dist/components/Header/Header.stories.js +0 -192
  85. package/dist/components/InfoIcon/InfoIcon.stories.js +0 -299
  86. package/dist/components/InfoPanel/InfoPanel.js +0 -124
  87. package/dist/components/Input/DatePickerInput.stories.js +0 -87
  88. package/dist/components/Input/Input.stories.js +0 -142
  89. package/dist/components/Input/InputPassword.stories.js +0 -80
  90. package/dist/components/Input/InputWithButton.stories.js +0 -75
  91. package/dist/components/Input/OtpInput.stories.js +0 -57
  92. package/dist/components/Input/RangeInput.stories.js +0 -58
  93. package/dist/components/Input/Select.stories.js +0 -139
  94. package/dist/components/InvestCalculator/InvestCalculator.stories.js +0 -135
  95. package/dist/components/InvestmentStat/InvestmentStat.stories.js +0 -52
  96. package/dist/components/KYCFlow/BasicInfo.js +0 -448
  97. package/dist/components/KYCFlow/Confirmation.js +0 -46
  98. package/dist/components/KYCFlow/DocumentFileUpload.js +0 -263
  99. package/dist/components/KYCFlow/DocumentScan.js +0 -75
  100. package/dist/components/KYCFlow/DocumentScanUpload.js +0 -251
  101. package/dist/components/KYCFlow/DocumentSelect.js +0 -118
  102. package/dist/components/KYCFlow/DocumentSuccess.js +0 -63
  103. package/dist/components/KYCFlow/DocumentUpload.js +0 -53
  104. package/dist/components/KYCFlow/DocumentVerificationType.js +0 -131
  105. package/dist/components/KYCFlow/FaceScan.js +0 -54
  106. package/dist/components/KYCFlow/FaceScanRecognition.js +0 -61
  107. package/dist/components/KYCFlow/FaceScanSuccess.js +0 -56
  108. package/dist/components/KYCFlow/Terms.js +0 -119
  109. package/dist/components/KYCFlow/_styles.js +0 -111
  110. package/dist/components/KYCFlow/index.js +0 -97
  111. package/dist/components/KYCSelectBox/KYCSelectBox.styles.js +0 -29
  112. package/dist/components/LatestUpdate/LatestUpdate.stories.js +0 -58
  113. package/dist/components/Layout/Layout.stories.js +0 -60
  114. package/dist/components/LearnMoreCarousel/LearnMoreCarousel.stories.js +0 -66
  115. package/dist/components/LearnMorePage/LearnMore.stories.js +0 -48
  116. package/dist/components/LearnMorePage/LearnMoreItem.stories.js +0 -62
  117. package/dist/components/LearnMoreSection/LearnMore.stories.js +0 -30
  118. package/dist/components/LearnMoreSection/LearnMoreItem.stories.js +0 -59
  119. package/dist/components/LoginModal/LoginModal.stories.js +0 -74
  120. package/dist/components/MatomoConnect/Matomo.js +0 -228
  121. package/dist/components/MatomoConnect/Matomo_fuckup.js +0 -387
  122. package/dist/components/Modal/Modal.stories.js +0 -75
  123. package/dist/components/Modal/NewVentureModal/NewVentureModal.stories.js +0 -150
  124. package/dist/components/Modal/PaymentModal.stories.js +0 -57
  125. package/dist/components/MultiProgressBar/MultiProgressBar.stories.js +0 -67
  126. package/dist/components/Newsletter/Newsletter.stories.js +0 -16
  127. package/dist/components/NotificationContext/NotificationContext.js +0 -141
  128. package/dist/components/Number/Number.stories.js +0 -92
  129. package/dist/components/Pagination/Pagination.stories.js +0 -83
  130. package/dist/components/Pagination/PaginationControls.stories.js +0 -112
  131. package/dist/components/Payment/PaymentDisplay.stories.js +0 -302
  132. package/dist/components/Payment/TimerComponent.stories.js +0 -236
  133. package/dist/components/Process/Process.stories.js +0 -42
  134. package/dist/components/ProfileBadge/ProfileBadge.stories.js +0 -45
  135. package/dist/components/ProfileBox/ProfileBox.stories.js +0 -35
  136. package/dist/components/ProfileHeader/ProfileHeader.js +0 -252
  137. package/dist/components/ProfileHeader/ProfileHeader.styles.js +0 -65
  138. package/dist/components/ProfileStat/ProfileStat.stories.js +0 -66
  139. package/dist/components/ProofOfAddress/ProofOfAddress.styles.js +0 -53
  140. package/dist/components/QRCode/QRCode.stories.js +0 -104
  141. package/dist/components/Radio/Radio.stories.js +0 -73
  142. package/dist/components/RefreshButton/RefreshButton.stories.js +0 -38
  143. package/dist/components/RegisterAlgorand/AlgoAddressName.js +0 -138
  144. package/dist/components/RegisterAlgorand/AlgoAdressSelect.js +0 -443
  145. package/dist/components/RegisterAlgorand/AlgoConnectWallet.js +0 -47
  146. package/dist/components/RegisterAlgorand/AlgoSuccess.js +0 -38
  147. package/dist/components/RegisterAlgorand/Algorand.stories.js +0 -80
  148. package/dist/components/RegisterAlgorand/ChooseWallet.js +0 -97
  149. package/dist/components/RegisterAlgorand/SelectProject.js +0 -89
  150. package/dist/components/RegisterAlgorand/_styles.js +0 -28
  151. package/dist/components/RegisterAlgorand/flow.js +0 -409
  152. package/dist/components/RegisterAlgorand/flowWithMemo.js +0 -410
  153. package/dist/components/RegisterAlgorand/index.js +0 -48
  154. package/dist/components/RegisterConfirmModal/RegisterConfirmModal.stories.js +0 -41
  155. package/dist/components/RegisterEthereum/EthAddressLedger.js +0 -226
  156. package/dist/components/RegisterEthereum/EthAddressMetamask.js +0 -204
  157. package/dist/components/RegisterEthereum/EthAddressName.js +0 -135
  158. package/dist/components/RegisterEthereum/EthConnectLedger.js +0 -194
  159. package/dist/components/RegisterEthereum/EthConnectMetamask.js +0 -35
  160. package/dist/components/RegisterEthereum/EthFinish.js +0 -41
  161. package/dist/components/RegisterEthereum/EthIntro.js +0 -95
  162. package/dist/components/RegisterEthereum/_styles.js +0 -28
  163. package/dist/components/RegisterEthereum/index.js +0 -68
  164. package/dist/components/RegisterModal/RegisterModal.stories.js +0 -49
  165. package/dist/components/RequestDataBox/RequestDataBox.stories.js +0 -37
  166. package/dist/components/RiskQuestionnaire/RiskQuestionnaireContext.js +0 -185
  167. package/dist/components/RiskQuestionnaire/_styles.js +0 -15
  168. package/dist/components/SEO/SEO.stories.js +0 -60
  169. package/dist/components/SideLine/SideLine.stories.js +0 -28
  170. package/dist/components/SigningSubflow/SignSubAddressMetamask.js +0 -137
  171. package/dist/components/SigningSubflow/SignSubConnectLedger.js +0 -150
  172. package/dist/components/SigningSubflow/SignSubConnectMetamask.js +0 -137
  173. package/dist/components/SigningSubflow/SignSubIntro.js +0 -55
  174. package/dist/components/SigningSubflow/SignSubSendLedger.js +0 -150
  175. package/dist/components/SigningSubflow/SignSubSendMetamask.js +0 -62
  176. package/dist/components/SigningSubflow/SignSubTransactionLedger.js +0 -161
  177. package/dist/components/SigningSubflow/SignSubTransactionMetamask.js +0 -166
  178. package/dist/components/SigningSubflow/_styles.js +0 -34
  179. package/dist/components/SigningSubflow/index.js +0 -32
  180. package/dist/components/Slider/Slider.stories.js +0 -68
  181. package/dist/components/StepController/StepController.stories.js +0 -60
  182. package/dist/components/StepController/StepControllerProgress.stories.js +0 -49
  183. package/dist/components/StepsProgress/StepsProgress.stories.js +0 -49
  184. package/dist/components/Switch/Switch.stories.js +0 -81
  185. package/dist/components/Tabs/Tabs.stories.js +0 -36
  186. package/dist/components/TabsNav/TabNav.stories.js +0 -40
  187. package/dist/components/TabsNav/TabsNav.stories.js +0 -37
  188. package/dist/components/TeamOverview/TeamOverview.stories.js +0 -76
  189. package/dist/components/TermsModal/TermsModal.stories.js +0 -31
  190. package/dist/components/Text/Headline.stories.js +0 -48
  191. package/dist/components/Text/Text.stories.js +0 -70
  192. package/dist/components/Timeline/Timeline.stories.js +0 -393
  193. package/dist/components/ToDoList/ToDoList.stories.js +0 -133
  194. package/dist/components/ToDoList/ToDoListTask.stories.js +0 -70
  195. package/dist/components/TransactionDetails/TransactionDetails.stories.js +0 -55
  196. package/dist/components/TransactionDetails/TransactionDetailsTable.stories.js +0 -305
  197. package/dist/components/TransactionInfo/TransactionInfo.stories.js +0 -61
  198. package/dist/components/TwoFactorModal/TwoFactorModal.js +0 -100
  199. package/dist/components/VerifyEmailModal/VerifyEmailModal.stories.js +0 -59
  200. package/dist/components/headerHo/HeaderHo.stories.js +0 -35
  201. package/dist/components/icons/Arrow.stories.js +0 -42
  202. package/dist/components/icons/ArrowSimple.stories.js +0 -48
  203. package/dist/components/icons/Check.stories.js +0 -22
  204. package/dist/components/icons/Facebook.stories.js +0 -21
  205. package/dist/components/icons/Facebook_Logo.png +0 -0
  206. package/dist/components/icons/Info.stories.js +0 -16
  207. package/dist/components/icons/Instagram.stories.js +0 -21
  208. package/dist/components/icons/LI-In-Bug.png +0 -0
  209. package/dist/components/icons/LinkIcon.stories.js +0 -21
  210. package/dist/components/icons/LinkedIn.stories.js +0 -16
  211. package/dist/components/icons/Medium.stories.js +0 -16
  212. package/dist/components/icons/Reddit.stories.js +0 -21
  213. package/dist/components/icons/Share.stories.js +0 -16
  214. package/dist/components/icons/Telegram-Logo.png +0 -0
  215. package/dist/components/icons/Telegram.stories.js +0 -16
  216. package/dist/components/icons/Twitter.stories.js +0 -21
  217. package/dist/components/icons/X-logo-black.png +0 -0
  218. package/dist/components/icons/X.stories.js +0 -16
  219. package/dist/components/icons/Youtube.stories.js +0 -21
  220. package/dist/components/icons/youtube_social_circle_red.png +0 -0
  221. package/dist/components/taxId/TaxId.stories.js +0 -50
  222. package/dist/components/video/Video.stories.js +0 -52
@@ -1,302 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.default = exports.WithoutQRCode = exports.WithoutCopyIcons = exports.WithCallbacks = exports.USDQPayment = exports.USDCPayment = exports.SmallQRCode = exports.Minimal = exports.LongAddress = exports.LargeQRCode = exports.LargeAmount = exports.CustomWidth = exports.CustomTitles = exports.CustomStyling = exports.CompleteExample = exports.BitcoinPayment = exports.AmountOnly = void 0;
7
- var _react = _interopRequireDefault(require("react"));
8
- var _PaymentDisplay = _interopRequireDefault(require("./PaymentDisplay"));
9
- var _ComponentWrapper = require("../ComponentWrapper/ComponentWrapper.styles");
10
- var _global = _interopRequireDefault(require("../../styles/global"));
11
- var _colors = _interopRequireDefault(require("../../styles/colors"));
12
- function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
13
- var _default = exports.default = {
14
- title: 'Components Library/Payment/PaymentDisplay',
15
- component: _PaymentDisplay.default,
16
- argTypes: {
17
- amount: {
18
- control: 'text',
19
- description: 'The payment amount to display'
20
- },
21
- currency: {
22
- control: 'text',
23
- description: 'Currency code (BTC, USDC, USDQ, etc.)'
24
- },
25
- address: {
26
- control: 'text',
27
- description: 'Cryptocurrency address to display'
28
- },
29
- showQRCode: {
30
- control: 'boolean',
31
- description: 'Show QR code section',
32
- defaultValue: true
33
- },
34
- showCopyIcons: {
35
- control: 'boolean',
36
- description: 'Show copy to clipboard icons',
37
- defaultValue: true
38
- },
39
- showAddress: {
40
- control: 'boolean',
41
- description: 'Show address section',
42
- defaultValue: true
43
- },
44
- qrCodeValue: {
45
- control: 'text',
46
- description: 'Value to encode in QR code'
47
- },
48
- amountTitle: {
49
- control: 'text',
50
- description: 'Title for the amount section'
51
- },
52
- addressTitle: {
53
- control: 'text',
54
- description: 'Title for the address section'
55
- },
56
- addressDescription: {
57
- control: 'text',
58
- description: 'Description text below the address'
59
- },
60
- qrCodeSize: {
61
- control: 'number',
62
- description: 'Size of the QR code in pixels'
63
- },
64
- maxWidth: {
65
- control: 'text',
66
- description: 'Maximum width of the code wrapper'
67
- },
68
- containerStyle: {
69
- control: 'object',
70
- description: 'Style object for the container'
71
- },
72
- codeWrapperStyle: {
73
- control: 'object',
74
- description: 'Style object for the code wrapper'
75
- },
76
- qrCodeStyle: {
77
- control: 'object',
78
- description: 'Style object for the QR code'
79
- },
80
- customCurrencyIcon: {
81
- control: false,
82
- description: 'Custom currency icon (image source)'
83
- },
84
- onAmountCopy: {
85
- action: 'amountCopied',
86
- description: 'Callback when amount is copied'
87
- },
88
- onAddressCopy: {
89
- action: 'addressCopied',
90
- description: 'Callback when address is copied'
91
- }
92
- },
93
- decorators: [Story => /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement(_global.default, null), /*#__PURE__*/_react.default.createElement(_ComponentWrapper.ComponentWrapper, null, /*#__PURE__*/_react.default.createElement(Story, null)))]
94
- };
95
- const Template = args => /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement(_global.default, null), /*#__PURE__*/_react.default.createElement(_PaymentDisplay.default, args));
96
-
97
- // Basic BTC payment
98
- const BitcoinPayment = exports.BitcoinPayment = Template.bind({});
99
- BitcoinPayment.args = {
100
- amount: '0.5',
101
- currency: 'BTC',
102
- address: 'bc1qxy2kgdygjrsqtzq2n0yrf2493p83kkfjhx0wlh',
103
- qrCodeValue: 'bc1qxy2kgdygjrsqtzq2n0yrf2493p83kkfjhx0wlh',
104
- amountTitle: 'Transfer amount',
105
- addressTitle: 'Bitcoin address',
106
- addressDescription: 'Send exactly this amount to the address above.'
107
- };
108
-
109
- // USDC payment
110
- const USDCPayment = exports.USDCPayment = Template.bind({});
111
- USDCPayment.args = {
112
- amount: '1,000.00',
113
- currency: 'USDC',
114
- address: '0x742d35Cc6634C0532925a3b844Bc9e7595f0bEb',
115
- qrCodeValue: '0x742d35Cc6634C0532925a3b844Bc9e7595f0bEb',
116
- amountTitle: 'Transfer amount',
117
- addressTitle: 'USDC address',
118
- addressDescription: 'Send USDC to this Ethereum address.'
119
- };
120
-
121
- // USDQ payment
122
- const USDQPayment = exports.USDQPayment = Template.bind({});
123
- USDQPayment.args = {
124
- amount: '500.00',
125
- currency: 'USDQ',
126
- address: '0x8ba1f109551bD432803012645Hac136c22C1779',
127
- qrCodeValue: '0x8ba1f109551bD432803012645Hac136c22C1779',
128
- amountTitle: 'Transfer amount',
129
- addressTitle: 'USDQ address',
130
- addressDescription: 'Send USDQ to this address.'
131
- };
132
-
133
- // Without QR code
134
- const WithoutQRCode = exports.WithoutQRCode = Template.bind({});
135
- WithoutQRCode.args = {
136
- amount: '0.5',
137
- currency: 'BTC',
138
- address: 'bc1qxy2kgdygjrsqtzq2n0yrf2493p83kkfjhx0wlh',
139
- showQRCode: false,
140
- amountTitle: 'Transfer amount',
141
- addressTitle: 'Bitcoin address'
142
- };
143
-
144
- // Without copy icons
145
- const WithoutCopyIcons = exports.WithoutCopyIcons = Template.bind({});
146
- WithoutCopyIcons.args = {
147
- amount: '0.5',
148
- currency: 'BTC',
149
- address: 'bc1qxy2kgdygjrsqtzq2n0yrf2493p83kkfjhx0wlh',
150
- qrCodeValue: 'bc1qxy2kgdygjrsqtzq2n0yrf2493p83kkfjhx0wlh',
151
- showCopyIcons: false,
152
- amountTitle: 'Transfer amount',
153
- addressTitle: 'Bitcoin address'
154
- };
155
-
156
- // Without address section
157
- const AmountOnly = exports.AmountOnly = Template.bind({});
158
- AmountOnly.args = {
159
- amount: '0.5',
160
- currency: 'BTC',
161
- showAddress: false,
162
- qrCodeValue: 'bc1qxy2kgdygjrsqtzq2n0yrf2493p83kkfjhx0wlh',
163
- amountTitle: 'Transfer amount'
164
- };
165
-
166
- // Long address
167
- const LongAddress = exports.LongAddress = Template.bind({});
168
- LongAddress.args = {
169
- amount: '1,000.00',
170
- currency: 'USDC',
171
- address: '0x742d35Cc6634C0532925a3b844Bc9e7595f0bEb742d35Cc6634C0532925a3b844Bc9e7595f0bEb',
172
- qrCodeValue: '0x742d35Cc6634C0532925a3b844Bc9e7595f0bEb742d35Cc6634C0532925a3b844Bc9e7595f0bEb',
173
- amountTitle: 'Transfer amount',
174
- addressTitle: 'Ethereum address',
175
- addressDescription: 'This is a very long address that should wrap properly. Make sure to send the exact amount.'
176
- };
177
-
178
- // Large amount
179
- const LargeAmount = exports.LargeAmount = Template.bind({});
180
- LargeAmount.args = {
181
- amount: '1,000,000.00',
182
- currency: 'USDC',
183
- address: '0x742d35Cc6634C0532925a3b844Bc9e7595f0bEb',
184
- qrCodeValue: '0x742d35Cc6634C0532925a3b844Bc9e7595f0bEb',
185
- amountTitle: 'Transfer amount',
186
- addressTitle: 'USDC address'
187
- };
188
-
189
- // Custom width
190
- const CustomWidth = exports.CustomWidth = Template.bind({});
191
- CustomWidth.args = {
192
- amount: '0.5',
193
- currency: 'BTC',
194
- address: 'bc1qxy2kgdygjrsqtzq2n0yrf2493p83kkfjhx0wlh',
195
- qrCodeValue: 'bc1qxy2kgdygjrsqtzq2n0yrf2493p83kkfjhx0wlh',
196
- maxWidth: '800px',
197
- amountTitle: 'Transfer amount',
198
- addressTitle: 'Bitcoin address'
199
- };
200
-
201
- // Custom styling
202
- const CustomStyling = exports.CustomStyling = Template.bind({});
203
- CustomStyling.args = {
204
- amount: '0.5',
205
- currency: 'BTC',
206
- address: 'bc1qxy2kgdygjrsqtzq2n0yrf2493p83kkfjhx0wlh',
207
- qrCodeValue: 'bc1qxy2kgdygjrsqtzq2n0yrf2493p83kkfjhx0wlh',
208
- amountTitle: 'Transfer amount',
209
- addressTitle: 'Bitcoin address',
210
- addressDescription: 'Send exactly this amount to the address above.',
211
- codeWrapperStyle: {
212
- backgroundColor: _colors.default.veryLightGreen,
213
- borderColor: _colors.default.freshGreen
214
- },
215
- qrCodeStyle: {
216
- backgroundColor: '#ffffff',
217
- padding: 20,
218
- borderRadius: 12
219
- }
220
- };
221
-
222
- // Small QR code
223
- const SmallQRCode = exports.SmallQRCode = Template.bind({});
224
- SmallQRCode.args = {
225
- amount: '0.5',
226
- currency: 'BTC',
227
- address: 'bc1qxy2kgdygjrsqtzq2n0yrf2493p83kkfjhx0wlh',
228
- qrCodeValue: 'bc1qxy2kgdygjrsqtzq2n0yrf2493p83kkfjhx0wlh',
229
- qrCodeSize: 150,
230
- amountTitle: 'Transfer amount',
231
- addressTitle: 'Bitcoin address'
232
- };
233
-
234
- // Large QR code
235
- const LargeQRCode = exports.LargeQRCode = Template.bind({});
236
- LargeQRCode.args = {
237
- amount: '0.5',
238
- currency: 'BTC',
239
- address: 'bc1qxy2kgdygjrsqtzq2n0yrf2493p83kkfjhx0wlh',
240
- qrCodeValue: 'bc1qxy2kgdygjrsqtzq2n0yrf2493p83kkfjhx0wlh',
241
- qrCodeSize: 300,
242
- amountTitle: 'Transfer amount',
243
- addressTitle: 'Bitcoin address'
244
- };
245
-
246
- // Custom titles
247
- const CustomTitles = exports.CustomTitles = Template.bind({});
248
- CustomTitles.args = {
249
- amount: '0.5',
250
- currency: 'BTC',
251
- address: 'bc1qxy2kgdygjrsqtzq2n0yrf2493p83kkfjhx0wlh',
252
- qrCodeValue: 'bc1qxy2kgdygjrsqtzq2n0yrf2493p83kkfjhx0wlh',
253
- amountTitle: 'Payment Amount',
254
- addressTitle: 'Recipient Address',
255
- addressDescription: 'Please send the exact amount shown above to this address.'
256
- };
257
-
258
- // Minimal (no description, no QR)
259
- const Minimal = exports.Minimal = Template.bind({});
260
- Minimal.args = {
261
- amount: '0.5',
262
- currency: 'BTC',
263
- address: 'bc1qxy2kgdygjrsqtzq2n0yrf2493p83kkfjhx0wlh',
264
- showQRCode: false,
265
- addressDescription: '',
266
- amountTitle: 'Amount',
267
- addressTitle: 'Address'
268
- };
269
-
270
- // Complete example with all features
271
- const CompleteExample = exports.CompleteExample = Template.bind({});
272
- CompleteExample.args = {
273
- amount: '1,500.00',
274
- currency: 'USDC',
275
- address: '0x742d35Cc6634C0532925a3b844Bc9e7595f0bEb',
276
- qrCodeValue: '0x742d35Cc6634C0532925a3b844Bc9e7595f0bEb',
277
- amountTitle: 'Transfer Amount',
278
- addressTitle: 'USDC Address',
279
- addressDescription: 'Send exactly 1,500.00 USDC to the address above. The transaction will be processed automatically once confirmed on the blockchain.',
280
- qrCodeSize: 250,
281
- maxWidth: '600px',
282
- showQRCode: true,
283
- showCopyIcons: true,
284
- showAddress: true
285
- };
286
-
287
- // With callbacks
288
- const WithCallbacks = exports.WithCallbacks = Template.bind({});
289
- WithCallbacks.args = {
290
- amount: '0.5',
291
- currency: 'BTC',
292
- address: 'bc1qxy2kgdygjrsqtzq2n0yrf2493p83kkfjhx0wlh',
293
- qrCodeValue: 'bc1qxy2kgdygjrsqtzq2n0yrf2493p83kkfjhx0wlh',
294
- amountTitle: 'Transfer amount',
295
- addressTitle: 'Bitcoin address',
296
- onAmountCopy: value => {
297
- console.log('Amount copied:', value);
298
- },
299
- onAddressCopy: value => {
300
- console.log('Address copied:', value);
301
- }
302
- };
@@ -1,236 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.default = exports.WithoutIcon = exports.WithCallback = exports.WarningState = exports.VeryShortTimer = exports.ShortTimer = exports.LongTimer = exports.Default = exports.CustomWidth = exports.CustomWarningThreshold = exports.CustomTitle = exports.CustomStyling = exports.CustomDescription = exports.CompleteCustom = void 0;
7
- var _react = _interopRequireWildcard(require("react"));
8
- var _TimerComponent = _interopRequireDefault(require("./TimerComponent"));
9
- var _ComponentWrapper = require("../ComponentWrapper/ComponentWrapper.styles");
10
- var _global = _interopRequireDefault(require("../../styles/global"));
11
- var _TimerService = _interopRequireDefault(require("../../services/TimerService"));
12
- var _colors = _interopRequireDefault(require("../../styles/colors"));
13
- const _excluded = ["timerId", "duration", "children"];
14
- function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
15
- function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function (e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != typeof e && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (const t in e) "default" !== t && {}.hasOwnProperty.call(e, t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, t)) && (i.get || i.set) ? o(f, t, i) : f[t] = e[t]); return f; })(e, t); }
16
- function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }
17
- function _objectWithoutProperties(e, t) { if (null == e) return {}; var o, r, i = _objectWithoutPropertiesLoose(e, t); if (Object.getOwnPropertySymbols) { var n = Object.getOwnPropertySymbols(e); for (r = 0; r < n.length; r++) o = n[r], -1 === t.indexOf(o) && {}.propertyIsEnumerable.call(e, o) && (i[o] = e[o]); } return i; }
18
- function _objectWithoutPropertiesLoose(r, e) { if (null == r) return {}; var t = {}; for (var n in r) if ({}.hasOwnProperty.call(r, n)) { if (-1 !== e.indexOf(n)) continue; t[n] = r[n]; } return t; }
19
- var _default = exports.default = {
20
- title: 'Components Library/Payment/TimerComponent',
21
- component: _TimerComponent.default,
22
- argTypes: {
23
- timerId: {
24
- control: 'text',
25
- description: 'Unique identifier for the timer'
26
- },
27
- onTimerExpired: {
28
- action: 'timerExpired',
29
- description: 'Callback function called when timer expires'
30
- },
31
- warningThreshold: {
32
- control: 'number',
33
- description: 'Seconds remaining before warning state (default: 300 = 5 minutes)',
34
- defaultValue: 300
35
- },
36
- title: {
37
- control: 'text',
38
- description: 'Title text displayed in the timer component'
39
- },
40
- description: {
41
- control: 'text',
42
- description: 'Description text displayed before the timer'
43
- },
44
- maxWidth: {
45
- control: 'text',
46
- description: 'Maximum width of the timer block'
47
- },
48
- containerStyle: {
49
- control: 'object',
50
- description: 'Style object for the inner container'
51
- },
52
- timerBlockStyle: {
53
- control: 'object',
54
- description: 'Style object for the timer block'
55
- },
56
- className: {
57
- control: 'text',
58
- description: 'CSS class name for the timer block'
59
- },
60
- icon: {
61
- control: false,
62
- description: 'Icon identifier from iconsMap'
63
- },
64
- iconSize: {
65
- control: 'number',
66
- description: 'Size of the icon in pixels'
67
- },
68
- showIcon: {
69
- control: 'boolean',
70
- description: 'Show/hide the icon',
71
- defaultValue: true
72
- }
73
- },
74
- decorators: [Story => /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement(_ComponentWrapper.ComponentWrapper, null, /*#__PURE__*/_react.default.createElement(Story, null)))]
75
- }; // Helper component to start timer for stories
76
- const TimerWrapper = _ref => {
77
- let {
78
- timerId,
79
- duration,
80
- children
81
- } = _ref,
82
- props = _objectWithoutProperties(_ref, _excluded);
83
- (0, _react.useEffect)(() => {
84
- // Start timer when component mounts
85
- _TimerService.default.startTimer(timerId, duration, () => {},
86
- // onTick callback
87
- () => {} // onExpired callback
88
- );
89
-
90
- // Cleanup: stop timer when component unmounts
91
- return () => {
92
- _TimerService.default.stopTimer(timerId);
93
- };
94
- }, [timerId, duration]);
95
- return /*#__PURE__*/_react.default.cloneElement(children, props);
96
- };
97
- const Template = args => {
98
- const timerId = args.timerId || 'storybook-timer-1';
99
- const duration = args.duration || 600; // 10 minutes default
100
-
101
- return /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement(_global.default, null), /*#__PURE__*/_react.default.createElement(TimerWrapper, _extends({
102
- timerId: timerId,
103
- duration: duration
104
- }, args), /*#__PURE__*/_react.default.createElement(_TimerComponent.default, _extends({
105
- timerId: timerId
106
- }, args))));
107
- };
108
-
109
- // Default timer (10 minutes)
110
- const Default = exports.Default = Template.bind({});
111
- Default.args = {
112
- timerId: 'storybook-timer-default',
113
- duration: 600 // 10 minutes
114
- };
115
-
116
- // Short timer (1 minute) - will show warning immediately
117
- const ShortTimer = exports.ShortTimer = Template.bind({});
118
- ShortTimer.args = {
119
- timerId: 'storybook-timer-short',
120
- duration: 60,
121
- // 1 minute
122
- warningThreshold: 60
123
- };
124
-
125
- // Warning state (less than 5 minutes)
126
- const WarningState = exports.WarningState = Template.bind({});
127
- WarningState.args = {
128
- timerId: 'storybook-timer-warning',
129
- duration: 240,
130
- // 4 minutes - will be in warning state
131
- warningThreshold: 300
132
- };
133
-
134
- // Very short timer (30 seconds)
135
- const VeryShortTimer = exports.VeryShortTimer = Template.bind({});
136
- VeryShortTimer.args = {
137
- timerId: 'storybook-timer-very-short',
138
- duration: 30,
139
- // 30 seconds
140
- warningThreshold: 60
141
- };
142
-
143
- // Custom title
144
- const CustomTitle = exports.CustomTitle = Template.bind({});
145
- CustomTitle.args = {
146
- timerId: 'storybook-timer-custom-title',
147
- duration: 600,
148
- title: 'Limited Time Offer',
149
- description: 'Hurry up! This special offer expires in'
150
- };
151
-
152
- // Custom description
153
- const CustomDescription = exports.CustomDescription = Template.bind({});
154
- CustomDescription.args = {
155
- timerId: 'storybook-timer-custom-desc',
156
- duration: 600,
157
- description: 'Complete your purchase within'
158
- };
159
-
160
- // Without icon
161
- const WithoutIcon = exports.WithoutIcon = Template.bind({});
162
- WithoutIcon.args = {
163
- timerId: 'storybook-timer-no-icon',
164
- duration: 600,
165
- showIcon: false
166
- };
167
-
168
- // Custom width
169
- const CustomWidth = exports.CustomWidth = Template.bind({});
170
- CustomWidth.args = {
171
- timerId: 'storybook-timer-custom-width',
172
- duration: 600,
173
- maxWidth: '800px'
174
- };
175
-
176
- // Custom styling
177
- const CustomStyling = exports.CustomStyling = Template.bind({});
178
- CustomStyling.args = {
179
- timerId: 'storybook-timer-custom-style',
180
- duration: 600,
181
- timerBlockStyle: {
182
- backgroundColor: _colors.default.veryLightGreen,
183
- border: "1px solid ".concat(_colors.default.freshGreen),
184
- borderRadius: '8px'
185
- },
186
- containerStyle: {
187
- padding: '8px'
188
- }
189
- };
190
-
191
- // Long timer (1 hour)
192
- const LongTimer = exports.LongTimer = Template.bind({});
193
- LongTimer.args = {
194
- timerId: 'storybook-timer-long',
195
- duration: 3600,
196
- // 1 hour
197
- warningThreshold: 300
198
- };
199
-
200
- // Custom warning threshold
201
- const CustomWarningThreshold = exports.CustomWarningThreshold = Template.bind({});
202
- CustomWarningThreshold.args = {
203
- timerId: 'storybook-timer-custom-threshold',
204
- duration: 600,
205
- warningThreshold: 120 // 2 minutes warning threshold
206
- };
207
-
208
- // Complete custom example
209
- const CompleteCustom = exports.CompleteCustom = Template.bind({});
210
- CompleteCustom.args = {
211
- timerId: 'storybook-timer-complete',
212
- duration: 900,
213
- // 15 minutes
214
- title: 'Special Promotion Ending Soon',
215
- description: "Don't miss out! This exclusive deal will expire in",
216
- warningThreshold: 300,
217
- maxWidth: '700px',
218
- iconSize: 20,
219
- timerBlockStyle: {
220
- backgroundColor: _colors.default.grey3,
221
- borderRadius: '12px',
222
- boxShadow: '0 2px 8px rgba(0, 0, 0, 0.1)'
223
- }
224
- };
225
-
226
- // With callback
227
- const WithCallback = exports.WithCallback = Template.bind({});
228
- WithCallback.args = {
229
- timerId: 'storybook-timer-callback',
230
- duration: 60,
231
- // 1 minute for quick testing
232
- onTimerExpired: () => {
233
- console.log('Timer expired!');
234
- alert('Timer has expired!');
235
- }
236
- };
@@ -1,42 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.default = exports.ProcessWaiting = exports.ProcessSuccess = exports.ProcessFailed = void 0;
7
- var _react = _interopRequireDefault(require("react"));
8
- var _Process = _interopRequireDefault(require("./Process.styles"));
9
- var _ComponentWrapper = require("../ComponentWrapper/ComponentWrapper.styles");
10
- var _global = _interopRequireDefault(require("../../styles/global"));
11
- function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
12
- var _default = exports.default = {
13
- title: 'Components Library/Process',
14
- component: _Process.default,
15
- argTypes: {
16
- waiting: {
17
- type: 'boolean',
18
- defaultValue: false
19
- },
20
- success: {
21
- type: 'boolean',
22
- defaultValue: false
23
- },
24
- failed: {
25
- type: 'boolean',
26
- defaultValue: false
27
- }
28
- }
29
- };
30
- const Template = args => /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement(_global.default, null), /*#__PURE__*/_react.default.createElement(_ComponentWrapper.ComponentWrapper, null, /*#__PURE__*/_react.default.createElement(_Process.default, args)));
31
- const ProcessWaiting = exports.ProcessWaiting = Template.bind({});
32
- ProcessWaiting.args = {
33
- waiting: true
34
- };
35
- const ProcessSuccess = exports.ProcessSuccess = Template.bind({});
36
- ProcessSuccess.args = {
37
- success: true
38
- };
39
- const ProcessFailed = exports.ProcessFailed = Template.bind({});
40
- ProcessFailed.args = {
41
- failed: true
42
- };
@@ -1,45 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.default = exports.ProfileBadgeWithIcon = void 0;
7
- var _react = _interopRequireDefault(require("react"));
8
- var _viewport = require("storybook/viewport");
9
- var _ProfileBadge = require("./ProfileBadge");
10
- var _ComponentWrapper = require("../ComponentWrapper/ComponentWrapper.styles");
11
- var _global = _interopRequireDefault(require("../../styles/global"));
12
- function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
13
- var _default = exports.default = {
14
- title: 'Components Library/Profile Badge',
15
- component: _ProfileBadge.ProfileBadge,
16
- argTypes: {
17
- title: {
18
- type: 'string',
19
- required: true
20
- },
21
- icon: {
22
- type: 'node',
23
- defaultValue: undefined
24
- },
25
- color: {
26
- type: 'string',
27
- defaultValue: 'white'
28
- },
29
- withIcon: {
30
- type: 'boolean',
31
- defaultValue: undefined
32
- }
33
- },
34
- parameters: {
35
- backgrounds: {
36
- default: 'grey'
37
- }
38
- }
39
- };
40
- const Template = args => /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement(_global.default, null), /*#__PURE__*/_react.default.createElement(_ComponentWrapper.ComponentWrapper, null, /*#__PURE__*/_react.default.createElement(_ProfileBadge.ProfileBadge, args)));
41
- const ProfileBadgeWithIcon = exports.ProfileBadgeWithIcon = Template.bind({});
42
- ProfileBadgeWithIcon.args = {
43
- title: 'A Title',
44
- withIcon: true
45
- };
@@ -1,35 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.default = exports.ProfileBoxDefault = void 0;
7
- var _react = _interopRequireDefault(require("react"));
8
- var _ProfileBox = require("./ProfileBox");
9
- var _ComponentWrapper = require("../ComponentWrapper/ComponentWrapper.styles");
10
- var _global = _interopRequireDefault(require("../../styles/global"));
11
- function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
12
- var _default = exports.default = {
13
- title: 'Components Library/Profile Box',
14
- component: _ProfileBox.ProfileBox,
15
- argTypes: {
16
- pictureSrc: {
17
- type: 'string',
18
- required: true
19
- },
20
- name: {
21
- type: 'string',
22
- defaultValue: ''
23
- },
24
- handleEdit: {
25
- type: 'function',
26
- action: 'handleEdit',
27
- defaultValue: () => {}
28
- }
29
- }
30
- };
31
- const Template = args => /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement(_global.default, null), /*#__PURE__*/_react.default.createElement(_ComponentWrapper.ComponentWrapper, null, /*#__PURE__*/_react.default.createElement(_ProfileBox.ProfileBox, args)));
32
- const ProfileBoxDefault = exports.ProfileBoxDefault = Template.bind({});
33
- ProfileBoxDefault.args = {
34
- pictureSrc: '../../static/images/avatar.png'
35
- };