first commit

This commit is contained in:
Stefan Hacker
2026-04-03 09:38:48 +02:00
commit 37ad745546
47450 changed files with 3120798 additions and 0 deletions
@@ -0,0 +1,26 @@
import { __assign, __rest } from "tslib";
import * as React from 'react';
import { GLOBAL_STYLESHEET_KEY } from '@fluentui/merge-styles';
import { useMergeStylesHooks } from '../hooks/useMergeStylesHooks';
export var MergeStylesShadowRootContext = React.createContext(undefined);
/**
* Context for a shadow root.
*/
export var MergeStylesShadowRootProvider = function (_a) {
var shadowRoot = _a.shadowRoot, props = __rest(_a, ["shadowRoot"]);
var value = React.useMemo(function () {
return {
stylesheets: new Map(),
shadowRoot: shadowRoot,
};
}, [shadowRoot]);
return (React.createElement(MergeStylesShadowRootContext.Provider, __assign({ value: value }, props),
React.createElement(GlobalStyles, null),
props.children));
};
var GlobalStyles = function (props) {
var useAdoptedStylesheet = useMergeStylesHooks().useAdoptedStylesheet;
useAdoptedStylesheet(GLOBAL_STYLESHEET_KEY);
return null;
};
//# sourceMappingURL=MergeStylesShadowRootContext.js.map