@sonardigital/carbon-ui 1.1.51 → 1.1.53

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.51",
3
+ "version": "1.1.53",
4
4
  "description": "",
5
5
  "main": "src/index.ts",
6
6
  "files": [
@@ -21,8 +21,8 @@ export function Row(props: {
21
21
  {{
22
22
  ...Component,
23
23
  props: {
24
- ...Component.props,
25
- name: `${name}[${index}].${Component.props?.name}`,
24
+ ...((Component?.props as object) || {}),
25
+ name: `${name}[${index}].${(Component?.props as unknown as { name?: string })?.name}`,
26
26
  },
27
27
  }}
28
28
  </Grid>
@@ -1,2 +1 @@
1
- export * from './FormLabel';
2
1
  export * from './FormError';
@@ -1,17 +1,44 @@
1
- import { Modal } from '@mui/material';
1
+ import { Modal, Stack, SxProps } from '@mui/material';
2
2
  import React from 'react';
3
3
  import { useModalContext } from '../hooks/useModalContext';
4
4
 
5
5
  interface ModalContentProps {
6
6
  children: React.ReactElement;
7
+ sx?: SxProps;
7
8
  }
8
9
 
9
- export function ModalContent({ children }: ModalContentProps): React.ReactElement {
10
+ export function ModalContent({ children, sx }: ModalContentProps): React.ReactElement {
10
11
  const { isOpen, close } = useModalContext();
11
12
 
12
13
  return (
13
14
  <Modal onClose={close} open={isOpen}>
14
- {children}
15
+ <Stack
16
+ bgcolor="background.default"
17
+ paddingY={1}
18
+ zIndex={1200}
19
+ border="none"
20
+ sx={{
21
+ borderRadius: 2,
22
+ position: 'absolute',
23
+ top: '50%',
24
+ left: '50%',
25
+ outline: 'none',
26
+ transform: 'translate(-50%, -50%)',
27
+ boxSizing: 'border-box',
28
+ padding: 5,
29
+ minHeight: {
30
+ sx: 500,
31
+ sm: 300,
32
+ },
33
+ minWidth: {
34
+ xs: '100%',
35
+ sm: 600,
36
+ },
37
+ ...sx,
38
+ }}
39
+ >
40
+ {children}
41
+ </Stack>
15
42
  </Modal>
16
43
  );
17
44
  }
@@ -2,6 +2,7 @@
2
2
 
3
3
  import { Theme } from '@emotion/react';
4
4
  import { Components, CssVarsTheme } from '@mui/material';
5
+ import { palette } from './palette';
5
6
 
6
7
  const defaultButtonStyle = {
7
8
  paddingLeft: 20,
@@ -65,6 +66,11 @@ export const components: Components<Omit<Theme, 'components' | 'palette'> & CssV
65
66
  TransitionProps: {
66
67
  timeout: 0,
67
68
  },
69
+ slotProps: {
70
+ transition: {
71
+ duration: false,
72
+ },
73
+ },
68
74
  sx: {
69
75
  cursor: 'pointer',
70
76
  '&:before': { height: '0px' },
@@ -76,6 +82,7 @@ export const components: Components<Omit<Theme, 'components' | 'palette'> & CssV
76
82
  },
77
83
  },
78
84
  },
85
+
79
86
  MuiAccordionDetails: {
80
87
  defaultProps: {
81
88
  sx: {
@@ -83,6 +90,15 @@ export const components: Components<Omit<Theme, 'components' | 'palette'> & CssV
83
90
  display: 'flex',
84
91
  flexDirection: 'column',
85
92
  gap: 1,
93
+ borderTop: 3.5,
94
+ borderColor: palette.background.default,
95
+ },
96
+ },
97
+ },
98
+ MuiAccordionSummary: {
99
+ defaultProps: {
100
+ style: {
101
+ minHeight: 55,
86
102
  },
87
103
  },
88
104
  },
@@ -154,6 +170,7 @@ export const components: Components<Omit<Theme, 'components' | 'palette'> & CssV
154
170
  defaultProps: {
155
171
  style: {
156
172
  width: 'auto',
173
+ borderRadius: 100,
157
174
  alignSelf: 'start',
158
175
  height: 35,
159
176
  },
@@ -263,19 +280,50 @@ export const components: Components<Omit<Theme, 'components' | 'palette'> & CssV
263
280
  },
264
281
  MuiListItemIcon: {
265
282
  defaultProps: {
266
- sx: {
283
+ style: {
284
+ width: 35,
285
+ minWidth: 35,
267
286
  alignItems: 'center',
268
287
  justifyContent: 'center',
269
288
  paddingRight: 1,
270
289
  color: 'inherit',
290
+ height: '100%',
291
+ minHeight: 'auto',
292
+ alignSelf: 'center',
271
293
  },
272
294
  },
273
295
  },
274
296
  MuiAlert: {
297
+ variants: [
298
+ {
299
+ props: {
300
+ variant: 'filled',
301
+ severity: 'info',
302
+ },
303
+ style: {
304
+ backgroundColor: palette.info.light,
305
+ color: palette.info.main,
306
+ boxShadow: 'none',
307
+ },
308
+ },
309
+ {
310
+ props: {
311
+ variant: 'filled',
312
+ severity: 'warning',
313
+ },
314
+ style: {
315
+ backgroundColor: palette.warning.light,
316
+ color: palette.warning.main,
317
+ boxShadow: 'none',
318
+ },
319
+ },
320
+ ],
275
321
  defaultProps: {
276
322
  variant: 'filled',
323
+ icon: false,
277
324
  style: {
278
- borderRadius,
325
+ borderRadius: 4,
326
+
279
327
  opacity: 1,
280
328
  boxShadow: 'none',
281
329
  },
@@ -292,6 +340,35 @@ export const components: Components<Omit<Theme, 'components' | 'palette'> & CssV
292
340
  },
293
341
  },
294
342
  },
343
+ MuiBottomNavigation: {
344
+ defaultProps: {
345
+ sx: {
346
+ position: 'fixed',
347
+ left: 0,
348
+ bottom: 0,
349
+ width: '100%',
350
+ height: 'auto',
351
+ backgroundColor: 'background.default',
352
+ boxShadow: 10,
353
+ boxSizing: 'border-box',
354
+ paddingY: 1.25,
355
+ gap: 1,
356
+ },
357
+ },
358
+ },
359
+ MuiBottomNavigationAction: {
360
+ defaultProps: {
361
+ disableRipple: true,
362
+ disableTouchRipple: true,
363
+ slotProps: {
364
+ label: {
365
+ style: {
366
+ fontSize: 14,
367
+ },
368
+ },
369
+ },
370
+ },
371
+ },
295
372
  MuiListItem: {
296
373
  defaultProps: {
297
374
  style: {
@@ -25,7 +25,8 @@ export const palette = {
25
25
  main: '#222876',
26
26
  dark: '#D80809',
27
27
  // light: '#e4f5fd',
28
- light: '#EEF4FC',
28
+ // light: '#EEF4FC',
29
+ light: '#f3f8ff',
29
30
  },
30
31
  warning: {
31
32
  main: '#A5500F',
@@ -33,6 +34,7 @@ export const palette = {
33
34
  light: '#FFE5CA',
34
35
  },
35
36
  background: {
37
+ default: '#FFFFFF',
36
38
  paper: '#FAFAFA',
37
39
  },
38
40
  diver: '#F7F7F7',