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
+28
View File
@@ -0,0 +1,28 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.ThemeProvider = void 0;
var tslib_1 = require("tslib");
var React = require("react");
var style_utilities_1 = require("@fluentui/style-utilities");
var utilities_1 = require("@fluentui/utilities");
/**
* Theme provider is a simplified version of Customizer that activates the appropriate theme data
* for a given scheme name.
*
* @param providers - Injected providers for accessing theme data and providing it via a Customizer component.
* @deprecated This is an old ThemeProvider implementation. New code should use the ThemeProvider exported from
* `@fluentui/react` (or `@fluentui/react/lib/Theme`) instead.
*/
var ThemeProvider = function (props) {
var scheme = props.scheme, theme = props.theme, rest = tslib_1.__rest(props, ["scheme", "theme"]);
// TODO: consider merging implementation with theme-proto, which only stores a reference / scheme name to theme
// in context and uses quick global store accessor to trigger change by passing in theme object as child and
// triggering re-render. (perf benefits need verification)
var contextTransform = function (context) {
return (0, style_utilities_1.getThemedContext)(context, scheme, theme);
};
// eslint-disable-next-line react/jsx-no-bind, @typescript-eslint/no-deprecated
return React.createElement(utilities_1.Customizer, tslib_1.__assign({}, rest, { contextTransform: contextTransform }));
};
exports.ThemeProvider = ThemeProvider;
//# sourceMappingURL=ThemeProvider.js.map