@hh.ru/magritte-ui-chat-bubble 1.2.0 → 1.3.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/ChatBubble.d.ts +2 -0
- package/ChatBubble.js +4 -2
- package/ChatBubble.js.map +1 -1
- package/File.js +1 -1
- package/Media.d.ts +18 -0
- package/Media.js +18 -0
- package/Media.js.map +1 -0
- package/Message.js +1 -1
- package/Status.js +1 -1
- package/chat-bubble-C7KYJOC7.js +5 -0
- package/chat-bubble-C7KYJOC7.js.map +1 -0
- package/chat-bubble-DvyT8aq-.js +5 -0
- package/chat-bubble-DvyT8aq-.js.map +1 -0
- package/index.css +121 -26
- package/index.d.ts +1 -0
- package/index.js +3 -2
- package/index.js.map +1 -1
- package/index.mock.d.ts +2 -0
- package/index.mock.js +2 -0
- package/index.mock.js.map +1 -1
- package/internal/Meta.js +1 -1
- package/internal/Tail.js +1 -1
- package/package.json +3 -3
- package/chat-bubble-BjmT1S_i.js +0 -5
- package/chat-bubble-BjmT1S_i.js.map +0 -1
- package/chat-bubble-CaB7cEff.js +0 -5
- package/chat-bubble-CaB7cEff.js.map +0 -1
package/ChatBubble.d.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { ChatBubbleErrorAction } from '@hh.ru/magritte-ui-chat-bubble/ErrorAction';
|
|
2
2
|
import { ChatBubbleFile } from '@hh.ru/magritte-ui-chat-bubble/File';
|
|
3
3
|
import { ChatBubbleLabel } from '@hh.ru/magritte-ui-chat-bubble/Label';
|
|
4
|
+
import { ChatBubbleMedia } from '@hh.ru/magritte-ui-chat-bubble/Media';
|
|
4
5
|
import { ChatBubbleMessage } from '@hh.ru/magritte-ui-chat-bubble/Message';
|
|
5
6
|
import { ChatBubbleStatus } from '@hh.ru/magritte-ui-chat-bubble/Status';
|
|
6
7
|
import type { ChatBubbleProps } from '@hh.ru/magritte-ui-chat-bubble/types';
|
|
@@ -8,6 +9,7 @@ interface ChatBubbleComponents {
|
|
|
8
9
|
ErrorAction: typeof ChatBubbleErrorAction;
|
|
9
10
|
File: typeof ChatBubbleFile;
|
|
10
11
|
Label: typeof ChatBubbleLabel;
|
|
12
|
+
Media: typeof ChatBubbleMedia;
|
|
11
13
|
Message: typeof ChatBubbleMessage;
|
|
12
14
|
Status: typeof ChatBubbleStatus;
|
|
13
15
|
}
|
package/ChatBubble.js
CHANGED
|
@@ -6,6 +6,7 @@ import { ButtonDefaultPropsContext } from '@hh.ru/magritte-ui-button';
|
|
|
6
6
|
import { ChatBubbleErrorAction } from './ErrorAction.js';
|
|
7
7
|
import { ChatBubbleFile } from './File.js';
|
|
8
8
|
import { ChatBubbleLabel } from './Label.js';
|
|
9
|
+
import { ChatBubbleMedia } from './Media.js';
|
|
9
10
|
import { ChatBubbleMessage } from './Message.js';
|
|
10
11
|
import { ChatBubbleStatus } from './Status.js';
|
|
11
12
|
import { Meta } from './internal/Meta.js';
|
|
@@ -18,14 +19,14 @@ import { IconDefaultPropsContext } from '@hh.ru/magritte-ui-icon';
|
|
|
18
19
|
import { ExclamationCircleFilledSize24 } from '@hh.ru/magritte-ui-icon/icon';
|
|
19
20
|
import { Menu } from '@hh.ru/magritte-ui-menu';
|
|
20
21
|
import { Text } from '@hh.ru/magritte-ui-typography';
|
|
21
|
-
import { s as styles } from './chat-bubble-
|
|
22
|
+
import { s as styles } from './chat-bubble-C7KYJOC7.js';
|
|
22
23
|
import '@hh.ru/magritte-ui-cell';
|
|
23
24
|
import '@hh.ru/magritte-ui-link';
|
|
24
25
|
import '@hh.ru/magritte-ui-loader';
|
|
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
|
-
import './chat-bubble-
|
|
29
|
+
import './chat-bubble-DvyT8aq-.js';
|
|
29
30
|
|
|
30
31
|
const ChatBubble = forwardRef(({ actions, buttons, children, header, errorActions, mode = 'incoming', showTail = false, status, time, error = false, errorText, 'data-qa': dataQa = 'chat-bubble', className, }, ref) => {
|
|
31
32
|
const [menuVisible, setMenuVisible] = useState(false);
|
|
@@ -52,6 +53,7 @@ ChatBubble.displayName = 'ChatBubble';
|
|
|
52
53
|
ChatBubble.ErrorAction = ChatBubbleErrorAction;
|
|
53
54
|
ChatBubble.File = ChatBubbleFile;
|
|
54
55
|
ChatBubble.Label = ChatBubbleLabel;
|
|
56
|
+
ChatBubble.Media = ChatBubbleMedia;
|
|
55
57
|
ChatBubble.Message = ChatBubbleMessage;
|
|
56
58
|
ChatBubble.Status = ChatBubbleStatus;
|
|
57
59
|
|
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 { ChatBubbleMessage } from '@hh.ru/magritte-ui-chat-bubble/Message';\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 Message: typeof ChatBubbleMessage;\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.Message = ChatBubbleMessage;\nChatBubble.Status = ChatBubbleStatus;\n"],"names":["_jsx","_jsx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AAO,EAAA,CACN,EACkB,CAAA,CAC/B,EACA,OAAO,KACJA,GAAC,CAAA,uBAAuB,EAAC,EAAA,KAAK,EAAE,gBAAgB,EAAA,QAAA,EAC5CA,GAAK,CAAA,KAAA,EAAA,EAAA,SAAS,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,OAAO,GAAG,iBAAiB,CAAC;AACvC,UAAU,CAAC,MAAM,GAAG,gBAAgB;;;;"}
|
|
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 { 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 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.Status = ChatBubbleStatus;\n"],"names":["_jsx","_jsxs"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;MAiCa,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,CAAC,EAAE,YAAY,EAAE,MAAM,CAAC,WAAW,EAAE,CAAC,EACxD,CAAC,MAAM,CAAC,CACX,CAAC;AACF,IAAA,MAAM,YAAY,GAAyB,OAAO,CAC9C,OAAO,EAAE,IAAI,EAAE,OAAO,EAAE,IAAI,EAAE,WAAW,EAAE,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC,EACnF,CAAC,MAAM,CAAC,CACX,CAAC;AACF;;;;AAIG;AACH,IAAA,MAAM,IAAI,GAA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K,KAAK,IAAI,IAAI,KAAK,UAAU,CAAC,KAC/CA,GAAA,CAAC,yBAAyB,EAAA,EAAC,KAAK,EAAE,YAAY,EAAA,QAAA,EAC1CA,GAAK,CAAA,KAAA,EAAA,EAAA,SAAS,EAAE,MAAM,CAAC,OAAO,EAAA,SAAA,EAAU,qBAAqB,EAAA,QAAA,EACxD,OAAO,EAAA,CACN,EACkB,CAAA,CAC/B,EACA,OAAO,KACJA,GAAC,CAAA,uBAAuB,EAAC,EAAA,KAAK,EAAE,gBAAgB,EAAA,QAAA,EAC5CA,GAAK,CAAA,KAAA,EAAA,EAAA,SAAS,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,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-
|
|
11
|
+
import { s as styles } from './chat-bubble-C7KYJOC7.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.d.ts
ADDED
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { type HTMLAttributes, type ReactNode } from 'react';
|
|
2
|
+
import { type ChatBubbleMetaHostProps } from '@hh.ru/magritte-ui-chat-bubble/internal/utils';
|
|
3
|
+
export interface ChatBubbleMediaProps extends HTMLAttributes<HTMLDivElement>, ChatBubbleMetaHostProps {
|
|
4
|
+
/** Url изображения или превью видео */
|
|
5
|
+
src?: string;
|
|
6
|
+
/** alt изображения */
|
|
7
|
+
alt?: string;
|
|
8
|
+
/** Содержимое поверх превью */
|
|
9
|
+
children?: ReactNode;
|
|
10
|
+
/** тип медиа (отображается в верхнем левом углу) */
|
|
11
|
+
format?: ReactNode;
|
|
12
|
+
/**
|
|
13
|
+
* Значение data-qa
|
|
14
|
+
* @default chat-bubble-media
|
|
15
|
+
*/
|
|
16
|
+
'data-qa'?: string;
|
|
17
|
+
}
|
|
18
|
+
export declare const ChatBubbleMedia: import("react").ForwardRefExoticComponent<ChatBubbleMediaProps & import("react").RefAttributes<HTMLDivElement>> & import("@hh.ru/magritte-ui-chat-bubble/internal/utils").MetaHostComponent;
|
package/Media.js
ADDED
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import './index.css';
|
|
2
|
+
import { jsxs, Fragment, jsx } from 'react/jsx-runtime';
|
|
3
|
+
import { forwardRef } from 'react';
|
|
4
|
+
import { markMetaHost } from './internal/utils.js';
|
|
5
|
+
import { Text } from '@hh.ru/magritte-ui-typography';
|
|
6
|
+
import { s as styles } from './chat-bubble-C7KYJOC7.js';
|
|
7
|
+
|
|
8
|
+
/**
|
|
9
|
+
* Медиа в сообщении
|
|
10
|
+
*/
|
|
11
|
+
const ChatBubbleMediaComponent = forwardRef(({ alt, children, 'data-qa': dataQa = 'chat-bubble-media', meta, src, format, ...props }, ref) => {
|
|
12
|
+
return (jsxs("div", { ...props, className: styles.media, "data-qa": dataQa, ref: ref, children: [src && (jsxs(Fragment, { children: [jsx("img", { className: styles.mediaBlur, src: src, alt: "", "aria-hidden": true }), jsx("img", { className: styles.mediaImage, src: src, alt: alt ?? '' })] })), children && jsx("span", { className: styles.mediaContent, children: children }), format && (jsx("span", { className: styles.mediaFormat, "data-qa": "chat-bubble-media-format", children: jsx(Text, { Element: "span", typography: "label-4-regular", style: "constant", children: format }) })), meta && (jsx("span", { className: styles.mediaMeta, "data-qa": "chat-bubble-media-meta", children: meta }))] }));
|
|
13
|
+
});
|
|
14
|
+
ChatBubbleMediaComponent.displayName = 'ChatBubble.Media';
|
|
15
|
+
const ChatBubbleMedia = markMetaHost(ChatBubbleMediaComponent);
|
|
16
|
+
|
|
17
|
+
export { ChatBubbleMedia };
|
|
18
|
+
//# sourceMappingURL=Media.js.map
|
package/Media.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Media.js","sources":["src/Media.tsx"],"sourcesContent":["import { forwardRef, type HTMLAttributes, type ReactNode } from 'react';\n\nimport { markMetaHost, type ChatBubbleMetaHostProps } from '@hh.ru/magritte-ui-chat-bubble/internal/utils';\nimport { Text } from '@hh.ru/magritte-ui-typography';\n\nimport styles from './chat-bubble.less';\n\nexport interface ChatBubbleMediaProps extends HTMLAttributes<HTMLDivElement>, ChatBubbleMetaHostProps {\n /** Url изображения или превью видео */\n src?: string;\n /** alt изображения */\n alt?: string;\n /** Содержимое поверх превью */\n children?: ReactNode;\n /** тип медиа (отображается в верхнем левом углу) */\n format?: ReactNode;\n /**\n * Значение data-qa\n * @default chat-bubble-media\n */\n 'data-qa'?: string;\n}\n\n/**\n * Медиа в сообщении\n */\nconst ChatBubbleMediaComponent = forwardRef<HTMLDivElement, ChatBubbleMediaProps>(\n ({ alt, children, 'data-qa': dataQa = 'chat-bubble-media', meta, src, format, ...props }, ref) => {\n return (\n <div {...props} className={styles.media} data-qa={dataQa} ref={ref}>\n {src && (\n <>\n <img className={styles.mediaBlur} src={src} alt=\"\" aria-hidden />\n <img className={styles.mediaImage} src={src} alt={alt ?? ''} />\n </>\n )}\n {children && <span className={styles.mediaContent}>{children}</span>}\n {format && (\n <span className={styles.mediaFormat} data-qa=\"chat-bubble-media-format\">\n <Text Element=\"span\" typography=\"label-4-regular\" style=\"constant\">\n {format}\n </Text>\n </span>\n )}\n {meta && (\n <span className={styles.mediaMeta} data-qa=\"chat-bubble-media-meta\">\n {meta}\n </span>\n )}\n </div>\n );\n }\n);\n\nChatBubbleMediaComponent.displayName = 'ChatBubble.Media';\n\nexport const ChatBubbleMedia = markMetaHost(ChatBubbleMediaComponent);\n"],"names":["_jsxs","_Fragment","_jsx"],"mappings":";;;;;;AAuBA;;AAEG;AACH,MAAM,wBAAwB,GAAG,UAAU,CACvC,CAAC,EAAE,GAAG,EAAE,QAAQ,EAAE,SAAS,EAAE,MAAM,GAAG,mBAAmB,EAAE,IAAI,EAAE,GAAG,EAAE,MAAM,EAAE,GAAG,KAAK,EAAE,EAAE,GAAG,KAAI;IAC7F,QACIA,IAAS,CAAA,KAAA,EAAA,EAAA,GAAA,KAAK,EAAE,SAAS,EAAE,MAAM,CAAC,KAAK,EAAW,SAAA,EAAA,MAAM,EAAE,GAAG,EAAE,GAAG,EAAA,QAAA,EAAA,CAC7D,GAAG,KACAA,IAAA,CAAAC,QAAA,EAAA,EAAA,QAAA,EAAA,CACIC,GAAK,CAAA,KAAA,EAAA,EAAA,SAAS,EAAE,MAAM,CAAC,SAAS,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAC,EAAE,EAAA,aAAA,EAAA,IAAA,EAAA,CAAe,EACjEA,GAAA,CAAA,KAAA,EAAA,EAAK,SAAS,EAAE,MAAM,CAAC,UAAU,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,IAAI,EAAE,EAAI,CAAA,CAAA,EAAA,CAChE,CACN,EACA,QAAQ,IAAIA,cAAM,SAAS,EAAE,MAAM,CAAC,YAAY,EAAA,QAAA,EAAG,QAAQ,EAAA,CAAQ,EACnE,MAAM,KACHA,GAAM,CAAA,MAAA,EAAA,EAAA,SAAS,EAAE,MAAM,CAAC,WAAW,EAAA,SAAA,EAAU,0BAA0B,EAAA,QAAA,EACnEA,GAAC,CAAA,IAAI,EAAC,EAAA,OAAO,EAAC,MAAM,EAAC,UAAU,EAAC,iBAAiB,EAAC,KAAK,EAAC,UAAU,EAAA,QAAA,EAC7D,MAAM,EAAA,CACJ,EACJ,CAAA,CACV,EACA,IAAI,KACDA,GAAM,CAAA,MAAA,EAAA,EAAA,SAAS,EAAE,MAAM,CAAC,SAAS,EAAU,SAAA,EAAA,wBAAwB,EAC9D,QAAA,EAAA,IAAI,EACF,CAAA,CACV,CACC,EAAA,CAAA,EACR;AACN,CAAC,CACJ,CAAC;AAEF,wBAAwB,CAAC,WAAW,GAAG,kBAAkB,CAAC;MAE7C,eAAe,GAAG,YAAY,CAAC,wBAAwB;;;;"}
|
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-
|
|
8
|
+
import { s as styles } from './chat-bubble-C7KYJOC7.js';
|
|
9
9
|
|
|
10
10
|
/**
|
|
11
11
|
* Текстовая часть сообщения.
|
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-
|
|
10
|
+
import { s as styles } from './chat-bubble-C7KYJOC7.js';
|
|
11
11
|
|
|
12
12
|
const ICON = {
|
|
13
13
|
sending: ClockOutlinedSize16,
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import './index.css';
|
|
2
|
+
var styles = {"chat-bubble":"magritte-chat-bubble___ds9CP_1-3-0","chatBubble":"magritte-chat-bubble___ds9CP_1-3-0","outgoing":"magritte-outgoing___3n00o_1-3-0","bot":"magritte-bot___Z6vZA_1-3-0","row":"magritte-row___mQNnt_1-3-0","bubble":"magritte-bubble___NVuDI_1-3-0","with-tail":"magritte-with-tail___IdixJ_1-3-0","withTail":"magritte-with-tail___IdixJ_1-3-0","header":"magritte-header___Px2to_1-3-0","message-title":"magritte-message-title___dgBFk_1-3-0","messageTitle":"magritte-message-title___dgBFk_1-3-0","message":"magritte-message___7TEpw_1-3-0","buttons":"magritte-buttons___yQqBi_1-3-0","actions":"magritte-actions___I5GSz_1-3-0","error-text":"magritte-error-text___1ZxWY_1-3-0","errorText":"magritte-error-text___1ZxWY_1-3-0","file":"magritte-file___k2IKy_1-3-0","file-preview":"magritte-file-preview___eJKu8_1-3-0","filePreview":"magritte-file-preview___eJKu8_1-3-0","media":"magritte-media___9jH2k_1-3-0","media-blur":"magritte-media-blur___TbiMa_1-3-0","mediaBlur":"magritte-media-blur___TbiMa_1-3-0","media-image":"magritte-media-image___G-FkF_1-3-0","mediaImage":"magritte-media-image___G-FkF_1-3-0","media-content":"magritte-media-content___n3XbD_1-3-0","mediaContent":"magritte-media-content___n3XbD_1-3-0","media-format":"magritte-media-format___AdfCK_1-3-0","mediaFormat":"magritte-media-format___AdfCK_1-3-0","media-meta":"magritte-media-meta___oSxxr_1-3-0","mediaMeta":"magritte-media-meta___oSxxr_1-3-0","content-with-header":"magritte-content-with-header___wiNKB_1-3-0","contentWithHeader":"magritte-content-with-header___wiNKB_1-3-0","status":"magritte-status___dHzCt_1-3-0"};
|
|
3
|
+
|
|
4
|
+
export { styles as s };
|
|
5
|
+
//# sourceMappingURL=chat-bubble-C7KYJOC7.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"chat-bubble-C7KYJOC7.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;"}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import './index.css';
|
|
2
|
+
var styles = {"tail":"magritte-tail___-1lJ0_1-3-0","tail_outgoing":"magritte-tail_outgoing___cnyh3_1-3-0","tailOutgoing":"magritte-tail_outgoing___cnyh3_1-3-0","meta":"magritte-meta___HT7lp_1-3-0"};
|
|
3
|
+
|
|
4
|
+
export { styles as s };
|
|
5
|
+
//# sourceMappingURL=chat-bubble-DvyT8aq-.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"chat-bubble-DvyT8aq-.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;"}
|
package/index.css
CHANGED
|
@@ -1,10 +1,13 @@
|
|
|
1
1
|
:root{
|
|
2
|
+
--magritte-color-background-overlay-v25-0-1:#20262bad;
|
|
3
|
+
--magritte-color-text-constant-v25-0-1:#ffffff;
|
|
2
4
|
--magritte-color-component-chat-bubble-background-incoming-v25-0-1:#F4F6FB;
|
|
3
5
|
--magritte-color-component-chat-bubble-background-outgoing-v25-0-1:#0070ff;
|
|
4
6
|
--magritte-color-component-chat-bubble-background-bot-v25-0-1:#f9f7ff;
|
|
5
7
|
--magritte-color-component-chat-bubble-border-incoming-v25-0-1:#EEF1F7;
|
|
6
8
|
--magritte-color-component-chat-bubble-border-outgoing-v25-0-1:#0d63e3;
|
|
7
9
|
--magritte-color-component-chat-bubble-border-bot-v25-0-1:#f3eeff;
|
|
10
|
+
--magritte-color-component-chat-bubble-border-image-v25-0-1:#0000001a;
|
|
8
11
|
}
|
|
9
12
|
|
|
10
13
|
.magritte-night-theme{
|
|
@@ -20,7 +23,7 @@
|
|
|
20
23
|
--magritte-color-component-chat-bubble-background-outgoing-v25-0-1:#7195AF;
|
|
21
24
|
--magritte-color-component-chat-bubble-border-outgoing-v25-0-1:#557B96;
|
|
22
25
|
}
|
|
23
|
-
.magritte-chat-bubble___ds9CP_1-
|
|
26
|
+
.magritte-chat-bubble___ds9CP_1-3-0{
|
|
24
27
|
--magritte-chat-bubble-background:var(--magritte-color-component-chat-bubble-background-incoming-v25-0-1);
|
|
25
28
|
--magritte-chat-bubble-border:var(--magritte-color-component-chat-bubble-border-incoming-v25-0-1);
|
|
26
29
|
display:flex;
|
|
@@ -29,32 +32,32 @@
|
|
|
29
32
|
max-width:calc(100% - 40px);
|
|
30
33
|
}
|
|
31
34
|
@media (min-width: 1020px){
|
|
32
|
-
body.magritte-old-layout .magritte-chat-bubble___ds9CP_1-
|
|
35
|
+
body.magritte-old-layout .magritte-chat-bubble___ds9CP_1-3-0{
|
|
33
36
|
max-width:min(460px, 100%);
|
|
34
37
|
}
|
|
35
38
|
}
|
|
36
39
|
@media (min-width: 1024px){
|
|
37
|
-
body:not(.magritte-old-layout) .magritte-chat-bubble___ds9CP_1-
|
|
40
|
+
body:not(.magritte-old-layout) .magritte-chat-bubble___ds9CP_1-3-0{
|
|
38
41
|
max-width:min(460px, 100%);
|
|
39
42
|
}
|
|
40
43
|
}
|
|
41
|
-
.magritte-outgoing___3n00o_1-
|
|
44
|
+
.magritte-outgoing___3n00o_1-3-0{
|
|
42
45
|
--magritte-chat-bubble-background:var(--magritte-color-component-chat-bubble-background-outgoing-v25-0-1);
|
|
43
46
|
--magritte-chat-bubble-border:var(--magritte-color-component-chat-bubble-border-outgoing-v25-0-1);
|
|
44
47
|
align-items:flex-end;
|
|
45
48
|
margin-left:auto;
|
|
46
49
|
}
|
|
47
|
-
.magritte-bot___Z6vZA_1-
|
|
50
|
+
.magritte-bot___Z6vZA_1-3-0{
|
|
48
51
|
--magritte-chat-bubble-background:var(--magritte-color-component-chat-bubble-background-bot-v25-0-1);
|
|
49
52
|
--magritte-chat-bubble-border:var(--magritte-color-component-chat-bubble-border-bot-v25-0-1);
|
|
50
53
|
}
|
|
51
|
-
.magritte-row___mQNnt_1-
|
|
54
|
+
.magritte-row___mQNnt_1-3-0{
|
|
52
55
|
display:flex;
|
|
53
56
|
align-items:flex-end;
|
|
54
57
|
gap:8px;
|
|
55
58
|
max-width:100%;
|
|
56
59
|
}
|
|
57
|
-
.magritte-bubble___NVuDI_1-
|
|
60
|
+
.magritte-bubble___NVuDI_1-3-0{
|
|
58
61
|
position:relative;
|
|
59
62
|
box-sizing:border-box;
|
|
60
63
|
min-width:0;
|
|
@@ -65,78 +68,170 @@
|
|
|
65
68
|
border-radius:20px;
|
|
66
69
|
overflow-wrap:break-word;
|
|
67
70
|
}
|
|
68
|
-
.magritte-with-tail___IdixJ_1-
|
|
71
|
+
.magritte-with-tail___IdixJ_1-3-0 .magritte-bubble___NVuDI_1-3-0{
|
|
69
72
|
border-bottom-left-radius:0;
|
|
70
73
|
}
|
|
71
|
-
.magritte-with-tail___IdixJ_1-
|
|
74
|
+
.magritte-with-tail___IdixJ_1-3-0.magritte-outgoing___3n00o_1-3-0 .magritte-bubble___NVuDI_1-3-0{
|
|
72
75
|
border-bottom-left-radius:20px;
|
|
73
76
|
border-bottom-right-radius:0;
|
|
74
77
|
}
|
|
75
|
-
.magritte-header___Px2to_1-
|
|
78
|
+
.magritte-header___Px2to_1-3-0{
|
|
76
79
|
display:flex;
|
|
77
80
|
flex-direction:column;
|
|
78
81
|
gap:4px;
|
|
79
82
|
margin-bottom:4px;
|
|
80
83
|
}
|
|
81
|
-
.magritte-message-title___dgBFk_1-
|
|
84
|
+
.magritte-message-title___dgBFk_1-3-0{
|
|
82
85
|
margin-bottom:4px;
|
|
83
86
|
}
|
|
84
|
-
.magritte-message___7TEpw_1-
|
|
87
|
+
.magritte-message___7TEpw_1-3-0:not(:first-child){
|
|
85
88
|
margin-top:8px;
|
|
86
89
|
}
|
|
87
|
-
.magritte-buttons___yQqBi_1-
|
|
90
|
+
.magritte-buttons___yQqBi_1-3-0{
|
|
88
91
|
display:grid;
|
|
89
92
|
grid-template-columns:repeat(2, 1fr);
|
|
90
93
|
gap:8px;
|
|
91
94
|
width:100%;
|
|
92
95
|
margin-top:4px;
|
|
93
96
|
}
|
|
94
|
-
.magritte-buttons___yQqBi_1-
|
|
97
|
+
.magritte-buttons___yQqBi_1-3-0 > *:last-child:nth-child(odd){
|
|
95
98
|
grid-column:span 2;
|
|
96
99
|
}
|
|
97
|
-
.magritte-actions___I5GSz_1-
|
|
100
|
+
.magritte-actions___I5GSz_1-3-0{
|
|
98
101
|
display:flex;
|
|
99
102
|
flex-wrap:wrap;
|
|
100
103
|
gap:2px;
|
|
101
104
|
margin-top:4px;
|
|
102
105
|
}
|
|
103
|
-
.magritte-error-text___1ZxWY_1-
|
|
106
|
+
.magritte-error-text___1ZxWY_1-3-0{
|
|
104
107
|
margin-top:2px;
|
|
105
108
|
}
|
|
106
|
-
.magritte-file___k2IKy_1-
|
|
109
|
+
.magritte-file___k2IKy_1-3-0{
|
|
107
110
|
display:flex;
|
|
108
111
|
align-items:flex-end;
|
|
109
112
|
}
|
|
110
|
-
.magritte-file___k2IKy_1-
|
|
113
|
+
.magritte-file___k2IKy_1-3-0 + .magritte-file___k2IKy_1-3-0{
|
|
111
114
|
margin-top:12px;
|
|
112
115
|
}
|
|
113
|
-
.magritte-
|
|
114
|
-
margin-top:8px;
|
|
115
|
-
}
|
|
116
|
-
.magritte-file-preview___eJKu8_1-2-0{
|
|
116
|
+
.magritte-file-preview___eJKu8_1-3-0{
|
|
117
117
|
display:block;
|
|
118
118
|
width:48px;
|
|
119
119
|
height:48px;
|
|
120
120
|
border-radius:8px;
|
|
121
121
|
object-fit:cover;
|
|
122
122
|
}
|
|
123
|
-
.magritte-
|
|
123
|
+
.magritte-media___9jH2k_1-3-0{
|
|
124
|
+
display:flex;
|
|
125
|
+
position:relative;
|
|
126
|
+
box-sizing:border-box;
|
|
127
|
+
min-width:120px;
|
|
128
|
+
min-height:120px;
|
|
129
|
+
max-height:min(60vh, 452px);
|
|
130
|
+
margin:-8px;
|
|
131
|
+
border-radius:16px;
|
|
132
|
+
overflow:hidden;
|
|
133
|
+
box-shadow:inset 0 0 0 1px var(--magritte-color-component-chat-bubble-border-image-v25-0-1);
|
|
134
|
+
}
|
|
135
|
+
@media (min-width: 1020px){
|
|
136
|
+
body.magritte-old-layout .magritte-media___9jH2k_1-3-0{
|
|
137
|
+
max-width:452px;
|
|
138
|
+
max-height:452px;
|
|
139
|
+
}
|
|
140
|
+
}
|
|
141
|
+
@media (min-width: 1024px){
|
|
142
|
+
body:not(.magritte-old-layout) .magritte-media___9jH2k_1-3-0{
|
|
143
|
+
max-width:452px;
|
|
144
|
+
max-height:452px;
|
|
145
|
+
}
|
|
146
|
+
}
|
|
147
|
+
.magritte-media-blur___TbiMa_1-3-0{
|
|
148
|
+
position:absolute;
|
|
149
|
+
top:-96px;
|
|
150
|
+
left:-96px;
|
|
151
|
+
width:calc(100% + 96px * 2);
|
|
152
|
+
height:calc(100% + 96px * 2);
|
|
153
|
+
opacity:0.5;
|
|
154
|
+
filter:blur(48px);
|
|
155
|
+
object-fit:cover;
|
|
156
|
+
}
|
|
157
|
+
.magritte-media-image___G-FkF_1-3-0{
|
|
158
|
+
display:block;
|
|
159
|
+
position:relative;
|
|
160
|
+
max-width:100%;
|
|
161
|
+
max-height:min(60vh, 452px);
|
|
162
|
+
margin:auto;
|
|
163
|
+
}
|
|
164
|
+
@media (min-width: 1020px){
|
|
165
|
+
body.magritte-old-layout .magritte-media-image___G-FkF_1-3-0{
|
|
166
|
+
max-height:452px;
|
|
167
|
+
}
|
|
168
|
+
}
|
|
169
|
+
@media (min-width: 1024px){
|
|
170
|
+
body:not(.magritte-old-layout) .magritte-media-image___G-FkF_1-3-0{
|
|
171
|
+
max-height:452px;
|
|
172
|
+
}
|
|
173
|
+
}
|
|
174
|
+
.magritte-media-content___n3XbD_1-3-0{
|
|
175
|
+
display:flex;
|
|
176
|
+
position:absolute;
|
|
177
|
+
inset:0;
|
|
178
|
+
align-items:center;
|
|
179
|
+
justify-content:center;
|
|
180
|
+
}
|
|
181
|
+
.magritte-media-format___AdfCK_1-3-0{
|
|
182
|
+
display:flex;
|
|
183
|
+
position:absolute;
|
|
184
|
+
top:4px;
|
|
185
|
+
left:4px;
|
|
186
|
+
padding:2px 8px;
|
|
187
|
+
background-color:var(--magritte-color-background-overlay-v25-0-1);
|
|
188
|
+
border-radius:12px;
|
|
189
|
+
backdrop-filter:blur(24px);
|
|
190
|
+
}
|
|
191
|
+
.magritte-media-meta___oSxxr_1-3-0{
|
|
192
|
+
--magritte-ui-text-color-override:var(--magritte-color-text-constant-v25-0-1);
|
|
193
|
+
display:flex;
|
|
194
|
+
position:absolute;
|
|
195
|
+
right:4px;
|
|
196
|
+
bottom:4px;
|
|
197
|
+
align-items:center;
|
|
198
|
+
padding:2px 8px;
|
|
199
|
+
background-color:var(--magritte-color-background-overlay-v25-0-1);
|
|
200
|
+
border-radius:12px;
|
|
201
|
+
backdrop-filter:blur(24px);
|
|
202
|
+
}
|
|
203
|
+
.magritte-media-meta___oSxxr_1-3-0:empty{
|
|
204
|
+
display:none;
|
|
205
|
+
}
|
|
206
|
+
.magritte-media-meta___oSxxr_1-3-0 > span{
|
|
207
|
+
margin-left:0;
|
|
208
|
+
}
|
|
209
|
+
.magritte-content-with-header___wiNKB_1-3-0 > .magritte-file___k2IKy_1-3-0:first-child,
|
|
210
|
+
.magritte-content-with-header___wiNKB_1-3-0 > .magritte-media___9jH2k_1-3-0:first-child{
|
|
211
|
+
margin-top:8px;
|
|
212
|
+
}
|
|
213
|
+
.magritte-media___9jH2k_1-3-0:not(:last-child){
|
|
214
|
+
margin-bottom:12px;
|
|
215
|
+
}
|
|
216
|
+
.magritte-status___dHzCt_1-3-0{
|
|
124
217
|
display:inline-flex;
|
|
125
218
|
vertical-align:middle;
|
|
219
|
+
}
|
|
220
|
+
.magritte-status___dHzCt_1-3-0:not(:first-child){
|
|
126
221
|
margin-left:4px;
|
|
127
222
|
}
|
|
128
223
|
|
|
129
|
-
.magritte-tail___-1lJ0_1-
|
|
224
|
+
.magritte-tail___-1lJ0_1-3-0{
|
|
130
225
|
position:absolute;
|
|
131
226
|
bottom:-1px;
|
|
132
227
|
left:-7px;
|
|
133
228
|
}
|
|
134
|
-
.magritte-tail_outgoing___cnyh3_1-
|
|
229
|
+
.magritte-tail_outgoing___cnyh3_1-3-0{
|
|
135
230
|
left:auto;
|
|
136
231
|
right:-7px;
|
|
137
232
|
transform:scaleX(-1);
|
|
138
233
|
}
|
|
139
|
-
.magritte-meta___HT7lp_1-
|
|
234
|
+
.magritte-meta___HT7lp_1-3-0{
|
|
140
235
|
float:right;
|
|
141
236
|
margin-left:12px;
|
|
142
237
|
white-space:nowrap;
|
package/index.d.ts
CHANGED
|
@@ -3,5 +3,6 @@ export type { ChatBubbleMode, ChatBubbleProps } from '@hh.ru/magritte-ui-chat-bu
|
|
|
3
3
|
export type { ChatBubbleErrorActionProps } from '@hh.ru/magritte-ui-chat-bubble/ErrorAction';
|
|
4
4
|
export type { ChatBubbleFileProps, ChatBubbleFileState } from '@hh.ru/magritte-ui-chat-bubble/File';
|
|
5
5
|
export type { ChatBubbleLabelProps } from '@hh.ru/magritte-ui-chat-bubble/Label';
|
|
6
|
+
export type { ChatBubbleMediaProps } from '@hh.ru/magritte-ui-chat-bubble/Media';
|
|
6
7
|
export type { ChatBubbleMessageProps } from '@hh.ru/magritte-ui-chat-bubble/Message';
|
|
7
8
|
export type { ChatBubbleStatusProps, ChatBubbleStatusValue } from '@hh.ru/magritte-ui-chat-bubble/Status';
|
package/index.js
CHANGED
|
@@ -15,16 +15,17 @@ 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-
|
|
18
|
+
import './chat-bubble-C7KYJOC7.js';
|
|
19
19
|
import './Label.js';
|
|
20
20
|
import '@hh.ru/magritte-ui-typography';
|
|
21
|
+
import './Media.js';
|
|
21
22
|
import './Message.js';
|
|
22
23
|
import './Status.js';
|
|
23
24
|
import '@hh.ru/magritte-common-use-multiple-refs';
|
|
24
25
|
import '@hh.ru/magritte-common-use-translation';
|
|
25
26
|
import '@hh.ru/magritte-ui-tooltip';
|
|
26
27
|
import './internal/Meta.js';
|
|
27
|
-
import './chat-bubble-
|
|
28
|
+
import './chat-bubble-DvyT8aq-.js';
|
|
28
29
|
import './internal/Tail.js';
|
|
29
30
|
import '@hh.ru/magritte-ui-icon';
|
|
30
31
|
//# 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
|
@@ -2,12 +2,14 @@ export type { ChatBubbleMode, ChatBubbleProps } from '@hh.ru/magritte-ui-chat-bu
|
|
|
2
2
|
export type { ChatBubbleErrorActionProps } from '@hh.ru/magritte-ui-chat-bubble/ErrorAction';
|
|
3
3
|
export type { ChatBubbleFileProps, ChatBubbleFileState } from '@hh.ru/magritte-ui-chat-bubble/File';
|
|
4
4
|
export type { ChatBubbleLabelProps } from '@hh.ru/magritte-ui-chat-bubble/Label';
|
|
5
|
+
export type { ChatBubbleMediaProps } from '@hh.ru/magritte-ui-chat-bubble/Media';
|
|
5
6
|
export type { ChatBubbleMessageProps } from '@hh.ru/magritte-ui-chat-bubble/Message';
|
|
6
7
|
export type { ChatBubbleStatusProps, ChatBubbleStatusValue } from '@hh.ru/magritte-ui-chat-bubble/Status';
|
|
7
8
|
export declare const ChatBubble: import("react").ForwardRefExoticComponent<Record<string, unknown>> & {
|
|
8
9
|
ErrorAction: import("react").ForwardRefExoticComponent<Record<string, unknown>>;
|
|
9
10
|
File: import("react").ForwardRefExoticComponent<Record<string, unknown>>;
|
|
10
11
|
Label: import("react").ForwardRefExoticComponent<Record<string, unknown>>;
|
|
12
|
+
Media: import("react").ForwardRefExoticComponent<Record<string, unknown>>;
|
|
11
13
|
Message: import("react").ForwardRefExoticComponent<Record<string, unknown>>;
|
|
12
14
|
Status: import("react").ForwardRefExoticComponent<Record<string, unknown>>;
|
|
13
15
|
};
|
package/index.mock.js
CHANGED
|
@@ -4,12 +4,14 @@ import { mockComponent } from '@hh.ru/magritte-ui-mock-component';
|
|
|
4
4
|
const ErrorAction = mockComponent('ChatBubble.ErrorAction', undefined, { withChildren: true });
|
|
5
5
|
const File = mockComponent('ChatBubble.File');
|
|
6
6
|
const Label = mockComponent('ChatBubble.Label', undefined, { withChildren: true });
|
|
7
|
+
const Media = mockComponent('ChatBubble.Media', undefined, { withChildren: true });
|
|
7
8
|
const Message = mockComponent('ChatBubble.Message', undefined, { withChildren: true });
|
|
8
9
|
const Status = mockComponent('ChatBubble.Status', undefined, { withChildren: true });
|
|
9
10
|
const ChatBubble = Object.assign(mockComponent('ChatBubble', undefined, { withChildren: true }), {
|
|
10
11
|
ErrorAction,
|
|
11
12
|
File,
|
|
12
13
|
Label,
|
|
14
|
+
Media,
|
|
13
15
|
Message,
|
|
14
16
|
Status,
|
|
15
17
|
});
|
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 { ChatBubbleMessageProps } from '@hh.ru/magritte-ui-chat-bubble/Message';\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 Message = mockComponent('ChatBubble.Message', 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 Message,\n Status,\n});\n"],"names":[],"mappings":";;
|
|
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 { 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 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 Status,\n});\n"],"names":[],"mappings":";;AAUA,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,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,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-
|
|
5
|
+
import { s as styles } from '../chat-bubble-DvyT8aq-.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-
|
|
5
|
+
import { s as styles } from '../chat-bubble-DvyT8aq-.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';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@hh.ru/magritte-ui-chat-bubble",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.3.0",
|
|
4
4
|
"main": "index.js",
|
|
5
5
|
"types": "index.d.ts",
|
|
6
6
|
"sideEffects": [
|
|
@@ -28,7 +28,7 @@
|
|
|
28
28
|
"@hh.ru/magritte-ui-icon": "15.0.3",
|
|
29
29
|
"@hh.ru/magritte-ui-link": "7.2.0",
|
|
30
30
|
"@hh.ru/magritte-ui-loader": "4.1.0",
|
|
31
|
-
"@hh.ru/magritte-ui-menu": "1.0.
|
|
31
|
+
"@hh.ru/magritte-ui-menu": "1.0.35",
|
|
32
32
|
"@hh.ru/magritte-ui-mock-component": "1.1.7",
|
|
33
33
|
"@hh.ru/magritte-ui-tooltip": "11.0.44",
|
|
34
34
|
"@hh.ru/magritte-ui-typography": "5.3.12"
|
|
@@ -40,5 +40,5 @@
|
|
|
40
40
|
"publishConfig": {
|
|
41
41
|
"access": "public"
|
|
42
42
|
},
|
|
43
|
-
"gitHead": "
|
|
43
|
+
"gitHead": "a367d4996b3f6b94fc101056fb4ad4f328b2a67b"
|
|
44
44
|
}
|
package/chat-bubble-BjmT1S_i.js
DELETED
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
import './index.css';
|
|
2
|
-
var styles = {"tail":"magritte-tail___-1lJ0_1-2-0","tail_outgoing":"magritte-tail_outgoing___cnyh3_1-2-0","tailOutgoing":"magritte-tail_outgoing___cnyh3_1-2-0","meta":"magritte-meta___HT7lp_1-2-0"};
|
|
3
|
-
|
|
4
|
-
export { styles as s };
|
|
5
|
-
//# sourceMappingURL=chat-bubble-BjmT1S_i.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"chat-bubble-BjmT1S_i.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;"}
|
package/chat-bubble-CaB7cEff.js
DELETED
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
import './index.css';
|
|
2
|
-
var styles = {"chat-bubble":"magritte-chat-bubble___ds9CP_1-2-0","chatBubble":"magritte-chat-bubble___ds9CP_1-2-0","outgoing":"magritte-outgoing___3n00o_1-2-0","bot":"magritte-bot___Z6vZA_1-2-0","row":"magritte-row___mQNnt_1-2-0","bubble":"magritte-bubble___NVuDI_1-2-0","with-tail":"magritte-with-tail___IdixJ_1-2-0","withTail":"magritte-with-tail___IdixJ_1-2-0","header":"magritte-header___Px2to_1-2-0","message-title":"magritte-message-title___dgBFk_1-2-0","messageTitle":"magritte-message-title___dgBFk_1-2-0","message":"magritte-message___7TEpw_1-2-0","buttons":"magritte-buttons___yQqBi_1-2-0","actions":"magritte-actions___I5GSz_1-2-0","error-text":"magritte-error-text___1ZxWY_1-2-0","errorText":"magritte-error-text___1ZxWY_1-2-0","file":"magritte-file___k2IKy_1-2-0","content-with-header":"magritte-content-with-header___wiNKB_1-2-0","contentWithHeader":"magritte-content-with-header___wiNKB_1-2-0","file-preview":"magritte-file-preview___eJKu8_1-2-0","filePreview":"magritte-file-preview___eJKu8_1-2-0","status":"magritte-status___dHzCt_1-2-0"};
|
|
3
|
-
|
|
4
|
-
export { styles as s };
|
|
5
|
-
//# sourceMappingURL=chat-bubble-CaB7cEff.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"chat-bubble-CaB7cEff.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;"}
|