@razorpay/blade 7.1.1 → 7.2.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/CHANGELOG.md +105 -0
- package/build/components/index.d.ts +63 -33
- package/build/components/index.native.d.ts +66 -14
- package/build/components/index.native.js +51 -30
- package/build/components/index.native.js.map +1 -1
- package/build/components/index.web.js +1752 -1518
- package/build/components/index.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.d.ts +2 -0
- package/build/tokens/index.native.d.ts +2 -0
- package/build/utils/index.d.ts +1 -5
- package/build/utils/index.native.d.ts +1 -5
- package/build/utils/index.native.js +1 -3
- package/build/utils/index.native.js.map +1 -1
- package/build/utils/index.web.js +1 -7
- package/build/utils/index.web.js.map +1 -1
- package/package.json +75 -10
package/build/tokens/index.d.ts
CHANGED
package/build/utils/index.d.ts
CHANGED
|
@@ -438,10 +438,6 @@ declare const makeTypographySize: (size: number) => `${number}rem`;
|
|
|
438
438
|
|
|
439
439
|
declare const setupMatchMediaMock: (customArgs?: {}) => void;
|
|
440
440
|
|
|
441
|
-
declare const testID: (defaultKey: string) => {
|
|
442
|
-
'data-testid': string;
|
|
443
|
-
};
|
|
444
|
-
|
|
445
441
|
declare const toTitleCase: (inputString: string) => string;
|
|
446
442
|
|
|
447
443
|
declare const deviceType: {
|
|
@@ -575,4 +571,4 @@ declare const assignWithoutSideEffects: <T extends {}>(component: T, sourceObj:
|
|
|
575
571
|
componentId?: string;
|
|
576
572
|
}) => T;
|
|
577
573
|
|
|
578
|
-
export { AccessibilityKeys, AccessibilityMap, AccessibilityProps, AriaAttributes, AriaRoles, DeepPartial, MakeSize, MetaConstants, Platform, PlatformTypes, UseColorScheme, assignWithoutSideEffects, castNativeType, castWebType, getColorScheme, getComponentId, getMediaQuery, getOS, getPlatformType, isAndroid, isPartialMatchObjectKeys, isReactNative, isValidAllowedChildren, makeAccessible, makeBezier, makeBorderSize, makeMotionTime, makeSize, makeSpace, makeTypographySize, metaAttribute, setupMatchMediaMock,
|
|
574
|
+
export { AccessibilityKeys, AccessibilityMap, AccessibilityProps, AriaAttributes, AriaRoles, DeepPartial, MakeSize, MetaConstants, Platform, PlatformTypes, UseColorScheme, assignWithoutSideEffects, castNativeType, castWebType, getColorScheme, getComponentId, getMediaQuery, getOS, getPlatformType, isAndroid, isPartialMatchObjectKeys, isReactNative, isValidAllowedChildren, makeAccessible, makeBezier, makeBorderSize, makeMotionTime, makeSize, makeSpace, makeTypographySize, metaAttribute, setupMatchMediaMock, toTitleCase, useBreakpoint, useColorScheme, usePrevious };
|
|
@@ -437,10 +437,6 @@ declare const makeTypographySize: <T extends number>(size: T) => `${T}px`;
|
|
|
437
437
|
|
|
438
438
|
declare const setupMatchMediaMock: (customArgs?: {}) => void;
|
|
439
439
|
|
|
440
|
-
declare const testID: (defaultKey: string) => {
|
|
441
|
-
testID: string;
|
|
442
|
-
};
|
|
443
|
-
|
|
444
440
|
declare const toTitleCase: (inputString: string) => string;
|
|
445
441
|
|
|
446
442
|
declare const deviceType: {
|
|
@@ -574,4 +570,4 @@ declare const assignWithoutSideEffects: <T extends {}>(component: T, sourceObj:
|
|
|
574
570
|
componentId?: string;
|
|
575
571
|
}) => T;
|
|
576
572
|
|
|
577
|
-
export { AccessibilityKeys, AccessibilityMap, AccessibilityProps, AriaAttributes, AriaRoles, DeepPartial, MakeSize, MetaConstants, Platform, PlatformTypes, UseColorScheme, assignWithoutSideEffects, castNativeType, castWebType, getColorScheme, getComponentId, getMediaQuery, getOS, getPlatformType, isAndroid, isPartialMatchObjectKeys, isReactNative, isValidAllowedChildren, makeAccessible, makeBezier, makeBorderSize, makeMotionTime, makeSize, makeSpace, makeTypographySize, metaAttribute, setupMatchMediaMock,
|
|
573
|
+
export { AccessibilityKeys, AccessibilityMap, AccessibilityProps, AriaAttributes, AriaRoles, DeepPartial, MakeSize, MetaConstants, Platform, PlatformTypes, UseColorScheme, assignWithoutSideEffects, castNativeType, castWebType, getColorScheme, getComponentId, getMediaQuery, getOS, getPlatformType, isAndroid, isPartialMatchObjectKeys, isReactNative, isValidAllowedChildren, makeAccessible, makeBezier, makeBorderSize, makeMotionTime, makeSize, makeSpace, makeTypographySize, metaAttribute, setupMatchMediaMock, toTitleCase, useBreakpoint, useColorScheme, usePrevious };
|
|
@@ -4535,8 +4535,6 @@ var merge_1 = merge;
|
|
|
4535
4535
|
|
|
4536
4536
|
var setupMatchMediaMock=function setupMatchMediaMock(){var customArgs=arguments.length>0&&arguments[0]!==undefined?arguments[0]:{};Object.defineProperty(window,'matchMedia',{writable:true,value:jest.fn().mockImplementation(function(query){return _extends({matches:false,media:query,addEventListener:jest.fn(),removeEventListener:jest.fn()},customArgs);})});};
|
|
4537
4537
|
|
|
4538
|
-
var testID=function testID(defaultKey){return {testID:defaultKey};};
|
|
4539
|
-
|
|
4540
4538
|
var toTitleCase=function toTitleCase(inputString){return inputString.toLowerCase().split(' ').map(function(word){return word.charAt(0).toUpperCase()+word.slice(1);}).join(' ');};
|
|
4541
4539
|
|
|
4542
4540
|
var deviceType={desktop:'desktop',mobile:'mobile'};var useBreakpoint=function useBreakpoint(_ref){var _window;var breakpoints=_ref.breakpoints;var supportsMatchMedia=typeof document!=='undefined'&&typeof window!=='undefined'&&typeof((_window=window)==null?void 0:_window.matchMedia)==='function';var breakpointsTokenAndQueryCollection=useMemo(function(){return supportsMatchMedia?Object.entries(breakpoints).map(function(_ref2,index,breakpointsArray){var _breakpointsArray;var _ref3=_slicedToArray(_ref2,2),token=_ref3[0],screenSize=_ref3[1];var min=screenSize;var maxValue=(_breakpointsArray=breakpointsArray[index+1])==null?void 0:_breakpointsArray[1];var mediaQuery=getMediaQuery({min:min,max:maxValue?maxValue-1:undefined});return {token:token,screenSize:screenSize,mediaQuery:mediaQuery};}):[];},[breakpoints,supportsMatchMedia]);var getMatchedDeviceType=useCallback(function(matchedBreakpoint){var matchedDeviceType=deviceType.mobile;var platform=getPlatformType();if(platform==='react-native'){matchedDeviceType=deviceType.mobile;}else if(platform==='browser'){if(matchedBreakpoint&&['base','xs','s'].includes(matchedBreakpoint)){matchedDeviceType=deviceType.mobile;}else {matchedDeviceType=deviceType.desktop;}}else if(platform==='node'){matchedDeviceType=deviceType.desktop;}return matchedDeviceType;},[]);var getMatchedBreakpoint=useCallback(function(event){var _breakpointsTokenAndQ,_breakpointsTokenAndQ2;var matchedBreakpoint=(_breakpointsTokenAndQ=(_breakpointsTokenAndQ2=breakpointsTokenAndQueryCollection.find(function(_ref4){var _ref4$mediaQuery=_ref4.mediaQuery,mediaQuery=_ref4$mediaQuery===void 0?'':_ref4$mediaQuery;if((event==null?void 0:event.media)===mediaQuery){return true;}if(window.matchMedia(mediaQuery).matches){return true;}return false;}))==null?void 0:_breakpointsTokenAndQ2.token)!=null?_breakpointsTokenAndQ:undefined;return matchedBreakpoint;},[breakpointsTokenAndQueryCollection]);var _useState=useState(function(){var matchedBreakpoint=getMatchedBreakpoint();var matchedDeviceType=getMatchedDeviceType(matchedBreakpoint);return {matchedBreakpoint:matchedBreakpoint,matchedDeviceType:matchedDeviceType};}),_useState2=_slicedToArray(_useState,2),breakpointAndDevice=_useState2[0],setBreakpointAndDevice=_useState2[1];useEffect(function(){if(!supportsMatchMedia){return undefined;}var handleMediaQueryChange=function handleMediaQueryChange(event){setBreakpointAndDevice(function(){var matchedBreakpoint=getMatchedBreakpoint(event);var matchedDeviceType=getMatchedDeviceType(matchedBreakpoint);return {matchedBreakpoint:matchedBreakpoint,matchedDeviceType:matchedDeviceType};});};var mediaQueryInstances=breakpointsTokenAndQueryCollection.map(function(_ref5){var _ref5$mediaQuery=_ref5.mediaQuery,mediaQuery=_ref5$mediaQuery===void 0?'':_ref5$mediaQuery;var mediaQueryInstance=window.matchMedia(mediaQuery);if(mediaQueryInstance.addEventListener){mediaQueryInstance.addEventListener('change',handleMediaQueryChange);}else {mediaQueryInstance.addListener(handleMediaQueryChange);}return mediaQueryInstance;});return function(){mediaQueryInstances.forEach(function(mediaQueryInstance){if(mediaQueryInstance.removeEventListener){mediaQueryInstance.removeEventListener('change',handleMediaQueryChange);}else {mediaQueryInstance.removeListener(handleMediaQueryChange);}});};},[breakpointsTokenAndQueryCollection,getMatchedBreakpoint,getMatchedDeviceType,supportsMatchMedia]);return breakpointAndDevice;};
|
|
@@ -4563,5 +4561,5 @@ var castWebType=function castWebType(value){return value;};var castNativeType=fu
|
|
|
4563
4561
|
|
|
4564
4562
|
var assignWithoutSideEffects=function assignWithoutSideEffects(component,sourceObj){return _extends(component,sourceObj);};
|
|
4565
4563
|
|
|
4566
|
-
export { MetaConstants, Platform, assignWithoutSideEffects, castNativeType, castWebType, cloneDeep_1 as cloneDeep, getColorScheme, getComponentId, get_1 as getIn, getMediaQuery, getOS, getPlatformType, isAndroid, isEmpty_1 as isEmpty, isEqual_1 as isEqual, isPartialMatchObjectKeys, isReactNative, isValidAllowedChildren, makeAccessible, makeBezier, makeBorderSize, makeMotionTime, makeSize, makeSpace, makeTypographySize, merge_1 as merge, metaAttribute, setupMatchMediaMock,
|
|
4564
|
+
export { MetaConstants, Platform, assignWithoutSideEffects, castNativeType, castWebType, cloneDeep_1 as cloneDeep, getColorScheme, getComponentId, get_1 as getIn, getMediaQuery, getOS, getPlatformType, isAndroid, isEmpty_1 as isEmpty, isEqual_1 as isEqual, isPartialMatchObjectKeys, isReactNative, isValidAllowedChildren, makeAccessible, makeBezier, makeBorderSize, makeMotionTime, makeSize, makeSpace, makeTypographySize, merge_1 as merge, metaAttribute, setupMatchMediaMock, toTitleCase, useBreakpoint, useColorScheme, usePrevious };
|
|
4567
4565
|
//# sourceMappingURL=index.native.js.map
|