@razorpay/blade 9.5.1 → 9.5.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/components/index.d.ts +95 -78
- package/build/components/index.development.web.js +1555 -1331
- package/build/components/index.development.web.js.map +1 -1
- package/build/components/index.native.d.ts +118 -77
- package/build/components/index.native.js +50 -48
- package/build/components/index.native.js.map +1 -1
- package/build/components/index.production.web.js +1289 -1285
- package/build/components/index.production.web.js.map +1 -1
- package/build/css/bankingThemeDarkDesktop.css +1 -1
- package/build/css/bankingThemeDarkMobile.css +1 -1
- package/build/css/bankingThemeLightDesktop.css +1 -1
- package/build/css/bankingThemeLightMobile.css +1 -1
- package/build/css/paymentThemeDarkDesktop.css +1 -1
- package/build/css/paymentThemeDarkMobile.css +1 -1
- package/build/css/paymentThemeLightDesktop.css +1 -1
- package/build/css/paymentThemeLightMobile.css +1 -1
- package/build/tokens/index.development.web.js +55 -4
- package/build/tokens/index.development.web.js.map +1 -1
- package/build/tokens/index.native.js +4 -2
- package/build/tokens/index.native.js.map +1 -1
- package/build/tokens/index.production.web.js.map +1 -1
- package/build/utils/index.d.ts +8 -4
- package/build/utils/index.development.web.js +24 -3
- package/build/utils/index.development.web.js.map +1 -1
- package/build/utils/index.native.d.ts +8 -4
- package/build/utils/index.native.js +4 -2
- package/build/utils/index.native.js.map +1 -1
- package/build/utils/index.production.web.js.map +1 -1
- package/package.json +1 -1
|
@@ -4067,9 +4067,11 @@ var merge = createAssigner(function(object, source, srcIndex) {
|
|
|
4067
4067
|
|
|
4068
4068
|
var merge_1 = merge;
|
|
4069
4069
|
|
|
4070
|
-
var
|
|
4070
|
+
var PREFIX='[Blade]:';var throwBladeError=function throwBladeError(_ref){var message=_ref.message,moduleName=_ref.moduleName;if(__DEV__){var prefix=moduleName?"[Blade: "+moduleName+"]:":PREFIX;throw new Error(prefix+" "+message);}};var getCommonLogger=function getCommonLogger(type){switch(type){case'error':return console.error;case'warn':return console.warn;case'log':default:return console.log;}};var logger=function logger(_ref2){var message=_ref2.message,moduleName=_ref2.moduleName,type=_ref2.type;if(__DEV__){var prefix=moduleName?"[Blade: "+moduleName+"]:":PREFIX;getCommonLogger(type)(prefix+" "+message);}};
|
|
4071
4071
|
|
|
4072
|
-
var
|
|
4072
|
+
var isPartialMatchObjectKeys=function isPartialMatchObjectKeys(_ref){var objectToMatch=_ref.objectToMatch,objectToInspect=_ref.objectToInspect;var matchResponses=[];var matchObjectKeys=function matchObjectKeys(_ref2){var innerObjectToMatch=_ref2.innerObjectToMatch,innerObjectToInspect=_ref2.innerObjectToInspect;for(var _i=0,_Object$entries=Object.entries(innerObjectToMatch);_i<_Object$entries.length;_i++){var _ref3=_Object$entries[_i];var _ref4=_slicedToArray(_ref3,2);var key=_ref4[0];var valueToMatch=_ref4[1];var valueToInspect=innerObjectToInspect[key];if(innerObjectToInspect.hasOwnProperty(key)){if(valueToMatch===null||valueToMatch===undefined||valueToMatch===''||Array.isArray(valueToMatch)||!(valueToMatch instanceof Object)&&typeof valueToMatch!==typeof valueToInspect){if(__DEV__){logger({message:"Unexpected value: "+JSON.stringify(valueToMatch)+" of type "+typeof valueToMatch+" for key: "+key,moduleName:'isPartialMatchObjectKeys',type:'error'});}matchResponses.push(false);}if(typeof valueToMatch==='string'){matchResponses.push(true);}if(isObject_1(valueToMatch)&&isObject_1(valueToInspect)){matchObjectKeys({innerObjectToMatch:valueToMatch,innerObjectToInspect:valueToInspect});}}else {if(__DEV__){logger({message:key+" doesn't exist in "+JSON.stringify(innerObjectToInspect,null,2),moduleName:'isPartialMatchObjectKeys',type:'error'});}matchResponses.push(false);}}};matchObjectKeys({innerObjectToMatch:objectToMatch,innerObjectToInspect:objectToInspect});return matchResponses.every(Boolean);};
|
|
4073
|
+
|
|
4074
|
+
var overrideTheme=function overrideTheme(_ref){var baseThemeTokens=_ref.baseThemeTokens,overrides=_ref.overrides;if(__DEV__){if(!isEqual_1(baseThemeTokens,paymentTheme)&&!isEqual_1(baseThemeTokens,bankingTheme)){throwBladeError({message:'The base theme provided is not a valid Blade theme',moduleName:'overrideTheme'});}if(!isPartialMatchObjectKeys({objectToMatch:overrides,objectToInspect:baseThemeTokens})){throwBladeError({message:'The overrides object is not valid',moduleName:'overrideTheme'});}}return merge_1(cloneDeep_1(baseThemeTokens),overrides);};
|
|
4073
4075
|
|
|
4074
4076
|
export { bankingTheme, border, breakpoints, colors$2 as colors, elevation, motion, opacity, overrideTheme, paymentTheme, size, spacing, typography };
|
|
4075
4077
|
//# sourceMappingURL=index.native.js.map
|