@razorpay/blade 5.2.0 → 5.3.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 +13 -0
- package/build/components/index.d.ts +257 -45
- package/build/components/index.native.d.ts +257 -45
- package/build/components/index.native.js +22 -8
- package/build/components/index.native.js.map +1 -1
- package/build/components/index.web.js +533 -186
- 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 +1 -1
- package/build/tokens/index.web.js +1 -1
- package/build/utils/index.d.ts +21 -2
- package/build/utils/index.native.d.ts +21 -2
- package/build/utils/index.native.js +5 -3
- package/build/utils/index.native.js.map +1 -1
- package/build/utils/index.web.js +30 -3
- package/build/utils/index.web.js.map +1 -1
- package/package.json +1 -1
package/build/utils/index.web.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import _defineProperty$1 from '@babel/runtime/helpers/defineProperty';
|
|
2
|
+
import React, { useMemo, useCallback, useState, useEffect, useRef } from 'react';
|
|
2
3
|
import _typeof from '@babel/runtime/helpers/typeof';
|
|
3
4
|
import _slicedToArray from '@babel/runtime/helpers/slicedToArray';
|
|
4
|
-
import { useMemo, useCallback, useState, useEffect, useRef } from 'react';
|
|
5
5
|
|
|
6
6
|
var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};
|
|
7
7
|
|
|
@@ -2809,7 +2809,11 @@ var MetaConstants = {
|
|
|
2809
2809
|
Radio: 'radio',
|
|
2810
2810
|
RadioGroup: 'radio-group',
|
|
2811
2811
|
SkipNav: 'skipnav',
|
|
2812
|
-
Spinner: 'spinner'
|
|
2812
|
+
Spinner: 'spinner',
|
|
2813
|
+
Card: 'card',
|
|
2814
|
+
CardBody: 'card-body',
|
|
2815
|
+
CardHeader: 'card-header',
|
|
2816
|
+
CardFooter: 'card-footer'
|
|
2813
2817
|
};
|
|
2814
2818
|
|
|
2815
2819
|
var getColorScheme = function getColorScheme() {
|
|
@@ -3892,6 +3896,29 @@ function isEqual(value, other) {
|
|
|
3892
3896
|
|
|
3893
3897
|
var isEqual_1 = isEqual;
|
|
3894
3898
|
|
|
3899
|
+
/* eslint-disable @typescript-eslint/no-explicit-any */
|
|
3900
|
+
/**
|
|
3901
|
+
* A type defining React component with additional static prop `componentId`
|
|
3902
|
+
*/
|
|
3903
|
+
|
|
3904
|
+
/**
|
|
3905
|
+
* Gets the `componentId` prop of React component if it exists.
|
|
3906
|
+
*/
|
|
3907
|
+
var getComponentId = function getComponentId(component) {
|
|
3908
|
+
var _component$type;
|
|
3909
|
+
|
|
3910
|
+
if (! /*#__PURE__*/React.isValidElement(component)) return null;
|
|
3911
|
+
return (_component$type = component.type) === null || _component$type === void 0 ? void 0 : _component$type.componentId;
|
|
3912
|
+
};
|
|
3913
|
+
/**
|
|
3914
|
+
* Checks if the `component` matches the `componentId`
|
|
3915
|
+
*/
|
|
3916
|
+
|
|
3917
|
+
|
|
3918
|
+
var isValidAllowedChildren = function isValidAllowedChildren(component, id) {
|
|
3919
|
+
return getComponentId(component) === id;
|
|
3920
|
+
};
|
|
3921
|
+
|
|
3895
3922
|
var isPartialMatchObjectKeys = function isPartialMatchObjectKeys(_ref) {
|
|
3896
3923
|
var objectToMatch = _ref.objectToMatch,
|
|
3897
3924
|
objectToInspect = _ref.objectToInspect;
|
|
@@ -5061,5 +5088,5 @@ var castNativeType = function castNativeType(value) {
|
|
|
5061
5088
|
return value;
|
|
5062
5089
|
};
|
|
5063
5090
|
|
|
5064
|
-
export { MetaConstants, Platform, castNativeType, castWebType, cloneDeep_1 as cloneDeep, getColorScheme, get_1 as getIn, getPlatformType, isEmpty_1 as isEmpty, isEqual_1 as isEqual, isPartialMatchObjectKeys, isReactNative, makeAccessible, makeBezier, makeBorderSize, makeMotionTime, makeSize, makeSpace, makeTypographySize, merge_1 as merge, metaAttribute, setupMatchMediaMock, testID, toTitleCase, useBreakpoint, useColorScheme, usePrevious };
|
|
5091
|
+
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 };
|
|
5065
5092
|
//# sourceMappingURL=index.web.js.map
|