Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

mergeStyles: initial shadow DOM and constructable stylesheets implementation #28906

Merged
merged 25 commits into from
Aug 30, 2023

Conversation

spmonahan
Copy link
Contributor

@spmonahan spmonahan commented Aug 17, 2023

NOTE: this feature is being merged into a non-master branch as it's not yet ready for stable release but we want to be able to stick with a more or less typical PR workflow.

Previous Behavior

mergeStyles did not work with shadow DOM or constructable stylesheets.

New Behavior

mergeStyles now, optionally, supports shadow DOM and constructable stylesheets.

This is missing many tests but I want to get it up for feedback.

Related Issue(s)

NOTE: replaces #28894 as I had a naming conflict with the git branches.

@spmonahan spmonahan requested review from a team, khmakoto and dzearing as code owners August 17, 2023 18:34
@github-actions github-actions bot added this to the August Project Cycle Q4 2023 milestone Aug 17, 2023
@spmonahan spmonahan changed the base branch from master to shadow-dom August 17, 2023 18:34
@spmonahan spmonahan changed the title Merge styles/shadow dom mergeStyles: initial shadow DOM and constructable stylesheets implementation Aug 17, 2023
@codesandbox-ci
Copy link

codesandbox-ci bot commented Aug 17, 2023

This pull request is automatically built and testable in CodeSandbox.

To see build info of the built libraries, click here or the icon next to each commit SHA.

Latest deployment of this branch, based on commit a2bae80:

Sandbox Source
@fluentui/react 8 starter Configuration
@fluentui/react-components 9 starter Configuration

@spmonahan
Copy link
Contributor Author

/azp run

@azure-pipelines
Copy link

Azure Pipelines could not run because the pipeline triggers exclude this branch/path.

@@ -1,5 +1,6 @@
pr:
- master
- shadow-dom # Remove before merging to master
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@spmonahan spmonahan requested a review from brwai August 17, 2023 22:43
@spmonahan
Copy link
Contributor Author

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

packages/merge-styles/src/Stylesheet.ts Show resolved Hide resolved
packages/merge-styles/src/styleToClassName.ts Outdated Show resolved Hide resolved
packages/merge-styles/src/styleToClassName.ts Outdated Show resolved Hide resolved
packages/merge-styles/etc/merge-styles.api.md Outdated Show resolved Hide resolved
packages/utilities/etc/utilities.api.md Show resolved Hide resolved
packages/merge-styles/src/Stylesheet.ts Outdated Show resolved Hide resolved
packages/merge-styles/src/mergeStyleSets.ts Outdated Show resolved Hide resolved
packages/utilities/src/styled.tsx Outdated Show resolved Hide resolved
packages/merge-styles/src/Stylesheet.ts Outdated Show resolved Hide resolved
@spmonahan spmonahan requested a review from a team as a code owner August 18, 2023 21:26
@spmonahan spmonahan force-pushed the merge-styles/shadow-dom branch 2 times, most recently from f677bb8 to cd7a66b Compare August 21, 2023 21:13
@spmonahan spmonahan merged commit 870fe42 into microsoft:shadow-dom Aug 30, 2023
13 checks passed
spmonahan added a commit that referenced this pull request Sep 6, 2023
…ntation (#28906)

* feat: update mergeStyles to support shadow DOM

NOTE: this is stil a work in progress.

- Refactors Stylesheet.ts to support shadow DOM
- Adds React context and hooks for opting in to
  shadow DOM
- Adds an API for projecting styles to child windows.

* refactor and docs

- Refactors stylesheet shadow DOM implementation a bit.
- Adds a new docs page.

* refactor to clean up types

- Fixes various Typescript errors
- Adds APIs to better encapsulate shadow DOM features

* change files

* add pipeline trigger

* update test

* fix typescript error

* improve 'ShadowConfig' check

* export ShadowConfig type

* add constant for '__global__'

* add default ShadowConfig

* remove commented out line

* better change file messages

* remove IStyleSheetKey type

* clean up

* fix import path

* add null checks before inserting styles

* remove commented out code

* refactor IStyleOptions to optionally include shadowConfig

Adds an optional `shadowConfig` object to IStyleOptions. This
allows us to pass the shadow DOM configuration object through to
all the places we need it without modifying APIs to add a parameter
for "shadowConfig".

Aligns naming. Previously we had a type `ShadowConfig` and mostly referred
to objects as "shadowConfig" but there were some instances of "shadowDom".
Everything is now referred to by "shadowConfig/ShadowConfig".

* update styleToClassName tests

* update customizable tests

* update component types for shadow DOM

- remove "shadowDom" prop
- update syles types to include "__shadowConfig__" key

* remove unused variable

* fix types in shadow dom example

* add guard to calling requestAnimationFrame in Stylesheet

This fix is for ssr-tests.
spmonahan added a commit that referenced this pull request Oct 6, 2023
…ntation (#28906)

* feat: update mergeStyles to support shadow DOM

NOTE: this is stil a work in progress.

- Refactors Stylesheet.ts to support shadow DOM
- Adds React context and hooks for opting in to
  shadow DOM
- Adds an API for projecting styles to child windows.

* refactor and docs

- Refactors stylesheet shadow DOM implementation a bit.
- Adds a new docs page.

* refactor to clean up types

- Fixes various Typescript errors
- Adds APIs to better encapsulate shadow DOM features

* change files

* add pipeline trigger

* update test

* fix typescript error

* improve 'ShadowConfig' check

* export ShadowConfig type

* add constant for '__global__'

* add default ShadowConfig

* remove commented out line

* better change file messages

* remove IStyleSheetKey type

* clean up

* fix import path

* add null checks before inserting styles

* remove commented out code

* refactor IStyleOptions to optionally include shadowConfig

Adds an optional `shadowConfig` object to IStyleOptions. This
allows us to pass the shadow DOM configuration object through to
all the places we need it without modifying APIs to add a parameter
for "shadowConfig".

Aligns naming. Previously we had a type `ShadowConfig` and mostly referred
to objects as "shadowConfig" but there were some instances of "shadowDom".
Everything is now referred to by "shadowConfig/ShadowConfig".

* update styleToClassName tests

* update customizable tests

* update component types for shadow DOM

- remove "shadowDom" prop
- update syles types to include "__shadowConfig__" key

* remove unused variable

* fix types in shadow dom example

* add guard to calling requestAnimationFrame in Stylesheet

This fix is for ssr-tests.
spmonahan added a commit that referenced this pull request Oct 9, 2023
…ntation (#28906)

* feat: update mergeStyles to support shadow DOM

NOTE: this is stil a work in progress.

- Refactors Stylesheet.ts to support shadow DOM
- Adds React context and hooks for opting in to
  shadow DOM
- Adds an API for projecting styles to child windows.

* refactor and docs

- Refactors stylesheet shadow DOM implementation a bit.
- Adds a new docs page.

* refactor to clean up types

- Fixes various Typescript errors
- Adds APIs to better encapsulate shadow DOM features

* change files

* add pipeline trigger

* update test

* fix typescript error

* improve 'ShadowConfig' check

* export ShadowConfig type

* add constant for '__global__'

* add default ShadowConfig

* remove commented out line

* better change file messages

* remove IStyleSheetKey type

* clean up

* fix import path

* add null checks before inserting styles

* remove commented out code

* refactor IStyleOptions to optionally include shadowConfig

Adds an optional `shadowConfig` object to IStyleOptions. This
allows us to pass the shadow DOM configuration object through to
all the places we need it without modifying APIs to add a parameter
for "shadowConfig".

Aligns naming. Previously we had a type `ShadowConfig` and mostly referred
to objects as "shadowConfig" but there were some instances of "shadowDom".
Everything is now referred to by "shadowConfig/ShadowConfig".

* update styleToClassName tests

* update customizable tests

* update component types for shadow DOM

- remove "shadowDom" prop
- update syles types to include "__shadowConfig__" key

* remove unused variable

* fix types in shadow dom example

* add guard to calling requestAnimationFrame in Stylesheet

This fix is for ssr-tests.
spmonahan added a commit that referenced this pull request Oct 10, 2023
…ntation (#28906)

* feat: update mergeStyles to support shadow DOM

NOTE: this is stil a work in progress.

- Refactors Stylesheet.ts to support shadow DOM
- Adds React context and hooks for opting in to
  shadow DOM
- Adds an API for projecting styles to child windows.

* refactor and docs

- Refactors stylesheet shadow DOM implementation a bit.
- Adds a new docs page.

* refactor to clean up types

- Fixes various Typescript errors
- Adds APIs to better encapsulate shadow DOM features

* change files

* add pipeline trigger

* update test

* fix typescript error

* improve 'ShadowConfig' check

* export ShadowConfig type

* add constant for '__global__'

* add default ShadowConfig

* remove commented out line

* better change file messages

* remove IStyleSheetKey type

* clean up

* fix import path

* add null checks before inserting styles

* remove commented out code

* refactor IStyleOptions to optionally include shadowConfig

Adds an optional `shadowConfig` object to IStyleOptions. This
allows us to pass the shadow DOM configuration object through to
all the places we need it without modifying APIs to add a parameter
for "shadowConfig".

Aligns naming. Previously we had a type `ShadowConfig` and mostly referred
to objects as "shadowConfig" but there were some instances of "shadowDom".
Everything is now referred to by "shadowConfig/ShadowConfig".

* update styleToClassName tests

* update customizable tests

* update component types for shadow DOM

- remove "shadowDom" prop
- update syles types to include "__shadowConfig__" key

* remove unused variable

* fix types in shadow dom example

* add guard to calling requestAnimationFrame in Stylesheet

This fix is for ssr-tests.
spmonahan added a commit to spmonahan/fluentui that referenced this pull request Oct 11, 2023
…ntation (microsoft#28906)

* feat: update mergeStyles to support shadow DOM

NOTE: this is stil a work in progress.

- Refactors Stylesheet.ts to support shadow DOM
- Adds React context and hooks for opting in to
  shadow DOM
- Adds an API for projecting styles to child windows.

* refactor and docs

- Refactors stylesheet shadow DOM implementation a bit.
- Adds a new docs page.

* refactor to clean up types

- Fixes various Typescript errors
- Adds APIs to better encapsulate shadow DOM features

* change files

* add pipeline trigger

* update test

* fix typescript error

* improve 'ShadowConfig' check

* export ShadowConfig type

* add constant for '__global__'

* add default ShadowConfig

* remove commented out line

* better change file messages

* remove IStyleSheetKey type

* clean up

* fix import path

* add null checks before inserting styles

* remove commented out code

* refactor IStyleOptions to optionally include shadowConfig

Adds an optional `shadowConfig` object to IStyleOptions. This
allows us to pass the shadow DOM configuration object through to
all the places we need it without modifying APIs to add a parameter
for "shadowConfig".

Aligns naming. Previously we had a type `ShadowConfig` and mostly referred
to objects as "shadowConfig" but there were some instances of "shadowDom".
Everything is now referred to by "shadowConfig/ShadowConfig".

* update styleToClassName tests

* update customizable tests

* update component types for shadow DOM

- remove "shadowDom" prop
- update syles types to include "__shadowConfig__" key

* remove unused variable

* fix types in shadow dom example

* add guard to calling requestAnimationFrame in Stylesheet

This fix is for ssr-tests.
spmonahan added a commit that referenced this pull request Oct 12, 2023
…ntation (#28906)

* feat: update mergeStyles to support shadow DOM

NOTE: this is stil a work in progress.

- Refactors Stylesheet.ts to support shadow DOM
- Adds React context and hooks for opting in to
  shadow DOM
- Adds an API for projecting styles to child windows.

* refactor and docs

- Refactors stylesheet shadow DOM implementation a bit.
- Adds a new docs page.

* refactor to clean up types

- Fixes various Typescript errors
- Adds APIs to better encapsulate shadow DOM features

* change files

* add pipeline trigger

* update test

* fix typescript error

* improve 'ShadowConfig' check

* export ShadowConfig type

* add constant for '__global__'

* add default ShadowConfig

* remove commented out line

* better change file messages

* remove IStyleSheetKey type

* clean up

* fix import path

* add null checks before inserting styles

* remove commented out code

* refactor IStyleOptions to optionally include shadowConfig

Adds an optional `shadowConfig` object to IStyleOptions. This
allows us to pass the shadow DOM configuration object through to
all the places we need it without modifying APIs to add a parameter
for "shadowConfig".

Aligns naming. Previously we had a type `ShadowConfig` and mostly referred
to objects as "shadowConfig" but there were some instances of "shadowDom".
Everything is now referred to by "shadowConfig/ShadowConfig".

* update styleToClassName tests

* update customizable tests

* update component types for shadow DOM

- remove "shadowDom" prop
- update syles types to include "__shadowConfig__" key

* remove unused variable

* fix types in shadow dom example

* add guard to calling requestAnimationFrame in Stylesheet

This fix is for ssr-tests.
spmonahan added a commit to spmonahan/fluentui that referenced this pull request Oct 26, 2023
…ntation (microsoft#28906)

* feat: update mergeStyles to support shadow DOM

NOTE: this is stil a work in progress.

- Refactors Stylesheet.ts to support shadow DOM
- Adds React context and hooks for opting in to
  shadow DOM
- Adds an API for projecting styles to child windows.

* refactor and docs

- Refactors stylesheet shadow DOM implementation a bit.
- Adds a new docs page.

* refactor to clean up types

- Fixes various Typescript errors
- Adds APIs to better encapsulate shadow DOM features

* change files

* add pipeline trigger

* update test

* fix typescript error

* improve 'ShadowConfig' check

* export ShadowConfig type

* add constant for '__global__'

* add default ShadowConfig

* remove commented out line

* better change file messages

* remove IStyleSheetKey type

* clean up

* fix import path

* add null checks before inserting styles

* remove commented out code

* refactor IStyleOptions to optionally include shadowConfig

Adds an optional `shadowConfig` object to IStyleOptions. This
allows us to pass the shadow DOM configuration object through to
all the places we need it without modifying APIs to add a parameter
for "shadowConfig".

Aligns naming. Previously we had a type `ShadowConfig` and mostly referred
to objects as "shadowConfig" but there were some instances of "shadowDom".
Everything is now referred to by "shadowConfig/ShadowConfig".

* update styleToClassName tests

* update customizable tests

* update component types for shadow DOM

- remove "shadowDom" prop
- update syles types to include "__shadowConfig__" key

* remove unused variable

* fix types in shadow dom example

* add guard to calling requestAnimationFrame in Stylesheet

This fix is for ssr-tests.
spmonahan added a commit that referenced this pull request Nov 3, 2023
…ntation (#28906)

* feat: update mergeStyles to support shadow DOM

NOTE: this is stil a work in progress.

- Refactors Stylesheet.ts to support shadow DOM
- Adds React context and hooks for opting in to
  shadow DOM
- Adds an API for projecting styles to child windows.

* refactor and docs

- Refactors stylesheet shadow DOM implementation a bit.
- Adds a new docs page.

* refactor to clean up types

- Fixes various Typescript errors
- Adds APIs to better encapsulate shadow DOM features

* change files

* add pipeline trigger

* update test

* fix typescript error

* improve 'ShadowConfig' check

* export ShadowConfig type

* add constant for '__global__'

* add default ShadowConfig

* remove commented out line

* better change file messages

* remove IStyleSheetKey type

* clean up

* fix import path

* add null checks before inserting styles

* remove commented out code

* refactor IStyleOptions to optionally include shadowConfig

Adds an optional `shadowConfig` object to IStyleOptions. This
allows us to pass the shadow DOM configuration object through to
all the places we need it without modifying APIs to add a parameter
for "shadowConfig".

Aligns naming. Previously we had a type `ShadowConfig` and mostly referred
to objects as "shadowConfig" but there were some instances of "shadowDom".
Everything is now referred to by "shadowConfig/ShadowConfig".

* update styleToClassName tests

* update customizable tests

* update component types for shadow DOM

- remove "shadowDom" prop
- update syles types to include "__shadowConfig__" key

* remove unused variable

* fix types in shadow dom example

* add guard to calling requestAnimationFrame in Stylesheet

This fix is for ssr-tests.
spmonahan added a commit that referenced this pull request Nov 16, 2023
…ntation (#28906)

* feat: update mergeStyles to support shadow DOM

NOTE: this is stil a work in progress.

- Refactors Stylesheet.ts to support shadow DOM
- Adds React context and hooks for opting in to
  shadow DOM
- Adds an API for projecting styles to child windows.

* refactor and docs

- Refactors stylesheet shadow DOM implementation a bit.
- Adds a new docs page.

* refactor to clean up types

- Fixes various Typescript errors
- Adds APIs to better encapsulate shadow DOM features

* change files

* add pipeline trigger

* update test

* fix typescript error

* improve 'ShadowConfig' check

* export ShadowConfig type

* add constant for '__global__'

* add default ShadowConfig

* remove commented out line

* better change file messages

* remove IStyleSheetKey type

* clean up

* fix import path

* add null checks before inserting styles

* remove commented out code

* refactor IStyleOptions to optionally include shadowConfig

Adds an optional `shadowConfig` object to IStyleOptions. This
allows us to pass the shadow DOM configuration object through to
all the places we need it without modifying APIs to add a parameter
for "shadowConfig".

Aligns naming. Previously we had a type `ShadowConfig` and mostly referred
to objects as "shadowConfig" but there were some instances of "shadowDom".
Everything is now referred to by "shadowConfig/ShadowConfig".

* update styleToClassName tests

* update customizable tests

* update component types for shadow DOM

- remove "shadowDom" prop
- update syles types to include "__shadowConfig__" key

* remove unused variable

* fix types in shadow dom example

* add guard to calling requestAnimationFrame in Stylesheet

This fix is for ssr-tests.
spmonahan added a commit to spmonahan/fluentui that referenced this pull request Dec 5, 2023
…ntation (microsoft#28906)

* feat: update mergeStyles to support shadow DOM

NOTE: this is stil a work in progress.

- Refactors Stylesheet.ts to support shadow DOM
- Adds React context and hooks for opting in to
  shadow DOM
- Adds an API for projecting styles to child windows.

* refactor and docs

- Refactors stylesheet shadow DOM implementation a bit.
- Adds a new docs page.

* refactor to clean up types

- Fixes various Typescript errors
- Adds APIs to better encapsulate shadow DOM features

* change files

* add pipeline trigger

* update test

* fix typescript error

* improve 'ShadowConfig' check

* export ShadowConfig type

* add constant for '__global__'

* add default ShadowConfig

* remove commented out line

* better change file messages

* remove IStyleSheetKey type

* clean up

* fix import path

* add null checks before inserting styles

* remove commented out code

* refactor IStyleOptions to optionally include shadowConfig

Adds an optional `shadowConfig` object to IStyleOptions. This
allows us to pass the shadow DOM configuration object through to
all the places we need it without modifying APIs to add a parameter
for "shadowConfig".

Aligns naming. Previously we had a type `ShadowConfig` and mostly referred
to objects as "shadowConfig" but there were some instances of "shadowDom".
Everything is now referred to by "shadowConfig/ShadowConfig".

* update styleToClassName tests

* update customizable tests

* update component types for shadow DOM

- remove "shadowDom" prop
- update syles types to include "__shadowConfig__" key

* remove unused variable

* fix types in shadow dom example

* add guard to calling requestAnimationFrame in Stylesheet

This fix is for ssr-tests.
spmonahan added a commit to spmonahan/fluentui that referenced this pull request Dec 15, 2023
…ntation (microsoft#28906)

* feat: update mergeStyles to support shadow DOM

NOTE: this is stil a work in progress.

- Refactors Stylesheet.ts to support shadow DOM
- Adds React context and hooks for opting in to
  shadow DOM
- Adds an API for projecting styles to child windows.

* refactor and docs

- Refactors stylesheet shadow DOM implementation a bit.
- Adds a new docs page.

* refactor to clean up types

- Fixes various Typescript errors
- Adds APIs to better encapsulate shadow DOM features

* change files

* add pipeline trigger

* update test

* fix typescript error

* improve 'ShadowConfig' check

* export ShadowConfig type

* add constant for '__global__'

* add default ShadowConfig

* remove commented out line

* better change file messages

* remove IStyleSheetKey type

* clean up

* fix import path

* add null checks before inserting styles

* remove commented out code

* refactor IStyleOptions to optionally include shadowConfig

Adds an optional `shadowConfig` object to IStyleOptions. This
allows us to pass the shadow DOM configuration object through to
all the places we need it without modifying APIs to add a parameter
for "shadowConfig".

Aligns naming. Previously we had a type `ShadowConfig` and mostly referred
to objects as "shadowConfig" but there were some instances of "shadowDom".
Everything is now referred to by "shadowConfig/ShadowConfig".

* update styleToClassName tests

* update customizable tests

* update component types for shadow DOM

- remove "shadowDom" prop
- update syles types to include "__shadowConfig__" key

* remove unused variable

* fix types in shadow dom example

* add guard to calling requestAnimationFrame in Stylesheet

This fix is for ssr-tests.
spmonahan added a commit that referenced this pull request Jan 4, 2024
…ntation (#28906)

* feat: update mergeStyles to support shadow DOM

NOTE: this is stil a work in progress.

- Refactors Stylesheet.ts to support shadow DOM
- Adds React context and hooks for opting in to
  shadow DOM
- Adds an API for projecting styles to child windows.

* refactor and docs

- Refactors stylesheet shadow DOM implementation a bit.
- Adds a new docs page.

* refactor to clean up types

- Fixes various Typescript errors
- Adds APIs to better encapsulate shadow DOM features

* change files

* add pipeline trigger

* update test

* fix typescript error

* improve 'ShadowConfig' check

* export ShadowConfig type

* add constant for '__global__'

* add default ShadowConfig

* remove commented out line

* better change file messages

* remove IStyleSheetKey type

* clean up

* fix import path

* add null checks before inserting styles

* remove commented out code

* refactor IStyleOptions to optionally include shadowConfig

Adds an optional `shadowConfig` object to IStyleOptions. This
allows us to pass the shadow DOM configuration object through to
all the places we need it without modifying APIs to add a parameter
for "shadowConfig".

Aligns naming. Previously we had a type `ShadowConfig` and mostly referred
to objects as "shadowConfig" but there were some instances of "shadowDom".
Everything is now referred to by "shadowConfig/ShadowConfig".

* update styleToClassName tests

* update customizable tests

* update component types for shadow DOM

- remove "shadowDom" prop
- update syles types to include "__shadowConfig__" key

* remove unused variable

* fix types in shadow dom example

* add guard to calling requestAnimationFrame in Stylesheet

This fix is for ssr-tests.
spmonahan added a commit to spmonahan/fluentui that referenced this pull request Jan 5, 2024
…ntation (microsoft#28906)

* feat: update mergeStyles to support shadow DOM

NOTE: this is stil a work in progress.

- Refactors Stylesheet.ts to support shadow DOM
- Adds React context and hooks for opting in to
  shadow DOM
- Adds an API for projecting styles to child windows.

* refactor and docs

- Refactors stylesheet shadow DOM implementation a bit.
- Adds a new docs page.

* refactor to clean up types

- Fixes various Typescript errors
- Adds APIs to better encapsulate shadow DOM features

* change files

* add pipeline trigger

* update test

* fix typescript error

* improve 'ShadowConfig' check

* export ShadowConfig type

* add constant for '__global__'

* add default ShadowConfig

* remove commented out line

* better change file messages

* remove IStyleSheetKey type

* clean up

* fix import path

* add null checks before inserting styles

* remove commented out code

* refactor IStyleOptions to optionally include shadowConfig

Adds an optional `shadowConfig` object to IStyleOptions. This
allows us to pass the shadow DOM configuration object through to
all the places we need it without modifying APIs to add a parameter
for "shadowConfig".

Aligns naming. Previously we had a type `ShadowConfig` and mostly referred
to objects as "shadowConfig" but there were some instances of "shadowDom".
Everything is now referred to by "shadowConfig/ShadowConfig".

* update styleToClassName tests

* update customizable tests

* update component types for shadow DOM

- remove "shadowDom" prop
- update syles types to include "__shadowConfig__" key

* remove unused variable

* fix types in shadow dom example

* add guard to calling requestAnimationFrame in Stylesheet

This fix is for ssr-tests.
spmonahan added a commit to spmonahan/fluentui that referenced this pull request Feb 16, 2024
…ntation (microsoft#28906)

* feat: update mergeStyles to support shadow DOM

NOTE: this is stil a work in progress.

- Refactors Stylesheet.ts to support shadow DOM
- Adds React context and hooks for opting in to
  shadow DOM
- Adds an API for projecting styles to child windows.

* refactor and docs

- Refactors stylesheet shadow DOM implementation a bit.
- Adds a new docs page.

* refactor to clean up types

- Fixes various Typescript errors
- Adds APIs to better encapsulate shadow DOM features

* change files

* add pipeline trigger

* update test

* fix typescript error

* improve 'ShadowConfig' check

* export ShadowConfig type

* add constant for '__global__'

* add default ShadowConfig

* remove commented out line

* better change file messages

* remove IStyleSheetKey type

* clean up

* fix import path

* add null checks before inserting styles

* remove commented out code

* refactor IStyleOptions to optionally include shadowConfig

Adds an optional `shadowConfig` object to IStyleOptions. This
allows us to pass the shadow DOM configuration object through to
all the places we need it without modifying APIs to add a parameter
for "shadowConfig".

Aligns naming. Previously we had a type `ShadowConfig` and mostly referred
to objects as "shadowConfig" but there were some instances of "shadowDom".
Everything is now referred to by "shadowConfig/ShadowConfig".

* update styleToClassName tests

* update customizable tests

* update component types for shadow DOM

- remove "shadowDom" prop
- update syles types to include "__shadowConfig__" key

* remove unused variable

* fix types in shadow dom example

* add guard to calling requestAnimationFrame in Stylesheet

This fix is for ssr-tests.
spmonahan added a commit to spmonahan/fluentui that referenced this pull request Feb 16, 2024
…ntation (microsoft#28906)

* feat: update mergeStyles to support shadow DOM

NOTE: this is stil a work in progress.

- Refactors Stylesheet.ts to support shadow DOM
- Adds React context and hooks for opting in to
  shadow DOM
- Adds an API for projecting styles to child windows.

* refactor and docs

- Refactors stylesheet shadow DOM implementation a bit.
- Adds a new docs page.

* refactor to clean up types

- Fixes various Typescript errors
- Adds APIs to better encapsulate shadow DOM features

* change files

* add pipeline trigger

* update test

* fix typescript error

* improve 'ShadowConfig' check

* export ShadowConfig type

* add constant for '__global__'

* add default ShadowConfig

* remove commented out line

* better change file messages

* remove IStyleSheetKey type

* clean up

* fix import path

* add null checks before inserting styles

* remove commented out code

* refactor IStyleOptions to optionally include shadowConfig

Adds an optional `shadowConfig` object to IStyleOptions. This
allows us to pass the shadow DOM configuration object through to
all the places we need it without modifying APIs to add a parameter
for "shadowConfig".

Aligns naming. Previously we had a type `ShadowConfig` and mostly referred
to objects as "shadowConfig" but there were some instances of "shadowDom".
Everything is now referred to by "shadowConfig/ShadowConfig".

* update styleToClassName tests

* update customizable tests

* update component types for shadow DOM

- remove "shadowDom" prop
- update syles types to include "__shadowConfig__" key

* remove unused variable

* fix types in shadow dom example

* add guard to calling requestAnimationFrame in Stylesheet

This fix is for ssr-tests.
spmonahan added a commit to spmonahan/fluentui that referenced this pull request Feb 22, 2024
…ntation (microsoft#28906)

* feat: update mergeStyles to support shadow DOM

NOTE: this is stil a work in progress.

- Refactors Stylesheet.ts to support shadow DOM
- Adds React context and hooks for opting in to
  shadow DOM
- Adds an API for projecting styles to child windows.

* refactor and docs

- Refactors stylesheet shadow DOM implementation a bit.
- Adds a new docs page.

* refactor to clean up types

- Fixes various Typescript errors
- Adds APIs to better encapsulate shadow DOM features

* change files

* add pipeline trigger

* update test

* fix typescript error

* improve 'ShadowConfig' check

* export ShadowConfig type

* add constant for '__global__'

* add default ShadowConfig

* remove commented out line

* better change file messages

* remove IStyleSheetKey type

* clean up

* fix import path

* add null checks before inserting styles

* remove commented out code

* refactor IStyleOptions to optionally include shadowConfig

Adds an optional `shadowConfig` object to IStyleOptions. This
allows us to pass the shadow DOM configuration object through to
all the places we need it without modifying APIs to add a parameter
for "shadowConfig".

Aligns naming. Previously we had a type `ShadowConfig` and mostly referred
to objects as "shadowConfig" but there were some instances of "shadowDom".
Everything is now referred to by "shadowConfig/ShadowConfig".

* update styleToClassName tests

* update customizable tests

* update component types for shadow DOM

- remove "shadowDom" prop
- update syles types to include "__shadowConfig__" key

* remove unused variable

* fix types in shadow dom example

* add guard to calling requestAnimationFrame in Stylesheet

This fix is for ssr-tests.
spmonahan added a commit to spmonahan/fluentui that referenced this pull request Feb 23, 2024
…ntation (microsoft#28906)

* feat: update mergeStyles to support shadow DOM

NOTE: this is stil a work in progress.

- Refactors Stylesheet.ts to support shadow DOM
- Adds React context and hooks for opting in to
  shadow DOM
- Adds an API for projecting styles to child windows.

* refactor and docs

- Refactors stylesheet shadow DOM implementation a bit.
- Adds a new docs page.

* refactor to clean up types

- Fixes various Typescript errors
- Adds APIs to better encapsulate shadow DOM features

* change files

* add pipeline trigger

* update test

* fix typescript error

* improve 'ShadowConfig' check

* export ShadowConfig type

* add constant for '__global__'

* add default ShadowConfig

* remove commented out line

* better change file messages

* remove IStyleSheetKey type

* clean up

* fix import path

* add null checks before inserting styles

* remove commented out code

* refactor IStyleOptions to optionally include shadowConfig

Adds an optional `shadowConfig` object to IStyleOptions. This
allows us to pass the shadow DOM configuration object through to
all the places we need it without modifying APIs to add a parameter
for "shadowConfig".

Aligns naming. Previously we had a type `ShadowConfig` and mostly referred
to objects as "shadowConfig" but there were some instances of "shadowDom".
Everything is now referred to by "shadowConfig/ShadowConfig".

* update styleToClassName tests

* update customizable tests

* update component types for shadow DOM

- remove "shadowDom" prop
- update syles types to include "__shadowConfig__" key

* remove unused variable

* fix types in shadow dom example

* add guard to calling requestAnimationFrame in Stylesheet

This fix is for ssr-tests.
spmonahan added a commit to spmonahan/fluentui that referenced this pull request Feb 26, 2024
…ntation (microsoft#28906)

* feat: update mergeStyles to support shadow DOM

NOTE: this is stil a work in progress.

- Refactors Stylesheet.ts to support shadow DOM
- Adds React context and hooks for opting in to
  shadow DOM
- Adds an API for projecting styles to child windows.

* refactor and docs

- Refactors stylesheet shadow DOM implementation a bit.
- Adds a new docs page.

* refactor to clean up types

- Fixes various Typescript errors
- Adds APIs to better encapsulate shadow DOM features

* change files

* add pipeline trigger

* update test

* fix typescript error

* improve 'ShadowConfig' check

* export ShadowConfig type

* add constant for '__global__'

* add default ShadowConfig

* remove commented out line

* better change file messages

* remove IStyleSheetKey type

* clean up

* fix import path

* add null checks before inserting styles

* remove commented out code

* refactor IStyleOptions to optionally include shadowConfig

Adds an optional `shadowConfig` object to IStyleOptions. This
allows us to pass the shadow DOM configuration object through to
all the places we need it without modifying APIs to add a parameter
for "shadowConfig".

Aligns naming. Previously we had a type `ShadowConfig` and mostly referred
to objects as "shadowConfig" but there were some instances of "shadowDom".
Everything is now referred to by "shadowConfig/ShadowConfig".

* update styleToClassName tests

* update customizable tests

* update component types for shadow DOM

- remove "shadowDom" prop
- update syles types to include "__shadowConfig__" key

* remove unused variable

* fix types in shadow dom example

* add guard to calling requestAnimationFrame in Stylesheet

This fix is for ssr-tests.
spmonahan added a commit to spmonahan/fluentui that referenced this pull request Feb 26, 2024
…ntation (microsoft#28906)

* feat: update mergeStyles to support shadow DOM

NOTE: this is stil a work in progress.

- Refactors Stylesheet.ts to support shadow DOM
- Adds React context and hooks for opting in to
  shadow DOM
- Adds an API for projecting styles to child windows.

* refactor and docs

- Refactors stylesheet shadow DOM implementation a bit.
- Adds a new docs page.

* refactor to clean up types

- Fixes various Typescript errors
- Adds APIs to better encapsulate shadow DOM features

* change files

* add pipeline trigger

* update test

* fix typescript error

* improve 'ShadowConfig' check

* export ShadowConfig type

* add constant for '__global__'

* add default ShadowConfig

* remove commented out line

* better change file messages

* remove IStyleSheetKey type

* clean up

* fix import path

* add null checks before inserting styles

* remove commented out code

* refactor IStyleOptions to optionally include shadowConfig

Adds an optional `shadowConfig` object to IStyleOptions. This
allows us to pass the shadow DOM configuration object through to
all the places we need it without modifying APIs to add a parameter
for "shadowConfig".

Aligns naming. Previously we had a type `ShadowConfig` and mostly referred
to objects as "shadowConfig" but there were some instances of "shadowDom".
Everything is now referred to by "shadowConfig/ShadowConfig".

* update styleToClassName tests

* update customizable tests

* update component types for shadow DOM

- remove "shadowDom" prop
- update syles types to include "__shadowConfig__" key

* remove unused variable

* fix types in shadow dom example

* add guard to calling requestAnimationFrame in Stylesheet

This fix is for ssr-tests.
spmonahan added a commit to spmonahan/fluentui that referenced this pull request Feb 28, 2024
…ntation (microsoft#28906)

* feat: update mergeStyles to support shadow DOM

NOTE: this is stil a work in progress.

- Refactors Stylesheet.ts to support shadow DOM
- Adds React context and hooks for opting in to
  shadow DOM
- Adds an API for projecting styles to child windows.

* refactor and docs

- Refactors stylesheet shadow DOM implementation a bit.
- Adds a new docs page.

* refactor to clean up types

- Fixes various Typescript errors
- Adds APIs to better encapsulate shadow DOM features

* change files

* add pipeline trigger

* update test

* fix typescript error

* improve 'ShadowConfig' check

* export ShadowConfig type

* add constant for '__global__'

* add default ShadowConfig

* remove commented out line

* better change file messages

* remove IStyleSheetKey type

* clean up

* fix import path

* add null checks before inserting styles

* remove commented out code

* refactor IStyleOptions to optionally include shadowConfig

Adds an optional `shadowConfig` object to IStyleOptions. This
allows us to pass the shadow DOM configuration object through to
all the places we need it without modifying APIs to add a parameter
for "shadowConfig".

Aligns naming. Previously we had a type `ShadowConfig` and mostly referred
to objects as "shadowConfig" but there were some instances of "shadowDom".
Everything is now referred to by "shadowConfig/ShadowConfig".

* update styleToClassName tests

* update customizable tests

* update component types for shadow DOM

- remove "shadowDom" prop
- update syles types to include "__shadowConfig__" key

* remove unused variable

* fix types in shadow dom example

* add guard to calling requestAnimationFrame in Stylesheet

This fix is for ssr-tests.
spmonahan added a commit to spmonahan/fluentui that referenced this pull request Mar 1, 2024
…ntation (microsoft#28906)

* feat: update mergeStyles to support shadow DOM

NOTE: this is stil a work in progress.

- Refactors Stylesheet.ts to support shadow DOM
- Adds React context and hooks for opting in to
  shadow DOM
- Adds an API for projecting styles to child windows.

* refactor and docs

- Refactors stylesheet shadow DOM implementation a bit.
- Adds a new docs page.

* refactor to clean up types

- Fixes various Typescript errors
- Adds APIs to better encapsulate shadow DOM features

* change files

* add pipeline trigger

* update test

* fix typescript error

* improve 'ShadowConfig' check

* export ShadowConfig type

* add constant for '__global__'

* add default ShadowConfig

* remove commented out line

* better change file messages

* remove IStyleSheetKey type

* clean up

* fix import path

* add null checks before inserting styles

* remove commented out code

* refactor IStyleOptions to optionally include shadowConfig

Adds an optional `shadowConfig` object to IStyleOptions. This
allows us to pass the shadow DOM configuration object through to
all the places we need it without modifying APIs to add a parameter
for "shadowConfig".

Aligns naming. Previously we had a type `ShadowConfig` and mostly referred
to objects as "shadowConfig" but there were some instances of "shadowDom".
Everything is now referred to by "shadowConfig/ShadowConfig".

* update styleToClassName tests

* update customizable tests

* update component types for shadow DOM

- remove "shadowDom" prop
- update syles types to include "__shadowConfig__" key

* remove unused variable

* fix types in shadow dom example

* add guard to calling requestAnimationFrame in Stylesheet

This fix is for ssr-tests.
spmonahan added a commit that referenced this pull request Mar 8, 2024
…ntation (#28906)

* feat: update mergeStyles to support shadow DOM

NOTE: this is stil a work in progress.

- Refactors Stylesheet.ts to support shadow DOM
- Adds React context and hooks for opting in to
  shadow DOM
- Adds an API for projecting styles to child windows.

* refactor and docs

- Refactors stylesheet shadow DOM implementation a bit.
- Adds a new docs page.

* refactor to clean up types

- Fixes various Typescript errors
- Adds APIs to better encapsulate shadow DOM features

* change files

* add pipeline trigger

* update test

* fix typescript error

* improve 'ShadowConfig' check

* export ShadowConfig type

* add constant for '__global__'

* add default ShadowConfig

* remove commented out line

* better change file messages

* remove IStyleSheetKey type

* clean up

* fix import path

* add null checks before inserting styles

* remove commented out code

* refactor IStyleOptions to optionally include shadowConfig

Adds an optional `shadowConfig` object to IStyleOptions. This
allows us to pass the shadow DOM configuration object through to
all the places we need it without modifying APIs to add a parameter
for "shadowConfig".

Aligns naming. Previously we had a type `ShadowConfig` and mostly referred
to objects as "shadowConfig" but there were some instances of "shadowDom".
Everything is now referred to by "shadowConfig/ShadowConfig".

* update styleToClassName tests

* update customizable tests

* update component types for shadow DOM

- remove "shadowDom" prop
- update syles types to include "__shadowConfig__" key

* remove unused variable

* fix types in shadow dom example

* add guard to calling requestAnimationFrame in Stylesheet

This fix is for ssr-tests.
spmonahan added a commit that referenced this pull request Mar 23, 2024
…ntation (#28906)

* feat: update mergeStyles to support shadow DOM

NOTE: this is stil a work in progress.

- Refactors Stylesheet.ts to support shadow DOM
- Adds React context and hooks for opting in to
  shadow DOM
- Adds an API for projecting styles to child windows.

* refactor and docs

- Refactors stylesheet shadow DOM implementation a bit.
- Adds a new docs page.

* refactor to clean up types

- Fixes various Typescript errors
- Adds APIs to better encapsulate shadow DOM features

* change files

* add pipeline trigger

* update test

* fix typescript error

* improve 'ShadowConfig' check

* export ShadowConfig type

* add constant for '__global__'

* add default ShadowConfig

* remove commented out line

* better change file messages

* remove IStyleSheetKey type

* clean up

* fix import path

* add null checks before inserting styles

* remove commented out code

* refactor IStyleOptions to optionally include shadowConfig

Adds an optional `shadowConfig` object to IStyleOptions. This
allows us to pass the shadow DOM configuration object through to
all the places we need it without modifying APIs to add a parameter
for "shadowConfig".

Aligns naming. Previously we had a type `ShadowConfig` and mostly referred
to objects as "shadowConfig" but there were some instances of "shadowDom".
Everything is now referred to by "shadowConfig/ShadowConfig".

* update styleToClassName tests

* update customizable tests

* update component types for shadow DOM

- remove "shadowDom" prop
- update syles types to include "__shadowConfig__" key

* remove unused variable

* fix types in shadow dom example

* add guard to calling requestAnimationFrame in Stylesheet

This fix is for ssr-tests.
spmonahan added a commit that referenced this pull request Mar 26, 2024
…ntation (#28906)

* feat: update mergeStyles to support shadow DOM

NOTE: this is stil a work in progress.

- Refactors Stylesheet.ts to support shadow DOM
- Adds React context and hooks for opting in to
  shadow DOM
- Adds an API for projecting styles to child windows.

* refactor and docs

- Refactors stylesheet shadow DOM implementation a bit.
- Adds a new docs page.

* refactor to clean up types

- Fixes various Typescript errors
- Adds APIs to better encapsulate shadow DOM features

* change files

* add pipeline trigger

* update test

* fix typescript error

* improve 'ShadowConfig' check

* export ShadowConfig type

* add constant for '__global__'

* add default ShadowConfig

* remove commented out line

* better change file messages

* remove IStyleSheetKey type

* clean up

* fix import path

* add null checks before inserting styles

* remove commented out code

* refactor IStyleOptions to optionally include shadowConfig

Adds an optional `shadowConfig` object to IStyleOptions. This
allows us to pass the shadow DOM configuration object through to
all the places we need it without modifying APIs to add a parameter
for "shadowConfig".

Aligns naming. Previously we had a type `ShadowConfig` and mostly referred
to objects as "shadowConfig" but there were some instances of "shadowDom".
Everything is now referred to by "shadowConfig/ShadowConfig".

* update styleToClassName tests

* update customizable tests

* update component types for shadow DOM

- remove "shadowDom" prop
- update syles types to include "__shadowConfig__" key

* remove unused variable

* fix types in shadow dom example

* add guard to calling requestAnimationFrame in Stylesheet

This fix is for ssr-tests.
spmonahan added a commit that referenced this pull request Mar 28, 2024
…ntation (#28906)

* feat: update mergeStyles to support shadow DOM

NOTE: this is stil a work in progress.

- Refactors Stylesheet.ts to support shadow DOM
- Adds React context and hooks for opting in to
  shadow DOM
- Adds an API for projecting styles to child windows.

* refactor and docs

- Refactors stylesheet shadow DOM implementation a bit.
- Adds a new docs page.

* refactor to clean up types

- Fixes various Typescript errors
- Adds APIs to better encapsulate shadow DOM features

* change files

* add pipeline trigger

* update test

* fix typescript error

* improve 'ShadowConfig' check

* export ShadowConfig type

* add constant for '__global__'

* add default ShadowConfig

* remove commented out line

* better change file messages

* remove IStyleSheetKey type

* clean up

* fix import path

* add null checks before inserting styles

* remove commented out code

* refactor IStyleOptions to optionally include shadowConfig

Adds an optional `shadowConfig` object to IStyleOptions. This
allows us to pass the shadow DOM configuration object through to
all the places we need it without modifying APIs to add a parameter
for "shadowConfig".

Aligns naming. Previously we had a type `ShadowConfig` and mostly referred
to objects as "shadowConfig" but there were some instances of "shadowDom".
Everything is now referred to by "shadowConfig/ShadowConfig".

* update styleToClassName tests

* update customizable tests

* update component types for shadow DOM

- remove "shadowDom" prop
- update syles types to include "__shadowConfig__" key

* remove unused variable

* fix types in shadow dom example

* add guard to calling requestAnimationFrame in Stylesheet

This fix is for ssr-tests.
spmonahan added a commit to spmonahan/fluentui that referenced this pull request Mar 29, 2024
…ntation (microsoft#28906)

* feat: update mergeStyles to support shadow DOM

NOTE: this is stil a work in progress.

- Refactors Stylesheet.ts to support shadow DOM
- Adds React context and hooks for opting in to
  shadow DOM
- Adds an API for projecting styles to child windows.

* refactor and docs

- Refactors stylesheet shadow DOM implementation a bit.
- Adds a new docs page.

* refactor to clean up types

- Fixes various Typescript errors
- Adds APIs to better encapsulate shadow DOM features

* change files

* add pipeline trigger

* update test

* fix typescript error

* improve 'ShadowConfig' check

* export ShadowConfig type

* add constant for '__global__'

* add default ShadowConfig

* remove commented out line

* better change file messages

* remove IStyleSheetKey type

* clean up

* fix import path

* add null checks before inserting styles

* remove commented out code

* refactor IStyleOptions to optionally include shadowConfig

Adds an optional `shadowConfig` object to IStyleOptions. This
allows us to pass the shadow DOM configuration object through to
all the places we need it without modifying APIs to add a parameter
for "shadowConfig".

Aligns naming. Previously we had a type `ShadowConfig` and mostly referred
to objects as "shadowConfig" but there were some instances of "shadowDom".
Everything is now referred to by "shadowConfig/ShadowConfig".

* update styleToClassName tests

* update customizable tests

* update component types for shadow DOM

- remove "shadowDom" prop
- update syles types to include "__shadowConfig__" key

* remove unused variable

* fix types in shadow dom example

* add guard to calling requestAnimationFrame in Stylesheet

This fix is for ssr-tests.
spmonahan added a commit that referenced this pull request Apr 4, 2024
…ntation (#28906)

* feat: update mergeStyles to support shadow DOM

NOTE: this is stil a work in progress.

- Refactors Stylesheet.ts to support shadow DOM
- Adds React context and hooks for opting in to
  shadow DOM
- Adds an API for projecting styles to child windows.

* refactor and docs

- Refactors stylesheet shadow DOM implementation a bit.
- Adds a new docs page.

* refactor to clean up types

- Fixes various Typescript errors
- Adds APIs to better encapsulate shadow DOM features

* change files

* add pipeline trigger

* update test

* fix typescript error

* improve 'ShadowConfig' check

* export ShadowConfig type

* add constant for '__global__'

* add default ShadowConfig

* remove commented out line

* better change file messages

* remove IStyleSheetKey type

* clean up

* fix import path

* add null checks before inserting styles

* remove commented out code

* refactor IStyleOptions to optionally include shadowConfig

Adds an optional `shadowConfig` object to IStyleOptions. This
allows us to pass the shadow DOM configuration object through to
all the places we need it without modifying APIs to add a parameter
for "shadowConfig".

Aligns naming. Previously we had a type `ShadowConfig` and mostly referred
to objects as "shadowConfig" but there were some instances of "shadowDom".
Everything is now referred to by "shadowConfig/ShadowConfig".

* update styleToClassName tests

* update customizable tests

* update component types for shadow DOM

- remove "shadowDom" prop
- update syles types to include "__shadowConfig__" key

* remove unused variable

* fix types in shadow dom example

* add guard to calling requestAnimationFrame in Stylesheet

This fix is for ssr-tests.
spmonahan added a commit that referenced this pull request Apr 15, 2024
…ntation (#28906)

* feat: update mergeStyles to support shadow DOM

NOTE: this is stil a work in progress.

- Refactors Stylesheet.ts to support shadow DOM
- Adds React context and hooks for opting in to
  shadow DOM
- Adds an API for projecting styles to child windows.

* refactor and docs

- Refactors stylesheet shadow DOM implementation a bit.
- Adds a new docs page.

* refactor to clean up types

- Fixes various Typescript errors
- Adds APIs to better encapsulate shadow DOM features

* change files

* add pipeline trigger

* update test

* fix typescript error

* improve 'ShadowConfig' check

* export ShadowConfig type

* add constant for '__global__'

* add default ShadowConfig

* remove commented out line

* better change file messages

* remove IStyleSheetKey type

* clean up

* fix import path

* add null checks before inserting styles

* remove commented out code

* refactor IStyleOptions to optionally include shadowConfig

Adds an optional `shadowConfig` object to IStyleOptions. This
allows us to pass the shadow DOM configuration object through to
all the places we need it without modifying APIs to add a parameter
for "shadowConfig".

Aligns naming. Previously we had a type `ShadowConfig` and mostly referred
to objects as "shadowConfig" but there were some instances of "shadowDom".
Everything is now referred to by "shadowConfig/ShadowConfig".

* update styleToClassName tests

* update customizable tests

* update component types for shadow DOM

- remove "shadowDom" prop
- update syles types to include "__shadowConfig__" key

* remove unused variable

* fix types in shadow dom example

* add guard to calling requestAnimationFrame in Stylesheet

This fix is for ssr-tests.
spmonahan added a commit that referenced this pull request Apr 18, 2024
…ntation (#28906)

* feat: update mergeStyles to support shadow DOM

NOTE: this is stil a work in progress.

- Refactors Stylesheet.ts to support shadow DOM
- Adds React context and hooks for opting in to
  shadow DOM
- Adds an API for projecting styles to child windows.

* refactor and docs

- Refactors stylesheet shadow DOM implementation a bit.
- Adds a new docs page.

* refactor to clean up types

- Fixes various Typescript errors
- Adds APIs to better encapsulate shadow DOM features

* change files

* add pipeline trigger

* update test

* fix typescript error

* improve 'ShadowConfig' check

* export ShadowConfig type

* add constant for '__global__'

* add default ShadowConfig

* remove commented out line

* better change file messages

* remove IStyleSheetKey type

* clean up

* fix import path

* add null checks before inserting styles

* remove commented out code

* refactor IStyleOptions to optionally include shadowConfig

Adds an optional `shadowConfig` object to IStyleOptions. This
allows us to pass the shadow DOM configuration object through to
all the places we need it without modifying APIs to add a parameter
for "shadowConfig".

Aligns naming. Previously we had a type `ShadowConfig` and mostly referred
to objects as "shadowConfig" but there were some instances of "shadowDom".
Everything is now referred to by "shadowConfig/ShadowConfig".

* update styleToClassName tests

* update customizable tests

* update component types for shadow DOM

- remove "shadowDom" prop
- update syles types to include "__shadowConfig__" key

* remove unused variable

* fix types in shadow dom example

* add guard to calling requestAnimationFrame in Stylesheet

This fix is for ssr-tests.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Feature]: Add ShadowDOM support to mergeStyles in Fluent React v8
3 participants