@ape.swap/bonds-sdk 1.0.61 → 1.0.62
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/dist/components/uikit/Button/Button.d.ts +4 -0
- package/dist/components/uikit/Button/Button.js +91 -0
- package/dist/components/uikit/Button/IconButton.d.ts +4 -0
- package/dist/components/uikit/Button/IconButton.js +33 -0
- package/dist/components/uikit/Button/index.d.ts +2 -0
- package/dist/components/uikit/Button/index.js +2 -0
- package/dist/components/uikit/Button/styles.d.ts +3 -0
- package/dist/components/uikit/Button/styles.js +30 -0
- package/dist/components/uikit/Button/types.d.ts +46 -0
- package/dist/components/uikit/Button/types.js +37 -0
- package/dist/components/uikit/Checkbox/index.d.ts +4 -0
- package/dist/components/uikit/Checkbox/index.js +46 -0
- package/dist/components/uikit/Checkbox/types.d.ts +11 -0
- package/dist/components/uikit/Checkbox/types.js +5 -0
- package/dist/components/uikit/Dropdown/Dropdown.d.ts +4 -0
- package/dist/components/uikit/Dropdown/Dropdown.js +58 -0
- package/dist/components/uikit/Dropdown/DropdownItem.d.ts +4 -0
- package/dist/components/uikit/Dropdown/DropdownItem.js +47 -0
- package/dist/components/uikit/Dropdown/index.d.ts +3 -0
- package/dist/components/uikit/Dropdown/index.js +2 -0
- package/dist/components/uikit/Dropdown/styles.d.ts +4 -0
- package/dist/components/uikit/Dropdown/styles.js +16 -0
- package/dist/components/uikit/Dropdown/types.d.ts +58 -0
- package/dist/components/uikit/Dropdown/types.js +22 -0
- package/dist/components/uikit/Flex/index.d.ts +3 -0
- package/dist/components/uikit/Flex/index.js +29 -0
- package/dist/components/uikit/Input/Input.d.ts +4 -0
- package/dist/components/uikit/Input/Input.js +72 -0
- package/dist/components/uikit/Input/NumericInput.d.ts +10 -0
- package/dist/components/uikit/Input/NumericInput.js +35 -0
- package/dist/components/uikit/Input/StyledInput.d.ts +11 -0
- package/dist/components/uikit/Input/StyledInput.js +37 -0
- package/dist/components/uikit/Input/index.d.ts +3 -0
- package/dist/components/uikit/Input/index.js +3 -0
- package/dist/components/uikit/Link/index.d.ts +9 -0
- package/dist/components/uikit/Link/index.js +29 -0
- package/dist/components/uikit/Modal/ModalFooter.d.ts +4 -0
- package/dist/components/uikit/Modal/ModalFooter.js +32 -0
- package/dist/components/uikit/Modal/ModalHeader.d.ts +4 -0
- package/dist/components/uikit/Modal/ModalHeader.js +31 -0
- package/dist/components/uikit/Modal/index.d.ts +4 -0
- package/dist/components/uikit/Modal/index.js +55 -0
- package/dist/components/uikit/Modal/styles.d.ts +3 -0
- package/dist/components/uikit/Modal/styles.js +62 -0
- package/dist/components/uikit/Modal/types.d.ts +17 -0
- package/dist/components/uikit/Modal/types.js +1 -0
- package/dist/components/uikit/Select/Select.d.ts +4 -0
- package/dist/components/uikit/Select/Select.js +61 -0
- package/dist/components/uikit/Select/SelectItem.d.ts +4 -0
- package/dist/components/uikit/Select/SelectItem.js +40 -0
- package/dist/components/uikit/Select/index.d.ts +2 -0
- package/dist/components/uikit/Select/index.js +2 -0
- package/dist/components/uikit/Select/styles.d.ts +4 -0
- package/dist/components/uikit/Select/styles.js +50 -0
- package/dist/components/uikit/Select/types.d.ts +55 -0
- package/dist/components/uikit/Select/types.js +37 -0
- package/dist/components/uikit/Skeleton/index.d.ts +4 -0
- package/dist/components/uikit/Skeleton/index.js +31 -0
- package/dist/components/uikit/Skeleton/styles.d.ts +5 -0
- package/dist/components/uikit/Skeleton/styles.js +40 -0
- package/dist/components/uikit/Skeleton/types.d.ts +18 -0
- package/dist/components/uikit/Skeleton/types.js +10 -0
- package/dist/components/uikit/Spinner/apeSpinner.json +2764 -0
- package/dist/components/uikit/Spinner/index.d.ts +5 -0
- package/dist/components/uikit/Spinner/index.js +20 -0
- package/dist/components/uikit/SwiperDots/index.d.ts +6 -0
- package/dist/components/uikit/SwiperDots/index.js +14 -0
- package/dist/components/uikit/Tabs/Tab.d.ts +4 -0
- package/dist/components/uikit/Tabs/Tab.js +34 -0
- package/dist/components/uikit/Tabs/TabPanel.d.ts +4 -0
- package/dist/components/uikit/Tabs/TabPanel.js +29 -0
- package/dist/components/uikit/Tabs/Tabs.d.ts +4 -0
- package/dist/components/uikit/Tabs/Tabs.js +67 -0
- package/dist/components/uikit/Tabs/index.d.ts +2 -0
- package/dist/components/uikit/Tabs/index.js +2 -0
- package/dist/components/uikit/Tabs/styles.d.ts +3 -0
- package/dist/components/uikit/Tabs/styles.js +40 -0
- package/dist/components/uikit/Tabs/types.d.ts +54 -0
- package/dist/components/uikit/Tabs/types.js +22 -0
- package/dist/components/uikit/Tag/ListTag.d.ts +4 -0
- package/dist/components/uikit/Tag/ListTag.js +20 -0
- package/dist/components/uikit/Tag/Tag.d.ts +4 -0
- package/dist/components/uikit/Tag/Tag.js +42 -0
- package/dist/components/uikit/Tag/index.d.ts +3 -0
- package/dist/components/uikit/Tag/index.js +2 -0
- package/dist/components/uikit/Tag/styles.d.ts +5 -0
- package/dist/components/uikit/Tag/styles.js +44 -0
- package/dist/components/uikit/Tag/types.d.ts +48 -0
- package/dist/components/uikit/Tag/types.js +34 -0
- package/dist/components/uikit/Text/index.d.ts +4 -0
- package/dist/components/uikit/Text/index.js +35 -0
- package/dist/components/uikit/Text/types.d.ts +23 -0
- package/dist/components/uikit/Text/types.js +13 -0
- package/dist/components/uikit/Toggle/index.d.ts +4 -0
- package/dist/components/uikit/Toggle/index.js +63 -0
- package/dist/components/uikit/Toggle/styles.d.ts +3 -0
- package/dist/components/uikit/Toggle/styles.js +39 -0
- package/dist/components/uikit/Toggle/types.d.ts +31 -0
- package/dist/components/uikit/Toggle/types.js +17 -0
- package/dist/components/uikit/Tooltip/index.d.ts +4 -0
- package/dist/components/uikit/Tooltip/index.js +66 -0
- package/dist/components/uikit/Tooltip/styles.d.ts +4 -0
- package/dist/components/uikit/Tooltip/styles.js +60 -0
- package/dist/components/uikit/Tooltip/types.d.ts +17 -0
- package/dist/components/uikit/Tooltip/types.js +8 -0
- package/dist/components/uikit/TutorialModal/index.d.ts +4 -0
- package/dist/components/uikit/TutorialModal/index.js +52 -0
- package/dist/components/uikit/TutorialModal/styles.d.ts +8 -0
- package/dist/components/uikit/TutorialModal/styles.js +86 -0
- package/dist/components/uikit/TutorialModal/types.d.ts +22 -0
- package/dist/components/uikit/TutorialModal/types.js +1 -0
- package/dist/components/uikit/TutorialModal/useTutorialModal.d.ts +6 -0
- package/dist/components/uikit/TutorialModal/useTutorialModal.js +20 -0
- package/dist/components/uikit/index.d.ts +18 -0
- package/dist/components/uikit/index.js +20 -0
- package/dist/contexts/ModalContext.d.ts +14 -0
- package/dist/contexts/ModalContext.js +78 -0
- package/dist/hooks/useIsAbond.d.ts +3 -0
- package/dist/hooks/useIsAbond.js +10 -0
- package/dist/hooks/useModal.d.ts +3 -0
- package/dist/hooks/useModal.js +39 -0
- package/dist/utils/numbers.d.ts +5 -0
- package/dist/utils/numbers.js +111 -0
- package/package.json +7 -1
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import React, { InputHTMLAttributes } from 'react';
|
|
2
|
+
export declare enum positions {
|
|
3
|
+
TOP = "top",
|
|
4
|
+
BOTTOM = "bottom"
|
|
5
|
+
}
|
|
6
|
+
export declare enum sizes {
|
|
7
|
+
XSMALL = "xsm",
|
|
8
|
+
SMALL = "sm",
|
|
9
|
+
MEDIUM = "md",
|
|
10
|
+
LARGE = "lg"
|
|
11
|
+
}
|
|
12
|
+
export declare const fontSizes: {
|
|
13
|
+
xsm: number;
|
|
14
|
+
sm: number;
|
|
15
|
+
md: number;
|
|
16
|
+
lg: number;
|
|
17
|
+
};
|
|
18
|
+
export declare const selectPadding: {
|
|
19
|
+
xsm: number;
|
|
20
|
+
sm: number;
|
|
21
|
+
md: number;
|
|
22
|
+
lg: number;
|
|
23
|
+
};
|
|
24
|
+
export declare const selectedExtraPadding: {
|
|
25
|
+
xsm: number;
|
|
26
|
+
sm: number;
|
|
27
|
+
md: number;
|
|
28
|
+
lg: number;
|
|
29
|
+
};
|
|
30
|
+
export declare const selectItemPadding: {
|
|
31
|
+
xsm: number;
|
|
32
|
+
sm: number;
|
|
33
|
+
md: number;
|
|
34
|
+
lg: number;
|
|
35
|
+
};
|
|
36
|
+
type sizeProps = `${sizes}`;
|
|
37
|
+
type positionProps = `${positions}`;
|
|
38
|
+
export interface SelectProps extends Omit<InputHTMLAttributes<HTMLInputElement>, 'size'> {
|
|
39
|
+
active?: number | string;
|
|
40
|
+
size?: sizeProps;
|
|
41
|
+
width?: string | number;
|
|
42
|
+
label?: JSX.Element;
|
|
43
|
+
position?: positionProps;
|
|
44
|
+
onChange?: React.ChangeEventHandler<HTMLInputElement>;
|
|
45
|
+
}
|
|
46
|
+
export interface SelectItemProps {
|
|
47
|
+
children: React.ReactNode;
|
|
48
|
+
onClick?: (value: number | string) => void;
|
|
49
|
+
url?: string;
|
|
50
|
+
active?: boolean;
|
|
51
|
+
size?: sizeProps;
|
|
52
|
+
value: number | string;
|
|
53
|
+
sx?: any;
|
|
54
|
+
}
|
|
55
|
+
export {};
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
var _a, _b, _c, _d;
|
|
2
|
+
export var positions;
|
|
3
|
+
(function (positions) {
|
|
4
|
+
positions["TOP"] = "top";
|
|
5
|
+
positions["BOTTOM"] = "bottom";
|
|
6
|
+
})(positions || (positions = {}));
|
|
7
|
+
export var sizes;
|
|
8
|
+
(function (sizes) {
|
|
9
|
+
sizes["XSMALL"] = "xsm";
|
|
10
|
+
sizes["SMALL"] = "sm";
|
|
11
|
+
sizes["MEDIUM"] = "md";
|
|
12
|
+
sizes["LARGE"] = "lg";
|
|
13
|
+
})(sizes || (sizes = {}));
|
|
14
|
+
export var fontSizes = (_a = {},
|
|
15
|
+
_a[sizes.XSMALL] = 1,
|
|
16
|
+
_a[sizes.SMALL] = 1,
|
|
17
|
+
_a[sizes.MEDIUM] = 3,
|
|
18
|
+
_a[sizes.LARGE] = 6,
|
|
19
|
+
_a);
|
|
20
|
+
export var selectPadding = (_b = {},
|
|
21
|
+
_b[sizes.XSMALL] = 2,
|
|
22
|
+
_b[sizes.SMALL] = 4,
|
|
23
|
+
_b[sizes.MEDIUM] = 6,
|
|
24
|
+
_b[sizes.LARGE] = 8,
|
|
25
|
+
_b);
|
|
26
|
+
export var selectedExtraPadding = (_c = {},
|
|
27
|
+
_c[sizes.XSMALL] = 1,
|
|
28
|
+
_c[sizes.SMALL] = 0,
|
|
29
|
+
_c[sizes.MEDIUM] = 0,
|
|
30
|
+
_c[sizes.LARGE] = 0,
|
|
31
|
+
_c);
|
|
32
|
+
export var selectItemPadding = (_d = {},
|
|
33
|
+
_d[sizes.XSMALL] = 2,
|
|
34
|
+
_d[sizes.SMALL] = 4,
|
|
35
|
+
_d[sizes.MEDIUM] = 6,
|
|
36
|
+
_d[sizes.LARGE] = 8,
|
|
37
|
+
_d);
|
|
@@ -0,0 +1,31 @@
|
|
|
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
|
+
var __rest = (this && this.__rest) || function (s, e) {
|
|
13
|
+
var t = {};
|
|
14
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
15
|
+
t[p] = s[p];
|
|
16
|
+
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
17
|
+
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
18
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
19
|
+
t[p[i]] = s[p[i]];
|
|
20
|
+
}
|
|
21
|
+
return t;
|
|
22
|
+
};
|
|
23
|
+
import { jsx as _jsx } from "theme-ui/jsx-runtime";
|
|
24
|
+
import { Box } from 'theme-ui';
|
|
25
|
+
import { animation as ANIMATION, variant as VARIANT } from './types';
|
|
26
|
+
import styles from './styles';
|
|
27
|
+
var Skeleton = function (_a) {
|
|
28
|
+
var _b = _a.variant, variant = _b === void 0 ? VARIANT.RECT : _b, _c = _a.animation, animation = _c === void 0 ? ANIMATION.PULSE : _c, props = __rest(_a, ["variant", "animation"]);
|
|
29
|
+
return (_jsx(Box, __assign({}, props, { sx: __assign(__assign({}, (animation === ANIMATION.WAVES ? styles.waves : styles.pulse)), { height: props.height, width: props.width, borderRadius: variant === VARIANT.RECT ? '10px' : '50%' }) })));
|
|
30
|
+
};
|
|
31
|
+
export default Skeleton;
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { keyframes } from '@emotion/react';
|
|
2
|
+
export var waves = keyframes({
|
|
3
|
+
from: { left: '-150px' },
|
|
4
|
+
to: { left: '100%' },
|
|
5
|
+
});
|
|
6
|
+
export var pulse = keyframes({
|
|
7
|
+
'0%': { opacity: 1 },
|
|
8
|
+
'50%': { opacity: 0.4 },
|
|
9
|
+
'100%': { opacity: 1 },
|
|
10
|
+
});
|
|
11
|
+
var styles = {
|
|
12
|
+
waves: {
|
|
13
|
+
position: 'relative',
|
|
14
|
+
overflow: 'hidden',
|
|
15
|
+
transform: 'translate3d(0, 0, 0)',
|
|
16
|
+
borderRadius: '',
|
|
17
|
+
minHeight: '20px',
|
|
18
|
+
display: 'block',
|
|
19
|
+
backgroundColor: 'backgroundDisabled',
|
|
20
|
+
'&:before': {
|
|
21
|
+
content: "\"\"",
|
|
22
|
+
position: 'absolute',
|
|
23
|
+
backgroundImage: 'linear-gradient(90deg, transparent, rgba(243, 243, 243, 0.3), transparent)',
|
|
24
|
+
top: 0,
|
|
25
|
+
left: '-150px',
|
|
26
|
+
height: '100%',
|
|
27
|
+
width: '250px',
|
|
28
|
+
animation: "".concat(waves, " 1.5s cubic-bezier(0.4, 0, 0.2, 1) infinite"),
|
|
29
|
+
},
|
|
30
|
+
},
|
|
31
|
+
pulse: {
|
|
32
|
+
animation: "".concat(pulse, " 2s infinite ease-out"),
|
|
33
|
+
transform: 'translate3d(0, 0, 0)',
|
|
34
|
+
borderRadius: '2px',
|
|
35
|
+
minHeight: '20px',
|
|
36
|
+
display: 'block',
|
|
37
|
+
backgroundColor: 'backgroundDisabled',
|
|
38
|
+
},
|
|
39
|
+
};
|
|
40
|
+
export default styles;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { BoxProps } from 'theme-ui';
|
|
2
|
+
export declare enum animation {
|
|
3
|
+
WAVES = "waves",
|
|
4
|
+
PULSE = "pulse"
|
|
5
|
+
}
|
|
6
|
+
export declare enum variant {
|
|
7
|
+
RECT = "rect",
|
|
8
|
+
CIRCLE = "circle"
|
|
9
|
+
}
|
|
10
|
+
type Animation = `${animation}`;
|
|
11
|
+
type Variant = `${variant}`;
|
|
12
|
+
export interface SkeletonProps extends BoxProps {
|
|
13
|
+
animation?: Animation;
|
|
14
|
+
variant?: Variant;
|
|
15
|
+
width?: string | number;
|
|
16
|
+
height?: string | number;
|
|
17
|
+
}
|
|
18
|
+
export {};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export var animation;
|
|
2
|
+
(function (animation) {
|
|
3
|
+
animation["WAVES"] = "waves";
|
|
4
|
+
animation["PULSE"] = "pulse";
|
|
5
|
+
})(animation || (animation = {}));
|
|
6
|
+
export var variant;
|
|
7
|
+
(function (variant) {
|
|
8
|
+
variant["RECT"] = "rect";
|
|
9
|
+
variant["CIRCLE"] = "circle";
|
|
10
|
+
})(variant || (variant = {}));
|