@atlaskit/textfield 5.1.3 → 5.1.4
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 +7 -0
- package/dist/cjs/component-tokens.js +20 -22
- package/dist/cjs/styles.js +2 -4
- package/dist/cjs/text-field.js +1 -1
- package/dist/cjs/version.json +1 -1
- package/dist/es2019/component-tokens.js +20 -21
- package/dist/es2019/styles.js +2 -3
- package/dist/es2019/text-field.js +1 -1
- package/dist/es2019/version.json +1 -1
- package/dist/esm/component-tokens.js +20 -21
- package/dist/esm/styles.js +2 -3
- package/dist/esm/text-field.js +1 -1
- package/dist/esm/version.json +1 -1
- package/package.json +6 -3
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,12 @@
|
|
|
1
1
|
# @atlaskit/textfield
|
|
2
2
|
|
|
3
|
+
## 5.1.4
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [`f460cc7c411`](https://bitbucket.org/atlassian/atlassian-frontend/commits/f460cc7c411) - Builds for this package now pass through a tokens babel plugin, removing runtime invocations of the tokens() function and improving bundle size.
|
|
8
|
+
- Updated dependencies
|
|
9
|
+
|
|
3
10
|
## 5.1.3
|
|
4
11
|
|
|
5
12
|
### Patch Changes
|
|
@@ -7,41 +7,39 @@ exports.placeholderTextColor = exports.disabledTextColor = exports.textColor = e
|
|
|
7
7
|
|
|
8
8
|
var _colors = require("@atlaskit/theme/colors");
|
|
9
9
|
|
|
10
|
-
var _tokens = require("@atlaskit/tokens");
|
|
11
|
-
|
|
12
10
|
var disabledBackgroundColor = {
|
|
13
|
-
light: (
|
|
14
|
-
dark: (
|
|
11
|
+
light: "var(--ds-background-disabled, ".concat(_colors.N10, ")"),
|
|
12
|
+
dark: "var(--ds-background-disabled, ".concat(_colors.DN10, ")")
|
|
15
13
|
};
|
|
16
14
|
exports.disabledBackgroundColor = disabledBackgroundColor;
|
|
17
15
|
var defaultBackgroundColor = {
|
|
18
|
-
light: (
|
|
19
|
-
dark: (
|
|
16
|
+
light: "var(--ds-background-subtleBorderedNeutral-resting, ".concat(_colors.N10, ")"),
|
|
17
|
+
dark: "var(--ds-background-subtleBorderedNeutral-resting, ".concat(_colors.DN10, ")")
|
|
20
18
|
};
|
|
21
19
|
exports.defaultBackgroundColor = defaultBackgroundColor;
|
|
22
20
|
var defaultBackgroundColorFocus = {
|
|
23
|
-
light: (
|
|
24
|
-
dark: (
|
|
21
|
+
light: "var(--ds-background-default, ".concat(_colors.N0, ")"),
|
|
22
|
+
dark: "var(--ds-background-default, ".concat(_colors.DN10, ")")
|
|
25
23
|
};
|
|
26
24
|
exports.defaultBackgroundColorFocus = defaultBackgroundColorFocus;
|
|
27
25
|
var defaultBackgroundColorHover = {
|
|
28
|
-
light: (
|
|
29
|
-
dark: (
|
|
26
|
+
light: "var(--ds-background-default, ".concat(_colors.N30, ")"),
|
|
27
|
+
dark: "var(--ds-background-default, ".concat(_colors.DN30, ")")
|
|
30
28
|
};
|
|
31
29
|
exports.defaultBackgroundColorHover = defaultBackgroundColorHover;
|
|
32
30
|
var subtleBackgroundColorHover = {
|
|
33
|
-
light: (
|
|
34
|
-
dark: (
|
|
31
|
+
light: "var(--ds-background-transparentNeutral-hover, ".concat(_colors.N30, ")"),
|
|
32
|
+
dark: "var(--ds-background-transparentNeutral-hover, ".concat(_colors.DN30, ")")
|
|
35
33
|
};
|
|
36
34
|
exports.subtleBackgroundColorHover = subtleBackgroundColorHover;
|
|
37
35
|
var defaultBorderColor = {
|
|
38
|
-
light: (
|
|
39
|
-
dark: (
|
|
36
|
+
light: "var(--ds-border-neutral, ".concat(_colors.N40, ")"),
|
|
37
|
+
dark: "var(--ds-border-neutral, ".concat(_colors.DN40, ")")
|
|
40
38
|
};
|
|
41
39
|
exports.defaultBorderColor = defaultBorderColor;
|
|
42
40
|
var defaultBorderColorFocus = {
|
|
43
|
-
light: (
|
|
44
|
-
dark: (
|
|
41
|
+
light: "var(--ds-border-focus, ".concat(_colors.B100, ")"),
|
|
42
|
+
dark: "var(--ds-border-focus, ".concat(_colors.B75, ")")
|
|
45
43
|
};
|
|
46
44
|
exports.defaultBorderColorFocus = defaultBorderColorFocus;
|
|
47
45
|
var transparent = {
|
|
@@ -50,17 +48,17 @@ var transparent = {
|
|
|
50
48
|
};
|
|
51
49
|
exports.transparent = transparent;
|
|
52
50
|
var textColor = {
|
|
53
|
-
light: (
|
|
54
|
-
dark: (
|
|
51
|
+
light: "var(--ds-text-highEmphasis, ".concat(_colors.N900, ")"),
|
|
52
|
+
dark: "var(--ds-text-highEmphasis, ".concat(_colors.DN600, ")")
|
|
55
53
|
};
|
|
56
54
|
exports.textColor = textColor;
|
|
57
55
|
var disabledTextColor = {
|
|
58
|
-
light: (
|
|
59
|
-
dark: (
|
|
56
|
+
light: "var(--ds-text-disabled, ".concat(_colors.N70, ")"),
|
|
57
|
+
dark: "var(--ds-text-disabled, ".concat(_colors.DN90, ")")
|
|
60
58
|
};
|
|
61
59
|
exports.disabledTextColor = disabledTextColor;
|
|
62
60
|
var placeholderTextColor = {
|
|
63
|
-
light: (
|
|
64
|
-
dark: (
|
|
61
|
+
light: "var(--ds-text-lowEmphasis, ".concat(_colors.N100, ")"),
|
|
62
|
+
dark: "var(--ds-text-lowEmphasis, ".concat(_colors.DN90, ")")
|
|
65
63
|
};
|
|
66
64
|
exports.placeholderTextColor = placeholderTextColor;
|
package/dist/cjs/styles.js
CHANGED
|
@@ -15,8 +15,6 @@ var _colors = require("@atlaskit/theme/colors");
|
|
|
15
15
|
|
|
16
16
|
var _constants = require("@atlaskit/theme/constants");
|
|
17
17
|
|
|
18
|
-
var _tokens = require("@atlaskit/tokens");
|
|
19
|
-
|
|
20
18
|
var componentTokens = _interopRequireWildcard(require("./component-tokens"));
|
|
21
19
|
|
|
22
20
|
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
@@ -50,7 +48,7 @@ var invalidRules = {
|
|
|
50
48
|
backgroundColorHover: componentTokens.defaultBackgroundColorHover.light,
|
|
51
49
|
// ^--- the above values aren't used directly they remain because its exposed by the `textFieldColors` export
|
|
52
50
|
backgroundColorFocus: componentTokens.defaultBackgroundColorFocus.light,
|
|
53
|
-
borderColor: (
|
|
51
|
+
borderColor: "var(--ds-iconBorder-danger, ".concat(_colors.R400, ")"),
|
|
54
52
|
borderColorFocus: componentTokens.defaultBorderColorFocus.light
|
|
55
53
|
},
|
|
56
54
|
dark: {
|
|
@@ -59,7 +57,7 @@ var invalidRules = {
|
|
|
59
57
|
backgroundColorHover: componentTokens.defaultBackgroundColorHover.dark,
|
|
60
58
|
// ^--- the above values aren't used directly they remain because its exposed by the `textFieldColors` export
|
|
61
59
|
backgroundColorFocus: componentTokens.defaultBackgroundColorFocus.dark,
|
|
62
|
-
borderColor: (
|
|
60
|
+
borderColor: "var(--ds-iconBorder-danger, ".concat(_colors.R400, ")"),
|
|
63
61
|
borderColorFocus: componentTokens.defaultBorderColorFocus.dark
|
|
64
62
|
}
|
|
65
63
|
};
|
package/dist/cjs/text-field.js
CHANGED
|
@@ -38,7 +38,7 @@ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { va
|
|
|
38
38
|
var analyticsParams = {
|
|
39
39
|
componentName: 'textField',
|
|
40
40
|
packageName: "@atlaskit/textfield",
|
|
41
|
-
packageVersion: "5.1.
|
|
41
|
+
packageVersion: "5.1.4"
|
|
42
42
|
};
|
|
43
43
|
var Textfield = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {
|
|
44
44
|
var _props$appearance = props.appearance,
|
package/dist/cjs/version.json
CHANGED
|
@@ -1,46 +1,45 @@
|
|
|
1
1
|
import { B100, B75, DN10, DN30, DN40, DN600, DN90, N0, N10, N100, N30, N40, N70, N900 } from '@atlaskit/theme/colors';
|
|
2
|
-
import { token } from '@atlaskit/tokens';
|
|
3
2
|
export const disabledBackgroundColor = {
|
|
4
|
-
light:
|
|
5
|
-
dark:
|
|
3
|
+
light: `var(--ds-background-disabled, ${N10})`,
|
|
4
|
+
dark: `var(--ds-background-disabled, ${DN10})`
|
|
6
5
|
};
|
|
7
6
|
export const defaultBackgroundColor = {
|
|
8
|
-
light:
|
|
9
|
-
dark:
|
|
7
|
+
light: `var(--ds-background-subtleBorderedNeutral-resting, ${N10})`,
|
|
8
|
+
dark: `var(--ds-background-subtleBorderedNeutral-resting, ${DN10})`
|
|
10
9
|
};
|
|
11
10
|
export const defaultBackgroundColorFocus = {
|
|
12
|
-
light:
|
|
13
|
-
dark:
|
|
11
|
+
light: `var(--ds-background-default, ${N0})`,
|
|
12
|
+
dark: `var(--ds-background-default, ${DN10})`
|
|
14
13
|
};
|
|
15
14
|
export const defaultBackgroundColorHover = {
|
|
16
|
-
light:
|
|
17
|
-
dark:
|
|
15
|
+
light: `var(--ds-background-default, ${N30})`,
|
|
16
|
+
dark: `var(--ds-background-default, ${DN30})`
|
|
18
17
|
};
|
|
19
18
|
export const subtleBackgroundColorHover = {
|
|
20
|
-
light:
|
|
21
|
-
dark:
|
|
19
|
+
light: `var(--ds-background-transparentNeutral-hover, ${N30})`,
|
|
20
|
+
dark: `var(--ds-background-transparentNeutral-hover, ${DN30})`
|
|
22
21
|
};
|
|
23
22
|
export const defaultBorderColor = {
|
|
24
|
-
light:
|
|
25
|
-
dark:
|
|
23
|
+
light: `var(--ds-border-neutral, ${N40})`,
|
|
24
|
+
dark: `var(--ds-border-neutral, ${DN40})`
|
|
26
25
|
};
|
|
27
26
|
export const defaultBorderColorFocus = {
|
|
28
|
-
light:
|
|
29
|
-
dark:
|
|
27
|
+
light: `var(--ds-border-focus, ${B100})`,
|
|
28
|
+
dark: `var(--ds-border-focus, ${B75})`
|
|
30
29
|
};
|
|
31
30
|
export const transparent = {
|
|
32
31
|
light: 'transparent',
|
|
33
32
|
dark: 'transparent'
|
|
34
33
|
};
|
|
35
34
|
export const textColor = {
|
|
36
|
-
light:
|
|
37
|
-
dark:
|
|
35
|
+
light: `var(--ds-text-highEmphasis, ${N900})`,
|
|
36
|
+
dark: `var(--ds-text-highEmphasis, ${DN600})`
|
|
38
37
|
};
|
|
39
38
|
export const disabledTextColor = {
|
|
40
|
-
light:
|
|
41
|
-
dark:
|
|
39
|
+
light: `var(--ds-text-disabled, ${N70})`,
|
|
40
|
+
dark: `var(--ds-text-disabled, ${DN90})`
|
|
42
41
|
};
|
|
43
42
|
export const placeholderTextColor = {
|
|
44
|
-
light:
|
|
45
|
-
dark:
|
|
43
|
+
light: `var(--ds-text-lowEmphasis, ${N100})`,
|
|
44
|
+
dark: `var(--ds-text-lowEmphasis, ${DN90})`
|
|
46
45
|
};
|
package/dist/es2019/styles.js
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { R400 } from '@atlaskit/theme/colors';
|
|
2
2
|
import { codeFontFamily, fontFamily, fontSize as getFontSize, gridSize as getGridSize } from '@atlaskit/theme/constants';
|
|
3
|
-
import { token } from '@atlaskit/tokens';
|
|
4
3
|
import * as componentTokens from './component-tokens';
|
|
5
4
|
const fontSize = getFontSize();
|
|
6
5
|
const gridSize = getGridSize();
|
|
@@ -25,7 +24,7 @@ const invalidRules = {
|
|
|
25
24
|
backgroundColorHover: componentTokens.defaultBackgroundColorHover.light,
|
|
26
25
|
// ^--- the above values aren't used directly they remain because its exposed by the `textFieldColors` export
|
|
27
26
|
backgroundColorFocus: componentTokens.defaultBackgroundColorFocus.light,
|
|
28
|
-
borderColor:
|
|
27
|
+
borderColor: `var(--ds-iconBorder-danger, ${R400})`,
|
|
29
28
|
borderColorFocus: componentTokens.defaultBorderColorFocus.light
|
|
30
29
|
},
|
|
31
30
|
dark: {
|
|
@@ -34,7 +33,7 @@ const invalidRules = {
|
|
|
34
33
|
backgroundColorHover: componentTokens.defaultBackgroundColorHover.dark,
|
|
35
34
|
// ^--- the above values aren't used directly they remain because its exposed by the `textFieldColors` export
|
|
36
35
|
backgroundColorFocus: componentTokens.defaultBackgroundColorFocus.dark,
|
|
37
|
-
borderColor:
|
|
36
|
+
borderColor: `var(--ds-iconBorder-danger, ${R400})`,
|
|
38
37
|
borderColorFocus: componentTokens.defaultBorderColorFocus.dark
|
|
39
38
|
}
|
|
40
39
|
};
|
|
@@ -9,7 +9,7 @@ import { containerStyles as getContainerStyles, inputStyles as getInputStyles }
|
|
|
9
9
|
const analyticsParams = {
|
|
10
10
|
componentName: 'textField',
|
|
11
11
|
packageName: "@atlaskit/textfield",
|
|
12
|
-
packageVersion: "5.1.
|
|
12
|
+
packageVersion: "5.1.4"
|
|
13
13
|
};
|
|
14
14
|
const Textfield = /*#__PURE__*/forwardRef((props, ref) => {
|
|
15
15
|
const {
|
package/dist/es2019/version.json
CHANGED
|
@@ -1,46 +1,45 @@
|
|
|
1
1
|
import { B100, B75, DN10, DN30, DN40, DN600, DN90, N0, N10, N100, N30, N40, N70, N900 } from '@atlaskit/theme/colors';
|
|
2
|
-
import { token } from '@atlaskit/tokens';
|
|
3
2
|
export var disabledBackgroundColor = {
|
|
4
|
-
light:
|
|
5
|
-
dark:
|
|
3
|
+
light: "var(--ds-background-disabled, ".concat(N10, ")"),
|
|
4
|
+
dark: "var(--ds-background-disabled, ".concat(DN10, ")")
|
|
6
5
|
};
|
|
7
6
|
export var defaultBackgroundColor = {
|
|
8
|
-
light:
|
|
9
|
-
dark:
|
|
7
|
+
light: "var(--ds-background-subtleBorderedNeutral-resting, ".concat(N10, ")"),
|
|
8
|
+
dark: "var(--ds-background-subtleBorderedNeutral-resting, ".concat(DN10, ")")
|
|
10
9
|
};
|
|
11
10
|
export var defaultBackgroundColorFocus = {
|
|
12
|
-
light:
|
|
13
|
-
dark:
|
|
11
|
+
light: "var(--ds-background-default, ".concat(N0, ")"),
|
|
12
|
+
dark: "var(--ds-background-default, ".concat(DN10, ")")
|
|
14
13
|
};
|
|
15
14
|
export var defaultBackgroundColorHover = {
|
|
16
|
-
light:
|
|
17
|
-
dark:
|
|
15
|
+
light: "var(--ds-background-default, ".concat(N30, ")"),
|
|
16
|
+
dark: "var(--ds-background-default, ".concat(DN30, ")")
|
|
18
17
|
};
|
|
19
18
|
export var subtleBackgroundColorHover = {
|
|
20
|
-
light:
|
|
21
|
-
dark:
|
|
19
|
+
light: "var(--ds-background-transparentNeutral-hover, ".concat(N30, ")"),
|
|
20
|
+
dark: "var(--ds-background-transparentNeutral-hover, ".concat(DN30, ")")
|
|
22
21
|
};
|
|
23
22
|
export var defaultBorderColor = {
|
|
24
|
-
light:
|
|
25
|
-
dark:
|
|
23
|
+
light: "var(--ds-border-neutral, ".concat(N40, ")"),
|
|
24
|
+
dark: "var(--ds-border-neutral, ".concat(DN40, ")")
|
|
26
25
|
};
|
|
27
26
|
export var defaultBorderColorFocus = {
|
|
28
|
-
light:
|
|
29
|
-
dark:
|
|
27
|
+
light: "var(--ds-border-focus, ".concat(B100, ")"),
|
|
28
|
+
dark: "var(--ds-border-focus, ".concat(B75, ")")
|
|
30
29
|
};
|
|
31
30
|
export var transparent = {
|
|
32
31
|
light: 'transparent',
|
|
33
32
|
dark: 'transparent'
|
|
34
33
|
};
|
|
35
34
|
export var textColor = {
|
|
36
|
-
light:
|
|
37
|
-
dark:
|
|
35
|
+
light: "var(--ds-text-highEmphasis, ".concat(N900, ")"),
|
|
36
|
+
dark: "var(--ds-text-highEmphasis, ".concat(DN600, ")")
|
|
38
37
|
};
|
|
39
38
|
export var disabledTextColor = {
|
|
40
|
-
light:
|
|
41
|
-
dark:
|
|
39
|
+
light: "var(--ds-text-disabled, ".concat(N70, ")"),
|
|
40
|
+
dark: "var(--ds-text-disabled, ".concat(DN90, ")")
|
|
42
41
|
};
|
|
43
42
|
export var placeholderTextColor = {
|
|
44
|
-
light:
|
|
45
|
-
dark:
|
|
43
|
+
light: "var(--ds-text-lowEmphasis, ".concat(N100, ")"),
|
|
44
|
+
dark: "var(--ds-text-lowEmphasis, ".concat(DN90, ")")
|
|
46
45
|
};
|
package/dist/esm/styles.js
CHANGED
|
@@ -6,7 +6,6 @@ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { va
|
|
|
6
6
|
|
|
7
7
|
import { R400 } from '@atlaskit/theme/colors';
|
|
8
8
|
import { codeFontFamily, fontFamily, fontSize as getFontSize, gridSize as getGridSize } from '@atlaskit/theme/constants';
|
|
9
|
-
import { token } from '@atlaskit/tokens';
|
|
10
9
|
import * as componentTokens from './component-tokens';
|
|
11
10
|
var fontSize = getFontSize();
|
|
12
11
|
var gridSize = getGridSize();
|
|
@@ -31,7 +30,7 @@ var invalidRules = {
|
|
|
31
30
|
backgroundColorHover: componentTokens.defaultBackgroundColorHover.light,
|
|
32
31
|
// ^--- the above values aren't used directly they remain because its exposed by the `textFieldColors` export
|
|
33
32
|
backgroundColorFocus: componentTokens.defaultBackgroundColorFocus.light,
|
|
34
|
-
borderColor:
|
|
33
|
+
borderColor: "var(--ds-iconBorder-danger, ".concat(R400, ")"),
|
|
35
34
|
borderColorFocus: componentTokens.defaultBorderColorFocus.light
|
|
36
35
|
},
|
|
37
36
|
dark: {
|
|
@@ -40,7 +39,7 @@ var invalidRules = {
|
|
|
40
39
|
backgroundColorHover: componentTokens.defaultBackgroundColorHover.dark,
|
|
41
40
|
// ^--- the above values aren't used directly they remain because its exposed by the `textFieldColors` export
|
|
42
41
|
backgroundColorFocus: componentTokens.defaultBackgroundColorFocus.dark,
|
|
43
|
-
borderColor:
|
|
42
|
+
borderColor: "var(--ds-iconBorder-danger, ".concat(R400, ")"),
|
|
44
43
|
borderColorFocus: componentTokens.defaultBorderColorFocus.dark
|
|
45
44
|
}
|
|
46
45
|
};
|
package/dist/esm/text-field.js
CHANGED
|
@@ -16,7 +16,7 @@ import { containerStyles as getContainerStyles, inputStyles as getInputStyles }
|
|
|
16
16
|
var analyticsParams = {
|
|
17
17
|
componentName: 'textField',
|
|
18
18
|
packageName: "@atlaskit/textfield",
|
|
19
|
-
packageVersion: "5.1.
|
|
19
|
+
packageVersion: "5.1.4"
|
|
20
20
|
};
|
|
21
21
|
var Textfield = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
22
22
|
var _props$appearance = props.appearance,
|
package/dist/esm/version.json
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/textfield",
|
|
3
|
-
"version": "5.1.
|
|
3
|
+
"version": "5.1.4",
|
|
4
4
|
"description": "A text field is an input that allows a user to write or edit text.",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"registry": "https://registry.npmjs.org/"
|
|
@@ -28,7 +28,7 @@
|
|
|
28
28
|
"dependencies": {
|
|
29
29
|
"@atlaskit/analytics-next": "^8.2.0",
|
|
30
30
|
"@atlaskit/theme": "^12.0.0",
|
|
31
|
-
"@atlaskit/tokens": "^0.
|
|
31
|
+
"@atlaskit/tokens": "^0.4.0",
|
|
32
32
|
"@babel/runtime": "^7.0.0",
|
|
33
33
|
"@emotion/core": "^10.0.9"
|
|
34
34
|
},
|
|
@@ -67,7 +67,10 @@
|
|
|
67
67
|
},
|
|
68
68
|
"@repo/internal": {
|
|
69
69
|
"ui-components": "lite-mode",
|
|
70
|
-
"styling":
|
|
70
|
+
"styling": [
|
|
71
|
+
"static",
|
|
72
|
+
"emotion"
|
|
73
|
+
],
|
|
71
74
|
"analytics": "analytics-next",
|
|
72
75
|
"theming": "tokens",
|
|
73
76
|
"design-system": "v1",
|