@atlaskit/inline-edit 12.4.3 → 13.0.1
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 +61 -45
- package/codemods/migrates/utils.ts +7 -2
- package/dist/cjs/inline-edit.js +4 -14
- package/dist/cjs/inline-editable-textfield.js +1 -2
- package/dist/cjs/internal/buttons.js +16 -37
- package/dist/cjs/internal/constants.js +2 -4
- package/dist/cjs/internal/hooks/use-button-focus-hook.js +1 -2
- package/dist/cjs/internal/read-view.js +1 -2
- package/dist/es2019/inline-edit.js +3 -12
- package/dist/es2019/internal/buttons.js +15 -35
- package/dist/esm/inline-edit.js +3 -12
- package/dist/esm/internal/buttons.js +16 -36
- package/dist/types/internal/buttons.d.ts +1 -3
- package/dist/types-ts4.5/internal/buttons.d.ts +1 -3
- package/package.json +10 -10
package/CHANGELOG.md
CHANGED
|
@@ -1,29 +1,45 @@
|
|
|
1
1
|
# @atlaskit/inline-edit
|
|
2
2
|
|
|
3
|
+
## 13.0.1
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- Updated dependencies
|
|
8
|
+
|
|
9
|
+
## 13.0.0
|
|
10
|
+
|
|
11
|
+
### Major Changes
|
|
12
|
+
|
|
13
|
+
- [#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.
|
|
14
|
+
|
|
15
|
+
### Patch Changes
|
|
16
|
+
|
|
17
|
+
- Updated dependencies
|
|
18
|
+
|
|
3
19
|
## 12.4.3
|
|
4
20
|
|
|
5
21
|
### Patch Changes
|
|
6
22
|
|
|
7
|
-
- [`b59892e4807`](https://bitbucket.org/atlassian/atlassian-frontend/commits/b59892e4807) - "Clean up some small accessibility issues"
|
|
23
|
+
- [#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"
|
|
8
24
|
|
|
9
25
|
## 12.4.2
|
|
10
26
|
|
|
11
27
|
### Patch Changes
|
|
12
28
|
|
|
13
|
-
- [`fd6bb9c9184`](https://bitbucket.org/atlassian/atlassian-frontend/commits/fd6bb9c9184) - Delete version.json
|
|
29
|
+
- [#38162](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/38162) [`fd6bb9c9184`](https://bitbucket.org/atlassian/atlassian-frontend/commits/fd6bb9c9184) - Delete version.json
|
|
14
30
|
- Updated dependencies
|
|
15
31
|
|
|
16
32
|
## 12.4.1
|
|
17
33
|
|
|
18
34
|
### Patch Changes
|
|
19
35
|
|
|
20
|
-
- [`4f5a3b9d776`](https://bitbucket.org/atlassian/atlassian-frontend/commits/4f5a3b9d776) - Improvement to last regression bugfix where internal form state persisted across blur and cancel incorrectly
|
|
36
|
+
- [#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
|
|
21
37
|
|
|
22
38
|
## 12.4.0
|
|
23
39
|
|
|
24
40
|
### Minor Changes
|
|
25
41
|
|
|
26
|
-
- [`2f2e72c5189`](https://bitbucket.org/atlassian/atlassian-frontend/commits/2f2e72c5189) - Remove unintentionally exposed types: `ref` and `createAnalyticsEvent` from the component props interface.
|
|
42
|
+
- [#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.
|
|
27
43
|
|
|
28
44
|
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.
|
|
29
45
|
|
|
@@ -31,37 +47,37 @@
|
|
|
31
47
|
|
|
32
48
|
### Patch Changes
|
|
33
49
|
|
|
34
|
-
- [`7257459df07`](https://bitbucket.org/atlassian/atlassian-frontend/commits/7257459df07) - Fixed a regression: onCancel in InlinedEditableTextfield now resets the editable input to the defaultValue
|
|
50
|
+
- [#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
|
|
35
51
|
|
|
36
52
|
## 12.3.4
|
|
37
53
|
|
|
38
54
|
### Patch Changes
|
|
39
55
|
|
|
40
|
-
- [`599bfe90ee3`](https://bitbucket.org/atlassian/atlassian-frontend/commits/599bfe90ee3) - Internal change to use shape tokens. There is no expected visual change.
|
|
56
|
+
- [#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.
|
|
41
57
|
|
|
42
58
|
## 12.3.3
|
|
43
59
|
|
|
44
60
|
### Patch Changes
|
|
45
61
|
|
|
46
|
-
- [`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.
|
|
62
|
+
- [#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.
|
|
47
63
|
|
|
48
64
|
## 12.3.2
|
|
49
65
|
|
|
50
66
|
### Patch Changes
|
|
51
67
|
|
|
52
|
-
- [`9d00501a414`](https://bitbucket.org/atlassian/atlassian-frontend/commits/9d00501a414) - Ensure legacy types are published for TS 4.5-4.8
|
|
68
|
+
- [#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
|
|
53
69
|
|
|
54
70
|
## 12.3.1
|
|
55
71
|
|
|
56
72
|
### Patch Changes
|
|
57
73
|
|
|
58
|
-
- [`41fae2c6f68`](https://bitbucket.org/atlassian/atlassian-frontend/commits/41fae2c6f68) - Upgrade Typescript from `4.5.5` to `4.9.5`
|
|
74
|
+
- [#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`
|
|
59
75
|
|
|
60
76
|
## 12.3.0
|
|
61
77
|
|
|
62
78
|
### Minor Changes
|
|
63
79
|
|
|
64
|
-
- [`56507598609`](https://bitbucket.org/atlassian/atlassian-frontend/commits/56507598609) - Skip minor dependency bump
|
|
80
|
+
- [#33258](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/33258) [`56507598609`](https://bitbucket.org/atlassian/atlassian-frontend/commits/56507598609) - Skip minor dependency bump
|
|
65
81
|
|
|
66
82
|
### Patch Changes
|
|
67
83
|
|
|
@@ -71,13 +87,13 @@
|
|
|
71
87
|
|
|
72
88
|
### Patch Changes
|
|
73
89
|
|
|
74
|
-
- [`4ba10567310`](https://bitbucket.org/atlassian/atlassian-frontend/commits/4ba10567310) - Internal changes.
|
|
90
|
+
- [#32211](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/32211) [`4ba10567310`](https://bitbucket.org/atlassian/atlassian-frontend/commits/4ba10567310) - Internal changes.
|
|
75
91
|
|
|
76
92
|
## 12.2.11
|
|
77
93
|
|
|
78
94
|
### Patch Changes
|
|
79
95
|
|
|
80
|
-
- [`261420360ec`](https://bitbucket.org/atlassian/atlassian-frontend/commits/261420360ec) - Upgrades component types to support React 18.
|
|
96
|
+
- [#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.
|
|
81
97
|
- Updated dependencies
|
|
82
98
|
|
|
83
99
|
## 12.2.10
|
|
@@ -90,7 +106,7 @@
|
|
|
90
106
|
|
|
91
107
|
### Patch Changes
|
|
92
108
|
|
|
93
|
-
- [`63c2f0b3f96`](https://bitbucket.org/atlassian/atlassian-frontend/commits/63c2f0b3f96) - Internal changes to use spacing tokens. There is no expected behaviour or visual change.
|
|
109
|
+
- [#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.
|
|
94
110
|
|
|
95
111
|
## 12.2.8
|
|
96
112
|
|
|
@@ -102,7 +118,7 @@
|
|
|
102
118
|
|
|
103
119
|
### Patch Changes
|
|
104
120
|
|
|
105
|
-
- [`18aeca8c199`](https://bitbucket.org/atlassian/atlassian-frontend/commits/18aeca8c199) - Internal change to update token references. There is no expected behaviour or visual change.
|
|
121
|
+
- [#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.
|
|
106
122
|
|
|
107
123
|
## 12.2.6
|
|
108
124
|
|
|
@@ -126,25 +142,25 @@
|
|
|
126
142
|
|
|
127
143
|
### Patch Changes
|
|
128
144
|
|
|
129
|
-
- [`9de88fa1e1e`](https://bitbucket.org/atlassian/atlassian-frontend/commits/9de88fa1e1e) - Internal changes to include spacing tokens in component implementations.
|
|
145
|
+
- [#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.
|
|
130
146
|
|
|
131
147
|
## 12.2.2
|
|
132
148
|
|
|
133
149
|
### Patch Changes
|
|
134
150
|
|
|
135
|
-
- [`8cc2f888c83`](https://bitbucket.org/atlassian/atlassian-frontend/commits/8cc2f888c83) - Upgrade Typescript from `4.3.5` to `4.5.5`
|
|
151
|
+
- [#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`
|
|
136
152
|
|
|
137
153
|
## 12.2.1
|
|
138
154
|
|
|
139
155
|
### Patch Changes
|
|
140
156
|
|
|
141
|
-
- [`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.
|
|
157
|
+
- [#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.
|
|
142
158
|
|
|
143
159
|
## 12.2.0
|
|
144
160
|
|
|
145
161
|
### Minor Changes
|
|
146
162
|
|
|
147
|
-
- [`b52ffa29d19`](https://bitbucket.org/atlassian/atlassian-frontend/commits/b52ffa29d19) - Updates `@emotion/core` to `@emotion/react`; v10 to v11. There is no expected behavior change.
|
|
163
|
+
- [#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.
|
|
148
164
|
|
|
149
165
|
### Patch Changes
|
|
150
166
|
|
|
@@ -154,7 +170,7 @@
|
|
|
154
170
|
|
|
155
171
|
### Patch Changes
|
|
156
172
|
|
|
157
|
-
- [`8d4228767b0`](https://bitbucket.org/atlassian/atlassian-frontend/commits/8d4228767b0) - Upgrade Typescript from `4.2.4` to `4.3.5`.
|
|
173
|
+
- [#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`.
|
|
158
174
|
|
|
159
175
|
## 12.1.13
|
|
160
176
|
|
|
@@ -166,7 +182,7 @@
|
|
|
166
182
|
|
|
167
183
|
### Patch Changes
|
|
168
184
|
|
|
169
|
-
- [`cb2392f6d33`](https://bitbucket.org/atlassian/atlassian-frontend/commits/cb2392f6d33) - Upgrade to TypeScript 4.2.4
|
|
185
|
+
- [#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
|
|
170
186
|
- Updated dependencies
|
|
171
187
|
|
|
172
188
|
## 12.1.11
|
|
@@ -191,14 +207,14 @@
|
|
|
191
207
|
|
|
192
208
|
### Patch Changes
|
|
193
209
|
|
|
194
|
-
- [`f65c4ec35c9`](https://bitbucket.org/atlassian/atlassian-frontend/commits/f65c4ec35c9) - Rewrite dynamic styles to be static to aid compiled migration.
|
|
210
|
+
- [#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.
|
|
195
211
|
- Updated dependencies
|
|
196
212
|
|
|
197
213
|
## 12.1.7
|
|
198
214
|
|
|
199
215
|
### Patch Changes
|
|
200
216
|
|
|
201
|
-
- [`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
|
|
217
|
+
- [#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
|
|
202
218
|
- Updated dependencies
|
|
203
219
|
|
|
204
220
|
## 12.1.6
|
|
@@ -211,14 +227,14 @@
|
|
|
211
227
|
|
|
212
228
|
### Patch Changes
|
|
213
229
|
|
|
214
|
-
- [`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.
|
|
230
|
+
- [#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.
|
|
215
231
|
- Updated dependencies
|
|
216
232
|
|
|
217
233
|
## 12.1.4
|
|
218
234
|
|
|
219
235
|
### Patch Changes
|
|
220
236
|
|
|
221
|
-
- [`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.
|
|
237
|
+
- [#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.
|
|
222
238
|
|
|
223
239
|
## 12.1.3
|
|
224
240
|
|
|
@@ -242,7 +258,7 @@
|
|
|
242
258
|
|
|
243
259
|
### Minor Changes
|
|
244
260
|
|
|
245
|
-
- [`5c29b7f70ff`](https://bitbucket.org/atlassian/atlassian-frontend/commits/5c29b7f70ff) - Instrumented Inline-edit with the new theming package, `@atlaskit/tokens`.
|
|
261
|
+
- [#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`.
|
|
246
262
|
|
|
247
263
|
Tokens will be visible only in applications configured to use the new Tokens API (currently in alpha).
|
|
248
264
|
These changes are intended to be interoperable with the legacy theme implementation. Legacy dark mode users should expect no visual or breaking changes.
|
|
@@ -261,19 +277,19 @@
|
|
|
261
277
|
|
|
262
278
|
### Patch Changes
|
|
263
279
|
|
|
264
|
-
- [`378d1cef00f`](https://bitbucket.org/atlassian/atlassian-frontend/commits/378d1cef00f) - Bump `@atlaskit/theme` to version `^11.3.0`.
|
|
280
|
+
- [#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`.
|
|
265
281
|
|
|
266
282
|
## 12.0.8
|
|
267
283
|
|
|
268
284
|
### Patch Changes
|
|
269
285
|
|
|
270
|
-
- [`f9783cebfe6`](https://bitbucket.org/atlassian/atlassian-frontend/commits/f9783cebfe6) - Added action button wrapper back to fix transparent background color issue
|
|
286
|
+
- [#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
|
|
271
287
|
|
|
272
288
|
## 12.0.7
|
|
273
289
|
|
|
274
290
|
### Patch Changes
|
|
275
291
|
|
|
276
|
-
- [`d6f7ff383cf`](https://bitbucket.org/atlassian/atlassian-frontend/commits/d6f7ff383cf) - Updates to development dependency `storybook-addon-performance`
|
|
292
|
+
- [#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`
|
|
277
293
|
|
|
278
294
|
## 12.0.6
|
|
279
295
|
|
|
@@ -285,7 +301,7 @@
|
|
|
285
301
|
|
|
286
302
|
### Patch Changes
|
|
287
303
|
|
|
288
|
-
- [`d65547e28ba`](https://bitbucket.org/atlassian/atlassian-frontend/commits/d65547e28ba) - Fixed a few UI defects:
|
|
304
|
+
- [#9749](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/9749) [`d65547e28ba`](https://bitbucket.org/atlassian/atlassian-frontend/commits/d65547e28ba) - Fixed a few UI defects:
|
|
289
305
|
|
|
290
306
|
- reset line-height to 1 for inline edit container
|
|
291
307
|
- fixed action buttons background color issue
|
|
@@ -294,13 +310,13 @@
|
|
|
294
310
|
|
|
295
311
|
### Patch Changes
|
|
296
312
|
|
|
297
|
-
- [`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.
|
|
313
|
+
- [#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.
|
|
298
314
|
|
|
299
315
|
## 12.0.3
|
|
300
316
|
|
|
301
317
|
### Patch Changes
|
|
302
318
|
|
|
303
|
-
- [`79c23df6340`](https://bitbucket.org/atlassian/atlassian-frontend/commits/79c23df6340) - Use injected package name and version for analytics instead of version.json.
|
|
319
|
+
- [#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.
|
|
304
320
|
- [`c50a63f9f72`](https://bitbucket.org/atlassian/atlassian-frontend/commits/c50a63f9f72) - Upgrade `@types/react-select` to `v3.1.2` and fix type breaks
|
|
305
321
|
- Updated dependencies
|
|
306
322
|
|
|
@@ -308,7 +324,7 @@
|
|
|
308
324
|
|
|
309
325
|
### Patch Changes
|
|
310
326
|
|
|
311
|
-
- [`0e9764f7384`](https://bitbucket.org/atlassian/atlassian-frontend/commits/0e9764f7384) - Added codemod-utils as a package dependency, also fixed a few codemod functions
|
|
327
|
+
- [#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
|
|
312
328
|
|
|
313
329
|
- elevate `InlineEditStateless` as default component as we have merged stateful and stateless
|
|
314
330
|
- make sure named import works for `InlineEditableTextfield`
|
|
@@ -317,13 +333,13 @@
|
|
|
317
333
|
|
|
318
334
|
### Patch Changes
|
|
319
335
|
|
|
320
|
-
- [`bfb4fe65750`](https://bitbucket.org/atlassian/atlassian-frontend/commits/bfb4fe65750) - Added missed codemod (handling editView function defined outside) case for migration
|
|
336
|
+
- [#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
|
|
321
337
|
|
|
322
338
|
## 12.0.0
|
|
323
339
|
|
|
324
340
|
### Major Changes
|
|
325
341
|
|
|
326
|
-
- [`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`.
|
|
342
|
+
- [#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`.
|
|
327
343
|
|
|
328
344
|
- removed dynamic loading of inline dialog allowing consumers to compose their own experiences
|
|
329
345
|
- merged controlled & uncontrolled inline edit components
|
|
@@ -371,7 +387,7 @@
|
|
|
371
387
|
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.
|
|
372
388
|
|
|
373
389
|
Run `npx @atlaskit/codemod-cli -h` for more details on usage.
|
|
374
|
-
For Atlassians, refer to [this doc](https://
|
|
390
|
+
For Atlassians, refer to [this doc](https://hello.atlassian.net/wiki/spaces/AF/pages/2627171992/Codemods) for more details on the codemod CLI.
|
|
375
391
|
|
|
376
392
|
### Patch Changes
|
|
377
393
|
|
|
@@ -381,13 +397,13 @@
|
|
|
381
397
|
|
|
382
398
|
### Patch Changes
|
|
383
399
|
|
|
384
|
-
- [`a4c112b2ad7`](https://bitbucket.org/atlassian/atlassian-frontend/commits/a4c112b2ad7) - Fixed inline edit not submitting automatically when blurred
|
|
400
|
+
- [#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
|
|
385
401
|
|
|
386
402
|
## 11.0.10
|
|
387
403
|
|
|
388
404
|
### Patch Changes
|
|
389
405
|
|
|
390
|
-
- [`f5cf9fc9e9`](https://bitbucket.org/atlassian/atlassian-frontend/commits/f5cf9fc9e9) - ### General conversion for inline-edit
|
|
406
|
+
- [#7425](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/7425) [`f5cf9fc9e9`](https://bitbucket.org/atlassian/atlassian-frontend/commits/f5cf9fc9e9) - ### General conversion for inline-edit
|
|
391
407
|
|
|
392
408
|
There is no breaking change in this conversion, only some mechanical changes applied:
|
|
393
409
|
|
|
@@ -408,20 +424,20 @@
|
|
|
408
424
|
|
|
409
425
|
### Patch Changes
|
|
410
426
|
|
|
411
|
-
- [`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.
|
|
427
|
+
- [#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.
|
|
412
428
|
- Updated dependencies
|
|
413
429
|
|
|
414
430
|
## 11.0.7
|
|
415
431
|
|
|
416
432
|
### Patch Changes
|
|
417
433
|
|
|
418
|
-
- [`d3265f19be`](https://bitbucket.org/atlassian/atlassian-frontend/commits/d3265f19be) - Transpile packages using babel rather than tsc
|
|
434
|
+
- [#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
|
|
419
435
|
|
|
420
436
|
## 11.0.6
|
|
421
437
|
|
|
422
438
|
### Patch Changes
|
|
423
439
|
|
|
424
|
-
- [`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.
|
|
440
|
+
- [#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.
|
|
425
441
|
This requires version 3.8 of Typescript, read more about how we handle Typescript versions here: https://atlaskit.atlassian.com/get-started
|
|
426
442
|
Also add `typescript` to `devDependencies` to denote version that the package was built with.
|
|
427
443
|
|
|
@@ -441,13 +457,13 @@
|
|
|
441
457
|
|
|
442
458
|
### Patch Changes
|
|
443
459
|
|
|
444
|
-
- [`6360c46009`](https://bitbucket.org/atlassian/atlassian-frontend/commits/6360c46009) - Reenable integration tests for Edge browser
|
|
460
|
+
- [#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
|
|
445
461
|
|
|
446
462
|
## 11.0.2
|
|
447
463
|
|
|
448
464
|
### Patch Changes
|
|
449
465
|
|
|
450
|
-
- [`6c525a8229`](https://bitbucket.org/atlassian/atlassian-frontend/commits/6c525a8229) - Upgraded to TypeScript 3.9.6 and tslib to 2.0.0
|
|
466
|
+
- [#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
|
|
451
467
|
|
|
452
468
|
Since tslib is a dependency for all our packages we recommend that products also follow this tslib upgrade
|
|
453
469
|
to prevent duplicates of tslib being bundled.
|
|
@@ -456,14 +472,14 @@
|
|
|
456
472
|
|
|
457
473
|
### Patch Changes
|
|
458
474
|
|
|
459
|
-
- [`db053b24d8`](https://bitbucket.org/atlassian/atlassian-frontend/commits/db053b24d8) - Update all the theme imports to be tree-shakable
|
|
475
|
+
- [#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
|
|
460
476
|
- Updated dependencies
|
|
461
477
|
|
|
462
478
|
## 11.0.0
|
|
463
479
|
|
|
464
480
|
### Major Changes
|
|
465
481
|
|
|
466
|
-
- [`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.
|
|
482
|
+
- [#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.
|
|
467
483
|
For more information see: https://community.developer.atlassian.com/t/atlaskit-to-drop-support-for-internet-explorer-11-from-1st-july-2020/39534
|
|
468
484
|
|
|
469
485
|
### Patch Changes
|
|
@@ -474,7 +490,7 @@
|
|
|
474
490
|
|
|
475
491
|
### Patch Changes
|
|
476
492
|
|
|
477
|
-
- [`54a9514fcf`](https://bitbucket.org/atlassian/atlassian-frontend/commits/54a9514fcf) - Build and supporting files will no longer be published to npm
|
|
493
|
+
- [#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
|
|
478
494
|
|
|
479
495
|
## 10.0.32
|
|
480
496
|
|
|
@@ -1,4 +1,9 @@
|
|
|
1
|
-
import core, {
|
|
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)
|
package/dist/cjs/inline-edit.js
CHANGED
|
@@ -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,7 +13,6 @@ 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"));
|
|
@@ -29,7 +27,7 @@ var fieldStyles = (0, _react2.css)({
|
|
|
29
27
|
var analyticsAttributes = {
|
|
30
28
|
componentName: 'inlineEdit',
|
|
31
29
|
packageName: "@atlaskit/inline-edit",
|
|
32
|
-
packageVersion: "
|
|
30
|
+
packageVersion: "13.0.1"
|
|
33
31
|
};
|
|
34
32
|
var noop = function noop() {};
|
|
35
33
|
var InnerInlineEdit = function InnerInlineEdit(props) {
|
|
@@ -60,8 +58,7 @@ var InnerInlineEdit = function InnerInlineEdit(props) {
|
|
|
60
58
|
_props$onCancel = props.onCancel,
|
|
61
59
|
providedOnCancel = _props$onCancel === void 0 ? noop : _props$onCancel,
|
|
62
60
|
_props$onEdit = props.onEdit,
|
|
63
|
-
providedOnEdit = _props$onEdit === void 0 ? noop : _props$onEdit
|
|
64
|
-
mode = props.mode;
|
|
61
|
+
providedOnEdit = _props$onEdit === void 0 ? noop : _props$onEdit;
|
|
65
62
|
var wasFocusReceivedSinceLastBlurRef = (0, _react.useRef)(false);
|
|
66
63
|
var isControlled = typeof isEditing === 'undefined';
|
|
67
64
|
var _useState = (0, _react.useState)(startWithEditViewOpen),
|
|
@@ -207,7 +204,6 @@ var InnerInlineEdit = function InnerInlineEdit(props) {
|
|
|
207
204
|
/** Prevents focus on edit button only if mouse is used to click button, but not when keyboard is used */
|
|
208
205
|
doNotFocusOnEditButton();
|
|
209
206
|
},
|
|
210
|
-
mode: mode,
|
|
211
207
|
onCancelClick: onCancelClick
|
|
212
208
|
}) : /** This is to allow Ctrl + Enter to submit without action buttons */
|
|
213
209
|
(0, _react2.jsx)("button", {
|
|
@@ -229,12 +225,6 @@ var InnerInlineEdit = function InnerInlineEdit(props) {
|
|
|
229
225
|
);
|
|
230
226
|
};
|
|
231
227
|
var InlineEdit = function InlineEdit(props) {
|
|
232
|
-
return (0, _react2.jsx)(
|
|
233
|
-
var mode = tokens.mode;
|
|
234
|
-
return (0, _react2.jsx)(InnerInlineEdit, (0, _extends2.default)({}, props, {
|
|
235
|
-
mode: mode
|
|
236
|
-
}));
|
|
237
|
-
});
|
|
228
|
+
return (0, _react2.jsx)(InnerInlineEdit, props);
|
|
238
229
|
};
|
|
239
|
-
var _default = InlineEdit;
|
|
240
|
-
exports.default = _default;
|
|
230
|
+
var _default = exports.default = InlineEdit;
|
|
@@ -15,32 +15,24 @@ var _constants = require("./constants");
|
|
|
15
15
|
|
|
16
16
|
var buttonsContainerStyles = (0, _react.css)({
|
|
17
17
|
display: 'flex',
|
|
18
|
-
|
|
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
|
-
|
|
21
|
+
insetBlockStart: '100%',
|
|
22
22
|
// eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage
|
|
23
|
-
|
|
23
|
+
insetInlineEnd: 0,
|
|
24
24
|
flexShrink: 0
|
|
25
25
|
});
|
|
26
|
-
var
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
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
|
|
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:
|
|
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:
|
|
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.
|
|
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)();
|
|
@@ -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';
|
|
@@ -16,7 +14,7 @@ const fieldStyles = css({
|
|
|
16
14
|
const analyticsAttributes = {
|
|
17
15
|
componentName: 'inlineEdit',
|
|
18
16
|
packageName: "@atlaskit/inline-edit",
|
|
19
|
-
packageVersion: "
|
|
17
|
+
packageVersion: "13.0.1"
|
|
20
18
|
};
|
|
21
19
|
const noop = () => {};
|
|
22
20
|
const InnerInlineEdit = props => {
|
|
@@ -38,8 +36,7 @@ const InnerInlineEdit = props => {
|
|
|
38
36
|
analyticsContext,
|
|
39
37
|
onConfirm: providedOnConfirm,
|
|
40
38
|
onCancel: providedOnCancel = noop,
|
|
41
|
-
onEdit: providedOnEdit = noop
|
|
42
|
-
mode
|
|
39
|
+
onEdit: providedOnEdit = noop
|
|
43
40
|
} = props;
|
|
44
41
|
const wasFocusReceivedSinceLastBlurRef = useRef(false);
|
|
45
42
|
const isControlled = typeof isEditing === 'undefined';
|
|
@@ -183,7 +180,6 @@ const InnerInlineEdit = props => {
|
|
|
183
180
|
/** Prevents focus on edit button only if mouse is used to click button, but not when keyboard is used */
|
|
184
181
|
doNotFocusOnEditButton();
|
|
185
182
|
},
|
|
186
|
-
mode: mode,
|
|
187
183
|
onCancelClick: onCancelClick
|
|
188
184
|
}) : /** This is to allow Ctrl + Enter to submit without action buttons */
|
|
189
185
|
jsx("button", {
|
|
@@ -203,11 +199,6 @@ const InnerInlineEdit = props => {
|
|
|
203
199
|
);
|
|
204
200
|
};
|
|
205
201
|
const InlineEdit = props => {
|
|
206
|
-
return jsx(
|
|
207
|
-
const mode = tokens.mode;
|
|
208
|
-
return jsx(InnerInlineEdit, _extends({}, props, {
|
|
209
|
-
mode: mode
|
|
210
|
-
}));
|
|
211
|
-
});
|
|
202
|
+
return jsx(InnerInlineEdit, props);
|
|
212
203
|
};
|
|
213
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,
|
|
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
|
-
|
|
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
|
-
|
|
14
|
+
insetBlockStart: '100%',
|
|
15
15
|
// eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage
|
|
16
|
-
|
|
16
|
+
insetInlineEnd: 0,
|
|
17
17
|
flexShrink: 0
|
|
18
18
|
});
|
|
19
|
-
const
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
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:
|
|
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:
|
|
65
|
+
css: buttonWrapperBaseStyles
|
|
86
66
|
}, jsx(Button, {
|
|
87
67
|
"aria-label": cancelButtonLabel,
|
|
88
68
|
iconBefore: jsx(CancelIcon, {
|
package/dist/esm/inline-edit.js
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
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
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; }
|
|
@@ -9,7 +8,6 @@ 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';
|
|
@@ -20,7 +18,7 @@ var fieldStyles = css({
|
|
|
20
18
|
var analyticsAttributes = {
|
|
21
19
|
componentName: 'inlineEdit',
|
|
22
20
|
packageName: "@atlaskit/inline-edit",
|
|
23
|
-
packageVersion: "
|
|
21
|
+
packageVersion: "13.0.1"
|
|
24
22
|
};
|
|
25
23
|
var noop = function noop() {};
|
|
26
24
|
var InnerInlineEdit = function InnerInlineEdit(props) {
|
|
@@ -51,8 +49,7 @@ var InnerInlineEdit = function InnerInlineEdit(props) {
|
|
|
51
49
|
_props$onCancel = props.onCancel,
|
|
52
50
|
providedOnCancel = _props$onCancel === void 0 ? noop : _props$onCancel,
|
|
53
51
|
_props$onEdit = props.onEdit,
|
|
54
|
-
providedOnEdit = _props$onEdit === void 0 ? noop : _props$onEdit
|
|
55
|
-
mode = props.mode;
|
|
52
|
+
providedOnEdit = _props$onEdit === void 0 ? noop : _props$onEdit;
|
|
56
53
|
var wasFocusReceivedSinceLastBlurRef = useRef(false);
|
|
57
54
|
var isControlled = typeof isEditing === 'undefined';
|
|
58
55
|
var _useState = useState(startWithEditViewOpen),
|
|
@@ -198,7 +195,6 @@ var InnerInlineEdit = function InnerInlineEdit(props) {
|
|
|
198
195
|
/** Prevents focus on edit button only if mouse is used to click button, but not when keyboard is used */
|
|
199
196
|
doNotFocusOnEditButton();
|
|
200
197
|
},
|
|
201
|
-
mode: mode,
|
|
202
198
|
onCancelClick: onCancelClick
|
|
203
199
|
}) : /** This is to allow Ctrl + Enter to submit without action buttons */
|
|
204
200
|
jsx("button", {
|
|
@@ -220,11 +216,6 @@ var InnerInlineEdit = function InnerInlineEdit(props) {
|
|
|
220
216
|
);
|
|
221
217
|
};
|
|
222
218
|
var InlineEdit = function InlineEdit(props) {
|
|
223
|
-
return jsx(
|
|
224
|
-
var mode = tokens.mode;
|
|
225
|
-
return jsx(InnerInlineEdit, _extends({}, props, {
|
|
226
|
-
mode: mode
|
|
227
|
-
}));
|
|
228
|
-
});
|
|
219
|
+
return jsx(InnerInlineEdit, props);
|
|
229
220
|
};
|
|
230
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,
|
|
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
|
-
|
|
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
|
-
|
|
14
|
+
insetBlockStart: '100%',
|
|
15
15
|
// eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage
|
|
16
|
-
|
|
16
|
+
insetInlineEnd: 0,
|
|
17
17
|
flexShrink: 0
|
|
18
18
|
});
|
|
19
|
-
var
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
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
|
|
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:
|
|
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:
|
|
64
|
+
css: buttonWrapperBaseStyles
|
|
85
65
|
}, jsx(Button, {
|
|
86
66
|
"aria-label": cancelButtonLabel,
|
|
87
67
|
iconBefore: jsx(CancelIcon, {
|
|
@@ -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: ({
|
|
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: ({
|
|
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": "
|
|
3
|
+
"version": "13.0.1",
|
|
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.
|
|
36
|
+
"@atlaskit/button": "^16.16.0",
|
|
37
37
|
"@atlaskit/codemod-utils": "^4.2.0",
|
|
38
|
-
"@atlaskit/form": "^
|
|
39
|
-
"@atlaskit/icon": "^
|
|
40
|
-
"@atlaskit/inline-dialog": "^
|
|
38
|
+
"@atlaskit/form": "^9.0.0",
|
|
39
|
+
"@atlaskit/icon": "^22.0.0",
|
|
40
|
+
"@atlaskit/inline-dialog": "^14.0.0",
|
|
41
41
|
"@atlaskit/textfield": "^5.6.0",
|
|
42
42
|
"@atlaskit/theme": "^12.6.0",
|
|
43
|
-
"@atlaskit/tokens": "^1.
|
|
43
|
+
"@atlaskit/tokens": "^1.28.0",
|
|
44
44
|
"@babel/runtime": "^7.0.0",
|
|
45
45
|
"@emotion/react": "^11.7.1"
|
|
46
46
|
},
|
|
@@ -50,14 +50,14 @@
|
|
|
50
50
|
"devDependencies": {
|
|
51
51
|
"@af/accessibility-testing": "*",
|
|
52
52
|
"@af/integration-testing": "*",
|
|
53
|
-
"@atlaskit/datetime-picker": "^
|
|
53
|
+
"@atlaskit/datetime-picker": "^13.0.0",
|
|
54
54
|
"@atlaskit/docs": "*",
|
|
55
55
|
"@atlaskit/section-message": "^6.4.0",
|
|
56
|
-
"@atlaskit/select": "^
|
|
56
|
+
"@atlaskit/select": "^17.0.0",
|
|
57
57
|
"@atlaskit/ssr": "*",
|
|
58
|
-
"@atlaskit/tag": "^
|
|
58
|
+
"@atlaskit/tag": "^12.0.0",
|
|
59
59
|
"@atlaskit/tag-group": "^10.2.0",
|
|
60
|
-
"@atlaskit/textarea": "^
|
|
60
|
+
"@atlaskit/textarea": "^5.0.0",
|
|
61
61
|
"@atlaskit/visual-regression": "*",
|
|
62
62
|
"@atlaskit/webdriver-runner": "*",
|
|
63
63
|
"@atlassian/atlassian-frontend-prettier-config-1.0.1": "npm:@atlassian/atlassian-frontend-prettier-config@1.0.1",
|