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

@uifabric/merge-styles

Package Overview
Dependencies
Maintainers
2
Versions
193
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@uifabric/merge-styles - npm Package Compare versions

Comparing version 5.11.1 to 5.11.2

14

CHANGELOG.json

@@ -5,2 +5,16 @@ {

{
"version": "5.11.2",
"tag": "@uifabric/merge-styles_v5.11.2",
"date": "Wed, 07 Feb 2018 11:23:59 GMT",
"comments": {
"patch": [
{
"author": "David Zearing <dzearing@microsoft.com>",
"commit": "d121208b61c93811909fb69d2ba8d104c3531769",
"comment": "Adjusting rtl flipping logic to be more resilient to invalid styling."
}
]
}
},
{
"version": "5.11.1",

@@ -7,0 +21,0 @@ "tag": "@uifabric/merge-styles_v5.11.1",

9

CHANGELOG.md
# Change Log - @uifabric/merge-styles
This log was last generated on Tue, 06 Feb 2018 11:14:36 GMT and should not be manually modified.
This log was last generated on Wed, 07 Feb 2018 11:23:59 GMT and should not be manually modified.
## 5.11.2
Wed, 07 Feb 2018 11:23:59 GMT
### Patches
- Adjusting rtl flipping logic to be more resilient to invalid styling.
## 5.11.1

@@ -6,0 +13,0 @@ Tue, 06 Feb 2018 11:14:36 GMT

61

dist/merge-styles.js

@@ -882,3 +882,2 @@ var MergeStyles =

'flex-shrink',
'line-height',
'opacity',

@@ -907,7 +906,10 @@ 'order',

Object.defineProperty(exports, "__esModule", { value: true });
var _nameReplacements = {
'left': 'right',
'right': 'left'
};
var _valueReplacements = {
var LEFT = 'left';
var RIGHT = 'right';
var NO_FLIP = '@noflip';
var NAME_REPLACEMENTS = (_a = {},
_a[LEFT] = RIGHT,
_a[RIGHT] = LEFT,
_a);
var VALUE_REPLACEMENTS = {
'w-resize': 'e-resize',

@@ -917,4 +919,6 @@ 'sw-resize': 'se-resize',

};
var NO_FLIP = '@noflip';
var _rtl = getRTL();
/**
* Sets the current RTL value.
*/
function setRTL(isRTL) {

@@ -924,2 +928,5 @@ _rtl = isRTL;

exports.setRTL = setRTL;
/**
* Gets the current RTL value.
*/
function getRTL() {

@@ -934,26 +941,33 @@ if (_rtl === undefined) {

exports.getRTL = getRTL;
/**
* RTLifies the rulePair in the array at the current index. This mutates the array for performance
* reasons.
*/
function rtlifyRules(rulePairs, index) {
if (getRTL()) {
var name_1 = rulePairs[index];
if (!name_1) {
return;
}
var value = rulePairs[index + 1];
if (value.indexOf(NO_FLIP) >= 0) {
if (typeof value === 'string' && value.indexOf(NO_FLIP) >= 0) {
rulePairs[index + 1] = value.replace(/\s*(?:\/\*\s*)?\@noflip\b(?:\s*\*\/)?\s*?/g, '');
}
else if (name_1.indexOf('left') >= 0) {
rulePairs[index] = name_1.replace('left', 'right');
else if (name_1.indexOf(LEFT) >= 0) {
rulePairs[index] = name_1.replace(LEFT, RIGHT);
}
else if (name_1.indexOf('right') >= 0) {
rulePairs[index] = name_1.replace('right', 'left');
else if (name_1.indexOf(RIGHT) >= 0) {
rulePairs[index] = name_1.replace(RIGHT, LEFT);
}
else if (String(value).indexOf('left') >= 0) {
rulePairs[index + 1] = value.replace('left', 'right');
else if (String(value).indexOf(LEFT) >= 0) {
rulePairs[index + 1] = value.replace(LEFT, RIGHT);
}
else if (String(value).indexOf('right') >= 0) {
rulePairs[index + 1] = value.replace('right', 'left');
else if (String(value).indexOf(RIGHT) >= 0) {
rulePairs[index + 1] = value.replace(RIGHT, LEFT);
}
else if (_nameReplacements[name_1]) {
rulePairs[index] = _nameReplacements[name_1];
else if (NAME_REPLACEMENTS[name_1]) {
rulePairs[index] = NAME_REPLACEMENTS[name_1];
}
else if (_valueReplacements[value]) {
rulePairs[index + 1] = _valueReplacements[value];
else if (VALUE_REPLACEMENTS[value]) {
rulePairs[index + 1] = VALUE_REPLACEMENTS[value];
}

@@ -974,2 +988,5 @@ else {

exports.rtlifyRules = rtlifyRules;
/**
* Given a string value in a space delimited format (e.g. "1 2 3 4"), negates a particular value.
*/
function negateNum(value, partIndex) {

@@ -981,2 +998,5 @@ var parts = value.split(' ');

}
/**
* Given a string quad, flips the left and right values.
*/
function flipQuad(value) {

@@ -991,2 +1011,3 @@ if (typeof value === 'string') {

}
var _a;

@@ -993,0 +1014,0 @@

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

var MergeStyles=function(e){function t(n){if(r[n])return r[n].exports;var o=r[n]={i:n,l:!1,exports:{}};return e[n].call(o.exports,o,o.exports,t),o.l=!0,o.exports}var r={};return t.m=e,t.c=r,t.d=function(e,r,n){t.o(e,r)||Object.defineProperty(e,r,{configurable:!1,enumerable:!0,get:n})},t.n=function(e){var r=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(r,"a",r),r},t.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},t.p="",t(t.s=4)}([function(e,t,r){"use strict";function n(e){var t=document.createElement("style");return t.setAttribute("data-merge-styles","true"),t.type="text/css",e&&t.appendChild(document.createTextNode(e)),document.head.appendChild(t),t}Object.defineProperty(t,"__esModule",{value:!0});var o=r(6);!function(e){e[e.none=0]="none",e[e.insertNode=1]="insertNode",e[e.appendChild=2]="appendChild"}(t.InjectionMode||(t.InjectionMode={}));var i,s=function(){function e(e){this._config=o.__assign({injectionMode:1,defaultPrefix:"css"},e),this.reset()}return e.getInstance=function(){var t="undefined"!=typeof window?window:{};if(!(i=t.__stylesheet__)){var r=t&&t.FabricConfig||{};i=t.__stylesheet__=new e(r.mergeStyles)}return i},e.prototype.setConfig=function(e){this._config=o.__assign({},this._config,e)},e.prototype.getClassName=function(e){return(e||this._config.defaultPrefix)+"-"+this._counter++},e.prototype.cacheClassName=function(e,t,r,n){this._keyToClassName[t]=e,this._classNameToArgs[e]={args:r,rules:n}},e.prototype.classNameFromKey=function(e){return this._keyToClassName[e]},e.prototype.argsFromClassName=function(e){var t=this._classNameToArgs[e];return t&&t.args},e.prototype.insertedRulesFromClassName=function(e){var t=this._classNameToArgs[e];return t&&t.rules},e.prototype.insertRule=function(e){var t=this._getElement();switch(t?this._config.injectionMode:0){case 1:var r=t.sheet;try{r.insertRule(e,r.cssRules.length)}catch(e){}break;case 2:n(e);break;default:this._rules.push(e)}this._config.onInsertRule&&this._config.onInsertRule(e)},e.prototype.getRules=function(){return(this._rules.join("")||"")+(this._rulesToInsert.join("")||"")},e.prototype.reset=function(){this._rules=[],this._rulesToInsert=[],this._counter=0,this._classNameToArgs={},this._keyToClassName={},this._timerId&&(clearTimeout(this._timerId),this._timerId=0)},e.prototype._getElement=function(){return this._styleElement||"undefined"==typeof document||(this._styleElement=n()),this._styleElement},e}();t.Stylesheet=s},function(e,t,r){"use strict";function n(e){var t=e&&e["&"];return t?t.displayName:void 0}function o(e,t,r){void 0===t&&(t={__order:[]}),void 0===r&&(r="&");var n=f.Stylesheet.getInstance(),s=t[r];s||(s={},t[r]=s,t.__order.push(r));for(var a=0,u=e;a<u.length;a++){var c=u[a];if("string"==typeof c){var l=n.argsFromClassName(c);l&&o(l,t,r)}else if(Array.isArray(c))o(c,t,r);else for(var p in c)if("selectors"===p){var y=c.selectors;for(var d in y)if(y.hasOwnProperty(d)){var v=y[d];0===d.indexOf("@media")?d=d+"{"+r:0===d.indexOf(":")?d=r+d:d.indexOf("&")<0&&(d=r+" "+d),o([v],t,d)}}else"margin"===p||"padding"===p?i(s,p,c[p]):s[p]=c[p]}return t}function i(e,t,r){var n="string"==typeof r?r.split(" "):[r];e[t+"Top"]=n[0],e[t+"Right"]=n[1]||n[0],e[t+"Bottom"]=n[2]||n[0],e[t+"Left"]=n[3]||n[1]||n[0]}function s(e){for(var t=[],r=!1,n=0,o=e.__order;n<o.length;n++){var i=o[n];t.push(i);var s=e[i];for(var a in s)s.hasOwnProperty(a)&&void 0!==s[a]&&(r=!0,t.push(a,s[a]))}return r?t.join(""):void 0}function a(e){if(!e)return"";var t=[];for(var r in e)e.hasOwnProperty(r)&&r!==h&&void 0!==e[r]&&t.push(r,e[r]);for(var n=0;n<t.length;n+=2)p.kebabRules(t,n),d.provideUnits(t,n),v.rtlifyRules(t,n),y.prefixRules(t,n);for(var n=1;n<t.length;n+=4)t.splice(n,1,":",t[n],";");return t.join("")}function u(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var r=o(e),i=s(r);if(i){var u=f.Stylesheet.getInstance(),c={className:u.classNameFromKey(i),key:i,args:e};if(!c.className){c.className=u.getClassName(n(r));for(var l=[],p=0,y=r.__order;p<y.length;p++){var d=y[p];l.push(d,a(r[d]))}c.rulesToInsert=l}return c}}function c(e,t){var r=f.Stylesheet.getInstance(),n=e.className,o=e.key,i=e.args,s=e.rulesToInsert;if(s){for(var a=0;a<s.length;a+=2){var u=s[a+1];if(u){var c=s[a];c=c.replace(/(&)|\$([\w-]+)\b/g,function(r,n,o){return n?"."+e.className:o?"."+(t&&t[o]||o):""});var l=c+"{"+u+"}"+(0===c.indexOf("@media")?"}":"");r.insertRule(l)}}r.cacheClassName(n,o,i,s)}}function l(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var r=u.apply(void 0,e);return r?(c(r),r.className):""}Object.defineProperty(t,"__esModule",{value:!0});var f=r(0),p=r(7),y=r(8),d=r(10),v=r(11),h="displayName";t.serializeRuleEntries=a,t.styleToRegistration=u,t.applyRegistration=c,t.styleToClassName=l},function(e,t,r){"use strict";function n(){function e(t){for(var r=0,o=t;r<o.length;r++){var a=o[r];if(a)if("string"==typeof a)if(a.indexOf(" ")>=0)e(a.split(" "));else{var u=s.argsFromClassName(a);u?e(u):-1===n.indexOf(a)&&n.push(a)}else Array.isArray(a)?e(a):"object"==typeof a&&i.push(a)}}for(var t=[],r=0;r<arguments.length;r++)t[r]=arguments[r];var n=[],i=[],s=o.Stylesheet.getInstance();return e(t),{classes:n,objects:i}}Object.defineProperty(t,"__esModule",{value:!0});var o=r(0);t.extractStyleParts=n},function(e,t,r){"use strict";function n(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];for(var r={},n=0,o=e;n<o.length;n++){var i=o[n];if(i)for(var s in i)if(i.hasOwnProperty(s)){var a=r[s],u=i[s];r[s]=void 0===a?u:(Array.isArray(a)?a:[a]).concat(Array.isArray(u)?u:[u])}}return r}Object.defineProperty(t,"__esModule",{value:!0}),t.concatStyleSets=n},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(5);t.mergeStyles=n.mergeStyles;var o=r(12);t.mergeStyleSets=o.mergeStyleSets;var i=r(3);t.concatStyleSets=i.concatStyleSets;var s=r(13);t.fontFace=s.fontFace;var a=r(14);t.keyframes=a.keyframes;var u=r(0);t.InjectionMode=u.InjectionMode,t.Stylesheet=u.Stylesheet},function(e,t,r){"use strict";function n(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var r=i.extractStyleParts(e),n=r.classes,s=r.objects;return s.length&&n.push(o.styleToClassName(s)),n.join(" ")}Object.defineProperty(t,"__esModule",{value:!0});var o=r(1),i=r(2);t.mergeStyles=n},function(e,t,r){"use strict";function n(e,t){function r(){this.constructor=e}m(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}function o(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var o=0,n=Object.getOwnPropertySymbols(e);o<n.length;o++)t.indexOf(n[o])<0&&(r[n[o]]=e[n[o]]);return r}function i(e,t,r,n){var o,i=arguments.length,s=i<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,r,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(i<3?o(s):i>3?o(t,r,s):o(t,r))||s);return i>3&&s&&Object.defineProperty(t,r,s),s}function s(e,t){return function(r,n){t(r,n,e)}}function a(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)}function u(e,t,r,n){return new(r||(r=Promise))(function(o,i){function s(e){try{u(n.next(e))}catch(e){i(e)}}function a(e){try{u(n.throw(e))}catch(e){i(e)}}function u(e){e.done?o(e.value):new r(function(t){t(e.value)}).then(s,a)}u((n=n.apply(e,t||[])).next())})}function c(e,t){function r(e){return function(t){return n([e,t])}}function n(r){if(o)throw new TypeError("Generator is already executing.");for(;u;)try{if(o=1,i&&(s=i[2&r[0]?"return":r[0]?"throw":"next"])&&!(s=s.call(i,r[1])).done)return s;switch(i=0,s&&(r=[0,s.value]),r[0]){case 0:case 1:s=r;break;case 4:return u.label++,{value:r[1],done:!1};case 5:u.label++,i=r[1],r=[0];continue;case 7:r=u.ops.pop(),u.trys.pop();continue;default:if(s=u.trys,!(s=s.length>0&&s[s.length-1])&&(6===r[0]||2===r[0])){u=0;continue}if(3===r[0]&&(!s||r[1]>s[0]&&r[1]<s[3])){u.label=r[1];break}if(6===r[0]&&u.label<s[1]){u.label=s[1],s=r;break}if(s&&u.label<s[2]){u.label=s[2],u.ops.push(r);break}s[2]&&u.ops.pop(),u.trys.pop();continue}r=t.call(e,u)}catch(e){r=[6,e],i=0}finally{o=s=0}if(5&r[0])throw r[1];return{value:r[0]?r[1]:void 0,done:!0}}var o,i,s,a,u={label:0,sent:function(){if(1&s[0])throw s[1];return s[1]},trys:[],ops:[]};return a={next:r(0),throw:r(1),return:r(2)},"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a}function l(e,t){for(var r in e)t.hasOwnProperty(r)||(t[r]=e[r])}function f(e){var t="function"==typeof Symbol&&e[Symbol.iterator],r=0;return t?t.call(e):{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}}}function p(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,o,i=r.call(e),s=[];try{for(;(void 0===t||t-- >0)&&!(n=i.next()).done;)s.push(n.value)}catch(e){o={error:e}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return s}function y(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(p(arguments[t]));return e}function d(e){return this instanceof d?(this.v=e,this):new d(e)}function v(e,t,r){function n(e){l[e]&&(c[e]=function(t){return new Promise(function(r,n){f.push([e,t,r,n])>1||o(e,t)})})}function o(e,t){try{i(l[e](t))}catch(e){u(f[0][3],e)}}function i(e){e.value instanceof d?Promise.resolve(e.value.v).then(s,a):u(f[0][2],e)}function s(e){o("next",e)}function a(e){o("throw",e)}function u(e,t){e(t),f.shift(),f.length&&o(f[0][0],f[0][1])}if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var c,l=r.apply(e,t||[]),f=[];return c={},n("next"),n("throw"),n("return"),c[Symbol.asyncIterator]=function(){return this},c}function h(e){function t(t,o){e[t]&&(r[t]=function(r){return(n=!n)?{value:d(e[t](r)),done:"return"===t}:o?o(r):r})}var r,n;return r={},t("next"),t("throw",function(e){throw e}),t("return"),r[Symbol.iterator]=function(){return this},r}function g(e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var t=e[Symbol.asyncIterator];return t?t.call(e):"function"==typeof f?f(e):e[Symbol.iterator]()}function _(e,t){return Object.defineProperty?Object.defineProperty(e,"raw",{value:t}):e.raw=t,e}Object.defineProperty(t,"__esModule",{value:!0}),t.__extends=n,r.d(t,"__assign",function(){return b}),t.__rest=o,t.__decorate=i,t.__param=s,t.__metadata=a,t.__awaiter=u,t.__generator=c,t.__exportStar=l,t.__values=f,t.__read=p,t.__spread=y,t.__await=d,t.__asyncGenerator=v,t.__asyncDelegator=h,t.__asyncValues=g,t.__makeTemplateObject=_;/*! *****************************************************************************
var MergeStyles=function(e){function t(n){if(r[n])return r[n].exports;var o=r[n]={i:n,l:!1,exports:{}};return e[n].call(o.exports,o,o.exports,t),o.l=!0,o.exports}var r={};return t.m=e,t.c=r,t.d=function(e,r,n){t.o(e,r)||Object.defineProperty(e,r,{configurable:!1,enumerable:!0,get:n})},t.n=function(e){var r=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(r,"a",r),r},t.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},t.p="",t(t.s=4)}([function(e,t,r){"use strict";function n(e){var t=document.createElement("style");return t.setAttribute("data-merge-styles","true"),t.type="text/css",e&&t.appendChild(document.createTextNode(e)),document.head.appendChild(t),t}Object.defineProperty(t,"__esModule",{value:!0});var o=r(6);!function(e){e[e.none=0]="none",e[e.insertNode=1]="insertNode",e[e.appendChild=2]="appendChild"}(t.InjectionMode||(t.InjectionMode={}));var i,s=function(){function e(e){this._config=o.__assign({injectionMode:1,defaultPrefix:"css"},e),this.reset()}return e.getInstance=function(){var t="undefined"!=typeof window?window:{};if(!(i=t.__stylesheet__)){var r=t&&t.FabricConfig||{};i=t.__stylesheet__=new e(r.mergeStyles)}return i},e.prototype.setConfig=function(e){this._config=o.__assign({},this._config,e)},e.prototype.getClassName=function(e){return(e||this._config.defaultPrefix)+"-"+this._counter++},e.prototype.cacheClassName=function(e,t,r,n){this._keyToClassName[t]=e,this._classNameToArgs[e]={args:r,rules:n}},e.prototype.classNameFromKey=function(e){return this._keyToClassName[e]},e.prototype.argsFromClassName=function(e){var t=this._classNameToArgs[e];return t&&t.args},e.prototype.insertedRulesFromClassName=function(e){var t=this._classNameToArgs[e];return t&&t.rules},e.prototype.insertRule=function(e){var t=this._getElement();switch(t?this._config.injectionMode:0){case 1:var r=t.sheet;try{r.insertRule(e,r.cssRules.length)}catch(e){}break;case 2:n(e);break;default:this._rules.push(e)}this._config.onInsertRule&&this._config.onInsertRule(e)},e.prototype.getRules=function(){return(this._rules.join("")||"")+(this._rulesToInsert.join("")||"")},e.prototype.reset=function(){this._rules=[],this._rulesToInsert=[],this._counter=0,this._classNameToArgs={},this._keyToClassName={},this._timerId&&(clearTimeout(this._timerId),this._timerId=0)},e.prototype._getElement=function(){return this._styleElement||"undefined"==typeof document||(this._styleElement=n()),this._styleElement},e}();t.Stylesheet=s},function(e,t,r){"use strict";function n(e){var t=e&&e["&"];return t?t.displayName:void 0}function o(e,t,r){void 0===t&&(t={__order:[]}),void 0===r&&(r="&");var n=f.Stylesheet.getInstance(),s=t[r];s||(s={},t[r]=s,t.__order.push(r));for(var a=0,u=e;a<u.length;a++){var c=u[a];if("string"==typeof c){var l=n.argsFromClassName(c);l&&o(l,t,r)}else if(Array.isArray(c))o(c,t,r);else for(var p in c)if("selectors"===p){var y=c.selectors;for(var d in y)if(y.hasOwnProperty(d)){var v=y[d];0===d.indexOf("@media")?d=d+"{"+r:0===d.indexOf(":")?d=r+d:d.indexOf("&")<0&&(d=r+" "+d),o([v],t,d)}}else"margin"===p||"padding"===p?i(s,p,c[p]):s[p]=c[p]}return t}function i(e,t,r){var n="string"==typeof r?r.split(" "):[r];e[t+"Top"]=n[0],e[t+"Right"]=n[1]||n[0],e[t+"Bottom"]=n[2]||n[0],e[t+"Left"]=n[3]||n[1]||n[0]}function s(e){for(var t=[],r=!1,n=0,o=e.__order;n<o.length;n++){var i=o[n];t.push(i);var s=e[i];for(var a in s)s.hasOwnProperty(a)&&void 0!==s[a]&&(r=!0,t.push(a,s[a]))}return r?t.join(""):void 0}function a(e){if(!e)return"";var t=[];for(var r in e)e.hasOwnProperty(r)&&r!==h&&void 0!==e[r]&&t.push(r,e[r]);for(var n=0;n<t.length;n+=2)p.kebabRules(t,n),d.provideUnits(t,n),v.rtlifyRules(t,n),y.prefixRules(t,n);for(var n=1;n<t.length;n+=4)t.splice(n,1,":",t[n],";");return t.join("")}function u(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var r=o(e),i=s(r);if(i){var u=f.Stylesheet.getInstance(),c={className:u.classNameFromKey(i),key:i,args:e};if(!c.className){c.className=u.getClassName(n(r));for(var l=[],p=0,y=r.__order;p<y.length;p++){var d=y[p];l.push(d,a(r[d]))}c.rulesToInsert=l}return c}}function c(e,t){var r=f.Stylesheet.getInstance(),n=e.className,o=e.key,i=e.args,s=e.rulesToInsert;if(s){for(var a=0;a<s.length;a+=2){var u=s[a+1];if(u){var c=s[a];c=c.replace(/(&)|\$([\w-]+)\b/g,function(r,n,o){return n?"."+e.className:o?"."+(t&&t[o]||o):""});var l=c+"{"+u+"}"+(0===c.indexOf("@media")?"}":"");r.insertRule(l)}}r.cacheClassName(n,o,i,s)}}function l(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var r=u.apply(void 0,e);return r?(c(r),r.className):""}Object.defineProperty(t,"__esModule",{value:!0});var f=r(0),p=r(7),y=r(8),d=r(10),v=r(11),h="displayName";t.serializeRuleEntries=a,t.styleToRegistration=u,t.applyRegistration=c,t.styleToClassName=l},function(e,t,r){"use strict";function n(){function e(t){for(var r=0,o=t;r<o.length;r++){var a=o[r];if(a)if("string"==typeof a)if(a.indexOf(" ")>=0)e(a.split(" "));else{var u=s.argsFromClassName(a);u?e(u):-1===n.indexOf(a)&&n.push(a)}else Array.isArray(a)?e(a):"object"==typeof a&&i.push(a)}}for(var t=[],r=0;r<arguments.length;r++)t[r]=arguments[r];var n=[],i=[],s=o.Stylesheet.getInstance();return e(t),{classes:n,objects:i}}Object.defineProperty(t,"__esModule",{value:!0});var o=r(0);t.extractStyleParts=n},function(e,t,r){"use strict";function n(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];for(var r={},n=0,o=e;n<o.length;n++){var i=o[n];if(i)for(var s in i)if(i.hasOwnProperty(s)){var a=r[s],u=i[s];r[s]=void 0===a?u:(Array.isArray(a)?a:[a]).concat(Array.isArray(u)?u:[u])}}return r}Object.defineProperty(t,"__esModule",{value:!0}),t.concatStyleSets=n},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(5);t.mergeStyles=n.mergeStyles;var o=r(12);t.mergeStyleSets=o.mergeStyleSets;var i=r(3);t.concatStyleSets=i.concatStyleSets;var s=r(13);t.fontFace=s.fontFace;var a=r(14);t.keyframes=a.keyframes;var u=r(0);t.InjectionMode=u.InjectionMode,t.Stylesheet=u.Stylesheet},function(e,t,r){"use strict";function n(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var r=i.extractStyleParts(e),n=r.classes,s=r.objects;return s.length&&n.push(o.styleToClassName(s)),n.join(" ")}Object.defineProperty(t,"__esModule",{value:!0});var o=r(1),i=r(2);t.mergeStyles=n},function(e,t,r){"use strict";function n(e,t){function r(){this.constructor=e}m(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}function o(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var o=0,n=Object.getOwnPropertySymbols(e);o<n.length;o++)t.indexOf(n[o])<0&&(r[n[o]]=e[n[o]]);return r}function i(e,t,r,n){var o,i=arguments.length,s=i<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,r,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(i<3?o(s):i>3?o(t,r,s):o(t,r))||s);return i>3&&s&&Object.defineProperty(t,r,s),s}function s(e,t){return function(r,n){t(r,n,e)}}function a(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)}function u(e,t,r,n){return new(r||(r=Promise))(function(o,i){function s(e){try{u(n.next(e))}catch(e){i(e)}}function a(e){try{u(n.throw(e))}catch(e){i(e)}}function u(e){e.done?o(e.value):new r(function(t){t(e.value)}).then(s,a)}u((n=n.apply(e,t||[])).next())})}function c(e,t){function r(e){return function(t){return n([e,t])}}function n(r){if(o)throw new TypeError("Generator is already executing.");for(;u;)try{if(o=1,i&&(s=i[2&r[0]?"return":r[0]?"throw":"next"])&&!(s=s.call(i,r[1])).done)return s;switch(i=0,s&&(r=[0,s.value]),r[0]){case 0:case 1:s=r;break;case 4:return u.label++,{value:r[1],done:!1};case 5:u.label++,i=r[1],r=[0];continue;case 7:r=u.ops.pop(),u.trys.pop();continue;default:if(s=u.trys,!(s=s.length>0&&s[s.length-1])&&(6===r[0]||2===r[0])){u=0;continue}if(3===r[0]&&(!s||r[1]>s[0]&&r[1]<s[3])){u.label=r[1];break}if(6===r[0]&&u.label<s[1]){u.label=s[1],s=r;break}if(s&&u.label<s[2]){u.label=s[2],u.ops.push(r);break}s[2]&&u.ops.pop(),u.trys.pop();continue}r=t.call(e,u)}catch(e){r=[6,e],i=0}finally{o=s=0}if(5&r[0])throw r[1];return{value:r[0]?r[1]:void 0,done:!0}}var o,i,s,a,u={label:0,sent:function(){if(1&s[0])throw s[1];return s[1]},trys:[],ops:[]};return a={next:r(0),throw:r(1),return:r(2)},"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a}function l(e,t){for(var r in e)t.hasOwnProperty(r)||(t[r]=e[r])}function f(e){var t="function"==typeof Symbol&&e[Symbol.iterator],r=0;return t?t.call(e):{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}}}function p(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,o,i=r.call(e),s=[];try{for(;(void 0===t||t-- >0)&&!(n=i.next()).done;)s.push(n.value)}catch(e){o={error:e}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return s}function y(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(p(arguments[t]));return e}function d(e){return this instanceof d?(this.v=e,this):new d(e)}function v(e,t,r){function n(e){l[e]&&(c[e]=function(t){return new Promise(function(r,n){f.push([e,t,r,n])>1||o(e,t)})})}function o(e,t){try{i(l[e](t))}catch(e){u(f[0][3],e)}}function i(e){e.value instanceof d?Promise.resolve(e.value.v).then(s,a):u(f[0][2],e)}function s(e){o("next",e)}function a(e){o("throw",e)}function u(e,t){e(t),f.shift(),f.length&&o(f[0][0],f[0][1])}if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var c,l=r.apply(e,t||[]),f=[];return c={},n("next"),n("throw"),n("return"),c[Symbol.asyncIterator]=function(){return this},c}function h(e){function t(t,o){e[t]&&(r[t]=function(r){return(n=!n)?{value:d(e[t](r)),done:"return"===t}:o?o(r):r})}var r,n;return r={},t("next"),t("throw",function(e){throw e}),t("return"),r[Symbol.iterator]=function(){return this},r}function _(e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var t=e[Symbol.asyncIterator];return t?t.call(e):"function"==typeof f?f(e):e[Symbol.iterator]()}function g(e,t){return Object.defineProperty?Object.defineProperty(e,"raw",{value:t}):e.raw=t,e}Object.defineProperty(t,"__esModule",{value:!0}),t.__extends=n,r.d(t,"__assign",function(){return b}),t.__rest=o,t.__decorate=i,t.__param=s,t.__metadata=a,t.__awaiter=u,t.__generator=c,t.__exportStar=l,t.__values=f,t.__read=p,t.__spread=y,t.__await=d,t.__asyncGenerator=v,t.__asyncDelegator=h,t.__asyncValues=_,t.__makeTemplateObject=g;/*! *****************************************************************************
Copyright (c) Microsoft Corporation. All rights reserved.

@@ -15,2 +15,2 @@ Licensed under the Apache License, Version 2.0 (the "License"); you may not use

***************************************************************************** */
var m=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])},b=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++){t=arguments[r];for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o])}return e}},function(e,t,r){"use strict";function n(e,t){e[t]=e[t].replace(/([A-Z])/g,"-$1").toLowerCase()}Object.defineProperty(t,"__esModule",{value:!0}),t.kebabRules=n},function(e,t,r){"use strict";function n(e,t){var r=o.getVendorSettings(),n=e[t];if(i[n]){var s=e[t+1];i[n]&&(r.isWebkit&&e.push("-webkit-"+n,s),r.isMoz&&e.push("-moz-"+n,s),r.isMs&&e.push("-ms-"+n,s),r.isOpera&&e.push("-o-"+n,s))}}Object.defineProperty(t,"__esModule",{value:!0});var o=r(9),i={"user-select":1};t.prefixRules=n},function(e,t,r){"use strict";function n(){if(!i){var e="undefined"!=typeof document?document:void 0,t="undefined"!=typeof navigator?navigator:void 0,r=t?t.userAgent.toLowerCase():void 0;i=e?{isWebkit:!!(e&&"WebkitAppearance"in e.documentElement.style),isMoz:!!(r&&r.indexOf("firefox")>-1),isOpera:!!(r&&r.indexOf("opera")>-1),isMs:!(!t||!/rv:11.0/i.test(t.userAgent)&&!/Edge\/\d./i.test(navigator.userAgent))}:{isWebkit:!0,isMoz:!0,isOpera:!0,isMs:!0}}return i}function o(e){i=e}Object.defineProperty(t,"__esModule",{value:!0});var i;t.getVendorSettings=n,t.setVendorSettings=o},function(e,t,r){"use strict";function n(e,t){var r=e[t],n=e[t+1];if("number"==typeof n){var i=-1===o.indexOf(r)?"px":"";e[t+1]=""+n+i}}Object.defineProperty(t,"__esModule",{value:!0});var o=["column-count","font-weight","flex-basis","flex","flex-grow","flex-shrink","line-height","opacity","order","z-index","zoom"];t.provideUnits=n},function(e,t,r){"use strict";function n(e){f=e}function o(){return void 0===f&&(f="undefined"!=typeof document&&!!document.documentElement&&"rtl"===document.documentElement.getAttribute("dir")),f}function i(e,t){if(o()){var r=e[t],n=e[t+1];if(n.indexOf(l)>=0)e[t+1]=n.replace(/\s*(?:\/\*\s*)?\@noflip\b(?:\s*\*\/)?\s*?/g,"");else if(r.indexOf("left")>=0)e[t]=r.replace("left","right");else if(r.indexOf("right")>=0)e[t]=r.replace("right","left");else if(String(n).indexOf("left")>=0)e[t+1]=n.replace("left","right");else if(String(n).indexOf("right")>=0)e[t+1]=n.replace("right","left");else if(u[r])e[t]=u[r];else if(c[n])e[t+1]=c[n];else switch(r){case"margin":case"padding":e[t+1]=a(n);break;case"box-shadow":e[t+1]=s(n,0)}}}function s(e,t){var r=e.split(" "),n=parseInt(r[t],10);return r[0]=r[0].replace(String(n),String(-1*n)),r.join(" ")}function a(e){if("string"==typeof e){var t=e.split(" ");if(4===t.length)return t[0]+" "+t[3]+" "+t[2]+" "+t[1]}return e}Object.defineProperty(t,"__esModule",{value:!0});var u={left:"right",right:"left"},c={"w-resize":"e-resize","sw-resize":"se-resize","nw-resize":"ne-resize"},l="@noflip",f=o();t.setRTL=n,t.getRTL=o,t.rtlifyRules=i},function(e,t,r){"use strict";function n(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var r={},n={},a=e[0];if(a){e.length>1&&(a=i.concatStyleSets.apply(void 0,e));var u=[];for(var c in a)if(a.hasOwnProperty(c)){var l=a[c],f=o.extractStyleParts(l),p=f.classes,y=f.objects,d=s.styleToRegistration({displayName:c},y);u.push(d),d&&(n[c]=d.className,r[c]=p.concat([d.className]).join(" "))}for(var v=0,h=u;v<h.length;v++){var d=h[v];d&&s.applyRegistration(d,n)}}return r}Object.defineProperty(t,"__esModule",{value:!0});var o=r(2),i=r(3),s=r(1);t.mergeStyleSets=n},function(e,t,r){"use strict";function n(e){o.Stylesheet.getInstance().insertRule("@font-face{"+i.serializeRuleEntries(e)+"}")}Object.defineProperty(t,"__esModule",{value:!0});var o=r(0),i=r(1);t.fontFace=n},function(e,t,r){"use strict";function n(e){var t=o.Stylesheet.getInstance(),r=t.getClassName(),n=[];for(var s in e)e.hasOwnProperty(s)&&n.push(s,"{",i.serializeRuleEntries(e[s]),"}");var a=n.join("");return t.insertRule("@keyframes "+r+"{"+a+"}"),r}Object.defineProperty(t,"__esModule",{value:!0});var o=r(0),i=r(1);t.keyframes=n}]);
var m=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])},b=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++){t=arguments[r];for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o])}return e}},function(e,t,r){"use strict";function n(e,t){e[t]=e[t].replace(/([A-Z])/g,"-$1").toLowerCase()}Object.defineProperty(t,"__esModule",{value:!0}),t.kebabRules=n},function(e,t,r){"use strict";function n(e,t){var r=o.getVendorSettings(),n=e[t];if(i[n]){var s=e[t+1];i[n]&&(r.isWebkit&&e.push("-webkit-"+n,s),r.isMoz&&e.push("-moz-"+n,s),r.isMs&&e.push("-ms-"+n,s),r.isOpera&&e.push("-o-"+n,s))}}Object.defineProperty(t,"__esModule",{value:!0});var o=r(9),i={"user-select":1};t.prefixRules=n},function(e,t,r){"use strict";function n(){if(!i){var e="undefined"!=typeof document?document:void 0,t="undefined"!=typeof navigator?navigator:void 0,r=t?t.userAgent.toLowerCase():void 0;i=e?{isWebkit:!!(e&&"WebkitAppearance"in e.documentElement.style),isMoz:!!(r&&r.indexOf("firefox")>-1),isOpera:!!(r&&r.indexOf("opera")>-1),isMs:!(!t||!/rv:11.0/i.test(t.userAgent)&&!/Edge\/\d./i.test(navigator.userAgent))}:{isWebkit:!0,isMoz:!0,isOpera:!0,isMs:!0}}return i}function o(e){i=e}Object.defineProperty(t,"__esModule",{value:!0});var i;t.getVendorSettings=n,t.setVendorSettings=o},function(e,t,r){"use strict";function n(e,t){var r=e[t],n=e[t+1];if("number"==typeof n){var i=-1===o.indexOf(r)?"px":"";e[t+1]=""+n+i}}Object.defineProperty(t,"__esModule",{value:!0});var o=["column-count","font-weight","flex-basis","flex","flex-grow","flex-shrink","opacity","order","z-index","zoom"];t.provideUnits=n},function(e,t,r){"use strict";function n(e){y=e}function o(){return void 0===y&&(y="undefined"!=typeof document&&!!document.documentElement&&"rtl"===document.documentElement.getAttribute("dir")),y}function i(e,t){if(o()){var r=e[t];if(!r)return;var n=e[t+1];if("string"==typeof n&&n.indexOf(l)>=0)e[t+1]=n.replace(/\s*(?:\/\*\s*)?\@noflip\b(?:\s*\*\/)?\s*?/g,"");else if(r.indexOf(u)>=0)e[t]=r.replace(u,c);else if(r.indexOf(c)>=0)e[t]=r.replace(c,u);else if(String(n).indexOf(u)>=0)e[t+1]=n.replace(u,c);else if(String(n).indexOf(c)>=0)e[t+1]=n.replace(c,u);else if(f[r])e[t]=f[r];else if(p[n])e[t+1]=p[n];else switch(r){case"margin":case"padding":e[t+1]=a(n);break;case"box-shadow":e[t+1]=s(n,0)}}}function s(e,t){var r=e.split(" "),n=parseInt(r[t],10);return r[0]=r[0].replace(String(n),String(-1*n)),r.join(" ")}function a(e){if("string"==typeof e){var t=e.split(" ");if(4===t.length)return t[0]+" "+t[3]+" "+t[2]+" "+t[1]}return e}Object.defineProperty(t,"__esModule",{value:!0});var u="left",c="right",l="@noflip",f=(d={},d[u]=c,d[c]=u,d),p={"w-resize":"e-resize","sw-resize":"se-resize","nw-resize":"ne-resize"},y=o();t.setRTL=n,t.getRTL=o,t.rtlifyRules=i;var d},function(e,t,r){"use strict";function n(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var r={},n={},a=e[0];if(a){e.length>1&&(a=i.concatStyleSets.apply(void 0,e));var u=[];for(var c in a)if(a.hasOwnProperty(c)){var l=a[c],f=o.extractStyleParts(l),p=f.classes,y=f.objects,d=s.styleToRegistration({displayName:c},y);u.push(d),d&&(n[c]=d.className,r[c]=p.concat([d.className]).join(" "))}for(var v=0,h=u;v<h.length;v++){var d=h[v];d&&s.applyRegistration(d,n)}}return r}Object.defineProperty(t,"__esModule",{value:!0});var o=r(2),i=r(3),s=r(1);t.mergeStyleSets=n},function(e,t,r){"use strict";function n(e){o.Stylesheet.getInstance().insertRule("@font-face{"+i.serializeRuleEntries(e)+"}")}Object.defineProperty(t,"__esModule",{value:!0});var o=r(0),i=r(1);t.fontFace=n},function(e,t,r){"use strict";function n(e){var t=o.Stylesheet.getInstance(),r=t.getClassName(),n=[];for(var s in e)e.hasOwnProperty(s)&&n.push(s,"{",i.serializeRuleEntries(e[s]),"}");var a=n.join("");return t.insertRule("@keyframes "+r+"{"+a+"}"),r}Object.defineProperty(t,"__esModule",{value:!0});var o=r(0),i=r(1);t.keyframes=n}]);

@@ -11,3 +11,2 @@ define(["require", "exports"], function (require, exports) {

'flex-shrink',
'line-height',
'opacity',

@@ -14,0 +13,0 @@ 'order',

@@ -0,3 +1,13 @@

/**
* Sets the current RTL value.
*/
export declare function setRTL(isRTL: boolean): void;
/**
* Gets the current RTL value.
*/
export declare function getRTL(): boolean;
/**
* RTLifies the rulePair in the array at the current index. This mutates the array for performance
* reasons.
*/
export declare function rtlifyRules(rulePairs: (string | number)[], index: number): void;
define(["require", "exports"], function (require, exports) {
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
var _nameReplacements = {
'left': 'right',
'right': 'left'
};
var _valueReplacements = {
var LEFT = 'left';
var RIGHT = 'right';
var NO_FLIP = '@noflip';
var NAME_REPLACEMENTS = (_a = {},
_a[LEFT] = RIGHT,
_a[RIGHT] = LEFT,
_a);
var VALUE_REPLACEMENTS = {
'w-resize': 'e-resize',

@@ -13,4 +16,6 @@ 'sw-resize': 'se-resize',

};
var NO_FLIP = '@noflip';
var _rtl = getRTL();
/**
* Sets the current RTL value.
*/
function setRTL(isRTL) {

@@ -20,2 +25,5 @@ _rtl = isRTL;

exports.setRTL = setRTL;
/**
* Gets the current RTL value.
*/
function getRTL() {

@@ -30,26 +38,33 @@ if (_rtl === undefined) {

exports.getRTL = getRTL;
/**
* RTLifies the rulePair in the array at the current index. This mutates the array for performance
* reasons.
*/
function rtlifyRules(rulePairs, index) {
if (getRTL()) {
var name_1 = rulePairs[index];
if (!name_1) {
return;
}
var value = rulePairs[index + 1];
if (value.indexOf(NO_FLIP) >= 0) {
if (typeof value === 'string' && value.indexOf(NO_FLIP) >= 0) {
rulePairs[index + 1] = value.replace(/\s*(?:\/\*\s*)?\@noflip\b(?:\s*\*\/)?\s*?/g, '');
}
else if (name_1.indexOf('left') >= 0) {
rulePairs[index] = name_1.replace('left', 'right');
else if (name_1.indexOf(LEFT) >= 0) {
rulePairs[index] = name_1.replace(LEFT, RIGHT);
}
else if (name_1.indexOf('right') >= 0) {
rulePairs[index] = name_1.replace('right', 'left');
else if (name_1.indexOf(RIGHT) >= 0) {
rulePairs[index] = name_1.replace(RIGHT, LEFT);
}
else if (String(value).indexOf('left') >= 0) {
rulePairs[index + 1] = value.replace('left', 'right');
else if (String(value).indexOf(LEFT) >= 0) {
rulePairs[index + 1] = value.replace(LEFT, RIGHT);
}
else if (String(value).indexOf('right') >= 0) {
rulePairs[index + 1] = value.replace('right', 'left');
else if (String(value).indexOf(RIGHT) >= 0) {
rulePairs[index + 1] = value.replace(RIGHT, LEFT);
}
else if (_nameReplacements[name_1]) {
rulePairs[index] = _nameReplacements[name_1];
else if (NAME_REPLACEMENTS[name_1]) {
rulePairs[index] = NAME_REPLACEMENTS[name_1];
}
else if (_valueReplacements[value]) {
rulePairs[index + 1] = _valueReplacements[value];
else if (VALUE_REPLACEMENTS[value]) {
rulePairs[index + 1] = VALUE_REPLACEMENTS[value];
}

@@ -70,2 +85,5 @@ else {

exports.rtlifyRules = rtlifyRules;
/**
* Given a string value in a space delimited format (e.g. "1 2 3 4"), negates a particular value.
*/
function negateNum(value, partIndex) {

@@ -77,2 +95,5 @@ var parts = value.split(' ');

}
/**
* Given a string quad, flips the left and right values.
*/
function flipQuad(value) {

@@ -87,3 +108,4 @@ if (typeof value === 'string') {

}
var _a;
});
//# sourceMappingURL=rtlifyRules.js.map

@@ -8,3 +8,2 @@ var NON_PIXEL_NUMBER_PROPS = [

'flex-shrink',
'line-height',
'opacity',

@@ -11,0 +10,0 @@ 'order',

@@ -0,3 +1,13 @@

/**
* Sets the current RTL value.
*/
export declare function setRTL(isRTL: boolean): void;
/**
* Gets the current RTL value.
*/
export declare function getRTL(): boolean;
/**
* RTLifies the rulePair in the array at the current index. This mutates the array for performance
* reasons.
*/
export declare function rtlifyRules(rulePairs: (string | number)[], index: number): void;

@@ -1,6 +0,9 @@

var _nameReplacements = {
'left': 'right',
'right': 'left'
};
var _valueReplacements = {
var LEFT = 'left';
var RIGHT = 'right';
var NO_FLIP = '@noflip';
var NAME_REPLACEMENTS = (_a = {},
_a[LEFT] = RIGHT,
_a[RIGHT] = LEFT,
_a);
var VALUE_REPLACEMENTS = {
'w-resize': 'e-resize',

@@ -10,7 +13,12 @@ 'sw-resize': 'se-resize',

};
var NO_FLIP = '@noflip';
var _rtl = getRTL();
/**
* Sets the current RTL value.
*/
export function setRTL(isRTL) {
_rtl = isRTL;
}
/**
* Gets the current RTL value.
*/
export function getRTL() {

@@ -24,26 +32,33 @@ if (_rtl === undefined) {

}
/**
* RTLifies the rulePair in the array at the current index. This mutates the array for performance
* reasons.
*/
export function rtlifyRules(rulePairs, index) {
if (getRTL()) {
var name_1 = rulePairs[index];
if (!name_1) {
return;
}
var value = rulePairs[index + 1];
if (value.indexOf(NO_FLIP) >= 0) {
if (typeof value === 'string' && value.indexOf(NO_FLIP) >= 0) {
rulePairs[index + 1] = value.replace(/\s*(?:\/\*\s*)?\@noflip\b(?:\s*\*\/)?\s*?/g, '');
}
else if (name_1.indexOf('left') >= 0) {
rulePairs[index] = name_1.replace('left', 'right');
else if (name_1.indexOf(LEFT) >= 0) {
rulePairs[index] = name_1.replace(LEFT, RIGHT);
}
else if (name_1.indexOf('right') >= 0) {
rulePairs[index] = name_1.replace('right', 'left');
else if (name_1.indexOf(RIGHT) >= 0) {
rulePairs[index] = name_1.replace(RIGHT, LEFT);
}
else if (String(value).indexOf('left') >= 0) {
rulePairs[index + 1] = value.replace('left', 'right');
else if (String(value).indexOf(LEFT) >= 0) {
rulePairs[index + 1] = value.replace(LEFT, RIGHT);
}
else if (String(value).indexOf('right') >= 0) {
rulePairs[index + 1] = value.replace('right', 'left');
else if (String(value).indexOf(RIGHT) >= 0) {
rulePairs[index + 1] = value.replace(RIGHT, LEFT);
}
else if (_nameReplacements[name_1]) {
rulePairs[index] = _nameReplacements[name_1];
else if (NAME_REPLACEMENTS[name_1]) {
rulePairs[index] = NAME_REPLACEMENTS[name_1];
}
else if (_valueReplacements[value]) {
rulePairs[index + 1] = _valueReplacements[value];
else if (VALUE_REPLACEMENTS[value]) {
rulePairs[index + 1] = VALUE_REPLACEMENTS[value];
}

@@ -63,2 +78,5 @@ else {

}
/**
* Given a string value in a space delimited format (e.g. "1 2 3 4"), negates a particular value.
*/
function negateNum(value, partIndex) {

@@ -70,2 +88,5 @@ var parts = value.split(' ');

}
/**
* Given a string quad, flips the left and right values.
*/
function flipQuad(value) {

@@ -80,2 +101,3 @@ if (typeof value === 'string') {

}
var _a;
//# sourceMappingURL=rtlifyRules.js.map

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

'flex-shrink',
'line-height',
'opacity',

@@ -13,0 +12,0 @@ 'order',

@@ -0,3 +1,13 @@

/**
* Sets the current RTL value.
*/
export declare function setRTL(isRTL: boolean): void;
/**
* Gets the current RTL value.
*/
export declare function getRTL(): boolean;
/**
* RTLifies the rulePair in the array at the current index. This mutates the array for performance
* reasons.
*/
export declare function rtlifyRules(rulePairs: (string | number)[], index: number): void;
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
var _nameReplacements = {
'left': 'right',
'right': 'left'
};
var _valueReplacements = {
var LEFT = 'left';
var RIGHT = 'right';
var NO_FLIP = '@noflip';
var NAME_REPLACEMENTS = (_a = {},
_a[LEFT] = RIGHT,
_a[RIGHT] = LEFT,
_a);
var VALUE_REPLACEMENTS = {
'w-resize': 'e-resize',

@@ -12,4 +15,6 @@ 'sw-resize': 'se-resize',

};
var NO_FLIP = '@noflip';
var _rtl = getRTL();
/**
* Sets the current RTL value.
*/
function setRTL(isRTL) {

@@ -19,2 +24,5 @@ _rtl = isRTL;

exports.setRTL = setRTL;
/**
* Gets the current RTL value.
*/
function getRTL() {

@@ -29,26 +37,33 @@ if (_rtl === undefined) {

exports.getRTL = getRTL;
/**
* RTLifies the rulePair in the array at the current index. This mutates the array for performance
* reasons.
*/
function rtlifyRules(rulePairs, index) {
if (getRTL()) {
var name_1 = rulePairs[index];
if (!name_1) {
return;
}
var value = rulePairs[index + 1];
if (value.indexOf(NO_FLIP) >= 0) {
if (typeof value === 'string' && value.indexOf(NO_FLIP) >= 0) {
rulePairs[index + 1] = value.replace(/\s*(?:\/\*\s*)?\@noflip\b(?:\s*\*\/)?\s*?/g, '');
}
else if (name_1.indexOf('left') >= 0) {
rulePairs[index] = name_1.replace('left', 'right');
else if (name_1.indexOf(LEFT) >= 0) {
rulePairs[index] = name_1.replace(LEFT, RIGHT);
}
else if (name_1.indexOf('right') >= 0) {
rulePairs[index] = name_1.replace('right', 'left');
else if (name_1.indexOf(RIGHT) >= 0) {
rulePairs[index] = name_1.replace(RIGHT, LEFT);
}
else if (String(value).indexOf('left') >= 0) {
rulePairs[index + 1] = value.replace('left', 'right');
else if (String(value).indexOf(LEFT) >= 0) {
rulePairs[index + 1] = value.replace(LEFT, RIGHT);
}
else if (String(value).indexOf('right') >= 0) {
rulePairs[index + 1] = value.replace('right', 'left');
else if (String(value).indexOf(RIGHT) >= 0) {
rulePairs[index + 1] = value.replace(RIGHT, LEFT);
}
else if (_nameReplacements[name_1]) {
rulePairs[index] = _nameReplacements[name_1];
else if (NAME_REPLACEMENTS[name_1]) {
rulePairs[index] = NAME_REPLACEMENTS[name_1];
}
else if (_valueReplacements[value]) {
rulePairs[index + 1] = _valueReplacements[value];
else if (VALUE_REPLACEMENTS[value]) {
rulePairs[index + 1] = VALUE_REPLACEMENTS[value];
}

@@ -69,2 +84,5 @@ else {

exports.rtlifyRules = rtlifyRules;
/**
* Given a string value in a space delimited format (e.g. "1 2 3 4"), negates a particular value.
*/
function negateNum(value, partIndex) {

@@ -76,2 +94,5 @@ var parts = value.split(' ');

}
/**
* Given a string quad, flips the left and right values.
*/
function flipQuad(value) {

@@ -86,2 +107,3 @@ if (typeof value === 'string') {

}
var _a;
//# sourceMappingURL=rtlifyRules.js.map

@@ -5,4 +5,4 @@ {

"packages/merge-styles/.npmrc": "825c83e09df4dad076d980d1236c532d689edf75",
"packages/merge-styles/CHANGELOG.json": "43bf929efe821896c1410f39aed6bbf12af93a5b",
"packages/merge-styles/CHANGELOG.md": "93b7272d36580247658dd9fcae8c813709e8d2a2",
"packages/merge-styles/CHANGELOG.json": "f60c89511b02305cf966998ed4fd51171140f81c",
"packages/merge-styles/CHANGELOG.md": "ee2b9d9ae83d3837eb1c549b0eea726d3f4154b5",
"packages/merge-styles/LICENSE": "310f6231e35c591f17680ffd2f5d4daea754e1f6",

@@ -13,3 +13,3 @@ "packages/merge-styles/README.md": "7cceed7041b1629db1306aa064cf6fe2ba73bb33",

"packages/merge-styles/jest.config.js": "a92c71220a900a5366be5af2cb98d273f3b697d4",
"packages/merge-styles/package.json": "2990935f87fedbb1cac8fd502c0656543731d624",
"packages/merge-styles/package.json": "ff80814be7ee23f5f929ea2a967cf49fcdf1f87c",
"packages/merge-styles/src/IRawStyleBase.ts": "a1e8ce30117a25ec5d89fa90d23938a57278a726",

@@ -42,6 +42,6 @@ "packages/merge-styles/src/IStyle.ts": "770aa641a178f4ade3e75c36c663919cb65d00f9",

"packages/merge-styles/src/transforms/prefixRules.ts": "109fe3b089d875f8596a7942e7ce899000565883",
"packages/merge-styles/src/transforms/provideUnits.test.ts": "faec99189df8baace954722b5c02ed79a5374d61",
"packages/merge-styles/src/transforms/provideUnits.ts": "44ed365d77a93b14984f3488806825aad9f1ebad",
"packages/merge-styles/src/transforms/rtlifyRules.test.ts": "74d9f87123a9a1825c3d6423be17d03df74dde38",
"packages/merge-styles/src/transforms/rtlifyRules.ts": "af57b70ffc5285378615d8829c1263d6d35f261f",
"packages/merge-styles/src/transforms/provideUnits.test.ts": "e45391fc0d00945595d721871991fa8d595d1f25",
"packages/merge-styles/src/transforms/provideUnits.ts": "2d2fe1e0189883bc937c9e75be2f1c91a1e603ad",
"packages/merge-styles/src/transforms/rtlifyRules.test.ts": "cff34694b45aa1f2bfc9ee2c8c708e8a90eb3705",
"packages/merge-styles/src/transforms/rtlifyRules.ts": "211cf60772dea3fd3bf6f8ddb217676025ecff63",
"packages/merge-styles/tsconfig.json": "93c5fccb2af87cae0d9b3b90a9c308e5e140934a",

@@ -48,0 +48,0 @@ "packages/merge-styles/tslint.json": "009d06e3cf4477b350209f53d65267f3c51ae8e5",

{
"name": "@uifabric/merge-styles",
"version": "5.11.1",
"version": "5.11.2",
"description": "Office UI Fabric style loading utilities.",

@@ -5,0 +5,0 @@ "main": "lib/index.js",

Sorry, the diff of this file is not supported yet

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

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