@cryptofi/core-ui 0.11.0 → 0.13.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/README.md +6 -2
- package/dist/index.js +12 -5
- package/dist/index.js.map +1 -1
- package/dist/types/index.d.ts +21 -12
- package/package.json +7 -2
package/dist/types/index.d.ts
CHANGED
|
@@ -3,6 +3,7 @@ import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
|
3
3
|
import { SVGProps } from 'react';
|
|
4
4
|
import { CurveType } from 'recharts/types/shape/Curve';
|
|
5
5
|
import { CardProps, CheckboxProps, InputProps, ChakraComponent, SelectProps, TagProps, UseToastOptions } from '@chakra-ui/react';
|
|
6
|
+
import { FieldValues, UseFormRegister } from 'react-hook-form';
|
|
6
7
|
|
|
7
8
|
declare const SvgIconAlert: _chakra_ui_system_dist_system_types.ChakraComponent<(props: SVGProps<SVGSVGElement>) => react_jsx_runtime.JSX.Element, {}>;
|
|
8
9
|
//# sourceMappingURL=IconAlert.d.ts.map
|
|
@@ -171,7 +172,13 @@ declare const exportedTheme: {
|
|
|
171
172
|
};
|
|
172
173
|
//# sourceMappingURL=exportedTheme.d.ts.map
|
|
173
174
|
|
|
174
|
-
|
|
175
|
+
declare const convertToUTCEpochTime: ({ timeString, toEndDate }: {
|
|
176
|
+
timeString: string;
|
|
177
|
+
toEndDate?: boolean | undefined;
|
|
178
|
+
}) => string;
|
|
179
|
+
//# sourceMappingURL=convertToUTCEpochTime.d.ts.map
|
|
180
|
+
|
|
181
|
+
type SignDisplay = 'auto' | 'always' | 'exceptZero' | 'never';
|
|
175
182
|
/**
|
|
176
183
|
*
|
|
177
184
|
* @param amount - A finite number
|
|
@@ -180,20 +187,21 @@ type SignDisplay$1 = 'auto' | 'always' | 'exceptZero' | 'never';
|
|
|
180
187
|
*/
|
|
181
188
|
declare const formatPercentage: ({ number, signDisplay, isDecimal, }: {
|
|
182
189
|
number: number;
|
|
183
|
-
signDisplay?: SignDisplay
|
|
190
|
+
signDisplay?: SignDisplay | undefined;
|
|
184
191
|
isDecimal?: boolean | undefined;
|
|
185
192
|
}) => string;
|
|
186
193
|
//# sourceMappingURL=formatPercentage.d.ts.map
|
|
187
194
|
|
|
188
|
-
type SignDisplay = 'auto' | 'always' | 'exceptZero' | 'never';
|
|
189
195
|
/**
|
|
190
196
|
*
|
|
191
197
|
* @param amount - A finite number
|
|
192
|
-
* @param
|
|
198
|
+
* @param precision - The number of decimals to display
|
|
199
|
+
* @signDisplay - Whether to display a plus sign for positive amounts
|
|
193
200
|
*/
|
|
194
|
-
declare const formatUSD: ({ amount, signDisplay }: {
|
|
201
|
+
declare const formatUSD: ({ amount, precision, signDisplay, }: {
|
|
195
202
|
amount: number;
|
|
196
|
-
|
|
203
|
+
precision?: number | undefined;
|
|
204
|
+
signDisplay?: boolean | undefined;
|
|
197
205
|
}) => string;
|
|
198
206
|
//# sourceMappingURL=formatUSD.d.ts.map
|
|
199
207
|
|
|
@@ -252,15 +260,15 @@ interface CfCheckboxProps extends CheckboxProps {
|
|
|
252
260
|
}
|
|
253
261
|
declare const CfCheckbox: (props: CfCheckboxProps) => react_jsx_runtime.JSX.Element;
|
|
254
262
|
|
|
255
|
-
interface CfInputProps extends InputProps {
|
|
263
|
+
interface CfInputProps<T extends FieldValues> extends InputProps {
|
|
264
|
+
register?: UseFormRegister<T>;
|
|
256
265
|
errorMessage?: string;
|
|
257
266
|
helperText?: string;
|
|
258
267
|
label?: string;
|
|
259
|
-
spellCheck?: boolean;
|
|
260
268
|
IconLeft?: ChakraComponent<'svg', object>;
|
|
261
269
|
IconRight?: ChakraComponent<'svg', object>;
|
|
262
270
|
}
|
|
263
|
-
declare const CfInput: (props: CfInputProps) => react_jsx_runtime.JSX.Element;
|
|
271
|
+
declare const CfInput: <T extends FieldValues>(props: CfInputProps<T>) => react_jsx_runtime.JSX.Element;
|
|
264
272
|
|
|
265
273
|
declare const CfLineChart: ({ data, dataKey, width, height, lineType, }: {
|
|
266
274
|
data: any[] | undefined;
|
|
@@ -271,12 +279,13 @@ declare const CfLineChart: ({ data, dataKey, width, height, lineType, }: {
|
|
|
271
279
|
}) => react_jsx_runtime.JSX.Element;
|
|
272
280
|
//# sourceMappingURL=LineChart.d.ts.map
|
|
273
281
|
|
|
274
|
-
interface CfSelectProps extends SelectProps {
|
|
282
|
+
interface CfSelectProps<T extends FieldValues> extends SelectProps {
|
|
283
|
+
register?: UseFormRegister<T>;
|
|
275
284
|
errorMessage?: string;
|
|
276
285
|
helperText?: string;
|
|
277
286
|
label?: string;
|
|
278
287
|
}
|
|
279
|
-
declare const CfSelect: (props: CfSelectProps) => react_jsx_runtime.JSX.Element;
|
|
288
|
+
declare const CfSelect: <T extends FieldValues>(props: CfSelectProps<T>) => react_jsx_runtime.JSX.Element;
|
|
280
289
|
|
|
281
290
|
interface CfTagProps extends TagProps {
|
|
282
291
|
label: string;
|
|
@@ -291,4 +300,4 @@ interface CfToastProps extends UseToastOptions {
|
|
|
291
300
|
}
|
|
292
301
|
declare const CfToast: (props: CfToastProps) => react_jsx_runtime.JSX.Element;
|
|
293
302
|
|
|
294
|
-
export { CfAreaChart, CfBreakpointDebugger, CfCard, CfCheckbox, type CfCheckboxProps, CfInput, type CfInputProps, CfLineChart, CfSelect, type CfSelectProps, CfTag, type CfTagProps, CfToast, SvgIconAlert as IconAlert, SvgIconArrowDown as IconArrowDown, SvgIconArrowUp as IconArrowUp, SvgIconBank as IconBank, SvgIconBarChart as IconBarChart, 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, SvgIconExchange as IconExchange, SvgIconFilter as IconFilter, SvgIconHelp as IconHelp, SvgIconHistory as IconHistory, SvgIconHome as IconHome, SvgIconIndicatorDown as IconIndicatorDown, SvgIconIndicatorUp as IconIndicatorUp, SvgIconInfo as IconInfo, SvgIconMail as IconMail, SvgIconMenu as IconMenu, SvgIconMore as IconMore, SvgIconNotification as IconNotification, SvgIconOverview as IconOverview, SvgIconPercent as IconPercent, SvgIconPieChart as IconPieChart, SvgIconPlus as IconPlus, 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, exportedTheme as coreTheme, formatPercentage, formatUSD, getDelta, uiColors };
|
|
303
|
+
export { CfAreaChart, CfBreakpointDebugger, CfCard, CfCheckbox, type CfCheckboxProps, CfInput, type CfInputProps, CfLineChart, CfSelect, type CfSelectProps, CfTag, type CfTagProps, CfToast, SvgIconAlert as IconAlert, SvgIconArrowDown as IconArrowDown, SvgIconArrowUp as IconArrowUp, SvgIconBank as IconBank, SvgIconBarChart as IconBarChart, 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, SvgIconExchange as IconExchange, SvgIconFilter as IconFilter, SvgIconHelp as IconHelp, SvgIconHistory as IconHistory, SvgIconHome as IconHome, SvgIconIndicatorDown as IconIndicatorDown, SvgIconIndicatorUp as IconIndicatorUp, SvgIconInfo as IconInfo, SvgIconMail as IconMail, SvgIconMenu as IconMenu, SvgIconMore as IconMore, SvgIconNotification as IconNotification, SvgIconOverview as IconOverview, SvgIconPercent as IconPercent, SvgIconPieChart as IconPieChart, SvgIconPlus as IconPlus, 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, convertToUTCEpochTime, exportedTheme as coreTheme, formatPercentage, formatUSD, getDelta, uiColors };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cryptofi/core-ui",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.13.0",
|
|
4
4
|
"author": {
|
|
5
5
|
"name": "CryptoFi"
|
|
6
6
|
},
|
|
@@ -44,9 +44,14 @@
|
|
|
44
44
|
},
|
|
45
45
|
"dependencies": {
|
|
46
46
|
"@chakra-ui/anatomy": "^2.2.2",
|
|
47
|
+
"@hookform/resolvers": "^3.3.4",
|
|
47
48
|
"colord": "^2.9.3",
|
|
49
|
+
"currency.js": "^2.0.4",
|
|
50
|
+
"dayjs": "^1.11.10",
|
|
48
51
|
"decimal.js": "^10.4.3",
|
|
49
|
-
"
|
|
52
|
+
"react-hook-form": "^7.49.3",
|
|
53
|
+
"recharts": "^2.10.3",
|
|
54
|
+
"yup": "^1.3.3"
|
|
50
55
|
},
|
|
51
56
|
"devDependencies": {
|
|
52
57
|
"@babel/core": "^7.17.5",
|