@circle-vibe/shared 1.1.35 → 1.1.37
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.
|
@@ -34,25 +34,28 @@ const utils_1 = require("src/utils");
|
|
|
34
34
|
require("src/styles/text-input-generic-styles.scss");
|
|
35
35
|
const FormControlTextarea = (props) => {
|
|
36
36
|
const fieldProvider = (0, react_1.useContext)(field_context_1.FieldContext);
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
37
|
+
if (typeof window !== 'undefined') {
|
|
38
|
+
react_1.default.createElement(react_textarea_autosize_1.default, { ...props, ...fieldProvider, inputMode: props.inputMode ?? 'text', onChange: (e) => {
|
|
39
|
+
const value = (0, utils_1.getFormikTextreaFormControlValue)(e);
|
|
40
|
+
fieldProvider.setValue(value);
|
|
41
|
+
}, className: "text-input-generic-styles",
|
|
42
|
+
// @ts-ignore
|
|
43
|
+
style: {
|
|
44
|
+
'--text-input-border-color': (fieldProvider.errors ?? '')?.length > 0
|
|
45
|
+
? 'var(--text-input-error-border-color)'
|
|
46
|
+
: 'var(--text-input-default-border-color)',
|
|
47
|
+
'--text-input-text-color': `var(${(fieldProvider.errors ?? '')?.length > 0
|
|
48
|
+
? '--text-input-error-text-color'
|
|
49
|
+
: '--text-input-default-text-color'})`,
|
|
50
|
+
'--text-input-outline-color': (fieldProvider.errors ?? '')?.length > 0
|
|
51
|
+
? 'var(--text-input-error-outline-color)'
|
|
52
|
+
: 'transparent',
|
|
53
|
+
'--text-input-background': `var(${(fieldProvider.errors ?? '')?.length > 0
|
|
54
|
+
? '--text-input-error-bg-color'
|
|
55
|
+
: '--text-input-default-bg-color'})`,
|
|
56
|
+
} });
|
|
57
|
+
}
|
|
58
|
+
return react_1.default.createElement(react_1.default.Fragment, null);
|
|
56
59
|
};
|
|
57
60
|
exports.FormControlTextarea = FormControlTextarea;
|
|
58
61
|
//# sourceMappingURL=form-control-textarea.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"form-control-textarea.js","sourceRoot":"","sources":["../../../../../src/components/form/form-control-textarea/form-control-textarea.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,+CAA0C;AAC1C,sFAAuD;
|
|
1
|
+
{"version":3,"file":"form-control-textarea.js","sourceRoot":"","sources":["../../../../../src/components/form/form-control-textarea/form-control-textarea.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,+CAA0C;AAC1C,sFAAuD;AAGvD,kEAA8D;AAC9D,qCAA6D;AAE7D,qDAAmD;AAI5C,MAAM,mBAAmB,GAE5B,CAAC,KAAK,EAAE,EAAE;IACZ,MAAM,aAAa,GAAG,IAAA,kBAAU,EAAC,4BAAY,CAAC,CAAC;IAE/C,IAAI,OAAO,MAAM,KAAK,WAAW,EAAE;QACjC,8BAAC,iCAAgB,OACX,KAAK,KACL,aAAa,EACjB,SAAS,EAAE,KAAK,CAAC,SAAS,IAAI,MAAM,EACpC,QAAQ,EAAE,CAAC,CAAC,EAAE,EAAE;gBACd,MAAM,KAAK,GAAG,IAAA,wCAAgC,EAAC,CAAC,CAAC,CAAC;gBAClD,aAAa,CAAC,QAAQ,CAAC,KAA0B,CAAC,CAAC;YACrD,CAAC,EACD,SAAS,EAAC,2BAA2B;YACrC,aAAa;YACb,KAAK,EACH;gBACE,2BAA2B,EACzB,CAAC,aAAa,CAAC,MAAM,IAAI,EAAE,CAAC,EAAE,MAAM,GAAG,CAAC;oBACtC,CAAC,CAAC,sCAAsC;oBACxC,CAAC,CAAC,wCAAwC;gBAC9C,yBAAyB,EAAE,OACzB,CAAC,aAAa,CAAC,MAAM,IAAI,EAAE,CAAC,EAAE,MAAM,GAAG,CAAC;oBACtC,CAAC,CAAC,+BAA+B;oBACjC,CAAC,CAAC,iCACN,GAAG;gBACH,4BAA4B,EAC1B,CAAC,aAAa,CAAC,MAAM,IAAI,EAAE,CAAC,EAAE,MAAM,GAAG,CAAC;oBACtC,CAAC,CAAC,uCAAuC;oBACzC,CAAC,CAAC,aAAa;gBACnB,yBAAyB,EAAE,OACzB,CAAC,aAAa,CAAC,MAAM,IAAI,EAAE,CAAC,EAAE,MAAM,GAAG,CAAC;oBACtC,CAAC,CAAC,6BAA6B;oBAC/B,CAAC,CAAC,+BACN,GAAG;aACkB,GAEzB,CAAC;KACJ;IAED,OAAO,6DAAK,CAAC;AACf,CAAC,CAAC;AA1CW,QAAA,mBAAmB,uBA0C9B"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@circle-vibe/shared",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.37",
|
|
4
4
|
"types": "./build/index.d.ts",
|
|
5
5
|
"description": "Shared componenets, utils, hooks",
|
|
6
6
|
"scripts": {
|
|
@@ -32,7 +32,6 @@
|
|
|
32
32
|
"formik": ">=2.4.6",
|
|
33
33
|
"react": ">=16",
|
|
34
34
|
"react-dom": ">=16",
|
|
35
|
-
"react-textarea-autosize": "^8.5.9",
|
|
36
35
|
"yup": ">=1.6"
|
|
37
36
|
},
|
|
38
37
|
"dependencies": {
|
|
@@ -71,5 +70,8 @@
|
|
|
71
70
|
"typescript-eslint": "^8.31.1",
|
|
72
71
|
"webpack": "^5.91.0",
|
|
73
72
|
"webpack-cli": "^5.1.4"
|
|
73
|
+
},
|
|
74
|
+
"optionalDependencies": {
|
|
75
|
+
"react-textarea-autosize": "^8.5.9"
|
|
74
76
|
}
|
|
75
77
|
}
|