@xelto.npm/xc2-lib 0.0.44 → 0.0.46

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 (38) hide show
  1. package/dist/cjs/index.js +45 -44
  2. package/dist/cjs/index.js.map +1 -1
  3. package/dist/cjs/types/components/Inputs/datepicker/DatePickerProps.d.ts +2 -2
  4. package/dist/cjs/types/components/Inputs/select/Select.d.ts +4 -0
  5. package/dist/cjs/types/components/Inputs/select/SelectProps.d.ts +18 -0
  6. package/dist/cjs/types/components/Inputs/textfield/TextField.d.ts +5 -1
  7. package/dist/cjs/types/components/bottomBar/BottomBarComponent.d.ts +13 -5
  8. package/dist/cjs/types/components/bottomInfoBar/BottomInfoBar.d.ts +3 -16
  9. package/dist/cjs/types/components/bottomInfoBar/BottomInfoBarProps.d.ts +7 -0
  10. package/dist/cjs/types/components/buttons/customButton/CustomButtonComponent.d.ts +3 -14
  11. package/dist/cjs/types/components/buttons/customButton/CustomButtonProps.d.ts +11 -0
  12. package/dist/cjs/types/components/buttons/iconButton/IconButtonComponent.d.ts +4 -11
  13. package/dist/cjs/types/components/buttons/iconButton/IconButtonProps.d.ts +10 -0
  14. package/dist/cjs/types/components/checkbox/CheckboxComponent.d.ts +3 -10
  15. package/dist/cjs/types/components/checkbox/CheckboxProps.d.ts +9 -0
  16. package/dist/cjs/types/components/foundations/icon/Icon.d.ts +3 -8
  17. package/dist/cjs/types/components/foundations/icon/IconProps.d.ts +9 -0
  18. package/dist/cjs/types/components/foundations/logo/Logo.d.ts +5 -6
  19. package/dist/esm/index.js +45 -44
  20. package/dist/esm/index.js.map +1 -1
  21. package/dist/esm/types/components/Inputs/datepicker/DatePickerProps.d.ts +2 -2
  22. package/dist/esm/types/components/Inputs/select/Select.d.ts +4 -0
  23. package/dist/esm/types/components/Inputs/select/SelectProps.d.ts +18 -0
  24. package/dist/esm/types/components/Inputs/textfield/TextField.d.ts +5 -1
  25. package/dist/esm/types/components/bottomBar/BottomBarComponent.d.ts +13 -5
  26. package/dist/esm/types/components/bottomInfoBar/BottomInfoBar.d.ts +3 -16
  27. package/dist/esm/types/components/bottomInfoBar/BottomInfoBarProps.d.ts +7 -0
  28. package/dist/esm/types/components/buttons/customButton/CustomButtonComponent.d.ts +3 -14
  29. package/dist/esm/types/components/buttons/customButton/CustomButtonProps.d.ts +11 -0
  30. package/dist/esm/types/components/buttons/iconButton/IconButtonComponent.d.ts +4 -11
  31. package/dist/esm/types/components/buttons/iconButton/IconButtonProps.d.ts +10 -0
  32. package/dist/esm/types/components/checkbox/CheckboxComponent.d.ts +3 -10
  33. package/dist/esm/types/components/checkbox/CheckboxProps.d.ts +9 -0
  34. package/dist/esm/types/components/foundations/icon/Icon.d.ts +3 -8
  35. package/dist/esm/types/components/foundations/icon/IconProps.d.ts +9 -0
  36. package/dist/esm/types/components/foundations/logo/Logo.d.ts +5 -6
  37. package/dist/index.d.ts +70 -66
  38. package/package.json +3 -3
@@ -1,10 +1,10 @@
1
- import { Ref } from "react";
1
+ import { Ref, SetStateAction } from "react";
2
2
  export interface DatePickerProps {
3
3
  value: string;
4
4
  disabled?: boolean;
5
5
  label?: string;
6
6
  fluid?: boolean;
7
- onChange: (value: unknown, keyboardInputValue?: string) => void;
7
+ onChange: (value: SetStateAction<string>, keyboardInputValue?: string) => void;
8
8
  forwardedRef?: Ref<HTMLInputElement>;
9
9
  endAdornment?: string;
10
10
  }
@@ -0,0 +1,4 @@
1
+ import * as React from 'react';
2
+ import { SelectProps } from "./SelectProps";
3
+ declare const Select: React.FunctionComponent<SelectProps>;
4
+ export default Select;
@@ -0,0 +1,18 @@
1
+ import { ChangeEventHandler, RefObject } from "react";
2
+ export interface SelectProps {
3
+ disabled?: boolean;
4
+ fluid?: boolean;
5
+ label?: string;
6
+ options?: {
7
+ label: string;
8
+ }[];
9
+ withRefresh?: boolean;
10
+ value?: object;
11
+ noOptionsText?: string;
12
+ placeholder?: string;
13
+ onChange?: ChangeEventHandler<HTMLTextAreaElement | HTMLInputElement>;
14
+ onBlur?: ChangeEventHandler<HTMLTextAreaElement | HTMLInputElement>;
15
+ forwardedRef?: (instance: HTMLDivElement | null) => void | RefObject<HTMLDivElement> | null;
16
+ onRefreshClick?: void;
17
+ endAdornment?: string;
18
+ }
@@ -1,5 +1,9 @@
1
1
  import * as React from 'react';
2
2
  import { TextFieldProps } from "./TextFieldProps";
3
- export declare const StyledTextField: import("@emotion/styled").StyledComponent<import("@mui/material/TextField").TextFieldProps & import("@mui/system").MUIStyledCommonProps<import("@mui/material/styles").Theme>, {}, {}>;
3
+ interface ExtraProps {
4
+ fluid?: boolean;
5
+ small?: boolean;
6
+ }
7
+ export declare const StyledTextField: import("@emotion/styled").StyledComponent<(import("@mui/material/TextField").TextFieldProps & import("@mui/system").MUIStyledCommonProps<import("@mui/material/styles").Theme>) & ExtraProps, {}, {}>;
4
8
  declare const TextField: React.FunctionComponent<TextFieldProps>;
5
9
  export default TextField;
@@ -1,6 +1,14 @@
1
- /// <reference types="react" />
2
- declare const BottomBarComponent: ({ buttons, ...props }: {
3
- [x: string]: any;
4
- buttons: any;
5
- }) => JSX.Element;
1
+ import React, { MouseEventHandler } from 'react';
2
+ interface ItemProps {
3
+ disabled?: boolean;
4
+ fluid?: boolean;
5
+ onClick?: MouseEventHandler<HTMLButtonElement>;
6
+ type?: string;
7
+ text?: string;
8
+ color?: string;
9
+ size?: string;
10
+ }
11
+ declare const BottomBarComponent: React.FunctionComponent<{
12
+ buttons: ItemProps[];
13
+ }>;
6
14
  export default BottomBarComponent;
@@ -1,17 +1,4 @@
1
- /// <reference types="react" />
2
- import propTypes from "prop-types";
3
- declare const BottomInfoBar: {
4
- ({ noLogo, leftText, rightText, onRightTextClick }: {
5
- noLogo?: boolean | undefined;
6
- leftText?: string | undefined;
7
- rightText?: string | undefined;
8
- onRightTextClick: any;
9
- }): JSX.Element;
10
- propTypes: {
11
- noLogo: propTypes.Requireable<boolean>;
12
- leftText: propTypes.Requireable<string>;
13
- rightText: propTypes.Requireable<string>;
14
- onRightTextClick: propTypes.Requireable<(...args: any[]) => any>;
15
- };
16
- };
1
+ import * as React from "react";
2
+ import { BottomInfoBarProps } from "./BottomInfoBarProps";
3
+ declare const BottomInfoBar: React.FunctionComponent<BottomInfoBarProps>;
17
4
  export default BottomInfoBar;
@@ -0,0 +1,7 @@
1
+ import { MouseEventHandler } from "react";
2
+ export interface BottomInfoBarProps {
3
+ leftText?: string;
4
+ rightText?: string;
5
+ noLogo?: boolean;
6
+ onRightTextClick?: MouseEventHandler<HTMLButtonElement>;
7
+ }
@@ -1,15 +1,4 @@
1
- /// <reference types="react" />
2
- declare const CustomButtonComponent: ({ type, text, size, fluid, color, resolution, width, onClick, disabled, forwardedRef, ...props }: {
3
- [x: string]: any;
4
- type: any;
5
- text: any;
6
- size: any;
7
- fluid: any;
8
- color: any;
9
- resolution: any;
10
- width: any;
11
- onClick: any;
12
- disabled: any;
13
- forwardedRef?: null | undefined;
14
- }) => JSX.Element;
1
+ import * as React from 'react';
2
+ import { CustomButtonProps } from "./CustomButtonProps";
3
+ declare const CustomButtonComponent: React.FunctionComponent<CustomButtonProps>;
15
4
  export default CustomButtonComponent;
@@ -0,0 +1,11 @@
1
+ import { Ref, MouseEventHandler } from "react";
2
+ export interface CustomButtonProps {
3
+ text?: string;
4
+ type?: string;
5
+ size?: string;
6
+ color?: string;
7
+ fluid?: boolean;
8
+ disabled?: boolean;
9
+ onClick?: MouseEventHandler<HTMLButtonElement>;
10
+ forwardedRef?: Ref<HTMLButtonElement>;
11
+ }
@@ -1,11 +1,4 @@
1
- /// <reference types="react" />
2
- export default function IconButtonComponent({ text, type, icon, color, fluid, onClick, forwardedRef, ...props }: {
3
- [x: string]: any;
4
- text: any;
5
- type: any;
6
- icon: any;
7
- color: any;
8
- fluid: any;
9
- onClick: any;
10
- forwardedRef?: null | undefined;
11
- }): JSX.Element;
1
+ import * as React from 'react';
2
+ import { IconButtonProps } from "./IconButtonProps";
3
+ declare const IconButtonComponent: React.FunctionComponent<IconButtonProps>;
4
+ export default IconButtonComponent;
@@ -0,0 +1,10 @@
1
+ import { Ref, MouseEventHandler } from "react";
2
+ export interface IconButtonProps {
3
+ text?: string;
4
+ type?: string;
5
+ icon: string;
6
+ color?: string;
7
+ fluid?: boolean;
8
+ onClick?: MouseEventHandler<HTMLButtonElement>;
9
+ forwardedRef?: Ref<HTMLButtonElement>;
10
+ }
@@ -1,11 +1,4 @@
1
- /// <reference types="react" />
2
- declare const CheckboxComponent: ({ disabled, label, checked, onChange, indeterminate, forwardedRef, ...props }: {
3
- [x: string]: any;
4
- disabled: any;
5
- label: any;
6
- checked: any;
7
- onChange: any;
8
- indeterminate: any;
9
- forwardedRef?: null | undefined;
10
- }) => JSX.Element;
1
+ import * as React from 'react';
2
+ import { CheckboxProps } from "./CheckboxProps";
3
+ declare const CheckboxComponent: React.FunctionComponent<CheckboxProps>;
11
4
  export default CheckboxComponent;
@@ -0,0 +1,9 @@
1
+ import { Ref, ChangeEvent } from "react";
2
+ export interface CheckboxProps {
3
+ disabled?: boolean;
4
+ label?: string;
5
+ indeterminate?: boolean;
6
+ onChange: (event: ChangeEvent<HTMLInputElement>, checked: boolean) => void;
7
+ forwardedRef?: Ref<HTMLInputElement>;
8
+ checked?: boolean;
9
+ }
@@ -1,9 +1,4 @@
1
- /// <reference types="react" />
2
- declare const Icon: ({ iconName, color, size, forwardedRef, ...rest }: {
3
- [x: string]: any;
4
- iconName?: string | undefined;
5
- color?: string | undefined;
6
- size?: string | undefined;
7
- forwardedRef?: null | undefined;
8
- }) => JSX.Element;
1
+ import React from 'react';
2
+ import { IconProps } from "./IconProps";
3
+ declare const Icon: React.FunctionComponent<IconProps>;
9
4
  export default Icon;
@@ -0,0 +1,9 @@
1
+ import { ForwardedRef, MouseEventHandler } from "react";
2
+ export interface IconProps {
3
+ iconName: string;
4
+ color?: string;
5
+ size?: string;
6
+ style?: object;
7
+ forwardedRef?: ForwardedRef<any>;
8
+ onClick?: MouseEventHandler<HTMLDivElement>;
9
+ }
@@ -1,7 +1,6 @@
1
- /// <reference types="react" />
2
- declare const Logo: ({ logoName, color, ...props }: {
3
- [x: string]: any;
4
- logoName: any;
5
- color: any;
6
- }) => JSX.Element;
1
+ import React from 'react';
2
+ declare const Logo: React.FunctionComponent<{
3
+ logoName: string;
4
+ color?: string;
5
+ }>;
7
6
  export default Logo;
package/dist/index.d.ts CHANGED
@@ -1,7 +1,6 @@
1
1
  /// <reference types="react" />
2
- import propTypes from 'prop-types';
3
2
  import * as React from 'react';
4
- import { Ref, ChangeEventHandler, RefObject } from 'react';
3
+ import React__default, { MouseEventHandler, Ref, ForwardedRef, ChangeEvent, SetStateAction, ChangeEventHandler, RefObject } from 'react';
5
4
 
6
5
  declare const AppTileComponent: ({ header, description, illustrationName, forwardedRef, isBigType, size, color }: {
7
6
  header: any;
@@ -20,30 +19,30 @@ declare const TypographyComponent: ({ text, type, forwardedRef, ...props }: {
20
19
  forwardedRef?: null | undefined;
21
20
  }) => JSX.Element;
22
21
 
23
- declare const CustomButtonComponent: ({ type, text, size, fluid, color, resolution, width, onClick, disabled, forwardedRef, ...props }: {
24
- [x: string]: any;
25
- type: any;
26
- text: any;
27
- size: any;
28
- fluid: any;
29
- color: any;
30
- resolution: any;
31
- width: any;
32
- onClick: any;
33
- disabled: any;
34
- forwardedRef?: null | undefined;
35
- }) => JSX.Element;
22
+ interface CustomButtonProps {
23
+ text?: string;
24
+ type?: string;
25
+ size?: string;
26
+ color?: string;
27
+ fluid?: boolean;
28
+ disabled?: boolean;
29
+ onClick?: MouseEventHandler<HTMLButtonElement>;
30
+ forwardedRef?: Ref<HTMLButtonElement>;
31
+ }
36
32
 
37
- declare function IconButtonComponent({ text, type, icon, color, fluid, onClick, forwardedRef, ...props }: {
38
- [x: string]: any;
39
- text: any;
40
- type: any;
41
- icon: any;
42
- color: any;
43
- fluid: any;
44
- onClick: any;
45
- forwardedRef?: null | undefined;
46
- }): JSX.Element;
33
+ declare const CustomButtonComponent: React.FunctionComponent<CustomButtonProps>;
34
+
35
+ interface IconButtonProps {
36
+ text?: string;
37
+ type?: string;
38
+ icon: string;
39
+ color?: string;
40
+ fluid?: boolean;
41
+ onClick?: MouseEventHandler<HTMLButtonElement>;
42
+ forwardedRef?: Ref<HTMLButtonElement>;
43
+ }
44
+
45
+ declare const IconButtonComponent: React.FunctionComponent<IconButtonProps>;
47
46
 
48
47
  declare const Illustration: ({ illustrationName, color, size, isBigType }: {
49
48
  illustrationName: any;
@@ -52,56 +51,61 @@ declare const Illustration: ({ illustrationName, color, size, isBigType }: {
52
51
  isBigType: any;
53
52
  }) => JSX.Element;
54
53
 
55
- declare const Icon: ({ iconName, color, size, forwardedRef, ...rest }: {
56
- [x: string]: any;
57
- iconName?: string | undefined;
58
- color?: string | undefined;
59
- size?: string | undefined;
60
- forwardedRef?: null | undefined;
61
- }) => JSX.Element;
54
+ interface IconProps {
55
+ iconName: string;
56
+ color?: string;
57
+ size?: string;
58
+ style?: object;
59
+ forwardedRef?: ForwardedRef<any>;
60
+ onClick?: MouseEventHandler<HTMLDivElement>;
61
+ }
62
62
 
63
- declare const Logo: ({ logoName, color, ...props }: {
64
- [x: string]: any;
65
- logoName: any;
66
- color: any;
67
- }) => JSX.Element;
63
+ declare const Icon: React__default.FunctionComponent<IconProps>;
68
64
 
69
- declare const BottomBarComponent: ({ buttons, ...props }: {
70
- [x: string]: any;
71
- buttons: any;
72
- }) => JSX.Element;
65
+ declare const Logo: React__default.FunctionComponent<{
66
+ logoName: string;
67
+ color?: string;
68
+ }>;
73
69
 
74
- declare const BottomInfoBar: {
75
- ({ noLogo, leftText, rightText, onRightTextClick }: {
76
- noLogo?: boolean | undefined;
77
- leftText?: string | undefined;
78
- rightText?: string | undefined;
79
- onRightTextClick: any;
80
- }): JSX.Element;
81
- propTypes: {
82
- noLogo: propTypes.Requireable<boolean>;
83
- leftText: propTypes.Requireable<string>;
84
- rightText: propTypes.Requireable<string>;
85
- onRightTextClick: propTypes.Requireable<(...args: any[]) => any>;
86
- };
87
- };
88
-
89
- declare const CheckboxComponent: ({ disabled, label, checked, onChange, indeterminate, forwardedRef, ...props }: {
90
- [x: string]: any;
91
- disabled: any;
92
- label: any;
93
- checked: any;
94
- onChange: any;
95
- indeterminate: any;
96
- forwardedRef?: null | undefined;
97
- }) => JSX.Element;
70
+ interface ItemProps {
71
+ disabled?: boolean;
72
+ fluid?: boolean;
73
+ onClick?: MouseEventHandler<HTMLButtonElement>;
74
+ type?: string;
75
+ text?: string;
76
+ color?: string;
77
+ size?: string;
78
+ }
79
+ declare const BottomBarComponent: React__default.FunctionComponent<{
80
+ buttons: ItemProps[];
81
+ }>;
82
+
83
+ interface BottomInfoBarProps {
84
+ leftText?: string;
85
+ rightText?: string;
86
+ noLogo?: boolean;
87
+ onRightTextClick?: MouseEventHandler<HTMLButtonElement>;
88
+ }
89
+
90
+ declare const BottomInfoBar: React.FunctionComponent<BottomInfoBarProps>;
91
+
92
+ interface CheckboxProps {
93
+ disabled?: boolean;
94
+ label?: string;
95
+ indeterminate?: boolean;
96
+ onChange: (event: ChangeEvent<HTMLInputElement>, checked: boolean) => void;
97
+ forwardedRef?: Ref<HTMLInputElement>;
98
+ checked?: boolean;
99
+ }
100
+
101
+ declare const CheckboxComponent: React.FunctionComponent<CheckboxProps>;
98
102
 
99
103
  interface DatePickerProps {
100
104
  value: string;
101
105
  disabled?: boolean;
102
106
  label?: string;
103
107
  fluid?: boolean;
104
- onChange: (value: unknown, keyboardInputValue?: string) => void;
108
+ onChange: (value: SetStateAction<string>, keyboardInputValue?: string) => void;
105
109
  forwardedRef?: Ref<HTMLInputElement>;
106
110
  endAdornment?: string;
107
111
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xelto.npm/xc2-lib",
3
- "version": "0.0.44",
3
+ "version": "0.0.46",
4
4
  "author": "XELTO",
5
5
  "description": "React component library based on MUI",
6
6
  "license": "ISC",
@@ -11,8 +11,8 @@
11
11
  "build": "react-scripts build",
12
12
  "test": "react-scripts test",
13
13
  "eject": "react-scripts eject",
14
- "storybook": "start-storybook -p 6006 -s ./src",
15
- "build-storybook": "build-storybook -s ./src"
14
+ "storybook": "start-storybook -p 6006 ",
15
+ "build-storybook": "build-storybook "
16
16
  },
17
17
  "eslintConfig": {
18
18
  "extends": [