@atlaskit/textarea 4.3.5 → 4.3.8

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,25 @@
1
1
  # @atlaskit/textarea
2
2
 
3
+ ## 4.3.8
4
+
5
+ ### Patch Changes
6
+
7
+ - [`e4abd2c2888`](https://bitbucket.org/atlassian/atlassian-frontend/commits/e4abd2c2888) - Update token used for background color of subtle text area on hover
8
+ - [`926f9b57c59`](https://bitbucket.org/atlassian/atlassian-frontend/commits/926f9b57c59) - Internal code change turning on new linting rules.
9
+ - [`fe575d49d66`](https://bitbucket.org/atlassian/atlassian-frontend/commits/fe575d49d66) - Updated styles to use new input design tokens
10
+
11
+ ## 4.3.7
12
+
13
+ ### Patch Changes
14
+
15
+ - [`45ebe7af434`](https://bitbucket.org/atlassian/atlassian-frontend/commits/45ebe7af434) - Moved to using declarative entrypoints internally. Public API is unchanged.
16
+
17
+ ## 4.3.6
18
+
19
+ ### Patch Changes
20
+
21
+ - [`f63824e8227`](https://bitbucket.org/atlassian/atlassian-frontend/commits/f63824e8227) - [ux] Updated input tokens within `@atlaskit/textarea`.
22
+
3
23
  ## 4.3.5
4
24
 
5
25
  ### Patch Changes
@@ -1,4 +1,4 @@
1
- import { renameForwardedRefToRef } from './migrates/rename-forwardedRef-to-ref';
1
+ import { renameForwardedRefToRef } from './migrates/rename-forwarded-ref-to-ref';
2
2
  import { createTransformer } from './utils';
3
3
 
4
4
  const transformer = createTransformer('@atlaskit/textarea', [
@@ -1,6 +1,6 @@
1
1
  jest.autoMockOff();
2
2
 
3
- import { renameForwardedRefToRef } from '../migrates/rename-forwardedRef-to-ref';
3
+ import { renameForwardedRefToRef } from '../migrates/rename-forwarded-ref-to-ref';
4
4
  import { createTransformer } from '../utils';
5
5
 
6
6
  const transformer = createTransformer('@atlaskit/textarea', [
File without changes
@@ -13,8 +13,8 @@ var disabledBackground = {
13
13
  };
14
14
  exports.disabledBackground = disabledBackground;
15
15
  var disabledBorder = {
16
- light: "var(--ds-background-disabled, ".concat(_colors.N40, ")"),
17
- dark: "var(--ds-background-disabled, ".concat(_colors.DN40, ")")
16
+ light: "var(--ds-border-disabled, ".concat(_colors.N40, ")"),
17
+ dark: "var(--ds-border-disabled, ".concat(_colors.DN40, ")")
18
18
  };
19
19
  exports.disabledBorder = disabledBorder;
20
20
  var invalidBorderColor = {
@@ -23,8 +23,8 @@ var invalidBorderColor = {
23
23
  };
24
24
  exports.invalidBorderColor = invalidBorderColor;
25
25
  var defaultBorderColor = {
26
- light: "var(--ds-border, ".concat(_colors.N40, ")"),
27
- dark: "var(--ds-border, ".concat(_colors.DN40, ")")
26
+ light: "var(--ds-border-input, ".concat(_colors.N40, ")"),
27
+ dark: "var(--ds-border-input, ".concat(_colors.DN40, ")")
28
28
  };
29
29
  exports.defaultBorderColor = defaultBorderColor;
30
30
  var defaultBorderColorFocus = {
@@ -33,24 +33,23 @@ var defaultBorderColorFocus = {
33
33
  };
34
34
  exports.defaultBorderColorFocus = defaultBorderColorFocus;
35
35
  var defaultBackgroundColor = {
36
- light: "var(--ds-background-neutral, ".concat(_colors.N10, ")"),
37
- dark: "var(--ds-background-neutral, ".concat(_colors.DN10, ")")
36
+ light: "var(--ds-background-input, ".concat(_colors.N10, ")"),
37
+ dark: "var(--ds-background-input, ".concat(_colors.DN10, ")")
38
38
  };
39
39
  exports.defaultBackgroundColor = defaultBackgroundColor;
40
40
  var defaultBackgroundColorHover = {
41
- light: "var(--ds-surface, ".concat(_colors.N30, ")"),
42
- dark: "var(--ds-surface, ".concat(_colors.DN30, ")")
41
+ light: "var(--ds-background-input-hovered, ".concat(_colors.N30, ")"),
42
+ dark: "var(--ds-background-input-hovered, ".concat(_colors.DN30, ")")
43
43
  };
44
44
  exports.defaultBackgroundColorHover = defaultBackgroundColorHover;
45
45
  var defaultBackgroundColorFocus = {
46
- light: "var(--ds-surface, ".concat(_colors.N0, ")"),
47
- dark: "var(--ds-surface, ".concat(_colors.DN10, ")")
48
- }; // TODO Subtle hover styles not defined in Figma: https://product-fabric.atlassian.net/browse/DSP-1568
49
-
46
+ light: "var(--ds-background-input-pressed, ".concat(_colors.N0, ")"),
47
+ dark: "var(--ds-background-input-pressed, ".concat(_colors.DN10, ")")
48
+ };
50
49
  exports.defaultBackgroundColorFocus = defaultBackgroundColorFocus;
51
50
  var subtleHoverBackgroundColor = {
52
- light: "var(--ds-background-neutral-subtle-hovered, ".concat(_colors.N30, ")"),
53
- dark: "var(--ds-background-neutral-subtle-hovered, ".concat(_colors.DN30, ")")
51
+ light: "var(--ds-background-input-hovered, ".concat(_colors.N30, ")"),
52
+ dark: "var(--ds-background-input-hovered, ".concat(_colors.DN30, ")")
54
53
  };
55
54
  exports.subtleHoverBackgroundColor = subtleHoverBackgroundColor;
56
55
  var placeholderTextColor = {
@@ -40,7 +40,7 @@ function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (O
40
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; }
41
41
 
42
42
  var packageName = "@atlaskit/textarea";
43
- var packageVersion = "4.3.5";
43
+ var packageVersion = "4.3.8";
44
44
  var analyticsParams = {
45
45
  componentName: 'textArea',
46
46
  packageName: packageName,
@@ -158,6 +158,16 @@ var TextAreaWithTokens = /*#__PURE__*/(0, _react.forwardRef)(function (props, re
158
158
  css: textAreaStyles
159
159
  }, rest));
160
160
  });
161
+ /**
162
+ * __Text area__
163
+ *
164
+ * A text area lets users enter long form text which spans over multiple lines.
165
+ *
166
+ * - [Examples](https://atlassian.design/components/textarea/examples)
167
+ * - [Code](https://atlassian.design/components/textarea/code)
168
+ * - [Usage](https://atlassian.design/components/textarea/usage)
169
+ */
170
+
161
171
  var TextArea = /*#__PURE__*/(0, _react.memo)( /*#__PURE__*/(0, _react.forwardRef)(function TextArea(props, ref) {
162
172
  return (0, _core.jsx)(_components.default.Consumer, null, function (_ref) {
163
173
  var mode = _ref.mode;
package/dist/cjs/theme.js CHANGED
@@ -74,6 +74,12 @@ var borderColorFocus = {
74
74
  subtle: componentTokens.defaultBorderColorFocus,
75
75
  none: componentTokens.transparent
76
76
  };
77
+
78
+ /**
79
+ * @deprecated
80
+ * Component-level theming is deprecated in the design system.
81
+ * Components should respect the global theme.
82
+ */
77
83
  var themeTokens = {
78
84
  borderColor: borderColor,
79
85
  borderColorFocus: borderColorFocus,
@@ -85,6 +91,12 @@ var themeTokens = {
85
91
  textColor: componentTokens.textColor,
86
92
  placeholderTextColor: componentTokens.placeholderTextColor
87
93
  };
94
+ /**
95
+ * @deprecated
96
+ * Component-level theming is deprecated in the design system.
97
+ * Components should respect the global theme.
98
+ */
99
+
88
100
  exports.themeTokens = themeTokens;
89
101
  var Theme = (0, _components.createTheme)(function (_ref) {
90
102
  var appearance = _ref.appearance,
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "name": "@atlaskit/textarea",
3
- "version": "4.3.5",
3
+ "version": "4.3.8",
4
4
  "sideEffects": false
5
5
  }
@@ -4,37 +4,36 @@ export const disabledBackground = {
4
4
  dark: `var(--ds-background-disabled, ${DN20})`
5
5
  };
6
6
  export const disabledBorder = {
7
- light: `var(--ds-background-disabled, ${N40})`,
8
- dark: `var(--ds-background-disabled, ${DN40})`
7
+ light: `var(--ds-border-disabled, ${N40})`,
8
+ dark: `var(--ds-border-disabled, ${DN40})`
9
9
  };
10
10
  export const invalidBorderColor = {
11
11
  light: `var(--ds-border-danger, ${R400})`,
12
12
  dark: `var(--ds-border-danger, ${R400})`
13
13
  };
14
14
  export const defaultBorderColor = {
15
- light: `var(--ds-border, ${N40})`,
16
- dark: `var(--ds-border, ${DN40})`
15
+ light: `var(--ds-border-input, ${N40})`,
16
+ dark: `var(--ds-border-input, ${DN40})`
17
17
  };
18
18
  export const defaultBorderColorFocus = {
19
19
  light: `var(--ds-border-focused, ${B100})`,
20
20
  dark: `var(--ds-border-focused, ${B75})`
21
21
  };
22
22
  export const defaultBackgroundColor = {
23
- light: `var(--ds-background-neutral, ${N10})`,
24
- dark: `var(--ds-background-neutral, ${DN10})`
23
+ light: `var(--ds-background-input, ${N10})`,
24
+ dark: `var(--ds-background-input, ${DN10})`
25
25
  };
26
26
  export const defaultBackgroundColorHover = {
27
- light: `var(--ds-surface, ${N30})`,
28
- dark: `var(--ds-surface, ${DN30})`
27
+ light: `var(--ds-background-input-hovered, ${N30})`,
28
+ dark: `var(--ds-background-input-hovered, ${DN30})`
29
29
  };
30
30
  export const defaultBackgroundColorFocus = {
31
- light: `var(--ds-surface, ${N0})`,
32
- dark: `var(--ds-surface, ${DN10})`
33
- }; // TODO Subtle hover styles not defined in Figma: https://product-fabric.atlassian.net/browse/DSP-1568
34
-
31
+ light: `var(--ds-background-input-pressed, ${N0})`,
32
+ dark: `var(--ds-background-input-pressed, ${DN10})`
33
+ };
35
34
  export const subtleHoverBackgroundColor = {
36
- light: `var(--ds-background-neutral-subtle-hovered, ${N30})`,
37
- dark: `var(--ds-background-neutral-subtle-hovered, ${DN30})`
35
+ light: `var(--ds-background-input-hovered, ${N30})`,
36
+ dark: `var(--ds-background-input-hovered, ${DN30})`
38
37
  };
39
38
  export const placeholderTextColor = {
40
39
  light: `var(--ds-text-subtlest, ${N100})`,
@@ -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.3.5";
11
+ const packageVersion = "4.3.8";
12
12
  const analyticsParams = {
13
13
  componentName: 'textArea',
14
14
  packageName,
@@ -118,6 +118,16 @@ const TextAreaWithTokens = /*#__PURE__*/forwardRef((props, ref) => {
118
118
  css: textAreaStyles
119
119
  }, rest));
120
120
  });
121
+ /**
122
+ * __Text area__
123
+ *
124
+ * A text area lets users enter long form text which spans over multiple lines.
125
+ *
126
+ * - [Examples](https://atlassian.design/components/textarea/examples)
127
+ * - [Code](https://atlassian.design/components/textarea/code)
128
+ * - [Usage](https://atlassian.design/components/textarea/usage)
129
+ */
130
+
121
131
  const TextArea = /*#__PURE__*/memo( /*#__PURE__*/forwardRef(function TextArea(props, ref) {
122
132
  return jsx(GlobalTheme.Consumer, null, ({
123
133
  mode
@@ -59,6 +59,12 @@ const borderColorFocus = {
59
59
  subtle: componentTokens.defaultBorderColorFocus,
60
60
  none: componentTokens.transparent
61
61
  };
62
+
63
+ /**
64
+ * @deprecated
65
+ * Component-level theming is deprecated in the design system.
66
+ * Components should respect the global theme.
67
+ */
62
68
  export const themeTokens = {
63
69
  borderColor,
64
70
  borderColorFocus,
@@ -70,6 +76,12 @@ export const themeTokens = {
70
76
  textColor: componentTokens.textColor,
71
77
  placeholderTextColor: componentTokens.placeholderTextColor
72
78
  };
79
+ /**
80
+ * @deprecated
81
+ * Component-level theming is deprecated in the design system.
82
+ * Components should respect the global theme.
83
+ */
84
+
73
85
  export const Theme = createTheme(({
74
86
  appearance,
75
87
  mode
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "name": "@atlaskit/textarea",
3
- "version": "4.3.5",
3
+ "version": "4.3.8",
4
4
  "sideEffects": false
5
5
  }
@@ -4,37 +4,36 @@ export var disabledBackground = {
4
4
  dark: "var(--ds-background-disabled, ".concat(DN20, ")")
5
5
  };
6
6
  export var disabledBorder = {
7
- light: "var(--ds-background-disabled, ".concat(N40, ")"),
8
- dark: "var(--ds-background-disabled, ".concat(DN40, ")")
7
+ light: "var(--ds-border-disabled, ".concat(N40, ")"),
8
+ dark: "var(--ds-border-disabled, ".concat(DN40, ")")
9
9
  };
10
10
  export var invalidBorderColor = {
11
11
  light: "var(--ds-border-danger, ".concat(R400, ")"),
12
12
  dark: "var(--ds-border-danger, ".concat(R400, ")")
13
13
  };
14
14
  export var defaultBorderColor = {
15
- light: "var(--ds-border, ".concat(N40, ")"),
16
- dark: "var(--ds-border, ".concat(DN40, ")")
15
+ light: "var(--ds-border-input, ".concat(N40, ")"),
16
+ dark: "var(--ds-border-input, ".concat(DN40, ")")
17
17
  };
18
18
  export var defaultBorderColorFocus = {
19
19
  light: "var(--ds-border-focused, ".concat(B100, ")"),
20
20
  dark: "var(--ds-border-focused, ".concat(B75, ")")
21
21
  };
22
22
  export var defaultBackgroundColor = {
23
- light: "var(--ds-background-neutral, ".concat(N10, ")"),
24
- dark: "var(--ds-background-neutral, ".concat(DN10, ")")
23
+ light: "var(--ds-background-input, ".concat(N10, ")"),
24
+ dark: "var(--ds-background-input, ".concat(DN10, ")")
25
25
  };
26
26
  export var defaultBackgroundColorHover = {
27
- light: "var(--ds-surface, ".concat(N30, ")"),
28
- dark: "var(--ds-surface, ".concat(DN30, ")")
27
+ light: "var(--ds-background-input-hovered, ".concat(N30, ")"),
28
+ dark: "var(--ds-background-input-hovered, ".concat(DN30, ")")
29
29
  };
30
30
  export var defaultBackgroundColorFocus = {
31
- light: "var(--ds-surface, ".concat(N0, ")"),
32
- dark: "var(--ds-surface, ".concat(DN10, ")")
33
- }; // TODO Subtle hover styles not defined in Figma: https://product-fabric.atlassian.net/browse/DSP-1568
34
-
31
+ light: "var(--ds-background-input-pressed, ".concat(N0, ")"),
32
+ dark: "var(--ds-background-input-pressed, ".concat(DN10, ")")
33
+ };
35
34
  export var subtleHoverBackgroundColor = {
36
- light: "var(--ds-background-neutral-subtle-hovered, ".concat(N30, ")"),
37
- dark: "var(--ds-background-neutral-subtle-hovered, ".concat(DN30, ")")
35
+ light: "var(--ds-background-input-hovered, ".concat(N30, ")"),
36
+ dark: "var(--ds-background-input-hovered, ".concat(DN30, ")")
38
37
  };
39
38
  export var placeholderTextColor = {
40
39
  light: "var(--ds-text-subtlest, ".concat(N100, ")"),
@@ -16,7 +16,7 @@ import GlobalTheme from '@atlaskit/theme/components';
16
16
  import { borderWidth, getBaseStyles, themeStyles } from './styles';
17
17
  import { Theme } from './theme';
18
18
  var packageName = "@atlaskit/textarea";
19
- var packageVersion = "4.3.5";
19
+ var packageVersion = "4.3.8";
20
20
  var analyticsParams = {
21
21
  componentName: 'textArea',
22
22
  packageName: packageName,
@@ -136,6 +136,16 @@ var TextAreaWithTokens = /*#__PURE__*/forwardRef(function (props, ref) {
136
136
  css: textAreaStyles
137
137
  }, rest));
138
138
  });
139
+ /**
140
+ * __Text area__
141
+ *
142
+ * A text area lets users enter long form text which spans over multiple lines.
143
+ *
144
+ * - [Examples](https://atlassian.design/components/textarea/examples)
145
+ * - [Code](https://atlassian.design/components/textarea/code)
146
+ * - [Usage](https://atlassian.design/components/textarea/usage)
147
+ */
148
+
139
149
  var TextArea = /*#__PURE__*/memo( /*#__PURE__*/forwardRef(function TextArea(props, ref) {
140
150
  return jsx(GlobalTheme.Consumer, null, function (_ref) {
141
151
  var mode = _ref.mode;
package/dist/esm/theme.js CHANGED
@@ -59,6 +59,12 @@ var borderColorFocus = {
59
59
  subtle: componentTokens.defaultBorderColorFocus,
60
60
  none: componentTokens.transparent
61
61
  };
62
+
63
+ /**
64
+ * @deprecated
65
+ * Component-level theming is deprecated in the design system.
66
+ * Components should respect the global theme.
67
+ */
62
68
  export var themeTokens = {
63
69
  borderColor: borderColor,
64
70
  borderColorFocus: borderColorFocus,
@@ -70,6 +76,12 @@ export var themeTokens = {
70
76
  textColor: componentTokens.textColor,
71
77
  placeholderTextColor: componentTokens.placeholderTextColor
72
78
  };
79
+ /**
80
+ * @deprecated
81
+ * Component-level theming is deprecated in the design system.
82
+ * Components should respect the global theme.
83
+ */
84
+
73
85
  export var Theme = createTheme(function (_ref) {
74
86
  var appearance = _ref.appearance,
75
87
  mode = _ref.mode;
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "name": "@atlaskit/textarea",
3
- "version": "4.3.5",
3
+ "version": "4.3.8",
4
4
  "sideEffects": false
5
5
  }
@@ -3,36 +3,36 @@ export declare const disabledBackground: {
3
3
  dark: "var(--ds-background-disabled)";
4
4
  };
5
5
  export declare const disabledBorder: {
6
- light: "var(--ds-background-disabled)";
7
- dark: "var(--ds-background-disabled)";
6
+ light: "var(--ds-border-disabled)";
7
+ dark: "var(--ds-border-disabled)";
8
8
  };
9
9
  export declare const invalidBorderColor: {
10
10
  light: "var(--ds-border-danger)";
11
11
  dark: "var(--ds-border-danger)";
12
12
  };
13
13
  export declare const defaultBorderColor: {
14
- light: "var(--ds-border)";
15
- dark: "var(--ds-border)";
14
+ light: "var(--ds-border-input)";
15
+ dark: "var(--ds-border-input)";
16
16
  };
17
17
  export declare const defaultBorderColorFocus: {
18
18
  light: "var(--ds-border-focused)";
19
19
  dark: "var(--ds-border-focused)";
20
20
  };
21
21
  export declare const defaultBackgroundColor: {
22
- light: "var(--ds-background-neutral)";
23
- dark: "var(--ds-background-neutral)";
22
+ light: "var(--ds-background-input)";
23
+ dark: "var(--ds-background-input)";
24
24
  };
25
25
  export declare const defaultBackgroundColorHover: {
26
- light: "var(--ds-surface)";
27
- dark: "var(--ds-surface)";
26
+ light: "var(--ds-background-input-hovered)";
27
+ dark: "var(--ds-background-input-hovered)";
28
28
  };
29
29
  export declare const defaultBackgroundColorFocus: {
30
- light: "var(--ds-surface)";
31
- dark: "var(--ds-surface)";
30
+ light: "var(--ds-background-input-pressed)";
31
+ dark: "var(--ds-background-input-pressed)";
32
32
  };
33
33
  export declare const subtleHoverBackgroundColor: {
34
- light: "var(--ds-background-neutral-subtle-hovered)";
35
- dark: "var(--ds-background-neutral-subtle-hovered)";
34
+ light: "var(--ds-background-input-hovered)";
35
+ dark: "var(--ds-background-input-hovered)";
36
36
  };
37
37
  export declare const placeholderTextColor: {
38
38
  light: "var(--ds-text-subtlest)";
@@ -8,35 +8,65 @@ export interface OwnProps extends WithAnalyticsEventsProps {
8
8
  * none prevents all field styling.
9
9
  */
10
10
  appearance?: 'standard' | 'subtle' | 'none';
11
- /** Set whether the fields should expand to fill available horizontal space. */
11
+ /**
12
+ * Set whether the fields should expand to fill available horizontal space.
13
+ */
12
14
  isCompact?: boolean;
13
- /** Sets the field as uneditable, with a changed hover state. */
15
+ /**
16
+ * Sets the field as uneditable, with a changed hover state.
17
+ */
14
18
  isDisabled?: boolean;
15
- /** If true, prevents the value of the input from being edited. */
19
+ /**
20
+ * If true, prevents the value of the input from being edited.
21
+ */
16
22
  isReadOnly?: boolean;
17
- /** Set required for form that the field is part of. */
23
+ /**
24
+ * Set required for form that the field is part of.
25
+ */
18
26
  isRequired?: boolean;
19
- /** Sets styling to indicate that the input is invalid. */
27
+ /**
28
+ * Sets styling to indicate that the input is invalid.
29
+ */
20
30
  isInvalid?: boolean;
21
- /** The minimum number of rows of text to display */
31
+ /**
32
+ * The minimum number of rows of text to display
33
+ */
22
34
  minimumRows?: number;
23
- /** The maxheight of the textarea */
35
+ /**
36
+ * The maxheight of the textarea
37
+ */
24
38
  maxHeight?: string;
25
- /** The value of the text-area. */
39
+ /**
40
+ * The value of the text-area.
41
+ */
26
42
  value?: string;
27
- /** The default value of the textarea */
43
+ /**
44
+ * The default value of the textarea
45
+ */
28
46
  defaultValue?: string;
29
- /** Name of the input form control */
47
+ /**
48
+ * Name of the input form control
49
+ */
30
50
  name?: string;
31
- /** The placeholder within the textarea */
51
+ /**
52
+ * The placeholder within the textarea
53
+ */
32
54
  placeholder?: string;
33
- /** Handler to be called when the input is blurred */
55
+ /**
56
+ * Handler to be called when the input is blurred
57
+ */
34
58
  onBlur?: React.FocusEventHandler<HTMLTextAreaElement>;
35
- /** Handler to be called when the input changes. */
59
+ /**
60
+ * Handler to be called when the input changes.
61
+ */
36
62
  onChange?: React.ChangeEventHandler<HTMLTextAreaElement>;
37
- /** Handler to be called when the input is focused */
63
+ /**
64
+ * Handler to be called when the input is focused
65
+ */
38
66
  onFocus?: React.FocusEventHandler<HTMLTextAreaElement>;
39
- /** Sets content text value to monospace */
67
+ /**
68
+ * Sets content text value to monospace
69
+ */
40
70
  isMonospaced?: boolean;
41
71
  /**
42
72
  * Enables the resizing of the textarea:
@@ -58,10 +88,20 @@ export interface OwnProps extends WithAnalyticsEventsProps {
58
88
  /**
59
89
  * A `testId` prop is provided for specified elements, which is a unique
60
90
  * string that appears as a data attribute `data-testid` in the rendered code,
61
- * serving as a hook for automated tests */
91
+ * serving as a hook for automated tests
92
+ */
62
93
  testId?: string;
63
94
  }
64
95
  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<Props, "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>>>;
96
+ export declare type TextAreaProps = Combine<Omit<React.TextareaHTMLAttributes<HTMLTextAreaElement>, 'disabled' | 'required' | 'readonly'>, OwnProps>;
97
+ /**
98
+ * __Text area__
99
+ *
100
+ * A text area lets users enter long form text which spans over multiple lines.
101
+ *
102
+ * - [Examples](https://atlassian.design/components/textarea/examples)
103
+ * - [Code](https://atlassian.design/components/textarea/code)
104
+ * - [Usage](https://atlassian.design/components/textarea/usage)
105
+ */
106
+ declare const TextArea: React.MemoExoticComponent<React.ForwardRefExoticComponent<Pick<TextAreaProps, "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>>>;
67
107
  export default TextArea;
@@ -2,8 +2,17 @@
2
2
  export declare type ThemeAppearance = 'standard' | 'subtle' | 'none';
3
3
  export declare type ThemeProps = {
4
4
  appearance: ThemeAppearance;
5
+ /**
6
+ * @deprecated
7
+ * Mode is deprecated and will be deleted in the future.
8
+ */
5
9
  mode: 'dark' | 'light';
6
10
  };
11
+ /**
12
+ * @deprecated
13
+ * Component-level theming is deprecated in the design system.
14
+ * Components should respect the global theme.
15
+ */
7
16
  export declare type ThemeTokens = {
8
17
  borderColor: string;
9
18
  borderColorFocus: string;
@@ -28,11 +37,16 @@ export declare type ThemeTokens = {
28
37
  textColor: string;
29
38
  placeholderTextColor: string;
30
39
  };
40
+ /**
41
+ * @deprecated
42
+ * Component-level theming is deprecated in the design system.
43
+ * Components should respect the global theme.
44
+ */
31
45
  export declare const themeTokens: {
32
46
  borderColor: {
33
47
  standard: {
34
- light: "var(--ds-border)";
35
- dark: "var(--ds-border)";
48
+ light: "var(--ds-border-input)";
49
+ dark: "var(--ds-border-input)";
36
50
  };
37
51
  subtle: {
38
52
  light: string;
@@ -59,8 +73,8 @@ export declare const themeTokens: {
59
73
  };
60
74
  backgroundColor: {
61
75
  standard: {
62
- light: "var(--ds-background-neutral)";
63
- dark: "var(--ds-background-neutral)";
76
+ light: "var(--ds-background-input)";
77
+ dark: "var(--ds-background-input)";
64
78
  };
65
79
  subtle: {
66
80
  light: string;
@@ -73,12 +87,12 @@ export declare const themeTokens: {
73
87
  };
74
88
  backgroundColorFocus: {
75
89
  standard: {
76
- light: "var(--ds-surface)";
77
- dark: "var(--ds-surface)";
90
+ light: "var(--ds-background-input-pressed)";
91
+ dark: "var(--ds-background-input-pressed)";
78
92
  };
79
93
  subtle: {
80
- light: "var(--ds-surface)";
81
- dark: "var(--ds-surface)";
94
+ light: "var(--ds-background-input-pressed)";
95
+ dark: "var(--ds-background-input-pressed)";
82
96
  };
83
97
  none: {
84
98
  light: string;
@@ -87,12 +101,12 @@ export declare const themeTokens: {
87
101
  };
88
102
  backgroundColorHover: {
89
103
  standard: {
90
- light: "var(--ds-surface)";
91
- dark: "var(--ds-surface)";
104
+ light: "var(--ds-background-input-hovered)";
105
+ dark: "var(--ds-background-input-hovered)";
92
106
  };
93
107
  subtle: {
94
- light: "var(--ds-background-neutral-subtle-hovered)";
95
- dark: "var(--ds-background-neutral-subtle-hovered)";
108
+ light: "var(--ds-background-input-hovered)";
109
+ dark: "var(--ds-background-input-hovered)";
96
110
  };
97
111
  none: {
98
112
  light: string;
@@ -104,7 +118,7 @@ export declare const themeTokens: {
104
118
  backgroundColor: "var(--ds-background-disabled)";
105
119
  backgroundColorFocus: "var(--ds-background-disabled)";
106
120
  backgroundColorHover: "var(--ds-background-disabled)";
107
- borderColor: "var(--ds-background-disabled)";
121
+ borderColor: "var(--ds-border-disabled)";
108
122
  borderColorFocus: "var(--ds-border-focused)";
109
123
  textColor: "var(--ds-text-disabled)";
110
124
  };
@@ -112,7 +126,7 @@ export declare const themeTokens: {
112
126
  backgroundColor: "var(--ds-background-disabled)";
113
127
  backgroundColorFocus: "var(--ds-background-disabled)";
114
128
  backgroundColorHover: "var(--ds-background-disabled)";
115
- borderColor: "var(--ds-background-disabled)";
129
+ borderColor: "var(--ds-border-disabled)";
116
130
  borderColorFocus: "var(--ds-border-focused)";
117
131
  textColor: "var(--ds-text-disabled)";
118
132
  };
@@ -121,16 +135,16 @@ export declare const themeTokens: {
121
135
  light: {
122
136
  borderColor: "var(--ds-border-danger)";
123
137
  borderColorFocus: "var(--ds-border-focused)";
124
- backgroundColor: "var(--ds-background-neutral)";
125
- backgroundColorFocus: "var(--ds-surface)";
126
- backgroundColorHover: "var(--ds-surface)";
138
+ backgroundColor: "var(--ds-background-input)";
139
+ backgroundColorFocus: "var(--ds-background-input-pressed)";
140
+ backgroundColorHover: "var(--ds-background-input-hovered)";
127
141
  };
128
142
  dark: {
129
143
  borderColor: "var(--ds-border-danger)";
130
144
  borderColorFocus: "var(--ds-border-focused)";
131
- backgroundColor: "var(--ds-background-neutral)";
132
- backgroundColorFocus: "var(--ds-surface)";
133
- backgroundColorHover: "var(--ds-surface)";
145
+ backgroundColor: "var(--ds-background-input)";
146
+ backgroundColorFocus: "var(--ds-background-input-pressed)";
147
+ backgroundColorHover: "var(--ds-background-input-hovered)";
134
148
  };
135
149
  };
136
150
  textColor: {
@@ -142,6 +156,11 @@ export declare const themeTokens: {
142
156
  dark: "var(--ds-text-subtlest)";
143
157
  };
144
158
  };
159
+ /**
160
+ * @deprecated
161
+ * Component-level theming is deprecated in the design system.
162
+ * Components should respect the global theme.
163
+ */
145
164
  export declare const Theme: {
146
165
  Consumer: import("react").ComponentType<{
147
166
  children: (tokens: ThemeTokens) => import("react").ReactNode;
package/package.json CHANGED
@@ -1,11 +1,11 @@
1
1
  {
2
2
  "name": "@atlaskit/textarea",
3
- "version": "4.3.5",
3
+ "version": "4.3.8",
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/"
7
7
  },
8
- "repository": "https://bitbucket.org/atlassian/atlassian-frontend",
8
+ "repository": "https://bitbucket.org/atlassian/atlassian-frontend-mirror",
9
9
  "author": "Atlassian Pty Ltd",
10
10
  "license": "Apache-2.0",
11
11
  "main": "dist/cjs/index.js",
@@ -13,16 +13,23 @@
13
13
  "module:es2019": "dist/es2019/index.js",
14
14
  "types": "dist/types/index.d.ts",
15
15
  "sideEffects": false,
16
- "atlaskit:src": "src/index.ts",
16
+ "atlaskit:src": "src/index.tsx",
17
17
  "homepage": "https://atlassian.design/components/textarea/",
18
18
  "atlassian": {
19
19
  "team": "Design System Team",
20
- "deprecatedAutoEntryPoints": true,
21
20
  "releaseModel": "scheduled",
22
21
  "website": {
23
- "name": "Text area"
22
+ "name": "Text area",
23
+ "category": "Components"
24
24
  }
25
25
  },
26
+ "af:exports": {
27
+ ".": "./src/index.tsx",
28
+ "./component-tokens": "./src/component-tokens.tsx",
29
+ "./styles": "./src/styles.tsx",
30
+ "./text-area": "./src/text-area.tsx",
31
+ "./theme": "./src/theme.tsx"
32
+ },
26
33
  "dependencies": {
27
34
  "@atlaskit/analytics-next": "^8.0.0",
28
35
  "@atlaskit/theme": "^12.1.0",
@@ -36,6 +43,7 @@
36
43
  "devDependencies": {
37
44
  "@atlaskit/button": "^16.3.0",
38
45
  "@atlaskit/docs": "*",
46
+ "@atlaskit/ds-lib": "^2.1.0",
39
47
  "@atlaskit/form": "^8.5.0",
40
48
  "@atlaskit/section-message": "^6.1.0",
41
49
  "@atlaskit/ssr": "*",
@@ -60,6 +68,8 @@
60
68
  "import-structure": "atlassian-conventions"
61
69
  },
62
70
  "@repo/internal": {
71
+ "design-system": "v1",
72
+ "dom-events": "use-bind-event-listener",
63
73
  "ui-components": "lite-mode",
64
74
  "analytics": "analytics-next",
65
75
  "theming": "tokens",
package/report.api.md ADDED
@@ -0,0 +1,533 @@
1
+ ## API Report File for "@atlaskit/textarea"
2
+
3
+ > Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/).
4
+
5
+ ```ts
6
+ /// <reference types="react" />
7
+
8
+ import { ComponentType } from 'react';
9
+ import { default as React_2 } from 'react';
10
+ import { ReactNode } from 'react';
11
+ import { ThemeProp } from '@atlaskit/theme/components';
12
+ import { WithAnalyticsEventsProps } from '@atlaskit/analytics-next';
13
+
14
+ declare type Combine<First, Second> = Omit<First, keyof Second> & Second;
15
+
16
+ declare interface OwnProps extends WithAnalyticsEventsProps {
17
+ /**
18
+ * controls the appearance of the field.
19
+ * subtle shows styling on hover.
20
+ * none prevents all field styling.
21
+ */
22
+ appearance?: 'standard' | 'subtle' | 'none';
23
+ /** Set whether the fields should expand to fill available horizontal space. */
24
+ isCompact?: boolean;
25
+ /** Sets the field as uneditable, with a changed hover state. */
26
+ isDisabled?: boolean;
27
+ /** If true, prevents the value of the input from being edited. */
28
+ isReadOnly?: boolean;
29
+ /** Set required for form that the field is part of. */
30
+ isRequired?: boolean;
31
+ /** Sets styling to indicate that the input is invalid. */
32
+ isInvalid?: boolean;
33
+ /** The minimum number of rows of text to display */
34
+ minimumRows?: number;
35
+ /** The maxheight of the textarea */
36
+ maxHeight?: string;
37
+ /** The value of the text-area. */
38
+ value?: string;
39
+ /** The default value of the textarea */
40
+ defaultValue?: string;
41
+ /** Name of the input form control */
42
+ name?: string;
43
+ /** The placeholder within the textarea */
44
+ placeholder?: string;
45
+ /** Handler to be called when the input is blurred */
46
+ onBlur?: React_2.FocusEventHandler<HTMLTextAreaElement>;
47
+ /** Handler to be called when the input changes. */
48
+ onChange?: React_2.ChangeEventHandler<HTMLTextAreaElement>;
49
+ /** Handler to be called when the input is focused */
50
+ onFocus?: React_2.FocusEventHandler<HTMLTextAreaElement>;
51
+ /** Sets content text value to monospace */
52
+ isMonospaced?: boolean;
53
+ /**
54
+ * Enables the resizing of the textarea:
55
+ * auto: both directions.
56
+ * horizontal: only along the x axis.
57
+ * vertical: only along the y axis.
58
+ * smart (default): vertically grows and shrinks the textarea automatically to wrap your input text.
59
+ * none: explicitly disallow resizing on the textarea.
60
+ */
61
+ resize?: 'auto' | 'vertical' | 'horizontal' | 'smart' | 'none';
62
+ /**
63
+ * Enables native spell check on the `textarea` element.
64
+ */
65
+ spellCheck?: boolean;
66
+ /**
67
+ * The theme function TextArea consumes to derive theming constants for use in styling its components
68
+ */
69
+ theme?: any;
70
+ /**
71
+ * A `testId` prop is provided for specified elements, which is a unique
72
+ * string that appears as a data attribute `data-testid` in the rendered code,
73
+ * serving as a hook for automated tests */
74
+ testId?: string;
75
+ }
76
+
77
+ declare type Props = Combine<
78
+ Omit<
79
+ React_2.TextareaHTMLAttributes<HTMLTextAreaElement>,
80
+ 'disabled' | 'required' | 'readonly'
81
+ >,
82
+ OwnProps
83
+ >;
84
+
85
+ declare const TextArea: React_2.MemoExoticComponent<React_2.ForwardRefExoticComponent<
86
+ Pick<
87
+ Props,
88
+ | 'appearance'
89
+ | 'color'
90
+ | 'maxHeight'
91
+ | 'resize'
92
+ | 'hidden'
93
+ | 'style'
94
+ | 'wrap'
95
+ | 'minimumRows'
96
+ | 'isMonospaced'
97
+ | 'autoComplete'
98
+ | 'autoFocus'
99
+ | 'cols'
100
+ | 'dirName'
101
+ | 'form'
102
+ | 'maxLength'
103
+ | 'minLength'
104
+ | 'name'
105
+ | 'placeholder'
106
+ | 'readOnly'
107
+ | 'rows'
108
+ | 'value'
109
+ | 'onChange'
110
+ | 'defaultChecked'
111
+ | 'defaultValue'
112
+ | 'suppressContentEditableWarning'
113
+ | 'suppressHydrationWarning'
114
+ | 'accessKey'
115
+ | 'className'
116
+ | 'contentEditable'
117
+ | 'contextMenu'
118
+ | 'dir'
119
+ | 'draggable'
120
+ | 'id'
121
+ | 'lang'
122
+ | 'slot'
123
+ | 'spellCheck'
124
+ | 'tabIndex'
125
+ | 'title'
126
+ | 'inputMode'
127
+ | 'is'
128
+ | 'radioGroup'
129
+ | 'role'
130
+ | 'about'
131
+ | 'datatype'
132
+ | 'inlist'
133
+ | 'prefix'
134
+ | 'property'
135
+ | 'resource'
136
+ | 'typeof'
137
+ | 'vocab'
138
+ | 'autoCapitalize'
139
+ | 'autoCorrect'
140
+ | 'autoSave'
141
+ | 'itemProp'
142
+ | 'itemScope'
143
+ | 'itemType'
144
+ | 'itemID'
145
+ | 'itemRef'
146
+ | 'results'
147
+ | 'security'
148
+ | 'unselectable'
149
+ | 'aria-activedescendant'
150
+ | 'aria-atomic'
151
+ | 'aria-autocomplete'
152
+ | 'aria-busy'
153
+ | 'aria-checked'
154
+ | 'aria-colcount'
155
+ | 'aria-colindex'
156
+ | 'aria-colspan'
157
+ | 'aria-controls'
158
+ | 'aria-current'
159
+ | 'aria-describedby'
160
+ | 'aria-details'
161
+ | 'aria-disabled'
162
+ | 'aria-dropeffect'
163
+ | 'aria-errormessage'
164
+ | 'aria-expanded'
165
+ | 'aria-flowto'
166
+ | 'aria-grabbed'
167
+ | 'aria-haspopup'
168
+ | 'aria-hidden'
169
+ | 'aria-invalid'
170
+ | 'aria-keyshortcuts'
171
+ | 'aria-label'
172
+ | 'aria-labelledby'
173
+ | 'aria-level'
174
+ | 'aria-live'
175
+ | 'aria-modal'
176
+ | 'aria-multiline'
177
+ | 'aria-multiselectable'
178
+ | 'aria-orientation'
179
+ | 'aria-owns'
180
+ | 'aria-placeholder'
181
+ | 'aria-posinset'
182
+ | 'aria-pressed'
183
+ | 'aria-readonly'
184
+ | 'aria-relevant'
185
+ | 'aria-required'
186
+ | 'aria-roledescription'
187
+ | 'aria-rowcount'
188
+ | 'aria-rowindex'
189
+ | 'aria-rowspan'
190
+ | 'aria-selected'
191
+ | 'aria-setsize'
192
+ | 'aria-sort'
193
+ | 'aria-valuemax'
194
+ | 'aria-valuemin'
195
+ | 'aria-valuenow'
196
+ | 'aria-valuetext'
197
+ | 'children'
198
+ | 'dangerouslySetInnerHTML'
199
+ | 'onCopy'
200
+ | 'onCopyCapture'
201
+ | 'onCut'
202
+ | 'onCutCapture'
203
+ | 'onPaste'
204
+ | 'onPasteCapture'
205
+ | 'onCompositionEnd'
206
+ | 'onCompositionEndCapture'
207
+ | 'onCompositionStart'
208
+ | 'onCompositionStartCapture'
209
+ | 'onCompositionUpdate'
210
+ | 'onCompositionUpdateCapture'
211
+ | 'onFocus'
212
+ | 'onFocusCapture'
213
+ | 'onBlur'
214
+ | 'onBlurCapture'
215
+ | 'onChangeCapture'
216
+ | 'onBeforeInput'
217
+ | 'onBeforeInputCapture'
218
+ | 'onInput'
219
+ | 'onInputCapture'
220
+ | 'onReset'
221
+ | 'onResetCapture'
222
+ | 'onSubmit'
223
+ | 'onSubmitCapture'
224
+ | 'onInvalid'
225
+ | 'onInvalidCapture'
226
+ | 'onLoad'
227
+ | 'onLoadCapture'
228
+ | 'onError'
229
+ | 'onErrorCapture'
230
+ | 'onKeyDown'
231
+ | 'onKeyDownCapture'
232
+ | 'onKeyPress'
233
+ | 'onKeyPressCapture'
234
+ | 'onKeyUp'
235
+ | 'onKeyUpCapture'
236
+ | 'onAbort'
237
+ | 'onAbortCapture'
238
+ | 'onCanPlay'
239
+ | 'onCanPlayCapture'
240
+ | 'onCanPlayThrough'
241
+ | 'onCanPlayThroughCapture'
242
+ | 'onDurationChange'
243
+ | 'onDurationChangeCapture'
244
+ | 'onEmptied'
245
+ | 'onEmptiedCapture'
246
+ | 'onEncrypted'
247
+ | 'onEncryptedCapture'
248
+ | 'onEnded'
249
+ | 'onEndedCapture'
250
+ | 'onLoadedData'
251
+ | 'onLoadedDataCapture'
252
+ | 'onLoadedMetadata'
253
+ | 'onLoadedMetadataCapture'
254
+ | 'onLoadStart'
255
+ | 'onLoadStartCapture'
256
+ | 'onPause'
257
+ | 'onPauseCapture'
258
+ | 'onPlay'
259
+ | 'onPlayCapture'
260
+ | 'onPlaying'
261
+ | 'onPlayingCapture'
262
+ | 'onProgress'
263
+ | 'onProgressCapture'
264
+ | 'onRateChange'
265
+ | 'onRateChangeCapture'
266
+ | 'onSeeked'
267
+ | 'onSeekedCapture'
268
+ | 'onSeeking'
269
+ | 'onSeekingCapture'
270
+ | 'onStalled'
271
+ | 'onStalledCapture'
272
+ | 'onSuspend'
273
+ | 'onSuspendCapture'
274
+ | 'onTimeUpdate'
275
+ | 'onTimeUpdateCapture'
276
+ | 'onVolumeChange'
277
+ | 'onVolumeChangeCapture'
278
+ | 'onWaiting'
279
+ | 'onWaitingCapture'
280
+ | 'onAuxClick'
281
+ | 'onAuxClickCapture'
282
+ | 'onClick'
283
+ | 'onClickCapture'
284
+ | 'onContextMenu'
285
+ | 'onContextMenuCapture'
286
+ | 'onDoubleClick'
287
+ | 'onDoubleClickCapture'
288
+ | 'onDrag'
289
+ | 'onDragCapture'
290
+ | 'onDragEnd'
291
+ | 'onDragEndCapture'
292
+ | 'onDragEnter'
293
+ | 'onDragEnterCapture'
294
+ | 'onDragExit'
295
+ | 'onDragExitCapture'
296
+ | 'onDragLeave'
297
+ | 'onDragLeaveCapture'
298
+ | 'onDragOver'
299
+ | 'onDragOverCapture'
300
+ | 'onDragStart'
301
+ | 'onDragStartCapture'
302
+ | 'onDrop'
303
+ | 'onDropCapture'
304
+ | 'onMouseDown'
305
+ | 'onMouseDownCapture'
306
+ | 'onMouseEnter'
307
+ | 'onMouseLeave'
308
+ | 'onMouseMove'
309
+ | 'onMouseMoveCapture'
310
+ | 'onMouseOut'
311
+ | 'onMouseOutCapture'
312
+ | 'onMouseOver'
313
+ | 'onMouseOverCapture'
314
+ | 'onMouseUp'
315
+ | 'onMouseUpCapture'
316
+ | 'onSelect'
317
+ | 'onSelectCapture'
318
+ | 'onTouchCancel'
319
+ | 'onTouchCancelCapture'
320
+ | 'onTouchEnd'
321
+ | 'onTouchEndCapture'
322
+ | 'onTouchMove'
323
+ | 'onTouchMoveCapture'
324
+ | 'onTouchStart'
325
+ | 'onTouchStartCapture'
326
+ | 'onPointerDown'
327
+ | 'onPointerDownCapture'
328
+ | 'onPointerMove'
329
+ | 'onPointerMoveCapture'
330
+ | 'onPointerUp'
331
+ | 'onPointerUpCapture'
332
+ | 'onPointerCancel'
333
+ | 'onPointerCancelCapture'
334
+ | 'onPointerEnter'
335
+ | 'onPointerEnterCapture'
336
+ | 'onPointerLeave'
337
+ | 'onPointerLeaveCapture'
338
+ | 'onPointerOver'
339
+ | 'onPointerOverCapture'
340
+ | 'onPointerOut'
341
+ | 'onPointerOutCapture'
342
+ | 'onGotPointerCapture'
343
+ | 'onGotPointerCaptureCapture'
344
+ | 'onLostPointerCapture'
345
+ | 'onLostPointerCaptureCapture'
346
+ | 'onScroll'
347
+ | 'onScrollCapture'
348
+ | 'onWheel'
349
+ | 'onWheelCapture'
350
+ | 'onAnimationStart'
351
+ | 'onAnimationStartCapture'
352
+ | 'onAnimationEnd'
353
+ | 'onAnimationEndCapture'
354
+ | 'onAnimationIteration'
355
+ | 'onAnimationIterationCapture'
356
+ | 'onTransitionEnd'
357
+ | 'onTransitionEndCapture'
358
+ | 'css'
359
+ | 'isCompact'
360
+ | 'isDisabled'
361
+ | 'isReadOnly'
362
+ | 'isRequired'
363
+ | 'isInvalid'
364
+ | 'theme'
365
+ | 'testId'
366
+ | 'createAnalyticsEvent'
367
+ > &
368
+ React_2.RefAttributes<HTMLTextAreaElement>
369
+ >>;
370
+ export default TextArea;
371
+
372
+ export declare const Theme: {
373
+ Consumer: ComponentType<
374
+ {
375
+ children: (tokens: ThemeTokens) => ReactNode;
376
+ } & ThemeProps
377
+ >;
378
+ Provider: ComponentType<{
379
+ children?: ReactNode;
380
+ value?: ThemeProp<ThemeTokens, ThemeProps> | undefined;
381
+ }>;
382
+ useTheme: (props: ThemeProps) => ThemeTokens;
383
+ };
384
+
385
+ export declare type ThemeAppearance = 'standard' | 'subtle' | 'none';
386
+
387
+ export declare type ThemeProps = {
388
+ appearance: ThemeAppearance;
389
+ mode: 'dark' | 'light';
390
+ };
391
+
392
+ export declare type ThemeTokens = {
393
+ borderColor: string;
394
+ borderColorFocus: string;
395
+ backgroundColor: string;
396
+ backgroundColorFocus: string;
397
+ backgroundColorHover: string;
398
+ disabledRules: {
399
+ backgroundColor: string;
400
+ backgroundColorFocus: string;
401
+ backgroundColorHover: string;
402
+ borderColor: string;
403
+ borderColorFocus: string;
404
+ textColor: string;
405
+ };
406
+ invalidRules: {
407
+ borderColor: string;
408
+ borderColorFocus: string;
409
+ backgroundColor: string;
410
+ backgroundColorFocus: string;
411
+ backgroundColorHover: string;
412
+ };
413
+ textColor: string;
414
+ placeholderTextColor: string;
415
+ };
416
+
417
+ export declare const themeTokens: {
418
+ borderColor: {
419
+ standard: {
420
+ light: 'var(--ds-border-input)';
421
+ dark: 'var(--ds-border-input)';
422
+ };
423
+ subtle: {
424
+ light: string;
425
+ dark: string;
426
+ };
427
+ none: {
428
+ light: string;
429
+ dark: string;
430
+ };
431
+ };
432
+ borderColorFocus: {
433
+ standard: {
434
+ light: 'var(--ds-border-focused)';
435
+ dark: 'var(--ds-border-focused)';
436
+ };
437
+ subtle: {
438
+ light: 'var(--ds-border-focused)';
439
+ dark: 'var(--ds-border-focused)';
440
+ };
441
+ none: {
442
+ light: string;
443
+ dark: string;
444
+ };
445
+ };
446
+ backgroundColor: {
447
+ standard: {
448
+ light: 'var(--ds-background-neutral)';
449
+ dark: 'var(--ds-background-neutral)';
450
+ };
451
+ subtle: {
452
+ light: string;
453
+ dark: string;
454
+ };
455
+ none: {
456
+ light: string;
457
+ dark: string;
458
+ };
459
+ };
460
+ backgroundColorFocus: {
461
+ standard: {
462
+ light: 'var(--ds-background-input-pressed)';
463
+ dark: 'var(--ds-background-input-pressed)';
464
+ };
465
+ subtle: {
466
+ light: 'var(--ds-background-input-pressed)';
467
+ dark: 'var(--ds-background-input-pressed)';
468
+ };
469
+ none: {
470
+ light: string;
471
+ dark: string;
472
+ };
473
+ };
474
+ backgroundColorHover: {
475
+ standard: {
476
+ light: 'var(--ds-background-input-hovered)';
477
+ dark: 'var(--ds-background-input-hovered)';
478
+ };
479
+ subtle: {
480
+ light: 'var(--ds-background-neutral-subtle-hovered)';
481
+ dark: 'var(--ds-background-neutral-subtle-hovered)';
482
+ };
483
+ none: {
484
+ light: string;
485
+ dark: string;
486
+ };
487
+ };
488
+ disabledRules: {
489
+ light: {
490
+ backgroundColor: 'var(--ds-background-disabled)';
491
+ backgroundColorFocus: 'var(--ds-background-disabled)';
492
+ backgroundColorHover: 'var(--ds-background-disabled)';
493
+ borderColor: 'var(--ds-border-disabled)';
494
+ borderColorFocus: 'var(--ds-border-focused)';
495
+ textColor: 'var(--ds-text-disabled)';
496
+ };
497
+ dark: {
498
+ backgroundColor: 'var(--ds-background-disabled)';
499
+ backgroundColorFocus: 'var(--ds-background-disabled)';
500
+ backgroundColorHover: 'var(--ds-background-disabled)';
501
+ borderColor: 'var(--ds-border-disabled)';
502
+ borderColorFocus: 'var(--ds-border-focused)';
503
+ textColor: 'var(--ds-text-disabled)';
504
+ };
505
+ };
506
+ invalidRules: {
507
+ light: {
508
+ borderColor: 'var(--ds-border-danger)';
509
+ borderColorFocus: 'var(--ds-border-focused)';
510
+ backgroundColor: 'var(--ds-background-neutral)';
511
+ backgroundColorFocus: 'var(--ds-background-input-pressed)';
512
+ backgroundColorHover: 'var(--ds-background-input-hovered)';
513
+ };
514
+ dark: {
515
+ borderColor: 'var(--ds-border-danger)';
516
+ borderColorFocus: 'var(--ds-border-focused)';
517
+ backgroundColor: 'var(--ds-background-neutral)';
518
+ backgroundColorFocus: 'var(--ds-background-input-pressed)';
519
+ backgroundColorHover: 'var(--ds-background-input-hovered)';
520
+ };
521
+ };
522
+ textColor: {
523
+ light: 'var(--ds-text)';
524
+ dark: 'var(--ds-text)';
525
+ };
526
+ placeholderTextColor: {
527
+ light: 'var(--ds-text-subtlest)';
528
+ dark: 'var(--ds-text-subtlest)';
529
+ };
530
+ };
531
+
532
+ export {};
533
+ ```
package/common.ts DELETED
@@ -1 +0,0 @@
1
- export const docsText = `The default export of @atlaskit/textarea is a hybrid uncontrolled/controlled component; it is uncontrolled by default, but can be optionally controlled by setting the value prop. To set a default value for TextArea while leaving component uncontrolled, specify a defaultValue prop.`;