@fluentui/react-compose
Advanced tools
Comparing version 0.5.1 to 0.6.0
@@ -5,3 +5,18 @@ { | ||
{ | ||
"date": "Tue, 26 May 2020 12:46:18 GMT", | ||
"date": "Wed, 27 May 2020 12:36:12 GMT", | ||
"tag": "@fluentui/react-compose_v0.6.0", | ||
"version": "0.6.0", | ||
"comments": { | ||
"minor": [ | ||
{ | ||
"comment": "Adding createClassResolver to help with auto resolving class names given class map and props.", | ||
"author": "dzearing@microsoft.com", | ||
"commit": "3d91f5bff251e25e9806e9da29def9811a997c43", | ||
"package": "@fluentui/react-compose" | ||
} | ||
] | ||
} | ||
}, | ||
{ | ||
"date": "Tue, 26 May 2020 12:46:29 GMT", | ||
"tag": "@fluentui/react-compose_v0.5.1", | ||
@@ -8,0 +23,0 @@ "version": "0.5.1", |
# Change Log - @fluentui/react-compose | ||
This log was last generated on Tue, 26 May 2020 12:46:18 GMT and should not be manually modified. | ||
This log was last generated on Wed, 27 May 2020 12:36:12 GMT and should not be manually modified. | ||
<!-- Start content --> | ||
## [0.6.0](https://github.com/microsoft/fluentui/tree/@fluentui/react-compose_v0.6.0) | ||
Wed, 27 May 2020 12:36:12 GMT | ||
[Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-compose_v0.5.1..@fluentui/react-compose_v0.6.0) | ||
### Minor changes | ||
- Adding createClassResolver to help with auto resolving class names given class map and props. ([PR #13330](https://github.com/microsoft/fluentui/pull/13330) by dzearing@microsoft.com) | ||
## [0.5.1](https://github.com/microsoft/fluentui/tree/@fluentui/react-compose_v0.5.1) | ||
Tue, 26 May 2020 12:46:18 GMT | ||
Tue, 26 May 2020 12:46:29 GMT | ||
[Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-compose_v0.5.0..@fluentui/react-compose_v0.5.1) | ||
@@ -11,0 +20,0 @@ |
@@ -21,3 +21,3 @@ { | ||
"canonicalReference": "@fluentui/react-compose!ClassDictionary:type", | ||
"docComment": "", | ||
"docComment": "/**\n * Generic set of module to class name map.\n */\n", | ||
"excerptTokens": [ | ||
@@ -29,4 +29,9 @@ { | ||
{ | ||
"kind": "Reference", | ||
"text": "Record", | ||
"canonicalReference": "!Record:type" | ||
}, | ||
{ | ||
"kind": "Content", | ||
"text": "{\n [key: string]: string;\n}" | ||
"text": "<string, string>" | ||
}, | ||
@@ -42,3 +47,3 @@ { | ||
"startIndex": 1, | ||
"endIndex": 2 | ||
"endIndex": 3 | ||
} | ||
@@ -907,3 +912,90 @@ }, | ||
{ | ||
"kind": "Variable", | ||
"canonicalReference": "@fluentui/react-compose!createClassResolver:var", | ||
"docComment": "/**\n * `createClassResolver` is a factory function which creates a state to classmap resolver for slot specific class names. It can be used in conjunction with the `compose` option `classes` to inject css modules without writing cx(...) logic manually distributing classnames.\n *\n * Class names which map to slots are automatically distributed to correct slot props.\n *\n * Class names with an underscore are interpretted as enum matchable classes. For example, the class \"size_large\" would be applied to the `root` slot when the component's state contains a prop `size` with a value `large`.\n *\n * Remaining class names would be interpretted as modifiers, applied to the `root` slot when the component `state` contains a truthy matching prop name.\n */\n", | ||
"excerptTokens": [ | ||
{ | ||
"kind": "Content", | ||
"text": "createClassResolver: " | ||
}, | ||
{ | ||
"kind": "Content", | ||
"text": "(classes: " | ||
}, | ||
{ | ||
"kind": "Reference", | ||
"text": "Record", | ||
"canonicalReference": "!Record:type" | ||
}, | ||
{ | ||
"kind": "Content", | ||
"text": "<string, string>) => (state: " | ||
}, | ||
{ | ||
"kind": "Reference", | ||
"text": "Record", | ||
"canonicalReference": "!Record:type" | ||
}, | ||
{ | ||
"kind": "Content", | ||
"text": "<string, any>, slots: " | ||
}, | ||
{ | ||
"kind": "Reference", | ||
"text": "Record", | ||
"canonicalReference": "!Record:type" | ||
}, | ||
{ | ||
"kind": "Content", | ||
"text": "<string, any>) => " | ||
}, | ||
{ | ||
"kind": "Reference", | ||
"text": "Record", | ||
"canonicalReference": "!Record:type" | ||
}, | ||
{ | ||
"kind": "Content", | ||
"text": "<string, string>" | ||
} | ||
], | ||
"releaseTag": "Public", | ||
"name": "createClassResolver", | ||
"variableTypeTokenRange": { | ||
"startIndex": 1, | ||
"endIndex": 10 | ||
} | ||
}, | ||
{ | ||
"kind": "TypeAlias", | ||
"canonicalReference": "@fluentui/react-compose!GenericDictionary:type", | ||
"docComment": "/**\n * Generic name to any dictionary.\n */\n", | ||
"excerptTokens": [ | ||
{ | ||
"kind": "Content", | ||
"text": "export declare type GenericDictionary = " | ||
}, | ||
{ | ||
"kind": "Reference", | ||
"text": "Record", | ||
"canonicalReference": "!Record:type" | ||
}, | ||
{ | ||
"kind": "Content", | ||
"text": "<string, any>" | ||
}, | ||
{ | ||
"kind": "Content", | ||
"text": ";" | ||
} | ||
], | ||
"releaseTag": "Public", | ||
"name": "GenericDictionary", | ||
"typeTokenRange": { | ||
"startIndex": 1, | ||
"endIndex": 3 | ||
} | ||
}, | ||
{ | ||
"kind": "TypeAlias", | ||
"canonicalReference": "@fluentui/react-compose!Input:type", | ||
@@ -910,0 +1002,0 @@ "docComment": "", |
import * as React from 'react'; | ||
export declare type ClassDictionary = { | ||
[key: string]: string; | ||
}; | ||
/** | ||
* Generic set of module to class name map. | ||
*/ | ||
export declare type ClassDictionary = Record<string, string>; | ||
@@ -57,2 +58,23 @@ export declare interface ComponentWithAs<E extends React.ElementType = 'div', P = {}> extends React.FunctionComponent { | ||
/** | ||
* `createClassResolver` is a factory function which creates a state to classmap resolver for | ||
* slot specific class names. It can be used in conjunction with the `compose` option `classes` to | ||
* inject css modules without writing cx(...) logic manually distributing classnames. | ||
* | ||
* Class names which map to slots are automatically distributed to correct slot props. | ||
* | ||
* Class names with an underscore are interpretted as enum matchable classes. For example, | ||
* the class "size_large" would be applied to the `root` slot when the component's state contains | ||
* a prop `size` with a value `large`. | ||
* | ||
* Remaining class names would be interpretted as modifiers, applied to the `root` slot when | ||
* the component `state` contains a truthy matching prop name. | ||
*/ | ||
export declare const createClassResolver: (classes: Record<string, string>) => (state: Record<string, any>, slots: Record<string, any>) => Record<string, string>; | ||
/** | ||
* Generic name to any dictionary. | ||
*/ | ||
export declare type GenericDictionary = Record<string, any>; | ||
export declare type Input<T extends React.ElementType = 'div', P = {}> = InputComposeComponent<P> | ComposeRenderFunction<T, P & { | ||
@@ -59,0 +81,0 @@ as?: React.ElementType; |
@@ -660,2 +660,70 @@ var FluentCompose = | ||
/***/ "./lib/createClassResolver.js": | ||
/***/ (function(module, __webpack_exports__, __webpack_require__) { | ||
"use strict"; | ||
__webpack_require__.r(__webpack_exports__); | ||
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "createClassResolver", function() { return createClassResolver; }); | ||
/** | ||
* `createClassResolver` is a factory function which creates a state to classmap resolver for | ||
* slot specific class names. It can be used in conjunction with the `compose` option `classes` to | ||
* inject css modules without writing cx(...) logic manually distributing classnames. | ||
* | ||
* Class names which map to slots are automatically distributed to correct slot props. | ||
* | ||
* Class names with an underscore are interpretted as enum matchable classes. For example, | ||
* the class "size_large" would be applied to the `root` slot when the component's state contains | ||
* a prop `size` with a value `large`. | ||
* | ||
* Remaining class names would be interpretted as modifiers, applied to the `root` slot when | ||
* the component `state` contains a truthy matching prop name. | ||
*/ | ||
var createClassResolver = function (classes) { return function (state, slots) { | ||
var classMap = {}; | ||
var modifiers = []; | ||
// Add the default className to root | ||
addClassTo(classMap, 'root', state.className); | ||
if (classes) { | ||
// Iterate through classes | ||
Object.keys(classes).forEach(function (key) { | ||
var classValue = classes[key]; | ||
if (classValue) { | ||
// If the class is named the same as a slot, add it to the slot. | ||
if (slots.hasOwnProperty(key)) { | ||
addClassTo(classMap, key, classValue); | ||
} | ||
else if (key.indexOf('_') >= 0) { | ||
// The class is an enum value. Add if the prop exists and matches. | ||
var parts = key.split('_'); | ||
var enumName = parts[0]; | ||
var enumValue = parts[1]; | ||
state[enumName] === enumValue && modifiers.push(classValue); | ||
} | ||
else { | ||
state[key] && modifiers.push(classValue); | ||
} | ||
} | ||
}); | ||
// Convert the className arrays to strings. | ||
Object.keys(classMap).forEach(function (key) { return (classMap[key] = classMap[key].concat(modifiers).join(' ')); }); | ||
} | ||
return classMap; | ||
}; }; | ||
/** | ||
* Helper function to update slot arrays within a class map. | ||
*/ | ||
function addClassTo(slotProps, slotName, className) { | ||
if (className) { | ||
if (!slotProps[slotName]) { | ||
slotProps[slotName] = [className]; | ||
} | ||
else { | ||
slotProps[slotName].push(className); | ||
} | ||
} | ||
} | ||
/***/ }), | ||
/***/ "./lib/index.js": | ||
@@ -669,5 +737,9 @@ /***/ (function(module, __webpack_exports__, __webpack_require__) { | ||
/* harmony import */ var _createClassResolver__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("./lib/createClassResolver.js"); | ||
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "createClassResolver", function() { return _createClassResolver__WEBPACK_IMPORTED_MODULE_1__["createClassResolver"]; }); | ||
/***/ }), | ||
@@ -674,0 +746,0 @@ |
@@ -14,3 +14,3 @@ var FluentCompose=function(e){var r={};function o(t){if(r[t])return r[t].exports;var n=r[t]={i:t,l:!1,exports:{}};return e[t].call(n.exports,n,n.exports,o),n.l=!0,n.exports}return o.m=e,o.c=r,o.d=function(e,r,t){o.o(e,r)||Object.defineProperty(e,r,{enumerable:!0,get:t})},o.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},o.t=function(e,r){if(1&r&&(e=o(e)),8&r)return e;if(4&r&&"object"==typeof e&&e&&e.__esModule)return e;var t=Object.create(null);if(o.r(t),Object.defineProperty(t,"default",{enumerable:!0,value:e}),2&r&&"string"!=typeof e)for(var n in e)o.d(t,n,function(r){return e[r]}.bind(null,n));return t},o.n=function(e){var r=e&&e.__esModule?function(){return e.default}:function(){return e};return o.d(r,"a",r),r},o.o=function(e,r){return Object.prototype.hasOwnProperty.call(e,r)},o.p="",o(o.s=4)}([function(e,r){e.exports=React},function(e,r,o){"use strict";e.exports=o(3)},function(e,r,o){var t; | ||
* LICENSE file in the root directory of this source tree. | ||
*/Object.defineProperty(r,"__esModule",{value:!0});var t="function"==typeof Symbol&&Symbol.for,n=t?Symbol.for("react.element"):60103,s=t?Symbol.for("react.portal"):60106,a=t?Symbol.for("react.fragment"):60107,f=t?Symbol.for("react.strict_mode"):60108,i=t?Symbol.for("react.profiler"):60114,l=t?Symbol.for("react.provider"):60109,u=t?Symbol.for("react.context"):60110,c=t?Symbol.for("react.async_mode"):60111,p=t?Symbol.for("react.concurrent_mode"):60111,y=t?Symbol.for("react.forward_ref"):60112,d=t?Symbol.for("react.suspense"):60113,m=t?Symbol.for("react.suspense_list"):60120,v=t?Symbol.for("react.memo"):60115,P=t?Symbol.for("react.lazy"):60116,S=t?Symbol.for("react.fundamental"):60117,b=t?Symbol.for("react.responder"):60118,h=t?Symbol.for("react.scope"):60119;function g(e){if("object"==typeof e&&null!==e){var r=e.$$typeof;switch(r){case n:switch(e=e.type){case c:case p:case a:case i:case f:case d:return e;default:switch(e=e&&e.$$typeof){case u:case y:case P:case v:case l:return e;default:return r}}case s:return r}}}function C(e){return g(e)===p}r.typeOf=g,r.AsyncMode=c,r.ConcurrentMode=p,r.ContextConsumer=u,r.ContextProvider=l,r.Element=n,r.ForwardRef=y,r.Fragment=a,r.Lazy=P,r.Memo=v,r.Portal=s,r.Profiler=i,r.StrictMode=f,r.Suspense=d,r.isValidElementType=function(e){return"string"==typeof e||"function"==typeof e||e===a||e===p||e===i||e===f||e===d||e===m||"object"==typeof e&&null!==e&&(e.$$typeof===P||e.$$typeof===v||e.$$typeof===l||e.$$typeof===u||e.$$typeof===y||e.$$typeof===S||e.$$typeof===b||e.$$typeof===h)},r.isAsyncMode=function(e){return C(e)||g(e)===c},r.isConcurrentMode=C,r.isContextConsumer=function(e){return g(e)===u},r.isContextProvider=function(e){return g(e)===l},r.isElement=function(e){return"object"==typeof e&&null!==e&&e.$$typeof===n},r.isForwardRef=function(e){return g(e)===y},r.isFragment=function(e){return g(e)===a},r.isLazy=function(e){return g(e)===P},r.isMemo=function(e){return g(e)===v},r.isPortal=function(e){return g(e)===s},r.isProfiler=function(e){return g(e)===i},r.isStrictMode=function(e){return g(e)===f},r.isSuspense=function(e){return g(e)===d}},function(e,r,o){"use strict";o.r(r),o.d(r,"compose",(function(){return p}));var t=function(){return(t=Object.assign||function(e){for(var r,o=1,t=arguments.length;o<t;o++)for(var n in r=arguments[o])Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n]);return e}).apply(this,arguments)};function n(){for(var e=0,r=0,o=arguments.length;r<o;r++)e+=arguments[r].length;var t=Array(e),n=0;for(r=0;r<o;r++)for(var s=arguments[r],a=0,f=s.length;a<f;a++,n++)t[n]=s[a];return t}var s=o(0),a=o(1),f=o(2),i=o.n(f),l=function(){for(var e=[],r=0;r<arguments.length;r++)e[r]=arguments[r];for(var o={},t=function(e){e&&Object.keys(e).forEach((function(r){o[r]=o[r]||[],o[r].push(e[r])}))},n=0,s=e;n<s.length;n++){var a=s[n];t(a)}return Object.keys(o).forEach((function(e){o[e]=i.a.apply(void 0,o[e])})),o};function u(e,r){return e.overrideStyles?[e.displayName].filter(Boolean):e.displayName?r.displayNames.concat(e.displayName):r.displayNames}var c={className:"",classes:{},displayName:"",displayNames:[],mapPropsToStylesPropsChain:[],render:function(){return null},handledProps:[],overrideStyles:!1,slots:{__self:function(){return null}},mapPropsToSlotPropsChain:[],resolveSlotProps:function(){return{}},shorthandConfig:{}};var p=function(e,r){void 0===r&&(r={});var o=function(e,r,o){void 0===o&&(o=c);var s=r.mapPropsToSlotProps?n(o.mapPropsToSlotPropsChain,[r.mapPropsToSlotProps]):o.mapPropsToSlotPropsChain;return{className:r.className||o.className,classes:l(o.classes,r.classes),displayName:r.displayName||o.displayName,displayNames:u(r,o),mapPropsToStylesPropsChain:r.mapPropsToStylesProps?n(o.mapPropsToStylesPropsChain,[r.mapPropsToStylesProps]):o.mapPropsToStylesPropsChain,render:"function"==typeof e?e:o.render,handledProps:n(o.handledProps,r.handledProps||[]),overrideStyles:r.overrideStyles||!1,slots:t(t({},o.slots),r.slots),mapPropsToSlotPropsChain:s,resolveSlotProps:function(e){return s.reduce((function(r,o){var s=t({},o(e)),a=n(Object.keys(r),Object.keys(s)),f={};return a.forEach((function(e){f[e]||(f[e]=t(t({},r[e]),s[e]))})),f}),{})},shorthandConfig:t(t({},o.shorthandConfig),r.shorthandConfig)}}(e,r,function(e){return e.$$typeof===a.ForwardRef&&!!e.fluentComposeConfig}(e)?e.fluentComposeConfig:void 0),f=s.forwardRef((function(e,r){return o.render(e,r,t(t({},o),{slots:t(t({},o.slots),{__self:f})}))}));return f.displayName=o.displayName,e.defaultProps&&(f.defaultProps=e.defaultProps),f.fluentComposeConfig=o,f}}]); | ||
*/Object.defineProperty(r,"__esModule",{value:!0});var t="function"==typeof Symbol&&Symbol.for,n=t?Symbol.for("react.element"):60103,s=t?Symbol.for("react.portal"):60106,a=t?Symbol.for("react.fragment"):60107,f=t?Symbol.for("react.strict_mode"):60108,i=t?Symbol.for("react.profiler"):60114,u=t?Symbol.for("react.provider"):60109,l=t?Symbol.for("react.context"):60110,c=t?Symbol.for("react.async_mode"):60111,p=t?Symbol.for("react.concurrent_mode"):60111,y=t?Symbol.for("react.forward_ref"):60112,d=t?Symbol.for("react.suspense"):60113,m=t?Symbol.for("react.suspense_list"):60120,v=t?Symbol.for("react.memo"):60115,h=t?Symbol.for("react.lazy"):60116,P=t?Symbol.for("react.fundamental"):60117,b=t?Symbol.for("react.responder"):60118,S=t?Symbol.for("react.scope"):60119;function C(e){if("object"==typeof e&&null!==e){var r=e.$$typeof;switch(r){case n:switch(e=e.type){case c:case p:case a:case i:case f:case d:return e;default:switch(e=e&&e.$$typeof){case l:case y:case h:case v:case u:return e;default:return r}}case s:return r}}}function g(e){return C(e)===p}r.typeOf=C,r.AsyncMode=c,r.ConcurrentMode=p,r.ContextConsumer=l,r.ContextProvider=u,r.Element=n,r.ForwardRef=y,r.Fragment=a,r.Lazy=h,r.Memo=v,r.Portal=s,r.Profiler=i,r.StrictMode=f,r.Suspense=d,r.isValidElementType=function(e){return"string"==typeof e||"function"==typeof e||e===a||e===p||e===i||e===f||e===d||e===m||"object"==typeof e&&null!==e&&(e.$$typeof===h||e.$$typeof===v||e.$$typeof===u||e.$$typeof===l||e.$$typeof===y||e.$$typeof===P||e.$$typeof===b||e.$$typeof===S)},r.isAsyncMode=function(e){return g(e)||C(e)===c},r.isConcurrentMode=g,r.isContextConsumer=function(e){return C(e)===l},r.isContextProvider=function(e){return C(e)===u},r.isElement=function(e){return"object"==typeof e&&null!==e&&e.$$typeof===n},r.isForwardRef=function(e){return C(e)===y},r.isFragment=function(e){return C(e)===a},r.isLazy=function(e){return C(e)===h},r.isMemo=function(e){return C(e)===v},r.isPortal=function(e){return C(e)===s},r.isProfiler=function(e){return C(e)===i},r.isStrictMode=function(e){return C(e)===f},r.isSuspense=function(e){return C(e)===d}},function(e,r,o){"use strict";o.r(r),o.d(r,"compose",(function(){return p})),o.d(r,"createClassResolver",(function(){return y}));var t=function(){return(t=Object.assign||function(e){for(var r,o=1,t=arguments.length;o<t;o++)for(var n in r=arguments[o])Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n]);return e}).apply(this,arguments)};function n(){for(var e=0,r=0,o=arguments.length;r<o;r++)e+=arguments[r].length;var t=Array(e),n=0;for(r=0;r<o;r++)for(var s=arguments[r],a=0,f=s.length;a<f;a++,n++)t[n]=s[a];return t}var s=o(0),a=o(1),f=o(2),i=o.n(f),u=function(){for(var e=[],r=0;r<arguments.length;r++)e[r]=arguments[r];for(var o={},t=function(e){e&&Object.keys(e).forEach((function(r){o[r]=o[r]||[],o[r].push(e[r])}))},n=0,s=e;n<s.length;n++){var a=s[n];t(a)}return Object.keys(o).forEach((function(e){o[e]=i.a.apply(void 0,o[e])})),o};function l(e,r){return e.overrideStyles?[e.displayName].filter(Boolean):e.displayName?r.displayNames.concat(e.displayName):r.displayNames}var c={className:"",classes:{},displayName:"",displayNames:[],mapPropsToStylesPropsChain:[],render:function(){return null},handledProps:[],overrideStyles:!1,slots:{__self:function(){return null}},mapPropsToSlotPropsChain:[],resolveSlotProps:function(){return{}},shorthandConfig:{}};var p=function(e,r){void 0===r&&(r={});var o=function(e,r,o){void 0===o&&(o=c);var s=r.mapPropsToSlotProps?n(o.mapPropsToSlotPropsChain,[r.mapPropsToSlotProps]):o.mapPropsToSlotPropsChain;return{className:r.className||o.className,classes:u(o.classes,r.classes),displayName:r.displayName||o.displayName,displayNames:l(r,o),mapPropsToStylesPropsChain:r.mapPropsToStylesProps?n(o.mapPropsToStylesPropsChain,[r.mapPropsToStylesProps]):o.mapPropsToStylesPropsChain,render:"function"==typeof e?e:o.render,handledProps:n(o.handledProps,r.handledProps||[]),overrideStyles:r.overrideStyles||!1,slots:t(t({},o.slots),r.slots),mapPropsToSlotPropsChain:s,resolveSlotProps:function(e){return s.reduce((function(r,o){var s=t({},o(e)),a=n(Object.keys(r),Object.keys(s)),f={};return a.forEach((function(e){f[e]||(f[e]=t(t({},r[e]),s[e]))})),f}),{})},shorthandConfig:t(t({},o.shorthandConfig),r.shorthandConfig)}}(e,r,function(e){return e.$$typeof===a.ForwardRef&&!!e.fluentComposeConfig}(e)?e.fluentComposeConfig:void 0),f=s.forwardRef((function(e,r){return o.render(e,r,t(t({},o),{slots:t(t({},o.slots),{__self:f})}))}));return f.displayName=o.displayName,e.defaultProps&&(f.defaultProps=e.defaultProps),f.fluentComposeConfig=o,f},y=function(e){return function(r,o){var t={},n=[];return d(t,"root",r.className),e&&(Object.keys(e).forEach((function(s){var a=e[s];if(a)if(o.hasOwnProperty(s))d(t,s,a);else if(s.indexOf("_")>=0){var f=s.split("_"),i=f[0],u=f[1];r[i]===u&&n.push(a)}else r[s]&&n.push(a)})),Object.keys(t).forEach((function(e){return t[e]=t[e].concat(n).join(" ")}))),t}};function d(e,r,o){o&&(e[r]?e[r].push(o):e[r]=[o])}}]); | ||
//# sourceMappingURL=react-compose.min.js.map |
@@ -9,6 +9,4 @@ ## API Report File for "@fluentui/react-compose" | ||
// @public (undocumented) | ||
export type ClassDictionary = { | ||
[key: string]: string; | ||
}; | ||
// @public | ||
export type ClassDictionary = Record<string, string>; | ||
@@ -75,2 +73,8 @@ // @public (undocumented) | ||
// @public | ||
export const createClassResolver: (classes: Record<string, string>) => (state: Record<string, any>, slots: Record<string, any>) => Record<string, string>; | ||
// @public | ||
export type GenericDictionary = Record<string, any>; | ||
// @public (undocumented) | ||
@@ -77,0 +81,0 @@ export type Input<T extends React.ElementType = 'div', P = {}> = InputComposeComponent<P> | ComposeRenderFunction<T, P & { |
export { default as compose } from './compose'; | ||
export { createClassResolver } from './createClassResolver'; | ||
export * from './types'; |
@@ -1,6 +0,7 @@ | ||
define(["require", "exports", "./compose"], function (require, exports, compose_1) { | ||
define(["require", "exports", "./compose", "./createClassResolver"], function (require, exports, compose_1, createClassResolver_1) { | ||
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.compose = compose_1.default; | ||
exports.createClassResolver = createClassResolver_1.createClassResolver; | ||
}); | ||
//# sourceMappingURL=index.js.map |
@@ -1,2 +0,1 @@ | ||
import { ClassDictionary } from './types'; | ||
export declare const mergeClasses: (...classesList: (ClassDictionary | undefined)[]) => ClassDictionary; | ||
export declare const mergeClasses: (...classesList: (Record<string, string> | undefined)[]) => Record<string, string>; |
@@ -41,5 +41,10 @@ import * as React from 'react'; | ||
}; | ||
export declare type ClassDictionary = { | ||
[key: string]: string; | ||
}; | ||
/** | ||
* Generic name to any dictionary. | ||
*/ | ||
export declare type GenericDictionary = Record<string, any>; | ||
/** | ||
* Generic set of module to class name map. | ||
*/ | ||
export declare type ClassDictionary = Record<string, string>; | ||
export declare type ComposePreparedOptions<Props = {}> = { | ||
@@ -46,0 +51,0 @@ className: string; |
define(["require", "exports", "@uifabric/set-version"], function (require, exports, set_version_1) { | ||
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
set_version_1.setVersion('@fluentui/react-compose', '0.5.1'); | ||
set_version_1.setVersion('@fluentui/react-compose', '0.6.0'); | ||
}); | ||
//# sourceMappingURL=version.js.map |
export { default as compose } from './compose'; | ||
export { createClassResolver } from './createClassResolver'; | ||
export * from './types'; |
@@ -5,2 +5,4 @@ "use strict"; | ||
exports.compose = compose_1.default; | ||
var createClassResolver_1 = require("./createClassResolver"); | ||
exports.createClassResolver = createClassResolver_1.createClassResolver; | ||
//# sourceMappingURL=index.js.map |
@@ -1,2 +0,1 @@ | ||
import { ClassDictionary } from './types'; | ||
export declare const mergeClasses: (...classesList: (ClassDictionary | undefined)[]) => ClassDictionary; | ||
export declare const mergeClasses: (...classesList: (Record<string, string> | undefined)[]) => Record<string, string>; |
@@ -41,5 +41,10 @@ import * as React from 'react'; | ||
}; | ||
export declare type ClassDictionary = { | ||
[key: string]: string; | ||
}; | ||
/** | ||
* Generic name to any dictionary. | ||
*/ | ||
export declare type GenericDictionary = Record<string, any>; | ||
/** | ||
* Generic set of module to class name map. | ||
*/ | ||
export declare type ClassDictionary = Record<string, string>; | ||
export declare type ComposePreparedOptions<Props = {}> = { | ||
@@ -46,0 +51,0 @@ className: string; |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
// @fluentui/react-compose@0.5.1 | ||
// @fluentui/react-compose@0.6.0 | ||
// Do not modify this file, the file is generated as part of publish. The checked in version is a placeholder only. | ||
var set_version_1 = require("@uifabric/set-version"); | ||
set_version_1.setVersion('@fluentui/react-compose', '0.5.1'); | ||
set_version_1.setVersion('@fluentui/react-compose', '0.6.0'); | ||
//# sourceMappingURL=version.js.map |
export { default as compose } from './compose'; | ||
export { createClassResolver } from './createClassResolver'; | ||
export * from './types'; |
export { default as compose } from './compose'; | ||
export { createClassResolver } from './createClassResolver'; | ||
//# sourceMappingURL=index.js.map |
@@ -1,2 +0,1 @@ | ||
import { ClassDictionary } from './types'; | ||
export declare const mergeClasses: (...classesList: (ClassDictionary | undefined)[]) => ClassDictionary; | ||
export declare const mergeClasses: (...classesList: (Record<string, string> | undefined)[]) => Record<string, string>; |
@@ -41,5 +41,10 @@ import * as React from 'react'; | ||
}; | ||
export declare type ClassDictionary = { | ||
[key: string]: string; | ||
}; | ||
/** | ||
* Generic name to any dictionary. | ||
*/ | ||
export declare type GenericDictionary = Record<string, any>; | ||
/** | ||
* Generic set of module to class name map. | ||
*/ | ||
export declare type ClassDictionary = Record<string, string>; | ||
export declare type ComposePreparedOptions<Props = {}> = { | ||
@@ -46,0 +51,0 @@ className: string; |
@@ -1,5 +0,5 @@ | ||
// @fluentui/react-compose@0.5.1 | ||
// @fluentui/react-compose@0.6.0 | ||
// Do not modify this file, the file is generated as part of publish. The checked in version is a placeholder only. | ||
import { setVersion } from '@uifabric/set-version'; | ||
setVersion('@fluentui/react-compose', '0.5.1'); | ||
setVersion('@fluentui/react-compose', '0.6.0'); | ||
//# sourceMappingURL=version.js.map |
{ | ||
"name": "@fluentui/react-compose", | ||
"version": "0.5.1", | ||
"version": "0.6.0", | ||
"description": "Fluent UI React component composition.", | ||
@@ -5,0 +5,0 @@ "main": "lib-commonjs/index.js", |
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
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
248115
79
3431