Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
66 commits
Select commit Hold shift + click to select a range
bbf09d2
Semantic-tokens: Add initial package (#34121)
Mitch-At-Work Apr 3, 2025
9ce6151
Semantic-tokens: Generation Scripts (#34159)
Mitch-At-Work Apr 11, 2025
9a23818
Semantic Tokens: Generate token baseline (#34217)
Mitch-At-Work Apr 14, 2025
f47a728
Semantic-tokens: Flat export deprecated tokens (Tree shakability in E…
Mitch-At-Work Apr 14, 2025
8c45e0e
Semantic-Tokens: React-Link (#34218)
Mitch-At-Work Apr 17, 2025
af0422d
Handle duplicate tokens and enable null for f2 overrides (#34277)
Mitch-At-Work Apr 17, 2025
6966211
Extended-tokens: Cleanup token exports (#34384)
Mitch-At-Work May 8, 2025
5c0a988
Extended-tokens: Update to latest JSON spec and fix camel casing (#34…
Mitch-At-Work May 14, 2025
a8fc02a
Semantic Tokens: Progress Bar (#34403)
etudie May 14, 2025
cec0fd5
Extended-tokens: Fix regressions from new JSON refactor (#34458)
Mitch-At-Work May 15, 2025
5717832
Extended-tokens: Fix link focus reference (changed in latest JSON upd…
Mitch-At-Work May 15, 2025
e3e278e
Semantic Tokens: React-text and react-label (#34350)
Mitch-At-Work May 15, 2025
86ae2fc
Semantic-tokens: React-button (#34276)
Mitch-At-Work May 20, 2025
158b560
Extended-tokens: Fluent variant fallbacks (#34498)
Mitch-At-Work May 22, 2025
6640645
Extended-tokens: Accordion (#34500)
Mitch-At-Work May 29, 2025
534318d
Extended-tokens: Ensure legacy variants also get flat exported from l…
Mitch-At-Work May 29, 2025
5f9c8fb
Extended-tokens: Add Kumo semantic theme (TEMPORARY - REMOVE BEFORE M…
Mitch-At-Work May 29, 2025
01b5ee2
Extended-tokens: Enable null tokens (#34544)
Mitch-At-Work May 30, 2025
eaab8ac
update avatar to use semantic tokens (#34553)
rachethecreator Jun 5, 2025
7a109d3
update divider to use semantic tokens (#34601)
rachethecreator Jun 13, 2025
216cc87
Extended-tokens: Simplify shadow set (#34660)
Mitch-At-Work Jun 17, 2025
19b24e4
update fluentOverrides test to dedupe shadow tokens first (#34678)
rachethecreator Jun 18, 2025
fbd23bf
update switch to use semantic tokens (#34489)
rachethecreator Jun 25, 2025
0c94c43
update rating to use semantic tokens (#34672)
rachethecreator Jun 25, 2025
b1d62fd
Extended Tokens: React-Drawer (#34683)
Mitch-At-Work Jun 25, 2025
7544c1f
Extended Tokens: React-Spinner (#34645)
Mitch-At-Work Jun 25, 2025
1b76b0c
React-Tree: Upgrade to extended tokens (#34602)
Mitch-At-Work Jun 25, 2025
9706644
Extended Tokens: Text area (#34692)
etudie Jun 25, 2025
b5b4d4b
Extended tokens: Migrate to custom style hooks + Button example (#34735)
Mitch-At-Work Jul 4, 2025
d789fc8
Extended-tokens: Migrate all semantic styles into custom style hooks …
Mitch-At-Work Jul 4, 2025
b0c11cb
Semantic Style Hooks: Update Readme (#34797)
Mitch-At-Work Jul 8, 2025
cd3e1b0
React-Image: Add Semantic Tokens (#34625)
Mitch-At-Work Jul 10, 2025
6a4fd14
Extended-tokens: React-List (#34706)
Mitch-At-Work Jul 10, 2025
259b4a6
update dialog to use semantic tokens (#34624)
rachethecreator Jul 10, 2025
bf273db
update message bar to use semantic tokens (#34657)
rachethecreator Jul 10, 2025
bb6682d
update tabs to use semantic tokens (#34782)
rachethecreator Jul 11, 2025
6576715
update slider to use semantic tokens (#34758)
rachethecreator Jul 11, 2025
77d35bd
update menu to use semantic tokens (#34723)
rachethecreator Jul 11, 2025
3b05a7a
update radio to use semantic tokens (#34739)
rachethecreator Jul 11, 2025
be1c3e7
add persona to semantic style hooks (#34808)
rachethecreator Jul 14, 2025
8ba2e91
Semantic tokens checkbox (#34811)
brandonthomas Jul 14, 2025
c42197d
Update Badge to use semantic tokens (#34765)
terynk Jul 15, 2025
562796c
add breadcrumb to semantic style hooks (#34837)
rachethecreator Jul 15, 2025
030ab22
Test: Ensure legacy fallback overrides originalToken exists (#34843)
Mitch-At-Work Jul 15, 2025
ef32e8d
Field: Update to use Semantic Tokens (#34804)
terynk Jul 16, 2025
eab4e6c
add spin button to semantic style hooks (#34829)
rachethecreator Jul 16, 2025
56c6d64
Extended Tokens: Input (#34796)
etudie Jul 16, 2025
29bcb30
add toolbar to semantic style hooks (#34840)
rachethecreator Jul 17, 2025
4250e67
Semantic Tokens: Tooltip (#34845)
mltejera Jul 17, 2025
08da482
add infolabel to semantic style hooks (#34856)
rachethecreator Jul 17, 2025
23c7bcf
Toast: Update Toast to use semantic tokens (#34844)
terynk Jul 18, 2025
abf24b6
add table to semantic style hooks (#34863)
rachethecreator Jul 21, 2025
09f65f4
Semantic Tokens: Fix classNames order in Avatar and Accordion (#34885)
Mitch-At-Work Jul 21, 2025
e9cdc39
Extended Tokens: Search (#34842)
etudie Jul 23, 2025
fab0b12
add teaching popover to semantic style hooks (#34898)
rachethecreator Jul 24, 2025
e268d65
Semantic Tokens: Popover (#34907)
etudie Jul 24, 2025
4a4a645
Rebase and fix rebase conflict
Mitch-At-Work Aug 5, 2025
58d622d
Remove storybook changes (for now)
Mitch-At-Work Aug 5, 2025
a64cebd
Fix up package json and version of semantic tokens
Mitch-At-Work Aug 6, 2025
51e7109
Extended-tokens: Fix merge conflict after rebase (#34987)
Mitch-At-Work Aug 6, 2025
4635d68
Resolve rebase changes
Mitch-At-Work Aug 20, 2025
0fd8b57
Resolve rebase and remove unneeded change files
Mitch-At-Work Aug 20, 2025
16cad32
Add back in changefile (not consumed yet)
Mitch-At-Work Aug 20, 2025
dadc752
Fix up changed variable names and rebuild
Mitch-At-Work Aug 20, 2025
f3329cd
Update readmes to include warning about token name changes incoming
Mitch-At-Work Aug 20, 2025
14851a3
Ensure alphabetical order in tsconfig
Mitch-At-Work Aug 20, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .github/CODEOWNERS
Original file line number Diff line number Diff line change
Expand Up @@ -275,6 +275,7 @@ packages/react-components/react-virtualizer/stories @microsoft/xc-uxe @Mitch-At-
packages/react-components/react-skeleton/library @microsoft/cxe-prg @marcosmoura
packages/react-components/react-skeleton/stories @microsoft/cxe-prg @marcosmoura
packages/tokens @microsoft/teams-prg
packages/semantic-tokens @microsoft/xc-uxe
packages/react-components/react-tags/library @microsoft/cxe-prg @microsoft/teams-prg @ValentinaKozlova
packages/react-components/react-tags/stories @microsoft/cxe-prg @microsoft/teams-prg @ValentinaKozlova
packages/react-components/react-migration-v0-v9/library @microsoft/teams-prg
Expand Down Expand Up @@ -332,6 +333,8 @@ packages/react-components/component-selector-preview/library @microsoft/teams-pr
packages/react-components/component-selector-preview/stories @microsoft/teams-prg
packages/react-components/react-menu-grid-preview/library @microsoft/teams-prg
packages/react-components/react-menu-grid-preview/stories @microsoft/teams-prg
packages/react-components/semantic-style-hooks-preview/library @microsoft/xc-uxe
packages/react-components/semantic-style-hooks-preview/stories @microsoft/xc-uxe
# <%= NX-CODEOWNER-PLACEHOLDER %>

## Components
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"type": "minor",
"comment": "feat: Implement semantic style hooks framework",
"packageName": "@fluentui/semantic-style-hooks-preview",
"email": "mifraser@microsoft.com",
"dependentChangeType": "patch"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"type": "prerelease",
"comment": "feat: Initial semantic token package scaffolding",
"packageName": "@fluentui/semantic-tokens",
"email": "mifraser@microsoft.com",
"dependentChangeType": "patch"
}
1 change: 1 addition & 0 deletions nx.json
Original file line number Diff line number Diff line change
Expand Up @@ -144,6 +144,7 @@
"scripts/**/*",
"packages/eslint-plugin/**",
"packages/tokens/**",
"packages/semantic-tokens/**",
"packages/react-conformance/**",
"packages/react-components/**/*",
"packages/charts/react-charts/**/*"
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"extends": "../../../../.babelrc-v9.json",
"plugins": ["annotate-pure-calls", "@babel/transform-react-pure-annotations"]
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"extends": ["plugin:@fluentui/eslint-plugin/react"],
"root": true
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
{
"$schema": "https://json.schemastore.org/swcrc",
"exclude": [
"/testing",
"/**/*.cy.ts",
"/**/*.cy.tsx",
"/**/*.spec.ts",
"/**/*.spec.tsx",
"/**/*.test.ts",
"/**/*.test.tsx"
],
"jsc": {
"parser": {
"syntax": "typescript",
"tsx": true,
"decorators": false,
"dynamicImport": false
},
"externalHelpers": true,
"transform": {
"react": {
"runtime": "classic",
"useSpread": true
}
},
"target": "es2019"
},
"minify": false,
"sourceMaps": true
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
@fluentui/semantic-style-hooks-preview

Copyright (c) Microsoft Corporation

All rights reserved.

MIT License

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the ""Software""), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED _AS IS_, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

Note: Usage of the fonts and icons referenced in Fluent UI React is subject to the terms listed at https://aka.ms/fluentui-assets-license
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
# @fluentui/semantic-style-hooks-preview

WARNING: Semantic tokens and their style hooks are undergoing rapid transformation as we prepare to build out AI adjacent design systems - we expect many breaking changes to occur in this preview release to the token names, however the overall structure and fallback implementation should remain consistent.

**Semantic Style Hooks components for [Fluent UI React](https://react.fluentui.dev/)**

These are not production-ready components and **should never be used in product**. This space is useful for testing new components whose APIs might change before final release.

** Semantic Token Migration Guide **

This package exports custom style hooks (see https://react.fluentui.dev/?path=/docs/concepts-developer-advanced-styling-techniques--docs) that enable semantic tokens (@fluentui/semantic-tokens) usage in Fluent core component styles.

The SEMANTIC_STYLE_HOOKS object can be directly passed in to the FluentProvider:

```
import { SEMANTIC_STYLE_HOOKS } from '@fluentui/semantic-style-hooks-preview';

<FluentProvider theme={theme} customStyleHooks_unstable={SEMANTIC_STYLE_HOOKS}>
{// app code}
</FluentProvider>
```

If no FluentProvider is present, the CustomStyleHooksProvider can be used directly:

```
import { CustomStyleHooksProvider_unstable as CustomStyleHooksProvider } from '@fluentui/react-shared-contexts';
import { SEMANTIC_STYLE_HOOKS } from '@fluentui/semantic-style-hooks-preview';

<CustomStyleHooksProvider value={SEMANTIC_STYLE_HOOKS}>
{// app code}
</CustomStyleHooksProvider>
```

You can also opt in to specific component semantic styles via the flat exports for further scoping - if you use custom style hooks in your app already, we recommend calling these functions at the top of existing style hooks instead.

Legacy themes and tokens will continue to work once enabled thanks to the CSSVar fallback system - feel free to continue using existing token themes and optionally add semantic token values as we build out more tooling to assist with the generation of semantic token themes in the future.

** Bundle Size **

Please note, that the bundle size of these style hooks has not yet been optimized, as this package serves as an intermediate step until semantic tokens are stabilized and can be merged in the underlying styles files of each component.

** Deprecation Plan **

Once semantic tokens have been tested, stabilized, and confirmed backwards compatible, they will be optimized and enabled in the base component packages by default. At this point, the semantic style hooks package will be deprecated - please use this package to test and raise any issues prior to enable a smooth transition.
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"$schema": "https://developer.microsoft.com/json-schemas/api-extractor/v7/api-extractor.schema.json",
"extends": "@fluentui/scripts-api-extractor/api-extractor.common.v-next.json",
"mainEntryPointFilePath": "<projectRoot>/../../../../../../dist/out-tsc/types/packages/react-components/<unscopedPackageName>/library/src/index.d.ts"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
/** Jest test setup file. */
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
# @fluentui/semantic-style-hooks-preview Spec

## Background

_Description and use cases of this component_

## Prior Art

_Include background research done for this component_

- _Link to Open UI research_
- _Link to comparison of v7 and v0_
- _Link to GitHub epic issue for the converged component_

## Sample Code

_Provide some representative example code that uses the proposed API for the component_

## Variants

_Describe visual or functional variants of this control, if applicable. For example, a slider could have a 2D variant._

## API

_List the **Props** and **Slots** proposed for the component. Ideally this would just be a link to the component's `.types.ts` file_

## Structure

- _**Public**_
- _**Internal**_
- _**DOM** - how the component will be rendered as HTML elements_

## Migration

_Describe what will need to be done to upgrade from the existing implementations:_

- _Migration from v8_
- _Migration from v0_

## Behaviors

_Explain how the component will behave in use, including:_

- _Component States_
- _Interaction_
- _Keyboard_
- _Cursor_
- _Touch_
- _Screen readers_

## Accessibility

Base accessibility information is included in the design document. After the spec is filled and review, outcomes from it need to be communicated to design and incorporated in the design document.

- Decide whether to use **native element** or folow **ARIA** and provide reasons
- Identify the **[ARIA](https://www.w3.org/TR/wai-aria-practices-1.2/) pattern** and, if the component is listed there, follow its specification as possible.
- Identify accessibility **variants**, the `role` ([ARIA roles](https://www.w3.org/TR/wai-aria-1.1/#role_definitions)) of the component, its `slots` and `aria-*` props.
- Describe the **keyboard navigation**: Tab Oder and Arrow Key Navigation. Describe any other keyboard **shortcuts** used
- Specify texts for **state change announcements** - [ARIA live regions
](https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/ARIA_Live_Regions) (number of available items in dropdown, error messages, confirmations, ...)
- Identify UI parts that appear on **hover or focus** and specify keyboard and screen reader interaction with them
- List cases when **focus** needs to be **trapped** in sections of the UI (for dialogs and popups or for hierarchical navigation)
- List cases when **focus** needs to be **moved programatically** (if parts of the UI are appearing/disappearing or other cases)
Loading
Loading