techsbcn-storybook 0.2.1 → 0.2.2

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.
@@ -28,5 +28,5 @@ interface TextFieldComponentProps {
28
28
  onKeyUp?: (event: React.KeyboardEvent<HTMLInputElement>) => void;
29
29
  step?: number | string;
30
30
  }
31
- declare const TextFieldComponent: React.FC<TextFieldComponentProps>;
32
- export default TextFieldComponent;
31
+ export declare const TextFieldComponent: React.FC<TextFieldComponentProps>;
32
+ export {};
@@ -16,5 +16,5 @@ interface ChangePasswordFormProps {
16
16
  placeholder2?: string;
17
17
  };
18
18
  }
19
- declare const ChangePasswordForm: React.FC<ChangePasswordFormProps>;
20
- export default ChangePasswordForm;
19
+ export declare const ChangePasswordForm: React.FC<ChangePasswordFormProps>;
20
+ export {};
@@ -16,5 +16,5 @@ interface LoginFormProps {
16
16
  placeholder2?: string;
17
17
  };
18
18
  }
19
- declare const LoginForm: React.FC<LoginFormProps>;
20
- export default LoginForm;
19
+ export declare const LoginForm: React.FC<LoginFormProps>;
20
+ export {};
@@ -13,5 +13,5 @@ interface resetPasswordFormProps {
13
13
  placeholder?: string;
14
14
  };
15
15
  }
16
- declare const ResetPasswordForm: React.FC<resetPasswordFormProps>;
17
- export default ResetPasswordForm;
16
+ export declare const ResetPasswordForm: React.FC<resetPasswordFormProps>;
17
+ export {};
@@ -3,5 +3,5 @@ import './PublicFormWrapper.scss';
3
3
  interface PublicFormWrapperProps {
4
4
  className?: string;
5
5
  }
6
- declare const PublicFormWrapper: React.FC<PublicFormWrapperProps>;
7
- export default PublicFormWrapper;
6
+ export declare const PublicFormWrapper: React.FC<PublicFormWrapperProps>;
7
+ export {};
@@ -6,12 +6,12 @@ function _interopDefault (ex) { return (ex && (typeof ex === 'object') && 'defau
6
6
 
7
7
  var React = require('react');
8
8
  var React__default = _interopDefault(React);
9
- require('@mui/material');
9
+ var material = require('@mui/material');
10
10
  var _ = require('@mui/material/');
11
- require('yup');
12
- require('react-hook-form');
13
- require('@hookform/resolvers/yup');
14
- require('@mui/icons-material');
11
+ var yup = require('yup');
12
+ var reactHookForm = require('react-hook-form');
13
+ var yup$1 = require('@hookform/resolvers/yup');
14
+ var iconsMaterial = require('@mui/icons-material');
15
15
 
16
16
  function styleInject(css, ref) {
17
17
  if ( ref === void 0 ) ref = {};
@@ -43,6 +43,21 @@ function styleInject(css, ref) {
43
43
  var css_248z = ".public-form-wrapper .wrapper-box {\n background: white;\n border-radius: 5px;\n box-shadow: rgba(0, 0, 0, 0.2) 0px 11px 15px -7px, rgba(0, 0, 0, 0.14) 0px 24px 38px 3px, rgba(0, 0, 0, 0.12) 0px 9px 46px 8px;\n}";
44
44
  styleInject(css_248z);
45
45
 
46
+ var PublicFormWrapper = function PublicFormWrapper(props) {
47
+ return React__default.createElement(material.Box, {
48
+ height: "100%",
49
+ className: "public-form-wrapper " + (props.className ? props.className : ''),
50
+ display: "flex",
51
+ justifyContent: "center",
52
+ alignItems: "center"
53
+ }, React__default.createElement(material.Container, {
54
+ maxWidth: "xs"
55
+ }, React__default.createElement(material.Box, {
56
+ className: "wrapper-box",
57
+ p: 1
58
+ }, props.children)));
59
+ };
60
+
46
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}";
47
62
  styleInject(css_248z$1);
48
63
 
@@ -64,5 +79,321 @@ var ButtonComponent = function ButtonComponent(props) {
64
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}";
65
80
  styleInject(css_248z$2);
66
81
 
82
+ var TextFieldComponent = function TextFieldComponent(props) {
83
+ return React__default.createElement(_.Box, {
84
+ className: "text-field-component",
85
+ width: "100%"
86
+ }, React__default.createElement(_.TextField, {
87
+ error: props.error,
88
+ id: props.id,
89
+ label: props.label,
90
+ defaultValue: props.value,
91
+ className: props.className,
92
+ required: props.required,
93
+ disabled: props.disabled,
94
+ type: props.type,
95
+ placeholder: props.placeholder,
96
+ autoComplete: props.autoComplete,
97
+ variant: "standard",
98
+ ref: props.inputRef,
99
+ InputProps: {
100
+ disableUnderline: true,
101
+ startAdornment: props.startIcon,
102
+ endAdornment: props.endIcon,
103
+ inputProps: {
104
+ max: props.maxNumber,
105
+ min: props.minNumber,
106
+ step: props.step
107
+ }
108
+ },
109
+ InputLabelProps: {
110
+ shrink: true
111
+ },
112
+ helperText: props.helperText,
113
+ fullWidth: props.fullWidth,
114
+ multiline: props.multiline,
115
+ rows: props.rows,
116
+ onChange: props.onChange,
117
+ onKeyUp: props.onKeyUp,
118
+ inputProps: {
119
+ maxLength: props.maxLength,
120
+ step: props.step,
121
+ max: props.maxNumber,
122
+ min: props.minNumber
123
+ }
124
+ }));
125
+ };
126
+ TextFieldComponent.defaultProps = {
127
+ fullWidth: true,
128
+ type: 'text'
129
+ };
130
+
131
+ var LoginForm = function LoginForm(props) {
132
+ var LoginSchema = yup.object().shape({
133
+ email: yup.string().required(props.requiredText.requiredTextMail),
134
+ password: yup.string().required(props.requiredText.requiredTextPassword)
135
+ });
136
+
137
+ var _useState = React.useState(false),
138
+ showPassword = _useState[0],
139
+ setShownPassword = _useState[1];
140
+
141
+ var handleClickShowPassword = function handleClickShowPassword() {
142
+ setShownPassword(!showPassword);
143
+ };
144
+
145
+ var _useForm = reactHookForm.useForm({
146
+ resolver: yup$1.yupResolver(LoginSchema)
147
+ }),
148
+ control = _useForm.control,
149
+ handleSubmit = _useForm.handleSubmit,
150
+ errors = _useForm.formState.errors;
151
+
152
+ return React__default.createElement(material.Box, {
153
+ m: 2
154
+ }, props.topComponent && React__default.createElement(material.Box, {
155
+ m: 2
156
+ }, props.topComponent), React__default.createElement(material.Box, {
157
+ my: 2
158
+ }, React__default.createElement(material.Grid, {
159
+ container: true,
160
+ direction: "column",
161
+ spacing: 1
162
+ }, React__default.createElement(material.Grid, {
163
+ item: true
164
+ }, React__default.createElement(reactHookForm.Controller, {
165
+ control: control,
166
+ name: 'email',
167
+ render: function render(_ref) {
168
+ var _errors$email;
169
+
170
+ var _ref$field = _ref.field,
171
+ _onChange = _ref$field.onChange,
172
+ name = _ref$field.name,
173
+ ref = _ref$field.ref;
174
+ 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,
180
+ name: name,
181
+ inputRef: ref,
182
+ onChange: function onChange(e) {
183
+ _onChange(e);
184
+ }
185
+ });
186
+ }
187
+ })), React__default.createElement(material.Grid, {
188
+ item: true
189
+ }, React__default.createElement(reactHookForm.Controller, {
190
+ control: control,
191
+ name: 'password',
192
+ render: function render(_ref2) {
193
+ var _errors$password;
194
+
195
+ var _ref2$field = _ref2.field,
196
+ _onChange2 = _ref2$field.onChange,
197
+ name = _ref2$field.name,
198
+ ref = _ref2$field.ref;
199
+ return React__default.createElement(TextFieldComponent, {
200
+ label: props.valuesText.text2,
201
+ placeholder: props.valuesText.placeholder2,
202
+ type: showPassword ? 'text' : 'password',
203
+ error: !!errors.password,
204
+ helperText: (_errors$password = errors.password) == null ? void 0 : _errors$password.message,
205
+ name: name,
206
+ inputRef: ref,
207
+ onChange: function onChange(e) {
208
+ _onChange2(e);
209
+ },
210
+ endIcon: React__default.createElement(material.IconButton, {
211
+ "aria-label": "toggle password visibility",
212
+ onClick: handleClickShowPassword,
213
+ size: "small"
214
+ }, showPassword ? React__default.createElement(iconsMaterial.Visibility, null) : React__default.createElement(iconsMaterial.VisibilityOff, null))
215
+ });
216
+ }
217
+ })))), React__default.createElement(material.Box, {
218
+ mb: 5
219
+ }, React__default.createElement(ButtonComponent, {
220
+ label: props.valuesText.buttonText,
221
+ loading: props.loading,
222
+ className: "btn-login",
223
+ onClick: handleSubmit(props.onClick)
224
+ })), props.bottomComponent && React__default.createElement(material.Box, {
225
+ m: 2
226
+ }, props.bottomComponent));
227
+ };
228
+
229
+ var ChangePasswordForm = function ChangePasswordForm(props) {
230
+ var validationSchema = yup.object().shape({
231
+ password: yup.string().required(props.requiredText.requiredTextPassword),
232
+ passwordConfirmation: yup.string().when('password', function (password, schema) {
233
+ if (password) return schema.required(props.requiredText.requiredTextPassword);
234
+ }).oneOf([yup.ref('password'), null], props.requiredText.requiredTextSamePassword)
235
+ });
236
+
237
+ var _useForm = reactHookForm.useForm({
238
+ resolver: yup$1.yupResolver(validationSchema)
239
+ }),
240
+ handleSubmit = _useForm.handleSubmit,
241
+ control = _useForm.control,
242
+ errors = _useForm.formState.errors;
243
+
244
+ var _useState = React.useState(false),
245
+ showPassword = _useState[0],
246
+ setShownPassword = _useState[1];
247
+
248
+ var handleClickShowPassword = function handleClickShowPassword() {
249
+ setShownPassword(!showPassword);
250
+ };
251
+
252
+ var handleMouseDownPassword = function handleMouseDownPassword(event) {
253
+ event.preventDefault();
254
+ };
255
+
256
+ return React__default.createElement(_.Box, null, props.topComponent && React__default.createElement(_.Box, {
257
+ m: 2
258
+ }, props.topComponent), React__default.createElement(_.Box, {
259
+ m: 2
260
+ }, React__default.createElement(_.Grid, {
261
+ container: true,
262
+ direction: "column",
263
+ spacing: 1
264
+ }, React__default.createElement(_.Grid, {
265
+ item: true
266
+ }, React__default.createElement(reactHookForm.Controller, {
267
+ control: control,
268
+ name: 'password',
269
+ render: function render(_ref) {
270
+ var _errors$password;
271
+
272
+ var _ref$field = _ref.field,
273
+ _onChange = _ref$field.onChange,
274
+ name = _ref$field.name,
275
+ ref = _ref$field.ref;
276
+ return React__default.createElement(TextFieldComponent, {
277
+ label: props.valuesText.text1,
278
+ type: showPassword ? 'text' : 'password',
279
+ error: !!errors.password,
280
+ placeholder: props.valuesText.placeholder1,
281
+ helperText: (_errors$password = errors.password) == null ? void 0 : _errors$password.message,
282
+ name: name,
283
+ inputRef: ref,
284
+ onChange: function onChange(e) {
285
+ _onChange(e);
286
+ },
287
+ endIcon: React__default.createElement(_.IconButton, {
288
+ "aria-label": "toggle password visibility",
289
+ onClick: handleClickShowPassword,
290
+ onMouseDown: handleMouseDownPassword,
291
+ size: "small"
292
+ }, showPassword ? React__default.createElement(iconsMaterial.Visibility, null) : React__default.createElement(iconsMaterial.VisibilityOff, null))
293
+ });
294
+ }
295
+ })), React__default.createElement(_.Grid, {
296
+ item: true
297
+ }, React__default.createElement(reactHookForm.Controller, {
298
+ control: control,
299
+ name: 'passwordConfirmation',
300
+ render: function render(_ref2) {
301
+ var _errors$passwordConfi;
302
+
303
+ var _ref2$field = _ref2.field,
304
+ _onChange2 = _ref2$field.onChange,
305
+ name = _ref2$field.name,
306
+ ref = _ref2$field.ref;
307
+ return React__default.createElement(TextFieldComponent, {
308
+ label: props.valuesText.text2,
309
+ placeholder: props.valuesText.placeholder2,
310
+ type: showPassword ? 'text' : 'password',
311
+ error: !!errors.passwordConfirmation,
312
+ helperText: (_errors$passwordConfi = errors.passwordConfirmation) == null ? void 0 : _errors$passwordConfi.message,
313
+ name: name,
314
+ inputRef: ref,
315
+ onChange: function onChange(e) {
316
+ _onChange2(e);
317
+ },
318
+ endIcon: React__default.createElement(_.IconButton, {
319
+ "aria-label": "toggle password visibility",
320
+ onClick: handleClickShowPassword,
321
+ onMouseDown: handleMouseDownPassword,
322
+ size: "small"
323
+ }, showPassword ? React__default.createElement(iconsMaterial.Visibility, null) : React__default.createElement(iconsMaterial.VisibilityOff, null))
324
+ });
325
+ }
326
+ })))), React__default.createElement(_.Box, {
327
+ m: 2
328
+ }, React__default.createElement(ButtonComponent, {
329
+ label: props.valuesText.buttonText,
330
+ className: "btn-login",
331
+ onClick: handleSubmit(props.onClick),
332
+ loading: props.loading
333
+ })), props.bottomComponent && React__default.createElement(_.Box, {
334
+ m: 2
335
+ }, props.bottomComponent));
336
+ };
337
+
338
+ var ResetPasswordForm = function ResetPasswordForm(props) {
339
+ var ResetSchema = yup.object().shape({
340
+ email: yup.string().required(props.requiredText.requiredTextMail)
341
+ });
342
+
343
+ var _useForm = reactHookForm.useForm({
344
+ resolver: yup$1.yupResolver(ResetSchema)
345
+ }),
346
+ control = _useForm.control,
347
+ handleSubmit = _useForm.handleSubmit,
348
+ errors = _useForm.formState.errors;
349
+
350
+ return React__default.createElement(material.Box, {
351
+ m: 2
352
+ }, props.topComponent && React__default.createElement(material.Box, {
353
+ m: 2
354
+ }, props.topComponent), React__default.createElement(material.Box, {
355
+ mx: 2,
356
+ my: 2
357
+ }, React__default.createElement(reactHookForm.Controller, {
358
+ control: control,
359
+ name: 'email',
360
+ render: function render(_ref) {
361
+ var _errors$email;
362
+
363
+ var _ref$field = _ref.field,
364
+ _onChange = _ref$field.onChange,
365
+ name = _ref$field.name,
366
+ ref = _ref$field.ref;
367
+ return React__default.createElement(TextFieldComponent, {
368
+ label: props.valuesText.text,
369
+ placeholder: props.valuesText.placeholder,
370
+ autoComplete: "email",
371
+ error: !!errors.email,
372
+ helperText: (_errors$email = errors.email) == null ? void 0 : _errors$email.message,
373
+ name: name,
374
+ inputRef: ref,
375
+ onChange: function onChange(e) {
376
+ _onChange(e);
377
+ }
378
+ });
379
+ }
380
+ })), React__default.createElement(material.Box, {
381
+ mx: 2,
382
+ mb: 5
383
+ }, React__default.createElement(ButtonComponent, {
384
+ label: props.valuesText.buttonText,
385
+ className: "btn-login",
386
+ onClick: handleSubmit(props.onClick),
387
+ loading: props.loading
388
+ })), props.bottomComponent && React__default.createElement(material.Box, {
389
+ m: 2
390
+ }, props.bottomComponent));
391
+ };
392
+
67
393
  exports.ButtonComponent = ButtonComponent;
394
+ exports.ChangePasswordForm = ChangePasswordForm;
395
+ exports.LoginForm = LoginForm;
396
+ exports.PublicFormWrapper = PublicFormWrapper;
397
+ exports.ResetPasswordForm = ResetPasswordForm;
398
+ exports.TextFieldComponent = TextFieldComponent;
68
399
  //# sourceMappingURL=techsbcn-storybook.cjs.development.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"techsbcn-storybook.cjs.development.js","sources":["../node_modules/style-inject/dist/style-inject.es.js","../src/components/fields/ButtonComponent/ButtonComponent.tsx"],"sourcesContent":["function styleInject(css, ref) {\n if ( ref === void 0 ) ref = {};\n var insertAt = ref.insertAt;\n\n if (!css || typeof document === 'undefined') { return; }\n\n var head = document.head || document.getElementsByTagName('head')[0];\n var style = document.createElement('style');\n style.type = 'text/css';\n\n if (insertAt === 'top') {\n if (head.firstChild) {\n head.insertBefore(style, head.firstChild);\n } else {\n head.appendChild(style);\n }\n } else {\n head.appendChild(style);\n }\n\n if (style.styleSheet) {\n style.styleSheet.cssText = css;\n } else {\n style.appendChild(document.createTextNode(css));\n }\n}\n\nexport default styleInject;\n","import React from 'react';\r\nimport { Button, CircularProgress } from '@mui/material/';\r\nimport './ButtonComponent.scss';\r\n\r\nexport interface ButtonComponentProps {\r\n className?: string;\r\n label?: string;\r\n startIcon?: React.ReactNode;\r\n endIcon?: React.ReactNode;\r\n onClick?: () => void;\r\n loading?: boolean;\r\n form?: string;\r\n type?: 'button' | 'submit' | 'reset';\r\n disabled?: boolean;\r\n}\r\n\r\nexport const ButtonComponent: React.FC<ButtonComponentProps> = (props) => {\r\n return (\r\n <Button\r\n type={props.type && props.type}\r\n variant=\"contained\"\r\n form={props.form && props.form}\r\n className={`main-background-color ${props.className ? props.className : ''}`}\r\n startIcon={!props.loading && props.startIcon}\r\n endIcon={!props.loading && props.endIcon}\r\n onClick={props.onClick}\r\n disabled={!props.loading && props.disabled}\r\n >\r\n {props.loading ? <CircularProgress size={25} /> : props.label}\r\n </Button>\r\n );\r\n};\r\n"],"names":["ButtonComponent","props","React","Button","type","variant","form","className","startIcon","loading","endIcon","onClick","disabled","CircularProgress","size","label"],"mappings":";;;;;;;;;;;;;;;AAAA,SAAS,WAAW,CAAC,GAAG,EAAE,GAAG,EAAE;AAC/B,EAAE,KAAK,GAAG,KAAK,KAAK,CAAC,GAAG,GAAG,GAAG,EAAE,CAAC;AACjC,EAAE,IAAI,QAAQ,GAAG,GAAG,CAAC,QAAQ,CAAC;AAC9B;AACA,EAAE,IAAI,CAAC,GAAG,IAAI,OAAO,QAAQ,KAAK,WAAW,EAAE,EAAE,OAAO,EAAE;AAC1D;AACA,EAAE,IAAI,IAAI,GAAG,QAAQ,CAAC,IAAI,IAAI,QAAQ,CAAC,oBAAoB,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC;AACvE,EAAE,IAAI,KAAK,GAAG,QAAQ,CAAC,aAAa,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,EAUGX,KAAK,CAACQ,OAAN,GAAgBP,4BAAA,CAACW,kBAAD;AAAkBC,IAAAA,IAAI,EAAE;GAAxB,CAAhB,GAAiDb,KAAK,CAACc,KAV1D,CADF;AAcD,CAfM;;;;;;;"}
1
+ {"version":3,"file":"techsbcn-storybook.cjs.development.js","sources":["../node_modules/style-inject/dist/style-inject.es.js","../src/components/wrappers/PublicFormWrapper/PublicFormWrapper.tsx","../src/components/fields/ButtonComponent/ButtonComponent.tsx","../src/components/fields/TextFieldComponent/TextFieldComponent.tsx","../src/components/forms/LoginForm.tsx","../src/components/forms/ChangePasswordForm.tsx","../src/components/forms/ResetPasswordForm.tsx"],"sourcesContent":["function styleInject(css, ref) {\n if ( ref === void 0 ) ref = {};\n var insertAt = ref.insertAt;\n\n if (!css || typeof document === 'undefined') { return; }\n\n var head = document.head || document.getElementsByTagName('head')[0];\n var style = document.createElement('style');\n style.type = 'text/css';\n\n if (insertAt === 'top') {\n if (head.firstChild) {\n head.insertBefore(style, head.firstChild);\n } else {\n head.appendChild(style);\n }\n } else {\n head.appendChild(style);\n }\n\n if (style.styleSheet) {\n style.styleSheet.cssText = css;\n } else {\n style.appendChild(document.createTextNode(css));\n }\n}\n\nexport default styleInject;\n","import React from 'react';\r\nimport { Box, Container } from '@mui/material';\r\nimport './PublicFormWrapper.scss';\r\n\r\ninterface PublicFormWrapperProps {\r\n className?: string;\r\n}\r\n\r\nexport const PublicFormWrapper: React.FC<PublicFormWrapperProps> = (props) => {\r\n return (\r\n <Box\r\n height=\"100%\"\r\n className={`public-form-wrapper ${props.className ? props.className : ''}`}\r\n display=\"flex\"\r\n justifyContent=\"center\"\r\n alignItems=\"center\"\r\n >\r\n <Container maxWidth=\"xs\">\r\n <Box className=\"wrapper-box\" p={1}>\r\n {props.children}\r\n </Box>\r\n </Container>\r\n </Box>\r\n );\r\n};\r\n","import React from 'react';\r\nimport { Button, CircularProgress } from '@mui/material/';\r\nimport './ButtonComponent.scss';\r\n\r\nexport interface ButtonComponentProps {\r\n className?: string;\r\n label?: string;\r\n startIcon?: React.ReactNode;\r\n endIcon?: React.ReactNode;\r\n onClick?: () => void;\r\n loading?: boolean;\r\n form?: string;\r\n type?: 'button' | 'submit' | 'reset';\r\n disabled?: boolean;\r\n}\r\n\r\nexport const ButtonComponent: React.FC<ButtonComponentProps> = (props) => {\r\n return (\r\n <Button\r\n type={props.type && props.type}\r\n variant=\"contained\"\r\n form={props.form && props.form}\r\n className={`main-background-color ${props.className ? props.className : ''}`}\r\n startIcon={!props.loading && props.startIcon}\r\n endIcon={!props.loading && props.endIcon}\r\n onClick={props.onClick}\r\n disabled={!props.loading && props.disabled}\r\n >\r\n {props.loading ? <CircularProgress size={25} /> : props.label}\r\n </Button>\r\n );\r\n};\r\n","import React from 'react';\r\nimport { TextField, Box } from '@mui/material/';\r\nimport './TextFieldComponent.scss';\r\n\r\nexport type InputType =\r\n | 'text'\r\n | 'radio'\r\n | 'checkbox'\r\n | 'textarea'\r\n | 'submit'\r\n | 'date'\r\n | 'hidden'\r\n | 'number'\r\n | 'range'\r\n | 'password'\r\n | 'time'\r\n | 'file';\r\n\r\ninterface TextFieldComponentProps {\r\n id?: string;\r\n label?: string;\r\n name?: string;\r\n value?: string | number;\r\n className?: string;\r\n type?: InputType;\r\n placeholder?: string;\r\n required?: boolean;\r\n disabled?: boolean;\r\n minNumber?: number;\r\n maxNumber?: number;\r\n error?: boolean;\r\n startIcon?: React.ReactNode;\r\n endIcon?: React.ReactNode;\r\n fullWidth?: boolean;\r\n helperText?: string;\r\n textFieldRef?: any;\r\n inputRef?: React.Ref<any>;\r\n autoComplete?: string;\r\n multiline?: boolean;\r\n rows?: number;\r\n maxLength?: number;\r\n onChange?: (event: React.ChangeEvent<HTMLInputElement>) => void;\r\n onKeyUp?: (event: React.KeyboardEvent<HTMLInputElement>) => void;\r\n step?: number | string;\r\n}\r\n\r\nexport const TextFieldComponent: React.FC<TextFieldComponentProps> = (props) => {\r\n return (\r\n <Box className=\"text-field-component\" width=\"100%\">\r\n <TextField\r\n error={props.error}\r\n id={props.id}\r\n label={props.label}\r\n defaultValue={props.value}\r\n className={props.className}\r\n required={props.required}\r\n disabled={props.disabled}\r\n type={props.type}\r\n placeholder={props.placeholder}\r\n autoComplete={props.autoComplete}\r\n variant=\"standard\"\r\n ref={props.inputRef}\r\n InputProps={{\r\n disableUnderline: true,\r\n startAdornment: props.startIcon,\r\n endAdornment: props.endIcon,\r\n inputProps: {\r\n max: props.maxNumber,\r\n min: props.minNumber,\r\n step: props.step,\r\n },\r\n }}\r\n InputLabelProps={{ shrink: true }}\r\n helperText={props.helperText}\r\n fullWidth={props.fullWidth}\r\n multiline={props.multiline}\r\n rows={props.rows}\r\n onChange={props.onChange}\r\n onKeyUp={props.onKeyUp}\r\n inputProps={{\r\n maxLength: props.maxLength,\r\n step: props.step,\r\n max: props.maxNumber,\r\n min: props.minNumber,\r\n }}\r\n />\r\n </Box>\r\n );\r\n};\r\n\r\nTextFieldComponent.defaultProps = {\r\n fullWidth: true,\r\n type: 'text',\r\n};\r\n","import React, { useState } from 'react';\r\nimport { Box, Grid, IconButton } from '@mui/material';\r\nimport * as yup from 'yup';\r\nimport { useForm, Controller } from 'react-hook-form';\r\nimport { yupResolver } from '@hookform/resolvers/yup';\r\nimport { Visibility, VisibilityOff } from '@mui/icons-material';\r\nimport { TextFieldComponent } from '../fields/TextFieldComponent/TextFieldComponent';\r\nimport { ButtonComponent } from '../fields/ButtonComponent/ButtonComponent';\r\n\r\ninterface LoginFormProps {\r\n onClick: (data: any) => void;\r\n topComponent?: React.ReactNode;\r\n bottomComponent?: React.ReactNode;\r\n loading: boolean;\r\n requiredText: { requiredTextMail: string; requiredTextPassword: string };\r\n valuesText: { buttonText: string; text1: string; placeholder1?: string; text2: string; placeholder2?: string };\r\n}\r\n\r\nexport const LoginForm: React.FC<LoginFormProps> = (props) => {\r\n const LoginSchema = yup.object().shape({\r\n email: yup.string().required(props.requiredText.requiredTextMail),\r\n password: yup.string().required(props.requiredText.requiredTextPassword),\r\n });\r\n\r\n const [showPassword, setShownPassword] = useState(false);\r\n const handleClickShowPassword = () => {\r\n setShownPassword(!showPassword);\r\n };\r\n\r\n const {\r\n control,\r\n handleSubmit,\r\n formState: { errors },\r\n } = useForm({\r\n resolver: yupResolver(LoginSchema),\r\n });\r\n\r\n return (\r\n <Box m={2}>\r\n {props.topComponent && <Box m={2}>{props.topComponent}</Box>}\r\n <Box my={2}>\r\n <Grid container direction=\"column\" spacing={1}>\r\n <Grid item>\r\n <Controller\r\n control={control}\r\n name={'email'}\r\n render={({ field: { onChange, name, ref } }) => (\r\n <TextFieldComponent\r\n label={props.valuesText.text1}\r\n placeholder={props.valuesText.placeholder1}\r\n autoComplete=\"email\"\r\n error={!!errors.email}\r\n helperText={errors.email?.message}\r\n name={name}\r\n inputRef={ref}\r\n onChange={(e) => {\r\n onChange(e);\r\n }}\r\n />\r\n )}\r\n />\r\n </Grid>\r\n <Grid item>\r\n <Controller\r\n control={control}\r\n name={'password'}\r\n render={({ field: { onChange, name, ref } }) => (\r\n <TextFieldComponent\r\n label={props.valuesText.text2}\r\n placeholder={props.valuesText.placeholder2}\r\n type={showPassword ? 'text' : 'password'}\r\n error={!!errors.password}\r\n helperText={errors.password?.message}\r\n name={name}\r\n inputRef={ref}\r\n onChange={(e) => {\r\n onChange(e);\r\n }}\r\n endIcon={\r\n <IconButton aria-label=\"toggle password visibility\" onClick={handleClickShowPassword} size=\"small\">\r\n {showPassword ? <Visibility /> : <VisibilityOff />}\r\n </IconButton>\r\n }\r\n />\r\n )}\r\n />\r\n </Grid>\r\n </Grid>\r\n </Box>\r\n <Box mb={5}>\r\n <ButtonComponent\r\n label={props.valuesText.buttonText}\r\n loading={props.loading}\r\n className=\"btn-login\"\r\n onClick={handleSubmit(props.onClick)}\r\n />\r\n </Box>\r\n {props.bottomComponent && <Box m={2}>{props.bottomComponent}</Box>}\r\n </Box>\r\n );\r\n};\r\n","import React, { useState } from 'react';\r\nimport { Box, Grid, IconButton } from '@mui/material/';\r\nimport { Visibility, VisibilityOff } from '@mui/icons-material';\r\nimport { useForm, Controller } from 'react-hook-form';\r\nimport * as yup from 'yup';\r\nimport { yupResolver } from '@hookform/resolvers/yup';\r\nimport { TextFieldComponent } from '../fields/TextFieldComponent/TextFieldComponent';\r\nimport { ButtonComponent } from '../fields/ButtonComponent/ButtonComponent';\r\n\r\ninterface ChangePasswordFormProps {\r\n onClick: (data: any) => void;\r\n loading: boolean;\r\n topComponent?: React.ReactNode;\r\n bottomComponent?: React.ReactNode;\r\n requiredText: { requiredTextPassword: string; requiredTextSamePassword: string };\r\n valuesText: { buttonText: string; text1: string; placeholder1?: string; text2: string; placeholder2?: string };\r\n}\r\n\r\nexport const ChangePasswordForm: React.FC<ChangePasswordFormProps> = (props) => {\r\n const validationSchema = yup.object().shape({\r\n password: yup.string().required(props.requiredText.requiredTextPassword),\r\n passwordConfirmation: yup\r\n .string()\r\n .when('password', (password: any, schema: any) => {\r\n if (password) return schema.required(props.requiredText.requiredTextPassword);\r\n })\r\n .oneOf([yup.ref('password'), null], props.requiredText.requiredTextSamePassword),\r\n });\r\n\r\n const {\r\n handleSubmit,\r\n control,\r\n formState: { errors },\r\n } = useForm({\r\n resolver: yupResolver(validationSchema),\r\n });\r\n\r\n const [showPassword, setShownPassword] = useState(false);\r\n\r\n const handleClickShowPassword = () => {\r\n setShownPassword(!showPassword);\r\n };\r\n\r\n const handleMouseDownPassword = (event: React.MouseEvent<HTMLButtonElement>) => {\r\n event.preventDefault();\r\n };\r\n\r\n return (\r\n <Box>\r\n {props.topComponent && <Box m={2}>{props.topComponent}</Box>}\r\n <Box m={2}>\r\n <Grid container direction=\"column\" spacing={1}>\r\n <Grid item>\r\n <Controller\r\n control={control}\r\n name={'password'}\r\n render={({ field: { onChange, name, ref } }) => (\r\n <TextFieldComponent\r\n label={props.valuesText.text1}\r\n type={showPassword ? 'text' : 'password'}\r\n error={!!errors.password}\r\n placeholder={props.valuesText.placeholder1}\r\n helperText={errors.password?.message}\r\n name={name}\r\n inputRef={ref}\r\n onChange={(e) => {\r\n onChange(e);\r\n }}\r\n endIcon={\r\n <IconButton\r\n aria-label=\"toggle password visibility\"\r\n onClick={handleClickShowPassword}\r\n onMouseDown={handleMouseDownPassword}\r\n size=\"small\"\r\n >\r\n {showPassword ? <Visibility /> : <VisibilityOff />}\r\n </IconButton>\r\n }\r\n />\r\n )}\r\n />\r\n </Grid>\r\n <Grid item>\r\n <Controller\r\n control={control}\r\n name={'passwordConfirmation'}\r\n render={({ field: { onChange, name, ref } }) => (\r\n <TextFieldComponent\r\n label={props.valuesText.text2}\r\n placeholder={props.valuesText.placeholder2}\r\n type={showPassword ? 'text' : 'password'}\r\n error={!!errors.passwordConfirmation}\r\n helperText={errors.passwordConfirmation?.message}\r\n name={name}\r\n inputRef={ref}\r\n onChange={(e) => {\r\n onChange(e);\r\n }}\r\n endIcon={\r\n <IconButton\r\n aria-label=\"toggle password visibility\"\r\n onClick={handleClickShowPassword}\r\n onMouseDown={handleMouseDownPassword}\r\n size=\"small\"\r\n >\r\n {showPassword ? <Visibility /> : <VisibilityOff />}\r\n </IconButton>\r\n }\r\n />\r\n )}\r\n />\r\n </Grid>\r\n </Grid>\r\n </Box>\r\n <Box m={2}>\r\n <ButtonComponent\r\n label={props.valuesText.buttonText}\r\n className=\"btn-login\"\r\n onClick={handleSubmit(props.onClick)}\r\n loading={props.loading}\r\n />\r\n </Box>\r\n {props.bottomComponent && <Box m={2}>{props.bottomComponent}</Box>}\r\n </Box>\r\n );\r\n};\r\n","import React from 'react';\r\nimport { Box } from '@mui/material';\r\nimport * as yup from 'yup';\r\nimport { useForm, Controller } from 'react-hook-form';\r\nimport { yupResolver } from '@hookform/resolvers/yup';\r\nimport { TextFieldComponent } from '../fields/TextFieldComponent/TextFieldComponent';\r\nimport { ButtonComponent } from '../fields/ButtonComponent/ButtonComponent';\r\n\r\ninterface resetPasswordFormProps {\r\n onClick: (data: any) => void;\r\n loading: boolean;\r\n topComponent?: React.ReactNode;\r\n bottomComponent?: React.ReactNode;\r\n requiredText: { requiredTextMail: string };\r\n valuesText: { buttonText: string; text: string; placeholder?: string };\r\n}\r\n\r\nexport const ResetPasswordForm: React.FC<resetPasswordFormProps> = (props) => {\r\n const ResetSchema = yup.object().shape({\r\n email: yup.string().required(props.requiredText.requiredTextMail),\r\n });\r\n\r\n const {\r\n control,\r\n handleSubmit,\r\n formState: { errors },\r\n } = useForm({\r\n resolver: yupResolver(ResetSchema),\r\n });\r\n\r\n return (\r\n <Box m={2}>\r\n {props.topComponent && <Box m={2}>{props.topComponent}</Box>}\r\n <Box mx={2} my={2}>\r\n <Controller\r\n control={control}\r\n name={'email'}\r\n render={({ field: { onChange, name, ref } }) => (\r\n <TextFieldComponent\r\n label={props.valuesText.text}\r\n placeholder={props.valuesText.placeholder}\r\n autoComplete=\"email\"\r\n error={!!errors.email}\r\n helperText={errors.email?.message}\r\n name={name}\r\n inputRef={ref}\r\n onChange={(e) => {\r\n onChange(e);\r\n }}\r\n />\r\n )}\r\n />\r\n </Box>\r\n <Box mx={2} mb={5}>\r\n <ButtonComponent\r\n label={props.valuesText.buttonText}\r\n className=\"btn-login\"\r\n onClick={handleSubmit(props.onClick)}\r\n loading={props.loading}\r\n />\r\n </Box>\r\n {props.bottomComponent && <Box m={2}>{props.bottomComponent}</Box>}\r\n </Box>\r\n );\r\n};\r\n"],"names":["PublicFormWrapper","props","React","Box","height","className","display","justifyContent","alignItems","Container","maxWidth","p","children","ButtonComponent","Button","type","variant","form","startIcon","loading","endIcon","onClick","disabled","CircularProgress","size","label","TextFieldComponent","width","TextField","error","id","defaultValue","value","required","placeholder","autoComplete","ref","inputRef","InputProps","disableUnderline","startAdornment","endAdornment","inputProps","max","maxNumber","min","minNumber","step","InputLabelProps","shrink","helperText","fullWidth","multiline","rows","onChange","onKeyUp","maxLength","defaultProps","LoginForm","LoginSchema","yup","shape","email","requiredText","requiredTextMail","password","requiredTextPassword","useState","showPassword","setShownPassword","handleClickShowPassword","useForm","resolver","yupResolver","control","handleSubmit","errors","formState","m","topComponent","my","Grid","container","direction","spacing","item","Controller","name","render","field","valuesText","text1","placeholder1","message","e","text2","placeholder2","IconButton","Visibility","VisibilityOff","mb","buttonText","bottomComponent","ChangePasswordForm","validationSchema","passwordConfirmation","when","schema","oneOf","requiredTextSamePassword","handleMouseDownPassword","event","preventDefault","onMouseDown","ResetPasswordForm","ResetSchema","mx","text"],"mappings":";;;;;;;;;;;;;;;AAAA,SAAS,WAAW,CAAC,GAAG,EAAE,GAAG,EAAE;AAC/B,EAAE,KAAK,GAAG,KAAK,KAAK,CAAC,GAAG,GAAG,GAAG,EAAE,CAAC;AACjC,EAAE,IAAI,QAAQ,GAAG,GAAG,CAAC,QAAQ,CAAC;AAC9B;AACA,EAAE,IAAI,CAAC,GAAG,IAAI,OAAO,QAAQ,KAAK,WAAW,EAAE,EAAE,OAAO,EAAE;AAC1D;AACA,EAAE,IAAI,IAAI,GAAG,QAAQ,CAAC,IAAI,IAAI,QAAQ,CAAC,oBAAoB,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC;AACvE,EAAE,IAAI,KAAK,GAAG,QAAQ,CAAC,aAAa,CAAC,OAAO,CAAC,CAAC;AAC9C,EAAE,KAAK,CAAC,IAAI,GAAG,UAAU,CAAC;AAC1B;AACA,EAAE,IAAI,QAAQ,KAAK,KAAK,EAAE;AAC1B,IAAI,IAAI,IAAI,CAAC,UAAU,EAAE;AACzB,MAAM,IAAI,CAAC,YAAY,CAAC,KAAK,EAAE,IAAI,CAAC,UAAU,CAAC,CAAC;AAChD,KAAK,MAAM;AACX,MAAM,IAAI,CAAC,WAAW,CAAC,KAAK,CAAC,CAAC;AAC9B,KAAK;AACL,GAAG,MAAM;AACT,IAAI,IAAI,CAAC,WAAW,CAAC,KAAK,CAAC,CAAC;AAC5B,GAAG;AACH;AACA,EAAE,IAAI,KAAK,CAAC,UAAU,EAAE;AACxB,IAAI,KAAK,CAAC,UAAU,CAAC,OAAO,GA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esModule",{value:!0});var t,o=(t=require("react"))&&"object"==typeof t&&"default"in t?t.default:t;require("@mui/material");var n=require("@mui/material/");function e(t,o){void 0===o&&(o={});var n=o.insertAt;if(t&&"undefined"!=typeof document){var e=document.head||document.getElementsByTagName("head")[0],r=document.createElement("style");r.type="text/css","top"===n&&e.firstChild?e.insertBefore(r,e.firstChild):e.appendChild(r),r.styleSheet?r.styleSheet.cssText=t:r.appendChild(document.createTextNode(t))}}require("yup"),require("react-hook-form"),require("@hookform/resolvers/yup"),require("@mui/icons-material"),e(".public-form-wrapper .wrapper-box {\n background: white;\n border-radius: 5px;\n box-shadow: rgba(0, 0, 0, 0.2) 0px 11px 15px -7px, rgba(0, 0, 0, 0.14) 0px 24px 38px 3px, rgba(0, 0, 0, 0.12) 0px 9px 46px 8px;\n}"),e(".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}"),e(".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}"),exports.ButtonComponent=function(t){return o.createElement(n.Button,{type:t.type&&t.type,variant:"contained",form:t.form&&t.form,className:"main-background-color "+(t.className?t.className:""),startIcon:!t.loading&&t.startIcon,endIcon:!t.loading&&t.endIcon,onClick:t.onClick,disabled:!t.loading&&t.disabled},t.loading?o.createElement(n.CircularProgress,{size:25}):t.label)};
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e,t=require("react"),n=(e=t)&&"object"==typeof e&&"default"in e?e.default:e,o=require("@mui/material"),r=require("@mui/material/"),a=require("yup"),l=require("react-hook-form"),i=require("@hookform/resolvers/yup"),m=require("@mui/icons-material");function s(e,t){void 0===t&&(t={});var n=t.insertAt;if(e&&"undefined"!=typeof document){var o=document.head||document.getElementsByTagName("head")[0],r=document.createElement("style");r.type="text/css","top"===n&&o.firstChild?o.insertBefore(r,o.firstChild):o.appendChild(r),r.styleSheet?r.styleSheet.cssText=e:r.appendChild(document.createTextNode(e))}}s(".public-form-wrapper .wrapper-box {\n background: white;\n border-radius: 5px;\n box-shadow: rgba(0, 0, 0, 0.2) 0px 11px 15px -7px, rgba(0, 0, 0, 0.14) 0px 24px 38px 3px, rgba(0, 0, 0, 0.12) 0px 9px 46px 8px;\n}"),s(".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}");var p=function(e){return n.createElement(r.Button,{type:e.type&&e.type,variant:"contained",form:e.form&&e.form,className:"main-background-color "+(e.className?e.className:""),startIcon:!e.loading&&e.startIcon,endIcon:!e.loading&&e.endIcon,onClick:e.onClick,disabled:!e.loading&&e.disabled},e.loading?n.createElement(r.CircularProgress,{size:25}):e.label)};s(".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}");var u=function(e){return n.createElement(r.Box,{className:"text-field-component",width:"100%"},n.createElement(r.TextField,{error:e.error,id:e.id,label:e.label,defaultValue:e.value,className:e.className,required:e.required,disabled:e.disabled,type:e.type,placeholder:e.placeholder,autoComplete:e.autoComplete,variant:"standard",ref:e.inputRef,InputProps:{disableUnderline:!0,startAdornment:e.startIcon,endAdornment:e.endIcon,inputProps:{max:e.maxNumber,min:e.minNumber,step:e.step}},InputLabelProps:{shrink:!0},helperText:e.helperText,fullWidth:e.fullWidth,multiline:e.multiline,rows:e.rows,onChange:e.onChange,onKeyUp:e.onKeyUp,inputProps:{maxLength:e.maxLength,step:e.step,max:e.maxNumber,min:e.minNumber}}))};u.defaultProps={fullWidth:!0,type:"text"},exports.ButtonComponent=p,exports.ChangePasswordForm=function(e){var o=a.object().shape({password:a.string().required(e.requiredText.requiredTextPassword),passwordConfirmation:a.string().when("password",(function(t,n){if(t)return n.required(e.requiredText.requiredTextPassword)})).oneOf([a.ref("password"),null],e.requiredText.requiredTextSamePassword)}),s=l.useForm({resolver:i.yupResolver(o)}),c=s.handleSubmit,d=s.control,x=s.formState.errors,f=t.useState(!1),b=f[0],h=f[1],g=function(){h(!b)},C=function(e){e.preventDefault()};return n.createElement(r.Box,null,e.topComponent&&n.createElement(r.Box,{m:2},e.topComponent),n.createElement(r.Box,{m:2},n.createElement(r.Grid,{container:!0,direction:"column",spacing:1},n.createElement(r.Grid,{item:!0},n.createElement(l.Controller,{control:d,name:"password",render:function(t){var o,a=t.field,l=a.onChange;return n.createElement(u,{label:e.valuesText.text1,type:b?"text":"password",error:!!x.password,placeholder:e.valuesText.placeholder1,helperText:null==(o=x.password)?void 0:o.message,name:a.name,inputRef:a.ref,onChange:function(e){l(e)},endIcon:n.createElement(r.IconButton,{"aria-label":"toggle password visibility",onClick:g,onMouseDown:C,size:"small"},n.createElement(b?m.Visibility:m.VisibilityOff,null))})}})),n.createElement(r.Grid,{item:!0},n.createElement(l.Controller,{control:d,name:"passwordConfirmation",render:function(t){var o,a=t.field,l=a.onChange;return n.createElement(u,{label:e.valuesText.text2,placeholder:e.valuesText.placeholder2,type:b?"text":"password",error:!!x.passwordConfirmation,helperText:null==(o=x.passwordConfirmation)?void 0:o.message,name:a.name,inputRef:a.ref,onChange:function(e){l(e)},endIcon:n.createElement(r.IconButton,{"aria-label":"toggle password visibility",onClick:g,onMouseDown:C,size:"small"},n.createElement(b?m.Visibility:m.VisibilityOff,null))})}})))),n.createElement(r.Box,{m:2},n.createElement(p,{label:e.valuesText.buttonText,className:"btn-login",onClick:c(e.onClick),loading:e.loading})),e.bottomComponent&&n.createElement(r.Box,{m:2},e.bottomComponent))},exports.LoginForm=function(e){var r=a.object().shape({email:a.string().required(e.requiredText.requiredTextMail),password:a.string().required(e.requiredText.requiredTextPassword)}),s=t.useState(!1),c=s[0],d=s[1],x=function(){d(!c)},f=l.useForm({resolver:i.yupResolver(r)}),b=f.control,h=f.handleSubmit,g=f.formState.errors;return n.createElement(o.Box,{m:2},e.topComponent&&n.createElement(o.Box,{m:2},e.topComponent),n.createElement(o.Box,{my:2},n.createElement(o.Grid,{container:!0,direction:"column",spacing:1},n.createElement(o.Grid,{item:!0},n.createElement(l.Controller,{control:b,name:"email",render:function(t){var o,r=t.field,a=r.onChange;return n.createElement(u,{label:e.valuesText.text1,placeholder:e.valuesText.placeholder1,autoComplete:"email",error:!!g.email,helperText:null==(o=g.email)?void 0:o.message,name:r.name,inputRef:r.ref,onChange:function(e){a(e)}})}})),n.createElement(o.Grid,{item:!0},n.createElement(l.Controller,{control:b,name:"password",render:function(t){var r,a=t.field,l=a.onChange;return n.createElement(u,{label:e.valuesText.text2,placeholder:e.valuesText.placeholder2,type:c?"text":"password",error:!!g.password,helperText:null==(r=g.password)?void 0:r.message,name:a.name,inputRef:a.ref,onChange:function(e){l(e)},endIcon:n.createElement(o.IconButton,{"aria-label":"toggle password visibility",onClick:x,size:"small"},n.createElement(c?m.Visibility:m.VisibilityOff,null))})}})))),n.createElement(o.Box,{mb:5},n.createElement(p,{label:e.valuesText.buttonText,loading:e.loading,className:"btn-login",onClick:h(e.onClick)})),e.bottomComponent&&n.createElement(o.Box,{m:2},e.bottomComponent))},exports.PublicFormWrapper=function(e){return n.createElement(o.Box,{height:"100%",className:"public-form-wrapper "+(e.className?e.className:""),display:"flex",justifyContent:"center",alignItems:"center"},n.createElement(o.Container,{maxWidth:"xs"},n.createElement(o.Box,{className:"wrapper-box",p:1},e.children)))},exports.ResetPasswordForm=function(e){var t=a.object().shape({email:a.string().required(e.requiredText.requiredTextMail)}),r=l.useForm({resolver:i.yupResolver(t)}),m=r.control,s=r.handleSubmit,c=r.formState.errors;return n.createElement(o.Box,{m:2},e.topComponent&&n.createElement(o.Box,{m:2},e.topComponent),n.createElement(o.Box,{mx:2,my:2},n.createElement(l.Controller,{control:m,name:"email",render:function(t){var o,r=t.field,a=r.onChange;return n.createElement(u,{label:e.valuesText.text,placeholder:e.valuesText.placeholder,autoComplete:"email",error:!!c.email,helperText:null==(o=c.email)?void 0:o.message,name:r.name,inputRef:r.ref,onChange:function(e){a(e)}})}})),n.createElement(o.Box,{mx:2,mb:5},n.createElement(p,{label:e.valuesText.buttonText,className:"btn-login",onClick:s(e.onClick),loading:e.loading})),e.bottomComponent&&n.createElement(o.Box,{m:2},e.bottomComponent))},exports.TextFieldComponent=u;
2
2
  //# sourceMappingURL=techsbcn-storybook.cjs.production.min.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"techsbcn-storybook.cjs.production.min.js","sources":["../node_modules/style-inject/dist/style-inject.es.js","../src/components/fields/ButtonComponent/ButtonComponent.tsx"],"sourcesContent":["function styleInject(css, ref) {\n if ( ref === void 0 ) ref = {};\n var insertAt = ref.insertAt;\n\n if (!css || typeof document === 'undefined') { return; }\n\n var head = document.head || document.getElementsByTagName('head')[0];\n var style = document.createElement('style');\n style.type = 'text/css';\n\n if (insertAt === 'top') {\n if (head.firstChild) {\n head.insertBefore(style, head.firstChild);\n } else {\n head.appendChild(style);\n }\n } else {\n head.appendChild(style);\n }\n\n if (style.styleSheet) {\n style.styleSheet.cssText = css;\n } else {\n style.appendChild(document.createTextNode(css));\n }\n}\n\nexport default styleInject;\n","import React from 'react';\r\nimport { Button, CircularProgress } from '@mui/material/';\r\nimport './ButtonComponent.scss';\r\n\r\nexport interface ButtonComponentProps {\r\n className?: string;\r\n label?: string;\r\n startIcon?: React.ReactNode;\r\n endIcon?: React.ReactNode;\r\n onClick?: () => void;\r\n loading?: boolean;\r\n form?: string;\r\n type?: 'button' | 'submit' | 'reset';\r\n disabled?: boolean;\r\n}\r\n\r\nexport const ButtonComponent: React.FC<ButtonComponentProps> = (props) => {\r\n return (\r\n <Button\r\n type={props.type && props.type}\r\n variant=\"contained\"\r\n form={props.form && props.form}\r\n className={`main-background-color ${props.className ? props.className : ''}`}\r\n startIcon={!props.loading && props.startIcon}\r\n endIcon={!props.loading && props.endIcon}\r\n onClick={props.onClick}\r\n disabled={!props.loading && props.disabled}\r\n >\r\n {props.loading ? <CircularProgress size={25} /> : props.label}\r\n </Button>\r\n );\r\n};\r\n"],"names":["styleInject","css","ref","insertAt","document","head","getElementsByTagName","style","createElement","type","firstChild","insertBefore","appendChild","styleSheet","cssText","createTextNode","props","React","Button","variant","form","className","startIcon","loading","endIcon","onClick","disabled","CircularProgress","size","label"],"mappings":"yMAAA,SAASA,EAAYC,EAAKC,QACX,IAARA,IAAiBA,EAAM,IAC5B,IAAIC,EAAWD,EAAIC,SAEnB,GAAKF,GAA2B,oBAAbG,SAAnB,CAEA,IAAIC,EAAOD,SAASC,MAAQD,SAASE,qBAAqB,QAAQ,GAC9DC,EAAQH,SAASI,cAAc,SACnCD,EAAME,KAAO,WAEI,QAAbN,GACEE,EAAKK,WACPL,EAAKM,aAAaJ,EAAOF,EAAKK,YAKhCL,EAAKO,YAAYL,GAGfA,EAAMM,WACRN,EAAMM,WAAWC,QAAUb,EAE3BM,EAAMK,YAAYR,SAASW,eAAed,0wECPiB,SAACe,UAE5DC,gBAACC,UACCT,KAAMO,EAAMP,MAAQO,EAAMP,KAC1BU,QAAQ,YACRC,KAAMJ,EAAMI,MAAQJ,EAAMI,KAC1BC,oCAAoCL,EAAMK,UAAYL,EAAMK,UAAY,IACxEC,WAAYN,EAAMO,SAAWP,EAAMM,UACnCE,SAAUR,EAAMO,SAAWP,EAAMQ,QACjCC,QAAST,EAAMS,QACfC,UAAWV,EAAMO,SAAWP,EAAMU,UAEjCV,EAAMO,QAAUN,gBAACU,oBAAiBC,KAAM,KAASZ,EAAMa"}
1
+ {"version":3,"file":"techsbcn-storybook.cjs.production.min.js","sources":["../node_modules/style-inject/dist/style-inject.es.js","../src/components/fields/ButtonComponent/ButtonComponent.tsx","../src/components/fields/TextFieldComponent/TextFieldComponent.tsx","../src/components/forms/ChangePasswordForm.tsx","../src/components/forms/LoginForm.tsx","../src/components/wrappers/PublicFormWrapper/PublicFormWrapper.tsx","../src/components/forms/ResetPasswordForm.tsx"],"sourcesContent":["function styleInject(css, ref) {\n if ( ref === void 0 ) ref = {};\n var insertAt = ref.insertAt;\n\n if (!css || typeof document === 'undefined') { return; }\n\n var head = document.head || document.getElementsByTagName('head')[0];\n var style = document.createElement('style');\n style.type = 'text/css';\n\n if (insertAt === 'top') {\n if (head.firstChild) {\n head.insertBefore(style, head.firstChild);\n } else {\n head.appendChild(style);\n }\n } else {\n head.appendChild(style);\n }\n\n if (style.styleSheet) {\n style.styleSheet.cssText = css;\n } else {\n style.appendChild(document.createTextNode(css));\n }\n}\n\nexport default styleInject;\n","import React from 'react';\r\nimport { Button, CircularProgress } from '@mui/material/';\r\nimport './ButtonComponent.scss';\r\n\r\nexport interface ButtonComponentProps {\r\n className?: string;\r\n label?: string;\r\n startIcon?: React.ReactNode;\r\n endIcon?: React.ReactNode;\r\n onClick?: () => void;\r\n loading?: boolean;\r\n form?: string;\r\n type?: 'button' | 'submit' | 'reset';\r\n disabled?: boolean;\r\n}\r\n\r\nexport const ButtonComponent: React.FC<ButtonComponentProps> = (props) => {\r\n return (\r\n <Button\r\n type={props.type && props.type}\r\n variant=\"contained\"\r\n form={props.form && props.form}\r\n className={`main-background-color ${props.className ? props.className : ''}`}\r\n startIcon={!props.loading && props.startIcon}\r\n endIcon={!props.loading && props.endIcon}\r\n onClick={props.onClick}\r\n disabled={!props.loading && props.disabled}\r\n >\r\n {props.loading ? <CircularProgress size={25} /> : props.label}\r\n </Button>\r\n );\r\n};\r\n","import React from 'react';\r\nimport { TextField, Box } from '@mui/material/';\r\nimport './TextFieldComponent.scss';\r\n\r\nexport type InputType =\r\n | 'text'\r\n | 'radio'\r\n | 'checkbox'\r\n | 'textarea'\r\n | 'submit'\r\n | 'date'\r\n | 'hidden'\r\n | 'number'\r\n | 'range'\r\n | 'password'\r\n | 'time'\r\n | 'file';\r\n\r\ninterface TextFieldComponentProps {\r\n id?: string;\r\n label?: string;\r\n name?: string;\r\n value?: string | number;\r\n className?: string;\r\n type?: InputType;\r\n placeholder?: string;\r\n required?: boolean;\r\n disabled?: boolean;\r\n minNumber?: number;\r\n maxNumber?: number;\r\n error?: boolean;\r\n startIcon?: React.ReactNode;\r\n endIcon?: React.ReactNode;\r\n fullWidth?: boolean;\r\n helperText?: string;\r\n textFieldRef?: any;\r\n inputRef?: React.Ref<any>;\r\n autoComplete?: string;\r\n multiline?: boolean;\r\n rows?: number;\r\n maxLength?: number;\r\n onChange?: (event: React.ChangeEvent<HTMLInputElement>) => void;\r\n onKeyUp?: (event: React.KeyboardEvent<HTMLInputElement>) => void;\r\n step?: number | string;\r\n}\r\n\r\nexport const TextFieldComponent: React.FC<TextFieldComponentProps> = (props) => {\r\n return (\r\n <Box className=\"text-field-component\" width=\"100%\">\r\n <TextField\r\n error={props.error}\r\n id={props.id}\r\n label={props.label}\r\n defaultValue={props.value}\r\n className={props.className}\r\n required={props.required}\r\n disabled={props.disabled}\r\n type={props.type}\r\n placeholder={props.placeholder}\r\n autoComplete={props.autoComplete}\r\n variant=\"standard\"\r\n ref={props.inputRef}\r\n InputProps={{\r\n disableUnderline: true,\r\n startAdornment: props.startIcon,\r\n endAdornment: props.endIcon,\r\n inputProps: {\r\n max: props.maxNumber,\r\n min: props.minNumber,\r\n step: props.step,\r\n },\r\n }}\r\n InputLabelProps={{ shrink: true }}\r\n helperText={props.helperText}\r\n fullWidth={props.fullWidth}\r\n multiline={props.multiline}\r\n rows={props.rows}\r\n onChange={props.onChange}\r\n onKeyUp={props.onKeyUp}\r\n inputProps={{\r\n maxLength: props.maxLength,\r\n step: props.step,\r\n max: props.maxNumber,\r\n min: props.minNumber,\r\n }}\r\n />\r\n </Box>\r\n );\r\n};\r\n\r\nTextFieldComponent.defaultProps = {\r\n fullWidth: true,\r\n type: 'text',\r\n};\r\n","import React, { useState } from 'react';\r\nimport { Box, Grid, IconButton } from '@mui/material/';\r\nimport { Visibility, VisibilityOff } from '@mui/icons-material';\r\nimport { useForm, Controller } from 'react-hook-form';\r\nimport * as yup from 'yup';\r\nimport { yupResolver } from '@hookform/resolvers/yup';\r\nimport { TextFieldComponent } from '../fields/TextFieldComponent/TextFieldComponent';\r\nimport { ButtonComponent } from '../fields/ButtonComponent/ButtonComponent';\r\n\r\ninterface ChangePasswordFormProps {\r\n onClick: (data: any) => void;\r\n loading: boolean;\r\n topComponent?: React.ReactNode;\r\n bottomComponent?: React.ReactNode;\r\n requiredText: { requiredTextPassword: string; requiredTextSamePassword: string };\r\n valuesText: { buttonText: string; text1: string; placeholder1?: string; text2: string; placeholder2?: string };\r\n}\r\n\r\nexport const ChangePasswordForm: React.FC<ChangePasswordFormProps> = (props) => {\r\n const validationSchema = yup.object().shape({\r\n password: yup.string().required(props.requiredText.requiredTextPassword),\r\n passwordConfirmation: yup\r\n .string()\r\n .when('password', (password: any, schema: any) => {\r\n if (password) return schema.required(props.requiredText.requiredTextPassword);\r\n })\r\n .oneOf([yup.ref('password'), null], props.requiredText.requiredTextSamePassword),\r\n });\r\n\r\n const {\r\n handleSubmit,\r\n control,\r\n formState: { errors },\r\n } = useForm({\r\n resolver: yupResolver(validationSchema),\r\n });\r\n\r\n const [showPassword, setShownPassword] = useState(false);\r\n\r\n const handleClickShowPassword = () => {\r\n setShownPassword(!showPassword);\r\n };\r\n\r\n const handleMouseDownPassword = (event: React.MouseEvent<HTMLButtonElement>) => {\r\n event.preventDefault();\r\n };\r\n\r\n return (\r\n <Box>\r\n {props.topComponent && <Box m={2}>{props.topComponent}</Box>}\r\n <Box m={2}>\r\n <Grid container direction=\"column\" spacing={1}>\r\n <Grid item>\r\n <Controller\r\n control={control}\r\n name={'password'}\r\n render={({ field: { onChange, name, ref } }) => (\r\n <TextFieldComponent\r\n label={props.valuesText.text1}\r\n type={showPassword ? 'text' : 'password'}\r\n error={!!errors.password}\r\n placeholder={props.valuesText.placeholder1}\r\n helperText={errors.password?.message}\r\n name={name}\r\n inputRef={ref}\r\n onChange={(e) => {\r\n onChange(e);\r\n }}\r\n endIcon={\r\n <IconButton\r\n aria-label=\"toggle password visibility\"\r\n onClick={handleClickShowPassword}\r\n onMouseDown={handleMouseDownPassword}\r\n size=\"small\"\r\n >\r\n {showPassword ? <Visibility /> : <VisibilityOff />}\r\n </IconButton>\r\n }\r\n />\r\n )}\r\n />\r\n </Grid>\r\n <Grid item>\r\n <Controller\r\n control={control}\r\n name={'passwordConfirmation'}\r\n render={({ field: { onChange, name, ref } }) => (\r\n <TextFieldComponent\r\n label={props.valuesText.text2}\r\n placeholder={props.valuesText.placeholder2}\r\n type={showPassword ? 'text' : 'password'}\r\n error={!!errors.passwordConfirmation}\r\n helperText={errors.passwordConfirmation?.message}\r\n name={name}\r\n inputRef={ref}\r\n onChange={(e) => {\r\n onChange(e);\r\n }}\r\n endIcon={\r\n <IconButton\r\n aria-label=\"toggle password visibility\"\r\n onClick={handleClickShowPassword}\r\n onMouseDown={handleMouseDownPassword}\r\n size=\"small\"\r\n >\r\n {showPassword ? <Visibility /> : <VisibilityOff />}\r\n </IconButton>\r\n }\r\n />\r\n )}\r\n />\r\n </Grid>\r\n </Grid>\r\n </Box>\r\n <Box m={2}>\r\n <ButtonComponent\r\n label={props.valuesText.buttonText}\r\n className=\"btn-login\"\r\n onClick={handleSubmit(props.onClick)}\r\n loading={props.loading}\r\n />\r\n </Box>\r\n {props.bottomComponent && <Box m={2}>{props.bottomComponent}</Box>}\r\n </Box>\r\n );\r\n};\r\n","import React, { useState } from 'react';\r\nimport { Box, Grid, IconButton } from '@mui/material';\r\nimport * as yup from 'yup';\r\nimport { useForm, Controller } from 'react-hook-form';\r\nimport { yupResolver } from '@hookform/resolvers/yup';\r\nimport { Visibility, VisibilityOff } from '@mui/icons-material';\r\nimport { TextFieldComponent } from '../fields/TextFieldComponent/TextFieldComponent';\r\nimport { ButtonComponent } from '../fields/ButtonComponent/ButtonComponent';\r\n\r\ninterface LoginFormProps {\r\n onClick: (data: any) => void;\r\n topComponent?: React.ReactNode;\r\n bottomComponent?: React.ReactNode;\r\n loading: boolean;\r\n requiredText: { requiredTextMail: string; requiredTextPassword: string };\r\n valuesText: { buttonText: string; text1: string; placeholder1?: string; text2: string; placeholder2?: string };\r\n}\r\n\r\nexport const LoginForm: React.FC<LoginFormProps> = (props) => {\r\n const LoginSchema = yup.object().shape({\r\n email: yup.string().required(props.requiredText.requiredTextMail),\r\n password: yup.string().required(props.requiredText.requiredTextPassword),\r\n });\r\n\r\n const [showPassword, setShownPassword] = useState(false);\r\n const handleClickShowPassword = () => {\r\n setShownPassword(!showPassword);\r\n };\r\n\r\n const {\r\n control,\r\n handleSubmit,\r\n formState: { errors },\r\n } = useForm({\r\n resolver: yupResolver(LoginSchema),\r\n });\r\n\r\n return (\r\n <Box m={2}>\r\n {props.topComponent && <Box m={2}>{props.topComponent}</Box>}\r\n <Box my={2}>\r\n <Grid container direction=\"column\" spacing={1}>\r\n <Grid item>\r\n <Controller\r\n control={control}\r\n name={'email'}\r\n render={({ field: { onChange, name, ref } }) => (\r\n <TextFieldComponent\r\n label={props.valuesText.text1}\r\n placeholder={props.valuesText.placeholder1}\r\n autoComplete=\"email\"\r\n error={!!errors.email}\r\n helperText={errors.email?.message}\r\n name={name}\r\n inputRef={ref}\r\n onChange={(e) => {\r\n onChange(e);\r\n }}\r\n />\r\n )}\r\n />\r\n </Grid>\r\n <Grid item>\r\n <Controller\r\n control={control}\r\n name={'password'}\r\n render={({ field: { onChange, name, ref } }) => (\r\n <TextFieldComponent\r\n label={props.valuesText.text2}\r\n placeholder={props.valuesText.placeholder2}\r\n type={showPassword ? 'text' : 'password'}\r\n error={!!errors.password}\r\n helperText={errors.password?.message}\r\n name={name}\r\n inputRef={ref}\r\n onChange={(e) => {\r\n onChange(e);\r\n }}\r\n endIcon={\r\n <IconButton aria-label=\"toggle password visibility\" onClick={handleClickShowPassword} size=\"small\">\r\n {showPassword ? <Visibility /> : <VisibilityOff />}\r\n </IconButton>\r\n }\r\n />\r\n )}\r\n />\r\n </Grid>\r\n </Grid>\r\n </Box>\r\n <Box mb={5}>\r\n <ButtonComponent\r\n label={props.valuesText.buttonText}\r\n loading={props.loading}\r\n className=\"btn-login\"\r\n onClick={handleSubmit(props.onClick)}\r\n />\r\n </Box>\r\n {props.bottomComponent && <Box m={2}>{props.bottomComponent}</Box>}\r\n </Box>\r\n );\r\n};\r\n","import React from 'react';\r\nimport { Box, Container } from '@mui/material';\r\nimport './PublicFormWrapper.scss';\r\n\r\ninterface PublicFormWrapperProps {\r\n className?: string;\r\n}\r\n\r\nexport const PublicFormWrapper: React.FC<PublicFormWrapperProps> = (props) => {\r\n return (\r\n <Box\r\n height=\"100%\"\r\n className={`public-form-wrapper ${props.className ? props.className : ''}`}\r\n display=\"flex\"\r\n justifyContent=\"center\"\r\n alignItems=\"center\"\r\n >\r\n <Container maxWidth=\"xs\">\r\n <Box className=\"wrapper-box\" p={1}>\r\n {props.children}\r\n </Box>\r\n </Container>\r\n </Box>\r\n );\r\n};\r\n","import React from 'react';\r\nimport { Box } from '@mui/material';\r\nimport * as yup from 'yup';\r\nimport { useForm, Controller } from 'react-hook-form';\r\nimport { yupResolver } from '@hookform/resolvers/yup';\r\nimport { TextFieldComponent } from '../fields/TextFieldComponent/TextFieldComponent';\r\nimport { ButtonComponent } from '../fields/ButtonComponent/ButtonComponent';\r\n\r\ninterface resetPasswordFormProps {\r\n onClick: (data: any) => void;\r\n loading: boolean;\r\n topComponent?: React.ReactNode;\r\n bottomComponent?: React.ReactNode;\r\n requiredText: { requiredTextMail: string };\r\n valuesText: { buttonText: string; text: string; placeholder?: string };\r\n}\r\n\r\nexport const ResetPasswordForm: React.FC<resetPasswordFormProps> = (props) => {\r\n const ResetSchema = yup.object().shape({\r\n email: yup.string().required(props.requiredText.requiredTextMail),\r\n });\r\n\r\n const {\r\n control,\r\n handleSubmit,\r\n formState: { errors },\r\n } = useForm({\r\n resolver: yupResolver(ResetSchema),\r\n });\r\n\r\n return (\r\n <Box m={2}>\r\n {props.topComponent && <Box m={2}>{props.topComponent}</Box>}\r\n <Box mx={2} my={2}>\r\n <Controller\r\n control={control}\r\n name={'email'}\r\n render={({ field: { onChange, name, ref } }) => (\r\n <TextFieldComponent\r\n label={props.valuesText.text}\r\n placeholder={props.valuesText.placeholder}\r\n autoComplete=\"email\"\r\n error={!!errors.email}\r\n helperText={errors.email?.message}\r\n name={name}\r\n inputRef={ref}\r\n onChange={(e) => {\r\n onChange(e);\r\n }}\r\n />\r\n )}\r\n />\r\n </Box>\r\n <Box mx={2} mb={5}>\r\n <ButtonComponent\r\n label={props.valuesText.buttonText}\r\n className=\"btn-login\"\r\n onClick={handleSubmit(props.onClick)}\r\n loading={props.loading}\r\n />\r\n </Box>\r\n {props.bottomComponent && <Box m={2}>{props.bottomComponent}</Box>}\r\n </Box>\r\n );\r\n};\r\n"],"names":["styleInject","css","ref","insertAt","document","head","getElementsByTagName","style","createElement","type","firstChild","insertBefore","appendChild","styleSheet","cssText","createTextNode","ButtonComponent","props","React","Button","variant","form","className","startIcon","loading","endIcon","onClick","disabled","CircularProgress","size","label","TextFieldComponent","Box","width","TextField","error","id","defaultValue","value","required","placeholder","autoComplete","inputRef","InputProps","disableUnderline","startAdornment","endAdornment","inputProps","max","maxNumber","min","minNumber","step","InputLabelProps","shrink","helperText","fullWidth","multiline","rows","onChange","onKeyUp","maxLength","defaultProps","validationSchema","yup","shape","password","requiredText","requiredTextPassword","passwordConfirmation","when","schema","oneOf","requiredTextSamePassword","useForm","resolver","yupResolver","handleSubmit","control","errors","formState","useState","showPassword","setShownPassword","handleClickShowPassword","handleMouseDownPassword","event","preventDefault","topComponent","m","Grid","container","direction","spacing","item","Controller","name","render","field","valuesText","text1","placeholder1","_errors$password","message","e","IconButton","onMouseDown","Visibility","VisibilityOff","text2","placeholder2","_errors$passwordConfi","buttonText","bottomComponent","LoginSchema","email","requiredTextMail","my","_errors$email","mb","height","display","justifyContent","alignItems","Container","maxWidth","p","children","ResetSchema","mx","text"],"mappings":"+TAAA,SAASA,EAAYC,EAAKC,QACX,IAARA,IAAiBA,EAAM,IAC5B,IAAIC,EAAWD,EAAIC,SAEnB,GAAKF,GAA2B,oBAAbG,SAAnB,CAEA,IAAIC,EAAOD,SAASC,MAAQD,SAASE,qBAAqB,QAAQ,GAC9DC,EAAQH,SAASI,cAAc,SACnCD,EAAME,KAAO,WAEI,QAAbN,GACEE,EAAKK,WACPL,EAAKM,aAAaJ,EAAOF,EAAKK,YAKhCL,EAAKO,YAAYL,GAGfA,EAAMM,WACRN,EAAMM,WAAWC,QAAUb,EAE3BM,EAAMK,YAAYR,SAASW,eAAed,4iCCPjCe,EAAkD,SAACC,UAE5DC,gBAACC,UACCV,KAAMQ,EAAMR,MAAQQ,EAAMR,KAC1BW,QAAQ,YACRC,KAAMJ,EAAMI,MAAQJ,EAAMI,KAC1BC,oCAAoCL,EAAMK,UAAYL,EAAMK,UAAY,IACxEC,WAAYN,EAAMO,SAAWP,EAAMM,UACnCE,SAAUR,EAAMO,SAAWP,EAAMQ,QACjCC,QAAST,EAAMS,QACfC,UAAWV,EAAMO,SAAWP,EAAMU,UAEjCV,EAAMO,QAAUN,gBAACU,oBAAiBC,KAAM,KAASZ,EA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I,EAAGV,GAAI,GACdrG,gBAACF,GACCc,MAAOb,EAAMkF,WAAWa,WACxB1F,UAAU,YACVI,QAASmD,EAAa5D,EAAMS,SAC5BF,QAASP,EAAMO,WAGlBP,EAAMgG,iBAAmB/F,gBAACc,OAAIyD,EAAG,GAAIxE,EAAMgG"}
@@ -1,10 +1,10 @@
1
- import React from 'react';
2
- import '@mui/material';
3
- import { Button, CircularProgress } from '@mui/material/';
4
- import 'yup';
5
- import 'react-hook-form';
6
- import '@hookform/resolvers/yup';
7
- import '@mui/icons-material';
1
+ import React, { useState } from 'react';
2
+ import { Box, Container, Grid, IconButton } from '@mui/material';
3
+ import { Button, CircularProgress, Box as Box$1, TextField, Grid as Grid$1, IconButton as IconButton$1 } from '@mui/material/';
4
+ import { object, string, ref } from 'yup';
5
+ import { useForm, Controller } from 'react-hook-form';
6
+ import { yupResolver } from '@hookform/resolvers/yup';
7
+ import { Visibility, VisibilityOff } from '@mui/icons-material';
8
8
 
9
9
  function styleInject(css, ref) {
10
10
  if ( ref === void 0 ) ref = {};
@@ -36,6 +36,21 @@ function styleInject(css, ref) {
36
36
  var css_248z = ".public-form-wrapper .wrapper-box {\n background: white;\n border-radius: 5px;\n box-shadow: rgba(0, 0, 0, 0.2) 0px 11px 15px -7px, rgba(0, 0, 0, 0.14) 0px 24px 38px 3px, rgba(0, 0, 0, 0.12) 0px 9px 46px 8px;\n}";
37
37
  styleInject(css_248z);
38
38
 
39
+ var PublicFormWrapper = function PublicFormWrapper(props) {
40
+ return React.createElement(Box, {
41
+ height: "100%",
42
+ className: "public-form-wrapper " + (props.className ? props.className : ''),
43
+ display: "flex",
44
+ justifyContent: "center",
45
+ alignItems: "center"
46
+ }, React.createElement(Container, {
47
+ maxWidth: "xs"
48
+ }, React.createElement(Box, {
49
+ className: "wrapper-box",
50
+ p: 1
51
+ }, props.children)));
52
+ };
53
+
39
54
  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}";
40
55
  styleInject(css_248z$1);
41
56
 
@@ -57,5 +72,316 @@ var ButtonComponent = function ButtonComponent(props) {
57
72
  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}";
58
73
  styleInject(css_248z$2);
59
74
 
60
- export { ButtonComponent };
75
+ var TextFieldComponent = function TextFieldComponent(props) {
76
+ return React.createElement(Box$1, {
77
+ className: "text-field-component",
78
+ width: "100%"
79
+ }, React.createElement(TextField, {
80
+ error: props.error,
81
+ id: props.id,
82
+ label: props.label,
83
+ defaultValue: props.value,
84
+ className: props.className,
85
+ required: props.required,
86
+ disabled: props.disabled,
87
+ type: props.type,
88
+ placeholder: props.placeholder,
89
+ autoComplete: props.autoComplete,
90
+ variant: "standard",
91
+ ref: props.inputRef,
92
+ InputProps: {
93
+ disableUnderline: true,
94
+ startAdornment: props.startIcon,
95
+ endAdornment: props.endIcon,
96
+ inputProps: {
97
+ max: props.maxNumber,
98
+ min: props.minNumber,
99
+ step: props.step
100
+ }
101
+ },
102
+ InputLabelProps: {
103
+ shrink: true
104
+ },
105
+ helperText: props.helperText,
106
+ fullWidth: props.fullWidth,
107
+ multiline: props.multiline,
108
+ rows: props.rows,
109
+ onChange: props.onChange,
110
+ onKeyUp: props.onKeyUp,
111
+ inputProps: {
112
+ maxLength: props.maxLength,
113
+ step: props.step,
114
+ max: props.maxNumber,
115
+ min: props.minNumber
116
+ }
117
+ }));
118
+ };
119
+ TextFieldComponent.defaultProps = {
120
+ fullWidth: true,
121
+ type: 'text'
122
+ };
123
+
124
+ var LoginForm = function LoginForm(props) {
125
+ var LoginSchema = object().shape({
126
+ email: string().required(props.requiredText.requiredTextMail),
127
+ password: string().required(props.requiredText.requiredTextPassword)
128
+ });
129
+
130
+ var _useState = useState(false),
131
+ showPassword = _useState[0],
132
+ setShownPassword = _useState[1];
133
+
134
+ var handleClickShowPassword = function handleClickShowPassword() {
135
+ setShownPassword(!showPassword);
136
+ };
137
+
138
+ var _useForm = useForm({
139
+ resolver: yupResolver(LoginSchema)
140
+ }),
141
+ control = _useForm.control,
142
+ handleSubmit = _useForm.handleSubmit,
143
+ errors = _useForm.formState.errors;
144
+
145
+ return React.createElement(Box, {
146
+ m: 2
147
+ }, props.topComponent && React.createElement(Box, {
148
+ m: 2
149
+ }, props.topComponent), React.createElement(Box, {
150
+ my: 2
151
+ }, React.createElement(Grid, {
152
+ container: true,
153
+ direction: "column",
154
+ spacing: 1
155
+ }, React.createElement(Grid, {
156
+ item: true
157
+ }, React.createElement(Controller, {
158
+ control: control,
159
+ name: 'email',
160
+ render: function render(_ref) {
161
+ var _errors$email;
162
+
163
+ var _ref$field = _ref.field,
164
+ _onChange = _ref$field.onChange,
165
+ name = _ref$field.name,
166
+ ref = _ref$field.ref;
167
+ return React.createElement(TextFieldComponent, {
168
+ label: props.valuesText.text1,
169
+ placeholder: props.valuesText.placeholder1,
170
+ autoComplete: "email",
171
+ error: !!errors.email,
172
+ helperText: (_errors$email = errors.email) == null ? void 0 : _errors$email.message,
173
+ name: name,
174
+ inputRef: ref,
175
+ onChange: function onChange(e) {
176
+ _onChange(e);
177
+ }
178
+ });
179
+ }
180
+ })), React.createElement(Grid, {
181
+ item: true
182
+ }, React.createElement(Controller, {
183
+ control: control,
184
+ name: 'password',
185
+ render: function render(_ref2) {
186
+ var _errors$password;
187
+
188
+ var _ref2$field = _ref2.field,
189
+ _onChange2 = _ref2$field.onChange,
190
+ name = _ref2$field.name,
191
+ ref = _ref2$field.ref;
192
+ return React.createElement(TextFieldComponent, {
193
+ label: props.valuesText.text2,
194
+ placeholder: props.valuesText.placeholder2,
195
+ type: showPassword ? 'text' : 'password',
196
+ error: !!errors.password,
197
+ helperText: (_errors$password = errors.password) == null ? void 0 : _errors$password.message,
198
+ name: name,
199
+ inputRef: ref,
200
+ onChange: function onChange(e) {
201
+ _onChange2(e);
202
+ },
203
+ endIcon: React.createElement(IconButton, {
204
+ "aria-label": "toggle password visibility",
205
+ onClick: handleClickShowPassword,
206
+ size: "small"
207
+ }, showPassword ? React.createElement(Visibility, null) : React.createElement(VisibilityOff, null))
208
+ });
209
+ }
210
+ })))), React.createElement(Box, {
211
+ mb: 5
212
+ }, React.createElement(ButtonComponent, {
213
+ label: props.valuesText.buttonText,
214
+ loading: props.loading,
215
+ className: "btn-login",
216
+ onClick: handleSubmit(props.onClick)
217
+ })), props.bottomComponent && React.createElement(Box, {
218
+ m: 2
219
+ }, props.bottomComponent));
220
+ };
221
+
222
+ var ChangePasswordForm = function ChangePasswordForm(props) {
223
+ var validationSchema = object().shape({
224
+ password: string().required(props.requiredText.requiredTextPassword),
225
+ passwordConfirmation: string().when('password', function (password, schema) {
226
+ if (password) return schema.required(props.requiredText.requiredTextPassword);
227
+ }).oneOf([ref('password'), null], props.requiredText.requiredTextSamePassword)
228
+ });
229
+
230
+ var _useForm = useForm({
231
+ resolver: yupResolver(validationSchema)
232
+ }),
233
+ handleSubmit = _useForm.handleSubmit,
234
+ control = _useForm.control,
235
+ errors = _useForm.formState.errors;
236
+
237
+ var _useState = useState(false),
238
+ showPassword = _useState[0],
239
+ setShownPassword = _useState[1];
240
+
241
+ var handleClickShowPassword = function handleClickShowPassword() {
242
+ setShownPassword(!showPassword);
243
+ };
244
+
245
+ var handleMouseDownPassword = function handleMouseDownPassword(event) {
246
+ event.preventDefault();
247
+ };
248
+
249
+ return React.createElement(Box$1, null, props.topComponent && React.createElement(Box$1, {
250
+ m: 2
251
+ }, props.topComponent), React.createElement(Box$1, {
252
+ m: 2
253
+ }, React.createElement(Grid$1, {
254
+ container: true,
255
+ direction: "column",
256
+ spacing: 1
257
+ }, React.createElement(Grid$1, {
258
+ item: true
259
+ }, React.createElement(Controller, {
260
+ control: control,
261
+ name: 'password',
262
+ render: function render(_ref) {
263
+ var _errors$password;
264
+
265
+ var _ref$field = _ref.field,
266
+ _onChange = _ref$field.onChange,
267
+ name = _ref$field.name,
268
+ ref = _ref$field.ref;
269
+ return React.createElement(TextFieldComponent, {
270
+ label: props.valuesText.text1,
271
+ type: showPassword ? 'text' : 'password',
272
+ error: !!errors.password,
273
+ placeholder: props.valuesText.placeholder1,
274
+ helperText: (_errors$password = errors.password) == null ? void 0 : _errors$password.message,
275
+ name: name,
276
+ inputRef: ref,
277
+ onChange: function onChange(e) {
278
+ _onChange(e);
279
+ },
280
+ endIcon: React.createElement(IconButton$1, {
281
+ "aria-label": "toggle password visibility",
282
+ onClick: handleClickShowPassword,
283
+ onMouseDown: handleMouseDownPassword,
284
+ size: "small"
285
+ }, showPassword ? React.createElement(Visibility, null) : React.createElement(VisibilityOff, null))
286
+ });
287
+ }
288
+ })), React.createElement(Grid$1, {
289
+ item: true
290
+ }, React.createElement(Controller, {
291
+ control: control,
292
+ name: 'passwordConfirmation',
293
+ render: function render(_ref2) {
294
+ var _errors$passwordConfi;
295
+
296
+ var _ref2$field = _ref2.field,
297
+ _onChange2 = _ref2$field.onChange,
298
+ name = _ref2$field.name,
299
+ ref = _ref2$field.ref;
300
+ return React.createElement(TextFieldComponent, {
301
+ label: props.valuesText.text2,
302
+ placeholder: props.valuesText.placeholder2,
303
+ type: showPassword ? 'text' : 'password',
304
+ error: !!errors.passwordConfirmation,
305
+ helperText: (_errors$passwordConfi = errors.passwordConfirmation) == null ? void 0 : _errors$passwordConfi.message,
306
+ name: name,
307
+ inputRef: ref,
308
+ onChange: function onChange(e) {
309
+ _onChange2(e);
310
+ },
311
+ endIcon: React.createElement(IconButton$1, {
312
+ "aria-label": "toggle password visibility",
313
+ onClick: handleClickShowPassword,
314
+ onMouseDown: handleMouseDownPassword,
315
+ size: "small"
316
+ }, showPassword ? React.createElement(Visibility, null) : React.createElement(VisibilityOff, null))
317
+ });
318
+ }
319
+ })))), React.createElement(Box$1, {
320
+ m: 2
321
+ }, React.createElement(ButtonComponent, {
322
+ label: props.valuesText.buttonText,
323
+ className: "btn-login",
324
+ onClick: handleSubmit(props.onClick),
325
+ loading: props.loading
326
+ })), props.bottomComponent && React.createElement(Box$1, {
327
+ m: 2
328
+ }, props.bottomComponent));
329
+ };
330
+
331
+ var ResetPasswordForm = function ResetPasswordForm(props) {
332
+ var ResetSchema = object().shape({
333
+ email: string().required(props.requiredText.requiredTextMail)
334
+ });
335
+
336
+ var _useForm = useForm({
337
+ resolver: yupResolver(ResetSchema)
338
+ }),
339
+ control = _useForm.control,
340
+ handleSubmit = _useForm.handleSubmit,
341
+ errors = _useForm.formState.errors;
342
+
343
+ return React.createElement(Box, {
344
+ m: 2
345
+ }, props.topComponent && React.createElement(Box, {
346
+ m: 2
347
+ }, props.topComponent), React.createElement(Box, {
348
+ mx: 2,
349
+ my: 2
350
+ }, React.createElement(Controller, {
351
+ control: control,
352
+ name: 'email',
353
+ render: function render(_ref) {
354
+ var _errors$email;
355
+
356
+ var _ref$field = _ref.field,
357
+ _onChange = _ref$field.onChange,
358
+ name = _ref$field.name,
359
+ ref = _ref$field.ref;
360
+ return React.createElement(TextFieldComponent, {
361
+ label: props.valuesText.text,
362
+ placeholder: props.valuesText.placeholder,
363
+ autoComplete: "email",
364
+ error: !!errors.email,
365
+ helperText: (_errors$email = errors.email) == null ? void 0 : _errors$email.message,
366
+ name: name,
367
+ inputRef: ref,
368
+ onChange: function onChange(e) {
369
+ _onChange(e);
370
+ }
371
+ });
372
+ }
373
+ })), React.createElement(Box, {
374
+ mx: 2,
375
+ mb: 5
376
+ }, React.createElement(ButtonComponent, {
377
+ label: props.valuesText.buttonText,
378
+ className: "btn-login",
379
+ onClick: handleSubmit(props.onClick),
380
+ loading: props.loading
381
+ })), props.bottomComponent && React.createElement(Box, {
382
+ m: 2
383
+ }, props.bottomComponent));
384
+ };
385
+
386
+ export { ButtonComponent, ChangePasswordForm, LoginForm, PublicFormWrapper, ResetPasswordForm, TextFieldComponent };
61
387
  //# sourceMappingURL=techsbcn-storybook.esm.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"techsbcn-storybook.esm.js","sources":["../node_modules/style-inject/dist/style-inject.es.js","../src/components/fields/ButtonComponent/ButtonComponent.tsx"],"sourcesContent":["function styleInject(css, ref) {\n if ( ref === void 0 ) ref = {};\n var insertAt = ref.insertAt;\n\n if (!css || typeof document === 'undefined') { return; }\n\n var head = document.head || document.getElementsByTagName('head')[0];\n var style = document.createElement('style');\n style.type = 'text/css';\n\n if (insertAt === 'top') {\n if (head.firstChild) {\n head.insertBefore(style, head.firstChild);\n } else {\n head.appendChild(style);\n }\n } else {\n head.appendChild(style);\n }\n\n if (style.styleSheet) {\n style.styleSheet.cssText = css;\n } else {\n style.appendChild(document.createTextNode(css));\n }\n}\n\nexport default styleInject;\n","import React from 'react';\r\nimport { Button, CircularProgress } from '@mui/material/';\r\nimport './ButtonComponent.scss';\r\n\r\nexport interface ButtonComponentProps {\r\n className?: string;\r\n label?: string;\r\n startIcon?: React.ReactNode;\r\n endIcon?: React.ReactNode;\r\n onClick?: () => void;\r\n loading?: boolean;\r\n form?: string;\r\n type?: 'button' | 'submit' | 'reset';\r\n disabled?: boolean;\r\n}\r\n\r\nexport const ButtonComponent: React.FC<ButtonComponentProps> = (props) => {\r\n return (\r\n <Button\r\n type={props.type && props.type}\r\n variant=\"contained\"\r\n form={props.form && props.form}\r\n className={`main-background-color ${props.className ? props.className : ''}`}\r\n startIcon={!props.loading && props.startIcon}\r\n endIcon={!props.loading && props.endIcon}\r\n onClick={props.onClick}\r\n disabled={!props.loading && props.disabled}\r\n >\r\n {props.loading ? <CircularProgress size={25} /> : props.label}\r\n </Button>\r\n );\r\n};\r\n"],"names":["ButtonComponent","props","React","Button","type","variant","form","className","startIcon","loading","endIcon","onClick","disabled","CircularProgress","size","label"],"mappings":";;;;;;;;AAAA,SAAS,WAAW,CAAC,GAAG,EAAE,GAAG,EAAE;AAC/B,EAAE,KAAK,GAAG,KAAK,KAAK,CAAC,GAAG,GAAG,GAAG,EAAE,CAAC;AACjC,EAAE,IAAI,QAAQ,GAAG,GAAG,CAAC,QAAQ,CAAC;AAC9B;AACA,EAAE,IAAI,CAAC,GAAG,IAAI,OAAO,QAAQ,KAAK,WAAW,EAAE,EAAE,OAAO,EAAE;AAC1D;AACA,EAAE,IAAI,IAAI,GAAG,QAAQ,CAAC,IAAI,IAAI,QAAQ,CAAC,oBAAoB,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC;AACvE,EAAE,IAAI,KAAK,GAAG,QAAQ,CAAC,aAAa,CAAC,OAAO,CAAC,CAAC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AAN,GAAgBP,mBAAA,CAACW,gBAAD;AAAkBC,IAAAA,IAAI,EAAE;GAAxB,CAAhB,GAAiDb,KAAK,CAACc,KAV1D,CADF;AAcD,CAfM;;;;;;;"}
1
+ {"version":3,"file":"techsbcn-storybook.esm.js","sources":["../node_modules/style-inject/dist/style-inject.es.js","../src/components/wrappers/PublicFormWrapper/PublicFormWrapper.tsx","../src/components/fields/ButtonComponent/ButtonComponent.tsx","../src/components/fields/TextFieldComponent/TextFieldComponent.tsx","../src/components/forms/LoginForm.tsx","../src/components/forms/ChangePasswordForm.tsx","../src/components/forms/ResetPasswordForm.tsx"],"sourcesContent":["function styleInject(css, ref) {\n if ( ref === void 0 ) ref = {};\n var insertAt = ref.insertAt;\n\n if (!css || typeof document === 'undefined') { return; }\n\n var head = document.head || document.getElementsByTagName('head')[0];\n var style = document.createElement('style');\n style.type = 'text/css';\n\n if (insertAt === 'top') {\n if (head.firstChild) {\n head.insertBefore(style, head.firstChild);\n } else {\n head.appendChild(style);\n }\n } else {\n head.appendChild(style);\n }\n\n if (style.styleSheet) {\n style.styleSheet.cssText = css;\n } else {\n style.appendChild(document.createTextNode(css));\n }\n}\n\nexport default styleInject;\n","import React from 'react';\r\nimport { Box, Container } from '@mui/material';\r\nimport './PublicFormWrapper.scss';\r\n\r\ninterface PublicFormWrapperProps {\r\n className?: string;\r\n}\r\n\r\nexport const PublicFormWrapper: React.FC<PublicFormWrapperProps> = (props) => {\r\n return (\r\n <Box\r\n height=\"100%\"\r\n className={`public-form-wrapper ${props.className ? props.className : ''}`}\r\n display=\"flex\"\r\n justifyContent=\"center\"\r\n alignItems=\"center\"\r\n >\r\n <Container maxWidth=\"xs\">\r\n <Box className=\"wrapper-box\" p={1}>\r\n {props.children}\r\n </Box>\r\n </Container>\r\n </Box>\r\n );\r\n};\r\n","import React from 'react';\r\nimport { Button, CircularProgress } from '@mui/material/';\r\nimport './ButtonComponent.scss';\r\n\r\nexport interface ButtonComponentProps {\r\n className?: string;\r\n label?: string;\r\n startIcon?: React.ReactNode;\r\n endIcon?: React.ReactNode;\r\n onClick?: () => void;\r\n loading?: boolean;\r\n form?: string;\r\n type?: 'button' | 'submit' | 'reset';\r\n disabled?: boolean;\r\n}\r\n\r\nexport const ButtonComponent: React.FC<ButtonComponentProps> = (props) => {\r\n return (\r\n <Button\r\n type={props.type && props.type}\r\n variant=\"contained\"\r\n form={props.form && props.form}\r\n className={`main-background-color ${props.className ? props.className : ''}`}\r\n startIcon={!props.loading && props.startIcon}\r\n endIcon={!props.loading && props.endIcon}\r\n onClick={props.onClick}\r\n disabled={!props.loading && props.disabled}\r\n >\r\n {props.loading ? <CircularProgress size={25} /> : props.label}\r\n </Button>\r\n );\r\n};\r\n","import React from 'react';\r\nimport { TextField, Box } from '@mui/material/';\r\nimport './TextFieldComponent.scss';\r\n\r\nexport type InputType =\r\n | 'text'\r\n | 'radio'\r\n | 'checkbox'\r\n | 'textarea'\r\n | 'submit'\r\n | 'date'\r\n | 'hidden'\r\n | 'number'\r\n | 'range'\r\n | 'password'\r\n | 'time'\r\n | 'file';\r\n\r\ninterface TextFieldComponentProps {\r\n id?: string;\r\n label?: string;\r\n name?: string;\r\n value?: string | number;\r\n className?: string;\r\n type?: InputType;\r\n placeholder?: string;\r\n required?: boolean;\r\n disabled?: boolean;\r\n minNumber?: number;\r\n maxNumber?: number;\r\n error?: boolean;\r\n startIcon?: React.ReactNode;\r\n endIcon?: React.ReactNode;\r\n fullWidth?: boolean;\r\n helperText?: string;\r\n textFieldRef?: any;\r\n inputRef?: React.Ref<any>;\r\n autoComplete?: string;\r\n multiline?: boolean;\r\n rows?: number;\r\n maxLength?: number;\r\n onChange?: (event: React.ChangeEvent<HTMLInputElement>) => void;\r\n onKeyUp?: (event: React.KeyboardEvent<HTMLInputElement>) => void;\r\n step?: number | string;\r\n}\r\n\r\nexport const TextFieldComponent: React.FC<TextFieldComponentProps> = (props) => {\r\n return (\r\n <Box className=\"text-field-component\" width=\"100%\">\r\n <TextField\r\n error={props.error}\r\n id={props.id}\r\n label={props.label}\r\n defaultValue={props.value}\r\n className={props.className}\r\n required={props.required}\r\n disabled={props.disabled}\r\n type={props.type}\r\n placeholder={props.placeholder}\r\n autoComplete={props.autoComplete}\r\n variant=\"standard\"\r\n ref={props.inputRef}\r\n InputProps={{\r\n disableUnderline: true,\r\n startAdornment: props.startIcon,\r\n endAdornment: props.endIcon,\r\n inputProps: {\r\n max: props.maxNumber,\r\n min: props.minNumber,\r\n step: props.step,\r\n },\r\n }}\r\n InputLabelProps={{ shrink: true }}\r\n helperText={props.helperText}\r\n fullWidth={props.fullWidth}\r\n multiline={props.multiline}\r\n rows={props.rows}\r\n onChange={props.onChange}\r\n onKeyUp={props.onKeyUp}\r\n inputProps={{\r\n maxLength: props.maxLength,\r\n step: props.step,\r\n max: props.maxNumber,\r\n min: props.minNumber,\r\n }}\r\n />\r\n </Box>\r\n );\r\n};\r\n\r\nTextFieldComponent.defaultProps = {\r\n fullWidth: true,\r\n type: 'text',\r\n};\r\n","import React, { useState } from 'react';\r\nimport { Box, Grid, IconButton } from '@mui/material';\r\nimport * as yup from 'yup';\r\nimport { useForm, Controller } from 'react-hook-form';\r\nimport { yupResolver } from '@hookform/resolvers/yup';\r\nimport { Visibility, VisibilityOff } from '@mui/icons-material';\r\nimport { TextFieldComponent } from '../fields/TextFieldComponent/TextFieldComponent';\r\nimport { ButtonComponent } from '../fields/ButtonComponent/ButtonComponent';\r\n\r\ninterface LoginFormProps {\r\n onClick: (data: any) => void;\r\n topComponent?: React.ReactNode;\r\n bottomComponent?: React.ReactNode;\r\n loading: boolean;\r\n requiredText: { requiredTextMail: string; requiredTextPassword: string };\r\n valuesText: { buttonText: string; text1: string; placeholder1?: string; text2: string; placeholder2?: string };\r\n}\r\n\r\nexport const LoginForm: React.FC<LoginFormProps> = (props) => {\r\n const LoginSchema = yup.object().shape({\r\n email: yup.string().required(props.requiredText.requiredTextMail),\r\n password: yup.string().required(props.requiredText.requiredTextPassword),\r\n });\r\n\r\n const [showPassword, setShownPassword] = useState(false);\r\n const handleClickShowPassword = () => {\r\n setShownPassword(!showPassword);\r\n };\r\n\r\n const {\r\n control,\r\n handleSubmit,\r\n formState: { errors },\r\n } = useForm({\r\n resolver: yupResolver(LoginSchema),\r\n });\r\n\r\n return (\r\n <Box m={2}>\r\n {props.topComponent && <Box m={2}>{props.topComponent}</Box>}\r\n <Box my={2}>\r\n <Grid container direction=\"column\" spacing={1}>\r\n <Grid item>\r\n <Controller\r\n control={control}\r\n name={'email'}\r\n render={({ field: { onChange, name, ref } }) => (\r\n <TextFieldComponent\r\n label={props.valuesText.text1}\r\n placeholder={props.valuesText.placeholder1}\r\n autoComplete=\"email\"\r\n error={!!errors.email}\r\n helperText={errors.email?.message}\r\n name={name}\r\n inputRef={ref}\r\n onChange={(e) => {\r\n onChange(e);\r\n }}\r\n />\r\n )}\r\n />\r\n </Grid>\r\n <Grid item>\r\n <Controller\r\n control={control}\r\n name={'password'}\r\n render={({ field: { onChange, name, ref } }) => (\r\n <TextFieldComponent\r\n label={props.valuesText.text2}\r\n placeholder={props.valuesText.placeholder2}\r\n type={showPassword ? 'text' : 'password'}\r\n error={!!errors.password}\r\n helperText={errors.password?.message}\r\n name={name}\r\n inputRef={ref}\r\n onChange={(e) => {\r\n onChange(e);\r\n }}\r\n endIcon={\r\n <IconButton aria-label=\"toggle password visibility\" onClick={handleClickShowPassword} size=\"small\">\r\n {showPassword ? <Visibility /> : <VisibilityOff />}\r\n </IconButton>\r\n }\r\n />\r\n )}\r\n />\r\n </Grid>\r\n </Grid>\r\n </Box>\r\n <Box mb={5}>\r\n <ButtonComponent\r\n label={props.valuesText.buttonText}\r\n loading={props.loading}\r\n className=\"btn-login\"\r\n onClick={handleSubmit(props.onClick)}\r\n />\r\n </Box>\r\n {props.bottomComponent && <Box m={2}>{props.bottomComponent}</Box>}\r\n </Box>\r\n );\r\n};\r\n","import React, { useState } from 'react';\r\nimport { Box, Grid, IconButton } from '@mui/material/';\r\nimport { Visibility, VisibilityOff } from '@mui/icons-material';\r\nimport { useForm, Controller } from 'react-hook-form';\r\nimport * as yup from 'yup';\r\nimport { yupResolver } from '@hookform/resolvers/yup';\r\nimport { TextFieldComponent } from '../fields/TextFieldComponent/TextFieldComponent';\r\nimport { ButtonComponent } from '../fields/ButtonComponent/ButtonComponent';\r\n\r\ninterface ChangePasswordFormProps {\r\n onClick: (data: any) => void;\r\n loading: boolean;\r\n topComponent?: React.ReactNode;\r\n bottomComponent?: React.ReactNode;\r\n requiredText: { requiredTextPassword: string; requiredTextSamePassword: string };\r\n valuesText: { buttonText: string; text1: string; placeholder1?: string; text2: string; placeholder2?: string };\r\n}\r\n\r\nexport const ChangePasswordForm: React.FC<ChangePasswordFormProps> = (props) => {\r\n const validationSchema = yup.object().shape({\r\n password: yup.string().required(props.requiredText.requiredTextPassword),\r\n passwordConfirmation: yup\r\n .string()\r\n .when('password', (password: any, schema: any) => {\r\n if (password) return schema.required(props.requiredText.requiredTextPassword);\r\n })\r\n .oneOf([yup.ref('password'), null], props.requiredText.requiredTextSamePassword),\r\n });\r\n\r\n const {\r\n handleSubmit,\r\n control,\r\n formState: { errors },\r\n } = useForm({\r\n resolver: yupResolver(validationSchema),\r\n });\r\n\r\n const [showPassword, setShownPassword] = useState(false);\r\n\r\n const handleClickShowPassword = () => {\r\n setShownPassword(!showPassword);\r\n };\r\n\r\n const handleMouseDownPassword = (event: React.MouseEvent<HTMLButtonElement>) => {\r\n event.preventDefault();\r\n };\r\n\r\n return (\r\n <Box>\r\n {props.topComponent && <Box m={2}>{props.topComponent}</Box>}\r\n <Box m={2}>\r\n <Grid container direction=\"column\" spacing={1}>\r\n <Grid item>\r\n <Controller\r\n control={control}\r\n name={'password'}\r\n render={({ field: { onChange, name, ref } }) => (\r\n <TextFieldComponent\r\n label={props.valuesText.text1}\r\n type={showPassword ? 'text' : 'password'}\r\n error={!!errors.password}\r\n placeholder={props.valuesText.placeholder1}\r\n helperText={errors.password?.message}\r\n name={name}\r\n inputRef={ref}\r\n onChange={(e) => {\r\n onChange(e);\r\n }}\r\n endIcon={\r\n <IconButton\r\n aria-label=\"toggle password visibility\"\r\n onClick={handleClickShowPassword}\r\n onMouseDown={handleMouseDownPassword}\r\n size=\"small\"\r\n >\r\n {showPassword ? <Visibility /> : <VisibilityOff />}\r\n </IconButton>\r\n }\r\n />\r\n )}\r\n />\r\n </Grid>\r\n <Grid item>\r\n <Controller\r\n control={control}\r\n name={'passwordConfirmation'}\r\n render={({ field: { onChange, name, ref } }) => (\r\n <TextFieldComponent\r\n label={props.valuesText.text2}\r\n placeholder={props.valuesText.placeholder2}\r\n type={showPassword ? 'text' : 'password'}\r\n error={!!errors.passwordConfirmation}\r\n helperText={errors.passwordConfirmation?.message}\r\n name={name}\r\n inputRef={ref}\r\n onChange={(e) => {\r\n onChange(e);\r\n }}\r\n endIcon={\r\n <IconButton\r\n aria-label=\"toggle password visibility\"\r\n onClick={handleClickShowPassword}\r\n onMouseDown={handleMouseDownPassword}\r\n size=\"small\"\r\n >\r\n {showPassword ? <Visibility /> : <VisibilityOff />}\r\n </IconButton>\r\n }\r\n />\r\n )}\r\n />\r\n </Grid>\r\n </Grid>\r\n </Box>\r\n <Box m={2}>\r\n <ButtonComponent\r\n label={props.valuesText.buttonText}\r\n className=\"btn-login\"\r\n onClick={handleSubmit(props.onClick)}\r\n loading={props.loading}\r\n />\r\n </Box>\r\n {props.bottomComponent && <Box m={2}>{props.bottomComponent}</Box>}\r\n </Box>\r\n );\r\n};\r\n","import React from 'react';\r\nimport { Box } from '@mui/material';\r\nimport * as yup from 'yup';\r\nimport { useForm, Controller } from 'react-hook-form';\r\nimport { yupResolver } from '@hookform/resolvers/yup';\r\nimport { TextFieldComponent } from '../fields/TextFieldComponent/TextFieldComponent';\r\nimport { ButtonComponent } from '../fields/ButtonComponent/ButtonComponent';\r\n\r\ninterface resetPasswordFormProps {\r\n onClick: (data: any) => void;\r\n loading: boolean;\r\n topComponent?: React.ReactNode;\r\n bottomComponent?: React.ReactNode;\r\n requiredText: { requiredTextMail: string };\r\n valuesText: { buttonText: string; text: string; placeholder?: string };\r\n}\r\n\r\nexport const ResetPasswordForm: React.FC<resetPasswordFormProps> = (props) => {\r\n const ResetSchema = yup.object().shape({\r\n email: yup.string().required(props.requiredText.requiredTextMail),\r\n });\r\n\r\n const {\r\n control,\r\n handleSubmit,\r\n formState: { errors },\r\n } = useForm({\r\n resolver: yupResolver(ResetSchema),\r\n });\r\n\r\n return (\r\n <Box m={2}>\r\n {props.topComponent && <Box m={2}>{props.topComponent}</Box>}\r\n <Box mx={2} my={2}>\r\n <Controller\r\n control={control}\r\n name={'email'}\r\n render={({ field: { onChange, name, ref } }) => (\r\n <TextFieldComponent\r\n label={props.valuesText.text}\r\n placeholder={props.valuesText.placeholder}\r\n autoComplete=\"email\"\r\n error={!!errors.email}\r\n helperText={errors.email?.message}\r\n name={name}\r\n inputRef={ref}\r\n onChange={(e) => {\r\n onChange(e);\r\n }}\r\n />\r\n )}\r\n />\r\n </Box>\r\n <Box mx={2} mb={5}>\r\n <ButtonComponent\r\n label={props.valuesText.buttonText}\r\n className=\"btn-login\"\r\n onClick={handleSubmit(props.onClick)}\r\n loading={props.loading}\r\n />\r\n </Box>\r\n {props.bottomComponent && <Box m={2}>{props.bottomComponent}</Box>}\r\n </Box>\r\n );\r\n};\r\n"],"names":["PublicFormWrapper","props","React","Box","height","className","display","justifyContent","alignItems","Container","maxWidth","p","children","ButtonComponent","Button","type","variant","form","startIcon","loading","endIcon","onClick","disabled","CircularProgress","size","label","TextFieldComponent","width","TextField","error","id","defaultValue","value","required","placeholder","autoComplete","ref","inputRef","InputProps","disableUnderline","startAdornment","endAdornment","inputProps","max","maxNumber","min","minNumber","step","InputLabelProps","shrink","helperText","fullWidth","multiline","rows","onChange","onKeyUp","maxLength","defaultProps","LoginForm","LoginSchema","yup","shape","email","requiredText","requiredTextMail","password","requiredTextPassword","useState","showPassword","setShownPassword","handleClickShowPassword","useForm","resolver","yupResolver","control","handleSubmit","errors","formState","m","topComponent","my","Grid","container","direction","spacing","item","Controller","name","render","field","valuesText","text1","placeholder1","message","e","text2","placeholder2","IconButton","Visibility","VisibilityOff","mb","buttonText","bottomComponent","ChangePasswordForm","validationSchema","passwordConfirmation","when","schema","oneOf","requiredTextSamePassword","handleMouseDownPassword","event","preventDefault","onMouseDown","ResetPasswordForm","ResetSchema","mx","text"],"mappings":";;;;;;;;AAAA,SAAS,WAAW,CAAC,GAAG,EAAE,GAAG,EAAE;AAC/B,EAAE,KAAK,GAAG,KAAK,KAAK,CAAC,GAAG,GAAG,GAAG,EAAE,CAAC;AACjC,EAAE,IAAI,QAAQ,GAAG,GAAG,CAAC,QAAQ,CAAC;AAC9B;AACA,EAAE,IAAI,CAAC,GAAG,IAAI,OAAO,QAAQ,KAAK,WAAW,EAAE,EAAE,OAAO,EAAE;AAC1D;AACA,EAAE,IAAI,IAAI,GAAG,QAAQ,CAAC,IAAI,IAAI,QAAQ,CAAC,oBAAoB,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC;AACvE,EAAE,IAAI,KAAK,GAAG,QAAQ,CAAC,aAAa,CAAC,OAAO,CAAC,CAAC;AAC9C,EAAE,KAAK,CAAC,IAAI,GAAG,UAAU,CAAC;AAC1B;AACA,EAAE,IAAI,QAAQ,KAAK,KAAK,EAAE;AAC1B,IAAI,IAAI,IAAI,CAAC,UAAU,EAAE;AACzB,MAAM,IAAI,CAAC,YAAY,CAAC,KAAK,EAAE,IAAI,CAAC,UAAU,CAAC,CAAC;AAChD,KAAK,MAAM;AACX,MAAM,IAAI,CAAC,WAAW,CAAC,KAAK,CAAC,CAAC;AAC9B,KAAK;AACL,GAAG,MAAM;AACT,IAAI,IAAI,CAAC,WAAW,CAAC,KAAK,CAAC,CAAC;AAC5B,GAAG;AACH;AACA,EAAE,IAAI,KAAK,CAAC,UAAU,EAAE;AACxB,IAAI,KAAK,CAAC,UAAU,CAAC,OAAO,GAAG,GAAG,CAAC;AACnC,GAAG,MAAM;A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js",
5
5
  "typings": "dist/index.d.ts",
@@ -44,7 +44,7 @@ interface TextFieldComponentProps {
44
44
  step?: number | string;
45
45
  }
46
46
 
47
- const TextFieldComponent: React.FC<TextFieldComponentProps> = (props) => {
47
+ export const TextFieldComponent: React.FC<TextFieldComponentProps> = (props) => {
48
48
  return (
49
49
  <Box className="text-field-component" width="100%">
50
50
  <TextField
@@ -87,8 +87,8 @@ const TextFieldComponent: React.FC<TextFieldComponentProps> = (props) => {
87
87
  </Box>
88
88
  );
89
89
  };
90
+
90
91
  TextFieldComponent.defaultProps = {
91
92
  fullWidth: true,
92
93
  type: 'text',
93
94
  };
94
- export default TextFieldComponent;
@@ -4,7 +4,7 @@ import { Visibility, VisibilityOff } from '@mui/icons-material';
4
4
  import { useForm, Controller } from 'react-hook-form';
5
5
  import * as yup from 'yup';
6
6
  import { yupResolver } from '@hookform/resolvers/yup';
7
- import TextFieldComponent from '../fields/TextFieldComponent/TextFieldComponent';
7
+ import { TextFieldComponent } from '../fields/TextFieldComponent/TextFieldComponent';
8
8
  import { ButtonComponent } from '../fields/ButtonComponent/ButtonComponent';
9
9
 
10
10
  interface ChangePasswordFormProps {
@@ -16,7 +16,7 @@ interface ChangePasswordFormProps {
16
16
  valuesText: { buttonText: string; text1: string; placeholder1?: string; text2: string; placeholder2?: string };
17
17
  }
18
18
 
19
- const ChangePasswordForm: React.FC<ChangePasswordFormProps> = (props) => {
19
+ export const ChangePasswordForm: React.FC<ChangePasswordFormProps> = (props) => {
20
20
  const validationSchema = yup.object().shape({
21
21
  password: yup.string().required(props.requiredText.requiredTextPassword),
22
22
  passwordConfirmation: yup
@@ -124,5 +124,3 @@ const ChangePasswordForm: React.FC<ChangePasswordFormProps> = (props) => {
124
124
  </Box>
125
125
  );
126
126
  };
127
-
128
- export default ChangePasswordForm;
@@ -4,7 +4,7 @@ import * as yup from 'yup';
4
4
  import { useForm, Controller } from 'react-hook-form';
5
5
  import { yupResolver } from '@hookform/resolvers/yup';
6
6
  import { Visibility, VisibilityOff } from '@mui/icons-material';
7
- import TextFieldComponent from '../fields/TextFieldComponent/TextFieldComponent';
7
+ import { TextFieldComponent } from '../fields/TextFieldComponent/TextFieldComponent';
8
8
  import { ButtonComponent } from '../fields/ButtonComponent/ButtonComponent';
9
9
 
10
10
  interface LoginFormProps {
@@ -16,7 +16,7 @@ interface LoginFormProps {
16
16
  valuesText: { buttonText: string; text1: string; placeholder1?: string; text2: string; placeholder2?: string };
17
17
  }
18
18
 
19
- const LoginForm: React.FC<LoginFormProps> = (props) => {
19
+ export const LoginForm: React.FC<LoginFormProps> = (props) => {
20
20
  const LoginSchema = yup.object().shape({
21
21
  email: yup.string().required(props.requiredText.requiredTextMail),
22
22
  password: yup.string().required(props.requiredText.requiredTextPassword),
@@ -99,5 +99,3 @@ const LoginForm: React.FC<LoginFormProps> = (props) => {
99
99
  </Box>
100
100
  );
101
101
  };
102
-
103
- export default LoginForm;
@@ -3,7 +3,7 @@ import { Box } from '@mui/material';
3
3
  import * as yup from 'yup';
4
4
  import { useForm, Controller } from 'react-hook-form';
5
5
  import { yupResolver } from '@hookform/resolvers/yup';
6
- import TextFieldComponent from '../fields/TextFieldComponent/TextFieldComponent';
6
+ import { TextFieldComponent } from '../fields/TextFieldComponent/TextFieldComponent';
7
7
  import { ButtonComponent } from '../fields/ButtonComponent/ButtonComponent';
8
8
 
9
9
  interface resetPasswordFormProps {
@@ -15,7 +15,7 @@ interface resetPasswordFormProps {
15
15
  valuesText: { buttonText: string; text: string; placeholder?: string };
16
16
  }
17
17
 
18
- const ResetPasswordForm: React.FC<resetPasswordFormProps> = (props) => {
18
+ export const ResetPasswordForm: React.FC<resetPasswordFormProps> = (props) => {
19
19
  const ResetSchema = yup.object().shape({
20
20
  email: yup.string().required(props.requiredText.requiredTextMail),
21
21
  });
@@ -63,5 +63,3 @@ const ResetPasswordForm: React.FC<resetPasswordFormProps> = (props) => {
63
63
  </Box>
64
64
  );
65
65
  };
66
-
67
- export default ResetPasswordForm;
@@ -5,7 +5,8 @@ import './PublicFormWrapper.scss';
5
5
  interface PublicFormWrapperProps {
6
6
  className?: string;
7
7
  }
8
- const PublicFormWrapper: React.FC<PublicFormWrapperProps> = (props) => {
8
+
9
+ export const PublicFormWrapper: React.FC<PublicFormWrapperProps> = (props) => {
9
10
  return (
10
11
  <Box
11
12
  height="100%"
@@ -22,5 +23,3 @@ const PublicFormWrapper: React.FC<PublicFormWrapperProps> = (props) => {
22
23
  </Box>
23
24
  );
24
25
  };
25
-
26
- export default PublicFormWrapper;