Skip to content

Commit 66fa206

Browse files
committed
storybook: update chat component
1 parent 7576bd5 commit 66fa206

File tree

16 files changed

+160
-94
lines changed

16 files changed

+160
-94
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,3 +5,4 @@
55
storybook-static
66

77
.env
8+
build-storybook.log

.storybook/preview.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ const preview = {
1717
layout: 'centered',
1818
options: {
1919
storySort: {
20-
order: ['Intro', 'Pages', ['Login', 'Dashboard', 'Tables'], 'Components', '*', 'WIP'],
20+
order: ['Introduction', 'Pages', ['Login', 'Dashboard', 'Tables'], 'Components', '*', 'WIP'],
2121
},
2222
},
2323
actions: { argTypesRegex: '^on[A-Z].*' },

docs/css/site.css

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,11 +17,10 @@
1717
transition: .2s ease-in-out transform;
1818
}
1919

20-
/* Chatbot styles -- TEMP -- */
21-
2220
.chat-article {
2321
height: 90dvh;
2422
}
23+
/* Chatbot styles -- TEMP -- */
2524
.chat-wrapper {
2625
display: flex;
2726
flex-direction: column;
@@ -30,6 +29,7 @@
3029
align-self: stretch;
3130
height: 100%;
3231
background: var(--cas-body-bg, #fff);
32+
position: relative; /* so that the history panel sits inside of the container and not over the navigation */
3333
}
3434
.chat-header {
3535
display: flex;
@@ -118,6 +118,7 @@
118118
gap: var(--cas-spacer-xl);
119119
align-self: stretch;
120120
border-radius: var(--cas-border-radius-md);
121+
position: relative;
121122
}
122123
.chatbot-message-group.message-bot {
123124
background: var(--cas-body-bg-rgba, rgba(226, 231, 235, 0.20));
@@ -152,3 +153,13 @@
152153
border-radius: var(--cas-border-radius-sm);
153154
background: rgba(255, 255, 255, 0.00);
154155
}
156+
.chatbot-response-actions {
157+
display: flex;
158+
justify-content: flex-end;
159+
align-items: center;
160+
gap: var(--cas-spacer-xs, 0.25rem);
161+
position: absolute;
162+
right: 0;
163+
bottom: -16px;
164+
}
165+

docs/css/site.css.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

docs/css/variables.css

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -55,9 +55,3 @@
5555
/* Set the Unicode value for the "fa-trash" icon */
5656
content: '\f56e';
5757
}
58-
59-
.card:hover {
60-
border: 1px solid var(--cas-primary-border-subtle, #b9e4fe);
61-
background: var(--cas-primary-border-subtle);
62-
cursor: pointer;
63-
}

docs/css/variables.css.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/css/site.css

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,11 +17,10 @@
1717
transition: .2s ease-in-out transform;
1818
}
1919

20-
/* Chatbot styles -- TEMP -- */
21-
2220
.chat-article {
2321
height: 90dvh;
2422
}
23+
/* Chatbot styles -- TEMP -- */
2524
.chat-wrapper {
2625
display: flex;
2726
flex-direction: column;
@@ -30,6 +29,7 @@
3029
align-self: stretch;
3130
height: 100%;
3231
background: var(--cas-body-bg, #fff);
32+
position: relative; /* so that the history panel sits inside of the container and not over the navigation */
3333
}
3434
.chat-header {
3535
display: flex;
@@ -118,6 +118,7 @@
118118
gap: var(--cas-spacer-xl);
119119
align-self: stretch;
120120
border-radius: var(--cas-border-radius-md);
121+
position: relative;
121122
}
122123
.chatbot-message-group.message-bot {
123124
background: var(--cas-body-bg-rgba, rgba(226, 231, 235, 0.20));
@@ -152,3 +153,13 @@
152153
border-radius: var(--cas-border-radius-sm);
153154
background: rgba(255, 255, 255, 0.00);
154155
}
156+
.chatbot-response-actions {
157+
display: flex;
158+
justify-content: flex-end;
159+
align-items: center;
160+
gap: var(--cas-spacer-xs, 0.25rem);
161+
position: absolute;
162+
right: 0;
163+
bottom: -16px;
164+
}
165+

src/css/variables.css

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -55,9 +55,3 @@
5555
/* Set the Unicode value for the "fa-trash" icon */
5656
content: '\f56e';
5757
}
58-
59-
.card:hover {
60-
border: 1px solid var(--cas-primary-border-subtle, #b9e4fe);
61-
background: var(--cas-primary-border-subtle);
62-
cursor: pointer;
63-
}
File renamed without changes.

src/stories/Chat.js

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,12 @@ export const createChat = () => {
2727
const chatThreads = createChatbot({ state: 'chatThreads' });
2828
section.appendChild(chatThreads);
2929

30+
const chatConfiguration = createChatbot({ state: 'chatConfiguration' });
31+
section.appendChild(chatConfiguration);
32+
33+
const chatHistory = createChatbot({ state: 'chatHistory' });
34+
section.appendChild(chatHistory);
35+
3036
const chatInput = createChatbot({ state: 'chatInput' });
3137
section.appendChild(chatInput);
3238

0 commit comments

Comments
 (0)