@gooddata/sdk-ui-gen-ai 10.12.0-alpha.3

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 (197) hide show
  1. package/LICENSE +7 -0
  2. package/NOTICE +69049 -0
  3. package/README.md +27 -0
  4. package/esm/components/EmptyState.d.ts +3 -0
  5. package/esm/components/EmptyState.d.ts.map +1 -0
  6. package/esm/components/EmptyState.js +40 -0
  7. package/esm/components/EmptyState.js.map +1 -0
  8. package/esm/components/GenAIChat.d.ts +27 -0
  9. package/esm/components/GenAIChat.d.ts.map +1 -0
  10. package/esm/components/GenAIChat.js +17 -0
  11. package/esm/components/GenAIChat.js.map +1 -0
  12. package/esm/components/GenAIChatDialog.d.ts +12 -0
  13. package/esm/components/GenAIChatDialog.d.ts.map +1 -0
  14. package/esm/components/GenAIChatDialog.js +15 -0
  15. package/esm/components/GenAIChatDialog.js.map +1 -0
  16. package/esm/components/GenAIChatOverlay.d.ts +6 -0
  17. package/esm/components/GenAIChatOverlay.d.ts.map +1 -0
  18. package/esm/components/GenAIChatOverlay.js +30 -0
  19. package/esm/components/GenAIChatOverlay.js.map +1 -0
  20. package/esm/components/GenAIChatWrapper.d.ts +7 -0
  21. package/esm/components/GenAIChatWrapper.d.ts.map +1 -0
  22. package/esm/components/GenAIChatWrapper.js +16 -0
  23. package/esm/components/GenAIChatWrapper.js.map +1 -0
  24. package/esm/components/HeaderIcon.d.ts +12 -0
  25. package/esm/components/HeaderIcon.d.ts.map +1 -0
  26. package/esm/components/HeaderIcon.js +11 -0
  27. package/esm/components/HeaderIcon.js.map +1 -0
  28. package/esm/components/Input.d.ts +5 -0
  29. package/esm/components/Input.d.ts.map +1 -0
  30. package/esm/components/Input.js +50 -0
  31. package/esm/components/Input.js.map +1 -0
  32. package/esm/components/Messages.d.ts +3 -0
  33. package/esm/components/Messages.d.ts.map +1 -0
  34. package/esm/components/Messages.js +49 -0
  35. package/esm/components/Messages.js.map +1 -0
  36. package/esm/components/SendIcon.d.ts +7 -0
  37. package/esm/components/SendIcon.d.ts.map +1 -0
  38. package/esm/components/SendIcon.js +10 -0
  39. package/esm/components/SendIcon.js.map +1 -0
  40. package/esm/components/messages/AgentIcon.d.ts +8 -0
  41. package/esm/components/messages/AgentIcon.d.ts.map +1 -0
  42. package/esm/components/messages/AgentIcon.js +32 -0
  43. package/esm/components/messages/AgentIcon.js.map +1 -0
  44. package/esm/components/messages/AgentState.d.ts +3 -0
  45. package/esm/components/messages/AgentState.d.ts.map +1 -0
  46. package/esm/components/messages/AgentState.js +10 -0
  47. package/esm/components/messages/AgentState.js.map +1 -0
  48. package/esm/components/messages/AssistantErrorMessage.d.ts +8 -0
  49. package/esm/components/messages/AssistantErrorMessage.d.ts.map +1 -0
  50. package/esm/components/messages/AssistantErrorMessage.js +10 -0
  51. package/esm/components/messages/AssistantErrorMessage.js.map +1 -0
  52. package/esm/components/messages/AssistantSearchCreateMessage.d.ts +8 -0
  53. package/esm/components/messages/AssistantSearchCreateMessage.d.ts.map +1 -0
  54. package/esm/components/messages/AssistantSearchCreateMessage.js +14 -0
  55. package/esm/components/messages/AssistantSearchCreateMessage.js.map +1 -0
  56. package/esm/components/messages/AssistantTextMessage.d.ts +8 -0
  57. package/esm/components/messages/AssistantTextMessage.d.ts.map +1 -0
  58. package/esm/components/messages/AssistantTextMessage.js +10 -0
  59. package/esm/components/messages/AssistantTextMessage.js.map +1 -0
  60. package/esm/components/messages/SystemMessage.d.ts +8 -0
  61. package/esm/components/messages/SystemMessage.d.ts.map +1 -0
  62. package/esm/components/messages/SystemMessage.js +7 -0
  63. package/esm/components/messages/SystemMessage.js.map +1 -0
  64. package/esm/components/messages/UserMessage.d.ts +8 -0
  65. package/esm/components/messages/UserMessage.d.ts.map +1 -0
  66. package/esm/components/messages/UserMessage.js +8 -0
  67. package/esm/components/messages/UserMessage.js.map +1 -0
  68. package/esm/components/messages/Visualization.d.ts +8 -0
  69. package/esm/components/messages/Visualization.d.ts.map +1 -0
  70. package/esm/components/messages/Visualization.js +12 -0
  71. package/esm/components/messages/Visualization.js.map +1 -0
  72. package/esm/components/messages/index.d.ts +4 -0
  73. package/esm/components/messages/index.d.ts.map +1 -0
  74. package/esm/components/messages/index.js +5 -0
  75. package/esm/components/messages/index.js.map +1 -0
  76. package/esm/components/messages/useExecution.d.ts +3 -0
  77. package/esm/components/messages/useExecution.d.ts.map +1 -0
  78. package/esm/components/messages/useExecution.js +29 -0
  79. package/esm/components/messages/useExecution.js.map +1 -0
  80. package/esm/hooks/useGenAIStore.d.ts +25 -0
  81. package/esm/hooks/useGenAIStore.d.ts.map +1 -0
  82. package/esm/hooks/useGenAIStore.js +15 -0
  83. package/esm/hooks/useGenAIStore.js.map +1 -0
  84. package/esm/index.d.ts +9 -0
  85. package/esm/index.d.ts.map +1 -0
  86. package/esm/index.js +3 -0
  87. package/esm/index.js.map +1 -0
  88. package/esm/internal.d.ts +3 -0
  89. package/esm/internal.d.ts.map +1 -0
  90. package/esm/internal.js +3 -0
  91. package/esm/internal.js.map +1 -0
  92. package/esm/localization/IntlWrapper.d.ts +13 -0
  93. package/esm/localization/IntlWrapper.d.ts.map +1 -0
  94. package/esm/localization/IntlWrapper.js +13 -0
  95. package/esm/localization/IntlWrapper.js.map +1 -0
  96. package/esm/localization/bundles/de-DE.json +1 -0
  97. package/esm/localization/bundles/en-AU.json +1 -0
  98. package/esm/localization/bundles/en-GB.json +1 -0
  99. package/esm/localization/bundles/en-US.json +1 -0
  100. package/esm/localization/bundles/es-419.json +1 -0
  101. package/esm/localization/bundles/es-ES.json +1 -0
  102. package/esm/localization/bundles/fi-FI.json +1 -0
  103. package/esm/localization/bundles/fr-CA.json +1 -0
  104. package/esm/localization/bundles/fr-FR.json +1 -0
  105. package/esm/localization/bundles/it-IT.json +1 -0
  106. package/esm/localization/bundles/ja-JP.json +1 -0
  107. package/esm/localization/bundles/nl-NL.json +1 -0
  108. package/esm/localization/bundles/pt-BR.json +1 -0
  109. package/esm/localization/bundles/pt-PT.json +1 -0
  110. package/esm/localization/bundles/ru-RU.json +1 -0
  111. package/esm/localization/bundles/zh-HK.json +1 -0
  112. package/esm/localization/bundles/zh-Hans.json +1 -0
  113. package/esm/localization/bundles/zh-Hant.json +1 -0
  114. package/esm/localization/translations.d.ts +4 -0
  115. package/esm/localization/translations.d.ts.map +1 -0
  116. package/esm/localization/translations.js +41 -0
  117. package/esm/localization/translations.js.map +1 -0
  118. package/esm/model.d.ts +73 -0
  119. package/esm/model.d.ts.map +1 -0
  120. package/esm/model.js +43 -0
  121. package/esm/model.js.map +1 -0
  122. package/esm/sdk-ui-gen-ai.d.ts +100 -0
  123. package/esm/store/agent/agentSelectors.d.ts +3 -0
  124. package/esm/store/agent/agentSelectors.d.ts.map +1 -0
  125. package/esm/store/agent/agentSelectors.js +6 -0
  126. package/esm/store/agent/agentSelectors.js.map +1 -0
  127. package/esm/store/agent/agentSlice.d.ts +8 -0
  128. package/esm/store/agent/agentSlice.d.ts.map +1 -0
  129. package/esm/store/agent/agentSlice.js +21 -0
  130. package/esm/store/agent/agentSlice.js.map +1 -0
  131. package/esm/store/index.d.ts +7 -0
  132. package/esm/store/index.d.ts.map +1 -0
  133. package/esm/store/index.js +7 -0
  134. package/esm/store/index.js.map +1 -0
  135. package/esm/store/messages/messagesSelectors.d.ts +8 -0
  136. package/esm/store/messages/messagesSelectors.d.ts.map +1 -0
  137. package/esm/store/messages/messagesSelectors.js +17 -0
  138. package/esm/store/messages/messagesSelectors.js.map +1 -0
  139. package/esm/store/messages/messagesSlice.d.ts +12 -0
  140. package/esm/store/messages/messagesSlice.d.ts.map +1 -0
  141. package/esm/store/messages/messagesSlice.js +36 -0
  142. package/esm/store/messages/messagesSlice.js.map +1 -0
  143. package/esm/store/sideEffects/converters/evalToMessage.d.ts +7 -0
  144. package/esm/store/sideEffects/converters/evalToMessage.d.ts.map +1 -0
  145. package/esm/store/sideEffects/converters/evalToMessage.js +14 -0
  146. package/esm/store/sideEffects/converters/evalToMessage.js.map +1 -0
  147. package/esm/store/sideEffects/converters/messagesToHistory.d.ts +4 -0
  148. package/esm/store/sideEffects/converters/messagesToHistory.d.ts.map +1 -0
  149. package/esm/store/sideEffects/converters/messagesToHistory.js +71 -0
  150. package/esm/store/sideEffects/converters/messagesToHistory.js.map +1 -0
  151. package/esm/store/sideEffects/index.d.ts +6 -0
  152. package/esm/store/sideEffects/index.d.ts.map +1 -0
  153. package/esm/store/sideEffects/index.js +15 -0
  154. package/esm/store/sideEffects/index.js.map +1 -0
  155. package/esm/store/sideEffects/onNewMessage.d.ts +9 -0
  156. package/esm/store/sideEffects/onNewMessage.d.ts.map +1 -0
  157. package/esm/store/sideEffects/onNewMessage.js +71 -0
  158. package/esm/store/sideEffects/onNewMessage.js.map +1 -0
  159. package/esm/store/sideEffects/onVerboseStore.d.ts +6 -0
  160. package/esm/store/sideEffects/onVerboseStore.d.ts.map +1 -0
  161. package/esm/store/sideEffects/onVerboseStore.js +18 -0
  162. package/esm/store/sideEffects/onVerboseStore.js.map +1 -0
  163. package/esm/store/sideEffects/utils.d.ts +2 -0
  164. package/esm/store/sideEffects/utils.d.ts.map +1 -0
  165. package/esm/store/sideEffects/utils.js +12 -0
  166. package/esm/store/sideEffects/utils.js.map +1 -0
  167. package/esm/store/store.d.ts +26 -0
  168. package/esm/store/store.d.ts.map +1 -0
  169. package/esm/store/store.js +36 -0
  170. package/esm/store/store.js.map +1 -0
  171. package/esm/store/types.d.ts +7 -0
  172. package/esm/store/types.d.ts.map +1 -0
  173. package/esm/store/types.js +4 -0
  174. package/esm/store/types.js.map +1 -0
  175. package/esm/tsdoc-metadata.json +11 -0
  176. package/package.json +127 -0
  177. package/styles/css/agentIcon.css +92 -0
  178. package/styles/css/agentIcon.css.map +1 -0
  179. package/styles/css/agentState.css +29 -0
  180. package/styles/css/agentState.css.map +1 -0
  181. package/styles/css/input.css +152 -0
  182. package/styles/css/input.css.map +1 -0
  183. package/styles/css/main.css +456 -0
  184. package/styles/css/main.css.map +1 -0
  185. package/styles/css/messages.css +94 -0
  186. package/styles/css/messages.css.map +1 -0
  187. package/styles/css/variables.css +3 -0
  188. package/styles/css/variables.css.map +1 -0
  189. package/styles/css/window.css +100 -0
  190. package/styles/css/window.css.map +1 -0
  191. package/styles/scss/agentIcon.scss +122 -0
  192. package/styles/scss/agentState.scss +31 -0
  193. package/styles/scss/input.scss +107 -0
  194. package/styles/scss/main.scss +26 -0
  195. package/styles/scss/messages.scss +111 -0
  196. package/styles/scss/variables.scss +4 -0
  197. package/styles/scss/window.scss +122 -0
@@ -0,0 +1,122 @@
1
+ // (C) 2024 GoodData Corporation
2
+
3
+ @use "sass:color";
4
+ @use "variables" as variables;
5
+ @use "@gooddata/sdk-ui-kit/styles/scss/variables" as kit-variables;
6
+ @use "@gooddata/sdk-ui-kit/styles/scss/mixins" as kit-mixins;
7
+ @use "@gooddata/sdk-ui-kit/styles/scss/Form/mixins" as form-mixins;
8
+
9
+ // Needed for spinner as a mid-point color
10
+ $gd-palette-primary-base-midpoint: color-mix(
11
+ in sRGB,
12
+ kit-variables.$gd-color-highlight 50%,
13
+ kit-variables.$gd-palette-primary-dimmed 50%
14
+ );
15
+
16
+ .gd-gen-ai-chat__agent_icon {
17
+ width: 32px;
18
+ height: 32px;
19
+ flex-shrink: 0;
20
+
21
+ &__background {
22
+ fill: kit-variables.$gd-palette-primary-dimmed;
23
+ }
24
+
25
+ &__circle {
26
+ fill: none;
27
+ stroke-width: 2px;
28
+ transform: translate(16px, 16px);
29
+ }
30
+
31
+ &__star {
32
+ fill: kit-variables.$gd-palette-primary-base;
33
+ }
34
+
35
+ &--loading & {
36
+ &__circle {
37
+ animation: gd-gen-ai-chat__agent_icon--rotation 2s linear infinite;
38
+ }
39
+
40
+ &__star--flickr {
41
+ $duration: 2s;
42
+
43
+ animation: gd-gen-ai-chat__agent_icon--flickr $duration linear infinite;
44
+
45
+ &--delay {
46
+ animation-delay: calc($duration / 3);
47
+ }
48
+ }
49
+ }
50
+
51
+ &--appear & {
52
+ &__background {
53
+ animation: gd-gen-ai-chat__agent_icon--appear 0.3s ease-out;
54
+ }
55
+ }
56
+
57
+ &--error & {
58
+ &__background {
59
+ fill: none;
60
+ stroke-width: 1px;
61
+ stroke: kit-variables.$gd-palette-error-dimmed;
62
+ animation: gd-gen-ai-chat__agent_icon--appear--error 0.3s ease-out;
63
+ }
64
+ }
65
+
66
+ &__grad {
67
+ &--from {
68
+ stop-color: kit-variables.$gd-palette-primary-base;
69
+ }
70
+ &--mid {
71
+ stop-color: $gd-palette-primary-base-midpoint;
72
+ }
73
+ &--to {
74
+ stop-color: kit-variables.$gd-palette-primary-base-t80;
75
+ }
76
+ }
77
+ }
78
+
79
+ @keyframes gd-gen-ai-chat__agent_icon--rotation {
80
+ 0% {
81
+ transform: translate(16px, 16px) rotate(0deg);
82
+ }
83
+ 100% {
84
+ transform: translate(16px, 16px) rotate(360deg);
85
+ }
86
+ }
87
+
88
+ @keyframes gd-gen-ai-chat__agent_icon--flickr {
89
+ 0% {
90
+ opacity: 1;
91
+ }
92
+ 50% {
93
+ opacity: 0;
94
+ }
95
+ 100% {
96
+ opacity: 1;
97
+ }
98
+ }
99
+
100
+ @keyframes gd-gen-ai-chat__agent_icon--appear {
101
+ 0% {
102
+ fill: kit-variables.$gd-palette-primary-dimmed;
103
+ }
104
+ 50% {
105
+ fill: kit-variables.$gd-palette-primary-base;
106
+ }
107
+ 100% {
108
+ fill: kit-variables.$gd-palette-primary-dimmed;
109
+ }
110
+ }
111
+
112
+ @keyframes gd-gen-ai-chat__agent_icon--appear--error {
113
+ 0% {
114
+ fill: #fff0;
115
+ }
116
+ 50% {
117
+ fill: kit-variables.$gd-palette-error-dimmed;
118
+ }
119
+ 100% {
120
+ fill: #fff0;
121
+ }
122
+ }
@@ -0,0 +1,31 @@
1
+ // (C) 2024 GoodData Corporation
2
+
3
+ @use "sass:color";
4
+ @use "variables" as variables;
5
+ @use "@gooddata/sdk-ui-kit/styles/scss/variables" as kit-variables;
6
+ @use "@gooddata/sdk-ui-kit/styles/scss/mixins" as kit-mixins;
7
+ @use "@gooddata/sdk-ui-kit/styles/scss/Form/mixins" as form-mixins;
8
+
9
+ .gd-gen-ai-chat__agent_state {
10
+ display: flex;
11
+ flex-direction: row;
12
+ gap: 10px;
13
+ align-items: center;
14
+ margin-bottom: 39px;
15
+
16
+ &__status {
17
+ animation: gd-gen-ai-agent-state 3s infinite linear;
18
+ }
19
+ }
20
+
21
+ @keyframes gd-gen-ai-agent-state {
22
+ 0% {
23
+ opacity: 1;
24
+ }
25
+ 50% {
26
+ opacity: 0.3;
27
+ }
28
+ 100% {
29
+ opacity: 1;
30
+ }
31
+ }
@@ -0,0 +1,107 @@
1
+ // (C) 2024 GoodData Corporation
2
+
3
+ @use "sass:color";
4
+ @use "@gooddata/sdk-ui-kit/styles/scss/variables" as kit-variables;
5
+ @use "@gooddata/sdk-ui-kit/styles/scss/mixins" as kit-mixins;
6
+ @use "@gooddata/sdk-ui-kit/styles/scss/Form/mixins" as form-mixins;
7
+ @use "variables" as variables;
8
+
9
+ .gd-gen-ai-chat__input {
10
+ position: relative;
11
+ margin: 0 variables.$x-spacing;
12
+
13
+ &__textarea {
14
+ @include form-mixins.gd-input-base;
15
+ @include kit-mixins.border-radius(3px);
16
+ @include kit-mixins.box-shadow(
17
+ inset 0 1px 1px 0 color.adjust(kit-variables.$gd-input-text-box-shadow-color, $alpha: -0.85)
18
+ );
19
+
20
+ @include kit-mixins.placeholder {
21
+ color: var(
22
+ --gd-palette-complementary-6,
23
+ color.adjust(kit-variables.$default-gd-color-link, $alpha: -0.25)
24
+ );
25
+
26
+ @include kit-mixins.transition(color, 0.25s, ease-in-out);
27
+ }
28
+
29
+ resize: none;
30
+ box-sizing: border-box;
31
+ width: 100%;
32
+ outline: 0;
33
+ overflow: hidden;
34
+ padding-right: 30px; // Make space for the send button
35
+
36
+ &:hover {
37
+ @include kit-mixins.placeholder {
38
+ color: kit-variables.$gd-color-link;
39
+ }
40
+
41
+ border-color: kit-variables.$gd-input-text-hover-border;
42
+ }
43
+
44
+ &:focus {
45
+ @include kit-mixins.box-shadow(
46
+ inset 0 1px 1px 0 color.adjust(kit-variables.$gd-input-text-box-shadow-color, $alpha: -0.8)
47
+ );
48
+
49
+ outline: 0;
50
+ border-color: kit-variables.$gd-palette-primary-base;
51
+ }
52
+
53
+ &:disabled,
54
+ &.disabled {
55
+ &,
56
+ &:hover {
57
+ @include kit-mixins.box-shadow(none);
58
+
59
+ color: kit-variables.$gd-color-disabled;
60
+ border-color: kit-variables.$gd-input-text-border;
61
+ background-color: kit-variables.$gd-color-light;
62
+ }
63
+ }
64
+ }
65
+
66
+ &__send_button {
67
+ @include kit-mixins.transition(all, 0.25s, ease-in-out);
68
+
69
+ position: absolute;
70
+ top: 8.5px; // (line-height - own-height) / 2
71
+ height: 15px;
72
+ right: 10px;
73
+ cursor: pointer;
74
+
75
+ & path {
76
+ fill: kit-variables.$gd-color-link;
77
+ }
78
+
79
+ &:hover path {
80
+ fill: kit-variables.$gd-palette-primary-base;
81
+ }
82
+
83
+ &--disabled,
84
+ &--disabled:hover {
85
+ cursor: default;
86
+
87
+ path {
88
+ fill: kit-variables.$gd-color-disabled;
89
+ }
90
+ }
91
+ }
92
+
93
+ &:focus-within &__send_button {
94
+ path {
95
+ fill: kit-variables.$gd-palette-primary-base;
96
+ }
97
+
98
+ &--disabled,
99
+ &--disabled:hover {
100
+ cursor: default;
101
+
102
+ path {
103
+ fill: kit-variables.$gd-color-disabled;
104
+ }
105
+ }
106
+ }
107
+ }
@@ -0,0 +1,26 @@
1
+ // (C) 2024 GoodData Corporation
2
+ @use "@gooddata/sdk-ui-kit/styles/scss/variables" as kit-variables;
3
+
4
+ @use "input";
5
+ @use "variables" as variables;
6
+ @use "messages";
7
+ @use "agentState";
8
+ @use "agentIcon";
9
+ @use "window";
10
+
11
+ .gd-gen-ai-chat {
12
+ display: flex;
13
+ flex-direction: column;
14
+ justify-content: flex-end;
15
+ gap: variables.$y-spacing;
16
+ width: 100%;
17
+ height: 100%;
18
+ background-color: kit-variables.$gd-color-light;
19
+
20
+ & &__disclaimer {
21
+ font-size: 12px;
22
+ color: kit-variables.$gd-color-state-blank;
23
+ text-align: center;
24
+ margin: 0 variables.$x-spacing variables.$y-spacing;
25
+ }
26
+ }
@@ -0,0 +1,111 @@
1
+ // (C) 2024 GoodData Corporation
2
+
3
+ @use "sass:color";
4
+ @use "variables" as variables;
5
+ @use "@gooddata/sdk-ui-kit/styles/scss/variables" as kit-variables;
6
+ @use "@gooddata/sdk-ui-kit/styles/scss/mixins" as kit-mixins;
7
+ @use "@gooddata/sdk-ui-kit/styles/scss/Form/mixins" as form-mixins;
8
+
9
+ .gd-gen-ai-chat__messages {
10
+ flex: 1;
11
+ overflow-y: auto;
12
+ padding: variables.$y-spacing variables.$x-spacing 0;
13
+
14
+ &__scroll {
15
+ display: flex;
16
+ flex-direction: column;
17
+ gap: 15px;
18
+ }
19
+
20
+ &__message {
21
+ display: flex;
22
+
23
+ &--user {
24
+ $tail-height: 7px;
25
+ $tail-width: 10px;
26
+
27
+ max-width: 80%;
28
+ background-color: kit-variables.$gd-palette-primary-base;
29
+ border-radius: 3px 3px 0 3px;
30
+ padding: 4.5px 12px;
31
+ position: relative;
32
+ align-self: flex-end;
33
+ margin-bottom: 29px;
34
+ animation: gd-gen-ai-message-in 0.3s ease-out;
35
+
36
+ &::after {
37
+ content: "";
38
+ position: absolute;
39
+ bottom: -$tail-height;
40
+ right: 0;
41
+ border: 0 solid transparent;
42
+ border-top: $tail-height solid kit-variables.$gd-palette-primary-base;
43
+ border-left-width: $tail-width;
44
+ width: 0;
45
+ height: 0;
46
+ }
47
+
48
+ .gd-gen-ai-chat__messages__contents {
49
+ color: kit-variables.$gd-color-white;
50
+ }
51
+ }
52
+
53
+ &--assistant {
54
+ display: flex;
55
+ flex-direction: row;
56
+ gap: 10px;
57
+ align-items: flex-start;
58
+ margin-bottom: 39px;
59
+ }
60
+
61
+ &--error .gd-gen-ai-chat__messages__contents {
62
+ flex: unset;
63
+ padding: 4.5px 12px;
64
+ border-radius: 3px;
65
+ background: kit-variables.$gd-palette-error-dimmed;
66
+ color: kit-variables.$gd-palette-error-base;
67
+ }
68
+ }
69
+
70
+ &__contents {
71
+ flex: 1;
72
+ padding: 4.5px 0;
73
+ }
74
+
75
+ &__empty {
76
+ display: flex;
77
+ flex-direction: column;
78
+ align-items: flex-start;
79
+
80
+ &__h1--accent {
81
+ color: kit-variables.$gd-palette-primary-base;
82
+ }
83
+
84
+ & .gd-button {
85
+ margin-top: 2em;
86
+
87
+ & + .gd-button {
88
+ margin-top: 1em;
89
+ margin-left: 0;
90
+ }
91
+ }
92
+ }
93
+
94
+ &__visualization {
95
+ margin: 10px 0;
96
+ padding: 10px;
97
+ border: 1px solid kit-variables.$is-focused-background;
98
+ border-radius: 8px;
99
+ }
100
+ }
101
+
102
+ @keyframes gd-gen-ai-message-in {
103
+ 0% {
104
+ opacity: 0;
105
+ transform: translateY(10px);
106
+ }
107
+ 100% {
108
+ opacity: 1;
109
+ transform: translateY(0);
110
+ }
111
+ }
@@ -0,0 +1,4 @@
1
+ // (C) 2024 GoodData Corporation
2
+
3
+ $x-spacing: 15px;
4
+ $y-spacing: 10px;
@@ -0,0 +1,122 @@
1
+ // (C) 2024 GoodData Corporation
2
+
3
+ @use "sass:color";
4
+ @use "variables" as variables;
5
+ @use "@gooddata/sdk-ui-kit/styles/scss/variables" as kit-variables;
6
+ @use "@gooddata/sdk-ui-kit/styles/scss/mixins" as kit-mixins;
7
+ @use "@gooddata/sdk-ui-kit/styles/scss/Form/mixins" as form-mixins;
8
+
9
+ .gd-gen-ai-chat__window {
10
+ width: 420px;
11
+ height: calc(100vh - 84px);
12
+ background-color: kit-variables.$gd-color-light;
13
+ border: 1px solid kit-variables.$gd-border-color;
14
+ border-radius: 3px;
15
+ // TODO - use color from variables
16
+ box-shadow: 0 1px 20px 0 #14385d26;
17
+ display: flex;
18
+ flex-direction: column;
19
+
20
+ &--fullscreen {
21
+ width: 768px;
22
+ height: calc(100vh - 60px);
23
+ }
24
+
25
+ &__header {
26
+ flex-shrink: 0;
27
+ height: 45px;
28
+ display: flex;
29
+ flex-direction: row;
30
+ align-items: center;
31
+ gap: 16px;
32
+ padding: 0 16px;
33
+ }
34
+
35
+ &__header__gap {
36
+ flex: 1;
37
+ }
38
+
39
+ &__header__divider {
40
+ width: 1px;
41
+ height: 29px;
42
+ background-color: kit-variables.$gd-border-color;
43
+ }
44
+
45
+ &__header__icon {
46
+ display: flex;
47
+ cursor: pointer;
48
+
49
+ & svg path {
50
+ transition: fill 0.2s;
51
+ fill: kit-variables.$gd-color-label;
52
+ }
53
+
54
+ &--disabled {
55
+ cursor: default;
56
+
57
+ & svg path {
58
+ fill: kit-variables.$gd-color-disabled;
59
+ }
60
+ }
61
+
62
+ & svg {
63
+ width: 18px;
64
+ height: 18px;
65
+ }
66
+
67
+ &--reset:not(&--disabled):hover {
68
+ & svg path {
69
+ fill: kit-variables.$gd-palette-error-base;
70
+ }
71
+ }
72
+
73
+ &--close:not(&--disabled):hover,
74
+ &--fullscreen:not(&--disabled):hover {
75
+ & svg path {
76
+ fill: kit-variables.$gd-palette-primary-base;
77
+ }
78
+ }
79
+
80
+ &[data-gd-tooltip] {
81
+ position: relative;
82
+ }
83
+
84
+ &[data-gd-tooltip]::before {
85
+ content: "";
86
+ position: absolute;
87
+ top: -4px;
88
+ left: 50%;
89
+ transform: translateX(-50%);
90
+ border-width: 4px 6px 0 6px;
91
+ border-style: solid;
92
+ border-color: kit-variables.$gd-color-text transparent transparent transparent;
93
+ z-index: 100;
94
+ opacity: 0;
95
+ pointer-events: none;
96
+ transition: opacity 0.2s;
97
+ }
98
+ &[data-gd-tooltip]::after {
99
+ content: attr(data-gd-tooltip);
100
+ position: absolute;
101
+ top: -4px;
102
+ left: 50%;
103
+ transform: translateX(-50%) translateY(-100%);
104
+ background: kit-variables.$gd-color-text;
105
+ text-align: center;
106
+ color: kit-variables.$gd-color-white;
107
+ padding: 0.3em 0.6em;
108
+ font-size: 0.85em;
109
+ min-width: 5em;
110
+ text-wrap: balance;
111
+ border-radius: 5px;
112
+ pointer-events: none;
113
+ opacity: 0;
114
+ transition: opacity 0.2s;
115
+ }
116
+
117
+ &[data-gd-tooltip]:hover::after,
118
+ &[data-gd-tooltip]:hover::before {
119
+ opacity: 1;
120
+ }
121
+ }
122
+ }