@groupeactual/ui-kit 0.4.25 → 0.4.26

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 (48) hide show
  1. package/dist/cjs/DesignSystemProvider.d.ts +2 -2
  2. package/dist/cjs/components/Button/Button.d.ts +4 -4
  3. package/dist/cjs/components/EmbbededNotification/EmbeddedNotification.d.ts +2 -2
  4. package/dist/cjs/components/Form/MultiSelect/MultiSelect.d.ts +14 -0
  5. package/dist/cjs/components/Form/MultiSelect/index.d.ts +1 -0
  6. package/dist/cjs/components/Form/Select/Select.d.ts +14 -0
  7. package/dist/cjs/components/Form/Select/index.d.ts +1 -0
  8. package/dist/cjs/components/Form/TextField/TextField.d.ts +1 -2
  9. package/dist/cjs/components/Icon/Icon.d.ts +2 -2
  10. package/dist/cjs/components/Tooltip/Tooltip.d.ts +8 -0
  11. package/dist/cjs/components/Tooltip/index.d.ts +1 -0
  12. package/dist/cjs/components/index.d.ts +3 -0
  13. package/dist/cjs/index.js +5092 -1248
  14. package/dist/cjs/index.js.map +1 -1
  15. package/dist/esm/DesignSystemProvider.d.ts +2 -2
  16. package/dist/esm/components/Button/Button.d.ts +4 -4
  17. package/dist/esm/components/EmbbededNotification/EmbeddedNotification.d.ts +2 -2
  18. package/dist/esm/components/Form/MultiSelect/MultiSelect.d.ts +14 -0
  19. package/dist/esm/components/Form/MultiSelect/index.d.ts +1 -0
  20. package/dist/esm/components/Form/Select/Select.d.ts +14 -0
  21. package/dist/esm/components/Form/Select/index.d.ts +1 -0
  22. package/dist/esm/components/Form/TextField/TextField.d.ts +1 -2
  23. package/dist/esm/components/Icon/Icon.d.ts +2 -2
  24. package/dist/esm/components/Tooltip/Tooltip.d.ts +8 -0
  25. package/dist/esm/components/Tooltip/index.d.ts +1 -0
  26. package/dist/esm/components/index.d.ts +3 -0
  27. package/dist/esm/index.js +5091 -1250
  28. package/dist/esm/index.js.map +1 -1
  29. package/dist/index.d.ts +54 -25
  30. package/package.json +8 -5
  31. package/src/DesignSystemProvider.tsx +9 -2
  32. package/src/components/Accordion/Accordion.tsx +6 -1
  33. package/src/components/Button/Button.tsx +9 -4
  34. package/src/components/Chip/Chip.tsx +1 -0
  35. package/src/components/EmbbededNotification/EmbeddedNotification.tsx +2 -2
  36. package/src/components/Form/Checkbox/Checkbox.tsx +1 -1
  37. package/src/components/Form/MultiSelect/MultiSelect.tsx +176 -0
  38. package/src/components/Form/MultiSelect/index.ts +1 -0
  39. package/src/components/Form/Select/Select.tsx +154 -0
  40. package/src/components/Form/Select/index.ts +1 -0
  41. package/src/components/Form/TextField/TextField.tsx +13 -6
  42. package/src/components/Icon/Icon.tsx +14 -11
  43. package/src/components/Link/Link.tsx +1 -0
  44. package/src/components/Pagination/Pagination.tsx +2 -2
  45. package/src/components/Text/Text.tsx +1 -0
  46. package/src/components/Tooltip/Tooltip.tsx +24 -0
  47. package/src/components/Tooltip/index.ts +1 -0
  48. package/src/components/index.ts +3 -0
@@ -1,5 +1,5 @@
1
+ import React, { forwardRef } from 'react';
1
2
  import SvgIcon from '@mui/material/SvgIcon';
2
- import { forwardRef } from 'react';
3
3
  import { SxProps, Theme } from '@mui/material/styles';
4
4
  import { IconDefinition } from '@fortawesome/fontawesome-svg-core';
5
5
  import Box, { BoxProps } from '@mui/material/Box';
@@ -61,7 +61,7 @@ const FontAwesomeSvgIcon = forwardRef<SVGSVGElement, FontAwesomeSvgIconProps>(
61
61
  }
62
62
  );
63
63
 
64
- const Icon = ({
64
+ const IconProvider = ({
65
65
  variant = 'none',
66
66
  icon,
67
67
  color = '#136cac',
@@ -84,9 +84,9 @@ const Icon = ({
84
84
  borderRadius: '4px',
85
85
  borderColor: '1px solid ' + usedColor,
86
86
  overflow: 'visible',
87
- padding: usedFontSize + 'px',
88
- width: usedFontSize,
89
- height: usedFontSize,
87
+ padding: '10px',
88
+ width: '35px',
89
+ height: '35px',
90
90
  display: 'flex',
91
91
  justifyContent: 'center',
92
92
  alignItems: 'center'
@@ -107,11 +107,14 @@ const Icon = ({
107
107
  return key in FontSizes;
108
108
  };
109
109
 
110
- const usedFontSize: number = isKey(size)
111
- ? FontSizes[size]
112
- : size >= 0
113
- ? size
114
- : 16;
110
+ const usedFontSize: number =
111
+ variant === 'square'
112
+ ? 16
113
+ : isKey(size)
114
+ ? FontSizes[size]
115
+ : size >= 0
116
+ ? size
117
+ : 16;
115
118
 
116
119
  return (
117
120
  <Box component="span" sx={getStyles()} {...props}>
@@ -120,4 +123,4 @@ const Icon = ({
120
123
  );
121
124
  };
122
125
 
123
- export default Icon;
126
+ export default IconProvider;
@@ -1,3 +1,4 @@
1
+ import React from 'react';
1
2
  import { Link as LinkMui, LinkProps } from '@mui/material';
2
3
 
3
4
  interface Props extends Omit<LinkProps, 'variant'> {
@@ -1,4 +1,4 @@
1
- import { useEffect, useState } from 'react';
1
+ import React, { useEffect, useState } from 'react';
2
2
  import {
3
3
  Box,
4
4
  Divider,
@@ -60,7 +60,7 @@ const Pagination = ({
60
60
  />
61
61
  <Select
62
62
  sx={{
63
- //@TODO replace by Select from ui-kit when ready
63
+ // @TODO replace by Select from ui-kit when ready
64
64
  height: '32px',
65
65
  width: '75px',
66
66
  fontSize: '14px',
@@ -1,3 +1,4 @@
1
+ import React from 'react';
1
2
  import { Typography, TypographyProps } from '@mui/material';
2
3
 
3
4
  interface Props extends Omit<TypographyProps, 'variant'> {
@@ -0,0 +1,24 @@
1
+ import React, { ReactNode } from 'react';
2
+ import { IconButton, Tooltip as TooltipMui, TooltipProps } from '@mui/material';
3
+
4
+ interface Props extends Omit<TooltipProps, 'icon' | 'children'> {
5
+ title: string;
6
+ children: ReactNode;
7
+ }
8
+
9
+ const Tooltip = ({ title, children, ...props }: Props) => (
10
+ <TooltipMui title={title} {...props} className="DsTooltip-root">
11
+ <IconButton
12
+ sx={{
13
+ padding: 0,
14
+ '& .MuiBox-root': {
15
+ width: 0
16
+ }
17
+ }}
18
+ >
19
+ {children}
20
+ </IconButton>
21
+ </TooltipMui>
22
+ );
23
+
24
+ export default Tooltip;
@@ -0,0 +1 @@
1
+ export { default } from './Tooltip';
@@ -2,9 +2,12 @@ export { default as Text } from './Text';
2
2
  export { default as Link } from './Link';
3
3
  export { default as Button } from './Button';
4
4
  export { default as TextField } from './Form/TextField';
5
+ export { default as Select } from './Form/Select';
6
+ export { default as MultiSelect } from './Form/MultiSelect';
5
7
  export { default as Checkbox } from './Form/Checkbox';
6
8
  export { default as Accordion } from './Accordion';
7
9
  export { default as IconProvider } from './Icon/Icon';
8
10
  export { default as Pagination } from './Pagination';
9
11
  export { default as Chip } from './Chip/Chip';
10
12
  export { default as EmbeddedNotification } from './EmbbededNotification/EmbeddedNotification';
13
+ export { default as Tooltip } from './Tooltip/Tooltip';