@pipelinesolucoes/form 1.3.1 → 1.3.3
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.
- package/dist/components/SelectField.d.ts +61 -41
- package/dist/components/SelectField.js +110 -56
- package/dist/components/SelectField.js.map +1 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.js +1 -0
- package/dist/index.js.map +1 -1
- package/dist/style/TextFieldStyle.js +6 -4
- package/dist/style/TextFieldStyle.js.map +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/dist/types/OptionEstadosBrasil.d.ts +5 -0
- package/dist/types/OptionEstadosBrasil.js +30 -0
- package/dist/types/OptionEstadosBrasil.js.map +1 -0
- package/package.json +1 -1
|
@@ -16,57 +16,77 @@ interface SelectFieldProps extends Omit<ColorProps, 'backgroundHover' | 'colorHo
|
|
|
16
16
|
helperTextColor?: string;
|
|
17
17
|
options: SelectFieldOption[];
|
|
18
18
|
onChange: (value: string | number) => void;
|
|
19
|
+
menuMaxHeight?: string | number;
|
|
20
|
+
menuWidth?: string | number;
|
|
21
|
+
menuItemHeight?: string | number;
|
|
22
|
+
showClearAction?: boolean;
|
|
23
|
+
clearLabel?: string;
|
|
24
|
+
onClear?: () => void;
|
|
19
25
|
}
|
|
20
26
|
/**
|
|
21
|
-
*
|
|
22
|
-
*
|
|
27
|
+
* Componente de seleção baseado no Material UI, com suporte a customização visual,
|
|
28
|
+
* controle do valor selecionado, limite de altura do menu com scroll automático
|
|
29
|
+
* e ação opcional para limpar a opção selecionada.
|
|
23
30
|
*
|
|
24
|
-
* @param {string} [id] Identificador único do campo
|
|
25
|
-
* @param {ComboBoxOption[]} options Lista de opções exibidas no ComboBox.
|
|
26
|
-
* @param {string | number} value Valor selecionado.
|
|
27
|
-
* @param {(value: string | number) => void} onChange Callback disparado ao selecionar uma opção.
|
|
31
|
+
* @param {string} [id] Identificador único do campo para acessibilidade.
|
|
28
32
|
* @param {string} [label] Texto do rótulo do campo.
|
|
29
|
-
* @param {string} [placeholder] Texto exibido quando
|
|
33
|
+
* @param {string} [placeholder] Texto exibido quando nenhuma opção estiver selecionada.
|
|
34
|
+
* @param {string | number} [value] Valor atualmente selecionado.
|
|
35
|
+
* @param {boolean} [disabled=false] Define se o campo estará desabilitado.
|
|
36
|
+
* @param {TypographyProps['variant']} [variant='body1'] Variante tipográfica aplicada ao label, valor, opções e helperText.
|
|
30
37
|
* @param {string} [helperText] Texto auxiliar exibido abaixo do campo.
|
|
31
|
-
* @param {string} [helperTextColor] Cor do
|
|
32
|
-
* @param {
|
|
38
|
+
* @param {string} [helperTextColor] Cor do texto auxiliar.
|
|
39
|
+
* @param {SelectFieldOption[]} options Lista de opções exibidas no menu.
|
|
40
|
+
* @param {(value: string | number) => void} onChange Callback disparado ao selecionar uma opção.
|
|
33
41
|
* @param {string | number} [width='100%'] Largura do componente.
|
|
34
|
-
* @param {string | number} [height
|
|
35
|
-
* @param {string | number} [
|
|
36
|
-
* @param {string | number} [
|
|
37
|
-
* @param {string} [background
|
|
38
|
-
* @param {string} [
|
|
39
|
-
* @param {string
|
|
40
|
-
* @param {string} [
|
|
41
|
-
* @param {string} [
|
|
42
|
-
* @param {
|
|
42
|
+
* @param {string | number} [height] Altura do campo.
|
|
43
|
+
* @param {string | number} [padding] Espaçamento interno do valor selecionado.
|
|
44
|
+
* @param {string | number} [margin='0'] Margem externa do componente.
|
|
45
|
+
* @param {string} [background] Cor de fundo do campo e do menu.
|
|
46
|
+
* @param {string} [color] Cor do texto do campo e das opções.
|
|
47
|
+
* @param {string} [colorFocused] Cor aplicada ao estado focado da borda.
|
|
48
|
+
* @param {string} [colorDisabled] Cor de texto no estado desabilitado.
|
|
49
|
+
* @param {string} [backgroundDisabled] Cor de fundo no estado desabilitado.
|
|
50
|
+
* @param {string | number} [borderRadius] Raio da borda do campo.
|
|
51
|
+
* @param {string} [boxShadow] Sombra aplicada ao campo.
|
|
52
|
+
* @param {string} [borderColor] Cor da borda do campo.
|
|
53
|
+
* @param {string | number} [menuMaxHeight=240] Altura máxima da caixa de opções. Quando excedida, o scroll vertical é exibido automaticamente.
|
|
54
|
+
* @param {string | number} [menuWidth='auto'] Largura da caixa de opções.
|
|
55
|
+
* @param {string | number} [menuItemHeight=40] Altura de cada item da lista de opções.
|
|
56
|
+
* @param {boolean} [showClearAction=false] Define se deve exibir a ação para limpar a opção selecionada.
|
|
57
|
+
* @param {string} [clearLabel='Limpar seleção'] Texto exibido na ação de limpar seleção.
|
|
58
|
+
* @param {() => void} [onClear] Callback disparado ao limpar a opção selecionada.
|
|
43
59
|
*
|
|
44
60
|
* @example
|
|
45
61
|
* ```tsx
|
|
46
|
-
* import {
|
|
62
|
+
* import { SelectField } from '@/components/SelectField';
|
|
63
|
+
*
|
|
64
|
+
* const Example = () => {
|
|
65
|
+
* const [value, setValue] = React.useState<string | number>('');
|
|
47
66
|
*
|
|
48
|
-
*
|
|
49
|
-
*
|
|
50
|
-
*
|
|
51
|
-
*
|
|
52
|
-
*
|
|
53
|
-
*
|
|
54
|
-
*
|
|
55
|
-
*
|
|
56
|
-
*
|
|
57
|
-
*
|
|
58
|
-
*
|
|
59
|
-
*
|
|
60
|
-
*
|
|
61
|
-
*
|
|
62
|
-
*
|
|
63
|
-
*
|
|
64
|
-
*
|
|
65
|
-
*
|
|
66
|
-
*
|
|
67
|
-
*
|
|
68
|
-
*
|
|
69
|
-
*
|
|
67
|
+
* return (
|
|
68
|
+
* <SelectField
|
|
69
|
+
* id="category"
|
|
70
|
+
* label="Categoria"
|
|
71
|
+
* placeholder="Selecione uma opção"
|
|
72
|
+
* value={value}
|
|
73
|
+
* onChange={setValue}
|
|
74
|
+
* options={[
|
|
75
|
+
* { value: 1, label: 'Frontend' },
|
|
76
|
+
* { value: 2, label: 'Backend' },
|
|
77
|
+
* { value: 3, label: 'DevOps' },
|
|
78
|
+
* { value: 4, label: 'Product' },
|
|
79
|
+
* ]}
|
|
80
|
+
* width={320}
|
|
81
|
+
* menuWidth={320}
|
|
82
|
+
* menuMaxHeight={220}
|
|
83
|
+
* menuItemHeight={44}
|
|
84
|
+
* showClearAction
|
|
85
|
+
* clearLabel="Remover seleção"
|
|
86
|
+
* onClear={() => setValue('')}
|
|
87
|
+
* />
|
|
88
|
+
* );
|
|
89
|
+
* };
|
|
70
90
|
* ```
|
|
71
91
|
*/
|
|
72
92
|
declare const SelectField: React.FC<SelectFieldProps>;
|
|
@@ -1,16 +1,17 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
|
-
import { FormControl, InputLabel, MenuItem, Select, FormHelperText, Typography } from '@mui/material';
|
|
3
|
+
import { FormControl, InputLabel, MenuItem, Select, FormHelperText, Typography, Divider, } from '@mui/material';
|
|
4
4
|
import { styled, useTheme } from '@mui/material/styles';
|
|
5
|
-
import { fbbackground, fbborderColor, fbborderRadius, fbboxShadow, fbcolor, fbcolorFocused, fbheigth, fbpadding } from '../constant';
|
|
5
|
+
import { fbbackground, fbborderColor, fbborderRadius, fbboxShadow, fbcolor, fbcolorFocused, fbheigth, fbpadding, } from '../constant';
|
|
6
6
|
const StyledWrapper = styled('div', {
|
|
7
7
|
shouldForwardProp: (prop) => !['width', 'margin'].includes(prop),
|
|
8
8
|
})(({ width, margin }) => ({
|
|
9
|
-
width
|
|
10
|
-
margin
|
|
9
|
+
width,
|
|
10
|
+
margin,
|
|
11
11
|
}));
|
|
12
12
|
const StyledFormControl = styled(FormControl, {
|
|
13
|
-
shouldForwardProp: (prop) => ![
|
|
13
|
+
shouldForwardProp: (prop) => ![
|
|
14
|
+
'height',
|
|
14
15
|
'padding',
|
|
15
16
|
'background',
|
|
16
17
|
'borderRadius',
|
|
@@ -21,7 +22,7 @@ const StyledFormControl = styled(FormControl, {
|
|
|
21
22
|
})(({ height, padding, background, borderRadius, boxShadow, borderColor, colorText }) => ({
|
|
22
23
|
width: '100%',
|
|
23
24
|
'& .MuiOutlinedInput-root': {
|
|
24
|
-
height
|
|
25
|
+
height,
|
|
25
26
|
background: background !== null && background !== void 0 ? background : fbbackground,
|
|
26
27
|
borderRadius: borderRadius !== null && borderRadius !== void 0 ? borderRadius : fbborderRadius,
|
|
27
28
|
boxShadow: boxShadow !== null && boxShadow !== void 0 ? boxShadow : fbboxShadow,
|
|
@@ -48,84 +49,126 @@ const StyledFormControl = styled(FormControl, {
|
|
|
48
49
|
color: colorText !== null && colorText !== void 0 ? colorText : fbcolor,
|
|
49
50
|
},
|
|
50
51
|
}));
|
|
52
|
+
const StyledMenuItem = styled(MenuItem, {
|
|
53
|
+
shouldForwardProp: (prop) => !['menuItemHeight', 'colorText'].includes(prop),
|
|
54
|
+
})(({ menuItemHeight, colorText }) => ({
|
|
55
|
+
minHeight: menuItemHeight,
|
|
56
|
+
height: menuItemHeight,
|
|
57
|
+
color: colorText,
|
|
58
|
+
'& .MuiTypography-root': {
|
|
59
|
+
color: colorText,
|
|
60
|
+
width: '100%',
|
|
61
|
+
},
|
|
62
|
+
}));
|
|
51
63
|
/**
|
|
52
|
-
*
|
|
53
|
-
*
|
|
64
|
+
* Componente de seleção baseado no Material UI, com suporte a customização visual,
|
|
65
|
+
* controle do valor selecionado, limite de altura do menu com scroll automático
|
|
66
|
+
* e ação opcional para limpar a opção selecionada.
|
|
54
67
|
*
|
|
55
|
-
* @param {string} [id] Identificador único do campo
|
|
56
|
-
* @param {ComboBoxOption[]} options Lista de opções exibidas no ComboBox.
|
|
57
|
-
* @param {string | number} value Valor selecionado.
|
|
58
|
-
* @param {(value: string | number) => void} onChange Callback disparado ao selecionar uma opção.
|
|
68
|
+
* @param {string} [id] Identificador único do campo para acessibilidade.
|
|
59
69
|
* @param {string} [label] Texto do rótulo do campo.
|
|
60
|
-
* @param {string} [placeholder] Texto exibido quando
|
|
70
|
+
* @param {string} [placeholder] Texto exibido quando nenhuma opção estiver selecionada.
|
|
71
|
+
* @param {string | number} [value] Valor atualmente selecionado.
|
|
72
|
+
* @param {boolean} [disabled=false] Define se o campo estará desabilitado.
|
|
73
|
+
* @param {TypographyProps['variant']} [variant='body1'] Variante tipográfica aplicada ao label, valor, opções e helperText.
|
|
61
74
|
* @param {string} [helperText] Texto auxiliar exibido abaixo do campo.
|
|
62
|
-
* @param {string} [helperTextColor] Cor do
|
|
63
|
-
* @param {
|
|
75
|
+
* @param {string} [helperTextColor] Cor do texto auxiliar.
|
|
76
|
+
* @param {SelectFieldOption[]} options Lista de opções exibidas no menu.
|
|
77
|
+
* @param {(value: string | number) => void} onChange Callback disparado ao selecionar uma opção.
|
|
64
78
|
* @param {string | number} [width='100%'] Largura do componente.
|
|
65
|
-
* @param {string | number} [height
|
|
66
|
-
* @param {string | number} [
|
|
67
|
-
* @param {string | number} [
|
|
68
|
-
* @param {string} [background
|
|
69
|
-
* @param {string} [
|
|
70
|
-
* @param {string
|
|
71
|
-
* @param {string} [
|
|
72
|
-
* @param {string} [
|
|
73
|
-
* @param {
|
|
79
|
+
* @param {string | number} [height] Altura do campo.
|
|
80
|
+
* @param {string | number} [padding] Espaçamento interno do valor selecionado.
|
|
81
|
+
* @param {string | number} [margin='0'] Margem externa do componente.
|
|
82
|
+
* @param {string} [background] Cor de fundo do campo e do menu.
|
|
83
|
+
* @param {string} [color] Cor do texto do campo e das opções.
|
|
84
|
+
* @param {string} [colorFocused] Cor aplicada ao estado focado da borda.
|
|
85
|
+
* @param {string} [colorDisabled] Cor de texto no estado desabilitado.
|
|
86
|
+
* @param {string} [backgroundDisabled] Cor de fundo no estado desabilitado.
|
|
87
|
+
* @param {string | number} [borderRadius] Raio da borda do campo.
|
|
88
|
+
* @param {string} [boxShadow] Sombra aplicada ao campo.
|
|
89
|
+
* @param {string} [borderColor] Cor da borda do campo.
|
|
90
|
+
* @param {string | number} [menuMaxHeight=240] Altura máxima da caixa de opções. Quando excedida, o scroll vertical é exibido automaticamente.
|
|
91
|
+
* @param {string | number} [menuWidth='auto'] Largura da caixa de opções.
|
|
92
|
+
* @param {string | number} [menuItemHeight=40] Altura de cada item da lista de opções.
|
|
93
|
+
* @param {boolean} [showClearAction=false] Define se deve exibir a ação para limpar a opção selecionada.
|
|
94
|
+
* @param {string} [clearLabel='Limpar seleção'] Texto exibido na ação de limpar seleção.
|
|
95
|
+
* @param {() => void} [onClear] Callback disparado ao limpar a opção selecionada.
|
|
74
96
|
*
|
|
75
97
|
* @example
|
|
76
98
|
* ```tsx
|
|
77
|
-
* import {
|
|
99
|
+
* import { SelectField } from '@/components/SelectField';
|
|
100
|
+
*
|
|
101
|
+
* const Example = () => {
|
|
102
|
+
* const [value, setValue] = React.useState<string | number>('');
|
|
78
103
|
*
|
|
79
|
-
*
|
|
80
|
-
*
|
|
81
|
-
*
|
|
82
|
-
*
|
|
83
|
-
*
|
|
84
|
-
*
|
|
85
|
-
*
|
|
86
|
-
*
|
|
87
|
-
*
|
|
88
|
-
*
|
|
89
|
-
*
|
|
90
|
-
*
|
|
91
|
-
*
|
|
92
|
-
*
|
|
93
|
-
*
|
|
94
|
-
*
|
|
95
|
-
*
|
|
96
|
-
*
|
|
97
|
-
*
|
|
98
|
-
*
|
|
99
|
-
*
|
|
100
|
-
*
|
|
104
|
+
* return (
|
|
105
|
+
* <SelectField
|
|
106
|
+
* id="category"
|
|
107
|
+
* label="Categoria"
|
|
108
|
+
* placeholder="Selecione uma opção"
|
|
109
|
+
* value={value}
|
|
110
|
+
* onChange={setValue}
|
|
111
|
+
* options={[
|
|
112
|
+
* { value: 1, label: 'Frontend' },
|
|
113
|
+
* { value: 2, label: 'Backend' },
|
|
114
|
+
* { value: 3, label: 'DevOps' },
|
|
115
|
+
* { value: 4, label: 'Product' },
|
|
116
|
+
* ]}
|
|
117
|
+
* width={320}
|
|
118
|
+
* menuWidth={320}
|
|
119
|
+
* menuMaxHeight={220}
|
|
120
|
+
* menuItemHeight={44}
|
|
121
|
+
* showClearAction
|
|
122
|
+
* clearLabel="Remover seleção"
|
|
123
|
+
* onClear={() => setValue('')}
|
|
124
|
+
* />
|
|
125
|
+
* );
|
|
126
|
+
* };
|
|
101
127
|
* ```
|
|
102
128
|
*/
|
|
103
|
-
const SelectField = ({ id, label, placeholder, value, background, backgroundDisabled, color, colorFocused, colorDisabled, borderRadius, boxShadow, borderColor, width =
|
|
129
|
+
const SelectField = ({ id, label, placeholder, value, background, backgroundDisabled, color, colorFocused, colorDisabled, borderRadius, boxShadow, borderColor, width = '100%', height, padding, margin = '0', disabled = false, variant = 'body1', helperText, helperTextColor, options, onChange, menuMaxHeight = 240, menuWidth = 'auto', menuItemHeight = 40, showClearAction = false, clearLabel = 'Limpar seleção', onClear, }) => {
|
|
104
130
|
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o;
|
|
105
131
|
const labelId = id ? `${id}-label` : undefined;
|
|
106
132
|
const shouldShrinkLabel = Boolean(value) || Boolean(placeholder);
|
|
107
|
-
const handleChange = (event
|
|
133
|
+
const handleChange = (event) => {
|
|
108
134
|
const raw = event.target.value;
|
|
109
135
|
const matched = options.find((opt) => String(opt.value) === raw);
|
|
110
136
|
onChange(matched ? matched.value : raw);
|
|
111
137
|
};
|
|
138
|
+
const handleClearSelection = () => {
|
|
139
|
+
onChange('');
|
|
140
|
+
if (onClear) {
|
|
141
|
+
onClear();
|
|
142
|
+
}
|
|
143
|
+
};
|
|
112
144
|
const theme = useTheme();
|
|
113
145
|
const field = (_b = (_a = theme.pipelinesolucoes) === null || _a === void 0 ? void 0 : _a.forms) === null || _b === void 0 ? void 0 : _b.field;
|
|
114
146
|
const bg = (_c = background !== null && background !== void 0 ? background : field === null || field === void 0 ? void 0 : field.background) !== null && _c !== void 0 ? _c : '#fff';
|
|
115
147
|
const txt = (_d = color !== null && color !== void 0 ? color : field === null || field === void 0 ? void 0 : field.color) !== null && _d !== void 0 ? _d : '#000';
|
|
116
|
-
const bgDisabled = (_e = backgroundDisabled !== null && backgroundDisabled !== void 0 ? backgroundDisabled : field === null || field === void 0 ? void 0 : field.backgroundDisabled) !== null && _e !== void 0 ? _e :
|
|
117
|
-
const txtDisabled = (_f = colorDisabled !== null && colorDisabled !== void 0 ? colorDisabled : field === null || field === void 0 ? void 0 : field.colorDisabled) !== null && _f !== void 0 ? _f :
|
|
148
|
+
const bgDisabled = (_e = backgroundDisabled !== null && backgroundDisabled !== void 0 ? backgroundDisabled : field === null || field === void 0 ? void 0 : field.backgroundDisabled) !== null && _e !== void 0 ? _e : '#E5E7EB';
|
|
149
|
+
const txtDisabled = (_f = colorDisabled !== null && colorDisabled !== void 0 ? colorDisabled : field === null || field === void 0 ? void 0 : field.colorDisabled) !== null && _f !== void 0 ? _f : '#9CA3AF';
|
|
118
150
|
const bdFocused = (_g = colorFocused !== null && colorFocused !== void 0 ? colorFocused : field === null || field === void 0 ? void 0 : field.colorFocused) !== null && _g !== void 0 ? _g : '#1976d2';
|
|
119
|
-
const br = (_h = borderRadius !== null && borderRadius !== void 0 ? borderRadius : field === null || field === void 0 ? void 0 : field.borderRadius) !== null && _h !== void 0 ? _h :
|
|
120
|
-
const sh = (_j = boxShadow !== null && boxShadow !== void 0 ? boxShadow : field === null || field === void 0 ? void 0 : field.boxShadow) !== null && _j !== void 0 ? _j :
|
|
151
|
+
const br = (_h = borderRadius !== null && borderRadius !== void 0 ? borderRadius : field === null || field === void 0 ? void 0 : field.borderRadius) !== null && _h !== void 0 ? _h : '0';
|
|
152
|
+
const sh = (_j = boxShadow !== null && boxShadow !== void 0 ? boxShadow : field === null || field === void 0 ? void 0 : field.boxShadow) !== null && _j !== void 0 ? _j : 'none';
|
|
121
153
|
const bd = (_k = borderColor !== null && borderColor !== void 0 ? borderColor : field === null || field === void 0 ? void 0 : field.borderColor) !== null && _k !== void 0 ? _k : '#ccc';
|
|
122
154
|
const pad = (_l = padding !== null && padding !== void 0 ? padding : field === null || field === void 0 ? void 0 : field.padding) !== null && _l !== void 0 ? _l : '4px 8px';
|
|
123
155
|
const mg = (_m = margin !== null && margin !== void 0 ? margin : field === null || field === void 0 ? void 0 : field.margin) !== null && _m !== void 0 ? _m : '0';
|
|
124
156
|
const hg = (_o = height !== null && height !== void 0 ? height : field === null || field === void 0 ? void 0 : field.height) !== null && _o !== void 0 ? _o : fbheigth;
|
|
125
|
-
|
|
157
|
+
const hasSelectedValue = value !== undefined && value !== null && String(value) !== '';
|
|
158
|
+
return (_jsx(StyledWrapper, { width: width, margin: mg, children: _jsxs(StyledFormControl, { id: id, disabled: disabled, variant: "outlined", background: disabled ? bgDisabled : bg, borderRadius: br, boxShadow: sh, borderColor: bdFocused ? bd : bd, colorText: disabled ? txtDisabled : txt, height: hg, padding: pad, children: [label && (_jsx(InputLabel, { id: labelId, htmlFor: id, shrink: shouldShrinkLabel, children: _jsx(Typography, { variant: variant, sx: { color: disabled ? txtDisabled : txt }, children: label }) })), _jsxs(Select, { id: id, labelId: labelId, value: value !== undefined && value !== null ? String(value) : '', onChange: handleChange, displayEmpty: true, label: label, MenuProps: {
|
|
126
159
|
PaperProps: {
|
|
127
160
|
sx: {
|
|
128
161
|
backgroundColor: bg,
|
|
162
|
+
width: menuWidth,
|
|
163
|
+
maxHeight: menuMaxHeight,
|
|
164
|
+
overflowY: 'auto',
|
|
165
|
+
},
|
|
166
|
+
},
|
|
167
|
+
MenuListProps: {
|
|
168
|
+
sx: {
|
|
169
|
+
padding: 0,
|
|
170
|
+
maxHeight: menuMaxHeight,
|
|
171
|
+
overflowY: 'auto',
|
|
129
172
|
},
|
|
130
173
|
},
|
|
131
174
|
}, renderValue: (selected) => {
|
|
@@ -134,8 +177,19 @@ const SelectField = ({ id, label, placeholder, value, background, backgroundDisa
|
|
|
134
177
|
return (_jsx(Typography, { variant: variant, color: "text.disabled", children: placeholder }));
|
|
135
178
|
}
|
|
136
179
|
const option = options.find((opt) => String(opt.value) === selected);
|
|
137
|
-
return _jsx(Typography, { variant: variant, children: (_a = option === null || option === void 0 ? void 0 : option.label) !== null && _a !== void 0 ? _a : '' });
|
|
138
|
-
},
|
|
180
|
+
return (_jsx(Typography, { variant: variant, sx: { color: disabled ? txtDisabled : txt }, children: (_a = option === null || option === void 0 ? void 0 : option.label) !== null && _a !== void 0 ? _a : '' }));
|
|
181
|
+
}, sx: {
|
|
182
|
+
'& .MuiSelect-icon': {
|
|
183
|
+
color: disabled ? txtDisabled : txt,
|
|
184
|
+
},
|
|
185
|
+
'&.Mui-disabled': {
|
|
186
|
+
backgroundColor: bgDisabled,
|
|
187
|
+
color: txtDisabled,
|
|
188
|
+
},
|
|
189
|
+
'&.Mui-focused .MuiOutlinedInput-notchedOutline': {
|
|
190
|
+
borderColor: bdFocused,
|
|
191
|
+
},
|
|
192
|
+
}, children: [showClearAction && hasSelectedValue && (_jsxs("div", { children: [_jsx(StyledMenuItem, { onClick: handleClearSelection, value: "", menuItemHeight: menuItemHeight, colorText: txt, children: _jsx(Typography, { variant: variant, children: clearLabel }) }), _jsx(Divider, {})] })), options.map((option) => (_jsx(StyledMenuItem, { value: String(option.value), menuItemHeight: menuItemHeight, colorText: txt, children: _jsx(Typography, { variant: variant, children: option.label }) }, option.value)))] }), helperText && (_jsx(FormHelperText, { error: !helperTextColor, children: _jsx(Typography, { variant: variant, sx: { color: helperTextColor }, children: helperText }) }))] }) }));
|
|
139
193
|
};
|
|
140
194
|
SelectField.displayName = 'SelectField';
|
|
141
195
|
export default SelectField;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SelectField.js","sourceRoot":"","sources":["../../src/components/SelectField.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;;AAGb,OAAO,
|
|
1
|
+
{"version":3,"file":"SelectField.js","sourceRoot":"","sources":["../../src/components/SelectField.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;;AAGb,OAAO,EACL,WAAW,EACX,UAAU,EACV,QAAQ,EACR,MAAM,EAEN,cAAc,EACd,UAAU,EACV,OAAO,GACR,MAAM,eAAe,CAAC;AACvB,OAAO,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAC;AAGxD,OAAO,EACL,YAAY,EACZ,aAAa,EACb,cAAc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AAE,GAAG,YAEd,KAAC,UAAU,IAAC,OAAO,EAAE,OAAO,YAAG,UAAU,GAAc,GACxC,EACjB,KAAC,OAAO,KAAG,IACP,CACP,EAEA,OAAO,CAAC,GAAG,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,CACvB,KAAC,cAAc,IAEb,KAAK,EAAE,MAAM,CAAC,MAAM,CAAC,KAAK,CAAC,EAC3B,cAAc,EAAE,cAAc,EAC9B,SAAS,EAAE,GAAG,YAEd,KAAC,UAAU,IAAC,OAAO,EAAE,OAAO,YAAG,MAAM,CAAC,KAAK,GAAc,IALpD,MAAM,CAAC,KAAK,CAMF,CAClB,CAAC,IACK,EAER,UAAU,IAAI,CACb,KAAC,cAAc,IAAC,KAAK,EAAE,CAAC,eAAe,YACrC,KAAC,UAAU,IAAC,OAAO,EAAE,OAAO,EAAE,EAAE,EAAE,EAAE,KAAK,EAAE,eAAe,EAAE,YACzD,UAAU,GACA,GACE,CAClB,IACiB,GACN,CACjB,CAAC;AACJ,CAAC,CAAC;AAEF,WAAW,CAAC,WAAW,GAAG,aAAa,CAAC;AAExC,eAAe,WAAW,CAAC"}
|
package/dist/index.d.ts
CHANGED
package/dist/index.js
CHANGED
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,YAAY,EAAE,MAAM,2BAA2B,CAAC;AAEpE,OAAO,EAAE,OAAO,IAAI,WAAW,EAAC,MAAM,0BAA0B,CAAC;AAEjE,OAAO,EAAE,OAAO,IAAI,oBAAoB,EAAE,MAAM,mCAAmC,CAAC;AAEpF,OAAO,EAAE,OAAO,IAAI,WAAW,EAAE,MAAM,0BAA0B,CAAC;AAClE,OAAO,EAAE,OAAO,IAAI,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AAE5D,OAAO,EAAE,OAAO,IAAI,iBAAiB,EAAE,MAAM,gCAAg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AC;AACpC,cAAc,mBAAmB,CAAC;AAClC,cAAc,mBAAmB,CAAC;AAClC,cAAc,0BAA0B,CAAC;AACzC,cAAc,6BAA6B,CAAC"}
|
|
@@ -17,7 +17,7 @@ export const TextFieldStyled = styled(TextField, {
|
|
|
17
17
|
"marginField",
|
|
18
18
|
].includes(prop),
|
|
19
19
|
})(({ background, backgroundFocused, backgroundDisabled, colorText, colorFocused, colorDisabled, borderRadius, boxShadow, borderColor, padding, typo, height, marginField, }) => {
|
|
20
|
-
var _a, _b, _c, _d, _e, _f;
|
|
20
|
+
var _a, _b, _c, _d, _e, _f, _g;
|
|
21
21
|
return ({
|
|
22
22
|
borderRadius,
|
|
23
23
|
boxShadow,
|
|
@@ -45,15 +45,17 @@ export const TextFieldStyled = styled(TextField, {
|
|
|
45
45
|
caretColor: (_c = (colorFocused !== null && colorFocused !== void 0 ? colorFocused : colorText)) !== null && _c !== void 0 ? _c : "inherit",
|
|
46
46
|
} }),
|
|
47
47
|
"& textarea.MuiInputBase-input": Object.assign(Object.assign(Object.assign({ margin: marginField }, (padding ? { padding } : {})), (typo !== null && typo !== void 0 ? typo : {})), {
|
|
48
|
+
// ✅ deixa multiline (rows=1) com o mesmo "feeling" do input
|
|
49
|
+
boxSizing: "border-box", display: "block", overflow: "hidden", resize: "none", lineHeight: (_d = typo === null || typo === void 0 ? void 0 : typo.lineHeight) !== null && _d !== void 0 ? _d : "inherit",
|
|
48
50
|
// (opcional) caso algum ambiente aplique autofill em textarea
|
|
49
51
|
"&:-webkit-autofill": {
|
|
50
52
|
WebkitBoxShadow: `0 0 0 1000px ${background !== null && background !== void 0 ? background : "transparent"} inset`,
|
|
51
53
|
WebkitTextFillColor: colorText !== null && colorText !== void 0 ? colorText : "inherit",
|
|
52
54
|
caretColor: colorText !== null && colorText !== void 0 ? colorText : "inherit",
|
|
53
55
|
}, "&:-webkit-autofill:focus": {
|
|
54
|
-
WebkitBoxShadow: `0 0 0 1000px ${(
|
|
55
|
-
WebkitTextFillColor: (
|
|
56
|
-
caretColor: (
|
|
56
|
+
WebkitBoxShadow: `0 0 0 1000px ${(_e = (backgroundFocused !== null && backgroundFocused !== void 0 ? backgroundFocused : background)) !== null && _e !== void 0 ? _e : "transparent"} inset`,
|
|
57
|
+
WebkitTextFillColor: (_f = (colorFocused !== null && colorFocused !== void 0 ? colorFocused : colorText)) !== null && _f !== void 0 ? _f : "inherit",
|
|
58
|
+
caretColor: (_g = (colorFocused !== null && colorFocused !== void 0 ? colorFocused : colorText)) !== null && _g !== void 0 ? _g : "inherit",
|
|
57
59
|
} }),
|
|
58
60
|
"& .MuiOutlinedInput-notchedOutline": {
|
|
59
61
|
borderColor,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TextFieldStyle.js","sourceRoot":"","sources":["../../src/style/TextFieldStyle.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAC1C,OAAO,EAAE,MAAM,EAAkB,MAAM,sBAAsB,CAAC;AAG9D,MAAM,CAAC,MAAM,eAAe,GAAG,MAAM,CAAC,SAAS,EAAE;IAC/C,iBAAiB,EAAE,CAAC,IAAI,EAAE,EAAE,CAC1B,CAAC;QACC,YAAY;QACZ,oBAAoB;QACpB,WAAW;QACX,mBAAmB;QACnB,cAAc;QACd,eAAe;QACf,cAAc;QACd,WAAW;QACX,aAAa;QACb,SAAS;QACT,MAAM;QACN,QAAQ;QACR,aAAa;KACd,CAAC,QAAQ,CAAC,IAAc,CAAC;CAC7B,CAAC,CAeA,CAAC,EACC,UAAU,EACV,iBAAiB,EACjB,kBAAkB,EAClB,SAAS,EACT,YAAY,EACZ,aAAa,EACb,YAAY,EACZ,SAAS,EACT,WAAW,EACX,OAAO,EACP,IAAI,EACJ,MAAM,EACN,WAAW,GACZ,EAAE,EAAE;;IAAC,OAAA,CAAC;QACL,YAAY;QACZ,SAAS;QAET,sBAAsB,EAAE;YACtB,KAAK,EAAE,SAAS;SACjB;QAED,0BAA0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