@cryptofi/core-ui 0.26.0 → 0.28.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.
- package/dist/index.js +11 -11
- package/dist/index.js.map +1 -1
- package/dist/types/index.d.ts +21 -3
- package/package.json +10 -8
package/dist/types/index.d.ts
CHANGED
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
import { ButtonGroupProps, ButtonProps, CardProps, CheckboxProps, FlexProps, InputProps, ModalProps, SelectProps, TagProps, UseToastOptions, ChakraComponent } from '@chakra-ui/react';
|
|
2
|
+
import { ButtonGroupProps, ButtonProps, CardProps, CheckboxProps, FlexProps, InputProps as InputProps$1, ModalProps, SelectProps, TagProps, UseToastOptions, ChakraComponent } from '@chakra-ui/react';
|
|
3
3
|
import * as _chakra_ui_system_dist_system_types from '@chakra-ui/system/dist/system.types';
|
|
4
4
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
5
5
|
import { SVGProps, Dispatch, SetStateAction } from 'react';
|
|
6
6
|
import { CurveType } from 'recharts/types/shape/Curve';
|
|
7
|
+
import { CurrencyInputProps } from 'react-currency-input-field';
|
|
7
8
|
import { FieldValues, UseFormRegister, Control } from 'react-hook-form';
|
|
8
9
|
|
|
9
10
|
declare const SvgIconAlert: _chakra_ui_system_dist_system_types.ChakraComponent<(props: SVGProps<SVGSVGElement>) => react_jsx_runtime.JSX.Element, {}>;
|
|
@@ -75,6 +76,9 @@ declare const SvgIconExchange: _chakra_ui_system_dist_system_types.ChakraCompone
|
|
|
75
76
|
declare const SvgIconFilter: _chakra_ui_system_dist_system_types.ChakraComponent<(props: SVGProps<SVGSVGElement>) => react_jsx_runtime.JSX.Element, {}>;
|
|
76
77
|
//# sourceMappingURL=IconFilter.d.ts.map
|
|
77
78
|
|
|
79
|
+
declare const SvgIconFilterActive: _chakra_ui_system_dist_system_types.ChakraComponent<(props: SVGProps<SVGSVGElement>) => react_jsx_runtime.JSX.Element, {}>;
|
|
80
|
+
//# sourceMappingURL=IconFilterActive.d.ts.map
|
|
81
|
+
|
|
78
82
|
declare const SvgIconHelp: _chakra_ui_system_dist_system_types.ChakraComponent<(props: SVGProps<SVGSVGElement>) => react_jsx_runtime.JSX.Element, {}>;
|
|
79
83
|
//# sourceMappingURL=IconHelp.d.ts.map
|
|
80
84
|
|
|
@@ -251,6 +255,16 @@ declare const getDelta: ({ data, dataKey }: {
|
|
|
251
255
|
};
|
|
252
256
|
//# sourceMappingURL=getDelta.d.ts.map
|
|
253
257
|
|
|
258
|
+
/**
|
|
259
|
+
* @description Pulls every nth element from a time series array, starting from the end
|
|
260
|
+
* to ensure the most recent entry is included.
|
|
261
|
+
*/
|
|
262
|
+
declare const pullFromEnd: <T>({ arr, n }: {
|
|
263
|
+
arr: T[];
|
|
264
|
+
n: number;
|
|
265
|
+
}) => T[];
|
|
266
|
+
//# sourceMappingURL=pullFromEnd.d.ts.map
|
|
267
|
+
|
|
254
268
|
/**
|
|
255
269
|
* @description An object with predefined UI colors, implemented as functions with optional alpha values.
|
|
256
270
|
* Color names are assigned using https://colornamer.robertcooper.me/.
|
|
@@ -268,6 +282,8 @@ declare const uiColors: {
|
|
|
268
282
|
};
|
|
269
283
|
//# sourceMappingURL=uiColors.d.ts.map
|
|
270
284
|
|
|
285
|
+
declare const usdToNumber: (usd: string) => number;
|
|
286
|
+
|
|
271
287
|
declare const CfAreaChart: ({ data, dataKey, width, height, areaType, showTooltip, isAnimated, formatter, }: {
|
|
272
288
|
data: any[] | undefined;
|
|
273
289
|
dataKey: string;
|
|
@@ -307,7 +323,7 @@ interface CfCheckboxProps extends CheckboxProps {
|
|
|
307
323
|
declare const CfCheckbox: (props: CfCheckboxProps) => react_jsx_runtime.JSX.Element;
|
|
308
324
|
|
|
309
325
|
interface Props$2 extends FlexProps {
|
|
310
|
-
onSubmit
|
|
326
|
+
onSubmit?: (event: React.FormEvent) => void;
|
|
311
327
|
}
|
|
312
328
|
/**
|
|
313
329
|
*
|
|
@@ -316,6 +332,7 @@ interface Props$2 extends FlexProps {
|
|
|
316
332
|
declare const CfForm: ({ children, onSubmit, ...rest }: Props$2) => react_jsx_runtime.JSX.Element;
|
|
317
333
|
//# sourceMappingURL=Form.d.ts.map
|
|
318
334
|
|
|
335
|
+
type InputProps = Omit<CurrencyInputProps, 'size'> & InputProps$1;
|
|
319
336
|
interface CfInputProps<T extends FieldValues> extends InputProps {
|
|
320
337
|
register?: UseFormRegister<T>;
|
|
321
338
|
errorMessage?: string;
|
|
@@ -326,6 +343,7 @@ interface CfInputProps<T extends FieldValues> extends InputProps {
|
|
|
326
343
|
rightElement?: React.ReactElement;
|
|
327
344
|
rightAddon?: React.ReactElement;
|
|
328
345
|
name: string;
|
|
346
|
+
isCurrency?: boolean;
|
|
329
347
|
}
|
|
330
348
|
declare const CfInput: <T extends FieldValues>(props: CfInputProps<T>) => react_jsx_runtime.JSX.Element;
|
|
331
349
|
|
|
@@ -404,4 +422,4 @@ declare const CfToast: ({ description, title, onClose, isClosable, status }: CfT
|
|
|
404
422
|
type SVGIcon = ChakraComponent<'svg', object>;
|
|
405
423
|
declare const layoutMinWidth = "22rem";
|
|
406
424
|
|
|
407
|
-
export { CfAreaChart, CfBreakpointDebugger, CfButtonGroup, CfButtonGroupButton, CfCard, CfCheckbox, type CfCheckboxProps, CfForm, CfInput, CfInputArray, type CfInputProps, CfLineChart, CfModal, CfPagination, CfSelect, type CfSelectOption, type CfSelectProps, CfTag, type CfTagProps, CfToast, SvgIconAlert as IconAlert, SvgIconArrowDown as IconArrowDown, SvgIconArrowUp as IconArrowUp, SvgIconAvax as IconAvax, SvgIconBank as IconBank, SvgIconBarChart as IconBarChart, SvgIconBch as IconBch, SvgIconBtc as IconBtc, SvgIconCalendar as IconCalendar, SvgIconCaretDown as IconCaretDown, SvgIconCaretLeft as IconCaretLeft, SvgIconCaretRight as IconCaretRight, SvgIconCaretUp as IconCaretUp, SvgIconCent as IconCent, SvgIconCheck as IconCheck, SvgIconChecking as IconChecking, SvgIconClose as IconClose, SvgIconConnect as IconConnect, SvgIconCopy as IconCopy, SvgIconDollar as IconDollar, SvgIconDownload as IconDownload, SvgIconEdit as IconEdit, SvgIconEnter as IconEnter, SvgIconEnterInverted as IconEnterInverted, SvgIconEth as IconEth, SvgIconExchange as IconExchange, SvgIconFilter as IconFilter, SvgIconHelp as IconHelp, SvgIconHistory as IconHistory, SvgIconHome as IconHome, SvgIconIndicatorDown as IconIndicatorDown, SvgIconIndicatorUp as IconIndicatorUp, SvgIconInfo as IconInfo, SvgIconLink as IconLink, SvgIconLtc as IconLtc, SvgIconMail as IconMail, SvgIconMenu as IconMenu, SvgIconMore as IconMore, SvgIconNotification as IconNotification, SvgIconOverview as IconOverview, SvgIconPercent as IconPercent, SvgIconPieChart as IconPieChart, SvgIconPlus as IconPlus, SvgIconRefresh as IconRefresh, SvgIconReports as IconReports, SvgIconReservesSuccess as IconReservesSuccess, SvgIconReservesWarning as IconReservesWarning, SvgIconSearch as IconSearch, SvgIconSettings as IconSettings, SvgIconSettlement as IconSettlement, SvgIconSignIn as IconSignIn, SvgIconSignOut as IconSignOut, SvgIconSort as IconSort, SvgIconSpinner as IconSpinner, SvgIconSupport as IconSupport, SvgIconTrash as IconTrash, SvgIconUpload as IconUpload, SvgIconUser as IconUser, SvgIconXlm as IconXlm, type SVGIcon, aggregateAmounts, exportedTheme as coreTheme, dateToTimestamp
|
|
425
|
+
export { CfAreaChart, CfBreakpointDebugger, CfButtonGroup, CfButtonGroupButton, CfCard, CfCheckbox, type CfCheckboxProps, CfForm, CfInput, CfInputArray, type CfInputProps, CfLineChart, CfModal, CfPagination, CfSelect, type CfSelectOption, type CfSelectProps, CfTag, type CfTagProps, CfToast, SvgIconAlert as IconAlert, SvgIconArrowDown as IconArrowDown, SvgIconArrowUp as IconArrowUp, SvgIconAvax as IconAvax, SvgIconBank as IconBank, SvgIconBarChart as IconBarChart, SvgIconBch as IconBch, SvgIconBtc as IconBtc, SvgIconCalendar as IconCalendar, SvgIconCaretDown as IconCaretDown, SvgIconCaretLeft as IconCaretLeft, SvgIconCaretRight as IconCaretRight, SvgIconCaretUp as IconCaretUp, SvgIconCent as IconCent, SvgIconCheck as IconCheck, SvgIconChecking as IconChecking, SvgIconClose as IconClose, SvgIconConnect as IconConnect, SvgIconCopy as IconCopy, SvgIconDollar as IconDollar, SvgIconDownload as IconDownload, SvgIconEdit as IconEdit, SvgIconEnter as IconEnter, SvgIconEnterInverted as IconEnterInverted, SvgIconEth as IconEth, SvgIconExchange as IconExchange, SvgIconFilter as IconFilter, SvgIconFilterActive as IconFilterActive, SvgIconHelp as IconHelp, SvgIconHistory as IconHistory, SvgIconHome as IconHome, SvgIconIndicatorDown as IconIndicatorDown, SvgIconIndicatorUp as IconIndicatorUp, SvgIconInfo as IconInfo, SvgIconLink as IconLink, SvgIconLtc as IconLtc, SvgIconMail as IconMail, SvgIconMenu as IconMenu, SvgIconMore as IconMore, SvgIconNotification as IconNotification, SvgIconOverview as IconOverview, SvgIconPercent as IconPercent, SvgIconPieChart as IconPieChart, SvgIconPlus as IconPlus, SvgIconRefresh as IconRefresh, SvgIconReports as IconReports, SvgIconReservesSuccess as IconReservesSuccess, SvgIconReservesWarning as IconReservesWarning, SvgIconSearch as IconSearch, SvgIconSettings as IconSettings, SvgIconSettlement as IconSettlement, SvgIconSignIn as IconSignIn, SvgIconSignOut as IconSignOut, SvgIconSort as IconSort, SvgIconSpinner as IconSpinner, SvgIconSupport as IconSupport, SvgIconTrash as IconTrash, SvgIconUpload as IconUpload, SvgIconUser as IconUser, SvgIconXlm as IconXlm, type SVGIcon, aggregateAmounts, exportedTheme as coreTheme, dateToTimestamp, formatPercentage, formatUSD, getDelta, layoutMinWidth, pullFromEnd, uiColors, usdToNumber };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cryptofi/core-ui",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.28.0",
|
|
4
4
|
"author": {
|
|
5
5
|
"name": "CryptoFi"
|
|
6
6
|
},
|
|
@@ -50,8 +50,9 @@
|
|
|
50
50
|
"currency.js": "^2.0.4",
|
|
51
51
|
"dayjs": "^1.11.10",
|
|
52
52
|
"decimal.js": "^10.4.3",
|
|
53
|
+
"react-currency-input-field": "^3.7.0",
|
|
53
54
|
"react-hook-form": "^7.49.3",
|
|
54
|
-
"recharts": "^2.
|
|
55
|
+
"recharts": "^2.12.0",
|
|
55
56
|
"yup": "^1.3.3"
|
|
56
57
|
},
|
|
57
58
|
"devDependencies": {
|
|
@@ -67,8 +68,8 @@
|
|
|
67
68
|
"@storybook/addon-interactions": "^7.6.14",
|
|
68
69
|
"@storybook/addon-links": "^7.6.14",
|
|
69
70
|
"@storybook/addon-onboarding": "^1.0.8",
|
|
70
|
-
"@storybook/blocks": "^7.6.
|
|
71
|
-
"@storybook/components": "^7.6.
|
|
71
|
+
"@storybook/blocks": "^7.6.16",
|
|
72
|
+
"@storybook/components": "^7.6.17",
|
|
72
73
|
"@storybook/manager-api": "^7.6.14",
|
|
73
74
|
"@storybook/preview-api": "^7.6.14",
|
|
74
75
|
"@storybook/react": "^7.6.14",
|
|
@@ -80,7 +81,7 @@
|
|
|
80
81
|
"@svgr/plugin-jsx": "^8.1.0",
|
|
81
82
|
"@svgr/plugin-prettier": "^8.1.0",
|
|
82
83
|
"@svgr/plugin-svgo": "^8.1.0",
|
|
83
|
-
"@testing-library/jest-dom": "^
|
|
84
|
+
"@testing-library/jest-dom": "^6.4.2",
|
|
84
85
|
"@testing-library/react": "^13.4.0",
|
|
85
86
|
"@types/jest": "^29.2.6",
|
|
86
87
|
"@types/lodash.isempty": "^4",
|
|
@@ -89,9 +90,10 @@
|
|
|
89
90
|
"@types/react-dom": "^18.2.19",
|
|
90
91
|
"@types/rollup-plugin-peer-deps-external": "^2",
|
|
91
92
|
"@types/stringify-object": "^4.0.4",
|
|
92
|
-
"@typescript-eslint/eslint-plugin": "^
|
|
93
|
-
"@typescript-eslint/parser": "^
|
|
93
|
+
"@typescript-eslint/eslint-plugin": "^7.0.2",
|
|
94
|
+
"@typescript-eslint/parser": "^7.0.2",
|
|
94
95
|
"chalk": "4.1.2",
|
|
96
|
+
"core-js": "^3.36.0",
|
|
95
97
|
"cross-var": "^1.1.0",
|
|
96
98
|
"dotenv-cli": "^7.3.0",
|
|
97
99
|
"eslint": "^8.9.0",
|
|
@@ -105,7 +107,7 @@
|
|
|
105
107
|
"eslint-plugin-react-hooks": "^4.3.0",
|
|
106
108
|
"eslint-plugin-simple-import-sort": "^9.0.0",
|
|
107
109
|
"eslint-plugin-storybook": "^0.6.15",
|
|
108
|
-
"eslint-plugin-unused-imports": "^3.
|
|
110
|
+
"eslint-plugin-unused-imports": "^3.1.0",
|
|
109
111
|
"framer-motion": "^10.16.4",
|
|
110
112
|
"identity-obj-proxy": "^3.0.0",
|
|
111
113
|
"jest": "^29.4.0",
|