Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(themes): add ai-chat tokens #15574

Merged
merged 2 commits into from
Jan 25, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,15 @@ Array [
"buttonTokens",
"caption01",
"caption02",
"chatAvatarAgent",
"chatAvatarBot",
"chatAvatarUser",
"chatBubbleAgent",
"chatBubbleAgentBorder",
"chatBubbleUser",
"chatPromptBackground",
"chatPromptBorderEnd",
"chatPromptBorderStart",
"code01",
"code02",
"colors",
Expand Down
9 changes: 9 additions & 0 deletions packages/styles/scss/__tests__/theme-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -162,6 +162,15 @@ describe('@carbon/styles/scss/theme', () => {
"slug-callout-caret-bottom",
"slug-callout-caret-bottom-background",
"slug-callout-caret-bottom-background-actions",
"chat-prompt-background",
"chat-prompt-border-start",
"chat-prompt-border-end",
"chat-bubble-user",
"chat-bubble-agent",
"chat-bubble-agent-border",
"chat-avatar-bot",
"chat-avatar-agent",
"chat-avatar-user",
"highlight",
"overlay",
"toggle-off",
Expand Down
11 changes: 11 additions & 0 deletions packages/themes/src/g10.js
Original file line number Diff line number Diff line change
Expand Up @@ -255,6 +255,17 @@ export const slugCalloutCaretBottom = blue20;
export const slugCalloutCaretBottomBackgroundActions = '#D2DCEE';
export const slugCalloutCaretBottomBackground = '#CCDBF8';

// Chat tokens
export const chatPromptBackground = white;
export const chatPromptBorderStart = gray10;
export const chatPromptBorderEnd = rgba(gray10, 0);
export const chatBubbleUser = gray20;
export const chatBubbleAgent = white;
export const chatBubbleAgentBorder = gray20;
export const chatAvatarBot = blue60;
export const chatAvatarAgent = gray100;
export const chatAvatarUser = gray100;

export {
// Type
caption01,
Expand Down
11 changes: 11 additions & 0 deletions packages/themes/src/g100.js
Original file line number Diff line number Diff line change
Expand Up @@ -260,6 +260,17 @@ export const slugCalloutCaretBottom = '#3D4655';
export const slugCalloutCaretBottomBackgroundActions = '#192436';
export const slugCalloutCaretBottomBackground = '#213250';

// Chat tokens
export const chatPromptBackground = gray100;
export const chatPromptBorderStart = gray90;
export const chatPromptBorderEnd = rgba(gray90, 0);
export const chatBubbleUser = gray80;
export const chatBubbleAgent = gray90;
export const chatBubbleAgentBorder = gray70;
export const chatAvatarBot = blue50;
export const chatAvatarAgent = gray10;
export const chatAvatarUser = gray10;

export {
// Type
caption01,
Expand Down
11 changes: 11 additions & 0 deletions packages/themes/src/g90.js
Original file line number Diff line number Diff line change
Expand Up @@ -261,6 +261,17 @@ export const slugCalloutCaretBottom = '#465060';
export const slugCalloutCaretBottomBackgroundActions = '#253042';
export const slugCalloutCaretBottomBackground = '#2D3F5C';

// Chat tokens
export const chatPromptBackground = gray100;
export const chatPromptBorderStart = gray90;
export const chatPromptBorderEnd = rgba(gray90, 0);
export const chatBubbleUser = gray80;
export const chatBubbleAgent = gray90;
export const chatBubbleAgentBorder = gray70;
export const chatAvatarBot = blue50;
export const chatAvatarAgent = gray10;
export const chatAvatarUser = gray10;

export {
// Type
caption01,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -273,6 +273,15 @@ Array [
"slug-callout-caret-bottom",
"slug-callout-caret-bottom-background",
"slug-callout-caret-bottom-background-actions",
"chat-prompt-background",
"chat-prompt-border-start",
"chat-prompt-border-end",
"chat-bubble-user",
"chat-bubble-agent",
"chat-bubble-agent-border",
"chat-avatar-bot",
"chat-avatar-agent",
"chat-avatar-user",
"highlight",
"overlay",
"toggle-off",
Expand Down
36 changes: 36 additions & 0 deletions packages/themes/src/tokens/__tests__/metadata-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -1065,6 +1065,42 @@ test('metadata', () => {
"name": "slug-callout-caret-bottom-background-actions",
"type": "color",
},
Object {
"name": "chat-prompt-background",
"type": "color",
},
Object {
"name": "chat-prompt-border-start",
"type": "color",
},
Object {
"name": "chat-prompt-border-end",
"type": "color",
},
Object {
"name": "chat-bubble-user",
"type": "color",
},
Object {
"name": "chat-bubble-agent",
"type": "color",
},
Object {
"name": "chat-bubble-agent-border",
"type": "color",
},
Object {
"name": "chat-avatar-bot",
"type": "color",
},
Object {
"name": "chat-avatar-agent",
"type": "color",
},
Object {
"name": "chat-avatar-user",
"type": "color",
},
Object {
"name": "highlight",
"type": "color",
Expand Down
10 changes: 10 additions & 0 deletions packages/themes/src/tokens/v11TokenGroup.js
Original file line number Diff line number Diff line change
Expand Up @@ -383,6 +383,16 @@ export const ai = TokenGroup.create({
'slug-callout-caret-bottom',
'slug-callout-caret-bottom-background',
'slug-callout-caret-bottom-background-actions',
// Chat tokens
'chat-prompt-background',
'chat-prompt-border-start',
'chat-prompt-border-end',
'chat-bubble-user',
'chat-bubble-agent',
'chat-bubble-agent-border',
'chat-avatar-bot',
'chat-avatar-agent',
'chat-avatar-user',
],
});

Expand Down
11 changes: 11 additions & 0 deletions packages/themes/src/white.js
Original file line number Diff line number Diff line change
Expand Up @@ -255,6 +255,17 @@ export const slugCalloutCaretBottom = blue20;
export const slugCalloutCaretBottomBackgroundActions = '#DAE5F8';
export const slugCalloutCaretBottomBackground = '#D5E5FF';

// Chat tokens
export const chatPromptBackground = white;
export const chatPromptBorderStart = gray10;
export const chatPromptBorderEnd = rgba(gray10, 0);
export const chatBubbleUser = gray20;
export const chatBubbleAgent = white;
export const chatBubbleAgentBorder = gray20;
export const chatAvatarBot = blue60;
export const chatAvatarAgent = gray100;
export const chatAvatarUser = gray100;

// Type
export {
caption01,
Expand Down
Loading