@cryptofi/core-ui 0.25.0 → 0.27.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.
@@ -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, {}>;
@@ -200,11 +201,11 @@ declare const exportedTheme: {
200
201
  declare const aggregateAmounts: (amounts: number[]) => number;
201
202
  //# sourceMappingURL=aggregateAmounts.d.ts.map
202
203
 
203
- declare const convertToUTCEpochTime: ({ timeString, toEndDate }: {
204
+ declare const dateToTimestamp: ({ timeString, toEndDate }: {
204
205
  timeString: string;
205
206
  toEndDate?: boolean | undefined;
206
207
  }) => string;
207
- //# sourceMappingURL=convertToUTCEpochTime.d.ts.map
208
+ //# sourceMappingURL=dateToTimestamp.d.ts.map
208
209
 
209
210
  type SignDisplay = 'auto' | 'always' | 'exceptZero' | 'never';
210
211
  /**
@@ -268,6 +269,8 @@ declare const uiColors: {
268
269
  };
269
270
  //# sourceMappingURL=uiColors.d.ts.map
270
271
 
272
+ declare const usdToNumber: (usd: string) => number;
273
+
271
274
  declare const CfAreaChart: ({ data, dataKey, width, height, areaType, showTooltip, isAnimated, formatter, }: {
272
275
  data: any[] | undefined;
273
276
  dataKey: string;
@@ -307,7 +310,7 @@ interface CfCheckboxProps extends CheckboxProps {
307
310
  declare const CfCheckbox: (props: CfCheckboxProps) => react_jsx_runtime.JSX.Element;
308
311
 
309
312
  interface Props$2 extends FlexProps {
310
- onSubmit: (event: React.FormEvent) => void;
313
+ onSubmit?: (event: React.FormEvent) => void;
311
314
  }
312
315
  /**
313
316
  *
@@ -316,6 +319,7 @@ interface Props$2 extends FlexProps {
316
319
  declare const CfForm: ({ children, onSubmit, ...rest }: Props$2) => react_jsx_runtime.JSX.Element;
317
320
  //# sourceMappingURL=Form.d.ts.map
318
321
 
322
+ type InputProps = Omit<CurrencyInputProps, 'size'> & InputProps$1;
319
323
  interface CfInputProps<T extends FieldValues> extends InputProps {
320
324
  register?: UseFormRegister<T>;
321
325
  errorMessage?: string;
@@ -326,6 +330,7 @@ interface CfInputProps<T extends FieldValues> extends InputProps {
326
330
  rightElement?: React.ReactElement;
327
331
  rightAddon?: React.ReactElement;
328
332
  name: string;
333
+ isCurrency?: boolean;
329
334
  }
330
335
  declare const CfInput: <T extends FieldValues>(props: CfInputProps<T>) => react_jsx_runtime.JSX.Element;
331
336
 
@@ -399,9 +404,9 @@ declare const CfTag: (props: CfTagProps) => react_jsx_runtime.JSX.Element | null
399
404
  interface CfToastProps extends UseToastOptions {
400
405
  onClose?: () => void;
401
406
  }
402
- declare const CfToast: (props: CfToastProps) => react_jsx_runtime.JSX.Element;
407
+ declare const CfToast: ({ description, title, onClose, isClosable, status }: CfToastProps) => react_jsx_runtime.JSX.Element;
403
408
 
404
409
  type SVGIcon = ChakraComponent<'svg', object>;
405
410
  declare const layoutMinWidth = "22rem";
406
411
 
407
- export { CfAreaChart, CfBreakpointDebugger, CfButtonGroup, CfButtonGroupButton, CfCard, CfCheckbox, type CfCheckboxProps, CfForm, CfInput, CfInputArray as CfInputArrays, 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, convertToUTCEpochTime, exportedTheme as coreTheme, formatPercentage, formatUSD, getDelta, layoutMinWidth, uiColors };
412
+ 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, formatPercentage, formatUSD, getDelta, layoutMinWidth, uiColors, usdToNumber };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cryptofi/core-ui",
3
- "version": "0.25.0",
3
+ "version": "0.27.0",
4
4
  "author": {
5
5
  "name": "CryptoFi"
6
6
  },
@@ -26,6 +26,7 @@
26
26
  "publish:npm": "yarn build && npm publish --access public && yarn publish:notifier",
27
27
  "storybook": "storybook dev -p 6006",
28
28
  "test": "jest --colors --passWithNoTests",
29
+ "test:one": "yarn test src/__tests/\"$@\".test.ts",
29
30
  "test:watch": "yarn test --collectCoverage=false --watch"
30
31
  },
31
32
  "module": "dist/index.js",
@@ -49,6 +50,7 @@
49
50
  "currency.js": "^2.0.4",
50
51
  "dayjs": "^1.11.10",
51
52
  "decimal.js": "^10.4.3",
53
+ "react-currency-input-field": "^3.7.0",
52
54
  "react-hook-form": "^7.49.3",
53
55
  "recharts": "^2.10.3",
54
56
  "yup": "^1.3.3"
@@ -62,18 +64,18 @@
62
64
  "@rollup/plugin-commonjs": "^25.0.7",
63
65
  "@rollup/plugin-node-resolve": "^15.2.3",
64
66
  "@rollup/plugin-terser": "^0.4.4",
65
- "@storybook/addon-essentials": "^7.5.2",
66
- "@storybook/addon-interactions": "^7.5.2",
67
- "@storybook/addon-links": "^7.5.2",
67
+ "@storybook/addon-essentials": "^7.6.14",
68
+ "@storybook/addon-interactions": "^7.6.14",
69
+ "@storybook/addon-links": "^7.6.14",
68
70
  "@storybook/addon-onboarding": "^1.0.8",
69
- "@storybook/blocks": "^7.6.12",
70
- "@storybook/components": "^7.5.3",
71
- "@storybook/manager-api": "^7.6.12",
72
- "@storybook/preview-api": "^7.5.3",
73
- "@storybook/react": "^7.5.2",
74
- "@storybook/react-vite": "^7.5.2",
71
+ "@storybook/blocks": "^7.6.14",
72
+ "@storybook/components": "^7.6.14",
73
+ "@storybook/manager-api": "^7.6.14",
74
+ "@storybook/preview-api": "^7.6.14",
75
+ "@storybook/react": "^7.6.14",
76
+ "@storybook/react-vite": "^7.6.14",
75
77
  "@storybook/testing-library": "^0.2.2",
76
- "@storybook/types": "^7.5.3",
78
+ "@storybook/types": "^7.6.14",
77
79
  "@svgr/cli": "^8.1.0",
78
80
  "@svgr/core": "^8.1.0",
79
81
  "@svgr/plugin-jsx": "^8.1.0",
@@ -84,8 +86,8 @@
84
86
  "@types/jest": "^29.2.6",
85
87
  "@types/lodash.isempty": "^4",
86
88
  "@types/prop-types": "^15",
87
- "@types/react": "^18.0.27",
88
- "@types/react-dom": "^18.0.10",
89
+ "@types/react": "^18.2.55",
90
+ "@types/react-dom": "^18.2.19",
89
91
  "@types/rollup-plugin-peer-deps-external": "^2",
90
92
  "@types/stringify-object": "^4.0.4",
91
93
  "@typescript-eslint/eslint-plugin": "^6.13.1",
@@ -126,5 +128,5 @@
126
128
  "typescript": "^5.3.3",
127
129
  "vite": "^4.5.0"
128
130
  },
129
- "packageManager": "yarn@4.0.1"
131
+ "packageManager": "yarn@4.1.0"
130
132
  }