@salutejs/plasma-sb-utils 0.233.0-next-sbcom.0 → 0.234.0-dev.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.
Files changed (126) hide show
  1. package/lib/components/BottomSheet/BottomSheet.d.ts +120 -0
  2. package/lib/components/BottomSheet/BottomSheet.js +40 -0
  3. package/lib/components/BottomSheet/BottomSheet.js.map +1 -0
  4. package/lib/components/BottomSheet/fixtures.d.ts +5 -0
  5. package/lib/components/BottomSheet/fixtures.js +11 -0
  6. package/lib/components/BottomSheet/fixtures.js.map +1 -0
  7. package/lib/components/BottomSheet/index.d.ts +1 -0
  8. package/lib/components/BottomSheet/index.js +2 -0
  9. package/lib/components/BottomSheet/index.js.map +1 -0
  10. package/lib/components/BottomSheet/meta.d.ts +109 -0
  11. package/lib/components/BottomSheet/meta.js +75 -0
  12. package/lib/components/BottomSheet/meta.js.map +1 -0
  13. package/lib/components/BottomSheet/stories.d.ts +8 -0
  14. package/lib/components/BottomSheet/stories.js +58 -0
  15. package/lib/components/BottomSheet/stories.js.map +1 -0
  16. package/lib/components/Dropdown/stories.js +1 -1
  17. package/lib/components/Dropdown/stories.js.map +1 -1
  18. package/lib/components/Rating/Rating.d.ts +164 -0
  19. package/lib/components/Rating/Rating.js +46 -0
  20. package/lib/components/Rating/Rating.js.map +1 -0
  21. package/lib/components/Rating/fixtures.d.ts +4 -0
  22. package/lib/components/Rating/fixtures.js +5 -0
  23. package/lib/components/Rating/fixtures.js.map +1 -0
  24. package/lib/components/Rating/index.d.ts +1 -0
  25. package/lib/components/Rating/index.js +2 -0
  26. package/lib/components/Rating/index.js.map +1 -0
  27. package/lib/components/Rating/meta.d.ts +147 -0
  28. package/lib/components/Rating/meta.js +79 -0
  29. package/lib/components/Rating/meta.js.map +1 -0
  30. package/lib/components/Rating/stories.d.ts +8 -0
  31. package/lib/components/Rating/stories.js +44 -0
  32. package/lib/components/Rating/stories.js.map +1 -0
  33. package/lib/components/TextArea/TextArea.d.ts +4 -8
  34. package/lib/components/TextArea/TextArea.js +4 -0
  35. package/lib/components/TextArea/TextArea.js.map +1 -1
  36. package/lib/components/TextArea/meta.d.ts +0 -8
  37. package/lib/components/TextArea/meta.js +0 -2
  38. package/lib/components/TextArea/meta.js.map +1 -1
  39. package/lib/components/TextArea/stories.d.ts +1 -1
  40. package/lib/components/TextArea/stories.js +3 -3
  41. package/lib/components/TextArea/stories.js.map +1 -1
  42. package/lib/components/_ai/Answer/Answer.d.ts +131 -0
  43. package/lib/components/_ai/Answer/Answer.js +22 -0
  44. package/lib/components/_ai/Answer/Answer.js.map +1 -0
  45. package/lib/components/_ai/Answer/index.d.ts +1 -0
  46. package/lib/components/_ai/Answer/index.js +2 -0
  47. package/lib/components/_ai/Answer/index.js.map +1 -0
  48. package/lib/components/_ai/Answer/meta.d.ts +126 -0
  49. package/lib/components/_ai/Answer/meta.js +88 -0
  50. package/lib/components/_ai/Answer/meta.js.map +1 -0
  51. package/lib/components/_ai/Answer/stories.d.ts +1 -0
  52. package/lib/components/_ai/Answer/stories.js +129 -0
  53. package/lib/components/_ai/Answer/stories.js.map +1 -0
  54. package/lib/components/_ai/Container/Container.d.ts +208 -0
  55. package/lib/components/_ai/Container/Container.js +22 -0
  56. package/lib/components/_ai/Container/Container.js.map +1 -0
  57. package/lib/components/_ai/Container/index.d.ts +1 -0
  58. package/lib/components/_ai/Container/index.js +2 -0
  59. package/lib/components/_ai/Container/index.js.map +1 -0
  60. package/lib/components/_ai/Container/meta.d.ts +203 -0
  61. package/lib/components/_ai/Container/meta.js +144 -0
  62. package/lib/components/_ai/Container/meta.js.map +1 -0
  63. package/lib/components/_ai/Container/stories.d.ts +1 -0
  64. package/lib/components/_ai/Container/stories.js +243 -0
  65. package/lib/components/_ai/Container/stories.js.map +1 -0
  66. package/lib/components/_ai/Header/Header.d.ts +94 -0
  67. package/lib/components/_ai/Header/Header.js +22 -0
  68. package/lib/components/_ai/Header/Header.js.map +1 -0
  69. package/lib/components/_ai/Header/index.d.ts +1 -0
  70. package/lib/components/_ai/Header/index.js +2 -0
  71. package/lib/components/_ai/Header/index.js.map +1 -0
  72. package/lib/components/_ai/Header/meta.d.ts +89 -0
  73. package/lib/components/_ai/Header/meta.js +76 -0
  74. package/lib/components/_ai/Header/meta.js.map +1 -0
  75. package/lib/components/_ai/Header/stories.d.ts +1 -0
  76. package/lib/components/_ai/Header/stories.js +36 -0
  77. package/lib/components/_ai/Header/stories.js.map +1 -0
  78. package/lib/components/_ai/Input/Input.d.ts +109 -0
  79. package/lib/components/_ai/Input/Input.js +21 -0
  80. package/lib/components/_ai/Input/Input.js.map +1 -0
  81. package/lib/components/_ai/Input/index.d.ts +1 -0
  82. package/lib/components/_ai/Input/index.js +2 -0
  83. package/lib/components/_ai/Input/index.js.map +1 -0
  84. package/lib/components/_ai/Input/meta.d.ts +104 -0
  85. package/lib/components/_ai/Input/meta.js +95 -0
  86. package/lib/components/_ai/Input/meta.js.map +1 -0
  87. package/lib/components/_ai/Input/stories.d.ts +1 -0
  88. package/lib/components/_ai/Input/stories.js +103 -0
  89. package/lib/components/_ai/Input/stories.js.map +1 -0
  90. package/lib/components/_ai/Markdown/Markdown.d.ts +69 -0
  91. package/lib/components/_ai/Markdown/Markdown.js +19 -0
  92. package/lib/components/_ai/Markdown/Markdown.js.map +1 -0
  93. package/lib/components/_ai/Markdown/index.d.ts +1 -0
  94. package/lib/components/_ai/Markdown/index.js +2 -0
  95. package/lib/components/_ai/Markdown/index.js.map +1 -0
  96. package/lib/components/_ai/Markdown/meta.d.ts +36 -0
  97. package/lib/components/_ai/Markdown/meta.js +41 -0
  98. package/lib/components/_ai/Markdown/meta.js.map +1 -0
  99. package/lib/components/_ai/Markdown/stories.d.ts +34 -0
  100. package/lib/components/_ai/Markdown/stories.js +94 -0
  101. package/lib/components/_ai/Markdown/stories.js.map +1 -0
  102. package/lib/components/_ai/UserMessage/UserMessage.d.ts +81 -0
  103. package/lib/components/_ai/UserMessage/UserMessage.js +22 -0
  104. package/lib/components/_ai/UserMessage/UserMessage.js.map +1 -0
  105. package/lib/components/_ai/UserMessage/index.d.ts +1 -0
  106. package/lib/components/_ai/UserMessage/index.js +2 -0
  107. package/lib/components/_ai/UserMessage/index.js.map +1 -0
  108. package/lib/components/_ai/UserMessage/meta.d.ts +76 -0
  109. package/lib/components/_ai/UserMessage/meta.js +77 -0
  110. package/lib/components/_ai/UserMessage/meta.js.map +1 -0
  111. package/lib/components/_ai/UserMessage/stories.d.ts +1 -0
  112. package/lib/components/_ai/UserMessage/stories.js +115 -0
  113. package/lib/components/_ai/UserMessage/stories.js.map +1 -0
  114. package/lib/components/_ai/index.d.ts +6 -0
  115. package/lib/components/_ai/index.js +7 -0
  116. package/lib/components/_ai/index.js.map +1 -0
  117. package/lib/components/disabledToolsParameters.d.ts +30 -0
  118. package/lib/components/disabledToolsParameters.js +25 -0
  119. package/lib/components/disabledToolsParameters.js.map +1 -0
  120. package/lib/components/index.d.ts +4 -0
  121. package/lib/components/index.js +4 -0
  122. package/lib/components/index.js.map +1 -1
  123. package/lib/managerVersions.d.ts +29 -0
  124. package/lib/managerVersions.js +69 -0
  125. package/lib/managerVersions.js.map +1 -0
  126. package/package.json +15 -4
@@ -0,0 +1,131 @@
1
+ export declare const getAnswerStories: ({ component, componentConfig, components, decorators }: any) => {
2
+ meta: {
3
+ title: string;
4
+ component: any;
5
+ decorators: any;
6
+ parameters: {
7
+ controls: {
8
+ disableSaveFromUI: boolean;
9
+ };
10
+ };
11
+ argTypes: {
12
+ storyContainerWidth: {
13
+ description: string;
14
+ control: {
15
+ type: string;
16
+ };
17
+ };
18
+ view: {
19
+ description: string;
20
+ options: any;
21
+ control: {
22
+ type: string;
23
+ };
24
+ table: {
25
+ category: string;
26
+ };
27
+ };
28
+ size: {
29
+ description: string;
30
+ options: any;
31
+ control: {
32
+ type: string;
33
+ };
34
+ table: {
35
+ category: string;
36
+ };
37
+ };
38
+ title: {
39
+ description: string;
40
+ control: string;
41
+ table: {
42
+ category: string;
43
+ };
44
+ };
45
+ contentVariant: {
46
+ description: string;
47
+ options: string[];
48
+ control: {
49
+ type: string;
50
+ };
51
+ table: {
52
+ category: string;
53
+ };
54
+ };
55
+ isLoading: {
56
+ description: string;
57
+ control: {
58
+ type: string;
59
+ };
60
+ table: {
61
+ category: string;
62
+ };
63
+ if: {
64
+ arg: string;
65
+ truthy: boolean;
66
+ };
67
+ };
68
+ loaderTitle: {
69
+ description: string;
70
+ control: string;
71
+ table: {
72
+ category: string;
73
+ };
74
+ if: {
75
+ arg: string;
76
+ truthy: boolean;
77
+ };
78
+ };
79
+ isError: {
80
+ description: string;
81
+ control: {
82
+ type: string;
83
+ };
84
+ table: {
85
+ category: string;
86
+ };
87
+ if: {
88
+ arg: string;
89
+ truthy: boolean;
90
+ };
91
+ };
92
+ errorTitle: {
93
+ description: string;
94
+ control: string;
95
+ table: {
96
+ category: string;
97
+ };
98
+ if: {
99
+ arg: string;
100
+ truthy: boolean;
101
+ };
102
+ };
103
+ errorDescription: {
104
+ description: string;
105
+ control: string;
106
+ table: {
107
+ category: string;
108
+ };
109
+ if: {
110
+ arg: string;
111
+ truthy: boolean;
112
+ };
113
+ };
114
+ };
115
+ args: {
116
+ storyContainerWidth: number;
117
+ view: string;
118
+ size: string;
119
+ title: string;
120
+ contentVariant: string;
121
+ isLoading: boolean;
122
+ loaderTitle: string;
123
+ isError: boolean;
124
+ errorTitle: string;
125
+ errorDescription: string;
126
+ };
127
+ };
128
+ Default: {
129
+ render: (args: any) => JSX.Element;
130
+ };
131
+ };
@@ -0,0 +1,22 @@
1
+ var __assign = (this && this.__assign) || function () {
2
+ __assign = Object.assign || function(t) {
3
+ for (var s, i = 1, n = arguments.length; i < n; i++) {
4
+ s = arguments[i];
5
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
6
+ t[p] = s[p];
7
+ }
8
+ return t;
9
+ };
10
+ return __assign.apply(this, arguments);
11
+ };
12
+ import React from 'react';
13
+ import { getConfigVariations } from '../../../helpers';
14
+ import { createMeta } from './meta';
15
+ import { createDefaultStory } from './stories';
16
+ export var getAnswerStories = function (_a) {
17
+ var component = _a.component, componentConfig = _a.componentConfig, components = _a.components, decorators = _a.decorators;
18
+ var meta = createMeta({ component: component, componentConfig: getConfigVariations(componentConfig), decorators: decorators });
19
+ var Story = createDefaultStory(component, components);
20
+ return { meta: meta, Default: { render: function (args) { return React.createElement(Story, __assign({}, args)); } } };
21
+ };
22
+ //# sourceMappingURL=Answer.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Answer.js","sourceRoot":"","sources":["../../../../src/components/_ai/Answer/Answer.tsx"],"names":[],"mappings":";;;;;;;;;;;AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAE,mBAAmB,EAAE,MAAM,kBAAkB,CAAC;AAEvD,OAAO,EAAE,UAAU,EAAE,MAAM,QAAQ,CAAC;AACpC,OAAO,EAAE,kBAAkB,EAAE,MAAM,WAAW,CAAC;AAE/C,MAAM,CAAC,IAAM,gBAAgB,GAAG,UAAC,EAA2D;QAAzD,SAAS,eAAA,EAAE,eAAe,qBAAA,EAAE,UAAU,gBAAA,EAAE,UAAU,gBAAA;IACjF,IAAM,IAAI,GAAG,UAAU,CAAC,EAAE,SAAS,WAAA,EAAE,eAAe,EAAE,mBAAmB,CAAC,eAAe,CAAC,EAAE,UAAU,YAAA,EAAE,CAAC,CAAC;IAC1G,IAAM,KAAK,GAAG,kBAAkB,CAAC,SAAS,EAAE,UAAU,CAAC,CAAC;IACxD,OAAO,EAAE,IAAI,MAAA,EAAE,OAAO,EAAE,EAAE,MAAM,EAAE,UAAC,IAAS,IAAK,OAAA,oBAAC,KAAK,eAAK,IAAI,EAAI,EAAnB,CAAmB,EAAE,EAAE,CAAC;AAC7E,CAAC,CAAC"}
@@ -0,0 +1 @@
1
+ export * from './Answer';
@@ -0,0 +1,2 @@
1
+ export * from './Answer';
2
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/components/_ai/Answer/index.ts"],"names":[],"mappings":"AAAA,cAAc,UAAU,CAAC"}
@@ -0,0 +1,126 @@
1
+ export declare const createMeta: ({ component, componentConfig, decorators }: any) => {
2
+ title: string;
3
+ component: any;
4
+ decorators: any;
5
+ parameters: {
6
+ controls: {
7
+ disableSaveFromUI: boolean;
8
+ };
9
+ };
10
+ argTypes: {
11
+ storyContainerWidth: {
12
+ description: string;
13
+ control: {
14
+ type: string;
15
+ };
16
+ };
17
+ view: {
18
+ description: string;
19
+ options: any;
20
+ control: {
21
+ type: string;
22
+ };
23
+ table: {
24
+ category: string;
25
+ };
26
+ };
27
+ size: {
28
+ description: string;
29
+ options: any;
30
+ control: {
31
+ type: string;
32
+ };
33
+ table: {
34
+ category: string;
35
+ };
36
+ };
37
+ title: {
38
+ description: string;
39
+ control: string;
40
+ table: {
41
+ category: string;
42
+ };
43
+ };
44
+ contentVariant: {
45
+ description: string;
46
+ options: string[];
47
+ control: {
48
+ type: string;
49
+ };
50
+ table: {
51
+ category: string;
52
+ };
53
+ };
54
+ isLoading: {
55
+ description: string;
56
+ control: {
57
+ type: string;
58
+ };
59
+ table: {
60
+ category: string;
61
+ };
62
+ if: {
63
+ arg: string;
64
+ truthy: boolean;
65
+ };
66
+ };
67
+ loaderTitle: {
68
+ description: string;
69
+ control: string;
70
+ table: {
71
+ category: string;
72
+ };
73
+ if: {
74
+ arg: string;
75
+ truthy: boolean;
76
+ };
77
+ };
78
+ isError: {
79
+ description: string;
80
+ control: {
81
+ type: string;
82
+ };
83
+ table: {
84
+ category: string;
85
+ };
86
+ if: {
87
+ arg: string;
88
+ truthy: boolean;
89
+ };
90
+ };
91
+ errorTitle: {
92
+ description: string;
93
+ control: string;
94
+ table: {
95
+ category: string;
96
+ };
97
+ if: {
98
+ arg: string;
99
+ truthy: boolean;
100
+ };
101
+ };
102
+ errorDescription: {
103
+ description: string;
104
+ control: string;
105
+ table: {
106
+ category: string;
107
+ };
108
+ if: {
109
+ arg: string;
110
+ truthy: boolean;
111
+ };
112
+ };
113
+ };
114
+ args: {
115
+ storyContainerWidth: number;
116
+ view: string;
117
+ size: string;
118
+ title: string;
119
+ contentVariant: string;
120
+ isLoading: boolean;
121
+ loaderTitle: string;
122
+ isError: boolean;
123
+ errorTitle: string;
124
+ errorDescription: string;
125
+ };
126
+ };
@@ -0,0 +1,88 @@
1
+ var __assign = (this && this.__assign) || function () {
2
+ __assign = Object.assign || function(t) {
3
+ for (var s, i = 1, n = arguments.length; i < n; i++) {
4
+ s = arguments[i];
5
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
6
+ t[p] = s[p];
7
+ }
8
+ return t;
9
+ };
10
+ return __assign.apply(this, arguments);
11
+ };
12
+ import { disableProps } from '../../../index';
13
+ export var createMeta = function (_a) {
14
+ var component = _a.component, componentConfig = _a.componentConfig, _b = _a.decorators, decorators = _b === void 0 ? [] : _b;
15
+ var views = componentConfig.views, sizes = componentConfig.sizes;
16
+ var contentVariants = ['placeholder', 'text', 'gallery'];
17
+ return {
18
+ title: 'AI Kit/Answer',
19
+ component: component,
20
+ decorators: decorators,
21
+ parameters: {
22
+ controls: {
23
+ disableSaveFromUI: true,
24
+ },
25
+ },
26
+ argTypes: __assign({ storyContainerWidth: {
27
+ description: 'Ширина контейнера стори (только для демонстрации)',
28
+ control: { type: 'number' },
29
+ }, view: {
30
+ description: 'Вид компонента',
31
+ options: views,
32
+ control: { type: 'select' },
33
+ table: { category: 'variation' },
34
+ }, size: {
35
+ description: 'Размер компонента',
36
+ options: sizes,
37
+ control: { type: 'select' },
38
+ table: { category: 'variation' },
39
+ }, title: {
40
+ description: 'Заголовок ответа',
41
+ control: 'text',
42
+ table: { category: 'content-related' },
43
+ }, contentVariant: {
44
+ description: 'Вариант контента для демонстрации',
45
+ options: contentVariants,
46
+ control: { type: 'select' },
47
+ table: { category: 'content-related' },
48
+ }, isLoading: {
49
+ description: 'Состояние загрузки',
50
+ control: { type: 'boolean' },
51
+ table: { category: 'loading-related' },
52
+ if: { arg: 'isError', truthy: false },
53
+ }, loaderTitle: {
54
+ description: 'Заголовок при загрузке',
55
+ control: 'text',
56
+ table: { category: 'loading-related' },
57
+ if: { arg: 'isError', truthy: false },
58
+ }, isError: {
59
+ description: 'Состояние ошибки',
60
+ control: { type: 'boolean' },
61
+ table: { category: 'error-related' },
62
+ if: { arg: 'isLoading', truthy: false },
63
+ }, errorTitle: {
64
+ description: 'Заголовок при ошибке',
65
+ control: 'text',
66
+ table: { category: 'error-related' },
67
+ if: { arg: 'isLoading', truthy: false },
68
+ }, errorDescription: {
69
+ description: 'Подпись при ошибке',
70
+ control: 'text',
71
+ table: { category: 'error-related' },
72
+ if: { arg: 'isLoading', truthy: false },
73
+ } }, disableProps(['title', 'content', 'footer', 'customLoader', 'customError'])),
74
+ args: {
75
+ storyContainerWidth: 800,
76
+ view: 'default',
77
+ size: 'm',
78
+ title: 'Заголовок ответа',
79
+ contentVariant: 'placeholder',
80
+ isLoading: false,
81
+ loaderTitle: 'Генерирую ответ...',
82
+ isError: false,
83
+ errorTitle: 'Произошла ошибка',
84
+ errorDescription: 'Не удалось получить ответ. Попробуйте ещё раз.',
85
+ },
86
+ };
87
+ };
88
+ //# sourceMappingURL=meta.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"meta.js","sourceRoot":"","sources":["../../../../src/components/_ai/Answer/meta.ts"],"names":[],"mappings":";;;;;;;;;;;AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAE9C,MAAM,CAAC,IAAM,UAAU,GAAG,UAAC,EAAoD;QAAlD,SAAS,eAAA,EAAE,eAAe,qBAAA,EAAE,kBAAe,EAAf,UAAU,mBAAG,EAAE,KAAA;IAC5D,IAAA,KAAK,GAAY,eAAe,MAA3B,EAAE,KAAK,GAAK,eAAe,MAApB,CAAqB;IACzC,IAAM,eAAe,GAAG,CAAC,aAAa,EAAE,MAAM,EAAE,SAAS,CAAC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: any) => JSX.Element;
@@ -0,0 +1,129 @@
1
+ var __makeTemplateObject = (this && this.__makeTemplateObject) || function (cooked, raw) {
2
+ if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; }
3
+ return cooked;
4
+ };
5
+ var __assign = (this && this.__assign) || function () {
6
+ __assign = Object.assign || function(t) {
7
+ for (var s, i = 1, n = arguments.length; i < n; i++) {
8
+ s = arguments[i];
9
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
10
+ t[p] = s[p];
11
+ }
12
+ return t;
13
+ };
14
+ return __assign.apply(this, arguments);
15
+ };
16
+ var __rest = (this && this.__rest) || function (s, e) {
17
+ var t = {};
18
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
19
+ t[p] = s[p];
20
+ if (s != null && typeof Object.getOwnPropertySymbols === "function")
21
+ for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
22
+ if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
23
+ t[p[i]] = s[p[i]];
24
+ }
25
+ return t;
26
+ };
27
+ import React from 'react';
28
+ import styled from 'styled-components';
29
+ import { IconCopyOutline, IconHeartDashOutline, IconHeartOutline, IconRefresh } from '@salutejs/plasma-icons';
30
+ export var createDefaultStory = function (Answer, Components) {
31
+ var Flow = Components.Flow, Button = Components.Button, Chip = Components.Chip, ChipGroup = Components.ChipGroup, EmbedIconButton = Components.EmbedIconButton;
32
+ /* stylelint-disable */
33
+ var ContentPlaceholder = styled.div(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n width: 100%;\n height: 240px;\n background: linear-gradient(to right, #9747ff 0.063rem, transparent 0.063rem) 0 0,\n linear-gradient(to right, #9747ff 0.063rem, transparent 0.063rem) 0 100%,\n linear-gradient(to left, #9747ff 0.063rem, transparent 0.063rem) 100% 0,\n linear-gradient(to left, #9747ff 0.063rem, transparent 0.063rem) 100% 100%,\n linear-gradient(to bottom, #9747ff 0.063rem, transparent 0.063rem) 0 0,\n linear-gradient(to bottom, #9747ff 0.063rem, transparent 0.063rem) 100% 0,\n linear-gradient(to top, #9747ff 0.063rem, transparent 0.063rem) 0 100%,\n linear-gradient(to top, #9747ff 0.063rem, transparent 0.063rem) 100% 100%;\n\n background-repeat: no-repeat;\n background-size: 0.5rem 0.5rem;\n\n position: relative;\n\n &:before {\n content: '\u041A\u043E\u043D\u0442\u0435\u043D\u0442';\n position: absolute;\n top: 50%;\n left: 50%;\n transform: translate(-50%, -50%);\n color: #9747ff;\n font-family: var(--plasma-typo-body-xs-font-family);\n font-style: var(--plasma-typo-body-xs-font-style);\n font-weight: var(--plasma-typo-body-xs-font-weight);\n font-size: var(--plasma-typo-body-xs-font-size);\n line-height: var(--plasma-typo-body-xs-line-height);\n letter-spacing: var(--plasma-typo-body-xs-letter-spacing);\n }\n "], ["\n width: 100%;\n height: 240px;\n background: linear-gradient(to right, #9747ff 0.063rem, transparent 0.063rem) 0 0,\n linear-gradient(to right, #9747ff 0.063rem, transparent 0.063rem) 0 100%,\n linear-gradient(to left, #9747ff 0.063rem, transparent 0.063rem) 100% 0,\n linear-gradient(to left, #9747ff 0.063rem, transparent 0.063rem) 100% 100%,\n linear-gradient(to bottom, #9747ff 0.063rem, transparent 0.063rem) 0 0,\n linear-gradient(to bottom, #9747ff 0.063rem, transparent 0.063rem) 100% 0,\n linear-gradient(to top, #9747ff 0.063rem, transparent 0.063rem) 0 100%,\n linear-gradient(to top, #9747ff 0.063rem, transparent 0.063rem) 100% 100%;\n\n background-repeat: no-repeat;\n background-size: 0.5rem 0.5rem;\n\n position: relative;\n\n &:before {\n content: '\u041A\u043E\u043D\u0442\u0435\u043D\u0442';\n position: absolute;\n top: 50%;\n left: 50%;\n transform: translate(-50%, -50%);\n color: #9747ff;\n font-family: var(--plasma-typo-body-xs-font-family);\n font-style: var(--plasma-typo-body-xs-font-style);\n font-weight: var(--plasma-typo-body-xs-font-weight);\n font-size: var(--plasma-typo-body-xs-font-size);\n line-height: var(--plasma-typo-body-xs-line-height);\n letter-spacing: var(--plasma-typo-body-xs-letter-spacing);\n }\n "])));
34
+ /* stylelint-enable */
35
+ var ImagePlaceholder = function () { return (React.createElement("svg", { xmlns: "http://www.w3.org/2000/svg", preserveAspectRatio: "xMinYMin slice", viewBox: "1 0.5 8 8", style: { width: '100px', height: '100px', borderRadius: '1rem', background: 'var(--text-tertiary)' } },
36
+ React.createElement("path", { stroke: "#fff", strokeDasharray: 1, d: "M1 1h7M2 2h7M1 3h7M2 4h7M1 5h7M2 6h7M1 7h7M2 8h7" }))); };
37
+ var Gallery = function () {
38
+ return (React.createElement(Flow, { orientation: "horizontal", arrangement: "start", mainAxisGap: "8px", crossAxisGap: "8px" }, Array.from({ length: 8 }, function (_, i) { return (React.createElement(ImagePlaceholder, { key: i })); })));
39
+ };
40
+ var ActionGroup = function (_a) {
41
+ var size = _a.size;
42
+ var actionSize = function () {
43
+ switch (size) {
44
+ case 's':
45
+ case 'xs':
46
+ return 's';
47
+ default:
48
+ return 'm';
49
+ }
50
+ };
51
+ var actionIconSize = function () {
52
+ switch (size) {
53
+ case 's':
54
+ case 'xs':
55
+ return 'xs';
56
+ default:
57
+ return 's';
58
+ }
59
+ };
60
+ var IconsArray = [
61
+ React.createElement(IconHeartOutline, { color: "inherit", size: actionIconSize() }),
62
+ React.createElement(IconHeartDashOutline, { color: "inherit", size: actionIconSize() }),
63
+ React.createElement(IconCopyOutline, { color: "inherit", size: actionIconSize() }),
64
+ React.createElement(IconRefresh, { color: "inherit", size: actionIconSize() }),
65
+ ];
66
+ return (React.createElement(Flow, { orientation: "horizontal", arrangement: "start", mainAxisGap: "8px", crossAxisGap: "8px" }, IconsArray.map(function (Icon, i) { return (React.createElement(EmbedIconButton, { size: actionSize(), view: "secondary", key: i }, Icon)); })));
67
+ };
68
+ var ButtonGroup = function (_a) {
69
+ var size = _a.size;
70
+ var buttonSize = function () {
71
+ switch (size) {
72
+ case 'xl':
73
+ return 'm';
74
+ case 'l':
75
+ case 'm':
76
+ return 's';
77
+ case 's':
78
+ case 'xs':
79
+ return 'xs';
80
+ default:
81
+ return 's';
82
+ }
83
+ };
84
+ return (React.createElement(Flow, { orientation: "horizontal", arrangement: "spaceBetween", alignment: "center", mainAxisGap: "8px", style: {
85
+ width: '100%',
86
+ } },
87
+ React.createElement(ActionGroup, { size: size }),
88
+ React.createElement(Button, { size: buttonSize(), view: "secondary" }, "\u041F\u0435\u0440\u0435\u0439\u0442\u0438 \u0432 \u0438\u0441\u0442\u043E\u0447\u043D\u0438\u043A")));
89
+ };
90
+ var Suggestions = function (_a) {
91
+ var size = _a.size;
92
+ var chipGroupSize = function () {
93
+ switch (size) {
94
+ case 'xl':
95
+ return 'l';
96
+ case 'l':
97
+ return 'm';
98
+ case 'm':
99
+ return 's';
100
+ case 's':
101
+ case 'xs':
102
+ return 'xs';
103
+ default:
104
+ return 's';
105
+ }
106
+ };
107
+ return (React.createElement(ChipGroup, { size: chipGroupSize(), gap: "wide", style: { flexDirection: 'column', width: 'fit-content' } }, Array.from({ length: 3 }, function (_, i) { return (React.createElement(Chip, { key: i, text: "\u0412\u0430\u0440\u0438\u0430\u043D\u0442 \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044F ".concat(i), hasClear: false, pilled: true })); })));
108
+ };
109
+ var Footer = function (_a) {
110
+ var size = _a.size;
111
+ return (React.createElement(Flow, { orientation: "vertical", mainAxisGap: "20px" },
112
+ React.createElement(ButtonGroup, { size: size }),
113
+ React.createElement(Suggestions, { size: size })));
114
+ };
115
+ var contentVariantMap = {
116
+ placeholder: React.createElement(ContentPlaceholder, null),
117
+ gallery: React.createElement(Gallery, null),
118
+ text: 'Это содержимое ответа. Здесь может быть любой текст или React-элементы.',
119
+ };
120
+ var StoryDefault = function (_a) {
121
+ var _b;
122
+ var storyContainerWidth = _a.storyContainerWidth, contentVariant = _a.contentVariant, args = __rest(_a, ["storyContainerWidth", "contentVariant"]);
123
+ return (React.createElement("div", { style: { width: "".concat(storyContainerWidth, "px"), maxWidth: '100%' } },
124
+ React.createElement(Answer, __assign({}, args, { content: contentVariantMap[contentVariant], footer: React.createElement(Footer, { size: (_b = args.size) !== null && _b !== void 0 ? _b : 'm' }) }))));
125
+ };
126
+ return StoryDefault;
127
+ };
128
+ var templateObject_1;
129
+ //# sourceMappingURL=stories.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"stories.js","sourceRoot":"","sources":["../../../../src/components/_ai/Answer/stories.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,MAAM,MAAM,mBAAmB,CAAC;AACvC,OAAO,EAAE,eAAe,EAAE,oBAAoB,EAAE,gBAAgB,EAAE,WAAW,EAAE,MAAM,wBAAwB,CAAC;AAE9G,MAAM,CAAC,IAAM,kBAAkB,GAAG,UAAC,MAAW,EAAE,UAAe;IACnD,IAAA,IAAI,GAA+C,UAAU,KAAzD,EAAE,MAAM,GAAuC,UAAU,OAAjD,EAAE,IAAI,GAAiC,UAAU,KAA3C,EAAE,SAAS,GAAsB,UAAU,UAAhC,EAAE,eAAe,GAAK,UAAU,gBAAf,CAAgB;IAEtE,uBAAuB;IACvB,IAAM,kBAAkB,GAAG,MAAM,CAAC,GAAG,mjDAAA,g/CA+BpC,IAAA,CAAC;IACF,sBAAsB;IAEtB,IAAM,gBAAgB,GAAG,cAAM,OAAA,CAC3B,6BACI,KAAK,EAAC,4BAA4B,EAClC,mBAAmB,EAAC,gBAAgB,EACpC,OAAO,EAAC,WAAW,EACnB,KAAK,EAAE,EAAE,KAAK,EAAE,OAAO,EAAE,MAAM,EAAE,OAAO,EAAE,YAAY,EAAE,MAAM,EAAE,UAAU,EAAE,sBAAsB,EAAE;QAEpG,8BAAM,MAAM,EAAC,MAAM,EAAC,eAAe,EAAE,CAAC,EAAE,CAAC,EAAC,kDAAkD,GAAG,CAC7F,CACT,EAT8B,CAS9B,CAA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