@atlaskit/textarea 4.2.3 → 4.3.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/CHANGELOG.md CHANGED
@@ -1,5 +1,32 @@
1
1
  # @atlaskit/textarea
2
2
 
3
+ ## 4.3.0
4
+
5
+ ### Minor Changes
6
+
7
+ - [`2e56ff8ea50`](https://bitbucket.org/atlassian/atlassian-frontend/commits/2e56ff8ea50) - [ux] Fixed a bug where smart resize did not work when the value prop was changed
8
+
9
+ ## 4.2.6
10
+
11
+ ### Patch Changes
12
+
13
+ - [`19d72473dfb`](https://bitbucket.org/atlassian/atlassian-frontend/commits/19d72473dfb) - The no-unsafe-design-token-usage eslint rule now respects the new token naming conventions when auto-fixing by correctly formatting token ids.
14
+ - Updated dependencies
15
+
16
+ ## 4.2.5
17
+
18
+ ### Patch Changes
19
+
20
+ - Updated dependencies
21
+
22
+ ## 4.2.4
23
+
24
+ ### Patch Changes
25
+
26
+ - [`f460cc7c411`](https://bitbucket.org/atlassian/atlassian-frontend/commits/f460cc7c411) - Builds for this package now pass through a tokens babel plugin, removing runtime invocations of the tokens() function and improving bundle size.
27
+ - [`af7c289395b`](https://bitbucket.org/atlassian/atlassian-frontend/commits/af7c289395b) - Fix TypeScript issue where text area HTML attributes were not exposed in component prop types.
28
+ - Updated dependencies
29
+
3
30
  ## 4.2.3
4
31
 
5
32
  ### Patch Changes
@@ -3,71 +3,69 @@
3
3
  Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
- exports.transparent = exports.disabledTextColor = exports.textColor = exports.placeholderTextColor = exports.subtleHoverBackgroundColor = exports.defaultBackgroundColorFocus = exports.defaultBackgroundColorHover = exports.defaultBackgroundColor = exports.defaultBorderColorFocus = exports.defaultBorderColor = exports.invalidBorderColor = exports.disabledBorder = exports.disabledBackground = void 0;
6
+ exports.transparent = exports.textColor = exports.subtleHoverBackgroundColor = exports.placeholderTextColor = exports.invalidBorderColor = exports.disabledTextColor = exports.disabledBorder = exports.disabledBackground = exports.defaultBorderColorFocus = exports.defaultBorderColor = exports.defaultBackgroundColorHover = exports.defaultBackgroundColorFocus = exports.defaultBackgroundColor = void 0;
7
7
 
8
8
  var _colors = require("@atlaskit/theme/colors");
9
9
 
10
- var _tokens = require("@atlaskit/tokens");
11
-
12
10
  var disabledBackground = {
13
- light: (0, _tokens.token)('color.background.disabled', _colors.N20),
14
- dark: (0, _tokens.token)('color.background.disabled', _colors.DN20)
11
+ light: "var(--ds-background-disabled, ".concat(_colors.N20, ")"),
12
+ dark: "var(--ds-background-disabled, ".concat(_colors.DN20, ")")
15
13
  };
16
14
  exports.disabledBackground = disabledBackground;
17
15
  var disabledBorder = {
18
- light: (0, _tokens.token)('color.background.disabled', _colors.N40),
19
- dark: (0, _tokens.token)('color.background.disabled', _colors.DN40)
16
+ light: "var(--ds-background-disabled, ".concat(_colors.N40, ")"),
17
+ dark: "var(--ds-background-disabled, ".concat(_colors.DN40, ")")
20
18
  };
21
19
  exports.disabledBorder = disabledBorder;
22
20
  var invalidBorderColor = {
23
- light: (0, _tokens.token)('color.iconBorder.danger', _colors.R400),
24
- dark: (0, _tokens.token)('color.iconBorder.danger', _colors.R400)
21
+ light: "var(--ds-border-danger, ".concat(_colors.R400, ")"),
22
+ dark: "var(--ds-border-danger, ".concat(_colors.R400, ")")
25
23
  };
26
24
  exports.invalidBorderColor = invalidBorderColor;
27
25
  var defaultBorderColor = {
28
- light: (0, _tokens.token)('color.border.neutral', _colors.N40),
29
- dark: (0, _tokens.token)('color.border.neutral', _colors.DN40)
26
+ light: "var(--ds-border, ".concat(_colors.N40, ")"),
27
+ dark: "var(--ds-border, ".concat(_colors.DN40, ")")
30
28
  };
31
29
  exports.defaultBorderColor = defaultBorderColor;
32
30
  var defaultBorderColorFocus = {
33
- light: (0, _tokens.token)('color.border.focus', _colors.B100),
34
- dark: (0, _tokens.token)('color.border.focus', _colors.B75)
31
+ light: "var(--ds-border-focused, ".concat(_colors.B100, ")"),
32
+ dark: "var(--ds-border-focused, ".concat(_colors.B75, ")")
35
33
  };
36
34
  exports.defaultBorderColorFocus = defaultBorderColorFocus;
37
35
  var defaultBackgroundColor = {
38
- light: (0, _tokens.token)('color.background.subtleNeutral.resting', _colors.N10),
39
- dark: (0, _tokens.token)('color.background.subtleNeutral.resting', _colors.DN10)
36
+ light: "var(--ds-background-neutral, ".concat(_colors.N10, ")"),
37
+ dark: "var(--ds-background-neutral, ".concat(_colors.DN10, ")")
40
38
  };
41
39
  exports.defaultBackgroundColor = defaultBackgroundColor;
42
40
  var defaultBackgroundColorHover = {
43
- light: (0, _tokens.token)('color.background.default', _colors.N30),
44
- dark: (0, _tokens.token)('color.background.default', _colors.DN30)
41
+ light: "var(--ds-surface, ".concat(_colors.N30, ")"),
42
+ dark: "var(--ds-surface, ".concat(_colors.DN30, ")")
45
43
  };
46
44
  exports.defaultBackgroundColorHover = defaultBackgroundColorHover;
47
45
  var defaultBackgroundColorFocus = {
48
- light: (0, _tokens.token)('color.background.default', _colors.N0),
49
- dark: (0, _tokens.token)('color.background.default', _colors.DN10)
46
+ light: "var(--ds-surface, ".concat(_colors.N0, ")"),
47
+ dark: "var(--ds-surface, ".concat(_colors.DN10, ")")
50
48
  }; // TODO Subtle hover styles not defined in Figma: https://product-fabric.atlassian.net/browse/DSP-1568
51
49
 
52
50
  exports.defaultBackgroundColorFocus = defaultBackgroundColorFocus;
53
51
  var subtleHoverBackgroundColor = {
54
- light: (0, _tokens.token)('color.background.transparentNeutral.hover', _colors.N30),
55
- dark: (0, _tokens.token)('color.background.transparentNeutral.hover', _colors.DN30)
52
+ light: "var(--ds-background-neutral-subtle-hovered, ".concat(_colors.N30, ")"),
53
+ dark: "var(--ds-background-neutral-subtle-hovered, ".concat(_colors.DN30, ")")
56
54
  };
57
55
  exports.subtleHoverBackgroundColor = subtleHoverBackgroundColor;
58
56
  var placeholderTextColor = {
59
- light: (0, _tokens.token)('color.text.lowEmphasis', _colors.N100),
60
- dark: (0, _tokens.token)('color.text.lowEmphasis', _colors.DN200)
57
+ light: "var(--ds-text-subtlest, ".concat(_colors.N100, ")"),
58
+ dark: "var(--ds-text-subtlest, ".concat(_colors.DN200, ")")
61
59
  };
62
60
  exports.placeholderTextColor = placeholderTextColor;
63
61
  var textColor = {
64
- light: (0, _tokens.token)('color.text.highEmphasis', _colors.N900),
65
- dark: (0, _tokens.token)('color.text.highEmphasis', _colors.DN600)
62
+ light: "var(--ds-text, ".concat(_colors.N900, ")"),
63
+ dark: "var(--ds-text, ".concat(_colors.DN600, ")")
66
64
  };
67
65
  exports.textColor = textColor;
68
66
  var disabledTextColor = {
69
- light: (0, _tokens.token)('color.text.disabled', _colors.N70),
70
- dark: (0, _tokens.token)('color.text.disabled', _colors.DN90)
67
+ light: "var(--ds-text-disabled, ".concat(_colors.N70, ")"),
68
+ dark: "var(--ds-text-disabled, ".concat(_colors.DN90, ")")
71
69
  };
72
70
  exports.disabledTextColor = disabledTextColor;
73
71
  var transparent = {
package/dist/cjs/index.js CHANGED
@@ -5,16 +5,16 @@ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefau
5
5
  Object.defineProperty(exports, "__esModule", {
6
6
  value: true
7
7
  });
8
- Object.defineProperty(exports, "default", {
8
+ Object.defineProperty(exports, "Theme", {
9
9
  enumerable: true,
10
10
  get: function get() {
11
- return _textArea.default;
11
+ return _theme.Theme;
12
12
  }
13
13
  });
14
- Object.defineProperty(exports, "Theme", {
14
+ Object.defineProperty(exports, "default", {
15
15
  enumerable: true,
16
16
  get: function get() {
17
- return _theme.Theme;
17
+ return _textArea.default;
18
18
  }
19
19
  });
20
20
  Object.defineProperty(exports, "themeTokens", {
@@ -11,9 +11,9 @@ var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/de
11
11
 
12
12
  var _constants = require("@atlaskit/theme/constants");
13
13
 
14
- function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) { symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); } keys.push.apply(keys, symbols); } return keys; }
14
+ function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
15
15
 
16
- function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { (0, _defineProperty2.default)(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
16
+ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { (0, _defineProperty2.default)(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
17
17
 
18
18
  var grid = (0, _constants.gridSize)();
19
19
  var borderRadius = 3;
@@ -29,16 +29,18 @@ var _styles = require("./styles");
29
29
 
30
30
  var _theme = require("./theme");
31
31
 
32
+ var _excluded = ["resize", "appearance", "isCompact", "isRequired", "isReadOnly", "isDisabled", "isInvalid", "isMonospaced", "minimumRows", "theme", "testId", "maxHeight", "onBlur", "onFocus", "onChange", "tokens", "value"];
33
+
32
34
  function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
33
35
 
34
36
  function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof3(obj) !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
35
37
 
36
- function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) { symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); } keys.push.apply(keys, symbols); } return keys; }
38
+ function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
37
39
 
38
- function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { (0, _defineProperty2.default)(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
40
+ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { (0, _defineProperty2.default)(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
39
41
 
40
42
  var packageName = "@atlaskit/textarea";
41
- var packageVersion = "4.2.3";
43
+ var packageVersion = "4.3.0";
42
44
  var analyticsParams = {
43
45
  componentName: 'textArea',
44
46
  packageName: packageName,
@@ -46,6 +48,8 @@ var analyticsParams = {
46
48
  };
47
49
 
48
50
  var setSmartHeight = function setSmartHeight(el) {
51
+ // Always reset height to auto before calculating new height
52
+ el.style.height = 'auto';
49
53
  var borderHeight = _styles.borderWidth;
50
54
  var paddingBoxHeight = el.scrollHeight;
51
55
  var borderBoxHeight = paddingBoxHeight + borderHeight * 2;
@@ -80,14 +84,15 @@ var TextAreaWithTokens = /*#__PURE__*/(0, _react.forwardRef)(function (props, re
80
84
  onFocus = props.onFocus,
81
85
  onChange = props.onChange,
82
86
  tokens = props.tokens,
83
- rest = (0, _objectWithoutProperties2.default)(props, ["resize", "appearance", "isCompact", "isRequired", "isReadOnly", "isDisabled", "isInvalid", "isMonospaced", "minimumRows", "theme", "testId", "maxHeight", "onBlur", "onFocus", "onChange", "tokens"]);
87
+ value = props.value,
88
+ rest = (0, _objectWithoutProperties2.default)(props, _excluded);
84
89
  (0, _react.useEffect)(function () {
85
90
  var el = ourRef.current;
86
91
 
87
92
  if (resize === 'smart' && el) {
88
93
  setSmartHeight(el);
89
94
  }
90
- }, [resize]);
95
+ }, [resize, value]);
91
96
  var onBlurWithAnalytics = (0, _analyticsNext.usePlatformLeafEventHandler)(_objectSpread({
92
97
  fn: function fn(event) {
93
98
  onBlur && onBlur(event);
@@ -118,7 +123,6 @@ var TextAreaWithTokens = /*#__PURE__*/(0, _react.forwardRef)(function (props, re
118
123
  var el = ourRef.current;
119
124
 
120
125
  if (resize === 'smart' && el) {
121
- el.style.height = 'auto';
122
126
  setSmartHeight(el);
123
127
  }
124
128
 
@@ -141,6 +145,7 @@ var TextAreaWithTokens = /*#__PURE__*/(0, _react.forwardRef)(function (props, re
141
145
  var textAreaStyles = [baseStyles, // not memoizing themeStyles as `tokens` is an unstable reference
142
146
  (0, _styles.themeStyles)(tokens)];
143
147
  return (0, _core.jsx)("textarea", (0, _extends2.default)({}, controlProps, {
148
+ value: value,
144
149
  disabled: isDisabled,
145
150
  readOnly: isReadOnly,
146
151
  required: isRequired,
package/dist/cjs/theme.js CHANGED
@@ -5,7 +5,7 @@ var _typeof = require("@babel/runtime/helpers/typeof");
5
5
  Object.defineProperty(exports, "__esModule", {
6
6
  value: true
7
7
  });
8
- exports.Theme = exports.themeTokens = void 0;
8
+ exports.themeTokens = exports.Theme = void 0;
9
9
 
10
10
  var _components = require("@atlaskit/theme/components");
11
11
 
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "name": "@atlaskit/textarea",
3
- "version": "4.2.3",
3
+ "version": "4.3.0",
4
4
  "sideEffects": false
5
5
  }
@@ -1,53 +1,52 @@
1
1
  import { B100, B75, DN10, DN20, DN200, DN30, DN40, DN600, DN90, N0, N10, N100, N20, N30, N40, N70, N900, R400 } from '@atlaskit/theme/colors';
2
- import { token } from '@atlaskit/tokens';
3
2
  export const disabledBackground = {
4
- light: token('color.background.disabled', N20),
5
- dark: token('color.background.disabled', DN20)
3
+ light: `var(--ds-background-disabled, ${N20})`,
4
+ dark: `var(--ds-background-disabled, ${DN20})`
6
5
  };
7
6
  export const disabledBorder = {
8
- light: token('color.background.disabled', N40),
9
- dark: token('color.background.disabled', DN40)
7
+ light: `var(--ds-background-disabled, ${N40})`,
8
+ dark: `var(--ds-background-disabled, ${DN40})`
10
9
  };
11
10
  export const invalidBorderColor = {
12
- light: token('color.iconBorder.danger', R400),
13
- dark: token('color.iconBorder.danger', R400)
11
+ light: `var(--ds-border-danger, ${R400})`,
12
+ dark: `var(--ds-border-danger, ${R400})`
14
13
  };
15
14
  export const defaultBorderColor = {
16
- light: token('color.border.neutral', N40),
17
- dark: token('color.border.neutral', DN40)
15
+ light: `var(--ds-border, ${N40})`,
16
+ dark: `var(--ds-border, ${DN40})`
18
17
  };
19
18
  export const defaultBorderColorFocus = {
20
- light: token('color.border.focus', B100),
21
- dark: token('color.border.focus', B75)
19
+ light: `var(--ds-border-focused, ${B100})`,
20
+ dark: `var(--ds-border-focused, ${B75})`
22
21
  };
23
22
  export const defaultBackgroundColor = {
24
- light: token('color.background.subtleNeutral.resting', N10),
25
- dark: token('color.background.subtleNeutral.resting', DN10)
23
+ light: `var(--ds-background-neutral, ${N10})`,
24
+ dark: `var(--ds-background-neutral, ${DN10})`
26
25
  };
27
26
  export const defaultBackgroundColorHover = {
28
- light: token('color.background.default', N30),
29
- dark: token('color.background.default', DN30)
27
+ light: `var(--ds-surface, ${N30})`,
28
+ dark: `var(--ds-surface, ${DN30})`
30
29
  };
31
30
  export const defaultBackgroundColorFocus = {
32
- light: token('color.background.default', N0),
33
- dark: token('color.background.default', DN10)
31
+ light: `var(--ds-surface, ${N0})`,
32
+ dark: `var(--ds-surface, ${DN10})`
34
33
  }; // TODO Subtle hover styles not defined in Figma: https://product-fabric.atlassian.net/browse/DSP-1568
35
34
 
36
35
  export const subtleHoverBackgroundColor = {
37
- light: token('color.background.transparentNeutral.hover', N30),
38
- dark: token('color.background.transparentNeutral.hover', DN30)
36
+ light: `var(--ds-background-neutral-subtle-hovered, ${N30})`,
37
+ dark: `var(--ds-background-neutral-subtle-hovered, ${DN30})`
39
38
  };
40
39
  export const placeholderTextColor = {
41
- light: token('color.text.lowEmphasis', N100),
42
- dark: token('color.text.lowEmphasis', DN200)
40
+ light: `var(--ds-text-subtlest, ${N100})`,
41
+ dark: `var(--ds-text-subtlest, ${DN200})`
43
42
  };
44
43
  export const textColor = {
45
- light: token('color.text.highEmphasis', N900),
46
- dark: token('color.text.highEmphasis', DN600)
44
+ light: `var(--ds-text, ${N900})`,
45
+ dark: `var(--ds-text, ${DN600})`
47
46
  };
48
47
  export const disabledTextColor = {
49
- light: token('color.text.disabled', N70),
50
- dark: token('color.text.disabled', DN90)
48
+ light: `var(--ds-text-disabled, ${N70})`,
49
+ dark: `var(--ds-text-disabled, ${DN90})`
51
50
  };
52
51
  export const transparent = {
53
52
  light: 'transparent',
@@ -8,7 +8,7 @@ import GlobalTheme from '@atlaskit/theme/components';
8
8
  import { borderWidth, getBaseStyles, themeStyles } from './styles';
9
9
  import { Theme } from './theme';
10
10
  const packageName = "@atlaskit/textarea";
11
- const packageVersion = "4.2.3";
11
+ const packageVersion = "4.3.0";
12
12
  const analyticsParams = {
13
13
  componentName: 'textArea',
14
14
  packageName,
@@ -16,6 +16,8 @@ const analyticsParams = {
16
16
  };
17
17
 
18
18
  const setSmartHeight = el => {
19
+ // Always reset height to auto before calculating new height
20
+ el.style.height = 'auto';
19
21
  const borderHeight = borderWidth;
20
22
  const paddingBoxHeight = el.scrollHeight;
21
23
  const borderBoxHeight = paddingBoxHeight + borderHeight * 2;
@@ -41,6 +43,7 @@ const TextAreaWithTokens = /*#__PURE__*/forwardRef((props, ref) => {
41
43
  onFocus,
42
44
  onChange,
43
45
  tokens,
46
+ value,
44
47
  ...rest
45
48
  } = props;
46
49
  useEffect(() => {
@@ -49,7 +52,7 @@ const TextAreaWithTokens = /*#__PURE__*/forwardRef((props, ref) => {
49
52
  if (resize === 'smart' && el) {
50
53
  setSmartHeight(el);
51
54
  }
52
- }, [resize]);
55
+ }, [resize, value]);
53
56
  const onBlurWithAnalytics = usePlatformLeafEventHandler({
54
57
  fn: event => {
55
58
  onBlur && onBlur(event);
@@ -82,7 +85,6 @@ const TextAreaWithTokens = /*#__PURE__*/forwardRef((props, ref) => {
82
85
  const el = ourRef.current;
83
86
 
84
87
  if (resize === 'smart' && el) {
85
- el.style.height = 'auto';
86
88
  setSmartHeight(el);
87
89
  }
88
90
 
@@ -103,6 +105,7 @@ const TextAreaWithTokens = /*#__PURE__*/forwardRef((props, ref) => {
103
105
  const textAreaStyles = [baseStyles, // not memoizing themeStyles as `tokens` is an unstable reference
104
106
  themeStyles(tokens)];
105
107
  return jsx("textarea", _extends({}, controlProps, {
108
+ value: value,
106
109
  disabled: isDisabled,
107
110
  readOnly: isReadOnly,
108
111
  required: isRequired,
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "name": "@atlaskit/textarea",
3
- "version": "4.2.3",
3
+ "version": "4.3.0",
4
4
  "sideEffects": false
5
5
  }
@@ -1,53 +1,52 @@
1
1
  import { B100, B75, DN10, DN20, DN200, DN30, DN40, DN600, DN90, N0, N10, N100, N20, N30, N40, N70, N900, R400 } from '@atlaskit/theme/colors';
2
- import { token } from '@atlaskit/tokens';
3
2
  export var disabledBackground = {
4
- light: token('color.background.disabled', N20),
5
- dark: token('color.background.disabled', DN20)
3
+ light: "var(--ds-background-disabled, ".concat(N20, ")"),
4
+ dark: "var(--ds-background-disabled, ".concat(DN20, ")")
6
5
  };
7
6
  export var disabledBorder = {
8
- light: token('color.background.disabled', N40),
9
- dark: token('color.background.disabled', DN40)
7
+ light: "var(--ds-background-disabled, ".concat(N40, ")"),
8
+ dark: "var(--ds-background-disabled, ".concat(DN40, ")")
10
9
  };
11
10
  export var invalidBorderColor = {
12
- light: token('color.iconBorder.danger', R400),
13
- dark: token('color.iconBorder.danger', R400)
11
+ light: "var(--ds-border-danger, ".concat(R400, ")"),
12
+ dark: "var(--ds-border-danger, ".concat(R400, ")")
14
13
  };
15
14
  export var defaultBorderColor = {
16
- light: token('color.border.neutral', N40),
17
- dark: token('color.border.neutral', DN40)
15
+ light: "var(--ds-border, ".concat(N40, ")"),
16
+ dark: "var(--ds-border, ".concat(DN40, ")")
18
17
  };
19
18
  export var defaultBorderColorFocus = {
20
- light: token('color.border.focus', B100),
21
- dark: token('color.border.focus', B75)
19
+ light: "var(--ds-border-focused, ".concat(B100, ")"),
20
+ dark: "var(--ds-border-focused, ".concat(B75, ")")
22
21
  };
23
22
  export var defaultBackgroundColor = {
24
- light: token('color.background.subtleNeutral.resting', N10),
25
- dark: token('color.background.subtleNeutral.resting', DN10)
23
+ light: "var(--ds-background-neutral, ".concat(N10, ")"),
24
+ dark: "var(--ds-background-neutral, ".concat(DN10, ")")
26
25
  };
27
26
  export var defaultBackgroundColorHover = {
28
- light: token('color.background.default', N30),
29
- dark: token('color.background.default', DN30)
27
+ light: "var(--ds-surface, ".concat(N30, ")"),
28
+ dark: "var(--ds-surface, ".concat(DN30, ")")
30
29
  };
31
30
  export var defaultBackgroundColorFocus = {
32
- light: token('color.background.default', N0),
33
- dark: token('color.background.default', DN10)
31
+ light: "var(--ds-surface, ".concat(N0, ")"),
32
+ dark: "var(--ds-surface, ".concat(DN10, ")")
34
33
  }; // TODO Subtle hover styles not defined in Figma: https://product-fabric.atlassian.net/browse/DSP-1568
35
34
 
36
35
  export var subtleHoverBackgroundColor = {
37
- light: token('color.background.transparentNeutral.hover', N30),
38
- dark: token('color.background.transparentNeutral.hover', DN30)
36
+ light: "var(--ds-background-neutral-subtle-hovered, ".concat(N30, ")"),
37
+ dark: "var(--ds-background-neutral-subtle-hovered, ".concat(DN30, ")")
39
38
  };
40
39
  export var placeholderTextColor = {
41
- light: token('color.text.lowEmphasis', N100),
42
- dark: token('color.text.lowEmphasis', DN200)
40
+ light: "var(--ds-text-subtlest, ".concat(N100, ")"),
41
+ dark: "var(--ds-text-subtlest, ".concat(DN200, ")")
43
42
  };
44
43
  export var textColor = {
45
- light: token('color.text.highEmphasis', N900),
46
- dark: token('color.text.highEmphasis', DN600)
44
+ light: "var(--ds-text, ".concat(N900, ")"),
45
+ dark: "var(--ds-text, ".concat(DN600, ")")
47
46
  };
48
47
  export var disabledTextColor = {
49
- light: token('color.text.disabled', N70),
50
- dark: token('color.text.disabled', DN90)
48
+ light: "var(--ds-text-disabled, ".concat(N70, ")"),
49
+ dark: "var(--ds-text-disabled, ".concat(DN90, ")")
51
50
  };
52
51
  export var transparent = {
53
52
  light: 'transparent',
@@ -1,8 +1,8 @@
1
1
  import _defineProperty from "@babel/runtime/helpers/defineProperty";
2
2
 
3
- function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) { symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); } keys.push.apply(keys, symbols); } return keys; }
3
+ function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
4
4
 
5
- function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
5
+ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
6
6
 
7
7
  /** @jsx jsx */
8
8
  import { codeFontFamily as getCodeFontFamily, fontFamily as getFontFamily, fontSize as getFontSize, gridSize } from '@atlaskit/theme/constants';
@@ -2,10 +2,11 @@ import _extends from "@babel/runtime/helpers/extends";
2
2
  import _typeof from "@babel/runtime/helpers/typeof";
3
3
  import _defineProperty from "@babel/runtime/helpers/defineProperty";
4
4
  import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
5
+ var _excluded = ["resize", "appearance", "isCompact", "isRequired", "isReadOnly", "isDisabled", "isInvalid", "isMonospaced", "minimumRows", "theme", "testId", "maxHeight", "onBlur", "onFocus", "onChange", "tokens", "value"];
5
6
 
6
- function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) { symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); } keys.push.apply(keys, symbols); } return keys; }
7
+ function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
7
8
 
8
- function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
9
+ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
9
10
 
10
11
  /** @jsx jsx */
11
12
  import React, { forwardRef, memo, useCallback, useEffect, useMemo, useRef } from 'react';
@@ -15,7 +16,7 @@ import GlobalTheme from '@atlaskit/theme/components';
15
16
  import { borderWidth, getBaseStyles, themeStyles } from './styles';
16
17
  import { Theme } from './theme';
17
18
  var packageName = "@atlaskit/textarea";
18
- var packageVersion = "4.2.3";
19
+ var packageVersion = "4.3.0";
19
20
  var analyticsParams = {
20
21
  componentName: 'textArea',
21
22
  packageName: packageName,
@@ -23,6 +24,8 @@ var analyticsParams = {
23
24
  };
24
25
 
25
26
  var setSmartHeight = function setSmartHeight(el) {
27
+ // Always reset height to auto before calculating new height
28
+ el.style.height = 'auto';
26
29
  var borderHeight = borderWidth;
27
30
  var paddingBoxHeight = el.scrollHeight;
28
31
  var borderBoxHeight = paddingBoxHeight + borderHeight * 2;
@@ -58,7 +61,8 @@ var TextAreaWithTokens = /*#__PURE__*/forwardRef(function (props, ref) {
58
61
  onFocus = props.onFocus,
59
62
  onChange = props.onChange,
60
63
  tokens = props.tokens,
61
- rest = _objectWithoutProperties(props, ["resize", "appearance", "isCompact", "isRequired", "isReadOnly", "isDisabled", "isInvalid", "isMonospaced", "minimumRows", "theme", "testId", "maxHeight", "onBlur", "onFocus", "onChange", "tokens"]);
64
+ value = props.value,
65
+ rest = _objectWithoutProperties(props, _excluded);
62
66
 
63
67
  useEffect(function () {
64
68
  var el = ourRef.current;
@@ -66,7 +70,7 @@ var TextAreaWithTokens = /*#__PURE__*/forwardRef(function (props, ref) {
66
70
  if (resize === 'smart' && el) {
67
71
  setSmartHeight(el);
68
72
  }
69
- }, [resize]);
73
+ }, [resize, value]);
70
74
  var onBlurWithAnalytics = usePlatformLeafEventHandler(_objectSpread({
71
75
  fn: function fn(event) {
72
76
  onBlur && onBlur(event);
@@ -97,7 +101,6 @@ var TextAreaWithTokens = /*#__PURE__*/forwardRef(function (props, ref) {
97
101
  var el = ourRef.current;
98
102
 
99
103
  if (resize === 'smart' && el) {
100
- el.style.height = 'auto';
101
104
  setSmartHeight(el);
102
105
  }
103
106
 
@@ -120,6 +123,7 @@ var TextAreaWithTokens = /*#__PURE__*/forwardRef(function (props, ref) {
120
123
  var textAreaStyles = [baseStyles, // not memoizing themeStyles as `tokens` is an unstable reference
121
124
  themeStyles(tokens)];
122
125
  return jsx("textarea", _extends({}, controlProps, {
126
+ value: value,
123
127
  disabled: isDisabled,
124
128
  readOnly: isReadOnly,
125
129
  required: isRequired,
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "name": "@atlaskit/textarea",
3
- "version": "4.2.3",
3
+ "version": "4.3.0",
4
4
  "sideEffects": false
5
5
  }
@@ -7,40 +7,40 @@ export declare const disabledBorder: {
7
7
  dark: "var(--ds-background-disabled)";
8
8
  };
9
9
  export declare const invalidBorderColor: {
10
- light: "var(--ds-iconBorder-danger)";
11
- dark: "var(--ds-iconBorder-danger)";
10
+ light: "var(--ds-border-danger)";
11
+ dark: "var(--ds-border-danger)";
12
12
  };
13
13
  export declare const defaultBorderColor: {
14
- light: "var(--ds-border-neutral)";
15
- dark: "var(--ds-border-neutral)";
14
+ light: "var(--ds-border)";
15
+ dark: "var(--ds-border)";
16
16
  };
17
17
  export declare const defaultBorderColorFocus: {
18
- light: "var(--ds-border-focus)";
19
- dark: "var(--ds-border-focus)";
18
+ light: "var(--ds-border-focused)";
19
+ dark: "var(--ds-border-focused)";
20
20
  };
21
21
  export declare const defaultBackgroundColor: {
22
- light: "var(--ds-background-subtleNeutral-resting)";
23
- dark: "var(--ds-background-subtleNeutral-resting)";
22
+ light: "var(--ds-background-neutral)";
23
+ dark: "var(--ds-background-neutral)";
24
24
  };
25
25
  export declare const defaultBackgroundColorHover: {
26
- light: "var(--ds-background-default)";
27
- dark: "var(--ds-background-default)";
26
+ light: "var(--ds-surface)";
27
+ dark: "var(--ds-surface)";
28
28
  };
29
29
  export declare const defaultBackgroundColorFocus: {
30
- light: "var(--ds-background-default)";
31
- dark: "var(--ds-background-default)";
30
+ light: "var(--ds-surface)";
31
+ dark: "var(--ds-surface)";
32
32
  };
33
33
  export declare const subtleHoverBackgroundColor: {
34
- light: "var(--ds-background-transparentNeutral-hover)";
35
- dark: "var(--ds-background-transparentNeutral-hover)";
34
+ light: "var(--ds-background-neutral-subtle-hovered)";
35
+ dark: "var(--ds-background-neutral-subtle-hovered)";
36
36
  };
37
37
  export declare const placeholderTextColor: {
38
- light: "var(--ds-text-lowEmphasis)";
39
- dark: "var(--ds-text-lowEmphasis)";
38
+ light: "var(--ds-text-subtlest)";
39
+ dark: "var(--ds-text-subtlest)";
40
40
  };
41
41
  export declare const textColor: {
42
- light: "var(--ds-text-highEmphasis)";
43
- dark: "var(--ds-text-highEmphasis)";
42
+ light: "var(--ds-text)";
43
+ dark: "var(--ds-text)";
44
44
  };
45
45
  export declare const disabledTextColor: {
46
46
  light: "var(--ds-text-disabled)";
@@ -1,7 +1,7 @@
1
1
  /** @jsx jsx */
2
2
  import React from 'react';
3
3
  import { WithAnalyticsEventsProps } from '@atlaskit/analytics-next';
4
- export interface Props extends WithAnalyticsEventsProps {
4
+ export interface OwnProps extends WithAnalyticsEventsProps {
5
5
  /**
6
6
  * controls the appearance of the field.
7
7
  * subtle shows styling on hover.
@@ -61,5 +61,7 @@ export interface Props extends WithAnalyticsEventsProps {
61
61
  * serving as a hook for automated tests */
62
62
  testId?: string;
63
63
  }
64
- declare const TextArea: React.MemoExoticComponent<React.ForwardRefExoticComponent<Pick<Props, "appearance" | "maxHeight" | "resize" | "minimumRows" | "isMonospaced" | "isCompact" | "isDisabled" | "isReadOnly" | "isRequired" | "isInvalid" | "value" | "defaultValue" | "name" | "placeholder" | "onBlur" | "onChange" | "onFocus" | "spellCheck" | "theme" | "testId" | "createAnalyticsEvent"> & React.RefAttributes<HTMLTextAreaElement>>>;
64
+ declare type Combine<First, Second> = Omit<First, keyof Second> & Second;
65
+ export declare type Props = Combine<Omit<React.TextareaHTMLAttributes<HTMLTextAreaElement>, 'disabled' | 'required' | 'readonly'>, OwnProps>;
66
+ declare const TextArea: React.MemoExoticComponent<React.ForwardRefExoticComponent<Pick<Combine<Pick<React.TextareaHTMLAttributes<HTMLTextAreaElement>, "color" | "hidden" | "style" | "wrap" | "autoComplete" | "autoFocus" | "cols" | "dirName" | "form" | "maxLength" | "minLength" | "name" | "placeholder" | "readOnly" | "rows" | "value" | "onChange" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "className" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "id" | "lang" | "slot" | "spellCheck" | "tabIndex" | "title" | "inputMode" | "is" | "radioGroup" | "role" | "about" | "datatype" | "inlist" | "prefix" | "property" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "children" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "css">, OwnProps>, "appearance" | "color" | "maxHeight" | "resize" | "hidden" | "style" | "wrap" | "minimumRows" | "isMonospaced" | "autoComplete" | "autoFocus" | "cols" | "dirName" | "form" | "maxLength" | "minLength" | "name" | "placeholder" | "readOnly" | "rows" | "value" | "onChange" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "className" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "id" | "lang" | "slot" | "spellCheck" | "tabIndex" | "title" | "inputMode" | "is" | "radioGroup" | "role" | "about" | "datatype" | "inlist" | "prefix" | "property" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "children" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "css" | "isCompact" | "isDisabled" | "isReadOnly" | "isRequired" | "isInvalid" | "theme" | "testId" | "createAnalyticsEvent"> & React.RefAttributes<HTMLTextAreaElement>>>;
65
67
  export default TextArea;
@@ -31,8 +31,8 @@ export declare type ThemeTokens = {
31
31
  export declare const themeTokens: {
32
32
  borderColor: {
33
33
  standard: {
34
- light: "var(--ds-border-neutral)";
35
- dark: "var(--ds-border-neutral)";
34
+ light: "var(--ds-border)";
35
+ dark: "var(--ds-border)";
36
36
  };
37
37
  subtle: {
38
38
  light: string;
@@ -45,12 +45,12 @@ export declare const themeTokens: {
45
45
  };
46
46
  borderColorFocus: {
47
47
  standard: {
48
- light: "var(--ds-border-focus)";
49
- dark: "var(--ds-border-focus)";
48
+ light: "var(--ds-border-focused)";
49
+ dark: "var(--ds-border-focused)";
50
50
  };
51
51
  subtle: {
52
- light: "var(--ds-border-focus)";
53
- dark: "var(--ds-border-focus)";
52
+ light: "var(--ds-border-focused)";
53
+ dark: "var(--ds-border-focused)";
54
54
  };
55
55
  none: {
56
56
  light: string;
@@ -59,8 +59,8 @@ export declare const themeTokens: {
59
59
  };
60
60
  backgroundColor: {
61
61
  standard: {
62
- light: "var(--ds-background-subtleNeutral-resting)";
63
- dark: "var(--ds-background-subtleNeutral-resting)";
62
+ light: "var(--ds-background-neutral)";
63
+ dark: "var(--ds-background-neutral)";
64
64
  };
65
65
  subtle: {
66
66
  light: string;
@@ -73,12 +73,12 @@ export declare const themeTokens: {
73
73
  };
74
74
  backgroundColorFocus: {
75
75
  standard: {
76
- light: "var(--ds-background-default)";
77
- dark: "var(--ds-background-default)";
76
+ light: "var(--ds-surface)";
77
+ dark: "var(--ds-surface)";
78
78
  };
79
79
  subtle: {
80
- light: "var(--ds-background-default)";
81
- dark: "var(--ds-background-default)";
80
+ light: "var(--ds-surface)";
81
+ dark: "var(--ds-surface)";
82
82
  };
83
83
  none: {
84
84
  light: string;
@@ -87,12 +87,12 @@ export declare const themeTokens: {
87
87
  };
88
88
  backgroundColorHover: {
89
89
  standard: {
90
- light: "var(--ds-background-default)";
91
- dark: "var(--ds-background-default)";
90
+ light: "var(--ds-surface)";
91
+ dark: "var(--ds-surface)";
92
92
  };
93
93
  subtle: {
94
- light: "var(--ds-background-transparentNeutral-hover)";
95
- dark: "var(--ds-background-transparentNeutral-hover)";
94
+ light: "var(--ds-background-neutral-subtle-hovered)";
95
+ dark: "var(--ds-background-neutral-subtle-hovered)";
96
96
  };
97
97
  none: {
98
98
  light: string;
@@ -105,7 +105,7 @@ export declare const themeTokens: {
105
105
  backgroundColorFocus: "var(--ds-background-disabled)";
106
106
  backgroundColorHover: "var(--ds-background-disabled)";
107
107
  borderColor: "var(--ds-background-disabled)";
108
- borderColorFocus: "var(--ds-border-focus)";
108
+ borderColorFocus: "var(--ds-border-focused)";
109
109
  textColor: "var(--ds-text-disabled)";
110
110
  };
111
111
  dark: {
@@ -113,33 +113,33 @@ export declare const themeTokens: {
113
113
  backgroundColorFocus: "var(--ds-background-disabled)";
114
114
  backgroundColorHover: "var(--ds-background-disabled)";
115
115
  borderColor: "var(--ds-background-disabled)";
116
- borderColorFocus: "var(--ds-border-focus)";
116
+ borderColorFocus: "var(--ds-border-focused)";
117
117
  textColor: "var(--ds-text-disabled)";
118
118
  };
119
119
  };
120
120
  invalidRules: {
121
121
  light: {
122
- borderColor: "var(--ds-iconBorder-danger)";
123
- borderColorFocus: "var(--ds-border-focus)";
124
- backgroundColor: "var(--ds-background-subtleNeutral-resting)";
125
- backgroundColorFocus: "var(--ds-background-default)";
126
- backgroundColorHover: "var(--ds-background-default)";
122
+ borderColor: "var(--ds-border-danger)";
123
+ borderColorFocus: "var(--ds-border-focused)";
124
+ backgroundColor: "var(--ds-background-neutral)";
125
+ backgroundColorFocus: "var(--ds-surface)";
126
+ backgroundColorHover: "var(--ds-surface)";
127
127
  };
128
128
  dark: {
129
- borderColor: "var(--ds-iconBorder-danger)";
130
- borderColorFocus: "var(--ds-border-focus)";
131
- backgroundColor: "var(--ds-background-subtleNeutral-resting)";
132
- backgroundColorFocus: "var(--ds-background-default)";
133
- backgroundColorHover: "var(--ds-background-default)";
129
+ borderColor: "var(--ds-border-danger)";
130
+ borderColorFocus: "var(--ds-border-focused)";
131
+ backgroundColor: "var(--ds-background-neutral)";
132
+ backgroundColorFocus: "var(--ds-surface)";
133
+ backgroundColorHover: "var(--ds-surface)";
134
134
  };
135
135
  };
136
136
  textColor: {
137
- light: "var(--ds-text-highEmphasis)";
138
- dark: "var(--ds-text-highEmphasis)";
137
+ light: "var(--ds-text)";
138
+ dark: "var(--ds-text)";
139
139
  };
140
140
  placeholderTextColor: {
141
- light: "var(--ds-text-lowEmphasis)";
142
- dark: "var(--ds-text-lowEmphasis)";
141
+ light: "var(--ds-text-subtlest)";
142
+ dark: "var(--ds-text-subtlest)";
143
143
  };
144
144
  };
145
145
  export declare const Theme: {
@@ -0,0 +1,5 @@
1
+ import type { OwnProps as Props } from '../src/text-area';
2
+
3
+ export default function TextareaProps(props: Props) {
4
+ return null;
5
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/textarea",
3
- "version": "4.2.3",
3
+ "version": "4.3.0",
4
4
  "description": "A text area lets users enter long form text which spans over multiple lines.",
5
5
  "publishConfig": {
6
6
  "registry": "https://registry.npmjs.org/"
@@ -18,7 +18,6 @@
18
18
  "atlassian": {
19
19
  "team": "Design System Team",
20
20
  "deprecatedAutoEntryPoints": true,
21
- "inPublicMirror": true,
22
21
  "releaseModel": "scheduled",
23
22
  "website": {
24
23
  "name": "Text area"
@@ -26,8 +25,8 @@
26
25
  },
27
26
  "dependencies": {
28
27
  "@atlaskit/analytics-next": "^8.0.0",
29
- "@atlaskit/theme": "^12.0.0",
30
- "@atlaskit/tokens": "^0.3.0",
28
+ "@atlaskit/theme": "^12.1.0",
29
+ "@atlaskit/tokens": "^0.6.0",
31
30
  "@babel/runtime": "^7.0.0",
32
31
  "@emotion/core": "^10.0.9"
33
32
  },
@@ -35,10 +34,9 @@
35
34
  "react": "^16.8.0"
36
35
  },
37
36
  "devDependencies": {
38
- "@atlaskit/build-utils": "*",
39
37
  "@atlaskit/button": "^16.1.0",
40
38
  "@atlaskit/docs": "*",
41
- "@atlaskit/form": "^8.4.0",
39
+ "@atlaskit/form": "^8.5.0",
42
40
  "@atlaskit/section-message": "^6.1.0",
43
41
  "@atlaskit/ssr": "*",
44
42
  "@atlaskit/visual-regression": "*",
@@ -65,7 +63,10 @@
65
63
  "ui-components": "lite-mode",
66
64
  "analytics": "analytics-next",
67
65
  "theming": "tokens",
68
- "styling": "emotion",
66
+ "styling": [
67
+ "static",
68
+ "emotion"
69
+ ],
69
70
  "deprecation": "no-deprecated-imports"
70
71
  }
71
72
  },