techsbcn-storybook 0.1.7 → 0.3.0

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 (67) hide show
  1. package/dist/components/fields/ButtonComponent/ButtonComponent.d.ts +14 -0
  2. package/dist/components/fields/TextFieldComponent/TextFieldComponent.d.ts +32 -0
  3. package/dist/components/forms/ChangePasswordForm.d.ts +20 -0
  4. package/dist/components/forms/LoginForm.d.ts +20 -0
  5. package/dist/components/forms/ResetPasswordForm.d.ts +17 -0
  6. package/dist/components/layouts/MainLayoutSimple/MainLayoutSimple.d.ts +8 -0
  7. package/dist/components/modals/ModalComponent.d.ts +17 -0
  8. package/dist/components/navigation/DrawerLayout/AppSidebar/AppSidebar.d.ts +8 -0
  9. package/dist/components/navigation/VerticalNav/VerticalNav.d.ts +20 -0
  10. package/dist/components/navigation/VerticalNav/VerticalNavItem.d.ts +8 -0
  11. package/dist/components/navigation/VerticalNav/VerticalNavItemCollapse.d.ts +8 -0
  12. package/dist/components/navigation/components/UserInfo.d.ts +6 -0
  13. package/dist/components/tables/SearchComponent.d.ts +21 -0
  14. package/dist/components/wrappers/PublicFormWrapper/PublicFormWrapper.d.ts +7 -0
  15. package/dist/helpers/CheckPermission.d.ts +1 -0
  16. package/dist/helpers/GroupBy.d.ts +1 -0
  17. package/dist/helpers/index.d.ts +2 -0
  18. package/dist/index.d.ts +10 -2
  19. package/dist/stories/Layouts/MainLayoutSimple.stories.d.ts +5 -0
  20. package/dist/stories/{thing/Thing.stories.d.ts → Modal/Modal.stories.d.ts} +1 -2
  21. package/dist/stories/button/Button.stories.d.ts +4 -4
  22. package/dist/techsbcn-storybook.cjs.development.js +638 -16
  23. package/dist/techsbcn-storybook.cjs.development.js.map +1 -1
  24. package/dist/techsbcn-storybook.cjs.production.min.js +1 -1
  25. package/dist/techsbcn-storybook.cjs.production.min.js.map +1 -1
  26. package/dist/techsbcn-storybook.esm.js +630 -15
  27. package/dist/techsbcn-storybook.esm.js.map +1 -1
  28. package/package.json +86 -27
  29. package/src/components/fields/ButtonComponent/ButtonComponent.scss +27 -0
  30. package/src/components/fields/ButtonComponent/ButtonComponent.tsx +32 -0
  31. package/src/components/fields/TextFieldComponent/TextFieldComponent.scss +37 -0
  32. package/src/components/fields/TextFieldComponent/TextFieldComponent.tsx +94 -0
  33. package/src/components/forms/ChangePasswordForm.tsx +126 -0
  34. package/src/components/forms/LoginForm.tsx +101 -0
  35. package/src/components/forms/ResetPasswordForm.tsx +65 -0
  36. package/src/components/layouts/MainLayoutSimple/MainLayoutSimple.scss +9 -0
  37. package/src/components/layouts/MainLayoutSimple/MainLayoutSimple.tsx +21 -0
  38. package/src/components/modals/ModalComponent.tsx +82 -0
  39. package/src/components/navigation/DrawerLayout/AppSidebar/AppSidebar.scss +7 -0
  40. package/src/components/navigation/DrawerLayout/AppSidebar/AppSidebar.tsx +27 -0
  41. package/src/components/navigation/VerticalNav/VerticalNav.scss +62 -0
  42. package/src/components/navigation/VerticalNav/VerticalNav.tsx +39 -0
  43. package/src/components/navigation/VerticalNav/VerticalNavItem.tsx +38 -0
  44. package/src/components/navigation/VerticalNav/VerticalNavItemCollapse.tsx +106 -0
  45. package/src/components/navigation/components/UserInfo.tsx +11 -0
  46. package/src/components/tables/SearchComponent.tsx +141 -0
  47. package/src/components/wrappers/PublicFormWrapper/PublicFormWrapper.scss +7 -0
  48. package/src/components/wrappers/PublicFormWrapper/PublicFormWrapper.tsx +25 -0
  49. package/src/content/fonts/feather.eot +0 -0
  50. package/src/content/fonts/feather.svg +759 -0
  51. package/src/content/fonts/feather.ttf +0 -0
  52. package/src/content/fonts/feather.woff +0 -0
  53. package/src/helpers/CheckPermission.tsx +11 -0
  54. package/src/helpers/GroupBy.tsx +6 -0
  55. package/src/helpers/index.tsx +2 -0
  56. package/src/index.tsx +10 -2
  57. package/src/stories/Layouts/MainLayoutSimple.stories.tsx +73 -0
  58. package/src/stories/Modal/Modal.stories.tsx +30 -0
  59. package/src/stories/button/Button.stories.tsx +20 -19
  60. package/src/styles/Globals.scss +73 -0
  61. package/dist/stories/button/Button.d.ts +0 -7
  62. package/dist/stories/thing/Thing.d.ts +0 -6
  63. package/src/stories/button/Button.scss +0 -11
  64. package/src/stories/button/Button.tsx +0 -12
  65. package/src/stories/thing/Thing.scss +0 -4
  66. package/src/stories/thing/Thing.stories.tsx +0 -26
  67. package/src/stories/thing/Thing.tsx +0 -11
@@ -0,0 +1,14 @@
1
+ import React from 'react';
2
+ import './ButtonComponent.scss';
3
+ export interface ButtonComponentProps {
4
+ className?: string;
5
+ label?: string;
6
+ startIcon?: React.ReactNode;
7
+ endIcon?: React.ReactNode;
8
+ onClick?: () => void;
9
+ loading?: boolean;
10
+ form?: string;
11
+ type?: 'button' | 'submit' | 'reset';
12
+ disabled?: boolean;
13
+ }
14
+ export declare const ButtonComponent: React.FC<ButtonComponentProps>;
@@ -0,0 +1,32 @@
1
+ import React from 'react';
2
+ import './TextFieldComponent.scss';
3
+ export declare type InputType = 'text' | 'radio' | 'checkbox' | 'textarea' | 'submit' | 'date' | 'hidden' | 'number' | 'range' | 'password' | 'time' | 'file';
4
+ interface TextFieldComponentProps {
5
+ id?: string;
6
+ label?: string;
7
+ name?: string;
8
+ value?: string | number;
9
+ className?: string;
10
+ type?: InputType;
11
+ placeholder?: string;
12
+ required?: boolean;
13
+ disabled?: boolean;
14
+ minNumber?: number;
15
+ maxNumber?: number;
16
+ error?: boolean;
17
+ startIcon?: React.ReactNode;
18
+ endIcon?: React.ReactNode;
19
+ fullWidth?: boolean;
20
+ helperText?: string;
21
+ textFieldRef?: any;
22
+ inputRef?: React.Ref<any>;
23
+ autoComplete?: string;
24
+ multiline?: boolean;
25
+ rows?: number;
26
+ maxLength?: number;
27
+ onChange?: (event: React.ChangeEvent<HTMLInputElement>) => void;
28
+ onKeyUp?: (event: React.KeyboardEvent<HTMLInputElement>) => void;
29
+ step?: number | string;
30
+ }
31
+ export declare const TextFieldComponent: React.FC<TextFieldComponentProps>;
32
+ export {};
@@ -0,0 +1,20 @@
1
+ import React from 'react';
2
+ interface ChangePasswordFormProps {
3
+ onClick: (data: any) => void;
4
+ loading: boolean;
5
+ topComponent?: React.ReactNode;
6
+ bottomComponent?: React.ReactNode;
7
+ requiredText: {
8
+ requiredTextPassword: string;
9
+ requiredTextSamePassword: string;
10
+ };
11
+ valuesText: {
12
+ buttonText: string;
13
+ text1: string;
14
+ placeholder1?: string;
15
+ text2: string;
16
+ placeholder2?: string;
17
+ };
18
+ }
19
+ export declare const ChangePasswordForm: React.FC<ChangePasswordFormProps>;
20
+ export {};
@@ -0,0 +1,20 @@
1
+ import React from 'react';
2
+ interface LoginFormProps {
3
+ onClick: (data: any) => void;
4
+ topComponent?: React.ReactNode;
5
+ bottomComponent?: React.ReactNode;
6
+ loading: boolean;
7
+ requiredText: {
8
+ requiredTextMail: string;
9
+ requiredTextPassword: string;
10
+ };
11
+ valuesText: {
12
+ buttonText: string;
13
+ text1: string;
14
+ placeholder1?: string;
15
+ text2: string;
16
+ placeholder2?: string;
17
+ };
18
+ }
19
+ export declare const LoginForm: React.FC<LoginFormProps>;
20
+ export {};
@@ -0,0 +1,17 @@
1
+ import React from 'react';
2
+ interface resetPasswordFormProps {
3
+ onClick: (data: any) => void;
4
+ loading: boolean;
5
+ topComponent?: React.ReactNode;
6
+ bottomComponent?: React.ReactNode;
7
+ requiredText: {
8
+ requiredTextMail: string;
9
+ };
10
+ valuesText: {
11
+ buttonText: string;
12
+ text: string;
13
+ placeholder?: string;
14
+ };
15
+ }
16
+ export declare const ResetPasswordForm: React.FC<resetPasswordFormProps>;
17
+ export {};
@@ -0,0 +1,8 @@
1
+ import React from 'react';
2
+ import './MainLayoutSimple.scss';
3
+ interface MainLayoutSimpleProps {
4
+ lateralComponent?: React.ReactNode;
5
+ mainComponent: any;
6
+ }
7
+ export declare const MainLayoutSimple: React.FC<MainLayoutSimpleProps>;
8
+ export {};
@@ -0,0 +1,17 @@
1
+ import React from 'react';
2
+ import { ButtonComponentProps } from '../fields/ButtonComponent/ButtonComponent';
3
+ interface ModalComponentProps {
4
+ idClass?: string;
5
+ setShow: boolean;
6
+ title?: string;
7
+ modalSize?: 'xs' | 'sm' | 'md' | 'lg' | 'xl' | false;
8
+ fullWidth?: boolean;
9
+ fullScreen?: boolean;
10
+ submitButton?: ButtonComponentProps;
11
+ cancelButton?: ButtonComponentProps;
12
+ loading?: boolean;
13
+ onHide: () => void;
14
+ dividers?: boolean;
15
+ }
16
+ export declare const ModalComponent: React.FC<ModalComponentProps>;
17
+ export {};
@@ -0,0 +1,8 @@
1
+ import React from 'react';
2
+ import './AppSidebar.scss';
3
+ interface AppSidebarProps {
4
+ onHide?: () => void;
5
+ open?: boolean;
6
+ }
7
+ export declare const AppSidebar: React.FC<AppSidebarProps>;
8
+ export {};
@@ -0,0 +1,20 @@
1
+ import React from 'react';
2
+ import './VerticalNav.scss';
3
+ export declare enum NavigationType {
4
+ Item = 0,
5
+ Collapse = 1
6
+ }
7
+ export interface NavigationProps {
8
+ id: string;
9
+ title?: string;
10
+ route?: string;
11
+ type?: NavigationType;
12
+ persmisionAvailable?: string | string[];
13
+ children?: NavigationProps[] | NavigationProps;
14
+ }
15
+ interface VerticalNavProps {
16
+ items: NavigationProps[];
17
+ userPermisions?: string[];
18
+ }
19
+ export declare const VerticalNav: React.FC<VerticalNavProps>;
20
+ export {};
@@ -0,0 +1,8 @@
1
+ import { NavigationProps } from './VerticalNav';
2
+ import React from 'react';
3
+ interface VerticalNavItemProps {
4
+ item: NavigationProps;
5
+ userPermisions?: string[];
6
+ }
7
+ declare const _default: React.NamedExoticComponent<VerticalNavItemProps>;
8
+ export default _default;
@@ -0,0 +1,8 @@
1
+ import React from 'react';
2
+ import { NavigationProps } from './VerticalNav';
3
+ interface VerticalNavItemCollapseProps {
4
+ item: NavigationProps;
5
+ userPermisions?: string[];
6
+ }
7
+ declare const _default: React.NamedExoticComponent<VerticalNavItemCollapseProps>;
8
+ export default _default;
@@ -0,0 +1,6 @@
1
+ import React from 'react';
2
+ interface UserInfoProps {
3
+ fool?: string;
4
+ }
5
+ declare const UserInfo: React.FC<UserInfoProps>;
6
+ export default UserInfo;
@@ -0,0 +1,21 @@
1
+ import React from 'react';
2
+ interface SearchComponentProps {
3
+ className?: string;
4
+ title?: string;
5
+ searchBar?: React.ReactNode;
6
+ actions?: {
7
+ children: any;
8
+ }[];
9
+ filters?: {
10
+ singleFilter?: any;
11
+ doubleFilter?: DoubleFilter;
12
+ }[];
13
+ }
14
+ interface DoubleFilter {
15
+ label?: string;
16
+ firstFilter: any;
17
+ secondFilter: any;
18
+ }
19
+ declare const DoubleFilter: (filters: DoubleFilter) => JSX.Element;
20
+ declare const SearchComponent: React.FC<SearchComponentProps>;
21
+ export default SearchComponent;
@@ -0,0 +1,7 @@
1
+ import React from 'react';
2
+ import './PublicFormWrapper.scss';
3
+ interface PublicFormWrapperProps {
4
+ className?: string;
5
+ }
6
+ export declare const PublicFormWrapper: React.FC<PublicFormWrapperProps>;
7
+ export {};
@@ -0,0 +1 @@
1
+ export declare const checkPermission: (persmisionAvailable?: any, userRoles?: any) => boolean;
@@ -0,0 +1 @@
1
+ export declare const GroupBy: (xs: any[], f: (arg0: any) => any) => any;
@@ -0,0 +1,2 @@
1
+ export * from './CheckPermission';
2
+ export * from './GroupBy';
package/dist/index.d.ts CHANGED
@@ -1,2 +1,10 @@
1
- export * from './stories/button/Button';
2
- export * from './stories/thing/Thing';
1
+ export * from './components/wrappers/PublicFormWrapper/PublicFormWrapper';
2
+ export * from './components/layouts/MainLayoutSimple/MainLayoutSimple';
3
+ export * from './components/navigation/VerticalNav/VerticalNav';
4
+ export * from './components/navigation/DrawerLayout/AppSidebar/AppSidebar';
5
+ export * from './components/fields/ButtonComponent/ButtonComponent';
6
+ export * from './components/fields/TextFieldComponent/TextFieldComponent';
7
+ export * from './components/forms/LoginForm';
8
+ export * from './components/forms/ChangePasswordForm';
9
+ export * from './components/forms/ResetPasswordForm';
10
+ export * from './components/modals/ModalComponent';
@@ -0,0 +1,5 @@
1
+ import { Meta, Story } from '@storybook/react';
2
+ declare const meta: Meta;
3
+ export default meta;
4
+ export declare const Default: Story<import("@storybook/react").Args>;
5
+ export declare const LateralComponent: Story<import("@storybook/react").Args>;
@@ -1,5 +1,4 @@
1
1
  import { Meta, Story } from '@storybook/react';
2
- import { ThingProps } from './Thing';
3
2
  declare const meta: Meta;
4
3
  export default meta;
5
- export declare const Default: Story<ThingProps>;
4
+ export declare const Basic: Story<import("@storybook/react").Args>;
@@ -1,7 +1,7 @@
1
1
  import { Meta, Story } from '@storybook/react';
2
- import { ButtonProps } from './Button';
3
2
  declare const meta: Meta;
4
3
  export default meta;
5
- export declare const Default: Story<ButtonProps>;
6
- export declare const Primary: Story<ButtonProps>;
7
- export declare const Secondary: Story<ButtonProps>;
4
+ export declare const Default: Story<import("@storybook/react").Args>;
5
+ export declare const LoginButton: Story<import("@storybook/react").Args>;
6
+ export declare const ModalCancel: Story<import("@storybook/react").Args>;
7
+ export declare const Loading: Story<import("@storybook/react").Args>;