@cryptofi/core-ui 0.10.0 → 0.12.1

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.
@@ -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,6 +172,12 @@ declare const exportedTheme: {
171
172
  };
172
173
  //# sourceMappingURL=exportedTheme.d.ts.map
173
174
 
175
+ declare const convertToUTCEpochTime: ({ timeString, toEndDate }: {
176
+ timeString: string;
177
+ toEndDate?: boolean | undefined;
178
+ }) => string;
179
+ //# sourceMappingURL=convertToUTCEpochTime.d.ts.map
180
+
174
181
  type SignDisplay$1 = 'auto' | 'always' | 'exceptZero' | 'never';
175
182
  /**
176
183
  *
@@ -237,6 +244,9 @@ declare const CfAreaChart: ({ data, dataKey, width, height, areaType, }: {
237
244
  }) => react_jsx_runtime.JSX.Element;
238
245
  //# sourceMappingURL=AreaChart.d.ts.map
239
246
 
247
+ declare const CfBreakpointDebugger: () => react_jsx_runtime.JSX.Element;
248
+ //# sourceMappingURL=BreakpointDebugger.d.ts.map
249
+
240
250
  declare const CfCard: ({ children, ...rest }: CardProps) => react_jsx_runtime.JSX.Element;
241
251
  //# sourceMappingURL=Card.d.ts.map
242
252
 
@@ -249,15 +259,15 @@ interface CfCheckboxProps extends CheckboxProps {
249
259
  }
250
260
  declare const CfCheckbox: (props: CfCheckboxProps) => react_jsx_runtime.JSX.Element;
251
261
 
252
- interface CfInputProps extends InputProps {
262
+ interface CfInputProps<T extends FieldValues> extends InputProps {
263
+ register?: UseFormRegister<T>;
253
264
  errorMessage?: string;
254
265
  helperText?: string;
255
266
  label?: string;
256
- spellCheck?: boolean;
257
267
  IconLeft?: ChakraComponent<'svg', object>;
258
268
  IconRight?: ChakraComponent<'svg', object>;
259
269
  }
260
- declare const CfInput: (props: CfInputProps) => react_jsx_runtime.JSX.Element;
270
+ declare const CfInput: <T extends FieldValues>(props: CfInputProps<T>) => react_jsx_runtime.JSX.Element;
261
271
 
262
272
  declare const CfLineChart: ({ data, dataKey, width, height, lineType, }: {
263
273
  data: any[] | undefined;
@@ -268,12 +278,13 @@ declare const CfLineChart: ({ data, dataKey, width, height, lineType, }: {
268
278
  }) => react_jsx_runtime.JSX.Element;
269
279
  //# sourceMappingURL=LineChart.d.ts.map
270
280
 
271
- interface CfSelectProps extends SelectProps {
281
+ interface CfSelectProps<T extends FieldValues> extends SelectProps {
282
+ register?: UseFormRegister<T>;
272
283
  errorMessage?: string;
273
284
  helperText?: string;
274
285
  label?: string;
275
286
  }
276
- declare const CfSelect: (props: CfSelectProps) => react_jsx_runtime.JSX.Element;
287
+ declare const CfSelect: <T extends FieldValues>(props: CfSelectProps<T>) => react_jsx_runtime.JSX.Element;
277
288
 
278
289
  interface CfTagProps extends TagProps {
279
290
  label: string;
@@ -288,4 +299,4 @@ interface CfToastProps extends UseToastOptions {
288
299
  }
289
300
  declare const CfToast: (props: CfToastProps) => react_jsx_runtime.JSX.Element;
290
301
 
291
- export { CfAreaChart, 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 };
302
+ 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.10.0",
3
+ "version": "0.12.1",
4
4
  "author": {
5
5
  "name": "CryptoFi"
6
6
  },
@@ -25,8 +25,8 @@
25
25
  "publish:npm": "npm publish --access public",
26
26
  "icons:gen": "yarn icons:clean && yarn icons:prefix && yarn dlx @svgr/cli -- ./svg-icons",
27
27
  "icons:clean": "rm -rf src/icons && mkdir src/icons",
28
- "icons:prefix": "node scripts/prefix-icons.cjs",
29
- "postpublish": "dotenv cross-var npm-publish-slack-webhook %SLACK_WEBHOOK_URL%"
28
+ "icons:prefix": "node scripts/prefixIcons.cjs",
29
+ "postpublish": "dotenv cross-var node scripts/npmPublishNotifier.cjs %SLACK_WEBHOOK_URL%"
30
30
  },
31
31
  "module": "dist/index.js",
32
32
  "types": "dist/types/index.d.ts",
@@ -44,9 +44,13 @@
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
+ "dayjs": "^1.11.10",
48
50
  "decimal.js": "^10.4.3",
49
- "recharts": "^2.10.3"
51
+ "react-hook-form": "^7.49.3",
52
+ "recharts": "^2.10.3",
53
+ "yup": "^1.3.3"
50
54
  },
51
55
  "devDependencies": {
52
56
  "@babel/core": "^7.17.5",
@@ -54,7 +58,6 @@
54
58
  "@chakra-ui/storybook-addon": "^5.0.1",
55
59
  "@emotion/react": "^11.11.1",
56
60
  "@emotion/styled": "^11.11.0",
57
- "@n370/npm-publish-slack-webhook": "^0.1.1",
58
61
  "@rollup/plugin-commonjs": "^25.0.7",
59
62
  "@rollup/plugin-node-resolve": "^15.2.3",
60
63
  "@rollup/plugin-terser": "^0.4.4",
@@ -79,6 +82,7 @@
79
82
  "@testing-library/react": "^13.4.0",
80
83
  "@types/jest": "^29.2.6",
81
84
  "@types/lodash.isempty": "^4",
85
+ "@types/prop-types": "^15",
82
86
  "@types/react": "^18.0.27",
83
87
  "@types/react-dom": "^18.0.10",
84
88
  "@types/rollup-plugin-peer-deps-external": "^2",
@@ -105,6 +109,7 @@
105
109
  "lodash.isempty": "^4.4.0",
106
110
  "pnpapi": "^0.0.0",
107
111
  "prettier": "^3.1.0",
112
+ "prop-types": "^15.8.1",
108
113
  "react": "^18.2.0",
109
114
  "react-dom": "^18.2.0",
110
115
  "rollup": "^4.3.1",