Skip to content

Commit

Permalink
Merge branch 'master' into feat/drawer-motion
Browse files Browse the repository at this point in the history
* master: (32 commits)
  applying package updates
  feat(react-tags): add styles for size (microsoft#28229)
  docs(react-dialog): update DialogTriggerOutsideDialog to include focus behavior (microsoft#28176)
  bugfix: Ensures dialog actions stretches on breakpoints (microsoft#28258)
  applying package updates
  fix: TableHeaderCell should not render button when not sortable (microsoft#28097)
  fix(react-file-type-icons): Map mhtml extension to html icon (microsoft#28112)
  Fix overlapping axis labels on smaller viewports (microsoft#28239)
  useArrowNavigationGroup grid-linear axis (microsoft#28253)
  applying package updates
  fix: Alert example missing aria-label for icon (microsoft#28234)
  Overflow divider fix (microsoft#28011)
  feat(tools): implement `cypress-component-configuration` generator (microsoft#28115)
  chore: migrate to TS 4.7 (microsoft#28067)
  fix(scripts-tasks): make generate-api work in deterministic way (microsoft#28215)
  feat(react-tags): add overflow story (microsoft#28012)
  Structure and slots for SearchBox, using Input as a slot (microsoft#28090)
  feat(tokens): Add/update theme tokens (microsoft#27791)
  feat(react-tags): add a11y role and best practices guide (microsoft#28075)
  fix: Toast intent should always be present in the context (microsoft#28226)
  ...
  • Loading branch information
marcosmoura committed Jun 20, 2023
2 parents 3e9cb0e + 9b5b3f3 commit 9f3fc91
Show file tree
Hide file tree
Showing 507 changed files with 10,243 additions and 1,789 deletions.
16 changes: 8 additions & 8 deletions apps/perf-test-react-components/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,14 +19,14 @@
},
"dependencies": {
"@fluentui/scripts-perf-test-flamegrill": "*",
"@fluentui/react-avatar": "^9.5.5",
"@fluentui/react-button": "^9.3.16",
"@fluentui/react-field": "^9.1.6",
"@fluentui/react-infobutton": "9.0.0-beta.34",
"@fluentui/react-persona": "^9.2.15",
"@fluentui/react-provider": "^9.7.2",
"@fluentui/react-spinbutton": "^9.2.16",
"@fluentui/react-theme": "^9.1.8",
"@fluentui/react-avatar": "^9.5.6",
"@fluentui/react-button": "^9.3.17",
"@fluentui/react-field": "^9.1.7",
"@fluentui/react-infobutton": "9.0.0-beta.35",
"@fluentui/react-persona": "^9.2.16",
"@fluentui/react-provider": "^9.7.3",
"@fluentui/react-spinbutton": "^9.2.17",
"@fluentui/react-theme": "^9.1.9",
"@griffel/core": "^1.11.0",
"@microsoft/load-themed-styles": "^1.10.26",
"react": "17.0.2",
Expand Down
2 changes: 1 addition & 1 deletion apps/perf-test/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
"dependencies": {
"@fluentui/scripts-perf-test-flamegrill": "*",
"@fluentui/example-data": "^8.4.11",
"@fluentui/react": "^8.110.2",
"@fluentui/react": "^8.110.4",
"@microsoft/load-themed-styles": "^1.10.26",
"react": "17.0.2",
"react-dom": "17.0.2",
Expand Down
14 changes: 7 additions & 7 deletions apps/public-docsite-resources/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,22 +27,22 @@
"update-snapshots": "just-scripts jest -u"
},
"devDependencies": {
"@fluentui/api-docs": "^8.2.10",
"@fluentui/api-docs": "^8.2.11",
"@fluentui/eslint-plugin": "*",
"@fluentui/scripts-monorepo": "*",
"@fluentui/scripts-tasks": "*",
"@fluentui/scripts-webpack": "*"
},
"dependencies": {
"@fluentui/react": "^8.110.2",
"@fluentui/react": "^8.110.4",
"@fluentui/react-examples": "^8.34.4",
"@microsoft/load-themed-styles": "^1.10.26",
"@fluentui/azure-themes": "^8.6.16",
"@fluentui/react-docsite-components": "^8.12.21",
"@fluentui/font-icons-mdl2": "^8.5.21",
"@fluentui/azure-themes": "^8.6.18",
"@fluentui/react-docsite-components": "^8.12.24",
"@fluentui/font-icons-mdl2": "^8.5.22",
"@fluentui/set-version": "^8.2.11",
"@fluentui/theme-samples": "^8.7.95",
"@fluentui/react-monaco-editor": "^1.7.98",
"@fluentui/theme-samples": "^8.7.97",
"@fluentui/react-monaco-editor": "^1.7.101",
"office-ui-fabric-core": "^11.0.0",
"react": "17.0.2",
"react-dom": "17.0.2",
Expand Down
10 changes: 5 additions & 5 deletions apps/public-docsite-v9/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,13 +23,13 @@
"@fluentui/scripts-tasks": "*"
},
"dependencies": {
"@fluentui/react-datepicker-compat": "^0.1.5",
"@fluentui/react-migration-v8-v9": "^9.2.16",
"@fluentui/react-migration-v0-v9": "^9.0.2",
"@fluentui/react": "^8.110.2",
"@fluentui/react-datepicker-compat": "^0.1.6",
"@fluentui/react-migration-v8-v9": "^9.3.0",
"@fluentui/react-migration-v0-v9": "^9.0.3",
"@fluentui/react": "^8.110.4",
"@fluentui/react-northstar": "^0.66.4",
"@fluentui/react-icons-northstar": "^0.66.4",
"@fluentui/react-components": "^9.21.0",
"@fluentui/react-components": "^9.22.0",
"@fluentui/react-storybook-addon": "9.0.0-rc.1",
"@fluentui/react-storybook-addon-codesandbox": "9.0.0-alpha.0",
"@fluentui/theme-designer": "^9.0.0",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,8 @@ export const alias = {
colorCompoundBrandForeground1Pressed: 'brand[60]',
colorBrandForeground1: 'brand[80]',
colorBrandForeground2: 'brand[70]',
colorBrandForeground2Hover: 'brand[60]',
colorBrandForeground2Pressed: 'brand[30]',
colorNeutralForeground1Static: 'grey[14]',
colorNeutralForegroundInverted: 'white',
colorNeutralForegroundInvertedHover: 'white',
Expand Down Expand Up @@ -204,6 +206,8 @@ export const alias = {
colorCompoundBrandBackgroundPressed: 'brand[60]',
colorBrandBackgroundStatic: 'brand[80]',
colorBrandBackground2: 'brand[160]',
colorBrandBackground2Hover: 'brand[150]',
colorBrandBackground2Pressed: 'brand[130]',
colorBrandBackgroundInverted: 'white',
colorBrandBackgroundInvertedHover: 'brand[160]',
colorBrandBackgroundInvertedPressed: 'brand[140]',
Expand All @@ -218,13 +222,16 @@ export const alias = {
colorNeutralStroke1Selected: 'grey[74]',
colorNeutralStroke2: 'grey[88]',
colorNeutralStroke3: 'grey[94]',
colorNeutralStrokeSubtle: 'grey[88]',
colorNeutralStrokeOnBrand: 'white',
colorNeutralStrokeOnBrand2: 'white',
colorNeutralStrokeOnBrand2Hover: 'white',
colorNeutralStrokeOnBrand2Pressed: 'white',
colorNeutralStrokeOnBrand2Selected: 'white',
colorBrandStroke1: 'brand[80]',
colorBrandStroke2: 'brand[140]',
colorBrandStroke2Hover: 'brand[120]',
colorBrandStroke2Pressed: 'brand[80]',
colorCompoundBrandStroke: 'brand[80]',
colorCompoundBrandStrokeHover: 'brand[70]',
colorCompoundBrandStrokePressed: 'brand[60]',
Expand Down
7 changes: 7 additions & 0 deletions apps/public-docsite-v9/src/shims/ThemeShim/v9ThemeShim.ts
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,8 @@ const mapAliasColors = (palette: IPalette, inverted: boolean): ColorTokens => {
colorCompoundBrandForeground1Pressed: palette.themeDark,
colorBrandForeground1: palette.themePrimary,
colorBrandForeground2: palette.themeDarkAlt,
colorBrandForeground2Hover: palette.themeDarkAlt,
colorBrandForeground2Pressed: palette.themeDarkAlt,
colorNeutralForeground1Static: palette.neutralPrimary,
colorNeutralForegroundInverted: palette.white,
colorNeutralForegroundInvertedHover: palette.white,
Expand Down Expand Up @@ -123,6 +125,8 @@ const mapAliasColors = (palette: IPalette, inverted: boolean): ColorTokens => {
colorCompoundBrandBackgroundPressed: palette.themeDark,
colorBrandBackgroundStatic: palette.themePrimary,
colorBrandBackground2: palette.themeLighterAlt,
colorBrandBackground2Hover: palette.themeLighterAlt,
colorBrandBackground2Pressed: palette.themeLighterAlt,
colorBrandBackgroundInverted: palette.white,
colorBrandBackgroundInvertedHover: palette.themeLighterAlt,
colorBrandBackgroundInvertedPressed: palette.themeLight,
Expand All @@ -137,13 +141,16 @@ const mapAliasColors = (palette: IPalette, inverted: boolean): ColorTokens => {
colorNeutralStroke1Selected: palette.neutralTertiaryAlt,
colorNeutralStroke2: palette.neutralQuaternaryAlt,
colorNeutralStroke3: palette.neutralLighter,
colorNeutralStrokeSubtle: palette.neutralQuaternaryAlt,
colorNeutralStrokeOnBrand: palette.white,
colorNeutralStrokeOnBrand2: palette.white,
colorNeutralStrokeOnBrand2Hover: palette.white,
colorNeutralStrokeOnBrand2Pressed: palette.white,
colorNeutralStrokeOnBrand2Selected: palette.white,
colorBrandStroke1: palette.themePrimary,
colorBrandStroke2: palette.themeLight,
colorBrandStroke2Hover: palette.themeLight,
colorBrandStroke2Pressed: palette.themeLight,
colorCompoundBrandStroke: palette.themePrimary,
colorCompoundBrandStrokeHover: palette.themeDarkAlt,
colorCompoundBrandStrokePressed: palette.themeDark,
Expand Down
26 changes: 13 additions & 13 deletions apps/public-docsite/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,29 +23,29 @@
},
"license": "MIT",
"devDependencies": {
"@fluentui/common-styles": "^1.2.30",
"@fluentui/common-styles": "^1.2.31",
"@fluentui/eslint-plugin": "*",
"@fluentui/react-monaco-editor": "^1.7.98",
"@fluentui/react-monaco-editor": "^1.7.101",
"write-file-webpack-plugin": "^4.1.0",
"@fluentui/scripts-tasks": "*",
"@fluentui/scripts-webpack": "*"
},
"dependencies": {
"@fluentui/font-icons-mdl2": "^8.5.21",
"@fluentui/font-icons-mdl2": "^8.5.22",
"@fluentui/public-docsite-resources": "^8.1.41",
"@fluentui/public-docsite-setup": "^0.3.21",
"@fluentui/react": "^8.110.2",
"@fluentui/react-docsite-components": "^8.12.21",
"@fluentui/react": "^8.110.4",
"@fluentui/react-docsite-components": "^8.12.24",
"@fluentui/react-examples": "^8.34.4",
"@fluentui/react-experiments": "^8.14.90",
"@fluentui/fluent2-theme": "^8.107.21",
"@fluentui/react-file-type-icons": "^8.9.0",
"@fluentui/react-icons-mdl2": "^1.3.45",
"@fluentui/react-icons-mdl2-branded": "^1.2.46",
"@fluentui/react-experiments": "^8.14.92",
"@fluentui/fluent2-theme": "^8.107.23",
"@fluentui/react-file-type-icons": "^8.9.2",
"@fluentui/react-icons-mdl2": "^1.3.46",
"@fluentui/react-icons-mdl2-branded": "^1.2.47",
"@fluentui/set-version": "^8.2.11",
"@fluentui/theme": "^2.6.32",
"@fluentui/theme-samples": "^8.7.95",
"@fluentui/utilities": "^8.13.16",
"@fluentui/theme": "^2.6.33",
"@fluentui/theme-samples": "^8.7.97",
"@fluentui/utilities": "^8.13.17",
"@microsoft/load-themed-styles": "^1.10.26",
"office-ui-fabric-core": "^11.0.0",
"react": "17.0.2",
Expand Down
4 changes: 2 additions & 2 deletions apps/react-18-tests-v8/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@
"@fluentui/scripts-webpack": "*"
},
"dependencies": {
"@fluentui/react": "^8.110.2",
"@fluentui/react-hooks": "^8.6.27",
"@fluentui/react": "^8.110.4",
"@fluentui/react-hooks": "^8.6.28",
"@types/react": "18.0.14",
"@types/react-dom": "18.0.6",
"react": "18.2.0",
Expand Down
2 changes: 1 addition & 1 deletion apps/react-18-tests-v9/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
"@fluentui/scripts-tasks": "*"
},
"dependencies": {
"@fluentui/react-components": "^9.21.0",
"@fluentui/react-components": "^9.22.0",
"@types/react": "18.0.14",
"@types/react-dom": "18.0.6",
"react": "18.2.0",
Expand Down
8 changes: 4 additions & 4 deletions apps/recipes-react-components/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,10 @@
"@fluentui/scripts-tasks": "*"
},
"dependencies": {
"@fluentui/react-components": "^9.21.0",
"@fluentui/react-icons": "^2.0.196",
"@fluentui/react-theme": "^9.1.8",
"@fluentui/react-provider": "^9.7.2",
"@fluentui/react-components": "^9.22.0",
"@fluentui/react-icons": "^2.0.203",
"@fluentui/react-theme": "^9.1.9",
"@fluentui/react-provider": "^9.7.3",
"@fluentui/react-storybook-addon": "9.0.0-rc.1",
"@fluentui/react-storybook-addon-codesandbox": "9.0.0-alpha.0",
"@griffel/react": "^1.5.7",
Expand Down
2 changes: 1 addition & 1 deletion apps/ssr-tests-v9/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
"test-ssr": "test-ssr \"./stories/**/*.stories.tsx\""
},
"dependencies": {
"@fluentui/react-components": "^9.21.0"
"@fluentui/react-components": "^9.22.0"
},
"devDependencies": {
"@fluentui/eslint-plugin": "*",
Expand Down
2 changes: 1 addition & 1 deletion apps/ssr-tests/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
},
"license": "MIT",
"devDependencies": {
"@fluentui/react": "^8.110.2",
"@fluentui/react": "^8.110.4",
"@microsoft/load-themed-styles": "^1.10.26",
"@types/mocha": "7.0.2",
"@fluentui/public-docsite-resources": "^8.1.41",
Expand Down
6 changes: 3 additions & 3 deletions apps/stress-test/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@
"type-check": "tsc -b tsconfig.type.json"
},
"dependencies": {
"@fluentui/react": "^8.110.2",
"@fluentui/react-components": "^9.21.0",
"@fluentui/react-icons": "^2.0.196",
"@fluentui/react": "^8.110.4",
"@fluentui/react-components": "^9.22.0",
"@fluentui/react-icons": "^2.0.203",
"@fluentui/web-components": "^2.5.15",
"@microsoft/fast-element": "^1.11.1",
"afterframe": "1.0.2",
Expand Down
25 changes: 23 additions & 2 deletions apps/test-bundles/just.config.ts
Original file line number Diff line number Diff line change
@@ -1,14 +1,35 @@
import { preset, task, resolveCwd } from '@fluentui/scripts-tasks';
import * as path from 'path';
import { preset, task, series } from '@fluentui/scripts-tasks';
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
// @ts-ignore - parallel-webpack has no types
import { run } from 'parallel-webpack';

import { bundleSizeCollect } from './scripts/bundle-size-collect';
import { mergeBundleSizes } from './scripts/merge-bundlesizes';

preset();

// This pacakge doesn't currently have any files that are included in the eslint task
// (it only runs on src, not config files)
task('code-style', 'prettier');

task('bundle-size-collect', () => {
const packageName = process.env.PACKAGE ?? '';
bundleSizeCollect({ packageName });
});

task('bundle', done => {
run(resolveCwd('webpack.config.js'), {}, done);
const configPath = path.join(__dirname, 'webpack.config.js');
const options = {};
run(configPath, options, done);
});

task('bundle-size-merge', () => {
const root = path.join(__dirname, 'dist');
mergeBundleSizes(
[path.join(root, 'react/bundlesize.json'), path.join(root, 'react-northstar/bundlesize.json')],
path.join(root, 'bundlesizes.json'),
);
});

task('bundle-size', series('bundle', 'bundle-size-collect'));
3 changes: 1 addition & 2 deletions apps/test-bundles/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,13 @@
"private": true,
"license": "MIT",
"scripts": {
"bundle:size": "just-scripts bundle",
"bundle-size-auditor": "just-scripts bundle-size",
"clean": "just-scripts clean",
"code-style": "just-scripts code-style",
"just": "just-scripts"
},
"devDependencies": {
"@fluentui/eslint-plugin": "*",
"parallel-webpack": "^2.6.0",
"@fluentui/scripts-tasks": "*",
"@fluentui/scripts-webpack": "*"
}
Expand Down
40 changes: 40 additions & 0 deletions apps/test-bundles/scripts/bundle-size-collect.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
import * as fs from 'fs';
import * as path from 'path';

/**
*
* collates bundle size information from minified files in apps/test-bundles/dist/<packageName> and writes to apps/test-bundles/dist/<packageName>/bundlesizes.json.
*
* It is uploaded as an artifact by the build definition in Azure Dev Ops and used to compare baseline and PR file size information which gets reported by Size Auditor
*/
export function bundleSizeCollect(config: { packageName: string; filename?: string }) {
const { packageName, filename: outputFilename = 'bundlesize.json' } = config;

if (!packageName) {
throw new Error('🚨 No packageName provided! Set it via env variable name "PACKAGE"');
}

const distRoot = path.join(__dirname, '../dist', packageName.replace('@fluentui/', ''));

const sizes: Record<string, number> = {};

const items = fs.readdirSync(distRoot);
items.forEach(item => {
const file = path.join(distRoot, item);

const isMinifiedJavascriptFile = item.match(/.min.js$/);
if (isMinifiedJavascriptFile) {
sizes[getComponentName(item)] = getFilesizeInBytes(file);
}
});

fs.writeFileSync(path.join(distRoot, outputFilename), JSON.stringify({ sizes }));

function getFilesizeInBytes(fileName: string) {
return fs.statSync(fileName).size;
}

function getComponentName(fileName: string) {
return path.basename(fileName, '.min.js');
}
}
14 changes: 14 additions & 0 deletions apps/test-bundles/scripts/merge-bundlesizes.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
import * as fs from 'fs';

export function mergeBundleSizes(configPaths: string[], mergeConfigPath: string) {
const result: { sizes: { [entryName: string]: number } } = {
sizes: {},
};

configPaths.forEach(configPath => {
const json = JSON.parse(fs.readFileSync(configPath, 'utf-8'));
Object.assign(result.sizes, json.sizes);
});

fs.writeFileSync(mergeConfigPath, JSON.stringify(result));
}
Loading

0 comments on commit 9f3fc91

Please sign in to comment.