@razorpay/blade 9.4.1 → 9.5.1
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 +19 -14
- package/build/components/{index.web.js → index.development.web.js} +215 -127
- package/build/components/index.development.web.js.map +1 -0
- package/build/components/index.native.d.ts +17 -12
- package/build/components/index.native.js +36 -36
- package/build/components/index.native.js.map +1 -1
- package/build/components/index.production.web.js +29819 -0
- package/build/components/index.production.web.js.map +1 -0
- 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.web.js → index.development.web.js} +21 -14
- package/build/tokens/index.development.web.js.map +1 -0
- package/build/tokens/index.native.js +2 -2
- package/build/tokens/index.native.js.map +1 -1
- package/build/tokens/index.production.web.js +8407 -0
- package/build/tokens/index.production.web.js.map +1 -0
- package/build/utils/index.d.ts +9 -5
- package/build/utils/{index.web.js → index.development.web.js} +12 -8
- package/build/utils/index.development.web.js.map +1 -0
- package/build/utils/index.native.d.ts +9 -5
- package/build/utils/index.native.js +2 -2
- package/build/utils/index.native.js.map +1 -1
- package/build/utils/index.production.web.js +322 -0
- package/build/utils/index.production.web.js.map +1 -0
- package/package.json +19 -11
- package/build/components/index.web.js.map +0 -1
- package/build/tokens/index.web.js.map +0 -1
- package/build/utils/index.web.js.map +0 -1
|
@@ -8965,8 +8965,11 @@ var isPartialMatchObjectKeys = function isPartialMatchObjectKeys(_ref) {
|
|
|
8965
8965
|
if (innerObjectToInspect.hasOwnProperty(key)) {
|
|
8966
8966
|
if (valueToMatch === null || valueToMatch === undefined || valueToMatch === '' || Array.isArray(valueToMatch) || // the condition checks if the "valueToMatch" is not of type object then "valueToMatch" type should be same as type of "valueToInspect"
|
|
8967
8967
|
!(valueToMatch instanceof Object) && _typeof(valueToMatch) !== _typeof(valueToInspect)) {
|
|
8968
|
-
|
|
8969
|
-
|
|
8968
|
+
{
|
|
8969
|
+
// this is an invalid case, so we log error
|
|
8970
|
+
console.error("[isPartialMatchObjectKeys]: Unexpected value: ".concat(JSON.stringify(valueToMatch), " of type ").concat(_typeof(valueToMatch), " for key: ").concat(key));
|
|
8971
|
+
}
|
|
8972
|
+
|
|
8970
8973
|
matchResponses.push(false);
|
|
8971
8974
|
}
|
|
8972
8975
|
|
|
@@ -8983,8 +8986,11 @@ var isPartialMatchObjectKeys = function isPartialMatchObjectKeys(_ref) {
|
|
|
8983
8986
|
});
|
|
8984
8987
|
}
|
|
8985
8988
|
} else {
|
|
8986
|
-
|
|
8987
|
-
|
|
8989
|
+
{
|
|
8990
|
+
// the key doesn't exist in the innerObjectToMatch, so we log error
|
|
8991
|
+
console.error("[isPartialMatchObjectKeys]: ".concat(key, " doesn't exist in ").concat(JSON.stringify(innerObjectToInspect, null, 2)));
|
|
8992
|
+
}
|
|
8993
|
+
|
|
8988
8994
|
matchResponses.push(false);
|
|
8989
8995
|
}
|
|
8990
8996
|
}
|
|
@@ -9027,16 +9033,17 @@ var overrideTheme = function overrideTheme(_ref) {
|
|
|
9027
9033
|
var baseThemeTokens = _ref.baseThemeTokens,
|
|
9028
9034
|
overrides = _ref.overrides;
|
|
9029
9035
|
|
|
9030
|
-
|
|
9031
|
-
|
|
9032
|
-
|
|
9033
|
-
|
|
9036
|
+
{
|
|
9037
|
+
if (!isEqual_1(baseThemeTokens, paymentTheme) && !isEqual_1(baseThemeTokens, bankingTheme)) {
|
|
9038
|
+
throw new Error('[@razorpay/blade:overrideTheme]: The base theme provided is not a valid Blade theme');
|
|
9039
|
+
}
|
|
9034
9040
|
|
|
9035
|
-
|
|
9036
|
-
|
|
9037
|
-
|
|
9038
|
-
|
|
9039
|
-
|
|
9041
|
+
if (!isPartialMatchObjectKeys({
|
|
9042
|
+
objectToMatch: overrides,
|
|
9043
|
+
objectToInspect: baseThemeTokens
|
|
9044
|
+
})) {
|
|
9045
|
+
throw new Error('[@razorpay/blade:overrideTheme]: The overrides object is not valid');
|
|
9046
|
+
}
|
|
9040
9047
|
} // Need to clone before merging since merge changes/mutates the actual object
|
|
9041
9048
|
|
|
9042
9049
|
|
|
@@ -9044,4 +9051,4 @@ var overrideTheme = function overrideTheme(_ref) {
|
|
|
9044
9051
|
};
|
|
9045
9052
|
|
|
9046
9053
|
export { bankingTheme, border, breakpoints, colors$2 as colors, elevation, motion, opacity, overrideTheme, paymentTheme, size, spacing, typography };
|
|
9047
|
-
//# sourceMappingURL=index.web.js.map
|
|
9054
|
+
//# sourceMappingURL=index.development.web.js.map
|