@atlaskit/textfield 6.3.1 → 6.4.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 +593 -582
- package/__perf__/examples.tsx +34 -37
- package/codemods/5.0.0-lite-mode.tsx +5 -8
- package/codemods/__tests__/5.0.0-lite-mode.tsx +14 -14
- package/codemods/__tests__/remove-imports.tsx +29 -31
- package/codemods/__tests__/remove-prop.tsx +28 -28
- package/codemods/__tests__/rename-disabled-to-isdisabled.tsx +28 -28
- package/codemods/__tests__/rename-imports.tsx +45 -48
- package/codemods/migrations/remove-imports.tsx +3 -3
- package/codemods/migrations/rename-disabled-to-isdisabled.tsx +1 -5
- package/codemods/migrations/rename-imports.tsx +8 -8
- package/codemods/migrations/utils.tsx +279 -320
- package/dist/cjs/text-field.js +8 -2
- package/dist/es2019/text-field.js +9 -2
- package/dist/esm/text-field.js +9 -2
- package/dist/types/text-field.d.ts +4 -1
- package/dist/types/types.d.ts +1 -1
- package/dist/types-ts4.5/text-field.d.ts +4 -1
- package/dist/types-ts4.5/types.d.ts +1 -1
- package/package.json +92 -94
- package/report.api.md +21 -23
package/dist/cjs/text-field.js
CHANGED
|
@@ -15,7 +15,11 @@ var _react2 = require("@emotion/react");
|
|
|
15
15
|
var _analyticsNext = require("@atlaskit/analytics-next");
|
|
16
16
|
var _styles = require("./styles");
|
|
17
17
|
var _excluded = ["appearance", "className", "elemAfterInput", "elemBeforeInput", "isCompact", "isDisabled", "isInvalid", "isMonospaced", "isReadOnly", "isRequired", "name", "onBlur", "onChange", "onFocus", "onMouseDown", "placeholder", "testId", "width"];
|
|
18
|
+
/**
|
|
19
|
+
* @jsxRuntime classic
|
|
20
|
+
*/
|
|
18
21
|
/** @jsx jsx */
|
|
22
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
19
23
|
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
|
|
20
24
|
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof3(e) && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && Object.prototype.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
|
|
21
25
|
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; }
|
|
@@ -23,7 +27,7 @@ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t =
|
|
|
23
27
|
var analyticsParams = {
|
|
24
28
|
componentName: 'textField',
|
|
25
29
|
packageName: "@atlaskit/textfield",
|
|
26
|
-
packageVersion: "6.
|
|
30
|
+
packageVersion: "6.4.0"
|
|
27
31
|
};
|
|
28
32
|
var TextfieldComponent = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {
|
|
29
33
|
var _props$appearance = props.appearance,
|
|
@@ -111,7 +115,9 @@ var TextfieldComponent = /*#__PURE__*/(0, _react.forwardRef)(function (props, re
|
|
|
111
115
|
// TODO: When removing legacy theming fix this.
|
|
112
116
|
// eslint-disable-next-line @atlaskit/design-system/consistent-css-prop-usage
|
|
113
117
|
,
|
|
114
|
-
css: containerStyles
|
|
118
|
+
css: containerStyles
|
|
119
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
|
|
120
|
+
,
|
|
115
121
|
className: className
|
|
116
122
|
}, elemBeforeInput, (0, _react2.jsx)("input", (0, _extends2.default)({}, spreadProps, {
|
|
117
123
|
"aria-invalid": isInvalid ? isInvalid : undefined
|
|
@@ -1,13 +1,18 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/extends";
|
|
2
|
+
/**
|
|
3
|
+
* @jsxRuntime classic
|
|
4
|
+
*/
|
|
2
5
|
/** @jsx jsx */
|
|
3
6
|
import React, { forwardRef, memo, useCallback, useMemo, useRef } from 'react';
|
|
7
|
+
|
|
8
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
4
9
|
import { jsx } from '@emotion/react';
|
|
5
10
|
import { usePlatformLeafEventHandler } from '@atlaskit/analytics-next';
|
|
6
11
|
import { containerStyles as getContainerStyles, inputStyles as getInputStyles } from './styles';
|
|
7
12
|
const analyticsParams = {
|
|
8
13
|
componentName: 'textField',
|
|
9
14
|
packageName: "@atlaskit/textfield",
|
|
10
|
-
packageVersion: "6.
|
|
15
|
+
packageVersion: "6.4.0"
|
|
11
16
|
};
|
|
12
17
|
const TextfieldComponent = /*#__PURE__*/forwardRef((props, ref) => {
|
|
13
18
|
const {
|
|
@@ -90,7 +95,9 @@ const TextfieldComponent = /*#__PURE__*/forwardRef((props, ref) => {
|
|
|
90
95
|
// TODO: When removing legacy theming fix this.
|
|
91
96
|
// eslint-disable-next-line @atlaskit/design-system/consistent-css-prop-usage
|
|
92
97
|
,
|
|
93
|
-
css: containerStyles
|
|
98
|
+
css: containerStyles
|
|
99
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
|
|
100
|
+
,
|
|
94
101
|
className: className
|
|
95
102
|
}, elemBeforeInput, jsx("input", _extends({}, spreadProps, {
|
|
96
103
|
"aria-invalid": isInvalid ? isInvalid : undefined
|
package/dist/esm/text-field.js
CHANGED
|
@@ -5,15 +5,20 @@ import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProper
|
|
|
5
5
|
var _excluded = ["appearance", "className", "elemAfterInput", "elemBeforeInput", "isCompact", "isDisabled", "isInvalid", "isMonospaced", "isReadOnly", "isRequired", "name", "onBlur", "onChange", "onFocus", "onMouseDown", "placeholder", "testId", "width"];
|
|
6
6
|
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; }
|
|
7
7
|
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; }
|
|
8
|
+
/**
|
|
9
|
+
* @jsxRuntime classic
|
|
10
|
+
*/
|
|
8
11
|
/** @jsx jsx */
|
|
9
12
|
import React, { forwardRef, memo, useCallback, useMemo, useRef } from 'react';
|
|
13
|
+
|
|
14
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
10
15
|
import { jsx } from '@emotion/react';
|
|
11
16
|
import { usePlatformLeafEventHandler } from '@atlaskit/analytics-next';
|
|
12
17
|
import { containerStyles as getContainerStyles, inputStyles as getInputStyles } from './styles';
|
|
13
18
|
var analyticsParams = {
|
|
14
19
|
componentName: 'textField',
|
|
15
20
|
packageName: "@atlaskit/textfield",
|
|
16
|
-
packageVersion: "6.
|
|
21
|
+
packageVersion: "6.4.0"
|
|
17
22
|
};
|
|
18
23
|
var TextfieldComponent = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
19
24
|
var _props$appearance = props.appearance,
|
|
@@ -101,7 +106,9 @@ var TextfieldComponent = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
|
101
106
|
// TODO: When removing legacy theming fix this.
|
|
102
107
|
// eslint-disable-next-line @atlaskit/design-system/consistent-css-prop-usage
|
|
103
108
|
,
|
|
104
|
-
css: containerStyles
|
|
109
|
+
css: containerStyles
|
|
110
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
|
|
111
|
+
,
|
|
105
112
|
className: className
|
|
106
113
|
}, elemBeforeInput, jsx("input", _extends({}, spreadProps, {
|
|
107
114
|
"aria-invalid": isInvalid ? isInvalid : undefined
|
package/dist/types/types.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { type AllHTMLAttributes, type FormEventHandler, type default as React } from 'react';
|
|
2
2
|
export interface TextfieldProps extends Omit<AllHTMLAttributes<HTMLInputElement>, 'disabled'> {
|
|
3
3
|
/**
|
|
4
4
|
* Controls the appearance of the field.
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { type AllHTMLAttributes, type FormEventHandler, type default as React } from 'react';
|
|
2
2
|
export interface TextfieldProps extends Omit<AllHTMLAttributes<HTMLInputElement>, 'disabled'> {
|
|
3
3
|
/**
|
|
4
4
|
* Controls the appearance of the field.
|
package/package.json
CHANGED
|
@@ -1,95 +1,93 @@
|
|
|
1
1
|
{
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
"prettier": "@atlassian/atlassian-frontend-prettier-config-1.0.1"
|
|
95
|
-
}
|
|
2
|
+
"name": "@atlaskit/textfield",
|
|
3
|
+
"version": "6.4.0",
|
|
4
|
+
"description": "A text field is an input that allows a user to write or edit text.",
|
|
5
|
+
"publishConfig": {
|
|
6
|
+
"registry": "https://registry.npmjs.org/"
|
|
7
|
+
},
|
|
8
|
+
"repository": "https://bitbucket.org/atlassian/atlassian-frontend-mirror",
|
|
9
|
+
"author": "Atlassian Pty Ltd",
|
|
10
|
+
"license": "Apache-2.0",
|
|
11
|
+
"main": "dist/cjs/index.js",
|
|
12
|
+
"module": "dist/esm/index.js",
|
|
13
|
+
"module:es2019": "dist/es2019/index.js",
|
|
14
|
+
"types": "dist/types/index.d.ts",
|
|
15
|
+
"sideEffects": false,
|
|
16
|
+
"atlaskit:src": "src/index.tsx",
|
|
17
|
+
"atlassian": {
|
|
18
|
+
"team": "Design System Team",
|
|
19
|
+
"runReact18": true,
|
|
20
|
+
"productPushConsumption": [
|
|
21
|
+
"jira"
|
|
22
|
+
],
|
|
23
|
+
"releaseModel": "continuous",
|
|
24
|
+
"website": {
|
|
25
|
+
"name": "Text field",
|
|
26
|
+
"category": "Components"
|
|
27
|
+
}
|
|
28
|
+
},
|
|
29
|
+
"dependencies": {
|
|
30
|
+
"@atlaskit/analytics-next": "^9.3.0",
|
|
31
|
+
"@atlaskit/theme": "^12.10.0",
|
|
32
|
+
"@atlaskit/tokens": "^1.51.0",
|
|
33
|
+
"@babel/runtime": "^7.0.0",
|
|
34
|
+
"@emotion/react": "^11.7.1"
|
|
35
|
+
},
|
|
36
|
+
"peerDependencies": {
|
|
37
|
+
"react": "^16.8.0 || ^17.0.0 || ~18.2.0"
|
|
38
|
+
},
|
|
39
|
+
"devDependencies": {
|
|
40
|
+
"@af/accessibility-testing": "*",
|
|
41
|
+
"@af/integration-testing": "*",
|
|
42
|
+
"@af/visual-regression": "*",
|
|
43
|
+
"@atlaskit/codemod-utils": "^4.2.3",
|
|
44
|
+
"@atlaskit/ds-lib": "^2.3.0",
|
|
45
|
+
"@atlaskit/ssr": "*",
|
|
46
|
+
"@atlaskit/visual-regression": "*",
|
|
47
|
+
"@atlassian/feature-flags-test-utils": "*",
|
|
48
|
+
"@testing-library/dom": "^8.17.1",
|
|
49
|
+
"@testing-library/react": "^12.1.5",
|
|
50
|
+
"jscodeshift": "^0.13.0",
|
|
51
|
+
"react-dom": "^16.8.0",
|
|
52
|
+
"storybook-addon-performance": "^0.16.0",
|
|
53
|
+
"typescript": "~5.4.2",
|
|
54
|
+
"wait-for-expect": "^1.2.0"
|
|
55
|
+
},
|
|
56
|
+
"keywords": [
|
|
57
|
+
"atlaskit",
|
|
58
|
+
"react",
|
|
59
|
+
"ui"
|
|
60
|
+
],
|
|
61
|
+
"techstack": {
|
|
62
|
+
"@atlassian/frontend": {
|
|
63
|
+
"import-structure": "atlassian-conventions"
|
|
64
|
+
},
|
|
65
|
+
"@repo/internal": {
|
|
66
|
+
"dom-events": "use-bind-event-listener",
|
|
67
|
+
"ui-components": "lite-mode",
|
|
68
|
+
"styling": [
|
|
69
|
+
"static",
|
|
70
|
+
"emotion"
|
|
71
|
+
],
|
|
72
|
+
"analytics": "analytics-next",
|
|
73
|
+
"design-tokens": [
|
|
74
|
+
"color",
|
|
75
|
+
"spacing"
|
|
76
|
+
],
|
|
77
|
+
"design-system": "v1",
|
|
78
|
+
"deprecation": "no-deprecated-imports"
|
|
79
|
+
}
|
|
80
|
+
},
|
|
81
|
+
"typesVersions": {
|
|
82
|
+
">=4.5 <4.9": {
|
|
83
|
+
"*": [
|
|
84
|
+
"dist/types-ts4.5/*",
|
|
85
|
+
"dist/types-ts4.5/index.d.ts"
|
|
86
|
+
]
|
|
87
|
+
}
|
|
88
|
+
},
|
|
89
|
+
"af:exports": {
|
|
90
|
+
".": "./src/index.tsx"
|
|
91
|
+
},
|
|
92
|
+
"homepage": "https://atlassian.design/components/textfield/"
|
|
93
|
+
}
|
package/report.api.md
CHANGED
|
@@ -2,7 +2,8 @@
|
|
|
2
2
|
|
|
3
3
|
## API Report File for "@atlaskit/textfield"
|
|
4
4
|
|
|
5
|
-
> Do not edit this file. This report is auto-generated using
|
|
5
|
+
> Do not edit this file. This report is auto-generated using
|
|
6
|
+
> [API Extractor](https://api-extractor.com/).
|
|
6
7
|
> [Learn more about API reports](https://hello.atlassian.net/wiki/spaces/UR/pages/1825484529/Package+API+Reports)
|
|
7
8
|
|
|
8
9
|
### Table of contents
|
|
@@ -23,30 +24,27 @@ import { default as React_2 } from 'react';
|
|
|
23
24
|
export type Appearance = 'none' | 'standard' | 'subtle';
|
|
24
25
|
|
|
25
26
|
// @public
|
|
26
|
-
const _default: React_2.NamedExoticComponent<
|
|
27
|
-
TextFieldProps & React_2.RefAttributes<unknown>
|
|
28
|
-
>;
|
|
27
|
+
const _default: React_2.NamedExoticComponent<TextFieldProps & React_2.RefAttributes<unknown>>;
|
|
29
28
|
export default _default;
|
|
30
29
|
|
|
31
30
|
// @public (undocumented)
|
|
32
|
-
export interface TextFieldProps
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
width?: number | string;
|
|
31
|
+
export interface TextFieldProps extends Omit<AllHTMLAttributes<HTMLInputElement>, 'disabled'> {
|
|
32
|
+
appearance?: Appearance;
|
|
33
|
+
className?: string;
|
|
34
|
+
elemAfterInput?: React_2.ReactNode;
|
|
35
|
+
elemBeforeInput?: React_2.ReactNode;
|
|
36
|
+
isCompact?: boolean;
|
|
37
|
+
isDisabled?: boolean;
|
|
38
|
+
isInvalid?: boolean;
|
|
39
|
+
isMonospaced?: boolean;
|
|
40
|
+
isReadOnly?: boolean;
|
|
41
|
+
isRequired?: boolean;
|
|
42
|
+
name?: string;
|
|
43
|
+
onChange?: FormEventHandler<HTMLInputElement>;
|
|
44
|
+
onMouseDown?: React_2.MouseEventHandler<HTMLElement>;
|
|
45
|
+
placeholder?: string;
|
|
46
|
+
testId?: string;
|
|
47
|
+
width?: number | string;
|
|
50
48
|
}
|
|
51
49
|
|
|
52
50
|
// (No @packageDocumentation comment for this package)
|
|
@@ -60,7 +58,7 @@ export interface TextFieldProps
|
|
|
60
58
|
|
|
61
59
|
```json
|
|
62
60
|
{
|
|
63
|
-
|
|
61
|
+
"react": "^16.8.0"
|
|
64
62
|
}
|
|
65
63
|
```
|
|
66
64
|
|