@atlaskit/side-navigation 3.2.0 → 3.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.
Files changed (56) hide show
  1. package/CHANGELOG.md +20 -1
  2. package/README.md +7 -3
  3. package/afm-jira/tsconfig.json +3 -0
  4. package/codemods/0.8.0-change-css-fn-prop.tsx +136 -164
  5. package/codemods/__tests__/0.8.0-change-css-fn-prop.tsx +77 -77
  6. package/codemods/helpers/generic.tsx +528 -564
  7. package/constellation/index/examples.mdx +20 -20
  8. package/constellation/index/props.mdx +8 -8
  9. package/constellation/index/usage.mdx +27 -11
  10. package/dist/cjs/components/Header/index.js +4 -0
  11. package/dist/cjs/components/Item/link-item.js +3 -1
  12. package/dist/cjs/components/LoadingItems/index.js +7 -3
  13. package/dist/cjs/components/NavigationContent/index.js +8 -1
  14. package/dist/cjs/components/NavigationHeader/index.js +4 -0
  15. package/dist/cjs/components/NestableNavigationContent/index.js +5 -0
  16. package/dist/cjs/components/NestableNavigationContent/nesting-motion.js +3 -1
  17. package/dist/cjs/components/NestingItem/index.js +4 -0
  18. package/dist/cjs/components/SideNavigation/index.js +5 -0
  19. package/dist/es2019/components/Header/index.js +5 -0
  20. package/dist/es2019/components/Item/link-item.js +3 -1
  21. package/dist/es2019/components/LoadingItems/index.js +7 -3
  22. package/dist/es2019/components/NavigationContent/index.js +8 -1
  23. package/dist/es2019/components/NavigationHeader/index.js +4 -0
  24. package/dist/es2019/components/NestableNavigationContent/index.js +5 -0
  25. package/dist/es2019/components/NestableNavigationContent/nesting-motion.js +4 -0
  26. package/dist/es2019/components/NestingItem/index.js +5 -0
  27. package/dist/es2019/components/SideNavigation/index.js +5 -0
  28. package/dist/esm/components/Header/index.js +5 -0
  29. package/dist/esm/components/Item/link-item.js +3 -1
  30. package/dist/esm/components/LoadingItems/index.js +7 -3
  31. package/dist/esm/components/NavigationContent/index.js +8 -1
  32. package/dist/esm/components/NavigationHeader/index.js +4 -0
  33. package/dist/esm/components/NestableNavigationContent/index.js +5 -0
  34. package/dist/esm/components/NestableNavigationContent/nesting-motion.js +4 -0
  35. package/dist/esm/components/NestingItem/index.js +5 -0
  36. package/dist/esm/components/SideNavigation/index.js +5 -0
  37. package/dist/types/components/LoadingItems/index.d.ts +1 -1
  38. package/dist/types/components/NavigationContent/index.d.ts +3 -0
  39. package/dist/types/components/NavigationHeader/index.d.ts +3 -0
  40. package/dist/types/components/NestableNavigationContent/index.d.ts +0 -1
  41. package/dist/types/components/NestableNavigationContent/nesting-motion.d.ts +3 -0
  42. package/dist/types/components/NestingItem/index.d.ts +3 -0
  43. package/dist/types/components/index.d.ts +2 -2
  44. package/dist/types/index.d.ts +1 -1
  45. package/dist/types-ts4.5/components/LoadingItems/index.d.ts +1 -1
  46. package/dist/types-ts4.5/components/NavigationContent/index.d.ts +3 -0
  47. package/dist/types-ts4.5/components/NavigationHeader/index.d.ts +3 -0
  48. package/dist/types-ts4.5/components/NestableNavigationContent/index.d.ts +0 -1
  49. package/dist/types-ts4.5/components/NestableNavigationContent/nesting-motion.d.ts +3 -0
  50. package/dist/types-ts4.5/components/NestingItem/index.d.ts +3 -0
  51. package/dist/types-ts4.5/components/index.d.ts +2 -2
  52. package/dist/types-ts4.5/index.d.ts +1 -1
  53. package/docs/00-intro.tsx +4 -6
  54. package/docs/ert/footer.tsx +6 -6
  55. package/package.json +97 -97
  56. package/report.api.md +102 -123
@@ -5,30 +5,30 @@ import * as transformer from '../0.8.0-change-css-fn-prop';
5
5
  const defineInlineTest = require('jscodeshift/dist/testUtils').defineInlineTest;
6
6
 
7
7
  describe('Updates and removes current inline styles', () => {
8
- defineInlineTest(
9
- { ...transformer, parser: 'tsx' },
10
- {},
11
- `
8
+ defineInlineTest(
9
+ { ...transformer, parser: 'tsx' },
10
+ {},
11
+ `
12
12
  import { ButtonItem } from '@atlaskit/something';
13
13
 
14
14
  const App = () => {
15
15
  return <ButtonItem />;
16
16
  }
17
17
  `,
18
- `
18
+ `
19
19
  import { ButtonItem } from '@atlaskit/something';
20
20
 
21
21
  const App = () => {
22
22
  return <ButtonItem />;
23
23
  }
24
24
  `,
25
- 'leaves unrelated code untouched',
26
- );
25
+ 'leaves unrelated code untouched',
26
+ );
27
27
 
28
- defineInlineTest(
29
- { ...transformer, parser: 'tsx' },
30
- {},
31
- `
28
+ defineInlineTest(
29
+ { ...transformer, parser: 'tsx' },
30
+ {},
31
+ `
32
32
  import { ButtonItem } from '@atlaskit/side-navigation';
33
33
 
34
34
  const App = () => {
@@ -37,7 +37,7 @@ describe('Updates and removes current inline styles', () => {
37
37
  })} />;
38
38
  }
39
39
  `,
40
- `
40
+ `
41
41
  import { ButtonItem } from '@atlaskit/side-navigation';
42
42
 
43
43
  const App = () => {
@@ -48,13 +48,13 @@ describe('Updates and removes current inline styles', () => {
48
48
  );
49
49
  }
50
50
  `,
51
- 'should remove current styles from inline function',
52
- );
51
+ 'should remove current styles from inline function',
52
+ );
53
53
 
54
- defineInlineTest(
55
- { ...transformer, parser: 'tsx' },
56
- {},
57
- `
54
+ defineInlineTest(
55
+ { ...transformer, parser: 'tsx' },
56
+ {},
57
+ `
58
58
  import { ButtonItem } from '@atlaskit/side-navigation';
59
59
 
60
60
  const App = () => {
@@ -72,7 +72,7 @@ describe('Updates and removes current inline styles', () => {
72
72
  };
73
73
 
74
74
  `,
75
- `
75
+ `
76
76
  import { ButtonItem } from '@atlaskit/side-navigation';
77
77
 
78
78
  const App = () => {
@@ -87,13 +87,13 @@ describe('Updates and removes current inline styles', () => {
87
87
  );
88
88
  };
89
89
  `,
90
- 'should remove current styles from scope',
91
- );
90
+ 'should remove current styles from scope',
91
+ );
92
92
 
93
- defineInlineTest(
94
- { ...transformer, parser: 'tsx' },
95
- {},
96
- `
93
+ defineInlineTest(
94
+ { ...transformer, parser: 'tsx' },
95
+ {},
96
+ `
97
97
  import { ButtonItem } from '@atlaskit/side-navigation';
98
98
 
99
99
  const App = () => {
@@ -103,7 +103,7 @@ describe('Updates and removes current inline styles', () => {
103
103
  })} />;
104
104
  }
105
105
  `,
106
- `
106
+ `
107
107
  import { ButtonItem } from '@atlaskit/side-navigation';
108
108
 
109
109
  const App = () => {
@@ -114,13 +114,13 @@ describe('Updates and removes current inline styles', () => {
114
114
  );
115
115
  }
116
116
  `,
117
- 'correctly removes spread styles',
118
- );
117
+ 'correctly removes spread styles',
118
+ );
119
119
 
120
- defineInlineTest(
121
- { ...transformer, parser: 'tsx' },
122
- {},
123
- `
120
+ defineInlineTest(
121
+ { ...transformer, parser: 'tsx' },
122
+ {},
123
+ `
124
124
  import { ButtonItem } from '@atlaskit/side-navigation';
125
125
 
126
126
  const App = () => {
@@ -134,7 +134,7 @@ describe('Updates and removes current inline styles', () => {
134
134
  })} />;
135
135
  }
136
136
  `,
137
- `
137
+ `
138
138
  import { ButtonItem } from '@atlaskit/side-navigation';
139
139
 
140
140
  const App = () => {
@@ -149,13 +149,13 @@ describe('Updates and removes current inline styles', () => {
149
149
  );
150
150
  }
151
151
  `,
152
- 'correctly removes spread styles with pseudo-selector access',
153
- );
152
+ 'correctly removes spread styles with pseudo-selector access',
153
+ );
154
154
 
155
- defineInlineTest(
156
- { ...transformer, parser: 'tsx' },
157
- {},
158
- `
155
+ defineInlineTest(
156
+ { ...transformer, parser: 'tsx' },
157
+ {},
158
+ `
159
159
  import { ButtonItem } from '@atlaskit/side-navigation';
160
160
 
161
161
  const App = () => {
@@ -167,7 +167,7 @@ describe('Updates and removes current inline styles', () => {
167
167
  );
168
168
  }
169
169
  `,
170
- `
170
+ `
171
171
  import { ButtonItem } from '@atlaskit/side-navigation';
172
172
 
173
173
  const App = () => {
@@ -185,13 +185,13 @@ describe('Updates and removes current inline styles', () => {
185
185
  );
186
186
  }
187
187
  `,
188
- 'fail smoothly if the current styles are being used in a non-trivial way',
189
- );
188
+ 'fail smoothly if the current styles are being used in a non-trivial way',
189
+ );
190
190
 
191
- defineInlineTest(
192
- { ...transformer, parser: 'tsx' },
193
- {},
194
- `
191
+ defineInlineTest(
192
+ { ...transformer, parser: 'tsx' },
193
+ {},
194
+ `
195
195
  import { ButtonItem } from '@atlaskit/side-navigation';
196
196
 
197
197
  const App = () => {
@@ -200,7 +200,7 @@ describe('Updates and removes current inline styles', () => {
200
200
  })} />;
201
201
  }
202
202
  `,
203
- `
203
+ `
204
204
  import { ButtonItem } from '@atlaskit/side-navigation';
205
205
 
206
206
  const App = () => {
@@ -209,13 +209,13 @@ describe('Updates and removes current inline styles', () => {
209
209
  })} />;
210
210
  }
211
211
  `,
212
- 'not change anything if user is not using the current state or styles',
213
- );
212
+ 'not change anything if user is not using the current state or styles',
213
+ );
214
214
 
215
- defineInlineTest(
216
- { ...transformer, parser: 'tsx' },
217
- {},
218
- `
215
+ defineInlineTest(
216
+ { ...transformer, parser: 'tsx' },
217
+ {},
218
+ `
219
219
  import { ButtonItem } from '@atlaskit/side-navigation';
220
220
 
221
221
  const App = () => {
@@ -230,7 +230,7 @@ describe('Updates and removes current inline styles', () => {
230
230
  </ButtonItem>;
231
231
  }
232
232
  `,
233
- `
233
+ `
234
234
  import { ButtonItem } from '@atlaskit/side-navigation';
235
235
 
236
236
  const App = () => {
@@ -245,35 +245,35 @@ describe('Updates and removes current inline styles', () => {
245
245
  );
246
246
  }
247
247
  `,
248
- 'should remove styles in nested children',
249
- );
248
+ 'should remove styles in nested children',
249
+ );
250
250
 
251
- defineInlineTest(
252
- { ...transformer, parser: 'tsx' },
253
- {},
254
- `
251
+ defineInlineTest(
252
+ { ...transformer, parser: 'tsx' },
253
+ {},
254
+ `
255
255
  import { ButtonItem } from '@atlaskit/side-navigation';
256
256
 
257
257
  const App = () => {
258
258
  return <ButtonItem />;
259
259
  }
260
260
  `,
261
- `
261
+ `
262
262
  import { ButtonItem } from '@atlaskit/side-navigation';
263
263
 
264
264
  const App = () => {
265
265
  return <ButtonItem />;
266
266
  }
267
267
  `,
268
- 'should leave affected items with no use of cssFn untouched',
269
- );
268
+ 'should leave affected items with no use of cssFn untouched',
269
+ );
270
270
  });
271
271
 
272
272
  describe('Updates and removes current styles', () => {
273
- defineInlineTest(
274
- { ...transformer, parser: 'tsx' },
275
- {},
276
- `
273
+ defineInlineTest(
274
+ { ...transformer, parser: 'tsx' },
275
+ {},
276
+ `
277
277
  import { ButtonItem } from '@atlaskit/side-navigation';
278
278
 
279
279
  const cssFn = (styles, state) => ({
@@ -285,7 +285,7 @@ describe('Updates and removes current styles', () => {
285
285
  return <ButtonItem cssFn={cssFn} />;
286
286
  }
287
287
  `,
288
- `
288
+ `
289
289
  import { ButtonItem } from '@atlaskit/side-navigation';
290
290
 
291
291
  const cssFn = (styles, state) => ({
@@ -305,13 +305,13 @@ describe('Updates and removes current styles', () => {
305
305
  );
306
306
  }
307
307
  `,
308
- 'should add prompt for non-inline function',
309
- );
308
+ 'should add prompt for non-inline function',
309
+ );
310
310
 
311
- defineInlineTest(
312
- { ...transformer, parser: 'tsx' },
313
- {},
314
- `
311
+ defineInlineTest(
312
+ { ...transformer, parser: 'tsx' },
313
+ {},
314
+ `
315
315
  import { ButtonItem, LinkItem } from '@atlaskit/side-navigation';
316
316
 
317
317
  const cssFunction = (styles, state) => ({
@@ -327,7 +327,7 @@ describe('Updates and removes current styles', () => {
327
327
  );
328
328
  };
329
329
  `,
330
- `
330
+ `
331
331
  import { ButtonItem, LinkItem } from '@atlaskit/side-navigation';
332
332
 
333
333
  const cssFunction = (styles, state) => ({
@@ -355,6 +355,6 @@ describe('Updates and removes current styles', () => {
355
355
  );
356
356
  };
357
357
  `,
358
- 'should add prompt for non-inline function to multiple instances',
359
- );
358
+ 'should add prompt for non-inline function to multiple instances',
359
+ );
360
360
  });