@atlaskit/rovo-agent-components 3.45.0 → 3.46.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,23 @@
1
1
  # @atlaskit/rovo-agent-components
2
2
 
3
+ ## 3.46.1
4
+
5
+ ### Patch Changes
6
+
7
+ - Updated dependencies
8
+
9
+ ## 3.46.0
10
+
11
+ ### Minor Changes
12
+
13
+ - [`d4c66fd8ab94f`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/d4c66fd8ab94f) -
14
+ Add agentName to LinkIconButton and StarIconButton labels for unique accessible names across agent
15
+ cards
16
+
17
+ ### Patch Changes
18
+
19
+ - Updated dependencies
20
+
3
21
  ## 3.45.0
4
22
 
5
23
  ### Minor Changes
@@ -24,7 +24,8 @@ var styles = {
24
24
  var LinkIconButton = exports.LinkIconButton = function LinkIconButton(_ref) {
25
25
  var handleCopy = _ref.handleCopy,
26
26
  _ref$visible = _ref.visible,
27
- visible = _ref$visible === void 0 ? true : _ref$visible;
27
+ visible = _ref$visible === void 0 ? true : _ref$visible,
28
+ agentName = _ref.agentName;
28
29
  var _useIntl = (0, _reactIntlNext.useIntl)(),
29
30
  formatMessage = _useIntl.formatMessage;
30
31
  return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(_compiled.Box, {
@@ -39,6 +40,8 @@ var LinkIconButton = exports.LinkIconButton = function LinkIconButton(_ref) {
39
40
  },
40
41
  appearance: "subtle",
41
42
  spacing: "compact",
42
- label: formatMessage(_messages.default.copyAgentLinkLabel)
43
+ label: formatMessage(_messages.default.copyAgentLinkLabel, {
44
+ agentName: agentName
45
+ })
43
46
  })));
44
47
  };
@@ -8,8 +8,8 @@ var _reactIntlNext = require("react-intl-next");
8
8
  var _default_1 = (0, _reactIntlNext.defineMessages)({
9
9
  copyAgentLinkLabel: {
10
10
  id: 'rovo-chat.browse-agents.copy-agent-label',
11
- defaultMessage: 'Copy link to agent',
12
- description: "Button label/aria label for copying agent link to clipboard. When clicked, copies the agent's URL to clipboard."
11
+ defaultMessage: 'Copy link to {agentName}',
12
+ description: "Button label/aria label for copying agent link to clipboard. When clicked, copies the agent's URL to clipboard. The {agentName} placeholder is replaced with the agent's name for unique accessible labels."
13
13
  }
14
14
  });
15
15
  var _default = exports.default = _default_1;
@@ -27,7 +27,8 @@ var StarIconButton = exports.StarIconButton = function StarIconButton(_ref) {
27
27
  var isStarred = _ref.isStarred,
28
28
  handleToggle = _ref.handleToggle,
29
29
  _ref$visible = _ref.visible,
30
- visible = _ref$visible === void 0 ? true : _ref$visible;
30
+ visible = _ref$visible === void 0 ? true : _ref$visible,
31
+ agentName = _ref.agentName;
31
32
  var _useIntl = (0, _reactIntlNext.useIntl)(),
32
33
  formatMessage = _useIntl.formatMessage;
33
34
  var _useState = (0, _react.useState)(false),
@@ -45,11 +46,15 @@ var StarIconButton = exports.StarIconButton = function StarIconButton(_ref) {
45
46
  }
46
47
  }, isStarred || isHovered ? /*#__PURE__*/React.createElement(_starStarred.default, {
47
48
  spacing: "spacious",
48
- label: formatMessage(_messages.default.removeFromFavouritesLabel),
49
+ label: formatMessage(_messages.default.removeFromFavouritesLabel, {
50
+ agentName: agentName
51
+ }),
49
52
  color: "var(--ds-icon-accent-orange, #E06C00)"
50
53
  }) : /*#__PURE__*/React.createElement(_starUnstarred.default, {
51
54
  spacing: "spacious",
52
- label: formatMessage(_messages.default.clickToFavouriteLabel),
55
+ label: formatMessage(_messages.default.clickToFavouriteLabel, {
56
+ agentName: agentName
57
+ }),
53
58
  color: "var(--ds-icon, #292A2E)"
54
59
  }));
55
60
  };
@@ -8,13 +8,13 @@ var _reactIntlNext = require("react-intl-next");
8
8
  var _default_1 = (0, _reactIntlNext.defineMessages)({
9
9
  removeFromFavouritesLabel: {
10
10
  id: 'rovo-chat.browse-agents.remove-from-favourites-label',
11
- defaultMessage: 'Remove from favourites',
12
- description: 'Button label/aria label for removing agent from favorites. Shown when agent is already favorited and button is clicked to unfavorite.'
11
+ defaultMessage: 'Remove {agentName} from favourites',
12
+ description: 'Button label/aria label for removing agent from favorites. Shown when agent is already favorited and button is clicked to unfavorite. The {agentName} placeholder is replaced with the agent name for unique accessible labels.'
13
13
  },
14
14
  clickToFavouriteLabel: {
15
15
  id: 'rovo-chat.browse-agents.click-to-favourite-label',
16
- defaultMessage: 'Not favourited, click to favourite',
17
- description: 'Button label/aria label indicating agent is not favorited. Instructions to click the star button to add agent to favorites.'
16
+ defaultMessage: 'Add {agentName} to favourites',
17
+ description: 'Button label/aria label indicating agent is not favorited. Instructions to click the star button to add agent to favorites. The {agentName} placeholder is replaced with the agent name for unique accessible labels.'
18
18
  }
19
19
  });
20
20
  var _default = exports.default = _default_1;
@@ -180,7 +180,8 @@ var AgentProfileInfo = exports.AgentProfileInfo = function AgentProfileInfo(_ref
180
180
  label: formatMessage(_messages.messages.hiddenIcon)
181
181
  })))), showStarButton && /*#__PURE__*/_react.default.createElement(_starIconButton.StarIconButton, {
182
182
  isStarred: isStarred,
183
- handleToggle: onStarToggle
183
+ handleToggle: onStarToggle,
184
+ agentName: agentName
184
185
  })), creatorRender, !!agentDescription && /*#__PURE__*/_react.default.createElement(_compiled.Box, {
185
186
  xcss: styles.description,
186
187
  as: "p"
@@ -14,7 +14,8 @@ const styles = {
14
14
  };
15
15
  export const LinkIconButton = ({
16
16
  handleCopy,
17
- visible = true
17
+ visible = true,
18
+ agentName
18
19
  }) => {
19
20
  const {
20
21
  formatMessage
@@ -29,6 +30,8 @@ export const LinkIconButton = ({
29
30
  })),
30
31
  appearance: "subtle",
31
32
  spacing: "compact",
32
- label: formatMessage(messages.copyAgentLinkLabel)
33
+ label: formatMessage(messages.copyAgentLinkLabel, {
34
+ agentName
35
+ })
33
36
  })));
34
37
  };
@@ -2,8 +2,8 @@ import { defineMessages } from 'react-intl-next';
2
2
  const _default_1 = defineMessages({
3
3
  copyAgentLinkLabel: {
4
4
  id: 'rovo-chat.browse-agents.copy-agent-label',
5
- defaultMessage: 'Copy link to agent',
6
- description: "Button label/aria label for copying agent link to clipboard. When clicked, copies the agent's URL to clipboard."
5
+ defaultMessage: 'Copy link to {agentName}',
6
+ description: "Button label/aria label for copying agent link to clipboard. When clicked, copies the agent's URL to clipboard. The {agentName} placeholder is replaced with the agent's name for unique accessible labels."
7
7
  }
8
8
  });
9
9
  export default _default_1;
@@ -16,7 +16,8 @@ const styles = {
16
16
  export const StarIconButton = ({
17
17
  isStarred,
18
18
  handleToggle,
19
- visible = true
19
+ visible = true,
20
+ agentName
20
21
  }) => {
21
22
  const {
22
23
  formatMessage
@@ -29,11 +30,15 @@ export const StarIconButton = ({
29
30
  onMouseLeave: () => setIsHovered(false)
30
31
  }, isStarred || isHovered ? /*#__PURE__*/React.createElement(StarIconMigration, {
31
32
  spacing: "spacious",
32
- label: formatMessage(messages.removeFromFavouritesLabel),
33
+ label: formatMessage(messages.removeFromFavouritesLabel, {
34
+ agentName
35
+ }),
33
36
  color: "var(--ds-icon-accent-orange, #E06C00)"
34
37
  }) : /*#__PURE__*/React.createElement(StarUnstarredIconMigration, {
35
38
  spacing: "spacious",
36
- label: formatMessage(messages.clickToFavouriteLabel),
39
+ label: formatMessage(messages.clickToFavouriteLabel, {
40
+ agentName
41
+ }),
37
42
  color: "var(--ds-icon, #292A2E)"
38
43
  }));
39
44
  };
@@ -2,13 +2,13 @@ import { defineMessages } from 'react-intl-next';
2
2
  const _default_1 = defineMessages({
3
3
  removeFromFavouritesLabel: {
4
4
  id: 'rovo-chat.browse-agents.remove-from-favourites-label',
5
- defaultMessage: 'Remove from favourites',
6
- description: 'Button label/aria label for removing agent from favorites. Shown when agent is already favorited and button is clicked to unfavorite.'
5
+ defaultMessage: 'Remove {agentName} from favourites',
6
+ description: 'Button label/aria label for removing agent from favorites. Shown when agent is already favorited and button is clicked to unfavorite. The {agentName} placeholder is replaced with the agent name for unique accessible labels.'
7
7
  },
8
8
  clickToFavouriteLabel: {
9
9
  id: 'rovo-chat.browse-agents.click-to-favourite-label',
10
- defaultMessage: 'Not favourited, click to favourite',
11
- description: 'Button label/aria label indicating agent is not favorited. Instructions to click the star button to add agent to favorites.'
10
+ defaultMessage: 'Add {agentName} to favourites',
11
+ description: 'Button label/aria label indicating agent is not favorited. Instructions to click the star button to add agent to favorites. The {agentName} placeholder is replaced with the agent name for unique accessible labels.'
12
12
  }
13
13
  });
14
14
  export default _default_1;
@@ -173,7 +173,8 @@ export const AgentProfileInfo = ({
173
173
  label: formatMessage(messages.hiddenIcon)
174
174
  })))), showStarButton && /*#__PURE__*/React.createElement(StarIconButton, {
175
175
  isStarred: isStarred,
176
- handleToggle: onStarToggle
176
+ handleToggle: onStarToggle,
177
+ agentName: agentName
177
178
  })), creatorRender, !!agentDescription && /*#__PURE__*/React.createElement(Box, {
178
179
  xcss: styles.description,
179
180
  as: "p"
@@ -15,7 +15,8 @@ var styles = {
15
15
  export var LinkIconButton = function LinkIconButton(_ref) {
16
16
  var handleCopy = _ref.handleCopy,
17
17
  _ref$visible = _ref.visible,
18
- visible = _ref$visible === void 0 ? true : _ref$visible;
18
+ visible = _ref$visible === void 0 ? true : _ref$visible,
19
+ agentName = _ref.agentName;
19
20
  var _useIntl = useIntl(),
20
21
  formatMessage = _useIntl.formatMessage;
21
22
  return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Box, {
@@ -30,6 +31,8 @@ export var LinkIconButton = function LinkIconButton(_ref) {
30
31
  },
31
32
  appearance: "subtle",
32
33
  spacing: "compact",
33
- label: formatMessage(messages.copyAgentLinkLabel)
34
+ label: formatMessage(messages.copyAgentLinkLabel, {
35
+ agentName: agentName
36
+ })
34
37
  })));
35
38
  };
@@ -2,8 +2,8 @@ import { defineMessages } from 'react-intl-next';
2
2
  var _default_1 = defineMessages({
3
3
  copyAgentLinkLabel: {
4
4
  id: 'rovo-chat.browse-agents.copy-agent-label',
5
- defaultMessage: 'Copy link to agent',
6
- description: "Button label/aria label for copying agent link to clipboard. When clicked, copies the agent's URL to clipboard."
5
+ defaultMessage: 'Copy link to {agentName}',
6
+ description: "Button label/aria label for copying agent link to clipboard. When clicked, copies the agent's URL to clipboard. The {agentName} placeholder is replaced with the agent's name for unique accessible labels."
7
7
  }
8
8
  });
9
9
  export default _default_1;
@@ -18,7 +18,8 @@ export var StarIconButton = function StarIconButton(_ref) {
18
18
  var isStarred = _ref.isStarred,
19
19
  handleToggle = _ref.handleToggle,
20
20
  _ref$visible = _ref.visible,
21
- visible = _ref$visible === void 0 ? true : _ref$visible;
21
+ visible = _ref$visible === void 0 ? true : _ref$visible,
22
+ agentName = _ref.agentName;
22
23
  var _useIntl = useIntl(),
23
24
  formatMessage = _useIntl.formatMessage;
24
25
  var _useState = useState(false),
@@ -36,11 +37,15 @@ export var StarIconButton = function StarIconButton(_ref) {
36
37
  }
37
38
  }, isStarred || isHovered ? /*#__PURE__*/React.createElement(StarIconMigration, {
38
39
  spacing: "spacious",
39
- label: formatMessage(messages.removeFromFavouritesLabel),
40
+ label: formatMessage(messages.removeFromFavouritesLabel, {
41
+ agentName: agentName
42
+ }),
40
43
  color: "var(--ds-icon-accent-orange, #E06C00)"
41
44
  }) : /*#__PURE__*/React.createElement(StarUnstarredIconMigration, {
42
45
  spacing: "spacious",
43
- label: formatMessage(messages.clickToFavouriteLabel),
46
+ label: formatMessage(messages.clickToFavouriteLabel, {
47
+ agentName: agentName
48
+ }),
44
49
  color: "var(--ds-icon, #292A2E)"
45
50
  }));
46
51
  };
@@ -2,13 +2,13 @@ import { defineMessages } from 'react-intl-next';
2
2
  var _default_1 = defineMessages({
3
3
  removeFromFavouritesLabel: {
4
4
  id: 'rovo-chat.browse-agents.remove-from-favourites-label',
5
- defaultMessage: 'Remove from favourites',
6
- description: 'Button label/aria label for removing agent from favorites. Shown when agent is already favorited and button is clicked to unfavorite.'
5
+ defaultMessage: 'Remove {agentName} from favourites',
6
+ description: 'Button label/aria label for removing agent from favorites. Shown when agent is already favorited and button is clicked to unfavorite. The {agentName} placeholder is replaced with the agent name for unique accessible labels.'
7
7
  },
8
8
  clickToFavouriteLabel: {
9
9
  id: 'rovo-chat.browse-agents.click-to-favourite-label',
10
- defaultMessage: 'Not favourited, click to favourite',
11
- description: 'Button label/aria label indicating agent is not favorited. Instructions to click the star button to add agent to favorites.'
10
+ defaultMessage: 'Add {agentName} to favourites',
11
+ description: 'Button label/aria label indicating agent is not favorited. Instructions to click the star button to add agent to favorites. The {agentName} placeholder is replaced with the agent name for unique accessible labels.'
12
12
  }
13
13
  });
14
14
  export default _default_1;
@@ -173,7 +173,8 @@ export var AgentProfileInfo = function AgentProfileInfo(_ref3) {
173
173
  label: formatMessage(messages.hiddenIcon)
174
174
  })))), showStarButton && /*#__PURE__*/React.createElement(StarIconButton, {
175
175
  isStarred: isStarred,
176
- handleToggle: onStarToggle
176
+ handleToggle: onStarToggle,
177
+ agentName: agentName
177
178
  })), creatorRender, !!agentDescription && /*#__PURE__*/React.createElement(Box, {
178
179
  xcss: styles.description,
179
180
  as: "p"
@@ -4,7 +4,8 @@
4
4
  * @jsxFrag jsx
5
5
  */
6
6
  import { type KeyboardEvent, type MouseEvent } from 'react';
7
- export declare const LinkIconButton: ({ handleCopy, visible, }: {
7
+ export declare const LinkIconButton: ({ handleCopy, visible, agentName, }: {
8
8
  handleCopy: (e: MouseEvent<Element, globalThis.MouseEvent> | KeyboardEvent<Element>) => void;
9
9
  visible?: boolean;
10
+ agentName: string;
10
11
  }) => JSX.Element;
@@ -3,8 +3,9 @@
3
3
  * @jsx jsx
4
4
  */
5
5
  import { type KeyboardEvent, type MouseEvent } from 'react';
6
- export declare const StarIconButton: ({ isStarred, handleToggle, visible, }: {
6
+ export declare const StarIconButton: ({ isStarred, handleToggle, visible, agentName, }: {
7
7
  isStarred: boolean;
8
8
  handleToggle: (e: MouseEvent<Element, globalThis.MouseEvent> | KeyboardEvent<Element>) => void;
9
9
  visible?: boolean;
10
+ agentName: string;
10
11
  }) => JSX.Element;
@@ -4,7 +4,8 @@
4
4
  * @jsxFrag jsx
5
5
  */
6
6
  import { type KeyboardEvent, type MouseEvent } from 'react';
7
- export declare const LinkIconButton: ({ handleCopy, visible, }: {
7
+ export declare const LinkIconButton: ({ handleCopy, visible, agentName, }: {
8
8
  handleCopy: (e: MouseEvent<Element, globalThis.MouseEvent> | KeyboardEvent<Element>) => void;
9
9
  visible?: boolean;
10
+ agentName: string;
10
11
  }) => JSX.Element;
@@ -3,8 +3,9 @@
3
3
  * @jsx jsx
4
4
  */
5
5
  import { type KeyboardEvent, type MouseEvent } from 'react';
6
- export declare const StarIconButton: ({ isStarred, handleToggle, visible, }: {
6
+ export declare const StarIconButton: ({ isStarred, handleToggle, visible, agentName, }: {
7
7
  isStarred: boolean;
8
8
  handleToggle: (e: MouseEvent<Element, globalThis.MouseEvent> | KeyboardEvent<Element>) => void;
9
9
  visible?: boolean;
10
+ agentName: string;
10
11
  }) => JSX.Element;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/rovo-agent-components",
3
- "version": "3.45.0",
3
+ "version": "3.46.1",
4
4
  "description": "This package host public components related to rovo agents, the components here are needed for other public atlaskit packages",
5
5
  "author": "Atlassian Pty Ltd",
6
6
  "license": "Apache-2.0",
@@ -34,13 +34,13 @@
34
34
  "dependencies": {
35
35
  "@atlaskit/afm-i18n-platform-ai-mate-rovo-agent-components": "2.10.0",
36
36
  "@atlaskit/analytics-next": "^11.1.0",
37
- "@atlaskit/avatar": "^25.8.0",
37
+ "@atlaskit/avatar": "^25.9.0",
38
38
  "@atlaskit/button": "^23.10.0",
39
39
  "@atlaskit/css": "^0.19.0",
40
40
  "@atlaskit/dropdown-menu": "^16.7.0",
41
41
  "@atlaskit/flag": "^17.8.0",
42
42
  "@atlaskit/heading": "^5.3.0",
43
- "@atlaskit/icon": "^32.1.0",
43
+ "@atlaskit/icon": "^33.0.0",
44
44
  "@atlaskit/link": "^3.3.0",
45
45
  "@atlaskit/logo": "^19.10.0",
46
46
  "@atlaskit/platform-feature-flags": "^1.1.0",