@atlaskit/textarea 4.1.3 → 4.2.3
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 +32 -0
- package/dist/cjs/component-tokens.js +40 -30
- package/dist/cjs/text-area.js +4 -2
- package/dist/cjs/theme.js +10 -11
- package/dist/cjs/version.json +1 -1
- package/dist/es2019/component-tokens.js +35 -28
- package/dist/es2019/text-area.js +4 -2
- package/dist/es2019/theme.js +10 -11
- package/dist/es2019/version.json +1 -1
- package/dist/esm/component-tokens.js +35 -28
- package/dist/esm/text-area.js +4 -2
- package/dist/esm/theme.js +10 -11
- package/dist/esm/version.json +1 -1
- package/dist/types/component-tokens.d.ts +31 -23
- package/dist/types/theme.d.ts +42 -42
- package/package.json +11 -17
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,37 @@
|
|
|
1
1
|
# @atlaskit/textarea
|
|
2
2
|
|
|
3
|
+
## 4.2.3
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- Updated dependencies
|
|
8
|
+
|
|
9
|
+
## 4.2.2
|
|
10
|
+
|
|
11
|
+
### Patch Changes
|
|
12
|
+
|
|
13
|
+
- Updated dependencies
|
|
14
|
+
|
|
15
|
+
## 4.2.1
|
|
16
|
+
|
|
17
|
+
### Patch Changes
|
|
18
|
+
|
|
19
|
+
- Updated dependencies
|
|
20
|
+
|
|
21
|
+
## 4.2.0
|
|
22
|
+
|
|
23
|
+
### Minor Changes
|
|
24
|
+
|
|
25
|
+
- [`ae281b57bcd`](https://bitbucket.org/atlassian/atlassian-frontend/commits/ae281b57bcd) - Instrumented Radio with the new theming package, `@atlaskit/tokens`.
|
|
26
|
+
|
|
27
|
+
New tokens will be visible only in applications configured to use the new Tokens API (currently in alpha).
|
|
28
|
+
These changes are intended to be interoperable with the legacy theme implementation. Legacy dark mode users should expect no visual or breaking changes
|
|
29
|
+
|
|
30
|
+
### Patch Changes
|
|
31
|
+
|
|
32
|
+
- [`2d7cc544696`](https://bitbucket.org/atlassian/atlassian-frontend/commits/2d7cc544696) - Updates token usage to match the latest token set
|
|
33
|
+
- Updated dependencies
|
|
34
|
+
|
|
3
35
|
## 4.1.3
|
|
4
36
|
|
|
5
37
|
### Patch Changes
|
|
@@ -3,61 +3,71 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports.transparent = exports.disabledTextColor = exports.textColor = exports.placeholderTextColor = exports.defaultBackgroundColorFocus = exports.defaultBackgroundColorHover = exports.defaultBackgroundColor = exports.
|
|
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;
|
|
7
7
|
|
|
8
8
|
var _colors = require("@atlaskit/theme/colors");
|
|
9
9
|
|
|
10
|
-
|
|
11
|
-
// The exports are the functions, not the objects, so could not be used here
|
|
12
|
-
var disabled = {
|
|
13
|
-
light: _colors.N20,
|
|
14
|
-
dark: _colors.DN20
|
|
15
|
-
}; // For validation red is the new 'yellow' which was { light: Y300, dark: Y300 }
|
|
10
|
+
var _tokens = require("@atlaskit/tokens");
|
|
16
11
|
|
|
17
|
-
|
|
12
|
+
var disabledBackground = {
|
|
13
|
+
light: (0, _tokens.token)('color.background.disabled', _colors.N20),
|
|
14
|
+
dark: (0, _tokens.token)('color.background.disabled', _colors.DN20)
|
|
15
|
+
};
|
|
16
|
+
exports.disabledBackground = disabledBackground;
|
|
17
|
+
var disabledBorder = {
|
|
18
|
+
light: (0, _tokens.token)('color.background.disabled', _colors.N40),
|
|
19
|
+
dark: (0, _tokens.token)('color.background.disabled', _colors.DN40)
|
|
20
|
+
};
|
|
21
|
+
exports.disabledBorder = disabledBorder;
|
|
18
22
|
var invalidBorderColor = {
|
|
19
|
-
light: _colors.R400,
|
|
20
|
-
dark: _colors.R400
|
|
23
|
+
light: (0, _tokens.token)('color.iconBorder.danger', _colors.R400),
|
|
24
|
+
dark: (0, _tokens.token)('color.iconBorder.danger', _colors.R400)
|
|
21
25
|
};
|
|
22
26
|
exports.invalidBorderColor = invalidBorderColor;
|
|
23
|
-
var defaultBorderColorFocus = {
|
|
24
|
-
light: _colors.B100,
|
|
25
|
-
dark: _colors.B75
|
|
26
|
-
};
|
|
27
|
-
exports.defaultBorderColorFocus = defaultBorderColorFocus;
|
|
28
27
|
var defaultBorderColor = {
|
|
29
|
-
light: _colors.N40,
|
|
30
|
-
dark: _colors.DN40
|
|
28
|
+
light: (0, _tokens.token)('color.border.neutral', _colors.N40),
|
|
29
|
+
dark: (0, _tokens.token)('color.border.neutral', _colors.DN40)
|
|
31
30
|
};
|
|
32
31
|
exports.defaultBorderColor = defaultBorderColor;
|
|
32
|
+
var defaultBorderColorFocus = {
|
|
33
|
+
light: (0, _tokens.token)('color.border.focus', _colors.B100),
|
|
34
|
+
dark: (0, _tokens.token)('color.border.focus', _colors.B75)
|
|
35
|
+
};
|
|
36
|
+
exports.defaultBorderColorFocus = defaultBorderColorFocus;
|
|
33
37
|
var defaultBackgroundColor = {
|
|
34
|
-
light: _colors.N10,
|
|
35
|
-
dark: _colors.DN10
|
|
38
|
+
light: (0, _tokens.token)('color.background.subtleNeutral.resting', _colors.N10),
|
|
39
|
+
dark: (0, _tokens.token)('color.background.subtleNeutral.resting', _colors.DN10)
|
|
36
40
|
};
|
|
37
41
|
exports.defaultBackgroundColor = defaultBackgroundColor;
|
|
38
42
|
var defaultBackgroundColorHover = {
|
|
39
|
-
light: _colors.N30,
|
|
40
|
-
dark: _colors.DN30
|
|
43
|
+
light: (0, _tokens.token)('color.background.default', _colors.N30),
|
|
44
|
+
dark: (0, _tokens.token)('color.background.default', _colors.DN30)
|
|
41
45
|
};
|
|
42
46
|
exports.defaultBackgroundColorHover = defaultBackgroundColorHover;
|
|
43
47
|
var defaultBackgroundColorFocus = {
|
|
44
|
-
light: _colors.N0,
|
|
45
|
-
dark: _colors.DN10
|
|
46
|
-
};
|
|
48
|
+
light: (0, _tokens.token)('color.background.default', _colors.N0),
|
|
49
|
+
dark: (0, _tokens.token)('color.background.default', _colors.DN10)
|
|
50
|
+
}; // TODO Subtle hover styles not defined in Figma: https://product-fabric.atlassian.net/browse/DSP-1568
|
|
51
|
+
|
|
47
52
|
exports.defaultBackgroundColorFocus = defaultBackgroundColorFocus;
|
|
53
|
+
var subtleHoverBackgroundColor = {
|
|
54
|
+
light: (0, _tokens.token)('color.background.transparentNeutral.hover', _colors.N30),
|
|
55
|
+
dark: (0, _tokens.token)('color.background.transparentNeutral.hover', _colors.DN30)
|
|
56
|
+
};
|
|
57
|
+
exports.subtleHoverBackgroundColor = subtleHoverBackgroundColor;
|
|
48
58
|
var placeholderTextColor = {
|
|
49
|
-
light: _colors.N100,
|
|
50
|
-
dark: _colors.DN200
|
|
59
|
+
light: (0, _tokens.token)('color.text.lowEmphasis', _colors.N100),
|
|
60
|
+
dark: (0, _tokens.token)('color.text.lowEmphasis', _colors.DN200)
|
|
51
61
|
};
|
|
52
62
|
exports.placeholderTextColor = placeholderTextColor;
|
|
53
63
|
var textColor = {
|
|
54
|
-
light: _colors.N900,
|
|
55
|
-
dark: _colors.DN600
|
|
64
|
+
light: (0, _tokens.token)('color.text.highEmphasis', _colors.N900),
|
|
65
|
+
dark: (0, _tokens.token)('color.text.highEmphasis', _colors.DN600)
|
|
56
66
|
};
|
|
57
67
|
exports.textColor = textColor;
|
|
58
68
|
var disabledTextColor = {
|
|
59
|
-
light: _colors.N70,
|
|
60
|
-
dark: _colors.DN90
|
|
69
|
+
light: (0, _tokens.token)('color.text.disabled', _colors.N70),
|
|
70
|
+
dark: (0, _tokens.token)('color.text.disabled', _colors.DN90)
|
|
61
71
|
};
|
|
62
72
|
exports.disabledTextColor = disabledTextColor;
|
|
63
73
|
var transparent = {
|
package/dist/cjs/text-area.js
CHANGED
|
@@ -38,7 +38,7 @@ function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (O
|
|
|
38
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; }
|
|
39
39
|
|
|
40
40
|
var packageName = "@atlaskit/textarea";
|
|
41
|
-
var packageVersion = "4.
|
|
41
|
+
var packageVersion = "4.2.3";
|
|
42
42
|
var analyticsParams = {
|
|
43
43
|
componentName: 'textArea',
|
|
44
44
|
packageName: packageName,
|
|
@@ -147,7 +147,9 @@ var TextAreaWithTokens = /*#__PURE__*/(0, _react.forwardRef)(function (props, re
|
|
|
147
147
|
ref: getTextAreaRef,
|
|
148
148
|
onChange: handleOnChange,
|
|
149
149
|
onBlur: onBlurWithAnalytics,
|
|
150
|
-
onFocus: onFocusWithAnalytics
|
|
150
|
+
onFocus: onFocusWithAnalytics // TODO refactor to follow emotion styling rules
|
|
151
|
+
// eslint-disable-next-line @repo/internal/react/consistent-css-prop-usage
|
|
152
|
+
,
|
|
151
153
|
css: textAreaStyles
|
|
152
154
|
}, rest));
|
|
153
155
|
});
|
package/dist/cjs/theme.js
CHANGED
|
@@ -17,18 +17,18 @@ function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj &&
|
|
|
17
17
|
|
|
18
18
|
var disabledRules = {
|
|
19
19
|
light: {
|
|
20
|
-
backgroundColor: componentTokens.
|
|
21
|
-
backgroundColorFocus: componentTokens.
|
|
22
|
-
backgroundColorHover: componentTokens.
|
|
23
|
-
borderColor: componentTokens.
|
|
20
|
+
backgroundColor: componentTokens.disabledBackground.light,
|
|
21
|
+
backgroundColorFocus: componentTokens.disabledBackground.light,
|
|
22
|
+
backgroundColorHover: componentTokens.disabledBackground.light,
|
|
23
|
+
borderColor: componentTokens.disabledBorder.light,
|
|
24
24
|
borderColorFocus: componentTokens.defaultBorderColorFocus.light,
|
|
25
25
|
textColor: componentTokens.disabledTextColor.light
|
|
26
26
|
},
|
|
27
27
|
dark: {
|
|
28
|
-
backgroundColor: componentTokens.
|
|
29
|
-
backgroundColorFocus: componentTokens.
|
|
30
|
-
backgroundColorHover: componentTokens.
|
|
31
|
-
borderColor: componentTokens.
|
|
28
|
+
backgroundColor: componentTokens.disabledBackground.dark,
|
|
29
|
+
backgroundColorFocus: componentTokens.disabledBackground.dark,
|
|
30
|
+
backgroundColorHover: componentTokens.disabledBackground.dark,
|
|
31
|
+
borderColor: componentTokens.disabledBorder.dark,
|
|
32
32
|
borderColorFocus: componentTokens.defaultBorderColorFocus.dark,
|
|
33
33
|
textColor: componentTokens.disabledTextColor.dark
|
|
34
34
|
}
|
|
@@ -48,8 +48,7 @@ var invalidRules = {
|
|
|
48
48
|
backgroundColorFocus: componentTokens.defaultBackgroundColorFocus.dark,
|
|
49
49
|
backgroundColorHover: componentTokens.defaultBackgroundColorHover.dark
|
|
50
50
|
}
|
|
51
|
-
};
|
|
52
|
-
|
|
51
|
+
};
|
|
53
52
|
var backgroundColor = {
|
|
54
53
|
standard: componentTokens.defaultBackgroundColor,
|
|
55
54
|
subtle: componentTokens.transparent,
|
|
@@ -62,7 +61,7 @@ var backgroundColorFocus = {
|
|
|
62
61
|
};
|
|
63
62
|
var backgroundColorHover = {
|
|
64
63
|
standard: componentTokens.defaultBackgroundColorHover,
|
|
65
|
-
subtle: componentTokens.
|
|
64
|
+
subtle: componentTokens.subtleHoverBackgroundColor,
|
|
66
65
|
none: componentTokens.transparent
|
|
67
66
|
};
|
|
68
67
|
var borderColor = {
|
package/dist/cjs/version.json
CHANGED
|
@@ -1,46 +1,53 @@
|
|
|
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
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
dark: DN20
|
|
7
|
-
}; // For validation red is the new 'yellow' which was { light: Y300, dark: Y300 }
|
|
8
|
-
|
|
9
|
-
export const invalidBorderColor = {
|
|
10
|
-
light: R400,
|
|
11
|
-
dark: R400
|
|
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
|
+
export const disabledBackground = {
|
|
4
|
+
light: token('color.background.disabled', N20),
|
|
5
|
+
dark: token('color.background.disabled', DN20)
|
|
12
6
|
};
|
|
13
|
-
export const
|
|
14
|
-
light:
|
|
15
|
-
dark:
|
|
7
|
+
export const disabledBorder = {
|
|
8
|
+
light: token('color.background.disabled', N40),
|
|
9
|
+
dark: token('color.background.disabled', DN40)
|
|
10
|
+
};
|
|
11
|
+
export const invalidBorderColor = {
|
|
12
|
+
light: token('color.iconBorder.danger', R400),
|
|
13
|
+
dark: token('color.iconBorder.danger', R400)
|
|
16
14
|
};
|
|
17
15
|
export const defaultBorderColor = {
|
|
18
|
-
light: N40,
|
|
19
|
-
dark: DN40
|
|
16
|
+
light: token('color.border.neutral', N40),
|
|
17
|
+
dark: token('color.border.neutral', DN40)
|
|
18
|
+
};
|
|
19
|
+
export const defaultBorderColorFocus = {
|
|
20
|
+
light: token('color.border.focus', B100),
|
|
21
|
+
dark: token('color.border.focus', B75)
|
|
20
22
|
};
|
|
21
23
|
export const defaultBackgroundColor = {
|
|
22
|
-
light: N10,
|
|
23
|
-
dark: DN10
|
|
24
|
+
light: token('color.background.subtleNeutral.resting', N10),
|
|
25
|
+
dark: token('color.background.subtleNeutral.resting', DN10)
|
|
24
26
|
};
|
|
25
27
|
export const defaultBackgroundColorHover = {
|
|
26
|
-
light: N30,
|
|
27
|
-
dark: DN30
|
|
28
|
+
light: token('color.background.default', N30),
|
|
29
|
+
dark: token('color.background.default', DN30)
|
|
28
30
|
};
|
|
29
31
|
export const defaultBackgroundColorFocus = {
|
|
30
|
-
light: N0,
|
|
31
|
-
dark: DN10
|
|
32
|
+
light: token('color.background.default', N0),
|
|
33
|
+
dark: token('color.background.default', DN10)
|
|
34
|
+
}; // TODO Subtle hover styles not defined in Figma: https://product-fabric.atlassian.net/browse/DSP-1568
|
|
35
|
+
|
|
36
|
+
export const subtleHoverBackgroundColor = {
|
|
37
|
+
light: token('color.background.transparentNeutral.hover', N30),
|
|
38
|
+
dark: token('color.background.transparentNeutral.hover', DN30)
|
|
32
39
|
};
|
|
33
40
|
export const placeholderTextColor = {
|
|
34
|
-
light: N100,
|
|
35
|
-
dark: DN200
|
|
41
|
+
light: token('color.text.lowEmphasis', N100),
|
|
42
|
+
dark: token('color.text.lowEmphasis', DN200)
|
|
36
43
|
};
|
|
37
44
|
export const textColor = {
|
|
38
|
-
light: N900,
|
|
39
|
-
dark: DN600
|
|
45
|
+
light: token('color.text.highEmphasis', N900),
|
|
46
|
+
dark: token('color.text.highEmphasis', DN600)
|
|
40
47
|
};
|
|
41
48
|
export const disabledTextColor = {
|
|
42
|
-
light: N70,
|
|
43
|
-
dark: DN90
|
|
49
|
+
light: token('color.text.disabled', N70),
|
|
50
|
+
dark: token('color.text.disabled', DN90)
|
|
44
51
|
};
|
|
45
52
|
export const transparent = {
|
|
46
53
|
light: 'transparent',
|
package/dist/es2019/text-area.js
CHANGED
|
@@ -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.
|
|
11
|
+
const packageVersion = "4.2.3";
|
|
12
12
|
const analyticsParams = {
|
|
13
13
|
componentName: 'textArea',
|
|
14
14
|
packageName,
|
|
@@ -109,7 +109,9 @@ const TextAreaWithTokens = /*#__PURE__*/forwardRef((props, ref) => {
|
|
|
109
109
|
ref: getTextAreaRef,
|
|
110
110
|
onChange: handleOnChange,
|
|
111
111
|
onBlur: onBlurWithAnalytics,
|
|
112
|
-
onFocus: onFocusWithAnalytics
|
|
112
|
+
onFocus: onFocusWithAnalytics // TODO refactor to follow emotion styling rules
|
|
113
|
+
// eslint-disable-next-line @repo/internal/react/consistent-css-prop-usage
|
|
114
|
+
,
|
|
113
115
|
css: textAreaStyles
|
|
114
116
|
}, rest));
|
|
115
117
|
});
|
package/dist/es2019/theme.js
CHANGED
|
@@ -2,18 +2,18 @@ import { createTheme } from '@atlaskit/theme/components';
|
|
|
2
2
|
import * as componentTokens from './component-tokens';
|
|
3
3
|
const disabledRules = {
|
|
4
4
|
light: {
|
|
5
|
-
backgroundColor: componentTokens.
|
|
6
|
-
backgroundColorFocus: componentTokens.
|
|
7
|
-
backgroundColorHover: componentTokens.
|
|
8
|
-
borderColor: componentTokens.
|
|
5
|
+
backgroundColor: componentTokens.disabledBackground.light,
|
|
6
|
+
backgroundColorFocus: componentTokens.disabledBackground.light,
|
|
7
|
+
backgroundColorHover: componentTokens.disabledBackground.light,
|
|
8
|
+
borderColor: componentTokens.disabledBorder.light,
|
|
9
9
|
borderColorFocus: componentTokens.defaultBorderColorFocus.light,
|
|
10
10
|
textColor: componentTokens.disabledTextColor.light
|
|
11
11
|
},
|
|
12
12
|
dark: {
|
|
13
|
-
backgroundColor: componentTokens.
|
|
14
|
-
backgroundColorFocus: componentTokens.
|
|
15
|
-
backgroundColorHover: componentTokens.
|
|
16
|
-
borderColor: componentTokens.
|
|
13
|
+
backgroundColor: componentTokens.disabledBackground.dark,
|
|
14
|
+
backgroundColorFocus: componentTokens.disabledBackground.dark,
|
|
15
|
+
backgroundColorHover: componentTokens.disabledBackground.dark,
|
|
16
|
+
borderColor: componentTokens.disabledBorder.dark,
|
|
17
17
|
borderColorFocus: componentTokens.defaultBorderColorFocus.dark,
|
|
18
18
|
textColor: componentTokens.disabledTextColor.dark
|
|
19
19
|
}
|
|
@@ -33,8 +33,7 @@ const invalidRules = {
|
|
|
33
33
|
backgroundColorFocus: componentTokens.defaultBackgroundColorFocus.dark,
|
|
34
34
|
backgroundColorHover: componentTokens.defaultBackgroundColorHover.dark
|
|
35
35
|
}
|
|
36
|
-
};
|
|
37
|
-
|
|
36
|
+
};
|
|
38
37
|
const backgroundColor = {
|
|
39
38
|
standard: componentTokens.defaultBackgroundColor,
|
|
40
39
|
subtle: componentTokens.transparent,
|
|
@@ -47,7 +46,7 @@ const backgroundColorFocus = {
|
|
|
47
46
|
};
|
|
48
47
|
const backgroundColorHover = {
|
|
49
48
|
standard: componentTokens.defaultBackgroundColorHover,
|
|
50
|
-
subtle: componentTokens.
|
|
49
|
+
subtle: componentTokens.subtleHoverBackgroundColor,
|
|
51
50
|
none: componentTokens.transparent
|
|
52
51
|
};
|
|
53
52
|
const borderColor = {
|
package/dist/es2019/version.json
CHANGED
|
@@ -1,46 +1,53 @@
|
|
|
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
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
dark: DN20
|
|
7
|
-
}; // For validation red is the new 'yellow' which was { light: Y300, dark: Y300 }
|
|
8
|
-
|
|
9
|
-
export var invalidBorderColor = {
|
|
10
|
-
light: R400,
|
|
11
|
-
dark: R400
|
|
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
|
+
export var disabledBackground = {
|
|
4
|
+
light: token('color.background.disabled', N20),
|
|
5
|
+
dark: token('color.background.disabled', DN20)
|
|
12
6
|
};
|
|
13
|
-
export var
|
|
14
|
-
light:
|
|
15
|
-
dark:
|
|
7
|
+
export var disabledBorder = {
|
|
8
|
+
light: token('color.background.disabled', N40),
|
|
9
|
+
dark: token('color.background.disabled', DN40)
|
|
10
|
+
};
|
|
11
|
+
export var invalidBorderColor = {
|
|
12
|
+
light: token('color.iconBorder.danger', R400),
|
|
13
|
+
dark: token('color.iconBorder.danger', R400)
|
|
16
14
|
};
|
|
17
15
|
export var defaultBorderColor = {
|
|
18
|
-
light: N40,
|
|
19
|
-
dark: DN40
|
|
16
|
+
light: token('color.border.neutral', N40),
|
|
17
|
+
dark: token('color.border.neutral', DN40)
|
|
18
|
+
};
|
|
19
|
+
export var defaultBorderColorFocus = {
|
|
20
|
+
light: token('color.border.focus', B100),
|
|
21
|
+
dark: token('color.border.focus', B75)
|
|
20
22
|
};
|
|
21
23
|
export var defaultBackgroundColor = {
|
|
22
|
-
light: N10,
|
|
23
|
-
dark: DN10
|
|
24
|
+
light: token('color.background.subtleNeutral.resting', N10),
|
|
25
|
+
dark: token('color.background.subtleNeutral.resting', DN10)
|
|
24
26
|
};
|
|
25
27
|
export var defaultBackgroundColorHover = {
|
|
26
|
-
light: N30,
|
|
27
|
-
dark: DN30
|
|
28
|
+
light: token('color.background.default', N30),
|
|
29
|
+
dark: token('color.background.default', DN30)
|
|
28
30
|
};
|
|
29
31
|
export var defaultBackgroundColorFocus = {
|
|
30
|
-
light: N0,
|
|
31
|
-
dark: DN10
|
|
32
|
+
light: token('color.background.default', N0),
|
|
33
|
+
dark: token('color.background.default', DN10)
|
|
34
|
+
}; // TODO Subtle hover styles not defined in Figma: https://product-fabric.atlassian.net/browse/DSP-1568
|
|
35
|
+
|
|
36
|
+
export var subtleHoverBackgroundColor = {
|
|
37
|
+
light: token('color.background.transparentNeutral.hover', N30),
|
|
38
|
+
dark: token('color.background.transparentNeutral.hover', DN30)
|
|
32
39
|
};
|
|
33
40
|
export var placeholderTextColor = {
|
|
34
|
-
light: N100,
|
|
35
|
-
dark: DN200
|
|
41
|
+
light: token('color.text.lowEmphasis', N100),
|
|
42
|
+
dark: token('color.text.lowEmphasis', DN200)
|
|
36
43
|
};
|
|
37
44
|
export var textColor = {
|
|
38
|
-
light: N900,
|
|
39
|
-
dark: DN600
|
|
45
|
+
light: token('color.text.highEmphasis', N900),
|
|
46
|
+
dark: token('color.text.highEmphasis', DN600)
|
|
40
47
|
};
|
|
41
48
|
export var disabledTextColor = {
|
|
42
|
-
light: N70,
|
|
43
|
-
dark: DN90
|
|
49
|
+
light: token('color.text.disabled', N70),
|
|
50
|
+
dark: token('color.text.disabled', DN90)
|
|
44
51
|
};
|
|
45
52
|
export var transparent = {
|
|
46
53
|
light: 'transparent',
|
package/dist/esm/text-area.js
CHANGED
|
@@ -15,7 +15,7 @@ import GlobalTheme from '@atlaskit/theme/components';
|
|
|
15
15
|
import { borderWidth, getBaseStyles, themeStyles } from './styles';
|
|
16
16
|
import { Theme } from './theme';
|
|
17
17
|
var packageName = "@atlaskit/textarea";
|
|
18
|
-
var packageVersion = "4.
|
|
18
|
+
var packageVersion = "4.2.3";
|
|
19
19
|
var analyticsParams = {
|
|
20
20
|
componentName: 'textArea',
|
|
21
21
|
packageName: packageName,
|
|
@@ -126,7 +126,9 @@ var TextAreaWithTokens = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
|
126
126
|
ref: getTextAreaRef,
|
|
127
127
|
onChange: handleOnChange,
|
|
128
128
|
onBlur: onBlurWithAnalytics,
|
|
129
|
-
onFocus: onFocusWithAnalytics
|
|
129
|
+
onFocus: onFocusWithAnalytics // TODO refactor to follow emotion styling rules
|
|
130
|
+
// eslint-disable-next-line @repo/internal/react/consistent-css-prop-usage
|
|
131
|
+
,
|
|
130
132
|
css: textAreaStyles
|
|
131
133
|
}, rest));
|
|
132
134
|
});
|
package/dist/esm/theme.js
CHANGED
|
@@ -2,18 +2,18 @@ import { createTheme } from '@atlaskit/theme/components';
|
|
|
2
2
|
import * as componentTokens from './component-tokens';
|
|
3
3
|
var disabledRules = {
|
|
4
4
|
light: {
|
|
5
|
-
backgroundColor: componentTokens.
|
|
6
|
-
backgroundColorFocus: componentTokens.
|
|
7
|
-
backgroundColorHover: componentTokens.
|
|
8
|
-
borderColor: componentTokens.
|
|
5
|
+
backgroundColor: componentTokens.disabledBackground.light,
|
|
6
|
+
backgroundColorFocus: componentTokens.disabledBackground.light,
|
|
7
|
+
backgroundColorHover: componentTokens.disabledBackground.light,
|
|
8
|
+
borderColor: componentTokens.disabledBorder.light,
|
|
9
9
|
borderColorFocus: componentTokens.defaultBorderColorFocus.light,
|
|
10
10
|
textColor: componentTokens.disabledTextColor.light
|
|
11
11
|
},
|
|
12
12
|
dark: {
|
|
13
|
-
backgroundColor: componentTokens.
|
|
14
|
-
backgroundColorFocus: componentTokens.
|
|
15
|
-
backgroundColorHover: componentTokens.
|
|
16
|
-
borderColor: componentTokens.
|
|
13
|
+
backgroundColor: componentTokens.disabledBackground.dark,
|
|
14
|
+
backgroundColorFocus: componentTokens.disabledBackground.dark,
|
|
15
|
+
backgroundColorHover: componentTokens.disabledBackground.dark,
|
|
16
|
+
borderColor: componentTokens.disabledBorder.dark,
|
|
17
17
|
borderColorFocus: componentTokens.defaultBorderColorFocus.dark,
|
|
18
18
|
textColor: componentTokens.disabledTextColor.dark
|
|
19
19
|
}
|
|
@@ -33,8 +33,7 @@ var invalidRules = {
|
|
|
33
33
|
backgroundColorFocus: componentTokens.defaultBackgroundColorFocus.dark,
|
|
34
34
|
backgroundColorHover: componentTokens.defaultBackgroundColorHover.dark
|
|
35
35
|
}
|
|
36
|
-
};
|
|
37
|
-
|
|
36
|
+
};
|
|
38
37
|
var backgroundColor = {
|
|
39
38
|
standard: componentTokens.defaultBackgroundColor,
|
|
40
39
|
subtle: componentTokens.transparent,
|
|
@@ -47,7 +46,7 @@ var backgroundColorFocus = {
|
|
|
47
46
|
};
|
|
48
47
|
var backgroundColorHover = {
|
|
49
48
|
standard: componentTokens.defaultBackgroundColorHover,
|
|
50
|
-
subtle: componentTokens.
|
|
49
|
+
subtle: componentTokens.subtleHoverBackgroundColor,
|
|
51
50
|
none: componentTokens.transparent
|
|
52
51
|
};
|
|
53
52
|
var borderColor = {
|
package/dist/esm/version.json
CHANGED
|
@@ -1,42 +1,50 @@
|
|
|
1
|
-
export declare const
|
|
2
|
-
light:
|
|
3
|
-
dark:
|
|
1
|
+
export declare const disabledBackground: {
|
|
2
|
+
light: "var(--ds-background-disabled)";
|
|
3
|
+
dark: "var(--ds-background-disabled)";
|
|
4
4
|
};
|
|
5
|
-
export declare const
|
|
6
|
-
light:
|
|
7
|
-
dark:
|
|
5
|
+
export declare const disabledBorder: {
|
|
6
|
+
light: "var(--ds-background-disabled)";
|
|
7
|
+
dark: "var(--ds-background-disabled)";
|
|
8
8
|
};
|
|
9
|
-
export declare const
|
|
10
|
-
light:
|
|
11
|
-
dark:
|
|
9
|
+
export declare const invalidBorderColor: {
|
|
10
|
+
light: "var(--ds-iconBorder-danger)";
|
|
11
|
+
dark: "var(--ds-iconBorder-danger)";
|
|
12
12
|
};
|
|
13
13
|
export declare const defaultBorderColor: {
|
|
14
|
-
light:
|
|
15
|
-
dark:
|
|
14
|
+
light: "var(--ds-border-neutral)";
|
|
15
|
+
dark: "var(--ds-border-neutral)";
|
|
16
|
+
};
|
|
17
|
+
export declare const defaultBorderColorFocus: {
|
|
18
|
+
light: "var(--ds-border-focus)";
|
|
19
|
+
dark: "var(--ds-border-focus)";
|
|
16
20
|
};
|
|
17
21
|
export declare const defaultBackgroundColor: {
|
|
18
|
-
light:
|
|
19
|
-
dark:
|
|
22
|
+
light: "var(--ds-background-subtleNeutral-resting)";
|
|
23
|
+
dark: "var(--ds-background-subtleNeutral-resting)";
|
|
20
24
|
};
|
|
21
25
|
export declare const defaultBackgroundColorHover: {
|
|
22
|
-
light:
|
|
23
|
-
dark:
|
|
26
|
+
light: "var(--ds-background-default)";
|
|
27
|
+
dark: "var(--ds-background-default)";
|
|
24
28
|
};
|
|
25
29
|
export declare const defaultBackgroundColorFocus: {
|
|
26
|
-
light:
|
|
27
|
-
dark:
|
|
30
|
+
light: "var(--ds-background-default)";
|
|
31
|
+
dark: "var(--ds-background-default)";
|
|
32
|
+
};
|
|
33
|
+
export declare const subtleHoverBackgroundColor: {
|
|
34
|
+
light: "var(--ds-background-transparentNeutral-hover)";
|
|
35
|
+
dark: "var(--ds-background-transparentNeutral-hover)";
|
|
28
36
|
};
|
|
29
37
|
export declare const placeholderTextColor: {
|
|
30
|
-
light:
|
|
31
|
-
dark:
|
|
38
|
+
light: "var(--ds-text-lowEmphasis)";
|
|
39
|
+
dark: "var(--ds-text-lowEmphasis)";
|
|
32
40
|
};
|
|
33
41
|
export declare const textColor: {
|
|
34
|
-
light:
|
|
35
|
-
dark:
|
|
42
|
+
light: "var(--ds-text-highEmphasis)";
|
|
43
|
+
dark: "var(--ds-text-highEmphasis)";
|
|
36
44
|
};
|
|
37
45
|
export declare const disabledTextColor: {
|
|
38
|
-
light:
|
|
39
|
-
dark:
|
|
46
|
+
light: "var(--ds-text-disabled)";
|
|
47
|
+
dark: "var(--ds-text-disabled)";
|
|
40
48
|
};
|
|
41
49
|
export declare const transparent: {
|
|
42
50
|
light: string;
|
package/dist/types/theme.d.ts
CHANGED
|
@@ -31,8 +31,8 @@ export declare type ThemeTokens = {
|
|
|
31
31
|
export declare const themeTokens: {
|
|
32
32
|
borderColor: {
|
|
33
33
|
standard: {
|
|
34
|
-
light:
|
|
35
|
-
dark:
|
|
34
|
+
light: "var(--ds-border-neutral)";
|
|
35
|
+
dark: "var(--ds-border-neutral)";
|
|
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:
|
|
49
|
-
dark:
|
|
48
|
+
light: "var(--ds-border-focus)";
|
|
49
|
+
dark: "var(--ds-border-focus)";
|
|
50
50
|
};
|
|
51
51
|
subtle: {
|
|
52
|
-
light:
|
|
53
|
-
dark:
|
|
52
|
+
light: "var(--ds-border-focus)";
|
|
53
|
+
dark: "var(--ds-border-focus)";
|
|
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:
|
|
63
|
-
dark:
|
|
62
|
+
light: "var(--ds-background-subtleNeutral-resting)";
|
|
63
|
+
dark: "var(--ds-background-subtleNeutral-resting)";
|
|
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:
|
|
77
|
-
dark:
|
|
76
|
+
light: "var(--ds-background-default)";
|
|
77
|
+
dark: "var(--ds-background-default)";
|
|
78
78
|
};
|
|
79
79
|
subtle: {
|
|
80
|
-
light:
|
|
81
|
-
dark:
|
|
80
|
+
light: "var(--ds-background-default)";
|
|
81
|
+
dark: "var(--ds-background-default)";
|
|
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:
|
|
91
|
-
dark:
|
|
90
|
+
light: "var(--ds-background-default)";
|
|
91
|
+
dark: "var(--ds-background-default)";
|
|
92
92
|
};
|
|
93
93
|
subtle: {
|
|
94
|
-
light:
|
|
95
|
-
dark:
|
|
94
|
+
light: "var(--ds-background-transparentNeutral-hover)";
|
|
95
|
+
dark: "var(--ds-background-transparentNeutral-hover)";
|
|
96
96
|
};
|
|
97
97
|
none: {
|
|
98
98
|
light: string;
|
|
@@ -101,45 +101,45 @@ export declare const themeTokens: {
|
|
|
101
101
|
};
|
|
102
102
|
disabledRules: {
|
|
103
103
|
light: {
|
|
104
|
-
backgroundColor:
|
|
105
|
-
backgroundColorFocus:
|
|
106
|
-
backgroundColorHover:
|
|
107
|
-
borderColor:
|
|
108
|
-
borderColorFocus:
|
|
109
|
-
textColor:
|
|
104
|
+
backgroundColor: "var(--ds-background-disabled)";
|
|
105
|
+
backgroundColorFocus: "var(--ds-background-disabled)";
|
|
106
|
+
backgroundColorHover: "var(--ds-background-disabled)";
|
|
107
|
+
borderColor: "var(--ds-background-disabled)";
|
|
108
|
+
borderColorFocus: "var(--ds-border-focus)";
|
|
109
|
+
textColor: "var(--ds-text-disabled)";
|
|
110
110
|
};
|
|
111
111
|
dark: {
|
|
112
|
-
backgroundColor:
|
|
113
|
-
backgroundColorFocus:
|
|
114
|
-
backgroundColorHover:
|
|
115
|
-
borderColor:
|
|
116
|
-
borderColorFocus:
|
|
117
|
-
textColor:
|
|
112
|
+
backgroundColor: "var(--ds-background-disabled)";
|
|
113
|
+
backgroundColorFocus: "var(--ds-background-disabled)";
|
|
114
|
+
backgroundColorHover: "var(--ds-background-disabled)";
|
|
115
|
+
borderColor: "var(--ds-background-disabled)";
|
|
116
|
+
borderColorFocus: "var(--ds-border-focus)";
|
|
117
|
+
textColor: "var(--ds-text-disabled)";
|
|
118
118
|
};
|
|
119
119
|
};
|
|
120
120
|
invalidRules: {
|
|
121
121
|
light: {
|
|
122
|
-
borderColor:
|
|
123
|
-
borderColorFocus:
|
|
124
|
-
backgroundColor:
|
|
125
|
-
backgroundColorFocus:
|
|
126
|
-
backgroundColorHover:
|
|
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)";
|
|
127
127
|
};
|
|
128
128
|
dark: {
|
|
129
|
-
borderColor:
|
|
130
|
-
borderColorFocus:
|
|
131
|
-
backgroundColor:
|
|
132
|
-
backgroundColorFocus:
|
|
133
|
-
backgroundColorHover:
|
|
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)";
|
|
134
134
|
};
|
|
135
135
|
};
|
|
136
136
|
textColor: {
|
|
137
|
-
light:
|
|
138
|
-
dark:
|
|
137
|
+
light: "var(--ds-text-highEmphasis)";
|
|
138
|
+
dark: "var(--ds-text-highEmphasis)";
|
|
139
139
|
};
|
|
140
140
|
placeholderTextColor: {
|
|
141
|
-
light:
|
|
142
|
-
dark:
|
|
141
|
+
light: "var(--ds-text-lowEmphasis)";
|
|
142
|
+
dark: "var(--ds-text-lowEmphasis)";
|
|
143
143
|
};
|
|
144
144
|
};
|
|
145
145
|
export declare const Theme: {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/textarea",
|
|
3
|
-
"version": "4.
|
|
3
|
+
"version": "4.2.3",
|
|
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/"
|
|
@@ -26,7 +26,8 @@
|
|
|
26
26
|
},
|
|
27
27
|
"dependencies": {
|
|
28
28
|
"@atlaskit/analytics-next": "^8.0.0",
|
|
29
|
-
"@atlaskit/theme": "^
|
|
29
|
+
"@atlaskit/theme": "^12.0.0",
|
|
30
|
+
"@atlaskit/tokens": "^0.3.0",
|
|
30
31
|
"@babel/runtime": "^7.0.0",
|
|
31
32
|
"@emotion/core": "^10.0.9"
|
|
32
33
|
},
|
|
@@ -35,10 +36,10 @@
|
|
|
35
36
|
},
|
|
36
37
|
"devDependencies": {
|
|
37
38
|
"@atlaskit/build-utils": "*",
|
|
38
|
-
"@atlaskit/button": "^16.
|
|
39
|
+
"@atlaskit/button": "^16.1.0",
|
|
39
40
|
"@atlaskit/docs": "*",
|
|
40
|
-
"@atlaskit/form": "^8.
|
|
41
|
-
"@atlaskit/section-message": "^6.
|
|
41
|
+
"@atlaskit/form": "^8.4.0",
|
|
42
|
+
"@atlaskit/section-message": "^6.1.0",
|
|
42
43
|
"@atlaskit/ssr": "*",
|
|
43
44
|
"@atlaskit/visual-regression": "*",
|
|
44
45
|
"@atlaskit/webdriver-runner": "*",
|
|
@@ -61,18 +62,11 @@
|
|
|
61
62
|
"import-structure": "atlassian-conventions"
|
|
62
63
|
},
|
|
63
64
|
"@repo/internal": {
|
|
64
|
-
"ui-components":
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
"
|
|
68
|
-
|
|
69
|
-
],
|
|
70
|
-
"theming": [
|
|
71
|
-
"new-theming-api"
|
|
72
|
-
],
|
|
73
|
-
"deprecation": [
|
|
74
|
-
"no-deprecated-imports"
|
|
75
|
-
]
|
|
65
|
+
"ui-components": "lite-mode",
|
|
66
|
+
"analytics": "analytics-next",
|
|
67
|
+
"theming": "tokens",
|
|
68
|
+
"styling": "emotion",
|
|
69
|
+
"deprecation": "no-deprecated-imports"
|
|
76
70
|
}
|
|
77
71
|
},
|
|
78
72
|
"prettier": "@atlassian/atlassian-frontend-prettier-config-1.0.1"
|