@razorpay/blade 6.3.0 → 6.5.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 +27 -0
- package/build/components/index.d.ts +2043 -389
- package/build/components/index.native.d.ts +1874 -517
- package/build/components/index.native.js +351 -17538
- package/build/components/index.native.js.map +1 -1
- package/build/components/index.web.js +4445 -18799
- package/build/components/index.web.js.map +1 -1
- package/build/css/bankingThemeDarkDesktop.css +2 -2
- package/build/css/bankingThemeDarkMobile.css +2 -2
- package/build/css/bankingThemeLightDesktop.css +2 -2
- package/build/css/bankingThemeLightMobile.css +2 -2
- package/build/css/paymentThemeDarkDesktop.css +2 -2
- package/build/css/paymentThemeDarkMobile.css +2 -2
- package/build/css/paymentThemeLightDesktop.css +2 -2
- package/build/css/paymentThemeLightMobile.css +2 -2
- package/build/tokens/index.d.ts +135 -14
- package/build/tokens/index.native.d.ts +135 -14
- package/build/tokens/index.native.js +1 -1
- package/build/tokens/index.native.js.map +1 -1
- package/build/tokens/index.web.js +7 -2
- package/build/tokens/index.web.js.map +1 -1
- package/build/utils/index.d.ts +74 -9
- package/build/utils/index.native.d.ts +74 -9
- package/build/utils/index.native.js +7 -5
- package/build/utils/index.native.js.map +1 -1
- package/build/utils/index.web.js +29 -18
- package/build/utils/index.web.js.map +1 -1
- package/package.json +1 -1
package/build/utils/index.web.js
CHANGED
|
@@ -2787,11 +2787,6 @@ function cloneDeep(value) {
|
|
|
2787
2787
|
|
|
2788
2788
|
var cloneDeep_1 = cloneDeep;
|
|
2789
2789
|
|
|
2790
|
-
var metaAttribute = function metaAttribute(name, value) {
|
|
2791
|
-
if (!value) return {};
|
|
2792
|
-
return _defineProperty$1({}, "data-".concat(name), value);
|
|
2793
|
-
};
|
|
2794
|
-
|
|
2795
2790
|
var MetaConstants = {
|
|
2796
2791
|
ActionList: 'action-list',
|
|
2797
2792
|
ActionListFooter: 'action-list-footer',
|
|
@@ -2800,6 +2795,7 @@ var MetaConstants = {
|
|
|
2800
2795
|
ActionListSection: 'action-list-section',
|
|
2801
2796
|
Alert: 'alert',
|
|
2802
2797
|
Badge: 'badge',
|
|
2798
|
+
Box: 'Box',
|
|
2803
2799
|
Button: 'button',
|
|
2804
2800
|
Checkbox: 'checkbox',
|
|
2805
2801
|
CheckboxGroup: 'checkbox-group',
|
|
@@ -2823,7 +2819,18 @@ var MetaConstants = {
|
|
|
2823
2819
|
Card: 'card',
|
|
2824
2820
|
CardBody: 'card-body',
|
|
2825
2821
|
CardHeader: 'card-header',
|
|
2826
|
-
CardFooter: 'card-footer'
|
|
2822
|
+
CardFooter: 'card-footer',
|
|
2823
|
+
VisuallyHidden: 'visually-hidden'
|
|
2824
|
+
};
|
|
2825
|
+
|
|
2826
|
+
function ownKeys$3(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
2827
|
+
|
|
2828
|
+
function _objectSpread$3(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys$3(Object(source), !0).forEach(function (key) { _defineProperty$1(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys$3(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
2829
|
+
|
|
2830
|
+
var metaAttribute = function metaAttribute(_ref) {
|
|
2831
|
+
var name = _ref.name,
|
|
2832
|
+
testID = _ref.testID;
|
|
2833
|
+
return _objectSpread$3(_objectSpread$3({}, name ? _defineProperty$1({}, "data-".concat(MetaConstants.Component), name) : {}), testID ? _defineProperty$1({}, "data-testid", testID) : {});
|
|
2827
2834
|
};
|
|
2828
2835
|
|
|
2829
2836
|
var getColorScheme = function getColorScheme() {
|
|
@@ -3229,6 +3236,12 @@ function get(object, path, defaultValue) {
|
|
|
3229
3236
|
|
|
3230
3237
|
var get_1 = get;
|
|
3231
3238
|
|
|
3239
|
+
var getMediaQuery = function getMediaQuery(_ref) {
|
|
3240
|
+
var min = _ref.min,
|
|
3241
|
+
max = _ref.max;
|
|
3242
|
+
return "screen and (min-width: ".concat(min, "px)").concat(max ? " and (max-width: ".concat(max, "px)") : '');
|
|
3243
|
+
};
|
|
3244
|
+
|
|
3232
3245
|
var getPlatformType = function getPlatformType() {
|
|
3233
3246
|
if (typeof navigator !== 'undefined' && navigator.product === 'ReactNative') {
|
|
3234
3247
|
return 'react-native';
|
|
@@ -4803,20 +4816,18 @@ var useBreakpoint = function useBreakpoint(_ref) {
|
|
|
4803
4816
|
var supportsMatchMedia = typeof document !== 'undefined' && typeof window !== 'undefined' && typeof ((_window = window) === null || _window === void 0 ? void 0 : _window.matchMedia) === 'function';
|
|
4804
4817
|
var breakpointsTokenAndQueryCollection = useMemo(function () {
|
|
4805
4818
|
return supportsMatchMedia ? Object.entries(breakpoints).map(function (_ref2, index, breakpointsArray) {
|
|
4819
|
+
var _breakpointsArray;
|
|
4820
|
+
|
|
4806
4821
|
var _ref3 = _slicedToArray(_ref2, 2),
|
|
4807
4822
|
token = _ref3[0],
|
|
4808
4823
|
screenSize = _ref3[1];
|
|
4809
4824
|
|
|
4810
|
-
var
|
|
4811
|
-
|
|
4812
|
-
|
|
4813
|
-
|
|
4814
|
-
|
|
4815
|
-
|
|
4816
|
-
} else {
|
|
4817
|
-
mediaQuery = "screen and (max-width: ".concat(screenSize, "px)");
|
|
4818
|
-
}
|
|
4819
|
-
|
|
4825
|
+
var min = screenSize;
|
|
4826
|
+
var maxValue = (_breakpointsArray = breakpointsArray[index + 1]) === null || _breakpointsArray === void 0 ? void 0 : _breakpointsArray[1];
|
|
4827
|
+
var mediaQuery = getMediaQuery({
|
|
4828
|
+
min: min,
|
|
4829
|
+
max: maxValue ? maxValue - 1 : undefined
|
|
4830
|
+
});
|
|
4820
4831
|
return {
|
|
4821
4832
|
token: token,
|
|
4822
4833
|
screenSize: screenSize,
|
|
@@ -4831,7 +4842,7 @@ var useBreakpoint = function useBreakpoint(_ref) {
|
|
|
4831
4842
|
if (platform === 'react-native') {
|
|
4832
4843
|
matchedDeviceType = deviceType.mobile;
|
|
4833
4844
|
} else if (platform === 'browser') {
|
|
4834
|
-
if (matchedBreakpoint && ['
|
|
4845
|
+
if (matchedBreakpoint && ['base', 'xs', 's'].includes(matchedBreakpoint)) {
|
|
4835
4846
|
// tablet is also categorised as mobile
|
|
4836
4847
|
matchedDeviceType = deviceType.mobile;
|
|
4837
4848
|
} else {
|
|
@@ -5105,5 +5116,5 @@ var castNativeType = function castNativeType(value) {
|
|
|
5105
5116
|
return value;
|
|
5106
5117
|
};
|
|
5107
5118
|
|
|
5108
|
-
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 };
|
|
5119
|
+
export { MetaConstants, Platform, 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, testID, toTitleCase, useBreakpoint, useColorScheme, usePrevious };
|
|
5109
5120
|
//# sourceMappingURL=index.web.js.map
|