@atlaskit/select 20.0.8 → 20.1.0

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,21 @@
1
1
  # @atlaskit/select
2
2
 
3
+ ## 20.1.0
4
+
5
+ ### Minor Changes
6
+
7
+ - [#135853](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/pull-requests/135853)
8
+ [`63233b4c0a6a7`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/63233b4c0a6a7) -
9
+ PopupSelect will now close when the internal select menu's onMenuClose is called.
10
+
11
+ This is used to close any open select menus when page layout slots are resized.
12
+
13
+ This change is behind a feature flag.
14
+
15
+ ### Patch Changes
16
+
17
+ - Updated dependencies
18
+
3
19
  ## 20.0.8
4
20
 
5
21
  ### Patch Changes
@@ -452,6 +452,10 @@ var PopupSelect = exports.default = /*#__PURE__*/function (_PureComponent) {
452
452
  // Overwriting ariaLiveMessages builtin onFocus method to announce selected option when popup has been opened
453
453
  onFocus: onReactSelectFocus
454
454
  }, props.ariaLiveMessages)
455
+ // When the internal select menu closes, we also need to close the popup too.
456
+ // For example: when the OpenLayerObserver tells the Select menu to close, we also close PopupSelect's popup.
457
+ ,
458
+ onMenuClose: (0, _platformFeatureFlags.fg)('platform_dst_layer_observer_select') ? _this.close : undefined
455
459
  })), footer));
456
460
  });
457
461
  return mergedPopperProps.strategy === 'fixed' ? popper : /*#__PURE__*/(0, _reactDom.createPortal)(popper, portalDestination);
@@ -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 = "20.0.8";
14
+ var packageVersion = "20.1.0";
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)({
@@ -436,6 +436,10 @@ export default class PopupSelect extends PureComponent {
436
436
  onFocus: onReactSelectFocus,
437
437
  ...props.ariaLiveMessages // priority to use user handlers if provided
438
438
  }
439
+ // When the internal select menu closes, we also need to close the popup too.
440
+ // For example: when the OpenLayerObserver tells the Select menu to close, we also close PopupSelect's popup.
441
+ ,
442
+ onMenuClose: fg('platform_dst_layer_observer_select') ? this.close : undefined
439
443
  })), footer)));
440
444
  return mergedPopperProps.strategy === 'fixed' ? popper : /*#__PURE__*/createPortal(popper, portalDestination);
441
445
  });
@@ -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 = "20.0.8";
6
+ const packageVersion = "20.1.0";
7
7
  export const SelectWithoutAnalytics = createSelect(AsyncSelect);
8
8
  const createAndFireEventOnAtlaskit = createAndFireEvent('atlaskit');
9
9
  const Select = withAnalyticsContext({
@@ -444,6 +444,10 @@ var PopupSelect = /*#__PURE__*/function (_PureComponent) {
444
444
  // Overwriting ariaLiveMessages builtin onFocus method to announce selected option when popup has been opened
445
445
  onFocus: onReactSelectFocus
446
446
  }, props.ariaLiveMessages)
447
+ // When the internal select menu closes, we also need to close the popup too.
448
+ // For example: when the OpenLayerObserver tells the Select menu to close, we also close PopupSelect's popup.
449
+ ,
450
+ onMenuClose: fg('platform_dst_layer_observer_select') ? _this.close : undefined
447
451
  })), footer));
448
452
  });
449
453
  return mergedPopperProps.strategy === 'fixed' ? popper : /*#__PURE__*/createPortal(popper, portalDestination);
@@ -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 = "20.0.8";
6
+ var packageVersion = "20.1.0";
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": "20.0.8",
3
+ "version": "20.1.0",
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/"
@@ -43,13 +43,13 @@
43
43
  "dependencies": {
44
44
  "@atlaskit/analytics-next": "^11.0.0",
45
45
  "@atlaskit/ds-lib": "^4.0.0",
46
- "@atlaskit/icon": "^25.1.0",
46
+ "@atlaskit/icon": "^25.5.0",
47
47
  "@atlaskit/platform-feature-flags": "^1.1.0",
48
- "@atlaskit/primitives": "^14.2.0",
49
- "@atlaskit/react-select": "^2.0.0",
48
+ "@atlaskit/primitives": "^14.3.0",
49
+ "@atlaskit/react-select": "^2.1.0",
50
50
  "@atlaskit/spinner": "^18.0.0",
51
51
  "@atlaskit/theme": "^18.0.0",
52
- "@atlaskit/tokens": "^4.5.0",
52
+ "@atlaskit/tokens": "^4.6.0",
53
53
  "@atlaskit/visually-hidden": "^3.0.0",
54
54
  "@babel/runtime": "^7.0.0",
55
55
  "@compiled/react": "^0.18.3",
@@ -67,17 +67,17 @@
67
67
  "@af/accessibility-testing": "^2.0.0",
68
68
  "@af/integration-testing": "^0.5.0",
69
69
  "@af/visual-regression": "^1.3.0",
70
- "@atlaskit/button": "^21.1.0",
70
+ "@atlaskit/button": "^23.0.0",
71
71
  "@atlaskit/checkbox": "^17.0.0",
72
72
  "@atlaskit/docs": "^10.0.0",
73
73
  "@atlaskit/drawer": "^10.0.0",
74
74
  "@atlaskit/form": "^12.0.0",
75
- "@atlaskit/link": "^3.0.0",
75
+ "@atlaskit/link": "^3.1.0",
76
76
  "@atlaskit/logo": "^16.0.0",
77
- "@atlaskit/modal-dialog": "^14.0.0",
77
+ "@atlaskit/modal-dialog": "^14.1.0",
78
78
  "@atlaskit/radio": "^8.0.0",
79
79
  "@atlaskit/section-message": "^8.2.0",
80
- "@atlaskit/ssr": "^0.4.0",
80
+ "@atlassian/ssr-tests": "^0.2.0",
81
81
  "@testing-library/react": "^13.4.0",
82
82
  "@testing-library/user-event": "^14.4.3",
83
83
  "ast-types": "^0.13.3",
@@ -120,6 +120,9 @@
120
120
  },
121
121
  "platform_design_system_team_safari_input_fix": {
122
122
  "type": "boolean"
123
+ },
124
+ "platform_dst_layer_observer_select": {
125
+ "type": "boolean"
123
126
  }
124
127
  },
125
128
  "homepage": "https://atlassian.design/components/select/"