@sonardigital/carbon-ui 1.1.77 → 1.1.79

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sonardigital/carbon-ui",
3
- "version": "1.1.77",
3
+ "version": "1.1.79",
4
4
  "description": "",
5
5
  "main": "src/index.ts",
6
6
  "files": [
@@ -0,0 +1,38 @@
1
+ import { Card } from '@mui/material';
2
+ import { Controller } from 'react-hook-form';
3
+
4
+ export function Component({
5
+ name,
6
+ children,
7
+ value,
8
+ sx,
9
+ }: {
10
+ name: string;
11
+ children: React.ReactNode;
12
+ value: string;
13
+ sx?: Record<string, unknown>;
14
+ }): React.ReactElement {
15
+ return (
16
+ <Controller
17
+ name={name}
18
+ render={({ field }) => (
19
+ <Card
20
+ // eslint-disable-next-line
21
+ // @ts-ignore
22
+ variant="numeric"
23
+ sx={{
24
+ bgcolor: 'info.light',
25
+ height: 65,
26
+ width: '100%',
27
+ borderRadius: 2.2,
28
+ border: 2,
29
+ borderColor: `info.${value === field.value ? 'main' : 'light'}`,
30
+ ...sx,
31
+ }}
32
+ >
33
+ {children}
34
+ </Card>
35
+ )}
36
+ />
37
+ );
38
+ }
@@ -6,3 +6,4 @@ export * from './FormMultiselect';
6
6
  export * from './FormSwitch';
7
7
  export * from './form-list/FormList';
8
8
  export * from './FormDatePicker';
9
+ export * from './FormBox';
@@ -612,13 +612,9 @@ export const components: Components<
612
612
  },
613
613
  },
614
614
  ],
615
- defaultProps: {
616
- sx: {
617
- transition: '0.2s',
615
+ styleOverrides: {
616
+ root: {
618
617
  boxShadow: 'none',
619
- '&:hover': {
620
- borderColor: 'primary.main',
621
- },
622
618
  },
623
619
  },
624
620
  },