@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.
@@ -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