@razorpay/blade 6.5.1 → 6.6.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.
- package/CHANGELOG.md +18 -0
- package/build/components/index.d.ts +60 -8
- package/build/components/index.native.d.ts +60 -8
- package/build/components/index.native.js +7 -7
- package/build/components/index.native.js.map +1 -1
- package/build/components/index.web.js +140 -99
- package/build/components/index.web.js.map +1 -1
- package/build/css/bankingThemeDarkDesktop.css +2 -1
- package/build/css/bankingThemeDarkMobile.css +2 -1
- package/build/css/bankingThemeLightDesktop.css +2 -1
- package/build/css/bankingThemeLightMobile.css +2 -1
- package/build/css/paymentThemeDarkDesktop.css +2 -1
- package/build/css/paymentThemeDarkMobile.css +2 -1
- package/build/css/paymentThemeLightDesktop.css +2 -1
- package/build/css/paymentThemeLightMobile.css +2 -1
- package/build/tokens/index.d.ts +19 -0
- package/build/tokens/index.native.d.ts +19 -0
- package/build/tokens/index.native.js +2 -2
- package/build/tokens/index.native.js.map +1 -1
- package/build/tokens/index.web.js +2 -0
- package/build/tokens/index.web.js.map +1 -1
- package/package.json +1 -1
package/build/tokens/index.d.ts
CHANGED
|
@@ -779,6 +779,24 @@ type Motion$1 = Readonly<{
|
|
|
779
779
|
easing: Easing$1;
|
|
780
780
|
}>;
|
|
781
781
|
|
|
782
|
+
/**
|
|
783
|
+
*
|
|
784
|
+
* When combined with union, this type utility will give you autocomplete of union while still supporting any string value as input
|
|
785
|
+
*
|
|
786
|
+
* ### Usage
|
|
787
|
+
*
|
|
788
|
+
* ```ts
|
|
789
|
+
* type ThemeName = 'paymentTheme' | 'bankingTheme' | StringWithAutocomplete;
|
|
790
|
+
* ```
|
|
791
|
+
*
|
|
792
|
+
* This will show paymentTheme and bankingTheme in autocomplete but also allow any other string as value.
|
|
793
|
+
*
|
|
794
|
+
* More details - https://github.com/razorpay/blade/pull/1031/commits/86b6ee0facf45e7556739efcbfa5396b11b1b3c9#r1121298293
|
|
795
|
+
* Related TS Issue - https://github.com/microsoft/TypeScript/issues/29729
|
|
796
|
+
*
|
|
797
|
+
*/
|
|
798
|
+
type StringWithAutocomplete = string & Record<never, never>;
|
|
799
|
+
|
|
782
800
|
declare type Duration = {
|
|
783
801
|
/** `70` milliseconds */
|
|
784
802
|
'2xquick': 70;
|
|
@@ -1073,6 +1091,7 @@ type Colors = {
|
|
|
1073
1091
|
type ColorsWithModes = Record<ColorSchemeModes, Colors>;
|
|
1074
1092
|
|
|
1075
1093
|
type ThemeTokens = {
|
|
1094
|
+
name: 'paymentTheme' | 'bankingTheme' | StringWithAutocomplete; // Can be used to watch over state changes between theme without watching over entire theme object
|
|
1076
1095
|
border: Border;
|
|
1077
1096
|
breakpoints: Breakpoints;
|
|
1078
1097
|
colors: ColorsWithModes;
|
|
@@ -779,6 +779,24 @@ type Motion$1 = Readonly<{
|
|
|
779
779
|
easing: Easing$1;
|
|
780
780
|
}>;
|
|
781
781
|
|
|
782
|
+
/**
|
|
783
|
+
*
|
|
784
|
+
* When combined with union, this type utility will give you autocomplete of union while still supporting any string value as input
|
|
785
|
+
*
|
|
786
|
+
* ### Usage
|
|
787
|
+
*
|
|
788
|
+
* ```ts
|
|
789
|
+
* type ThemeName = 'paymentTheme' | 'bankingTheme' | StringWithAutocomplete;
|
|
790
|
+
* ```
|
|
791
|
+
*
|
|
792
|
+
* This will show paymentTheme and bankingTheme in autocomplete but also allow any other string as value.
|
|
793
|
+
*
|
|
794
|
+
* More details - https://github.com/razorpay/blade/pull/1031/commits/86b6ee0facf45e7556739efcbfa5396b11b1b3c9#r1121298293
|
|
795
|
+
* Related TS Issue - https://github.com/microsoft/TypeScript/issues/29729
|
|
796
|
+
*
|
|
797
|
+
*/
|
|
798
|
+
type StringWithAutocomplete = string & Record<never, never>;
|
|
799
|
+
|
|
782
800
|
declare type Duration = {
|
|
783
801
|
/** `70` milliseconds */
|
|
784
802
|
'2xquick': 70;
|
|
@@ -1073,6 +1091,7 @@ type Colors = {
|
|
|
1073
1091
|
type ColorsWithModes = Record<ColorSchemeModes, Colors>;
|
|
1074
1092
|
|
|
1075
1093
|
type ThemeTokens = {
|
|
1094
|
+
name: 'paymentTheme' | 'bankingTheme' | StringWithAutocomplete; // Can be used to watch over state changes between theme without watching over entire theme object
|
|
1076
1095
|
border: Border;
|
|
1077
1096
|
breakpoints: Breakpoints;
|
|
1078
1097
|
colors: ColorsWithModes;
|