@atlaskit/inline-edit 15.1.5 → 15.2.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 CHANGED
@@ -1,5 +1,19 @@
1
1
  # @atlaskit/inline-edit
2
2
 
3
+ ## 15.2.1
4
+
5
+ ### Patch Changes
6
+
7
+ - Updated dependencies
8
+
9
+ ## 15.2.0
10
+
11
+ ### Minor Changes
12
+
13
+ - [#144637](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/pull-requests/144637)
14
+ [`873027dabff6e`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/873027dabff6e) -
15
+ [ux] Added class to handle default focus on form elements
16
+
3
17
  ## 15.1.5
4
18
 
5
19
  ### Patch Changes
@@ -15,6 +15,7 @@ var _react = _interopRequireWildcard(require("react"));
15
15
  var _analyticsNext = require("@atlaskit/analytics-next");
16
16
  var _Field = _interopRequireDefault(require("@atlaskit/form/Field"));
17
17
  var _Form = _interopRequireDefault(require("@atlaskit/form/Form"));
18
+ var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
18
19
  var _compiled = require("@atlaskit/primitives/compiled");
19
20
  var _visuallyHidden = _interopRequireDefault(require("@atlaskit/visually-hidden"));
20
21
  var _buttons = _interopRequireDefault(require("./internal/buttons"));
@@ -28,7 +29,7 @@ var fieldStyles = null;
28
29
  var analyticsAttributes = {
29
30
  componentName: 'inlineEdit',
30
31
  packageName: "@atlaskit/inline-edit",
31
- packageVersion: "15.1.5"
32
+ packageVersion: "15.2.1"
32
33
  };
33
34
  var InnerInlineEdit = function InnerInlineEdit(props) {
34
35
  var _props$startWithEditV = props.startWithEditViewOpen,
@@ -190,6 +191,12 @@ var InnerInlineEdit = function InnerInlineEdit(props) {
190
191
  },
191
192
  onSubmit: onSubmit,
192
193
  ref: formRef
194
+ // Below we have added a class name to the form element to prevent the default focus on the form element
195
+ // This is because due to some default focus being applied to the form element, the inline edit component
196
+ // was being focused automatically and causing scroll issues in issue view
197
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop
198
+ ,
199
+ className: (0, _platformFeatureFlags.fg)('platform_design_system_inline_edit_dont_focus') ? 'dont-default-focus' : undefined
193
200
  }, shouldBeEditing ? /*#__PURE__*/_react.default.createElement(_Field.default, {
194
201
  name: "inlineEdit",
195
202
  label: label,
@@ -5,6 +5,7 @@ import React, { useCallback, useRef, useState } from 'react';
5
5
  import { usePlatformLeafEventHandler } from '@atlaskit/analytics-next';
6
6
  import Field from '@atlaskit/form/Field';
7
7
  import Form from '@atlaskit/form/Form';
8
+ import { fg } from '@atlaskit/platform-feature-flags';
8
9
  import { Pressable } from '@atlaskit/primitives/compiled';
9
10
  import VisuallyHidden from '@atlaskit/visually-hidden';
10
11
  import Buttons from './internal/buttons';
@@ -14,7 +15,7 @@ const fieldStyles = null;
14
15
  const analyticsAttributes = {
15
16
  componentName: 'inlineEdit',
16
17
  packageName: "@atlaskit/inline-edit",
17
- packageVersion: "15.1.5"
18
+ packageVersion: "15.2.1"
18
19
  };
19
20
  const InnerInlineEdit = props => {
20
21
  const {
@@ -165,6 +166,12 @@ const InnerInlineEdit = props => {
165
166
  },
166
167
  onSubmit: onSubmit,
167
168
  ref: formRef
169
+ // Below we have added a class name to the form element to prevent the default focus on the form element
170
+ // This is because due to some default focus being applied to the form element, the inline edit component
171
+ // was being focused automatically and causing scroll issues in issue view
172
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop
173
+ ,
174
+ className: fg('platform_design_system_inline_edit_dont_focus') ? 'dont-default-focus' : undefined
168
175
  }, shouldBeEditing ? /*#__PURE__*/React.createElement(Field, {
169
176
  name: "inlineEdit",
170
177
  label: label,
@@ -9,6 +9,7 @@ import React, { useCallback, useRef, useState } from 'react';
9
9
  import { usePlatformLeafEventHandler } from '@atlaskit/analytics-next';
10
10
  import Field from '@atlaskit/form/Field';
11
11
  import Form from '@atlaskit/form/Form';
12
+ import { fg } from '@atlaskit/platform-feature-flags';
12
13
  import { Pressable } from '@atlaskit/primitives/compiled';
13
14
  import VisuallyHidden from '@atlaskit/visually-hidden';
14
15
  import Buttons from './internal/buttons';
@@ -18,7 +19,7 @@ var fieldStyles = null;
18
19
  var analyticsAttributes = {
19
20
  componentName: 'inlineEdit',
20
21
  packageName: "@atlaskit/inline-edit",
21
- packageVersion: "15.1.5"
22
+ packageVersion: "15.2.1"
22
23
  };
23
24
  var InnerInlineEdit = function InnerInlineEdit(props) {
24
25
  var _props$startWithEditV = props.startWithEditViewOpen,
@@ -180,6 +181,12 @@ var InnerInlineEdit = function InnerInlineEdit(props) {
180
181
  },
181
182
  onSubmit: onSubmit,
182
183
  ref: formRef
184
+ // Below we have added a class name to the form element to prevent the default focus on the form element
185
+ // This is because due to some default focus being applied to the form element, the inline edit component
186
+ // was being focused automatically and causing scroll issues in issue view
187
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop
188
+ ,
189
+ className: fg('platform_design_system_inline_edit_dont_focus') ? 'dont-default-focus' : undefined
183
190
  }, shouldBeEditing ? /*#__PURE__*/React.createElement(Field, {
184
191
  name: "inlineEdit",
185
192
  label: label,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/inline-edit",
3
- "version": "15.1.5",
3
+ "version": "15.2.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/"
@@ -39,10 +39,10 @@
39
39
  "@atlaskit/codemod-utils": "^4.2.0",
40
40
  "@atlaskit/css": "^0.10.0",
41
41
  "@atlaskit/form": "^12.0.0",
42
- "@atlaskit/icon": "^25.6.0",
42
+ "@atlaskit/icon": "^26.0.0",
43
43
  "@atlaskit/inline-dialog": "^17.0.0",
44
44
  "@atlaskit/platform-feature-flags": "^1.1.0",
45
- "@atlaskit/primitives": "^14.4.0",
45
+ "@atlaskit/primitives": "^14.7.0",
46
46
  "@atlaskit/textfield": "^8.0.0",
47
47
  "@atlaskit/theme": "^18.0.0",
48
48
  "@atlaskit/tokens": "^4.8.0",
@@ -54,8 +54,8 @@
54
54
  "react": "^18.2.0"
55
55
  },
56
56
  "devDependencies": {
57
- "@af/accessibility-testing": "^2.0.0",
58
- "@af/integration-testing": "^0.5.0",
57
+ "@af/accessibility-testing": "workspace:^",
58
+ "@af/integration-testing": "workspace:^",
59
59
  "@atlaskit/datetime-picker": "^17.0.0",
60
60
  "@atlaskit/docs": "^10.0.0",
61
61
  "@atlaskit/ds-lib": "^4.0.0",
@@ -66,7 +66,7 @@
66
66
  "@atlaskit/tag": "^14.0.0",
67
67
  "@atlaskit/tag-group": "^12.0.0",
68
68
  "@atlaskit/textarea": "^8.0.0",
69
- "@atlaskit/visual-regression": "^0.10.0",
69
+ "@atlaskit/visual-regression": "workspace:^",
70
70
  "@atlassian/feature-flags-test-utils": "^0.3.0",
71
71
  "@atlassian/ssr-tests": "^0.2.0",
72
72
  "@testing-library/react": "^13.4.0",
@@ -104,5 +104,9 @@
104
104
  "./types": "./src/entry-points/types.ts",
105
105
  ".": "./src/index.ts"
106
106
  },
107
- "platform-feature-flags": {}
107
+ "platform-feature-flags": {
108
+ "platform_design_system_inline_edit_dont_focus": {
109
+ "type": "boolean"
110
+ }
111
+ }
108
112
  }