@atlaskit/textarea 4.5.1 → 4.5.2
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 +6 -0
- package/codemods/utils.tsx +103 -103
- package/dist/cjs/text-area.js +1 -1
- package/dist/cjs/version.json +1 -1
- package/dist/es2019/text-area.js +1 -1
- package/dist/es2019/version.json +1 -1
- package/dist/esm/text-area.js +1 -1
- package/dist/esm/version.json +1 -1
- package/package.json +4 -12
- package/report.api.md +317 -399
- package/dist/types-ts4.0/component-tokens.d.ts +0 -52
- package/dist/types-ts4.0/index.d.ts +0 -4
- package/dist/types-ts4.0/styles.d.ts +0 -12
- package/dist/types-ts4.0/text-area.d.ts +0 -14
- package/dist/types-ts4.0/theme.d.ts +0 -174
- package/dist/types-ts4.0/types.d.ts +0 -96
package/CHANGELOG.md
CHANGED
package/codemods/utils.tsx
CHANGED
|
@@ -75,121 +75,121 @@ const debug = (component: string) => (j: core.JSCodeshift, source: any) => {
|
|
|
75
75
|
});
|
|
76
76
|
};
|
|
77
77
|
|
|
78
|
-
const createRenameFuncFor =
|
|
79
|
-
|
|
80
|
-
source: any
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
);
|
|
78
|
+
const createRenameFuncFor =
|
|
79
|
+
(component: string, from: string, to: string) =>
|
|
80
|
+
(j: core.JSCodeshift, source: any) => {
|
|
81
|
+
const defaultSpecifier = getDefaultSpecifier(j, source, component);
|
|
82
|
+
|
|
83
|
+
if (!defaultSpecifier) {
|
|
84
|
+
return;
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
source
|
|
88
|
+
.findJSXElements(defaultSpecifier)
|
|
89
|
+
.forEach((element: ASTPath<JSXAttribute>) => {
|
|
90
|
+
getJSXAttributesByName(j, element, from).forEach((attribute) => {
|
|
91
|
+
j(attribute).replaceWith(
|
|
92
|
+
j.jsxAttribute(j.jsxIdentifier(to), attribute.node.value),
|
|
93
|
+
);
|
|
94
|
+
});
|
|
95
95
|
});
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
) =>
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
96
|
+
};
|
|
97
|
+
|
|
98
|
+
const createConvertFuncFor =
|
|
99
|
+
(
|
|
100
|
+
component: string,
|
|
101
|
+
from: string,
|
|
102
|
+
to: string,
|
|
103
|
+
predicate?: (value: any) => boolean,
|
|
104
|
+
) =>
|
|
105
|
+
(j: core.JSCodeshift, source: any) => {
|
|
106
|
+
const defaultSpecifier = getDefaultSpecifier(j, source, component);
|
|
107
|
+
|
|
108
|
+
if (!defaultSpecifier) {
|
|
109
|
+
return;
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
source
|
|
113
|
+
.findJSXElements(defaultSpecifier)
|
|
114
|
+
.forEach((element: ASTPath<JSXAttribute>) => {
|
|
115
|
+
getJSXAttributesByName(j, element, from).forEach((attribute) => {
|
|
116
|
+
const shouldConvert =
|
|
117
|
+
(predicate && predicate(attribute.node.value)) || false;
|
|
118
|
+
const node = j.jsxAttribute(j.jsxIdentifier(to));
|
|
119
|
+
if (shouldConvert) {
|
|
120
|
+
j(attribute).insertBefore(node);
|
|
121
|
+
}
|
|
122
|
+
});
|
|
121
123
|
});
|
|
122
|
-
|
|
123
|
-
|
|
124
|
+
};
|
|
125
|
+
|
|
126
|
+
const replaceImportStatementFor =
|
|
127
|
+
(pkg: string, convertMap: any) => (j: core.JSCodeshift, root: any) => {
|
|
128
|
+
root
|
|
129
|
+
.find(j.ImportDeclaration)
|
|
130
|
+
.filter(
|
|
131
|
+
(path: ASTPath<ImportDeclaration>) => path.node.source.value === pkg,
|
|
132
|
+
)
|
|
133
|
+
.forEach((path: ASTPath<ImportDeclaration>) => {
|
|
134
|
+
const defaultSpecifier = (path.value.specifiers || []).filter(
|
|
135
|
+
(specifier) => specifier.type === 'ImportDefaultSpecifier',
|
|
136
|
+
);
|
|
124
137
|
|
|
125
|
-
const
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
) => {
|
|
129
|
-
root
|
|
130
|
-
.find(j.ImportDeclaration)
|
|
131
|
-
.filter(
|
|
132
|
-
(path: ASTPath<ImportDeclaration>) => path.node.source.value === pkg,
|
|
133
|
-
)
|
|
134
|
-
.forEach((path: ASTPath<ImportDeclaration>) => {
|
|
135
|
-
const defaultSpecifier = (path.value.specifiers || []).filter(
|
|
136
|
-
(specifier) => specifier.type === 'ImportDefaultSpecifier',
|
|
137
|
-
);
|
|
138
|
+
const defaultDeclarations = defaultSpecifier.map((s) => {
|
|
139
|
+
return j.importDeclaration([s], j.literal(convertMap['default']));
|
|
140
|
+
});
|
|
138
141
|
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
+
const otherSpecifier = (path.value.specifiers || []).filter(
|
|
143
|
+
(specifier) => specifier.type === 'ImportSpecifier',
|
|
144
|
+
);
|
|
142
145
|
|
|
143
|
-
|
|
144
|
-
(specifier) => specifier.type === 'ImportSpecifier',
|
|
145
|
-
);
|
|
146
|
+
j(path).replaceWith(defaultDeclarations);
|
|
146
147
|
|
|
147
|
-
|
|
148
|
+
const otherDeclarations = otherSpecifier.map((s) => {
|
|
149
|
+
const localName = s.local!.name;
|
|
150
|
+
if (convertMap[localName]) {
|
|
151
|
+
return j.importDeclaration([s], j.literal(convertMap[localName]));
|
|
152
|
+
} else {
|
|
153
|
+
return j.importDeclaration([s], j.literal(convertMap['*']));
|
|
154
|
+
}
|
|
155
|
+
});
|
|
148
156
|
|
|
149
|
-
|
|
150
|
-
const localName = s.local!.name;
|
|
151
|
-
if (convertMap[localName]) {
|
|
152
|
-
return j.importDeclaration([s], j.literal(convertMap[localName]));
|
|
153
|
-
} else {
|
|
154
|
-
return j.importDeclaration([s], j.literal(convertMap['*']));
|
|
155
|
-
}
|
|
157
|
+
j(path).insertAfter(otherDeclarations);
|
|
156
158
|
});
|
|
159
|
+
};
|
|
160
|
+
|
|
161
|
+
const createRenameImportFor =
|
|
162
|
+
(component: string, from: string, to: string) =>
|
|
163
|
+
(j: core.JSCodeshift, source: any) => {
|
|
164
|
+
source
|
|
165
|
+
.find(j.ImportDeclaration)
|
|
166
|
+
.filter(
|
|
167
|
+
(path: ASTPath<ImportDeclaration>) =>
|
|
168
|
+
path.node.source.value === component,
|
|
169
|
+
)
|
|
170
|
+
.forEach((path: ASTPath<ImportDeclaration>) => {
|
|
171
|
+
j(path).replaceWith(
|
|
172
|
+
j.importDeclaration(path.value.specifiers, j.literal(to)),
|
|
173
|
+
);
|
|
174
|
+
});
|
|
175
|
+
};
|
|
157
176
|
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
j:
|
|
164
|
-
|
|
165
|
-
) => {
|
|
166
|
-
source
|
|
167
|
-
.find(j.ImportDeclaration)
|
|
168
|
-
.filter(
|
|
169
|
-
(path: ASTPath<ImportDeclaration>) =>
|
|
170
|
-
path.node.source.value === component,
|
|
171
|
-
)
|
|
172
|
-
.forEach((path: ASTPath<ImportDeclaration>) => {
|
|
173
|
-
j(path).replaceWith(
|
|
174
|
-
j.importDeclaration(path.value.specifiers, j.literal(to)),
|
|
175
|
-
);
|
|
176
|
-
});
|
|
177
|
-
};
|
|
178
|
-
|
|
179
|
-
const createTransformer = (
|
|
180
|
-
component: string,
|
|
181
|
-
migrates: { (j: core.JSCodeshift, source: any): void }[],
|
|
182
|
-
) => (fileInfo: FileInfo, { jscodeshift: j }: API, options: Options) => {
|
|
183
|
-
const source = j(fileInfo.source);
|
|
177
|
+
const createTransformer =
|
|
178
|
+
(
|
|
179
|
+
component: string,
|
|
180
|
+
migrates: { (j: core.JSCodeshift, source: any): void }[],
|
|
181
|
+
) =>
|
|
182
|
+
(fileInfo: FileInfo, { jscodeshift: j }: API, options: Options) => {
|
|
183
|
+
const source = j(fileInfo.source);
|
|
184
184
|
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
185
|
+
if (!hasImportDeclaration(j, source, component)) {
|
|
186
|
+
return fileInfo.source;
|
|
187
|
+
}
|
|
188
188
|
|
|
189
|
-
|
|
189
|
+
migrates.forEach((tf) => tf(j, source));
|
|
190
190
|
|
|
191
|
-
|
|
192
|
-
};
|
|
191
|
+
return source.toSource(options.printOptions);
|
|
192
|
+
};
|
|
193
193
|
|
|
194
194
|
export {
|
|
195
195
|
getDefaultSpecifier,
|
package/dist/cjs/text-area.js
CHANGED
|
@@ -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.5.
|
|
43
|
+
var packageVersion = "4.5.2";
|
|
44
44
|
var analyticsParams = {
|
|
45
45
|
componentName: 'textArea',
|
|
46
46
|
packageName: packageName,
|
package/dist/cjs/version.json
CHANGED
package/dist/es2019/text-area.js
CHANGED
|
@@ -8,7 +8,7 @@ import { useGlobalTheme } 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.5.
|
|
11
|
+
const packageVersion = "4.5.2";
|
|
12
12
|
const analyticsParams = {
|
|
13
13
|
componentName: 'textArea',
|
|
14
14
|
packageName,
|
package/dist/es2019/version.json
CHANGED
package/dist/esm/text-area.js
CHANGED
|
@@ -16,7 +16,7 @@ import { useGlobalTheme } 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.5.
|
|
19
|
+
var packageVersion = "4.5.2";
|
|
20
20
|
var analyticsParams = {
|
|
21
21
|
componentName: 'textArea',
|
|
22
22
|
packageName: packageName,
|
package/dist/esm/version.json
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/textarea",
|
|
3
|
-
"version": "4.5.
|
|
3
|
+
"version": "4.5.2",
|
|
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/"
|
|
@@ -12,14 +12,6 @@
|
|
|
12
12
|
"module": "dist/esm/index.js",
|
|
13
13
|
"module:es2019": "dist/es2019/index.js",
|
|
14
14
|
"types": "dist/types/index.d.ts",
|
|
15
|
-
"typesVersions": {
|
|
16
|
-
">=4.0 <4.5": {
|
|
17
|
-
"*": [
|
|
18
|
-
"dist/types-ts4.0/*",
|
|
19
|
-
"dist/types-ts4.0/index.d.ts"
|
|
20
|
-
]
|
|
21
|
-
}
|
|
22
|
-
},
|
|
23
15
|
"sideEffects": false,
|
|
24
16
|
"atlaskit:src": "src/index.tsx",
|
|
25
17
|
"homepage": "https://atlassian.design/components/textarea/",
|
|
@@ -42,7 +34,7 @@
|
|
|
42
34
|
"dependencies": {
|
|
43
35
|
"@atlaskit/analytics-next": "^8.0.0",
|
|
44
36
|
"@atlaskit/theme": "^12.2.0",
|
|
45
|
-
"@atlaskit/tokens": "^0.
|
|
37
|
+
"@atlaskit/tokens": "^0.11.0",
|
|
46
38
|
"@babel/runtime": "^7.0.0",
|
|
47
39
|
"@emotion/react": "^11.7.1"
|
|
48
40
|
},
|
|
@@ -50,10 +42,10 @@
|
|
|
50
42
|
"react": "^16.8.0"
|
|
51
43
|
},
|
|
52
44
|
"devDependencies": {
|
|
53
|
-
"@atlaskit/button": "^16.
|
|
45
|
+
"@atlaskit/button": "^16.4.0",
|
|
54
46
|
"@atlaskit/docs": "*",
|
|
55
47
|
"@atlaskit/ds-lib": "^2.1.0",
|
|
56
|
-
"@atlaskit/form": "^8.
|
|
48
|
+
"@atlaskit/form": "^8.7.0",
|
|
57
49
|
"@atlaskit/section-message": "^6.3.0",
|
|
58
50
|
"@atlaskit/ssr": "*",
|
|
59
51
|
"@atlaskit/visual-regression": "*",
|