From 86e18a35c5cf02affc5de2200eb5535997a099eb Mon Sep 17 00:00:00 2001 From: Martin Hochel Date: Wed, 31 May 2023 13:17:40 +0200 Subject: [PATCH 01/16] chore: migrate to TS 4.7 --- package.json | 8 +-- packages/api-docs/package.json | 2 +- yarn.lock | 93 +++++++++++++--------------------- 3 files changed, 39 insertions(+), 64 deletions(-) diff --git a/package.json b/package.json index 292308a8bd2960..350c8b50eb7098 100644 --- a/package.json +++ b/package.json @@ -95,9 +95,9 @@ "@griffel/webpack-loader": "2.1.13", "@jest/reporters": "29.5.0", "@mdx-js/loader": "1.6.22", - "@microsoft/api-extractor": "7.28.7", - "@microsoft/api-extractor-model": "7.22.2", - "@microsoft/tsdoc": "0.14.2", + "@microsoft/api-extractor": "7.31.2", + "@microsoft/api-extractor-model": "7.24.2", + "@microsoft/tsdoc": "0.14.1", "@microsoft/eslint-plugin-sdl": "0.1.9", "@microsoft/load-themed-styles": "1.10.26", "@microsoft/loader-load-themed-styles": "2.0.17", @@ -344,7 +344,7 @@ "tsconfig-paths": "4.1.0", "tsconfig-paths-webpack-plugin": "4.0.0", "tslib": "2.4.1", - "typescript": "4.6.4", + "typescript": "4.7.4", "vinyl": "2.2.0", "vrscreenshotdiff": "0.0.17", "webpack": "5.83.1", diff --git a/packages/api-docs/package.json b/packages/api-docs/package.json index 8412a41cac6272..cd7bdddc2378b4 100644 --- a/packages/api-docs/package.json +++ b/packages/api-docs/package.json @@ -21,7 +21,7 @@ "@fluentui/scripts-tasks": "*" }, "dependencies": { - "@microsoft/api-extractor-model": "7.17.1", + "@microsoft/api-extractor-model": "7.24.2", "@microsoft/tsdoc": "0.14.1", "fs-extra": "^8.1.0" } diff --git a/yarn.lock b/yarn.lock index 8f46ae50b0514f..b9fe0b851598ff 100644 --- a/yarn.lock +++ b/yarn.lock @@ -3051,41 +3051,32 @@ resolved "https://registry.yarnpkg.com/@mdx-js/util/-/util-1.6.22.tgz#219dfd89ae5b97a8801f015323ffa4b62f45718b" integrity sha512-H1rQc1ZOHANWBvPcW+JpGwr+juXSxM8Q8YCkm3GhZd8REu1fHR3z99CErO1p9pkcfcxZnMdIZdIsXkOHY0NilA== -"@microsoft/api-extractor-model@7.17.1": - version "7.17.1" - resolved "https://registry.yarnpkg.com/@microsoft/api-extractor-model/-/api-extractor-model-7.17.1.tgz#2a6b7d8eec510ba1c7713c682d2a0c730074b29c" - integrity sha512-DCDtD8TdEpNk2lW4JvXgwwpxKy70P0JLad55iahwO8A+C63KYsrHIpAzo0FUauh5pwJ0v5QVNIJ+OBgKGteemg== +"@microsoft/api-extractor-model@7.24.2": + version "7.24.2" + resolved "https://registry.yarnpkg.com/@microsoft/api-extractor-model/-/api-extractor-model-7.24.2.tgz#759b09f2360fe761ff40bcf7e5a57b9b86284235" + integrity sha512-uUvjqTCY7hYERWGks+joTioN1QYHIucCDy7I/JqLxFxLbFXE5dpc1X7L+FG4PN/s8QYL24DKt0fqJkgcrFKLTw== dependencies: "@microsoft/tsdoc" "0.14.1" "@microsoft/tsdoc-config" "~0.16.1" - "@rushstack/node-core-library" "3.45.3" + "@rushstack/node-core-library" "3.52.0" -"@microsoft/api-extractor-model@7.22.2": - version "7.22.2" - resolved "https://registry.yarnpkg.com/@microsoft/api-extractor-model/-/api-extractor-model-7.22.2.tgz#9d49c22ae713d8662c995d844e29c59200ebe72f" - integrity sha512-fqb7std1sRfg7tvXkJwB7zrgIyzty7iIJXxpqA2/bEdct36jhkgIhKpgYr2yoi+Jhqbinjmhyf9tPKJ2E3TdwA== +"@microsoft/api-extractor@7.31.2": + version "7.31.2" + resolved "https://registry.yarnpkg.com/@microsoft/api-extractor/-/api-extractor-7.31.2.tgz#8312fe2519deaed8f81d60efe9e54b99fc5a19a0" + integrity sha512-ZODCU9ckTS9brXiZpUW2iDrnAg7jLxeLBM1AkPpSZFcbG/8HGLvfKOKrd71VIJHjc52x2lB8xj7ZWksnP7AOBA== dependencies: + "@microsoft/api-extractor-model" "7.24.2" "@microsoft/tsdoc" "0.14.1" "@microsoft/tsdoc-config" "~0.16.1" - "@rushstack/node-core-library" "3.50.0" - -"@microsoft/api-extractor@7.28.7": - version "7.28.7" - resolved "https://registry.yarnpkg.com/@microsoft/api-extractor/-/api-extractor-7.28.7.tgz#3c2745499b38d1ae3b8e0488c3f5aaeb6edc3e60" - integrity sha512-hDVYSbqGsY4gioHMi/NkIarAJ2qoE5cKEZ6V5HqLcUl0+hNV0Auk/5VbBmU2UO2le6MFgO69EJsrfszwzC6QBA== - dependencies: - "@microsoft/api-extractor-model" "7.22.2" - "@microsoft/tsdoc" "0.14.1" - "@microsoft/tsdoc-config" "~0.16.1" - "@rushstack/node-core-library" "3.50.0" - "@rushstack/rig-package" "0.3.13" - "@rushstack/ts-command-line" "4.12.1" + "@rushstack/node-core-library" "3.52.0" + "@rushstack/rig-package" "0.3.15" + "@rushstack/ts-command-line" "4.12.3" colors "~1.2.1" lodash "~4.17.15" resolve "~1.17.0" semver "~7.3.0" source-map "~0.6.1" - typescript "~4.6.3" + typescript "~4.7.4" "@microsoft/eslint-plugin-sdl@0.1.9": version "0.1.9" @@ -3830,25 +3821,10 @@ estree-walker "^1.0.1" picomatch "^2.2.2" -"@rushstack/node-core-library@3.45.3": - version "3.45.3" - resolved "https://registry.yarnpkg.com/@rushstack/node-core-library/-/node-core-library-3.45.3.tgz#8db2befbbf23969e08d2bc69d5d91ba812c01640" - integrity sha512-Rn0mxqC3MPb+YbvaeFcRWfcYHLwyZ99/ffYA8chpq5OpqoY+Mr1ycTbMvzl5AxWf1pYmi/2+Eo3iTOsQdYR8xw== - dependencies: - "@types/node" "12.20.24" - colors "~1.2.1" - fs-extra "~7.0.1" - import-lazy "~4.0.0" - jju "~1.4.0" - resolve "~1.17.0" - semver "~7.3.0" - timsort "~0.3.0" - z-schema "~5.0.2" - -"@rushstack/node-core-library@3.50.0": - version "3.50.0" - resolved "https://registry.yarnpkg.com/@rushstack/node-core-library/-/node-core-library-3.50.0.tgz#8b628247f16e5719c39ed1890c11959f8d303559" - integrity sha512-FFEZhgu6iN1MVjpQWmLcz46pSa4r2Oe2JYPo7mtnl3uYfwDaSXUSZuRN3JQgKkXu10TBcffJ7AGKcIt/k+qE/Q== +"@rushstack/node-core-library@3.50.1": + version "3.50.1" + resolved "https://registry.yarnpkg.com/@rushstack/node-core-library/-/node-core-library-3.50.1.tgz#d4aa4602460f29bbf0662052969b65129384da23" + integrity sha512-9d2xE7E9yQEBS6brTptdP8cslt6iL5+UnkY2lRxQQ4Q/jlXtsrWCCJCxwr56W/eJEe9YT/yHR4mMn5QY64Ps2w== dependencies: "@types/node" "12.20.24" colors "~1.2.1" @@ -3860,10 +3836,10 @@ timsort "~0.3.0" z-schema "~5.0.2" -"@rushstack/node-core-library@3.50.1": - version "3.50.1" - resolved "https://registry.yarnpkg.com/@rushstack/node-core-library/-/node-core-library-3.50.1.tgz#d4aa4602460f29bbf0662052969b65129384da23" - integrity sha512-9d2xE7E9yQEBS6brTptdP8cslt6iL5+UnkY2lRxQQ4Q/jlXtsrWCCJCxwr56W/eJEe9YT/yHR4mMn5QY64Ps2w== +"@rushstack/node-core-library@3.52.0": + version "3.52.0" + resolved "https://registry.yarnpkg.com/@rushstack/node-core-library/-/node-core-library-3.52.0.tgz#ee45e52b4b5fc038ce59bf59b1534311884e63fb" + integrity sha512-Z+MAP//G3rEGZd3JxJcBGcPYJlh8pvPoLMTLa5Sy6FTE6hRPzN+5J8DT7BbTmlqZaL6SZpXF30heRUbnYOvujw== dependencies: "@types/node" "12.20.24" colors "~1.2.1" @@ -3872,7 +3848,6 @@ jju "~1.4.0" resolve "~1.17.0" semver "~7.3.0" - timsort "~0.3.0" z-schema "~5.0.2" "@rushstack/package-deps-hash@^3.2.4", "@rushstack/package-deps-hash@^3.2.5": @@ -3882,18 +3857,18 @@ dependencies: "@rushstack/node-core-library" "3.50.1" -"@rushstack/rig-package@0.3.13": - version "0.3.13" - resolved "https://registry.yarnpkg.com/@rushstack/rig-package/-/rig-package-0.3.13.tgz#80d7b34bc9b7a7feeba133f317df8dbd1f65a822" - integrity sha512-4/2+yyA/uDl7LQvtYtFs1AkhSWuaIGEKhP9/KK2nNARqOVc5eCXmu1vyOqr5mPvNq7sHoIR+sG84vFbaKYGaDA== +"@rushstack/rig-package@0.3.15": + version "0.3.15" + resolved "https://registry.yarnpkg.com/@rushstack/rig-package/-/rig-package-0.3.15.tgz#8a870880cbeb8de82b951e628f6a37d428b4c5ce" + integrity sha512-jxVfvO5OnkRlYRhcVDZWvwiI2l4pv37HDJRtyg5HbD8Z/I8Xj32RICgrxS5xMeGGytobrg5S6OfPOHskg7Nw+A== dependencies: resolve "~1.17.0" strip-json-comments "~3.1.1" -"@rushstack/ts-command-line@4.12.1": - version "4.12.1" - resolved "https://registry.yarnpkg.com/@rushstack/ts-command-line/-/ts-command-line-4.12.1.tgz#4437ffae6459eb88791625ad9e89b2f0ba254476" - integrity sha512-S1Nev6h/kNnamhHeGdp30WgxZTA+B76SJ/P721ctP7DrnC+rrjAc6h/R80I4V0cA2QuEEcMdVOQCtK2BTjsOiQ== +"@rushstack/ts-command-line@4.12.3": + version "4.12.3" + resolved "https://registry.yarnpkg.com/@rushstack/ts-command-line/-/ts-command-line-4.12.3.tgz#3c5e4b381dcd780aab6efe42c7faa2018248cbb1" + integrity sha512-Pdij22RotMXzI+HWHyYCvw0RMZhiP5a6Za/96XamZ1+mxmpSm4ujf8TROKxGAHySmR5A8iNVSlzhNMnUlFQE6g== dependencies: "@types/argparse" "1.0.38" argparse "~1.0.9" @@ -25768,10 +25743,10 @@ typedarray@^0.0.6: resolved "https://registry.yarnpkg.com/typedarray/-/typedarray-0.0.6.tgz#867ac74e3864187b1d3d47d996a78ec5c8830777" integrity sha1-hnrHTjhkGHsdPUfZlqeOxciDB3c= -typescript@4.6.4, "typescript@^3 || ^4", typescript@~4.6.3: - version "4.6.4" - resolved "https://registry.yarnpkg.com/typescript/-/typescript-4.6.4.tgz#caa78bbc3a59e6a5c510d35703f6a09877ce45e9" - integrity sha512-9ia/jWHIEbo49HfjrLGfKbZSuWo9iTMwXO+Ca3pRsSpbsMbc7/IU8NKdCZVRRBafVPGnoJeFL76ZOAA84I9fEg== +typescript@4.7.4, "typescript@^3 || ^4", typescript@~4.7.4: + version "4.7.4" + resolved "https://registry.yarnpkg.com/typescript/-/typescript-4.7.4.tgz#1a88596d1cf47d59507a1bcdfb5b9dfe4d488235" + integrity sha512-C0WQT0gezHuw6AdY1M2jxUO83Rjf0HP7Sk1DtXj6j1EwkQNZrHAg2XPWlq62oqEhYvONq5pkC2Y9oPljWToLmQ== typical@^4.0.0: version "4.0.0" From ceb88f27ed72df6b070cfb661d70ccb724efc1e7 Mon Sep 17 00:00:00 2001 From: Martin Hochel Date: Thu, 1 Jun 2023 13:23:52 +0200 Subject: [PATCH 02/16] fix(tools): resolve TS errors exposed by TS 4.7 --- tools/generators/migrate-converged-pkg/index.ts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/tools/generators/migrate-converged-pkg/index.ts b/tools/generators/migrate-converged-pkg/index.ts index 779cce54762dcb..5086e159c02442 100644 --- a/tools/generators/migrate-converged-pkg/index.ts +++ b/tools/generators/migrate-converged-pkg/index.ts @@ -671,6 +671,8 @@ function setupUnstableApi(tree: Tree, options: NormalizedSchemaWithTsConfigs) { }, }; + stableJson.exports = stableJson.exports ?? {}; + Object.assign(stableJson.exports, { './unstable': { types: unstableJson.typings?.replace(/\.\.\//g, ''), @@ -758,6 +760,7 @@ function updateApiExtractor(tree: Tree, options: NormalizedSchemaWithTsConfigs) writeJson(tree, joinPathFragments(options.paths.configRoot, 'api-extractor.json'), apiExtractor.main); updateJson(tree, options.paths.packageJson, (json: PackageJson) => { + json.scripts = json.scripts ?? {}; Object.assign(json.scripts, scripts); return json; @@ -821,6 +824,7 @@ function setupStorybook(tree: Tree, options: NormalizedSchema) { storybook: `start-storybook`, start: 'yarn storybook', }; + json.scripts = json.scripts ?? {}; Object.assign(json.scripts, scripts); return json; From 2b48c40b0ee473aa134a5f900831580a9b6a68bf Mon Sep 17 00:00:00 2001 From: Martin Hochel Date: Thu, 1 Jun 2023 13:35:26 +0200 Subject: [PATCH 03/16] fix(tokens): resolve TS errors exposed by TS 4.7 --- packages/tokens/src/themeToTokensObject.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/tokens/src/themeToTokensObject.ts b/packages/tokens/src/themeToTokensObject.ts index 25189f147d8742..f6c6473a46698b 100644 --- a/packages/tokens/src/themeToTokensObject.ts +++ b/packages/tokens/src/themeToTokensObject.ts @@ -12,7 +12,7 @@ export function themeToTokensObject(theme: TTheme): Record const tokens = {} as Record; const keys = Object.keys(theme) as (keyof TTheme)[]; for (const key of keys) { - tokens[key] = `var(--${key})`; + tokens[key] = `var(--${String(key)})`; } return tokens; } From 0272ec062ea42aba01e863da4599523f8d76fd8f Mon Sep 17 00:00:00 2001 From: Martin Hochel Date: Thu, 1 Jun 2023 13:48:49 +0200 Subject: [PATCH 04/16] docs(date-time-utilities): re-generate api.md caused by api-extractor fixing issues on how to generate optional/undefined --- packages/date-time-utilities/etc/date-time-utilities.api.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/date-time-utilities/etc/date-time-utilities.api.md b/packages/date-time-utilities/etc/date-time-utilities.api.md index 0da93885a90d41..af45071f1a4442 100644 --- a/packages/date-time-utilities/etc/date-time-utilities.api.md +++ b/packages/date-time-utilities/etc/date-time-utilities.api.md @@ -96,13 +96,13 @@ export const formatMonthDayYear: (date: Date, strings: IDateGridStrings) => stri export const formatMonthYear: (date: Date, strings: IDateGridStrings) => string; // @public -export const formatTimeString: (date: Date, showSeconds?: boolean | undefined, useHour12?: boolean | undefined) => string; +export const formatTimeString: (date: Date, showSeconds?: boolean, useHour12?: boolean) => string; // @public export const formatYear: (date: Date) => string; // @public -export const getBoundedDateRange: (dateRange: Date[], minDate?: Date | undefined, maxDate?: Date | undefined) => Date[]; +export const getBoundedDateRange: (dateRange: Date[], minDate?: Date, maxDate?: Date) => Date[]; // @public export const getDateFromTimeSelection: (useHour12: boolean, dateStartAnchor: Date, selectedTime: string) => Date; From bd48e21bf45358d4fab244662d67cf4571d8d21c Mon Sep 17 00:00:00 2001 From: Martin Hochel Date: Thu, 1 Jun 2023 14:00:32 +0200 Subject: [PATCH 05/16] docs(react-shared-contexts): re-generate api.md caused by api-extractor implementation changes --- .../react-shared-contexts/etc/react-shared-contexts.api.md | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/packages/react-components/react-shared-contexts/etc/react-shared-contexts.api.md b/packages/react-components/react-shared-contexts/etc/react-shared-contexts.api.md index ec1af62ae00e65..b0ea1c6a27acff 100644 --- a/packages/react-components/react-shared-contexts/etc/react-shared-contexts.api.md +++ b/packages/react-components/react-shared-contexts/etc/react-shared-contexts.api.md @@ -5,7 +5,6 @@ ```ts import * as React_2 from 'react'; -import type { Theme } from '@fluentui/react-theme'; // @internal (undocumented) export const CustomStyleHooksContext_unstable: React_2.Context Date: Thu, 1 Jun 2023 14:26:48 +0200 Subject: [PATCH 06/16] docs(react-theme): re-generate api.md caused by api-extractor implementation changes --- .../react-theme/etc/react-theme.api.md | 658 +++++++++++++----- 1 file changed, 471 insertions(+), 187 deletions(-) diff --git a/packages/react-components/react-theme/etc/react-theme.api.md b/packages/react-components/react-theme/etc/react-theme.api.md index bfd103c4bf543a..0a7c2e0033402d 100644 --- a/packages/react-components/react-theme/etc/react-theme.api.md +++ b/packages/react-components/react-theme/etc/react-theme.api.md @@ -4,210 +4,494 @@ ```ts -import { BorderRadiusTokens } from '@fluentui/tokens'; -import { Brands } from '@fluentui/tokens'; -import { BrandVariants } from '@fluentui/tokens'; -import { ColorPaletteAnchor } from '@fluentui/tokens'; -import { ColorPaletteBeige } from '@fluentui/tokens'; -import { ColorPaletteBerry } from '@fluentui/tokens'; -import { ColorPaletteBlue } from '@fluentui/tokens'; -import { ColorPaletteBrass } from '@fluentui/tokens'; -import { ColorPaletteBrown } from '@fluentui/tokens'; -import { ColorPaletteCornflower } from '@fluentui/tokens'; -import { ColorPaletteCranberry } from '@fluentui/tokens'; -import { ColorPaletteDarkGreen } from '@fluentui/tokens'; -import { ColorPaletteDarkOrange } from '@fluentui/tokens'; -import { ColorPaletteDarkRed } from '@fluentui/tokens'; -import { ColorPaletteForest } from '@fluentui/tokens'; -import { ColorPaletteGold } from '@fluentui/tokens'; -import { ColorPaletteGrape } from '@fluentui/tokens'; -import { ColorPaletteGreen } from '@fluentui/tokens'; -import { ColorPaletteLavender } from '@fluentui/tokens'; -import { ColorPaletteLightGreen } from '@fluentui/tokens'; -import { ColorPaletteLightTeal } from '@fluentui/tokens'; -import { ColorPaletteLilac } from '@fluentui/tokens'; -import { ColorPaletteMagenta } from '@fluentui/tokens'; -import { ColorPaletteMarigold } from '@fluentui/tokens'; -import { ColorPaletteMink } from '@fluentui/tokens'; -import { ColorPaletteNavy } from '@fluentui/tokens'; -import { ColorPalettePeach } from '@fluentui/tokens'; -import { ColorPalettePink } from '@fluentui/tokens'; -import { ColorPalettePlatinum } from '@fluentui/tokens'; -import { ColorPalettePlum } from '@fluentui/tokens'; -import { ColorPalettePumpkin } from '@fluentui/tokens'; -import { ColorPalettePurple } from '@fluentui/tokens'; -import { ColorPaletteRed } from '@fluentui/tokens'; -import { ColorPaletteRoyalBlue } from '@fluentui/tokens'; -import { ColorPaletteSeafoam } from '@fluentui/tokens'; -import { ColorPaletteSteel } from '@fluentui/tokens'; -import { ColorPaletteTeal } from '@fluentui/tokens'; -import { ColorPaletteTokens } from '@fluentui/tokens'; -import { ColorPaletteYellow } from '@fluentui/tokens'; -import { ColorTokens } from '@fluentui/tokens'; -import { createDarkTheme } from '@fluentui/tokens'; -import { createHighContrastTheme } from '@fluentui/tokens'; -import { createLightTheme } from '@fluentui/tokens'; -import { createTeamsDarkTheme } from '@fluentui/tokens'; -import { CurveTokens } from '@fluentui/tokens'; -import { DurationTokens } from '@fluentui/tokens'; -import { FontFamilyTokens } from '@fluentui/tokens'; -import { FontSizeTokens } from '@fluentui/tokens'; -import { FontWeightTokens } from '@fluentui/tokens'; -import { HorizontalSpacingTokens } from '@fluentui/tokens'; -import { LineHeightTokens } from '@fluentui/tokens'; -import { PartialTheme } from '@fluentui/tokens'; -import { ShadowBrandTokens } from '@fluentui/tokens'; -import { ShadowTokens } from '@fluentui/tokens'; -import { SpacingTokens } from '@fluentui/tokens'; -import { StrokeWidthTokens } from '@fluentui/tokens'; -import { teamsDarkTheme } from '@fluentui/tokens'; -import { teamsHighContrastTheme } from '@fluentui/tokens'; -import { teamsLightTheme } from '@fluentui/tokens'; -import { Theme } from '@fluentui/tokens'; -import { themeToTokensObject } from '@fluentui/tokens'; -import { tokens } from '@fluentui/tokens'; -import { TypographyStyle } from '@fluentui/tokens'; -import { TypographyStyles } from '@fluentui/tokens'; -import { typographyStyles } from '@fluentui/tokens'; -import { VerticalSpacingTokens } from '@fluentui/tokens'; -import { webDarkTheme } from '@fluentui/tokens'; -import { webLightTheme } from '@fluentui/tokens'; +// @public (undocumented) +export type BorderRadiusTokens = { + borderRadiusNone: string; + borderRadiusSmall: string; + borderRadiusMedium: string; + borderRadiusLarge: string; + borderRadiusXLarge: string; + borderRadiusCircular: string; +}; -export { BorderRadiusTokens } +// @public (undocumented) +export type Brands = 10 | 20 | 30 | 40 | 50 | 60 | 70 | 80 | 90 | 100 | 110 | 120 | 130 | 140 | 150 | 160; -export { Brands } +// @public (undocumented) +export type BrandVariants = Record; -export { BrandVariants } +// @public (undocumented) +export type ColorPaletteAnchor = 'colorPaletteAnchorBackground2' | 'colorPaletteAnchorForeground2' | 'colorPaletteAnchorBorderActive'; -export { ColorPaletteAnchor } +// @public (undocumented) +export type ColorPaletteBeige = 'colorPaletteBeigeBackground2' | 'colorPaletteBeigeForeground2' | 'colorPaletteBeigeBorderActive'; -export { ColorPaletteBeige } +// @public (undocumented) +export type ColorPaletteBerry = 'colorPaletteBerryBackground1' | 'colorPaletteBerryBackground2' | 'colorPaletteBerryBackground3' | 'colorPaletteBerryForeground1' | 'colorPaletteBerryForeground2' | 'colorPaletteBerryForeground3' | 'colorPaletteBerryBorderActive' | 'colorPaletteBerryBorder1' | 'colorPaletteBerryBorder2'; -export { ColorPaletteBerry } +// @public (undocumented) +export type ColorPaletteBlue = 'colorPaletteBlueBackground2' | 'colorPaletteBlueForeground2' | 'colorPaletteBlueBorderActive'; -export { ColorPaletteBlue } +// @public (undocumented) +export type ColorPaletteBrass = 'colorPaletteBrassBackground2' | 'colorPaletteBrassForeground2' | 'colorPaletteBrassBorderActive'; -export { ColorPaletteBrass } +// @public (undocumented) +export type ColorPaletteBrown = 'colorPaletteBrownBackground2' | 'colorPaletteBrownForeground2' | 'colorPaletteBrownBorderActive'; -export { ColorPaletteBrown } +// @public (undocumented) +export type ColorPaletteCornflower = 'colorPaletteCornflowerBackground2' | 'colorPaletteCornflowerForeground2' | 'colorPaletteCornflowerBorderActive'; -export { ColorPaletteCornflower } +// @public (undocumented) +export type ColorPaletteCranberry = 'colorPaletteCranberryBackground2' | 'colorPaletteCranberryForeground2' | 'colorPaletteCranberryBorderActive'; -export { ColorPaletteCranberry } +// @public (undocumented) +export type ColorPaletteDarkGreen = 'colorPaletteDarkGreenBackground2' | 'colorPaletteDarkGreenForeground2' | 'colorPaletteDarkGreenBorderActive'; -export { ColorPaletteDarkGreen } +// @public (undocumented) +export type ColorPaletteDarkOrange = 'colorPaletteDarkOrangeBackground1' | 'colorPaletteDarkOrangeBackground2' | 'colorPaletteDarkOrangeBackground3' | 'colorPaletteDarkOrangeForeground1' | 'colorPaletteDarkOrangeForeground2' | 'colorPaletteDarkOrangeForeground3' | 'colorPaletteDarkOrangeBorderActive' | 'colorPaletteDarkOrangeBorder1' | 'colorPaletteDarkOrangeBorder2'; -export { ColorPaletteDarkOrange } +// @public (undocumented) +export type ColorPaletteDarkRed = 'colorPaletteDarkRedBackground2' | 'colorPaletteDarkRedForeground2' | 'colorPaletteDarkRedBorderActive'; -export { ColorPaletteDarkRed } +// @public (undocumented) +export type ColorPaletteForest = 'colorPaletteForestBackground2' | 'colorPaletteForestForeground2' | 'colorPaletteForestBorderActive'; -export { ColorPaletteForest } +// @public (undocumented) +export type ColorPaletteGold = 'colorPaletteGoldBackground2' | 'colorPaletteGoldForeground2' | 'colorPaletteGoldBorderActive'; -export { ColorPaletteGold } +// @public (undocumented) +export type ColorPaletteGrape = 'colorPaletteGrapeBackground2' | 'colorPaletteGrapeForeground2' | 'colorPaletteGrapeBorderActive'; -export { ColorPaletteGrape } - -export { ColorPaletteGreen } - -export { ColorPaletteLavender } - -export { ColorPaletteLightGreen } - -export { ColorPaletteLightTeal } - -export { ColorPaletteLilac } - -export { ColorPaletteMagenta } - -export { ColorPaletteMarigold } - -export { ColorPaletteMink } - -export { ColorPaletteNavy } - -export { ColorPalettePeach } - -export { ColorPalettePink } - -export { ColorPalettePlatinum } - -export { ColorPalettePlum } - -export { ColorPalettePumpkin } - -export { ColorPalettePurple } - -export { ColorPaletteRed } - -export { ColorPaletteRoyalBlue } - -export { ColorPaletteSeafoam } - -export { ColorPaletteSteel } - -export { ColorPaletteTeal } - -export { ColorPaletteTokens } - -export { ColorPaletteYellow } - -export { ColorTokens } - -export { createDarkTheme } - -export { createHighContrastTheme } - -export { createLightTheme } - -export { createTeamsDarkTheme } - -export { CurveTokens } - -export { DurationTokens } - -export { FontFamilyTokens } - -export { FontSizeTokens } - -export { FontWeightTokens } - -export { HorizontalSpacingTokens } - -export { LineHeightTokens } - -export { PartialTheme } - -export { ShadowBrandTokens } - -export { ShadowTokens } - -export { SpacingTokens } - -export { StrokeWidthTokens } - -export { teamsDarkTheme } - -export { teamsHighContrastTheme } - -export { teamsLightTheme } - -export { Theme } - -export { themeToTokensObject } - -export { tokens } - -export { TypographyStyle } - -export { TypographyStyles } - -export { typographyStyles } - -export { VerticalSpacingTokens } - -export { webDarkTheme } - -export { webLightTheme } +// @public (undocumented) +export type ColorPaletteGreen = 'colorPaletteGreenBackground1' | 'colorPaletteGreenBackground2' | 'colorPaletteGreenBackground3' | 'colorPaletteGreenForeground1' | 'colorPaletteGreenForeground2' | 'colorPaletteGreenForeground3' | 'colorPaletteGreenForegroundInverted' | 'colorPaletteGreenBorderActive' | 'colorPaletteGreenBorder1' | 'colorPaletteGreenBorder2'; + +// @public (undocumented) +export type ColorPaletteLavender = 'colorPaletteLavenderBackground2' | 'colorPaletteLavenderForeground2' | 'colorPaletteLavenderBorderActive'; + +// @public (undocumented) +export type ColorPaletteLightGreen = 'colorPaletteLightGreenBackground1' | 'colorPaletteLightGreenBackground2' | 'colorPaletteLightGreenBackground3' | 'colorPaletteLightGreenForeground1' | 'colorPaletteLightGreenForeground2' | 'colorPaletteLightGreenForeground3' | 'colorPaletteLightGreenBorderActive' | 'colorPaletteLightGreenBorder1' | 'colorPaletteLightGreenBorder2'; + +// @public (undocumented) +export type ColorPaletteLightTeal = 'colorPaletteLightTealBackground2' | 'colorPaletteLightTealForeground2' | 'colorPaletteLightTealBorderActive'; + +// @public (undocumented) +export type ColorPaletteLilac = 'colorPaletteLilacBackground2' | 'colorPaletteLilacForeground2' | 'colorPaletteLilacBorderActive'; + +// @public (undocumented) +export type ColorPaletteMagenta = 'colorPaletteMagentaBackground2' | 'colorPaletteMagentaForeground2' | 'colorPaletteMagentaBorderActive'; + +// @public (undocumented) +export type ColorPaletteMarigold = 'colorPaletteMarigoldBackground1' | 'colorPaletteMarigoldBackground2' | 'colorPaletteMarigoldBackground3' | 'colorPaletteMarigoldForeground1' | 'colorPaletteMarigoldForeground2' | 'colorPaletteMarigoldForeground3' | 'colorPaletteMarigoldBorderActive' | 'colorPaletteMarigoldBorder1' | 'colorPaletteMarigoldBorder2'; + +// @public (undocumented) +export type ColorPaletteMink = 'colorPaletteMinkBackground2' | 'colorPaletteMinkForeground2' | 'colorPaletteMinkBorderActive'; + +// @public (undocumented) +export type ColorPaletteNavy = 'colorPaletteNavyBackground2' | 'colorPaletteNavyForeground2' | 'colorPaletteNavyBorderActive'; + +// @public (undocumented) +export type ColorPalettePeach = 'colorPalettePeachBackground2' | 'colorPalettePeachForeground2' | 'colorPalettePeachBorderActive'; + +// @public (undocumented) +export type ColorPalettePink = 'colorPalettePinkBackground2' | 'colorPalettePinkForeground2' | 'colorPalettePinkBorderActive'; + +// @public (undocumented) +export type ColorPalettePlatinum = 'colorPalettePlatinumBackground2' | 'colorPalettePlatinumForeground2' | 'colorPalettePlatinumBorderActive'; + +// @public (undocumented) +export type ColorPalettePlum = 'colorPalettePlumBackground2' | 'colorPalettePlumForeground2' | 'colorPalettePlumBorderActive'; + +// @public (undocumented) +export type ColorPalettePumpkin = 'colorPalettePumpkinBackground2' | 'colorPalettePumpkinForeground2' | 'colorPalettePumpkinBorderActive'; + +// @public (undocumented) +export type ColorPalettePurple = 'colorPalettePurpleBackground2' | 'colorPalettePurpleForeground2' | 'colorPalettePurpleBorderActive'; + +// @public (undocumented) +export type ColorPaletteRed = 'colorPaletteRedBackground1' | 'colorPaletteRedBackground2' | 'colorPaletteRedBackground3' | 'colorPaletteRedForeground1' | 'colorPaletteRedForeground2' | 'colorPaletteRedForeground3' | 'colorPaletteRedForegroundInverted' | 'colorPaletteRedBorderActive' | 'colorPaletteRedBorder1' | 'colorPaletteRedBorder2'; + +// @public (undocumented) +export type ColorPaletteRoyalBlue = 'colorPaletteRoyalBlueBackground2' | 'colorPaletteRoyalBlueForeground2' | 'colorPaletteRoyalBlueBorderActive'; + +// @public (undocumented) +export type ColorPaletteSeafoam = 'colorPaletteSeafoamBackground2' | 'colorPaletteSeafoamForeground2' | 'colorPaletteSeafoamBorderActive'; + +// @public (undocumented) +export type ColorPaletteSteel = 'colorPaletteSteelBackground2' | 'colorPaletteSteelForeground2' | 'colorPaletteSteelBorderActive'; + +// @public (undocumented) +export type ColorPaletteTeal = 'colorPaletteTealBackground2' | 'colorPaletteTealForeground2' | 'colorPaletteTealBorderActive'; + +// @public (undocumented) +export type ColorPaletteTokens = StatusColorPaletteTokens & PersonaColorPaletteTokens; + +// @public (undocumented) +export type ColorPaletteYellow = 'colorPaletteYellowBackground1' | 'colorPaletteYellowBackground2' | 'colorPaletteYellowBackground3' | 'colorPaletteYellowForeground1' | 'colorPaletteYellowForeground2' | 'colorPaletteYellowForeground3' | 'colorPaletteYellowForegroundInverted' | 'colorPaletteYellowBorderActive' | 'colorPaletteYellowBorder1' | 'colorPaletteYellowBorder2'; + +// @public +export type ColorTokens = { + colorNeutralForeground1: string; + colorNeutralForeground1Hover: string; + colorNeutralForeground1Pressed: string; + colorNeutralForeground1Selected: string; + colorNeutralForeground2: string; + colorNeutralForeground2Hover: string; + colorNeutralForeground2Pressed: string; + colorNeutralForeground2Selected: string; + colorNeutralForeground2BrandHover: string; + colorNeutralForeground2BrandPressed: string; + colorNeutralForeground2BrandSelected: string; + colorNeutralForeground3: string; + colorNeutralForeground3Hover: string; + colorNeutralForeground3Pressed: string; + colorNeutralForeground3Selected: string; + colorNeutralForeground3BrandHover: string; + colorNeutralForeground3BrandPressed: string; + colorNeutralForeground3BrandSelected: string; + colorNeutralForeground4: string; + colorNeutralForegroundDisabled: string; + colorNeutralForegroundInvertedDisabled: string; + colorBrandForegroundLink: string; + colorBrandForegroundLinkHover: string; + colorBrandForegroundLinkPressed: string; + colorBrandForegroundLinkSelected: string; + colorNeutralForeground2Link: string; + colorNeutralForeground2LinkHover: string; + colorNeutralForeground2LinkPressed: string; + colorNeutralForeground2LinkSelected: string; + colorCompoundBrandForeground1: string; + colorCompoundBrandForeground1Hover: string; + colorCompoundBrandForeground1Pressed: string; + colorBrandForeground1: string; + colorBrandForeground2: string; + colorNeutralForeground1Static: string; + colorNeutralForegroundInverted: string; + colorNeutralForegroundInvertedHover: string; + colorNeutralForegroundInvertedPressed: string; + colorNeutralForegroundInvertedSelected: string; + colorNeutralForegroundInverted2: string; + colorNeutralForegroundOnBrand: string; + colorNeutralForegroundStaticInverted: string; + colorNeutralForegroundInvertedLink: string; + colorNeutralForegroundInvertedLinkHover: string; + colorNeutralForegroundInvertedLinkPressed: string; + colorNeutralForegroundInvertedLinkSelected: string; + colorBrandForegroundInverted: string; + colorBrandForegroundInvertedHover: string; + colorBrandForegroundInvertedPressed: string; + colorBrandForegroundOnLight: string; + colorBrandForegroundOnLightHover: string; + colorBrandForegroundOnLightPressed: string; + colorBrandForegroundOnLightSelected: string; + colorNeutralBackground1: string; + colorNeutralBackground1Hover: string; + colorNeutralBackground1Pressed: string; + colorNeutralBackground1Selected: string; + colorNeutralBackground2: string; + colorNeutralBackground2Hover: string; + colorNeutralBackground2Pressed: string; + colorNeutralBackground2Selected: string; + colorNeutralBackground3: string; + colorNeutralBackground3Hover: string; + colorNeutralBackground3Pressed: string; + colorNeutralBackground3Selected: string; + colorNeutralBackground4: string; + colorNeutralBackground4Hover: string; + colorNeutralBackground4Pressed: string; + colorNeutralBackground4Selected: string; + colorNeutralBackground5: string; + colorNeutralBackground5Hover: string; + colorNeutralBackground5Pressed: string; + colorNeutralBackground5Selected: string; + colorNeutralBackground6: string; + colorNeutralBackgroundInverted: string; + colorNeutralBackgroundStatic: string; + colorNeutralBackgroundAlpha: string; + colorNeutralBackgroundAlpha2: string; + colorSubtleBackground: string; + colorSubtleBackgroundHover: string; + colorSubtleBackgroundPressed: string; + colorSubtleBackgroundSelected: string; + colorSubtleBackgroundLightAlphaHover: string; + colorSubtleBackgroundLightAlphaPressed: string; + colorSubtleBackgroundLightAlphaSelected: string; + colorSubtleBackgroundInverted: string; + colorSubtleBackgroundInvertedHover: string; + colorSubtleBackgroundInvertedPressed: string; + colorSubtleBackgroundInvertedSelected: string; + colorTransparentBackground: string; + colorTransparentBackgroundHover: string; + colorTransparentBackgroundPressed: string; + colorTransparentBackgroundSelected: string; + colorNeutralBackgroundDisabled: string; + colorNeutralBackgroundInvertedDisabled: string; + colorNeutralStencil1: string; + colorNeutralStencil2: string; + colorNeutralStencil1Alpha: string; + colorNeutralStencil2Alpha: string; + colorBackgroundOverlay: string; + colorScrollbarOverlay: string; + colorBrandBackground: string; + colorBrandBackgroundHover: string; + colorBrandBackgroundPressed: string; + colorBrandBackgroundSelected: string; + colorCompoundBrandBackground: string; + colorCompoundBrandBackgroundHover: string; + colorCompoundBrandBackgroundPressed: string; + colorBrandBackgroundStatic: string; + colorBrandBackground2: string; + colorBrandBackgroundInverted: string; + colorBrandBackgroundInvertedHover: string; + colorBrandBackgroundInvertedPressed: string; + colorBrandBackgroundInvertedSelected: string; + colorNeutralStrokeAccessible: string; + colorNeutralStrokeAccessibleHover: string; + colorNeutralStrokeAccessiblePressed: string; + colorNeutralStrokeAccessibleSelected: string; + colorNeutralStroke1: string; + colorNeutralStroke1Hover: string; + colorNeutralStroke1Pressed: string; + colorNeutralStroke1Selected: string; + colorNeutralStroke2: string; + colorNeutralStroke3: string; + colorNeutralStrokeOnBrand: string; + colorNeutralStrokeOnBrand2: string; + colorNeutralStrokeOnBrand2Hover: string; + colorNeutralStrokeOnBrand2Pressed: string; + colorNeutralStrokeOnBrand2Selected: string; + colorBrandStroke1: string; + colorBrandStroke2: string; + colorCompoundBrandStroke: string; + colorCompoundBrandStrokeHover: string; + colorCompoundBrandStrokePressed: string; + colorNeutralStrokeDisabled: string; + colorNeutralStrokeInvertedDisabled: string; + colorTransparentStroke: string; + colorTransparentStrokeInteractive: string; + colorTransparentStrokeDisabled: string; + colorNeutralStrokeAlpha: string; + colorStrokeFocus1: string; + colorStrokeFocus2: string; + colorNeutralShadowAmbient: string; + colorNeutralShadowKey: string; + colorNeutralShadowAmbientLighter: string; + colorNeutralShadowKeyLighter: string; + colorNeutralShadowAmbientDarker: string; + colorNeutralShadowKeyDarker: string; + colorBrandShadowAmbient: string; + colorBrandShadowKey: string; +}; + +// @public (undocumented) +export const createDarkTheme: (brand: BrandVariants) => Theme; + +// @public (undocumented) +export const createHighContrastTheme: () => Theme; + +// @public (undocumented) +export const createLightTheme: (brand: BrandVariants) => Theme; + +// @public (undocumented) +export const createTeamsDarkTheme: (brand: BrandVariants) => Theme; + +// @public (undocumented) +export type CurveTokens = { + curveAccelerateMax: string; + curveAccelerateMid: string; + curveAccelerateMin: string; + curveDecelerateMax: string; + curveDecelerateMid: string; + curveDecelerateMin: string; + curveEasyEaseMax: string; + curveEasyEase: string; + curveLinear: string; +}; + +// @public (undocumented) +export type DurationTokens = { + durationUltraFast: string; + durationFaster: string; + durationFast: string; + durationNormal: string; + durationSlow: string; + durationSlower: string; + durationUltraSlow: string; +}; + +// @public (undocumented) +export type FontFamilyTokens = { + fontFamilyBase: string; + fontFamilyMonospace: string; + fontFamilyNumeric: string; +}; + +// @public (undocumented) +export type FontSizeTokens = { + fontSizeBase100: string; + fontSizeBase200: string; + fontSizeBase300: string; + fontSizeBase400: string; + fontSizeBase500: string; + fontSizeBase600: string; + fontSizeHero700: string; + fontSizeHero800: string; + fontSizeHero900: string; + fontSizeHero1000: string; +}; + +// @public (undocumented) +export type FontWeightTokens = { + fontWeightRegular: number; + fontWeightMedium: number; + fontWeightSemibold: number; + fontWeightBold: number; +}; + +// @public (undocumented) +export type HorizontalSpacingTokens = { + spacingHorizontalNone: string; + spacingHorizontalXXS: string; + spacingHorizontalXS: string; + spacingHorizontalSNudge: string; + spacingHorizontalS: string; + spacingHorizontalMNudge: string; + spacingHorizontalM: string; + spacingHorizontalL: string; + spacingHorizontalXL: string; + spacingHorizontalXXL: string; + spacingHorizontalXXXL: string; +}; + +// @public (undocumented) +export type LineHeightTokens = { + lineHeightBase100: string; + lineHeightBase200: string; + lineHeightBase300: string; + lineHeightBase400: string; + lineHeightBase500: string; + lineHeightBase600: string; + lineHeightHero700: string; + lineHeightHero800: string; + lineHeightHero900: string; + lineHeightHero1000: string; +}; + +// @public (undocumented) +export type PartialTheme = Partial; + +// @public (undocumented) +export type ShadowBrandTokens = { + shadow2Brand: string; + shadow4Brand: string; + shadow8Brand: string; + shadow16Brand: string; + shadow28Brand: string; + shadow64Brand: string; +}; + +// @public +export type ShadowTokens = { + shadow2: string; + shadow4: string; + shadow8: string; + shadow16: string; + shadow28: string; + shadow64: string; +}; + +// @public (undocumented) +export type SpacingTokens = { + none: string; + xxs: string; + xs: string; + sNudge: string; + s: string; + mNudge: string; + m: string; + l: string; + xl: string; + xxl: string; + xxxl: string; +}; + +// @public (undocumented) +export type StrokeWidthTokens = { + strokeWidthThin: string; + strokeWidthThick: string; + strokeWidthThicker: string; + strokeWidthThickest: string; +}; + +// @public (undocumented) +export const teamsDarkTheme: Theme; + +// @public (undocumented) +export const teamsHighContrastTheme: Theme; + +// @public (undocumented) +export const teamsLightTheme: Theme; + +// @public (undocumented) +export type Theme = FontSizeTokens & LineHeightTokens & BorderRadiusTokens & StrokeWidthTokens & HorizontalSpacingTokens & VerticalSpacingTokens & DurationTokens & CurveTokens & ShadowTokens & ShadowBrandTokens & FontFamilyTokens & FontWeightTokens & ColorPaletteTokens & ColorTokens; + +// @public +export function themeToTokensObject(theme: TTheme): Record; + +// @public (undocumented) +export const tokens: Record; + +// @public (undocumented) +export type TypographyStyle = { + fontFamily: string; + fontSize: string; + fontWeight: string; + lineHeight: string; +}; + +// @public (undocumented) +export type TypographyStyles = { + body1: TypographyStyle; + body1Strong: TypographyStyle; + body1Stronger: TypographyStyle; + body2: TypographyStyle; + caption1: TypographyStyle; + caption1Strong: TypographyStyle; + caption1Stronger: TypographyStyle; + caption2: TypographyStyle; + caption2Strong: TypographyStyle; + subtitle1: TypographyStyle; + subtitle2: TypographyStyle; + subtitle2Stronger: TypographyStyle; + title1: TypographyStyle; + title2: TypographyStyle; + title3: TypographyStyle; + largeTitle: TypographyStyle; + display: TypographyStyle; +}; + +// @public +export const typographyStyles: TypographyStyles; + +// @public (undocumented) +export type VerticalSpacingTokens = { + spacingVerticalNone: string; + spacingVerticalXXS: string; + spacingVerticalXS: string; + spacingVerticalSNudge: string; + spacingVerticalS: string; + spacingVerticalMNudge: string; + spacingVerticalM: string; + spacingVerticalL: string; + spacingVerticalXL: string; + spacingVerticalXXL: string; + spacingVerticalXXXL: string; +}; + +// @public (undocumented) +export const webDarkTheme: Theme; + +// @public (undocumented) +export const webLightTheme: Theme; // (No @packageDocumentation comment for this package) From ebee2e8dcbdb6bb5c1a8b42f771d2b6fcc2fa698 Mon Sep 17 00:00:00 2001 From: Martin Hochel Date: Thu, 1 Jun 2023 14:48:13 +0200 Subject: [PATCH 07/16] docs: re-generate api.md caused by api-extractor implementation changes --- .../etc/react-positioning.api.md | 2 +- .../etc/react-shared-contexts.api.md | 1 + .../react-tabster/etc/react-tabster.api.md | 2 +- .../react-theme/etc/react-theme.api.md | 658 +++++------------- .../etc/react-virtualizer.api.md | 2 +- 5 files changed, 191 insertions(+), 474 deletions(-) diff --git a/packages/react-components/react-positioning/etc/react-positioning.api.md b/packages/react-components/react-positioning/etc/react-positioning.api.md index 9455e814d73d2e..64ea1e3f13ebef 100644 --- a/packages/react-components/react-positioning/etc/react-positioning.api.md +++ b/packages/react-components/react-positioning/etc/react-positioning.api.md @@ -111,7 +111,7 @@ export type SetVirtualMouseTarget = (event: React_2.MouseEvent | MouseEvent | un export function usePositioning(options: UsePositioningOptions): UsePositioningReturn; // @internal -export const usePositioningMouseTarget: (initialState?: PositioningVirtualElement | (() => PositioningVirtualElement) | undefined) => readonly [PositioningVirtualElement | undefined, SetVirtualMouseTarget]; +export const usePositioningMouseTarget: (initialState?: PositioningVirtualElement | (() => PositioningVirtualElement)) => readonly [PositioningVirtualElement | undefined, SetVirtualMouseTarget]; // (No @packageDocumentation comment for this package) diff --git a/packages/react-components/react-shared-contexts/etc/react-shared-contexts.api.md b/packages/react-components/react-shared-contexts/etc/react-shared-contexts.api.md index b0ea1c6a27acff..692f39f433a054 100644 --- a/packages/react-components/react-shared-contexts/etc/react-shared-contexts.api.md +++ b/packages/react-components/react-shared-contexts/etc/react-shared-contexts.api.md @@ -5,6 +5,7 @@ ```ts import * as React_2 from 'react'; +import type { Theme } from '@fluentui/react-theme'; // @internal (undocumented) export const CustomStyleHooksContext_unstable: React_2.Context Types.TabsterDOMAttribute; +export const useFocusableGroup: (options?: UseFocusableGroupOptions) => Types.TabsterDOMAttribute; // @public (undocumented) export interface UseFocusableGroupOptions { diff --git a/packages/react-components/react-theme/etc/react-theme.api.md b/packages/react-components/react-theme/etc/react-theme.api.md index 0a7c2e0033402d..bfd103c4bf543a 100644 --- a/packages/react-components/react-theme/etc/react-theme.api.md +++ b/packages/react-components/react-theme/etc/react-theme.api.md @@ -4,494 +4,210 @@ ```ts -// @public (undocumented) -export type BorderRadiusTokens = { - borderRadiusNone: string; - borderRadiusSmall: string; - borderRadiusMedium: string; - borderRadiusLarge: string; - borderRadiusXLarge: string; - borderRadiusCircular: string; -}; +import { BorderRadiusTokens } from '@fluentui/tokens'; +import { Brands } from '@fluentui/tokens'; +import { BrandVariants } from '@fluentui/tokens'; +import { ColorPaletteAnchor } from '@fluentui/tokens'; +import { ColorPaletteBeige } from '@fluentui/tokens'; +import { ColorPaletteBerry } from '@fluentui/tokens'; +import { ColorPaletteBlue } from '@fluentui/tokens'; +import { ColorPaletteBrass } from '@fluentui/tokens'; +import { ColorPaletteBrown } from '@fluentui/tokens'; +import { ColorPaletteCornflower } from '@fluentui/tokens'; +import { ColorPaletteCranberry } from '@fluentui/tokens'; +import { ColorPaletteDarkGreen } from '@fluentui/tokens'; +import { ColorPaletteDarkOrange } from '@fluentui/tokens'; +import { ColorPaletteDarkRed } from '@fluentui/tokens'; +import { ColorPaletteForest } from '@fluentui/tokens'; +import { ColorPaletteGold } from '@fluentui/tokens'; +import { ColorPaletteGrape } from '@fluentui/tokens'; +import { ColorPaletteGreen } from '@fluentui/tokens'; +import { ColorPaletteLavender } from '@fluentui/tokens'; +import { ColorPaletteLightGreen } from '@fluentui/tokens'; +import { ColorPaletteLightTeal } from '@fluentui/tokens'; +import { ColorPaletteLilac } from '@fluentui/tokens'; +import { ColorPaletteMagenta } from '@fluentui/tokens'; +import { ColorPaletteMarigold } from '@fluentui/tokens'; +import { ColorPaletteMink } from '@fluentui/tokens'; +import { ColorPaletteNavy } from '@fluentui/tokens'; +import { ColorPalettePeach } from '@fluentui/tokens'; +import { ColorPalettePink } from '@fluentui/tokens'; +import { ColorPalettePlatinum } from '@fluentui/tokens'; +import { ColorPalettePlum } from '@fluentui/tokens'; +import { ColorPalettePumpkin } from '@fluentui/tokens'; +import { ColorPalettePurple } from '@fluentui/tokens'; +import { ColorPaletteRed } from '@fluentui/tokens'; +import { ColorPaletteRoyalBlue } from '@fluentui/tokens'; +import { ColorPaletteSeafoam } from '@fluentui/tokens'; +import { ColorPaletteSteel } from '@fluentui/tokens'; +import { ColorPaletteTeal } from '@fluentui/tokens'; +import { ColorPaletteTokens } from '@fluentui/tokens'; +import { ColorPaletteYellow } from '@fluentui/tokens'; +import { ColorTokens } from '@fluentui/tokens'; +import { createDarkTheme } from '@fluentui/tokens'; +import { createHighContrastTheme } from '@fluentui/tokens'; +import { createLightTheme } from '@fluentui/tokens'; +import { createTeamsDarkTheme } from '@fluentui/tokens'; +import { CurveTokens } from '@fluentui/tokens'; +import { DurationTokens } from '@fluentui/tokens'; +import { FontFamilyTokens } from '@fluentui/tokens'; +import { FontSizeTokens } from '@fluentui/tokens'; +import { FontWeightTokens } from '@fluentui/tokens'; +import { HorizontalSpacingTokens } from '@fluentui/tokens'; +import { LineHeightTokens } from '@fluentui/tokens'; +import { PartialTheme } from '@fluentui/tokens'; +import { ShadowBrandTokens } from '@fluentui/tokens'; +import { ShadowTokens } from '@fluentui/tokens'; +import { SpacingTokens } from '@fluentui/tokens'; +import { StrokeWidthTokens } from '@fluentui/tokens'; +import { teamsDarkTheme } from '@fluentui/tokens'; +import { teamsHighContrastTheme } from '@fluentui/tokens'; +import { teamsLightTheme } from '@fluentui/tokens'; +import { Theme } from '@fluentui/tokens'; +import { themeToTokensObject } from '@fluentui/tokens'; +import { tokens } from '@fluentui/tokens'; +import { TypographyStyle } from '@fluentui/tokens'; +import { TypographyStyles } from '@fluentui/tokens'; +import { typographyStyles } from '@fluentui/tokens'; +import { VerticalSpacingTokens } from '@fluentui/tokens'; +import { webDarkTheme } from '@fluentui/tokens'; +import { webLightTheme } from '@fluentui/tokens'; -// @public (undocumented) -export type Brands = 10 | 20 | 30 | 40 | 50 | 60 | 70 | 80 | 90 | 100 | 110 | 120 | 130 | 140 | 150 | 160; +export { BorderRadiusTokens } -// @public (undocumented) -export type BrandVariants = Record; +export { Brands } -// @public (undocumented) -export type ColorPaletteAnchor = 'colorPaletteAnchorBackground2' | 'colorPaletteAnchorForeground2' | 'colorPaletteAnchorBorderActive'; +export { BrandVariants } -// @public (undocumented) -export type ColorPaletteBeige = 'colorPaletteBeigeBackground2' | 'colorPaletteBeigeForeground2' | 'colorPaletteBeigeBorderActive'; +export { ColorPaletteAnchor } -// @public (undocumented) -export type ColorPaletteBerry = 'colorPaletteBerryBackground1' | 'colorPaletteBerryBackground2' | 'colorPaletteBerryBackground3' | 'colorPaletteBerryForeground1' | 'colorPaletteBerryForeground2' | 'colorPaletteBerryForeground3' | 'colorPaletteBerryBorderActive' | 'colorPaletteBerryBorder1' | 'colorPaletteBerryBorder2'; +export { ColorPaletteBeige } -// @public (undocumented) -export type ColorPaletteBlue = 'colorPaletteBlueBackground2' | 'colorPaletteBlueForeground2' | 'colorPaletteBlueBorderActive'; +export { ColorPaletteBerry } -// @public (undocumented) -export type ColorPaletteBrass = 'colorPaletteBrassBackground2' | 'colorPaletteBrassForeground2' | 'colorPaletteBrassBorderActive'; +export { ColorPaletteBlue } -// @public (undocumented) -export type ColorPaletteBrown = 'colorPaletteBrownBackground2' | 'colorPaletteBrownForeground2' | 'colorPaletteBrownBorderActive'; +export { ColorPaletteBrass } -// @public (undocumented) -export type ColorPaletteCornflower = 'colorPaletteCornflowerBackground2' | 'colorPaletteCornflowerForeground2' | 'colorPaletteCornflowerBorderActive'; +export { ColorPaletteBrown } -// @public (undocumented) -export type ColorPaletteCranberry = 'colorPaletteCranberryBackground2' | 'colorPaletteCranberryForeground2' | 'colorPaletteCranberryBorderActive'; +export { ColorPaletteCornflower } -// @public (undocumented) -export type ColorPaletteDarkGreen = 'colorPaletteDarkGreenBackground2' | 'colorPaletteDarkGreenForeground2' | 'colorPaletteDarkGreenBorderActive'; +export { ColorPaletteCranberry } -// @public (undocumented) -export type ColorPaletteDarkOrange = 'colorPaletteDarkOrangeBackground1' | 'colorPaletteDarkOrangeBackground2' | 'colorPaletteDarkOrangeBackground3' | 'colorPaletteDarkOrangeForeground1' | 'colorPaletteDarkOrangeForeground2' | 'colorPaletteDarkOrangeForeground3' | 'colorPaletteDarkOrangeBorderActive' | 'colorPaletteDarkOrangeBorder1' | 'colorPaletteDarkOrangeBorder2'; +export { ColorPaletteDarkGreen } -// @public (undocumented) -export type ColorPaletteDarkRed = 'colorPaletteDarkRedBackground2' | 'colorPaletteDarkRedForeground2' | 'colorPaletteDarkRedBorderActive'; +export { ColorPaletteDarkOrange } -// @public (undocumented) -export type ColorPaletteForest = 'colorPaletteForestBackground2' | 'colorPaletteForestForeground2' | 'colorPaletteForestBorderActive'; +export { ColorPaletteDarkRed } -// @public (undocumented) -export type ColorPaletteGold = 'colorPaletteGoldBackground2' | 'colorPaletteGoldForeground2' | 'colorPaletteGoldBorderActive'; +export { ColorPaletteForest } -// @public (undocumented) -export type ColorPaletteGrape = 'colorPaletteGrapeBackground2' | 'colorPaletteGrapeForeground2' | 'colorPaletteGrapeBorderActive'; +export { ColorPaletteGold } -// @public (undocumented) -export type ColorPaletteGreen = 'colorPaletteGreenBackground1' | 'colorPaletteGreenBackground2' | 'colorPaletteGreenBackground3' | 'colorPaletteGreenForeground1' | 'colorPaletteGreenForeground2' | 'colorPaletteGreenForeground3' | 'colorPaletteGreenForegroundInverted' | 'colorPaletteGreenBorderActive' | 'colorPaletteGreenBorder1' | 'colorPaletteGreenBorder2'; - -// @public (undocumented) -export type ColorPaletteLavender = 'colorPaletteLavenderBackground2' | 'colorPaletteLavenderForeground2' | 'colorPaletteLavenderBorderActive'; - -// @public (undocumented) -export type ColorPaletteLightGreen = 'colorPaletteLightGreenBackground1' | 'colorPaletteLightGreenBackground2' | 'colorPaletteLightGreenBackground3' | 'colorPaletteLightGreenForeground1' | 'colorPaletteLightGreenForeground2' | 'colorPaletteLightGreenForeground3' | 'colorPaletteLightGreenBorderActive' | 'colorPaletteLightGreenBorder1' | 'colorPaletteLightGreenBorder2'; - -// @public (undocumented) -export type ColorPaletteLightTeal = 'colorPaletteLightTealBackground2' | 'colorPaletteLightTealForeground2' | 'colorPaletteLightTealBorderActive'; - -// @public (undocumented) -export type ColorPaletteLilac = 'colorPaletteLilacBackground2' | 'colorPaletteLilacForeground2' | 'colorPaletteLilacBorderActive'; - -// @public (undocumented) -export type ColorPaletteMagenta = 'colorPaletteMagentaBackground2' | 'colorPaletteMagentaForeground2' | 'colorPaletteMagentaBorderActive'; - -// @public (undocumented) -export type ColorPaletteMarigold = 'colorPaletteMarigoldBackground1' | 'colorPaletteMarigoldBackground2' | 'colorPaletteMarigoldBackground3' | 'colorPaletteMarigoldForeground1' | 'colorPaletteMarigoldForeground2' | 'colorPaletteMarigoldForeground3' | 'colorPaletteMarigoldBorderActive' | 'colorPaletteMarigoldBorder1' | 'colorPaletteMarigoldBorder2'; - -// @public (undocumented) -export type ColorPaletteMink = 'colorPaletteMinkBackground2' | 'colorPaletteMinkForeground2' | 'colorPaletteMinkBorderActive'; - -// @public (undocumented) -export type ColorPaletteNavy = 'colorPaletteNavyBackground2' | 'colorPaletteNavyForeground2' | 'colorPaletteNavyBorderActive'; - -// @public (undocumented) -export type ColorPalettePeach = 'colorPalettePeachBackground2' | 'colorPalettePeachForeground2' | 'colorPalettePeachBorderActive'; - -// @public (undocumented) -export type ColorPalettePink = 'colorPalettePinkBackground2' | 'colorPalettePinkForeground2' | 'colorPalettePinkBorderActive'; - -// @public (undocumented) -export type ColorPalettePlatinum = 'colorPalettePlatinumBackground2' | 'colorPalettePlatinumForeground2' | 'colorPalettePlatinumBorderActive'; - -// @public (undocumented) -export type ColorPalettePlum = 'colorPalettePlumBackground2' | 'colorPalettePlumForeground2' | 'colorPalettePlumBorderActive'; - -// @public (undocumented) -export type ColorPalettePumpkin = 'colorPalettePumpkinBackground2' | 'colorPalettePumpkinForeground2' | 'colorPalettePumpkinBorderActive'; - -// @public (undocumented) -export type ColorPalettePurple = 'colorPalettePurpleBackground2' | 'colorPalettePurpleForeground2' | 'colorPalettePurpleBorderActive'; - -// @public (undocumented) -export type ColorPaletteRed = 'colorPaletteRedBackground1' | 'colorPaletteRedBackground2' | 'colorPaletteRedBackground3' | 'colorPaletteRedForeground1' | 'colorPaletteRedForeground2' | 'colorPaletteRedForeground3' | 'colorPaletteRedForegroundInverted' | 'colorPaletteRedBorderActive' | 'colorPaletteRedBorder1' | 'colorPaletteRedBorder2'; - -// @public (undocumented) -export type ColorPaletteRoyalBlue = 'colorPaletteRoyalBlueBackground2' | 'colorPaletteRoyalBlueForeground2' | 'colorPaletteRoyalBlueBorderActive'; - -// @public (undocumented) -export type ColorPaletteSeafoam = 'colorPaletteSeafoamBackground2' | 'colorPaletteSeafoamForeground2' | 'colorPaletteSeafoamBorderActive'; - -// @public (undocumented) -export type ColorPaletteSteel = 'colorPaletteSteelBackground2' | 'colorPaletteSteelForeground2' | 'colorPaletteSteelBorderActive'; - -// @public (undocumented) -export type ColorPaletteTeal = 'colorPaletteTealBackground2' | 'colorPaletteTealForeground2' | 'colorPaletteTealBorderActive'; - -// @public (undocumented) -export type ColorPaletteTokens = StatusColorPaletteTokens & PersonaColorPaletteTokens; - -// @public (undocumented) -export type ColorPaletteYellow = 'colorPaletteYellowBackground1' | 'colorPaletteYellowBackground2' | 'colorPaletteYellowBackground3' | 'colorPaletteYellowForeground1' | 'colorPaletteYellowForeground2' | 'colorPaletteYellowForeground3' | 'colorPaletteYellowForegroundInverted' | 'colorPaletteYellowBorderActive' | 'colorPaletteYellowBorder1' | 'colorPaletteYellowBorder2'; - -// @public -export type ColorTokens = { - colorNeutralForeground1: string; - colorNeutralForeground1Hover: string; - colorNeutralForeground1Pressed: string; - colorNeutralForeground1Selected: string; - colorNeutralForeground2: string; - colorNeutralForeground2Hover: string; - colorNeutralForeground2Pressed: string; - colorNeutralForeground2Selected: string; - colorNeutralForeground2BrandHover: string; - colorNeutralForeground2BrandPressed: string; - colorNeutralForeground2BrandSelected: string; - colorNeutralForeground3: string; - colorNeutralForeground3Hover: string; - colorNeutralForeground3Pressed: string; - colorNeutralForeground3Selected: string; - colorNeutralForeground3BrandHover: string; - colorNeutralForeground3BrandPressed: string; - colorNeutralForeground3BrandSelected: string; - colorNeutralForeground4: string; - colorNeutralForegroundDisabled: string; - colorNeutralForegroundInvertedDisabled: string; - colorBrandForegroundLink: string; - colorBrandForegroundLinkHover: string; - colorBrandForegroundLinkPressed: string; - colorBrandForegroundLinkSelected: string; - colorNeutralForeground2Link: string; - colorNeutralForeground2LinkHover: string; - colorNeutralForeground2LinkPressed: string; - colorNeutralForeground2LinkSelected: string; - colorCompoundBrandForeground1: string; - colorCompoundBrandForeground1Hover: string; - colorCompoundBrandForeground1Pressed: string; - colorBrandForeground1: string; - colorBrandForeground2: string; - colorNeutralForeground1Static: string; - colorNeutralForegroundInverted: string; - colorNeutralForegroundInvertedHover: string; - colorNeutralForegroundInvertedPressed: string; - colorNeutralForegroundInvertedSelected: string; - colorNeutralForegroundInverted2: string; - colorNeutralForegroundOnBrand: string; - colorNeutralForegroundStaticInverted: string; - colorNeutralForegroundInvertedLink: string; - colorNeutralForegroundInvertedLinkHover: string; - colorNeutralForegroundInvertedLinkPressed: string; - colorNeutralForegroundInvertedLinkSelected: string; - colorBrandForegroundInverted: string; - colorBrandForegroundInvertedHover: string; - colorBrandForegroundInvertedPressed: string; - colorBrandForegroundOnLight: string; - colorBrandForegroundOnLightHover: string; - colorBrandForegroundOnLightPressed: string; - colorBrandForegroundOnLightSelected: string; - colorNeutralBackground1: string; - colorNeutralBackground1Hover: string; - colorNeutralBackground1Pressed: string; - colorNeutralBackground1Selected: string; - colorNeutralBackground2: string; - colorNeutralBackground2Hover: string; - colorNeutralBackground2Pressed: string; - colorNeutralBackground2Selected: string; - colorNeutralBackground3: string; - colorNeutralBackground3Hover: string; - colorNeutralBackground3Pressed: string; - colorNeutralBackground3Selected: string; - colorNeutralBackground4: string; - colorNeutralBackground4Hover: string; - colorNeutralBackground4Pressed: string; - colorNeutralBackground4Selected: string; - colorNeutralBackground5: string; - colorNeutralBackground5Hover: string; - colorNeutralBackground5Pressed: string; - colorNeutralBackground5Selected: string; - colorNeutralBackground6: string; - colorNeutralBackgroundInverted: string; - colorNeutralBackgroundStatic: string; - colorNeutralBackgroundAlpha: string; - colorNeutralBackgroundAlpha2: string; - colorSubtleBackground: string; - colorSubtleBackgroundHover: string; - colorSubtleBackgroundPressed: string; - colorSubtleBackgroundSelected: string; - colorSubtleBackgroundLightAlphaHover: string; - colorSubtleBackgroundLightAlphaPressed: string; - colorSubtleBackgroundLightAlphaSelected: string; - colorSubtleBackgroundInverted: string; - colorSubtleBackgroundInvertedHover: string; - colorSubtleBackgroundInvertedPressed: string; - colorSubtleBackgroundInvertedSelected: string; - colorTransparentBackground: string; - colorTransparentBackgroundHover: string; - colorTransparentBackgroundPressed: string; - colorTransparentBackgroundSelected: string; - colorNeutralBackgroundDisabled: string; - colorNeutralBackgroundInvertedDisabled: string; - colorNeutralStencil1: string; - colorNeutralStencil2: string; - colorNeutralStencil1Alpha: string; - colorNeutralStencil2Alpha: string; - colorBackgroundOverlay: string; - colorScrollbarOverlay: string; - colorBrandBackground: string; - colorBrandBackgroundHover: string; - colorBrandBackgroundPressed: string; - colorBrandBackgroundSelected: string; - colorCompoundBrandBackground: string; - colorCompoundBrandBackgroundHover: string; - colorCompoundBrandBackgroundPressed: string; - colorBrandBackgroundStatic: string; - colorBrandBackground2: string; - colorBrandBackgroundInverted: string; - colorBrandBackgroundInvertedHover: string; - colorBrandBackgroundInvertedPressed: string; - colorBrandBackgroundInvertedSelected: string; - colorNeutralStrokeAccessible: string; - colorNeutralStrokeAccessibleHover: string; - colorNeutralStrokeAccessiblePressed: string; - colorNeutralStrokeAccessibleSelected: string; - colorNeutralStroke1: string; - colorNeutralStroke1Hover: string; - colorNeutralStroke1Pressed: string; - colorNeutralStroke1Selected: string; - colorNeutralStroke2: string; - colorNeutralStroke3: string; - colorNeutralStrokeOnBrand: string; - colorNeutralStrokeOnBrand2: string; - colorNeutralStrokeOnBrand2Hover: string; - colorNeutralStrokeOnBrand2Pressed: string; - colorNeutralStrokeOnBrand2Selected: string; - colorBrandStroke1: string; - colorBrandStroke2: string; - colorCompoundBrandStroke: string; - colorCompoundBrandStrokeHover: string; - colorCompoundBrandStrokePressed: string; - colorNeutralStrokeDisabled: string; - colorNeutralStrokeInvertedDisabled: string; - colorTransparentStroke: string; - colorTransparentStrokeInteractive: string; - colorTransparentStrokeDisabled: string; - colorNeutralStrokeAlpha: string; - colorStrokeFocus1: string; - colorStrokeFocus2: string; - colorNeutralShadowAmbient: string; - colorNeutralShadowKey: string; - colorNeutralShadowAmbientLighter: string; - colorNeutralShadowKeyLighter: string; - colorNeutralShadowAmbientDarker: string; - colorNeutralShadowKeyDarker: string; - colorBrandShadowAmbient: string; - colorBrandShadowKey: string; -}; - -// @public (undocumented) -export const createDarkTheme: (brand: BrandVariants) => Theme; - -// @public (undocumented) -export const createHighContrastTheme: () => Theme; - -// @public (undocumented) -export const createLightTheme: (brand: BrandVariants) => Theme; - -// @public (undocumented) -export const createTeamsDarkTheme: (brand: BrandVariants) => Theme; - -// @public (undocumented) -export type CurveTokens = { - curveAccelerateMax: string; - curveAccelerateMid: string; - curveAccelerateMin: string; - curveDecelerateMax: string; - curveDecelerateMid: string; - curveDecelerateMin: string; - curveEasyEaseMax: string; - curveEasyEase: string; - curveLinear: string; -}; - -// @public (undocumented) -export type DurationTokens = { - durationUltraFast: string; - durationFaster: string; - durationFast: string; - durationNormal: string; - durationSlow: string; - durationSlower: string; - durationUltraSlow: string; -}; - -// @public (undocumented) -export type FontFamilyTokens = { - fontFamilyBase: string; - fontFamilyMonospace: string; - fontFamilyNumeric: string; -}; - -// @public (undocumented) -export type FontSizeTokens = { - fontSizeBase100: string; - fontSizeBase200: string; - fontSizeBase300: string; - fontSizeBase400: string; - fontSizeBase500: string; - fontSizeBase600: string; - fontSizeHero700: string; - fontSizeHero800: string; - fontSizeHero900: string; - fontSizeHero1000: string; -}; - -// @public (undocumented) -export type FontWeightTokens = { - fontWeightRegular: number; - fontWeightMedium: number; - fontWeightSemibold: number; - fontWeightBold: number; -}; - -// @public (undocumented) -export type HorizontalSpacingTokens = { - spacingHorizontalNone: string; - spacingHorizontalXXS: string; - spacingHorizontalXS: string; - spacingHorizontalSNudge: string; - spacingHorizontalS: string; - spacingHorizontalMNudge: string; - spacingHorizontalM: string; - spacingHorizontalL: string; - spacingHorizontalXL: string; - spacingHorizontalXXL: string; - spacingHorizontalXXXL: string; -}; - -// @public (undocumented) -export type LineHeightTokens = { - lineHeightBase100: string; - lineHeightBase200: string; - lineHeightBase300: string; - lineHeightBase400: string; - lineHeightBase500: string; - lineHeightBase600: string; - lineHeightHero700: string; - lineHeightHero800: string; - lineHeightHero900: string; - lineHeightHero1000: string; -}; - -// @public (undocumented) -export type PartialTheme = Partial; - -// @public (undocumented) -export type ShadowBrandTokens = { - shadow2Brand: string; - shadow4Brand: string; - shadow8Brand: string; - shadow16Brand: string; - shadow28Brand: string; - shadow64Brand: string; -}; - -// @public -export type ShadowTokens = { - shadow2: string; - shadow4: string; - shadow8: string; - shadow16: string; - shadow28: string; - shadow64: string; -}; - -// @public (undocumented) -export type SpacingTokens = { - none: string; - xxs: string; - xs: string; - sNudge: string; - s: string; - mNudge: string; - m: string; - l: string; - xl: string; - xxl: string; - xxxl: string; -}; - -// @public (undocumented) -export type StrokeWidthTokens = { - strokeWidthThin: string; - strokeWidthThick: string; - strokeWidthThicker: string; - strokeWidthThickest: string; -}; - -// @public (undocumented) -export const teamsDarkTheme: Theme; - -// @public (undocumented) -export const teamsHighContrastTheme: Theme; - -// @public (undocumented) -export const teamsLightTheme: Theme; - -// @public (undocumented) -export type Theme = FontSizeTokens & LineHeightTokens & BorderRadiusTokens & StrokeWidthTokens & HorizontalSpacingTokens & VerticalSpacingTokens & DurationTokens & CurveTokens & ShadowTokens & ShadowBrandTokens & FontFamilyTokens & FontWeightTokens & ColorPaletteTokens & ColorTokens; - -// @public -export function themeToTokensObject(theme: TTheme): Record; - -// @public (undocumented) -export const tokens: Record; - -// @public (undocumented) -export type TypographyStyle = { - fontFamily: string; - fontSize: string; - fontWeight: string; - lineHeight: string; -}; - -// @public (undocumented) -export type TypographyStyles = { - body1: TypographyStyle; - body1Strong: TypographyStyle; - body1Stronger: TypographyStyle; - body2: TypographyStyle; - caption1: TypographyStyle; - caption1Strong: TypographyStyle; - caption1Stronger: TypographyStyle; - caption2: TypographyStyle; - caption2Strong: TypographyStyle; - subtitle1: TypographyStyle; - subtitle2: TypographyStyle; - subtitle2Stronger: TypographyStyle; - title1: TypographyStyle; - title2: TypographyStyle; - title3: TypographyStyle; - largeTitle: TypographyStyle; - display: TypographyStyle; -}; - -// @public -export const typographyStyles: TypographyStyles; - -// @public (undocumented) -export type VerticalSpacingTokens = { - spacingVerticalNone: string; - spacingVerticalXXS: string; - spacingVerticalXS: string; - spacingVerticalSNudge: string; - spacingVerticalS: string; - spacingVerticalMNudge: string; - spacingVerticalM: string; - spacingVerticalL: string; - spacingVerticalXL: string; - spacingVerticalXXL: string; - spacingVerticalXXXL: string; -}; - -// @public (undocumented) -export const webDarkTheme: Theme; - -// @public (undocumented) -export const webLightTheme: Theme; +export { ColorPaletteGrape } + +export { ColorPaletteGreen } + +export { ColorPaletteLavender } + +export { ColorPaletteLightGreen } + +export { ColorPaletteLightTeal } + +export { ColorPaletteLilac } + +export { ColorPaletteMagenta } + +export { ColorPaletteMarigold } + +export { ColorPaletteMink } + +export { ColorPaletteNavy } + +export { ColorPalettePeach } + +export { ColorPalettePink } + +export { ColorPalettePlatinum } + +export { ColorPalettePlum } + +export { ColorPalettePumpkin } + +export { ColorPalettePurple } + +export { ColorPaletteRed } + +export { ColorPaletteRoyalBlue } + +export { ColorPaletteSeafoam } + +export { ColorPaletteSteel } + +export { ColorPaletteTeal } + +export { ColorPaletteTokens } + +export { ColorPaletteYellow } + +export { ColorTokens } + +export { createDarkTheme } + +export { createHighContrastTheme } + +export { createLightTheme } + +export { createTeamsDarkTheme } + +export { CurveTokens } + +export { DurationTokens } + +export { FontFamilyTokens } + +export { FontSizeTokens } + +export { FontWeightTokens } + +export { HorizontalSpacingTokens } + +export { LineHeightTokens } + +export { PartialTheme } + +export { ShadowBrandTokens } + +export { ShadowTokens } + +export { SpacingTokens } + +export { StrokeWidthTokens } + +export { teamsDarkTheme } + +export { teamsHighContrastTheme } + +export { teamsLightTheme } + +export { Theme } + +export { themeToTokensObject } + +export { tokens } + +export { TypographyStyle } + +export { TypographyStyles } + +export { typographyStyles } + +export { VerticalSpacingTokens } + +export { webDarkTheme } + +export { webLightTheme } // (No @packageDocumentation comment for this package) diff --git a/packages/react-components/react-virtualizer/etc/react-virtualizer.api.md b/packages/react-components/react-virtualizer/etc/react-virtualizer.api.md index 069fc45c7692df..abbcc63f6a8e2d 100644 --- a/packages/react-components/react-virtualizer/etc/react-virtualizer.api.md +++ b/packages/react-components/react-virtualizer/etc/react-virtualizer.api.md @@ -72,7 +72,7 @@ export const useDynamicVirtualizerMeasure: (virtua }; // @public -export const useIntersectionObserver: (callback: IntersectionObserverCallback, options?: IntersectionObserverInit | undefined) => { +export const useIntersectionObserver: (callback: IntersectionObserverCallback, options?: IntersectionObserverInit) => { setObserverList: Dispatch>; setObserverInit: Dispatch>; observer: MutableRefObject; From 58b5f0b769c573e287f25a2f00356034bd7f06fa Mon Sep 17 00:00:00 2001 From: Martin Hochel Date: Thu, 1 Jun 2023 15:18:59 +0200 Subject: [PATCH 08/16] fix(scripts-storybook): resolve TS errors exposed by TS 4.7 --- scripts/storybook/src/utils.js | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/scripts/storybook/src/utils.js b/scripts/storybook/src/utils.js index f38cdf5e6efbf2..d7c29658287631 100644 --- a/scripts/storybook/src/utils.js +++ b/scripts/storybook/src/utils.js @@ -208,16 +208,15 @@ function _createCodesandboxRule(allPackageInfo = getAllPackageInfo()) { function getPackageStoriesGlob(options) { const projectMetadata = getProjectMetadata({ name: options.packageName }); - /** @type {Record} */ + /** @type {{name:string;version:string;dependencies?:Record}} */ const packageJson = JSON.parse( fs.readFileSync(path.resolve(workspaceRoot, projectMetadata.root, 'package.json'), 'utf-8'), ); - const dependencies = /** @type {Record} */ ( - Object.assign(packageJson.dependencies, { - [options.packageName]: '*', - }) - ); + packageJson.dependencies = packageJson.dependencies ?? {}; + const dependencies = Object.assign(packageJson.dependencies, { + [options.packageName]: '*', + }); const rootOffset = offsetFromRoot(options.callerPath.replace(workspaceRoot, '')); return Object.keys(dependencies) From b515273d2da455258f874da1ca8cfceda829a049 Mon Sep 17 00:00:00 2001 From: Martin Hochel Date: Fri, 2 Jun 2023 13:53:13 +0200 Subject: [PATCH 09/16] fix(utilities): resolve TS errors exposed by TS 4.7 --- .../utilities/src/warn/warnControlledUsage.ts | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/packages/utilities/src/warn/warnControlledUsage.ts b/packages/utilities/src/warn/warnControlledUsage.ts index 0ce94b86f31767..faf98d8f8221d3 100644 --- a/packages/utilities/src/warn/warnControlledUsage.ts +++ b/packages/utilities/src/warn/warnControlledUsage.ts @@ -74,9 +74,11 @@ export function warnControlledUsage

(params: IWarnControlledUsageParams

): v if (!(hasOnChange || isReadOnly) && !warningsMap.valueOnChange[componentId]) { warningsMap.valueOnChange[componentId] = true; warn( - `Warning: You provided a '${valueProp}' prop to a ${componentName} without an '${onChangeProp}' handler. ` + - `This will render a read-only field. If the field should be mutable use '${defaultValueProp}'. ` + - `Otherwise, set '${onChangeProp}'${readOnlyProp ? ` or '${readOnlyProp}'` : ''}.`, + `Warning: You provided a '${String(valueProp)}' prop to a ${String(componentName)} without an '${String( + onChangeProp, + )}' handler. ` + + `This will render a read-only field. If the field should be mutable use '${String(defaultValueProp)}'. ` + + `Otherwise, set '${String(onChangeProp)}'${readOnlyProp ? ` or '${String(readOnlyProp)}'` : ''}.`, ); } @@ -85,9 +87,13 @@ export function warnControlledUsage

(params: IWarnControlledUsageParams

): v if (defaultValue !== undefined && defaultValue !== null && !warningsMap.valueDefaultValue[componentId]) { warningsMap.valueDefaultValue[componentId] = true; warn( - `Warning: You provided both '${valueProp}' and '${defaultValueProp}' to a ${componentName}. ` + - `Form fields must be either controlled or uncontrolled (specify either the '${valueProp}' prop, ` + - `or the '${defaultValueProp}' prop, but not both). Decide between using a controlled or uncontrolled ` + + `Warning: You provided both '${String(valueProp)}' and '${String( + defaultValueProp, + )}' to a ${componentName}. ` + + `Form fields must be either controlled or uncontrolled (specify either the '${String(valueProp)}' prop, ` + + `or the '${String( + defaultValueProp, + )}' prop, but not both). Decide between using a controlled or uncontrolled ` + `${componentName} and remove one of these props. More info: https://fb.me/react-controlled-components`, ); } From 5dfdfecb2b82c542695965b0920115477ec6b782 Mon Sep 17 00:00:00 2001 From: Martin Hochel Date: Fri, 2 Jun 2023 13:57:35 +0200 Subject: [PATCH 10/16] docs(react): re-generate api.md which properly reflect optional/undefined API signatures introduce in ts 4.4 but api-extractor was not properly reflecting it --- packages/react/etc/react.api.md | 32 ++++++++++++++++---------------- 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/packages/react/etc/react.api.md b/packages/react/etc/react.api.md index 24aec2dc818851..705811e613ba98 100644 --- a/packages/react/etc/react.api.md +++ b/packages/react/etc/react.api.md @@ -561,7 +561,7 @@ export class BaseExtendedPicker> extend // (undocumented) protected onCopy: (ev: React_2.ClipboardEvent) => void; // (undocumented) - protected onInputChange: (value: string, composing?: boolean | undefined) => void; + protected onInputChange: (value: string, composing?: boolean) => void; // (undocumented) protected onInputClick: (ev: React_2.MouseEvent) => void; // (undocumented) @@ -1068,7 +1068,7 @@ export const CompactPeoplePicker: React_2.FunctionComponent; export class CompactPeoplePickerBase extends BasePeoplePicker { static defaultProps: { onRenderItem: (props: IPeoplePickerItemSelectedProps) => JSX.Element; - onRenderSuggestionsItem: (personaProps: IPersonaProps, suggestionsProps?: IBasePickerSuggestionsProps | undefined) => JSX.Element; + onRenderSuggestionsItem: (personaProps: IPersonaProps, suggestionsProps?: IBasePickerSuggestionsProps) => JSX.Element; createGenericItem: typeof createGenericItem; }; } @@ -1117,7 +1117,7 @@ export const ContextualMenuItem: React_2.FunctionComponent { constructor(props: IContextualMenuItemProps); // (undocumented) - dismissMenu: (dismissAll?: boolean | undefined) => void; + dismissMenu: (dismissAll?: boolean) => void; // (undocumented) dismissSubMenu: () => void; // (undocumented) @@ -1322,7 +1322,7 @@ export class DetailsListBase extends React_2.Component | undefined) => JSX.Element; + protected _onRenderRow: (props: IDetailsRowProps, defaultRender?: IRenderFunction) => JSX.Element; // (undocumented) render(): JSX.Element; // (undocumented) @@ -1712,7 +1712,7 @@ export { formProperties } export const getActivityItemClassNames: (styles: IActivityItemStyles, className: string, activityPersonas: Array, isCompact: boolean) => IActivityItemClassNames; // @public (undocumented) -export const getActivityItemStyles: (theme?: ITheme, customStyles?: IActivityItemStyles | undefined, animateBeaconSignal?: IActivityItemProps['animateBeaconSignal'], beaconColorOne?: IActivityItemProps['beaconColorOne'], beaconColorTwo?: IActivityItemProps['beaconColorTwo'], isCompact?: IActivityItemProps['isCompact']) => IActivityItemStyles; +export const getActivityItemStyles: (theme?: ITheme, customStyles?: IActivityItemStyles, animateBeaconSignal?: IActivityItemProps['animateBeaconSignal'], beaconColorOne?: IActivityItemProps['beaconColorOne'], beaconColorTwo?: IActivityItemProps['beaconColorTwo'], isCompact?: IActivityItemProps['isCompact']) => IActivityItemStyles; // @public (undocumented) export function getAllSelectedOptions(options: ISelectableOption[], selectedIndices: number[]): ISelectableOption[]; @@ -1755,7 +1755,7 @@ export const getCommandButtonStyles: (customStyles: IButtonStyles | undefined) = // Warning: (ae-internal-missing-underscore) The name "getContextualMenuItemClassNames" should be prefixed with an underscore because the declaration is marked as @internal // // @internal @deprecated (undocumented) -export const getContextualMenuItemClassNames: (theme: ITheme, disabled: boolean, expanded: boolean, checked: boolean, isAnchorLink: boolean, knownIcon: boolean, itemClassName?: string | undefined, dividerClassName?: string | undefined, iconClassName?: string | undefined, subMenuClassName?: string | undefined, primaryDisabled?: boolean | undefined, className?: string | undefined) => IContextualMenuItemStyles; +export const getContextualMenuItemClassNames: (theme: ITheme, disabled: boolean, expanded: boolean, checked: boolean, isAnchorLink: boolean, knownIcon: boolean, itemClassName?: string, dividerClassName?: string, iconClassName?: string, subMenuClassName?: string, primaryDisabled?: boolean, className?: string) => IContextualMenuItemStyles; // @public export const getContextualMenuItemStyles: (props: IContextualMenuItemStyleProps) => IContextualMenuItemStyles; @@ -1807,7 +1807,7 @@ export { getFocusOutlineStyle } export { getFocusStyle } // @public -export const getFontIcon: (iconName: string, className?: string | undefined, ariaLabel?: string | undefined) => React_2.ReactElement | null; +export const getFontIcon: (iconName: string, className?: string, ariaLabel?: string) => React_2.ReactElement | null; // @public export function getFullColorString(color: IColor): string; @@ -1824,7 +1824,7 @@ export { getIcon } export { getIconClassName } // @public (undocumented) -export const getIconContent: (iconName?: string | undefined) => IIconContent | null; +export const getIconContent: (iconName?: string) => IIconContent | null; export { getId } @@ -1880,7 +1880,7 @@ export const getNextResizeGroupStateProvider: (measurementCache?: { getCachedMeasurement: (data: any) => number | undefined; addMeasurementToCache: (data: any, measurement: number) => void; }) => { - getNextState: (props: IResizeGroupProps, currentState: IResizeGroupState, getElementToMeasureDimension: () => number, newContainerDimension?: number | undefined) => IResizeGroupState | undefined; + getNextState: (props: IResizeGroupProps, currentState: IResizeGroupState, getElementToMeasureDimension: () => number, newContainerDimension?: number) => IResizeGroupState | undefined; shouldRenderDataForMeasurement: (dataToMeasure: any | undefined) => boolean; getInitialResizeGroupState: (data: any) => IResizeGroupState; }; @@ -1927,7 +1927,7 @@ export function getShade(color: IColor, shade: Shade, isInverted?: boolean): ICo export const getShimmeredDetailsListStyles: (props: IShimmeredDetailsListStyleProps) => IShimmeredDetailsListStyles; // @public (undocumented) -export const getSplitButtonClassNames: (styles: IButtonStyles, disabled: boolean, expanded: boolean, checked: boolean, primaryDisabled?: boolean | undefined) => ISplitButtonClassNames; +export const getSplitButtonClassNames: (styles: IButtonStyles, disabled: boolean, expanded: boolean, checked: boolean, primaryDisabled?: boolean) => ISplitButtonClassNames; export { getStartDateOfWeek } @@ -2079,7 +2079,7 @@ export class HoverCardBase extends React_2.Component void; + dismiss: (withTimeOut?: boolean) => void; // (undocumented) render(): JSX.Element; } @@ -9860,7 +9860,7 @@ export const ListPeoplePicker: React_2.FunctionComponent; export class ListPeoplePickerBase extends MemberListPeoplePicker { static defaultProps: { onRenderItem: (props: IPeoplePickerItemSelectedProps) => JSX.Element; - onRenderSuggestionsItem: (personaProps: IPersonaProps, suggestionsProps?: IBasePickerSuggestionsProps | undefined) => JSX.Element; + onRenderSuggestionsItem: (personaProps: IPersonaProps, suggestionsProps?: IBasePickerSuggestionsProps) => JSX.Element; createGenericItem: typeof createGenericItem; }; } @@ -10012,7 +10012,7 @@ export const NormalPeoplePicker: React_2.FunctionComponent; export class NormalPeoplePickerBase extends BasePeoplePicker { static defaultProps: { onRenderItem: (props: IPeoplePickerItemSelectedProps) => JSX.Element; - onRenderSuggestionsItem: (personaProps: IPersonaProps, suggestionsProps?: IBasePickerSuggestionsProps | undefined) => JSX.Element; + onRenderSuggestionsItem: (personaProps: IPersonaProps, suggestionsProps?: IBasePickerSuggestionsProps) => JSX.Element; createGenericItem: typeof createGenericItem; }; } @@ -10087,7 +10087,7 @@ export class PanelBase extends React_2.Component imple // (undocumented) static defaultProps: IPanelProps; // (undocumented) - dismiss: (ev?: KeyboardEvent | React_2.SyntheticEvent | undefined) => void; + dismiss: (ev?: React_2.SyntheticEvent | KeyboardEvent) => void; // (undocumented) static getDerivedStateFromProps(nextProps: Readonly, prevState: Readonly): Partial | null; get isActive(): boolean; @@ -10551,7 +10551,7 @@ export class ScrollablePaneBase extends React_2.Component void; + sortSticky: (sticky: Sticky, sortAgain?: boolean) => void; // (undocumented) get stickyAbove(): HTMLDivElement | null; // (undocumented) @@ -11364,7 +11364,7 @@ export function useHeightOffset({ finalHeight }: IPositioningContainerProps, con export function useKeytipRef(options: KeytipDataOptions): React_2.Ref; // @public -export const useResponsiveMode: (elementRef: React_2.RefObject, overrideResponsiveMode?: ResponsiveMode | undefined) => ResponsiveMode; +export const useResponsiveMode: (elementRef: React_2.RefObject, overrideResponsiveMode?: ResponsiveMode) => ResponsiveMode; // @public @deprecated export type UseStylesOptions = { From 42bf96462c68a33e372125024e2691f6ff10b3ef Mon Sep 17 00:00:00 2001 From: Martin Hochel Date: Fri, 2 Jun 2023 14:21:07 +0200 Subject: [PATCH 11/16] docs(react-toast): re-generate api.md which properly reflect optional/undefined API signatures introduce in ts 4.4 but api-extractor was not properly reflecting it --- packages/react-components/react-toast/etc/react-toast.api.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/react-components/react-toast/etc/react-toast.api.md b/packages/react-components/react-toast/etc/react-toast.api.md index daef50bbcddee1..4dc2014c3f33da 100644 --- a/packages/react-components/react-toast/etc/react-toast.api.md +++ b/packages/react-components/react-toast/etc/react-toast.api.md @@ -170,7 +170,7 @@ export const useToastBodyStyles_unstable: (state: ToastBodyState) => ToastBodySt // @public (undocumented) export function useToastController(toasterId?: ToasterId): { - dispatchToast: (content: React_2.ReactNode, options?: DispatchToastOptions | undefined) => void; + dispatchToast: (content: React_2.ReactNode, options?: DispatchToastOptions) => void; dismissToast: (toastId: ToastId) => void; dismissAllToasts: () => void; updateToast: (options: UpdateToastOptions) => void; From 61eb5796e152dec8a2938823e3464e95d5bb8420 Mon Sep 17 00:00:00 2001 From: Martin Hochel Date: Mon, 5 Jun 2023 11:46:32 +0200 Subject: [PATCH 12/16] docs(react-breadcrumb): re-generate api.md which properly reflect optional/undefined API signatures introduce in ts 4.4 but api-extractor was not properly reflecting it --- .../react-breadcrumb/etc/react-breadcrumb.api.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/react-components/react-breadcrumb/etc/react-breadcrumb.api.md b/packages/react-components/react-breadcrumb/etc/react-breadcrumb.api.md index a6169e5317cced..0fd42469bdb0c0 100644 --- a/packages/react-components/react-breadcrumb/etc/react-breadcrumb.api.md +++ b/packages/react-components/react-breadcrumb/etc/react-breadcrumb.api.md @@ -153,10 +153,10 @@ export const renderBreadcrumbItem_unstable: (state: BreadcrumbItemState) => JSX. export const renderBreadcrumbLink_unstable: (state: BreadcrumbLinkState) => JSX.Element; // @public (undocumented) -export const truncateBreadcrumbLongName: (content: string, maxLength?: number | undefined) => string; +export const truncateBreadcrumbLongName: (content: string, maxLength?: number) => string; // @public (undocumented) -export const truncateBreadcrumLongTooltip: (content: string, maxLength?: number | undefined) => string; +export const truncateBreadcrumLongTooltip: (content: string, maxLength?: number) => string; // @public export const useBreadcrumb_unstable: (props: BreadcrumbProps, ref: React_2.Ref) => BreadcrumbState; From 34e0286fd68225be1a845ef13965f60c9f69d1d2 Mon Sep 17 00:00:00 2001 From: Martin Hochel Date: Mon, 5 Jun 2023 15:06:41 +0200 Subject: [PATCH 13/16] fix(react-norhtstar): resolve TS errors exposed by TS 4.7 --- .../fluentui/react-northstar/src/components/Portal/Portal.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/fluentui/react-northstar/src/components/Portal/Portal.tsx b/packages/fluentui/react-northstar/src/components/Portal/Portal.tsx index f3aee1fa8c450e..05015b944fb9ce 100644 --- a/packages/fluentui/react-northstar/src/components/Portal/Portal.tsx +++ b/packages/fluentui/react-northstar/src/components/Portal/Portal.tsx @@ -99,7 +99,7 @@ export const Portal: React.FC & FluentComponentStaticProps { const contentToRender = childrenExist(children) ? children : content; - const focusTrapZoneProps = (_.keys(trapFocus).length && trapFocus) || {}; + const focusTrapZoneProps = typeof trapFocus === 'boolean' ? {} : trapFocus; return ( open && ( From ef7db567919c924f5ed4a6d0130020cc1d026d04 Mon Sep 17 00:00:00 2001 From: Martin Hochel Date: Wed, 7 Jun 2023 10:21:32 +0200 Subject: [PATCH 14/16] fix(react-experiments): resolve TS errors exposed by TS 4.7 --- .../components/FloatingSuggestions/FloatingSuggestions.tsx | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/packages/react-experiments/src/components/FloatingSuggestions/FloatingSuggestions.tsx b/packages/react-experiments/src/components/FloatingSuggestions/FloatingSuggestions.tsx index 1f8cf76a6ce70e..29a92564a8b4f8 100644 --- a/packages/react-experiments/src/components/FloatingSuggestions/FloatingSuggestions.tsx +++ b/packages/react-experiments/src/components/FloatingSuggestions/FloatingSuggestions.tsx @@ -70,7 +70,7 @@ export class FloatingSuggestions public onQueryStringChanged = (queryString: string): void => { if (queryString !== this.state.queryString) { this.setState({ - queryString: queryString, + queryString, }); if (this.props.onInputChanged) { @@ -278,9 +278,8 @@ export class FloatingSuggestions case KeyCodes.del: if ( this.props.onRemoveSuggestion && - this.suggestionsControl.current && - this.suggestionsControl.current.hasSuggestionSelected && - this.suggestionsControl.current.currentSuggestion && + this.suggestionsControl.current?.hasSuggestionSelected && + this.suggestionsControl.current?.currentSuggestion && ev.shiftKey ) { this.props.onRemoveSuggestion(this.suggestionsControl.current.currentSuggestion!.item); From f62d3507aaaaaa5c881ed4a08cc80d600148b529 Mon Sep 17 00:00:00 2001 From: Martin Hochel Date: Wed, 7 Jun 2023 11:06:04 +0200 Subject: [PATCH 15/16] docs(react-migration-v8-v9): re-generate api.md which was changed because TS 4.7 breaking change in declaration emit api - Optional parameter does not on include undefined --- .../react-migration-v8-v9/etc/react-migration-v8-v9.api.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/react-components/react-migration-v8-v9/etc/react-migration-v8-v9.api.md b/packages/react-components/react-migration-v8-v9/etc/react-migration-v8-v9.api.md index 9ab032796c3502..67f9a350db22a0 100644 --- a/packages/react-components/react-migration-v8-v9/etc/react-migration-v8-v9.api.md +++ b/packages/react-components/react-migration-v8-v9/etc/react-migration-v8-v9.api.md @@ -63,10 +63,10 @@ export const CompoundButtonShim: React_2.ForwardRefExoticComponent BrandVariants; // @public -export const createV8Theme: (brandColors: BrandVariants, themeV9: Theme, isDarkTheme?: boolean, themeV8?: Theme_2 | undefined) => Theme_2; +export const createV8Theme: (brandColors: BrandVariants, themeV9: Theme, isDarkTheme?: boolean, themeV8?: Theme_2) => Theme_2; // @public -export const createV9Theme: (themeV8: Theme_2, baseThemeV9?: Theme | undefined) => Theme; +export const createV9Theme: (themeV8: Theme_2, baseThemeV9?: Theme) => Theme; // @public export const DefaultButtonShim: React_2.ForwardRefExoticComponent>; From c8aa1e434f2372786666c35d799d4bc094f8ca2f Mon Sep 17 00:00:00 2001 From: Martin Hochel Date: Wed, 7 Jun 2023 13:18:03 +0200 Subject: [PATCH 16/16] generate changefiles --- ...ntui-api-docs-7e266cc5-ae8b-46da-b22b-e985218f53b8.json | 7 +++++++ ...ime-utilities-4c4aa9e9-90bb-41a0-bf9a-2dfb71e7225d.json | 7 +++++++ ...luentui-react-c7a29270-edda-4443-ac6b-3e6726f93ee6.json | 7 +++++++ ...t-experiments-86254b1a-bb55-4f56-8958-c6c3ae1e1ae7.json | 7 +++++++ ...gration-v8-v9-88a794f5-92e2-49f3-a5ff-cef44b75db12.json | 7 +++++++ ...t-positioning-51a66b94-7733-4fb6-a73f-7aa47f67f21d.json | 7 +++++++ ...ared-contexts-6abfa676-0116-42b0-90ce-1c3b3050084d.json | 7 +++++++ ...react-tabster-822660c5-1fae-47bd-8a8f-673d210610a5.json | 7 +++++++ ...t-virtualizer-a2abc531-b693-4972-8dd3-0f6351663f49.json | 7 +++++++ ...uentui-tokens-6d7634ab-d750-45b2-94f8-71cf02182dae.json | 7 +++++++ ...tui-utilities-6c590fec-07b4-4e45-855c-5f71bf154b05.json | 7 +++++++ 11 files changed, 77 insertions(+) create mode 100644 change/@fluentui-api-docs-7e266cc5-ae8b-46da-b22b-e985218f53b8.json create mode 100644 change/@fluentui-date-time-utilities-4c4aa9e9-90bb-41a0-bf9a-2dfb71e7225d.json create mode 100644 change/@fluentui-react-c7a29270-edda-4443-ac6b-3e6726f93ee6.json create mode 100644 change/@fluentui-react-experiments-86254b1a-bb55-4f56-8958-c6c3ae1e1ae7.json create mode 100644 change/@fluentui-react-migration-v8-v9-88a794f5-92e2-49f3-a5ff-cef44b75db12.json create mode 100644 change/@fluentui-react-positioning-51a66b94-7733-4fb6-a73f-7aa47f67f21d.json create mode 100644 change/@fluentui-react-shared-contexts-6abfa676-0116-42b0-90ce-1c3b3050084d.json create mode 100644 change/@fluentui-react-tabster-822660c5-1fae-47bd-8a8f-673d210610a5.json create mode 100644 change/@fluentui-react-virtualizer-a2abc531-b693-4972-8dd3-0f6351663f49.json create mode 100644 change/@fluentui-tokens-6d7634ab-d750-45b2-94f8-71cf02182dae.json create mode 100644 change/@fluentui-utilities-6c590fec-07b4-4e45-855c-5f71bf154b05.json diff --git a/change/@fluentui-api-docs-7e266cc5-ae8b-46da-b22b-e985218f53b8.json b/change/@fluentui-api-docs-7e266cc5-ae8b-46da-b22b-e985218f53b8.json new file mode 100644 index 00000000000000..9630248cf8d039 --- /dev/null +++ b/change/@fluentui-api-docs-7e266cc5-ae8b-46da-b22b-e985218f53b8.json @@ -0,0 +1,7 @@ +{ + "type": "patch", + "comment": "chore: bump api-extractor-model to support typescript 4.7", + "packageName": "@fluentui/api-docs", + "email": "martinhochel@microsoft.com", + "dependentChangeType": "patch" +} diff --git a/change/@fluentui-date-time-utilities-4c4aa9e9-90bb-41a0-bf9a-2dfb71e7225d.json b/change/@fluentui-date-time-utilities-4c4aa9e9-90bb-41a0-bf9a-2dfb71e7225d.json new file mode 100644 index 00000000000000..11def202e52d2a --- /dev/null +++ b/change/@fluentui-date-time-utilities-4c4aa9e9-90bb-41a0-bf9a-2dfb71e7225d.json @@ -0,0 +1,7 @@ +{ + "type": "patch", + "comment": "chore: migrate to ts 4.7 which wont emit undefined anymore for optional arguments", + "packageName": "@fluentui/date-time-utilities", + "email": "martinhochel@microsoft.com", + "dependentChangeType": "patch" +} diff --git a/change/@fluentui-react-c7a29270-edda-4443-ac6b-3e6726f93ee6.json b/change/@fluentui-react-c7a29270-edda-4443-ac6b-3e6726f93ee6.json new file mode 100644 index 00000000000000..d99896e89ff13b --- /dev/null +++ b/change/@fluentui-react-c7a29270-edda-4443-ac6b-3e6726f93ee6.json @@ -0,0 +1,7 @@ +{ + "type": "patch", + "comment": "chore: migrate to ts 4.7 which wont emit undefined anymore for optional arguments", + "packageName": "@fluentui/react", + "email": "martinhochel@microsoft.com", + "dependentChangeType": "patch" +} diff --git a/change/@fluentui-react-experiments-86254b1a-bb55-4f56-8958-c6c3ae1e1ae7.json b/change/@fluentui-react-experiments-86254b1a-bb55-4f56-8958-c6c3ae1e1ae7.json new file mode 100644 index 00000000000000..e5560530f673bb --- /dev/null +++ b/change/@fluentui-react-experiments-86254b1a-bb55-4f56-8958-c6c3ae1e1ae7.json @@ -0,0 +1,7 @@ +{ + "type": "patch", + "comment": "fix: resolve FloatingSuggestion if conditions to mitigate ts 4.7 always true violation\"", + "packageName": "@fluentui/react-experiments", + "email": "martinhochel@microsoft.com", + "dependentChangeType": "patch" +} diff --git a/change/@fluentui-react-migration-v8-v9-88a794f5-92e2-49f3-a5ff-cef44b75db12.json b/change/@fluentui-react-migration-v8-v9-88a794f5-92e2-49f3-a5ff-cef44b75db12.json new file mode 100644 index 00000000000000..8b3adcbb7bc492 --- /dev/null +++ b/change/@fluentui-react-migration-v8-v9-88a794f5-92e2-49f3-a5ff-cef44b75db12.json @@ -0,0 +1,7 @@ +{ + "type": "patch", + "comment": "chore: migrate to ts 4.7 which wont emit undefined anymore for optional arguments", + "packageName": "@fluentui/react-migration-v8-v9", + "email": "martinhochel@microsoft.com", + "dependentChangeType": "patch" +} diff --git a/change/@fluentui-react-positioning-51a66b94-7733-4fb6-a73f-7aa47f67f21d.json b/change/@fluentui-react-positioning-51a66b94-7733-4fb6-a73f-7aa47f67f21d.json new file mode 100644 index 00000000000000..1892d0f46c4a18 --- /dev/null +++ b/change/@fluentui-react-positioning-51a66b94-7733-4fb6-a73f-7aa47f67f21d.json @@ -0,0 +1,7 @@ +{ + "type": "patch", + "comment": "chore: migrate to ts 4.7 which wont emit undefined anymore for optional arguments", + "packageName": "@fluentui/react-positioning", + "email": "martinhochel@microsoft.com", + "dependentChangeType": "patch" +} diff --git a/change/@fluentui-react-shared-contexts-6abfa676-0116-42b0-90ce-1c3b3050084d.json b/change/@fluentui-react-shared-contexts-6abfa676-0116-42b0-90ce-1c3b3050084d.json new file mode 100644 index 00000000000000..5cbc3dd7f70435 --- /dev/null +++ b/change/@fluentui-react-shared-contexts-6abfa676-0116-42b0-90ce-1c3b3050084d.json @@ -0,0 +1,7 @@ +{ + "type": "none", + "comment": "chore: re-generate api.md", + "packageName": "@fluentui/react-shared-contexts", + "email": "martinhochel@microsoft.com", + "dependentChangeType": "none" +} diff --git a/change/@fluentui-react-tabster-822660c5-1fae-47bd-8a8f-673d210610a5.json b/change/@fluentui-react-tabster-822660c5-1fae-47bd-8a8f-673d210610a5.json new file mode 100644 index 00000000000000..0da85281ee8e05 --- /dev/null +++ b/change/@fluentui-react-tabster-822660c5-1fae-47bd-8a8f-673d210610a5.json @@ -0,0 +1,7 @@ +{ + "type": "patch", + "comment": "chore: migrate to ts 4.7 which wont emit undefined anymore for optional arguments", + "packageName": "@fluentui/react-tabster", + "email": "martinhochel@microsoft.com", + "dependentChangeType": "patch" +} diff --git a/change/@fluentui-react-virtualizer-a2abc531-b693-4972-8dd3-0f6351663f49.json b/change/@fluentui-react-virtualizer-a2abc531-b693-4972-8dd3-0f6351663f49.json new file mode 100644 index 00000000000000..292673c2d65523 --- /dev/null +++ b/change/@fluentui-react-virtualizer-a2abc531-b693-4972-8dd3-0f6351663f49.json @@ -0,0 +1,7 @@ +{ + "type": "prerelease", + "comment": "chore: migrate to ts 4.7 which wont emit undefined anymore for optional arguments", + "packageName": "@fluentui/react-virtualizer", + "email": "martinhochel@microsoft.com", + "dependentChangeType": "patch" +} diff --git a/change/@fluentui-tokens-6d7634ab-d750-45b2-94f8-71cf02182dae.json b/change/@fluentui-tokens-6d7634ab-d750-45b2-94f8-71cf02182dae.json new file mode 100644 index 00000000000000..e4f1c8be695d6e --- /dev/null +++ b/change/@fluentui-tokens-6d7634ab-d750-45b2-94f8-71cf02182dae.json @@ -0,0 +1,7 @@ +{ + "type": "prerelease", + "comment": "fix: cast to String keys interpolated within string literals", + "packageName": "@fluentui/tokens", + "email": "martinhochel@microsoft.com", + "dependentChangeType": "patch" +} diff --git a/change/@fluentui-utilities-6c590fec-07b4-4e45-855c-5f71bf154b05.json b/change/@fluentui-utilities-6c590fec-07b4-4e45-855c-5f71bf154b05.json new file mode 100644 index 00000000000000..b56a385c7cc97f --- /dev/null +++ b/change/@fluentui-utilities-6c590fec-07b4-4e45-855c-5f71bf154b05.json @@ -0,0 +1,7 @@ +{ + "type": "patch", + "comment": "fix: cast to String keys interpolated within string literals", + "packageName": "@fluentui/utilities", + "email": "martinhochel@microsoft.com", + "dependentChangeType": "patch" +}