@xelto.npm/xc2-lib 0.0.45 → 0.0.47

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 (40) hide show
  1. package/dist/cjs/index.js +227 -38
  2. package/dist/cjs/index.js.map +1 -1
  3. package/dist/cjs/types/components/Inputs/select/Select.d.ts +4 -0
  4. package/dist/cjs/types/components/Inputs/select/SelectProps.d.ts +18 -0
  5. package/dist/cjs/types/components/Inputs/select/index.d.ts +1 -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/cjs/types/components/index.d.ts +1 -0
  20. package/dist/esm/index.js +227 -39
  21. package/dist/esm/index.js.map +1 -1
  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/select/index.d.ts +1 -0
  25. package/dist/esm/types/components/Inputs/textfield/TextField.d.ts +5 -1
  26. package/dist/esm/types/components/bottomBar/BottomBarComponent.d.ts +13 -5
  27. package/dist/esm/types/components/bottomInfoBar/BottomInfoBar.d.ts +3 -16
  28. package/dist/esm/types/components/bottomInfoBar/BottomInfoBarProps.d.ts +7 -0
  29. package/dist/esm/types/components/buttons/customButton/CustomButtonComponent.d.ts +3 -14
  30. package/dist/esm/types/components/buttons/customButton/CustomButtonProps.d.ts +11 -0
  31. package/dist/esm/types/components/buttons/iconButton/IconButtonComponent.d.ts +4 -11
  32. package/dist/esm/types/components/buttons/iconButton/IconButtonProps.d.ts +10 -0
  33. package/dist/esm/types/components/checkbox/CheckboxComponent.d.ts +3 -10
  34. package/dist/esm/types/components/checkbox/CheckboxProps.d.ts +9 -0
  35. package/dist/esm/types/components/foundations/icon/Icon.d.ts +3 -8
  36. package/dist/esm/types/components/foundations/icon/IconProps.d.ts +9 -0
  37. package/dist/esm/types/components/foundations/logo/Logo.d.ts +5 -6
  38. package/dist/esm/types/components/index.d.ts +1 -0
  39. package/dist/index.d.ts +90 -66
  40. package/package.json +3 -3
@@ -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
+ }
@@ -0,0 +1 @@
1
+ export { default } from './Select';
@@ -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;
@@ -10,3 +10,4 @@ export { default as BottomInfoBar } from "./bottomInfoBar";
10
10
  export { default as Checkbox } from "./checkbox";
11
11
  export { default as DatePicker } from "./Inputs/datepicker";
12
12
  export { default as TextField } from "./Inputs/textfield";
13
+ export { default as Select } from "./Inputs/select";
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 { SetStateAction, 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,49 +51,54 @@ 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;
@@ -128,4 +132,24 @@ interface TextFieldProps {
128
132
 
129
133
  declare const TextField: React.FunctionComponent<TextFieldProps>;
130
134
 
131
- export { AppTileComponent as AppTile, BottomBarComponent as BottomBar, BottomInfoBar, CustomButtonComponent as Button, CheckboxComponent as Checkbox, DatePicker, Icon, IconButtonComponent as IconButton, Illustration, Logo, TextField, TypographyComponent as Typography };
135
+ interface SelectProps {
136
+ disabled?: boolean;
137
+ fluid?: boolean;
138
+ label?: string;
139
+ options?: {
140
+ label: string;
141
+ }[];
142
+ withRefresh?: boolean;
143
+ value?: object;
144
+ noOptionsText?: string;
145
+ placeholder?: string;
146
+ onChange?: ChangeEventHandler<HTMLTextAreaElement | HTMLInputElement>;
147
+ onBlur?: ChangeEventHandler<HTMLTextAreaElement | HTMLInputElement>;
148
+ forwardedRef?: (instance: HTMLDivElement | null) => void | RefObject<HTMLDivElement> | null;
149
+ onRefreshClick?: void;
150
+ endAdornment?: string;
151
+ }
152
+
153
+ declare const Select: React.FunctionComponent<SelectProps>;
154
+
155
+ export { AppTileComponent as AppTile, BottomBarComponent as BottomBar, BottomInfoBar, CustomButtonComponent as Button, CheckboxComponent as Checkbox, DatePicker, Icon, IconButtonComponent as IconButton, Illustration, Logo, Select, TextField, TypographyComponent as Typography };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xelto.npm/xc2-lib",
3
- "version": "0.0.45",
3
+ "version": "0.0.47",
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": [