techsbcn-storybook 0.2.2 → 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 (48) hide show
  1. package/dist/components/layouts/MainLayoutSimple/MainLayoutSimple.d.ts +8 -0
  2. package/dist/components/modals/ModalComponent.d.ts +17 -0
  3. package/dist/components/navigation/DrawerLayout/AppSidebar/AppSidebar.d.ts +8 -0
  4. package/dist/components/navigation/VerticalNav/VerticalNav.d.ts +20 -0
  5. package/dist/components/navigation/VerticalNav/VerticalNavItem.d.ts +8 -0
  6. package/dist/components/navigation/VerticalNav/VerticalNavItemCollapse.d.ts +8 -0
  7. package/dist/components/navigation/components/UserInfo.d.ts +6 -0
  8. package/dist/components/tables/SearchComponent.d.ts +21 -0
  9. package/dist/helpers/CheckPermission.d.ts +1 -0
  10. package/dist/helpers/GroupBy.d.ts +1 -0
  11. package/dist/helpers/index.d.ts +2 -0
  12. package/dist/index.d.ts +4 -0
  13. package/dist/stories/Layouts/MainLayoutSimple.stories.d.ts +5 -0
  14. package/dist/stories/{thing/Thing.stories.d.ts → Modal/Modal.stories.d.ts} +1 -2
  15. package/dist/techsbcn-storybook.cjs.development.js +286 -4
  16. package/dist/techsbcn-storybook.cjs.development.js.map +1 -1
  17. package/dist/techsbcn-storybook.cjs.production.min.js +1 -1
  18. package/dist/techsbcn-storybook.cjs.production.min.js.map +1 -1
  19. package/dist/techsbcn-storybook.esm.js +288 -8
  20. package/dist/techsbcn-storybook.esm.js.map +1 -1
  21. package/package.json +3 -1
  22. package/src/components/fields/ButtonComponent/ButtonComponent.scss +0 -4
  23. package/src/components/layouts/MainLayoutSimple/MainLayoutSimple.scss +9 -0
  24. package/src/components/layouts/MainLayoutSimple/MainLayoutSimple.tsx +21 -0
  25. package/src/components/modals/ModalComponent.tsx +82 -0
  26. package/src/components/navigation/DrawerLayout/AppSidebar/AppSidebar.scss +7 -0
  27. package/src/components/navigation/DrawerLayout/AppSidebar/AppSidebar.tsx +27 -0
  28. package/src/components/navigation/VerticalNav/VerticalNav.scss +62 -0
  29. package/src/components/navigation/VerticalNav/VerticalNav.tsx +39 -0
  30. package/src/components/navigation/VerticalNav/VerticalNavItem.tsx +38 -0
  31. package/src/components/navigation/VerticalNav/VerticalNavItemCollapse.tsx +106 -0
  32. package/src/components/navigation/components/UserInfo.tsx +11 -0
  33. package/src/components/tables/SearchComponent.tsx +141 -0
  34. package/src/content/fonts/feather.eot +0 -0
  35. package/src/content/fonts/feather.svg +759 -0
  36. package/src/content/fonts/feather.ttf +0 -0
  37. package/src/content/fonts/feather.woff +0 -0
  38. package/src/helpers/CheckPermission.tsx +11 -0
  39. package/src/helpers/GroupBy.tsx +6 -0
  40. package/src/helpers/index.tsx +2 -0
  41. package/src/index.tsx +4 -0
  42. package/src/stories/Layouts/MainLayoutSimple.stories.tsx +73 -0
  43. package/src/stories/Modal/Modal.stories.tsx +30 -0
  44. package/src/styles/Globals.scss +27 -0
  45. package/dist/stories/thing/Thing.d.ts +0 -6
  46. package/src/stories/thing/Thing.scss +0 -4
  47. package/src/stories/thing/Thing.stories.tsx +0 -26
  48. package/src/stories/thing/Thing.tsx +0 -11
@@ -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 @@
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,10 @@
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/navigation/DrawerLayout/AppSidebar/AppSidebar';
2
5
  export * from './components/fields/ButtonComponent/ButtonComponent';
3
6
  export * from './components/fields/TextFieldComponent/TextFieldComponent';
4
7
  export * from './components/forms/LoginForm';
5
8
  export * from './components/forms/ChangePasswordForm';
6
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>;
@@ -8,10 +8,11 @@ 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');
11
13
  var yup = require('yup');
12
14
  var reactHookForm = require('react-hook-form');
13
15
  var yup$1 = require('@hookform/resolvers/yup');
14
- var iconsMaterial = require('@mui/icons-material');
15
16
 
16
17
  function styleInject(css, ref) {
17
18
  if ( ref === void 0 ) ref = {};
@@ -58,9 +59,235 @@ var PublicFormWrapper = function PublicFormWrapper(props) {
58
59
  }, props.children)));
59
60
  };
60
61
 
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}";
62
+ 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
63
  styleInject(css_248z$1);
63
64
 
65
+ var MainLayoutSimple = function MainLayoutSimple(props) {
66
+ return React__default.createElement(_.Box, {
67
+ display: "flex",
68
+ flexDirection: "row",
69
+ className: "main-layout-simple"
70
+ }, props.lateralComponent && React__default.createElement(_.Box, {
71
+ className: "lateral-component"
72
+ }, props.lateralComponent), React__default.createElement(_.Box, {
73
+ className: "main-wrapper"
74
+ }, React__default.createElement(_.Box, {
75
+ className: "" + (props.lateralComponent ? 'split-container' : '')
76
+ }, React__default.createElement(_.Container, {
77
+ maxWidth: false
78
+ }, props.mainComponent))));
79
+ };
80
+
81
+ var checkPermission = function checkPermission(persmisionAvailable, userRoles) {
82
+ if (persmisionAvailable === null || persmisionAvailable === undefined || persmisionAvailable.length === 0) {
83
+ return true;
84
+ }
85
+
86
+ if (userRoles && Array.isArray(userRoles) && Array.isArray(persmisionAvailable)) {
87
+ return persmisionAvailable.some(function (r) {
88
+ return userRoles.indexOf(r) >= 0;
89
+ });
90
+ }
91
+
92
+ return userRoles.indexOf(persmisionAvailable) >= 0;
93
+ };
94
+
95
+ var VerticalNavItem = function VerticalNavItem(props) {
96
+ var _useState = React.useState(false),
97
+ hover = _useState[0],
98
+ setHover = _useState[1];
99
+
100
+ var hasPermission = React.useMemo(function () {
101
+ return checkPermission(props.item.persmisionAvailable, props.userPermisions);
102
+ }, [props.item.persmisionAvailable, props.userPermisions]);
103
+
104
+ if (!hasPermission) {
105
+ return null;
106
+ }
107
+
108
+ return React__default.createElement(reactRouterDom.NavLink, {
109
+ to: props.item.route || '',
110
+ className: "nav-link-item"
111
+ }, React__default.createElement(material.Box, {
112
+ p: 2,
113
+ className: "nav-item " + (hover ? 'main-color' : ''),
114
+ onMouseEnter: function onMouseEnter() {
115
+ return setHover(true);
116
+ },
117
+ onMouseLeave: function onMouseLeave() {
118
+ return setHover(false);
119
+ }
120
+ }, React__default.createElement(material.Box, {
121
+ className: "nav-item-text " + (hover ? 'main-color' : '')
122
+ }, props.item.title)));
123
+ };
124
+
125
+ var VerticalNavItem$1 = /*#__PURE__*/React__default.memo(VerticalNavItem);
126
+
127
+ var needsToBeOpened = function needsToBeOpened(pathname, item) {
128
+ if (pathname) {
129
+ return isUrlInChildren(item, pathname);
130
+ }
131
+
132
+ return false;
133
+ };
134
+
135
+ var isUrlInChildren = function isUrlInChildren(parent, url) {
136
+ if (!parent.children) {
137
+ return false;
138
+ }
139
+
140
+ for (var i = 0; i < parent.children.length; i++) {
141
+ if (parent.children[i].children) {
142
+ if (isUrlInChildren(parent.children[i], url)) {
143
+ return true;
144
+ }
145
+ }
146
+
147
+ if (parent.children[i].route === url || url.includes(parent.children[i].route)) {
148
+ return true;
149
+ }
150
+ }
151
+
152
+ return false;
153
+ };
154
+
155
+ var VerticalNavItemCollapse = function VerticalNavItemCollapse(props) {
156
+ var _useLocation = reactRouterDom.useLocation(),
157
+ pathname = _useLocation.pathname;
158
+
159
+ var _useState = React.useState(function () {
160
+ return needsToBeOpened(pathname, props.item);
161
+ }),
162
+ open = _useState[0],
163
+ setOpen = _useState[1];
164
+
165
+ var _useState2 = React.useState(false),
166
+ hover = _useState2[0],
167
+ setHover = _useState2[1];
168
+
169
+ React.useEffect(function () {
170
+ if (needsToBeOpened(pathname, props.item)) {
171
+ setOpen(true);
172
+ }
173
+ }, [pathname, props]);
174
+
175
+ var handleClick = function handleClick() {
176
+ setOpen(!open);
177
+ };
178
+
179
+ var hasPermission = React.useMemo(function () {
180
+ return checkPermission(props.item.persmisionAvailable, props.userPermisions);
181
+ }, [props.item.persmisionAvailable, props.userPermisions]);
182
+
183
+ if (!hasPermission) {
184
+ return null;
185
+ }
186
+
187
+ return React__default.createElement(material.Box, {
188
+ className: "nav-item-collapse"
189
+ }, React__default.createElement(material.Box, {
190
+ p: 2,
191
+ display: "flex",
192
+ alignContent: "flex-end",
193
+ alignItems: "center",
194
+ className: "nav-item " + (hover ? 'main-color' : '') + " " + (open ? 'open' : '') + " " + (needsToBeOpened(pathname, props.item) ? 'active' : ''),
195
+ onClick: handleClick,
196
+ onMouseEnter: function onMouseEnter() {
197
+ return setHover(true);
198
+ },
199
+ onMouseLeave: function onMouseLeave() {
200
+ return setHover(false);
201
+ }
202
+ }, React__default.createElement(material.Box, {
203
+ className: "nav-item-text " + (hover ? 'main-color' : '')
204
+ }, props.item.title), React__default.createElement(material.Box, {
205
+ ml: "auto",
206
+ display: "flex"
207
+ }, 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, {
208
+ "in": open,
209
+ className: "collapse-children"
210
+ }, React__default.createElement(material.Box, null, React__default.createElement(material.Grid, {
211
+ container: true
212
+ }, props.item.children.map(function (item) {
213
+ return React__default.createElement(material.Grid, {
214
+ item: true,
215
+ key: item.id,
216
+ xs: 12
217
+ }, item.type === exports.NavigationType.Collapse && React__default.createElement(VerticalNavItemCollapse, {
218
+ item: item,
219
+ userPermisions: props.userPermisions
220
+ }), item.type === exports.NavigationType.Item && React__default.createElement(VerticalNavItem$1, {
221
+ item: item,
222
+ userPermisions: props.userPermisions
223
+ }));
224
+ })))));
225
+ };
226
+
227
+ var VerticalNavItemCollapse$1 = /*#__PURE__*/React__default.memo(VerticalNavItemCollapse);
228
+
229
+ var css_248z$2 = ".vertical-navigation {\n background: transparent;\n color: #a9b7d0;\n}\n.vertical-navigation .nav-item {\n cursor: pointer;\n}\n.vertical-navigation .nav-item svg {\n font-size: 32px;\n}\n.vertical-navigation .nav-item:hover {\n color: #04a9f5;\n}\n.vertical-navigation .nav-item:hover .nav-item-text {\n color: #04a9f5;\n}\n.vertical-navigation .active .nav-item {\n background-color: #333f54;\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}";
230
+ styleInject(css_248z$2);
231
+
232
+ (function (NavigationType) {
233
+ NavigationType[NavigationType["Item"] = 0] = "Item";
234
+ NavigationType[NavigationType["Collapse"] = 1] = "Collapse";
235
+ })(exports.NavigationType || (exports.NavigationType = {}));
236
+
237
+ var VerticalNav = function VerticalNav(props) {
238
+ return React__default.createElement(material.Grid, {
239
+ container: true,
240
+ className: "vertical-navigation"
241
+ }, props.items.map(function (item) {
242
+ return React__default.createElement(material.Grid, {
243
+ item: true,
244
+ key: item.id,
245
+ xs: 12,
246
+ md: 12,
247
+ className: "grid-item-navigation"
248
+ }, item.type === exports.NavigationType.Collapse && React__default.createElement(VerticalNavItemCollapse$1, {
249
+ item: item,
250
+ userPermisions: props.userPermisions
251
+ }), item.type === exports.NavigationType.Item && React__default.createElement(VerticalNavItem$1, {
252
+ item: item,
253
+ userPermisions: props.userPermisions
254
+ }));
255
+ }));
256
+ };
257
+
258
+ var css_248z$3 = ".app-sidebar {\n width: 19rem;\n background-color: #3f4d67;\n box-shadow: 1px 0 20px 0 #3f4d67;\n z-index: 1029;\n color: #a9b7d0;\n}";
259
+ styleInject(css_248z$3);
260
+
261
+ var AppSidebar = function AppSidebar(props) {
262
+ return React__default.createElement(material.Box, {
263
+ height: "100%",
264
+ className: "app-sidebar"
265
+ }, React__default.createElement(material.Drawer, {
266
+ anchor: 'left',
267
+ className: "drawer-nav",
268
+ open: props.open,
269
+ onClose: props.onHide,
270
+ sx: {
271
+ display: {
272
+ xs: 'block',
273
+ lg: 'none'
274
+ }
275
+ }
276
+ }, props.children), React__default.createElement(material.Box, {
277
+ position: "sticky",
278
+ top: "0",
279
+ sx: {
280
+ display: {
281
+ xs: 'none',
282
+ lg: 'block'
283
+ }
284
+ }
285
+ }, props.children));
286
+ };
287
+
288
+ var css_248z$4 = ".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: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}";
289
+ styleInject(css_248z$4);
290
+
64
291
  var ButtonComponent = function ButtonComponent(props) {
65
292
  return React__default.createElement(_.Button, {
66
293
  type: props.type && props.type,
@@ -76,8 +303,8 @@ var ButtonComponent = function ButtonComponent(props) {
76
303
  }) : props.label);
77
304
  };
78
305
 
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);
306
+ var css_248z$5 = ".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}";
307
+ styleInject(css_248z$5);
81
308
 
82
309
  var TextFieldComponent = function TextFieldComponent(props) {
83
310
  return React__default.createElement(_.Box, {
@@ -390,10 +617,65 @@ var ResetPasswordForm = function ResetPasswordForm(props) {
390
617
  }, props.bottomComponent));
391
618
  };
392
619
 
620
+ var ModalComponent = function ModalComponent(props) {
621
+ return React__default.createElement(material.Dialog, {
622
+ open: props.setShow,
623
+ id: props.idClass,
624
+ fullWidth: props.fullWidth,
625
+ fullScreen: props.fullScreen,
626
+ maxWidth: props.modalSize,
627
+ className: "modal-component",
628
+ "aria-labelledby": "modal-title",
629
+ "aria-describedby": "modal-description",
630
+ onClose: props.onHide,
631
+ scroll: "body",
632
+ PaperProps: {
633
+ sx: {
634
+ overflowY: 'unset'
635
+ }
636
+ }
637
+ }, React__default.createElement(material.DialogTitle, {
638
+ id: "modal-title"
639
+ }, React__default.createElement(material.Box, {
640
+ display: "flex",
641
+ alignItems: "center"
642
+ }, props.title, props.onHide && React__default.createElement(material.Box, {
643
+ sx: {
644
+ margin: '-1rem -1rem -1rem auto'
645
+ }
646
+ }, React__default.createElement(material.IconButton, {
647
+ "aria-label": "close",
648
+ onClick: props.onHide
649
+ }, React__default.createElement(iconsMaterial.Close, null))))), React__default.createElement(material.DialogContent, {
650
+ sx: {
651
+ overflowY: 'unset'
652
+ },
653
+ id: "modal-description",
654
+ dividers: props.dividers
655
+ }, props.children), React__default.createElement(material.DialogActions, null, props.cancelButton && React__default.createElement(ButtonComponent, Object.assign({
656
+ disabled: props.loading,
657
+ className: "btn-modal-cancel " + (props.cancelButton.className ? props.cancelButton.className : ''),
658
+ onClick: props.cancelButton.onClick ? props.cancelButton.onClick : props.onHide
659
+ }, props.cancelButton)), props.submitButton && React__default.createElement(ButtonComponent, Object.assign({
660
+ className: "btn-modal-submit main-background-color " + (props.submitButton.className ? props.submitButton.className : ''),
661
+ loading: props.loading
662
+ }, props.submitButton))));
663
+ };
664
+ ModalComponent.defaultProps = {
665
+ modalSize: 'sm',
666
+ fullWidth: true,
667
+ loading: false,
668
+ dividers: true
669
+ };
670
+
671
+ exports.AppSidebar = AppSidebar;
393
672
  exports.ButtonComponent = ButtonComponent;
394
673
  exports.ChangePasswordForm = ChangePasswordForm;
395
674
  exports.LoginForm = LoginForm;
675
+ exports.MainLayoutSimple = MainLayoutSimple;
676
+ exports.ModalComponent = ModalComponent;
396
677
  exports.PublicFormWrapper = PublicFormWrapper;
397
678
  exports.ResetPasswordForm = ResetPasswordForm;
398
679
  exports.TextFieldComponent = TextFieldComponent;
680
+ exports.VerticalNav = VerticalNav;
399
681
  //# sourceMappingURL=techsbcn-storybook.cjs.development.js.map