@atlaskit/teams-public 3.1.4 → 3.3.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,29 @@
1
1
  # @atlaskit/teams-public
2
2
 
3
+ ## 3.3.0
4
+
5
+ ### Minor Changes
6
+
7
+ - [`9a2c5e03b2dcb`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/9a2c5e03b2dcb) -
8
+ Remove unused react-router-dom dependency
9
+
10
+ ### Patch Changes
11
+
12
+ - Updated dependencies
13
+
14
+ ## 3.2.0
15
+
16
+ ### Minor Changes
17
+
18
+ - [`3aefcc080d27a`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/3aefcc080d27a) -
19
+ A11Y-34712: Fix focus loss when closing the "Add where your team works" dialog via the Escape key.
20
+ Focus now returns to the triggering element when the dialog is dismissed, gated behind feature
21
+ flag `teams_a11y_20260928`.
22
+
23
+ This covers both entry points: the web link dialog, and the container linker opened from the "Add
24
+ Jira space" / "Add Confluence space" / "Add Loom space" cards. `AddContainerCard` accepts a new
25
+ optional `buttonRef` prop so the panel can return focus to the card that opened the linker.
26
+
3
27
  ## 3.1.4
4
28
 
5
29
  ### Patch Changes
@@ -20,8 +20,10 @@ var styles = {
20
20
  var AddContainerCardWrapper = function AddContainerCardWrapper(_ref) {
21
21
  var children = _ref.children,
22
22
  onClick = _ref.onClick,
23
- isDisabled = _ref.isDisabled;
23
+ isDisabled = _ref.isDisabled,
24
+ buttonRef = _ref.buttonRef;
24
25
  return /*#__PURE__*/_react.default.createElement(_compiled.Pressable, {
26
+ ref: buttonRef,
25
27
  xcss: styles.container,
26
28
  isDisabled: isDisabled,
27
29
  onClick: onClick
@@ -33,7 +35,8 @@ var AddContainerCard = exports.AddContainerCard = function AddContainerCard(_ref
33
35
  _ref2$isLoading = _ref2.isLoading,
34
36
  isLoading = _ref2$isLoading === void 0 ? false : _ref2$isLoading,
35
37
  _ref2$isDisabled = _ref2.isDisabled,
36
- isDisabled = _ref2$isDisabled === void 0 ? false : _ref2$isDisabled;
38
+ isDisabled = _ref2$isDisabled === void 0 ? false : _ref2$isDisabled,
39
+ buttonRef = _ref2.buttonRef;
37
40
  var _getContainerProperti = (0, _getContainerProperties.getContainerProperties)({
38
41
  containerType: containerType,
39
42
  isEmptyContainer: true
@@ -47,7 +50,8 @@ var AddContainerCard = exports.AddContainerCard = function AddContainerCard(_ref
47
50
  }
48
51
  return /*#__PURE__*/_react.default.createElement(AddContainerCardWrapper, {
49
52
  onClick: onAddAContainerClick,
50
- isDisabled: isDisabled
53
+ isDisabled: isDisabled,
54
+ buttonRef: buttonRef
51
55
  }, /*#__PURE__*/_react.default.createElement(_compiled.Inline, {
52
56
  space: "space.100",
53
57
  xcss: styles.card
@@ -13,9 +13,11 @@ const styles = {
13
13
  const AddContainerCardWrapper = ({
14
14
  children,
15
15
  onClick,
16
- isDisabled
16
+ isDisabled,
17
+ buttonRef
17
18
  }) => {
18
19
  return /*#__PURE__*/React.createElement(Pressable, {
20
+ ref: buttonRef,
19
21
  xcss: styles.container,
20
22
  isDisabled: isDisabled,
21
23
  onClick: onClick
@@ -25,7 +27,8 @@ export const AddContainerCard = ({
25
27
  containerType,
26
28
  onAddAContainerClick,
27
29
  isLoading = false,
28
- isDisabled = false
30
+ isDisabled = false,
31
+ buttonRef
29
32
  }) => {
30
33
  const {
31
34
  icon,
@@ -41,7 +44,8 @@ export const AddContainerCard = ({
41
44
  }
42
45
  return /*#__PURE__*/React.createElement(AddContainerCardWrapper, {
43
46
  onClick: onAddAContainerClick,
44
- isDisabled: isDisabled
47
+ isDisabled: isDisabled,
48
+ buttonRef: buttonRef
45
49
  }, /*#__PURE__*/React.createElement(Inline, {
46
50
  space: "space.100",
47
51
  xcss: styles.card
@@ -13,8 +13,10 @@ var styles = {
13
13
  var AddContainerCardWrapper = function AddContainerCardWrapper(_ref) {
14
14
  var children = _ref.children,
15
15
  onClick = _ref.onClick,
16
- isDisabled = _ref.isDisabled;
16
+ isDisabled = _ref.isDisabled,
17
+ buttonRef = _ref.buttonRef;
17
18
  return /*#__PURE__*/React.createElement(Pressable, {
19
+ ref: buttonRef,
18
20
  xcss: styles.container,
19
21
  isDisabled: isDisabled,
20
22
  onClick: onClick
@@ -26,7 +28,8 @@ export var AddContainerCard = function AddContainerCard(_ref2) {
26
28
  _ref2$isLoading = _ref2.isLoading,
27
29
  isLoading = _ref2$isLoading === void 0 ? false : _ref2$isLoading,
28
30
  _ref2$isDisabled = _ref2.isDisabled,
29
- isDisabled = _ref2$isDisabled === void 0 ? false : _ref2$isDisabled;
31
+ isDisabled = _ref2$isDisabled === void 0 ? false : _ref2$isDisabled,
32
+ buttonRef = _ref2.buttonRef;
30
33
  var _getContainerProperti = getContainerProperties({
31
34
  containerType: containerType,
32
35
  isEmptyContainer: true
@@ -40,7 +43,8 @@ export var AddContainerCard = function AddContainerCard(_ref2) {
40
43
  }
41
44
  return /*#__PURE__*/React.createElement(AddContainerCardWrapper, {
42
45
  onClick: onAddAContainerClick,
43
- isDisabled: isDisabled
46
+ isDisabled: isDisabled,
47
+ buttonRef: buttonRef
44
48
  }, /*#__PURE__*/React.createElement(Inline, {
45
49
  space: "space.100",
46
50
  xcss: styles.card
@@ -5,6 +5,8 @@ interface AddContainerCardProps {
5
5
  onAddAContainerClick: (e: React.MouseEvent<HTMLButtonElement>) => void;
6
6
  isLoading?: boolean;
7
7
  isDisabled?: boolean;
8
+ /** Ref to the card's button, e.g. to return focus to it after an overlay it opened closes. */
9
+ buttonRef?: React.Ref<HTMLButtonElement>;
8
10
  }
9
- export declare const AddContainerCard: ({ containerType, onAddAContainerClick, isLoading, isDisabled, }: AddContainerCardProps) => React.JSX.Element;
11
+ export declare const AddContainerCard: ({ containerType, onAddAContainerClick, isLoading, isDisabled, buttonRef, }: AddContainerCardProps) => React.JSX.Element;
10
12
  export {};
package/package.json CHANGED
@@ -24,7 +24,7 @@
24
24
  "atlaskit:src": "src/index.ts",
25
25
  "dependencies": {
26
26
  "@atlaskit/afm-i18n-platform-people-and-teams-teams-public": "2.263.0",
27
- "@atlaskit/analytics-next": "^12.5.0",
27
+ "@atlaskit/analytics-next": "^12.6.0",
28
28
  "@atlaskit/avatar": "^30.0.0",
29
29
  "@atlaskit/button": "^25.4.0",
30
30
  "@atlaskit/css": "^1.1.0",
@@ -45,7 +45,7 @@
45
45
  "@atlaskit/teams-app-internal-product-permissions": "^2.2.0",
46
46
  "@atlaskit/teams-client": "^6.1.0",
47
47
  "@atlaskit/tile": "^5.0.0",
48
- "@atlaskit/tokens": "^20.3.0",
48
+ "@atlaskit/tokens": "^20.4.0",
49
49
  "@atlaskit/tooltip": "^24.4.0",
50
50
  "@babel/runtime": "^7.0.0",
51
51
  "@compiled/react": "^1.0.2",
@@ -53,7 +53,6 @@
53
53
  "graphql": "^15.8.0",
54
54
  "graphql-tag": "^2.10.1",
55
55
  "react-loosely-lazy": "^1.0.0",
56
- "react-router-dom": "^6.30.6",
57
56
  "react-sweet-state": "^2.6.5",
58
57
  "string-hash": "1.1.3"
59
58
  },
@@ -78,7 +77,7 @@
78
77
  "react-intl": "^7.0.0"
79
78
  },
80
79
  "name": "@atlaskit/teams-public",
81
- "version": "3.1.4",
80
+ "version": "3.3.0",
82
81
  "description": "Public components related to teams",
83
82
  "author": "Atlassian Pty Ltd",
84
83
  "license": "Apache-2.0",