@atlaskit/inline-edit 15.3.20 → 15.3.21
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +6 -0
- package/dist/cjs/inline-edit.js +4 -11
- package/dist/es2019/inline-edit.js +4 -11
- package/dist/esm/inline-edit.js +4 -11
- package/package.json +8 -11
package/CHANGELOG.md
CHANGED
package/dist/cjs/inline-edit.js
CHANGED
|
@@ -9,7 +9,6 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
9
9
|
exports.default = void 0;
|
|
10
10
|
require("./inline-edit.compiled.css");
|
|
11
11
|
var _runtime = require("@compiled/react/runtime");
|
|
12
|
-
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
|
13
12
|
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
14
13
|
var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));
|
|
15
14
|
var _react = _interopRequireWildcard(require("react"));
|
|
@@ -179,14 +178,14 @@ var InnerInlineEdit = function InnerInlineEdit(props) {
|
|
|
179
178
|
onSubmit = _ref$formProps.onSubmit,
|
|
180
179
|
formRef = _ref$formProps.ref,
|
|
181
180
|
reset = _ref.reset;
|
|
182
|
-
return /*#__PURE__*/_react.default.createElement("form",
|
|
181
|
+
return /*#__PURE__*/_react.default.createElement("form", {
|
|
183
182
|
/**
|
|
184
183
|
* It is not normally acceptable to add key handlers to non-interactive elements
|
|
185
184
|
* as this is an accessibility anti-pattern. However, because this instance is
|
|
186
185
|
* to add support for keyboard functionality instead of creating an inaccessible
|
|
187
186
|
* custom element, we can add role="presentation" so that there is no negative
|
|
188
187
|
* impacts to assistive technologies.
|
|
189
|
-
|
|
188
|
+
*/
|
|
190
189
|
role: "presentation",
|
|
191
190
|
onKeyDown: function onKeyDown(e) {
|
|
192
191
|
_onKeyDown(e);
|
|
@@ -194,13 +193,7 @@ var InnerInlineEdit = function InnerInlineEdit(props) {
|
|
|
194
193
|
reset();
|
|
195
194
|
onCancel();
|
|
196
195
|
}
|
|
197
|
-
}
|
|
198
|
-
// Added to since field was getting focused automatically when team is restored from the banner
|
|
199
|
-
// There seems to be a fix applied below via class but it appears to be not working in our case
|
|
200
|
-
/* eslint-disable-next-line @atlassian/a11y/no-noninteractive-tabindex */
|
|
201
|
-
}, (0, _platformFeatureFlags.fg)('enable-inline-edit-focus-fix') ? {
|
|
202
|
-
tabIndex: 0
|
|
203
|
-
} : {}, {
|
|
196
|
+
},
|
|
204
197
|
onSubmit: onSubmit,
|
|
205
198
|
ref: formRef
|
|
206
199
|
// Below we have added a class name to the form element to prevent the default focus on the form element
|
|
@@ -209,7 +202,7 @@ var InnerInlineEdit = function InnerInlineEdit(props) {
|
|
|
209
202
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop
|
|
210
203
|
,
|
|
211
204
|
className: (0, _platformFeatureFlags.fg)('platform_design_system_inline_edit_dont_focus') ? 'dont-default-focus' : undefined
|
|
212
|
-
}
|
|
205
|
+
}, shouldBeEditing ? /*#__PURE__*/_react.default.createElement(_Field.default, {
|
|
213
206
|
name: "inlineEdit",
|
|
214
207
|
label: label,
|
|
215
208
|
defaultValue: defaultValue,
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
/* inline-edit.tsx generated by @compiled/babel-plugin v0.38.1 */
|
|
2
|
-
import _extends from "@babel/runtime/helpers/extends";
|
|
3
2
|
import "./inline-edit.compiled.css";
|
|
4
3
|
import { ax, ix } from "@compiled/react/runtime";
|
|
5
4
|
import React, { useCallback, useRef, useState } from 'react';
|
|
@@ -155,14 +154,14 @@ const InnerInlineEdit = props => {
|
|
|
155
154
|
ref: formRef
|
|
156
155
|
},
|
|
157
156
|
reset
|
|
158
|
-
}) => /*#__PURE__*/React.createElement("form",
|
|
157
|
+
}) => /*#__PURE__*/React.createElement("form", {
|
|
159
158
|
/**
|
|
160
159
|
* It is not normally acceptable to add key handlers to non-interactive elements
|
|
161
160
|
* as this is an accessibility anti-pattern. However, because this instance is
|
|
162
161
|
* to add support for keyboard functionality instead of creating an inaccessible
|
|
163
162
|
* custom element, we can add role="presentation" so that there is no negative
|
|
164
163
|
* impacts to assistive technologies.
|
|
165
|
-
|
|
164
|
+
*/
|
|
166
165
|
role: "presentation",
|
|
167
166
|
onKeyDown: e => {
|
|
168
167
|
onKeyDown(e);
|
|
@@ -170,13 +169,7 @@ const InnerInlineEdit = props => {
|
|
|
170
169
|
reset();
|
|
171
170
|
onCancel();
|
|
172
171
|
}
|
|
173
|
-
}
|
|
174
|
-
// Added to since field was getting focused automatically when team is restored from the banner
|
|
175
|
-
// There seems to be a fix applied below via class but it appears to be not working in our case
|
|
176
|
-
/* eslint-disable-next-line @atlassian/a11y/no-noninteractive-tabindex */
|
|
177
|
-
}, fg('enable-inline-edit-focus-fix') ? {
|
|
178
|
-
tabIndex: 0
|
|
179
|
-
} : {}, {
|
|
172
|
+
},
|
|
180
173
|
onSubmit: onSubmit,
|
|
181
174
|
ref: formRef
|
|
182
175
|
// Below we have added a class name to the form element to prevent the default focus on the form element
|
|
@@ -185,7 +178,7 @@ const InnerInlineEdit = props => {
|
|
|
185
178
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop
|
|
186
179
|
,
|
|
187
180
|
className: fg('platform_design_system_inline_edit_dont_focus') ? 'dont-default-focus' : undefined
|
|
188
|
-
}
|
|
181
|
+
}, shouldBeEditing ? /*#__PURE__*/React.createElement(Field, {
|
|
189
182
|
name: "inlineEdit",
|
|
190
183
|
label: label,
|
|
191
184
|
defaultValue: defaultValue,
|
package/dist/esm/inline-edit.js
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
/* inline-edit.tsx generated by @compiled/babel-plugin v0.38.1 */
|
|
2
|
-
import _extends from "@babel/runtime/helpers/extends";
|
|
3
2
|
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
4
3
|
import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
|
|
5
4
|
import "./inline-edit.compiled.css";
|
|
@@ -170,14 +169,14 @@ var InnerInlineEdit = function InnerInlineEdit(props) {
|
|
|
170
169
|
onSubmit = _ref$formProps.onSubmit,
|
|
171
170
|
formRef = _ref$formProps.ref,
|
|
172
171
|
reset = _ref.reset;
|
|
173
|
-
return /*#__PURE__*/React.createElement("form",
|
|
172
|
+
return /*#__PURE__*/React.createElement("form", {
|
|
174
173
|
/**
|
|
175
174
|
* It is not normally acceptable to add key handlers to non-interactive elements
|
|
176
175
|
* as this is an accessibility anti-pattern. However, because this instance is
|
|
177
176
|
* to add support for keyboard functionality instead of creating an inaccessible
|
|
178
177
|
* custom element, we can add role="presentation" so that there is no negative
|
|
179
178
|
* impacts to assistive technologies.
|
|
180
|
-
|
|
179
|
+
*/
|
|
181
180
|
role: "presentation",
|
|
182
181
|
onKeyDown: function onKeyDown(e) {
|
|
183
182
|
_onKeyDown(e);
|
|
@@ -185,13 +184,7 @@ var InnerInlineEdit = function InnerInlineEdit(props) {
|
|
|
185
184
|
reset();
|
|
186
185
|
onCancel();
|
|
187
186
|
}
|
|
188
|
-
}
|
|
189
|
-
// Added to since field was getting focused automatically when team is restored from the banner
|
|
190
|
-
// There seems to be a fix applied below via class but it appears to be not working in our case
|
|
191
|
-
/* eslint-disable-next-line @atlassian/a11y/no-noninteractive-tabindex */
|
|
192
|
-
}, fg('enable-inline-edit-focus-fix') ? {
|
|
193
|
-
tabIndex: 0
|
|
194
|
-
} : {}, {
|
|
187
|
+
},
|
|
195
188
|
onSubmit: onSubmit,
|
|
196
189
|
ref: formRef
|
|
197
190
|
// Below we have added a class name to the form element to prevent the default focus on the form element
|
|
@@ -200,7 +193,7 @@ var InnerInlineEdit = function InnerInlineEdit(props) {
|
|
|
200
193
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop
|
|
201
194
|
,
|
|
202
195
|
className: fg('platform_design_system_inline_edit_dont_focus') ? 'dont-default-focus' : undefined
|
|
203
|
-
}
|
|
196
|
+
}, shouldBeEditing ? /*#__PURE__*/React.createElement(Field, {
|
|
204
197
|
name: "inlineEdit",
|
|
205
198
|
label: label,
|
|
206
199
|
defaultValue: defaultValue,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/inline-edit",
|
|
3
|
-
"version": "15.3.
|
|
3
|
+
"version": "15.3.21",
|
|
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/"
|
|
@@ -34,14 +34,14 @@
|
|
|
34
34
|
},
|
|
35
35
|
"dependencies": {
|
|
36
36
|
"@atlaskit/analytics-next": "^11.1.0",
|
|
37
|
-
"@atlaskit/button": "^23.
|
|
37
|
+
"@atlaskit/button": "^23.7.0",
|
|
38
38
|
"@atlaskit/css": "^0.17.0",
|
|
39
|
-
"@atlaskit/form": "^
|
|
39
|
+
"@atlaskit/form": "^15.0.0",
|
|
40
40
|
"@atlaskit/icon": "^29.0.0",
|
|
41
41
|
"@atlaskit/inline-dialog": "^18.0.0",
|
|
42
42
|
"@atlaskit/platform-feature-flags": "^1.1.0",
|
|
43
43
|
"@atlaskit/primitives": "^16.4.0",
|
|
44
|
-
"@atlaskit/textfield": "^8.
|
|
44
|
+
"@atlaskit/textfield": "^8.2.0",
|
|
45
45
|
"@atlaskit/theme": "^21.0.0",
|
|
46
46
|
"@atlaskit/tokens": "^8.4.0",
|
|
47
47
|
"@atlaskit/visually-hidden": "^3.0.0",
|
|
@@ -54,15 +54,15 @@
|
|
|
54
54
|
"devDependencies": {
|
|
55
55
|
"@af/accessibility-testing": "workspace:^",
|
|
56
56
|
"@af/integration-testing": "workspace:^",
|
|
57
|
-
"@atlaskit/datetime-picker": "^17.
|
|
57
|
+
"@atlaskit/datetime-picker": "^17.2.0",
|
|
58
58
|
"@atlaskit/docs": "^11.2.0",
|
|
59
59
|
"@atlaskit/heading": "^5.2.0",
|
|
60
60
|
"@atlaskit/link": "^3.2.0",
|
|
61
|
-
"@atlaskit/section-message": "^8.
|
|
62
|
-
"@atlaskit/select": "^21.
|
|
61
|
+
"@atlaskit/section-message": "^8.10.0",
|
|
62
|
+
"@atlaskit/select": "^21.5.0",
|
|
63
63
|
"@atlaskit/tag": "^14.1.0",
|
|
64
64
|
"@atlaskit/tag-group": "^12.0.0",
|
|
65
|
-
"@atlaskit/textarea": "^8.
|
|
65
|
+
"@atlaskit/textarea": "^8.2.0",
|
|
66
66
|
"@atlassian/ssr-tests": "workspace:^",
|
|
67
67
|
"@testing-library/react": "^13.4.0",
|
|
68
68
|
"react-dom": "^18.2.0",
|
|
@@ -95,9 +95,6 @@
|
|
|
95
95
|
"platform-feature-flags": {
|
|
96
96
|
"platform_design_system_inline_edit_dont_focus": {
|
|
97
97
|
"type": "boolean"
|
|
98
|
-
},
|
|
99
|
-
"enable-inline-edit-focus-fix": {
|
|
100
|
-
"type": "boolean"
|
|
101
98
|
}
|
|
102
99
|
}
|
|
103
100
|
}
|