61 lines
3.5 KiB
JavaScript
61 lines
3.5 KiB
JavaScript
'use client';
|
|
"use strict";
|
|
Object.defineProperty(exports, "__esModule", {
|
|
value: true
|
|
});
|
|
Object.defineProperty(exports, "renderFluentProvider_unstable", {
|
|
enumerable: true,
|
|
get: function() {
|
|
return renderFluentProvider_unstable;
|
|
}
|
|
});
|
|
const _jsxruntime = require("@fluentui/react-jsx-runtime/jsx-runtime");
|
|
const _reactutilities = require("@fluentui/react-utilities");
|
|
const _react = require("@griffel/react");
|
|
const _reactsharedcontexts = require("@fluentui/react-shared-contexts");
|
|
const _providers = require("@fluentui/react-icons/lib/providers");
|
|
const renderFluentProvider_unstable = (state, contextValues)=>{
|
|
(0, _reactutilities.assertSlots)(state);
|
|
// Typescript (vscode) incorrectly references the FluentProviderProps.customStyleHooks_unstable
|
|
// instead of FluentProviderContextValues.customStyleHooks_unstable and thinks it is
|
|
// Partial<CustomStyleHooksContextValue>, so it needs to be cast to Required<CustomStyleHooksContextValue>
|
|
return /*#__PURE__*/ (0, _jsxruntime.jsx)(_reactsharedcontexts.Provider_unstable, {
|
|
value: contextValues.provider,
|
|
children: /*#__PURE__*/ (0, _jsxruntime.jsx)(_reactsharedcontexts.ThemeProvider_unstable, {
|
|
value: contextValues.theme,
|
|
children: /*#__PURE__*/ (0, _jsxruntime.jsx)(_reactsharedcontexts.ThemeClassNameProvider_unstable, {
|
|
value: contextValues.themeClassName,
|
|
children: /*#__PURE__*/ (0, _jsxruntime.jsx)(_reactsharedcontexts.CustomStyleHooksProvider_unstable, {
|
|
value: contextValues.customStyleHooks_unstable,
|
|
children: /*#__PURE__*/ (0, _jsxruntime.jsx)(_reactsharedcontexts.TooltipVisibilityProvider_unstable, {
|
|
value: contextValues.tooltip,
|
|
children: /*#__PURE__*/ (0, _jsxruntime.jsx)(_react.TextDirectionProvider, {
|
|
dir: contextValues.textDirection,
|
|
children: /*#__PURE__*/ (0, _jsxruntime.jsx)(_providers.IconDirectionContextProvider, {
|
|
value: contextValues.iconDirection,
|
|
children: /*#__PURE__*/ (0, _jsxruntime.jsx)(_reactsharedcontexts.OverridesProvider_unstable, {
|
|
value: contextValues.overrides_unstable,
|
|
children: /*#__PURE__*/ (0, _jsxruntime.jsxs)(state.root, {
|
|
children: [
|
|
(0, _reactutilities.canUseDOM)() ? null : /*#__PURE__*/ (0, _jsxruntime.jsx)("style", {
|
|
// Using dangerous HTML because react can escape characters
|
|
// which can lead to invalid CSS.
|
|
// eslint-disable-next-line react/no-danger
|
|
dangerouslySetInnerHTML: {
|
|
__html: state.serverStyleProps.cssRule
|
|
},
|
|
...state.serverStyleProps.attributes
|
|
}),
|
|
state.root.children
|
|
]
|
|
})
|
|
})
|
|
})
|
|
})
|
|
})
|
|
})
|
|
})
|
|
})
|
|
});
|
|
};
|