@razorpay/blade 9.4.1 → 9.5.0

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.
Files changed (34) hide show
  1. package/build/components/index.d.ts +6 -1
  2. package/build/components/{index.web.js → index.development.web.js} +213 -125
  3. package/build/components/index.development.web.js.map +1 -0
  4. package/build/components/index.native.d.ts +6 -1
  5. package/build/components/index.native.js +36 -36
  6. package/build/components/index.native.js.map +1 -1
  7. package/build/components/index.production.web.js +29819 -0
  8. package/build/components/index.production.web.js.map +1 -0
  9. package/build/css/bankingThemeDarkDesktop.css +1 -1
  10. package/build/css/bankingThemeDarkMobile.css +1 -1
  11. package/build/css/bankingThemeLightDesktop.css +1 -1
  12. package/build/css/bankingThemeLightMobile.css +1 -1
  13. package/build/css/paymentThemeDarkDesktop.css +1 -1
  14. package/build/css/paymentThemeDarkMobile.css +1 -1
  15. package/build/css/paymentThemeLightDesktop.css +1 -1
  16. package/build/css/paymentThemeLightMobile.css +1 -1
  17. package/build/tokens/{index.web.js → index.development.web.js} +21 -14
  18. package/build/tokens/index.development.web.js.map +1 -0
  19. package/build/tokens/index.native.js +2 -2
  20. package/build/tokens/index.native.js.map +1 -1
  21. package/build/tokens/index.production.web.js +8407 -0
  22. package/build/tokens/index.production.web.js.map +1 -0
  23. package/build/utils/index.d.ts +9 -5
  24. package/build/utils/{index.web.js → index.development.web.js} +12 -8
  25. package/build/utils/index.development.web.js.map +1 -0
  26. package/build/utils/index.native.d.ts +9 -5
  27. package/build/utils/index.native.js +2 -2
  28. package/build/utils/index.native.js.map +1 -1
  29. package/build/utils/index.production.web.js +322 -0
  30. package/build/utils/index.production.web.js.map +1 -0
  31. package/package.json +19 -11
  32. package/build/components/index.web.js.map +0 -1
  33. package/build/tokens/index.web.js.map +0 -1
  34. package/build/utils/index.web.js.map +0 -1
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * Do not edit directly
3
- * Generated on Fri, 28 Jul 2023 12:37:53 GMT
3
+ * Generated on Mon, 31 Jul 2023 11:29:24 GMT
4
4
  */
5
5
 
6
6
  :root {
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * Do not edit directly
3
- * Generated on Fri, 28 Jul 2023 12:37:53 GMT
3
+ * Generated on Mon, 31 Jul 2023 11:29:24 GMT
4
4
  */
5
5
 
6
6
  :root {
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * Do not edit directly
3
- * Generated on Fri, 28 Jul 2023 12:37:53 GMT
3
+ * Generated on Mon, 31 Jul 2023 11:29:24 GMT
4
4
  */
5
5
 
6
6
  :root {
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * Do not edit directly
3
- * Generated on Fri, 28 Jul 2023 12:37:53 GMT
3
+ * Generated on Mon, 31 Jul 2023 11:29:24 GMT
4
4
  */
5
5
 
6
6
  :root {
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * Do not edit directly
3
- * Generated on Fri, 28 Jul 2023 12:37:53 GMT
3
+ * Generated on Mon, 31 Jul 2023 11:29:24 GMT
4
4
  */
5
5
 
6
6
  :root {
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * Do not edit directly
3
- * Generated on Fri, 28 Jul 2023 12:37:53 GMT
3
+ * Generated on Mon, 31 Jul 2023 11:29:24 GMT
4
4
  */
5
5
 
6
6
  :root {
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * Do not edit directly
3
- * Generated on Fri, 28 Jul 2023 12:37:53 GMT
3
+ * Generated on Mon, 31 Jul 2023 11:29:24 GMT
4
4
  */
5
5
 
6
6
  :root {
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * Do not edit directly
3
- * Generated on Fri, 28 Jul 2023 12:37:53 GMT
3
+ * Generated on Mon, 31 Jul 2023 11:29:24 GMT
4
4
  */
5
5
 
6
6
  :root {
@@ -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
- // this is an invalid case, so we log error
8969
- console.error("[isPartialMatchObjectKeys]: Unexpected value: ".concat(JSON.stringify(valueToMatch), " of type ").concat(_typeof(valueToMatch), " for key: ").concat(key));
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
- // the key doesn't exist in the innerObjectToMatch, so we log error
8987
- console.error("[isPartialMatchObjectKeys]: ".concat(key, " doesn't exist in ").concat(JSON.stringify(innerObjectToInspect, null, 2)));
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
- // TODO: wrap this check inside a __DEV__ flag so it gets trimmed off in production
9031
- if (!isEqual_1(baseThemeTokens, paymentTheme) && !isEqual_1(baseThemeTokens, bankingTheme)) {
9032
- throw new Error('[@razorpay/blade:overrideTheme]: The base theme provided is not a valid Blade theme');
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
- if (!isPartialMatchObjectKeys({
9036
- objectToMatch: overrides,
9037
- objectToInspect: baseThemeTokens
9038
- })) {
9039
- throw new Error('[@razorpay/blade:overrideTheme]: The overrides object is not valid');
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