@ape.swap/bonds-sdk 1.0.42 → 1.0.44

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.
@@ -0,0 +1,338 @@
1
+ var __assign = (this && this.__assign) || function () {
2
+ __assign = Object.assign || function(t) {
3
+ for (var s, i = 1, n = arguments.length; i < n; i++) {
4
+ s = arguments[i];
5
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
6
+ t[p] = s[p];
7
+ }
8
+ return t;
9
+ };
10
+ return __assign.apply(this, arguments);
11
+ };
12
+ export var buttonHover = {
13
+ '&:not([disabled])': {
14
+ borderColor: 'var(--theme-ui-colors-primaryButton)',
15
+ background: 'var(--theme-ui-colors-primaryButton)',
16
+ opacity: 0.6,
17
+ },
18
+ '&:disabled': {},
19
+ };
20
+ export var textUnderlineHover = {
21
+ '::after': {
22
+ content: "''",
23
+ position: 'absolute',
24
+ background: 'text',
25
+ left: '0px',
26
+ bottom: '0px',
27
+ height: '1.5px',
28
+ width: '100%',
29
+ borderRadius: '10px',
30
+ transform: 'scaleX(0)',
31
+ transformOrigin: 'bottom right',
32
+ transition: 'transform 0.25s ease-out',
33
+ backfaceVisibility: 'hidden',
34
+ },
35
+ ':hover::after': {
36
+ transform: 'scaleX(1)',
37
+ transformOrigin: 'bottom left',
38
+ },
39
+ };
40
+ var buttonBaseStyles = {
41
+ padding: '10px 20px 10px 19px',
42
+ fontSize: '16px',
43
+ fontFamily: 'body',
44
+ cursor: 'pointer',
45
+ fontWeight: 700,
46
+ display: 'flex',
47
+ alignItems: 'center',
48
+ '&&': {
49
+ borderRadius: 'normal',
50
+ },
51
+ };
52
+ var components = {
53
+ text: {
54
+ heading: {
55
+ fontFamily: 'body',
56
+ fontWeight: 'bold',
57
+ },
58
+ lg: { fontSize: 6, lineHeight: '33px' },
59
+ md: { fontSize: 3, lineHeight: '24px' },
60
+ sm: { fontSize: 1, lineHeight: '18px' },
61
+ },
62
+ input: {
63
+ fontFamily: 'body',
64
+ fontWeight: 700,
65
+ sm: {
66
+ background: 'white3',
67
+ borderRadius: 10,
68
+ height: '32px',
69
+ width: '200px',
70
+ },
71
+ md: {
72
+ background: 'white3',
73
+ borderRadius: 10,
74
+ height: '36px',
75
+ width: '200px',
76
+ },
77
+ lg: {
78
+ background: 'white3',
79
+ borderRadius: 14,
80
+ height: '48px',
81
+ width: '200px',
82
+ },
83
+ },
84
+ textarea: {
85
+ padding: '10px 13px 10px 10px',
86
+ borderRadius: 'normal',
87
+ border: 'none',
88
+ fontWeight: 'normal',
89
+ background: 'lvl1',
90
+ resize: 'none',
91
+ color: 'textareaColor',
92
+ '&:focus': {
93
+ outline: 'none !important',
94
+ },
95
+ },
96
+ checkbox: {
97
+ background: 'white2',
98
+ borderRadius: '5px',
99
+ borderWidth: '2px',
100
+ borderStyle: 'solid',
101
+ borderColor: 'white3',
102
+ boxShadow: 'none',
103
+ outline: 'none',
104
+ appearance: 'none',
105
+ width: 'inherit',
106
+ height: 'inherit',
107
+ margin: '0px',
108
+ cursor: 'pointer',
109
+ '& + svg': {
110
+ display: 'none',
111
+ position: 'absolute',
112
+ pointerEvents: 'none',
113
+ top: '0',
114
+ left: '0',
115
+ bottom: '0',
116
+ right: '0',
117
+ margin: 'auto',
118
+ },
119
+ '&:checked ': {
120
+ background: 'var(--theme-ui-colors-primaryButton)',
121
+ borderColor: 'var(--theme-ui-colors-primaryButton)',
122
+ '& + svg': {
123
+ display: 'block',
124
+ },
125
+ },
126
+ '&:focus:not(:checked)': {
127
+ outline: 'none',
128
+ boxShadow: 'none',
129
+ },
130
+ '&:focus': {
131
+ outline: 'none',
132
+ boxShadow: '0px 0px 0px 1px var(--theme-ui-colors-primaryButton), 0px 0px 0px 4px var(--theme-ui-colors-white3)',
133
+ },
134
+ '&:hover:not(:disabled):not(:checked)': {
135
+ borderColor: 'var(--theme-ui-colors-primaryButton)',
136
+ boxShadow: '0px 0px 0px 1px var(--theme-ui-colors-primaryButton), 0px 0px 0px 4px var(--theme-ui-colors-white3)',
137
+ },
138
+ },
139
+ radio: {
140
+ background: 'lvl1',
141
+ borderRadius: '50px',
142
+ borderWidth: '2px',
143
+ borderStyle: 'solid',
144
+ borderColor: 'lvl2',
145
+ boxShadow: 'none',
146
+ outline: 'none',
147
+ appearance: 'none',
148
+ width: 'inherit',
149
+ height: 'inherit',
150
+ margin: '0px',
151
+ cursor: 'pointer',
152
+ '& + span': {
153
+ display: 'none',
154
+ position: 'absolute',
155
+ pointerEvents: 'none',
156
+ top: '0',
157
+ left: '0',
158
+ bottom: '0',
159
+ right: '0',
160
+ margin: 'auto',
161
+ backgroundColor: 'radioChecked',
162
+ borderRadius: '50px',
163
+ },
164
+ '&:checked ': {
165
+ background: 'var(--theme-ui-colors-yellow)',
166
+ borderColor: 'var(--theme-ui-colors-yellow)',
167
+ '& + span': {
168
+ display: 'block',
169
+ },
170
+ },
171
+ '&:focus': {
172
+ outline: 'none',
173
+ boxShadow: '0px 0px 0px 1px var(--theme-ui-colors-yellow), 0px 0px 0px 4px rgb(255, 179, 0, .2)',
174
+ },
175
+ '&:hover:not(:disabled):not(:checked)': {
176
+ borderColor: 'var(--theme-ui-colors-yellow)',
177
+ },
178
+ },
179
+ label: {
180
+ inline: {
181
+ display: 'inline-flex',
182
+ alignItems: 'center',
183
+ columnGap: 2,
184
+ },
185
+ },
186
+ borders: {
187
+ primaryButton: '3px solid var(--theme-ui-colors-primaryButton)',
188
+ primaryBtnDisable: '3px solid transparent',
189
+ secondaryButton: '3px solid var(--theme-ui-colors-primaryButton)',
190
+ secondaryButtonDisable: '3px solid #FDFBF5',
191
+ mode: {
192
+ dark: {
193
+ secondaryButtonDisable: '3px solid #F9F4E7',
194
+ },
195
+ },
196
+ },
197
+ buttons: {
198
+ primary: __assign(__assign({}, buttonBaseStyles), { background: 'primaryButton', border: 'primaryButton', color: 'primaryBright', '&:disabled': {
199
+ cursor: 'not-allowed',
200
+ background: 'white3',
201
+ color: 'textDisabledButton',
202
+ border: 'primaryBtnDisable',
203
+ opacity: 0.9,
204
+ }, '&:hover': {
205
+ '&:not([disabled])': {
206
+ borderColor: 'rgba(var(--theme-ui-colors-primaryButton), 0.7)',
207
+ background: 'rgba(var(--theme-ui-colors-primaryButton), 0.7)',
208
+ },
209
+ '&:disabled': {},
210
+ } }),
211
+ secondary: __assign(__assign({}, buttonBaseStyles), { background: 'transparent', border: 'secondaryButton', color: 'var(--theme-ui-colors-primaryButton)', '&:disabled': {
212
+ cursor: 'not-allowed',
213
+ background: 'white3',
214
+ color: 'primaryButtonDisable',
215
+ border: 'primaryBtnDisable',
216
+ }, '&&:hover': {
217
+ '&:not([disabled])': {
218
+ borderColor: 'rgba(var(--theme-ui-colors-primaryButton), 0.7)',
219
+ },
220
+ '&:disabled': {},
221
+ } }),
222
+ tertiary: __assign(__assign({}, buttonBaseStyles), { background: 'white3', border: 'none', color: 'text', '&:disabled': {
223
+ cursor: 'not-allowed',
224
+ background: 'white3',
225
+ color: 'primaryButtonDisable',
226
+ }, '&:hover': {
227
+ '&:not([disabled])': {
228
+ background: 'white4',
229
+ },
230
+ '&:disabled': {},
231
+ } }),
232
+ text: __assign(__assign({}, buttonBaseStyles), { background: 'transparent', color: 'text', '&:hover': {
233
+ '&:not([disabled])': {
234
+ color: 'var(--theme-ui-colors-yellow)',
235
+ },
236
+ '&:disabled': {},
237
+ }, '&:disabled': {
238
+ cursor: 'not-allowed',
239
+ background: 'white3',
240
+ color: 'primaryButtonDisable',
241
+ } }),
242
+ success: __assign(__assign({}, buttonBaseStyles), { background: 'success', color: 'primaryBright', '&:disabled': {
243
+ cursor: 'not-allowed',
244
+ background: 'white3',
245
+ color: 'primaryButtonDisable',
246
+ }, '&:hover': {
247
+ '&:not([disabled])': {
248
+ background: 'hoveredSuccess',
249
+ },
250
+ '&:disabled': {},
251
+ } }),
252
+ danger: __assign(__assign({}, buttonBaseStyles), { background: 'error', color: 'primaryBright', '&:disabled': {
253
+ cursor: 'not-allowed',
254
+ background: 'white3',
255
+ color: 'primaryButtonDisable',
256
+ }, '&:hover': {
257
+ '&:not([disabled])': {
258
+ background: 'hoveredDanger',
259
+ },
260
+ '&:disabled': {},
261
+ } }),
262
+ circular: {
263
+ width: '40px',
264
+ height: '40px',
265
+ background: 'white3',
266
+ borderRadius: '50%',
267
+ display: 'flex',
268
+ justifyContent: 'center',
269
+ alignItems: 'center',
270
+ overflow: 'hidden',
271
+ cursor: 'pointer',
272
+ padding: '1px',
273
+ transition: 'all .3s linear',
274
+ '&:hover': {
275
+ filter: 'brightness(85%)',
276
+ },
277
+ '&:active': {
278
+ transform: 'scale(0.9)',
279
+ },
280
+ },
281
+ },
282
+ cards: {
283
+ primary: {
284
+ background: 'navbar',
285
+ borderRadius: 'normal',
286
+ },
287
+ },
288
+ flex: {
289
+ dexContainer: {
290
+ width: '100%',
291
+ maxWidth: '420px',
292
+ height: 'fit-content',
293
+ background: 'white2',
294
+ padding: ['15px 5px', '15px 10px', '15px'],
295
+ borderRadius: '10px',
296
+ flexDirection: 'column',
297
+ },
298
+ v3SubDexContainer: {
299
+ width: '100%',
300
+ maxWidth: '600px',
301
+ height: 'fit-content',
302
+ background: 'white2',
303
+ padding: ['15px 5px', '15px 10px', '15px'],
304
+ borderRadius: '10px',
305
+ margin: '0px 10px',
306
+ flexDirection: 'column',
307
+ },
308
+ navContainer: {
309
+ height: '35px',
310
+ padding: '0px 15px',
311
+ background: 'white3',
312
+ borderRadius: '10px',
313
+ alignItems: 'center',
314
+ cursor: 'pointer',
315
+ transition: 'all .3s linear',
316
+ '&:hover': {
317
+ filter: 'brightness(95%)',
318
+ },
319
+ '&:active': {
320
+ transform: 'scale(0.9)',
321
+ },
322
+ },
323
+ link: __assign(__assign({}, textUnderlineHover), { cursor: 'pointer', textDecoration: 'none', display: 'inline-block' }),
324
+ tag: {
325
+ padding: '5px',
326
+ borderRadius: '5px',
327
+ alignItems: 'center',
328
+ justifyContent: 'center',
329
+ },
330
+ },
331
+ switch: {
332
+ backgroundColor: 'white4',
333
+ 'input:checked ~ &': {
334
+ backgroundColor: 'var(--theme-ui-colors-yellow)',
335
+ },
336
+ },
337
+ };
338
+ export default components;
@@ -0,0 +1,2 @@
1
+ export declare const MOBILE_DISPLAY: string[];
2
+ export declare const DESKTOP_DISPLAY: string[];
@@ -0,0 +1,2 @@
1
+ export var MOBILE_DISPLAY = ['flex', 'flex', 'flex', 'none', 'none'];
2
+ export var DESKTOP_DISPLAY = ['none', 'none', 'none', 'flex', 'flex'];
@@ -0,0 +1,2 @@
1
+ import type { Theme } from 'theme-ui';
2
+ export declare const defaultTheme: Theme;
@@ -0,0 +1,15 @@
1
+ var __assign = (this && this.__assign) || function () {
2
+ __assign = Object.assign || function(t) {
3
+ for (var s, i = 1, n = arguments.length; i < n; i++) {
4
+ s = arguments[i];
5
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
6
+ t[p] = s[p];
7
+ }
8
+ return t;
9
+ };
10
+ return __assign.apply(this, arguments);
11
+ };
12
+ import baseTheme from './base';
13
+ import components from './components';
14
+ import abondColors from './colors';
15
+ export var defaultTheme = __assign(__assign(__assign({}, baseTheme), components), { colors: __assign({}, abondColors) });
@@ -0,0 +1,10 @@
1
+ export type MediaQueries = {
2
+ xs: string;
3
+ sm: string;
4
+ md: string;
5
+ lg: string;
6
+ xl: string;
7
+ xxl: string;
8
+ xxxl: string;
9
+ nav: string;
10
+ };
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,14 @@
1
+ /**
2
+ * Format number of seconds into year, month, day, hour, minute, seconds
3
+ *
4
+ * @param seconds
5
+ */
6
+ declare const getTimePeriods: (seconds: number, days?: boolean) => {
7
+ years: number;
8
+ months: number;
9
+ days: number;
10
+ hours: number;
11
+ minutes: number;
12
+ seconds: number;
13
+ };
14
+ export default getTimePeriods;
@@ -0,0 +1,44 @@
1
+ var MINUTE_IN_SECONDS = 60;
2
+ var HOUR_IN_SECONDS = 3600;
3
+ var DAY_IN_SECONDS = 86400;
4
+ var MONTH_IN_SECONDS = 2629800;
5
+ var YEAR_IN_SECONDS = 31557600;
6
+ /**
7
+ * Format number of seconds into year, month, day, hour, minute, seconds
8
+ *
9
+ * @param seconds
10
+ */
11
+ var getTimePeriods = function (seconds, days) {
12
+ var delta = seconds;
13
+ var timeLeft = {
14
+ years: 0,
15
+ months: 0,
16
+ days: 0,
17
+ hours: 0,
18
+ minutes: 0,
19
+ seconds: 0,
20
+ };
21
+ if (delta >= YEAR_IN_SECONDS && !days) {
22
+ timeLeft.years = Math.floor(delta / YEAR_IN_SECONDS);
23
+ delta -= timeLeft.years * YEAR_IN_SECONDS;
24
+ }
25
+ if (delta >= MONTH_IN_SECONDS && !days) {
26
+ timeLeft.months = Math.floor(delta / MONTH_IN_SECONDS);
27
+ delta -= timeLeft.months * MONTH_IN_SECONDS;
28
+ }
29
+ if (delta >= DAY_IN_SECONDS) {
30
+ timeLeft.days = Math.floor(delta / DAY_IN_SECONDS);
31
+ delta -= timeLeft.days * DAY_IN_SECONDS;
32
+ }
33
+ if (delta >= HOUR_IN_SECONDS) {
34
+ timeLeft.hours = Math.floor(delta / HOUR_IN_SECONDS);
35
+ delta -= timeLeft.hours * HOUR_IN_SECONDS;
36
+ }
37
+ if (delta >= MINUTE_IN_SECONDS) {
38
+ timeLeft.minutes = Math.floor(delta / MINUTE_IN_SECONDS);
39
+ delta -= timeLeft.minutes * MINUTE_IN_SECONDS;
40
+ }
41
+ timeLeft.seconds = delta;
42
+ return timeLeft;
43
+ };
44
+ export default getTimePeriods;
package/package.json CHANGED
@@ -3,7 +3,7 @@
3
3
  "description": "Ape Bond SDK",
4
4
  "author": "Ape Bond",
5
5
  "license": "MIT",
6
- "version": "1.0.42",
6
+ "version": "1.0.44",
7
7
  "main": "dist/index.js",
8
8
  "module": "dist/index.es.js",
9
9
  "types": "dist/index.d.ts",
@@ -1,3 +0,0 @@
1
- import React from 'react';
2
- declare const MyComponent: React.FC;
3
- export default MyComponent;
@@ -1,5 +0,0 @@
1
- import { jsx as _jsx } from "react/jsx-runtime";
2
- var MyComponent = function () {
3
- return _jsx("div", { children: "TESTING" });
4
- };
5
- export default MyComponent;