UNPKG

@atlaskit/rovo-agent-components

Version:

This package host public components related to rovo agents, the components here are needed for other public atlaskit packages

48 lines (47 loc) 2.92 kB
/* index.tsx generated by @compiled/babel-plugin v0.39.1 */ "use strict"; var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault"); var _typeof = require("@babel/runtime/helpers/typeof"); Object.defineProperty(exports, "__esModule", { value: true }); exports.AgentAvatarSkeleton = void 0; var React = _interopRequireWildcard(require("react")); var _runtime = require("@compiled/react/runtime"); var _avatar = require("@atlaskit/avatar"); var _compiled = require("@atlaskit/primitives/compiled"); var _skeleton = _interopRequireDefault(require("@atlaskit/skeleton")); var _index = require("../index"); function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function _interopRequireWildcard(e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != _typeof(e) && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (var _t in e) "default" !== _t && {}.hasOwnProperty.call(e, _t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, _t)) && (i.get || i.set) ? o(f, _t, i) : f[_t] = e[_t]); return f; })(e, t); } /** * Skeleton wrapper with hexagon clip-path to match the AgentAvatar component shape. * Uses the same clip-path as AgentAvatar to provide a consistent loading experience. */ var AgentAvatarSkeleton = exports.AgentAvatarSkeleton = function AgentAvatarSkeleton(_ref) { var _ref$size = _ref.size, size = _ref$size === void 0 ? 'medium' : _ref$size, _ref$isShimmering = _ref.isShimmering, isShimmering = _ref$isShimmering === void 0 ? true : _ref$isShimmering, color = _ref.color, shimmeringEndColor = _ref.shimmeringEndColor, testId = _ref.testId; return /*#__PURE__*/React.createElement(_compiled.Box, { style: { // eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop, @atlaskit/ui-styling-standard/no-imported-style-values width: _avatar.AVATAR_SIZES[size], // eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop, @atlaskit/ui-styling-standard/no-imported-style-values height: _avatar.AVATAR_SIZES[size], // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/ui-styling-standard/enforce-style-prop, @atlaskit/ui-styling-standard/no-unsafe-values clipPath: _index.AGENT_AVATAR_CLIP_PATH }, testId: testId ? "".concat(testId, "-wrapper") : 'agent-avatar-skeleton-wrapper' }, /*#__PURE__*/React.createElement(_skeleton.default, { width: "100%", height: "100%", borderRadius: 0, isShimmering: isShimmering, color: color, ShimmeringEndColor: shimmeringEndColor, testId: testId !== null && testId !== void 0 ? testId : 'agent-avatar-skeleton' })); };