@atlaskit/inline-edit 15.3.19 → 15.3.20

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,12 @@
1
1
  # @atlaskit/inline-edit
2
2
 
3
+ ## 15.3.20
4
+
5
+ ### Patch Changes
6
+
7
+ - [`651910f627978`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/651910f627978) -
8
+ fixing focus issue on restoring team
9
+
3
10
  ## 15.3.19
4
11
 
5
12
  ### Patch Changes
@@ -9,6 +9,7 @@ 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"));
12
13
  var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
13
14
  var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));
14
15
  var _react = _interopRequireWildcard(require("react"));
@@ -178,14 +179,14 @@ var InnerInlineEdit = function InnerInlineEdit(props) {
178
179
  onSubmit = _ref$formProps.onSubmit,
179
180
  formRef = _ref$formProps.ref,
180
181
  reset = _ref.reset;
181
- return /*#__PURE__*/_react.default.createElement("form", {
182
+ return /*#__PURE__*/_react.default.createElement("form", (0, _extends2.default)({
182
183
  /**
183
184
  * It is not normally acceptable to add key handlers to non-interactive elements
184
185
  * as this is an accessibility anti-pattern. However, because this instance is
185
186
  * to add support for keyboard functionality instead of creating an inaccessible
186
187
  * custom element, we can add role="presentation" so that there is no negative
187
188
  * impacts to assistive technologies.
188
- */
189
+ */
189
190
  role: "presentation",
190
191
  onKeyDown: function onKeyDown(e) {
191
192
  _onKeyDown(e);
@@ -193,7 +194,13 @@ var InnerInlineEdit = function InnerInlineEdit(props) {
193
194
  reset();
194
195
  onCancel();
195
196
  }
196
- },
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
+ } : {}, {
197
204
  onSubmit: onSubmit,
198
205
  ref: formRef
199
206
  // Below we have added a class name to the form element to prevent the default focus on the form element
@@ -202,7 +209,7 @@ var InnerInlineEdit = function InnerInlineEdit(props) {
202
209
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop
203
210
  ,
204
211
  className: (0, _platformFeatureFlags.fg)('platform_design_system_inline_edit_dont_focus') ? 'dont-default-focus' : undefined
205
- }, shouldBeEditing ? /*#__PURE__*/_react.default.createElement(_Field.default, {
212
+ }), shouldBeEditing ? /*#__PURE__*/_react.default.createElement(_Field.default, {
206
213
  name: "inlineEdit",
207
214
  label: label,
208
215
  defaultValue: defaultValue,
@@ -1,4 +1,5 @@
1
1
  /* inline-edit.tsx generated by @compiled/babel-plugin v0.38.1 */
2
+ import _extends from "@babel/runtime/helpers/extends";
2
3
  import "./inline-edit.compiled.css";
3
4
  import { ax, ix } from "@compiled/react/runtime";
4
5
  import React, { useCallback, useRef, useState } from 'react';
@@ -154,14 +155,14 @@ const InnerInlineEdit = props => {
154
155
  ref: formRef
155
156
  },
156
157
  reset
157
- }) => /*#__PURE__*/React.createElement("form", {
158
+ }) => /*#__PURE__*/React.createElement("form", _extends({
158
159
  /**
159
160
  * It is not normally acceptable to add key handlers to non-interactive elements
160
161
  * as this is an accessibility anti-pattern. However, because this instance is
161
162
  * to add support for keyboard functionality instead of creating an inaccessible
162
163
  * custom element, we can add role="presentation" so that there is no negative
163
164
  * impacts to assistive technologies.
164
- */
165
+ */
165
166
  role: "presentation",
166
167
  onKeyDown: e => {
167
168
  onKeyDown(e);
@@ -169,7 +170,13 @@ const InnerInlineEdit = props => {
169
170
  reset();
170
171
  onCancel();
171
172
  }
172
- },
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
+ } : {}, {
173
180
  onSubmit: onSubmit,
174
181
  ref: formRef
175
182
  // Below we have added a class name to the form element to prevent the default focus on the form element
@@ -178,7 +185,7 @@ const InnerInlineEdit = props => {
178
185
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop
179
186
  ,
180
187
  className: fg('platform_design_system_inline_edit_dont_focus') ? 'dont-default-focus' : undefined
181
- }, shouldBeEditing ? /*#__PURE__*/React.createElement(Field, {
188
+ }), shouldBeEditing ? /*#__PURE__*/React.createElement(Field, {
182
189
  name: "inlineEdit",
183
190
  label: label,
184
191
  defaultValue: defaultValue,
@@ -1,4 +1,5 @@
1
1
  /* inline-edit.tsx generated by @compiled/babel-plugin v0.38.1 */
2
+ import _extends from "@babel/runtime/helpers/extends";
2
3
  import _defineProperty from "@babel/runtime/helpers/defineProperty";
3
4
  import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
4
5
  import "./inline-edit.compiled.css";
@@ -169,14 +170,14 @@ var InnerInlineEdit = function InnerInlineEdit(props) {
169
170
  onSubmit = _ref$formProps.onSubmit,
170
171
  formRef = _ref$formProps.ref,
171
172
  reset = _ref.reset;
172
- return /*#__PURE__*/React.createElement("form", {
173
+ return /*#__PURE__*/React.createElement("form", _extends({
173
174
  /**
174
175
  * It is not normally acceptable to add key handlers to non-interactive elements
175
176
  * as this is an accessibility anti-pattern. However, because this instance is
176
177
  * to add support for keyboard functionality instead of creating an inaccessible
177
178
  * custom element, we can add role="presentation" so that there is no negative
178
179
  * impacts to assistive technologies.
179
- */
180
+ */
180
181
  role: "presentation",
181
182
  onKeyDown: function onKeyDown(e) {
182
183
  _onKeyDown(e);
@@ -184,7 +185,13 @@ var InnerInlineEdit = function InnerInlineEdit(props) {
184
185
  reset();
185
186
  onCancel();
186
187
  }
187
- },
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
+ } : {}, {
188
195
  onSubmit: onSubmit,
189
196
  ref: formRef
190
197
  // Below we have added a class name to the form element to prevent the default focus on the form element
@@ -193,7 +200,7 @@ var InnerInlineEdit = function InnerInlineEdit(props) {
193
200
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop
194
201
  ,
195
202
  className: fg('platform_design_system_inline_edit_dont_focus') ? 'dont-default-focus' : undefined
196
- }, shouldBeEditing ? /*#__PURE__*/React.createElement(Field, {
203
+ }), shouldBeEditing ? /*#__PURE__*/React.createElement(Field, {
197
204
  name: "inlineEdit",
198
205
  label: label,
199
206
  defaultValue: defaultValue,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/inline-edit",
3
- "version": "15.3.19",
3
+ "version": "15.3.20",
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/"
@@ -35,16 +35,15 @@
35
35
  "dependencies": {
36
36
  "@atlaskit/analytics-next": "^11.1.0",
37
37
  "@atlaskit/button": "^23.6.0",
38
- "@atlaskit/codemod-utils": "^4.2.0",
39
38
  "@atlaskit/css": "^0.17.0",
40
39
  "@atlaskit/form": "^14.3.0",
41
40
  "@atlaskit/icon": "^29.0.0",
42
41
  "@atlaskit/inline-dialog": "^18.0.0",
43
42
  "@atlaskit/platform-feature-flags": "^1.1.0",
44
- "@atlaskit/primitives": "^16.3.0",
43
+ "@atlaskit/primitives": "^16.4.0",
45
44
  "@atlaskit/textfield": "^8.1.0",
46
45
  "@atlaskit/theme": "^21.0.0",
47
- "@atlaskit/tokens": "^8.3.0",
46
+ "@atlaskit/tokens": "^8.4.0",
48
47
  "@atlaskit/visually-hidden": "^3.0.0",
49
48
  "@babel/runtime": "^7.0.0",
50
49
  "@compiled/react": "^0.18.6"
@@ -57,7 +56,6 @@
57
56
  "@af/integration-testing": "workspace:^",
58
57
  "@atlaskit/datetime-picker": "^17.1.0",
59
58
  "@atlaskit/docs": "^11.2.0",
60
- "@atlaskit/ds-lib": "^5.3.0",
61
59
  "@atlaskit/heading": "^5.2.0",
62
60
  "@atlaskit/link": "^3.2.0",
63
61
  "@atlaskit/section-message": "^8.9.0",
@@ -65,7 +63,6 @@
65
63
  "@atlaskit/tag": "^14.1.0",
66
64
  "@atlaskit/tag-group": "^12.0.0",
67
65
  "@atlaskit/textarea": "^8.1.0",
68
- "@atlassian/feature-flags-test-utils": "^1.0.0",
69
66
  "@atlassian/ssr-tests": "workspace:^",
70
67
  "@testing-library/react": "^13.4.0",
71
68
  "react-dom": "^18.2.0",
@@ -98,6 +95,9 @@
98
95
  "platform-feature-flags": {
99
96
  "platform_design_system_inline_edit_dont_focus": {
100
97
  "type": "boolean"
98
+ },
99
+ "enable-inline-edit-focus-fix": {
100
+ "type": "boolean"
101
101
  }
102
102
  }
103
103
  }