@razorpay/blade 6.0.5 → 6.2.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 +20 -0
- package/build/components/index.d.ts +641 -210
- package/build/components/index.native.d.ts +658 -221
- package/build/components/index.native.js +174 -105
- package/build/components/index.native.js.map +1 -1
- package/build/components/index.web.js +10903 -8086
- 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.native.js.map +1 -1
- package/build/utils/index.d.ts +14 -2
- package/build/utils/index.native.d.ts +14 -2
- package/build/utils/index.native.js +5 -3
- package/build/utils/index.native.js.map +1 -1
- package/build/utils/index.web.js +17 -1
- package/build/utils/index.web.js.map +1 -1
- package/package.json +4 -1
package/build/utils/index.d.ts
CHANGED
|
@@ -3,12 +3,17 @@ export { default as getIn } from 'lodash/get';
|
|
|
3
3
|
export { default as isEmpty } from 'lodash/isEmpty';
|
|
4
4
|
export { default as isEqual } from 'lodash/isEqual';
|
|
5
5
|
import React, { MutableRefObject } from 'react';
|
|
6
|
-
import { AccessibilityRole } from 'react-native';
|
|
6
|
+
import { AccessibilityRole, Platform as Platform$2 } from 'react-native';
|
|
7
7
|
export { default as merge } from 'lodash/merge';
|
|
8
8
|
|
|
9
9
|
declare const metaAttribute: (name: string, value: string | undefined) => Record<string, string>;
|
|
10
10
|
|
|
11
11
|
declare const MetaConstants: {
|
|
12
|
+
readonly ActionList: "action-list";
|
|
13
|
+
readonly ActionListFooter: "action-list-footer";
|
|
14
|
+
readonly ActionListHeader: "action-list-header";
|
|
15
|
+
readonly ActionListItem: "action-list-item";
|
|
16
|
+
readonly ActionListSection: "action-list-section";
|
|
12
17
|
readonly Alert: "alert";
|
|
13
18
|
readonly Badge: "badge";
|
|
14
19
|
readonly Button: "button";
|
|
@@ -17,16 +22,20 @@ declare const MetaConstants: {
|
|
|
17
22
|
readonly Code: "code";
|
|
18
23
|
readonly Component: "blade-component";
|
|
19
24
|
readonly Counter: "counter";
|
|
25
|
+
readonly DropdownOverlay: "dropdown-overlay";
|
|
20
26
|
readonly Icon: "icon";
|
|
21
27
|
readonly IconButton: "icon-button";
|
|
22
28
|
readonly Indicator: "indicator";
|
|
23
29
|
readonly Link: "link";
|
|
30
|
+
readonly List: "list";
|
|
31
|
+
readonly ListItem: "list-item";
|
|
24
32
|
readonly OTPInput: "otp-input";
|
|
25
33
|
readonly ProgressBar: "progress-bar";
|
|
26
34
|
readonly Radio: "radio";
|
|
27
35
|
readonly RadioGroup: "radio-group";
|
|
28
36
|
readonly SkipNav: "skipnav";
|
|
29
37
|
readonly Spinner: "spinner";
|
|
38
|
+
readonly SelectInput: "select-input";
|
|
30
39
|
readonly Card: "card";
|
|
31
40
|
readonly CardBody: "card-body";
|
|
32
41
|
readonly CardHeader: "card-header";
|
|
@@ -403,6 +412,9 @@ declare function usePrevious<T>(value: T): MutableRefObject<T | undefined>['curr
|
|
|
403
412
|
|
|
404
413
|
declare const isReactNative: () => boolean;
|
|
405
414
|
|
|
415
|
+
declare const getOS: () => typeof Platform$2.OS;
|
|
416
|
+
declare const isAndroid: () => boolean;
|
|
417
|
+
|
|
406
418
|
/**
|
|
407
419
|
* Brands a type making them act as nominal
|
|
408
420
|
* @see https://medium.com/@KevinBGreene/surviving-the-typescript-ecosystem-branding-and-type-tagging-6cf6e516523d
|
|
@@ -466,4 +478,4 @@ declare const castNativeType: <T>(value: T) => Extract<T, {
|
|
|
466
478
|
__brand__?: "platform-all" | "platform-native" | undefined;
|
|
467
479
|
}>;
|
|
468
480
|
|
|
469
|
-
export { AccessibilityKeys, AccessibilityMap, AccessibilityProps, AriaAttributes, AriaRoles, DeepPartial, MakeSize, MetaConstants, Platform, PlatformTypes, UseColorScheme, WithComponentId, castNativeType, castWebType, getColorScheme, getComponentId, getPlatformType, isPartialMatchObjectKeys, isReactNative, isValidAllowedChildren, makeAccessible, makeBezier, makeBorderSize, makeMotionTime, makeSize, makeSpace, makeTypographySize, metaAttribute, setupMatchMediaMock, testID, toTitleCase, useBreakpoint, useColorScheme, usePrevious };
|
|
481
|
+
export { AccessibilityKeys, AccessibilityMap, AccessibilityProps, AriaAttributes, AriaRoles, DeepPartial, MakeSize, MetaConstants, Platform, PlatformTypes, UseColorScheme, WithComponentId, castNativeType, castWebType, getColorScheme, getComponentId, getOS, getPlatformType, isAndroid, isPartialMatchObjectKeys, isReactNative, isValidAllowedChildren, makeAccessible, makeBezier, makeBorderSize, makeMotionTime, makeSize, makeSpace, makeTypographySize, metaAttribute, setupMatchMediaMock, testID, toTitleCase, useBreakpoint, useColorScheme, usePrevious };
|
|
@@ -3,13 +3,18 @@ export { default as getIn } from 'lodash/get';
|
|
|
3
3
|
export { default as isEmpty } from 'lodash/isEmpty';
|
|
4
4
|
export { default as isEqual } from 'lodash/isEqual';
|
|
5
5
|
import React, { MutableRefObject } from 'react';
|
|
6
|
-
import { AccessibilityRole } from 'react-native';
|
|
6
|
+
import { AccessibilityRole, Platform as Platform$2 } from 'react-native';
|
|
7
7
|
import { EasingFunctionFactory } from 'react-native-reanimated';
|
|
8
8
|
export { default as merge } from 'lodash/merge';
|
|
9
9
|
|
|
10
10
|
declare const metaAttribute: (_name: string, _value: string) => Record<string, string>;
|
|
11
11
|
|
|
12
12
|
declare const MetaConstants: {
|
|
13
|
+
readonly ActionList: "action-list";
|
|
14
|
+
readonly ActionListFooter: "action-list-footer";
|
|
15
|
+
readonly ActionListHeader: "action-list-header";
|
|
16
|
+
readonly ActionListItem: "action-list-item";
|
|
17
|
+
readonly ActionListSection: "action-list-section";
|
|
13
18
|
readonly Alert: "alert";
|
|
14
19
|
readonly Badge: "badge";
|
|
15
20
|
readonly Button: "button";
|
|
@@ -18,16 +23,20 @@ declare const MetaConstants: {
|
|
|
18
23
|
readonly Code: "code";
|
|
19
24
|
readonly Component: "blade-component";
|
|
20
25
|
readonly Counter: "counter";
|
|
26
|
+
readonly DropdownOverlay: "dropdown-overlay";
|
|
21
27
|
readonly Icon: "icon";
|
|
22
28
|
readonly IconButton: "icon-button";
|
|
23
29
|
readonly Indicator: "indicator";
|
|
24
30
|
readonly Link: "link";
|
|
31
|
+
readonly List: "list";
|
|
32
|
+
readonly ListItem: "list-item";
|
|
25
33
|
readonly OTPInput: "otp-input";
|
|
26
34
|
readonly ProgressBar: "progress-bar";
|
|
27
35
|
readonly Radio: "radio";
|
|
28
36
|
readonly RadioGroup: "radio-group";
|
|
29
37
|
readonly SkipNav: "skipnav";
|
|
30
38
|
readonly Spinner: "spinner";
|
|
39
|
+
readonly SelectInput: "select-input";
|
|
31
40
|
readonly Card: "card";
|
|
32
41
|
readonly CardBody: "card-body";
|
|
33
42
|
readonly CardHeader: "card-header";
|
|
@@ -402,6 +411,9 @@ declare function usePrevious<T>(value: T): MutableRefObject<T | undefined>['curr
|
|
|
402
411
|
|
|
403
412
|
declare const isReactNative: () => boolean;
|
|
404
413
|
|
|
414
|
+
declare const getOS: () => typeof Platform$2.OS;
|
|
415
|
+
declare const isAndroid: () => boolean;
|
|
416
|
+
|
|
405
417
|
/**
|
|
406
418
|
* Brands a type making them act as nominal
|
|
407
419
|
* @see https://medium.com/@KevinBGreene/surviving-the-typescript-ecosystem-branding-and-type-tagging-6cf6e516523d
|
|
@@ -465,4 +477,4 @@ declare const castNativeType: <T>(value: T) => Extract<T, {
|
|
|
465
477
|
__brand__?: "platform-native" | "platform-all" | undefined;
|
|
466
478
|
}>;
|
|
467
479
|
|
|
468
|
-
export { AccessibilityKeys, AccessibilityMap, AccessibilityProps, AriaAttributes, AriaRoles, DeepPartial, MakeSize, MetaConstants, Platform, PlatformTypes, UseColorScheme, WithComponentId, castNativeType, castWebType, getColorScheme, getComponentId, getPlatformType, isPartialMatchObjectKeys, isReactNative, isValidAllowedChildren, makeAccessible, makeBezier, makeBorderSize, makeMotionTime, makeSize, makeSpace, makeTypographySize, metaAttribute, setupMatchMediaMock, testID, toTitleCase, useBreakpoint, useColorScheme, usePrevious };
|
|
480
|
+
export { AccessibilityKeys, AccessibilityMap, AccessibilityProps, AriaAttributes, AriaRoles, DeepPartial, MakeSize, MetaConstants, Platform, PlatformTypes, UseColorScheme, WithComponentId, castNativeType, castWebType, getColorScheme, getComponentId, getOS, getPlatformType, isAndroid, isPartialMatchObjectKeys, isReactNative, isValidAllowedChildren, makeAccessible, makeBezier, makeBorderSize, makeMotionTime, makeSize, makeSpace, makeTypographySize, metaAttribute, setupMatchMediaMock, testID, toTitleCase, useBreakpoint, useColorScheme, usePrevious };
|
|
@@ -2791,7 +2791,7 @@ var cloneDeep_1 = cloneDeep;
|
|
|
2791
2791
|
|
|
2792
2792
|
var metaAttribute=function metaAttribute(_name,_value){return {};};
|
|
2793
2793
|
|
|
2794
|
-
var MetaConstants={Alert:'alert',Badge:'badge',Button:'button',Checkbox:'checkbox',CheckboxGroup:'checkbox-group',Code:'code',Component:'blade-component',Counter:'counter',Icon:'icon',IconButton:'icon-button',Indicator:'indicator',Link:'link',OTPInput:'otp-input',ProgressBar:'progress-bar',Radio:'radio',RadioGroup:'radio-group',SkipNav:'skipnav',Spinner:'spinner',Card:'card',CardBody:'card-body',CardHeader:'card-header',CardFooter:'card-footer'};
|
|
2794
|
+
var MetaConstants={ActionList:'action-list',ActionListFooter:'action-list-footer',ActionListHeader:'action-list-header',ActionListItem:'action-list-item',ActionListSection:'action-list-section',Alert:'alert',Badge:'badge',Button:'button',Checkbox:'checkbox',CheckboxGroup:'checkbox-group',Code:'code',Component:'blade-component',Counter:'counter',DropdownOverlay:'dropdown-overlay',Icon:'icon',IconButton:'icon-button',Indicator:'indicator',Link:'link',List:'list',ListItem:'list-item',OTPInput:'otp-input',ProgressBar:'progress-bar',Radio:'radio',RadioGroup:'radio-group',SkipNav:'skipnav',Spinner:'spinner',SelectInput:'select-input',Card:'card',CardBody:'card-body',CardHeader:'card-header',CardFooter:'card-footer'};
|
|
2795
2795
|
|
|
2796
2796
|
var getColorScheme=function getColorScheme(){var colorScheme=arguments.length>0&&arguments[0]!==undefined?arguments[0]:'light';if(colorScheme==='light'||colorScheme==='dark'){return colorScheme;}if(colorScheme==='system'){var _Appearance$getColorS;return (_Appearance$getColorS=Appearance.getColorScheme())!=null?_Appearance$getColorS:'light';}return 'light';};
|
|
2797
2797
|
|
|
@@ -3844,7 +3844,7 @@ var getComponentId=function getComponentId(component){var _component$type;if(!Re
|
|
|
3844
3844
|
|
|
3845
3845
|
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){console.error("[isPartialMatchObjectKeys]: Unexpected value: "+JSON.stringify(valueToMatch)+" of type "+typeof valueToMatch+" for key: "+key);matchResponses.push(false);}if(typeof valueToMatch==='string'){matchResponses.push(true);}if(isObject_1(valueToMatch)&&isObject_1(valueToInspect)){matchObjectKeys({innerObjectToMatch:valueToMatch,innerObjectToInspect:valueToInspect});}}else {console.error("[isPartialMatchObjectKeys]: "+key+" doesn't exist in "+JSON.stringify(innerObjectToInspect,null,2));matchResponses.push(false);}}};matchObjectKeys({innerObjectToMatch:objectToMatch,innerObjectToInspect:objectToInspect});return matchResponses.every(Boolean);};
|
|
3846
3846
|
|
|
3847
|
-
var accessibilityValue={valueMax:'max',valueMin:'min',valueNow:'now',valueText:'text'};var accessibilityState={selected:'selected',disabled:'disabled',expanded:'expanded',busy:'busy',checked:'checked'};var accessibilityValueKeys=Object.keys(accessibilityValue);var accessibilityStateKeys=Object.keys(accessibilityState);var accessibilityMap=_extends({},accessibilityState,accessibilityValue,{activeDescendant:'accessibilityActiveDescendant',atomic:'accessibilityAtomic',autoComplete:'accessibilityAutoComplete',colCount:'accessibilityColCount',colIndex:'accessibilityColIndex',colSpan:'accessibilityColSpan',controls:'accessibilityControls',describedBy:'accessibilityDescribedBy',details:'accessibilityDetails',errorMessage:'accessibilityErrorMessage',flowTo:'accessibilityFlowTo',hasPopup:'accessibilityHasPopup',hidden:'accessibilityHidden',invalid:'accessibilityInvalid',keyShortcuts:'accessibilityKeyShortcuts',label:'accessibilityLabel',labelledBy:'accessibilityLabelledBy',liveRegion:'accessibilityLiveRegion',modal:'accessibilityModal',multiline:'accessibilityMultiline',multiSelectable:'accessibilityMultiSelectable',orientation:'accessibilityOrientation',owns:'accessibilityOwns',placeholder:'accessibilityPlaceholder',posInSet:'accessibilityPosInSet',pressed:'accessibilityPressed',readOnly:'accessibilityReadOnly',required:'accessibilityRequired',role:'accessibilityRole',roleDescription:'accessibilityRoleDescription',rowCount:'accessibilityRowCount',rowIndex:'accessibilityRowIndex',rowSpan:'accessibilityRowSpan',setSize:'accessibilitySetSize',sort:'accessibilitySort',current:'accessibilityCurrent',dropEffect:'accessibilityDropEffect',grabbed:'accessibilityGrabbed',level:'accessibilityLevel',relevant:'accessibilityRelevant'});var accessibilityRoleMap={alert:'alert',button:'button',checkbox:'checkbox',combobox:'combobox',image:'image',link:'link',menu:'menu',menubar:'menubar',menuitem:'menuitem',progressbar:'progressbar',radio:'radio',radiogroup:'radiogroup',scrollbar:'scrollbar',search:'search',spinbutton:'spinbutton',switch:'switch',tab:'tab',tablist:'tablist',timer:'timer',togglebutton:'togglebutton',toolbar:'toolbar',heading:'header',slider:'adjustable',img:'image',presentation:'none',region:'summary',imagebutton:'imagebutton',keyboardkey:'keyboardkey',label:'label',text:'text',meter:'progressbar'};
|
|
3847
|
+
var accessibilityValue={valueMax:'max',valueMin:'min',valueNow:'now',valueText:'text'};var accessibilityState={selected:'selected',disabled:'disabled',expanded:'expanded',busy:'busy',checked:'checked'};var accessibilityValueKeys=Object.keys(accessibilityValue);var accessibilityStateKeys=Object.keys(accessibilityState);var accessibilityMap=_extends({},accessibilityState,accessibilityValue,{activeDescendant:'accessibilityActiveDescendant',atomic:'accessibilityAtomic',autoComplete:'accessibilityAutoComplete',colCount:'accessibilityColCount',colIndex:'accessibilityColIndex',colSpan:'accessibilityColSpan',controls:'accessibilityControls',describedBy:'accessibilityDescribedBy',details:'accessibilityDetails',errorMessage:'accessibilityErrorMessage',flowTo:'accessibilityFlowTo',hasPopup:'accessibilityHasPopup',hidden:'accessibilityHidden',invalid:'accessibilityInvalid',keyShortcuts:'accessibilityKeyShortcuts',label:'accessibilityLabel',labelledBy:'accessibilityLabelledBy',liveRegion:'accessibilityLiveRegion',modal:'accessibilityModal',multiline:'accessibilityMultiline',multiSelectable:'accessibilityMultiSelectable',orientation:'accessibilityOrientation',owns:'accessibilityOwns',placeholder:'accessibilityPlaceholder',posInSet:'accessibilityPosInSet',pressed:'accessibilityPressed',readOnly:'accessibilityReadOnly',required:'accessibilityRequired',role:'accessibilityRole',roleDescription:'accessibilityRoleDescription',rowCount:'accessibilityRowCount',rowIndex:'accessibilityRowIndex',rowSpan:'accessibilityRowSpan',setSize:'accessibilitySetSize',sort:'accessibilitySort',current:'accessibilityCurrent',dropEffect:'accessibilityDropEffect',grabbed:'accessibilityGrabbed',level:'accessibilityLevel',relevant:'accessibilityRelevant'});var accessibilityRoleMap={alert:'alert',button:'button',checkbox:'checkbox',combobox:'combobox',image:'image',link:'link',list:'list',menu:'menu',menubar:'menubar',menuitem:'menuitem',progressbar:'progressbar',radio:'radio',radiogroup:'radiogroup',scrollbar:'scrollbar',search:'search',spinbutton:'spinbutton',switch:'switch',tab:'tab',tablist:'tablist',timer:'timer',togglebutton:'togglebutton',toolbar:'toolbar',heading:'header',slider:'adjustable',img:'image',presentation:'none',region:'summary',imagebutton:'imagebutton',keyboardkey:'keyboardkey',label:'label',text:'text',meter:'progressbar'};
|
|
3848
3848
|
|
|
3849
3849
|
var makeAccessible=function makeAccessible(props){var newProps={};for(var key in props){var propKey=key;var propValue=props[propKey];var accessibilityAttribute=accessibilityMap[propKey];if(accessibilityStateKeys.includes(propKey)){newProps.accessibilityState=_extends({},newProps.accessibilityState,_defineProperty$1({},accessibilityAttribute,propValue));continue;}if(accessibilityValueKeys.includes(propKey)){newProps.accessibilityValue=_extends({},newProps.accessibilityValue,_defineProperty$1({},accessibilityAttribute,propValue));continue;}if(propKey==='hidden'){if(propValue===true){newProps.accessibilityElementsHidden=true;newProps.importantForAccessibility='no-hide-descendants';}delete newProps.accessibilityHidden;continue;}if(accessibilityAttribute){newProps[accessibilityAttribute]=propValue;}else {console.warn("[Blade: makeAccessible]: No mapping found for "+propKey+". Make sure you have entered valid key");}}if(newProps.accessibilityRole){var role=accessibilityRoleMap[newProps.accessibilityRole];newProps.accessibilityRole=role;if(!role){var validRoles=Object.keys(accessibilityRoleMap).join(', ');console.log("[Blade: makeAccessible]: Unsupported accessibility role for react-native. Expected one of "+validRoles+" but found "+props.role);delete newProps.accessibilityRole;}}return newProps;};
|
|
3850
3850
|
|
|
@@ -4553,9 +4553,11 @@ function usePrevious(value){var ref=useRef();useEffect(function(){ref.current=va
|
|
|
4553
4553
|
|
|
4554
4554
|
var isReactNative=function isReactNative(){return getPlatformType()==='react-native';};
|
|
4555
4555
|
|
|
4556
|
+
var getOS=function getOS(){return Platform$1.OS;};var isAndroid=function isAndroid(){return getOS()==='android';};
|
|
4557
|
+
|
|
4556
4558
|
var Platform;(function(_Platform){})(Platform||(Platform={}));
|
|
4557
4559
|
|
|
4558
4560
|
var castWebType=function castWebType(value){return value;};var castNativeType=function castNativeType(value){return value;};
|
|
4559
4561
|
|
|
4560
|
-
export { MetaConstants, Platform, castNativeType, castWebType, cloneDeep_1 as cloneDeep, getColorScheme, getComponentId, get_1 as getIn, getPlatformType, isEmpty_1 as isEmpty, isEqual_1 as isEqual, isPartialMatchObjectKeys, isReactNative, isValidAllowedChildren, makeAccessible, makeBezier, makeBorderSize, makeMotionTime, makeSize, makeSpace, makeTypographySize, merge_1 as merge, metaAttribute, setupMatchMediaMock, testID, toTitleCase, useBreakpoint, useColorScheme, usePrevious };
|
|
4562
|
+
export { MetaConstants, Platform, castNativeType, castWebType, cloneDeep_1 as cloneDeep, getColorScheme, getComponentId, get_1 as getIn, 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, testID, toTitleCase, useBreakpoint, useColorScheme, usePrevious };
|
|
4561
4563
|
//# sourceMappingURL=index.native.js.map
|