@atlaskit/textarea 4.5.0 → 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 CHANGED
@@ -1,5 +1,17 @@
1
1
  # @atlaskit/textarea
2
2
 
3
+ ## 4.5.2
4
+
5
+ ### Patch Changes
6
+
7
+ - Updated dependencies
8
+
9
+ ## 4.5.1
10
+
11
+ ### Patch Changes
12
+
13
+ - [`9827dcb82b8`](https://bitbucket.org/atlassian/atlassian-frontend/commits/9827dcb82b8) - No-op change to introduce spacing tokens to design system components.
14
+
3
15
  ## 4.5.0
4
16
 
5
17
  ### Minor Changes
@@ -75,121 +75,121 @@ const debug = (component: string) => (j: core.JSCodeshift, source: any) => {
75
75
  });
76
76
  };
77
77
 
78
- const createRenameFuncFor = (component: string, from: string, to: string) => (
79
- j: core.JSCodeshift,
80
- source: any,
81
- ) => {
82
- const defaultSpecifier = getDefaultSpecifier(j, source, component);
83
-
84
- if (!defaultSpecifier) {
85
- return;
86
- }
87
-
88
- source
89
- .findJSXElements(defaultSpecifier)
90
- .forEach((element: ASTPath<JSXAttribute>) => {
91
- getJSXAttributesByName(j, element, from).forEach((attribute) => {
92
- j(attribute).replaceWith(
93
- j.jsxAttribute(j.jsxIdentifier(to), attribute.node.value),
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
- const createConvertFuncFor = (
100
- component: string,
101
- from: string,
102
- to: string,
103
- predicate?: (value: any) => boolean,
104
- ) => (j: core.JSCodeshift, source: any) => {
105
- const defaultSpecifier = getDefaultSpecifier(j, source, component);
106
-
107
- if (!defaultSpecifier) {
108
- return;
109
- }
110
-
111
- source
112
- .findJSXElements(defaultSpecifier)
113
- .forEach((element: ASTPath<JSXAttribute>) => {
114
- getJSXAttributesByName(j, element, from).forEach((attribute) => {
115
- const shouldConvert =
116
- (predicate && predicate(attribute.node.value)) || false;
117
- const node = j.jsxAttribute(j.jsxIdentifier(to));
118
- if (shouldConvert) {
119
- j(attribute).insertBefore(node);
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 replaceImportStatementFor = (pkg: string, convertMap: any) => (
126
- j: core.JSCodeshift,
127
- root: any,
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
- const defaultDeclarations = defaultSpecifier.map((s) => {
140
- return j.importDeclaration([s], j.literal(convertMap['default']));
141
- });
142
+ const otherSpecifier = (path.value.specifiers || []).filter(
143
+ (specifier) => specifier.type === 'ImportSpecifier',
144
+ );
142
145
 
143
- const otherSpecifier = (path.value.specifiers || []).filter(
144
- (specifier) => specifier.type === 'ImportSpecifier',
145
- );
146
+ j(path).replaceWith(defaultDeclarations);
146
147
 
147
- j(path).replaceWith(defaultDeclarations);
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
- const otherDeclarations = otherSpecifier.map((s) => {
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
- j(path).insertAfter(otherDeclarations);
159
- });
160
- };
161
-
162
- const createRenameImportFor = (component: string, from: string, to: string) => (
163
- j: core.JSCodeshift,
164
- source: any,
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
- if (!hasImportDeclaration(j, source, component)) {
186
- return fileInfo.source;
187
- }
185
+ if (!hasImportDeclaration(j, source, component)) {
186
+ return fileInfo.source;
187
+ }
188
188
 
189
- migrates.forEach((tf) => tf(j, source));
189
+ migrates.forEach((tf) => tf(j, source));
190
190
 
191
- return source.toSource(options.printOptions);
192
- };
191
+ return source.toSource(options.printOptions);
192
+ };
193
193
 
194
194
  export {
195
195
  getDefaultSpecifier,
@@ -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.0";
43
+ var packageVersion = "4.5.2";
44
44
  var analyticsParams = {
45
45
  componentName: 'textArea',
46
46
  packageName: packageName,
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "name": "@atlaskit/textarea",
3
- "version": "4.5.0",
3
+ "version": "4.5.2",
4
4
  "sideEffects": false
5
5
  }
@@ -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.0";
11
+ const packageVersion = "4.5.2";
12
12
  const analyticsParams = {
13
13
  componentName: 'textArea',
14
14
  packageName,
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "name": "@atlaskit/textarea",
3
- "version": "4.5.0",
3
+ "version": "4.5.2",
4
4
  "sideEffects": false
5
5
  }
@@ -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.0";
19
+ var packageVersion = "4.5.2";
20
20
  var analyticsParams = {
21
21
  componentName: 'textArea',
22
22
  packageName: packageName,
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "name": "@atlaskit/textarea",
3
- "version": "4.5.0",
3
+ "version": "4.5.2",
4
4
  "sideEffects": false
5
5
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/textarea",
3
- "version": "4.5.0",
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,17 +12,11 @@
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
- ]
20
- }
21
- },
22
15
  "sideEffects": false,
23
16
  "atlaskit:src": "src/index.tsx",
24
17
  "homepage": "https://atlassian.design/components/textarea/",
25
18
  "atlassian": {
19
+ "disableProductCI": true,
26
20
  "team": "Design System Team",
27
21
  "releaseModel": "scheduled",
28
22
  "website": {
@@ -40,7 +34,7 @@
40
34
  "dependencies": {
41
35
  "@atlaskit/analytics-next": "^8.0.0",
42
36
  "@atlaskit/theme": "^12.2.0",
43
- "@atlaskit/tokens": "^0.10.0",
37
+ "@atlaskit/tokens": "^0.11.0",
44
38
  "@babel/runtime": "^7.0.0",
45
39
  "@emotion/react": "^11.7.1"
46
40
  },
@@ -48,10 +42,10 @@
48
42
  "react": "^16.8.0"
49
43
  },
50
44
  "devDependencies": {
51
- "@atlaskit/button": "^16.3.0",
45
+ "@atlaskit/button": "^16.4.0",
52
46
  "@atlaskit/docs": "*",
53
47
  "@atlaskit/ds-lib": "^2.1.0",
54
- "@atlaskit/form": "^8.6.0",
48
+ "@atlaskit/form": "^8.7.0",
55
49
  "@atlaskit/section-message": "^6.3.0",
56
50
  "@atlaskit/ssr": "*",
57
51
  "@atlaskit/visual-regression": "*",