@atlaskit/textarea 4.3.7 → 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,13 @@
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
+
3
11
  ## 4.3.7
4
12
 
5
13
  ### 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
@@ -33,8 +33,8 @@ 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 = {
@@ -45,12 +45,11 @@ exports.defaultBackgroundColorHover = defaultBackgroundColorHover;
45
45
  var defaultBackgroundColorFocus = {
46
46
  light: "var(--ds-background-input-pressed, ".concat(_colors.N0, ")"),
47
47
  dark: "var(--ds-background-input-pressed, ".concat(_colors.DN10, ")")
48
- }; // TODO Subtle hover styles not defined in Figma: https://product-fabric.atlassian.net/browse/DSP-1568
49
-
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.7";
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.7",
3
+ "version": "4.3.8",
4
4
  "sideEffects": false
5
5
  }
@@ -20,8 +20,8 @@ export const defaultBorderColorFocus = {
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
27
  light: `var(--ds-background-input-hovered, ${N30})`,
@@ -30,11 +30,10 @@ export const defaultBackgroundColorHover = {
30
30
  export const defaultBackgroundColorFocus = {
31
31
  light: `var(--ds-background-input-pressed, ${N0})`,
32
32
  dark: `var(--ds-background-input-pressed, ${DN10})`
33
- }; // TODO Subtle hover styles not defined in Figma: https://product-fabric.atlassian.net/browse/DSP-1568
34
-
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.7";
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.7",
3
+ "version": "4.3.8",
4
4
  "sideEffects": false
5
5
  }
@@ -20,8 +20,8 @@ export var defaultBorderColorFocus = {
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
27
  light: "var(--ds-background-input-hovered, ".concat(N30, ")"),
@@ -30,11 +30,10 @@ export var defaultBackgroundColorHover = {
30
30
  export var defaultBackgroundColorFocus = {
31
31
  light: "var(--ds-background-input-pressed, ".concat(N0, ")"),
32
32
  dark: "var(--ds-background-input-pressed, ".concat(DN10, ")")
33
- }; // TODO Subtle hover styles not defined in Figma: https://product-fabric.atlassian.net/browse/DSP-1568
34
-
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.7";
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.7",
3
+ "version": "4.3.8",
4
4
  "sideEffects": false
5
5
  }
@@ -19,8 +19,8 @@ export declare const defaultBorderColorFocus: {
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
26
  light: "var(--ds-background-input-hovered)";
@@ -31,8 +31,8 @@ export declare const defaultBackgroundColorFocus: {
31
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,6 +37,11 @@ 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: {
@@ -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;
@@ -91,8 +105,8 @@ export declare const themeTokens: {
91
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;
@@ -121,14 +135,14 @@ 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)";
138
+ backgroundColor: "var(--ds-background-input)";
125
139
  backgroundColorFocus: "var(--ds-background-input-pressed)";
126
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)";
145
+ backgroundColor: "var(--ds-background-input)";
132
146
  backgroundColorFocus: "var(--ds-background-input-pressed)";
133
147
  backgroundColorHover: "var(--ds-background-input-hovered)";
134
148
  };
@@ -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,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/textarea",
3
- "version": "4.3.7",
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/"
@@ -13,7 +13,7 @@
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",
@@ -24,11 +24,11 @@
24
24
  }
25
25
  },
26
26
  "af:exports": {
27
- ".": "./src/index.ts",
28
- "./component-tokens": "./src/component-tokens.ts",
29
- "./styles": "./src/styles.ts",
27
+ ".": "./src/index.tsx",
28
+ "./component-tokens": "./src/component-tokens.tsx",
29
+ "./styles": "./src/styles.tsx",
30
30
  "./text-area": "./src/text-area.tsx",
31
- "./theme": "./src/theme.ts"
31
+ "./theme": "./src/theme.tsx"
32
32
  },
33
33
  "dependencies": {
34
34
  "@atlaskit/analytics-next": "^8.0.0",
@@ -43,6 +43,7 @@
43
43
  "devDependencies": {
44
44
  "@atlaskit/button": "^16.3.0",
45
45
  "@atlaskit/docs": "*",
46
+ "@atlaskit/ds-lib": "^2.1.0",
46
47
  "@atlaskit/form": "^8.5.0",
47
48
  "@atlaskit/section-message": "^6.1.0",
48
49
  "@atlaskit/ssr": "*",
@@ -67,6 +68,7 @@
67
68
  "import-structure": "atlassian-conventions"
68
69
  },
69
70
  "@repo/internal": {
71
+ "design-system": "v1",
70
72
  "dom-events": "use-bind-event-listener",
71
73
  "ui-components": "lite-mode",
72
74
  "analytics": "analytics-next",
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.`;