@rescui/textarea 0.10.2-RUI-285-Support-blur-for-glow-hover-6f393bc1.1 → 0.11.0
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/lib/_virtual/index.css.js +12 -12
- package/lib/index.css +228 -344
- package/lib/index.d.ts +4 -0
- package/lib/public-api.p.css +0 -215
- package/lib/public-api.pcss +0 -215
- package/lib/textarea.d.ts +9 -0
- package/lib/textarea.js +21 -12
- package/lib/textarea.p.module.css.js +21 -20
- package/lib/use-backward-compatible-id.d.ts +4 -0
- package/lib/use-backward-compatible-id.js +14 -0
- package/package.json +7 -6
- package/lib/_virtual/warning.js +0 -106
|
@@ -1,23 +1,24 @@
|
|
|
1
1
|
var styles = {
|
|
2
|
-
"themeLight": "
|
|
3
|
-
"themeDark": "
|
|
4
|
-
"sizeS": "
|
|
5
|
-
"sizeM": "
|
|
6
|
-
"sizeL": "
|
|
7
|
-
"classic": "
|
|
8
|
-
"rock": "
|
|
9
|
-
"labelWrapper": "
|
|
10
|
-
"wrapper": "
|
|
11
|
-
"error": "
|
|
12
|
-
"disabled": "
|
|
13
|
-
"enabled": "
|
|
14
|
-
"focused": "
|
|
15
|
-
"filled": "
|
|
16
|
-
"inner": "
|
|
17
|
-
"busyIcon": "
|
|
18
|
-
"
|
|
19
|
-
"
|
|
20
|
-
"
|
|
21
|
-
"
|
|
2
|
+
"themeLight": "_themeLight_tr93ef_8",
|
|
3
|
+
"themeDark": "_themeDark_tr93ef_11",
|
|
4
|
+
"sizeS": "_sizeS_tr93ef_15",
|
|
5
|
+
"sizeM": "_sizeM_tr93ef_18",
|
|
6
|
+
"sizeL": "_sizeL_tr93ef_21",
|
|
7
|
+
"classic": "_classic_tr93ef_25",
|
|
8
|
+
"rock": "_rock_tr93ef_28",
|
|
9
|
+
"labelWrapper": "_labelWrapper_tr93ef_32",
|
|
10
|
+
"wrapper": "_wrapper_tr93ef_40",
|
|
11
|
+
"error": "_error_tr93ef_57",
|
|
12
|
+
"disabled": "_disabled_tr93ef_63",
|
|
13
|
+
"enabled": "_enabled_tr93ef_69",
|
|
14
|
+
"focused": "_focused_tr93ef_69",
|
|
15
|
+
"filled": "_filled_tr93ef_75",
|
|
16
|
+
"inner": "_inner_tr93ef_91",
|
|
17
|
+
"busyIcon": "_busyIcon_tr93ef_177",
|
|
18
|
+
"label": "_label_tr93ef_32",
|
|
19
|
+
"footer": "_footer_tr93ef_208",
|
|
20
|
+
"characterCounter": "_characterCounter_tr93ef_227",
|
|
21
|
+
"errorMessage": "_errorMessage_tr93ef_236",
|
|
22
|
+
"note": "_note_tr93ef_240"
|
|
22
23
|
};
|
|
23
24
|
export { styles as default };
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import React, { useRef } from 'react';
|
|
2
|
+
|
|
3
|
+
const useBackwardCompatibleId = () => {
|
|
4
|
+
const id = useRef(null);
|
|
5
|
+
|
|
6
|
+
if (id.current === null) {
|
|
7
|
+
id.current = useBackwardCompatibleId.counter++;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
return (React.useId ? React.useId : () => id.current)();
|
|
11
|
+
};
|
|
12
|
+
|
|
13
|
+
useBackwardCompatibleId.counter = 0;
|
|
14
|
+
export { useBackwardCompatibleId };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rescui/textarea",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.11.0",
|
|
4
4
|
"description": "",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"author": "JetBrains",
|
|
@@ -16,6 +16,7 @@
|
|
|
16
16
|
},
|
|
17
17
|
"dependencies": {
|
|
18
18
|
"@babel/runtime-corejs3": "^7.26.0",
|
|
19
|
+
"@rescui/form-field": "^0.1.0",
|
|
19
20
|
"classnames": "^2.2.6",
|
|
20
21
|
"react-textarea-autosize": "^8.3.4"
|
|
21
22
|
},
|
|
@@ -25,10 +26,10 @@
|
|
|
25
26
|
"react": ">=16.8.0 <20"
|
|
26
27
|
},
|
|
27
28
|
"devDependencies": {
|
|
28
|
-
"@rescui/colors": "0.
|
|
29
|
-
"@rescui/scripts": "0.5.1",
|
|
30
|
-
"@rescui/typography": "0.24.4
|
|
31
|
-
"@rescui/visual-regression": "0.1.4",
|
|
29
|
+
"@rescui/colors": "^0.3.0",
|
|
30
|
+
"@rescui/scripts": "^0.5.1",
|
|
31
|
+
"@rescui/typography": "^0.24.4",
|
|
32
|
+
"@rescui/visual-regression": "^0.1.4",
|
|
32
33
|
"@types/classnames": "^2.2.11"
|
|
33
34
|
},
|
|
34
35
|
"scripts": {
|
|
@@ -36,5 +37,5 @@
|
|
|
36
37
|
"build-pcss-api": "rescui-scripts build-pcss-api --file public-api.p.css"
|
|
37
38
|
},
|
|
38
39
|
"nx": {},
|
|
39
|
-
"gitHead": "
|
|
40
|
+
"gitHead": "1c29c8940bcec78d637ea6070ee8a63c258c8e89"
|
|
40
41
|
}
|
package/lib/_virtual/warning.js
DELETED
|
@@ -1,106 +0,0 @@
|
|
|
1
|
-
import _extends from '@babel/runtime-corejs3/helpers/esm/extends';
|
|
2
|
-
import React from 'react';
|
|
3
|
-
import PropTypes from 'prop-types';
|
|
4
|
-
import cn from 'classnames';
|
|
5
|
-
import styles from './index.css.js';
|
|
6
|
-
const sizeStyles = {
|
|
7
|
-
"xs": styles.sizeXS,
|
|
8
|
-
"s": styles.sizeS,
|
|
9
|
-
"m": styles.sizeM,
|
|
10
|
-
"l": styles.sizeL
|
|
11
|
-
};
|
|
12
|
-
const Size = {
|
|
13
|
-
"xs": "xs",
|
|
14
|
-
"s": "s",
|
|
15
|
-
"m": "m",
|
|
16
|
-
"l": "l"
|
|
17
|
-
};
|
|
18
|
-
const WarningIcon16 = /*#__PURE__*/React.forwardRef((props, ref) => /*#__PURE__*/React.createElement("svg", _extends({
|
|
19
|
-
viewBox: "0 0 16 16"
|
|
20
|
-
}, props, {
|
|
21
|
-
ref: ref
|
|
22
|
-
}), /*#__PURE__*/React.createElement("path", {
|
|
23
|
-
d: "m6.303 1.989-5.027 8.874C.483 12.263 1.494 14 3.103 14h9.793c1.609 0 2.62-1.736 1.827-3.137L9.696 1.99C8.949.67 7.05.67 6.303 1.989M8 12a1 1 0 1 1 0-2 1 1 0 0 1 0 2m0-8a.5.5 0 0 1 .5.5v4a.5.5 0 0 1-1 0v-4A.5.5 0 0 1 8 4"
|
|
24
|
-
})));
|
|
25
|
-
WarningIcon16.displayName = 'WarningIcon16';
|
|
26
|
-
const WarningIcon20 = /*#__PURE__*/React.forwardRef((props, ref) => /*#__PURE__*/React.createElement("svg", _extends({
|
|
27
|
-
viewBox: "0 0 20 20"
|
|
28
|
-
}, props, {
|
|
29
|
-
ref: ref
|
|
30
|
-
}), /*#__PURE__*/React.createElement("path", {
|
|
31
|
-
d: "m8.042 3.141-5.8 10.24C1.327 14.997 2.494 17 4.35 17h11.3c1.856 0 3.023-2.003 2.108-3.62l-5.8-10.239c-.862-1.521-3.054-1.521-3.916 0M10 5.25a.75.75 0 0 1 .75.75v5a.75.75 0 0 1-1.5 0V6a.75.75 0 0 1 .75-.75m0 9.25a1 1 0 1 1 0-2 1 1 0 0 1 0 2"
|
|
32
|
-
})));
|
|
33
|
-
WarningIcon20.displayName = 'WarningIcon20';
|
|
34
|
-
const WarningIcon24 = /*#__PURE__*/React.forwardRef((props, ref) => /*#__PURE__*/React.createElement("svg", _extends({
|
|
35
|
-
viewBox: "0 0 24 24"
|
|
36
|
-
}, props, {
|
|
37
|
-
ref: ref
|
|
38
|
-
}), /*#__PURE__*/React.createElement("path", {
|
|
39
|
-
d: "m9.52 3.446-7.346 12.97C1.014 18.463 2.492 21 4.844 21h14.312c2.352 0 3.83-2.537 2.67-4.584L14.48 3.446c-1.092-1.928-3.868-1.928-4.96 0M12 7a1 1 0 0 1 1 1v5a1 1 0 1 1-2 0V8a1 1 0 0 1 1-1m0 11a1.5 1.5 0 1 1 0-3 1.5 1.5 0 0 1 0 3"
|
|
40
|
-
})));
|
|
41
|
-
WarningIcon24.displayName = 'WarningIcon24';
|
|
42
|
-
const WarningIcon28 = /*#__PURE__*/React.forwardRef((props, ref) => /*#__PURE__*/React.createElement("svg", _extends({
|
|
43
|
-
viewBox: "0 0 28 28"
|
|
44
|
-
}, props, {
|
|
45
|
-
ref: ref
|
|
46
|
-
}), /*#__PURE__*/React.createElement("path", {
|
|
47
|
-
d: "M11.26 4.598 3.14 18.933C1.858 21.195 3.492 24 6.09 24h15.82c2.599 0 4.232-2.805 2.951-5.067l-8.12-14.335c-1.207-2.13-4.275-2.13-5.481 0M14 8a1 1 0 0 1 1 1v6a1 1 0 1 1-2 0V9a1 1 0 0 1 1-1m0 12a1.5 1.5 0 1 1 0-3 1.5 1.5 0 0 1 0 3"
|
|
48
|
-
})));
|
|
49
|
-
WarningIcon28.displayName = 'WarningIcon28';
|
|
50
|
-
const WarningIcon = /*#__PURE__*/React.forwardRef((_ref, ref) => {
|
|
51
|
-
let {
|
|
52
|
-
theme,
|
|
53
|
-
size: sizeFromProps = "m",
|
|
54
|
-
className,
|
|
55
|
-
style,
|
|
56
|
-
['data-render-all-sizes']: renderAllSizes = false,
|
|
57
|
-
...props
|
|
58
|
-
} = _ref;
|
|
59
|
-
const size = sizeFromProps in Size ? sizeFromProps : "m";
|
|
60
|
-
const mainProps = { ...props,
|
|
61
|
-
className: cn(styles.icon, styles[theme], sizeStyles[size], renderAllSizes && styles.allVariants, className),
|
|
62
|
-
style: renderAllSizes ? {
|
|
63
|
-
'--rs-icon-ar-width': 28,
|
|
64
|
-
'--rs-icon-ar-height': 28,
|
|
65
|
-
...style
|
|
66
|
-
} : style,
|
|
67
|
-
ref
|
|
68
|
-
};
|
|
69
|
-
|
|
70
|
-
if (renderAllSizes) {
|
|
71
|
-
return /*#__PURE__*/React.createElement("svg", _extends({
|
|
72
|
-
viewBox: "0 0 28 28"
|
|
73
|
-
}, mainProps), /*#__PURE__*/React.createElement(WarningIcon16, {
|
|
74
|
-
className: styles.variant16
|
|
75
|
-
}), /*#__PURE__*/React.createElement(WarningIcon20, {
|
|
76
|
-
className: styles.variant20
|
|
77
|
-
}), /*#__PURE__*/React.createElement(WarningIcon24, {
|
|
78
|
-
className: styles.variant24
|
|
79
|
-
}), /*#__PURE__*/React.createElement(WarningIcon28, {
|
|
80
|
-
className: styles.variant28
|
|
81
|
-
}));
|
|
82
|
-
}
|
|
83
|
-
|
|
84
|
-
if (size === Size['xs']) {
|
|
85
|
-
return /*#__PURE__*/React.createElement(WarningIcon16, mainProps);
|
|
86
|
-
}
|
|
87
|
-
|
|
88
|
-
if (size === Size['s']) {
|
|
89
|
-
return /*#__PURE__*/React.createElement(WarningIcon20, mainProps);
|
|
90
|
-
}
|
|
91
|
-
|
|
92
|
-
if (size === Size['m']) {
|
|
93
|
-
return /*#__PURE__*/React.createElement(WarningIcon24, mainProps);
|
|
94
|
-
}
|
|
95
|
-
|
|
96
|
-
return /*#__PURE__*/React.createElement(WarningIcon28, mainProps);
|
|
97
|
-
});
|
|
98
|
-
WarningIcon.displayName = 'WarningIcon';
|
|
99
|
-
WarningIcon.propTypes = {
|
|
100
|
-
className: PropTypes.string,
|
|
101
|
-
theme: PropTypes.oneOf(["light", "dark"]),
|
|
102
|
-
size: PropTypes.oneOf(["xs", "s", "m", "l"]),
|
|
103
|
-
'data-render-all-sizes': PropTypes.bool,
|
|
104
|
-
style: PropTypes.object
|
|
105
|
-
};
|
|
106
|
-
export { Size, WarningIcon as default };
|