Skip to content

Commit

Permalink
Merge pull request #2382 from microsoftgraph/merge/update-from-main
Browse files Browse the repository at this point in the history
chore: update from main
gavinbarron authored Jun 2, 2023

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
2 parents bc5b834 + c0f7630 commit 0d38a72
Showing 5 changed files with 27 additions and 4 deletions.
Original file line number Diff line number Diff line change
@@ -884,7 +884,7 @@ export class MgtFileUpload extends MgtBaseComponent {
this._dialogTitle = strings.maximumFileSizeTitle;
this._dialogContent =
strings.maximumFileSize
.replace('{FileSize}', formatBytes(fileUploadList.maxFileSize))
.replace('{FileSize}', formatBytes(fileUploadList.maxFileSize * 1024))
.replace('{FileName}', file.name) +
formatBytes(file.size) +
'.';
Original file line number Diff line number Diff line change
@@ -67,6 +67,10 @@ $button-padding: var(--login-button-padding, 0);
}
}
}

&:focus-visible {
outline-style: $focus-ring-style;
}
}

fluent-card {
Original file line number Diff line number Diff line change
@@ -938,7 +938,7 @@ export class MgtPeoplePicker extends MgtTemplatedComponent {
person => person.id,
person => {
const lineTwo = person.jobTitle || (person as User).mail;
const ariaLabel = `${this.strings.suggestedContact} ${person.displayName} ${lineTwo ?? ''}`;
const ariaLabel = `${person.displayName} ${lineTwo ?? ''}`;
return html`
<li
id="${person.id}"
15 changes: 15 additions & 0 deletions packages/mgt-components/src/styles/shared-styles.scss
Original file line number Diff line number Diff line change
@@ -7,6 +7,8 @@

@import './shared-sass-variables';

$focus-ring-style: var(--focus-ring-style, auto);

:host([hidden]) {
display: none;
}
@@ -20,6 +22,19 @@
--theme-dark-color: #005a9e;
}

:focus-visible {
// ensure default is correctly set for Firefox
outline-color: var(--focus-ring-color, Highlight);

// ensure default is set for other browsers
/* stylelint-disable-next-line declaration-block-no-duplicate-properties */
outline-color: var(--focus-ring-color, -webkit-focus-ring-color);

// set the style of the focus ring
// this needs to be something other than auto in Firefox to use the custom color
outline-style: $focus-ring-style;
}

.ms-icon {
display: inline-block;
font-family: $font-icon;
8 changes: 6 additions & 2 deletions stories/samples/general.stories.js
Original file line number Diff line number Diff line change
@@ -162,10 +162,10 @@ export const cache = () => html`
</script>
`;
export const theme = () => html`
<div class="mgt-light">
<div class="mgt-light root">
<header class="mgt-dark">
<p>I should be dark, regional class</p>
<mgt-teams-channel-picker></mgt-teams-channel-picker>
<mgt-people-picker></mgt-people-picker>
<div class="mgt-light">
<p>I should be light, second level regional class</p>
<mgt-teams-channel-picker></mgt-teams-channel-picker>
@@ -183,6 +183,10 @@ export const theme = () => html`
<mgt-teams-channel-picker class="mgt-foo"></mgt-teams-channel-picker>
</div>
<style>
.root {
--focus-ring-color: red;
--focus-ring-style: solid;
}
.custom1 {
--input-border: 2px solid teal;
--input-background-color: #33c2c2;

0 comments on commit 0d38a72

Please sign in to comment.