@pipelinesolucoes/form 1.3.0 → 1.3.2

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.
@@ -16,46 +16,75 @@ export const TextFieldStyled = styled(TextField, {
16
16
  "heigth",
17
17
  "marginField",
18
18
  ].includes(prop),
19
- })(({ background, backgroundFocused, backgroundDisabled, colorText, colorFocused, colorDisabled, borderRadius, boxShadow, borderColor, padding, typo, height, marginField }) => ({
20
- borderRadius,
21
- boxShadow,
22
- "& .MuiInputBase-root": {
23
- color: colorText,
24
- },
25
- "& .MuiOutlinedInput-root": {
26
- background,
19
+ })(({ background, backgroundFocused, backgroundDisabled, colorText, colorFocused, colorDisabled, borderRadius, boxShadow, borderColor, padding, typo, height, marginField, }) => {
20
+ var _a, _b, _c, _d, _e, _f, _g;
21
+ return ({
27
22
  borderRadius,
28
23
  boxShadow,
29
- height,
30
- "& .MuiInputBase-input": Object.assign(Object.assign({ margin: marginField }, (padding ? { padding } : {})), (typo !== null && typo !== void 0 ? typo : {})),
31
- "& textarea.MuiInputBase-input": Object.assign(Object.assign({ margin: marginField }, (padding ? { padding } : {})), (typo !== null && typo !== void 0 ? typo : {})),
32
- "& .MuiOutlinedInput-notchedOutline": {
33
- borderColor,
24
+ "& .MuiInputBase-root": {
25
+ color: colorText,
34
26
  },
35
- "&:hover .MuiOutlinedInput-notchedOutline": {
36
- borderColor,
27
+ "& .MuiOutlinedInput-root": {
28
+ background,
29
+ borderRadius,
30
+ boxShadow,
31
+ height,
32
+ "& .MuiInputBase-input": Object.assign(Object.assign(Object.assign({ margin: marginField }, (padding ? { padding } : {})), (typo !== null && typo !== void 0 ? typo : {})), {
33
+ // ✅ Autofill (Chrome/Edge): mantém exatamente o background e a cor definidos por props
34
+ "&:-webkit-autofill": {
35
+ WebkitBoxShadow: `0 0 0 1000px ${background !== null && background !== void 0 ? background : "transparent"} inset`,
36
+ WebkitTextFillColor: colorText !== null && colorText !== void 0 ? colorText : "inherit",
37
+ caretColor: colorText !== null && colorText !== void 0 ? colorText : "inherit",
38
+ }, "&:-webkit-autofill:hover": {
39
+ WebkitBoxShadow: `0 0 0 1000px ${background !== null && background !== void 0 ? background : "transparent"} inset`,
40
+ WebkitTextFillColor: colorText !== null && colorText !== void 0 ? colorText : "inherit",
41
+ caretColor: colorText !== null && colorText !== void 0 ? colorText : "inherit",
42
+ }, "&:-webkit-autofill:focus": {
43
+ WebkitBoxShadow: `0 0 0 1000px ${(_a = (backgroundFocused !== null && backgroundFocused !== void 0 ? backgroundFocused : background)) !== null && _a !== void 0 ? _a : "transparent"} inset`,
44
+ WebkitTextFillColor: (_b = (colorFocused !== null && colorFocused !== void 0 ? colorFocused : colorText)) !== null && _b !== void 0 ? _b : "inherit",
45
+ caretColor: (_c = (colorFocused !== null && colorFocused !== void 0 ? colorFocused : colorText)) !== null && _c !== void 0 ? _c : "inherit",
46
+ } }),
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",
50
+ // (opcional) caso algum ambiente aplique autofill em textarea
51
+ "&:-webkit-autofill": {
52
+ WebkitBoxShadow: `0 0 0 1000px ${background !== null && background !== void 0 ? background : "transparent"} inset`,
53
+ WebkitTextFillColor: colorText !== null && colorText !== void 0 ? colorText : "inherit",
54
+ caretColor: colorText !== null && colorText !== void 0 ? colorText : "inherit",
55
+ }, "&:-webkit-autofill:focus": {
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",
59
+ } }),
60
+ "& .MuiOutlinedInput-notchedOutline": {
61
+ borderColor,
62
+ },
63
+ "&:hover .MuiOutlinedInput-notchedOutline": {
64
+ borderColor,
65
+ },
66
+ "&.Mui-focused .MuiOutlinedInput-notchedOutline": {
67
+ borderColor: colorFocused,
68
+ },
69
+ "&.Mui-disabled": {
70
+ background: backgroundDisabled,
71
+ color: colorDisabled,
72
+ },
73
+ "& input.Mui-disabled": {
74
+ WebkitTextFillColor: colorDisabled,
75
+ },
76
+ "& input::placeholder": Object.assign(Object.assign({}, (typo !== null && typo !== void 0 ? typo : {})), { opacity: 0.7 }),
77
+ "& textarea::placeholder": Object.assign(Object.assign({}, (typo !== null && typo !== void 0 ? typo : {})), { opacity: 0.7 }),
37
78
  },
38
- "&.Mui-focused .MuiOutlinedInput-notchedOutline": {
39
- borderColor: colorFocused,
79
+ "& .MuiInputLabel-root": {
80
+ color: colorText,
40
81
  },
41
- "&.Mui-disabled": {
42
- background: backgroundDisabled,
43
- color: colorDisabled,
82
+ "& .MuiInputLabel-root.Mui-focused": {
83
+ color: colorFocused,
44
84
  },
45
- "& input.Mui-disabled": {
46
- WebkitTextFillColor: colorDisabled,
85
+ "& .MuiInputLabel-root.Mui-disabled": {
86
+ color: colorDisabled,
47
87
  },
48
- "& input::placeholder": Object.assign(Object.assign({}, (typo !== null && typo !== void 0 ? typo : {})), { opacity: 0.7 }),
49
- "& textarea::placeholder": Object.assign(Object.assign({}, (typo !== null && typo !== void 0 ? typo : {})), { opacity: 0.7 }),
50
- },
51
- "& .MuiInputLabel-root": {
52
- color: colorText,
53
- },
54
- "& .MuiInputLabel-root.Mui-focused": {
55
- color: colorFocused,
56
- },
57
- "& .MuiInputLabel-root.Mui-disabled": {
58
- color: colorDisabled,
59
- },
60
- }));
88
+ });
89
+ });
61
90
  //# sourceMappingURL=TextFieldStyle.js.map
@@ -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,EACZ,EAAE,EAAE,CAAC,CAAC;IACL,YAAY;IACZ,SAAS;IAET,sBAAsB,EAAE;QACtB,KAAK,EAAE,SAAS;KACjB;IAED,0BAA0B,EAAE;QAC1B,UAAU;QACV,YAAY;QACZ,SAAS;QACT,MAAM;QAEN,uBAAuB,gCACrB,MAAM,EAAE,WAAW,IAChB,CAAC,OAAO,CAAC,CAAC,CAAC,EAAE,OAAO,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC,GAC5B,CAAC,IAAI,aAAJ,IAAI,cAAJ,IAAI,GAAI,EAAE,CAAC,CAChB;QAED,+BAA+B,gCAC7B,MAAM,EAAE,WAAW,IAChB,CAAC,OAAO,CAAC,CAAC,CAAC,EAAE,OAAO,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC,GAC5B,CAAC,IAAI,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