@groupeactual/ui-kit 0.4.3 → 0.4.5

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/dist/index.d.ts CHANGED
@@ -1,6 +1,5 @@
1
1
  /// <reference types="react" />
2
2
  import { TypographyProps, LinkProps } from '@mui/material';
3
- import { TypographyProps as TypographyProps$1 } from '@mui/material/Typography';
4
3
  import { ButtonProps } from '@mui/material/Button';
5
4
  import * as react from 'react';
6
5
  import { FocusEventHandler, ChangeEventHandler, ReactNode, PropsWithChildren } from 'react';
@@ -8,23 +7,17 @@ import { TextFieldProps } from '@mui/material/TextField';
8
7
  import { SxProps, Theme as Theme$1 } from '@mui/system';
9
8
  import { IconProp } from '@fortawesome/fontawesome-svg-core';
10
9
 
11
- interface Props$7 extends Omit<TypographyProps, 'variant'> {
12
- variant?: 'big_number' | 'body1_regular' | 'body1_medium' | 'body1_bold' | 'body2_regular' | 'body2_medium' | 'body2_bold' | 'caption' | 'button_notif';
10
+ interface Props$6 extends Omit<TypographyProps, 'variant'> {
11
+ variant?: 'big_number' | 'body1_regular' | 'body1_medium' | 'body1_bold' | 'body2_regular' | 'body2_medium' | 'body2_bold' | 'caption' | 'button_notif' | 'h1' | 'h2' | 'h3' | 'h4';
13
12
  component?: any;
14
13
  }
15
- declare const Text: (props: Props$7) => JSX.Element;
14
+ declare const Text: (props: Props$6) => JSX.Element;
16
15
 
17
- interface Props$6 extends Omit<LinkProps, 'variant'> {
16
+ interface Props$5 extends Omit<LinkProps, 'variant'> {
18
17
  variant?: 'link1' | 'link2';
19
18
  component?: any;
20
19
  }
21
- declare const Link: (props: Props$6) => JSX.Element;
22
-
23
- interface Props$5 extends Omit<TypographyProps$1, 'paragraph'> {
24
- variant?: 'h1' | 'h2' | 'h3' | 'h4';
25
- component?: string;
26
- }
27
- declare const Heading: (props: Props$5) => JSX.Element;
20
+ declare const Link: (props: Props$5) => JSX.Element;
28
21
 
29
22
  type ActButtonType = (props: ButtonProps) => JSX.Element | null;
30
23
  declare const ActButton: ActButtonType;
@@ -82,4 +75,4 @@ interface Props {
82
75
  }
83
76
  declare const DesignSystemProvider: ({ children, name: themeName }: PropsWithChildren<Props>) => JSX.Element;
84
77
 
85
- export { ActAccordion as Accordion, ActButton as Button, Checkbox, DesignSystemContext, DesignSystemContextValues, DesignSystemProvider, Heading, IconProvider, Link, Text, TextField };
78
+ export { ActAccordion as Accordion, ActButton as Button, Checkbox, DesignSystemContext, DesignSystemContextValues, DesignSystemProvider, IconProvider, Link, Text, TextField };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@groupeactual/ui-kit",
3
- "version": "0.4.3",
3
+ "version": "0.4.5",
4
4
  "description": "A simple template for a custom React component library",
5
5
  "devDependencies": {
6
6
  "@babel/core": "^7.20.5",
@@ -50,6 +50,7 @@ const TextField = ({
50
50
  label={label}
51
51
  value={internalValue}
52
52
  placeholder={placeholder}
53
+ FormHelperTextProps={{ component: 'div' } as any}
53
54
  InputLabelProps={{ shrink: true }}
54
55
  onClick={(e) => e.stopPropagation()}
55
56
  onChange={(e) => {
@@ -65,7 +66,7 @@ const TextField = ({
65
66
  inputProps={{ maxLength }}
66
67
  {...props}
67
68
  helperText={
68
- <Table>
69
+ <div style={{ display: 'table', width: '100%' }}>
69
70
  {(error || props.helperText) && (
70
71
  <div
71
72
  style={{
@@ -81,7 +82,7 @@ const TextField = ({
81
82
  {internalValue.length}/{maxLength} caract.
82
83
  </div>
83
84
  )}
84
- </Table>
85
+ </div>
85
86
  }
86
87
  />
87
88
  );
@@ -10,11 +10,14 @@ interface Props extends Omit<TypographyProps, 'variant'> {
10
10
  | 'body2_medium'
11
11
  | 'body2_bold'
12
12
  | 'caption'
13
- | 'button_notif';
13
+ | 'button_notif'
14
+ | 'h1'
15
+ | 'h2'
16
+ | 'h3'
17
+ | 'h4';
14
18
  component?: any;
15
19
  }
16
20
 
17
- // @ts-ignore
18
21
  const Text = (props: Props) => <Typography {...(props as TypographyProps)} />;
19
22
 
20
23
  export default Text;
@@ -1,6 +1,5 @@
1
1
  export { default as Text } from './Text';
2
2
  export { default as Link } from './Link';
3
- export { default as Heading } from './Heading';
4
3
  export { default as Button } from './Button';
5
4
  export { default as TextField } from './Form/TextField';
6
5
  export { default as Checkbox } from './Form/Checkbox';
@@ -1,8 +0,0 @@
1
- /// <reference types="react" />
2
- import { TypographyProps } from '@mui/material/Typography';
3
- interface Props extends Omit<TypographyProps, 'paragraph'> {
4
- variant?: 'h1' | 'h2' | 'h3' | 'h4';
5
- component?: string;
6
- }
7
- declare const Heading: (props: Props) => JSX.Element;
8
- export default Heading;
@@ -1 +0,0 @@
1
- export { default } from "./Heading";
@@ -1,8 +0,0 @@
1
- /// <reference types="react" />
2
- import { TypographyProps } from '@mui/material/Typography';
3
- interface Props extends Omit<TypographyProps, 'paragraph'> {
4
- variant?: 'h1' | 'h2' | 'h3' | 'h4';
5
- component?: string;
6
- }
7
- declare const Heading: (props: Props) => JSX.Element;
8
- export default Heading;
@@ -1 +0,0 @@
1
- export { default } from "./Heading";
@@ -1,10 +0,0 @@
1
- import Typography, { TypographyProps } from '@mui/material/Typography';
2
-
3
- interface Props extends Omit<TypographyProps, 'paragraph'> {
4
- variant?: 'h1' | 'h2' | 'h3' | 'h4';
5
- component?: string;
6
- }
7
-
8
- const Heading = (props: Props) => <Typography {...props} />;
9
-
10
- export default Heading;
@@ -1 +0,0 @@
1
- export { default } from "./Heading";