@atlaskit/textfield 6.2.0 → 6.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +13 -0
- package/dist/cjs/styles.js +7 -8
- package/dist/cjs/text-field.js +1 -1
- package/dist/es2019/styles.js +8 -9
- package/dist/es2019/text-field.js +1 -1
- package/dist/esm/styles.js +8 -9
- package/dist/esm/text-field.js +1 -1
- package/dist/types/styles.d.ts +4 -4
- package/dist/types-ts4.5/styles.d.ts +4 -4
- package/package.json +2 -11
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,18 @@
|
|
|
1
1
|
# @atlaskit/textfield
|
|
2
2
|
|
|
3
|
+
## 6.3.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- [#94675](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/94675)
|
|
8
|
+
[`5d9e1dccacca`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/5d9e1dccacca) -
|
|
9
|
+
[ux] Update input border color token to meet 3:1 color contrast ratioLight theme:
|
|
10
|
+
color.border.input: #091E4224 → #8590A2Dark mode: color.border.input: #A6C5E229 → #738496
|
|
11
|
+
|
|
12
|
+
### Patch Changes
|
|
13
|
+
|
|
14
|
+
- Updated dependencies
|
|
15
|
+
|
|
3
16
|
## 6.2.0
|
|
4
17
|
|
|
5
18
|
### Minor Changes
|
package/dist/cjs/styles.js
CHANGED
|
@@ -6,7 +6,6 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
});
|
|
7
7
|
exports.inputStyles = exports.containerStyles = void 0;
|
|
8
8
|
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
9
|
-
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
10
9
|
var _colors = require("@atlaskit/theme/colors");
|
|
11
10
|
var _constants = require("@atlaskit/theme/constants");
|
|
12
11
|
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
@@ -29,7 +28,7 @@ var backgroundColorHover = {
|
|
|
29
28
|
none: 'transparent'
|
|
30
29
|
};
|
|
31
30
|
var borderColor = {
|
|
32
|
-
standard: "var(--ds-border-input, ".concat(
|
|
31
|
+
standard: "var(--ds-border-input, ".concat(_colors.N100, ")"),
|
|
33
32
|
subtle: 'transparent',
|
|
34
33
|
none: 'transparent'
|
|
35
34
|
};
|
|
@@ -39,7 +38,7 @@ var borderColorFocus = {
|
|
|
39
38
|
none: 'transparent'
|
|
40
39
|
};
|
|
41
40
|
var borderColorHover = {
|
|
42
|
-
standard: "var(--ds-border-input, ".concat(
|
|
41
|
+
standard: "var(--ds-border-input, ".concat(_colors.N100, ")"),
|
|
43
42
|
subtle: "var(--ds-border-input, transparent)",
|
|
44
43
|
none: 'transparent'
|
|
45
44
|
};
|
|
@@ -56,7 +55,7 @@ var getContainerTextBgAndBorderColor = function getContainerTextBgAndBorderColor
|
|
|
56
55
|
'&:focus-within:not([data-disabled])': {
|
|
57
56
|
backgroundColor: backgroundColorFocus[appearance],
|
|
58
57
|
borderColor: borderColorFocus[appearance],
|
|
59
|
-
boxShadow:
|
|
58
|
+
boxShadow: "inset 0 0 0 ".concat("var(--ds-border-width, 1px)", " ", borderColorFocus[appearance])
|
|
60
59
|
},
|
|
61
60
|
'&[data-disabled]': _objectSpread({
|
|
62
61
|
color: "var(--ds-text-disabled, ".concat(_colors.N70, ")"),
|
|
@@ -67,12 +66,12 @@ var getContainerTextBgAndBorderColor = function getContainerTextBgAndBorderColor
|
|
|
67
66
|
}),
|
|
68
67
|
'&[data-invalid], &[data-invalid]:hover': {
|
|
69
68
|
borderColor: "var(--ds-border-danger, ".concat(_colors.R400, ")"),
|
|
70
|
-
boxShadow:
|
|
69
|
+
boxShadow: "inset 0 0 0 ".concat("var(--ds-border-width, 1px)", " ", "var(--ds-border-danger, ".concat(_colors.R400, ")"))
|
|
71
70
|
},
|
|
72
71
|
'&[data-invalid]:focus-within': {
|
|
73
72
|
backgroundColor: "var(--ds-background-input-pressed, ".concat(_colors.N0, ")"),
|
|
74
73
|
borderColor: "var(--ds-border-focused, ".concat(_colors.B200, ")"),
|
|
75
|
-
boxShadow:
|
|
74
|
+
boxShadow: "inset 0 0 0 ".concat("var(--ds-border-width, 1px)", " ", "var(--ds-border-focused, ".concat(_colors.B200, ")"))
|
|
76
75
|
},
|
|
77
76
|
'@media screen and (-ms-high-contrast: active)': {
|
|
78
77
|
'&[data-invalid]:focus-within': {
|
|
@@ -102,8 +101,8 @@ var containerStyles = exports.containerStyles = function containerStyles(appeara
|
|
|
102
101
|
alignItems: 'center'
|
|
103
102
|
}, getContainerTextBgAndBorderColor(appearance)), {}, {
|
|
104
103
|
borderRadius: 3,
|
|
105
|
-
borderWidth:
|
|
106
|
-
},
|
|
104
|
+
borderWidth: "var(--ds-border-width, 1px)"
|
|
105
|
+
}, appearance !== 'none' ? {
|
|
107
106
|
padding: "var(--ds-border-width, 1px)".concat(" 0")
|
|
108
107
|
} : {}), {}, {
|
|
109
108
|
borderStyle: appearance === 'none' ? 'none' : 'solid',
|
package/dist/cjs/text-field.js
CHANGED
|
@@ -23,7 +23,7 @@ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t =
|
|
|
23
23
|
var analyticsParams = {
|
|
24
24
|
componentName: 'textField',
|
|
25
25
|
packageName: "@atlaskit/textfield",
|
|
26
|
-
packageVersion: "6.
|
|
26
|
+
packageVersion: "6.3.0"
|
|
27
27
|
};
|
|
28
28
|
var TextfieldComponent = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {
|
|
29
29
|
var _props$appearance = props.appearance,
|
package/dist/es2019/styles.js
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { B200, N0, N10, N100, N200, N30, N40, N70, N900, R400 } from '@atlaskit/theme/colors';
|
|
1
|
+
import { B200, N0, N10, N100, N200, N30, N70, N900, R400 } from '@atlaskit/theme/colors';
|
|
3
2
|
import { codeFontFamily, fontFamily, fontSize as getFontSize,
|
|
4
3
|
// eslint-disable-next-line @atlaskit/design-system/no-deprecated-imports
|
|
5
4
|
gridSize as getGridSize } from '@atlaskit/theme/constants';
|
|
@@ -21,7 +20,7 @@ const backgroundColorHover = {
|
|
|
21
20
|
none: 'transparent'
|
|
22
21
|
};
|
|
23
22
|
const borderColor = {
|
|
24
|
-
standard: `var(--ds-border-input, ${
|
|
23
|
+
standard: `var(--ds-border-input, ${N100})`,
|
|
25
24
|
subtle: 'transparent',
|
|
26
25
|
none: 'transparent'
|
|
27
26
|
};
|
|
@@ -31,7 +30,7 @@ const borderColorFocus = {
|
|
|
31
30
|
none: 'transparent'
|
|
32
31
|
};
|
|
33
32
|
const borderColorHover = {
|
|
34
|
-
standard: `var(--ds-border-input, ${
|
|
33
|
+
standard: `var(--ds-border-input, ${N100})`,
|
|
35
34
|
subtle: "var(--ds-border-input, transparent)",
|
|
36
35
|
none: 'transparent'
|
|
37
36
|
};
|
|
@@ -47,7 +46,7 @@ const getContainerTextBgAndBorderColor = appearance => ({
|
|
|
47
46
|
'&:focus-within:not([data-disabled])': {
|
|
48
47
|
backgroundColor: backgroundColorFocus[appearance],
|
|
49
48
|
borderColor: borderColorFocus[appearance],
|
|
50
|
-
boxShadow:
|
|
49
|
+
boxShadow: `inset 0 0 0 ${"var(--ds-border-width, 1px)"} ${borderColorFocus[appearance]}`
|
|
51
50
|
},
|
|
52
51
|
'&[data-disabled]': {
|
|
53
52
|
color: `var(--ds-text-disabled, ${N70})`,
|
|
@@ -61,12 +60,12 @@ const getContainerTextBgAndBorderColor = appearance => ({
|
|
|
61
60
|
},
|
|
62
61
|
'&[data-invalid], &[data-invalid]:hover': {
|
|
63
62
|
borderColor: `var(--ds-border-danger, ${R400})`,
|
|
64
|
-
boxShadow:
|
|
63
|
+
boxShadow: `inset 0 0 0 ${"var(--ds-border-width, 1px)"} ${`var(--ds-border-danger, ${R400})`}`
|
|
65
64
|
},
|
|
66
65
|
'&[data-invalid]:focus-within': {
|
|
67
66
|
backgroundColor: `var(--ds-background-input-pressed, ${N0})`,
|
|
68
67
|
borderColor: `var(--ds-border-focused, ${B200})`,
|
|
69
|
-
boxShadow:
|
|
68
|
+
boxShadow: `inset 0 0 0 ${"var(--ds-border-width, 1px)"} ${`var(--ds-border-focused, ${B200})`}`
|
|
70
69
|
},
|
|
71
70
|
'@media screen and (-ms-high-contrast: active)': {
|
|
72
71
|
'&[data-invalid]:focus-within': {
|
|
@@ -92,9 +91,9 @@ export const containerStyles = (appearance, width) => ({
|
|
|
92
91
|
alignItems: 'center',
|
|
93
92
|
...getContainerTextBgAndBorderColor(appearance),
|
|
94
93
|
borderRadius: 3,
|
|
95
|
-
borderWidth:
|
|
94
|
+
borderWidth: "var(--ds-border-width, 1px)",
|
|
96
95
|
// add 1px padding on both top and bottom to keep the same overall height after border reduced from 2px to 1px under feature flag
|
|
97
|
-
...(
|
|
96
|
+
...(appearance !== 'none' ? {
|
|
98
97
|
padding: `${"var(--ds-border-width, 1px)"} 0`
|
|
99
98
|
} : {}),
|
|
100
99
|
borderStyle: appearance === 'none' ? 'none' : 'solid',
|
|
@@ -7,7 +7,7 @@ import { containerStyles as getContainerStyles, inputStyles as getInputStyles }
|
|
|
7
7
|
const analyticsParams = {
|
|
8
8
|
componentName: 'textField',
|
|
9
9
|
packageName: "@atlaskit/textfield",
|
|
10
|
-
packageVersion: "6.
|
|
10
|
+
packageVersion: "6.3.0"
|
|
11
11
|
};
|
|
12
12
|
const TextfieldComponent = /*#__PURE__*/forwardRef((props, ref) => {
|
|
13
13
|
const {
|
package/dist/esm/styles.js
CHANGED
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
2
2
|
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
3
3
|
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
4
|
-
import {
|
|
5
|
-
import { B200, N0, N10, N100, N200, N30, N40, N70, N900, R400 } from '@atlaskit/theme/colors';
|
|
4
|
+
import { B200, N0, N10, N100, N200, N30, N70, N900, R400 } from '@atlaskit/theme/colors';
|
|
6
5
|
import { codeFontFamily, fontFamily, fontSize as getFontSize,
|
|
7
6
|
// eslint-disable-next-line @atlaskit/design-system/no-deprecated-imports
|
|
8
7
|
gridSize as getGridSize } from '@atlaskit/theme/constants';
|
|
@@ -24,7 +23,7 @@ var backgroundColorHover = {
|
|
|
24
23
|
none: 'transparent'
|
|
25
24
|
};
|
|
26
25
|
var borderColor = {
|
|
27
|
-
standard: "var(--ds-border-input, ".concat(
|
|
26
|
+
standard: "var(--ds-border-input, ".concat(N100, ")"),
|
|
28
27
|
subtle: 'transparent',
|
|
29
28
|
none: 'transparent'
|
|
30
29
|
};
|
|
@@ -34,7 +33,7 @@ var borderColorFocus = {
|
|
|
34
33
|
none: 'transparent'
|
|
35
34
|
};
|
|
36
35
|
var borderColorHover = {
|
|
37
|
-
standard: "var(--ds-border-input, ".concat(
|
|
36
|
+
standard: "var(--ds-border-input, ".concat(N100, ")"),
|
|
38
37
|
subtle: "var(--ds-border-input, transparent)",
|
|
39
38
|
none: 'transparent'
|
|
40
39
|
};
|
|
@@ -51,7 +50,7 @@ var getContainerTextBgAndBorderColor = function getContainerTextBgAndBorderColor
|
|
|
51
50
|
'&:focus-within:not([data-disabled])': {
|
|
52
51
|
backgroundColor: backgroundColorFocus[appearance],
|
|
53
52
|
borderColor: borderColorFocus[appearance],
|
|
54
|
-
boxShadow:
|
|
53
|
+
boxShadow: "inset 0 0 0 ".concat("var(--ds-border-width, 1px)", " ", borderColorFocus[appearance])
|
|
55
54
|
},
|
|
56
55
|
'&[data-disabled]': _objectSpread({
|
|
57
56
|
color: "var(--ds-text-disabled, ".concat(N70, ")"),
|
|
@@ -62,12 +61,12 @@ var getContainerTextBgAndBorderColor = function getContainerTextBgAndBorderColor
|
|
|
62
61
|
}),
|
|
63
62
|
'&[data-invalid], &[data-invalid]:hover': {
|
|
64
63
|
borderColor: "var(--ds-border-danger, ".concat(R400, ")"),
|
|
65
|
-
boxShadow:
|
|
64
|
+
boxShadow: "inset 0 0 0 ".concat("var(--ds-border-width, 1px)", " ", "var(--ds-border-danger, ".concat(R400, ")"))
|
|
66
65
|
},
|
|
67
66
|
'&[data-invalid]:focus-within': {
|
|
68
67
|
backgroundColor: "var(--ds-background-input-pressed, ".concat(N0, ")"),
|
|
69
68
|
borderColor: "var(--ds-border-focused, ".concat(B200, ")"),
|
|
70
|
-
boxShadow:
|
|
69
|
+
boxShadow: "inset 0 0 0 ".concat("var(--ds-border-width, 1px)", " ", "var(--ds-border-focused, ".concat(B200, ")"))
|
|
71
70
|
},
|
|
72
71
|
'@media screen and (-ms-high-contrast: active)': {
|
|
73
72
|
'&[data-invalid]:focus-within': {
|
|
@@ -97,8 +96,8 @@ export var containerStyles = function containerStyles(appearance, width) {
|
|
|
97
96
|
alignItems: 'center'
|
|
98
97
|
}, getContainerTextBgAndBorderColor(appearance)), {}, {
|
|
99
98
|
borderRadius: 3,
|
|
100
|
-
borderWidth:
|
|
101
|
-
},
|
|
99
|
+
borderWidth: "var(--ds-border-width, 1px)"
|
|
100
|
+
}, appearance !== 'none' ? {
|
|
102
101
|
padding: "var(--ds-border-width, 1px)".concat(" 0")
|
|
103
102
|
} : {}), {}, {
|
|
104
103
|
borderStyle: appearance === 'none' ? 'none' : 'solid',
|
package/dist/esm/text-field.js
CHANGED
|
@@ -13,7 +13,7 @@ import { containerStyles as getContainerStyles, inputStyles as getInputStyles }
|
|
|
13
13
|
var analyticsParams = {
|
|
14
14
|
componentName: 'textField',
|
|
15
15
|
packageName: "@atlaskit/textfield",
|
|
16
|
-
packageVersion: "6.
|
|
16
|
+
packageVersion: "6.3.0"
|
|
17
17
|
};
|
|
18
18
|
var TextfieldComponent = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
19
19
|
var _props$appearance = props.appearance,
|
package/dist/types/styles.d.ts
CHANGED
|
@@ -14,7 +14,7 @@ export declare const containerStyles: (appearance: Appearance, width?: string |
|
|
|
14
14
|
readonly pointerEvents: "auto";
|
|
15
15
|
readonly padding?: string | undefined;
|
|
16
16
|
readonly borderRadius: 3;
|
|
17
|
-
readonly borderWidth: "var(--ds-border-width)"
|
|
17
|
+
readonly borderWidth: "var(--ds-border-width)";
|
|
18
18
|
readonly backgroundColor: string;
|
|
19
19
|
readonly borderColor: string;
|
|
20
20
|
readonly color: "var(--ds-text)";
|
|
@@ -26,7 +26,7 @@ export declare const containerStyles: (appearance: Appearance, width?: string |
|
|
|
26
26
|
readonly '&:focus-within:not([data-disabled])': {
|
|
27
27
|
backgroundColor: string;
|
|
28
28
|
borderColor: string;
|
|
29
|
-
boxShadow: string
|
|
29
|
+
boxShadow: string;
|
|
30
30
|
};
|
|
31
31
|
readonly '&[data-disabled]': {
|
|
32
32
|
backgroundColor?: "var(--ds-background-disabled)" | undefined;
|
|
@@ -36,12 +36,12 @@ export declare const containerStyles: (appearance: Appearance, width?: string |
|
|
|
36
36
|
};
|
|
37
37
|
readonly '&[data-invalid], &[data-invalid]:hover': {
|
|
38
38
|
borderColor: "var(--ds-border-danger)";
|
|
39
|
-
boxShadow: string
|
|
39
|
+
boxShadow: string;
|
|
40
40
|
};
|
|
41
41
|
readonly '&[data-invalid]:focus-within': {
|
|
42
42
|
backgroundColor: "var(--ds-background-input-pressed)";
|
|
43
43
|
borderColor: "var(--ds-border-focused)";
|
|
44
|
-
boxShadow: string
|
|
44
|
+
boxShadow: string;
|
|
45
45
|
};
|
|
46
46
|
readonly '@media screen and (-ms-high-contrast: active)': {
|
|
47
47
|
'&[data-invalid]:focus-within': {
|
|
@@ -14,7 +14,7 @@ export declare const containerStyles: (appearance: Appearance, width?: string |
|
|
|
14
14
|
readonly pointerEvents: "auto";
|
|
15
15
|
readonly padding?: string | undefined;
|
|
16
16
|
readonly borderRadius: 3;
|
|
17
|
-
readonly borderWidth: "var(--ds-border-width)"
|
|
17
|
+
readonly borderWidth: "var(--ds-border-width)";
|
|
18
18
|
readonly backgroundColor: string;
|
|
19
19
|
readonly borderColor: string;
|
|
20
20
|
readonly color: "var(--ds-text)";
|
|
@@ -26,7 +26,7 @@ export declare const containerStyles: (appearance: Appearance, width?: string |
|
|
|
26
26
|
readonly '&:focus-within:not([data-disabled])': {
|
|
27
27
|
backgroundColor: string;
|
|
28
28
|
borderColor: string;
|
|
29
|
-
boxShadow: string
|
|
29
|
+
boxShadow: string;
|
|
30
30
|
};
|
|
31
31
|
readonly '&[data-disabled]': {
|
|
32
32
|
backgroundColor?: "var(--ds-background-disabled)" | undefined;
|
|
@@ -36,12 +36,12 @@ export declare const containerStyles: (appearance: Appearance, width?: string |
|
|
|
36
36
|
};
|
|
37
37
|
readonly '&[data-invalid], &[data-invalid]:hover': {
|
|
38
38
|
borderColor: "var(--ds-border-danger)";
|
|
39
|
-
boxShadow: string
|
|
39
|
+
boxShadow: string;
|
|
40
40
|
};
|
|
41
41
|
readonly '&[data-invalid]:focus-within': {
|
|
42
42
|
backgroundColor: "var(--ds-background-input-pressed)";
|
|
43
43
|
borderColor: "var(--ds-border-focused)";
|
|
44
|
-
boxShadow: string
|
|
44
|
+
boxShadow: string;
|
|
45
45
|
};
|
|
46
46
|
readonly '@media screen and (-ms-high-contrast: active)': {
|
|
47
47
|
'&[data-invalid]:focus-within': {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/textfield",
|
|
3
|
-
"version": "6.
|
|
3
|
+
"version": "6.3.0",
|
|
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,9 +28,8 @@
|
|
|
28
28
|
},
|
|
29
29
|
"dependencies": {
|
|
30
30
|
"@atlaskit/analytics-next": "^9.3.0",
|
|
31
|
-
"@atlaskit/platform-feature-flags": "^0.2.0",
|
|
32
31
|
"@atlaskit/theme": "^12.7.0",
|
|
33
|
-
"@atlaskit/tokens": "^1.
|
|
32
|
+
"@atlaskit/tokens": "^1.45.0",
|
|
34
33
|
"@babel/runtime": "^7.0.0",
|
|
35
34
|
"@emotion/react": "^11.7.1"
|
|
36
35
|
},
|
|
@@ -91,14 +90,6 @@
|
|
|
91
90
|
"af:exports": {
|
|
92
91
|
".": "./src/index.tsx"
|
|
93
92
|
},
|
|
94
|
-
"platform-feature-flags": {
|
|
95
|
-
"platform.design-system-team.border-checkbox_nyoiu": {
|
|
96
|
-
"type": "boolean"
|
|
97
|
-
},
|
|
98
|
-
"platform.design-system-team.update-input-border-wdith_5abwv": {
|
|
99
|
-
"type": "boolean"
|
|
100
|
-
}
|
|
101
|
-
},
|
|
102
93
|
"homepage": "https://atlassian.design/components/textfield/",
|
|
103
94
|
"prettier": "@atlassian/atlassian-frontend-prettier-config-1.0.1"
|
|
104
95
|
}
|