techsbcn-storybook 0.12.0 → 0.12.1

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.
@@ -1,6 +1,7 @@
1
1
  import React from 'react';
2
2
  import { ObjectKey } from '../../../interfaces';
3
3
  import './SimpleTableComponent.scss';
4
+ import { InputType } from '../../fields/TextFieldComponent/TextFieldComponent';
4
5
  interface SimpleTableComponentProps {
5
6
  rows: any[];
6
7
  values: ObjectKey;
@@ -47,11 +48,21 @@ interface ColumnProps {
47
48
  disabledIcon: any;
48
49
  onClickId: (id: number) => void;
49
50
  };
51
+ isEditableTableCell?: EditableCellProps;
50
52
  }
51
53
  interface ActionProps {
52
54
  children: React.ReactNode;
53
55
  onClick?: (row: any) => void;
54
56
  onClickId?: (id: number) => void;
55
57
  }
58
+ interface EditableCellProps {
59
+ isTextField?: {
60
+ type?: InputType;
61
+ onCellValueChange: (data: any) => void;
62
+ };
63
+ isSelectField?: {
64
+ onCellValueChange: (data: any) => void;
65
+ };
66
+ }
56
67
  export declare const SimpleTableComponent: React.FunctionComponent<SimpleTableComponentProps>;
57
68
  export {};
@@ -1,6 +1,7 @@
1
1
  import React from 'react';
2
2
  import { SearchFilters, ObjectKey } from '../../../interfaces';
3
3
  import './TableComponent.scss';
4
+ import { InputType } from '../../fields/TextFieldComponent/TextFieldComponent';
4
5
  interface TableComponentProps {
5
6
  rows: any[];
6
7
  values: ObjectKey;
@@ -50,11 +51,21 @@ interface ColumnProps {
50
51
  disabledIcon: any;
51
52
  onClickId: (id: number) => void;
52
53
  };
54
+ isEditableTableCell?: EditableCellProps;
53
55
  }
54
56
  interface ActionProps {
55
57
  children: React.ReactNode;
56
58
  onClick?: (row: any) => void;
57
59
  onClickId?: (id: number) => void;
58
60
  }
61
+ interface EditableCellProps {
62
+ isTextField?: {
63
+ type?: InputType;
64
+ onCellValueChange: (data: any) => void;
65
+ };
66
+ isSelectField?: {
67
+ onCellValueChange: (data: any) => void;
68
+ };
69
+ }
59
70
  export declare const TableComponent: React.FunctionComponent<TableComponentProps>;
60
71
  export {};
@@ -9,6 +9,7 @@ var React__default = _interopDefault(React);
9
9
  var material = require('@mui/material');
10
10
  var _ = require('@mui/material/');
11
11
  var iconsMaterial = require('@mui/icons-material');
12
+ var lodash = require('lodash');
12
13
  var reactRouterDom = require('react-router-dom');
13
14
  var MenuIcon = _interopDefault(require('@mui/icons-material/Menu'));
14
15
  var Select = _interopDefault(require('react-select'));
@@ -275,6 +276,71 @@ var MainWrapperComponent = function MainWrapperComponent(props) {
275
276
  var css_248z$3 = ".table-component .paper-container {\n box-shadow: none;\n background-color: transparent !important;\n}\n.table-component .paper-container .checkbox-cell .MuiCheckbox-root {\n padding: 0 !important;\n}\n.table-component .paper-container .checkbox-cell .MuiCheckbox-root:hover {\n background-color: transparent !important;\n}\n.table-component .paper-container .checkbox-cell .Mui-checked {\n color: rgba(0, 0, 0, 0.54) !important;\n}\n.table-component .paper-container .checkbox-cell .MuiCheckbox-indeterminate {\n color: #212529 !important;\n}\n.table-component .paper-container .table-container {\n max-height: 68vh;\n border-bottom: 1px solid black;\n}\n.table-component .paper-container .table-container .table-column:first-child {\n border-radius: 5px 0 0 5px;\n}\n.table-component .paper-container .table-container .table-column:last-child {\n border-right: none !important;\n border-radius: 0 5px 5px 0;\n}\n.table-component .paper-container .table-container .table-column {\n font-weight: bold;\n font-size: 1rem !important;\n padding: 10px !important;\n border-top: 1px solid #e0e0e0;\n border-right: 1px solid #e0e0e0;\n border-bottom: 2px solid #e0e0e0;\n}\n.table-component .paper-container .table-container .table-column .table-header-cell {\n color: black;\n padding: 0px 10px 0px 10px !important;\n}\n.table-component .paper-container .table-container .table-rows.row-click {\n cursor: pointer;\n}\n.table-component .paper-container .table-container .table-rows.row-click:hover {\n background-color: rgba(0, 0, 0, 0.04);\n}\n.table-component .paper-container .table-container .table-rows .MuiTableCell-root {\n padding: 6px !important;\n overflow: hidden;\n}\n.table-component .paper-container .table-container .table-rows .img-table {\n width: 100%;\n height: 110px;\n}\n.table-component .paper-container .table-container .table-rows .img-table img {\n object-fit: contain;\n}\n.table-component .paper-container .table-container .table-rows .actions {\n float: right;\n}\n.table-component .paper-container .table-container .table-rows .btn-action {\n color: rgba(0, 0, 0, 0.54);\n display: inline-block;\n text-decoration: none;\n font-size: 1.6em !important;\n padding: 0px 7px;\n cursor: pointer;\n}\n.table-component .paper-container .MuiTable-root.loading {\n opacity: 0.5;\n}\n.table-component .paper-container .MuiTable-root.loading .MuiCircularProgress-root {\n width: 80px !important;\n height: 80px !important;\n position: absolute;\n left: 0;\n right: 0;\n top: 5px;\n margin: auto;\n color: grey;\n}\n.table-component .paper-container .MuiTablePagination-root {\n overflow: unset;\n}\n.table-component .paper-container .MuiTablePagination-root .MuiToolbar-root {\n justify-content: center !important;\n flex-wrap: wrap;\n padding: 0px !important;\n}\n.table-component .paper-container .MuiTablePagination-root .MuiTablePagination-spacer {\n flex: 0 !important;\n}\n.table-component .paper-container .MuiTablePagination-root .pagination .MuiPaginationItem-page {\n border-radius: 0px;\n margin: 1px;\n color: white !important;\n background-color: #3f4d67;\n}\n.table-component .paper-container .MuiTablePagination-root .pagination .MuiPaginationItem-page.Mui-selected {\n background-color: #3299C7;\n}\n.table-component .paper-container .MuiTablePagination-root .pagination li button {\n padding: 14px;\n}\n.table-component .paper-container .MuiTablePagination-root .pagination li:nth-child(2) .MuiPaginationItem-page {\n border-radius: 5px 0 0 5px !important;\n}\n.table-component .paper-container .MuiTablePagination-root .pagination li:nth-last-child(2) .MuiPaginationItem-page {\n border-radius: 0 5px 5px 0 !important;\n}\n@media (max-width: 992px) {\n .table-component .paper-container .table-container {\n max-height: 60vh;\n border-top: 1px solid #cccccc;\n }\n .table-component .paper-container .table-container .MuiTable-root {\n border-collapse: collapse !important;\n }\n .table-component .paper-container .table-container .MuiTableHead-root {\n display: none !important;\n }\n .table-component .paper-container .table-container .table-rows {\n border-bottom: 2px solid #cccccc;\n }\n .table-component .paper-container .table-container .table-rows .MuiTableCell-root {\n width: 100%;\n border-bottom: none !important;\n }\n .table-component .paper-container .table-container .table-rows .MuiTableCell-root .label-cell {\n font-size: 1rem;\n vertical-align: top;\n width: 50%;\n height: auto;\n }\n .table-component .paper-container .table-container .table-rows .MuiTableCell-root .label-cell + div {\n display: inline-block;\n }\n .table-component .paper-container .table-container .table-rows .table-cell {\n display: inline-block !important;\n }\n .table-component .paper-container .table-container .table-rows .format-value {\n text-overflow: ellipsis;\n white-space: nowrap;\n overflow: hidden;\n width: 50%;\n max-width: 300px;\n }\n}";
276
277
  styleInject(css_248z$3);
277
278
 
279
+ var css_248z$4 = ".text-field-component .MuiFormLabel-root {\n color: #666666 !important;\n font-size: calc(12pt + (14 - 12) * calc(100vw - 300px)/1300) !important;\n transform: translate(0, 0.5px) scale(0.85);\n transform-origin: top left;\n text-overflow: initial !important;\n}\n.text-field-component .MuiFormLabel-root + .MuiInputBase-formControl {\n margin-top: 25px !important;\n}\n.text-field-component .MuiInputBase-root.no-border {\n border: none !important;\n padding: 0 !important;\n width: fit-content !important;\n}\n.text-field-component .MuiInputBase-root {\n color: #666666 !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 #3299C7;\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 color: #666666;\n}";
280
+ styleInject(css_248z$4);
281
+
282
+ var TextFieldComponent = function TextFieldComponent(props) {
283
+ var _React$useState = React__default.useState(false),
284
+ hover = _React$useState[0],
285
+ setHover = _React$useState[1];
286
+
287
+ return React__default.createElement(_.Box, {
288
+ className: "text-field-component",
289
+ width: "100%"
290
+ }, React__default.createElement(_.TextField, {
291
+ onMouseEnter: function onMouseEnter() {
292
+ return setHover(true);
293
+ },
294
+ onMouseLeave: function onMouseLeave() {
295
+ return setHover(false);
296
+ },
297
+ name: props.name,
298
+ error: props.error,
299
+ id: props.id,
300
+ label: props.label,
301
+ value: props.value,
302
+ defaultValue: props.defaultValue,
303
+ className: props.className,
304
+ required: props.required,
305
+ disabled: props.disabled,
306
+ type: props.type,
307
+ placeholder: props.placeholder,
308
+ autoComplete: props.autoComplete,
309
+ variant: "standard",
310
+ ref: props.inputRef,
311
+ InputProps: {
312
+ className: (props.noBorders ? 'no-border' : '') + " " + (!props.disabled && hover ? 'main-border-color' : ''),
313
+ disableUnderline: true,
314
+ startAdornment: props.startIcon,
315
+ endAdornment: props.endIcon,
316
+ inputProps: {
317
+ max: props.maxNumber,
318
+ min: props.minNumber,
319
+ step: props.step
320
+ }
321
+ },
322
+ InputLabelProps: {
323
+ shrink: true
324
+ },
325
+ helperText: props.helperText,
326
+ fullWidth: props.fullWidth,
327
+ multiline: props.multiline,
328
+ rows: props.rows,
329
+ onChange: props.onChange,
330
+ onKeyUp: props.onKeyUp,
331
+ inputProps: {
332
+ maxLength: props.maxLength,
333
+ step: props.step,
334
+ max: props.maxNumber,
335
+ min: props.minNumber
336
+ }
337
+ }));
338
+ };
339
+ TextFieldComponent.defaultProps = {
340
+ fullWidth: true,
341
+ type: 'text'
342
+ };
343
+
278
344
  var TableComponent = function TableComponent(props) {
279
345
  var _props$isCheckTable7, _props$isCheckTable8, _props$isCheckTable9;
280
346
 
@@ -416,6 +482,32 @@ var TableComponent = function TableComponent(props) {
416
482
  return o;
417
483
  };
418
484
 
485
+ var EditableTableCell = function EditableTableCell(row, value, fieldName, editableCell) {
486
+ var rowEdit = JSON.parse(JSON.stringify(row));
487
+
488
+ if (editableCell.isTextField) {
489
+ var setUpdate = lodash.debounce(function () {
490
+ var _editableCell$isTextF, _editableCell$isTextF2;
491
+
492
+ ((_editableCell$isTextF = editableCell.isTextField) == null ? void 0 : _editableCell$isTextF.onCellValueChange) && ((_editableCell$isTextF2 = editableCell.isTextField) == null ? void 0 : _editableCell$isTextF2.onCellValueChange(rowEdit));
493
+ }, 1000);
494
+
495
+ var handleTextFieldChange = function handleTextFieldChange(e) {
496
+ rowEdit[fieldName] = e.target.value;
497
+ setUpdate();
498
+ };
499
+
500
+ return React__default.createElement(TextFieldComponent, {
501
+ type: editableCell.isTextField.type,
502
+ onChange: handleTextFieldChange,
503
+ name: fieldName,
504
+ defaultValue: value
505
+ });
506
+ } else {
507
+ return value;
508
+ }
509
+ };
510
+
419
511
  return React__default.createElement(_.Box, {
420
512
  className: "table-component"
421
513
  }, React__default.createElement(_.Paper, {
@@ -546,7 +638,7 @@ var TableComponent = function TableComponent(props) {
546
638
  onChange: function onChange(event) {
547
639
  return onCheckAction(event, row.id);
548
640
  }
549
- })) : React__default.createElement(_.Box, {
641
+ })) : column.isEditableTableCell ? EditableTableCell(row, value, column.id, column.isEditableTableCell) : React__default.createElement(_.Box, {
550
642
  className: ((_column$enumColumn5 = column.enumColumn) != null && _column$enumColumn5.hasColor ? value.toLowerCase() + "-type-color" : '') + " format-value"
551
643
  }, formatValue(value, column)));
552
644
  }));
@@ -592,8 +684,8 @@ TableComponent.defaultProps = {
592
684
  showTotalCount: true
593
685
  };
594
686
 
595
- var css_248z$4 = ".main-layout-simple {\n width: 100%;\n}\n.main-layout-simple .main-wrapper {\n width: 100%;\n min-height: 100vh;\n height: fit-content;\n position: relative;\n}";
596
- styleInject(css_248z$4);
687
+ var css_248z$5 = ".main-layout-simple {\n width: 100%;\n}\n.main-layout-simple .main-wrapper {\n width: 100%;\n min-height: 100vh;\n height: fit-content;\n position: relative;\n}";
688
+ styleInject(css_248z$5);
597
689
 
598
690
  var MainLayoutSimple = function MainLayoutSimple(props) {
599
691
  return React__default.createElement(_.Box, {
@@ -759,8 +851,8 @@ var VerticalNavItemCollapse = function VerticalNavItemCollapse(props) {
759
851
 
760
852
  var VerticalNavItemCollapse$1 = /*#__PURE__*/React__default.memo(VerticalNavItemCollapse);
761
853
 
762
- var css_248z$5 = ".vertical-navigation {\n background: transparent;\n color: white;\n}\n.vertical-navigation .nav-item {\n cursor: pointer;\n}\n.vertical-navigation .nav-item svg {\n font-size: 28px;\n}\n.vertical-navigation .nav-item {\n padding: 12px;\n}\n.vertical-navigation .nav-item:hover {\n background-color: #333f54;\n}\n.vertical-navigation .active .nav-item {\n background-color: #3299C7;\n border-radius: 0 25px 25px 0;\n margin-right: 16px;\n}\n.vertical-navigation .active .nav-item .nav-item-text {\n color: white !important;\n}\n.vertical-navigation .active .nav-item:hover {\n color: white !important;\n}\n.vertical-navigation .active .nav-item:hover .nav-item-text {\n color: white !important;\n}\n.vertical-navigation .nav-item-collapse .active {\n background-color: #333f54;\n}\n.vertical-navigation .nav-item-collapse .active .nav-item-text {\n color: white !important;\n}\n.vertical-navigation .nav-item-collapse .active:hover {\n color: white !important;\n}\n.vertical-navigation .nav-item-collapse .active:hover .nav-item-text {\n color: white !important;\n}\n.vertical-navigation .nav-item-collapse .open {\n background-color: #333f54;\n color: white !important;\n}\n.vertical-navigation .nav-item-collapse .open .nav-item-text {\n color: white !important;\n}\n.vertical-navigation .nav-item-collapse .collapse-children {\n background-color: #39465e;\n}\n.vertical-navigation .nav-item-collapse .collapse-children .nav-item-text {\n padding-left: 16px;\n padding-right: 16px;\n}";
763
- styleInject(css_248z$5);
854
+ var css_248z$6 = ".vertical-navigation {\n background: transparent;\n color: white;\n}\n.vertical-navigation .nav-item {\n cursor: pointer;\n}\n.vertical-navigation .nav-item svg {\n font-size: 28px;\n}\n.vertical-navigation .nav-item {\n padding: 12px;\n}\n.vertical-navigation .nav-item:hover {\n background-color: #333f54;\n}\n.vertical-navigation .active .nav-item {\n background-color: #3299C7;\n border-radius: 0 25px 25px 0;\n margin-right: 16px;\n}\n.vertical-navigation .active .nav-item .nav-item-text {\n color: white !important;\n}\n.vertical-navigation .active .nav-item:hover {\n color: white !important;\n}\n.vertical-navigation .active .nav-item:hover .nav-item-text {\n color: white !important;\n}\n.vertical-navigation .nav-item-collapse .active {\n background-color: #333f54;\n}\n.vertical-navigation .nav-item-collapse .active .nav-item-text {\n color: white !important;\n}\n.vertical-navigation .nav-item-collapse .active:hover {\n color: white !important;\n}\n.vertical-navigation .nav-item-collapse .active:hover .nav-item-text {\n color: white !important;\n}\n.vertical-navigation .nav-item-collapse .open {\n background-color: #333f54;\n color: white !important;\n}\n.vertical-navigation .nav-item-collapse .open .nav-item-text {\n color: white !important;\n}\n.vertical-navigation .nav-item-collapse .collapse-children {\n background-color: #39465e;\n}\n.vertical-navigation .nav-item-collapse .collapse-children .nav-item-text {\n padding-left: 16px;\n padding-right: 16px;\n}";
855
+ styleInject(css_248z$6);
764
856
 
765
857
  (function (NavigationType) {
766
858
  NavigationType[NavigationType["Item"] = 0] = "Item";
@@ -790,8 +882,8 @@ var VerticalNav = function VerticalNav(props) {
790
882
  }));
791
883
  };
792
884
 
793
- var css_248z$6 = ".user-info svg {\n font-size: 28px !important;\n}";
794
- styleInject(css_248z$6);
885
+ var css_248z$7 = ".user-info svg {\n font-size: 28px !important;\n}";
886
+ styleInject(css_248z$7);
795
887
 
796
888
  var UserInfo = function UserInfo(props) {
797
889
  var _React$useState = React__default.useState(null),
@@ -843,8 +935,8 @@ var UserInfo = function UserInfo(props) {
843
935
  }))))));
844
936
  };
845
937
 
846
- var css_248z$7 = ".app-sidebar {\n width: 17rem;\n background-color: #3f4d67;\n box-shadow: 1px 0 20px 0 #3f4d67;\n z-index: 1029;\n color: white;\n}";
847
- styleInject(css_248z$7);
938
+ var css_248z$8 = ".app-sidebar {\n width: 17rem;\n background-color: #3f4d67;\n box-shadow: 1px 0 20px 0 #3f4d67;\n z-index: 1029;\n color: white;\n}";
939
+ styleInject(css_248z$8);
848
940
 
849
941
  var AppSidebar = function AppSidebar(props) {
850
942
  return React__default.createElement(React__default.Fragment, null, React__default.createElement(material.Drawer, {
@@ -901,8 +993,8 @@ var AppSidebar = function AppSidebar(props) {
901
993
  }, props.footerComponents))))));
902
994
  };
903
995
 
904
- var css_248z$8 = ".drawer-sidebar {\n width: 17rem;\n background-color: #3f4d67;\n box-shadow: 1px 0 20px 0 #3f4d67;\n z-index: 1029;\n color: white;\n}";
905
- styleInject(css_248z$8);
996
+ var css_248z$9 = ".drawer-sidebar {\n width: 17rem;\n background-color: #3f4d67;\n box-shadow: 1px 0 20px 0 #3f4d67;\n z-index: 1029;\n color: white;\n}";
997
+ styleInject(css_248z$9);
906
998
 
907
999
  var DrawerSidebar = function DrawerSidebar(props) {
908
1000
  return React__default.createElement(material.Drawer, {
@@ -928,8 +1020,8 @@ var DrawerSidebar = function DrawerSidebar(props) {
928
1020
  }, props.footerComponents))));
929
1021
  };
930
1022
 
931
- var css_248z$9 = ".app-bar {\n background-color: white !important;\n border-bottom: 1px solid rgba(0, 0, 0, 0.12);\n color: black !important;\n}\n.app-bar .header-logo {\n max-height: 59px;\n height: 100%;\n min-height: 56px;\n width: 100%;\n}\n.app-bar img {\n max-height: 59px;\n height: 100%;\n min-height: 56px;\n width: 100%;\n}";
932
- styleInject(css_248z$9);
1023
+ var css_248z$a = ".app-bar {\n background-color: white !important;\n border-bottom: 1px solid rgba(0, 0, 0, 0.12);\n color: black !important;\n}\n.app-bar .header-logo {\n max-height: 59px;\n height: 100%;\n min-height: 56px;\n width: 100%;\n}\n.app-bar img {\n max-height: 59px;\n height: 100%;\n min-height: 56px;\n width: 100%;\n}";
1024
+ styleInject(css_248z$a);
933
1025
 
934
1026
  var AppHeader = function AppHeader(props) {
935
1027
  return React__default.createElement(material.AppBar, {
@@ -951,8 +1043,8 @@ var AppHeader = function AppHeader(props) {
951
1043
  }, React__default.createElement(MenuIcon, null)), props.children));
952
1044
  };
953
1045
 
954
- var css_248z$a = ".MuiButton-root {\n width: auto;\n padding: 0.8rem 1rem !important;\n text-transform: inherit !important;\n line-height: inherit !important;\n box-shadow: none !important;\n font-size: 1rem !important;\n background-color: #3299C7;\n}\n.MuiButton-root.btn-login {\n width: 100%;\n}\n.MuiButton-root.btn-modal-cancel {\n background-color: #666666 !important;\n}\n.MuiButton-root.btn-modal-cancel.Mui-disabled {\n background-color: #666666c4 !important;\n color: #030303b4 !important;\n}\n.MuiButton-root:hover {\n box-shadow: 0px 2px 4px -1px rgba(0, 0, 0, 0.2), 0px 4px 5px 0px rgba(0, 0, 0, 0.14), 0px 1px 10px 0px rgba(0, 0, 0, 0.12) !important;\n}\n.MuiButton-root .MuiCircularProgress-root {\n color: white !important;\n}\n.MuiButton-root .MuiButton-label .MuiCircularProgress-root {\n color: white !important;\n}\n.MuiButton-root .MuiButton-startIcon svg {\n font-size: 20px !important;\n}\n.MuiButton-root .MuiButton-endIcon svg {\n font-size: 20px !important;\n}";
955
- styleInject(css_248z$a);
1046
+ var css_248z$b = ".MuiButton-root {\n width: auto;\n padding: 0.8rem 1rem !important;\n text-transform: inherit !important;\n line-height: inherit !important;\n box-shadow: none !important;\n font-size: 1rem !important;\n background-color: #3299C7;\n}\n.MuiButton-root.btn-login {\n width: 100%;\n}\n.MuiButton-root.btn-modal-cancel {\n background-color: #666666 !important;\n}\n.MuiButton-root.btn-modal-cancel.Mui-disabled {\n background-color: #666666c4 !important;\n color: #030303b4 !important;\n}\n.MuiButton-root:hover {\n box-shadow: 0px 2px 4px -1px rgba(0, 0, 0, 0.2), 0px 4px 5px 0px rgba(0, 0, 0, 0.14), 0px 1px 10px 0px rgba(0, 0, 0, 0.12) !important;\n}\n.MuiButton-root .MuiCircularProgress-root {\n color: white !important;\n}\n.MuiButton-root .MuiButton-label .MuiCircularProgress-root {\n color: white !important;\n}\n.MuiButton-root .MuiButton-startIcon svg {\n font-size: 20px !important;\n}\n.MuiButton-root .MuiButton-endIcon svg {\n font-size: 20px !important;\n}";
1047
+ styleInject(css_248z$b);
956
1048
 
957
1049
  var ButtonComponent = function ButtonComponent(props) {
958
1050
  return React__default.createElement(_.Button, {
@@ -973,71 +1065,6 @@ ButtonComponent.defaultProps = {
973
1065
  component: 'button'
974
1066
  };
975
1067
 
976
- var css_248z$b = ".text-field-component .MuiFormLabel-root {\n color: #666666 !important;\n font-size: calc(12pt + (14 - 12) * calc(100vw - 300px)/1300) !important;\n transform: translate(0, 0.5px) scale(0.85);\n transform-origin: top left;\n text-overflow: initial !important;\n}\n.text-field-component .MuiFormLabel-root + .MuiInputBase-formControl {\n margin-top: 25px !important;\n}\n.text-field-component .MuiInputBase-root.no-border {\n border: none !important;\n padding: 0 !important;\n width: fit-content !important;\n}\n.text-field-component .MuiInputBase-root {\n color: #666666 !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 #3299C7;\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 color: #666666;\n}";
977
- styleInject(css_248z$b);
978
-
979
- var TextFieldComponent = function TextFieldComponent(props) {
980
- var _React$useState = React__default.useState(false),
981
- hover = _React$useState[0],
982
- setHover = _React$useState[1];
983
-
984
- return React__default.createElement(_.Box, {
985
- className: "text-field-component",
986
- width: "100%"
987
- }, React__default.createElement(_.TextField, {
988
- onMouseEnter: function onMouseEnter() {
989
- return setHover(true);
990
- },
991
- onMouseLeave: function onMouseLeave() {
992
- return setHover(false);
993
- },
994
- name: props.name,
995
- error: props.error,
996
- id: props.id,
997
- label: props.label,
998
- value: props.value,
999
- defaultValue: props.defaultValue,
1000
- className: props.className,
1001
- required: props.required,
1002
- disabled: props.disabled,
1003
- type: props.type,
1004
- placeholder: props.placeholder,
1005
- autoComplete: props.autoComplete,
1006
- variant: "standard",
1007
- ref: props.inputRef,
1008
- InputProps: {
1009
- className: (props.noBorders ? 'no-border' : '') + " " + (!props.disabled && hover ? 'main-border-color' : ''),
1010
- disableUnderline: true,
1011
- startAdornment: props.startIcon,
1012
- endAdornment: props.endIcon,
1013
- inputProps: {
1014
- max: props.maxNumber,
1015
- min: props.minNumber,
1016
- step: props.step
1017
- }
1018
- },
1019
- InputLabelProps: {
1020
- shrink: true
1021
- },
1022
- helperText: props.helperText,
1023
- fullWidth: props.fullWidth,
1024
- multiline: props.multiline,
1025
- rows: props.rows,
1026
- onChange: props.onChange,
1027
- onKeyUp: props.onKeyUp,
1028
- inputProps: {
1029
- maxLength: props.maxLength,
1030
- step: props.step,
1031
- max: props.maxNumber,
1032
- min: props.minNumber
1033
- }
1034
- }));
1035
- };
1036
- TextFieldComponent.defaultProps = {
1037
- fullWidth: true,
1038
- type: 'text'
1039
- };
1040
-
1041
1068
  var css_248z$c = ".text-simple-component .MuiFormLabel-root {\n color: #666666 !important;\n font-size: calc(12pt + (14 - 12) * calc(100vw - 300px)/1300) !important;\n transform: translate(0, 0.5px) scale(0.85);\n transform-origin: top left;\n text-overflow: initial !important;\n}\n.text-simple-component .MuiFormLabel-root + .text-simple-box.no-border {\n margin-top: 7px !important;\n}\n.text-simple-component .text-simple-box.no-border {\n border: none !important;\n padding: 0 !important;\n}\n.text-simple-component .text-simple-box {\n color: #666666 !important;\n font-size: 1rem;\n border: 1px solid grey;\n padding: 0.868rem;\n border-radius: 3px !important;\n}\n.text-simple-component .helper-text {\n font-size: 0.85rem !important;\n padding: 0 !important;\n margin-top: 3px;\n line-height: 1.66;\n color: #666666 !important;\n letter-spacing: 0.03333em;\n}\n.text-simple-component .has-error-border {\n border-color: #F24726 !important;\n}\n.text-simple-component .has-error {\n color: #F24726 !important;\n}";
1042
1069
  styleInject(css_248z$c);
1043
1070