@rescui/textarea 0.5.10 → 0.6.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/textarea.js CHANGED
@@ -17,7 +17,7 @@ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { va
17
17
  import React, { useState } from 'react';
18
18
  import PropTypes from 'prop-types';
19
19
  import TextareaAutosize from 'react-textarea-autosize';
20
- import { useTheme } from '@rescui/ui-contexts';
20
+ import { useThemeWithUndefined } from '@rescui/ui-contexts';
21
21
  import { LoadingIcon } from '@rescui/icons';
22
22
  import cn from 'classnames';
23
23
  import styles from './textarea.p.module.css.js';
@@ -56,7 +56,7 @@ function (_ref, ref) {
56
56
  note = _ref.note,
57
57
  restProps = _objectWithoutProperties(_ref, _excluded);
58
58
 
59
- var theme = useTheme(themeFromProps);
59
+ var theme = useThemeWithUndefined(themeFromProps);
60
60
  var isEmpty = !value;
61
61
 
62
62
  var _useState = useState(false),
@@ -71,7 +71,8 @@ function (_ref, ref) {
71
71
  "data-test": 'textarea'
72
72
  }, label && /*#__PURE__*/React.createElement("div", {
73
73
  className: styles.label,
74
- "data-test": 'textarea__label'
74
+ "data-test": 'textarea__label',
75
+ "data-rs-internal": boldLabel ? 'textarea__bold-label' : 'textarea__label'
75
76
  }, label), /*#__PURE__*/React.createElement("div", {
76
77
  className: styles.wrapper,
77
78
  onFocus: function onFocus() {
@@ -88,18 +89,21 @@ function (_ref, ref) {
88
89
  ref: textareaRef,
89
90
  "aria-invalid": !!error,
90
91
  tabIndex: disabled ? -1 : tabIndex,
91
- "data-test": 'textarea__input'
92
+ "data-test": 'textarea__input',
93
+ "data-rs-internal": "textarea__inner"
92
94
  })), busy && /*#__PURE__*/React.createElement("span", {
93
- className: cn(styles.icon, styles.busy)
95
+ className: styles.busyIcon
94
96
  }, /*#__PURE__*/React.createElement(LoadingIcon, {
95
- size: size,
96
- "data-test": "textarea__busy-icon"
97
+ "data-test": "textarea__busy-icon",
98
+ "data-rs-internal": "textarea__busy-icon"
97
99
  }))), error && typeof error !== 'boolean' && /*#__PURE__*/React.createElement("div", {
98
100
  className: styles.errorMessage,
99
- "data-test": 'textarea__error'
101
+ "data-test": 'textarea__error',
102
+ "data-rs-internal": "textarea__error-message"
100
103
  }, error), note && /*#__PURE__*/React.createElement("div", {
101
104
  className: styles.note,
102
- "data-test": 'textarea__note'
105
+ "data-test": 'textarea__note',
106
+ "data-rs-internal": "textarea__note"
103
107
  }, note));
104
108
  });
105
109
  Textarea.displayName = 'Textarea';
@@ -1,22 +1,21 @@
1
1
  var styles = {
2
- "labelWrapper": "_labelWrapper_q55dir_44",
3
- "wrapper": "_wrapper_q55dir_48",
4
- "disabled": "_disabled_q55dir_56",
5
- "inner": "_inner_q55dir_61",
6
- "focused": "_focused_q55dir_90",
7
- "sizeL": "_sizeL_q55dir_94",
8
- "sizeM": "_sizeM_q55dir_98",
9
- "rs-reset-letter-spacing": "_rs-reset-letter-spacing_q55dir_1",
10
- "sizeS": "_sizeS_q55dir_102",
11
- "error": "_error_q55dir_108",
12
- "themeLight": "_themeLight_q55dir_122",
13
- "filled": "_filled_q55dir_129",
14
- "rock": "_rock_q55dir_144",
15
- "themeDark": "_themeDark_q55dir_156",
16
- "busy": "_busy_q55dir_212",
17
- "errorMessage": "_errorMessage_q55dir_248",
18
- "note": "_note_q55dir_249",
19
- "label": "_label_q55dir_44",
20
- "boldLabel": "_boldLabel_q55dir_294"
2
+ "themeLight": "_themeLight_dx28q7_8",
3
+ "themeDark": "_themeDark_dx28q7_11",
4
+ "sizeS": "_sizeS_dx28q7_15",
5
+ "sizeM": "_sizeM_dx28q7_18",
6
+ "sizeL": "_sizeL_dx28q7_21",
7
+ "classic": "_classic_dx28q7_25",
8
+ "rock": "_rock_dx28q7_28",
9
+ "labelWrapper": "_labelWrapper_dx28q7_32",
10
+ "wrapper": "_wrapper_dx28q7_39",
11
+ "disabled": "_disabled_dx28q7_47",
12
+ "inner": "_inner_dx28q7_52",
13
+ "focused": "_focused_dx28q7_104",
14
+ "error": "_error_dx28q7_129",
15
+ "filled": "_filled_dx28q7_133",
16
+ "busyIcon": "_busyIcon_dx28q7_167",
17
+ "errorMessage": "_errorMessage_dx28q7_187",
18
+ "note": "_note_dx28q7_194",
19
+ "label": "_label_dx28q7_32"
21
20
  };
22
21
  export { styles as default };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rescui/textarea",
3
- "version": "0.5.10",
3
+ "version": "0.6.0",
4
4
  "description": "",
5
5
  "license": "Apache-2.0",
6
6
  "author": "JetBrains",
@@ -15,7 +15,7 @@
15
15
  },
16
16
  "dependencies": {
17
17
  "@babel/runtime-corejs3": "^7.14.0",
18
- "@rescui/icons": "^0.15.3",
18
+ "@rescui/icons": "^0.16.0",
19
19
  "classnames": "^2.2.6",
20
20
  "core-js": "^3.9.1",
21
21
  "react-textarea-autosize": "^8.3.4"
@@ -26,16 +26,15 @@
26
26
  "react": ">=16.8.0 <19"
27
27
  },
28
28
  "devDependencies": {
29
- "@rescui/colors": "^0.1.11",
30
- "@rescui/postcss-preset-library": "^0.1.1",
31
- "@rescui/scripts": "^0.2.3",
32
- "@rescui/tooltip": "^0.7.3",
33
- "@rescui/typography": "^0.15.0",
29
+ "@rescui/colors": "^0.2.0",
30
+ "@rescui/scripts": "^0.3.0",
31
+ "@rescui/typography": "^0.16.0",
34
32
  "@rescui/visual-regression": "^0.1.1",
35
33
  "@types/classnames": "^2.2.11"
36
34
  },
37
35
  "scripts": {
38
- "build": "rescui-scripts build"
36
+ "build": "rescui-scripts build && yarn run build-pcss-api",
37
+ "build-pcss-api": "rescui-scripts build-pcss-api --file public-api.p.css"
39
38
  },
40
- "gitHead": "e21b6f80037993b094ceaff022db6d4cd176a88d"
39
+ "gitHead": "51da8a7188f4c558c563065a4ff4ef5c8e74994c"
41
40
  }