@ssplib/react-components 0.0.200 → 0.0.202

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,6 @@
1
1
  import React from 'react';
2
2
  export declare function Input({ type, numberMask, xs, sm, inputMinLength, inputMaxLength, defaultValue, md, ...props }: {
3
- type: 'cnpj' | 'cpf' | 'input' | 'email' | 'cpf_cnpj' | 'phone' | 'input' | 'number' | 'rg' | 'password' | 'cep';
3
+ type: 'cnpj' | 'cpf' | 'input' | 'email' | 'cpf_cnpj' | 'phone' | 'input' | 'number' | 'rg' | 'password' | 'cep' | 'sei';
4
4
  name: string;
5
5
  title?: string;
6
6
  required?: boolean;
@@ -68,6 +68,10 @@ function Input(_a) {
68
68
  else if (type === 'cpf') {
69
69
  if (v.length < 14 && props.required)
70
70
  return 'O CPF precisa ter no mínimo 11 dígitos';
71
+ } //
72
+ else if (type === 'sei') {
73
+ if (v.length < 22 && props.required)
74
+ return 'O Número SEI precisa ter no mínimo 19 dígitos';
71
75
  }
72
76
  //
73
77
  else if (type === 'cep') {
@@ -124,6 +128,10 @@ function Input(_a) {
124
128
  '#': /^9$/,
125
129
  },
126
130
  } }));
131
+ case 'sei':
132
+ return (react_1.default.createElement(MaskInput_1.default, { formConfig: formConfig, defaultValue: defaultValue, maskProps: {
133
+ mask: '00000-00000000/0000-00',
134
+ } }));
127
135
  case 'cpf_cnpj':
128
136
  return (react_1.default.createElement(MaskInput_1.default, { formConfig: formConfig, defaultValue: defaultValue, maskProps: {
129
137
  mask: '000.000.000-00[0]',
@@ -98,7 +98,7 @@ function TabNavBar(_a) {
98
98
  }
99
99
  return (react_1.default.createElement(react_1.default.Fragment, null,
100
100
  react_1.default.createElement(material_1.Box, { position: pos, sx: { width: '100%', zIndex: 100 } },
101
- react_1.default.createElement(material_1.AppBar, { position: 'relative', elevation: 0, sx: { backgroundColor: 'white', color: 'black', paddingY: 1, paddingX: { xs: 1, md: 4 } } },
101
+ react_1.default.createElement(material_1.AppBar, { position: 'relative', elevation: 0, sx: { backgroundColor: 'white', color: 'black', paddingX: { xs: 1, md: 4 } } },
102
102
  react_1.default.createElement(material_1.Stack, { direction: 'row', justifyContent: 'space-between' },
103
103
  react_1.default.createElement(material_1.Stack, { direction: 'row', alignItems: 'center', spacing: 2, marginRight: 2, sx: { display: { xs: 'none', md: 'flex' }, width: '100%' } },
104
104
  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 })),
@@ -106,11 +106,7 @@ function TabNavBar(_a) {
106
106
  react_1.default.createElement(material_1.Typography, { variant: 'subtitle1', fontWeight: 600 }, title))),
107
107
  react_1.default.createElement(material_1.Stack, { direction: 'row', width: '100%', justifyContent: 'center', alignItems: 'center', spacing: 2, sx: { display: { xs: 'none', md: 'flex' } } }, links.map((x) => {
108
108
  var _a;
109
- return (react_1.default.createElement(material_1.Box
110
- // borderBottom={next ? (router?.pathname.startsWith(x.path) ? `solid 2px ${color}` : '') : `solid 2px ${color}`}
111
- , {
112
- // borderBottom={next ? (router?.pathname.startsWith(x.path) ? `solid 2px ${color}` : '') : `solid 2px ${color}`}
113
- borderBottom: next ? (verificarRota((_a = router === null || router === void 0 ? void 0 : router.pathname) !== null && _a !== void 0 ? _a : '', x.path) ? `solid 4px ${color}` : '') : verificarRota(route, x.path) ? `solid 4px ${color}` : '', height: '100%', paddingX: 2, sx: {
109
+ return (react_1.default.createElement(material_1.Box, { borderBottom: next ? (verificarRota((_a = router === null || router === void 0 ? void 0 : router.pathname) !== null && _a !== void 0 ? _a : '', x.path) ? `solid 4px ${color}` : '') : verificarRota(route, x.path) ? `solid 4px ${color}` : '', height: '100%', paddingX: 2, sx: {
114
110
  ':hover': {
115
111
  backgroundColor: '#fcfcfc',
116
112
  cursor: 'pointer',
@@ -120,7 +116,7 @@ function TabNavBar(_a) {
120
116
  next && console.log('pathname:', router === null || router === void 0 ? void 0 : router.pathname, ':=', x.path);
121
117
  changeRoute(e, x.path);
122
118
  } },
123
- react_1.default.createElement(material_1.Stack, { height: '95%', justifyContent: 'center' }, x.name)));
119
+ react_1.default.createElement(material_1.Stack, { height: '100%', justifyContent: 'center' }, x.name)));
124
120
  })),
125
121
  react_1.default.createElement(material_1.Box, { sx: {
126
122
  display: {
@@ -132,7 +128,7 @@ function TabNavBar(_a) {
132
128
  react_1.default.createElement(Menu_1.default, null)),
133
129
  react_1.default.createElement(material_1.Menu, { open: menuOpen, onClose: closeMenu, anchorEl: anchor }, links.map((x) => (react_1.default.createElement(material_1.MenuItem, { key: `navmenu${x}`, onClick: (e) => onMenuItemClick(e, x.path) },
134
130
  react_1.default.createElement(material_1.Typography, { textTransform: 'capitalize' }, x.name)))))))),
135
- react_1.default.createElement(material_1.Stack, { direction: 'row', justifyContent: 'flex-end', alignItems: 'center', sx: { width: { md: '100%' } } },
131
+ react_1.default.createElement(material_1.Stack, { direction: 'row', justifyContent: 'flex-end', alignItems: 'center', sx: { width: { md: '100%' } }, paddingY: 1 },
136
132
  react_1.default.createElement(material_1.Stack, { direction: 'row', spacing: 2 },
137
133
  react_1.default.createElement(material_1.Box, null, el),
138
134
  user ? (react_1.default.createElement(material_1.Stack, { direction: 'row', spacing: 1, sx: {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ssplib/react-components",
3
- "version": "0.0.200",
3
+ "version": "0.0.202",
4
4
  "description": "SSP React Components",
5
5
  "main": "index.js",
6
6
  "author": "Pedro Henrique <sr.hudrick@gmail.com>",