herald-exchange-onramp_offramp-widget 1.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.
Files changed (37) hide show
  1. package/.babelrc +3 -0
  2. package/Readme.md +166 -0
  3. package/dist/index.css +1 -0
  4. package/dist/index.d.ts +24 -0
  5. package/dist/index.js +47 -0
  6. package/dist/index.js.map +1 -0
  7. package/dist/index.mjs +47 -0
  8. package/dist/index.mjs.map +1 -0
  9. package/package.json +59 -0
  10. package/rollup.config.js +90 -0
  11. package/src/assets/css/style.module.css +1435 -0
  12. package/src/assets/icons-one.png +0 -0
  13. package/src/assets/react.svg +1 -0
  14. package/src/components/ButtonStepper.tsx +144 -0
  15. package/src/components/BuyField.tsx +632 -0
  16. package/src/components/CommonCenterLoader.tsx +119 -0
  17. package/src/components/CustomeSelect.tsx +180 -0
  18. package/src/components/DotLoader.tsx +8 -0
  19. package/src/components/NewBuyField.tsx +687 -0
  20. package/src/components/SellAdminCryptoAccount.tsx +601 -0
  21. package/src/components/SellField.tsx +712 -0
  22. package/src/components/WidgetBankDetails.tsx +612 -0
  23. package/src/components/WidgetComponent.tsx +49 -0
  24. package/src/components/WidgetContent.tsx +71 -0
  25. package/src/components/WidgetSuccesDetails.tsx +113 -0
  26. package/src/components/api.ts +59 -0
  27. package/src/components/chains.ts +319 -0
  28. package/src/components/images.d.ts +5 -0
  29. package/src/components/loader.tsx +14 -0
  30. package/src/components/style.module.css.d.ts +4 -0
  31. package/src/components/toast.tsx +51 -0
  32. package/src/components/types.ts +237 -0
  33. package/src/components/utils.ts +17 -0
  34. package/src/hooks/toastProvider.tsx +64 -0
  35. package/src/hooks/useSocketExchange.tsx +48 -0
  36. package/src/index.ts +3 -0
  37. package/tsconfig.json +118 -0
package/.babelrc ADDED
@@ -0,0 +1,3 @@
1
+ {
2
+ "presets": ["@babel/preset-react", "@babel/preset-typescript"]
3
+ }
package/Readme.md ADDED
@@ -0,0 +1,166 @@
1
+ # Herald Exchange Onramp-Offramp SDK Widget
2
+
3
+ Herald Exchange Onramp-Offramp SDK Widget is a simple component for React applications.
4
+
5
+ ## Installation
6
+
7
+ You can install Herald Exchange Onramp-Offramp SDK Widget via npm:
8
+
9
+ ```bash
10
+ npm install herald-exchange-onramp_offramp-widget
11
+ # or
12
+ yarn add herald-exchange-onramp_offramp-widget
13
+ ```
14
+
15
+ ## Usage
16
+
17
+ To use widget in your React application, follow these steps:
18
+
19
+ ```tsx
20
+ import WidgetComponent from "herald-exchange-onramp_offramp-widget";
21
+ ```
22
+
23
+ Initialize the widget:
24
+
25
+ > To Generate API Key Please Visit : [Herald Exchange](https://app.herald.exchange/login).
26
+ > Supported Token Types : ["USDT", "USDC", "ETH", "BNB", "MATIC", "SOL", "TRX"]
27
+
28
+ ```tsx
29
+ <WidgetComponent
30
+ apiKey={YOUR_API_KEY}
31
+ clientReferenceID={YOUR_CLIENT_REFERENCE_ID}
32
+ redirectUrl={REDIRECT_URL}
33
+ buyParameters={{ from_amount: "25", token_type: "USDC" }}
34
+ sellParameters={{
35
+ from_amount: "25",
36
+ from_currency: "USDT",
37
+ to_currency: "USD",
38
+ }}
39
+ defaultTab="sell"
40
+ mode="development"
41
+ />
42
+ ```
43
+
44
+ ---
45
+
46
+ > **Note:**
47
+ > In development mode, the widget uses **testnet** to detect and simulate transactions.
48
+ > In production mode, it switches to **mainnet** for real transaction processing.
49
+ > ⚠️ Make sure to deploy your application in a **production environment** when going live to ensure accurate transaction tracking and wallet interactions.
50
+
51
+ ## 🔧 Props
52
+
53
+ ### `apiKey` (required)
54
+
55
+ - **Type**: `string`
56
+
57
+ - **Description**: A unique API key generated via the [Herald Exchange App](https://app.herald.exchange/login).
58
+
59
+ - This key is used to authenticate and authorize the widget.
60
+
61
+ - Example: `4bb06e2fdbfb8e392a0ab49e4d9819ae072dcef82d79af7893625a5ff1416f`
62
+
63
+ ---
64
+
65
+ ### `mode` (optional)
66
+
67
+ - Type: string
68
+
69
+ - Allowed Values: "development" | "production"
70
+
71
+ - Default: "development"
72
+
73
+ - Description: Specifies the environment in which the widget runs.
74
+
75
+ - "development" is used for testing and debugging purposes.
76
+
77
+ - "production" should be used in live environments for optimized performance.
78
+
79
+ ---
80
+
81
+ ### `clientReferenceID` (required)
82
+
83
+ - **Type**: `string`
84
+
85
+ - **Description**: A unique identifier (UUID) generated via the [Herald Exchange App](https://app.herald.exchange/login), used to associate a transaction with a specific user or session.
86
+
87
+ - Helps track user activity and transaction flow.
88
+
89
+ - Example: `34edd6d6-eb12-422f-bd0e-63c5733527`
90
+
91
+ ---
92
+
93
+ ### `redirectUrl` (optional)
94
+
95
+ - **Type**: `string`
96
+
97
+ - **Description**: The URL to which the user will be redirected **after completing the transaction**.
98
+
99
+ - A **callback** will be made to this URL along with the **transaction result or status** as query parameters or payload (depending on the integration).
100
+
101
+ - Example: `https://yourapp.com/transaction-complete`
102
+
103
+ ---
104
+
105
+ ### `buyParameters` (required)
106
+
107
+ - **Type**:
108
+
109
+ ```ts
110
+ {
111
+ from_amount: string;
112
+ token_type: string;
113
+ }
114
+ ```
115
+
116
+ - **Description**: Defines the default configuration for the buy flow.
117
+
118
+ - from_amount: A string representing the default amount to be displayed in the input field (e.g., "25").
119
+
120
+ - token_type: The token that should be selected by default for purchase (e.g., "USDC").
121
+
122
+ ⚠️ If the passed token_type is not active, the widget will automatically fall back to the first activated token.
123
+
124
+ ---
125
+
126
+ ### `sellParameters` (required)
127
+
128
+ - **Type**:
129
+
130
+ ```ts
131
+ {
132
+ from_amount: string;
133
+ from_currency: string;
134
+ to_currency: string;
135
+ }
136
+ ```
137
+
138
+ - **Description**: Defines the default configuration for the sell flow.
139
+
140
+ - from_amount: A string representing the default amount to sell (e.g., "25").
141
+
142
+ - from_currency: The token the user wants to sell (e.g., "USDT").
143
+
144
+ - to_currency: The currency the user wants to receive (e.g., "USD").
145
+
146
+ ⚠️ If the selected currencies are not available or not active, the widget will default to the first available currency pair.
147
+
148
+ ---
149
+
150
+ ### `defaultTab` (optional)
151
+
152
+ - **Type**: "buy" | "sell"
153
+
154
+ - **Description**: Sets the default selected tab when the widget loads.
155
+
156
+ - Use "buy" to default to the buy flow.
157
+
158
+ - Use "sell" to default to the sell flow.
159
+
160
+ - **Example**: "sell"
161
+
162
+ ---
163
+
164
+ ## License
165
+
166
+ This project is licensed under the MIT License - see the LICENSE file for details.
package/dist/index.css ADDED
@@ -0,0 +1 @@
1
+ @import url("https://fonts.googleapis.com/css2?family=Red+Hat+Text:wght@300;400;500;600;700&display=swap");@-webkit-viewport{width:device-width}@-moz-viewport{width:device-width}@-ms-viewport{width:device-width}@-o-viewport{width:device-width}@viewport{width:device-width}:root{--primary-color:#f9c201;--secondary-color:#fff;--tertiary-color:#000;--quaternary-color:#6b7178;--bg-hover:#fffbf3;--senary-color:#298bff;--overlay-bg:#f5f5f5;--new-action-gradient:linear-gradient(180deg,#fff 39.57%,#f9f6f6);--badges-success-bg:#f9fcf0;--badges-success-color:#7ab200;--badges-faile-color:#f22;--badges-pending-bg:#e89a3c21;--badges-faile-bg:rgb(237 56 51/5%);--new-placeholder:#d2d2d2;--light-color:#fff;--no-color:transparent;--border-color:#e5eaf4}body{-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;-webkit-text-size-adjust:none;-ms-text-size-adjust:none;-moz-text-size-adjust:none;text-size-adjust:none;background-color:var(--secondary-color);background-size:cover;color:var(--tertiary-color);font-family:Red Hat Text,sans-serif;font-size:12px!important;letter-spacing:.8px;overflow-x:hidden;position:relative}*{margin:0;padding:0}*,:after,:before{box-sizing:border-box}a,button{cursor:pointer}a,div,h1,h2,h3,h4,h5,h6,p,span{font-family:Red Hat Text,sans-serif}button:disabled{cursor:not-allowed;opacity:.7}.action-btn{--_background:var(--background,var(--primary-color));--_color:var(--color,var(--tertiary-color));--_border:var(--border,transparent);--_btn-width:var(--btn-width,auto);align-items:center;background:var(--_background);border:1px solid var(--_border);-webkit-border-radius:10px;-moz-border-radius:10px;-o-border-radius:10px;-ms-border-radius:10px;border-radius:10px;color:var(--_color);display:flex;font-family:Red Hat Text,sans-serif;font-size:.85em;font-weight:600;gap:.5em;justify-content:center;overflow:hidden;padding:.8em 2em;position:relative;text-align:center;-webkit-transition:all .5s ease-in-out;-moz-transition:all .5s ease-in-out;-ms-transition:all .5s ease-in-out;-o-transition:all .5s ease-in-out;transition:all .5s ease-in-out;width:var(--_btn-width);z-index:0}.primary{--background:var(--primary-color);--color:var(--tertiary-color);--btn-width:100%;--border:transparent}.secondary{--background:#f9f9f9;--color:var(--tertiary-color);--btn-width:auto;--border:transparent}.overlay{--background:transparent;--color:var(--tertiary-color);--btn-width:auto;--border:#e5eaf4;padding:.5em}.widegt-tabs-link{align-items:flex-start;display:flex;justify-content:space-between}.widegt-tabs-box{align-items:center;background:#ffffff47;border-radius:10px;display:flex;gap:1em;margin-bottom:1.5em;padding:.7em}.widegt-tabs-box button{background-color:initial;border:0;border-radius:0;color:#666;font-family:Red Hat Text,sans-serif;font-size:.85em;font-weight:600;padding:.8em 1em}.widegt-tabs-box button.active{background:var(--secondary-color);border-radius:10px}.widegt-tabs-box button:first-child.active{color:#008826!important}.widegt-tabs-box button:last-child.active{color:red!important}.widegt-tabs-close button{background-color:transparent;border:0}.widegt-tabs-content{background:#ffffff47;border-radius:10px;padding:2em}.exchange-widget-wrapped{--spacing-modal:1.75rem;height:100%;left:50%;overflow-x:hidden;overflow-y:auto;position:fixed;top:50%;-ms-transform:translate(-50%,-50%);transform:translate(-50%,-50%);width:100%}@media (max-width:991.98px){.exchange-widget-wrapped{height:100%}}.exchange-widget-modal{align-items:center;display:flex;margin:0 auto;min-height:calc(100% - var(--spacing-modal)*0);overflow:auto;width:calc(33.33333% + .66667rem)}@media (min-width:991.98px) and (max-width:1199px){.exchange-widget-modal{width:calc(62.5% + 1.25rem)}}@media (max-width:991.98px){.exchange-widget-modal{border-radius:0;left:unset;padding:1em;position:relative;top:unset;transform:unset;width:100%}}.exchange-widget-content{background-color:#f3e2c3;border-radius:12px;padding:2em;position:relative;width:100%}.hide{display:none}.show{display:block}.off-ramp-field-card{border-radius:10px}.off-ramp-field-label{color:#010101;font-size:1em;font-weight:600;margin-bottom:.5em}.off-ramp-field-form .input-control{background:var(--no-color);border:0;border-radius:0;color:#7d7d7d;font-size:1.8em;font-weight:600;height:45px;padding:12px 12px 12px 0;width:100%}.off-ramp-field-form .input-control:active,.off-ramp-field-form .input-control:focus,.off-ramp-field-form .input-control:focus-visible,.off-ramp-field-form .input-control:focus-within{background:var(--no-color);border:0;border-radius:0;outline:0}.off-ramp-field-form .input-control:focus-visible{background:var(--no-color);border:0;border-radius:0;outline:0}.ramp-modal-img{height:1.5em;object-fit:contain;width:1.5em}.off-ramp-selected-badges{padding:.5em;text-align:center}.off-ramp-selected--two,.off-ramp-selected-badges{background:#0000000a;border:1px dashed #0000003b;border-radius:10px;color:#010101;font-size:.85em;font-weight:600;line-height:1.8;margin-bottom:0}.off-ramp-field-card{display:flex}@media (max-width:576px){.off-ramp-field-card{flex-direction:column}.off-ramp-field-box{border-bottom-left-radius:0!important;border-top-left-radius:10px!important;border-top-right-radius:10px!important;width:100%!important}.off-ramp-field-select-card{border-bottom-left-radius:10px!important;border-bottom-right-radius:10px!important;border-top-right-radius:0!important;width:100%!important}.off-ramp-details-card{grid-template-columns:repeat(1,1fr)!important}.off-ramp-details-card span:last-child{text-align:start!important}.span-d-align{justify-content:start!important}}.off-ramp-field-box{background:#fff9;border-bottom-left-radius:10px;border-top-left-radius:10px;width:75%}.off-ramp-field-box,.off-ramp-field-select-card{display:flex;flex-direction:column;justify-content:center;padding:1em}.off-ramp-field-select-card{background-color:#f8f9fa;border-bottom-right-radius:10px;border-top-right-radius:10px;width:50%}.off-ramp-label-icons{background-color:#f8f9fa;border-radius:50%;display:grid;font-size:1.2em;font-weight:700;height:2em;place-items:center;width:2em}.off-ramp-label-value{align-items:center;color:#010101;display:flex;font-size:1.1em;font-weight:600;gap:10}.off-ramp-label-value span{color:#7d7d7d;font-weight:500}.off-ramp-space{align-items:center}.off-ramp-space,.off-ramp-space-top{display:grid;grid-template-columns:70px auto}.off-ramp-space-top{align-items:start}.off-ramp-label-dots{background-color:#f8f9fa;border-radius:50%;height:1em;margin-left:10px;width:1em}.off-ramp-details .off-ramp-head{color:#7d7d7d;font-size:1.2em;font-weight:500;line-height:.9}.off-payment-check-card{align-items:center;background-color:var(--secondary-color);border:1px solid #fff;border-radius:8px;cursor:pointer;display:flex;gap:8px;justify-content:space-between;padding:10px 15px;position:relative;transition:all .3s ease}.off-payment-box{align-items:center;display:flex;gap:1em;margin-top:1em}.off-payment-check-card input[type=radio]{height:0;opacity:0;position:absolute;width:0}.off-payment-check-card.selected{background-color:#fff7d1;border-color:var(--primary-color)}.off-ramp-info-box{display:flex;flex-direction:column;gap:2em;padding:2em 0;position:relative;z-index:999}.off-ramp-info-box:after{background:#ffffff73;content:"";height:100%;left:16px;position:absolute;top:0;width:2px;z-index:-1}.off-ramp-action{margin-top:2em}.efi-swap-action{margin-bottom:1em}.off-ramp-bank-head{align-items:center;display:grid;gap:1em;grid-template-columns:24px auto;margin-bottom:2em}.bank-titles{color:#000;font-size:1.2em;font-weight:600}.off-ramp-bank-head a{height:18px;width:18px}.off-ramp-bank-tabs-link{display:grid;grid-template-columns:repeat(2,1fr)}.off-ramp-bank-tabs-link button{background-color:var(--no-color);border:0;border-bottom:1px solid #fff;border-radius:0;color:#000;font-size:1.1em;font-weight:600;padding:1em 2em;width:100%}.off-ramp-bank-tabs-link button.active{border-bottom:1px solid var(--primary-color)}.off-ramp-bank-tabs-content{padding:2em}.off-ramp-bank-exist-feilds-frame{margin-bottom:2em}.off-ramp-bank-exist-label{color:#010101;font-size:1em;font-weight:600;margin-bottom:.5em}.off-ramp-info-card{align-items:center;background:#ffffff47;border-radius:10px;display:grid;grid-template-columns:40px auto;padding:.5em}.caution-info{color:var(--tertiary-color);font-size:.8em;font-weight:400;line-height:1.8}.off-ramp-new-bank-label{color:#010101;font-size:1em;font-weight:600;margin-bottom:.5em}.off-ramp-new-bank-fields .input-control{background-color:var(--secondary-color);border:1px soild var(--secondary-color);border-radius:10px;color:var(--tertiary-color);font-size:.9em!important;font-weight:400!important;height:45px;padding:10px;width:100%}.off-ramp-new-bank-fields .input-control:active,.off-ramp-new-bank-fields .input-control:focus,.off-ramp-new-bank-fields .input-control:focus-visible,.off-ramp-new-bank-fields .input-control:focus-within{border:1px soild var(--secondary-color);outline:0}.off-ramp-new-bank-fields .input-control:focus-visible{border:1px soild var(--secondary-color);outline:0}.off-ramp-new-bank-box{margin-bottom:2em}.off-ramp-details-head{align-items:center;display:grid;gap:1em;grid-template-columns:24px auto;margin-bottom:2em}.details-titles{color:#000;font-size:1.2em;font-weight:600}.off-ramp-details-head a{height:18px;width:18px}.off-ramp-details-info-box{background-color:var(--secondary-color);border-radius:10px;padding:2em}.off-ramp-details-card{align-items:center;border-bottom:1px dashed #ededed;display:grid;gap:2em;grid-template-columns:repeat(2,1fr);margin-bottom:1.5em;padding-bottom:1.5em}.off-ramp-details-card:last-child{border-bottom:0 dashed #fff;margin-bottom:0;padding:0}.off-ramp-details-card span:first-child{color:#7d7d7d;font-size:1em;font-weight:600;text-align:start}.off-ramp-details-card span:last-child{color:#010101;font-size:1em;font-weight:500;text-align:end}.span-d-align{grid-template-columns:24px auto}.span-d-align,.span-d-copy{align-items:center;display:grid;gap:1em;justify-content:end}.span-d-copy{grid-template-columns:auto 24px}.ramp-option{align-items:center;display:flex;gap:2em}.toast-container{display:flex;flex-direction:column;gap:10px;position:absolute;right:20px;top:20px;z-index:9999}.toast{align-items:center;animation:slideIn .3s ease,fadeOut .5s ease 2.5s;background-color:#333;border-radius:6px;box-shadow:0 4px 10px rgba(0,0,0,.3);color:#fff;display:flex;justify-content:space-between;min-width:250px;padding:12px 16px;transition:opacity .3s}.toast.success{background-color:#4caf50}.toast.error{background-color:#f44336}.toast.info{background-color:#2196f3}.toast button{background:none;border:none;color:#fff;cursor:pointer;font-size:18px}@keyframes slideIn{0%{opacity:0;transform:translateX(100%)}to{opacity:1;transform:translateX(0)}}@keyframes fadeOut{to{opacity:0}}.preloading-sec{border:2px solid;border-radius:40px;color:var(--primary-color);height:20px;position:relative;width:100px}.preloading-sec:before{animation:l3 1s linear infinite;background:currentColor;border-radius:inherit;bottom:0;content:"";left:0;margin:2px;position:absolute;top:0;width:25%}@keyframes l3{50%{left:100%;transform:translateX(calc(-100% - 4px))}}.dot_loader{--c:no-repeat linear-gradient(var(--primary-color) 0 0);animation:l1 1s linear infinite;aspect-ratio:1;background:var(--c) 0 50%,var(--c) 50% 50%,var(--c) 100% 50%;background-size:20% 100%;width:45px}@keyframes l1{0%{background-size:20% 100%,20% 100%,20% 100%}33%{background-size:20% 10%,20% 100%,20% 100%}50%{background-size:20% 100%,20% 10%,20% 100%}66%{background-size:20% 100%,20% 100%,20% 10%}to{background-size:20% 100%,20% 100%,20% 100%}}.off-ramp-field-form .dot_loader{height:20px}.off-currency-option h3{color:var(--tertiary-color);font-size:.85em;font-weight:500}.off-currency-option{align-items:center;background-color:var(--secondary-color);border:1px solid var(--secondary-color);border-radius:8px;cursor:pointer;display:flex;gap:8px;justify-content:space-between;padding:10px 15px;position:relative;transition:all .3s ease;width:100%}.off-ramp-check-wrap{align-items:center;display:grid;gap:1em;grid-template-columns:repeat(3,1fr);margin-bottom:1.5em}.off-form-check .off-form-check-input:checked~.off-currency-option{background-color:#fff7d1;border-color:var(--primary-color)}.off-form-check-input{display:none}.space-bottom{margin-bottom:1rem}.input-error,.required{color:var(--badges-faile-color)}.off-ramp-new-bank-box{position:relative}.off-ramp-new-bank-box .input-error{background-color:#e34f4f;border-radius:3px;color:#fff;display:inline-block;font-size:12px;font-weight:400;height:25px;line-height:1;padding:6px 8px;position:absolute;right:-15px;top:0;z-index:99}.off-ramp-new-bank-box .input-error:after{border-color:#0000 #e34f4f;border-style:solid;border-width:0 6px 6px 0;bottom:-6px;content:"";display:block;position:absolute;right:1.2em;width:0;z-index:99}.error-msg{color:#e34f4f;margin-top:.5em}.sell-payment-head{margin-bottom:1.5em}.back-arrow-btn-sec{align-items:center;cursor:pointer;display:flex;gap:1em}.back-arrow-btn-sec .back-arrow-btn{cursor:pointer;width:2em}.back-arrow-btn-sec h4{color:var(--tertiary-color);font-size:1.1em;font-weight:600;margin-bottom:0}.sell-qr-payemnt-wrap{grid-gap:2em;background-color:var(--light-color);border-radius:10px;display:grid;gap:2em;grid-template-columns:repeat(2,1fr);margin-bottom:1em!important;padding:1.5em;position:relative}@media (max-width:991.98px){.sell-qr-payemnt-wrap{gap:1em;grid-template-columns:repeat(1,1fr)}}.sell-amt-details{background-color:var(--light-color);border-radius:10px;display:flex;flex-direction:column;grid-area:1/1/2/3;justify-content:space-between;margin-bottom:1em!important}@media (max-width:991.98px){.sell-amt-details{gap:1em;grid-area:unset}.sell-payment-qr-frame{display:grid;place-items:center}}.sell-amt-details-wrap{align-items:center;display:flex;justify-content:space-between;margin-bottom:1em}.sell-amt-pay{display:flex;flex-direction:column}.sell-pay-label{color:var(--quaternary-color);font-size:.8em;font-weight:300;margin-bottom:.5em}.sell-pay-amt{color:var(--tertiary-color);font-size:.85em;font-weight:500;margin-bottom:0}.sell-amt-get{align-items:flex-end;display:flex;flex-direction:column}.sell-estimated-info{background:#0000000a;border:1px dashed #0000003b;border-radius:10px;padding:.7em}.sell-estimated-info p{align-items:center;color:var(--tertiary-color);display:flex;font-size:.85em;font-weight:600;justify-content:space-between;margin-bottom:0}.sell-payment-qr-box{grid-area:1/3/2/4}@media (max-width:991.98px){.sell-payment-qr-box{grid-area:unset}}.sell-wallet-address-card{background:var(--overlay-bg);border-radius:10px;margin-bottom:1.5em;padding:1.5em}.sell-wallet-data-card{margin-bottom:1em}.sell-hash-label,.sell-wallet-data-card h6{color:var(--tertiary-color);font-size:.8em;font-weight:500;margin-bottom:.5em}.sell-hash-label span{color:red}.sell-wallet-code-card{grid-gap:.5em;display:grid;gap:.5em;grid-template-columns:auto 65px}.sell-wallet-code{border:1px solid var(--border-color);border-radius:10px;padding:.8em 1em}.sell-wallet-code span{-webkit-line-clamp:1;-webkit-box-orient:vertical;color:var(--tertiary-color);display:-webkit-box;font-size:.85em;font-weight:500;overflow:hidden;text-overflow:ellipsis;word-break:break-all}.sell-hash-fields,.sell-hash-fields:focus{background:transparent;border:1px solid var(--border-color);border-radius:10px;color:var(--tertiary-color);font-size:.9em;font-weight:400;padding:.8em 1em;width:100%}.sell-hash-fields:focus{outline:1px solid var(--border-color)}.sell-hash-fields::placeholder{font-family:Red Hat Text,sans-serif;font-size:.9em;font-weight:400}.no-wallet-details{gap:1em}.no-wallet-details,.sell-final-box{align-items:center;display:flex;justify-content:center}.sell-final-box{background-color:#fff;border-radius:12px;flex-direction:column;gap:.2em;padding:2em}.sell-final-info p{font-size:.95em;font-weight:500;line-height:2;margin-bottom:.5em}@media (max-width:767.98px){body{font-size:14px!important}}.manual-hash-btn{background:none;border:none;color:var(--senary-color);font-size:.8em;outline:none;padding:.2em}.flow-stepper-frame ul li{list-style:none!important}.flow-stepper-frame ul{align-items:self-start;display:flex;justify-content:space-between;margin:auto;min-height:70px;overflow:hidden;position:relative;width:75%}.withdraw-stepper .flow-stepper-frame ul{width:100%}.withdraw-stepper .flow-stepper-frame ul:after{transform:scale(.68)}.flow-stepper-card span{position:absolute;text-align:center;top:40px;white-space:nowrap}.flow-stepper-frame ul li{position:relative;z-index:1050}.flow-stepper-frame ul li:after{background-color:#fff;content:" ";height:2px;left:18px;position:absolute;top:10px;transform-origin:center;width:90vw;z-index:-1}.dark-stepper .flow-stepper-frame ul li:after{background-color:#efefef}.flow-stepper-frame ul li:last-child:after{display:none}.flow-stepper-frame ul li.failed:after{animation:wipe-in-right 2.5s cubic-bezier(.25,1,.3,1) both;background-color:#e70f0f}.flow-stepper-frame ul li.completed:after{animation:wipe-in-right 2.5s cubic-bezier(.25,1,.3,1) both;background-color:#32cd32}.flow-stepper-frame ul li.hash-completed:after{animation:wipe-in-right 2.5s cubic-bezier(.25,1,.3,1) both;background-color:none}.flow-stepper-frame ul li.hash-completed .flow-stepper-process{background-color:#32cd32}.flow-stepper-frame ul li.hash-failed:after{animation:wipe-in-right 2.5s cubic-bezier(.25,1,.3,1) both;background-color:none}.flow-stepper-frame ul li.hash-failed .flow-stepper-process{background-color:#e70f0f}.flow-stepper-frame ul li.hash-failed-1:after{animation:wipe-in-right 2.5s cubic-bezier(.25,1,.3,1) both;background-color:#e70f0f}.flow-stepper-frame ul li.completed .flow-stepper-process,.flow-stepper-frame ul li.hash-failed-1 .flow-stepper-process{background-color:#32cd32}.flow-stepper-frame ul li.failed .flow-stepper-process{background-color:#e70f0f}.flow-stepper-frame ul li:last-child .flow-stepper-card{align-items:flex-end}.flow-stepper-frame ul li:first-child .flow-stepper-card{align-items:flex-start}.flow-stepper-frame ul li:last-child .flow-stepper-card span{text-align:end}.flow-stepper-frame ul.completed:after{animation:wipe-in-right 2.5s cubic-bezier(.25,1,.3,1) both;background-color:#32cd32}.flow-stepper-frame ul.failed:after{animation:wipe-in-right 2.5s cubic-bezier(.25,1,.3,1) both;background-color:#e70f0f}.flow-stepper-card{align-items:center;border-radius:10px;color:var(--quaternary-color);display:flex;flex-direction:column;font-size:.65em;font-weight:600;gap:1em;justify-content:center}.flow-stepper-card.completed{color:var(--tertiary-color)}.flow-stepper-card .spinner-loader{border:4px solid #6e6a6a29!important;margin:0!important}.flow-stepper-process{align-items:center;background-color:#fff;border-radius:50%;display:flex;height:2.5em;justify-content:center;padding:3px;width:2.5em}.dark-stepper .flow-stepper-process{background-color:#efefef}.flow-stepper-card.completed .flow-stepper-process{background-color:#32cd32}.flow-stepper-card.failed .flow-stepper-process{background-color:#ea0909}.flow-stepper-success.completed .flow-stepper-process{background-color:#32cd32}.flow-stepper-success{align-items:center;border-radius:10px;color:var(--quaternary-color);display:flex;flex-direction:column;font-size:.75em;font-weight:600;gap:1em;justify-content:center;padding:1em}.flow-stepper-success.completed{color:var(--tertiary-color)}.flow-stepper-bar{background-color:#efefef;border-radius:50%;height:1.4em;width:1.4em}.flow-loader{animation:l13 1s linear infinite;aspect-ratio:1;background:radial-gradient(farthest-side,#ffa516 94%,#0000) top/4.5px 4.5px no-repeat,conic-gradient(#0000 30%,#ffa516);border-radius:50%;-webkit-mask:radial-gradient(farthest-side,#0000 calc(100% - 4.5px),#000 0);width:100%}@keyframes l13{to{transform:rotate(1turn)}}@keyframes wipe-in-right{0%{clip-path:inset(0 100% 0 0)}to{clip-path:inset(0 0 0 0)}}
@@ -0,0 +1,24 @@
1
+ import * as react_jsx_runtime from 'react/jsx-runtime';
2
+
3
+ type SellParamsType = {
4
+ from_amount: string;
5
+ from_currency: string;
6
+ to_currency: string;
7
+ };
8
+ type BuyParamsType = {
9
+ from_amount: string;
10
+ token_type: string;
11
+ };
12
+
13
+ type WidgetComponentProps = {
14
+ apiKey: string;
15
+ redirectUrl: string;
16
+ buyParameters: BuyParamsType;
17
+ sellParameters: SellParamsType;
18
+ defaultTab: string;
19
+ clientReferenceID: string;
20
+ mode?: "development" | "production";
21
+ };
22
+ declare const WidgetComponent: ({ apiKey, redirectUrl, buyParameters, sellParameters, defaultTab, clientReferenceID, mode, }: WidgetComponentProps) => react_jsx_runtime.JSX.Element;
23
+
24
+ export { WidgetComponent as default };