@groupeactual/ui-kit 1.5.2 → 1.6.0-beta.3

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.
Files changed (75) hide show
  1. package/dist/cjs/index.js +16 -16
  2. package/dist/cjs/index.js.map +1 -1
  3. package/dist/cjs/types/DesignSystemProvider.d.ts +3 -3
  4. package/dist/cjs/types/components/Accordion/Accordion.d.ts +3 -1
  5. package/dist/cjs/types/components/Chip/Chip.d.ts +3 -3
  6. package/dist/cjs/types/components/Datatable/Datatable.d.ts +1 -1
  7. package/dist/cjs/types/components/Datatable/DatatableCellRender.d.ts +0 -1
  8. package/dist/cjs/types/components/Datatable/datatable.interface.d.ts +1 -1
  9. package/dist/cjs/types/components/Datatable/use-pagination-props.hook.d.ts +1 -1
  10. package/dist/cjs/types/components/EmbbededNotification/EmbeddedNotification.d.ts +1 -1
  11. package/dist/cjs/types/components/Form/DatePicker/DatePicker.d.ts +5 -4
  12. package/dist/cjs/types/components/Form/MultiSelect/MultiSelect.d.ts +9 -4
  13. package/dist/cjs/types/components/Form/Select/Select.d.ts +8 -3
  14. package/dist/cjs/types/components/Form/TextField/TextField.d.ts +5 -4
  15. package/dist/cjs/types/components/IconButton/IconButton.d.ts +4 -1
  16. package/dist/cjs/types/components/IconProvider/IconProvider.d.ts +0 -1
  17. package/dist/cjs/types/components/Modal/Dialog/Dialog.d.ts +1 -1
  18. package/dist/cjs/types/components/Modal/Drawer/Drawer.d.ts +1 -1
  19. package/dist/cjs/types/components/Modal/modal.interface.d.ts +4 -4
  20. package/dist/cjs/types/components/NotistackAdapter/NotistackAdapter.d.ts +1 -2
  21. package/dist/cjs/types/components/UploadDocument/FileUploaderSingle.d.ts +0 -1
  22. package/dist/es/index.d.ts +44 -27
  23. package/dist/es/index.mjs +15 -15
  24. package/dist/es/index.mjs.map +1 -1
  25. package/dist/es/types/DesignSystemProvider.d.ts +3 -3
  26. package/dist/es/types/components/Accordion/Accordion.d.ts +3 -1
  27. package/dist/es/types/components/Chip/Chip.d.ts +3 -3
  28. package/dist/es/types/components/Datatable/Datatable.d.ts +1 -1
  29. package/dist/es/types/components/Datatable/DatatableCellRender.d.ts +0 -1
  30. package/dist/es/types/components/Datatable/datatable.interface.d.ts +1 -1
  31. package/dist/es/types/components/Datatable/use-pagination-props.hook.d.ts +1 -1
  32. package/dist/es/types/components/EmbbededNotification/EmbeddedNotification.d.ts +1 -1
  33. package/dist/es/types/components/Form/DatePicker/DatePicker.d.ts +5 -4
  34. package/dist/es/types/components/Form/MultiSelect/MultiSelect.d.ts +9 -4
  35. package/dist/es/types/components/Form/Select/Select.d.ts +8 -3
  36. package/dist/es/types/components/Form/TextField/TextField.d.ts +5 -4
  37. package/dist/es/types/components/IconButton/IconButton.d.ts +4 -1
  38. package/dist/es/types/components/IconProvider/IconProvider.d.ts +0 -1
  39. package/dist/es/types/components/Modal/Dialog/Dialog.d.ts +1 -1
  40. package/dist/es/types/components/Modal/Drawer/Drawer.d.ts +1 -1
  41. package/dist/es/types/components/Modal/modal.interface.d.ts +4 -4
  42. package/dist/es/types/components/NotistackAdapter/NotistackAdapter.d.ts +1 -2
  43. package/dist/es/types/components/UploadDocument/FileUploaderSingle.d.ts +0 -1
  44. package/package.json +31 -33
  45. package/src/DesignSystemProvider.tsx +3 -8
  46. package/src/components/Accordion/Accordion.tsx +5 -3
  47. package/src/components/BannerNotification/BannerNotification.tsx +2 -3
  48. package/src/components/Breadcrumbs/Breadcrumbs.tsx +3 -3
  49. package/src/components/Button/Button.tsx +6 -6
  50. package/src/components/Chip/Chip.tsx +32 -29
  51. package/src/components/Datatable/Datatable.tsx +4 -4
  52. package/src/components/Datatable/datatable.interface.ts +1 -1
  53. package/src/components/Datatable/use-pagination-props.hook.ts +3 -3
  54. package/src/components/EmbbededNotification/EmbeddedNotification.tsx +8 -7
  55. package/src/components/Form/AutoCompleteMulti/AutoCompleteMulti.tsx +11 -7
  56. package/src/components/Form/AutoCompleteSingle/AutoCompleteSingle.tsx +8 -3
  57. package/src/components/Form/Checkbox/Checkbox.tsx +5 -5
  58. package/src/components/Form/CheckboxGroup/CheckboxGroup.tsx +1 -1
  59. package/src/components/Form/DatePicker/DatePicker.tsx +7 -6
  60. package/src/components/Form/MultiSelect/MultiSelect.tsx +22 -17
  61. package/src/components/Form/RadioGroup/RadioGroup.tsx +6 -6
  62. package/src/components/Form/Select/Select.tsx +21 -18
  63. package/src/components/Form/Switch/Switch.tsx +1 -1
  64. package/src/components/Form/TextField/TextField.tsx +5 -3
  65. package/src/components/IconButton/IconButton.tsx +12 -3
  66. package/src/components/IconProvider/IconProvider.tsx +36 -24
  67. package/src/components/Link/Link.tsx +5 -8
  68. package/src/components/Modal/Drawer/Drawer.tsx +1 -2
  69. package/src/components/Modal/modal.interface.ts +4 -4
  70. package/src/components/NotistackAdapter/NotistackAdapter.tsx +4 -3
  71. package/src/components/Pagination/Pagination.tsx +2 -2
  72. package/src/components/Snackbar/Snackbar.tsx +4 -4
  73. package/src/components/Text/Text.tsx +1 -1
  74. package/src/components/Tooltip/Tooltip.tsx +10 -12
  75. package/src/components/UploadDocument/FileUploaderSingle.tsx +1 -2
@@ -1,21 +1,18 @@
1
- import React, { useMemo } from 'react';
2
- import { Link as LinkMui, LinkProps, styled, useTheme } from '@mui/material';
1
+ import { useMemo } from 'react';
3
2
 
4
3
  import { LinkStyle } from '@groupeactual/design-tokens';
4
+ import { Link as LinkMui, LinkProps, styled, useTheme } from '@mui/material';
5
5
 
6
6
  interface Props extends Omit<LinkProps, 'variant'> {
7
7
  variant?: 'link1' | 'link2';
8
+ /* eslint-disable @typescript-eslint/no-explicit-any */
8
9
  component?: any;
9
10
  }
10
11
 
11
12
  const Link = (props: Props) => {
12
- const theme = useTheme();
13
- const StyledLink = useMemo(
14
- () => styled(LinkMui)(LinkStyle(theme)),
15
- [theme]
16
- );
13
+ const theme = useTheme();
14
+ const StyledLink = useMemo(() => styled(LinkMui)(LinkStyle(theme)), [theme]);
17
15
  return <StyledLink {...(props as LinkProps)} />;
18
-
19
16
  };
20
17
 
21
18
  Link.displayName = 'Link';
@@ -22,7 +22,6 @@ const Drawer = ({
22
22
  }: Omit<ModalProps, 'withHeaderDivider' | 'icon'>) => {
23
23
  return (
24
24
  <DrawerMUI
25
- disableEnforceFocus
26
25
  anchor="right"
27
26
  open={open}
28
27
  onClose={() => onClose?.()}
@@ -38,7 +37,7 @@ const Drawer = ({
38
37
  },
39
38
  '.MuiCardContent-root': {
40
39
  padding: '10px 24px 24px 24px',
41
- color: 'greyXDark'
40
+ color: 'greyXDark',
42
41
  },
43
42
  }}
44
43
  >
@@ -1,4 +1,4 @@
1
- import { ReactElement } from 'react';
1
+ import { ReactNode } from 'react';
2
2
 
3
3
  import { IconDefinition } from '@fortawesome/fontawesome-svg-core';
4
4
  import { CardProps } from '@mui/material';
@@ -17,8 +17,8 @@ export interface ModalProps
17
17
  open: boolean;
18
18
  title?: string;
19
19
  size?: 'small' | 'large';
20
- component: ReactElement<any> | null;
21
- footer?: ReactElement<any> | null;
20
+ component: ReactNode | null;
21
+ footer?: ReactNode | null;
22
22
  cardProps?: Partial<CardProps>;
23
23
  className?: string;
24
24
  icon?: IconDefinition;
@@ -27,7 +27,7 @@ export interface ModalProps
27
27
 
28
28
  export type DialogTitleProps<T extends OverridableTypeMap> =
29
29
  DefaultComponentProps<T> & {
30
- children?: React.ReactNode;
30
+ children?: ReactNode;
31
31
  icon?: IconDefinition | null;
32
32
  onClose: () => void;
33
33
  };
@@ -1,7 +1,8 @@
1
- import React, { forwardRef } from 'react';
1
+ import { forwardRef } from 'react';
2
+
3
+ import { CustomContentProps, SnackbarContent } from 'notistack';
2
4
 
3
5
  import Snackbar from '../Snackbar/Snackbar';
4
- import { SnackbarContent, CustomContentProps } from 'notistack';
5
6
 
6
7
  const NotistackAdapter = forwardRef<HTMLDivElement, CustomContentProps>(
7
8
  ({ message, variant }, ref) => {
@@ -13,7 +14,7 @@ const NotistackAdapter = forwardRef<HTMLDivElement, CustomContentProps>(
13
14
  <Snackbar text={message} severity={variant} />
14
15
  </SnackbarContent>
15
16
  );
16
- }
17
+ },
17
18
  );
18
19
  NotistackAdapter.displayName = 'NotistackAdapter';
19
20
 
@@ -1,4 +1,4 @@
1
- import React, { useEffect, useMemo, useState } from 'react';
1
+ import { ChangeEvent, useEffect, useMemo, useState } from 'react';
2
2
 
3
3
  import { PaginationStyle } from '@groupeactual/design-tokens';
4
4
  import {
@@ -133,7 +133,7 @@ const Pagination = ({
133
133
  shape="rounded"
134
134
  count={displayablePages}
135
135
  page={internalPage}
136
- onChange={(_: React.ChangeEvent<unknown>, value: number) =>
136
+ onChange={(_: ChangeEvent<unknown>, value: number) =>
137
137
  changePage(value)
138
138
  }
139
139
  />
@@ -1,13 +1,13 @@
1
1
  import React, { useMemo } from 'react';
2
- import { Alert, AlertProps, useTheme, styled } from '@mui/material';
2
+
3
3
  import {
4
4
  IconDefinition,
5
5
  faCheckCircle,
6
6
  faExclamationCircle,
7
- faTimesCircle
7
+ faTimesCircle,
8
8
  } from '@fortawesome/pro-solid-svg-icons';
9
-
10
9
  import { SnackbarStyle } from '@groupeactual/design-tokens';
10
+ import { Alert, AlertProps, styled, useTheme } from '@mui/material';
11
11
 
12
12
  import IconProvider from '../IconProvider/IconProvider';
13
13
 
@@ -20,7 +20,7 @@ const Snackbar = ({ text, severity }: Props) => {
20
20
  const theme = useTheme();
21
21
  const StyledSnackbar = useMemo(
22
22
  () => styled(Alert)(SnackbarStyle(theme)),
23
- [theme]
23
+ [theme],
24
24
  );
25
25
 
26
26
  let alertIcon: IconDefinition;
@@ -1,4 +1,3 @@
1
- import React from 'react';
2
1
  import { Typography, TypographyProps } from '@mui/material';
3
2
 
4
3
  interface Props extends Omit<TypographyProps, 'variant'> {
@@ -24,6 +23,7 @@ interface Props extends Omit<TypographyProps, 'variant'> {
24
23
  | 'h4'
25
24
  | 'link1'
26
25
  | 'link2';
26
+ /* eslint-disable @typescript-eslint/no-explicit-any */
27
27
  component?: any;
28
28
  }
29
29
 
@@ -5,7 +5,7 @@ import {
5
5
  Tooltip as TooltipMui,
6
6
  TooltipProps,
7
7
  styled,
8
- tooltipClasses
8
+ tooltipClasses,
9
9
  } from '@mui/material';
10
10
 
11
11
  import { Placement } from './tooltip.interface';
@@ -25,31 +25,29 @@ const Tooltip = ({
25
25
  if (!title) {
26
26
  return <>{children}</>;
27
27
  }
28
- const StyledTooltip = styled(
29
- ({ className, ...tooltipProps }: TooltipProps) => (
30
- <TooltipMui {...tooltipProps} classes={{ popper: className }} />
31
- )
32
- )(() => ({
28
+ const StyledTooltip = styled(({ classes, ...tooltipProps }: TooltipProps) => (
29
+ <TooltipMui {...tooltipProps} classes={classes} />
30
+ ))(() => ({
33
31
  [`& .${tooltipClasses.tooltip}`]: {
34
32
  backgroundColor: '#272727',
35
33
  padding: '4px !important',
36
34
  fontFamily: 'Roboto, sans-serif',
37
35
  fontSize: '13px',
38
36
  color: 'white',
39
- fontWeight: 400
37
+ fontWeight: 400,
40
38
  },
41
39
  [`& .${tooltipClasses.tooltipPlacementTop}`]: {
42
- marginBottom: '4px !important'
40
+ marginBottom: '4px !important',
43
41
  },
44
42
  [`& .${tooltipClasses.tooltipPlacementRight}`]: {
45
- marginLeft: '4px !important'
43
+ marginLeft: '4px !important',
46
44
  },
47
45
  [`& .${tooltipClasses.tooltipPlacementBottom}`]: {
48
- marginTop: '4px !important'
46
+ marginTop: '4px !important',
49
47
  },
50
48
  [`& .${tooltipClasses.tooltipPlacementLeft}`]: {
51
- marginRight: '4px !important'
52
- }
49
+ marginRight: '4px !important',
50
+ },
53
51
  }));
54
52
 
55
53
  return (
@@ -2,8 +2,7 @@ import { useCallback, useEffect, useMemo, useRef, useState } from 'react';
2
2
 
3
3
  import { faEye, faTrash, faUpload } from '@fortawesome/pro-regular-svg-icons';
4
4
  import { faFileAlt } from '@fortawesome/pro-solid-svg-icons';
5
- import { IconButton } from '@mui/material';
6
- import Box from '@mui/material/Box';
5
+ import { Box, IconButton } from '@mui/material';
7
6
 
8
7
  import Button from '../Button/Button';
9
8
  import IconProvider from '../IconProvider/IconProvider';