techsbcn-storybook 0.2.2 → 0.5.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 (56) hide show
  1. package/dist/components/forms/LoginForm.d.ts +5 -5
  2. package/dist/components/layouts/DrawerLayout/DrawerSidebar/DrawerSidebar.d.ts +8 -0
  3. package/dist/components/layouts/MainLayoutSimple/MainLayoutSimple.d.ts +9 -0
  4. package/dist/components/layouts/Standard/AppHeader/AppHeader.d.ts +7 -0
  5. package/dist/components/layouts/Standard/AppSidebar/AppSidebar.d.ts +8 -0
  6. package/dist/components/modals/ModalComponent.d.ts +17 -0
  7. package/dist/components/navigation/VerticalNav/VerticalNav.d.ts +21 -0
  8. package/dist/components/navigation/VerticalNav/VerticalNavItem.d.ts +9 -0
  9. package/dist/components/navigation/VerticalNav/VerticalNavItemCollapse.d.ts +9 -0
  10. package/dist/components/navigation/components/UserInfo.d.ts +6 -0
  11. package/dist/components/tables/SearchComponent.d.ts +21 -0
  12. package/dist/helpers/CheckPermission.d.ts +1 -0
  13. package/dist/helpers/GroupBy.d.ts +1 -0
  14. package/dist/helpers/index.d.ts +2 -0
  15. package/dist/index.d.ts +6 -0
  16. package/dist/stories/Layouts/MainLayoutSimple.stories.d.ts +7 -0
  17. package/dist/stories/{thing/Thing.stories.d.ts → Modal/Modal.stories.d.ts} +1 -2
  18. package/dist/techsbcn-storybook.cjs.development.js +329 -14
  19. package/dist/techsbcn-storybook.cjs.development.js.map +1 -1
  20. package/dist/techsbcn-storybook.cjs.production.min.js +1 -1
  21. package/dist/techsbcn-storybook.cjs.production.min.js.map +1 -1
  22. package/dist/techsbcn-storybook.esm.js +329 -18
  23. package/dist/techsbcn-storybook.esm.js.map +1 -1
  24. package/package.json +3 -1
  25. package/src/components/fields/ButtonComponent/ButtonComponent.scss +4 -5
  26. package/src/components/forms/LoginForm.tsx +17 -11
  27. package/src/components/layouts/DrawerLayout/DrawerSidebar/DrawerSidebar.scss +7 -0
  28. package/src/components/layouts/DrawerLayout/DrawerSidebar/DrawerSidebar.tsx +18 -0
  29. package/src/components/layouts/MainLayoutSimple/MainLayoutSimple.scss +9 -0
  30. package/src/components/layouts/MainLayoutSimple/MainLayoutSimple.tsx +23 -0
  31. package/src/components/layouts/Standard/AppHeader/AppHeader.scss +5 -0
  32. package/src/components/layouts/Standard/AppHeader/AppHeader.tsx +27 -0
  33. package/src/components/layouts/Standard/AppSidebar/AppSidebar.scss +7 -0
  34. package/src/components/layouts/Standard/AppSidebar/AppSidebar.tsx +33 -0
  35. package/src/components/modals/ModalComponent.tsx +82 -0
  36. package/src/components/navigation/VerticalNav/VerticalNav.scss +62 -0
  37. package/src/components/navigation/VerticalNav/VerticalNav.tsx +42 -0
  38. package/src/components/navigation/VerticalNav/VerticalNavItem.tsx +36 -0
  39. package/src/components/navigation/VerticalNav/VerticalNavItemCollapse.tsx +102 -0
  40. package/src/components/navigation/components/UserInfo.tsx +11 -0
  41. package/src/components/tables/SearchComponent.tsx +141 -0
  42. package/src/content/fonts/feather.eot +0 -0
  43. package/src/content/fonts/feather.svg +759 -0
  44. package/src/content/fonts/feather.ttf +0 -0
  45. package/src/content/fonts/feather.woff +0 -0
  46. package/src/helpers/CheckPermission.tsx +11 -0
  47. package/src/helpers/GroupBy.tsx +6 -0
  48. package/src/helpers/index.tsx +2 -0
  49. package/src/index.tsx +6 -0
  50. package/src/stories/Layouts/MainLayoutSimple.stories.tsx +135 -0
  51. package/src/stories/Modal/Modal.stories.tsx +32 -0
  52. package/src/styles/Globals.scss +34 -0
  53. package/dist/stories/thing/Thing.d.ts +0 -6
  54. package/src/stories/thing/Thing.scss +0 -4
  55. package/src/stories/thing/Thing.stories.tsx +0 -26
  56. package/src/stories/thing/Thing.tsx +0 -11
@@ -5,15 +5,15 @@ interface LoginFormProps {
5
5
  bottomComponent?: React.ReactNode;
6
6
  loading: boolean;
7
7
  requiredText: {
8
- requiredTextMail: string;
8
+ requiredTextLogin: string;
9
9
  requiredTextPassword: string;
10
10
  };
11
11
  valuesText: {
12
12
  buttonText: string;
13
- text1: string;
14
- placeholder1?: string;
15
- text2: string;
16
- placeholder2?: string;
13
+ textLogin: string;
14
+ placeholderLogin?: string;
15
+ textPassword: string;
16
+ placeholderPassword?: string;
17
17
  };
18
18
  }
19
19
  export declare const LoginForm: React.FC<LoginFormProps>;
@@ -0,0 +1,8 @@
1
+ import React from 'react';
2
+ import './DrawerSidebar.scss';
3
+ interface DrawerSidebarProps {
4
+ onHide?: () => void;
5
+ open?: boolean;
6
+ }
7
+ export declare const DrawerSidebar: React.FC<DrawerSidebarProps>;
8
+ export {};
@@ -0,0 +1,9 @@
1
+ import React from 'react';
2
+ import './MainLayoutSimple.scss';
3
+ interface MainLayoutSimpleProps {
4
+ lateralComponent?: React.ReactNode;
5
+ mainComponent: any;
6
+ headerComponent?: React.ReactNode;
7
+ }
8
+ export declare const MainLayoutSimple: React.FC<MainLayoutSimpleProps>;
9
+ export {};
@@ -0,0 +1,7 @@
1
+ import React from 'react';
2
+ import './AppHeader.scss';
3
+ interface AppHeaderProps {
4
+ handleDrawerOpen: () => void;
5
+ }
6
+ export declare const AppHeader: React.FC<AppHeaderProps>;
7
+ 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,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,21 @@
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
+ onHide?: () => void;
19
+ }
20
+ export declare const VerticalNav: React.FC<VerticalNavProps>;
21
+ export {};
@@ -0,0 +1,9 @@
1
+ import { NavigationProps } from './VerticalNav';
2
+ import React from 'react';
3
+ interface VerticalNavItemProps {
4
+ item: NavigationProps;
5
+ userPermisions?: string[];
6
+ onHide?: () => void;
7
+ }
8
+ declare const _default: React.NamedExoticComponent<VerticalNavItemProps>;
9
+ export default _default;
@@ -0,0 +1,9 @@
1
+ import React from 'react';
2
+ import { NavigationProps } from './VerticalNav';
3
+ interface VerticalNavItemCollapseProps {
4
+ item: NavigationProps;
5
+ userPermisions?: string[];
6
+ onHide?: () => void;
7
+ }
8
+ declare const _default: React.NamedExoticComponent<VerticalNavItemCollapseProps>;
9
+ 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 @@
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,6 +1,12 @@
1
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/layouts/Standard/AppSidebar/AppSidebar';
5
+ export * from './components/layouts/DrawerLayout/DrawerSidebar/DrawerSidebar';
6
+ export * from './components/layouts/Standard/AppHeader/AppHeader';
2
7
  export * from './components/fields/ButtonComponent/ButtonComponent';
3
8
  export * from './components/fields/TextFieldComponent/TextFieldComponent';
4
9
  export * from './components/forms/LoginForm';
5
10
  export * from './components/forms/ChangePasswordForm';
6
11
  export * from './components/forms/ResetPasswordForm';
12
+ export * from './components/modals/ModalComponent';
@@ -0,0 +1,7 @@
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 SidebarLayout: Story;
6
+ export declare const SidebarAndHeaderLayout: Story;
7
+ export declare const DrawerSidebarAndHeaderLayout: Story;
@@ -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>;
@@ -8,10 +8,12 @@ var React = require('react');
8
8
  var React__default = _interopDefault(React);
9
9
  var material = require('@mui/material');
10
10
  var _ = require('@mui/material/');
11
+ var reactRouterDom = require('react-router-dom');
12
+ var iconsMaterial = require('@mui/icons-material');
13
+ var MenuIcon = _interopDefault(require('@mui/icons-material/Menu'));
11
14
  var yup = require('yup');
12
15
  var reactHookForm = require('react-hook-form');
13
16
  var yup$1 = require('@hookform/resolvers/yup');
14
- var iconsMaterial = require('@mui/icons-material');
15
17
 
16
18
  function styleInject(css, ref) {
17
19
  if ( ref === void 0 ) ref = {};
@@ -58,9 +60,265 @@ var PublicFormWrapper = function PublicFormWrapper(props) {
58
60
  }, props.children)));
59
61
  };
60
62
 
61
- var css_248z$1 = ".MuiButton-root {\n width: auto;\n padding: 0.8rem 1rem !important;\n text-transform: inherit !important;\n line-height: inherit !important;\n font-size: calc(12pt + (14 - 12) * calc(100vw - 300px)/1300) !important;\n box-shadow: none !important;\n}\n.MuiButton-root.btn-login {\n width: 100%;\n}\n.MuiButton-root.btn-modal-cancel {\n background-color: #666666 !important;\n}\n.MuiButton-root:hover {\n box-shadow: 0px 2px 4px -1px rgba(0, 0, 0, 0.2), 0px 4px 5px 0px rgba(0, 0, 0, 0.14), 0px 1px 10px 0px rgba(0, 0, 0, 0.12) !important;\n}\n.MuiButton-root .MuiCircularProgress-root {\n color: white !important;\n}\n.MuiButton-root .MuiButton-label {\n font-size: calc(12pt + (14 - 12) * calc(100vw - 300px)/1300) !important;\n}\n.MuiButton-root .MuiButton-label .MuiCircularProgress-root {\n color: white !important;\n}";
63
+ var css_248z$1 = ".main-layout-simple {\n width: 100%;\n}\n.main-layout-simple .main-wrapper {\n width: 100%;\n min-height: 100vh;\n height: fit-content;\n position: relative;\n}";
62
64
  styleInject(css_248z$1);
63
65
 
66
+ var MainLayoutSimple = function MainLayoutSimple(props) {
67
+ return React__default.createElement(_.Box, {
68
+ display: "flex",
69
+ flexDirection: "row",
70
+ className: "main-layout-simple"
71
+ }, props.lateralComponent && props.lateralComponent, React__default.createElement(_.Box, {
72
+ className: "main-wrapper"
73
+ }, props.headerComponent && props.headerComponent, React__default.createElement(_.Box, {
74
+ className: "" + (props.lateralComponent ? 'split-container' : '')
75
+ }, React__default.createElement(_.Container, {
76
+ maxWidth: false
77
+ }, props.mainComponent))));
78
+ };
79
+
80
+ var checkPermission = function checkPermission(persmisionAvailable, userRoles) {
81
+ if (persmisionAvailable === null || persmisionAvailable === undefined || persmisionAvailable.length === 0) {
82
+ return true;
83
+ }
84
+
85
+ if (userRoles && Array.isArray(userRoles) && Array.isArray(persmisionAvailable)) {
86
+ return persmisionAvailable.some(function (r) {
87
+ return userRoles.indexOf(r) >= 0;
88
+ });
89
+ }
90
+
91
+ return userRoles.indexOf(persmisionAvailable) >= 0;
92
+ };
93
+
94
+ var VerticalNavItem = function VerticalNavItem(props) {
95
+ var _useLocation = reactRouterDom.useLocation(),
96
+ pathname = _useLocation.pathname;
97
+
98
+ var hasPermission = React.useMemo(function () {
99
+ return checkPermission(props.item.persmisionAvailable, props.userPermisions);
100
+ }, [props.item.persmisionAvailable, props.userPermisions]);
101
+
102
+ if (!hasPermission) {
103
+ return null;
104
+ }
105
+
106
+ return React__default.createElement(reactRouterDom.NavLink, {
107
+ to: props.item.route || '',
108
+ className: "nav-link-item",
109
+ onClick: props.onHide
110
+ }, React__default.createElement(material.Box, {
111
+ p: 2,
112
+ className: "nav-item " + (reactRouterDom.matchPath({
113
+ path: props.item.route || ''
114
+ }, pathname) ? 'main-background-color' : '')
115
+ }, React__default.createElement(material.Box, {
116
+ className: "nav-item-text"
117
+ }, props.item.title)));
118
+ };
119
+
120
+ var VerticalNavItem$1 = /*#__PURE__*/React__default.memo(VerticalNavItem);
121
+
122
+ var needsToBeOpened = function needsToBeOpened(pathname, item) {
123
+ if (pathname) {
124
+ return isUrlInChildren(item, pathname);
125
+ }
126
+
127
+ return false;
128
+ };
129
+
130
+ var isUrlInChildren = function isUrlInChildren(parent, url) {
131
+ if (!parent.children) {
132
+ return false;
133
+ }
134
+
135
+ for (var i = 0; i < parent.children.length; i++) {
136
+ if (parent.children[i].children) {
137
+ if (isUrlInChildren(parent.children[i], url)) {
138
+ return true;
139
+ }
140
+ }
141
+
142
+ if (parent.children[i].route === url || url.includes(parent.children[i].route)) {
143
+ return true;
144
+ }
145
+ }
146
+
147
+ return false;
148
+ };
149
+
150
+ var VerticalNavItemCollapse = function VerticalNavItemCollapse(props) {
151
+ var _useLocation = reactRouterDom.useLocation(),
152
+ pathname = _useLocation.pathname;
153
+
154
+ var _useState = React.useState(function () {
155
+ return needsToBeOpened(pathname, props.item);
156
+ }),
157
+ open = _useState[0],
158
+ setOpen = _useState[1];
159
+
160
+ React.useEffect(function () {
161
+ if (needsToBeOpened(pathname, props.item)) {
162
+ setOpen(true);
163
+ }
164
+ }, [pathname, props]);
165
+
166
+ var handleClick = function handleClick() {
167
+ setOpen(!open);
168
+ };
169
+
170
+ var hasPermission = React.useMemo(function () {
171
+ return checkPermission(props.item.persmisionAvailable, props.userPermisions);
172
+ }, [props.item.persmisionAvailable, props.userPermisions]);
173
+
174
+ if (!hasPermission) {
175
+ return null;
176
+ }
177
+
178
+ return React__default.createElement(material.Box, {
179
+ className: "nav-item-collapse"
180
+ }, React__default.createElement(material.Box, {
181
+ p: 2,
182
+ display: "flex",
183
+ alignContent: "flex-end",
184
+ alignItems: "center",
185
+ className: "nav-item " + (open ? 'open' : '') + " " + (needsToBeOpened(pathname, props.item) ? 'active' : ''),
186
+ onClick: handleClick
187
+ }, React__default.createElement(material.Box, {
188
+ className: "nav-item-text"
189
+ }, props.item.title), React__default.createElement(material.Box, {
190
+ ml: "auto",
191
+ display: "flex"
192
+ }, open ? React__default.createElement(iconsMaterial.ExpandMore, null) : React__default.createElement(iconsMaterial.ChevronRight, null))), props.item.children && Array.isArray(props.item.children) && React__default.createElement(material.Collapse, {
193
+ "in": open,
194
+ className: "collapse-children"
195
+ }, React__default.createElement(material.Box, null, React__default.createElement(material.Grid, {
196
+ container: true
197
+ }, props.item.children.map(function (item) {
198
+ return React__default.createElement(material.Grid, {
199
+ item: true,
200
+ key: item.id,
201
+ xs: 12
202
+ }, item.type === exports.NavigationType.Collapse && React__default.createElement(VerticalNavItemCollapse, {
203
+ item: item,
204
+ userPermisions: props.userPermisions,
205
+ onHide: props.onHide
206
+ }), item.type === exports.NavigationType.Item && React__default.createElement(VerticalNavItem$1, {
207
+ item: item,
208
+ userPermisions: props.userPermisions,
209
+ onHide: props.onHide
210
+ }));
211
+ })))));
212
+ };
213
+
214
+ var VerticalNavItemCollapse$1 = /*#__PURE__*/React__default.memo(VerticalNavItemCollapse);
215
+
216
+ var css_248z$2 = ".vertical-navigation {\n background: transparent;\n color: white;\n}\n.vertical-navigation .nav-item {\n cursor: pointer;\n}\n.vertical-navigation .nav-item svg {\n font-size: 28px;\n}\n.vertical-navigation .nav-item {\n padding: 12px;\n}\n.vertical-navigation .nav-item:hover {\n background-color: #333f54;\n}\n.vertical-navigation .active .nav-item {\n background-color: #04a9f5;\n border-radius: 0 25px 25px 0;\n margin-right: 16px;\n}\n.vertical-navigation .active .nav-item .nav-item-text {\n color: white !important;\n}\n.vertical-navigation .active .nav-item:hover {\n color: white !important;\n}\n.vertical-navigation .active .nav-item:hover .nav-item-text {\n color: white !important;\n}\n.vertical-navigation .nav-item-collapse .active {\n background-color: #333f54;\n}\n.vertical-navigation .nav-item-collapse .active .nav-item-text {\n color: white !important;\n}\n.vertical-navigation .nav-item-collapse .active:hover {\n color: white !important;\n}\n.vertical-navigation .nav-item-collapse .active:hover .nav-item-text {\n color: white !important;\n}\n.vertical-navigation .nav-item-collapse .open {\n background-color: #333f54;\n color: white !important;\n}\n.vertical-navigation .nav-item-collapse .open .nav-item-text {\n color: white !important;\n}\n.vertical-navigation .nav-item-collapse .collapse-children {\n background-color: #39465e;\n}\n.vertical-navigation .nav-item-collapse .collapse-children .nav-item-text {\n padding-left: 16px;\n padding-right: 16px;\n}";
217
+ styleInject(css_248z$2);
218
+
219
+ (function (NavigationType) {
220
+ NavigationType[NavigationType["Item"] = 0] = "Item";
221
+ NavigationType[NavigationType["Collapse"] = 1] = "Collapse";
222
+ })(exports.NavigationType || (exports.NavigationType = {}));
223
+
224
+ var VerticalNav = function VerticalNav(props) {
225
+ return React__default.createElement(material.Grid, {
226
+ container: true,
227
+ className: "vertical-navigation"
228
+ }, props.items.map(function (item) {
229
+ return React__default.createElement(material.Grid, {
230
+ item: true,
231
+ key: item.id,
232
+ xs: 12,
233
+ md: 12,
234
+ className: "grid-item-navigation"
235
+ }, item.type === exports.NavigationType.Collapse && React__default.createElement(VerticalNavItemCollapse$1, {
236
+ item: item,
237
+ userPermisions: props.userPermisions,
238
+ onHide: props.onHide
239
+ }), item.type === exports.NavigationType.Item && React__default.createElement(VerticalNavItem$1, {
240
+ item: item,
241
+ userPermisions: props.userPermisions,
242
+ onHide: props.onHide
243
+ }));
244
+ }));
245
+ };
246
+
247
+ var css_248z$3 = ".app-sidebar {\n width: 17rem;\n background-color: #3f4d67;\n box-shadow: 1px 0 20px 0 #3f4d67;\n z-index: 1029;\n color: white;\n}";
248
+ styleInject(css_248z$3);
249
+
250
+ var AppSidebar = function AppSidebar(props) {
251
+ return React__default.createElement(React__default.Fragment, null, React__default.createElement(material.Drawer, {
252
+ anchor: 'left',
253
+ className: "drawer-nav",
254
+ open: props.open,
255
+ onClose: props.onHide,
256
+ sx: {
257
+ display: {
258
+ xs: 'block',
259
+ lg: 'none'
260
+ }
261
+ }
262
+ }, React__default.createElement(material.Box, {
263
+ height: "100%",
264
+ className: "app-sidebar"
265
+ }, props.children)), React__default.createElement(material.Box, {
266
+ sx: {
267
+ display: {
268
+ xs: 'none',
269
+ lg: 'block'
270
+ }
271
+ }
272
+ }, React__default.createElement(material.Box, {
273
+ height: "100%",
274
+ className: "app-sidebar"
275
+ }, React__default.createElement(material.Box, {
276
+ position: "sticky",
277
+ top: "0"
278
+ }, props.children))));
279
+ };
280
+
281
+ var css_248z$4 = ".drawer-sidebar {\n width: 17rem;\n background-color: #3f4d67;\n box-shadow: 1px 0 20px 0 #3f4d67;\n z-index: 1029;\n color: white;\n}";
282
+ styleInject(css_248z$4);
283
+
284
+ var DrawerSidebar = function DrawerSidebar(props) {
285
+ return React__default.createElement(material.Drawer, {
286
+ anchor: 'left',
287
+ className: "drawer-nav",
288
+ open: props.open,
289
+ onClose: props.onHide
290
+ }, React__default.createElement(material.Box, {
291
+ height: "100%",
292
+ className: "drawer-sidebar"
293
+ }, props.children));
294
+ };
295
+
296
+ var css_248z$5 = ".app-bar {\n background-color: white !important;\n border-bottom: 1px solid rgba(0, 0, 0, 0.12);\n color: black !important;\n}";
297
+ styleInject(css_248z$5);
298
+
299
+ var AppHeader = function AppHeader(props) {
300
+ return React__default.createElement(material.AppBar, {
301
+ position: "sticky",
302
+ className: "app-bar main-backgound-body"
303
+ }, React__default.createElement(material.Toolbar, {
304
+ className: "app-toolbar"
305
+ }, React__default.createElement(material.IconButton, {
306
+ sx: {
307
+ display: {
308
+ xs: 'block',
309
+ lg: 'none'
310
+ }
311
+ },
312
+ edge: "start",
313
+ color: "inherit",
314
+ "aria-label": "open drawer",
315
+ onClick: props.handleDrawerOpen
316
+ }, React__default.createElement(MenuIcon, null)), props.children));
317
+ };
318
+
319
+ var css_248z$6 = ".MuiButton-root {\n width: auto;\n padding: 0.8rem 1rem !important;\n text-transform: inherit !important;\n line-height: inherit !important;\n box-shadow: none !important;\n}\n.MuiButton-root.btn-login {\n width: 100%;\n}\n.MuiButton-root.btn-modal-cancel {\n background-color: #666666 !important;\n}\n.MuiButton-root.btn-modal-cancel.Mui-disabled {\n background-color: #666666c4 !important;\n color: #030303b4 !important;\n}\n.MuiButton-root:hover {\n box-shadow: 0px 2px 4px -1px rgba(0, 0, 0, 0.2), 0px 4px 5px 0px rgba(0, 0, 0, 0.14), 0px 1px 10px 0px rgba(0, 0, 0, 0.12) !important;\n}\n.MuiButton-root .MuiCircularProgress-root {\n color: white !important;\n}\n.MuiButton-root .MuiButton-label .MuiCircularProgress-root {\n color: white !important;\n}";
320
+ styleInject(css_248z$6);
321
+
64
322
  var ButtonComponent = function ButtonComponent(props) {
65
323
  return React__default.createElement(_.Button, {
66
324
  type: props.type && props.type,
@@ -76,8 +334,8 @@ var ButtonComponent = function ButtonComponent(props) {
76
334
  }) : props.label);
77
335
  };
78
336
 
79
- var css_248z$2 = ".text-field-component .MuiFormLabel-root + .MuiInputBase-formControl {\n margin-top: 22px !important;\n}\n.text-field-component .MuiInputBase-root {\n color: grey !important;\n border: 1px solid grey;\n padding: 0.43rem 0.87rem;\n background-color: white !important;\n border-radius: 3px !important;\n}\n.text-field-component .MuiInputBase-root.Mui-error {\n border: 1px solid #F24726 !important;\n}\n.text-field-component .MuiInputBase-root:not(.Mui-disabled):hover {\n border: 1px solid grey;\n}\n.text-field-component .MuiInputBase-root.Mui-focused {\n border: 1px solid grey;\n}\n.text-field-component .MuiInputBase-root .MuiInputBase-input {\n color: #666666 !important;\n background-color: white !important;\n}\n.text-field-component .MuiInputBase-root .MuiInputBase-input::placeholder {\n text-overflow: ellipsis !important;\n color: #666666 !important;\n opacity: 1;\n}\n.text-field-component .MuiInputBase-root .Mui-disabled {\n -webkit-text-fill-color: #666666 !important;\n}\n.text-field-component .MuiFormHelperText-root {\n padding: 0 !important;\n font-size: 0.85rem !important;\n}";
80
- styleInject(css_248z$2);
337
+ var css_248z$7 = ".text-field-component .MuiFormLabel-root + .MuiInputBase-formControl {\n margin-top: 22px !important;\n}\n.text-field-component .MuiInputBase-root {\n color: grey !important;\n border: 1px solid grey;\n padding: 0.43rem 0.87rem;\n background-color: white !important;\n border-radius: 3px !important;\n}\n.text-field-component .MuiInputBase-root.Mui-error {\n border: 1px solid #F24726 !important;\n}\n.text-field-component .MuiInputBase-root:not(.Mui-disabled):hover {\n border: 1px solid grey;\n}\n.text-field-component .MuiInputBase-root.Mui-focused {\n border: 1px solid grey;\n}\n.text-field-component .MuiInputBase-root .MuiInputBase-input {\n color: #666666 !important;\n background-color: white !important;\n}\n.text-field-component .MuiInputBase-root .MuiInputBase-input::placeholder {\n text-overflow: ellipsis !important;\n color: #666666 !important;\n opacity: 1;\n}\n.text-field-component .MuiInputBase-root .Mui-disabled {\n -webkit-text-fill-color: #666666 !important;\n}\n.text-field-component .MuiFormHelperText-root {\n padding: 0 !important;\n font-size: 0.85rem !important;\n}";
338
+ styleInject(css_248z$7);
81
339
 
82
340
  var TextFieldComponent = function TextFieldComponent(props) {
83
341
  return React__default.createElement(_.Box, {
@@ -130,7 +388,7 @@ TextFieldComponent.defaultProps = {
130
388
 
131
389
  var LoginForm = function LoginForm(props) {
132
390
  var LoginSchema = yup.object().shape({
133
- email: yup.string().required(props.requiredText.requiredTextMail),
391
+ login: yup.string().required(props.requiredText.requiredTextLogin),
134
392
  password: yup.string().required(props.requiredText.requiredTextPassword)
135
393
  });
136
394
 
@@ -163,20 +421,20 @@ var LoginForm = function LoginForm(props) {
163
421
  item: true
164
422
  }, React__default.createElement(reactHookForm.Controller, {
165
423
  control: control,
166
- name: 'email',
424
+ name: 'login',
167
425
  render: function render(_ref) {
168
- var _errors$email;
426
+ var _errors$login;
169
427
 
170
428
  var _ref$field = _ref.field,
171
429
  _onChange = _ref$field.onChange,
172
430
  name = _ref$field.name,
173
431
  ref = _ref$field.ref;
174
432
  return React__default.createElement(TextFieldComponent, {
175
- label: props.valuesText.text1,
176
- placeholder: props.valuesText.placeholder1,
177
- autoComplete: "email",
178
- error: !!errors.email,
179
- helperText: (_errors$email = errors.email) == null ? void 0 : _errors$email.message,
433
+ label: props.valuesText.textLogin,
434
+ placeholder: props.valuesText.placeholderLogin,
435
+ autoComplete: "login",
436
+ error: !!errors.login,
437
+ helperText: (_errors$login = errors.login) == null ? void 0 : _errors$login.message,
180
438
  name: name,
181
439
  inputRef: ref,
182
440
  onChange: function onChange(e) {
@@ -197,8 +455,8 @@ var LoginForm = function LoginForm(props) {
197
455
  name = _ref2$field.name,
198
456
  ref = _ref2$field.ref;
199
457
  return React__default.createElement(TextFieldComponent, {
200
- label: props.valuesText.text2,
201
- placeholder: props.valuesText.placeholder2,
458
+ label: props.valuesText.textPassword,
459
+ placeholder: props.valuesText.placeholderPassword,
202
460
  type: showPassword ? 'text' : 'password',
203
461
  error: !!errors.password,
204
462
  helperText: (_errors$password = errors.password) == null ? void 0 : _errors$password.message,
@@ -390,10 +648,67 @@ var ResetPasswordForm = function ResetPasswordForm(props) {
390
648
  }, props.bottomComponent));
391
649
  };
392
650
 
651
+ var ModalComponent = function ModalComponent(props) {
652
+ return React__default.createElement(material.Dialog, {
653
+ open: props.setShow,
654
+ id: props.idClass,
655
+ fullWidth: props.fullWidth,
656
+ fullScreen: props.fullScreen,
657
+ maxWidth: props.modalSize,
658
+ className: "modal-component",
659
+ "aria-labelledby": "modal-title",
660
+ "aria-describedby": "modal-description",
661
+ onClose: props.onHide,
662
+ scroll: "body",
663
+ PaperProps: {
664
+ sx: {
665
+ overflowY: 'unset'
666
+ }
667
+ }
668
+ }, React__default.createElement(material.DialogTitle, {
669
+ id: "modal-title"
670
+ }, React__default.createElement(material.Box, {
671
+ display: "flex",
672
+ alignItems: "center"
673
+ }, props.title, props.onHide && React__default.createElement(material.Box, {
674
+ sx: {
675
+ margin: '-1rem -1rem -1rem auto'
676
+ }
677
+ }, React__default.createElement(material.IconButton, {
678
+ "aria-label": "close",
679
+ onClick: props.onHide
680
+ }, React__default.createElement(iconsMaterial.Close, null))))), React__default.createElement(material.DialogContent, {
681
+ sx: {
682
+ overflowY: 'unset'
683
+ },
684
+ id: "modal-description",
685
+ dividers: props.dividers
686
+ }, props.children), React__default.createElement(material.DialogActions, null, props.cancelButton && React__default.createElement(ButtonComponent, Object.assign({
687
+ disabled: props.loading,
688
+ className: "btn-modal-cancel " + (props.cancelButton.className ? props.cancelButton.className : ''),
689
+ onClick: props.cancelButton.onClick ? props.cancelButton.onClick : props.onHide
690
+ }, props.cancelButton)), props.submitButton && React__default.createElement(ButtonComponent, Object.assign({
691
+ className: "btn-modal-submit main-background-color " + (props.submitButton.className ? props.submitButton.className : ''),
692
+ loading: props.loading
693
+ }, props.submitButton))));
694
+ };
695
+ ModalComponent.defaultProps = {
696
+ modalSize: 'sm',
697
+ fullWidth: true,
698
+ loading: false,
699
+ dividers: true
700
+ };
701
+
702
+ exports.AppHeader = AppHeader;
703
+ exports.AppSidebar = AppSidebar;
393
704
  exports.ButtonComponent = ButtonComponent;
394
705
  exports.ChangePasswordForm = ChangePasswordForm;
706
+ exports.DrawerSidebar = DrawerSidebar;
395
707
  exports.LoginForm = LoginForm;
708
+ exports.MainLayoutSimple = MainLayoutSimple;
709
+ exports.ModalComponent = ModalComponent;
396
710
  exports.PublicFormWrapper = PublicFormWrapper;
397
711
  exports.ResetPasswordForm = ResetPasswordForm;
398
712
  exports.TextFieldComponent = TextFieldComponent;
713
+ exports.VerticalNav = VerticalNav;
399
714
  //# sourceMappingURL=techsbcn-storybook.cjs.development.js.map