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

62 lines 2.68 kB
/* index.tsx generated by @compiled/babel-plugin v0.39.1 */ import _extends from "@babel/runtime/helpers/extends"; import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties"; var _excluded = ["children", "whiteSpacePreWrap", "renderIcon"]; import "./index.compiled.css"; import * as React from 'react'; import { ax, ix } from "@compiled/react/runtime"; import { forwardRef } from 'react'; import { useIntl } from 'react-intl'; import { cx } from '@atlaskit/css'; import AgentIcon from '@atlaskit/icon/core/ai-agent'; import { Box, Inline, Pressable } from '@atlaskit/primitives/compiled'; import { ChatPillIcon } from '../chat-icon'; import messages from './messages'; var stylesCompiled = { pillLineHeight: "_vwz47vkz" }; var styles = { button: "_2rko12b0 _11c8fhey _189ee4h9 _1dqonqa1 _1h6d1l7x _syazazsu _ca0q12x7 _u5f3utpp _n3td12x7 _19bvutpp _k48p1wq8 _1bto1l2s _o5721q9c _1o9zkb7n _bfhksm61 _irr31dpa _1di6fcek", buttonInline: "_18zrv77o", queryText: "_1nmz1hna _y3gn1e5h", whiteSpacePreWrap: "_o5721jtm" }; export var ChatPill = /*#__PURE__*/forwardRef(function (_ref, ref) { var children = _ref.children, _ref$whiteSpacePreWra = _ref.whiteSpacePreWrap, whiteSpacePreWrap = _ref$whiteSpacePreWra === void 0 ? true : _ref$whiteSpacePreWra, _ref$renderIcon = _ref.renderIcon, renderIcon = _ref$renderIcon === void 0 ? true : _ref$renderIcon, props = _objectWithoutProperties(_ref, _excluded); return /*#__PURE__*/React.createElement(Pressable, _extends({ ref: ref }, props, { xcss: styles.button }), /*#__PURE__*/React.createElement("div", { className: ax([stylesCompiled.pillLineHeight]) }, /*#__PURE__*/React.createElement(Inline, { space: "space.075", alignBlock: "baseline" }, renderIcon ? /*#__PURE__*/React.createElement(ChatPillIcon, null) : null, /*#__PURE__*/React.createElement(Box, { xcss: cx(styles.queryText, whiteSpacePreWrap && styles.whiteSpacePreWrap) }, children)))); }); export var BrowseAgentsPill = /*#__PURE__*/forwardRef(function (props, ref) { var _useIntl = useIntl(), formatMessage = _useIntl.formatMessage; return /*#__PURE__*/React.createElement(Pressable, _extends({ ref: ref }, props, { xcss: styles.button }), /*#__PURE__*/React.createElement("div", { className: ax([stylesCompiled.pillLineHeight]) }, /*#__PURE__*/React.createElement(Inline, { space: "space.050", xcss: styles.buttonInline }, /*#__PURE__*/React.createElement(AgentIcon, { color: "currentColor", label: "" }), /*#__PURE__*/React.createElement(Box, { xcss: styles.queryText }, formatMessage(messages.browseAgentsPillLabel))))); });