@ssplib/react-components 0.0.181 → 0.0.182

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.
@@ -107,6 +107,8 @@ function FetchAutoComplete({ name, url, title, customLoadingText, shouldRefetch
107
107
  react_1.default.createElement(material_1.Autocomplete, { loading: loading, loadingText: loadingText, options: list, defaultValue: dValue, isOptionEqualToValue: (op, value) => op.id === value.id, onChange: (e, v) => handleAutoCompleteChange(v), renderInput: (params) => {
108
108
  var _a;
109
109
  return (react_1.default.createElement(material_1.TextField, Object.assign({}, params, { size: 'small', fullWidth: true, placeholder: title, onFocus: onFocus, error: (0, lodash_get_1.default)(context === null || context === void 0 ? void 0 : context.errors, name) ? true : false, helperText: (_a = (0, lodash_get_1.default)(context === null || context === void 0 ? void 0 : context.errors, name)) === null || _a === void 0 ? void 0 : _a.message })));
110
+ }, sx: {
111
+ bgcolor: 'white',
110
112
  }, size: 'small', fullWidth: true })));
111
113
  }
112
114
  exports.default = FetchAutoComplete;
@@ -53,6 +53,8 @@ function FixedAutoComplete({ name, title, required = false, list, defaultValue,
53
53
  react_1.default.createElement(material_1.Autocomplete, { options: list, defaultValue: defaultValue, isOptionEqualToValue: (op, value) => op.id === value.id, onChange: (e, v) => handleAutoCompleteChange(v), renderInput: (params) => {
54
54
  var _a;
55
55
  return (react_1.default.createElement(material_1.TextField, Object.assign({}, params, { size: 'small', fullWidth: true, placeholder: title, error: (0, lodash_get_1.default)(context === null || context === void 0 ? void 0 : context.errors, name) ? true : false, helperText: (_a = (0, lodash_get_1.default)(context === null || context === void 0 ? void 0 : context.errors, name)) === null || _a === void 0 ? void 0 : _a.message })));
56
- }, size: 'small', fullWidth: true })));
56
+ }, size: 'small', sx: {
57
+ bgcolor: 'white',
58
+ }, fullWidth: true })));
57
59
  }
58
60
  exports.FixedAutoComplete = FixedAutoComplete;
@@ -56,7 +56,7 @@ function Input(_a) {
56
56
  const errorData = (0, lodash_get_1.default)(context === null || context === void 0 ? void 0 : context.errors, props.name);
57
57
  const helperText = errorData === null || errorData === void 0 ? void 0 : errorData.message;
58
58
  const error = errorData ? true : false;
59
- const formConfig = Object.assign(Object.assign(Object.assign({}, context === null || context === void 0 ? void 0 : context.formRegister(name, {
59
+ const formConfig = Object.assign(Object.assign(Object.assign(Object.assign({}, context === null || context === void 0 ? void 0 : context.formRegister(name, {
60
60
  validate: (v, f) => {
61
61
  if (v.length <= 0 && props.required)
62
62
  return 'Este campo é obrigatório';
@@ -100,7 +100,9 @@ function Input(_a) {
100
100
  }
101
101
  },
102
102
  })), { error,
103
- helperText }), inputConfig);
103
+ helperText }), inputConfig), { sx: {
104
+ backgroundColor: 'white',
105
+ } });
104
106
  switch (type) {
105
107
  case 'input':
106
108
  case 'email':
@@ -57,6 +57,8 @@ function MultInput(_a) {
57
57
  if (v.length < inputMinLength && required)
58
58
  return `Limite mínimo de ${inputMinLength} caracteres`;
59
59
  },
60
- }), { error: (0, lodash_get_1.default)(context.errors, name) ? true : false, helperText: (_b = (0, lodash_get_1.default)(context.errors, name)) === null || _b === void 0 ? void 0 : _b.message, placeholder: customPlaceholder ? customPlaceholder : title }))));
60
+ }), { error: (0, lodash_get_1.default)(context.errors, name) ? true : false, helperText: (_b = (0, lodash_get_1.default)(context.errors, name)) === null || _b === void 0 ? void 0 : _b.message, sx: {
61
+ bgcolor: 'white',
62
+ }, placeholder: customPlaceholder ? customPlaceholder : title }))));
61
63
  }
62
64
  exports.default = MultInput;
@@ -57,6 +57,7 @@ const form_1 = require("../../../context/form");
57
57
  const StepperBlock_1 = require("./StepperBlock");
58
58
  const Input_1 = require("../input/Input");
59
59
  const FixedAutoComplete_1 = require("../input/FixedAutoComplete");
60
+ const MultInput_1 = __importDefault(require("../input/MultInput"));
60
61
  const getKeys = (values, id) => {
61
62
  if (!values || Object.keys(values).length <= 0)
62
63
  return [];
@@ -84,8 +85,10 @@ function Teste() {
84
85
  return (react_1.default.createElement(react_1.default.Fragment, null,
85
86
  react_1.default.createElement(Stepper, null,
86
87
  react_1.default.createElement(StepperBlock_1.StepperBlock, { title: 'Testando' },
87
- react_1.default.createElement(Input_1.Input, { name: 'teste', type: 'input' }),
88
- react_1.default.createElement(FixedAutoComplete_1.FixedAutoComplete, { name: 'haha', title: 'Testing', list: list, required: true })))));
88
+ react_1.default.createElement(material_1.Box, { bgcolor: 'pink' },
89
+ react_1.default.createElement(Input_1.Input, { name: 'teste', type: 'input' }),
90
+ react_1.default.createElement(FixedAutoComplete_1.FixedAutoComplete, { name: 'haha', title: 'Testing', list: list, required: true }),
91
+ react_1.default.createElement(MultInput_1.default, { name: 'haha' }))))));
89
92
  }
90
93
  exports.Teste = Teste;
91
94
  function Stepper(_a) {
@@ -96,7 +96,7 @@ function NavBar(_a) {
96
96
  react_1.default.createElement(material_1.AppBar, { position: 'relative', elevation: 0, sx: { backgroundColor: '#F1F5F9', color: 'black', paddingY: 1, paddingX: { xs: 1, md: 4 } } },
97
97
  react_1.default.createElement(material_1.Stack, { direction: 'row', justifyContent: 'space-between' },
98
98
  react_1.default.createElement(material_1.Stack, { direction: 'row', alignItems: 'center', spacing: 2, marginRight: 2, sx: { display: { xs: 'none', md: 'flex' }, width: '100%' } },
99
- react_1.default.createElement(link_1.default, { href: '/' }, next ? react_1.default.createElement(image_1.default, { src: img, alt: 'Logo dos Eventos Externos', width: 40, height: 40 }) : react_1.default.createElement("img", { src: img, height: 35 })),
99
+ react_1.default.createElement(link_1.default, { href: '/' }, next ? react_1.default.createElement(image_1.default, { src: img, alt: title, width: 40, height: 40 }) : react_1.default.createElement("img", { src: img, height: 35 })),
100
100
  react_1.default.createElement(material_1.Box, null,
101
101
  react_1.default.createElement(material_1.Typography, { variant: 'subtitle1', fontWeight: 600 }, title))),
102
102
  react_1.default.createElement(material_1.Box, { sx: {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ssplib/react-components",
3
- "version": "0.0.181",
3
+ "version": "0.0.182",
4
4
  "description": "SSP React Components",
5
5
  "main": "index.js",
6
6
  "author": "Pedro Henrique <sr.hudrick@gmail.com>",