@atlaskit/inline-edit 12.4.2 → 13.0.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 CHANGED
@@ -1,23 +1,39 @@
1
1
  # @atlaskit/inline-edit
2
2
 
3
+ ## 13.0.0
4
+
5
+ ### Major Changes
6
+
7
+ - [#41791](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/41791) [`ec7c2a38247`](https://bitbucket.org/atlassian/atlassian-frontend/commits/ec7c2a38247) - Removed all remaining legacy theming logic from the Calendar, Form, InlineDialog, InlineEdit and InlineMessage components.
8
+
9
+ ### Patch Changes
10
+
11
+ - Updated dependencies
12
+
13
+ ## 12.4.3
14
+
15
+ ### Patch Changes
16
+
17
+ - [#39805](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/39805) [`b59892e4807`](https://bitbucket.org/atlassian/atlassian-frontend/commits/b59892e4807) - "Clean up some small accessibility issues"
18
+
3
19
  ## 12.4.2
4
20
 
5
21
  ### Patch Changes
6
22
 
7
- - [`fd6bb9c9184`](https://bitbucket.org/atlassian/atlassian-frontend/commits/fd6bb9c9184) - Delete version.json
23
+ - [#38162](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/38162) [`fd6bb9c9184`](https://bitbucket.org/atlassian/atlassian-frontend/commits/fd6bb9c9184) - Delete version.json
8
24
  - Updated dependencies
9
25
 
10
26
  ## 12.4.1
11
27
 
12
28
  ### Patch Changes
13
29
 
14
- - [`4f5a3b9d776`](https://bitbucket.org/atlassian/atlassian-frontend/commits/4f5a3b9d776) - Improvement to last regression bugfix where internal form state persisted across blur and cancel incorrectly
30
+ - [#37708](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/37708) [`4f5a3b9d776`](https://bitbucket.org/atlassian/atlassian-frontend/commits/4f5a3b9d776) - Improvement to last regression bugfix where internal form state persisted across blur and cancel incorrectly
15
31
 
16
32
  ## 12.4.0
17
33
 
18
34
  ### Minor Changes
19
35
 
20
- - [`2f2e72c5189`](https://bitbucket.org/atlassian/atlassian-frontend/commits/2f2e72c5189) - Remove unintentionally exposed types: `ref` and `createAnalyticsEvent` from the component props interface.
36
+ - [#38197](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/38197) [`2f2e72c5189`](https://bitbucket.org/atlassian/atlassian-frontend/commits/2f2e72c5189) - Remove unintentionally exposed types: `ref` and `createAnalyticsEvent` from the component props interface.
21
37
 
22
38
  This could result in a change with TypeScript validate in theory, but these were never used and should not have been passed to this component for several major versions.
23
39
 
@@ -25,37 +41,37 @@
25
41
 
26
42
  ### Patch Changes
27
43
 
28
- - [`7257459df07`](https://bitbucket.org/atlassian/atlassian-frontend/commits/7257459df07) - Fixed a regression: onCancel in InlinedEditableTextfield now resets the editable input to the defaultValue
44
+ - [#37213](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/37213) [`7257459df07`](https://bitbucket.org/atlassian/atlassian-frontend/commits/7257459df07) - Fixed a regression: onCancel in InlinedEditableTextfield now resets the editable input to the defaultValue
29
45
 
30
46
  ## 12.3.4
31
47
 
32
48
  ### Patch Changes
33
49
 
34
- - [`599bfe90ee3`](https://bitbucket.org/atlassian/atlassian-frontend/commits/599bfe90ee3) - Internal change to use shape tokens. There is no expected visual change.
50
+ - [#35441](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/35441) [`599bfe90ee3`](https://bitbucket.org/atlassian/atlassian-frontend/commits/599bfe90ee3) - Internal change to use shape tokens. There is no expected visual change.
35
51
 
36
52
  ## 12.3.3
37
53
 
38
54
  ### Patch Changes
39
55
 
40
- - [`49b08bfdf5f`](https://bitbucket.org/atlassian/atlassian-frontend/commits/49b08bfdf5f) - Migrated use of `gridSize` to space tokens where possible. There is no expected visual or behaviour change.
56
+ - [#34051](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/34051) [`49b08bfdf5f`](https://bitbucket.org/atlassian/atlassian-frontend/commits/49b08bfdf5f) - Migrated use of `gridSize` to space tokens where possible. There is no expected visual or behaviour change.
41
57
 
42
58
  ## 12.3.2
43
59
 
44
60
  ### Patch Changes
45
61
 
46
- - [`9d00501a414`](https://bitbucket.org/atlassian/atlassian-frontend/commits/9d00501a414) - Ensure legacy types are published for TS 4.5-4.8
62
+ - [#33793](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/33793) [`9d00501a414`](https://bitbucket.org/atlassian/atlassian-frontend/commits/9d00501a414) - Ensure legacy types are published for TS 4.5-4.8
47
63
 
48
64
  ## 12.3.1
49
65
 
50
66
  ### Patch Changes
51
67
 
52
- - [`41fae2c6f68`](https://bitbucket.org/atlassian/atlassian-frontend/commits/41fae2c6f68) - Upgrade Typescript from `4.5.5` to `4.9.5`
68
+ - [#33649](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/33649) [`41fae2c6f68`](https://bitbucket.org/atlassian/atlassian-frontend/commits/41fae2c6f68) - Upgrade Typescript from `4.5.5` to `4.9.5`
53
69
 
54
70
  ## 12.3.0
55
71
 
56
72
  ### Minor Changes
57
73
 
58
- - [`56507598609`](https://bitbucket.org/atlassian/atlassian-frontend/commits/56507598609) - Skip minor dependency bump
74
+ - [#33258](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/33258) [`56507598609`](https://bitbucket.org/atlassian/atlassian-frontend/commits/56507598609) - Skip minor dependency bump
59
75
 
60
76
  ### Patch Changes
61
77
 
@@ -65,13 +81,13 @@
65
81
 
66
82
  ### Patch Changes
67
83
 
68
- - [`4ba10567310`](https://bitbucket.org/atlassian/atlassian-frontend/commits/4ba10567310) - Internal changes.
84
+ - [#32211](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/32211) [`4ba10567310`](https://bitbucket.org/atlassian/atlassian-frontend/commits/4ba10567310) - Internal changes.
69
85
 
70
86
  ## 12.2.11
71
87
 
72
88
  ### Patch Changes
73
89
 
74
- - [`261420360ec`](https://bitbucket.org/atlassian/atlassian-frontend/commits/261420360ec) - Upgrades component types to support React 18.
90
+ - [#31206](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/31206) [`261420360ec`](https://bitbucket.org/atlassian/atlassian-frontend/commits/261420360ec) - Upgrades component types to support React 18.
75
91
  - Updated dependencies
76
92
 
77
93
  ## 12.2.10
@@ -84,7 +100,7 @@
84
100
 
85
101
  ### Patch Changes
86
102
 
87
- - [`63c2f0b3f96`](https://bitbucket.org/atlassian/atlassian-frontend/commits/63c2f0b3f96) - Internal changes to use spacing tokens. There is no expected behaviour or visual change.
103
+ - [#29725](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/29725) [`63c2f0b3f96`](https://bitbucket.org/atlassian/atlassian-frontend/commits/63c2f0b3f96) - Internal changes to use spacing tokens. There is no expected behaviour or visual change.
88
104
 
89
105
  ## 12.2.8
90
106
 
@@ -96,7 +112,7 @@
96
112
 
97
113
  ### Patch Changes
98
114
 
99
- - [`18aeca8c199`](https://bitbucket.org/atlassian/atlassian-frontend/commits/18aeca8c199) - Internal change to update token references. There is no expected behaviour or visual change.
115
+ - [#29390](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/29390) [`18aeca8c199`](https://bitbucket.org/atlassian/atlassian-frontend/commits/18aeca8c199) - Internal change to update token references. There is no expected behaviour or visual change.
100
116
 
101
117
  ## 12.2.6
102
118
 
@@ -120,25 +136,25 @@
120
136
 
121
137
  ### Patch Changes
122
138
 
123
- - [`9de88fa1e1e`](https://bitbucket.org/atlassian/atlassian-frontend/commits/9de88fa1e1e) - Internal changes to include spacing tokens in component implementations.
139
+ - [#26408](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/26408) [`9de88fa1e1e`](https://bitbucket.org/atlassian/atlassian-frontend/commits/9de88fa1e1e) - Internal changes to include spacing tokens in component implementations.
124
140
 
125
141
  ## 12.2.2
126
142
 
127
143
  ### Patch Changes
128
144
 
129
- - [`8cc2f888c83`](https://bitbucket.org/atlassian/atlassian-frontend/commits/8cc2f888c83) - Upgrade Typescript from `4.3.5` to `4.5.5`
145
+ - [#24874](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/24874) [`8cc2f888c83`](https://bitbucket.org/atlassian/atlassian-frontend/commits/8cc2f888c83) - Upgrade Typescript from `4.3.5` to `4.5.5`
130
146
 
131
147
  ## 12.2.1
132
148
 
133
149
  ### Patch Changes
134
150
 
135
- - [`be93a207731`](https://bitbucket.org/atlassian/atlassian-frontend/commits/be93a207731) - Action buttons now use interactive elevation design tokens. There is no change to their appearance when design tokens are not enabled.
151
+ - [#25238](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/25238) [`be93a207731`](https://bitbucket.org/atlassian/atlassian-frontend/commits/be93a207731) - Action buttons now use interactive elevation design tokens. There is no change to their appearance when design tokens are not enabled.
136
152
 
137
153
  ## 12.2.0
138
154
 
139
155
  ### Minor Changes
140
156
 
141
- - [`b52ffa29d19`](https://bitbucket.org/atlassian/atlassian-frontend/commits/b52ffa29d19) - Updates `@emotion/core` to `@emotion/react`; v10 to v11. There is no expected behavior change.
157
+ - [#24004](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/24004) [`b52ffa29d19`](https://bitbucket.org/atlassian/atlassian-frontend/commits/b52ffa29d19) - Updates `@emotion/core` to `@emotion/react`; v10 to v11. There is no expected behavior change.
142
158
 
143
159
  ### Patch Changes
144
160
 
@@ -148,7 +164,7 @@
148
164
 
149
165
  ### Patch Changes
150
166
 
151
- - [`8d4228767b0`](https://bitbucket.org/atlassian/atlassian-frontend/commits/8d4228767b0) - Upgrade Typescript from `4.2.4` to `4.3.5`.
167
+ - [#24492](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/24492) [`8d4228767b0`](https://bitbucket.org/atlassian/atlassian-frontend/commits/8d4228767b0) - Upgrade Typescript from `4.2.4` to `4.3.5`.
152
168
 
153
169
  ## 12.1.13
154
170
 
@@ -160,7 +176,7 @@
160
176
 
161
177
  ### Patch Changes
162
178
 
163
- - [`cb2392f6d33`](https://bitbucket.org/atlassian/atlassian-frontend/commits/cb2392f6d33) - Upgrade to TypeScript 4.2.4
179
+ - [#20650](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/20650) [`cb2392f6d33`](https://bitbucket.org/atlassian/atlassian-frontend/commits/cb2392f6d33) - Upgrade to TypeScript 4.2.4
164
180
  - Updated dependencies
165
181
 
166
182
  ## 12.1.11
@@ -185,14 +201,14 @@
185
201
 
186
202
  ### Patch Changes
187
203
 
188
- - [`f65c4ec35c9`](https://bitbucket.org/atlassian/atlassian-frontend/commits/f65c4ec35c9) - Rewrite dynamic styles to be static to aid compiled migration.
204
+ - [#18526](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/18526) [`f65c4ec35c9`](https://bitbucket.org/atlassian/atlassian-frontend/commits/f65c4ec35c9) - Rewrite dynamic styles to be static to aid compiled migration.
189
205
  - Updated dependencies
190
206
 
191
207
  ## 12.1.7
192
208
 
193
209
  ### Patch Changes
194
210
 
195
- - [`19d72473dfb`](https://bitbucket.org/atlassian/atlassian-frontend/commits/19d72473dfb) - Updates usage of deprecated token names so they're aligned with the latest naming conventions. No UI or visual changes
211
+ - [#16752](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/16752) [`19d72473dfb`](https://bitbucket.org/atlassian/atlassian-frontend/commits/19d72473dfb) - Updates usage of deprecated token names so they're aligned with the latest naming conventions. No UI or visual changes
196
212
  - Updated dependencies
197
213
 
198
214
  ## 12.1.6
@@ -205,14 +221,14 @@
205
221
 
206
222
  ### Patch Changes
207
223
 
208
- - [`f460cc7c411`](https://bitbucket.org/atlassian/atlassian-frontend/commits/f460cc7c411) - Builds for this package now pass through a tokens babel plugin, removing runtime invocations of the tokens() function and improving bundle size.
224
+ - [#15998](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/15998) [`f460cc7c411`](https://bitbucket.org/atlassian/atlassian-frontend/commits/f460cc7c411) - Builds for this package now pass through a tokens babel plugin, removing runtime invocations of the tokens() function and improving bundle size.
209
225
  - Updated dependencies
210
226
 
211
227
  ## 12.1.4
212
228
 
213
229
  ### Patch Changes
214
230
 
215
- - [`d9d76592b37`](https://bitbucket.org/atlassian/atlassian-frontend/commits/d9d76592b37) - This change bumps the @atlaskit/inline-dialog dependency to the latest version 13.1.8. This fixes a bug where the inline dialog opens incorrectly.
231
+ - [#16578](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/16578) [`d9d76592b37`](https://bitbucket.org/atlassian/atlassian-frontend/commits/d9d76592b37) - This change bumps the @atlaskit/inline-dialog dependency to the latest version 13.1.8. This fixes a bug where the inline dialog opens incorrectly.
216
232
 
217
233
  ## 12.1.3
218
234
 
@@ -236,7 +252,7 @@
236
252
 
237
253
  ### Minor Changes
238
254
 
239
- - [`5c29b7f70ff`](https://bitbucket.org/atlassian/atlassian-frontend/commits/5c29b7f70ff) - Instrumented Inline-edit with the new theming package, `@atlaskit/tokens`.
255
+ - [#13302](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/13302) [`5c29b7f70ff`](https://bitbucket.org/atlassian/atlassian-frontend/commits/5c29b7f70ff) - Instrumented Inline-edit with the new theming package, `@atlaskit/tokens`.
240
256
 
241
257
  Tokens will be visible only in applications configured to use the new Tokens API (currently in alpha).
242
258
  These changes are intended to be interoperable with the legacy theme implementation. Legacy dark mode users should expect no visual or breaking changes.
@@ -255,19 +271,19 @@
255
271
 
256
272
  ### Patch Changes
257
273
 
258
- - [`378d1cef00f`](https://bitbucket.org/atlassian/atlassian-frontend/commits/378d1cef00f) - Bump `@atlaskit/theme` to version `^11.3.0`.
274
+ - [#12880](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/12880) [`378d1cef00f`](https://bitbucket.org/atlassian/atlassian-frontend/commits/378d1cef00f) - Bump `@atlaskit/theme` to version `^11.3.0`.
259
275
 
260
276
  ## 12.0.8
261
277
 
262
278
  ### Patch Changes
263
279
 
264
- - [`f9783cebfe6`](https://bitbucket.org/atlassian/atlassian-frontend/commits/f9783cebfe6) - Added action button wrapper back to fix transparent background color issue
280
+ - [#11649](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/11649) [`f9783cebfe6`](https://bitbucket.org/atlassian/atlassian-frontend/commits/f9783cebfe6) - Added action button wrapper back to fix transparent background color issue
265
281
 
266
282
  ## 12.0.7
267
283
 
268
284
  ### Patch Changes
269
285
 
270
- - [`d6f7ff383cf`](https://bitbucket.org/atlassian/atlassian-frontend/commits/d6f7ff383cf) - Updates to development dependency `storybook-addon-performance`
286
+ - [#12167](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/12167) [`d6f7ff383cf`](https://bitbucket.org/atlassian/atlassian-frontend/commits/d6f7ff383cf) - Updates to development dependency `storybook-addon-performance`
271
287
 
272
288
  ## 12.0.6
273
289
 
@@ -279,7 +295,7 @@
279
295
 
280
296
  ### Patch Changes
281
297
 
282
- - [`d65547e28ba`](https://bitbucket.org/atlassian/atlassian-frontend/commits/d65547e28ba) - Fixed a few UI defects:
298
+ - [#9749](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/9749) [`d65547e28ba`](https://bitbucket.org/atlassian/atlassian-frontend/commits/d65547e28ba) - Fixed a few UI defects:
283
299
 
284
300
  - reset line-height to 1 for inline edit container
285
301
  - fixed action buttons background color issue
@@ -288,13 +304,13 @@
288
304
 
289
305
  ### Patch Changes
290
306
 
291
- - [`ca0546ece25`](https://bitbucket.org/atlassian/atlassian-frontend/commits/ca0546ece25) - Fixed InlineEditableTextfield entry point config issue, it should have its own entry point as default export.
307
+ - [#8811](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/8811) [`ca0546ece25`](https://bitbucket.org/atlassian/atlassian-frontend/commits/ca0546ece25) - Fixed InlineEditableTextfield entry point config issue, it should have its own entry point as default export.
292
308
 
293
309
  ## 12.0.3
294
310
 
295
311
  ### Patch Changes
296
312
 
297
- - [`79c23df6340`](https://bitbucket.org/atlassian/atlassian-frontend/commits/79c23df6340) - Use injected package name and version for analytics instead of version.json.
313
+ - [#8644](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/8644) [`79c23df6340`](https://bitbucket.org/atlassian/atlassian-frontend/commits/79c23df6340) - Use injected package name and version for analytics instead of version.json.
298
314
  - [`c50a63f9f72`](https://bitbucket.org/atlassian/atlassian-frontend/commits/c50a63f9f72) - Upgrade `@types/react-select` to `v3.1.2` and fix type breaks
299
315
  - Updated dependencies
300
316
 
@@ -302,7 +318,7 @@
302
318
 
303
319
  ### Patch Changes
304
320
 
305
- - [`0e9764f7384`](https://bitbucket.org/atlassian/atlassian-frontend/commits/0e9764f7384) - Added codemod-utils as a package dependency, also fixed a few codemod functions
321
+ - [#8728](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/8728) [`0e9764f7384`](https://bitbucket.org/atlassian/atlassian-frontend/commits/0e9764f7384) - Added codemod-utils as a package dependency, also fixed a few codemod functions
306
322
 
307
323
  - elevate `InlineEditStateless` as default component as we have merged stateful and stateless
308
324
  - make sure named import works for `InlineEditableTextfield`
@@ -311,13 +327,13 @@
311
327
 
312
328
  ### Patch Changes
313
329
 
314
- - [`bfb4fe65750`](https://bitbucket.org/atlassian/atlassian-frontend/commits/bfb4fe65750) - Added missed codemod (handling editView function defined outside) case for migration
330
+ - [#8612](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/8612) [`bfb4fe65750`](https://bitbucket.org/atlassian/atlassian-frontend/commits/bfb4fe65750) - Added missed codemod (handling editView function defined outside) case for migration
315
331
 
316
332
  ## 12.0.0
317
333
 
318
334
  ### Major Changes
319
335
 
320
- - [`b9987e84f3f`](https://bitbucket.org/atlassian/atlassian-frontend/commits/b9987e84f3f) - In this version we bring significant performance improvements as well as improving the experience of using `inline-edit`.
336
+ - [#8178](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/8178) [`b9987e84f3f`](https://bitbucket.org/atlassian/atlassian-frontend/commits/b9987e84f3f) - In this version we bring significant performance improvements as well as improving the experience of using `inline-edit`.
321
337
 
322
338
  - removed dynamic loading of inline dialog allowing consumers to compose their own experiences
323
339
  - merged controlled & uncontrolled inline edit components
@@ -365,7 +381,7 @@
365
381
  The CLI will show a list of components and versions so select `@atlaskit/inline-edit@^12.0.0` and you will automatically be upgraded. If your usage of PACKAGE cannot be upgraded a comment will be left that a manual change is required.
366
382
 
367
383
  Run `npx @atlaskit/codemod-cli -h` for more details on usage.
368
- For Atlassians, refer to [this doc](https://developer.atlassian.com/cloud/framework/atlassian-frontend/codemods/01-atlassian-codemods/) for more details on the codemod CLI.
384
+ For Atlassians, refer to [this doc](https://hello.atlassian.net/wiki/spaces/AF/pages/2627171992/Codemods) for more details on the codemod CLI.
369
385
 
370
386
  ### Patch Changes
371
387
 
@@ -375,13 +391,13 @@
375
391
 
376
392
  ### Patch Changes
377
393
 
378
- - [`a4c112b2ad7`](https://bitbucket.org/atlassian/atlassian-frontend/commits/a4c112b2ad7) - Fixed inline edit not submitting automatically when blurred
394
+ - [#7774](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/7774) [`a4c112b2ad7`](https://bitbucket.org/atlassian/atlassian-frontend/commits/a4c112b2ad7) - Fixed inline edit not submitting automatically when blurred
379
395
 
380
396
  ## 11.0.10
381
397
 
382
398
  ### Patch Changes
383
399
 
384
- - [`f5cf9fc9e9`](https://bitbucket.org/atlassian/atlassian-frontend/commits/f5cf9fc9e9) - ### General conversion for inline-edit
400
+ - [#7425](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/7425) [`f5cf9fc9e9`](https://bitbucket.org/atlassian/atlassian-frontend/commits/f5cf9fc9e9) - ### General conversion for inline-edit
385
401
 
386
402
  There is no breaking change in this conversion, only some mechanical changes applied:
387
403
 
@@ -402,20 +418,20 @@
402
418
 
403
419
  ### Patch Changes
404
420
 
405
- - [`9da1032552`](https://bitbucket.org/atlassian/atlassian-frontend/commits/9da1032552) - Adds the onCancel prop as an optional event handler called when a user clicks close, or presses escape. This has no behaviour change but allows users more granularity in how they handle the component's lifecycle.
421
+ - [#6930](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/6930) [`9da1032552`](https://bitbucket.org/atlassian/atlassian-frontend/commits/9da1032552) - Adds the onCancel prop as an optional event handler called when a user clicks close, or presses escape. This has no behaviour change but allows users more granularity in how they handle the component's lifecycle.
406
422
  - Updated dependencies
407
423
 
408
424
  ## 11.0.7
409
425
 
410
426
  ### Patch Changes
411
427
 
412
- - [`d3265f19be`](https://bitbucket.org/atlassian/atlassian-frontend/commits/d3265f19be) - Transpile packages using babel rather than tsc
428
+ - [#5857](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/5857) [`d3265f19be`](https://bitbucket.org/atlassian/atlassian-frontend/commits/d3265f19be) - Transpile packages using babel rather than tsc
413
429
 
414
430
  ## 11.0.6
415
431
 
416
432
  ### Patch Changes
417
433
 
418
- - [`5f58283e1f`](https://bitbucket.org/atlassian/atlassian-frontend/commits/5f58283e1f) - Export types using Typescript's new "export type" syntax to satisfy Typescript's --isolatedModules compiler option.
434
+ - [#5497](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/5497) [`5f58283e1f`](https://bitbucket.org/atlassian/atlassian-frontend/commits/5f58283e1f) - Export types using Typescript's new "export type" syntax to satisfy Typescript's --isolatedModules compiler option.
419
435
  This requires version 3.8 of Typescript, read more about how we handle Typescript versions here: https://atlaskit.atlassian.com/get-started
420
436
  Also add `typescript` to `devDependencies` to denote version that the package was built with.
421
437
 
@@ -435,13 +451,13 @@
435
451
 
436
452
  ### Patch Changes
437
453
 
438
- - [`6360c46009`](https://bitbucket.org/atlassian/atlassian-frontend/commits/6360c46009) - Reenable integration tests for Edge browser
454
+ - [#4707](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/4707) [`6360c46009`](https://bitbucket.org/atlassian/atlassian-frontend/commits/6360c46009) - Reenable integration tests for Edge browser
439
455
 
440
456
  ## 11.0.2
441
457
 
442
458
  ### Patch Changes
443
459
 
444
- - [`6c525a8229`](https://bitbucket.org/atlassian/atlassian-frontend/commits/6c525a8229) - Upgraded to TypeScript 3.9.6 and tslib to 2.0.0
460
+ - [#3885](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/3885) [`6c525a8229`](https://bitbucket.org/atlassian/atlassian-frontend/commits/6c525a8229) - Upgraded to TypeScript 3.9.6 and tslib to 2.0.0
445
461
 
446
462
  Since tslib is a dependency for all our packages we recommend that products also follow this tslib upgrade
447
463
  to prevent duplicates of tslib being bundled.
@@ -450,14 +466,14 @@
450
466
 
451
467
  ### Patch Changes
452
468
 
453
- - [`db053b24d8`](https://bitbucket.org/atlassian/atlassian-frontend/commits/db053b24d8) - Update all the theme imports to be tree-shakable
469
+ - [#3428](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/3428) [`db053b24d8`](https://bitbucket.org/atlassian/atlassian-frontend/commits/db053b24d8) - Update all the theme imports to be tree-shakable
454
470
  - Updated dependencies
455
471
 
456
472
  ## 11.0.0
457
473
 
458
474
  ### Major Changes
459
475
 
460
- - [`87f4720f27`](https://bitbucket.org/atlassian/atlassian-frontend/commits/87f4720f27) - Officially dropping IE11 support, from this version onwards there are no warranties of the package working in IE11.
476
+ - [#3335](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/3335) [`87f4720f27`](https://bitbucket.org/atlassian/atlassian-frontend/commits/87f4720f27) - Officially dropping IE11 support, from this version onwards there are no warranties of the package working in IE11.
461
477
  For more information see: https://community.developer.atlassian.com/t/atlaskit-to-drop-support-for-internet-explorer-11-from-1st-july-2020/39534
462
478
 
463
479
  ### Patch Changes
@@ -468,7 +484,7 @@
468
484
 
469
485
  ### Patch Changes
470
486
 
471
- - [`54a9514fcf`](https://bitbucket.org/atlassian/atlassian-frontend/commits/54a9514fcf) - Build and supporting files will no longer be published to npm
487
+ - [#2866](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/2866) [`54a9514fcf`](https://bitbucket.org/atlassian/atlassian-frontend/commits/54a9514fcf) - Build and supporting files will no longer be published to npm
472
488
 
473
489
  ## 10.0.32
474
490
 
@@ -1,4 +1,9 @@
1
- import core, { ASTPath, ImportDeclaration, Program } from 'jscodeshift';
1
+ import core, {
2
+ ASTPath,
3
+ ImportDeclaration,
4
+ JSXAttribute,
5
+ Program,
6
+ } from 'jscodeshift';
2
7
  import { Collection } from 'jscodeshift/src/Collection';
3
8
 
4
9
  function addCommentBefore({
@@ -50,7 +55,7 @@ function getJSXAttributesByName(
50
55
  j: core.JSCodeshift,
51
56
  element: ASTPath<any>,
52
57
  attributeName: string,
53
- ) {
58
+ ): Collection<JSXAttribute> {
54
59
  return j(element)
55
60
  .find(j.JSXOpeningElement)
56
61
  .find(j.JSXAttribute)
@@ -6,7 +6,6 @@ Object.defineProperty(exports, "__esModule", {
6
6
  value: true
7
7
  });
8
8
  exports.default = void 0;
9
- var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
10
9
  var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
11
10
  var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));
12
11
  var _react = _interopRequireWildcard(require("react"));
@@ -14,25 +13,21 @@ var _react2 = require("@emotion/react");
14
13
  var _analyticsNext = require("@atlaskit/analytics-next");
15
14
  var _Field = _interopRequireDefault(require("@atlaskit/form/Field"));
16
15
  var _Form = _interopRequireDefault(require("@atlaskit/form/Form"));
17
- var _components = _interopRequireDefault(require("@atlaskit/theme/components"));
18
16
  var _buttons = _interopRequireDefault(require("./internal/buttons"));
19
17
  var _useButtonFocusHook2 = _interopRequireDefault(require("./internal/hooks/use-button-focus-hook"));
20
18
  var _readView = _interopRequireDefault(require("./internal/read-view"));
21
19
  function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
22
20
  function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
23
- function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
24
- 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; } /** @jsx jsx */
21
+ 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; }
22
+ 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) { (0, _defineProperty2.default)(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; } /** @jsx jsx */
25
23
  var fieldStyles = (0, _react2.css)({
26
24
  maxWidth: '100%',
27
25
  position: 'relative'
28
26
  });
29
- var buttonStyles = (0, _react2.css)({
30
- display: 'none'
31
- });
32
27
  var analyticsAttributes = {
33
28
  componentName: 'inlineEdit',
34
29
  packageName: "@atlaskit/inline-edit",
35
- packageVersion: "12.4.2"
30
+ packageVersion: "13.0.0"
36
31
  };
37
32
  var noop = function noop() {};
38
33
  var InnerInlineEdit = function InnerInlineEdit(props) {
@@ -63,8 +58,7 @@ var InnerInlineEdit = function InnerInlineEdit(props) {
63
58
  _props$onCancel = props.onCancel,
64
59
  providedOnCancel = _props$onCancel === void 0 ? noop : _props$onCancel,
65
60
  _props$onEdit = props.onEdit,
66
- providedOnEdit = _props$onEdit === void 0 ? noop : _props$onEdit,
67
- mode = props.mode;
61
+ providedOnEdit = _props$onEdit === void 0 ? noop : _props$onEdit;
68
62
  var wasFocusReceivedSinceLastBlurRef = (0, _react.useRef)(false);
69
63
  var isControlled = typeof isEditing === 'undefined';
70
64
  var _useState = (0, _react.useState)(startWithEditViewOpen),
@@ -168,50 +162,56 @@ var InnerInlineEdit = function InnerInlineEdit(props) {
168
162
  _onKeyDown = _ref$formProps.onKeyDown,
169
163
  onSubmit = _ref$formProps.onSubmit,
170
164
  formRef = _ref$formProps.ref;
171
- return (/* eslint-disable-next-line jsx-a11y/no-noninteractive-element-interactions */
172
- (0, _react2.jsx)("form", {
173
- onKeyDown: function onKeyDown(e) {
174
- _onKeyDown(e);
175
- if (e.key === 'Esc' || e.key === 'Escape') {
176
- onCancel();
177
- }
165
+ return (0, _react2.jsx)("form", {
166
+ /**
167
+ * It is not normally acceptable to add key handlers to non-interactive elements
168
+ * as this is an accessibility anti-pattern. However, because this instance is
169
+ * to add support for keyboard functionality instead of creating an inaccessible
170
+ * custom element, we can add role="presentation" so that there is no negative
171
+ * impacts to assistive technologies.
172
+ */
173
+ role: "presentation",
174
+ onKeyDown: function onKeyDown(e) {
175
+ _onKeyDown(e);
176
+ if (e.key === 'Esc' || e.key === 'Escape') {
177
+ onCancel();
178
+ }
179
+ },
180
+ onSubmit: onSubmit,
181
+ ref: formRef
182
+ }, (0, _react2.jsx)(_Field.default, {
183
+ name: "inlineEdit",
184
+ label: label,
185
+ defaultValue: defaultValue,
186
+ validate: validate,
187
+ isRequired: isRequired,
188
+ key: "edit-view" // used for reset to default value
189
+ }, function (_ref2) {
190
+ var fieldProps = _ref2.fieldProps,
191
+ error = _ref2.error;
192
+ return (0, _react2.jsx)("div", {
193
+ css: fieldStyles,
194
+ onBlur: function onBlur() {
195
+ onEditViewWrapperBlur(fieldProps.isInvalid, onSubmit, formRef);
196
+ },
197
+ onFocus: onEditViewWrapperFocus
198
+ }, editView(_objectSpread(_objectSpread({}, fieldProps), {}, {
199
+ errorMessage: error
200
+ }), editViewRef), !hideActionButtons ? (0, _react2.jsx)(_buttons.default, {
201
+ cancelButtonLabel: cancelButtonLabel,
202
+ confirmButtonLabel: confirmButtonLabel,
203
+ onMouseDown: function onMouseDown() {
204
+ /** Prevents focus on edit button only if mouse is used to click button, but not when keyboard is used */
205
+ doNotFocusOnEditButton();
178
206
  },
179
- onSubmit: onSubmit,
180
- ref: formRef
181
- }, (0, _react2.jsx)(_Field.default, {
182
- name: "inlineEdit",
183
- label: label,
184
- defaultValue: defaultValue,
185
- validate: validate,
186
- isRequired: isRequired,
187
- key: "edit-view" // used for reset to default value
188
- }, function (_ref2) {
189
- var fieldProps = _ref2.fieldProps,
190
- error = _ref2.error;
191
- return (0, _react2.jsx)("div", {
192
- css: fieldStyles,
193
- onBlur: function onBlur() {
194
- onEditViewWrapperBlur(fieldProps.isInvalid, onSubmit, formRef);
195
- },
196
- onFocus: onEditViewWrapperFocus
197
- }, editView(_objectSpread(_objectSpread({}, fieldProps), {}, {
198
- errorMessage: error
199
- }), editViewRef), !hideActionButtons ? (0, _react2.jsx)(_buttons.default, {
200
- cancelButtonLabel: cancelButtonLabel,
201
- confirmButtonLabel: confirmButtonLabel,
202
- onMouseDown: function onMouseDown() {
203
- /** Prevents focus on edit button only if mouse is used to click button, but not when keyboard is used */
204
- doNotFocusOnEditButton();
205
- },
206
- mode: mode,
207
- onCancelClick: onCancelClick
208
- }) : /** This is to allow Ctrl + Enter to submit without action buttons */
209
- (0, _react2.jsx)("button", {
210
- css: buttonStyles,
211
- type: "submit"
212
- }));
213
- }))
214
- );
207
+ onCancelClick: onCancelClick
208
+ }) : /** This is to allow Ctrl + Enter to submit without action buttons */
209
+ (0, _react2.jsx)("button", {
210
+ hidden: true,
211
+ type: "submit",
212
+ "aria-label": "Submit"
213
+ }));
214
+ }));
215
215
  });
216
216
  }
217
217
  return (/** Form, Field are used here only for the label and spacing */
@@ -225,12 +225,6 @@ var InnerInlineEdit = function InnerInlineEdit(props) {
225
225
  );
226
226
  };
227
227
  var InlineEdit = function InlineEdit(props) {
228
- return (0, _react2.jsx)(_components.default.Consumer, null, function (tokens) {
229
- var mode = tokens.mode;
230
- return (0, _react2.jsx)(InnerInlineEdit, (0, _extends2.default)({}, props, {
231
- mode: mode
232
- }));
233
- });
228
+ return (0, _react2.jsx)(InnerInlineEdit, props);
234
229
  };
235
- var _default = InlineEdit;
236
- exports.default = _default;
230
+ var _default = exports.default = InlineEdit;
@@ -84,5 +84,4 @@ var InlineEditableTextfield = function InlineEditableTextfield(props) {
84
84
  }
85
85
  }));
86
86
  };
87
- var _default = InlineEditableTextfield;
88
- exports.default = _default;
87
+ var _default = exports.default = InlineEditableTextfield;
@@ -15,32 +15,24 @@ var _constants = require("./constants");
15
15
 
16
16
  var buttonsContainerStyles = (0, _react.css)({
17
17
  display: 'flex',
18
- marginTop: "var(--ds-space-075, 6px)",
18
+ marginBlockStart: "var(--ds-space-075, 6px)",
19
19
  position: 'absolute',
20
20
  // eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage
21
- top: '100%',
21
+ insetBlockStart: '100%',
22
22
  // eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage
23
- right: 0,
23
+ insetInlineEnd: 0,
24
24
  flexShrink: 0
25
25
  });
26
- var buttonWrapperElevationDarkStyles = (0, _react.css)({
27
- boxShadow: "var(--ds-shadow-overlay, ".concat("0 4px 8px -2px ".concat(_colors.DN50A, ", 0 0 1px ").concat(_colors.DN60A), ")"),
28
- // These buttons are floating, so they need an override to overlay interaction states
29
- // eslint-disable-next-line @atlaskit/design-system/no-nested-styles
30
- '& > button': {
31
- backgroundColor: "var(--ds-surface-overlay, ".concat(_colors.DN70, ")")
32
- },
33
- // eslint-disable-next-line @atlaskit/design-system/no-nested-styles
34
- '& > button:hover': {
35
- backgroundColor: "var(--ds-surface-overlay-hovered, ".concat(_colors.DN60, ")")
26
+ var buttonWrapperBaseStyles = (0, _react.css)({
27
+ boxSizing: 'border-box',
28
+ width: "var(--ds-space-400, 32px)",
29
+ zIndex: 200,
30
+ backgroundColor: "var(--ds-surface-overlay, ".concat(_colors.N0, ")"),
31
+ borderRadius: "var(--ds-border-radius, 3px)",
32
+ fontSize: _constants.fontSize,
33
+ '&:last-child': {
34
+ marginInlineStart: "var(--ds-space-050, 4px)"
36
35
  },
37
- // eslint-disable-next-line @atlaskit/design-system/no-nested-styles
38
- '& > button:active': {
39
- backgroundColor: "var(--ds-surface-overlay-pressed, ".concat(_colors.B75, ")"),
40
- color: "var(--ds-text, ".concat(_colors.B400, ")")
41
- }
42
- });
43
- var buttonWrapperElevationLightStyles = (0, _react.css)({
44
36
  boxShadow: "var(--ds-shadow-overlay, ".concat("0 4px 8px -2px ".concat(_colors.N50A, ", 0 0 1px ").concat(_colors.N60A), ")"),
45
37
  // These buttons are floating, so they need an override to overlay interaction states
46
38
  // eslint-disable-next-line @atlaskit/design-system/no-nested-styles
@@ -57,27 +49,15 @@ var buttonWrapperElevationLightStyles = (0, _react.css)({
57
49
  color: "var(--ds-text, ".concat(_colors.B400, ")")
58
50
  }
59
51
  });
60
- var buttonWrapperBaseStyles = (0, _react.css)({
61
- boxSizing: 'border-box',
62
- width: "var(--ds-space-400, 32px)",
63
- zIndex: 200,
64
- backgroundColor: "var(--ds-surface-overlay, ".concat(_colors.N0, ")"),
65
- borderRadius: "var(--ds-border-radius, 3px)",
66
- fontSize: _constants.fontSize,
67
- '&:last-child': {
68
- marginLeft: "var(--ds-space-050, 4px)"
69
- }
70
- });
71
52
  var Buttons = function Buttons(_ref) {
72
- var mode = _ref.mode,
73
- confirmButtonLabel = _ref.confirmButtonLabel,
53
+ var confirmButtonLabel = _ref.confirmButtonLabel,
74
54
  cancelButtonLabel = _ref.cancelButtonLabel,
75
55
  onMouseDown = _ref.onMouseDown,
76
56
  onCancelClick = _ref.onCancelClick;
77
57
  return (0, _react.jsx)("div", {
78
58
  css: buttonsContainerStyles
79
59
  }, (0, _react.jsx)("div", {
80
- css: [buttonWrapperBaseStyles, mode === 'light' ? buttonWrapperElevationLightStyles : buttonWrapperElevationDarkStyles]
60
+ css: buttonWrapperBaseStyles
81
61
  }, (0, _react.jsx)(_standardButton.default, {
82
62
  "aria-label": confirmButtonLabel,
83
63
  type: "submit",
@@ -88,7 +68,7 @@ var Buttons = function Buttons(_ref) {
88
68
  shouldFitContainer: true,
89
69
  onMouseDown: onMouseDown
90
70
  })), (0, _react.jsx)("div", {
91
- css: [buttonWrapperBaseStyles, mode === 'light' ? buttonWrapperElevationLightStyles : buttonWrapperElevationDarkStyles]
71
+ css: buttonWrapperBaseStyles
92
72
  }, (0, _react.jsx)(_standardButton.default, {
93
73
  "aria-label": cancelButtonLabel,
94
74
  iconBefore: (0, _react.jsx)(_cross.default, {
@@ -100,5 +80,4 @@ var Buttons = function Buttons(_ref) {
100
80
  onMouseDown: onMouseDown
101
81
  })));
102
82
  };
103
- var _default = Buttons;
104
- exports.default = _default;
83
+ var _default = exports.default = Buttons;
@@ -5,7 +5,5 @@ Object.defineProperty(exports, "__esModule", {
5
5
  });
6
6
  exports.fontSize = exports.borderRadius = void 0;
7
7
  var _constants = require("@atlaskit/theme/constants");
8
- var fontSize = (0, _constants.fontSize)();
9
- exports.fontSize = fontSize;
10
- var borderRadius = (0, _constants.borderRadius)();
11
- exports.borderRadius = borderRadius;
8
+ var fontSize = exports.fontSize = (0, _constants.fontSize)();
9
+ var borderRadius = exports.borderRadius = (0, _constants.borderRadius)();
@@ -49,5 +49,4 @@ var useButtonFocusHook = function useButtonFocusHook(isEditing, isEditingState)
49
49
  doNotFocusOnEditButton: doNotFocusOnEditButton
50
50
  };
51
51
  };
52
- var _default = useButtonFocusHook;
53
- exports.default = _default;
52
+ var _default = exports.default = useButtonFocusHook;
@@ -66,8 +66,6 @@ var ReadView = function ReadView(_ref) {
66
66
  postReadViewClick();
67
67
  }
68
68
  };
69
-
70
- /* eslint-disable jsx-a11y/click-events-have-key-events,jsx-a11y/no-static-element-interactions,jsx-a11y/no-noninteractive-element-interactions */
71
69
  return (0, _react2.jsx)("div", {
72
70
  css: readViewContainerStyles
73
71
  }, (0, _react2.jsx)("button", {
@@ -77,7 +75,16 @@ var ReadView = function ReadView(_ref) {
77
75
  onClick: onEditRequested,
78
76
  ref: editButtonRef
79
77
  }), (0, _react2.jsx)("div", {
80
- css: [readViewWrapperStyles, readViewFitContainerWidth && readViewFitContainerWidthStyles],
78
+ css: [readViewWrapperStyles, readViewFitContainerWidth && readViewFitContainerWidthStyles]
79
+ /**
80
+ * It is not normally acceptable to add click handlers to non-interactive elements
81
+ * as this is an accessibility anti-pattern. However, because this instance is
82
+ * account for clicking on links that may be embedded within inline-edit and not
83
+ * creating an inaccessible custom element, we can add role="presentation" so that
84
+ * there is no negative impacts to assistive technologies.
85
+ * (Why links are embeeded in inline-edit is for another day...)
86
+ */,
87
+ role: "presentation",
81
88
  onClick: onReadViewClick,
82
89
  onMouseDown: function onMouseDown(e) {
83
90
  startX.current = e.clientX;
@@ -85,7 +92,5 @@ var ReadView = function ReadView(_ref) {
85
92
  },
86
93
  "data-read-view-fit-container-width": readViewFitContainerWidth
87
94
  }, readView()));
88
- /* eslint-enable jsx-a11y/click-events-have-key-events,jsx-a11y/no-static-element-interactions,jsx-a11y/no-noninteractive-element-interactions */
89
95
  };
90
- var _default = ReadView;
91
- exports.default = _default;
96
+ var _default = exports.default = ReadView;
@@ -1,11 +1,9 @@
1
- import _extends from "@babel/runtime/helpers/extends";
2
1
  /** @jsx jsx */
3
2
  import React, { useCallback, useRef, useState } from 'react';
4
3
  import { css, jsx } from '@emotion/react';
5
4
  import { usePlatformLeafEventHandler } from '@atlaskit/analytics-next';
6
5
  import Field from '@atlaskit/form/Field';
7
6
  import Form from '@atlaskit/form/Form';
8
- import GlobalTheme from '@atlaskit/theme/components';
9
7
  import Buttons from './internal/buttons';
10
8
  import useButtonFocusHook from './internal/hooks/use-button-focus-hook';
11
9
  import ReadView from './internal/read-view';
@@ -13,13 +11,10 @@ const fieldStyles = css({
13
11
  maxWidth: '100%',
14
12
  position: 'relative'
15
13
  });
16
- const buttonStyles = css({
17
- display: 'none'
18
- });
19
14
  const analyticsAttributes = {
20
15
  componentName: 'inlineEdit',
21
16
  packageName: "@atlaskit/inline-edit",
22
- packageVersion: "12.4.2"
17
+ packageVersion: "13.0.0"
23
18
  };
24
19
  const noop = () => {};
25
20
  const InnerInlineEdit = props => {
@@ -41,8 +36,7 @@ const InnerInlineEdit = props => {
41
36
  analyticsContext,
42
37
  onConfirm: providedOnConfirm,
43
38
  onCancel: providedOnCancel = noop,
44
- onEdit: providedOnEdit = noop,
45
- mode
39
+ onEdit: providedOnEdit = noop
46
40
  } = props;
47
41
  const wasFocusReceivedSinceLastBlurRef = useRef(false);
48
42
  const isControlled = typeof isEditing === 'undefined';
@@ -143,8 +137,15 @@ const InnerInlineEdit = props => {
143
137
  onSubmit,
144
138
  ref: formRef
145
139
  }
146
- }) => /* eslint-disable-next-line jsx-a11y/no-noninteractive-element-interactions */
147
- jsx("form", {
140
+ }) => jsx("form", {
141
+ /**
142
+ * It is not normally acceptable to add key handlers to non-interactive elements
143
+ * as this is an accessibility anti-pattern. However, because this instance is
144
+ * to add support for keyboard functionality instead of creating an inaccessible
145
+ * custom element, we can add role="presentation" so that there is no negative
146
+ * impacts to assistive technologies.
147
+ */
148
+ role: "presentation",
148
149
  onKeyDown: e => {
149
150
  onKeyDown(e);
150
151
  if (e.key === 'Esc' || e.key === 'Escape') {
@@ -179,12 +180,12 @@ const InnerInlineEdit = props => {
179
180
  /** Prevents focus on edit button only if mouse is used to click button, but not when keyboard is used */
180
181
  doNotFocusOnEditButton();
181
182
  },
182
- mode: mode,
183
183
  onCancelClick: onCancelClick
184
184
  }) : /** This is to allow Ctrl + Enter to submit without action buttons */
185
185
  jsx("button", {
186
- css: buttonStyles,
187
- type: "submit"
186
+ hidden: true,
187
+ type: "submit",
188
+ "aria-label": "Submit"
188
189
  })))));
189
190
  }
190
191
  return (/** Form, Field are used here only for the label and spacing */
@@ -198,11 +199,6 @@ const InnerInlineEdit = props => {
198
199
  );
199
200
  };
200
201
  const InlineEdit = props => {
201
- return jsx(GlobalTheme.Consumer, null, tokens => {
202
- const mode = tokens.mode;
203
- return jsx(InnerInlineEdit, _extends({}, props, {
204
- mode: mode
205
- }));
206
- });
202
+ return jsx(InnerInlineEdit, props);
207
203
  };
208
204
  export default InlineEdit;
@@ -4,36 +4,28 @@ import { css, jsx } from '@emotion/react';
4
4
  import Button from '@atlaskit/button/standard-button';
5
5
  import ConfirmIcon from '@atlaskit/icon/glyph/check';
6
6
  import CancelIcon from '@atlaskit/icon/glyph/cross';
7
- import { B400, B75, DN50A, DN60, DN60A, DN70, N0, N20A, N30A, N50A, N60A } from '@atlaskit/theme/colors';
7
+ import { B400, N0, N20A, N30A, N50A, N60A } from '@atlaskit/theme/colors';
8
8
  import { fontSize } from './constants';
9
9
  const buttonsContainerStyles = css({
10
10
  display: 'flex',
11
- marginTop: "var(--ds-space-075, 6px)",
11
+ marginBlockStart: "var(--ds-space-075, 6px)",
12
12
  position: 'absolute',
13
13
  // eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage
14
- top: '100%',
14
+ insetBlockStart: '100%',
15
15
  // eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage
16
- right: 0,
16
+ insetInlineEnd: 0,
17
17
  flexShrink: 0
18
18
  });
19
- const buttonWrapperElevationDarkStyles = css({
20
- boxShadow: `var(--ds-shadow-overlay, ${`0 4px 8px -2px ${DN50A}, 0 0 1px ${DN60A}`})`,
21
- // These buttons are floating, so they need an override to overlay interaction states
22
- // eslint-disable-next-line @atlaskit/design-system/no-nested-styles
23
- '& > button': {
24
- backgroundColor: `var(--ds-surface-overlay, ${DN70})`
25
- },
26
- // eslint-disable-next-line @atlaskit/design-system/no-nested-styles
27
- '& > button:hover': {
28
- backgroundColor: `var(--ds-surface-overlay-hovered, ${DN60})`
19
+ const buttonWrapperBaseStyles = css({
20
+ boxSizing: 'border-box',
21
+ width: "var(--ds-space-400, 32px)",
22
+ zIndex: 200,
23
+ backgroundColor: `var(--ds-surface-overlay, ${N0})`,
24
+ borderRadius: "var(--ds-border-radius, 3px)",
25
+ fontSize: fontSize,
26
+ '&:last-child': {
27
+ marginInlineStart: "var(--ds-space-050, 4px)"
29
28
  },
30
- // eslint-disable-next-line @atlaskit/design-system/no-nested-styles
31
- '& > button:active': {
32
- backgroundColor: `var(--ds-surface-overlay-pressed, ${B75})`,
33
- color: `var(--ds-text, ${B400})`
34
- }
35
- });
36
- const buttonWrapperElevationLightStyles = css({
37
29
  boxShadow: `var(--ds-shadow-overlay, ${`0 4px 8px -2px ${N50A}, 0 0 1px ${N60A}`})`,
38
30
  // These buttons are floating, so they need an override to overlay interaction states
39
31
  // eslint-disable-next-line @atlaskit/design-system/no-nested-styles
@@ -50,19 +42,7 @@ const buttonWrapperElevationLightStyles = css({
50
42
  color: `var(--ds-text, ${B400})`
51
43
  }
52
44
  });
53
- const buttonWrapperBaseStyles = css({
54
- boxSizing: 'border-box',
55
- width: "var(--ds-space-400, 32px)",
56
- zIndex: 200,
57
- backgroundColor: `var(--ds-surface-overlay, ${N0})`,
58
- borderRadius: "var(--ds-border-radius, 3px)",
59
- fontSize: fontSize,
60
- '&:last-child': {
61
- marginLeft: "var(--ds-space-050, 4px)"
62
- }
63
- });
64
45
  const Buttons = ({
65
- mode,
66
46
  confirmButtonLabel,
67
47
  cancelButtonLabel,
68
48
  onMouseDown,
@@ -71,7 +51,7 @@ const Buttons = ({
71
51
  return jsx("div", {
72
52
  css: buttonsContainerStyles
73
53
  }, jsx("div", {
74
- css: [buttonWrapperBaseStyles, mode === 'light' ? buttonWrapperElevationLightStyles : buttonWrapperElevationDarkStyles]
54
+ css: buttonWrapperBaseStyles
75
55
  }, jsx(Button, {
76
56
  "aria-label": confirmButtonLabel,
77
57
  type: "submit",
@@ -82,7 +62,7 @@ const Buttons = ({
82
62
  shouldFitContainer: true,
83
63
  onMouseDown: onMouseDown
84
64
  })), jsx("div", {
85
- css: [buttonWrapperBaseStyles, mode === 'light' ? buttonWrapperElevationLightStyles : buttonWrapperElevationDarkStyles]
65
+ css: buttonWrapperBaseStyles
86
66
  }, jsx(Button, {
87
67
  "aria-label": cancelButtonLabel,
88
68
  iconBefore: jsx(CancelIcon, {
@@ -57,8 +57,6 @@ const ReadView = ({
57
57
  postReadViewClick();
58
58
  }
59
59
  };
60
-
61
- /* eslint-disable jsx-a11y/click-events-have-key-events,jsx-a11y/no-static-element-interactions,jsx-a11y/no-noninteractive-element-interactions */
62
60
  return jsx("div", {
63
61
  css: readViewContainerStyles
64
62
  }, jsx("button", {
@@ -68,7 +66,16 @@ const ReadView = ({
68
66
  onClick: onEditRequested,
69
67
  ref: editButtonRef
70
68
  }), jsx("div", {
71
- css: [readViewWrapperStyles, readViewFitContainerWidth && readViewFitContainerWidthStyles],
69
+ css: [readViewWrapperStyles, readViewFitContainerWidth && readViewFitContainerWidthStyles]
70
+ /**
71
+ * It is not normally acceptable to add click handlers to non-interactive elements
72
+ * as this is an accessibility anti-pattern. However, because this instance is
73
+ * account for clicking on links that may be embedded within inline-edit and not
74
+ * creating an inaccessible custom element, we can add role="presentation" so that
75
+ * there is no negative impacts to assistive technologies.
76
+ * (Why links are embeeded in inline-edit is for another day...)
77
+ */,
78
+ role: "presentation",
72
79
  onClick: onReadViewClick,
73
80
  onMouseDown: e => {
74
81
  startX.current = e.clientX;
@@ -76,7 +83,5 @@ const ReadView = ({
76
83
  },
77
84
  "data-read-view-fit-container-width": readViewFitContainerWidth
78
85
  }, readView()));
79
- /* eslint-enable jsx-a11y/click-events-have-key-events,jsx-a11y/no-static-element-interactions,jsx-a11y/no-noninteractive-element-interactions */
80
86
  };
81
-
82
87
  export default ReadView;
@@ -1,15 +1,13 @@
1
- import _extends from "@babel/runtime/helpers/extends";
2
1
  import _defineProperty from "@babel/runtime/helpers/defineProperty";
3
2
  import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
4
- function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
5
- 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) { _defineProperty(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; }
3
+ 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; }
4
+ 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; }
6
5
  /** @jsx jsx */
7
6
  import React, { useCallback, useRef, useState } from 'react';
8
7
  import { css, jsx } from '@emotion/react';
9
8
  import { usePlatformLeafEventHandler } from '@atlaskit/analytics-next';
10
9
  import Field from '@atlaskit/form/Field';
11
10
  import Form from '@atlaskit/form/Form';
12
- import GlobalTheme from '@atlaskit/theme/components';
13
11
  import Buttons from './internal/buttons';
14
12
  import useButtonFocusHook from './internal/hooks/use-button-focus-hook';
15
13
  import ReadView from './internal/read-view';
@@ -17,13 +15,10 @@ var fieldStyles = css({
17
15
  maxWidth: '100%',
18
16
  position: 'relative'
19
17
  });
20
- var buttonStyles = css({
21
- display: 'none'
22
- });
23
18
  var analyticsAttributes = {
24
19
  componentName: 'inlineEdit',
25
20
  packageName: "@atlaskit/inline-edit",
26
- packageVersion: "12.4.2"
21
+ packageVersion: "13.0.0"
27
22
  };
28
23
  var noop = function noop() {};
29
24
  var InnerInlineEdit = function InnerInlineEdit(props) {
@@ -54,8 +49,7 @@ var InnerInlineEdit = function InnerInlineEdit(props) {
54
49
  _props$onCancel = props.onCancel,
55
50
  providedOnCancel = _props$onCancel === void 0 ? noop : _props$onCancel,
56
51
  _props$onEdit = props.onEdit,
57
- providedOnEdit = _props$onEdit === void 0 ? noop : _props$onEdit,
58
- mode = props.mode;
52
+ providedOnEdit = _props$onEdit === void 0 ? noop : _props$onEdit;
59
53
  var wasFocusReceivedSinceLastBlurRef = useRef(false);
60
54
  var isControlled = typeof isEditing === 'undefined';
61
55
  var _useState = useState(startWithEditViewOpen),
@@ -159,50 +153,56 @@ var InnerInlineEdit = function InnerInlineEdit(props) {
159
153
  _onKeyDown = _ref$formProps.onKeyDown,
160
154
  onSubmit = _ref$formProps.onSubmit,
161
155
  formRef = _ref$formProps.ref;
162
- return (/* eslint-disable-next-line jsx-a11y/no-noninteractive-element-interactions */
163
- jsx("form", {
164
- onKeyDown: function onKeyDown(e) {
165
- _onKeyDown(e);
166
- if (e.key === 'Esc' || e.key === 'Escape') {
167
- onCancel();
168
- }
156
+ return jsx("form", {
157
+ /**
158
+ * It is not normally acceptable to add key handlers to non-interactive elements
159
+ * as this is an accessibility anti-pattern. However, because this instance is
160
+ * to add support for keyboard functionality instead of creating an inaccessible
161
+ * custom element, we can add role="presentation" so that there is no negative
162
+ * impacts to assistive technologies.
163
+ */
164
+ role: "presentation",
165
+ onKeyDown: function onKeyDown(e) {
166
+ _onKeyDown(e);
167
+ if (e.key === 'Esc' || e.key === 'Escape') {
168
+ onCancel();
169
+ }
170
+ },
171
+ onSubmit: onSubmit,
172
+ ref: formRef
173
+ }, jsx(Field, {
174
+ name: "inlineEdit",
175
+ label: label,
176
+ defaultValue: defaultValue,
177
+ validate: validate,
178
+ isRequired: isRequired,
179
+ key: "edit-view" // used for reset to default value
180
+ }, function (_ref2) {
181
+ var fieldProps = _ref2.fieldProps,
182
+ error = _ref2.error;
183
+ return jsx("div", {
184
+ css: fieldStyles,
185
+ onBlur: function onBlur() {
186
+ onEditViewWrapperBlur(fieldProps.isInvalid, onSubmit, formRef);
187
+ },
188
+ onFocus: onEditViewWrapperFocus
189
+ }, editView(_objectSpread(_objectSpread({}, fieldProps), {}, {
190
+ errorMessage: error
191
+ }), editViewRef), !hideActionButtons ? jsx(Buttons, {
192
+ cancelButtonLabel: cancelButtonLabel,
193
+ confirmButtonLabel: confirmButtonLabel,
194
+ onMouseDown: function onMouseDown() {
195
+ /** Prevents focus on edit button only if mouse is used to click button, but not when keyboard is used */
196
+ doNotFocusOnEditButton();
169
197
  },
170
- onSubmit: onSubmit,
171
- ref: formRef
172
- }, jsx(Field, {
173
- name: "inlineEdit",
174
- label: label,
175
- defaultValue: defaultValue,
176
- validate: validate,
177
- isRequired: isRequired,
178
- key: "edit-view" // used for reset to default value
179
- }, function (_ref2) {
180
- var fieldProps = _ref2.fieldProps,
181
- error = _ref2.error;
182
- return jsx("div", {
183
- css: fieldStyles,
184
- onBlur: function onBlur() {
185
- onEditViewWrapperBlur(fieldProps.isInvalid, onSubmit, formRef);
186
- },
187
- onFocus: onEditViewWrapperFocus
188
- }, editView(_objectSpread(_objectSpread({}, fieldProps), {}, {
189
- errorMessage: error
190
- }), editViewRef), !hideActionButtons ? jsx(Buttons, {
191
- cancelButtonLabel: cancelButtonLabel,
192
- confirmButtonLabel: confirmButtonLabel,
193
- onMouseDown: function onMouseDown() {
194
- /** Prevents focus on edit button only if mouse is used to click button, but not when keyboard is used */
195
- doNotFocusOnEditButton();
196
- },
197
- mode: mode,
198
- onCancelClick: onCancelClick
199
- }) : /** This is to allow Ctrl + Enter to submit without action buttons */
200
- jsx("button", {
201
- css: buttonStyles,
202
- type: "submit"
203
- }));
204
- }))
205
- );
198
+ onCancelClick: onCancelClick
199
+ }) : /** This is to allow Ctrl + Enter to submit without action buttons */
200
+ jsx("button", {
201
+ hidden: true,
202
+ type: "submit",
203
+ "aria-label": "Submit"
204
+ }));
205
+ }));
206
206
  });
207
207
  }
208
208
  return (/** Form, Field are used here only for the label and spacing */
@@ -216,11 +216,6 @@ var InnerInlineEdit = function InnerInlineEdit(props) {
216
216
  );
217
217
  };
218
218
  var InlineEdit = function InlineEdit(props) {
219
- return jsx(GlobalTheme.Consumer, null, function (tokens) {
220
- var mode = tokens.mode;
221
- return jsx(InnerInlineEdit, _extends({}, props, {
222
- mode: mode
223
- }));
224
- });
219
+ return jsx(InnerInlineEdit, props);
225
220
  };
226
221
  export default InlineEdit;
@@ -4,36 +4,28 @@ import { css, jsx } from '@emotion/react';
4
4
  import Button from '@atlaskit/button/standard-button';
5
5
  import ConfirmIcon from '@atlaskit/icon/glyph/check';
6
6
  import CancelIcon from '@atlaskit/icon/glyph/cross';
7
- import { B400, B75, DN50A, DN60, DN60A, DN70, N0, N20A, N30A, N50A, N60A } from '@atlaskit/theme/colors';
7
+ import { B400, N0, N20A, N30A, N50A, N60A } from '@atlaskit/theme/colors';
8
8
  import { fontSize } from './constants';
9
9
  var buttonsContainerStyles = css({
10
10
  display: 'flex',
11
- marginTop: "var(--ds-space-075, 6px)",
11
+ marginBlockStart: "var(--ds-space-075, 6px)",
12
12
  position: 'absolute',
13
13
  // eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage
14
- top: '100%',
14
+ insetBlockStart: '100%',
15
15
  // eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage
16
- right: 0,
16
+ insetInlineEnd: 0,
17
17
  flexShrink: 0
18
18
  });
19
- var buttonWrapperElevationDarkStyles = css({
20
- boxShadow: "var(--ds-shadow-overlay, ".concat("0 4px 8px -2px ".concat(DN50A, ", 0 0 1px ").concat(DN60A), ")"),
21
- // These buttons are floating, so they need an override to overlay interaction states
22
- // eslint-disable-next-line @atlaskit/design-system/no-nested-styles
23
- '& > button': {
24
- backgroundColor: "var(--ds-surface-overlay, ".concat(DN70, ")")
25
- },
26
- // eslint-disable-next-line @atlaskit/design-system/no-nested-styles
27
- '& > button:hover': {
28
- backgroundColor: "var(--ds-surface-overlay-hovered, ".concat(DN60, ")")
19
+ var buttonWrapperBaseStyles = css({
20
+ boxSizing: 'border-box',
21
+ width: "var(--ds-space-400, 32px)",
22
+ zIndex: 200,
23
+ backgroundColor: "var(--ds-surface-overlay, ".concat(N0, ")"),
24
+ borderRadius: "var(--ds-border-radius, 3px)",
25
+ fontSize: fontSize,
26
+ '&:last-child': {
27
+ marginInlineStart: "var(--ds-space-050, 4px)"
29
28
  },
30
- // eslint-disable-next-line @atlaskit/design-system/no-nested-styles
31
- '& > button:active': {
32
- backgroundColor: "var(--ds-surface-overlay-pressed, ".concat(B75, ")"),
33
- color: "var(--ds-text, ".concat(B400, ")")
34
- }
35
- });
36
- var buttonWrapperElevationLightStyles = css({
37
29
  boxShadow: "var(--ds-shadow-overlay, ".concat("0 4px 8px -2px ".concat(N50A, ", 0 0 1px ").concat(N60A), ")"),
38
30
  // These buttons are floating, so they need an override to overlay interaction states
39
31
  // eslint-disable-next-line @atlaskit/design-system/no-nested-styles
@@ -50,27 +42,15 @@ var buttonWrapperElevationLightStyles = css({
50
42
  color: "var(--ds-text, ".concat(B400, ")")
51
43
  }
52
44
  });
53
- var buttonWrapperBaseStyles = css({
54
- boxSizing: 'border-box',
55
- width: "var(--ds-space-400, 32px)",
56
- zIndex: 200,
57
- backgroundColor: "var(--ds-surface-overlay, ".concat(N0, ")"),
58
- borderRadius: "var(--ds-border-radius, 3px)",
59
- fontSize: fontSize,
60
- '&:last-child': {
61
- marginLeft: "var(--ds-space-050, 4px)"
62
- }
63
- });
64
45
  var Buttons = function Buttons(_ref) {
65
- var mode = _ref.mode,
66
- confirmButtonLabel = _ref.confirmButtonLabel,
46
+ var confirmButtonLabel = _ref.confirmButtonLabel,
67
47
  cancelButtonLabel = _ref.cancelButtonLabel,
68
48
  onMouseDown = _ref.onMouseDown,
69
49
  onCancelClick = _ref.onCancelClick;
70
50
  return jsx("div", {
71
51
  css: buttonsContainerStyles
72
52
  }, jsx("div", {
73
- css: [buttonWrapperBaseStyles, mode === 'light' ? buttonWrapperElevationLightStyles : buttonWrapperElevationDarkStyles]
53
+ css: buttonWrapperBaseStyles
74
54
  }, jsx(Button, {
75
55
  "aria-label": confirmButtonLabel,
76
56
  type: "submit",
@@ -81,7 +61,7 @@ var Buttons = function Buttons(_ref) {
81
61
  shouldFitContainer: true,
82
62
  onMouseDown: onMouseDown
83
63
  })), jsx("div", {
84
- css: [buttonWrapperBaseStyles, mode === 'light' ? buttonWrapperElevationLightStyles : buttonWrapperElevationDarkStyles]
64
+ css: buttonWrapperBaseStyles
85
65
  }, jsx(Button, {
86
66
  "aria-label": cancelButtonLabel,
87
67
  iconBefore: jsx(CancelIcon, {
@@ -56,8 +56,6 @@ var ReadView = function ReadView(_ref) {
56
56
  postReadViewClick();
57
57
  }
58
58
  };
59
-
60
- /* eslint-disable jsx-a11y/click-events-have-key-events,jsx-a11y/no-static-element-interactions,jsx-a11y/no-noninteractive-element-interactions */
61
59
  return jsx("div", {
62
60
  css: readViewContainerStyles
63
61
  }, jsx("button", {
@@ -67,7 +65,16 @@ var ReadView = function ReadView(_ref) {
67
65
  onClick: onEditRequested,
68
66
  ref: editButtonRef
69
67
  }), jsx("div", {
70
- css: [readViewWrapperStyles, readViewFitContainerWidth && readViewFitContainerWidthStyles],
68
+ css: [readViewWrapperStyles, readViewFitContainerWidth && readViewFitContainerWidthStyles]
69
+ /**
70
+ * It is not normally acceptable to add click handlers to non-interactive elements
71
+ * as this is an accessibility anti-pattern. However, because this instance is
72
+ * account for clicking on links that may be embedded within inline-edit and not
73
+ * creating an inaccessible custom element, we can add role="presentation" so that
74
+ * there is no negative impacts to assistive technologies.
75
+ * (Why links are embeeded in inline-edit is for another day...)
76
+ */,
77
+ role: "presentation",
71
78
  onClick: onReadViewClick,
72
79
  onMouseDown: function onMouseDown(e) {
73
80
  startX.current = e.clientX;
@@ -75,7 +82,5 @@ var ReadView = function ReadView(_ref) {
75
82
  },
76
83
  "data-read-view-fit-container-width": readViewFitContainerWidth
77
84
  }, readView()));
78
- /* eslint-enable jsx-a11y/click-events-have-key-events,jsx-a11y/no-static-element-interactions,jsx-a11y/no-noninteractive-element-interactions */
79
85
  };
80
-
81
86
  export default ReadView;
@@ -1,13 +1,11 @@
1
1
  /** @jsx jsx */
2
2
  /// <reference types="react" />
3
3
  import { jsx } from '@emotion/react';
4
- import { ThemeModes } from '@atlaskit/theme/types';
5
4
  interface ButtonsProp {
6
- mode: ThemeModes;
7
5
  confirmButtonLabel: string;
8
6
  cancelButtonLabel: string;
9
7
  onMouseDown: () => void;
10
8
  onCancelClick: (event: React.MouseEvent<HTMLElement>) => void;
11
9
  }
12
- declare const Buttons: ({ mode, confirmButtonLabel, cancelButtonLabel, onMouseDown, onCancelClick, }: ButtonsProp) => jsx.JSX.Element;
10
+ declare const Buttons: ({ confirmButtonLabel, cancelButtonLabel, onMouseDown, onCancelClick, }: ButtonsProp) => jsx.JSX.Element;
13
11
  export default Buttons;
@@ -1,13 +1,11 @@
1
1
  /// <reference types="react" />
2
2
  /** @jsx jsx */
3
3
  import { jsx } from '@emotion/react';
4
- import { ThemeModes } from '@atlaskit/theme/types';
5
4
  interface ButtonsProp {
6
- mode: ThemeModes;
7
5
  confirmButtonLabel: string;
8
6
  cancelButtonLabel: string;
9
7
  onMouseDown: () => void;
10
8
  onCancelClick: (event: React.MouseEvent<HTMLElement>) => void;
11
9
  }
12
- declare const Buttons: ({ mode, confirmButtonLabel, cancelButtonLabel, onMouseDown, onCancelClick, }: ButtonsProp) => jsx.JSX.Element;
10
+ declare const Buttons: ({ confirmButtonLabel, cancelButtonLabel, onMouseDown, onCancelClick, }: ButtonsProp) => jsx.JSX.Element;
13
11
  export default Buttons;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/inline-edit",
3
- "version": "12.4.2",
3
+ "version": "13.0.0",
4
4
  "description": "An inline edit displays a custom input component that switches between reading and editing on the same page.",
5
5
  "publishConfig": {
6
6
  "registry": "https://registry.npmjs.org/"
@@ -33,14 +33,14 @@
33
33
  },
34
34
  "dependencies": {
35
35
  "@atlaskit/analytics-next": "^9.1.0",
36
- "@atlaskit/button": "^16.9.0",
36
+ "@atlaskit/button": "^16.13.0",
37
37
  "@atlaskit/codemod-utils": "^4.2.0",
38
- "@atlaskit/form": "^8.11.0",
38
+ "@atlaskit/form": "^9.0.0",
39
39
  "@atlaskit/icon": "^21.12.0",
40
- "@atlaskit/inline-dialog": "^13.6.0",
40
+ "@atlaskit/inline-dialog": "^14.0.0",
41
41
  "@atlaskit/textfield": "^5.6.0",
42
- "@atlaskit/theme": "^12.5.0",
43
- "@atlaskit/tokens": "^1.15.0",
42
+ "@atlaskit/theme": "^12.6.0",
43
+ "@atlaskit/tokens": "^1.28.0",
44
44
  "@babel/runtime": "^7.0.0",
45
45
  "@emotion/react": "^11.7.1"
46
46
  },
@@ -49,12 +49,13 @@
49
49
  },
50
50
  "devDependencies": {
51
51
  "@af/accessibility-testing": "*",
52
- "@atlaskit/datetime-picker": "^12.7.0",
52
+ "@af/integration-testing": "*",
53
+ "@atlaskit/datetime-picker": "^12.10.0",
53
54
  "@atlaskit/docs": "*",
54
55
  "@atlaskit/section-message": "^6.4.0",
55
- "@atlaskit/select": "^16.5.0",
56
+ "@atlaskit/select": "^16.7.0",
56
57
  "@atlaskit/ssr": "*",
57
- "@atlaskit/tag": "^11.5.0",
58
+ "@atlaskit/tag": "^11.6.0",
58
59
  "@atlaskit/tag-group": "^10.2.0",
59
60
  "@atlaskit/textarea": "^4.7.0",
60
61
  "@atlaskit/visual-regression": "*",