@razorpay/blade 5.2.1 → 5.4.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 +12 -0
- package/build/components/index.d.ts +334 -44
- package/build/components/index.native.d.ts +332 -42
- package/build/components/index.native.js +222 -32
- package/build/components/index.native.js.map +1 -1
- package/build/components/index.web.js +918 -140
- 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.native.js.map +1 -1
- package/build/tokens/index.web.js +1 -1
- package/build/tokens/index.web.js.map +1 -1
- package/build/utils/index.d.ts +23 -3
- package/build/utils/index.native.d.ts +23 -3
- package/build/utils/index.native.js +6 -4
- package/build/utils/index.native.js.map +1 -1
- package/build/utils/index.web.js +31 -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
|
|
|
@@ -2806,10 +2806,15 @@ var MetaConstants = {
|
|
|
2806
2806
|
Indicator: 'indicator',
|
|
2807
2807
|
Link: 'link',
|
|
2808
2808
|
OTPInput: 'otp-input',
|
|
2809
|
+
ProgressBar: 'progress-bar',
|
|
2809
2810
|
Radio: 'radio',
|
|
2810
2811
|
RadioGroup: 'radio-group',
|
|
2811
2812
|
SkipNav: 'skipnav',
|
|
2812
|
-
Spinner: 'spinner'
|
|
2813
|
+
Spinner: 'spinner',
|
|
2814
|
+
Card: 'card',
|
|
2815
|
+
CardBody: 'card-body',
|
|
2816
|
+
CardHeader: 'card-header',
|
|
2817
|
+
CardFooter: 'card-footer'
|
|
2813
2818
|
};
|
|
2814
2819
|
|
|
2815
2820
|
var getColorScheme = function getColorScheme() {
|
|
@@ -3892,6 +3897,29 @@ function isEqual(value, other) {
|
|
|
3892
3897
|
|
|
3893
3898
|
var isEqual_1 = isEqual;
|
|
3894
3899
|
|
|
3900
|
+
/* eslint-disable @typescript-eslint/no-explicit-any */
|
|
3901
|
+
/**
|
|
3902
|
+
* A type defining React component with additional static prop `componentId`
|
|
3903
|
+
*/
|
|
3904
|
+
|
|
3905
|
+
/**
|
|
3906
|
+
* Gets the `componentId` prop of React component if it exists.
|
|
3907
|
+
*/
|
|
3908
|
+
var getComponentId = function getComponentId(component) {
|
|
3909
|
+
var _component$type;
|
|
3910
|
+
|
|
3911
|
+
if (! /*#__PURE__*/React.isValidElement(component)) return null;
|
|
3912
|
+
return (_component$type = component.type) === null || _component$type === void 0 ? void 0 : _component$type.componentId;
|
|
3913
|
+
};
|
|
3914
|
+
/**
|
|
3915
|
+
* Checks if the `component` matches the `componentId`
|
|
3916
|
+
*/
|
|
3917
|
+
|
|
3918
|
+
|
|
3919
|
+
var isValidAllowedChildren = function isValidAllowedChildren(component, id) {
|
|
3920
|
+
return getComponentId(component) === id;
|
|
3921
|
+
};
|
|
3922
|
+
|
|
3895
3923
|
var isPartialMatchObjectKeys = function isPartialMatchObjectKeys(_ref) {
|
|
3896
3924
|
var objectToMatch = _ref.objectToMatch,
|
|
3897
3925
|
objectToInspect = _ref.objectToInspect;
|
|
@@ -5061,5 +5089,5 @@ var castNativeType = function castNativeType(value) {
|
|
|
5061
5089
|
return value;
|
|
5062
5090
|
};
|
|
5063
5091
|
|
|
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 };
|
|
5092
|
+
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
5093
|
//# sourceMappingURL=index.web.js.map
|