@ssplib/react-components 0.0.199 → 0.0.201

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,27 +98,26 @@ 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: 'red', color: 'black', paddingY: 1, 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 })),
105
105
  react_1.default.createElement(material_1.Box, null,
106
106
  react_1.default.createElement(material_1.Typography, { variant: 'subtitle1', fontWeight: 600 }, title))),
107
- react_1.default.createElement(material_1.Stack, { direction: 'row', width: '100%', justifyContent: 'center', alignItems: 'center', spacing: 2 }, links.map((x) => (react_1.default.createElement(material_1.Box
108
- // borderBottom={next ? (router?.pathname.startsWith(x.path) ? `solid 2px ${color}` : '') : `solid 2px ${color}`}
109
- , {
110
- // borderBottom={next ? (router?.pathname.startsWith(x.path) ? `solid 2px ${color}` : '') : `solid 2px ${color}`}
111
- borderBottom: next ? (verificarRota(route, x.path) ? `solid 4px ${color}` : '') : verificarRota(route, x.path) ? `solid 4px ${color}` : '', height: '100%', paddingX: 2, sx: {
112
- ':hover': {
113
- backgroundColor: '#fcfcfc',
114
- cursor: 'pointer',
115
- userSelect: 'none',
116
- },
117
- }, onClick: (e) => {
118
- next && console.log('pathname:', router === null || router === void 0 ? void 0 : router.pathname, ':=', x.path);
119
- changeRoute(e, x.path);
120
- } },
121
- react_1.default.createElement(material_1.Stack, { height: '95%', justifyContent: 'center' }, x.name))))),
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
+ var _a;
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, paddingBottom: 1.4, sx: {
110
+ ':hover': {
111
+ backgroundColor: '#fcfcfc',
112
+ cursor: 'pointer',
113
+ userSelect: 'none',
114
+ },
115
+ }, onClick: (e) => {
116
+ next && console.log('pathname:', router === null || router === void 0 ? void 0 : router.pathname, ':=', x.path);
117
+ changeRoute(e, x.path);
118
+ } },
119
+ react_1.default.createElement(material_1.Stack, { height: '100%', justifyContent: 'center' }, x.name)));
120
+ })),
122
121
  react_1.default.createElement(material_1.Box, { sx: {
123
122
  display: {
124
123
  xs: 'flex',
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ssplib/react-components",
3
- "version": "0.0.199",
3
+ "version": "0.0.201",
4
4
  "description": "SSP React Components",
5
5
  "main": "index.js",
6
6
  "author": "Pedro Henrique <sr.hudrick@gmail.com>",