@hh.ru/magritte-ui-chat-bubble 1.4.0 → 1.5.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/ChatBubble.d.ts CHANGED
@@ -3,6 +3,7 @@ import { ChatBubbleFile } from '@hh.ru/magritte-ui-chat-bubble/File';
3
3
  import { ChatBubbleLabel } from '@hh.ru/magritte-ui-chat-bubble/Label';
4
4
  import { ChatBubbleMedia } from '@hh.ru/magritte-ui-chat-bubble/Media';
5
5
  import { ChatBubbleMessage } from '@hh.ru/magritte-ui-chat-bubble/Message';
6
+ import { ChatBubbleReply } from '@hh.ru/magritte-ui-chat-bubble/Reply';
6
7
  import { ChatBubbleSnippet } from '@hh.ru/magritte-ui-chat-bubble/Snippet';
7
8
  import { ChatBubbleStatus } from '@hh.ru/magritte-ui-chat-bubble/Status';
8
9
  import type { ChatBubbleProps } from '@hh.ru/magritte-ui-chat-bubble/types';
@@ -12,6 +13,7 @@ interface ChatBubbleComponents {
12
13
  Label: typeof ChatBubbleLabel;
13
14
  Media: typeof ChatBubbleMedia;
14
15
  Message: typeof ChatBubbleMessage;
16
+ Reply: typeof ChatBubbleReply;
15
17
  Snippet: typeof ChatBubbleSnippet;
16
18
  Status: typeof ChatBubbleStatus;
17
19
  }
package/ChatBubble.js CHANGED
@@ -8,6 +8,7 @@ import { ChatBubbleFile } from './File.js';
8
8
  import { ChatBubbleLabel } from './Label.js';
9
9
  import { ChatBubbleMedia } from './Media.js';
10
10
  import { ChatBubbleMessage } from './Message.js';
11
+ import { ChatBubbleReply } from './Reply.js';
11
12
  import { ChatBubbleSnippet } from './Snippet.js';
12
13
  import { ChatBubbleStatus } from './Status.js';
13
14
  import { Meta } from './internal/Meta.js';
@@ -20,14 +21,14 @@ import { IconDefaultPropsContext } from '@hh.ru/magritte-ui-icon';
20
21
  import { ExclamationCircleFilledSize24 } from '@hh.ru/magritte-ui-icon/icon';
21
22
  import { Menu } from '@hh.ru/magritte-ui-menu';
22
23
  import { Text } from '@hh.ru/magritte-ui-typography';
23
- import { s as styles } from './chat-bubble-C4Yvxp5H.js';
24
+ import { s as styles } from './chat-bubble-fnws1moq.js';
24
25
  import '@hh.ru/magritte-ui-cell';
25
26
  import '@hh.ru/magritte-ui-link';
26
27
  import '@hh.ru/magritte-ui-loader';
27
28
  import '@hh.ru/magritte-common-use-multiple-refs';
28
29
  import '@hh.ru/magritte-common-use-translation';
29
30
  import '@hh.ru/magritte-ui-tooltip';
30
- import './chat-bubble-BEqoLjma.js';
31
+ import './chat-bubble-BSNa94vA.js';
31
32
 
32
33
  const ChatBubble = forwardRef(({ actions, buttons, children, header, errorActions, mode = 'incoming', showTail = false, status, time, error = false, errorText, 'data-qa': dataQa = 'chat-bubble', className, }, ref) => {
33
34
  const [menuVisible, setMenuVisible] = useState(false);
@@ -56,6 +57,7 @@ ChatBubble.File = ChatBubbleFile;
56
57
  ChatBubble.Label = ChatBubbleLabel;
57
58
  ChatBubble.Media = ChatBubbleMedia;
58
59
  ChatBubble.Message = ChatBubbleMessage;
60
+ ChatBubble.Reply = ChatBubbleReply;
59
61
  ChatBubble.Snippet = ChatBubbleSnippet;
60
62
  ChatBubble.Status = ChatBubbleStatus;
61
63
 
package/ChatBubble.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"ChatBubble.js","sources":["src/ChatBubble.tsx"],"sourcesContent":["import { cloneElement, forwardRef, useCallback, useState, useMemo, useRef } from 'react';\nimport classnames from 'classnames';\n\nimport { ButtonDefaultPropsContext, type ButtonProps } from '@hh.ru/magritte-ui-button';\nimport { ChatBubbleErrorAction } from '@hh.ru/magritte-ui-chat-bubble/ErrorAction';\nimport { ChatBubbleFile } from '@hh.ru/magritte-ui-chat-bubble/File';\nimport { ChatBubbleLabel } from '@hh.ru/magritte-ui-chat-bubble/Label';\nimport { ChatBubbleMedia } from '@hh.ru/magritte-ui-chat-bubble/Media';\nimport { ChatBubbleMessage } from '@hh.ru/magritte-ui-chat-bubble/Message';\nimport { ChatBubbleSnippet } from '@hh.ru/magritte-ui-chat-bubble/Snippet';\nimport { ChatBubbleStatus } from '@hh.ru/magritte-ui-chat-bubble/Status';\nimport { Meta } from '@hh.ru/magritte-ui-chat-bubble/internal/Meta';\nimport { Tail } from '@hh.ru/magritte-ui-chat-bubble/internal/Tail';\nimport { getColors } from '@hh.ru/magritte-ui-chat-bubble/internal/colors';\nimport { ChatBubbleErrorMenuProvider } from '@hh.ru/magritte-ui-chat-bubble/internal/errorMenu';\nimport { ChatBubbleModeProvider } from '@hh.ru/magritte-ui-chat-bubble/internal/mode';\nimport { isMetaHost, flattenFragments } from '@hh.ru/magritte-ui-chat-bubble/internal/utils';\nimport type { ChatBubbleProps } from '@hh.ru/magritte-ui-chat-bubble/types';\nimport { IconDefaultPropsContext, type IconProps } from '@hh.ru/magritte-ui-icon';\nimport { ExclamationCircleFilledSize24 } from '@hh.ru/magritte-ui-icon/icon';\nimport { Menu } from '@hh.ru/magritte-ui-menu';\nimport { Text } from '@hh.ru/magritte-ui-typography';\n\nimport styles from './chat-bubble.less';\n\ninterface ChatBubbleComponents {\n ErrorAction: typeof ChatBubbleErrorAction;\n File: typeof ChatBubbleFile;\n Label: typeof ChatBubbleLabel;\n Media: typeof ChatBubbleMedia;\n Message: typeof ChatBubbleMessage;\n Snippet: typeof ChatBubbleSnippet;\n Status: typeof ChatBubbleStatus;\n}\n\nexport const ChatBubble = forwardRef<HTMLDivElement, ChatBubbleProps>(\n (\n {\n actions,\n buttons,\n children,\n header,\n errorActions,\n mode = 'incoming',\n showTail = false,\n status,\n time,\n error = false,\n errorText,\n 'data-qa': dataQa = 'chat-bubble',\n className,\n },\n ref\n ) => {\n const [menuVisible, setMenuVisible] = useState(false);\n const closeErrorMenu = useCallback(() => setMenuVisible(false), []);\n const activatorMenuRef = useRef<SVGElement>(null);\n const colors = getColors(mode);\n const actionsIconProps: Partial<IconProps> = useMemo(\n () => ({ padding: 8, initialColor: colors.actionsIcon }),\n [colors]\n );\n const buttonsProps: Partial<ButtonProps> = useMemo(\n () => ({ size: 'small', mode: 'secondary', style: colors.button, stretched: true }),\n [colors]\n );\n /**\n * Время отдаём последнему элементу контента\n * Позиция времени меняется, в зависимости от компонента\n * Если последний ребенок не может отрисовать, вставим meta в самый конец\n */\n const meta = <Meta mode={mode} status={status} time={time} />;\n const items = flattenFragments(children);\n const lastIndex = items.length - 1;\n const metaHosted = isMetaHost(items[lastIndex]);\n const content = items.map((child, index) =>\n index === lastIndex && isMetaHost(child) ? cloneElement(child, { meta }) : child\n );\n return (\n <ChatBubbleModeProvider value={mode}>\n <div\n className={classnames(className, styles.chatBubble, styles[mode], {\n [styles.withTail]: showTail,\n })}\n data-qa={dataQa}\n ref={ref}\n >\n <div className={styles.row}>\n <div className={styles.bubble}>\n {header && (\n <div className={styles.header} data-qa=\"chat-bubble-header\">\n {header}\n </div>\n )}\n <div\n className={header ? styles.contentWithHeader : undefined}\n data-qa=\"chat-bubble-content\"\n >\n {content}\n {!metaHosted && meta}\n </div>\n {showTail && <Tail />}\n </div>\n {mode === 'outgoing' && error && (\n <div>\n <ExclamationCircleFilledSize24\n ref={activatorMenuRef}\n initialColor=\"negative\"\n onClick={errorActions ? () => setMenuVisible((visible) => !visible) : undefined}\n data-qa=\"chat-bubble-error-button\"\n aria-haspopup={errorActions ? 'menu' : undefined}\n aria-expanded={errorActions ? menuVisible : undefined}\n />\n {errorActions && (\n <Menu\n activatorRef={activatorMenuRef}\n onClose={closeErrorMenu}\n placement=\"bottom-right\"\n visible={menuVisible}\n >\n <ChatBubbleErrorMenuProvider value={closeErrorMenu}>\n {errorActions}\n </ChatBubbleErrorMenuProvider>\n </Menu>\n )}\n </div>\n )}\n </div>\n {mode === 'outgoing' && error && errorText && (\n <div className={styles.errorText} data-qa=\"chat-bubble-error-text\">\n <Text typography=\"label-4-regular\" style=\"negative\" maxLines={2}>\n {errorText}\n </Text>\n </div>\n )}\n {buttons && (mode === 'bot' || mode === 'incoming') && (\n <ButtonDefaultPropsContext props={buttonsProps}>\n <div className={styles.buttons} data-qa=\"chat-bubble-buttons\">\n {buttons}\n </div>\n </ButtonDefaultPropsContext>\n )}\n {actions && (\n <IconDefaultPropsContext props={actionsIconProps}>\n <div className={styles.actions} data-qa=\"chat-bubble-actions\">\n {actions}\n </div>\n </IconDefaultPropsContext>\n )}\n </div>\n </ChatBubbleModeProvider>\n );\n }\n) as React.ForwardRefExoticComponent<ChatBubbleProps & React.RefAttributes<HTMLDivElement>> & ChatBubbleComponents;\n\nChatBubble.displayName = 'ChatBubble';\n\nChatBubble.ErrorAction = ChatBubbleErrorAction;\nChatBubble.File = ChatBubbleFile;\nChatBubble.Label = ChatBubbleLabel;\nChatBubble.Media = ChatBubbleMedia;\nChatBubble.Message = ChatBubbleMessage;\nChatBubble.Snippet = ChatBubbleSnippet;\nChatBubble.Status = ChatBubbleStatus;\n"],"names":["_jsx","_jsxs"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;MAmCa,UAAU,GAAG,UAAU,CAChC,CACI,EACI,OAAO,EACP,OAAO,EACP,QAAQ,EACR,MAAM,EACN,YAAY,EACZ,IAAI,GAAG,UAAU,EACjB,QAAQ,GAAG,KAAK,EAChB,MAAM,EACN,IAAI,EACJ,KAAK,GAAG,KAAK,EACb,SAAS,EACT,SAAS,EAAE,MAAM,GAAG,aAAa,EACjC,SAAS,GACZ,EACD,GAAG,KACH;IACA,MAAM,CAAC,WAAW,EAAE,cAAc,CAAC,GAAG,QAAQ,CAAC,KAAK,CAAC,CAAC;AACtD,IAAA,MAAM,cAAc,GAAG,WAAW,CAAC,MAAM,cAAc,CAAC,KAAK,CAAC,EAAE,EAAE,CAAC,CAAC;AACpE,IAAA,MAAM,gBAAgB,GAAG,MAAM,CAAa,IAAI,CAAC,CAAC;AAClD,IAAA,MAAM,MAAM,GAAG,SAAS,CAAC,IAAI,CAAC,CAAC;IAC/B,MAAM,gBAAgB,GAAuB,OAAO,CAChD,OAAO,EAAE,OAAO,EAAE,C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ChatBubble.js","sources":["src/ChatBubble.tsx"],"sourcesContent":["import { cloneElement, forwardRef, useCallback, useState, useMemo, useRef } from 'react';\nimport classnames from 'classnames';\n\nimport { ButtonDefaultPropsContext, type ButtonProps } from '@hh.ru/magritte-ui-button';\nimport { ChatBubbleErrorAction } from '@hh.ru/magritte-ui-chat-bubble/ErrorAction';\nimport { ChatBubbleFile } from '@hh.ru/magritte-ui-chat-bubble/File';\nimport { ChatBubbleLabel } from '@hh.ru/magritte-ui-chat-bubble/Label';\nimport { ChatBubbleMedia } from '@hh.ru/magritte-ui-chat-bubble/Media';\nimport { ChatBubbleMessage } from '@hh.ru/magritte-ui-chat-bubble/Message';\nimport { ChatBubbleReply } from '@hh.ru/magritte-ui-chat-bubble/Reply';\nimport { ChatBubbleSnippet } from '@hh.ru/magritte-ui-chat-bubble/Snippet';\nimport { ChatBubbleStatus } from '@hh.ru/magritte-ui-chat-bubble/Status';\nimport { Meta } from '@hh.ru/magritte-ui-chat-bubble/internal/Meta';\nimport { Tail } from '@hh.ru/magritte-ui-chat-bubble/internal/Tail';\nimport { getColors } from '@hh.ru/magritte-ui-chat-bubble/internal/colors';\nimport { ChatBubbleErrorMenuProvider } from '@hh.ru/magritte-ui-chat-bubble/internal/errorMenu';\nimport { ChatBubbleModeProvider } from '@hh.ru/magritte-ui-chat-bubble/internal/mode';\nimport { isMetaHost, flattenFragments } from '@hh.ru/magritte-ui-chat-bubble/internal/utils';\nimport type { ChatBubbleProps } from '@hh.ru/magritte-ui-chat-bubble/types';\nimport { IconDefaultPropsContext, type IconProps } from '@hh.ru/magritte-ui-icon';\nimport { ExclamationCircleFilledSize24 } from '@hh.ru/magritte-ui-icon/icon';\nimport { Menu } from '@hh.ru/magritte-ui-menu';\nimport { Text } from '@hh.ru/magritte-ui-typography';\n\nimport styles from './chat-bubble.less';\n\ninterface ChatBubbleComponents {\n ErrorAction: typeof ChatBubbleErrorAction;\n File: typeof ChatBubbleFile;\n Label: typeof ChatBubbleLabel;\n Media: typeof ChatBubbleMedia;\n Message: typeof ChatBubbleMessage;\n Reply: typeof ChatBubbleReply;\n Snippet: typeof ChatBubbleSnippet;\n Status: typeof ChatBubbleStatus;\n}\n\nexport const ChatBubble = forwardRef<HTMLDivElement, ChatBubbleProps>(\n (\n {\n actions,\n buttons,\n children,\n header,\n errorActions,\n mode = 'incoming',\n showTail = false,\n status,\n time,\n error = false,\n errorText,\n 'data-qa': dataQa = 'chat-bubble',\n className,\n },\n ref\n ) => {\n const [menuVisible, setMenuVisible] = useState(false);\n const closeErrorMenu = useCallback(() => setMenuVisible(false), []);\n const activatorMenuRef = useRef<SVGElement>(null);\n const colors = getColors(mode);\n const actionsIconProps: Partial<IconProps> = useMemo(\n () => ({ padding: 8, initialColor: colors.actionsIcon }),\n [colors]\n );\n const buttonsProps: Partial<ButtonProps> = useMemo(\n () => ({ size: 'small', mode: 'secondary', style: colors.button, stretched: true }),\n [colors]\n );\n /**\n * Время отдаём последнему элементу контента\n * Позиция времени меняется, в зависимости от компонента\n * Если последний ребенок не может отрисовать, вставим meta в самый конец\n */\n const meta = <Meta mode={mode} status={status} time={time} />;\n const items = flattenFragments(children);\n const lastIndex = items.length - 1;\n const metaHosted = isMetaHost(items[lastIndex]);\n const content = items.map((child, index) =>\n index === lastIndex && isMetaHost(child) ? cloneElement(child, { meta }) : child\n );\n return (\n <ChatBubbleModeProvider value={mode}>\n <div\n className={classnames(className, styles.chatBubble, styles[mode], {\n [styles.withTail]: showTail,\n })}\n data-qa={dataQa}\n ref={ref}\n >\n <div className={styles.row}>\n <div className={styles.bubble}>\n {header && (\n <div className={styles.header} data-qa=\"chat-bubble-header\">\n {header}\n </div>\n )}\n <div\n className={header ? styles.contentWithHeader : undefined}\n data-qa=\"chat-bubble-content\"\n >\n {content}\n {!metaHosted && meta}\n </div>\n {showTail && <Tail />}\n </div>\n {mode === 'outgoing' && error && (\n <div>\n <ExclamationCircleFilledSize24\n ref={activatorMenuRef}\n initialColor=\"negative\"\n onClick={errorActions ? () => setMenuVisible((visible) => !visible) : undefined}\n data-qa=\"chat-bubble-error-button\"\n aria-haspopup={errorActions ? 'menu' : undefined}\n aria-expanded={errorActions ? menuVisible : undefined}\n />\n {errorActions && (\n <Menu\n activatorRef={activatorMenuRef}\n onClose={closeErrorMenu}\n placement=\"bottom-right\"\n visible={menuVisible}\n >\n <ChatBubbleErrorMenuProvider value={closeErrorMenu}>\n {errorActions}\n </ChatBubbleErrorMenuProvider>\n </Menu>\n )}\n </div>\n )}\n </div>\n {mode === 'outgoing' && error && errorText && (\n <div className={styles.errorText} data-qa=\"chat-bubble-error-text\">\n <Text typography=\"label-4-regular\" style=\"negative\" maxLines={2}>\n {errorText}\n </Text>\n </div>\n )}\n {buttons && (mode === 'bot' || mode === 'incoming') && (\n <ButtonDefaultPropsContext props={buttonsProps}>\n <div className={styles.buttons} data-qa=\"chat-bubble-buttons\">\n {buttons}\n </div>\n </ButtonDefaultPropsContext>\n )}\n {actions && (\n <IconDefaultPropsContext props={actionsIconProps}>\n <div className={styles.actions} data-qa=\"chat-bubble-actions\">\n {actions}\n </div>\n </IconDefaultPropsContext>\n )}\n </div>\n </ChatBubbleModeProvider>\n );\n }\n) as React.ForwardRefExoticComponent<ChatBubbleProps & React.RefAttributes<HTMLDivElement>> & ChatBubbleComponents;\n\nChatBubble.displayName = 'ChatBubble';\n\nChatBubble.ErrorAction = ChatBubbleErrorAction;\nChatBubble.File = ChatBubbleFile;\nChatBubble.Label = ChatBubbleLabel;\nChatBubble.Media = ChatBubbleMedia;\nChatBubble.Message = ChatBubbleMessage;\nChatBubble.Reply = ChatBubbleReply;\nChatBubble.Snippet = ChatBubbleSnippet;\nChatBubble.Status = ChatBubbleStatus;\n"],"names":["_jsx","_jsxs"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;MAqCa,UAAU,GAAG,UAAU,CAChC,CACI,EACI,OAAO,EACP,OAAO,EACP,QAAQ,EACR,MAAM,EACN,YAAY,EACZ,IAAI,GAAG,UAAU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S,EAAE,MAAM,CAAC,OAAO,aAAU,qBAAqB,EAAA,QAAA,EACxD,OAAO,EAAA,CACN,EACgB,CAAA,CAC7B,CACC,EAAA,CAAA,EAAA,CACe,EAC3B;AACN,CAAC,EAC8G;AAEnH,UAAU,CAAC,WAAW,GAAG,YAAY,CAAC;AAEtC,UAAU,CAAC,WAAW,GAAG,qBAAqB,CAAC;AAC/C,UAAU,CAAC,IAAI,GAAG,cAAc,CAAC;AACjC,UAAU,CAAC,KAAK,GAAG,eAAe,CAAC;AACnC,UAAU,CAAC,KAAK,GAAG,eAAe,CAAC;AACnC,UAAU,CAAC,OAAO,GAAG,iBAAiB,CAAC;AACvC,UAAU,CAAC,KAAK,GAAG,eAAe,CAAC;AACnC,UAAU,CAAC,OAAO,GAAG,iBAAiB,CAAC;AACvC,UAAU,CAAC,MAAM,GAAG,gBAAgB;;;;"}
package/File.js CHANGED
@@ -8,7 +8,7 @@ import { markMetaHost } from './internal/utils.js';
8
8
  import { ArrowDownLineOutlinedSize24, DocumentOutlinedSize24 } from '@hh.ru/magritte-ui-icon/icon';
9
9
  import { LinkDefaultPropsContext } from '@hh.ru/magritte-ui-link';
10
10
  import { Loader } from '@hh.ru/magritte-ui-loader';
11
- import { s as styles } from './chat-bubble-C4Yvxp5H.js';
11
+ import { s as styles } from './chat-bubble-fnws1moq.js';
12
12
 
13
13
  /** Прикреплённый файл */
14
14
  const ChatBubbleFileComponent = forwardRef(({ 'data-qa': dataQa = 'chat-bubble-file', description, meta, name, preview, state = 'loaded', previewAlt, ...props }, ref) => {
package/Media.js CHANGED
@@ -3,7 +3,7 @@ import { jsxs, Fragment, jsx } from 'react/jsx-runtime';
3
3
  import { forwardRef } from 'react';
4
4
  import { markMetaHost } from './internal/utils.js';
5
5
  import { Text } from '@hh.ru/magritte-ui-typography';
6
- import { s as styles } from './chat-bubble-C4Yvxp5H.js';
6
+ import { s as styles } from './chat-bubble-fnws1moq.js';
7
7
 
8
8
  /**
9
9
  * Медиа в сообщении
package/Message.js CHANGED
@@ -5,7 +5,7 @@ import { getColors } from './internal/colors.js';
5
5
  import { useChatBubbleMode } from './internal/mode.js';
6
6
  import { markMetaHost } from './internal/utils.js';
7
7
  import { Text } from '@hh.ru/magritte-ui-typography';
8
- import { s as styles } from './chat-bubble-C4Yvxp5H.js';
8
+ import { s as styles } from './chat-bubble-fnws1moq.js';
9
9
 
10
10
  /**
11
11
  * Текстовая часть сообщения.
package/Reply.d.ts ADDED
@@ -0,0 +1,20 @@
1
+ import { type HTMLAttributes, type ReactNode } from 'react';
2
+ export interface ChatBubbleReplyProps extends Omit<HTMLAttributes<HTMLDivElement>, 'title'> {
3
+ /** Автор цитируемого сообщения */
4
+ title?: ReactNode;
5
+ /** Url миниатюры вложения */
6
+ preview?: string;
7
+ /** alt миниатюры */
8
+ previewAlt?: string;
9
+ /** Текст цитируемого сообщения */
10
+ children?: ReactNode;
11
+ /**
12
+ * Значение data-qa
13
+ * @default chat-bubble-reply
14
+ */
15
+ 'data-qa'?: string;
16
+ }
17
+ /**
18
+ * Цитата сообщения, на которое отвечают (ставится в слот `header`)
19
+ */
20
+ export declare const ChatBubbleReply: import("react").ForwardRefExoticComponent<ChatBubbleReplyProps & import("react").RefAttributes<HTMLDivElement>>;
package/Reply.js ADDED
@@ -0,0 +1,19 @@
1
+ import './index.css';
2
+ import { jsxs, jsx } from 'react/jsx-runtime';
3
+ import { forwardRef } from 'react';
4
+ import { getColors } from './internal/colors.js';
5
+ import { useChatBubbleMode } from './internal/mode.js';
6
+ import { Text } from '@hh.ru/magritte-ui-typography';
7
+ import { s as styles } from './chat-bubble-fnws1moq.js';
8
+
9
+ /**
10
+ * Цитата сообщения, на которое отвечают (ставится в слот `header`)
11
+ */
12
+ const ChatBubbleReply = forwardRef(({ children, 'data-qa': dataQa = 'chat-bubble-reply', preview, previewAlt, title, ...props }, ref) => {
13
+ const colors = getColors(useChatBubbleMode());
14
+ return (jsxs("div", { ...props, className: styles.reply, "data-qa": dataQa, ref: ref, children: [preview && jsx("img", { className: styles.replyPreview, src: preview, alt: previewAlt ?? '' }), jsxs("span", { className: styles.replyBody, children: [title && (jsx(Text, { typography: "subtitle-2-semibold", style: colors.replyTitle, maxLines: 1, "data-qa": "chat-bubble-reply-title", children: title })), children && (jsx(Text, { typography: "label-3-regular", style: colors.text, maxLines: 1, "data-qa": "chat-bubble-reply-text", children: children }))] })] }));
15
+ });
16
+ ChatBubbleReply.displayName = 'ChatBubbleReply';
17
+
18
+ export { ChatBubbleReply };
19
+ //# sourceMappingURL=Reply.js.map
package/Reply.js.map ADDED
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Reply.js","sources":["src/Reply.tsx"],"sourcesContent":["import { forwardRef, type HTMLAttributes, type ReactNode } from 'react';\n\nimport { getColors } from '@hh.ru/magritte-ui-chat-bubble/internal/colors';\nimport { useChatBubbleMode } from '@hh.ru/magritte-ui-chat-bubble/internal/mode';\nimport { Text } from '@hh.ru/magritte-ui-typography';\n\nimport styles from './chat-bubble.less';\n\nexport interface ChatBubbleReplyProps extends Omit<HTMLAttributes<HTMLDivElement>, 'title'> {\n /** Автор цитируемого сообщения */\n title?: ReactNode;\n /** Url миниатюры вложения */\n preview?: string;\n /** alt миниатюры */\n previewAlt?: string;\n /** Текст цитируемого сообщения */\n children?: ReactNode;\n /**\n * Значение data-qa\n * @default chat-bubble-reply\n */\n 'data-qa'?: string;\n}\n\n/**\n * Цитата сообщения, на которое отвечают (ставится в слот `header`)\n */\nexport const ChatBubbleReply = forwardRef<HTMLDivElement, ChatBubbleReplyProps>(\n ({ children, 'data-qa': dataQa = 'chat-bubble-reply', preview, previewAlt, title, ...props }, ref) => {\n const colors = getColors(useChatBubbleMode());\n\n return (\n <div {...props} className={styles.reply} data-qa={dataQa} ref={ref}>\n {preview && <img className={styles.replyPreview} src={preview} alt={previewAlt ?? ''} />}\n <span className={styles.replyBody}>\n {title && (\n <Text\n typography=\"subtitle-2-semibold\"\n style={colors.replyTitle}\n maxLines={1}\n data-qa=\"chat-bubble-reply-title\"\n >\n {title}\n </Text>\n )}\n {children && (\n <Text\n typography=\"label-3-regular\"\n style={colors.text}\n maxLines={1}\n data-qa=\"chat-bubble-reply-text\"\n >\n {children}\n </Text>\n )}\n </span>\n </div>\n );\n }\n);\n\nChatBubbleReply.displayName = 'ChatBubbleReply';\n"],"names":["_jsxs","_jsx"],"mappings":";;;;;;;AAwBA;;AAEG;AACI,MAAM,eAAe,GAAG,UAAU,CACrC,CAAC,EAAE,QAAQ,EAAE,SAAS,EAAE,MAAM,GAAG,mBAAmB,EAAE,OAAO,EAAE,UAAU,EAAE,KAAK,EAAE,GAAG,KAAK,EAAE,EAAE,GAAG,KAAI;AACjG,IAAA,MAAM,MAAM,GAAG,SAAS,CAAC,iBAAiB,EAAE,CAAC,CAAC;IAE9C,QACIA,iBAAS,KAAK,EAAE,SAAS,EAAE,MAAM,CAAC,KAAK,EAAA,SAAA,EAAW,MAAM,EAAE,GAAG,EAAE,GAAG,EAAA,QAAA,EAAA,CAC7D,OAAO,IAAIC,GAAA,CAAA,KAAA,EAAA,EAAK,SAAS,EAAE,MAAM,CAAC,YAAY,EAAE,GAAG,EAAE,OAAO,EAAE,GAAG,EAAE,UAAU,IAAI,EAAE,EAAA,CAAI,EACxFD,IAAM,CAAA,MAAA,EAAA,EAAA,SAAS,EAAE,MAAM,CAAC,SAAS,EAC5B,QAAA,EAAA,CAAA,KAAK,KACFC,GAAC,CAAA,IAAI,IACD,UAAU,EAAC,qBAAqB,EAChC,KAAK,EAAE,MAAM,CAAC,UAAU,EACxB,QAAQ,EAAE,CAAC,EAAA,SAAA,EACH,yBAAyB,EAEhC,QAAA,EAAA,KAAK,GACH,CACV,EACA,QAAQ,KACLA,GAAA,CAAC,IAAI,EACD,EAAA,UAAU,EAAC,iBAAiB,EAC5B,KAAK,EAAE,MAAM,CAAC,IAAI,EAClB,QAAQ,EAAE,CAAC,EAAA,SAAA,EACH,wBAAwB,EAE/B,QAAA,EAAA,QAAQ,GACN,CACV,CAAA,EAAA,CACE,CACL,EAAA,CAAA,EACR;AACN,CAAC,EACH;AAEF,eAAe,CAAC,WAAW,GAAG,iBAAiB;;;;"}
package/Snippet.js CHANGED
@@ -4,7 +4,7 @@ import { forwardRef } from 'react';
4
4
  import { getColors } from './internal/colors.js';
5
5
  import { useChatBubbleMode } from './internal/mode.js';
6
6
  import { Text } from '@hh.ru/magritte-ui-typography';
7
- import { s as styles } from './chat-bubble-C4Yvxp5H.js';
7
+ import { s as styles } from './chat-bubble-fnws1moq.js';
8
8
 
9
9
  /**
10
10
  * Сниппет: дополнительная информация к сообщению
package/Status.js CHANGED
@@ -7,7 +7,7 @@ import { getColors } from './internal/colors.js';
7
7
  import { useChatBubbleMode } from './internal/mode.js';
8
8
  import { EyeOutlinedSize16, ClockOutlinedSize16, CheckOutlinedSize16, CheckDoubleOutlinedSize16 } from '@hh.ru/magritte-ui-icon/icon';
9
9
  import { TooltipHover } from '@hh.ru/magritte-ui-tooltip';
10
- import { s as styles } from './chat-bubble-C4Yvxp5H.js';
10
+ import { s as styles } from './chat-bubble-fnws1moq.js';
11
11
 
12
12
  const ICON = {
13
13
  sending: ClockOutlinedSize16,
@@ -0,0 +1,5 @@
1
+ import './index.css';
2
+ var styles = {"tail":"magritte-tail___-1lJ0_1-5-1","tail_outgoing":"magritte-tail_outgoing___cnyh3_1-5-1","tailOutgoing":"magritte-tail_outgoing___cnyh3_1-5-1","meta":"magritte-meta___HT7lp_1-5-1"};
3
+
4
+ export { styles as s };
5
+ //# sourceMappingURL=chat-bubble-BSNa94vA.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"chat-bubble-BSNa94vA.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;"}
@@ -0,0 +1,5 @@
1
+ import './index.css';
2
+ var styles = {"chat-bubble":"magritte-chat-bubble___ds9CP_1-5-1","chatBubble":"magritte-chat-bubble___ds9CP_1-5-1","outgoing":"magritte-outgoing___3n00o_1-5-1","bot":"magritte-bot___Z6vZA_1-5-1","row":"magritte-row___mQNnt_1-5-1","bubble":"magritte-bubble___NVuDI_1-5-1","with-tail":"magritte-with-tail___IdixJ_1-5-1","withTail":"magritte-with-tail___IdixJ_1-5-1","header":"magritte-header___Px2to_1-5-1","message-title":"magritte-message-title___dgBFk_1-5-1","messageTitle":"magritte-message-title___dgBFk_1-5-1","message":"magritte-message___7TEpw_1-5-1","buttons":"magritte-buttons___yQqBi_1-5-1","actions":"magritte-actions___I5GSz_1-5-1","error-text":"magritte-error-text___1ZxWY_1-5-1","errorText":"magritte-error-text___1ZxWY_1-5-1","file":"magritte-file___k2IKy_1-5-1","file-preview":"magritte-file-preview___eJKu8_1-5-1","filePreview":"magritte-file-preview___eJKu8_1-5-1","media":"magritte-media___9jH2k_1-5-1","media-blur":"magritte-media-blur___TbiMa_1-5-1","mediaBlur":"magritte-media-blur___TbiMa_1-5-1","media-image":"magritte-media-image___G-FkF_1-5-1","mediaImage":"magritte-media-image___G-FkF_1-5-1","media-content":"magritte-media-content___n3XbD_1-5-1","mediaContent":"magritte-media-content___n3XbD_1-5-1","media-format":"magritte-media-format___AdfCK_1-5-1","mediaFormat":"magritte-media-format___AdfCK_1-5-1","media-meta":"magritte-media-meta___oSxxr_1-5-1","mediaMeta":"magritte-media-meta___oSxxr_1-5-1","reply":"magritte-reply___-QCK7_1-5-1","reply-preview":"magritte-reply-preview___qvlNT_1-5-1","replyPreview":"magritte-reply-preview___qvlNT_1-5-1","reply-body":"magritte-reply-body___f2xx7_1-5-1","replyBody":"magritte-reply-body___f2xx7_1-5-1","snippet":"magritte-snippet___8k9xb_1-5-1","status":"magritte-status___dHzCt_1-5-1","content-with-header":"magritte-content-with-header___wiNKB_1-5-1","contentWithHeader":"magritte-content-with-header___wiNKB_1-5-1"};
3
+
4
+ export { styles as s };
5
+ //# sourceMappingURL=chat-bubble-fnws1moq.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"chat-bubble-fnws1moq.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;"}
package/index.css CHANGED
@@ -34,7 +34,7 @@
34
34
  --magritte-color-component-chat-bubble-snippet-background-outgoing-v25-0-1:#90ACC1;
35
35
  --magritte-color-component-chat-bubble-snippet-line-incoming-v25-0-1:#557B96;
36
36
  }
37
- .magritte-chat-bubble___ds9CP_1-4-0{
37
+ .magritte-chat-bubble___ds9CP_1-5-1{
38
38
  --magritte-chat-bubble-background:var(--magritte-color-component-chat-bubble-background-incoming-v25-0-1);
39
39
  --magritte-chat-bubble-border:var(--magritte-color-component-chat-bubble-border-incoming-v25-0-1);
40
40
  --magritte-chat-bubble-snippet-background:var(--magritte-color-component-chat-bubble-snippet-background-incoming-v25-0-1);
@@ -45,16 +45,16 @@
45
45
  max-width:calc(100% - 40px);
46
46
  }
47
47
  @media (min-width: 1020px){
48
- body.magritte-old-layout .magritte-chat-bubble___ds9CP_1-4-0{
48
+ body.magritte-old-layout .magritte-chat-bubble___ds9CP_1-5-1{
49
49
  max-width:min(460px, 100%);
50
50
  }
51
51
  }
52
52
  @media (min-width: 1024px){
53
- body:not(.magritte-old-layout) .magritte-chat-bubble___ds9CP_1-4-0{
53
+ body:not(.magritte-old-layout) .magritte-chat-bubble___ds9CP_1-5-1{
54
54
  max-width:min(460px, 100%);
55
55
  }
56
56
  }
57
- .magritte-outgoing___3n00o_1-4-0{
57
+ .magritte-outgoing___3n00o_1-5-1{
58
58
  --magritte-chat-bubble-background:var(--magritte-color-component-chat-bubble-background-outgoing-v25-0-1);
59
59
  --magritte-chat-bubble-border:var(--magritte-color-component-chat-bubble-border-outgoing-v25-0-1);
60
60
  --magritte-chat-bubble-snippet-background:var(--magritte-color-component-chat-bubble-snippet-background-outgoing-v25-0-1);
@@ -62,19 +62,19 @@
62
62
  align-items:flex-end;
63
63
  margin-left:auto;
64
64
  }
65
- .magritte-bot___Z6vZA_1-4-0{
65
+ .magritte-bot___Z6vZA_1-5-1{
66
66
  --magritte-chat-bubble-background:var(--magritte-color-component-chat-bubble-background-bot-v25-0-1);
67
67
  --magritte-chat-bubble-border:var(--magritte-color-component-chat-bubble-border-bot-v25-0-1);
68
68
  --magritte-chat-bubble-snippet-background:var(--magritte-color-component-chat-bubble-snippet-background-bot-v25-0-1);
69
69
  --magritte-chat-bubble-snippet-line:var(--magritte-color-component-chat-bubble-snippet-line-bot-v25-0-1);
70
70
  }
71
- .magritte-row___mQNnt_1-4-0{
71
+ .magritte-row___mQNnt_1-5-1{
72
72
  display:flex;
73
73
  align-items:flex-end;
74
74
  gap:8px;
75
75
  max-width:100%;
76
76
  }
77
- .magritte-bubble___NVuDI_1-4-0{
77
+ .magritte-bubble___NVuDI_1-5-1{
78
78
  position:relative;
79
79
  box-sizing:border-box;
80
80
  min-width:0;
@@ -85,59 +85,59 @@
85
85
  border-radius:20px;
86
86
  overflow-wrap:break-word;
87
87
  }
88
- .magritte-with-tail___IdixJ_1-4-0 .magritte-bubble___NVuDI_1-4-0{
88
+ .magritte-with-tail___IdixJ_1-5-1 .magritte-bubble___NVuDI_1-5-1{
89
89
  border-bottom-left-radius:0;
90
90
  }
91
- .magritte-with-tail___IdixJ_1-4-0.magritte-outgoing___3n00o_1-4-0 .magritte-bubble___NVuDI_1-4-0{
91
+ .magritte-with-tail___IdixJ_1-5-1.magritte-outgoing___3n00o_1-5-1 .magritte-bubble___NVuDI_1-5-1{
92
92
  border-bottom-left-radius:20px;
93
93
  border-bottom-right-radius:0;
94
94
  }
95
- .magritte-header___Px2to_1-4-0{
95
+ .magritte-header___Px2to_1-5-1{
96
96
  display:flex;
97
97
  flex-direction:column;
98
- gap:4px;
98
+ gap:8px;
99
99
  margin-bottom:4px;
100
100
  }
101
- .magritte-message-title___dgBFk_1-4-0{
101
+ .magritte-message-title___dgBFk_1-5-1{
102
102
  margin-bottom:4px;
103
103
  }
104
- .magritte-message___7TEpw_1-4-0:not(:first-child){
104
+ .magritte-message___7TEpw_1-5-1:not(:first-child){
105
105
  margin-top:8px;
106
106
  }
107
- .magritte-buttons___yQqBi_1-4-0{
107
+ .magritte-buttons___yQqBi_1-5-1{
108
108
  display:grid;
109
109
  grid-template-columns:repeat(2, 1fr);
110
110
  gap:8px;
111
111
  width:100%;
112
112
  margin-top:4px;
113
113
  }
114
- .magritte-buttons___yQqBi_1-4-0 > *:last-child:nth-child(odd){
114
+ .magritte-buttons___yQqBi_1-5-1 > *:last-child:nth-child(odd){
115
115
  grid-column:span 2;
116
116
  }
117
- .magritte-actions___I5GSz_1-4-0{
117
+ .magritte-actions___I5GSz_1-5-1{
118
118
  display:flex;
119
119
  flex-wrap:wrap;
120
120
  gap:2px;
121
121
  margin-top:4px;
122
122
  }
123
- .magritte-error-text___1ZxWY_1-4-0{
123
+ .magritte-error-text___1ZxWY_1-5-1{
124
124
  margin-top:2px;
125
125
  }
126
- .magritte-file___k2IKy_1-4-0{
126
+ .magritte-file___k2IKy_1-5-1{
127
127
  display:flex;
128
128
  align-items:flex-end;
129
129
  }
130
- .magritte-file___k2IKy_1-4-0 + .magritte-file___k2IKy_1-4-0{
130
+ .magritte-file___k2IKy_1-5-1 + .magritte-file___k2IKy_1-5-1{
131
131
  margin-top:12px;
132
132
  }
133
- .magritte-file-preview___eJKu8_1-4-0{
133
+ .magritte-file-preview___eJKu8_1-5-1{
134
134
  display:block;
135
135
  width:48px;
136
136
  height:48px;
137
137
  border-radius:8px;
138
138
  object-fit:cover;
139
139
  }
140
- .magritte-media___9jH2k_1-4-0{
140
+ .magritte-media___9jH2k_1-5-1{
141
141
  display:flex;
142
142
  position:relative;
143
143
  box-sizing:border-box;
@@ -150,18 +150,18 @@
150
150
  box-shadow:inset 0 0 0 1px var(--magritte-color-component-chat-bubble-border-image-v25-0-1);
151
151
  }
152
152
  @media (min-width: 1020px){
153
- body.magritte-old-layout .magritte-media___9jH2k_1-4-0{
153
+ body.magritte-old-layout .magritte-media___9jH2k_1-5-1{
154
154
  max-width:452px;
155
155
  max-height:452px;
156
156
  }
157
157
  }
158
158
  @media (min-width: 1024px){
159
- body:not(.magritte-old-layout) .magritte-media___9jH2k_1-4-0{
159
+ body:not(.magritte-old-layout) .magritte-media___9jH2k_1-5-1{
160
160
  max-width:452px;
161
161
  max-height:452px;
162
162
  }
163
163
  }
164
- .magritte-media-blur___TbiMa_1-4-0{
164
+ .magritte-media-blur___TbiMa_1-5-1{
165
165
  position:absolute;
166
166
  top:-96px;
167
167
  left:-96px;
@@ -171,7 +171,7 @@
171
171
  filter:blur(48px);
172
172
  object-fit:cover;
173
173
  }
174
- .magritte-media-image___G-FkF_1-4-0{
174
+ .magritte-media-image___G-FkF_1-5-1{
175
175
  display:block;
176
176
  position:relative;
177
177
  max-width:100%;
@@ -179,23 +179,23 @@
179
179
  margin:auto;
180
180
  }
181
181
  @media (min-width: 1020px){
182
- body.magritte-old-layout .magritte-media-image___G-FkF_1-4-0{
182
+ body.magritte-old-layout .magritte-media-image___G-FkF_1-5-1{
183
183
  max-height:452px;
184
184
  }
185
185
  }
186
186
  @media (min-width: 1024px){
187
- body:not(.magritte-old-layout) .magritte-media-image___G-FkF_1-4-0{
187
+ body:not(.magritte-old-layout) .magritte-media-image___G-FkF_1-5-1{
188
188
  max-height:452px;
189
189
  }
190
190
  }
191
- .magritte-media-content___n3XbD_1-4-0{
191
+ .magritte-media-content___n3XbD_1-5-1{
192
192
  display:flex;
193
193
  position:absolute;
194
194
  inset:0;
195
195
  align-items:center;
196
196
  justify-content:center;
197
197
  }
198
- .magritte-media-format___AdfCK_1-4-0{
198
+ .magritte-media-format___AdfCK_1-5-1{
199
199
  display:flex;
200
200
  position:absolute;
201
201
  top:4px;
@@ -205,7 +205,7 @@
205
205
  border-radius:12px;
206
206
  backdrop-filter:blur(24px);
207
207
  }
208
- .magritte-media-meta___oSxxr_1-4-0{
208
+ .magritte-media-meta___oSxxr_1-5-1{
209
209
  --magritte-ui-text-color-override:var(--magritte-color-text-constant-v25-0-1);
210
210
  display:flex;
211
211
  position:absolute;
@@ -217,16 +217,52 @@
217
217
  border-radius:12px;
218
218
  backdrop-filter:blur(24px);
219
219
  }
220
- .magritte-media-meta___oSxxr_1-4-0:empty{
220
+ .magritte-media-meta___oSxxr_1-5-1:empty{
221
221
  display:none;
222
222
  }
223
- .magritte-media-meta___oSxxr_1-4-0 > span{
223
+ .magritte-media-meta___oSxxr_1-5-1 > span{
224
224
  margin-left:0;
225
225
  }
226
- .magritte-media___9jH2k_1-4-0:not(:last-child){
226
+ .magritte-media___9jH2k_1-5-1:not(:last-child){
227
227
  margin-bottom:12px;
228
228
  }
229
- .magritte-snippet___8k9xb_1-4-0{
229
+ .magritte-reply___-QCK7_1-5-1{
230
+ display:flex;
231
+ position:relative;
232
+ align-items:center;
233
+ padding:8px;
234
+ gap:8px;
235
+ padding-left:12px;
236
+ background-color:var(--magritte-chat-bubble-snippet-background);
237
+ border-radius:8px;
238
+ margin-bottom:4px;
239
+ overflow:hidden;
240
+ }
241
+ .magritte-reply___-QCK7_1-5-1::before{
242
+ content:'';
243
+ position:absolute;
244
+ top:0;
245
+ bottom:0;
246
+ left:0;
247
+ width:4px;
248
+ background-color:var(--magritte-chat-bubble-snippet-line);
249
+ }
250
+ .magritte-reply-preview___qvlNT_1-5-1{
251
+ display:block;
252
+ flex-shrink:0;
253
+ width:40px;
254
+ height:40px;
255
+ border-radius:8px;
256
+ outline:1px solid var(--magritte-color-component-chat-bubble-border-image-v25-0-1);
257
+ outline-offset:-1px;
258
+ object-fit:cover;
259
+ }
260
+ .magritte-reply-body___f2xx7_1-5-1{
261
+ display:flex;
262
+ flex-direction:column;
263
+ min-width:0;
264
+ }
265
+ .magritte-snippet___8k9xb_1-5-1{
230
266
  display:flex;
231
267
  position:relative;
232
268
  flex-direction:column;
@@ -237,10 +273,10 @@
237
273
  border-radius:8px;
238
274
  overflow:hidden;
239
275
  }
240
- .magritte-snippet___8k9xb_1-4-0:not(:last-child){
276
+ .magritte-snippet___8k9xb_1-5-1:not(:last-child){
241
277
  margin-bottom:4px;
242
278
  }
243
- .magritte-snippet___8k9xb_1-4-0::before{
279
+ .magritte-snippet___8k9xb_1-5-1::before{
244
280
  content:'';
245
281
  position:absolute;
246
282
  top:0;
@@ -249,7 +285,7 @@
249
285
  width:4px;
250
286
  background-color:var(--magritte-chat-bubble-snippet-line);
251
287
  }
252
- .magritte-snippet___8k9xb_1-4-0 img{
288
+ .magritte-snippet___8k9xb_1-5-1 img{
253
289
  display:block;
254
290
  max-width:100%;
255
291
  border-radius:4px;
@@ -257,32 +293,32 @@
257
293
  outline-offset:-1px;
258
294
  margin-top:6px;
259
295
  }
260
- .magritte-snippet___8k9xb_1-4-0:not(:first-child){
296
+ .magritte-snippet___8k9xb_1-5-1:not(:first-child){
261
297
  margin-top:8px;
262
298
  }
263
- .magritte-status___dHzCt_1-4-0{
299
+ .magritte-status___dHzCt_1-5-1{
264
300
  display:inline-flex;
265
301
  vertical-align:middle;
266
302
  }
267
- .magritte-status___dHzCt_1-4-0:not(:first-child){
303
+ .magritte-status___dHzCt_1-5-1:not(:first-child){
268
304
  margin-left:4px;
269
305
  }
270
- .magritte-content-with-header___wiNKB_1-4-0 > .magritte-file___k2IKy_1-4-0:first-child,
271
- .magritte-content-with-header___wiNKB_1-4-0 > .magritte-media___9jH2k_1-4-0:first-child{
306
+ .magritte-content-with-header___wiNKB_1-5-1 > .magritte-file___k2IKy_1-5-1:first-child,
307
+ .magritte-content-with-header___wiNKB_1-5-1 > .magritte-media___9jH2k_1-5-1:first-child{
272
308
  margin-top:8px;
273
309
  }
274
310
 
275
- .magritte-tail___-1lJ0_1-4-0{
311
+ .magritte-tail___-1lJ0_1-5-1{
276
312
  position:absolute;
277
313
  bottom:-1px;
278
314
  left:-7px;
279
315
  }
280
- .magritte-tail_outgoing___cnyh3_1-4-0{
316
+ .magritte-tail_outgoing___cnyh3_1-5-1{
281
317
  left:auto;
282
318
  right:-7px;
283
319
  transform:scaleX(-1);
284
320
  }
285
- .magritte-meta___HT7lp_1-4-0{
321
+ .magritte-meta___HT7lp_1-5-1{
286
322
  float:right;
287
323
  margin-left:12px;
288
324
  white-space:nowrap;
package/index.d.ts CHANGED
@@ -5,5 +5,6 @@ export type { ChatBubbleFileProps, ChatBubbleFileState } from '@hh.ru/magritte-u
5
5
  export type { ChatBubbleLabelProps } from '@hh.ru/magritte-ui-chat-bubble/Label';
6
6
  export type { ChatBubbleMediaProps } from '@hh.ru/magritte-ui-chat-bubble/Media';
7
7
  export type { ChatBubbleMessageProps } from '@hh.ru/magritte-ui-chat-bubble/Message';
8
+ export type { ChatBubbleReplyProps } from '@hh.ru/magritte-ui-chat-bubble/Reply';
8
9
  export type { ChatBubbleSnippetProps } from '@hh.ru/magritte-ui-chat-bubble/Snippet';
9
10
  export type { ChatBubbleStatusProps, ChatBubbleStatusValue } from '@hh.ru/magritte-ui-chat-bubble/Status';
package/index.js CHANGED
@@ -15,18 +15,19 @@ import './internal/utils.js';
15
15
  import '@hh.ru/magritte-ui-icon/icon';
16
16
  import '@hh.ru/magritte-ui-link';
17
17
  import '@hh.ru/magritte-ui-loader';
18
- import './chat-bubble-C4Yvxp5H.js';
18
+ import './chat-bubble-fnws1moq.js';
19
19
  import './Label.js';
20
20
  import '@hh.ru/magritte-ui-typography';
21
21
  import './Media.js';
22
22
  import './Message.js';
23
+ import './Reply.js';
23
24
  import './Snippet.js';
24
25
  import './Status.js';
25
26
  import '@hh.ru/magritte-common-use-multiple-refs';
26
27
  import '@hh.ru/magritte-common-use-translation';
27
28
  import '@hh.ru/magritte-ui-tooltip';
28
29
  import './internal/Meta.js';
29
- import './chat-bubble-BEqoLjma.js';
30
+ import './chat-bubble-BSNa94vA.js';
30
31
  import './internal/Tail.js';
31
32
  import '@hh.ru/magritte-ui-icon';
32
33
  //# sourceMappingURL=index.js.map
package/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
package/index.mock.d.ts CHANGED
@@ -4,6 +4,7 @@ export type { ChatBubbleFileProps, ChatBubbleFileState } from '@hh.ru/magritte-u
4
4
  export type { ChatBubbleLabelProps } from '@hh.ru/magritte-ui-chat-bubble/Label';
5
5
  export type { ChatBubbleMediaProps } from '@hh.ru/magritte-ui-chat-bubble/Media';
6
6
  export type { ChatBubbleMessageProps } from '@hh.ru/magritte-ui-chat-bubble/Message';
7
+ export type { ChatBubbleReplyProps } from '@hh.ru/magritte-ui-chat-bubble/Reply';
7
8
  export type { ChatBubbleSnippetProps } from '@hh.ru/magritte-ui-chat-bubble/Snippet';
8
9
  export type { ChatBubbleStatusProps, ChatBubbleStatusValue } from '@hh.ru/magritte-ui-chat-bubble/Status';
9
10
  export declare const ChatBubble: import("react").ForwardRefExoticComponent<Record<string, unknown>> & {
@@ -12,6 +13,7 @@ export declare const ChatBubble: import("react").ForwardRefExoticComponent<Recor
12
13
  Label: import("react").ForwardRefExoticComponent<Record<string, unknown>>;
13
14
  Media: import("react").ForwardRefExoticComponent<Record<string, unknown>>;
14
15
  Message: import("react").ForwardRefExoticComponent<Record<string, unknown>>;
16
+ Reply: import("react").ForwardRefExoticComponent<Record<string, unknown>>;
15
17
  Snippet: import("react").ForwardRefExoticComponent<Record<string, unknown>>;
16
18
  Status: import("react").ForwardRefExoticComponent<Record<string, unknown>>;
17
19
  };
package/index.mock.js CHANGED
@@ -6,6 +6,7 @@ const File = mockComponent('ChatBubble.File');
6
6
  const Label = mockComponent('ChatBubble.Label', undefined, { withChildren: true });
7
7
  const Media = mockComponent('ChatBubble.Media', undefined, { withChildren: true });
8
8
  const Message = mockComponent('ChatBubble.Message', undefined, { withChildren: true });
9
+ const Reply = mockComponent('ChatBubble.Reply', undefined, { withChildren: true });
9
10
  const Snippet = mockComponent('ChatBubble.Snippet', undefined, { withChildren: true });
10
11
  const Status = mockComponent('ChatBubble.Status', undefined, { withChildren: true });
11
12
  const ChatBubble = Object.assign(mockComponent('ChatBubble', undefined, { withChildren: true }), {
@@ -14,6 +15,7 @@ const ChatBubble = Object.assign(mockComponent('ChatBubble', undefined, { withCh
14
15
  Label,
15
16
  Media,
16
17
  Message,
18
+ Reply,
17
19
  Snippet,
18
20
  Status,
19
21
  });
package/index.mock.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.mock.js","sources":["src/index.mock.ts"],"sourcesContent":["import { mockComponent } from '@hh.ru/magritte-ui-mock-component';\n\nexport type { ChatBubbleMode, ChatBubbleProps } from '@hh.ru/magritte-ui-chat-bubble/types';\nexport type { ChatBubbleErrorActionProps } from '@hh.ru/magritte-ui-chat-bubble/ErrorAction';\nexport type { ChatBubbleFileProps, ChatBubbleFileState } from '@hh.ru/magritte-ui-chat-bubble/File';\nexport type { ChatBubbleLabelProps } from '@hh.ru/magritte-ui-chat-bubble/Label';\nexport type { ChatBubbleMediaProps } from '@hh.ru/magritte-ui-chat-bubble/Media';\nexport type { ChatBubbleMessageProps } from '@hh.ru/magritte-ui-chat-bubble/Message';\nexport type { ChatBubbleSnippetProps } from '@hh.ru/magritte-ui-chat-bubble/Snippet';\nexport type { ChatBubbleStatusProps, ChatBubbleStatusValue } from '@hh.ru/magritte-ui-chat-bubble/Status';\n\nconst ErrorAction = mockComponent('ChatBubble.ErrorAction', undefined, { withChildren: true });\nconst File = mockComponent('ChatBubble.File');\nconst Label = mockComponent('ChatBubble.Label', undefined, { withChildren: true });\nconst Media = mockComponent('ChatBubble.Media', undefined, { withChildren: true });\nconst Message = mockComponent('ChatBubble.Message', undefined, { withChildren: true });\nconst Snippet = mockComponent('ChatBubble.Snippet', undefined, { withChildren: true });\nconst Status = mockComponent('ChatBubble.Status', undefined, { withChildren: true });\n\nexport const ChatBubble = Object.assign(mockComponent('ChatBubble', undefined, { withChildren: true }), {\n ErrorAction,\n File,\n Label,\n Media,\n Message,\n Snippet,\n Status,\n});\n"],"names":[],"mappings":";;AAWA,MAAM,WAAW,GAAG,aAAa,CAAC,wBAAwB,EAAE,SAAS,EAAE,EAAE,YAAY,EAAE,IAAI,EAAE,CAAC,CAAC;AAC/F,MAAM,IAAI,GAAG,aAAa,CAAC,iBAAiB,CAAC,CAAC;AAC9C,MAAM,KAAK,GAAG,aAAa,CAAC,kBAAkB,EAAE,SAAS,EAAE,EAAE,YAAY,EAAE,IAAI,EAAE,CAAC,CAAC;AACnF,MAAM,KAAK,GAAG,aAAa,CAAC,kBAAkB,EAAE,SAAS,EAAE,EAAE,YAAY,EAAE,IAAI,EAAE,CAAC,CAAC;AACnF,MAAM,OAAO,GAAG,aAAa,CAAC,oBAAoB,EAAE,SAAS,EAAE,EAAE,YAAY,EAAE,IAAI,EAAE,CAAC,CAAC;AACvF,MAAM,OAAO,GAAG,aAAa,CAAC,oBAAoB,EAAE,SAAS,EAAE,EAAE,YAAY,EAAE,IAAI,EAAE,CAAC,CAAC;AACvF,MAAM,MAAM,GAAG,aAAa,CAAC,mBAAmB,EAAE,SAAS,EAAE,EAAE,YAAY,EAAE,IAAI,EAAE,CAAC,CAAC;MAExE,UAAU,GAAG,MAAM,CAAC,MAAM,CAAC,aAAa,CAAC,YAAY,EAAE,SAAS,EAAE,EAAE,YAAY,EAAE,IAAI,EAAE,CAAC,EAAE;IACpG,WAAW;IACX,IAAI;IACJ,KAAK;IACL,KAAK;IACL,OAAO;IACP,OAAO;IACP,MAAM;AACT,CAAA;;;;"}
1
+ {"version":3,"file":"index.mock.js","sources":["src/index.mock.ts"],"sourcesContent":["import { mockComponent } from '@hh.ru/magritte-ui-mock-component';\n\nexport type { ChatBubbleMode, ChatBubbleProps } from '@hh.ru/magritte-ui-chat-bubble/types';\nexport type { ChatBubbleErrorActionProps } from '@hh.ru/magritte-ui-chat-bubble/ErrorAction';\nexport type { ChatBubbleFileProps, ChatBubbleFileState } from '@hh.ru/magritte-ui-chat-bubble/File';\nexport type { ChatBubbleLabelProps } from '@hh.ru/magritte-ui-chat-bubble/Label';\nexport type { ChatBubbleMediaProps } from '@hh.ru/magritte-ui-chat-bubble/Media';\nexport type { ChatBubbleMessageProps } from '@hh.ru/magritte-ui-chat-bubble/Message';\nexport type { ChatBubbleReplyProps } from '@hh.ru/magritte-ui-chat-bubble/Reply';\nexport type { ChatBubbleSnippetProps } from '@hh.ru/magritte-ui-chat-bubble/Snippet';\nexport type { ChatBubbleStatusProps, ChatBubbleStatusValue } from '@hh.ru/magritte-ui-chat-bubble/Status';\n\nconst ErrorAction = mockComponent('ChatBubble.ErrorAction', undefined, { withChildren: true });\nconst File = mockComponent('ChatBubble.File');\nconst Label = mockComponent('ChatBubble.Label', undefined, { withChildren: true });\nconst Media = mockComponent('ChatBubble.Media', undefined, { withChildren: true });\nconst Message = mockComponent('ChatBubble.Message', undefined, { withChildren: true });\nconst Reply = mockComponent('ChatBubble.Reply', undefined, { withChildren: true });\nconst Snippet = mockComponent('ChatBubble.Snippet', undefined, { withChildren: true });\nconst Status = mockComponent('ChatBubble.Status', undefined, { withChildren: true });\n\nexport const ChatBubble = Object.assign(mockComponent('ChatBubble', undefined, { withChildren: true }), {\n ErrorAction,\n File,\n Label,\n Media,\n Message,\n Reply,\n Snippet,\n Status,\n});\n"],"names":[],"mappings":";;AAYA,MAAM,WAAW,GAAG,aAAa,CAAC,wBAAwB,EAAE,SAAS,EAAE,EAAE,YAAY,EAAE,IAAI,EAAE,CAAC,CAAC;AAC/F,MAAM,IAAI,GAAG,aAAa,CAAC,iBAAiB,CAAC,CAAC;AAC9C,MAAM,KAAK,GAAG,aAAa,CAAC,kBAAkB,EAAE,SAAS,EAAE,EAAE,YAAY,EAAE,IAAI,EAAE,CAAC,CAAC;AACnF,MAAM,KAAK,GAAG,aAAa,CAAC,kBAAkB,EAAE,SAAS,EAAE,EAAE,YAAY,EAAE,IAAI,EAAE,CAAC,CAAC;AACnF,MAAM,OAAO,GAAG,aAAa,CAAC,oBAAoB,EAAE,SAAS,EAAE,EAAE,YAAY,EAAE,IAAI,EAAE,CAAC,CAAC;AACvF,MAAM,KAAK,GAAG,aAAa,CAAC,kBAAkB,EAAE,SAAS,EAAE,EAAE,YAAY,EAAE,IAAI,EAAE,CAAC,CAAC;AACnF,MAAM,OAAO,GAAG,aAAa,CAAC,oBAAoB,EAAE,SAAS,EAAE,EAAE,YAAY,EAAE,IAAI,EAAE,CAAC,CAAC;AACvF,MAAM,MAAM,GAAG,aAAa,CAAC,mBAAmB,EAAE,SAAS,EAAE,EAAE,YAAY,EAAE,IAAI,EAAE,CAAC,CAAC;MAExE,UAAU,GAAG,MAAM,CAAC,MAAM,CAAC,aAAa,CAAC,YAAY,EAAE,SAAS,EAAE,EAAE,YAAY,EAAE,IAAI,EAAE,CAAC,EAAE;IACpG,WAAW;IACX,IAAI;IACJ,KAAK;IACL,KAAK;IACL,OAAO;IACP,KAAK;IACL,OAAO;IACP,MAAM;AACT,CAAA;;;;"}
package/internal/Meta.js CHANGED
@@ -2,7 +2,7 @@ import './../index.css';
2
2
  import { jsxs, jsx } from 'react/jsx-runtime';
3
3
  import { getColors } from './colors.js';
4
4
  import { Text } from '@hh.ru/magritte-ui-typography';
5
- import { s as styles } from '../chat-bubble-BEqoLjma.js';
5
+ import { s as styles } from '../chat-bubble-BSNa94vA.js';
6
6
 
7
7
  /**
8
8
  * Время и статус сообщения
package/internal/Tail.js CHANGED
@@ -2,7 +2,7 @@ import './../index.css';
2
2
  import { jsxs, jsx } from 'react/jsx-runtime';
3
3
  import classnames from 'classnames';
4
4
  import { useChatBubbleMode } from './mode.js';
5
- import { s as styles } from '../chat-bubble-BEqoLjma.js';
5
+ import { s as styles } from '../chat-bubble-BSNa94vA.js';
6
6
  import 'react';
7
7
 
8
8
  const OUTLINE = 'M6.5 0C6.5 7.5 5.2 11.8 1.6 13.4C0.9 13.9 0.6 14.5 1.1 14.5H7';
@@ -9,8 +9,10 @@ export interface ChatBubbleColors {
9
9
  text: TextStyle;
10
10
  /** Второстепенный текст: время, размер файла */
11
11
  secondaryText: TextStyle;
12
- /** Акцентный текст: имя отправителя, автор цитаты */
12
+ /** Акцентный текст: имя отправителя */
13
13
  accentText: TextStyle;
14
+ /** Автор цитируемого сообщения (у бота акцентный, потому отдельно от accentText) */
15
+ replyTitle: TextStyle;
14
16
  /** Иконка статуса, лежит на фоне баббла */
15
17
  statusIcon: IconColor;
16
18
  /** Иконки действий, лежат под бабблом на фоне страницы */
@@ -4,6 +4,7 @@ const COLORS = {
4
4
  text: 'primary',
5
5
  secondaryText: 'secondary',
6
6
  accentText: 'accent',
7
+ replyTitle: 'accent',
7
8
  statusIcon: 'constant',
8
9
  actionsIcon: 'secondary',
9
10
  button: 'neutral',
@@ -16,6 +17,7 @@ const COLORS = {
16
17
  text: 'constant',
17
18
  secondaryText: 'constant',
18
19
  accentText: 'constant',
20
+ replyTitle: 'constant',
19
21
  statusIcon: 'constant',
20
22
  actionsIcon: 'accent',
21
23
  button: 'accent',
@@ -28,6 +30,7 @@ const COLORS = {
28
30
  text: 'primary',
29
31
  secondaryText: 'secondary',
30
32
  accentText: 'special',
33
+ replyTitle: 'accent',
31
34
  statusIcon: 'special',
32
35
  actionsIcon: 'special',
33
36
  button: 'special',
@@ -1 +1 @@
1
- {"version":3,"file":"colors.js","sources":["src/internal/colors.ts"],"sourcesContent":["import type { TokenColorBackground } from '@hh.ru/magritte-design-tokens/types';\nimport type { ButtonStyle } from '@hh.ru/magritte-ui-button';\nimport type { ChatBubbleMode } from '@hh.ru/magritte-ui-chat-bubble/types';\nimport type { IconColor } from '@hh.ru/magritte-ui-icon';\nimport type { LinkProps } from '@hh.ru/magritte-ui-link';\nimport type { TextStyle } from '@hh.ru/magritte-ui-typography';\n\nexport interface ChatBubbleColors {\n /** Основной текст сообщения, названия файла, текст сниппета */\n text: TextStyle;\n /** Второстепенный текст: время, размер файла */\n secondaryText: TextStyle;\n /** Акцентный текст: имя отправителя, автор цитаты */\n accentText: TextStyle;\n /** Иконка статуса, лежит на фоне баббла */\n statusIcon: IconColor;\n /** Иконки действий, лежат под бабблом на фоне страницы */\n actionsIcon: IconColor;\n /** Кнопки под бабблом */\n button: ButtonStyle;\n /** Ссылка-действие: «Открыть», «Загрузить» */\n link: Pick<LinkProps, 'style' | 'mode'>;\n /** Иконка рядом со второстепенным текстом: лоадер загрузки файла */\n secondaryIcon: IconColor;\n /** Иконка файла */\n fileIcon: IconColor;\n /** Подложка под иконкой файла */\n fileIconBackground: TokenColorBackground;\n}\n\nconst COLORS: Record<ChatBubbleMode, ChatBubbleColors> = {\n incoming: {\n text: 'primary',\n secondaryText: 'secondary',\n accentText: 'accent',\n statusIcon: 'constant',\n actionsIcon: 'secondary',\n button: 'neutral',\n link: { style: 'accent' },\n secondaryIcon: 'secondary',\n fileIcon: 'constant',\n fileIconBackground: 'accent',\n },\n outgoing: {\n text: 'constant',\n secondaryText: 'constant',\n accentText: 'constant',\n statusIcon: 'constant',\n actionsIcon: 'accent',\n button: 'accent',\n link: { style: 'constant', mode: 'secondary' },\n secondaryIcon: 'constant',\n fileIcon: 'accent',\n fileIconBackground: 'accent-secondary',\n },\n bot: {\n text: 'primary',\n secondaryText: 'secondary',\n accentText: 'special',\n statusIcon: 'special',\n actionsIcon: 'special',\n button: 'special',\n link: { style: 'accent' },\n secondaryIcon: 'secondary',\n fileIcon: 'constant',\n fileIconBackground: 'special',\n },\n};\n\nexport const getColors = (mode: ChatBubbleMode): ChatBubbleColors => COLORS[mode];\n"],"names":[],"mappings":"AA8BA,MAAM,MAAM,GAA6C;AACrD,IAAA,QAAQ,EAAE;AACN,QAAA,IAAI,EAAE,SAAS;AACf,QAAA,aAAa,EAAE,WAAW;AAC1B,QAAA,UAAU,EAAE,QAAQ;AACpB,QAAA,UAAU,EAAE,UAAU;AACtB,QAAA,WAAW,EAAE,WAAW;AACxB,QAAA,MAAM,EAAE,SAAS;AACjB,QAAA,IAAI,EAAE,EAAE,KAAK,EAAE,QAAQ,EAAE;AACzB,QAAA,aAAa,EAAE,WAAW;AAC1B,QAAA,QAAQ,EAAE,UAAU;AACpB,QAAA,kBAAkB,EAAE,QAAQ;AAC/B,KAAA;AACD,IAAA,QAAQ,EAAE;AACN,QAAA,IAAI,EAAE,UAAU;AAChB,QAAA,aAAa,EAAE,UAAU;AACzB,QAAA,UAAU,EAAE,UAAU;AACtB,QAAA,UAAU,EAAE,UAAU;AACtB,QAAA,WAAW,EAAE,QAAQ;AACrB,QAAA,MAAM,EAAE,QAAQ;QAChB,IAAI,EAAE,EAAE,KAAK,EAAE,UAAU,EAAE,IAAI,EAAE,WAAW,EAAE;AAC9C,QAAA,aAAa,EAAE,UAAU;AACzB,QAAA,QAAQ,EAAE,QAAQ;AAClB,QAAA,kBAAkB,EAAE,kBAAkB;AACzC,KAAA;AACD,IAAA,GAAG,EAAE;AACD,QAAA,IAAI,EAAE,SAAS;AACf,QAAA,aAAa,EAAE,WAAW;AAC1B,QAAA,UAAU,EAAE,SAAS;AACrB,QAAA,UAAU,EAAE,SAAS;AACrB,QAAA,WAAW,EAAE,SAAS;AACtB,QAAA,MAAM,EAAE,SAAS;AACjB,QAAA,IAAI,EAAE,EAAE,KAAK,EAAE,QAAQ,EAAE;AACzB,QAAA,aAAa,EAAE,WAAW;AAC1B,QAAA,QAAQ,EAAE,UAAU;AACpB,QAAA,kBAAkB,EAAE,SAAS;AAChC,KAAA;CACJ,CAAC;AAEK,MAAM,SAAS,GAAG,CAAC,IAAoB,KAAuB,MAAM,CAAC,IAAI;;;;"}
1
+ {"version":3,"file":"colors.js","sources":["src/internal/colors.ts"],"sourcesContent":["import type { TokenColorBackground } from '@hh.ru/magritte-design-tokens/types';\nimport type { ButtonStyle } from '@hh.ru/magritte-ui-button';\nimport type { ChatBubbleMode } from '@hh.ru/magritte-ui-chat-bubble/types';\nimport type { IconColor } from '@hh.ru/magritte-ui-icon';\nimport type { LinkProps } from '@hh.ru/magritte-ui-link';\nimport type { TextStyle } from '@hh.ru/magritte-ui-typography';\n\nexport interface ChatBubbleColors {\n /** Основной текст сообщения, названия файла, текст сниппета */\n text: TextStyle;\n /** Второстепенный текст: время, размер файла */\n secondaryText: TextStyle;\n /** Акцентный текст: имя отправителя */\n accentText: TextStyle;\n /** Автор цитируемого сообщения (у бота акцентный, потому отдельно от accentText) */\n replyTitle: TextStyle;\n /** Иконка статуса, лежит на фоне баббла */\n statusIcon: IconColor;\n /** Иконки действий, лежат под бабблом на фоне страницы */\n actionsIcon: IconColor;\n /** Кнопки под бабблом */\n button: ButtonStyle;\n /** Ссылка-действие: «Открыть», «Загрузить» */\n link: Pick<LinkProps, 'style' | 'mode'>;\n /** Иконка рядом со второстепенным текстом: лоадер загрузки файла */\n secondaryIcon: IconColor;\n /** Иконка файла */\n fileIcon: IconColor;\n /** Подложка под иконкой файла */\n fileIconBackground: TokenColorBackground;\n}\n\nconst COLORS: Record<ChatBubbleMode, ChatBubbleColors> = {\n incoming: {\n text: 'primary',\n secondaryText: 'secondary',\n accentText: 'accent',\n replyTitle: 'accent',\n statusIcon: 'constant',\n actionsIcon: 'secondary',\n button: 'neutral',\n link: { style: 'accent' },\n secondaryIcon: 'secondary',\n fileIcon: 'constant',\n fileIconBackground: 'accent',\n },\n outgoing: {\n text: 'constant',\n secondaryText: 'constant',\n accentText: 'constant',\n replyTitle: 'constant',\n statusIcon: 'constant',\n actionsIcon: 'accent',\n button: 'accent',\n link: { style: 'constant', mode: 'secondary' },\n secondaryIcon: 'constant',\n fileIcon: 'accent',\n fileIconBackground: 'accent-secondary',\n },\n bot: {\n text: 'primary',\n secondaryText: 'secondary',\n accentText: 'special',\n replyTitle: 'accent',\n statusIcon: 'special',\n actionsIcon: 'special',\n button: 'special',\n link: { style: 'accent' },\n secondaryIcon: 'secondary',\n fileIcon: 'constant',\n fileIconBackground: 'special',\n },\n};\n\nexport const getColors = (mode: ChatBubbleMode): ChatBubbleColors => COLORS[mode];\n"],"names":[],"mappings":"AAgCA,MAAM,MAAM,GAA6C;AACrD,IAAA,QAAQ,EAAE;AACN,QAAA,IAAI,EAAE,SAAS;AACf,QAAA,aAAa,EAAE,WAAW;AAC1B,QAAA,UAAU,EAAE,QAAQ;AACpB,QAAA,U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te-ui-chat-bubble",
3
- "version": "1.4.0",
3
+ "version": "1.5.1",
4
4
  "main": "index.js",
5
5
  "types": "index.d.ts",
6
6
  "sideEffects": [
@@ -23,14 +23,14 @@
23
23
  "@hh.ru/magritte-common-use-translation": "3.3.0",
24
24
  "@hh.ru/magritte-design-tokens": "25.0.1",
25
25
  "@hh.ru/magritte-ui-breakpoint": "6.1.1",
26
- "@hh.ru/magritte-ui-button": "7.3.0",
27
- "@hh.ru/magritte-ui-cell": "7.2.38",
28
- "@hh.ru/magritte-ui-icon": "15.0.3",
29
- "@hh.ru/magritte-ui-link": "7.2.0",
30
- "@hh.ru/magritte-ui-loader": "4.1.0",
31
- "@hh.ru/magritte-ui-menu": "1.0.35",
26
+ "@hh.ru/magritte-ui-button": "7.3.1",
27
+ "@hh.ru/magritte-ui-cell": "7.2.39",
28
+ "@hh.ru/magritte-ui-icon": "15.1.0",
29
+ "@hh.ru/magritte-ui-link": "7.2.1",
30
+ "@hh.ru/magritte-ui-loader": "4.1.1",
31
+ "@hh.ru/magritte-ui-menu": "1.0.36",
32
32
  "@hh.ru/magritte-ui-mock-component": "1.1.7",
33
- "@hh.ru/magritte-ui-tooltip": "11.0.44",
33
+ "@hh.ru/magritte-ui-tooltip": "11.0.45",
34
34
  "@hh.ru/magritte-ui-typography": "5.3.12"
35
35
  },
36
36
  "peerDependencies": {
@@ -40,5 +40,5 @@
40
40
  "publishConfig": {
41
41
  "access": "public"
42
42
  },
43
- "gitHead": "62e71a0b8833517456a5b94635e409e152ef4734"
43
+ "gitHead": "c90767ef9b007595559f19dd6a892fd0066ddc79"
44
44
  }
@@ -1,5 +0,0 @@
1
- import './index.css';
2
- var styles = {"tail":"magritte-tail___-1lJ0_1-4-0","tail_outgoing":"magritte-tail_outgoing___cnyh3_1-4-0","tailOutgoing":"magritte-tail_outgoing___cnyh3_1-4-0","meta":"magritte-meta___HT7lp_1-4-0"};
3
-
4
- export { styles as s };
5
- //# sourceMappingURL=chat-bubble-BEqoLjma.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"chat-bubble-BEqoLjma.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;"}
@@ -1,5 +0,0 @@
1
- import './index.css';
2
- var styles = {"chat-bubble":"magritte-chat-bubble___ds9CP_1-4-0","chatBubble":"magritte-chat-bubble___ds9CP_1-4-0","outgoing":"magritte-outgoing___3n00o_1-4-0","bot":"magritte-bot___Z6vZA_1-4-0","row":"magritte-row___mQNnt_1-4-0","bubble":"magritte-bubble___NVuDI_1-4-0","with-tail":"magritte-with-tail___IdixJ_1-4-0","withTail":"magritte-with-tail___IdixJ_1-4-0","header":"magritte-header___Px2to_1-4-0","message-title":"magritte-message-title___dgBFk_1-4-0","messageTitle":"magritte-message-title___dgBFk_1-4-0","message":"magritte-message___7TEpw_1-4-0","buttons":"magritte-buttons___yQqBi_1-4-0","actions":"magritte-actions___I5GSz_1-4-0","error-text":"magritte-error-text___1ZxWY_1-4-0","errorText":"magritte-error-text___1ZxWY_1-4-0","file":"magritte-file___k2IKy_1-4-0","file-preview":"magritte-file-preview___eJKu8_1-4-0","filePreview":"magritte-file-preview___eJKu8_1-4-0","media":"magritte-media___9jH2k_1-4-0","media-blur":"magritte-media-blur___TbiMa_1-4-0","mediaBlur":"magritte-media-blur___TbiMa_1-4-0","media-image":"magritte-media-image___G-FkF_1-4-0","mediaImage":"magritte-media-image___G-FkF_1-4-0","media-content":"magritte-media-content___n3XbD_1-4-0","mediaContent":"magritte-media-content___n3XbD_1-4-0","media-format":"magritte-media-format___AdfCK_1-4-0","mediaFormat":"magritte-media-format___AdfCK_1-4-0","media-meta":"magritte-media-meta___oSxxr_1-4-0","mediaMeta":"magritte-media-meta___oSxxr_1-4-0","snippet":"magritte-snippet___8k9xb_1-4-0","status":"magritte-status___dHzCt_1-4-0","content-with-header":"magritte-content-with-header___wiNKB_1-4-0","contentWithHeader":"magritte-content-with-header___wiNKB_1-4-0"};
3
-
4
- export { styles as s };
5
- //# sourceMappingURL=chat-bubble-C4Yvxp5H.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"chat-bubble-C4Yvxp5H.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;"}