@arquimedes.co/eureka-forms 0.1.2 → 0.2.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (117) hide show
  1. package/dist/@Types/@Types.d.ts +1 -1
  2. package/dist/@Types/@Types.js +1 -1
  3. package/dist/@Types/Form.d.ts +63 -63
  4. package/dist/@Types/Form.js +1 -1
  5. package/dist/@Types/FormStep.d.ts +105 -105
  6. package/dist/@Types/FormStep.js +1 -1
  7. package/dist/@Types/Organization.d.ts +16 -16
  8. package/dist/@Types/Organization.js +1 -1
  9. package/dist/App.d.ts +34 -32
  10. package/dist/App.js +262 -261
  11. package/dist/App.module.css +21 -0
  12. package/dist/FormComponents/Form/ColumnForm/ColumnForm.d.ts +4 -4
  13. package/dist/FormComponents/Form/ColumnForm/ColumnForm.js +232 -232
  14. package/dist/FormComponents/Form/ColumnForm/ColumnForm.module.css +46 -0
  15. package/dist/FormComponents/Form/ConfirmationDialog/ConfirmationDialog.d.ts +12 -12
  16. package/dist/FormComponents/Form/ConfirmationDialog/ConfirmationDialog.js +33 -33
  17. package/dist/FormComponents/Form/ConfirmationDialog/ConfirmationDialog.module.css +48 -0
  18. package/dist/FormComponents/Form/Form.d.ts +24 -23
  19. package/dist/FormComponents/Form/Form.js +116 -116
  20. package/dist/FormComponents/Form/Form.module.css +39 -0
  21. package/dist/FormComponents/Form/StepperForm/StepperForm.d.ts +4 -4
  22. package/dist/FormComponents/Form/StepperForm/StepperForm.js +6 -6
  23. package/dist/FormComponents/Form/StepperForm/StepperForm.module.css +0 -0
  24. package/dist/FormComponents/Section/MaterialSection/MaterialSection.d.ts +4 -4
  25. package/dist/FormComponents/Section/MaterialSection/MaterialSection.js +42 -42
  26. package/dist/FormComponents/Section/MaterialSection/MaterialSection.module.css +8 -0
  27. package/dist/FormComponents/Section/Section.d.ts +24 -23
  28. package/dist/FormComponents/Section/Section.js +25 -25
  29. package/dist/FormComponents/Step/ClassifierSelectorStep/ClassifierSelectorStep.d.ts +9 -9
  30. package/dist/FormComponents/Step/ClassifierSelectorStep/ClassifierSelectorStep.js +37 -37
  31. package/dist/FormComponents/Step/ClassifierSelectorStep/MaterialClassifierSelectorStep/MaterialClassifierSelectorStep.d.ts +4 -4
  32. package/dist/FormComponents/Step/ClassifierSelectorStep/MaterialClassifierSelectorStep/MaterialClassifierSelectorStep.js +105 -105
  33. package/dist/FormComponents/Step/ClassifierSelectorStep/MaterialClassifierSelectorStep/MaterialClassifierSelectorStep.module.css +25 -0
  34. package/dist/FormComponents/Step/DatePickerStep/DatePickerStep.d.ts +9 -9
  35. package/dist/FormComponents/Step/DatePickerStep/DatePickerStep.js +25 -25
  36. package/dist/FormComponents/Step/DatePickerStep/MaterialDatePickerStep/MaterialDatePickerStep.d.ts +4 -4
  37. package/dist/FormComponents/Step/DatePickerStep/MaterialDatePickerStep/MaterialDatePickerStep.js +35 -35
  38. package/dist/FormComponents/Step/DatePickerStep/MaterialDatePickerStep/MaterialDatePickerStep.module.css +9 -0
  39. package/dist/FormComponents/Step/FileUploadStep/FileUploadStep.d.ts +9 -9
  40. package/dist/FormComponents/Step/FileUploadStep/FileUploadStep.js +25 -25
  41. package/dist/FormComponents/Step/FileUploadStep/MaterialFileUploadStep/FileComponent/FileComponent.d.ts +11 -11
  42. package/dist/FormComponents/Step/FileUploadStep/MaterialFileUploadStep/FileComponent/FileComponent.js +110 -110
  43. package/dist/FormComponents/Step/FileUploadStep/MaterialFileUploadStep/FileComponent/FileComponent.module.css +52 -0
  44. package/dist/FormComponents/Step/FileUploadStep/MaterialFileUploadStep/MaterialFileUploadStep.d.ts +13 -13
  45. package/dist/FormComponents/Step/FileUploadStep/MaterialFileUploadStep/MaterialFileUploadStep.js +165 -165
  46. package/dist/FormComponents/Step/FileUploadStep/MaterialFileUploadStep/MaterialFileUploadStep.module.css +45 -0
  47. package/dist/FormComponents/Step/SelectorStep/MaterialSelectorStep/MaterialSelectorStep.d.ts +4 -4
  48. package/dist/FormComponents/Step/SelectorStep/MaterialSelectorStep/MaterialSelectorStep.js +99 -99
  49. package/dist/FormComponents/Step/SelectorStep/MaterialSelectorStep/MaterialSelectorStep.module.css +25 -0
  50. package/dist/FormComponents/Step/SelectorStep/SelectorStep.d.ts +9 -9
  51. package/dist/FormComponents/Step/SelectorStep/SelectorStep.js +37 -37
  52. package/dist/FormComponents/Step/SeparatorStep/MaterialSeparatorStep/MaterialSeparatorStep.d.ts +4 -4
  53. package/dist/FormComponents/Step/SeparatorStep/MaterialSeparatorStep/MaterialSeparatorStep.js +11 -11
  54. package/dist/FormComponents/Step/SeparatorStep/MaterialSeparatorStep/MaterialSeparatorStep.module.css +7 -0
  55. package/dist/FormComponents/Step/SeparatorStep/SeparatorStep.d.ts +9 -9
  56. package/dist/FormComponents/Step/SeparatorStep/SeparatorStep.js +37 -37
  57. package/dist/FormComponents/Step/Step.d.ts +10 -10
  58. package/dist/FormComponents/Step/Step.js +73 -64
  59. package/dist/FormComponents/Step/StepFunctions.d.ts +5 -5
  60. package/dist/FormComponents/Step/StepFunctions.js +51 -51
  61. package/dist/FormComponents/Step/TextAreaStep/MaterialTextAreaStep/DraftEditor.css +35 -0
  62. package/dist/FormComponents/Step/TextAreaStep/MaterialTextAreaStep/MaterialTextAreaStep.d.ts +6 -6
  63. package/dist/FormComponents/Step/TextAreaStep/MaterialTextAreaStep/MaterialTextAreaStep.js +112 -112
  64. package/dist/FormComponents/Step/TextAreaStep/MaterialTextAreaStep/MaterialTextAreaStep.module.css +58 -0
  65. package/dist/FormComponents/Step/TextAreaStep/TextAreaStep.d.ts +9 -9
  66. package/dist/FormComponents/Step/TextAreaStep/TextAreaStep.js +25 -25
  67. package/dist/FormComponents/Step/TextInputStep/MaterialTextInputStep/MaterialTextInputStep.d.ts +4 -4
  68. package/dist/FormComponents/Step/TextInputStep/MaterialTextInputStep/MaterialTextInputStep.js +43 -43
  69. package/dist/FormComponents/Step/TextInputStep/MaterialTextInputStep/MaterialTextInputStep.module.css +9 -0
  70. package/dist/FormComponents/Step/TextInputStep/TextInputStep.d.ts +9 -9
  71. package/dist/FormComponents/Step/TextInputStep/TextInputStep.js +25 -25
  72. package/dist/FormComponents/Step/TitleStep/MaterialTitleStep/MaterialTitleStep.d.ts +4 -4
  73. package/dist/FormComponents/Step/TitleStep/MaterialTitleStep/MaterialTitleStep.js +18 -18
  74. package/dist/FormComponents/Step/TitleStep/MaterialTitleStep/MaterialTitleStep.module.css +35 -0
  75. package/dist/FormComponents/Step/TitleStep/TitleStep.d.ts +9 -9
  76. package/dist/FormComponents/Step/TitleStep/TitleStep.js +37 -37
  77. package/dist/FormComponents/Term/MaterialTerm/MaterialTerm.d.ts +4 -4
  78. package/dist/FormComponents/Term/MaterialTerm/MaterialTerm.js +77 -77
  79. package/dist/FormComponents/Term/MaterialTerm/MaterialTerm.module.css +73 -0
  80. package/dist/FormComponents/Term/Term.d.ts +15 -15
  81. package/dist/FormComponents/Term/Term.js +25 -25
  82. package/dist/Widget.d.ts +1 -1
  83. package/dist/Widget.js +39 -56
  84. package/dist/constants/Files/FileExtensions.d.ts +3 -3
  85. package/dist/constants/Files/FileExtensions.js +65 -65
  86. package/dist/constants/Files/FileMaxSize.d.ts +2 -2
  87. package/dist/constants/Files/FileMaxSize.js +2 -2
  88. package/dist/constants/FormStepTypes.d.ts +33 -33
  89. package/dist/constants/FormStepTypes.js +39 -39
  90. package/dist/constants/InternalFormStyle.d.ts +3 -3
  91. package/dist/constants/InternalFormStyle.js +12 -12
  92. package/dist/constants/MaterialClassNameSeed.d.ts +1 -1
  93. package/dist/constants/MaterialClassNameSeed.js +1 -1
  94. package/dist/controllers/FileService.d.ts +5 -5
  95. package/dist/controllers/FileService.js +89 -89
  96. package/dist/index.d.ts +1 -2
  97. package/dist/index.js +16 -17
  98. package/dist/index.lib.d.ts +3 -0
  99. package/dist/index.lib.js +3 -0
  100. package/dist/index.module.css +14 -0
  101. package/dist/shared/Loader/Loader.d.ts +18 -18
  102. package/dist/shared/Loader/Loader.js +26 -26
  103. package/dist/shared/Loader/Loader.module.css +12 -0
  104. package/dist/shared/Navbar/Navbar.d.ts +9 -9
  105. package/dist/shared/Navbar/Navbar.js +18 -18
  106. package/dist/shared/Navbar/Navbar.module.css +18 -0
  107. package/dist/shared/RoundedButton/RoundedButton.d.ts +30 -30
  108. package/dist/shared/RoundedButton/RoundedButton.js +45 -45
  109. package/dist/shared/RoundedCheckBox/RoundedCheckBox.d.ts +24 -24
  110. package/dist/shared/RoundedCheckBox/RoundedCheckBox.js +101 -101
  111. package/dist/shared/RoundedDatePicker/RoundedDatePicker.d.ts +40 -40
  112. package/dist/shared/RoundedDatePicker/RoundedDatePicker.js +246 -246
  113. package/dist/shared/RoundedSelect/RoundedSelect.d.ts +42 -42
  114. package/dist/shared/RoundedSelect/RoundedSelect.js +171 -171
  115. package/dist/shared/RoundedTextField/RoundedTextField.d.ts +41 -41
  116. package/dist/shared/RoundedTextField/RoundedTextField.js +138 -138
  117. package/package.json +2 -2
@@ -1,171 +1,171 @@
1
- var __extends = (this && this.__extends) || (function () {
2
- var extendStatics = function (d, b) {
3
- extendStatics = Object.setPrototypeOf ||
4
- ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
5
- function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
6
- return extendStatics(d, b);
7
- };
8
- return function (d, b) {
9
- if (typeof b !== "function" && b !== null)
10
- throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
11
- extendStatics(d, b);
12
- function __() { this.constructor = d; }
13
- d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
14
- };
15
- })();
16
- var __assign = (this && this.__assign) || function () {
17
- __assign = Object.assign || function(t) {
18
- for (var s, i = 1, n = arguments.length; i < n; i++) {
19
- s = arguments[i];
20
- for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
21
- t[p] = s[p];
22
- }
23
- return t;
24
- };
25
- return __assign.apply(this, arguments);
26
- };
27
- var __rest = (this && this.__rest) || function (s, e) {
28
- var t = {};
29
- for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
30
- t[p] = s[p];
31
- if (s != null && typeof Object.getOwnPropertySymbols === "function")
32
- for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
33
- if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
34
- t[p[i]] = s[p[i]];
35
- }
36
- return t;
37
- };
38
- import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
39
- import React, { useEffect } from 'react';
40
- import { makeStyles } from '@material-ui/core/styles';
41
- import InputLabel from '@material-ui/core/InputLabel';
42
- import FormControl from '@material-ui/core/FormControl';
43
- import OutlinedInput from '@material-ui/core/OutlinedInput';
44
- import Select from '@material-ui/core/Select';
45
- import { FormHelperText } from '@material-ui/core';
46
- var useStyles = makeStyles(function (theme) { return ({
47
- root: {
48
- display: 'flex',
49
- flexWrap: 'wrap',
50
- },
51
- formControl: {
52
- margin: theme.spacing(1),
53
- minWidth: 120,
54
- },
55
- selectEmpty: {
56
- marginTop: theme.spacing(2),
57
- },
58
- }); });
59
- var useOutlinedInputStyles = function (props) {
60
- return makeStyles({
61
- root: {
62
- cursor: props.cantEdit ? 'default' : 'default',
63
- height: props.height,
64
- '& $notchedOutline': {
65
- borderColor: props.outlineColor,
66
- },
67
- '&:hover $notchedOutline': {
68
- borderColor: props.cantEdit
69
- ? props.outlineColor
70
- : props.focusColor,
71
- },
72
- '& .Mui-disabled': {
73
- cursor: 'default',
74
- color: props.color,
75
- },
76
- '& .Mui-error': {
77
- color: props.errorColor,
78
- },
79
- '&.Mui-error .EF-MuiOutlinedInput-notchedOutline': {
80
- borderColor: props.outlineColor,
81
- },
82
- '&$focused $notchedOutline': {
83
- borderColor: props.focusColor,
84
- },
85
- borderRadius: 10,
86
- color: props.color,
87
- },
88
- focused: {},
89
- notchedOutline: {},
90
- });
91
- };
92
- var useLabelInputStyles = function (props) {
93
- return makeStyles(function () { return ({
94
- focused: {
95
- color: props.focusColor + ' !important',
96
- },
97
- root: {
98
- marginTop: props.height != '40px' ? '-4px' : '0px',
99
- '&.EF-MuiInputLabel-shrink': {
100
- marginTop: '0px',
101
- },
102
- '& .Mui-error': {
103
- color: props.errorColor,
104
- },
105
- '&.Mui-error': {
106
- color: props.errorColor,
107
- },
108
- },
109
- }); });
110
- };
111
- var useHelperTextStyles = function (props) {
112
- return makeStyles(function () { return ({
113
- root: {
114
- '&.Mui-error': {
115
- color: props.errorColor,
116
- },
117
- },
118
- }); });
119
- };
120
- function CustomSelect(_a) {
121
- var children = _a.children, value = _a.value, handleUpdate = _a.handleUpdate, label = _a.label, minWidth = _a.minWidth, helperText = _a.helperText, _b = _a.color, color = _b === void 0 ? '#293241' : _b, _c = _a.errorColor, errorColor = _c === void 0 ? '#cc2936' : _c, _d = _a.focusColor, focusColor = _d === void 0 ? '#3d5a7f' : _d, _e = _a.outlineColor, outlineColor = _e === void 0 ? '#0000003b' : _e, _f = _a.cantEdit, cantEdit = _f === void 0 ? false : _f, _g = _a.containerMargin, containerMargin = _g === void 0 ? '8px' : _g, _h = _a.height, height = _h === void 0 ? '40px' : _h, required = _a.required, error = _a.error, others = __rest(_a, ["children", "value", "handleUpdate", "label", "minWidth", "helperText", "color", "errorColor", "focusColor", "outlineColor", "cantEdit", "containerMargin", "height", "required", "error"]);
122
- var classes = useStyles();
123
- var outlinedInputClasses = useOutlinedInputStyles({
124
- focusColor: focusColor,
125
- outlineColor: outlineColor,
126
- cantEdit: cantEdit,
127
- color: color,
128
- errorColor: errorColor,
129
- height: height,
130
- })();
131
- var labelClasses = useLabelInputStyles({
132
- focusColor: focusColor,
133
- outlineColor: outlineColor,
134
- errorColor: errorColor,
135
- color: color,
136
- cantEdit: cantEdit,
137
- height: height,
138
- })();
139
- var helperTextClasses = useHelperTextStyles({
140
- focusColor: focusColor,
141
- outlineColor: outlineColor,
142
- errorColor: errorColor,
143
- cantEdit: cantEdit,
144
- color: color,
145
- height: height,
146
- })();
147
- var inputLabel = React.useRef();
148
- var _j = React.useState(0), labelWidth = _j[0], setLabelWidth = _j[1];
149
- useEffect(function () {
150
- setLabelWidth(inputLabel.current.offsetWidth);
151
- }, [label]);
152
- return (_jsxs(FormControl, __assign({ variant: "outlined", className: classes.formControl, size: "small", style: minWidth !== undefined
153
- ? { minWidth: minWidth, outlineColor: outlineColor, margin: containerMargin }
154
- : {
155
- margin: containerMargin,
156
- }, fullWidth: true, required: required, error: error }, { children: [_jsx(InputLabel, __assign({ ref: inputLabel, classes: labelClasses }, { children: label }), void 0), _jsx(Select, __assign({}, others, { value: value, onChange: handleUpdate, input: _jsx(OutlinedInput, { disabled: cantEdit, labelWidth: labelWidth, name: label, classes: outlinedInputClasses }, void 0) }, { children: children }), void 0), helperText !== undefined && (_jsx(FormHelperText, __assign({ classes: helperTextClasses }, { children: helperText }), void 0))] }), void 0));
157
- }
158
- /**
159
- * Generic textfield with apps designs. Is class do to the use in the react-hook-forms library
160
- */
161
- var RoundedSelect = /** @class */ (function (_super) {
162
- __extends(RoundedSelect, _super);
163
- function RoundedSelect() {
164
- return _super !== null && _super.apply(this, arguments) || this;
165
- }
166
- RoundedSelect.prototype.render = function () {
167
- return _jsx(CustomSelect, __assign({}, this.props), void 0);
168
- };
169
- return RoundedSelect;
170
- }(React.Component));
171
- export default RoundedSelect;
1
+ var __extends = (this && this.__extends) || (function () {
2
+ var extendStatics = function (d, b) {
3
+ extendStatics = Object.setPrototypeOf ||
4
+ ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
5
+ function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
6
+ return extendStatics(d, b);
7
+ };
8
+ return function (d, b) {
9
+ if (typeof b !== "function" && b !== null)
10
+ throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
11
+ extendStatics(d, b);
12
+ function __() { this.constructor = d; }
13
+ d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
14
+ };
15
+ })();
16
+ var __assign = (this && this.__assign) || function () {
17
+ __assign = Object.assign || function(t) {
18
+ for (var s, i = 1, n = arguments.length; i < n; i++) {
19
+ s = arguments[i];
20
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
21
+ t[p] = s[p];
22
+ }
23
+ return t;
24
+ };
25
+ return __assign.apply(this, arguments);
26
+ };
27
+ var __rest = (this && this.__rest) || function (s, e) {
28
+ var t = {};
29
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
30
+ t[p] = s[p];
31
+ if (s != null && typeof Object.getOwnPropertySymbols === "function")
32
+ for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
33
+ if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
34
+ t[p[i]] = s[p[i]];
35
+ }
36
+ return t;
37
+ };
38
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
39
+ import React, { useEffect } from 'react';
40
+ import { makeStyles } from '@material-ui/core/styles';
41
+ import InputLabel from '@material-ui/core/InputLabel';
42
+ import FormControl from '@material-ui/core/FormControl';
43
+ import OutlinedInput from '@material-ui/core/OutlinedInput';
44
+ import Select from '@material-ui/core/Select';
45
+ import { FormHelperText } from '@material-ui/core';
46
+ var useStyles = makeStyles(function (theme) { return ({
47
+ root: {
48
+ display: 'flex',
49
+ flexWrap: 'wrap',
50
+ },
51
+ formControl: {
52
+ margin: theme.spacing(1),
53
+ minWidth: 120,
54
+ },
55
+ selectEmpty: {
56
+ marginTop: theme.spacing(2),
57
+ },
58
+ }); });
59
+ var useOutlinedInputStyles = function (props) {
60
+ return makeStyles({
61
+ root: {
62
+ cursor: props.cantEdit ? 'default' : 'default',
63
+ height: props.height,
64
+ '& $notchedOutline': {
65
+ borderColor: props.outlineColor,
66
+ },
67
+ '&:hover $notchedOutline': {
68
+ borderColor: props.cantEdit
69
+ ? props.outlineColor
70
+ : props.focusColor,
71
+ },
72
+ '& .Mui-disabled': {
73
+ cursor: 'default',
74
+ color: props.color,
75
+ },
76
+ '& .Mui-error': {
77
+ color: props.errorColor,
78
+ },
79
+ '&.Mui-error .EF-MuiOutlinedInput-notchedOutline': {
80
+ borderColor: props.outlineColor,
81
+ },
82
+ '&$focused $notchedOutline': {
83
+ borderColor: props.focusColor,
84
+ },
85
+ borderRadius: 10,
86
+ color: props.color,
87
+ },
88
+ focused: {},
89
+ notchedOutline: {},
90
+ });
91
+ };
92
+ var useLabelInputStyles = function (props) {
93
+ return makeStyles(function () { return ({
94
+ focused: {
95
+ color: props.focusColor + ' !important',
96
+ },
97
+ root: {
98
+ marginTop: props.height != '40px' ? '-4px' : '0px',
99
+ '&.EF-MuiInputLabel-shrink': {
100
+ marginTop: '0px',
101
+ },
102
+ '& .Mui-error': {
103
+ color: props.errorColor,
104
+ },
105
+ '&.Mui-error': {
106
+ color: props.errorColor,
107
+ },
108
+ },
109
+ }); });
110
+ };
111
+ var useHelperTextStyles = function (props) {
112
+ return makeStyles(function () { return ({
113
+ root: {
114
+ '&.Mui-error': {
115
+ color: props.errorColor,
116
+ },
117
+ },
118
+ }); });
119
+ };
120
+ function CustomSelect(_a) {
121
+ var children = _a.children, value = _a.value, handleUpdate = _a.handleUpdate, label = _a.label, minWidth = _a.minWidth, helperText = _a.helperText, _b = _a.color, color = _b === void 0 ? '#293241' : _b, _c = _a.errorColor, errorColor = _c === void 0 ? '#cc2936' : _c, _d = _a.focusColor, focusColor = _d === void 0 ? '#3d5a7f' : _d, _e = _a.outlineColor, outlineColor = _e === void 0 ? '#0000003b' : _e, _f = _a.cantEdit, cantEdit = _f === void 0 ? false : _f, _g = _a.containerMargin, containerMargin = _g === void 0 ? '8px' : _g, _h = _a.height, height = _h === void 0 ? '40px' : _h, required = _a.required, error = _a.error, others = __rest(_a, ["children", "value", "handleUpdate", "label", "minWidth", "helperText", "color", "errorColor", "focusColor", "outlineColor", "cantEdit", "containerMargin", "height", "required", "error"]);
122
+ var classes = useStyles();
123
+ var outlinedInputClasses = useOutlinedInputStyles({
124
+ focusColor: focusColor,
125
+ outlineColor: outlineColor,
126
+ cantEdit: cantEdit,
127
+ color: color,
128
+ errorColor: errorColor,
129
+ height: height,
130
+ })();
131
+ var labelClasses = useLabelInputStyles({
132
+ focusColor: focusColor,
133
+ outlineColor: outlineColor,
134
+ errorColor: errorColor,
135
+ color: color,
136
+ cantEdit: cantEdit,
137
+ height: height,
138
+ })();
139
+ var helperTextClasses = useHelperTextStyles({
140
+ focusColor: focusColor,
141
+ outlineColor: outlineColor,
142
+ errorColor: errorColor,
143
+ cantEdit: cantEdit,
144
+ color: color,
145
+ height: height,
146
+ })();
147
+ var inputLabel = React.useRef();
148
+ var _j = React.useState(0), labelWidth = _j[0], setLabelWidth = _j[1];
149
+ useEffect(function () {
150
+ setLabelWidth(inputLabel.current.offsetWidth);
151
+ }, [label]);
152
+ return (_jsxs(FormControl, __assign({ variant: "outlined", className: classes.formControl, size: "small", style: minWidth !== undefined
153
+ ? { minWidth: minWidth, outlineColor: outlineColor, margin: containerMargin }
154
+ : {
155
+ margin: containerMargin,
156
+ }, fullWidth: true, required: required, error: error }, { children: [_jsx(InputLabel, __assign({ ref: inputLabel, classes: labelClasses }, { children: label }), void 0), _jsx(Select, __assign({}, others, { value: value, onChange: handleUpdate, input: _jsx(OutlinedInput, { disabled: cantEdit, labelWidth: labelWidth, name: label, classes: outlinedInputClasses }, void 0) }, { children: children }), void 0), helperText !== undefined && (_jsx(FormHelperText, __assign({ classes: helperTextClasses }, { children: helperText }), void 0))] }), void 0));
157
+ }
158
+ /**
159
+ * Generic textfield with apps designs. Is class do to the use in the react-hook-forms library
160
+ */
161
+ var RoundedSelect = /** @class */ (function (_super) {
162
+ __extends(RoundedSelect, _super);
163
+ function RoundedSelect() {
164
+ return _super !== null && _super.apply(this, arguments) || this;
165
+ }
166
+ RoundedSelect.prototype.render = function () {
167
+ return _jsx(CustomSelect, __assign({}, this.props), void 0);
168
+ };
169
+ return RoundedSelect;
170
+ }(React.Component));
171
+ export default RoundedSelect;
@@ -1,41 +1,41 @@
1
- import React from 'react';
2
- import { TextFieldProps } from '@material-ui/core/TextField';
3
- interface StyleProps {
4
- /** The color of the text */
5
- textColor?: string;
6
- /** The color of the outline when selected and hovered on */
7
- focusColor?: string;
8
- /** The color of the error to display */
9
- errorColor?: string;
10
- /** The color of the outline when it is not selected */
11
- outlineColor?: string;
12
- /** The backgroundColor of the input */
13
- backgroundColor?: string;
14
- /** The color of the inner input */
15
- innerBackgroundColor?: string;
16
- /** The borderRadius of the input */
17
- borderRadius?: number;
18
- /** If input is readOnly */
19
- readOnly?: boolean;
20
- /** The padding of the input */
21
- padding?: string;
22
- /** The size of the font to display the input in */
23
- fontSize?: number | string;
24
- /** The weight of the font of the value and the placeholder */
25
- fontWeight?: number | string;
26
- /** The fontsize of the shrunken label */
27
- shrunkenFontSize?: number | string;
28
- /** If the input is multiline */
29
- multiline?: boolean;
30
- /** Cant edit */
31
- cantEdit?: boolean;
32
- }
33
- interface RoundedTextFieldProps extends StyleProps {
34
- }
35
- /**
36
- * Generic textfield with apps designs. Is class do to the use in the react-hook-forms library
37
- */
38
- declare class RoundedTextField extends React.Component<RoundedTextFieldProps & TextFieldProps> {
39
- render(): JSX.Element;
40
- }
41
- export default RoundedTextField;
1
+ import React from 'react';
2
+ import { TextFieldProps } from '@material-ui/core/TextField';
3
+ interface StyleProps {
4
+ /** The color of the text */
5
+ textColor?: string;
6
+ /** The color of the outline when selected and hovered on */
7
+ focusColor?: string;
8
+ /** The color of the error to display */
9
+ errorColor?: string;
10
+ /** The color of the outline when it is not selected */
11
+ outlineColor?: string;
12
+ /** The backgroundColor of the input */
13
+ backgroundColor?: string;
14
+ /** The color of the inner input */
15
+ innerBackgroundColor?: string;
16
+ /** The borderRadius of the input */
17
+ borderRadius?: number;
18
+ /** If input is readOnly */
19
+ readOnly?: boolean;
20
+ /** The padding of the input */
21
+ padding?: string;
22
+ /** The size of the font to display the input in */
23
+ fontSize?: number | string;
24
+ /** The weight of the font of the value and the placeholder */
25
+ fontWeight?: number | string;
26
+ /** The fontsize of the shrunken label */
27
+ shrunkenFontSize?: number | string;
28
+ /** If the input is multiline */
29
+ multiline?: boolean;
30
+ /** Cant edit */
31
+ cantEdit?: boolean;
32
+ }
33
+ interface RoundedTextFieldProps extends StyleProps {
34
+ }
35
+ /**
36
+ * Generic textfield with apps designs. Is class do to the use in the react-hook-forms library
37
+ */
38
+ declare class RoundedTextField extends React.Component<RoundedTextFieldProps & TextFieldProps> {
39
+ render(): JSX.Element;
40
+ }
41
+ export default RoundedTextField;