@atlaskit/rovo-agent-components 1.9.1 → 1.11.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,25 @@
1
1
  # @atlaskit/rovo-agent-components
2
2
 
3
+ ## 1.11.0
4
+
5
+ ### Minor Changes
6
+
7
+ - [#160811](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/160811)
8
+ [`c35578a9d8158`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/c35578a9d8158) -
9
+ Fix agent banner color when embedded
10
+
11
+ ### Patch Changes
12
+
13
+ - Updated dependencies
14
+
15
+ ## 1.10.0
16
+
17
+ ### Minor Changes
18
+
19
+ - [#159728](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/159728)
20
+ [`55ccdb1b96f3e`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/55ccdb1b96f3e) -
21
+ Height is now optional on AgentBanner
22
+
3
23
  ## 1.9.1
4
24
 
5
25
  ### Patch Changes
@@ -271,11 +271,17 @@ var getAvatarRender = function getAvatarRender(_ref2) {
271
271
  var bannerStyles = (0, _primitives.xcss)({
272
272
  width: '100%'
273
273
  });
274
+ var bannerFillSpaceStyles = (0, _primitives.xcss)({
275
+ width: '100%',
276
+ height: '100%',
277
+ objectFit: 'cover'
278
+ });
274
279
  var AgentBanner = exports.AgentBanner = function AgentBanner(_ref3) {
275
280
  var agentNamedId = _ref3.agentNamedId,
276
281
  agentId = _ref3.agentId,
277
282
  agentIdentityAccountId = _ref3.agentIdentityAccountId,
278
- height = _ref3.height;
283
+ height = _ref3.height,
284
+ fillSpace = _ref3.fillSpace;
279
285
  var _getAvatarRender = getAvatarRender({
280
286
  agentNamedId: agentNamedId,
281
287
  agentId: agentId,
@@ -284,10 +290,10 @@ var AgentBanner = exports.AgentBanner = function AgentBanner(_ref3) {
284
290
  }),
285
291
  color = _getAvatarRender.color;
286
292
  return /*#__PURE__*/_react.default.createElement(_primitives.Box, {
287
- xcss: bannerStyles,
293
+ xcss: [bannerStyles, fillSpace ? bannerFillSpaceStyles : undefined],
288
294
  style: {
289
295
  backgroundColor: color.primary,
290
- height: "".concat(height, "px")
296
+ height: height ? "".concat(height, "px") : undefined
291
297
  }
292
298
  });
293
299
  };
@@ -169,11 +169,17 @@ const getAvatarRender = ({
169
169
  const bannerStyles = xcss({
170
170
  width: '100%'
171
171
  });
172
+ const bannerFillSpaceStyles = xcss({
173
+ width: '100%',
174
+ height: '100%',
175
+ objectFit: 'cover'
176
+ });
172
177
  export const AgentBanner = ({
173
178
  agentNamedId,
174
179
  agentId,
175
180
  agentIdentityAccountId,
176
- height
181
+ height,
182
+ fillSpace
177
183
  }) => {
178
184
  const {
179
185
  color
@@ -184,10 +190,10 @@ export const AgentBanner = ({
184
190
  size: 'medium'
185
191
  });
186
192
  return /*#__PURE__*/React.createElement(Box, {
187
- xcss: bannerStyles,
193
+ xcss: [bannerStyles, fillSpace ? bannerFillSpaceStyles : undefined],
188
194
  style: {
189
195
  backgroundColor: color.primary,
190
- height: `${height}px`
196
+ height: height ? `${height}px` : undefined
191
197
  }
192
198
  });
193
199
  };
@@ -219,11 +219,17 @@ var getAvatarRender = function getAvatarRender(_ref2) {
219
219
  var bannerStyles = xcss({
220
220
  width: '100%'
221
221
  });
222
+ var bannerFillSpaceStyles = xcss({
223
+ width: '100%',
224
+ height: '100%',
225
+ objectFit: 'cover'
226
+ });
222
227
  export var AgentBanner = function AgentBanner(_ref3) {
223
228
  var agentNamedId = _ref3.agentNamedId,
224
229
  agentId = _ref3.agentId,
225
230
  agentIdentityAccountId = _ref3.agentIdentityAccountId,
226
- height = _ref3.height;
231
+ height = _ref3.height,
232
+ fillSpace = _ref3.fillSpace;
227
233
  var _getAvatarRender = getAvatarRender({
228
234
  agentNamedId: agentNamedId,
229
235
  agentId: agentId,
@@ -232,10 +238,10 @@ export var AgentBanner = function AgentBanner(_ref3) {
232
238
  }),
233
239
  color = _getAvatarRender.color;
234
240
  return /*#__PURE__*/React.createElement(Box, {
235
- xcss: bannerStyles,
241
+ xcss: [bannerStyles, fillSpace ? bannerFillSpaceStyles : undefined],
236
242
  style: {
237
243
  backgroundColor: color.primary,
238
- height: "".concat(height, "px")
244
+ height: height ? "".concat(height, "px") : undefined
239
245
  }
240
246
  });
241
247
  };
@@ -16,8 +16,9 @@ type GeneratedAvatarProps = {
16
16
  * cd002f25-46e4-4023-80ff-32e4d90849b4
17
17
  */
18
18
  export declare const getNumberIdForAvatar: ({ agentIdentityAccountId, agentId, }: Pick<GeneratedAvatarProps, 'agentIdentityAccountId' | 'agentId'>) => number | null;
19
- export declare const AgentBanner: ({ agentNamedId, agentId, agentIdentityAccountId, height, }: Pick<GeneratedAvatarProps, "agentIdentityAccountId" | "agentId" | "agentNamedId"> & {
20
- height: number;
19
+ export declare const AgentBanner: ({ agentNamedId, agentId, agentIdentityAccountId, height, fillSpace, }: Pick<GeneratedAvatarProps, "agentIdentityAccountId" | "agentId" | "agentNamedId"> & {
20
+ height?: number | undefined;
21
+ fillSpace?: boolean | undefined;
21
22
  }) => JSX.Element;
22
23
  export declare const GeneratedAvatar: (props: GeneratedAvatarProps) => JSX.Element;
23
24
  export {};
@@ -16,8 +16,9 @@ type GeneratedAvatarProps = {
16
16
  * cd002f25-46e4-4023-80ff-32e4d90849b4
17
17
  */
18
18
  export declare const getNumberIdForAvatar: ({ agentIdentityAccountId, agentId, }: Pick<GeneratedAvatarProps, 'agentIdentityAccountId' | 'agentId'>) => number | null;
19
- export declare const AgentBanner: ({ agentNamedId, agentId, agentIdentityAccountId, height, }: Pick<GeneratedAvatarProps, "agentIdentityAccountId" | "agentId" | "agentNamedId"> & {
20
- height: number;
19
+ export declare const AgentBanner: ({ agentNamedId, agentId, agentIdentityAccountId, height, fillSpace, }: Pick<GeneratedAvatarProps, "agentIdentityAccountId" | "agentId" | "agentNamedId"> & {
20
+ height?: number | undefined;
21
+ fillSpace?: boolean | undefined;
21
22
  }) => JSX.Element;
22
23
  export declare const GeneratedAvatar: (props: GeneratedAvatarProps) => JSX.Element;
23
24
  export {};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/rovo-agent-components",
3
- "version": "1.9.1",
3
+ "version": "1.11.0",
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",
@@ -42,9 +42,9 @@
42
42
  "@atlaskit/icon": "^22.24.0",
43
43
  "@atlaskit/legacy-custom-icons": "^0.13.0",
44
44
  "@atlaskit/logo": "^14.3.0",
45
- "@atlaskit/primitives": "^13.0.0",
45
+ "@atlaskit/primitives": "^13.1.0",
46
46
  "@atlaskit/skeleton": "^0.5.0",
47
- "@atlaskit/tokens": "^2.1.0",
47
+ "@atlaskit/tokens": "^2.2.0",
48
48
  "@atlaskit/tooltip": "^18.8.0",
49
49
  "@babel/runtime": "^7.0.0",
50
50
  "react-intl-next": "npm:react-intl@^5.18.1"