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

@fluentui/styles

Package Overview
Dependencies
Maintainers
6
Versions
72
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@fluentui/styles - npm Package Compare versions

Comparing version 0.47.0 to 0.48.0

31

dist/commonjs/mergeThemes.js

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

});
exports.default = exports.mergeStyles = exports.mergeAnimations = exports.mergeIcons = exports.mergeStaticStyles = exports.mergeFontFaces = exports.mergeThemeStyles = exports.mergeThemeVariables = exports.mergeThemeVariables__DEV = exports.mergeThemeVariables__PROD = exports.mergeSiteVariables = exports.mergeSiteVariables__DEV = exports.mergeSiteVariables__PROD = exports.mergeComponentVariables = exports.mergeComponentVariables__DEV = exports.mergeComponentVariables__PROD = exports.mergeComponentStyles = exports.mergeComponentStyles__DEV = exports.mergeComponentStyles__PROD = exports.emptyTheme = void 0;
exports.default = exports.mergeStyles = exports.mergeAnimations = exports.mergeStaticStyles = exports.mergeFontFaces = exports.mergeThemeStyles = exports.mergeThemeVariables = exports.mergeThemeVariables__DEV = exports.mergeThemeVariables__PROD = exports.mergeSiteVariables = exports.mergeSiteVariables__DEV = exports.mergeSiteVariables__PROD = exports.mergeComponentVariables = exports.mergeComponentVariables__DEV = exports.mergeComponentVariables__PROD = exports.mergeComponentStyles = exports.mergeComponentStyles__DEV = exports.mergeComponentStyles__PROD = exports.emptyTheme = void 0;

@@ -47,3 +47,2 @@ var _toConsumableArray2 = _interopRequireDefault(require("@babel/runtime/helpers/toConsumableArray"));

staticStyles: [],
icons: {},
animations: {}

@@ -381,3 +380,3 @@ }; // ----------------------------------------

var mergeIcons = function mergeIcons() {
var mergeAnimations = function mergeAnimations() {
for (var _len10 = arguments.length, sources = new Array(_len10), _key10 = 0; _key10 < _len10; _key10++) {

@@ -390,5 +389,5 @@ sources[_key10] = arguments[_key10];

exports.mergeIcons = mergeIcons;
exports.mergeAnimations = mergeAnimations;
var mergeAnimations = function mergeAnimations() {
var mergeStyles = function mergeStyles() {
for (var _len11 = arguments.length, sources = new Array(_len11), _key11 = 0; _key11 < _len11; _key11++) {

@@ -398,15 +397,5 @@ sources[_key11] = arguments[_key11];

return Object.assign.apply(Object, [{}].concat(sources));
};
exports.mergeAnimations = mergeAnimations;
var mergeStyles = function mergeStyles() {
for (var _len12 = arguments.length, sources = new Array(_len12), _key12 = 0; _key12 < _len12; _key12++) {
sources[_key12] = arguments[_key12];
}
return function () {
for (var _len13 = arguments.length, args = new Array(_len13), _key13 = 0; _key13 < _len13; _key13++) {
args[_key13] = arguments[_key13];
for (var _len12 = arguments.length, args = new Array(_len12), _key12 = 0; _key12 < _len12; _key12++) {
args[_key12] = arguments[_key12];
}

@@ -423,4 +412,4 @@

var mergeThemes = function mergeThemes() {
for (var _len14 = arguments.length, themes = new Array(_len14), _key14 = 0; _key14 < _len14; _key14++) {
themes[_key14] = arguments[_key14];
for (var _len13 = arguments.length, themes = new Array(_len13), _key13 = 0; _key13 < _len13; _key13++) {
themes[_key13] = arguments[_key13];
}

@@ -433,5 +422,3 @@

acc.componentVariables = mergeThemeVariables(acc.componentVariables, (0, _withDebugId.default)(next.componentVariables, nextDebugId));
acc.componentStyles = mergeThemeStyles(acc.componentStyles, (0, _withDebugId.default)(next.componentStyles, nextDebugId)); // Merge icons set, last one wins in case of collisions
acc.icons = mergeIcons(acc.icons, next.icons);
acc.componentStyles = mergeThemeStyles(acc.componentStyles, (0, _withDebugId.default)(next.componentStyles, nextDebugId));
acc.fontFaces = mergeFontFaces.apply(void 0, (0, _toConsumableArray2.default)(acc.fontFaces).concat((0, _toConsumableArray2.default)(next.fontFaces || [])));

@@ -438,0 +425,0 @@ acc.staticStyles = mergeStaticStyles.apply(void 0, (0, _toConsumableArray2.default)(acc.staticStyles).concat((0, _toConsumableArray2.default)(next.staticStyles || [])));

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

import { ComponentSlotStyle, ComponentSlotStylesInput, ComponentSlotStylesPrepared, ComponentVariablesPrepared, FontFace, SiteVariablesInput, SiteVariablesPrepared, StaticStyle, ThemeAnimation, ThemeComponentStylesInput, ThemeComponentStylesPrepared, ThemeComponentVariablesInput, ThemeComponentVariablesPrepared, ThemeIcons, ThemeInput, ThemePrepared } from './types';
import { ComponentSlotStyle, ComponentSlotStylesInput, ComponentSlotStylesPrepared, ComponentVariablesPrepared, FontFace, SiteVariablesInput, SiteVariablesPrepared, StaticStyle, ThemeAnimation, ThemeComponentStylesInput, ThemeComponentStylesPrepared, ThemeComponentVariablesInput, ThemeComponentVariablesPrepared, ThemeInput, ThemePrepared } from './types';
export declare const emptyTheme: ThemePrepared;

@@ -40,3 +40,2 @@ /**

export declare const mergeStaticStyles: (...sources: StaticStyle[]) => StaticStyle[];
export declare const mergeIcons: (...sources: ThemeIcons[]) => ThemeIcons;
export declare const mergeAnimations: (...sources: {

@@ -43,0 +42,0 @@ [key: string]: ThemeAnimation<{}>;

@@ -19,3 +19,2 @@ "use strict";

staticStyles: [],
icons: {},
animations: {},

@@ -258,9 +257,2 @@ };

};
exports.mergeIcons = function () {
var sources = [];
for (var _i = 0; _i < arguments.length; _i++) {
sources[_i] = arguments[_i];
}
return Object.assign.apply(Object, tslib_1.__spreadArrays([{}], sources));
};
exports.mergeAnimations = function () {

@@ -300,4 +292,2 @@ var sources = [];

acc.componentStyles = exports.mergeThemeStyles(acc.componentStyles, withDebugId_1.default(next.componentStyles, nextDebugId));
// Merge icons set, last one wins in case of collisions
acc.icons = exports.mergeIcons(acc.icons, next.icons);
acc.fontFaces = exports.mergeFontFaces.apply(void 0, tslib_1.__spreadArrays(acc.fontFaces, (next.fontFaces || [])));

@@ -304,0 +294,0 @@ acc.staticStyles = exports.mergeStaticStyles.apply(void 0, tslib_1.__spreadArrays(acc.staticStyles, (next.staticStyles || [])));

@@ -63,22 +63,2 @@ import * as CSS from 'csstype';

export declare type FontFaces = FontFace[];
declare type SvgIconFuncArg = {
classes: {
[iconSlot: string]: string;
};
rtl: boolean;
props: any;
};
export declare type SvgIconSpec = ObjectOrFunc<any, SvgIconFuncArg>;
export declare type FontIconSpec = {
content: string;
fontFamily: string;
};
export declare type ThemeIconSpec = {
isSvg?: boolean;
icon: FontIconSpec | SvgIconSpec;
};
export declare type RequiredIconNames = 'icon-checkmark' | 'icon-circle' | 'icon-close' | 'icon-arrow-end' | 'icon-arrow-up' | 'icon-arrow-down' | 'icon-pause' | 'icon-play' | 'icon-chevron-start' | 'icon-chevron-end';
export declare type ThemeIcons = Partial<Record<RequiredIconNames, ThemeIconSpec>> & {
[iconName: string]: ThemeIconSpec;
};
export interface SiteVariablesInput extends Record<string, any> {

@@ -136,3 +116,2 @@ }

staticStyles?: StaticStyles;
icons?: ThemeIcons;
animations?: {

@@ -150,3 +129,2 @@ [key: string]: ThemeAnimation;

};
icons: ThemeIcons;
fontFaces: FontFaces;

@@ -153,0 +131,0 @@ staticStyles: StaticStyles;

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

import { ComponentSlotStyle, ComponentSlotStylesInput, ComponentSlotStylesPrepared, ComponentVariablesPrepared, FontFace, SiteVariablesInput, SiteVariablesPrepared, StaticStyle, ThemeAnimation, ThemeComponentStylesInput, ThemeComponentStylesPrepared, ThemeComponentVariablesInput, ThemeComponentVariablesPrepared, ThemeIcons, ThemeInput, ThemePrepared } from './types';
import { ComponentSlotStyle, ComponentSlotStylesInput, ComponentSlotStylesPrepared, ComponentVariablesPrepared, FontFace, SiteVariablesInput, SiteVariablesPrepared, StaticStyle, ThemeAnimation, ThemeComponentStylesInput, ThemeComponentStylesPrepared, ThemeComponentVariablesInput, ThemeComponentVariablesPrepared, ThemeInput, ThemePrepared } from './types';
export declare const emptyTheme: ThemePrepared;

@@ -40,3 +40,2 @@ /**

export declare const mergeStaticStyles: (...sources: StaticStyle[]) => StaticStyle[];
export declare const mergeIcons: (...sources: ThemeIcons[]) => ThemeIcons;
export declare const mergeAnimations: (...sources: {

@@ -43,0 +42,0 @@ [key: string]: ThemeAnimation<{}>;

@@ -23,3 +23,2 @@ import _toConsumableArray from "@babel/runtime/helpers/esm/toConsumableArray";

staticStyles: [],
icons: {},
animations: {}

@@ -323,3 +322,3 @@ }; // ----------------------------------------

};
export var mergeIcons = function mergeIcons() {
export var mergeAnimations = function mergeAnimations() {
for (var _len10 = arguments.length, sources = new Array(_len10), _key10 = 0; _key10 < _len10; _key10++) {

@@ -331,3 +330,3 @@ sources[_key10] = arguments[_key10];

};
export var mergeAnimations = function mergeAnimations() {
export var mergeStyles = function mergeStyles() {
for (var _len11 = arguments.length, sources = new Array(_len11), _key11 = 0; _key11 < _len11; _key11++) {

@@ -337,12 +336,5 @@ sources[_key11] = arguments[_key11];

return Object.assign.apply(Object, [{}].concat(sources));
};
export var mergeStyles = function mergeStyles() {
for (var _len12 = arguments.length, sources = new Array(_len12), _key12 = 0; _key12 < _len12; _key12++) {
sources[_key12] = arguments[_key12];
}
return function () {
for (var _len13 = arguments.length, args = new Array(_len13), _key13 = 0; _key13 < _len13; _key13++) {
args[_key13] = arguments[_key13];
for (var _len12 = arguments.length, args = new Array(_len12), _key12 = 0; _key12 < _len12; _key12++) {
args[_key12] = arguments[_key12];
}

@@ -357,4 +349,4 @@

var mergeThemes = function mergeThemes() {
for (var _len14 = arguments.length, themes = new Array(_len14), _key14 = 0; _key14 < _len14; _key14++) {
themes[_key14] = arguments[_key14];
for (var _len13 = arguments.length, themes = new Array(_len13), _key13 = 0; _key13 < _len13; _key13++) {
themes[_key13] = arguments[_key13];
}

@@ -367,5 +359,3 @@

acc.componentVariables = mergeThemeVariables(acc.componentVariables, withDebugId(next.componentVariables, nextDebugId));
acc.componentStyles = mergeThemeStyles(acc.componentStyles, withDebugId(next.componentStyles, nextDebugId)); // Merge icons set, last one wins in case of collisions
acc.icons = mergeIcons(acc.icons, next.icons);
acc.componentStyles = mergeThemeStyles(acc.componentStyles, withDebugId(next.componentStyles, nextDebugId));
acc.fontFaces = mergeFontFaces.apply(void 0, _toConsumableArray(acc.fontFaces).concat(_toConsumableArray(next.fontFaces || [])));

@@ -372,0 +362,0 @@ acc.staticStyles = mergeStaticStyles.apply(void 0, _toConsumableArray(acc.staticStyles).concat(_toConsumableArray(next.staticStyles || [])));

@@ -63,22 +63,2 @@ import * as CSS from 'csstype';

export declare type FontFaces = FontFace[];
declare type SvgIconFuncArg = {
classes: {
[iconSlot: string]: string;
};
rtl: boolean;
props: any;
};
export declare type SvgIconSpec = ObjectOrFunc<any, SvgIconFuncArg>;
export declare type FontIconSpec = {
content: string;
fontFamily: string;
};
export declare type ThemeIconSpec = {
isSvg?: boolean;
icon: FontIconSpec | SvgIconSpec;
};
export declare type RequiredIconNames = 'icon-checkmark' | 'icon-circle' | 'icon-close' | 'icon-arrow-end' | 'icon-arrow-up' | 'icon-arrow-down' | 'icon-pause' | 'icon-play' | 'icon-chevron-start' | 'icon-chevron-end';
export declare type ThemeIcons = Partial<Record<RequiredIconNames, ThemeIconSpec>> & {
[iconName: string]: ThemeIconSpec;
};
export interface SiteVariablesInput extends Record<string, any> {

@@ -136,3 +116,2 @@ }

staticStyles?: StaticStyles;
icons?: ThemeIcons;
animations?: {

@@ -150,3 +129,2 @@ [key: string]: ThemeAnimation;

};
icons: ThemeIcons;
fontFaces: FontFaces;

@@ -153,0 +131,0 @@ staticStyles: StaticStyles;

{
"name": "@fluentui/styles",
"description": "A set of styling utilities for CSS-in-JS.",
"version": "0.47.0",
"version": "0.48.0",
"author": "Marija Najdova <mnajdova@gmail.com>",
"bugs": "https://github.com/OfficeDev/office-ui-fabric-react/issues",
"bugs": "https://github.com/microsoft/fluentui/issues",
"dependencies": {

@@ -13,3 +13,3 @@ "@babel/runtime": "^7.7.6",

"devDependencies": {
"@types/react": "16.8.11",
"@types/react": "16.8.25",
"@uifabric/build": "^7.0.0",

@@ -21,3 +21,3 @@ "lerna-alias": "^3.0.3-0"

],
"homepage": "https://github.com/OfficeDev/office-ui-fabric-react/tree/master/packages/fluentui/styles",
"homepage": "https://github.com/microsoft/fluentui/tree/master/packages/fluentui/styles",
"jsnext:main": "dist/es/index.js",

@@ -30,3 +30,3 @@ "license": "MIT",

},
"repository": "OfficeDev/office-ui-fabric-react.git",
"repository": "microsoft/fluentui.git",
"scripts": {

@@ -44,3 +44,3 @@ "build": "gulp bundle:package:no-umd",

"types": "dist/es/index.d.ts",
"gitHead": "36ed94b0250ee3316e9aaec4697ced1cf229dcb1"
"gitHead": "0b9847bc9bfdc1c4a0cb35ce0cfcfdc32880500b"
}

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