techsbcn-storybook 0.11.2 → 0.12.3

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 (35) hide show
  1. package/dist/components/fields/ButtonComponent/ButtonComponent.d.ts +1 -0
  2. package/dist/components/fields/TextSimpleComponent/TextSimpleComponent.d.ts +1 -0
  3. package/dist/components/tables/SimpleTableComponent/SimpleTableComponent.d.ts +74 -0
  4. package/dist/components/tables/TableComponent/TableComponent.d.ts +18 -1
  5. package/dist/data/UserList.d.ts +1 -0
  6. package/dist/data/_globalization/es.d.ts +7 -0
  7. package/dist/data/enums/ActiveStatus.d.ts +4 -0
  8. package/dist/data/index.d.ts +1 -0
  9. package/dist/index.d.ts +1 -0
  10. package/dist/stories/Tables/Tables.stories.d.ts +2 -1
  11. package/dist/stories/button/Button.stories.d.ts +2 -0
  12. package/dist/techsbcn-storybook.cjs.development.js +493 -96
  13. package/dist/techsbcn-storybook.cjs.development.js.map +1 -1
  14. package/dist/techsbcn-storybook.cjs.production.min.js +1 -1
  15. package/dist/techsbcn-storybook.cjs.production.min.js.map +1 -1
  16. package/dist/techsbcn-storybook.esm.js +494 -98
  17. package/dist/techsbcn-storybook.esm.js.map +1 -1
  18. package/package.json +2 -1
  19. package/src/components/fields/ButtonComponent/ButtonComponent.scss +8 -2
  20. package/src/components/fields/ButtonComponent/ButtonComponent.tsx +9 -2
  21. package/src/components/fields/TextSimpleComponent/TextSimpleComponent.scss +3 -0
  22. package/src/components/fields/TextSimpleComponent/TextSimpleComponent.tsx +4 -3
  23. package/src/components/tables/SimpleTableComponent/SimpleTableComponent.scss +131 -0
  24. package/src/components/tables/SimpleTableComponent/SimpleTableComponent.tsx +462 -0
  25. package/src/components/tables/TableComponent/TableComponent.tsx +105 -4
  26. package/src/data/UserList.tsx +7 -0
  27. package/src/data/Values.tsx +7 -0
  28. package/src/data/_globalization/es.js +7 -0
  29. package/src/data/enums/ActiveStatus.tsx +4 -0
  30. package/src/data/index.ts +1 -0
  31. package/src/index.tsx +1 -0
  32. package/src/stories/Fields/Fields.stories.tsx +5 -0
  33. package/src/stories/Tables/Tables.stories.tsx +170 -14
  34. package/src/stories/button/Button.stories.tsx +13 -1
  35. package/src/styles/Globals.scss +18 -0
@@ -11,5 +11,6 @@ export interface ButtonComponentProps {
11
11
  type?: 'button' | 'submit' | 'reset';
12
12
  disabled?: boolean;
13
13
  component?: any;
14
+ reverseColors?: boolean;
14
15
  }
15
16
  export declare const ButtonComponent: React.FC<ButtonComponentProps>;
@@ -10,6 +10,7 @@ interface TextSimpleComponentProps {
10
10
  helperText?: string;
11
11
  noBorders?: boolean;
12
12
  fullWidth?: boolean;
13
+ noMargin?: boolean;
13
14
  }
14
15
  export declare const TextSimpleComponent: React.FC<TextSimpleComponentProps>;
15
16
  export {};
@@ -0,0 +1,74 @@
1
+ import React from 'react';
2
+ import { ObjectKey } from '../../../interfaces';
3
+ import './SimpleTableComponent.scss';
4
+ import { InputType } from '../../fields/TextFieldComponent/TextFieldComponent';
5
+ interface SimpleTableComponentProps {
6
+ rows: any[];
7
+ values: ObjectKey;
8
+ className?: string;
9
+ columns: ColumnProps[];
10
+ rowsColorColumn?: {
11
+ columnName: string;
12
+ columnValue: string;
13
+ };
14
+ loading?: boolean;
15
+ onClickRow?: (id: number) => void;
16
+ isCheckTable?: {
17
+ rowsChecked?: number[];
18
+ onCheckedAction?: (ids: number[]) => void;
19
+ onCheckedSingleAction?: (id: number) => void;
20
+ };
21
+ }
22
+ interface ColumnProps {
23
+ id?: string;
24
+ label?: string;
25
+ minWidth?: number;
26
+ maxWidth?: number;
27
+ align?: 'inherit' | 'left' | 'center' | 'right' | 'justify';
28
+ alignCell?: 'inherit' | 'left' | 'center' | 'right' | 'justify';
29
+ action?: ActionProps[];
30
+ isUnique?: boolean;
31
+ isDate?: boolean;
32
+ enumColumn?: {
33
+ isEnum: boolean;
34
+ enumType?: any;
35
+ hasColor?: boolean;
36
+ enumSuffix?: string;
37
+ };
38
+ isCheck?: boolean;
39
+ isPrice?: boolean;
40
+ isImage?: {
41
+ isUrl?: boolean;
42
+ isGuid?: {
43
+ guid: boolean;
44
+ action: (guid: string) => string;
45
+ };
46
+ };
47
+ isActiveFunction?: {
48
+ activeIcon: any;
49
+ disabledIcon: any;
50
+ onClickId: (id: number) => void;
51
+ };
52
+ isEditableTableCell?: EditableCellProps;
53
+ isBoolean?: {
54
+ enumType?: any;
55
+ hasColor?: boolean;
56
+ enumSuffix?: string;
57
+ };
58
+ }
59
+ interface ActionProps {
60
+ children: React.ReactNode;
61
+ onClick?: (row: any) => void;
62
+ onClickId?: (id: number) => void;
63
+ }
64
+ interface EditableCellProps {
65
+ isTextField?: {
66
+ type?: InputType;
67
+ onCellValueChange: (data: any) => void;
68
+ };
69
+ isSelectField?: {
70
+ onCellValueChange: (data: any) => void;
71
+ };
72
+ }
73
+ export declare const SimpleTableComponent: React.FunctionComponent<SimpleTableComponentProps>;
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?: boolean;
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 {};
@@ -11,6 +11,7 @@ interface UserList {
11
11
  charge: number;
12
12
  topic: string;
13
13
  extraInfo?: BasicEntity;
14
+ active: boolean;
14
15
  }
15
16
  export declare const UserList: UserList[];
16
17
  export {};
@@ -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;
@@ -0,0 +1,4 @@
1
+ export declare enum ActiveStatus {
2
+ true = "ENABLE",
3
+ false = "DISABLE"
4
+ }
@@ -2,3 +2,4 @@ export * from './SelectMock';
2
2
  export * from './UserList';
3
3
  export * from './Values';
4
4
  export * from './enums/scopes';
5
+ export * from './enums/ActiveStatus';
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';
@@ -1,4 +1,5 @@
1
1
  import { Meta, Story } from '@storybook/react';
2
2
  declare const meta: Meta;
3
3
  export default meta;
4
- export declare const TableSimple: Story;
4
+ export declare const Table: Story;
5
+ export declare const SimpleTable: Story;
@@ -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>;