@atlaskit/select 21.6.2 → 21.6.4

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,22 @@
1
1
  # @atlaskit/select
2
2
 
3
+ ## 21.6.4
4
+
5
+ ### Patch Changes
6
+
7
+ - [`99876f547dece`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/99876f547dece) -
8
+ Adds support for `shouldPreventEscapePropagation` prop in PopupSelect to stop Escape keydown event
9
+ propagation when closing the popup. This is useful when PopupSelect is inside a modal or other
10
+ component that also listens for Escape key events. Feature is behind
11
+ `platform_navx_sllv_dropdown_escape_and_focus_fix` feature flag.
12
+ - Updated dependencies
13
+
14
+ ## 21.6.3
15
+
16
+ ### Patch Changes
17
+
18
+ - Updated dependencies
19
+
3
20
  ## 21.6.2
4
21
 
5
22
  ### Patch Changes
@@ -160,6 +160,9 @@ var PopupSelect = exports.default = /*#__PURE__*/function (_PureComponent) {
160
160
  case 'Escape':
161
161
  case 'Esc':
162
162
  _this.close();
163
+ if (_this.props.shouldPreventEscapePropagation && (0, _platformFeatureFlags.fg)('platform_navx_sllv_dropdown_escape_and_focus_fix')) {
164
+ event.stopPropagation();
165
+ }
163
166
  break;
164
167
  default:
165
168
  }
@@ -360,10 +363,10 @@ var PopupSelect = exports.default = /*#__PURE__*/function (_PureComponent) {
360
363
  maxMenuWidth = _this$props5.maxMenuWidth,
361
364
  minMenuWidth = _this$props5.minMenuWidth,
362
365
  placeholder = _this$props5.placeholder,
363
- target = _this$props5.target,
366
+ _target = _this$props5.target,
364
367
  testId = _this$props5.testId,
365
- onMenuOpen = _this$props5.onMenuOpen,
366
- onMenuClose = _this$props5.onMenuClose,
368
+ _onMenuOpen = _this$props5.onMenuOpen,
369
+ _onMenuClose = _this$props5.onMenuClose,
367
370
  props = (0, _objectWithoutProperties2.default)(_this$props5, _excluded);
368
371
  var _this$state = _this.state,
369
372
  focusLockEnabled = _this$state.focusLockEnabled,
@@ -11,7 +11,7 @@ var _createSelect = _interopRequireDefault(require("./createSelect"));
11
11
  /* eslint-disable @repo/internal/react/require-jsdoc */
12
12
 
13
13
  var packageName = "@atlaskit/select";
14
- var packageVersion = "21.6.1";
14
+ var packageVersion = "21.6.4";
15
15
  var SelectWithoutAnalytics = exports.SelectWithoutAnalytics = (0, _createSelect.default)(_async.default);
16
16
  var createAndFireEventOnAtlaskit = (0, _analyticsNext.createAndFireEvent)('atlaskit');
17
17
  var Select = (0, _analyticsNext.withAnalyticsContext)({
@@ -131,6 +131,9 @@ export default class PopupSelect extends PureComponent {
131
131
  case 'Escape':
132
132
  case 'Esc':
133
133
  this.close();
134
+ if (this.props.shouldPreventEscapePropagation && fg('platform_navx_sllv_dropdown_escape_and_focus_fix')) {
135
+ event.stopPropagation();
136
+ }
134
137
  break;
135
138
  default:
136
139
  }
@@ -336,10 +339,10 @@ export default class PopupSelect extends PureComponent {
336
339
  maxMenuWidth,
337
340
  minMenuWidth,
338
341
  placeholder,
339
- target,
342
+ target: _target,
340
343
  testId,
341
- onMenuOpen,
342
- onMenuClose,
344
+ onMenuOpen: _onMenuOpen,
345
+ onMenuClose: _onMenuClose,
343
346
  ...props
344
347
  } = this.props;
345
348
  const {
@@ -3,7 +3,7 @@ import { createAndFireEvent, withAnalyticsContext, withAnalyticsEvents } from '@
3
3
  import AsyncSelect from '@atlaskit/react-select/async';
4
4
  import createSelect from './createSelect';
5
5
  const packageName = "@atlaskit/select";
6
- const packageVersion = "21.6.1";
6
+ const packageVersion = "21.6.4";
7
7
  export const SelectWithoutAnalytics = createSelect(AsyncSelect);
8
8
  const createAndFireEventOnAtlaskit = createAndFireEvent('atlaskit');
9
9
  const Select = withAnalyticsContext({
@@ -152,6 +152,9 @@ var PopupSelect = /*#__PURE__*/function (_PureComponent) {
152
152
  case 'Escape':
153
153
  case 'Esc':
154
154
  _this.close();
155
+ if (_this.props.shouldPreventEscapePropagation && fg('platform_navx_sllv_dropdown_escape_and_focus_fix')) {
156
+ event.stopPropagation();
157
+ }
155
158
  break;
156
159
  default:
157
160
  }
@@ -352,10 +355,10 @@ var PopupSelect = /*#__PURE__*/function (_PureComponent) {
352
355
  maxMenuWidth = _this$props5.maxMenuWidth,
353
356
  minMenuWidth = _this$props5.minMenuWidth,
354
357
  placeholder = _this$props5.placeholder,
355
- target = _this$props5.target,
358
+ _target = _this$props5.target,
356
359
  testId = _this$props5.testId,
357
- onMenuOpen = _this$props5.onMenuOpen,
358
- onMenuClose = _this$props5.onMenuClose,
360
+ _onMenuOpen = _this$props5.onMenuOpen,
361
+ _onMenuClose = _this$props5.onMenuClose,
359
362
  props = _objectWithoutProperties(_this$props5, _excluded);
360
363
  var _this$state = _this.state,
361
364
  focusLockEnabled = _this$state.focusLockEnabled,
@@ -3,7 +3,7 @@ import { createAndFireEvent, withAnalyticsContext, withAnalyticsEvents } from '@
3
3
  import AsyncSelect from '@atlaskit/react-select/async';
4
4
  import createSelect from './createSelect';
5
5
  var packageName = "@atlaskit/select";
6
- var packageVersion = "21.6.1";
6
+ var packageVersion = "21.6.4";
7
7
  export var SelectWithoutAnalytics = createSelect(AsyncSelect);
8
8
  var createAndFireEventOnAtlaskit = createAndFireEvent('atlaskit');
9
9
  var Select = withAnalyticsContext({
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/select",
3
- "version": "21.6.2",
3
+ "version": "21.6.4",
4
4
  "description": "Select allows users to make a single selection or multiple selections from a list of options.",
5
5
  "publishConfig": {
6
6
  "registry": "https://registry.npmjs.org/"
@@ -34,12 +34,12 @@
34
34
  "dependencies": {
35
35
  "@atlaskit/analytics-next": "^11.1.0",
36
36
  "@atlaskit/ds-lib": "^5.3.0",
37
- "@atlaskit/icon": "^29.3.0",
37
+ "@atlaskit/icon": "^29.4.0",
38
38
  "@atlaskit/platform-feature-flags": "^1.1.0",
39
- "@atlaskit/primitives": "^16.4.0",
40
- "@atlaskit/react-select": "^3.12.0",
39
+ "@atlaskit/primitives": "^17.0.0",
40
+ "@atlaskit/react-select": "^3.13.0",
41
41
  "@atlaskit/theme": "^21.0.0",
42
- "@atlaskit/tokens": "^8.6.0",
42
+ "@atlaskit/tokens": "^9.1.0",
43
43
  "@atlaskit/visually-hidden": "^3.0.0",
44
44
  "@babel/runtime": "^7.0.0",
45
45
  "@compiled/react": "^0.18.6",
@@ -57,16 +57,16 @@
57
57
  "@af/accessibility-testing": "workspace:^",
58
58
  "@af/integration-testing": "workspace:^",
59
59
  "@af/visual-regression": "workspace:^",
60
- "@atlaskit/button": "^23.8.0",
61
- "@atlaskit/checkbox": "^17.2.0",
60
+ "@atlaskit/button": "^23.9.0",
61
+ "@atlaskit/checkbox": "^17.3.0",
62
62
  "@atlaskit/docs": "^11.2.0",
63
63
  "@atlaskit/drawer": "^11.0.0",
64
- "@atlaskit/form": "^15.1.0",
65
- "@atlaskit/link": "^3.2.0",
64
+ "@atlaskit/form": "^15.3.0",
65
+ "@atlaskit/link": "^3.3.0",
66
66
  "@atlaskit/logo": "^19.9.0",
67
67
  "@atlaskit/modal-dialog": "^14.9.0",
68
- "@atlaskit/radio": "^8.3.0",
69
- "@atlaskit/section-message": "^8.11.0",
68
+ "@atlaskit/radio": "^8.4.0",
69
+ "@atlaskit/section-message": "^8.12.0",
70
70
  "@atlassian/ssr-tests": "workspace:^",
71
71
  "@testing-library/react": "^13.4.0",
72
72
  "@testing-library/user-event": "^14.4.3",
@@ -102,6 +102,9 @@
102
102
  },
103
103
  "platform-dst-shape-theme-default": {
104
104
  "type": "boolean"
105
+ },
106
+ "platform_navx_sllv_dropdown_escape_and_focus_fix": {
107
+ "type": "boolean"
105
108
  }
106
109
  },
107
110
  "homepage": "https://atlassian.design/components/select/"