techsbcn-storybook 0.12.0 → 0.12.4
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/components/fields/ButtonComponent/ButtonComponent.d.ts +1 -0
- package/dist/components/fields/TextSimpleComponent/TextSimpleComponent.d.ts +1 -0
- package/dist/components/tables/SimpleTableComponent/SimpleTableComponent.d.ts +18 -1
- package/dist/components/tables/TableComponent/TableComponent.d.ts +18 -1
- package/dist/components/wrappers/LinearProgressComponent/LinearProgressComponent.d.ts +3 -0
- package/dist/components/wrappers/MainWrapperComponent/MainWrapperComponent.d.ts +1 -0
- package/dist/data/SelectMock.d.ts +2 -2
- package/dist/data/UserList.d.ts +1 -0
- package/dist/data/_globalization/es.d.ts +7 -0
- package/dist/data/enums/ActiveStatus.d.ts +4 -0
- package/dist/data/index.d.ts +1 -0
- package/dist/index.d.ts +2 -0
- package/dist/stories/button/Button.stories.d.ts +2 -0
- package/dist/techsbcn-storybook.cjs.development.js +516 -105
- package/dist/techsbcn-storybook.cjs.development.js.map +1 -1
- package/dist/techsbcn-storybook.cjs.production.min.js +1 -1
- package/dist/techsbcn-storybook.cjs.production.min.js.map +1 -1
- package/dist/techsbcn-storybook.esm.js +517 -108
- package/dist/techsbcn-storybook.esm.js.map +1 -1
- package/package.json +2 -1
- package/src/components/fields/ButtonComponent/ButtonComponent.scss +8 -2
- package/src/components/fields/ButtonComponent/ButtonComponent.tsx +9 -2
- package/src/components/fields/SelectFieldComponent/SelectAsyncField.tsx +4 -3
- package/src/components/fields/TextSimpleComponent/TextSimpleComponent.scss +3 -0
- package/src/components/fields/TextSimpleComponent/TextSimpleComponent.tsx +4 -3
- package/src/components/tables/SimpleTableComponent/SimpleTableComponent.tsx +97 -3
- package/src/components/tables/TableComponent/TableComponent.tsx +105 -4
- package/src/components/wrappers/LinearProgressComponent/LinearProgressComponent.scss +17 -0
- package/src/components/wrappers/LinearProgressComponent/LinearProgressComponent.tsx +12 -0
- package/src/components/wrappers/MainWrapperComponent/MainWrapperComponent.tsx +32 -27
- package/src/data/SelectMock.tsx +2 -2
- package/src/data/UserList.tsx +7 -0
- package/src/data/Values.tsx +7 -0
- package/src/data/_globalization/es.js +7 -0
- package/src/data/enums/ActiveStatus.tsx +4 -0
- package/src/data/index.ts +1 -0
- package/src/index.tsx +2 -0
- package/src/stories/Fields/Fields.stories.tsx +5 -0
- package/src/stories/MainWrapper/MainWrapper.stories.tsx +8 -0
- package/src/stories/Tables/Tables.stories.tsx +137 -48
- package/src/stories/button/Button.stories.tsx +13 -1
- package/src/styles/Globals.scss +21 -0
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { ObjectKey } from '../../../interfaces';
|
|
3
3
|
import './SimpleTableComponent.scss';
|
|
4
|
+
import { InputType } from '../../fields/TextFieldComponent/TextFieldComponent';
|
|
4
5
|
interface SimpleTableComponentProps {
|
|
5
6
|
rows: any[];
|
|
6
7
|
values: ObjectKey;
|
|
@@ -29,9 +30,10 @@ interface ColumnProps {
|
|
|
29
30
|
isUnique?: boolean;
|
|
30
31
|
isDate?: boolean;
|
|
31
32
|
enumColumn?: {
|
|
32
|
-
isEnum
|
|
33
|
+
isEnum: boolean;
|
|
33
34
|
enumType?: any;
|
|
34
35
|
hasColor?: boolean;
|
|
36
|
+
enumSuffix?: string;
|
|
35
37
|
};
|
|
36
38
|
isCheck?: boolean;
|
|
37
39
|
isPrice?: boolean;
|
|
@@ -47,11 +49,26 @@ interface ColumnProps {
|
|
|
47
49
|
disabledIcon: any;
|
|
48
50
|
onClickId: (id: number) => void;
|
|
49
51
|
};
|
|
52
|
+
isEditableTableCell?: EditableCellProps;
|
|
53
|
+
isBoolean?: {
|
|
54
|
+
enumType?: any;
|
|
55
|
+
hasColor?: boolean;
|
|
56
|
+
enumSuffix?: string;
|
|
57
|
+
};
|
|
50
58
|
}
|
|
51
59
|
interface ActionProps {
|
|
52
60
|
children: React.ReactNode;
|
|
53
61
|
onClick?: (row: any) => void;
|
|
54
62
|
onClickId?: (id: number) => void;
|
|
55
63
|
}
|
|
64
|
+
interface EditableCellProps {
|
|
65
|
+
isTextField?: {
|
|
66
|
+
type?: InputType;
|
|
67
|
+
onCellValueChange: (data: any) => void;
|
|
68
|
+
};
|
|
69
|
+
isSelectField?: {
|
|
70
|
+
onCellValueChange: (data: any) => void;
|
|
71
|
+
};
|
|
72
|
+
}
|
|
56
73
|
export declare const SimpleTableComponent: React.FunctionComponent<SimpleTableComponentProps>;
|
|
57
74
|
export {};
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { SearchFilters, ObjectKey } from '../../../interfaces';
|
|
3
3
|
import './TableComponent.scss';
|
|
4
|
+
import { InputType } from '../../fields/TextFieldComponent/TextFieldComponent';
|
|
4
5
|
interface TableComponentProps {
|
|
5
6
|
rows: any[];
|
|
6
7
|
values: ObjectKey;
|
|
@@ -31,9 +32,10 @@ interface ColumnProps {
|
|
|
31
32
|
isUnique?: boolean;
|
|
32
33
|
isDate?: boolean;
|
|
33
34
|
enumColumn?: {
|
|
34
|
-
isEnum
|
|
35
|
+
isEnum: boolean;
|
|
35
36
|
enumType?: any;
|
|
36
37
|
hasColor?: boolean;
|
|
38
|
+
enumSuffix?: string;
|
|
37
39
|
};
|
|
38
40
|
isCheck?: boolean;
|
|
39
41
|
noSort?: boolean;
|
|
@@ -50,11 +52,26 @@ interface ColumnProps {
|
|
|
50
52
|
disabledIcon: any;
|
|
51
53
|
onClickId: (id: number) => void;
|
|
52
54
|
};
|
|
55
|
+
isEditableTableCell?: EditableCellProps;
|
|
56
|
+
isBoolean?: {
|
|
57
|
+
enumType?: any;
|
|
58
|
+
hasColor?: boolean;
|
|
59
|
+
enumSuffix?: string;
|
|
60
|
+
};
|
|
53
61
|
}
|
|
54
62
|
interface ActionProps {
|
|
55
63
|
children: React.ReactNode;
|
|
56
64
|
onClick?: (row: any) => void;
|
|
57
65
|
onClickId?: (id: number) => void;
|
|
58
66
|
}
|
|
67
|
+
interface EditableCellProps {
|
|
68
|
+
isTextField?: {
|
|
69
|
+
type?: InputType;
|
|
70
|
+
onCellValueChange: (data: any) => void;
|
|
71
|
+
};
|
|
72
|
+
isSelectField?: {
|
|
73
|
+
onCellValueChange: (data: any) => void;
|
|
74
|
+
};
|
|
75
|
+
}
|
|
59
76
|
export declare const TableComponent: React.FunctionComponent<TableComponentProps>;
|
|
60
77
|
export {};
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { SearchFilters, SearchSimpleResult
|
|
1
|
+
import { SearchFilters, SearchSimpleResult } from '../interfaces';
|
|
2
2
|
interface ColourOption {
|
|
3
3
|
readonly value: string;
|
|
4
4
|
readonly label: string;
|
|
5
5
|
}
|
|
6
6
|
export declare const colourOptions: ColourOption[];
|
|
7
7
|
export declare const ResponseHandler: (response: any) => any;
|
|
8
|
-
export declare const SearchSimple: (_filters: SearchFilters) => Promise<
|
|
8
|
+
export declare const SearchSimple: (_filters: SearchFilters) => Promise<SearchSimpleResult[]>;
|
|
9
9
|
export {};
|
package/dist/data/UserList.d.ts
CHANGED
|
@@ -110,5 +110,12 @@ declare var _default: {
|
|
|
110
110
|
image: string;
|
|
111
111
|
skills: string;
|
|
112
112
|
information: string;
|
|
113
|
+
enable: string;
|
|
114
|
+
disable: string;
|
|
115
|
+
enable_suffix: string;
|
|
116
|
+
disable_suffix: string;
|
|
117
|
+
boolean: string;
|
|
118
|
+
true_suffix: string;
|
|
119
|
+
false_suffix: string;
|
|
113
120
|
};
|
|
114
121
|
export default _default;
|
package/dist/data/index.d.ts
CHANGED
package/dist/index.d.ts
CHANGED
|
@@ -2,6 +2,7 @@ export * from './components/wrappers/PublicFormWrapper/PublicFormWrapper';
|
|
|
2
2
|
export * from './components/wrappers/MainWrapperComponent/MainWrapperComponent';
|
|
3
3
|
export * from './components/tables/SearchComponent/SearchComponent';
|
|
4
4
|
export * from './components/tables/TableComponent/TableComponent';
|
|
5
|
+
export * from './components/tables/SimpleTableComponent/SimpleTableComponent';
|
|
5
6
|
export * from './components/layouts/MainLayoutSimple/MainLayoutSimple';
|
|
6
7
|
export * from './components/navigation/VerticalNav/VerticalNav';
|
|
7
8
|
export * from './components/navigation/components/UserInfo';
|
|
@@ -18,3 +19,4 @@ export * from './components/forms/ChangePasswordForm';
|
|
|
18
19
|
export * from './components/forms/ResetPasswordForm';
|
|
19
20
|
export * from './components/modals/ModalComponent';
|
|
20
21
|
export * from './components/wrappers/TabsComponent/TabsComponent';
|
|
22
|
+
export * from './components/wrappers/LinearProgressComponent/LinearProgressComponent';
|
|
@@ -2,6 +2,8 @@ import { Meta, Story } from '@storybook/react';
|
|
|
2
2
|
declare const meta: Meta;
|
|
3
3
|
export default meta;
|
|
4
4
|
export declare const Default: Story<import("@storybook/react").Args>;
|
|
5
|
+
export declare const ReverseColor: Story<import("@storybook/react").Args>;
|
|
6
|
+
export declare const ReverseColorLoading: Story<import("@storybook/react").Args>;
|
|
5
7
|
export declare const LoginButton: Story<import("@storybook/react").Args>;
|
|
6
8
|
export declare const ModalCancel: Story<import("@storybook/react").Args>;
|
|
7
9
|
export declare const Loading: Story<import("@storybook/react").Args>;
|