mirror of
https://github.com/elastic/kibana.git
synced 2025-06-28 19:13:14 -04:00
Closes https://github.com/elastic/kibana/issues/200005 ## Summary Integrate changes from the Borealis theme to components owned by @elastic/kibana-security team. ### Notes There are no visual changes in this PR. However: - Switch from using `success` to `accentSecondary` where needed - Switched from 'colors.disabled` to `colors.textDisabled` ### Screenshots There isn't much to add but adding a few before/after screenshots of the changes made | Usage | Before | After | |--------|--------|--------| | API Key token field | <img width="446" alt="image" src="https://github.com/user-attachments/assets/0167671c-b9e8-4493-88d9-514c524ccd06"> | <img width="469" alt="image" src="https://github.com/user-attachments/assets/bde7f308-1ba4-4a92-bb27-e5875357ba49"> | | User profile page | <img width="271" alt="image" src="https://github.com/user-attachments/assets/668a66df-949a-4ce6-a390-d5ea2dd3489c"> | <img width="271" alt="image" src="https://github.com/user-attachments/assets/a3965279-6f64-407c-923c-f7a07f474a14"> | | Copy SO to space counter | <img width="991" alt="image" src="https://github.com/user-attachments/assets/87a2cf3c-6b1f-4cf0-b818-03ed59133598"> | <img width="1161" alt="image" src="https://github.com/user-attachments/assets/549648f1-297b-434d-b61b-d2761bc5d641"> | | Space listing | <img width="604" alt="image" src="https://github.com/user-attachments/assets/6db8f9df-4059-4a06-b49f-e48dd910277a" /> |  | ### How to test 1. Start ES and KIB as: ``` yarn es snapshot --license trial KBN_OPTIMIZER_THEMES=experimental yarn start --no-base-path ``` 2. Navigate to `Stack Management > Advance Setting` and change the theme to Borealis. 3. Verify the different screens as seen in the screenshots to see if they render correctly with no visual regression ### Checklist Check the PR satisfies following conditions. Reviewers should verify this PR satisfies this list as well. - [ ] The PR description includes the appropriate Release Notes section, and the correct `release_note:*` label is applied per the [guidelines](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process) --------- Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
84 lines
2.7 KiB
TypeScript
84 lines
2.7 KiB
TypeScript
/*
|
|
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
|
|
* or more contributor license agreements. Licensed under the "Elastic License
|
|
* 2.0", the "GNU Affero General Public License v3.0 only", and the "Server Side
|
|
* Public License v 1"; you may not use this file except in compliance with, at
|
|
* your election, the "Elastic License 2.0", the "GNU Affero General Public
|
|
* License v3.0 only", or the "Server Side Public License, v 1".
|
|
*/
|
|
|
|
import React, { FunctionComponent } from 'react';
|
|
import { EuiTitle, EuiSpacer, useEuiTheme } from '@elastic/eui';
|
|
import { UserAvatar } from '@kbn/user-profile-components';
|
|
import type { UserProfile, UserProfileAvatarData } from '@kbn/user-profile-components';
|
|
import { PanelWithCodeBlock } from './panel_with_code_block';
|
|
|
|
export const AvatarDemo: FunctionComponent = () => {
|
|
const { euiTheme } = useEuiTheme();
|
|
const userProfile: UserProfile<{ avatar: UserProfileAvatarData }> = {
|
|
uid: 'u_J41Oh6L9ki-Vo2tOogS8WRTENzhHurGtRc87NgEAlkc_0',
|
|
enabled: true,
|
|
user: {
|
|
username: 'delighted_nightingale',
|
|
email: 'delighted_nightingale@elastic.co',
|
|
full_name: 'Delighted Nightingale',
|
|
},
|
|
data: {
|
|
avatar: {
|
|
color: euiTheme.colors.vis.euiColorVis1,
|
|
initials: 'DN',
|
|
imageUrl: 'https://source.unsplash.com/64x64/?cat',
|
|
},
|
|
},
|
|
};
|
|
|
|
return (
|
|
<PanelWithCodeBlock title="Avatar" code={code}>
|
|
<UserAvatar
|
|
user={userProfile.user}
|
|
avatar={{ ...userProfile.data.avatar, imageUrl: undefined }}
|
|
/>
|
|
 
|
|
<UserAvatar user={userProfile.user} avatar={userProfile.data.avatar} />
|
|
<EuiSpacer size="l" />
|
|
<EuiTitle size="xs">
|
|
<h3>Disabled</h3>
|
|
</EuiTitle>
|
|
<EuiSpacer size="s" />
|
|
<UserAvatar
|
|
user={userProfile.user}
|
|
avatar={{ ...userProfile.data.avatar, imageUrl: undefined }}
|
|
isDisabled
|
|
/>
|
|
 
|
|
<UserAvatar user={userProfile.user} avatar={userProfile.data.avatar} isDisabled />
|
|
<EuiSpacer size="l" />
|
|
<EuiTitle size="xs">
|
|
<h3>Unknown</h3>
|
|
</EuiTitle>
|
|
<EuiSpacer size="s" />
|
|
<UserAvatar />
|
|
</PanelWithCodeBlock>
|
|
);
|
|
};
|
|
|
|
const code = `import { UserAvatar } from '@kbn/user-profile-components';
|
|
|
|
const userProfile = {
|
|
uid: 'u_J41Oh6L9ki-Vo2tOogS8WRTENzhHurGtRc87NgEAlkc_0',
|
|
enabled: true,
|
|
user: {
|
|
username: 'delighted_nightingale',
|
|
email: 'delighted_nightingale@elastic.co',
|
|
full_name: 'Delighted Nightingale',
|
|
},
|
|
data: {
|
|
avatar: {
|
|
color: '#09e8ca',
|
|
initials: 'DN',
|
|
imageUrl: 'https://source.unsplash.com/64x64/?cat'
|
|
}
|
|
},
|
|
};
|
|
|
|
<UserAvatar user={userProfile.user} avatar={userProfile.data.avatar} />`;
|