@hh.ru/magritte-ui-ai-response 1.0.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.
@@ -0,0 +1,11 @@
1
+ import { AIResponseFormattedText } from '@hh.ru/magritte-ui-ai-response/FormattedText';
2
+ import { AIResponseQuote } from '@hh.ru/magritte-ui-ai-response/Quote';
3
+ import { AIResponseWidget } from '@hh.ru/magritte-ui-ai-response/Widget';
4
+ import { AIResponseProps } from '@hh.ru/magritte-ui-ai-response/types';
5
+ interface AIResponseComponents {
6
+ FormattedText: typeof AIResponseFormattedText;
7
+ Quote: typeof AIResponseQuote;
8
+ Widget: typeof AIResponseWidget;
9
+ }
10
+ export declare const AIResponse: React.ForwardRefExoticComponent<AIResponseProps & React.RefAttributes<HTMLDivElement>> & AIResponseComponents;
11
+ export {};
package/AIResponse.js ADDED
@@ -0,0 +1,27 @@
1
+ import './index.css';
2
+ import { jsxs, jsx } from 'react/jsx-runtime';
3
+ import { forwardRef } from 'react';
4
+ import classnames from 'classnames';
5
+ import { AIResponseFormattedText } from './FormattedText.js';
6
+ import { AIResponseQuote } from './Quote.js';
7
+ import { AIResponseWidget } from './Widget.js';
8
+ import { IconDefaultPropsContext } from '@hh.ru/magritte-ui-icon';
9
+ import { s as styles } from './ai-response-C_tgioSD.js';
10
+ import '@hh.ru/magritte-ui-text-list';
11
+ import '@hh.ru/magritte-ui-title';
12
+ import '@hh.ru/magritte-ui-typography';
13
+
14
+ const DEFAULT_ICON_PROPS = {
15
+ padding: 8,
16
+ initialColor: 'secondary',
17
+ };
18
+ const AIResponse = forwardRef(({ actions, children, className, icon, ...props }, ref) => {
19
+ return (jsxs("div", { ...props, className: classnames(className, styles.aiResponse), "data-qa": "ai-response", ref: ref, children: [icon, children, actions && (jsx(IconDefaultPropsContext, { props: DEFAULT_ICON_PROPS, children: jsx("div", { className: styles.aiResponseActions, children: actions }) }))] }));
20
+ });
21
+ AIResponse.displayName = 'AIResponse';
22
+ AIResponse.FormattedText = AIResponseFormattedText;
23
+ AIResponse.Quote = AIResponseQuote;
24
+ AIResponse.Widget = AIResponseWidget;
25
+
26
+ export { AIResponse };
27
+ //# sourceMappingURL=AIResponse.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"AIResponse.js","sources":["src/AIResponse.tsx"],"sourcesContent":["import { forwardRef } from 'react';\nimport classnames from 'classnames';\n\nimport { AIResponseFormattedText } from '@hh.ru/magritte-ui-ai-response/FormattedText';\nimport { AIResponseQuote } from '@hh.ru/magritte-ui-ai-response/Quote';\nimport { AIResponseWidget } from '@hh.ru/magritte-ui-ai-response/Widget';\nimport { AIResponseProps } from '@hh.ru/magritte-ui-ai-response/types';\nimport { IconDefaultPropsContext, IconProps } from '@hh.ru/magritte-ui-icon';\n\nimport styles from './ai-response.less';\n\nconst DEFAULT_ICON_PROPS: Partial<IconProps> = {\n padding: 8,\n initialColor: 'secondary',\n};\n\ninterface AIResponseComponents {\n FormattedText: typeof AIResponseFormattedText;\n Quote: typeof AIResponseQuote;\n Widget: typeof AIResponseWidget;\n}\n\nexport const AIResponse = forwardRef<HTMLDivElement, AIResponseProps>(\n ({ actions, children, className, icon, ...props }, ref) => {\n return (\n <div {...props} className={classnames(className, styles.aiResponse)} data-qa=\"ai-response\" ref={ref}>\n {icon}\n {children}\n {actions && (\n <IconDefaultPropsContext props={DEFAULT_ICON_PROPS}>\n <div className={styles.aiResponseActions}>{actions}</div>\n </IconDefaultPropsContext>\n )}\n </div>\n );\n }\n) as React.ForwardRefExoticComponent<AIResponseProps & React.RefAttributes<HTMLDivElement>> & AIResponseComponents;\n\nAIResponse.displayName = 'AIResponse';\n\nAIResponse.FormattedText = AIResponseFormattedText;\nAIResponse.Quote = AIResponseQuote;\nAIResponse.Widget = AIResponseWidget;\n"],"names":["_jsxs","_jsx"],"mappings":";;;;;;;;;;;;AAWA,MAAM,kBAAkB,GAAuB;AAC3C,IAAA,OAAO,EAAE,CAAC;AACV,IAAA,YAAY,EAAE,WAAW;CAC5B,CAAC;MAQW,UAAU,GAAG,UAAU,CAChC,CAAC,EAAE,OAAO,EAAE,QAAQ,EAAE,SAAS,EAAE,IAAI,EAAE,GAAG,KAAK,EAAE,EAAE,GAAG,KAAI;IACtD,QACIA,iBAAS,KAAK,EAAE,SAAS,EAAE,UAAU,CAAC,SAAS,EAAE,MAAM,CAAC,UAAU,CAAC,aAAU,aAAa,EAAC,GAAG,EAAE,GAAG,EAC9F,QAAA,EAAA,CAAA,IAAI,EACJ,QAAQ,EACR,OAAO,KACJC,GAAC,CAAA,uBAAuB,IAAC,KAAK,EAAE,kBAAkB,EAAA,QAAA,EAC9CA,GAAK,CAAA,KAAA,EAAA,EAAA,SAAS,EAAE,MAAM,CAAC,iBAAiB,EAAG,QAAA,EAAA,OAAO,GAAO,EACnC,CAAA,CAC7B,CACC,EAAA,CAAA,EACR;AACN,CAAC,EAC8G;AAEnH,UAAU,CAAC,WAAW,GAAG,YAAY,CAAC;AAEtC,UAAU,CAAC,aAAa,GAAG,uBAAuB,CAAC;AACnD,UAAU,CAAC,KAAK,GAAG,eAAe,CAAC;AACnC,UAAU,CAAC,MAAM,GAAG,gBAAgB;;;;"}
@@ -0,0 +1,2 @@
1
+ import { AIResponseFormattedTextProps } from '@hh.ru/magritte-ui-ai-response/types';
2
+ export declare const AIResponseFormattedText: import("react").ForwardRefExoticComponent<AIResponseFormattedTextProps & import("react").RefAttributes<HTMLDivElement>>;
@@ -0,0 +1,25 @@
1
+ import './index.css';
2
+ import { jsx } from 'react/jsx-runtime';
3
+ import { forwardRef } from 'react';
4
+ import classnames from 'classnames';
5
+ import { TextListDefaultPropsContext } from '@hh.ru/magritte-ui-text-list';
6
+ import { TitleDefaultPropsContext } from '@hh.ru/magritte-ui-title';
7
+ import { TextDefaultPropsContext } from '@hh.ru/magritte-ui-typography';
8
+ import { s as styles } from './ai-response-C_tgioSD.js';
9
+
10
+ const DEFAULT_TITLE_PROPS = {
11
+ size: 'small',
12
+ };
13
+ const DEFAULT_TEXT_PROPS = {
14
+ typography: 'paragraph-3-regular',
15
+ };
16
+ const DEFAULT_TEXT_LIST_PROPS = {
17
+ typography: 'paragraph-3-regular',
18
+ };
19
+ const AIResponseFormattedText = forwardRef(({ children, className, ...props }, ref) => {
20
+ return (jsx("div", { ...props, className: classnames(className, styles.aiResponseFormattedText), "data-qa": "ai-response-formatted-text", ref: ref, children: jsx(TextDefaultPropsContext, { props: DEFAULT_TEXT_PROPS, children: jsx(TitleDefaultPropsContext, { props: DEFAULT_TITLE_PROPS, children: jsx(TextListDefaultPropsContext, { props: DEFAULT_TEXT_LIST_PROPS, children: children }) }) }) }));
21
+ });
22
+ AIResponseFormattedText.displayName = 'AIResponseFormattedText';
23
+
24
+ export { AIResponseFormattedText };
25
+ //# sourceMappingURL=FormattedText.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"FormattedText.js","sources":["src/FormattedText.tsx"],"sourcesContent":["import { forwardRef } from 'react';\nimport classnames from 'classnames';\n\nimport { AIResponseFormattedTextProps } from '@hh.ru/magritte-ui-ai-response/types';\nimport { TextListDefaultPropsContext, type TextListProps } from '@hh.ru/magritte-ui-text-list';\nimport { TitleDefaultPropsContext, type TitleProps } from '@hh.ru/magritte-ui-title';\nimport { TextDefaultPropsContext, type TextProps } from '@hh.ru/magritte-ui-typography';\n\nimport styles from './ai-response.less';\n\nconst DEFAULT_TITLE_PROPS: Partial<TitleProps> = {\n size: 'small',\n};\nconst DEFAULT_TEXT_PROPS: Partial<TextProps> = {\n typography: 'paragraph-3-regular',\n};\n\nconst DEFAULT_TEXT_LIST_PROPS: Partial<TextListProps> = {\n typography: 'paragraph-3-regular',\n};\n\nexport const AIResponseFormattedText = forwardRef<HTMLDivElement, AIResponseFormattedTextProps>(\n ({ children, className, ...props }, ref) => {\n return (\n <div\n {...props}\n className={classnames(className, styles.aiResponseFormattedText)}\n data-qa=\"ai-response-formatted-text\"\n ref={ref}\n >\n <TextDefaultPropsContext props={DEFAULT_TEXT_PROPS}>\n <TitleDefaultPropsContext props={DEFAULT_TITLE_PROPS}>\n <TextListDefaultPropsContext props={DEFAULT_TEXT_LIST_PROPS}>\n {children}\n </TextListDefaultPropsContext>\n </TitleDefaultPropsContext>\n </TextDefaultPropsContext>\n </div>\n );\n }\n);\n\nAIResponseFormattedText.displayName = 'AIResponseFormattedText';\n"],"names":["_jsx"],"mappings":";;;;;;;;AAUA,MAAM,mBAAmB,GAAwB;AAC7C,IAAA,IAAI,EAAE,OAAO;CAChB,CAAC;AACF,MAAM,kBAAkB,GAAuB;AAC3C,IAAA,UAAU,EAAE,qBAAqB;CACpC,CAAC;AAEF,MAAM,uBAAuB,GAA2B;AACpD,IAAA,UAAU,EAAE,qBAAqB;CACpC,CAAC;AAEW,MAAA,uBAAuB,GAAG,UAAU,CAC7C,CAAC,EAAE,QAAQ,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,GAAG,KAAI;IACvC,QACIA,gBACQ,KAAK,EACT,SAAS,EAAE,UAAU,CAAC,SAAS,EAAE,MAAM,CAAC,uBAAuB,CAAC,aACxD,4BAA4B,EACpC,GAAG,EAAE,GAAG,EAER,QAAA,EAAAA,GAAA,CAAC,uBAAuB,EAAA,EAAC,KAAK,EAAE,kBAAkB,YAC9CA,GAAC,CAAA,wBAAwB,IAAC,KAAK,EAAE,mBAAmB,EAAA,QAAA,EAChDA,GAAC,CAAA,2BAA2B,IAAC,KAAK,EAAE,uBAAuB,EACtD,QAAA,EAAA,QAAQ,GACiB,EACP,CAAA,EAAA,CACL,EACxB,CAAA,EACR;AACN,CAAC,EACH;AAEF,uBAAuB,CAAC,WAAW,GAAG,yBAAyB;;;;"}
package/Quote.d.ts ADDED
@@ -0,0 +1,2 @@
1
+ import { AIResponseQuoteProps } from '@hh.ru/magritte-ui-ai-response/types';
2
+ export declare const AIResponseQuote: import("react").ForwardRefExoticComponent<AIResponseQuoteProps & import("react").RefAttributes<HTMLDivElement>>;
package/Quote.js ADDED
@@ -0,0 +1,20 @@
1
+ import './index.css';
2
+ import { jsxs, jsx } from 'react/jsx-runtime';
3
+ import { forwardRef } from 'react';
4
+ import classnames from 'classnames';
5
+ import { TextDefaultPropsContext, Text } from '@hh.ru/magritte-ui-typography';
6
+ import { s as styles } from './ai-response-C_tgioSD.js';
7
+
8
+ const DEFAULT_TITLE_PROPS = {
9
+ typography: 'subtitle-2-semibold',
10
+ };
11
+ const DEFAULT_TEXT_PROPS = {
12
+ typography: 'paragraph-3-regular',
13
+ };
14
+ const AIResponseQuote = forwardRef(({ children, className, title, ...props }, ref) => {
15
+ return (jsxs("div", { ...props, className: classnames(className, styles.aiResponseQuote), "data-qa": "ai-response-quote", ref: ref, children: [title && (jsx(TextDefaultPropsContext, { props: DEFAULT_TITLE_PROPS, children: jsx(Text, { children: title }) })), jsx("div", { className: styles.aiResponseQuoteBody, children: jsx(TextDefaultPropsContext, { props: DEFAULT_TEXT_PROPS, children: jsx(Text, { children: children }) }) })] }));
16
+ });
17
+ AIResponseQuote.displayName = 'AIResponseQuote';
18
+
19
+ export { AIResponseQuote };
20
+ //# sourceMappingURL=Quote.js.map
package/Quote.js.map ADDED
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Quote.js","sources":["src/Quote.tsx"],"sourcesContent":["import { forwardRef } from 'react';\nimport classnames from 'classnames';\n\nimport { AIResponseQuoteProps } from '@hh.ru/magritte-ui-ai-response/types';\nimport { Text, TextDefaultPropsContext, type TextProps } from '@hh.ru/magritte-ui-typography';\n\nimport styles from './ai-response.less';\n\nconst DEFAULT_TITLE_PROPS: Partial<TextProps> = {\n typography: 'subtitle-2-semibold',\n};\n\nconst DEFAULT_TEXT_PROPS: Partial<TextProps> = {\n typography: 'paragraph-3-regular',\n};\n\nexport const AIResponseQuote = forwardRef<HTMLDivElement, AIResponseQuoteProps>(\n ({ children, className, title, ...props }, ref) => {\n return (\n <div\n {...props}\n className={classnames(className, styles.aiResponseQuote)}\n data-qa=\"ai-response-quote\"\n ref={ref}\n >\n {title && (\n <TextDefaultPropsContext props={DEFAULT_TITLE_PROPS}>\n <Text>{title}</Text>\n </TextDefaultPropsContext>\n )}\n <div className={styles.aiResponseQuoteBody}>\n <TextDefaultPropsContext props={DEFAULT_TEXT_PROPS}>\n <Text>{children}</Text>\n </TextDefaultPropsContext>\n </div>\n </div>\n );\n }\n);\n\nAIResponseQuote.displayName = 'AIResponseQuote';\n"],"names":["_jsxs","_jsx"],"mappings":";;;;;;AAQA,MAAM,mBAAmB,GAAuB;AAC5C,IAAA,UAAU,EAAE,qBAAqB;CACpC,CAAC;AAEF,MAAM,kBAAkB,GAAuB;AAC3C,IAAA,UAAU,EAAE,qBAAqB;CACpC,CAAC;MAEW,eAAe,GAAG,UAAU,CACrC,CAAC,EAAE,QAAQ,EAAE,SAAS,EAAE,KAAK,EAAE,GAAG,KAAK,EAAE,EAAE,GAAG,KAAI;AAC9C,IAAA,QACIA,IAAA,CAAA,KAAA,EAAA,EAAA,GACQ,KAAK,EACT,SAAS,EAAE,UAAU,CAAC,SAAS,EAAE,MAAM,CAAC,eAAe,CAAC,EAChD,SAAA,EAAA,mBAAmB,EAC3B,GAAG,EAAE,GAAG,EAEP,QAAA,EAAA,CAAA,KAAK,KACFC,GAAC,CAAA,uBAAuB,EAAC,EAAA,KAAK,EAAE,mBAAmB,EAAA,QAAA,EAC/CA,GAAC,CAAA,IAAI,EAAE,EAAA,QAAA,EAAA,KAAK,EAAQ,CAAA,EAAA,CACE,CAC7B,EACDA,GAAK,CAAA,KAAA,EAAA,EAAA,SAAS,EAAE,MAAM,CAAC,mBAAmB,EACtC,QAAA,EAAAA,GAAA,CAAC,uBAAuB,EAAA,EAAC,KAAK,EAAE,kBAAkB,EAAA,QAAA,EAC9CA,GAAC,CAAA,IAAI,EAAE,EAAA,QAAA,EAAA,QAAQ,EAAQ,CAAA,EAAA,CACD,EACxB,CAAA,CAAA,EAAA,CACJ,EACR;AACN,CAAC,EACH;AAEF,eAAe,CAAC,WAAW,GAAG,iBAAiB;;;;"}
package/Widget.d.ts ADDED
@@ -0,0 +1,2 @@
1
+ import { AIResponseWidgetProps } from '@hh.ru/magritte-ui-ai-response/types';
2
+ export declare const AIResponseWidget: import("react").ForwardRefExoticComponent<AIResponseWidgetProps & import("react").RefAttributes<HTMLDivElement>>;
package/Widget.js ADDED
@@ -0,0 +1,14 @@
1
+ import './index.css';
2
+ import { jsxs, jsx } from 'react/jsx-runtime';
3
+ import { forwardRef } from 'react';
4
+ import classnames from 'classnames';
5
+ import { Text } from '@hh.ru/magritte-ui-typography';
6
+ import { s as styles } from './ai-response-C_tgioSD.js';
7
+
8
+ const AIResponseWidget = forwardRef(({ children, className, title, description, ...props }, ref) => {
9
+ return (jsxs("div", { ...props, className: classnames(className, styles.aiResponseWidget), "data-qa": "ai-response-widget", ref: ref, children: [title && (jsxs("div", { className: styles.aiResponseWidgetHeader, children: [jsx("div", { className: styles.aiResponseWidgetTitle, children: jsx(Text, { typography: "label-3-regular", style: "secondary", ellipsis: true, children: title }) }), description && (jsx("div", { className: styles.aiResponseWidgetDescription, children: jsx(Text, { typography: "label-3-regular", style: "secondary", ellipsis: true, children: description }) }))] })), children] }));
10
+ });
11
+ AIResponseWidget.displayName = 'AIResponseWidget';
12
+
13
+ export { AIResponseWidget };
14
+ //# sourceMappingURL=Widget.js.map
package/Widget.js.map ADDED
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Widget.js","sources":["src/Widget.tsx"],"sourcesContent":["import { forwardRef } from 'react';\nimport classnames from 'classnames';\n\nimport { AIResponseWidgetProps } from '@hh.ru/magritte-ui-ai-response/types';\nimport { Text } from '@hh.ru/magritte-ui-typography';\n\nimport styles from './ai-response.less';\n\nexport const AIResponseWidget = forwardRef<HTMLDivElement, AIResponseWidgetProps>(\n ({ children, className, title, description, ...props }, ref) => {\n return (\n <div\n {...props}\n className={classnames(className, styles.aiResponseWidget)}\n data-qa=\"ai-response-widget\"\n ref={ref}\n >\n {title && (\n <div className={styles.aiResponseWidgetHeader}>\n <div className={styles.aiResponseWidgetTitle}>\n <Text typography=\"label-3-regular\" style=\"secondary\" ellipsis>\n {title}\n </Text>\n </div>\n {description && (\n <div className={styles.aiResponseWidgetDescription}>\n <Text typography=\"label-3-regular\" style=\"secondary\" ellipsis>\n {description}\n </Text>\n </div>\n )}\n </div>\n )}\n {children}\n </div>\n );\n }\n);\n\nAIResponseWidget.displayName = 'AIResponseWidget';\n"],"names":["_jsxs","_jsx"],"mappings":";;;;;;MAQa,gBAAgB,GAAG,UAAU,CACtC,CAAC,EAAE,QAAQ,EAAE,SAAS,EAAE,KAAK,EAAE,WAAW,EAAE,GAAG,KAAK,EAAE,EAAE,GAAG,KAAI;AAC3D,IAAA,QACIA,IACQ,CAAA,KAAA,EAAA,EAAA,GAAA,KAAK,EACT,SAAS,EAAE,UAAU,CAAC,SAAS,EAAE,MAAM,CAAC,gBAAgB,CAAC,EAAA,SAAA,EACjD,oBAAoB,EAC5B,GAAG,EAAE,GAAG,EAAA,QAAA,EAAA,CAEP,KAAK,KACFA,IAAK,CAAA,KAAA,EAAA,EAAA,SAAS,EAAE,MAAM,CAAC,sBAAsB,EACzC,QAAA,EAAA,CAAAC,GAAA,CAAA,KAAA,EAAA,EAAK,SAAS,EAAE,MAAM,CAAC,qBAAqB,EAAA,QAAA,EACxCA,IAAC,IAAI,EAAA,EAAC,UAAU,EAAC,iBAAiB,EAAC,KAAK,EAAC,WAAW,EAAC,QAAQ,EACxD,IAAA,EAAA,QAAA,EAAA,KAAK,GACH,EACL,CAAA,EACL,WAAW,KACRA,aAAK,SAAS,EAAE,MAAM,CAAC,2BAA2B,YAC9CA,GAAC,CAAA,IAAI,EAAC,EAAA,UAAU,EAAC,iBAAiB,EAAC,KAAK,EAAC,WAAW,EAAC,QAAQ,EAAA,IAAA,EAAA,QAAA,EACxD,WAAW,EACT,CAAA,EAAA,CACL,CACT,CACC,EAAA,CAAA,CACT,EACA,QAAQ,CAAA,EAAA,CACP,EACR;AACN,CAAC,EACH;AAEF,gBAAgB,CAAC,WAAW,GAAG,kBAAkB;;;;"}
@@ -0,0 +1,5 @@
1
+ import './index.css';
2
+ var styles = {"ai-response":"magritte-ai-response___fHP9l_1-0-1","aiResponse":"magritte-ai-response___fHP9l_1-0-1","ai-response-formatted-text":"magritte-ai-response-formatted-text___qlnHr_1-0-1","aiResponseFormattedText":"magritte-ai-response-formatted-text___qlnHr_1-0-1","ai-response-quote":"magritte-ai-response-quote___EPf0K_1-0-1","aiResponseQuote":"magritte-ai-response-quote___EPf0K_1-0-1","ai-response-quote-body":"magritte-ai-response-quote-body___XcSxJ_1-0-1","aiResponseQuoteBody":"magritte-ai-response-quote-body___XcSxJ_1-0-1","ai-response-widget":"magritte-ai-response-widget___793mH_1-0-1","aiResponseWidget":"magritte-ai-response-widget___793mH_1-0-1","ai-response-widget-header":"magritte-ai-response-widget-header___-0dPU_1-0-1","aiResponseWidgetHeader":"magritte-ai-response-widget-header___-0dPU_1-0-1","ai-response-widget-title":"magritte-ai-response-widget-title___cXgvh_1-0-1","aiResponseWidgetTitle":"magritte-ai-response-widget-title___cXgvh_1-0-1","ai-response-widget-description":"magritte-ai-response-widget-description___cpMDO_1-0-1","aiResponseWidgetDescription":"magritte-ai-response-widget-description___cpMDO_1-0-1","ai-response-actions":"magritte-ai-response-actions___mWyV8_1-0-1","aiResponseActions":"magritte-ai-response-actions___mWyV8_1-0-1"};
3
+
4
+ export { styles as s };
5
+ //# sourceMappingURL=ai-response-C_tgioSD.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ai-response-C_tgioSD.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;"}
package/index.css ADDED
@@ -0,0 +1,51 @@
1
+ :root{
2
+ --magritte-color-background-tertiary-v25-0-0:#DCE3EB;
3
+ }
4
+
5
+ .magritte-night-theme{
6
+ --magritte-color-background-tertiary-v25-0-0:#474747;
7
+ }
8
+ .magritte-ai-response___fHP9l_1-0-1{
9
+ display:flex;
10
+ flex-direction:column;
11
+ gap:16px;
12
+ padding:0 16px;
13
+ }
14
+ .magritte-ai-response-formatted-text___qlnHr_1-0-1{
15
+ display:flex;
16
+ flex-direction:column;
17
+ gap:12px;
18
+ }
19
+ .magritte-ai-response-quote___EPf0K_1-0-1{
20
+ display:flex;
21
+ flex-direction:column;
22
+ gap:8px;
23
+ }
24
+ .magritte-ai-response-quote-body___XcSxJ_1-0-1{
25
+ border-left:2px solid var(--magritte-color-background-tertiary-v25-0-0);
26
+ padding-left:12px;
27
+ }
28
+ .magritte-ai-response-widget___793mH_1-0-1{
29
+ display:flex;
30
+ flex-direction:column;
31
+ gap:12px;
32
+ }
33
+ .magritte-ai-response-widget-header___-0dPU_1-0-1{
34
+ display:flex;
35
+ gap:12px;
36
+ overflow:hidden;
37
+ }
38
+ .magritte-ai-response-widget-title___cXgvh_1-0-1{
39
+ flex:1 1 auto;
40
+ min-width:0;
41
+ }
42
+ .magritte-ai-response-widget-description___cpMDO_1-0-1{
43
+ flex:0 9999 auto;
44
+ min-width:24px;
45
+ text-align:right;
46
+ }
47
+ .magritte-ai-response-actions___mWyV8_1-0-1{
48
+ display:flex;
49
+ flex-wrap:wrap;
50
+ gap:2px;
51
+ }
package/index.d.ts ADDED
@@ -0,0 +1,2 @@
1
+ export * from '@hh.ru/magritte-ui-ai-response/AIResponse';
2
+ export * from '@hh.ru/magritte-ui-ai-response/types';
package/index.js ADDED
@@ -0,0 +1,14 @@
1
+ import './index.css';
2
+ export { AIResponse } from './AIResponse.js';
3
+ import 'react/jsx-runtime';
4
+ import 'react';
5
+ import 'classnames';
6
+ import './FormattedText.js';
7
+ import '@hh.ru/magritte-ui-text-list';
8
+ import '@hh.ru/magritte-ui-title';
9
+ import '@hh.ru/magritte-ui-typography';
10
+ import './ai-response-C_tgioSD.js';
11
+ import './Quote.js';
12
+ import './Widget.js';
13
+ import '@hh.ru/magritte-ui-icon';
14
+ //# sourceMappingURL=index.js.map
package/index.js.map ADDED
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;"}
@@ -0,0 +1,6 @@
1
+ export * from '@hh.ru/magritte-ui-ai-response/types';
2
+ export declare const AIResponse: import("react").ForwardRefExoticComponent<Record<string, unknown>> & {
3
+ FormattedText: import("react").ForwardRefExoticComponent<Record<string, unknown>>;
4
+ Quote: import("react").ForwardRefExoticComponent<Record<string, unknown>>;
5
+ Widget: import("react").ForwardRefExoticComponent<Record<string, unknown>>;
6
+ };
package/index.mock.js ADDED
@@ -0,0 +1,14 @@
1
+ import './index.css';
2
+ import { mockComponent } from '@hh.ru/magritte-ui-mock-component';
3
+
4
+ const FormattedText = mockComponent('AIResponse.FormattedText', undefined, { withChildren: true });
5
+ const Quote = mockComponent('AIResponse.Quote', undefined, { withChildren: true });
6
+ const Widget = mockComponent('AIResponse.Widget', undefined, { withChildren: true });
7
+ const AIResponse = Object.assign(mockComponent('AIResponse', undefined, { withChildren: true }), {
8
+ FormattedText,
9
+ Quote,
10
+ Widget,
11
+ });
12
+
13
+ export { AIResponse };
14
+ //# sourceMappingURL=index.mock.js.map
@@ -0,0 +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 * from '@hh.ru/magritte-ui-ai-response/types';\n\nconst FormattedText = mockComponent('AIResponse.FormattedText', undefined, { withChildren: true });\n\nconst Quote = mockComponent('AIResponse.Quote', undefined, { withChildren: true });\n\nconst Widget = mockComponent('AIResponse.Widget', undefined, { withChildren: true });\n\nexport const AIResponse = Object.assign(mockComponent('AIResponse', undefined, { withChildren: true }), {\n FormattedText,\n Quote,\n Widget,\n});\n"],"names":[],"mappings":";;AAIA,MAAM,aAAa,GAAG,aAAa,CAAC,0BAA0B,EAAE,SAAS,EAAE,EAAE,YAAY,EAAE,IAAI,EAAE,CAAC,CAAC;AAEnG,MAAM,KAAK,GAAG,aAAa,CAAC,kBAAkB,EAAE,SAAS,EAAE,EAAE,YAAY,EAAE,IAAI,EAAE,CAAC,CAAC;AAEnF,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,aAAa;IACb,KAAK;IACL,MAAM;AACT,CAAA;;;;"}
package/package.json ADDED
@@ -0,0 +1,37 @@
1
+ {
2
+ "name": "@hh.ru/magritte-ui-ai-response",
3
+ "version": "1.0.1",
4
+ "main": "index.js",
5
+ "types": "index.d.ts",
6
+ "sideEffects": [
7
+ "index.css"
8
+ ],
9
+ "scripts": {
10
+ "build": "yarn root:build $(pwd)",
11
+ "build-test-branch": "yarn root:build-test-branch $(pwd)",
12
+ "prepack": "yarn root:prepack $(pwd)",
13
+ "postpublish": "yarn root:postpublish $(pwd)",
14
+ "stylelint-check": "yarn root:stylelint-check $(pwd)",
15
+ "eslint-check": "yarn root:eslint-check $(pwd)",
16
+ "ts-config": "yarn root:ts-config $(pwd)",
17
+ "ts-check": "yarn root:ts-check $(pwd)",
18
+ "test": "yarn root:test $(pwd)",
19
+ "watch": "yarn root:watch $(pwd)"
20
+ },
21
+ "dependencies": {
22
+ "@hh.ru/magritte-design-tokens": "25.0.0",
23
+ "@hh.ru/magritte-ui-icon": "15.0.1",
24
+ "@hh.ru/magritte-ui-mock-component": "1.1.7",
25
+ "@hh.ru/magritte-ui-text-list": "1.1.44",
26
+ "@hh.ru/magritte-ui-title": "8.3.8",
27
+ "@hh.ru/magritte-ui-typography": "5.3.11"
28
+ },
29
+ "peerDependencies": {
30
+ "classnames": ">=2.3.2",
31
+ "react": ">=18.2.0"
32
+ },
33
+ "publishConfig": {
34
+ "access": "public"
35
+ },
36
+ "gitHead": "08aac121ba96883fe09737d35cee6bde2263e3b7"
37
+ }
package/types.d.ts ADDED
@@ -0,0 +1,18 @@
1
+ export interface AIResponseProps extends React.HTMLAttributes<HTMLDivElement>, React.PropsWithChildren {
2
+ /** Иконка размера 24px. Всегда отображается вверху компонента. */
3
+ icon?: React.ReactNode;
4
+ /** Набор иконок размера 16px для отображения доступных действий. Всегда отображается внизу компонента. */
5
+ actions?: React.ReactNode;
6
+ }
7
+ export interface AIResponseQuoteProps extends Omit<React.HTMLAttributes<HTMLDivElement>, 'title'>, React.PropsWithChildren {
8
+ /** Заголовок */
9
+ title?: React.ReactNode;
10
+ }
11
+ export interface AIResponseWidgetProps extends Omit<React.HTMLAttributes<HTMLDivElement>, 'title'>, React.PropsWithChildren {
12
+ /** Заголовок */
13
+ title?: React.ReactNode;
14
+ /** Подзаголовок */
15
+ description?: React.ReactNode;
16
+ }
17
+ export interface AIResponseFormattedTextProps extends React.HTMLAttributes<HTMLDivElement>, React.PropsWithChildren {
18
+ }
package/types.js ADDED
@@ -0,0 +1,3 @@
1
+ import './index.css';
2
+
3
+ //# sourceMappingURL=types.js.map
package/types.js.map ADDED
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}