Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@fluentui/react-make-styles

Package Overview
Dependencies
Maintainers
13
Versions
160
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@fluentui/react-make-styles - npm Package Compare versions

Comparing version 0.0.0-nightly050f89bf0020211102.1 to 0.0.0-nightly07d9ed6d1b20211221.1

44

CHANGELOG.md
# Change Log - @fluentui/react-make-styles
This log was last generated on Tue, 02 Nov 2021 08:40:38 GMT and should not be manually modified.
This log was last generated on Tue, 21 Dec 2021 04:16:36 GMT and should not be manually modified.
<!-- Start content -->
## [0.0.0-nightly050f89bf0020211102.1](https://github.com/microsoft/fluentui/tree/@fluentui/react-make-styles_v0.0.0-nightly050f89bf0020211102.1)
## [0.0.0-nightly07d9ed6d1b20211221.1](https://github.com/microsoft/fluentui/tree/@fluentui/react-make-styles_v0.0.0-nightly07d9ed6d1b20211221.1)
Tue, 02 Nov 2021 08:40:38 GMT
[Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-make-styles_v9.0.0-beta.2..@fluentui/react-make-styles_v0.0.0-nightly050f89bf0020211102.1)
Tue, 21 Dec 2021 04:16:36 GMT
[Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-make-styles_v9.0.0-beta.4..@fluentui/react-make-styles_v0.0.0-nightly07d9ed6d1b20211221.1)
### Changes
- Release nightly v9 ([commit](https://github.com/microsoft/fluentui/commit/40469cc9aef788dfd49e97df32d6aed267c2cc26) by email not defined)
- Bump @fluentui/react-shared-contexts to v0.0.0-nightly050f89bf0020211102.1 ([commit](https://github.com/microsoft/fluentui/commit/40469cc9aef788dfd49e97df32d6aed267c2cc26) by beachball)
- Bump @fluentui/make-styles to v0.0.0-nightly050f89bf0020211102.1 ([commit](https://github.com/microsoft/fluentui/commit/40469cc9aef788dfd49e97df32d6aed267c2cc26) by beachball)
- Bump @fluentui/react-theme to v0.0.0-nightly050f89bf0020211102.1 ([commit](https://github.com/microsoft/fluentui/commit/40469cc9aef788dfd49e97df32d6aed267c2cc26) by beachball)
- Bump @fluentui/react-utilities to v0.0.0-nightly050f89bf0020211102.1 ([commit](https://github.com/microsoft/fluentui/commit/40469cc9aef788dfd49e97df32d6aed267c2cc26) by beachball)
- Release nightly v9 ([commit](https://github.com/microsoft/fluentui/commit/6e6f95bef032550f051ca8b80e4674e69f9edaa8) by email not defined)
- Re-export shorthand functions for styles ([PR #20628](https://github.com/microsoft/fluentui/pull/20628) by olfedias@microsoft.com)
- re-export base makeStyles types ([PR #20786](https://github.com/microsoft/fluentui/pull/20786) by olfedias@microsoft.com)
- Bump @fluentui/react-shared-contexts to v0.0.0-nightly07d9ed6d1b20211221.1 ([commit](https://github.com/microsoft/fluentui/commit/6e6f95bef032550f051ca8b80e4674e69f9edaa8) by beachball)
- Bump @fluentui/make-styles to v0.0.0-nightly07d9ed6d1b20211221.1 ([commit](https://github.com/microsoft/fluentui/commit/6e6f95bef032550f051ca8b80e4674e69f9edaa8) by beachball)
- Bump @fluentui/react-theme to v0.0.0-nightly07d9ed6d1b20211221.1 ([commit](https://github.com/microsoft/fluentui/commit/6e6f95bef032550f051ca8b80e4674e69f9edaa8) by beachball)
- Bump @fluentui/react-utilities to v0.0.0-nightly07d9ed6d1b20211221.1 ([commit](https://github.com/microsoft/fluentui/commit/6e6f95bef032550f051ca8b80e4674e69f9edaa8) by beachball)
## [9.0.0-beta.4](https://github.com/microsoft/fluentui/tree/@fluentui/react-make-styles_v9.0.0-beta.4)
Thu, 25 Nov 2021 08:34:14 GMT
[Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-make-styles_v9.0.0-beta.3..@fluentui/react-make-styles_v9.0.0-beta.4)
### Changes
- Bump @fluentui/react-shared-contexts to v9.0.0-beta.4 ([PR #20762](https://github.com/microsoft/fluentui/pull/20762) by beachball)
- Bump @fluentui/make-styles to v9.0.0-beta.3 ([PR #20762](https://github.com/microsoft/fluentui/pull/20762) by beachball)
- Bump @fluentui/react-theme to v9.0.0-beta.4 ([PR #20762](https://github.com/microsoft/fluentui/pull/20762) by beachball)
- Bump @fluentui/react-utilities to v9.0.0-beta.4 ([PR #20762](https://github.com/microsoft/fluentui/pull/20762) by beachball)
## [9.0.0-beta.3](https://github.com/microsoft/fluentui/tree/@fluentui/react-make-styles_v9.0.0-beta.3)
Fri, 12 Nov 2021 13:25:27 GMT
[Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-make-styles_v9.0.0-beta.2..@fluentui/react-make-styles_v9.0.0-beta.3)
### Changes
- Updated beta and RC components to ES2019 ([PR #20405](https://github.com/microsoft/fluentui/pull/20405) by gcox@microsoft.com)
- Bump @fluentui/react-shared-contexts to v9.0.0-beta.3 ([PR #20583](https://github.com/microsoft/fluentui/pull/20583) by beachball)
- Bump @fluentui/react-theme to v9.0.0-beta.3 ([PR #20583](https://github.com/microsoft/fluentui/pull/20583) by beachball)
- Bump @fluentui/react-utilities to v9.0.0-beta.3 ([PR #20583](https://github.com/microsoft/fluentui/pull/20583) by beachball)
## [9.0.0-beta.2](https://github.com/microsoft/fluentui/tree/@fluentui/react-make-styles_v9.0.0-beta.2)

@@ -21,0 +47,0 @@

@@ -6,5 +6,8 @@ import { createDOMRenderer } from '@fluentui/make-styles';

import type { MakeStylesRenderer } from '@fluentui/make-styles';
import type { MakeStylesStyleRule } from '@fluentui/make-styles';
import { MakeStylesStyle } from '@fluentui/make-styles';
import { MakeStylesStyleFunctionRule } from '@fluentui/make-styles';
import { MakeStylesStyleRule } from '@fluentui/make-styles';
import { mergeClasses } from '@fluentui/make-styles';
import * as React_2 from 'react';
import { shorthands } from '@fluentui/make-styles';
import type { Theme } from '@fluentui/react-theme';

@@ -25,2 +28,8 @@

export { MakeStylesStyle }
export { MakeStylesStyleFunctionRule }
export { MakeStylesStyleRule }
export { mergeClasses }

@@ -54,2 +63,4 @@

export { shorthands }
/**

@@ -56,0 +67,0 @@ * Returns an instance of current makeStyles() renderer.

@@ -8,7 +8,7 @@ "use strict";

var make_styles_1 = /*#__PURE__*/require("@fluentui/make-styles");
const make_styles_1 = /*#__PURE__*/require("@fluentui/make-styles");
var react_shared_contexts_1 = /*#__PURE__*/require("@fluentui/react-shared-contexts");
const react_shared_contexts_1 = /*#__PURE__*/require("@fluentui/react-shared-contexts");
var RendererContext_1 = /*#__PURE__*/require("./RendererContext");
const RendererContext_1 = /*#__PURE__*/require("./RendererContext");
/**

@@ -23,10 +23,12 @@ * A version of makeStyles() that accepts build output as an input and skips all runtime transforms.

function __styles(classesMapBySlot, cssRules) {
var getStyles = make_styles_1.__styles(classesMapBySlot, cssRules);
const getStyles = make_styles_1.__styles(classesMapBySlot, cssRules);
return function useClasses() {
var dir = react_shared_contexts_1.useFluent().dir;
var renderer = RendererContext_1.useRenderer();
const {
dir
} = react_shared_contexts_1.useFluent();
const renderer = RendererContext_1.useRenderer();
return getStyles({
dir: dir,
renderer: renderer
dir,
renderer
});

@@ -33,0 +35,0 @@ };

@@ -1,2 +0,3 @@

export { mergeClasses, createDOMRenderer } from '@fluentui/make-styles';
export { shorthands, mergeClasses, createDOMRenderer } from '@fluentui/make-styles';
export type { MakeStylesStyle, MakeStylesStyleRule, MakeStylesStyleFunctionRule } from '@fluentui/make-styles';
export { makeStyles } from './makeStyles';

@@ -3,0 +4,0 @@ export { makeStaticStyles } from './makeStaticStyles';

@@ -6,8 +6,14 @@ "use strict";

});
exports.__styles = exports.renderToStyleElements = exports.makeStaticStyles = exports.makeStyles = exports.createDOMRenderer = exports.mergeClasses = void 0;
exports.__styles = exports.renderToStyleElements = exports.makeStaticStyles = exports.makeStyles = exports.createDOMRenderer = exports.mergeClasses = exports.shorthands = void 0;
var tslib_1 = /*#__PURE__*/require("tslib");
const tslib_1 = /*#__PURE__*/require("tslib");
var make_styles_1 = /*#__PURE__*/require("@fluentui/make-styles");
Object.defineProperty(exports, "shorthands", {
enumerable: true,
get: function () {
return make_styles_1.shorthands;
}
});
Object.defineProperty(exports, "mergeClasses", {

@@ -62,3 +68,3 @@ enumerable: true,

}
}); // TODO: we should re-export some of types from "@fluentui/make-styles" once we will get update to TS4
});
//# sourceMappingURL=index.js.map

@@ -8,18 +8,18 @@ "use strict";

var make_styles_1 = /*#__PURE__*/require("@fluentui/make-styles");
const make_styles_1 = /*#__PURE__*/require("@fluentui/make-styles");
var RendererContext_1 = /*#__PURE__*/require("./RendererContext");
const RendererContext_1 = /*#__PURE__*/require("./RendererContext");
function makeStaticStyles(styles) {
var getStyles = make_styles_1.makeStaticStyles(styles);
const getStyles = make_styles_1.makeStaticStyles(styles);
if (process.env.NODE_ENV === 'test') {
// eslint-disable-next-line @typescript-eslint/no-empty-function
return function () {};
return () => {};
}
return function useStaticStyles() {
var renderer = RendererContext_1.useRenderer();
var options = {
renderer: renderer
const renderer = RendererContext_1.useRenderer();
const options = {
renderer
};

@@ -26,0 +26,0 @@ return getStyles(options);

@@ -8,9 +8,9 @@ "use strict";

var make_styles_1 = /*#__PURE__*/require("@fluentui/make-styles");
const make_styles_1 = /*#__PURE__*/require("@fluentui/make-styles");
var react_shared_contexts_1 = /*#__PURE__*/require("@fluentui/react-shared-contexts");
const react_shared_contexts_1 = /*#__PURE__*/require("@fluentui/react-shared-contexts");
var React = /*#__PURE__*/require("react");
const React = /*#__PURE__*/require("react");
var RendererContext_1 = /*#__PURE__*/require("./RendererContext");
const RendererContext_1 = /*#__PURE__*/require("./RendererContext");

@@ -28,3 +28,3 @@ function isInsideComponent() {

function makeStyles(stylesBySlots) {
var getStyles = make_styles_1.makeStyles(stylesBySlots);
const getStyles = make_styles_1.makeStyles(stylesBySlots);

@@ -38,7 +38,9 @@ if (process.env.NODE_ENV !== 'production') {

return function useClasses() {
var dir = react_shared_contexts_1.useFluent().dir;
var renderer = RendererContext_1.useRenderer();
var options = {
dir: dir,
renderer: renderer
const {
dir
} = react_shared_contexts_1.useFluent();
const renderer = RendererContext_1.useRenderer();
const options = {
dir,
renderer
};

@@ -45,0 +47,0 @@ return getStyles(options);

@@ -8,7 +8,7 @@ "use strict";

var make_styles_1 = /*#__PURE__*/require("@fluentui/make-styles");
const make_styles_1 = /*#__PURE__*/require("@fluentui/make-styles");
var react_utilities_1 = /*#__PURE__*/require("@fluentui/react-utilities");
const react_utilities_1 = /*#__PURE__*/require("@fluentui/react-utilities");
var React = /*#__PURE__*/require("react");
const React = /*#__PURE__*/require("react");
/**

@@ -24,7 +24,7 @@ * @private

var RendererProvider = function (_a) {
var children = _a.children,
renderer = _a.renderer,
targetDocument = _a.targetDocument;
const RendererProvider = ({
children,
renderer,
targetDocument
}) => {
if (react_utilities_1.canUseDOM()) {

@@ -34,3 +34,3 @@ // This if statement technically breaks the rules of hooks, but is safe because the condition never changes after

// eslint-disable-next-line react-hooks/rules-of-hooks
React.useMemo(function () {
React.useMemo(() => {
// "rehydrateCache()" can't be called in effects as it needs to be called before any component will be rendered to

@@ -37,0 +37,0 @@ // avoid double insertion of classes

@@ -8,7 +8,5 @@ "use strict";

var tslib_1 = /*#__PURE__*/require("tslib");
const make_styles_1 = /*#__PURE__*/require("@fluentui/make-styles");
var make_styles_1 = /*#__PURE__*/require("@fluentui/make-styles");
var React = /*#__PURE__*/require("react");
const React = /*#__PURE__*/require("react");
/**

@@ -22,15 +20,15 @@ * This method returns a list of <style> React elements with the rendered CSS. This is useful for Server-Side rendering.

function renderToStyleElements(renderer) {
var styles = make_styles_1.styleBucketOrdering.reduce(function (acc, bucketName) {
var _a;
return tslib_1.__assign(tslib_1.__assign({}, acc), (_a = {}, _a[bucketName] = [], _a));
const styles = make_styles_1.styleBucketOrdering.reduce((acc, bucketName) => {
return { ...acc,
[bucketName]: []
};
}, {}); // eslint-disable-next-line guard-for-in
for (var cssRule in renderer.insertionCache) {
var bucketName = renderer.insertionCache[cssRule];
for (const cssRule in renderer.insertionCache) {
const bucketName = renderer.insertionCache[cssRule];
styles[bucketName].push(cssRule);
}
return Object.keys(styles).map(function (bucketName) {
var cssRules = styles[bucketName].join(''); // We don't want to create empty style elements
return Object.keys(styles).map(bucketName => {
const cssRules = styles[bucketName].join(''); // We don't want to create empty style elements

@@ -37,0 +35,0 @@ if (cssRules.length === 0) {

@@ -12,9 +12,11 @@ import { __styles as vanillaStyles } from '@fluentui/make-styles';

export function __styles(classesMapBySlot, cssRules) {
var getStyles = vanillaStyles(classesMapBySlot, cssRules);
const getStyles = vanillaStyles(classesMapBySlot, cssRules);
return function useClasses() {
var dir = useFluent().dir;
var renderer = useRenderer();
const {
dir
} = useFluent();
const renderer = useRenderer();
return getStyles({
dir: dir,
renderer: renderer
dir,
renderer
});

@@ -21,0 +23,0 @@ };

@@ -1,2 +0,3 @@

export { mergeClasses, createDOMRenderer } from '@fluentui/make-styles';
export { shorthands, mergeClasses, createDOMRenderer } from '@fluentui/make-styles';
export type { MakeStylesStyle, MakeStylesStyleRule, MakeStylesStyleFunctionRule } from '@fluentui/make-styles';
export { makeStyles } from './makeStyles';

@@ -3,0 +4,0 @@ export { makeStaticStyles } from './makeStaticStyles';

@@ -1,2 +0,2 @@

export { mergeClasses, createDOMRenderer } from '@fluentui/make-styles';
export { shorthands, mergeClasses, createDOMRenderer } from '@fluentui/make-styles';
export { makeStyles } from './makeStyles';

@@ -7,3 +7,3 @@ export { makeStaticStyles } from './makeStaticStyles';

export { __styles } from './__styles'; // TODO: we should re-export some of types from "@fluentui/make-styles" once we will get update to TS4
export { __styles } from './__styles';
//# sourceMappingURL=index.js.map
import { makeStaticStyles as vanillaMakeStaticStyles } from '@fluentui/make-styles';
import { useRenderer } from './RendererContext';
export function makeStaticStyles(styles) {
var getStyles = vanillaMakeStaticStyles(styles);
const getStyles = vanillaMakeStaticStyles(styles);
if (process.env.NODE_ENV === 'test') {
// eslint-disable-next-line @typescript-eslint/no-empty-function
return function () {};
return () => {};
}
return function useStaticStyles() {
var renderer = useRenderer();
var options = {
renderer: renderer
const renderer = useRenderer();
const options = {
renderer
};

@@ -16,0 +16,0 @@ return getStyles(options);

@@ -17,3 +17,3 @@ import { makeStyles as vanillaMakeStyles } from '@fluentui/make-styles';

export function makeStyles(stylesBySlots) {
var getStyles = vanillaMakeStyles(stylesBySlots);
const getStyles = vanillaMakeStyles(stylesBySlots);

@@ -27,7 +27,9 @@ if (process.env.NODE_ENV !== 'production') {

return function useClasses() {
var dir = useFluent().dir;
var renderer = useRenderer();
var options = {
dir: dir,
renderer: renderer
const {
dir
} = useFluent();
const renderer = useRenderer();
const options = {
dir,
renderer
};

@@ -34,0 +36,0 @@ return getStyles(options);

@@ -8,3 +8,3 @@ import { createDOMRenderer, rehydrateRendererCache } from '@fluentui/make-styles';

export var RendererContext = /*#__PURE__*/React.createContext( /*#__PURE__*/createDOMRenderer());
export const RendererContext = /*#__PURE__*/React.createContext( /*#__PURE__*/createDOMRenderer());
/**

@@ -14,7 +14,7 @@ * @public

export var RendererProvider = function (_a) {
var children = _a.children,
renderer = _a.renderer,
targetDocument = _a.targetDocument;
export const RendererProvider = ({
children,
renderer,
targetDocument
}) => {
if (canUseDOM()) {

@@ -24,3 +24,3 @@ // This if statement technically breaks the rules of hooks, but is safe because the condition never changes after

// eslint-disable-next-line react-hooks/rules-of-hooks
React.useMemo(function () {
React.useMemo(() => {
// "rehydrateCache()" can't be called in effects as it needs to be called before any component will be rendered to

@@ -27,0 +27,0 @@ // avoid double insertion of classes

@@ -1,2 +0,1 @@

import { __assign } from "tslib";
import { styleBucketOrdering } from '@fluentui/make-styles';

@@ -11,15 +10,15 @@ import * as React from 'react';

export function renderToStyleElements(renderer) {
var styles = styleBucketOrdering.reduce(function (acc, bucketName) {
var _a;
return __assign(__assign({}, acc), (_a = {}, _a[bucketName] = [], _a));
const styles = styleBucketOrdering.reduce((acc, bucketName) => {
return { ...acc,
[bucketName]: []
};
}, {}); // eslint-disable-next-line guard-for-in
for (var cssRule in renderer.insertionCache) {
var bucketName = renderer.insertionCache[cssRule];
for (const cssRule in renderer.insertionCache) {
const bucketName = renderer.insertionCache[cssRule];
styles[bucketName].push(cssRule);
}
return Object.keys(styles).map(function (bucketName) {
var cssRules = styles[bucketName].join(''); // We don't want to create empty style elements
return Object.keys(styles).map(bucketName => {
const cssRules = styles[bucketName].join(''); // We don't want to create empty style elements

@@ -26,0 +25,0 @@ if (cssRules.length === 0) {

{
"name": "@fluentui/react-make-styles",
"version": "0.0.0-nightly050f89bf0020211102.1",
"version": "0.0.0-nightly07d9ed6d1b20211221.1",
"description": "React bindings for @fluentui/make-styles",

@@ -24,4 +24,5 @@ "main": "lib-commonjs/index.js",

"docs": "api-extractor run --config=config/api-extractor.local.json --local",
"build:local": "tsc -p . --module esnext --emitDeclarationOnly && node ../../scripts/typescript/normalize-import --output dist/react-make-styles/src && yarn docs",
"storybook": "start-storybook"
"build:local": "tsc -p ./tsconfig.lib.json --module esnext --emitDeclarationOnly && node ../../scripts/typescript/normalize-import --output ./dist/packages/react-make-styles/src && yarn docs",
"storybook": "start-storybook",
"type-check": "tsc -b tsconfig.json"
},

@@ -37,6 +38,6 @@ "devDependencies": {

"dependencies": {
"@fluentui/react-shared-contexts": "0.0.0-nightly050f89bf0020211102.1",
"@fluentui/make-styles": "0.0.0-nightly050f89bf0020211102.1",
"@fluentui/react-theme": "0.0.0-nightly050f89bf0020211102.1",
"@fluentui/react-utilities": "0.0.0-nightly050f89bf0020211102.1",
"@fluentui/react-shared-contexts": "0.0.0-nightly07d9ed6d1b20211221.1",
"@fluentui/make-styles": "0.0.0-nightly07d9ed6d1b20211221.1",
"@fluentui/react-theme": "0.0.0-nightly07d9ed6d1b20211221.1",
"@fluentui/react-utilities": "0.0.0-nightly07d9ed6d1b20211221.1",
"tslib": "^2.1.0"

@@ -49,3 +50,2 @@ },

"beachball": {
"tag": "beta",
"disallowedChangeTypes": [

@@ -52,0 +52,0 @@ "major",

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc